@depay/widgets 9.2.1 → 9.2.3
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/dist/esm/index.bundle.js +1 -1
- package/dist/esm/index.js +5 -0
- package/dist/umd/index.bundle.js +1 -1
- package/dist/umd/index.js +5 -0
- package/package.json +1 -1
package/dist/esm/index.bundle.js
CHANGED
|
@@ -96,4 +96,4 @@ var r=n(129),i=n(130),o=n(131);function a(){return u.TYPED_ARRAY_SUPPORT?2147483
|
|
|
96
96
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
97
97
|
var r=n(19),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},a.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,n){(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(66)),o=n(140),a=n(68),s=/^[0-9]*$/,u=/^[a-f0-9]*$/;function c(t){return[...t].map((t=>t.toString(16).padStart(2,"0"))).join("")}function l(t){return t.startsWith("0x")||t.startsWith("0X")}function h(t){return l(t)?t.slice(2):t}function 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 u.test(e)}function p(t,e=!1){if("string"==typeof t){const n=h(t).toLowerCase();if(u.test(n))return(0,a.HexString)(e?"0x"+n:n)}throw new Error(`"${String(t)}" is not a hexadecimal string`)}function m(t,e=!1){let n=p(t,!1);return n.length%2==1&&(n=(0,a.HexString)("0"+n)),e?(0,a.HexString)("0x"+n):n}function y(t){if("number"==typeof t&&Number.isInteger(t))return(0,a.IntNumber)(t);if("string"==typeof t){if(s.test(t))return(0,a.IntNumber)(Number(t));if(f(t))return(0,a.IntNumber)(new i.default(m(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 c(crypto.getRandomValues(new Uint8Array(t)))},e.uint8ArrayToHex=c,e.hexStringToUint8Array=function(t){return new Uint8Array(t.match(/.{1,2}/g).map((t=>parseInt(t,16))))},e.hexStringFromBuffer=function(t,e=!1){const n=t.toString("hex");return(0,a.HexString)(e?"0x"+n:n)},e.bigIntStringFromBN=function(t){return(0,a.BigIntString)(t.toString(10))},e.intNumberFromHexString=function(t){return(0,a.IntNumber)(new i.default(m(t,!1),16).toNumber())},e.hexStringFromIntNumber=function(t){return(0,a.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=m,e.ensureAddressString=function(t){if("string"==typeof t){const e=h(t).toLowerCase();if(f(e)&&40===e.length)return(0,a.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=m(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,a.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(s.test(t))return new i.default(t,10);if(f(t))return new i.default(m(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,o.stringify)({[i]:t,secret:e,server:n,v:"1"})}`}}).call(this,n(19).Buffer)},function(t,e,n){n.d(e,"a",(function(){return a}));var r=n(10),i=n(29),o=n(58);function a(){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(o.a)(t,n)):Object(i.a)(t)}},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],l=!1,h=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&f())}function f(){if(!l){var t=s(d);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new p(t,e)),1!==c.length||l||s(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o}));var r=n(15);function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t)}function o(t){return 0===t.length?r.a:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}},function(t,e,n){n.d(e,"b",(function(){return c})),n.d(e,"a",(function(){return l}));var r=n(0),i=1,o=Promise.resolve(),a={};function s(t){return t in a&&(delete a[t],!0)}var u=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.a(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=function(t){var e=i++;return a[e]=!0,o.then((function(){return s(e)&&t()})),e}(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&&(function(t){s(t)}(n),e.scheduled=void 0)},e}(n(32).a),c=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.a(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(30).a))(u),l=c},function(t,e,n){n.d(e,"a",(function(){return r}));var r="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()},function(t,e,n){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}()},function(t,e,n){var r=n(37).Buffer;function i(t,e){this._block=r.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=r.from(t,e));for(var n=this._block,i=this._blockSize,o=t.length,a=this._len,s=0;s<o;){for(var u=a%i,c=Math.min(o-s,i-u),l=0;l<c;l++)n[u+l]=t[s+l];s+=c,(a+=c)%i==0&&this._update(n)}return this._len+=o,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},function(t,e,n){var r={};function i(t,e,n){n||(n=Error);var i=function(t){var n,r;function i(n,r,i){return t.call(this,function(t,n,r){return"string"==typeof e?e:e(t,n,r)}(n,r,i))||this}return r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);i.prototype.name=n.name,i.prototype.code=t,r[t]=i}function o(t,e){if(Array.isArray(t)){var n=t.length;return t=t.map((function(t){return String(t)})),n>2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,n){var r,i,a;if("string"==typeof e&&(i="not ",e.substr(0,i.length)===i)?(r="must not be",e=e.replace(/^not /,"")):r="must be",function(t,e,n){return(void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}(t," argument"))a="The ".concat(t," ").concat(r," ").concat(o(e,"type"));else{var s=function(t,e,n){return"number"!=typeof n&&(n=0),!(n+".".length>t.length)&&-1!==t.indexOf(".",n)}(t)?"property":"argument";a='The "'.concat(t,'" ').concat(s," ").concat(r," ").concat(o(e,"type"))}return a+". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r},function(t,e,n){(function(e){var r=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=c;var i=n(110),o=n(114);n(24)(c,i);for(var a=r(o.prototype),s=0;s<a.length;s++){var u=a[s];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(h,this)}function h(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,n(40))},function(t,e,n){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 o.a})),n.d(e,"observable",(function(){return a.a})),n.d(e,"Subject",(function(){return s.a})),n.d(e,"BehaviorSubject",(function(){return u.a})),n.d(e,"ReplaySubject",(function(){return c.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 b})),n.d(e,"VirtualTimeScheduler",(function(){return w})),n.d(e,"VirtualAction",(function(){return M})),n.d(e,"Scheduler",(function(){return _.a})),n.d(e,"Subscription",(function(){return E.a})),n.d(e,"Subscriber",(function(){return A.a})),n.d(e,"Notification",(function(){return S.a})),n.d(e,"NotificationKind",(function(){return S.b})),n.d(e,"pipe",(function(){return k.a})),n.d(e,"noop",(function(){return N.a})),n.d(e,"identity",(function(){return T.a})),n.d(e,"isObservable",(function(){return x})),n.d(e,"ArgumentOutOfRangeError",(function(){return L.a})),n.d(e,"EmptyError",(function(){return I.a})),n.d(e,"ObjectUnsubscribedError",(function(){return j.a})),n.d(e,"UnsubscriptionError",(function(){return C.a})),n.d(e,"TimeoutError",(function(){return D.a})),n.d(e,"bindCallback",(function(){return B})),n.d(e,"bindNodeCallback",(function(){return Y})),n.d(e,"combineLatest",(function(){return G.b})),n.d(e,"concat",(function(){return q.a})),n.d(e,"defer",(function(){return Z.a})),n.d(e,"empty",(function(){return V.b})),n.d(e,"forkJoin",(function(){return X})),n.d(e,"from",(function(){return K.a})),n.d(e,"fromEvent",(function(){return et})),n.d(e,"fromEventPattern",(function(){return nt})),n.d(e,"generate",(function(){return rt})),n.d(e,"iif",(function(){return ot})),n.d(e,"interval",(function(){return st})),n.d(e,"merge",(function(){return ct.a})),n.d(e,"never",(function(){return ht})),n.d(e,"of",(function(){return dt.a})),n.d(e,"onErrorResumeNext",(function(){return ft})),n.d(e,"pairs",(function(){return pt})),n.d(e,"partition",(function(){return vt})),n.d(e,"race",(function(){return wt.a})),n.d(e,"range",(function(){return Mt})),n.d(e,"throwError",(function(){return Et.a})),n.d(e,"timer",(function(){return At.a})),n.d(e,"using",(function(){return St})),n.d(e,"zip",(function(){return kt.b})),n.d(e,"scheduled",(function(){return Nt.a})),n.d(e,"EMPTY",(function(){return V.a})),n.d(e,"NEVER",(function(){return lt})),n.d(e,"config",(function(){return Tt.a}));var r=n(3),i=n(70),o=n(67),a=n(22),s=n(5),u=n(71),c=n(50),l=n(31),h=n(42),d=n(6),f=n(61),p=n(0),m=n(32),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.a(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}(m.a),g=n(30),b=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p.a(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))(y),v=b,w=function(t){function e(e,n){void 0===e&&(e=M),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.a(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),M=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.a(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){},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}(m.a),_=n(62),E=n(4),A=n(1),S=n(18),k=n(41),N=n(21),T=n(15);function x(t){return!!t&&(t instanceof r.a||"function"==typeof t.lift&&"function"==typeof t.subscribe)}var L=n(25),I=n(27),j=n(23),C=n(44),D=n(73),O=n(9),P=n(57),z=n(7),R=n(10);function B(t,e,n){if(e){if(!Object(R.a)(e))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return B(t,n).apply(void 0,r).pipe(Object(O.a)((function(t){return Object(z.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 o,a=this,s={context:a,subject:o,callbackFunc:t,scheduler:n};return new r.a((function(r){if(n){var i={args:e,subscriber:r,params:s};return n.schedule(U,0,i)}if(!o){o=new l.a;try{t.apply(a,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];o.next(t.length<=1?t[0]:t),o.complete()}]))}catch(t){Object(P.a)(o)?o.error(t):console.warn(t)}}return o.subscribe(r)}))}}function U(t){var e=this,n=t.args,r=t.subscriber,i=t.params,o=i.callbackFunc,a=i.context,s=i.scheduler,u=i.subject;if(!u){u=i.subject=new l.a;try{o.apply(a,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(s.schedule(F,0,{value:r,subject:u}))}]))}catch(t){u.error(t)}}this.add(u.subscribe(r))}function F(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function Y(t,e,n){if(e){if(!Object(R.a)(e))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return Y(t,n).apply(void 0,r).pipe(Object(O.a)((function(t){return Object(z.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 o={subject:void 0,args:e,callbackFunc:t,scheduler:n,context:this};return new r.a((function(r){var i=o.context,a=o.subject;if(n)return n.schedule(Q,0,{params:o,subscriber:r,context:i});if(!a){a=o.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?a.error(n):(a.next(t.length<=1?t[0]:t),a.complete())}]))}catch(t){Object(P.a)(a)?a.error(t):console.warn(t)}}return a.subscribe(r)}))}}function Q(t){var e=this,n=t.params,r=t.subscriber,i=t.context,o=n.callbackFunc,a=n.args,s=n.scheduler,u=n.subject;if(!u){u=n.subject=new l.a;try{o.apply(i,a.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.shift();if(r)e.add(s.schedule(H,0,{err:r,subject:u}));else{var i=t.length<=1?t[0]:t;e.add(s.schedule(W,0,{value:i,subject:u}))}}]))}catch(t){this.add(s.schedule(H,0,{err:t,subject:u}))}}this.add(u.subscribe(r))}function W(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function H(t){var e=t.err;t.subject.error(e)}var G=n(52),q=n(34),Z=n(54),V=n(11),J=n(56),K=n(12);function X(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){var n=t[0];if(Object(z.a)(n))return $(n,null);if(Object(J.a)(n)&&Object.getPrototypeOf(n)===Object.prototype){var r=Object.keys(n);return $(r.map((function(t){return n[t]})),r)}}if("function"==typeof t[t.length-1]){var i=t.pop();return $(t=1===t.length&&Object(z.a)(t[0])?t[0]:t,null).pipe(Object(O.a)((function(t){return i.apply(void 0,t)})))}return $(t,null)}function $(t,e){return new r.a((function(n){var r=t.length;if(0!==r)for(var i=new Array(r),o=0,a=0,s=function(s){var u=Object(K.a)(t[s]),c=!1;n.add(u.subscribe({next:function(t){c||(c=!0,a++),i[s]=t},error:function(t){return n.error(t)},complete:function(){++o!==r&&c||(a===r&&n.next(e?e.reduce((function(t,e,n){return t[e]=i[n],t}),{}):i),n.complete())}}))},u=0;u<r;u++)s(u);else n.complete()}))}var tt=n(26);function et(t,e,n,i){return Object(tt.a)(n)&&(i=n,n=void 0),i?et(t,e,n).pipe(Object(O.a)((function(t){return Object(z.a)(t)?i.apply(void 0,t):i(t)}))):new r.a((function(r){!function t(e,n,r,i,o){var a;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){var s=e;e.addEventListener(n,r,o),a=function(){return s.removeEventListener(n,r,o)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){var u=e;e.on(n,r),a=function(){return u.off(n,r)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){var c=e;e.addListener(n,r),a=function(){return c.removeListener(n,r)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var l=0,h=e.length;l<h;l++)t(e[l],n,r,i,o)}i.add(a)}(t,e,(function(t){arguments.length>1?r.next(Array.prototype.slice.call(arguments)):r.next(t)}),r,n)}))}function nt(t,e,n){return n?nt(t,e).pipe(Object(O.a)((function(t){return Object(z.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(t){return void n.error(t)}if(Object(tt.a)(e))return function(){return e(i,r)}}))}function rt(t,e,n,i,o){var a,s;if(1==arguments.length){var u=t;s=u.initialState,e=u.condition,n=u.iterate,a=u.resultSelector||T.a,o=u.scheduler}else void 0===i||Object(R.a)(i)?(s=t,a=T.a,o=i):(s=t,a=i);return new r.a((function(t){var r=s;if(o)return o.schedule(it,0,{subscriber:t,iterate:n,condition:e,resultSelector:a,state:r});for(;;){if(e){var i=void 0;try{i=e(r)}catch(e){return void t.error(e)}if(!i){t.complete();break}}var u=void 0;try{u=a(r)}catch(e){return void t.error(e)}if(t.next(u),t.closed)break;try{r=n(r)}catch(e){return void t.error(e)}}}))}function it(t){var e=t.subscriber,n=t.condition;if(!e.closed){if(t.needIterate)try{t.state=t.iterate(t.state)}catch(t){return void e.error(t)}else t.needIterate=!0;if(n){var r=void 0;try{r=n(t.state)}catch(t){return void e.error(t)}if(!r)return void e.complete();if(e.closed)return}var i;try{i=t.resultSelector(t.state)}catch(t){return void e.error(t)}if(!e.closed&&(e.next(i),!e.closed))return this.schedule(t)}}function ot(t,e,n){return void 0===e&&(e=V.a),void 0===n&&(n=V.a),Object(Z.a)((function(){return t()?e:n}))}var at=n(33);function st(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(ut,t,{subscriber:n,counter:0,period:t})),n}))}function ut(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 ct=n(75),lt=new r.a(N.a);function ht(){return lt}var dt=n(39);function ft(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return V.a;var n=t[0],i=t.slice(1);return 1===t.length&&Object(z.a)(n)?ft.apply(void 0,n):new r.a((function(t){var e=function(){return t.add(ft.apply(void 0,i).subscribe(t))};return Object(K.a)(n).subscribe({next:function(e){t.next(e)},error:e,complete:e})}))}function pt(t,e){return e?new r.a((function(n){var r=Object.keys(t),i=new E.a;return i.add(e.schedule(mt,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 mt(t){var e=t.keys,n=t.index,r=t.subscriber,i=t.subscription,o=t.obj;if(!r.closed)if(n<e.length){var a=e[n];r.next([a,o[a]]),i.add(this.schedule({keys:e,index:n+1,subscriber:r,subscription:i,obj:o}))}else r.complete()}var yt=n(83),gt=n(35),bt=n(17);function vt(t,e,n){return[Object(bt.a)(e,n)(new r.a(Object(gt.a)(t))),Object(bt.a)(Object(yt.a)(e,n))(new r.a(Object(gt.a)(t)))]}var wt=n(76);function Mt(t,e,n){return void 0===t&&(t=0),new r.a((function(r){void 0===e&&(e=t,t=0);var i=0,o=t;if(n)return n.schedule(_t,0,{index:i,count:e,start:t,subscriber:r});for(;;){if(i++>=e){r.complete();break}if(r.next(o++),r.closed)break}}))}function _t(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 Et=n(51),At=n(77);function St(t,e){return new r.a((function(n){var r,i;try{r=t()}catch(t){return void n.error(t)}try{i=e(r)}catch(t){return void n.error(t)}var o=(i?Object(K.a)(i):V.a).subscribe(n);return function(){o.unsubscribe(),r&&r.unsubscribe()}}))}var kt=n(55),Nt=n(78),Tt=n(14)},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(0),i=n(1);function o(){return function(t){return t.lift(new a(t))}}var a=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new s(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),s=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.a(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)},function(t,e,n){n.d(e,"a",(function(){return l}));var r=n(0),i=n(5),o=n(61),a=n(4),s=n(72),u=n(23),c=n(79),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.a(e,t),e.prototype.nextInfiniteTimeWindow=function(e){if(!this.isStopped){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift()}t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this.isStopped||(this._events.push(new h(this._getNow(),e)),this._trimBufferThenGetEvents()),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new u.a;if(this.isStopped||this.hasError?e=a.a.EMPTY:(this.observers.push(t),e=new c.a(this,t)),i&&t.add(t=new s.a(t,i)),n)for(var l=0;l<o&&!t.closed;l++)t.next(r[l]);else for(l=0;l<o&&!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||o.a).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,r=this._events,i=r.length,o=0;o<i&&!(t-r[o].time<n);)o++;return i>e&&(o=Math.max(o,i-e)),o>0&&r.splice(0,o),r},e}(i.a),h=function(t,e){this.time=t,this.value=e}},function(t,e,n){n.d(e,"a",(function(){return i}));var r=n(3);function i(t,e){return e?new r.a((function(n){return e.schedule(o,0,{error:t,subscriber:n})})):new r.a((function(e){return e.error(t)}))}function o(t){var e=t.error;t.subscriber.error(e)}},function(t,e,n){n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return h}));var r=n(0),i=n(10),o=n(7),a=n(16),s=n(13),u=n(29),c={};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(o.a)(t[0])&&(t=t[0]),Object(u.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.a(e,t),e.prototype._next=function(t){this.values.push(c),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(s.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],o=this.toRespond?i===c?--this.toRespond:this.toRespond:0;r[n]=e,0===o&&(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(t){return void this.destination.error(t)}this.destination.next(e)},e}(a.a)},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(28),i=n(15);function o(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),Object(r.b)(i.a,t)}},function(t,e,n){n.d(e,"a",(function(){return a}));var r=n(3),i=n(12),o=n(11);function a(t){return new r.a((function(e){var n;try{n=t()}catch(t){return void e.error(t)}return(n?Object(i.a)(n):Object(o.b)()).subscribe(e)}))}},function(t,e,n){n.d(e,"b",(function(){return c})),n.d(e,"a",(function(){return l}));var r=n(0),i=n(29),o=n(7),a=n(1),s=n(20),u=n(2);function c(){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){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.a(e,t),e.prototype._next=function(t){var e=this.iterators;Object(o.a)(t)?e.push(new f(t)):"function"==typeof t[s.a]?e.push(new d(t[s.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];r.stillUnsubscribed?this.destination.add(r.subscribe()):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(a=t[r]).hasValue&&!a.hasValue())return;var i=!1,o=[];for(r=0;r<e;r++){var a,s=(a=t[r]).next();if(a.hasCompleted()&&(i=!0),s.done)return void n.complete();o.push(s.value)}this.resultSelector?this._tryresultSelector(o):n.next(o),i&&n.complete()},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(a.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[s.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.a(e,t),e.prototype[s.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(u.c)(this.observable,new u.a(this))},e}(u.b)},function(t,e,n){function r(t){return null!==t&&"object"==typeof t}n.d(e,"a",(function(){return r}))},function(t,e,n){n.d(e,"a",(function(){return i}));var r=n(1);function i(t){for(;t;){var e=t,n=e.closed,i=e.destination,o=e.isStopped;if(n||o)return!1;t=i&&i instanceof r.a?i:null}return!0}},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(3),i=n(4);function o(t,e){return new r.a((function(n){var r=new i.a,o=0;return r.add(e.schedule((function(){o!==t.length?(n.next(t[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(14),i=n(36),o={closed:!0,next:function(t){},error:function(t){if(r.a.useDeprecatedSynchronousErrorHandling)throw t;Object(i.a)(t)},complete:function(){}}},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 null==t?t:Number.parseInt(t,16)}function i(t){if(null==t)return t;let e=t.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function o(){return Math.floor(16*Math.random()).toString(16)}t.exports={minBlockRef:function(...t){return n(t)[0]},maxBlockRef:function(...t){const e=n(t);return e[e.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){return null==t?t:i(r(t)+1)},intToHex:i,unsafeRandomBytes:function(t){let e="0x";for(let n=0;n<t;n++)e+=o(),e+=o();return e}}},function(t,e,n){n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return a}));var r=n(0),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.a(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(32).a),o=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.a(e,t),e}(n(30).a))(i),a=o},function(t,e,n){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}()},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});const r=n(65);function i(t,e,n){try{Reflect.apply(t,e,n)}catch(t){setTimeout((()=>{throw t}))}}class o extends r.EventEmitter{emit(t,...e){let n="error"===t;const r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){let t;if(e.length>0&&([t]=e),t instanceof Error)throw t;const n=new Error("Unhandled error."+(t?` (${t.message})`:""));throw n.context=t,n}const o=r[t];if(void 0===o)return!1;if("function"==typeof o)i(o,this,e);else{const t=o.length,n=function(t){const e=t.length,n=new Array(e);for(let r=0;r<e;r+=1)n[r]=t[r];return n}(o);for(let r=0;r<t;r+=1)i(n[r],this,e)}return!0}}e.default=o},function(t,e,n){var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var a=Number.isNaN||function(t){return t!=t};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(t,e){return new Promise((function(n,r){function i(n){t.removeListener(e,o),r(n)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),n([].slice.call(arguments))}g(t,e,o,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&g(t,"error",e,{once:!0})}(t,i)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function h(t,e,n,r){var i,o,a,s;if(c(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),a=o[e]),void 0===a)a=o[e]=n,++t._eventsCount;else if("function"==typeof a?a=o[e]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=l(t))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return t}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=d.bind(r);return i.listener=n,r.wrapFn=i,i}function p(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):y(i,i.length)}function m(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function y(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function g(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){r.once&&t.removeEventListener(e,i),n(o)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");u=t}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},s.prototype.getMaxListeners=function(){return l(this)},s.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 a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)o(u,this,e);else{var c=u.length,l=y(u,c);for(n=0;n<c;++n)o(l[n],this,e)}return!0},s.prototype.addListener=function(t,e){return h(this,t,e,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(t,e){return h(this,t,e,!0)},s.prototype.once=function(t,e){return c(e),this.on(t,f(this,t,e)),this},s.prototype.prependOnceListener=function(t,e){return c(e),this.prependListener(t,f(this,t,e)),this},s.prototype.removeListener=function(t,e){var n,r,i,o,a;if(c(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,a||e)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},s.prototype.listeners=function(t){return p(this,t,!0)},s.prototype.rawListeners=function(t){return p(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){(function(t){!function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(133).Buffer}catch(t){}function s(t,e){var n=t.charCodeAt(e);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+t)}function u(t,e,n){var r=s(t,n);return n-1>=e&&(r|=s(t,n-1)<<4),r}function c(t,e,n,i){for(var o=0,a=0,s=Math.min(t.length,n),u=e;u<s;u++){var c=t.charCodeAt(u)-48;o*=i,a=c>=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&a<i,"Invalid character"),o+=a}return o}function l(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,n):(this._parseBase(t,e,i),"le"===n&&this._initArray(this.toArray(),e,n)))},o.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===n)for(i=t.length-1,o=0;i>=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i<t.length;i+=3)a=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,a=0;if("be"===n)for(r=t.length-1;r>=e;r-=2)i=u(t,e,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)i=u(t,e,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,s=Math.min(o,o-a)+n,u=0,l=n;l<s;l+=r)u=c(t,l,l+r,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var h=1;for(u=c(t,l,t.length,e),l=0;l<a;l++)h*=e;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){l(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(t){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c<r;c++){for(var l=u>>>26,h=67108863&u,d=Math.min(c,e.length-1),f=Math.max(0,c-t.length+1);f<=d;f++){var p=c-f|0;l+=(a=(i=0|t.words[p])*(o=0|e.words[f])+h)/67108864|0,h=67108863&a}n.words[c]=0|h,u=0|l}return 0!==u?n.words[c]=0|u:n.length--,n._strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);n=0!=(o=s>>>24-i&16777215)||a!==this.length-1?d[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],l=p[t];n="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modrn(l).toString(t);n=(h=h.idivn(l)).isZero()?m+n:d[c-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(t,e){for(var n=0,r=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|r;t[n++]=255&a,n<t.length&&(t[n++]=a>>8&255),n<t.length&&(t[n++]=a>>16&255),6===o?(n<t.length&&(t[n++]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n<t.length)for(t[n++]=r;n<t.length;)t[n++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var n=t.length-1,r=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|r;t[n--]=255&a,n>=0&&(t[n--]=a>>8&255),n>=0&&(t[n--]=a>>16&255),6===o?(n>=0&&(t[n--]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n>=0)for(t[n--]=r;n>=0;)t[n--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var n=this._zeroBits(this.words[e]);if(t+=n,26!==n)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,n,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o<r.length;o++)e=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<n.length;o++)e=(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,a=0;a<r.length;a++)o=(e=(0|n.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<n.length;a++)o=(e=(0|n.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var y=function(t,e,n){var r,i,o,a=t.words,s=e.words,u=n.words,c=0,l=0|a[0],h=8191&l,d=l>>>13,f=0|a[1],p=8191&f,m=f>>>13,y=0|a[2],g=8191&y,b=y>>>13,v=0|a[3],w=8191&v,M=v>>>13,_=0|a[4],E=8191&_,A=_>>>13,S=0|a[5],k=8191&S,N=S>>>13,T=0|a[6],x=8191&T,L=T>>>13,I=0|a[7],j=8191&I,C=I>>>13,D=0|a[8],O=8191&D,P=D>>>13,z=0|a[9],R=8191&z,B=z>>>13,U=0|s[0],F=8191&U,Y=U>>>13,Q=0|s[1],W=8191&Q,H=Q>>>13,G=0|s[2],q=8191&G,Z=G>>>13,V=0|s[3],J=8191&V,K=V>>>13,X=0|s[4],$=8191&X,tt=X>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,lt=0|s[8],ht=8191<,dt=lt>>>13,ft=0|s[9],pt=8191&ft,mt=ft>>>13;n.negative=t.negative^e.negative,n.length=19;var yt=(c+(r=Math.imul(h,F))|0)+((8191&(i=(i=Math.imul(h,Y))+Math.imul(d,F)|0))<<13)|0;c=((o=Math.imul(d,Y))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,Y))+Math.imul(m,F)|0,o=Math.imul(m,Y);var gt=(c+(r=r+Math.imul(h,W)|0)|0)+((8191&(i=(i=i+Math.imul(h,H)|0)+Math.imul(d,W)|0))<<13)|0;c=((o=o+Math.imul(d,H)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,F),i=(i=Math.imul(g,Y))+Math.imul(b,F)|0,o=Math.imul(b,Y),r=r+Math.imul(p,W)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,H)|0;var bt=(c+(r=r+Math.imul(h,q)|0)|0)+((8191&(i=(i=i+Math.imul(h,Z)|0)+Math.imul(d,q)|0))<<13)|0;c=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,F),i=(i=Math.imul(w,Y))+Math.imul(M,F)|0,o=Math.imul(M,Y),r=r+Math.imul(g,W)|0,i=(i=i+Math.imul(g,H)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,H)|0,r=r+Math.imul(p,q)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,Z)|0;var vt=(c+(r=r+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,K)|0)+Math.imul(d,J)|0))<<13)|0;c=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(E,F),i=(i=Math.imul(E,Y))+Math.imul(A,F)|0,o=Math.imul(A,Y),r=r+Math.imul(w,W)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,H)|0,r=r+Math.imul(g,q)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(b,q)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,K)|0;var wt=(c+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,F),i=(i=Math.imul(k,Y))+Math.imul(N,F)|0,o=Math.imul(N,Y),r=r+Math.imul(E,W)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,H)|0,r=r+Math.imul(w,q)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(M,q)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(g,J)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,K)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(c+(r=r+Math.imul(h,nt)|0)|0)+((8191&(i=(i=i+Math.imul(h,rt)|0)+Math.imul(d,nt)|0))<<13)|0;c=((o=o+Math.imul(d,rt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(x,F),i=(i=Math.imul(x,Y))+Math.imul(L,F)|0,o=Math.imul(L,Y),r=r+Math.imul(k,W)|0,i=(i=i+Math.imul(k,H)|0)+Math.imul(N,W)|0,o=o+Math.imul(N,H)|0,r=r+Math.imul(E,q)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,Z)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(M,J)|0,o=o+Math.imul(M,K)|0,r=r+Math.imul(g,$)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var _t=(c+(r=r+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,at)|0)+Math.imul(d,ot)|0))<<13)|0;c=((o=o+Math.imul(d,at)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(j,F),i=(i=Math.imul(j,Y))+Math.imul(C,F)|0,o=Math.imul(C,Y),r=r+Math.imul(x,W)|0,i=(i=i+Math.imul(x,H)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,H)|0,r=r+Math.imul(k,q)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(N,q)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,K)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(g,nt)|0,i=(i=i+Math.imul(g,rt)|0)+Math.imul(b,nt)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Et=(c+(r=r+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(d,ut)|0))<<13)|0;c=((o=o+Math.imul(d,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(O,F),i=(i=Math.imul(O,Y))+Math.imul(P,F)|0,o=Math.imul(P,Y),r=r+Math.imul(j,W)|0,i=(i=i+Math.imul(j,H)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,H)|0,r=r+Math.imul(x,q)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(L,q)|0,o=o+Math.imul(L,Z)|0,r=r+Math.imul(k,J)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(N,J)|0,o=o+Math.imul(N,K)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(M,nt)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(g,ot)|0,i=(i=i+Math.imul(g,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var At=(c+(r=r+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,dt)|0)+Math.imul(d,ht)|0))<<13)|0;c=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(R,F),i=(i=Math.imul(R,Y))+Math.imul(B,F)|0,o=Math.imul(B,Y),r=r+Math.imul(O,W)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,H)|0,r=r+Math.imul(j,q)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,Z)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(L,J)|0,o=o+Math.imul(L,K)|0,r=r+Math.imul(k,$)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(E,nt)|0,i=(i=i+Math.imul(E,rt)|0)+Math.imul(A,nt)|0,o=o+Math.imul(A,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,at)|0,r=r+Math.imul(g,ut)|0,i=(i=i+Math.imul(g,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0,r=r+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,dt)|0;var St=(c+(r=r+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,mt)|0)+Math.imul(d,pt)|0))<<13)|0;c=((o=o+Math.imul(d,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(R,W),i=(i=Math.imul(R,H))+Math.imul(B,W)|0,o=Math.imul(B,H),r=r+Math.imul(O,q)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(P,q)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(j,J)|0,i=(i=i+Math.imul(j,K)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,K)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,r=r+Math.imul(k,nt)|0,i=(i=i+Math.imul(k,rt)|0)+Math.imul(N,nt)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,ct)|0,r=r+Math.imul(g,ht)|0,i=(i=i+Math.imul(g,dt)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,dt)|0;var kt=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(R,q),i=(i=Math.imul(R,Z))+Math.imul(B,q)|0,o=Math.imul(B,Z),r=r+Math.imul(O,J)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,K)|0,r=r+Math.imul(j,$)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,r=r+Math.imul(x,nt)|0,i=(i=i+Math.imul(x,rt)|0)+Math.imul(L,nt)|0,o=o+Math.imul(L,rt)|0,r=r+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,at)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,at)|0,r=r+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ct)|0,r=r+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,dt)|0)+Math.imul(M,ht)|0,o=o+Math.imul(M,dt)|0;var Nt=(c+(r=r+Math.imul(g,pt)|0)|0)+((8191&(i=(i=i+Math.imul(g,mt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(R,J),i=(i=Math.imul(R,K))+Math.imul(B,J)|0,o=Math.imul(B,K),r=r+Math.imul(O,$)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(j,nt)|0,i=(i=i+Math.imul(j,rt)|0)+Math.imul(C,nt)|0,o=o+Math.imul(C,rt)|0,r=r+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,r=r+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,ct)|0,r=r+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,dt)|0)+Math.imul(A,ht)|0,o=o+Math.imul(A,dt)|0;var Tt=(c+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;c=((o=o+Math.imul(M,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(R,$),i=(i=Math.imul(R,tt))+Math.imul(B,$)|0,o=Math.imul(B,tt),r=r+Math.imul(O,nt)|0,i=(i=i+Math.imul(O,rt)|0)+Math.imul(P,nt)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,r=r+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(L,ut)|0,o=o+Math.imul(L,ct)|0,r=r+Math.imul(k,ht)|0,i=(i=i+Math.imul(k,dt)|0)+Math.imul(N,ht)|0,o=o+Math.imul(N,dt)|0;var xt=(c+(r=r+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,pt)|0))<<13)|0;c=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(R,nt),i=(i=Math.imul(R,rt))+Math.imul(B,nt)|0,o=Math.imul(B,rt),r=r+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,r=r+Math.imul(j,ut)|0,i=(i=i+Math.imul(j,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,r=r+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,dt)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,dt)|0;var Lt=(c+(r=r+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(N,pt)|0))<<13)|0;c=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,r=Math.imul(R,ot),i=(i=Math.imul(R,at))+Math.imul(B,ot)|0,o=Math.imul(B,at),r=r+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,r=r+Math.imul(j,ht)|0,i=(i=i+Math.imul(j,dt)|0)+Math.imul(C,ht)|0,o=o+Math.imul(C,dt)|0;var It=(c+(r=r+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(L,pt)|0))<<13)|0;c=((o=o+Math.imul(L,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(R,ut),i=(i=Math.imul(R,ct))+Math.imul(B,ut)|0,o=Math.imul(B,ct),r=r+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,dt)|0)+Math.imul(P,ht)|0,o=o+Math.imul(P,dt)|0;var jt=(c+(r=r+Math.imul(j,pt)|0)|0)+((8191&(i=(i=i+Math.imul(j,mt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,mt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,r=Math.imul(R,ht),i=(i=Math.imul(R,dt))+Math.imul(B,ht)|0,o=Math.imul(B,dt);var Ct=(c+(r=r+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863;var Dt=(c+(r=Math.imul(R,pt))|0)+((8191&(i=(i=Math.imul(R,mt))+Math.imul(B,pt)|0))<<13)|0;return c=((o=Math.imul(B,mt))+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,u[0]=yt,u[1]=gt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=Mt,u[6]=_t,u[7]=Et,u[8]=At,u[9]=St,u[10]=kt,u[11]=Nt,u[12]=Tt,u[13]=xt,u[14]=Lt,u[15]=It,u[16]=jt,u[17]=Ct,u[18]=Dt,0!==c&&(u[19]=c,n.length++),n};function g(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var a=i;i=0;for(var s=67108863&r,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var l=o-c,h=(0|t.words[l])*(0|e.words[c]),d=67108863&h;s=67108863&(d=d+s|0),i+=(a=(a=a+(h/67108864|0)|0)+(d>>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function b(t,e,n){return g(t,e,n)}Math.imul||(y=m),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?y(this,t,e):n<63?m(this,t,e):n<1024?g(this,t,e):b(this,t,e)},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),b(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),r("number"==typeof t),r(t<67108864);for(var n=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,a=(67108863&o)+(67108863&n);n>>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n<e.length;n++){var r=n/26|0,i=n%26;e[n]=t.words[r]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,u=(0|this.words[e])-s<<n;this.words[e]=u|a,a=s>>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,n){var i;r("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,u=n;if(i-=a,i=Math.max(0,i),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var h=0|this.words[c];this.words[c]=l<<26-o|h>>>o,l=h&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n||!(this.words[n]&i))},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,n){var i,o,a=t.length+n;this._expand(a);var s=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+s;var u=(0|t.words[i])*e;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)s=(o=(0|this.words[i+n])+s)>>26,this.words[i+n]=67108863&o;if(0===s)return this._strip();for(r(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!=(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var l=r.clone()._ishlnsubmul(i,1,u);0===l.negative&&(r=l,s&&(s.words[u]=1));for(var h=u-1;h>=0;h--){var d=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(d=Math.min(d/a|0,67108863),r._ishlnsubmul(i,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);s&&(s.words[h]=d)}return s&&s._strip(),r._strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/t|0,n=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),h=e.clone();!e.isZero();){for(var d=0,f=1;0==(e.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(h)),s.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),a.isub(u)):(n.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,l=1;0==(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var h=0,d=1;0==(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,a=n;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){r<i?e=-1:r>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new S(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function M(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(M,w),M.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r<n;r++)e.words[r]=t.words[r];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,r=10;r<t.length;r++){var o=0|t.words[r];t.words[r-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},M.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(_,w),i(E,w),i(A,w),A.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new M;else if("p224"===t)e=new _;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return v[t]=e,e},S.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var h=this.pow(l,i),d=this.pow(t,i.addn(1).iushrn(1)),f=this.pow(t,i),p=a;0!==f.cmp(s);){for(var m=f,y=0;0!==m.cmp(s);y++)m=m.redSqr();r(y<p);var g=this.pow(h,new o(1).iushln(p-y-1));d=d.redMul(g),h=g.redSqr(),f=f.redMul(h),p=y}return d},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],a=0,s=0,u=e.bitLength()%26;for(0===u&&(u=26),r=e.length-1;r>=0;r--){for(var c=e.words[r],l=u-1;l>=0;l--){var h=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4==++s||0===r&&0===l)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new k(t)},i(k,S),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(132)(t))},function(t,e,n){n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return d}));var r=n(0),i=n(1),o=n(4),a=n(3),s=n(5);function u(t,e,n,r){return function(i){return i.lift(new c(t,e,n,r))}}var c=function(){function t(t,e,n,r){this.keySelector=t,this.elementSelector=e,this.durationSelector=n,this.subjectSelector=r}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),l=function(t){function e(e,n,r,i,o){var a=t.call(this,e)||this;return a.keySelector=n,a.elementSelector=r,a.durationSelector=i,a.subjectSelector=o,a.groups=null,a.attemptedToUnsubscribe=!1,a.count=0,a}return r.a(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(t){return void this.error(t)}this._group(t,e)},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups=new Map);var r,i=n.get(e);if(this.elementSelector)try{r=this.elementSelector(t)}catch(t){this.error(t)}else r=t;if(!i){i=this.subjectSelector?this.subjectSelector():new s.a,n.set(e,i);var o=new d(e,i,this);if(this.destination.next(o),this.durationSelector){var a=void 0;try{a=this.durationSelector(new d(e,i))}catch(t){return void this.error(t)}this.add(a.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.a(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.a(e,t),e.prototype._subscribe=function(t){var e=new o.a,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new f(n)),e.add(r.subscribe(t)),e},e}(a.a),f=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return r.a(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(o.a)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=e.RegExpString=e.IntNumber=e.BigIntString=e.AddressString=e.HexString=e.OpaqueType=void 0,e.OpaqueType=function(){return t=>t},e.HexString=t=>t,e.AddressString=t=>t,e.BigIntString=t=>t,e.IntNumber=function(t){return Math.floor(t)},e.RegExpString=t=>t,function(t){t.CoinbaseWallet="CoinbaseWallet",t.MetaMask="MetaMask",t.Unselected=""}(e.ProviderType||(e.ProviderType={}))},function(t,e,n){n.r(e),n.d(e,"audit",(function(){return o})),n.d(e,"auditTime",(function(){return l})),n.d(e,"buffer",(function(){return h})),n.d(e,"bufferCount",(function(){return m})),n.d(e,"bufferTime",(function(){return w})),n.d(e,"bufferToggle",(function(){return L})),n.d(e,"bufferWhen",(function(){return C})),n.d(e,"catchError",(function(){return P})),n.d(e,"combineAll",(function(){return U})),n.d(e,"combineLatest",(function(){return Q})),n.d(e,"concat",(function(){return H})),n.d(e,"concatAll",(function(){return G.a})),n.d(e,"concatMap",(function(){return Z})),n.d(e,"concatMapTo",(function(){return V})),n.d(e,"count",(function(){return J})),n.d(e,"debounce",(function(){return $})),n.d(e,"debounceTime",(function(){return nt})),n.d(e,"defaultIfEmpty",(function(){return at})),n.d(e,"delay",(function(){return ht})),n.d(e,"delayWhen",(function(){return yt})),n.d(e,"dematerialize",(function(){return Mt})),n.d(e,"distinct",(function(){return At})),n.d(e,"distinctUntilChanged",(function(){return Nt})),n.d(e,"distinctUntilKeyChanged",(function(){return Lt})),n.d(e,"elementAt",(function(){return Yt})),n.d(e,"endWith",(function(){return Wt})),n.d(e,"every",(function(){return Ht})),n.d(e,"exhaust",(function(){return Zt})),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 se})),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 Ee})),n.d(e,"map",(function(){return Kt.a})),n.d(e,"mapTo",(function(){return Ae})),n.d(e,"materialize",(function(){return Ne})),n.d(e,"max",(function(){return Oe})),n.d(e,"merge",(function(){return ze})),n.d(e,"mergeAll",(function(){return Re.a})),n.d(e,"mergeMap",(function(){return q.b})),n.d(e,"flatMap",(function(){return q.a})),n.d(e,"mergeMapTo",(function(){return Be})),n.d(e,"mergeScan",(function(){return Ue})),n.d(e,"min",(function(){return Qe})),n.d(e,"multicast",(function(){return He})),n.d(e,"observeOn",(function(){return qe.b})),n.d(e,"onErrorResumeNext",(function(){return Ze})),n.d(e,"pairwise",(function(){return Ke})),n.d(e,"partition",(function(){return en})),n.d(e,"pluck",(function(){return nn})),n.d(e,"publish",(function(){return an})),n.d(e,"publishBehavior",(function(){return un})),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 De})),n.d(e,"repeat",(function(){return mn})),n.d(e,"repeatWhen",(function(){return bn})),n.d(e,"retry",(function(){return Mn})),n.d(e,"retryWhen",(function(){return An})),n.d(e,"refCount",(function(){return Nn.a})),n.d(e,"sample",(function(){return Tn})),n.d(e,"sampleTime",(function(){return In})),n.d(e,"scan",(function(){return Le})),n.d(e,"sequenceEqual",(function(){return On})),n.d(e,"share",(function(){return Un})),n.d(e,"shareReplay",(function(){return Fn})),n.d(e,"single",(function(){return Yn})),n.d(e,"skip",(function(){return Hn})),n.d(e,"skipLast",(function(){return Zn})),n.d(e,"skipUntil",(function(){return Kn})),n.d(e,"skipWhile",(function(){return tr})),n.d(e,"startWith",(function(){return rr})),n.d(e,"subscribeOn",(function(){return sr})),n.d(e,"switchAll",(function(){return dr})),n.d(e,"switchMap",(function(){return cr})),n.d(e,"switchMapTo",(function(){return fr})),n.d(e,"take",(function(){return Bt})),n.d(e,"takeLast",(function(){return we})),n.d(e,"takeUntil",(function(){return pr})),n.d(e,"takeWhile",(function(){return gr})),n.d(e,"tap",(function(){return _r})),n.d(e,"throttle",(function(){return kr})),n.d(e,"throttleTime",(function(){return xr})),n.d(e,"throwIfEmpty",(function(){return Dt})),n.d(e,"timeInterval",(function(){return Dr})),n.d(e,"timeout",(function(){return Fr})),n.d(e,"timeoutWith",(function(){return zr})),n.d(e,"timestamp",(function(){return Yr})),n.d(e,"toArray",(function(){return Hr})),n.d(e,"window",(function(){return Gr})),n.d(e,"windowCount",(function(){return Vr})),n.d(e,"windowTime",(function(){return Xr})),n.d(e,"windowToggle",(function(){return oi})),n.d(e,"windowWhen",(function(){return ui})),n.d(e,"withLatestFrom",(function(){return hi})),n.d(e,"zip",(function(){return mi})),n.d(e,"zipAll",(function(){return yi}));var r=n(0),i=n(2);function o(t){return function(e){return e.lift(new a(t))}}var a=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.durationSelector))},t}(),s=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.a(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t)}catch(t){return this.destination.error(t)}var n=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.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=void 0,n.unsubscribe()),e&&(this.value=void 0,this.hasValue=!1,this.destination.next(t))},e.prototype.notifyNext=function(){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(i.b),u=n(6),c=n(77);function l(t,e){return void 0===e&&(e=u.a),o((function(){return Object(c.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.a(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(1);function m(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?b: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.a(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),b=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.a(e,t),e.prototype._next=function(t){var e=this.bufferSize,n=this.startBufferEvery,r=this.buffers,i=this.count;this.count++,i%n==0&&r.push([]);for(var o=r.length;o--;){var a=r[o];a.push(t),a.length===e&&(r.splice(o,1),this.destination.next(a))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var r=e.shift();r.length>0&&n.next(r)}t.prototype._complete.call(this)},e}(p.a),v=n(10);function w(t){var e=arguments.length,n=u.a;Object(v.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 M(t,r,i,n))}}var M=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 E(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),_=function(){this.buffer=[]},E=function(t){function e(e,n,r,i,o){var a=t.call(this,e)||this;a.bufferTimeSpan=n,a.bufferCreationInterval=r,a.maxBufferSize=i,a.scheduler=o,a.contexts=[];var s=a.openContext();if(a.timespanOnly=null==r||r<0,a.timespanOnly){var u={subscriber:a,context:s,bufferTimeSpan:n};a.add(s.closeAction=o.schedule(A,n,u))}else{var c={subscriber:a,context:s},l={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:a,scheduler:o};a.add(s.closeAction=o.schedule(k,n,c)),a.add(o.schedule(S,r,l))}return a}return r.a(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,r=n.length,i=0;i<r;i++){var o=n[i],a=o.buffer;a.push(t),a.length==this.maxBufferSize&&(e=o)}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(A,n,r))}},e.prototype.openContext=function(){var t=new _;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 A(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 S(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,r=t.subscriber,i=t.scheduler,o=r.openContext();r.closed||(r.add(o.closeAction=i.schedule(k,n,{subscriber:r,context:o})),this.schedule(t,e))}function k(t){var e=t.subscriber,n=t.context;e.closeContext(n)}var N=n(4),T=n(13),x=n(16);function L(t,e){return function(n){return n.lift(new I(t,e))}}var I=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(T.a)(i,n)),i}return r.a(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(t){this._error(t)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.buffer,r=t.subscription;this.destination.next(n),e.splice(e.indexOf(t),1),this.remove(r),r.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new N.a,r={buffer:[],subscription:n};e.push(r);var i=Object(T.a)(this,t,r);!i||i.closed?this.closeBuffer(r):(i.context=r,this.add(i),n.add(i))},e}(x.a);function C(t){return function(e){return e.lift(new D(t))}}var D=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new O(t,this.closingSelector))},t}(),O=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.a(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},e.prototype.notifyNext=function(){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{e=(0,this.closingSelector)()}catch(t){return this.error(t)}t=new N.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 P(t){return function(e){var n=new z(t),r=e.lift(n);return n.caught=r}}var z=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new R(t,this.selector,this.caught))},t}(),R=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.selector=n,i.caught=r,i}return r.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle();var r=new i.a(this);this.add(r);var o=Object(i.c)(n,r);o!==r&&this.add(o)}},e}(i.b),B=n(52);function U(t){return function(e){return e.lift(new B.a(t))}}var F=n(7),Y=n(12);function Q(){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(F.a)(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(Object(Y.a)([e].concat(t)),new B.a(n))}}var W=n(34);function H(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(W.a.apply(void 0,[e].concat(t)))}}var G=n(74),q=n(28);function Z(t,e){return Object(q.b)(t,e,1)}function V(t,e){return Z((function(){return t}),e)}function J(t){return function(e){return e.lift(new K(t,e))}}var K=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.a(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(t){return void this.destination.error(t)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(p.a);function $(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.a(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(t){this.destination.error(t)}},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=u.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.a(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(ot,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 ot(t){t.debouncedNext()}function at(t){return void 0===t&&(t=null),function(e){return e.lift(new st(t))}}var st=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new ut(t,this.defaultValue))},t}(),ut=function(t){function e(e,n){var r=t.call(this,e)||this;return r.defaultValue=n,r.isEmpty=!0,r}return r.a(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 ct(t){return t instanceof Date&&!isNaN(+t)}var lt=n(18);function ht(t,e){void 0===e&&(e=u.a);var n=ct(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.a(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 o=Math.max(0,n[0].time-r.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new pt(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(lt.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(t,e){this.time=t,this.notification=e},mt=n(3);function yt(t,e){return e?function(n){return new vt(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 bt(t,this.delayDurationSelector))},t}(),bt=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.a(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(t),this.removeSubscription(i),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var n=Object(T.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}(x.a),vt=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subscriptionDelay=n,r}return r.a(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new wt(t,this.source))},e}(mt.a),wt=function(t){function e(e,n){var r=t.call(this)||this;return r.parent=e,r.source=n,r.sourceSubscribed=!1,r}return r.a(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 Mt(){return function(t){return t.lift(new _t)}}var _t=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Et(t))},t}(),Et=function(t){function e(e){return t.call(this,e)||this}return r.a(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(p.a);function At(t,e){return function(n){return n.lift(new St(t,e))}}var St=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new kt(t,this.keySelector,this.flushes))},t}(),kt=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.keySelector=n,o.values=new Set,r&&o.add(Object(i.c)(r,new i.a(o))),o}return r.a(e,t),e.prototype.notifyNext=function(){this.values.clear()},e.prototype.notifyError=function(t){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t)}catch(t){return void n.error(t)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e))},e}(i.b);function Nt(t,e){return function(n){return n.lift(new Tt(t,e))}}var Tt=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new xt(t,this.compare,this.keySelector))},t}(),xt=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.a(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var n=this.keySelector;e=n?n(t):t}catch(t){return this.destination.error(t)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,e)}catch(t){return this.destination.error(t)}else this.hasKey=!0;r||(this.key=e,this.destination.next(t))},e}(p.a);function Lt(t,e){return Nt((function(n,r){return e?e(n[t],r[t]):n[t]===r[t]}))}var It=n(25),jt=n(17),Ct=n(27);function Dt(t){return void 0===t&&(t=zt),function(e){return e.lift(new Ot(t))}}var Ot=function(){function t(t){this.errorFactory=t}return t.prototype.call=function(t,e){return e.subscribe(new Pt(t,this.errorFactory))},t}(),Pt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.errorFactory=n,r.hasValue=!1,r}return r.a(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 zt(){return new Ct.a}var Rt=n(11);function Bt(t){return function(e){return 0===t?Object(Rt.b)():e.lift(new Ut(t))}}var Ut=function(){function t(t){if(this.total=t,this.total<0)throw new It.a}return t.prototype.call=function(t,e){return e.subscribe(new Ft(t,this.total))},t}(),Ft=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.a(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 Yt(t,e){if(t<0)throw new It.a;var n=arguments.length>=2;return function(r){return r.pipe(Object(jt.a)((function(e,n){return n===t})),Bt(1),n?at(e):Dt((function(){return new It.a})))}}var Qt=n(39);function Wt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return Object(W.a)(e,Qt.a.apply(void 0,t))}}function Ht(t,e){return function(n){return n.lift(new Gt(t,e,n))}}var Gt=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 qt(t,this.predicate,this.thisArg,this.source))},t}(),qt=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.predicate=n,o.thisArg=r,o.source=i,o.index=0,o.thisArg=r||o,o}return r.a(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(t){return void this.destination.error(t)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(p.a);function Zt(){return function(t){return t.lift(new Vt)}}var Vt=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Jt(t))},t}(),Jt=function(t){function e(e){var n=t.call(this,e)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return r.a(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),Kt=n(9);function Xt(t,e){return e?function(n){return n.pipe(Xt((function(n,r){return Object(Y.a)(t(n,r)).pipe(Object(Kt.a)((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new $t(t))}}var $t=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.a(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(t){return void this.destination.error(t)}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 o=t.call(this,e)||this;return o.project=n,o.concurrent=r,o.scheduler=i,o.index=0,o.active=0,o.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(o.buffer=[]),o}return r.a(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 o={subscriber:this,result:i,value:t,index:r};this.destination.add(this.scheduler.schedule(e.dispatch,0,o))}else this.subscribeToProjection(i,t,r)}catch(t){n.error(t)}}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 oe(t))}}var oe=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new ae(t,this.callback))},t}(),ae=function(t){function e(e,n){var r=t.call(this,e)||this;return r.add(new N.a(n)),r}return r.a(e,t),e}(p.a);function se(t,e){if("function"!=typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new ue(t,n,!1,e))}}var ue=function(){function t(t,e,n,r){this.predicate=t,this.source=e,this.yieldIndex=n,this.thisArg=r}return t.prototype.call=function(t,e){return e.subscribe(new ce(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),ce=function(t){function e(e,n,r,i,o){var a=t.call(this,e)||this;return a.predicate=n,a.source=r,a.yieldIndex=i,a.thisArg=o,a.index=0,a}return r.a(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,r=this.index++;try{e.call(n||this,t,r,this.source)&&this.notifyComplete(this.yieldIndex?r:t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(p.a);function le(t,e){return function(n){return n.lift(new ue(t,n,!0,e))}}var he=n(15);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,Bt(1),n?at(e):Dt((function(){return new Ct.a})))}}var fe=n(67);function pe(){return function(t){return t.lift(new me)}}var me=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.a(e,t),e.prototype._next=function(t){},e}(p.a);function ge(){return function(t){return t.lift(new be)}}var be=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ve(t))},t}(),ve=function(t){function e(e){return t.call(this,e)||this}return r.a(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 we(t){return function(e){return 0===t?Object(Rt.b)():e.lift(new Me(t))}}var Me=function(){function t(t){if(this.total=t,this.total<0)throw new It.a}return t.prototype.call=function(t,e){return e.subscribe(new _e(t,this.total))},t}(),_e=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.a(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 o=e++%n;t.next(r[o])}t.complete()},e}(p.a);function Ee(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,we(1),n?at(e):Dt((function(){return new Ct.a})))}}function Ae(t){return function(e){return e.lift(new Se(t))}}var Se=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new ke(t,this.value))},t}(),ke=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return r.a(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(p.a);function Ne(){return function(t){return t.lift(new Te)}}var Te=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new xe(t))},t}(),xe=function(t){function e(e){return t.call(this,e)||this}return r.a(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 Le(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new Ie(t,e,n))}}var Ie=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 o=t.call(this,e)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}return r.a(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(p.a),Ce=n(41);function De(t,e){return arguments.length>=2?function(n){return Object(Ce.a)(Le(t,e),we(1),at(e))(n)}:function(e){return Object(Ce.a)(Le((function(e,n,r){return t(e,n,r+1)})),we(1))(e)}}function Oe(t){return De("function"==typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}var Pe=n(75);function ze(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Pe.a.apply(void 0,[e].concat(t)))}}var Re=n(53);function Be(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?Object(q.b)((function(){return t}),e,n):("number"==typeof e&&(n=e),Object(q.b)((function(){return t}),n))}function Ue(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(r){return r.lift(new Fe(t,e,n))}}var Fe=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 Ye(t,this.accumulator,this.seed,this.concurrent))},t}(),Ye=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o.acc=r,o.concurrent=i,o.hasValue=!1,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return r.a(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(t){return n.error(t)}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 Qe(t){return De("function"==typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t<e?t:e})}var We=n(70);function He(t,e){return function(n){var r;if(r="function"==typeof t?t:function(){return t},"function"==typeof e)return n.lift(new Ge(r,e));var i=Object.create(n,We.b);return i.source=n,i.subjectFactory=r,i}}var Ge=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}(),qe=n(72);function Ze(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&Object(F.a)(t[0])&&(t=t[0]),function(e){return e.lift(new Ve(t))}}var Ve=function(){function t(t){this.nextSources=t}return t.prototype.call=function(t,e){return e.subscribe(new Je(t,this.nextSources))},t}(),Je=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.nextSources=n,r}return r.a(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 Ke(){return function(t){return t.lift(new Xe)}}var Xe=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new $e(t))},t}(),$e=function(t){function e(e){var n=t.call(this,e)||this;return n.hasPrev=!1,n}return r.a(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(83);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(Kt.a)(rn(t,n))(e)}}function rn(t,e){return function(n){for(var r=n,i=0;i<e;i++){var o=null!=r?r[t[i]]:void 0;if(void 0===o)return;r=o}return r}}var on=n(5);function an(t){return t?He((function(){return new on.a}),t):He(new on.a)}var sn=n(71);function un(t){return function(e){return He(new sn.a(t))(e)}}var cn=n(31);function ln(){return function(t){return He(new cn.a)(t)}}var hn=n(50);function dn(t,e,n,r){n&&"function"!=typeof n&&(r=n);var i="function"==typeof n?n:void 0,o=new hn.a(t,e,r);return function(t){return He((function(){return o}),i)(t)}}var fn=n(76);function pn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return 1===t.length&&Object(F.a)(t[0])&&(t=t[0]),e.lift.call(fn.a.apply(void 0,[e].concat(t)))}}function mn(t){return void 0===t&&(t=-1),function(e){return 0===t?Object(Rt.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.a(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 bn(t){return function(e){return e.lift(new vn(t))}}var vn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new wn(t,this.notifier,e))},t}(),wn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i.sourceIsBeingSubscribedTo=!0,i}return r.a(e,t),e.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){var e;this.notifications=new on.a;try{e=(0,this.notifier)(this.notifications)}catch(e){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=Object(i.c)(e,new i.a(this))},e}(i.b);function Mn(t){return void 0===t&&(t=-1),function(e){return e.lift(new _n(t,e))}}var _n=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new En(t,this.count,this.source))},t}(),En=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.a(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 An(t){return function(e){return e.lift(new Sn(t,e))}}var Sn=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new kn(t,this.notifier,this.source))},t}(),kn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i}return r.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,r=this.retries,o=this.retriesSubscription;if(r)this.errors=void 0,this.retriesSubscription=void 0;else{n=new on.a;try{r=(0,this.notifier)(n)}catch(e){return t.prototype.error.call(this,e)}o=Object(i.c)(r,new i.a(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=o,n.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype.notifyNext=function(){var t=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=t,this.source.subscribe(this)},e}(i.b),Nn=n(49);function Tn(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){var n=new Ln(t),r=e.subscribe(n);return r.add(Object(i.c)(this.notifier,new i.a(n))),r},t}(),Ln=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return r.a(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 In(t,e){return void 0===e&&(e=u.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 Cn(t,this.period,this.scheduler))},t}(),Cn=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(Dn,n,{subscriber:i,period:n})),i}return r.a(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 Dn(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n)}function On(t,e){return function(n){return n.lift(new Pn(t,e))}}var Pn=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new zn(t,this.compareTo,this.comparator))},t}(),zn=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 Rn(e,i))),i}return r.a(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._a,e=this._b,n=this.comparator;t.length>0&&e.length>0;){var r=t.shift(),i=e.shift(),o=!1;try{o=n?n(r,i):r===i}catch(t){this.destination.error(t)}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),Rn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.parent=n,r}return r.a(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 Bn(){return new on.a}function Un(){return function(t){return Object(Nn.a)()(He(Bn)(t))}}function Fn(t,e,n){var r;return r=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,r=t.bufferSize,i=void 0===r?Number.POSITIVE_INFINITY:r,o=t.windowTime,a=void 0===o?Number.POSITIVE_INFINITY:o,s=t.refCount,u=t.scheduler,c=0,l=!1,h=!1;return function(t){var r;c++,!e||l?(l=!1,e=new hn.a(i,a,u),r=e.subscribe(this),n=t.subscribe({next:function(t){e.next(t)},error:function(t){l=!0,e.error(t)},complete:function(){h=!0,n=void 0,e.complete()}}),h&&(n=void 0)):r=e.subscribe(this),this.add((function(){c--,r.unsubscribe(),r=void 0,n&&!h&&s&&0===c&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(r))}}function Yn(t){return function(e){return e.lift(new Qn(t,e))}}var Qn=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Wn(t,this.predicate,this.source))},t}(),Wn=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.a(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new Ct.a)},e}(p.a);function Hn(t){return function(e){return e.lift(new Gn(t))}}var Gn=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new qn(t,this.total))},t}(),qn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.a(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(p.a);function Zn(t){return function(e){return e.lift(new Vn(t))}}var Vn=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new It.a}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new p.a(t)):e.subscribe(new Jn(t,this._skipCount))},t}(),Jn=function(t){function e(e,n){var r=t.call(this,e)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}return r.a(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,o=i[r];i[r]=t,this.destination.next(o)}},e}(p.a);function Kn(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 $n(t,this.notifier))},t}(),$n=function(t){function e(e,n){var r=t.call(this,e)||this;r.hasValue=!1;var o=new i.a(r);r.add(o),r.innerSubscription=o;var a=Object(i.c)(n,o);return a!==o&&(r.add(a),r.innerSubscription=a),r}return r.a(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.a(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(t){this.destination.error(t)}},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(v.a)(n)?(t.pop(),function(e){return Object(W.a)(t,e,n)}):function(e){return Object(W.a)(t,e)}}var ir=n(42),or=n(33),ar=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(or.a)(n)||n<0)&&(i.delayTime=0),r&&"function"==typeof r.schedule||(i.scheduler=ir.a),i}return r.a(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}(mt.a);function sr(t,e){return void 0===e&&(e=0),function(n){return n.lift(new ur(t,e))}}var ur=function(){function t(t,e){this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return new ar(e,this.delay,this.scheduler).subscribe(t)},t}();function cr(t,e){return"function"==typeof e?function(n){return n.pipe(cr((function(n,r){return Object(Y.a)(t(n,r)).pipe(Object(Kt.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.a(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}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 cr(he.a)}function fr(t,e){return e?cr((function(){return t}),e):cr((function(){return t}))}function pr(t){return function(e){return e.lift(new mr(t))}}var mr=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.a(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 br(t,e))}}var br=function(){function t(t,e){this.predicate=t,this.inclusive=e}return t.prototype.call=function(t,e){return e.subscribe(new vr(t,this.predicate,this.inclusive))},t}(),vr=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.a(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(t){return void n.error(t)}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),wr=n(21),Mr=n(26);function _r(t,e,n){return function(r){return r.lift(new Er(t,e,n))}}var Er=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 Ar(t,this.nextOrObserver,this.error,this.complete))},t}(),Ar=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o._tapNext=wr.a,o._tapError=wr.a,o._tapComplete=wr.a,o._tapError=r||wr.a,o._tapComplete=i||wr.a,Object(Mr.a)(n)?(o._context=o,o._tapNext=n):n&&(o._context=n,o._tapNext=n.next||wr.a,o._tapError=n.error||wr.a,o._tapComplete=n.complete||wr.a),o}return r.a(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}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),Sr={leading:!0,trailing:!1};function kr(t,e){return void 0===e&&(e=Sr),function(n){return n.lift(new Nr(t,!!e.leading,!!e.trailing))}}var Nr=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 Tr(t,this.durationSelector,this.leading,this.trailing))},t}(),Tr=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.destination=e,o.durationSelector=n,o._leading=r,o._trailing=i,o._hasValue=!1,o}return r.a(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(t){return this.destination.error(t),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 xr(t,e,n){return void 0===e&&(e=u.a),void 0===n&&(n=Sr),function(r){return r.lift(new Lr(t,e,n.leading,n.trailing))}}var Lr=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 Ir(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),Ir=function(t){function e(e,n,r,i,o){var a=t.call(this,e)||this;return a.duration=n,a.scheduler=r,a.leading=i,a.trailing=o,a._hasTrailingValue=!1,a._trailingValue=null,a}return r.a(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 Cr=n(54);function Dr(t){return void 0===t&&(t=u.a),function(e){return Object(Cr.a)((function(){return e.pipe(Le((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(Kt.a)((function(t){var e=t.current,n=t.last,r=t.value;return new Or(r,e-n)})))}))}}var Or=function(t,e){this.value=t,this.interval=e},Pr=n(73);function zr(t,e,n){return void 0===n&&(n=u.a),function(r){var i=ct(t),o=i?+t-n.now():Math.abs(t);return r.lift(new Rr(o,i,e,n))}}var Rr=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 Br(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),Br=function(t){function e(e,n,r,i,o){var a=t.call(this,e)||this;return a.absoluteTimeout=n,a.waitFor=r,a.withObservable=i,a.scheduler=o,a.scheduleTimeout(),a}return r.a(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),Ur=n(51);function Fr(t,e){return void 0===e&&(e=u.a),zr(t,Object(Ur.a)(new Pr.a),e)}function Yr(t){return void 0===t&&(t=u.a),Object(Kt.a)((function(e){return new Qr(e,t.now())}))}var Qr=function(t,e){this.value=t,this.timestamp=e};function Wr(t,e,n){return 0===n?[e]:(t.push(e),t)}function Hr(){return De(Wr,[])}function Gr(t){return function(e){return e.lift(new qr(t))}}var qr=function(){function t(t){this.windowBoundaries=t}return t.prototype.call=function(t,e){var n=new Zr(t),r=e.subscribe(n);return r.closed||n.add(Object(i.c)(this.windowBoundaries,new i.a(n))),r},t}(),Zr=function(t){function e(e){var n=t.call(this,e)||this;return n.window=new on.a,e.next(n.window),n}return r.a(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 on.a;e.next(n)},e}(i.b);function Vr(t,e){return void 0===e&&(e=0),function(n){return n.lift(new Jr(t,e))}}var Jr=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e}return t.prototype.call=function(t,e){return e.subscribe(new Kr(t,this.windowSize,this.startWindowEvery))},t}(),Kr=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 on.a],i.count=0,e.next(i.windows[0]),i}return r.a(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,o=i.length,a=0;a<o&&!this.closed;a++)i[a].next(t);var s=this.count-r+1;if(s>=0&&s%e==0&&!this.closed&&i.shift().complete(),++this.count%e==0&&!this.closed){var u=new on.a;i.push(u),n.next(u)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(p.a);function Xr(t){var e=u.a,n=null,r=Number.POSITIVE_INFINITY;return Object(v.a)(arguments[3])&&(e=arguments[3]),Object(v.a)(arguments[2])?e=arguments[2]:Object(or.a)(arguments[2])&&(r=Number(arguments[2])),Object(v.a)(arguments[1])?e=arguments[1]:Object(or.a)(arguments[1])&&(n=Number(arguments[1])),function(i){return i.lift(new $r(t,n,r,e))}}var $r=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.a(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(on.a),ei=function(t){function e(e,n,r,i,o){var a=t.call(this,e)||this;a.destination=e,a.windowTimeSpan=n,a.windowCreationInterval=r,a.maxWindowSize=i,a.scheduler=o,a.windows=[];var s=a.openWindow();if(null!==r&&r>=0){var u={subscriber:a,window:s,context:null},c={windowTimeSpan:n,windowCreationInterval:r,subscriber:a,scheduler:o};a.add(o.schedule(ii,n,u)),a.add(o.schedule(ri,r,c))}else{var l={subscriber:a,window:s,windowTimeSpan:n};a.add(o.schedule(ni,n,l))}return a}return r.a(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,o=n.openWindow(),a={action:this,subscription:null},s={subscriber:n,window:o,context:a};a.subscription=r.schedule(ii,e,s),this.add(a.subscription),this.schedule(t,i)}function ii(t){var e=t.subscriber,n=t.window,r=t.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),e.closeWindow(n)}function oi(t,e){return function(n){return n.lift(new ai(t,e))}}var ai=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new si(t,this.openings,this.closingSelector))},t}(),si=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(T.a)(i,n,n)),i}return r.a(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 o=n[i];o.window.error(e),o.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 o=void 0;try{o=(0,this.closingSelector)(e)}catch(t){return this.error(t)}var a=new on.a,s=new N.a,u={window:a,subscription:s};this.contexts.push(u);var c=Object(T.a)(this,o,u);c.closed?this.closeWindow(this.contexts.length-1):(c.context=u,s.add(c)),this.destination.next(a)}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}(x.a);function ui(t){return function(e){return e.lift(new ci(t))}}var ci=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.a(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 on.a;this.destination.next(r);try{n=(0,this.closingSelector)()}catch(t){return this.destination.error(t),void this.window.error(t)}this.add(this.closingNotification=Object(T.a)(this,n))},e}(x.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 o=n.length;i.values=new Array(o);for(var a=0;a<o;a++)i.toRespond.push(a);for(a=0;a<o;a++){var s=n[a];i.add(Object(T.a)(i,s,void 0,a))}return i}return r.a(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(t){return void this.destination.error(t)}this.destination.next(e)},e}(x.a),pi=n(55);function mi(){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))}}},function(t,e,n){n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return l}));var r=n(0),i=n(5),o=n(3),a=n(1),s=n(4),u=n(49),c=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.a(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 s.a).add(this.source.subscribe(new h(this.getSubject(),this))),t.closed&&(this._connection=null,t=s.a.EMPTY)),t},e.prototype.refCount=function(){return Object(u.a)()(this)},e}(o.a),l=function(){var t=c.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),h=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.a(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);a.a},function(t,e,n){n.d(e,"a",(function(){return a}));var r=n(0),i=n(5),o=n(23),a=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return r.a(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.a;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(i.a)},function(t,e,n){n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return u}));var r=n(0),i=n(1),o=n(18);function a(t,e){return void 0===e&&(e=0),function(n){return n.lift(new s(t,e))}}var s=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.scheduler,this.delay))},t}(),u=function(t){function e(e,n,r){void 0===r&&(r=0);var i=t.call(this,e)||this;return i.scheduler=n,i.delay=r,i}return r.a(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new c(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(o.a.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(o.a.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(o.a.createComplete()),this.unsubscribe()},e}(i.a),c=function(t,e){this.notification=t,this.destination=e}},function(t,e,n){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}()},function(t,e,n){n.d(e,"a",(function(){return i}));var r=n(53);function i(){return Object(r.a)(1)}},function(t,e,n){n.d(e,"a",(function(){return s}));var r=n(3),i=n(10),o=n(53),a=n(29);function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,s=null,u=t[t.length-1];return Object(i.a)(u)?(s=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof u&&(n=t.pop()),null===s&&1===t.length&&t[0]instanceof r.a?t[0]:Object(o.a)(n)(Object(a.a)(t,s))}},function(t,e,n){n.d(e,"a",(function(){return u}));var r=n(0),i=n(7),o=n(29),a=n(16),s=n(13);function u(){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(o.a)(t,void 0).lift(new c)}var c=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.a(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(s.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}(a.a)},function(t,e,n){n.d(e,"a",(function(){return s}));var r=n(3),i=n(6),o=n(33),a=n(10);function s(t,e,n){void 0===t&&(t=0);var s=-1;return Object(o.a)(e)?s=Number(e)<1?1:Number(e):Object(a.a)(e)&&(n=e),Object(a.a)(n)||(n=i.a),new r.a((function(e){var r=Object(o.a)(t)?t:+t-n.now();return n.schedule(u,r,{index:0,period:s,subscriber:e})}))}function u(t){var e=t.index,n=t.period,r=t.subscriber;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n)}}},function(t,e,n){n.d(e,"a",(function(){return l}));var r=n(3),i=n(4),o=n(22),a=n(58),s=n(20),u=n(82),c=n(81);function l(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[o.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[o.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(u.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(c.a)(t))return Object(a.a)(t,e);if(function(t){return t&&"function"==typeof t[s.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,o=new i.a;return o.add((function(){r&&"function"==typeof r.return&&r.return()})),o.add(e.schedule((function(){r=t[s.a](),o.add(e.schedule((function(){if(!n.closed){var t,e;try{var i=r.next();t=i.value,e=i.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}})))}))),o}))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}},function(t,e,n){n.d(e,"a",(function(){return i}));var r=n(0),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.a(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(4).a)},function(t,e,n){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()}}},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},function(t,e,n){function r(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}n.d(e,"a",(function(){return r}))},function(t,e,n){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}))},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=e.CoinbaseWalletSDK=void 0;const r=n(101),i=n(85);var o=n(101);Object.defineProperty(e,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return o.CoinbaseWalletSDK}});var a=n(85);Object.defineProperty(e,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return a.CoinbaseWalletProvider}}),e.default=r.CoinbaseWalletSDK,"undefined"!=typeof window&&(window.CoinbaseWalletSDK=r.CoinbaseWalletSDK,window.CoinbaseWalletProvider=i.CoinbaseWalletProvider,window.WalletLink=r.CoinbaseWalletSDK,window.WalletLinkProvider=i.CoinbaseWalletProvider)},function(t,e,n){(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(64)),o=r(n(66)),a=n(86),s=n(89),u=n(90),c=n(107),l=n(38),h=r(n(152)),d=n(168),f=n(169),p=n(170);class m 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.diagnostic=t.diagnosticLogger,this.reloadOnDisconnect=!0,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 o=this._storage.getItem(c.LOCAL_STORAGE_ADDRESSES_KEY);if(o){const t=o.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("DefaultJsonRpcUrl"))&&void 0!==t?t:this._jsonRpcUrlFromOpts}set jsonRpcUrl(t){this._storage.setItem("DefaultJsonRpcUrl",t)}get isChainOverridden(){return"true"===this._storage.getItem("HasChainOverriddenFromRelay")}set isChainOverridden(t){this._storage.setItem("HasChainOverriddenFromRelay",t.toString())}disableReloadOnDisconnect(){this.reloadOnDisconnect=!1}setProviderInfo(t,e){this.isChainOverridden||this.updateProviderInfo(t,this.getChainId(),!1)}updateProviderInfo(t,e,n){if("true"===this._storage.getItem("HasChainBeenSwitched")&&n)return;n&&(this.isChainOverridden=!0),this.jsonRpcUrl=t;const r=this.getChainId();this._storage.setItem("DefaultChainId",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,o){const a=await this.initializeRelay();return!!(await a.watchAsset(t,e,n,r,i,null==o?void 0:o.toString()).promise).result}async addEthereumChain(t,e,n,r,i,o){var a,s;if((0,l.ensureIntNumber)(t)===this.getChainId())return!1;const u=await this.initializeRelay(),c=u.inlineAddEthereumChain(t.toString());this._isAuthorized()||c||await u.requestEthereumAccounts().promise;const h=await u.addEthereumChain(t.toString(),e,i,n,r,o).promise;return!0===(null===(a=h.result)||void 0===a?void 0:a.isApproved)&&(this._storage.setItem("HasChainBeenSwitched","true"),this.updateProviderInfo(e[0],t,!1)),!0===(null===(s=h.result)||void 0===s?void 0:s.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 a.ethErrors.provider.custom({code:n.errorCode});const r=n.result;r.isApproved&&r.rpcUrl.length>0&&(this._storage.setItem("HasChainBeenSwitched","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.diagnostic)||void 0===t||t.log(s.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?u.Session.hash(this._relay.session.id):void 0}),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 a.ethErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:t});const{method:e,params:n}=t;if("string"!=typeof e||0===e.length)throw a.ethErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:t});if(void 0!==n&&!Array.isArray(n)&&("object"!=typeof n||null===n))throw a.ethErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:t});const r=void 0===n?[]:n,i=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:e,params:r,jsonrpc:"2.0",id:i})).result}async scanQRCode(t){const e=await this.initializeRelay(),n=await e.scanQRCode((0,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}async selectProvider(t){const e=await this.initializeRelay(),n=await e.selectProvider(t).promise;if("string"!=typeof n.result)throw new Error("result was not a string");return n.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,e){if(!Array.isArray(t))throw new Error("addresses is not an array");const n=t.map((t=>(0,l.ensureAddressString)(t)));JSON.stringify(n)!==JSON.stringify(this._addresses)&&(this._addresses.length>0&&!1===this.supportsAddressSwitching&&!e||(this._addresses=n,this.emit("accountsChanged",this._addresses),this._storage.setItem(c.LOCAL_STORAGE_ADDRESSES_KEY,n.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 o=this._handleSubscriptionMethods(t);if(void 0!==o)return void o.then((n=>e({jsonrpc:"2.0",id:t.id,result:n.result}))).catch((t=>n(t)))}catch(t){return n(t)}this._handleAsynchronousMethods(t).then((n=>n&&e(Object.assign(Object.assign({},n),{id:t.id})))).catch((t=>n(t)))}))}_sendMultipleRequestsAsync(t){return Promise.all(t.map((t=>this._sendRequestAsync(t))))}_handleSynchronousMethods(t){const{method:e}=t,n=t.params||[];switch(e){case 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(t){}return!1}_ensureKnownAddress(t){var e;if(!this._isKnownAddress(t))throw null===(e=this.diagnostic)||void 0===e||e.log(s.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");return this._ensureKnownAddress(n),{fromAddress:n,toAddress:e.to?(0,l.ensureAddressString)(e.to):null,weiValue:null!=e.value?(0,l.ensureBN)(e.value):new o.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 a.ethErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw a.ethErrors.provider.unsupportedMethod({})}async _signEthereumMessage(t,e,n,r){this._ensureKnownAddress(e);try{const i=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await i.signEthereumMessage(t,e,n,r).promise).result}}catch(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw a.ethErrors.provider.userRejectedRequest("User denied message signature");throw t}}async _ethereumAddressFromSignedMessage(t,e,n){const r=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await r.ethereumAddressFromSignedMessage(t,e,n).promise).result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,l.hexStringFromIntNumber)(this.getChainId())}getChainId(){const t=this._storage.getItem("DefaultChainId")||"1",e=parseInt(t,10);return(0,l.ensureIntNumber)(e)}async _eth_requestAccounts(){var t;if(null===(t=this.diagnostic)||void 0===t||t.log(s.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?u.Session.hash(this._relay.session.id):void 0}),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(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw a.ethErrors.provider.userRejectedRequest("User denied account authorization");throw t}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(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw a.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw t}}async _eth_sendRawTransaction(t){const e=(0,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(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw a.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw t}}async _eth_signTypedData_v1(t){this._requireAuthorization();const e=(0,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 o=t[0];if(0===(null===(e=o.rpcUrls)||void 0===e?void 0:e.length))return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!o.chainName||""===o.chainName.trim())throw a.ethErrors.provider.custom({code:0,message:"chainName is a required field"});if(!o.nativeCurrency)throw a.ethErrors.provider.custom({code:0,message:"nativeCurrency is a required field"});const s=parseInt(o.chainId,16);return await this.addEthereumChain(s,null!==(n=o.rpcUrls)&&void 0!==n?n:[],null!==(r=o.blockExplorerUrls)&&void 0!==r?r:[],o.chainName,null!==(i=o.iconUrls)&&void 0!==i?i:[],o.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(t){const e=t[0];return await this.switchEthereumChain(parseInt(e.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(t){const e=Array.isArray(t)?t[0]:t;if(!e.type)throw a.ethErrors.rpc.invalidParams({message:"Type is required"});if("ERC20"!==(null==e?void 0:e.type))throw a.ethErrors.rpc.invalidParams({message:`Asset of type '${e.type}' is not supported`});if(!(null==e?void 0:e.options))throw a.ethErrors.rpc.invalidParams({message:"Options are required"});if(!(null==e?void 0:e.options.address))throw a.ethErrors.rpc.invalidParams({message:"Address is required"});const n=this.getChainId(),{address:r,symbol:i,image:o,decimals:s}=e.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(e.type,r,i,s,o,n)}}_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,e)=>this._setAddresses(t,e))),t.setChainCallback(((t,e)=>{this.updateProviderInfo(e,parseInt(t,10),!0)})),this._relay=t,t)))}}e.CoinbaseWalletProvider=m}).call(this,n(19).Buffer)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const r=n(87);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(103);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const o=n(134);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const a=n(88);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return a.errorCodes}})},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;const r=n(102);class i extends Error{constructor(t,e,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!e||"string"!=typeof e)throw new Error('"message" must be a nonempty string.');super(e),this.code=t,void 0!==n&&(this.data=n)}serialize(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return r.default(this.serialize(),o,2)}}function o(t,e){if("[Circular]"!==e)return e}e.EthereumRpcError=i,e.EthereumProviderError=class extends i{constructor(t,e,n){if(!function(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,e,n)}}},function(t,e,n){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."}}},function(t,e,n){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"}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.Session=void 0;const r=n(48),i=n(69),o=n(135),a=n(38);class s{constructor(t,e,n,r){this._storage=t,this._id=e||(0,a.randomBytesHex)(16),this._secret=n||(0,a.randomBytesHex)(32),this._key=(new o.sha256).update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!r}static load(t){const e=t.getItem("session:id"),n=t.getItem("session:linked"),r=t.getItem("session:secret");return e&&r?new s(t,e,r,"1"===n):null}static get persistedSessionIdChange$(){return(0,r.fromEvent)(window,"storage").pipe((0,i.filter)((t=>"session:id"===t.key)),(0,i.map)((t=>({oldValue:t.oldValue||null,newValue:t.newValue||null}))))}static hash(t){return(new o.sha256).update(t).digest("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("session:id",this._id),this._storage.setItem("session:secret",this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem("session:linked",this._linked?"1":"0")}}e.Session=s},function(t,e,n){var r=SyntaxError,i=Function,o=TypeError,a=function(t){try{return i('"use strict"; return ('+t+").constructor;")()}catch(t){}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch(t){s=null}var u=function(){throw new o},c=s?function(){try{return u}catch(t){try{return s(arguments,"callee").get}catch(t){return u}}}():u,l=n(143)(),h=Object.getPrototypeOf||function(t){return t.__proto__},d={},f="undefined"==typeof Uint8Array?void 0:h(Uint8Array),p={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":l?h([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l?h(h([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&l?h((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&l?h((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l?h(""[Symbol.iterator]()):void 0,"%Symbol%":l?Symbol:void 0,"%SyntaxError%":r,"%ThrowTypeError%":c,"%TypedArray%":f,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},m={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},y=n(92),g=n(146),b=y.call(Function.call,Array.prototype.concat),v=y.call(Function.apply,Array.prototype.splice),w=y.call(Function.call,String.prototype.replace),M=y.call(Function.call,String.prototype.slice),_=y.call(Function.call,RegExp.prototype.exec),E=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,S=function(t){var e=M(t,0,1),n=M(t,-1);if("%"===e&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new r("invalid intrinsic syntax, expected opening `%`");var i=[];return w(t,E,(function(t,e,n,r){i[i.length]=n?w(r,A,"$1"):e||t})),i},k=function(t,e){var n,i=t;if(g(m,i)&&(i="%"+(n=m[i])[0]+"%"),g(p,i)){var s=p[i];if(s===d&&(s=function t(e){var n;if("%AsyncFunction%"===e)n=a("async function () {}");else if("%GeneratorFunction%"===e)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=a("async function* () {}");else if("%AsyncGenerator%"===e){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&(n=h(i.prototype))}return p[e]=n,n}(i)),void 0===s&&!e)throw new o("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:s}}throw new r("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new o('"allowMissing" argument must be a boolean');if(null===_(/^%?[^%]*%?$/g,t))throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=S(t),i=n.length>0?n[0]:"",a=k("%"+i+"%",e),u=a.name,c=a.value,l=!1,h=a.alias;h&&(i=h[0],v(n,b([0,1],h)));for(var d=1,f=!0;d<n.length;d+=1){var m=n[d],y=M(m,0,1),w=M(m,-1);if(('"'===y||"'"===y||"`"===y||'"'===w||"'"===w||"`"===w)&&y!==w)throw new r("property names with quotes must have matching quotes");if("constructor"!==m&&f||(l=!0),g(p,u="%"+(i+="."+m)+"%"))c=p[u];else if(null!=c){if(!(m in c)){if(!e)throw new o("base intrinsic for "+t+" exists, but the property is not available.");return}if(s&&d+1>=n.length){var E=s(c,m);c=(f=!!E)&&"get"in E&&!("originalValue"in E.get)?E.get:c[m]}else f=g(c,m),c=c[m];f&&!l&&(p[u]=c)}}return c}},function(t,e,n){var r=n(145);t.exports=Function.prototype.bind||r},function(t,e,n){var r=String.prototype.replace,i=/%20/g,o="RFC3986";t.exports={default:o,formatters:{RFC1738:function(t){return r.call(t,i,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:o}},function(t,e,n){var r=n(46).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,n,o){if("function"==typeof n)return t(e,null,n);n||(n={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t.apply(this,r)}}}(o||i);var a=n.readable||!1!==n.readable&&e.readable,s=n.writable||!1!==n.writable&&e.writable,u=function(){e.writable||l()},c=e._writableState&&e._writableState.finished,l=function(){s=!1,c=!0,a||o.call(e)},h=e._readableState&&e._readableState.endEmitted,d=function(){a=!1,h=!0,s||o.call(e)},f=function(t){o.call(e,t)},p=function(){var t;return a&&!h?(e._readableState&&e._readableState.ended||(t=new r),o.call(e,t)):s&&!c?(e._writableState&&e._writableState.ended||(t=new r),o.call(e,t)):void 0},m=function(){e.req.on("finish",l)};return function(t){return t.setHeader&&"function"==typeof t.abort}(e)?(e.on("complete",l),e.on("abort",p),e.req?m():e.on("request",m)):s&&!e._writableState&&(e.on("end",u),e.on("close",u)),e.on("end",d),e.on("finish",l),!1!==n.error&&e.on("error",f),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",m),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",d),e.removeListener("error",f),e.removeListener("close",p)}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;const r=n(102);class i extends Error{constructor(t,e,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!e||"string"!=typeof e)throw new Error('"message" must be a nonempty string.');super(e),this.code=t,void 0!==n&&(this.data=n)}serialize(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return r.default(this.serialize(),o,2)}}function o(t,e){if("[Circular]"!==e)return e}e.EthereumRpcError=i,e.EthereumProviderError=class extends i{constructor(t,e,n){if(!function(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,e,n)}}},function(t,e,n){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."}}},function(t,e,n){const r=n(64).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}}},function(t,e){function n(t){return null==t?t:Number.parseInt(t,16)}function r(t){return null==t?t:"0x"+t.toString(16)}t.exports=async function({provider:t,fromBlock:e,toBlock:i}){e||(e=i);const o=n(e),a=n(i),s=Array(a-o+1).fill().map(((t,e)=>o+e)).map(r);return await Promise.all(s.map((e=>function(t,e,n){return new Promise(((e,r)=>{t.sendAsync({id:1,jsonrpc:"2.0",method:"eth_getBlockByNumber",params:n},((t,n)=>{if(t)return r(t);e(n.result)}))}))}(t,0,[e,!1]))))}},function(t,e,n){n.r(e),n.d(e,"useState",(function(){return m})),n.d(e,"useReducer",(function(){return y})),n.d(e,"useEffect",(function(){return g})),n.d(e,"useLayoutEffect",(function(){return b})),n.d(e,"useRef",(function(){return v})),n.d(e,"useImperativeHandle",(function(){return w})),n.d(e,"useMemo",(function(){return M})),n.d(e,"useCallback",(function(){return _})),n.d(e,"useContext",(function(){return E})),n.d(e,"useDebugValue",(function(){return A})),n.d(e,"useErrorBoundary",(function(){return S}));var r,i,o,a=n(8),s=0,u=[],c=a.options.__b,l=a.options.__r,h=a.options.diffed,d=a.options.__c,f=a.options.unmount;function p(t,e){a.options.__h&&a.options.__h(i,t,s||e),s=0;var n=i.__H||(i.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function m(t){return s=1,y(I,t)}function y(t,e,n){var o=p(r++,2);return o.t=t,o.__c||(o.__=[n?n(e):I(void 0,e),function(t){var e=o.t(o.__[0],t);o.__[0]!==e&&(o.__=[e,o.__[1]],o.__c.setState({}))}],o.__c=i),o.__}function g(t,e){var n=p(r++,3);!a.options.__s&&L(n.__H,e)&&(n.__=t,n.__H=e,i.__H.__h.push(n))}function b(t,e){var n=p(r++,4);!a.options.__s&&L(n.__H,e)&&(n.__=t,n.__H=e,i.__h.push(n))}function v(t){return s=5,M((function(){return{current:t}}),[])}function w(t,e,n){s=6,b((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==n?n:n.concat(t))}function M(t,e){var n=p(r++,7);return L(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function _(t,e){return s=8,M((function(){return t}),e)}function E(t){var e=i.context[t.__c],n=p(r++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(i)),e.props.value):t.__}function A(t,e){a.options.useDebugValue&&a.options.useDebugValue(e?e(t):t)}function S(t){var e=p(r++,10),n=m();return e.__=t,i.componentDidCatch||(i.componentDidCatch=function(t){e.__&&e.__(t),n[1](t)}),[n[0],function(){n[1](void 0)}]}function k(){for(var t;t=u.shift();)if(t.__P)try{t.__H.__h.forEach(T),t.__H.__h.forEach(x),t.__H.__h=[]}catch(e){t.__H.__h=[],a.options.__e(e,t.__v)}}a.options.__b=function(t){i=null,c&&c(t)},a.options.__r=function(t){l&&l(t),r=0;var e=(i=t.__c).__H;e&&(e.__h.forEach(T),e.__h.forEach(x),e.__h=[])},a.options.diffed=function(t){h&&h(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==u.push(e)&&o===a.options.requestAnimationFrame||((o=a.options.requestAnimationFrame)||function(t){var e,n=function(){clearTimeout(r),N&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);N&&(e=requestAnimationFrame(n))})(k)),i=null},a.options.__c=function(t,e){e.some((function(t){try{t.__h.forEach(T),t.__h=t.__h.filter((function(t){return!t.__||x(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],a.options.__e(n,t.__v)}})),d&&d(t,e)},a.options.unmount=function(t){f&&f(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{T(t)}catch(t){e=t}})),e&&a.options.__e(e,n.__v))};var N="function"==typeof requestAnimationFrame;function T(t){var e=i,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),i=e}function x(t){var e=i;t.__c=t.__(),i=e}function L(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function I(t,e){return"function"==typeof e?e(t):e}},function(t,e,n){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={}))},function(t,e,n){(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletSDK=void 0;const r=n(127),i=n(128),o=n(85),a=n(193),s=n(210),u=n(222),c=n(38),l=t.env.LINK_API_URL||"https://www.walletlink.org",h=t.env.SDK_VERSION||n(223).version||"unknown";class d{constructor(t){var e,n,r;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const o=t.linkAPIUrl||l;let c;if(c=t.uiConstructor?t.uiConstructor:t=>new a.WalletSDKUI(t),void 0===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,t.diagnosticLogger&&t.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");t.eventListener?this._diagnosticLogger={log:t.eventListener.onEvent}:this._diagnosticLogger=t.diagnosticLogger,this._reloadOnDisconnect=null===(r=t.reloadOnDisconnect)||void 0===r||r;const f=new URL(o),p=`${f.protocol}//${f.host}`;this._storage=new i.ScopedLocalStorage("-walletlink:"+p),this._storage.setItem("version",d.VERSION),this.walletExtension||(this._relayEventManager=new u.WalletSDKRelayEventManager,this._relay=new s.WalletSDKRelay({linkAPIUrl:o,version:h,darkMode:!!t.darkMode,uiConstructor:c,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger}),this.setAppInfo(t.appName,t.appLogoUrl),t.headlessMode||this._relay.attachUI())}makeWeb3Provider(t="",e=1){const n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(t,e),!1===this._reloadOnDisconnect&&"function"==typeof n.disableReloadOnDisconnect&&n.disableReloadOnDisconnect(),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 o.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(r),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:t,chainId:e,qrUrl:this.getQrUrl(),diagnosticLogger:this._diagnosticLogger,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(t,e){var n;this._appName=t||"DApp",this._appLogoUrl=e||(0,c.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}getCoinbaseWalletLogo(t,e=240){return(0,r.walletLogo)(t,e)}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=d,d.VERSION=h}).call(this,n(40))},function(t,e){t.exports=o,o.default=o,o.stable=u,o.stableStringify=u;var n=[],r=[];function i(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function o(t,e,o,s){var u;void 0===s&&(s=i()),function t(e,n,r,i,o,s,u){var c;if(s+=1,"object"==typeof e&&null!==e){for(c=0;c<i.length;c++)if(i[c]===e)return void a("[Circular]",e,n,o);if(void 0!==u.depthLimit&&s>u.depthLimit)return void a("[...]",e,n,o);if(void 0!==u.edgesLimit&&r+1>u.edgesLimit)return void a("[...]",e,n,o);if(i.push(e),Array.isArray(e))for(c=0;c<e.length;c++)t(e[c],c,c,i,e,s,u);else{var l=Object.keys(e);for(c=0;c<l.length;c++){var h=l[c];t(e[h],h,c,i,e,s,u)}}i.pop()}}(t,"",0,[],void 0,0,s);try{u=0===r.length?JSON.stringify(t,e,o):JSON.stringify(t,c(e),o)}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var l=n.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2]}}return u}function a(t,e,i,o){var a=Object.getOwnPropertyDescriptor(o,i);void 0!==a.get?a.configurable?(Object.defineProperty(o,i,{value:t}),n.push([o,i,e,a])):r.push([e,i,t]):(o[i]=t,n.push([o,i,e]))}function s(t,e){return t<e?-1:t>e?1:0}function u(t,e,o,u){void 0===u&&(u=i());var l,h=function t(e,r,i,o,u,c,l){var h;if(c+=1,"object"==typeof e&&null!==e){for(h=0;h<o.length;h++)if(o[h]===e)return void a("[Circular]",e,r,u);try{if("function"==typeof e.toJSON)return}catch(t){return}if(void 0!==l.depthLimit&&c>l.depthLimit)return void a("[...]",e,r,u);if(void 0!==l.edgesLimit&&i+1>l.edgesLimit)return void a("[...]",e,r,u);if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)t(e[h],h,h,o,e,c,l);else{var d={},f=Object.keys(e).sort(s);for(h=0;h<f.length;h++){var p=f[h];t(e[p],p,h,o,e,c,l),d[p]=e[p]}if(void 0===u)return d;n.push([u,r,e]),u[r]=d}o.pop()}}(t,"",0,[],void 0,0,u)||t;try{l=0===r.length?JSON.stringify(h,e,o):JSON.stringify(h,c(e),o)}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var d=n.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return l}function c(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 o=r[i];if(o[1]===e&&o[0]===n){n=o[2],r.splice(i,1);break}}return t.call(this,e,n)}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=n(88),i=n(87),o=r.errorCodes.rpc.internal,a={code:o,message:s(o)};function s(t,n="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(t)){const n=t.toString();if(h(r.errorValues,n))return r.errorValues[n].message;if(c(t))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function u(t){if(!Number.isInteger(t))return!1;const e=t.toString();return!!r.errorValues[e]||!!c(t)}function c(t){return t>=-32099&&t<=-32e3}function l(t){return t&&"object"==typeof t&&!Array.isArray(t)?Object.assign({},t):t}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=s,e.isValidCode=u,e.serializeError=function(t,{fallbackError:e=a,shouldIncludeStack:n=!1}={}){var r,o;if(!e||!Number.isInteger(e.code)||"string"!=typeof e.message)throw new Error("Must provide fallback error with integer number code and string message.");if(t instanceof i.EthereumRpcError)return t.serialize();const c={};if(t&&"object"==typeof t&&!Array.isArray(t)&&h(t,"code")&&u(t.code)){const e=t;c.code=e.code,e.message&&"string"==typeof e.message?(c.message=e.message,h(e,"data")&&(c.data=e.data)):(c.message=s(c.code),c.data={originalError:l(t)})}else{c.code=e.code;const n=null===(r=t)||void 0===r?void 0:r.message;c.message=n&&"string"==typeof n?n:e.message,c.data={originalError:l(t)}}const d=null===(o=t)||void 0===o?void 0:o.stack;return n&&t&&d&&"string"==typeof d&&(c.stack=d),c}},function(t,e,n){var r=n(24),i=n(45),o=n(37).Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t,e,n){return n^t&(e^n)}function l(t,e,n){return t&e|n&(t|e)}function h(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function d(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function f(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}r(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,m=0|this._g,y=0|this._h,g=0;g<16;++g)n[g]=t.readInt32BE(4*g);for(;g<64;++g)n[g]=0|(((e=n[g-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+n[g-7]+f(n[g-15])+n[g-16];for(var b=0;b<64;++b){var v=y+d(u)+c(u,p,m)+a[b]+n[b]|0,w=h(r)+l(r,i,o)|0;y=m,m=p,p=u,u=s+v|0,s=o,o=i,i=r,r=v+w|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=y+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},function(t,e,n){var r=n(24),i=n(45),o=n(37).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(t,e,n){return n^t&(e^n)}function l(t,e,n){return t&e|n&(t|e)}function h(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function d(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function f(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function y(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function g(t,e){return t>>>0<e>>>0?1:0}r(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,b=0|this._gh,v=0|this._hh,w=0|this._al,M=0|this._bl,_=0|this._cl,E=0|this._dl,A=0|this._el,S=0|this._fl,k=0|this._gl,N=0|this._hl,T=0;T<32;T+=2)e[T]=t.readInt32BE(4*T),e[T+1]=t.readInt32BE(4*T+4);for(;T<160;T+=2){var x=e[T-30],L=e[T-30+1],I=f(x,L),j=p(L,x),C=m(x=e[T-4],L=e[T-4+1]),D=y(L,x),O=e[T-14],P=e[T-14+1],z=e[T-32],R=e[T-32+1],B=j+P|0,U=I+O+g(B,j)|0;U=(U=U+C+g(B=B+D|0,D)|0)+z+g(B=B+R|0,R)|0,e[T]=U,e[T+1]=B}for(var F=0;F<160;F+=2){U=e[F],B=e[F+1];var Y=l(n,r,i),Q=l(w,M,_),W=h(n,w),H=h(w,n),G=d(s,A),q=d(A,s),Z=a[F],V=a[F+1],J=c(s,u,b),K=c(A,S,k),X=N+q|0,$=v+G+g(X,N)|0;$=($=($=$+J+g(X=X+K|0,K)|0)+Z+g(X=X+V|0,V)|0)+U+g(X=X+B|0,B)|0;var tt=H+Q|0,et=W+Y+g(tt,H)|0;v=b,N=k,b=u,k=S,u=s,S=A,s=o+$+g(A=E+X|0,E)|0,o=i,E=_,i=r,_=M,r=n,M=w,n=$+et+g(w=X+tt|0,X)|0}this._al=this._al+w|0,this._bl=this._bl+M|0,this._cl=this._cl+_|0,this._dl=this._dl+E|0,this._el=this._el+A|0,this._fl=this._fl+S|0,this._gl=this._gl+k|0,this._hl=this._hl+N|0,this._ah=this._ah+n+g(this._al,w)|0,this._bh=this._bh+r+g(this._bl,M)|0,this._ch=this._ch+i+g(this._cl,_)|0,this._dh=this._dh+o+g(this._dl,E)|0,this._eh=this._eh+s+g(this._el,A)|0,this._fh=this._fh+u+g(this._fl,S)|0,this._gh=this._gh+b+g(this._gl,k)|0,this._hh=this._hh+v+g(this._hl,N)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},function(t,e,n){var r=n(93),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),s=function(t,e){for(var n=e&&e.plainObjects?Object.create(null):{},r=0;r<t.length;++r)void 0!==t[r]&&(n[r]=t[r]);return n};t.exports={arrayToObject:s,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],a=i.obj[i.prop],s=Object.keys(a),u=0;u<s.length;++u){var c=s[u],l=a[c];"object"==typeof l&&null!==l&&-1===n.indexOf(l)&&(e.push({obj:a,prop:c}),n.push(l))}return function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)void 0!==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(t){return r}},encode:function(t,e,n,i,o){if(0===t.length)return t;var s=t;if("symbol"==typeof t?s=Symbol.prototype.toString.call(t):"string"!=typeof t&&(s=String(t)),"iso-8859-1"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var u="",c=0;c<s.length;++c){var l=s.charCodeAt(c);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===r.RFC1738&&(40===l||41===l)?u+=s.charAt(c):l<128?u+=a[l]:l<2048?u+=a[192|l>>6]+a[128|63&l]:l<55296||l>=57344?u+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l]:(c+=1,l=65536+((1023&l)<<10|1023&s.charCodeAt(c)),u+=a[240|l>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l])}return u},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(o(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(o(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 a=e;return o(e)&&!o(n)&&(a=s(e,r)),o(e)&&o(n)?(n.forEach((function(n,o){if(i.call(e,o)){var a=e[o];a&&"object"==typeof a&&n&&"object"==typeof n?e[o]=t(a,n,r):e.push(n)}else e[o]=n})),e):Object.keys(n).reduce((function(e,o){var a=n[o];return i.call(e,o)?e[o]=t(e[o],a,r):e[o]=a,e}),a)}}},function(t,e,n){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(86);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}))}}},function(t,e,n){(function(e){const r=n(153),i=n(66);function o(t){return e.allocUnsafe(t).fill(0)}function a(t,e,n){const r=o(e);return t=s(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 s(t){if(!e.isBuffer(t))if(Array.isArray(t))t=e.from(t);else if("string"==typeof t)t=u(t)?e.from((n=c(t)).length%2?"0"+n:n,"hex"):e.from(t);else if("number"==typeof t)t=intToBuffer(t);else if(null==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 u(t){return"string"==typeof t&&t.match(/^0x[0-9A-Fa-f]*$/)}function c(t){return"string"==typeof t&&t.startsWith("0x")?t.slice(2):t}t.exports={zeros:o,setLength:a,setLengthRight:function(t,e){return a(t,e,!0)},isHexString:u,stripHexPrefix:c,toBuffer:s,bufferToHex:function(t){return"0x"+(t=s(t)).toString("hex")},keccak:function(t,e){return t=s(t),e||(e=256),r("keccak"+e).update(t).digest()}}}).call(this,n(19).Buffer)},function(t,e,n){(e=t.exports=n(110)).Stream=e,e.Readable=e,e.Writable=n(114),e.Duplex=n(47),e.Transform=n(116),e.PassThrough=n(162),e.finished=n(94),e.pipeline=n(163)},function(t,e,n){(function(e,r){var i;t.exports=S,S.ReadableState=A,n(65).EventEmitter;var o,a=function(t,e){return t.listeners(e).length},s=n(111),u=n(19).Buffer,c=e.Uint8Array||function(){},l=n(156);o=l&&l.debuglog?l.debuglog("stream"):function(){};var h,d,f,p=n(157),m=n(112),y=n(113).getHighWaterMark,g=n(46).codes,b=g.ERR_INVALID_ARG_TYPE,v=g.ERR_STREAM_PUSH_AFTER_EOF,w=g.ERR_METHOD_NOT_IMPLEMENTED,M=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(24)(S,s);var _=m.errorOrDestroy,E=["error","close","destroy","pause","resume"];function A(t,e,r){i=i||n(47),t=t||{},"boolean"!=typeof r&&(r=e instanceof i),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=y(this,t,"readableHighWaterMark",r),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=n(115).StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function S(t){if(i=i||n(47),!(this instanceof S))return new S(t);var e=this instanceof i;this._readableState=new A(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function k(t,e,n,r,i){o("readableAddChunk",e);var a,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(o("onEofChunk"),!e.ended){if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,e.sync?x(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,L(t)))}}(t,s);else if(i||(a=function(t,e){var n,r;return r=e,u.isBuffer(r)||r instanceof c||"string"==typeof e||void 0===e||t.objectMode||(n=new b("chunk",["string","Buffer","Uint8Array"],e)),n}(s,e)),a)_(t,a);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(t){return u.from(t)}(e)),r)s.endEmitted?_(t,new M):N(t,s,e,!0);else if(s.ended)_(t,new v);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!n?(e=s.decoder.write(e),s.objectMode||0!==e.length?N(t,s,e,!1):I(t,s)):N(t,s,e,!1)}else r||(s.reading=!1,I(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function N(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",n)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&x(t)),I(t,e)}function T(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function x(t){var e=t._readableState;o("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(o("emitReadable",e.flowing),e.emittedReadable=!0,r.nextTick(L,t))}function L(t){var e=t._readableState;o("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,P(t)}function I(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(j,t,e))}function j(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var n=e.length;if(o("maybeReadMore read 0"),t.read(0),n===e.length)break}e.readingMore=!1}function C(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function D(t){o("readable nexttick read 0"),t.read(0)}function O(t,e){o("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),P(t),e.flowing&&!e.reading&&t.read(0)}function P(t){var e=t._readableState;for(o("flow",e.flowing);e.flowing&&null!==t.read(););}function z(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n);var n}function R(t){var e=t._readableState;o("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(B,e,t))}function B(t,e){if(o("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var n=e._writableState;(!n||n.autoDestroy&&n.finished)&&e.destroy()}}function U(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),S.prototype.destroy=m.destroy,S.prototype._undestroy=m.undestroy,S.prototype._destroy=function(t,e){e(t)},S.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=u.from(t,e),e=""),n=!0),k(this,t,e,!1,n)},S.prototype.unshift=function(t){return k(this,t,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(t){h||(h=n(115).StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this},S.prototype.read=function(t){o("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return o("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?R(this):x(this),null;if(0===(t=T(t,e))&&e.ended)return 0===e.length&&R(this),null;var r,i=e.needReadable;return o("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&o("length less than watermark",i=!0),e.ended||e.reading?o("reading or ended",i=!1):i&&(o("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=T(n,e))),null===(r=t>0?z(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&R(this)),null!==r&&this.emit("data",r),r},S.prototype._read=function(t){_(this,new w("_read()"))},S.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,o("pipe count=%d opts=%j",i.pipesCount,e);var s=e&&!1===e.end||t===r.stdout||t===r.stderr?m:u;function u(){o("onend"),t.end()}i.endEmitted?r.nextTick(s):n.once("end",s),t.on("unpipe",(function e(r,a){o("onunpipe"),r===n&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),t.removeListener("close",f),t.removeListener("finish",p),t.removeListener("drain",c),t.removeListener("error",d),t.removeListener("unpipe",e),n.removeListener("end",u),n.removeListener("end",m),n.removeListener("data",h),l=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}));var c=function(t){return function(){var e=t._readableState;o("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,P(t))}}(n);t.on("drain",c);var l=!1;function h(e){o("ondata");var r=t.write(e);o("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==U(i.pipes,t))&&!l&&(o("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function d(e){o("onerror",e),m(),t.removeListener("error",d),0===a(t,"error")&&_(t,e)}function f(){t.removeListener("finish",p),m()}function p(){o("onfinish"),t.removeListener("close",f),m()}function m(){o("unpipe"),n.unpipe(t)}return n.on("data",h),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",d),t.once("close",f),t.once("finish",p),t.emit("pipe",n),i.flowing||(o("pipe resume"),n.resume()),t},S.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=U(e.pipes,t);return-1===a||(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n)),this},S.prototype.on=function(t,e){var n=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,o("on readable",i.length,i.reading),i.length?x(this):i.reading||r.nextTick(D,this))),n},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(t,e){var n=s.prototype.removeListener.call(this,t,e);return"readable"===t&&r.nextTick(C,this),n},S.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||r.nextTick(C,this),e},S.prototype.resume=function(){var t=this._readableState;return t.flowing||(o("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(O,t,e))}(this,t)),t.paused=!1,this},S.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(o("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){o("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var a=0;a<E.length;a++)t.on(E[a],this.emit.bind(this,E[a]));return this._read=function(e){o("wrapped _read",e),r&&(r=!1,t.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=n(160)),d(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),S._fromList=z,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(t,e){return void 0===f&&(f=n(161)),f(S,t,e)})}).call(this,n(63),n(40))},function(t,e,n){t.exports=n(65).EventEmitter},function(t,e,n){(function(e){function n(t,e){i(t,e),r(t)}function r(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var a=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?a._writableState?a._writableState.errorEmitted?e.nextTick(r,a):(a._writableState.errorEmitted=!0,e.nextTick(n,a,t)):e.nextTick(n,a,t):o?(e.nextTick(r,a),o(t)):e.nextTick(r,a)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var n=t._readableState,r=t._writableState;n&&n.autoDestroy||r&&r.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,n(40))},function(t,e,n){var r=n(46).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,n,i){var o=function(t,e,n){return null!=t.highWaterMark?t.highWaterMark:e?t[n]:null}(e,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(i?n:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,n){(function(e,r){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(undefined),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=S,S.WritableState=A;var a,s={deprecate:n(159)},u=n(111),c=n(19).Buffer,l=e.Uint8Array||function(){},h=n(112),d=n(113).getHighWaterMark,f=n(46).codes,p=f.ERR_INVALID_ARG_TYPE,m=f.ERR_METHOD_NOT_IMPLEMENTED,y=f.ERR_MULTIPLE_CALLBACK,g=f.ERR_STREAM_CANNOT_PIPE,b=f.ERR_STREAM_DESTROYED,v=f.ERR_STREAM_NULL_VALUES,w=f.ERR_STREAM_WRITE_AFTER_END,M=f.ERR_UNKNOWN_ENCODING,_=h.errorOrDestroy;function E(){}function A(t,e,a){o=o||n(47),t=t||{},"boolean"!=typeof a&&(a=e instanceof o),this.objectMode=!!t.objectMode,a&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=d(this,t,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,i=n.sync,o=n.writecb;if("function"!=typeof o)throw new y;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,i,o){--e.pendingcb,n?(r.nextTick(o,i),r.nextTick(I,t,e),t._writableState.errorEmitted=!0,_(t,i)):(o(i),t._writableState.errorEmitted=!0,_(t,i),I(t,e))}(t,n,i,e,o);else{var a=x(n)||t.destroyed;a||n.corked||n.bufferProcessing||!n.bufferedRequest||T(t,n),i?r.nextTick(N,t,n,a,o):N(t,n,a,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function S(t){var e=this instanceof(o=o||n(47));if(!e&&!a.call(S,this))return new S(t);this._writableState=new A(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),u.call(this)}function k(t,e,n,r,i,o,a){e.writelen=r,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new b("write")):n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function N(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),I(t,e)}function T(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,o=new Array(r),a=e.corkedRequestsFree;a.entry=n;for(var s=0,u=!0;n;)o[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;o.allBuffers=u,k(t,e,!0,e.length,o,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,l=n.encoding,h=n.callback;if(k(t,e,!1,e.objectMode?1:c.length,c,l,h),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function x(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function L(t,e){t._final((function(n){e.pendingcb--,n&&_(t,n),e.prefinished=!0,t.emit("prefinish"),I(t,e)}))}function I(t,e){var n=x(e);if(n&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,r.nextTick(L,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return n}n(24)(S,u),A.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(A.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(t){return!!a.call(this,t)||this===S&&t&&t._writableState instanceof A}})):a=function(t){return t instanceof this},S.prototype.pipe=function(){_(this,new g)},S.prototype.write=function(t,e,n){var i,o=this._writableState,a=!1,s=!o.objectMode&&(i=t,c.isBuffer(i)||i instanceof l);return s&&!c.isBuffer(t)&&(t=function(t){return c.from(t)}(t)),"function"==typeof e&&(n=e,e=null),s?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof n&&(n=E),o.ending?function(t,e){var n=new w;_(t,n),r.nextTick(e,n)}(this,n):(s||function(t,e,n,i){var o;return null===n?o=new v:"string"==typeof n||e.objectMode||(o=new p("chunk",["string","Buffer"],n)),!o||(_(t,o),r.nextTick(i,o),!1)}(this,o,t,n))&&(o.pendingcb++,a=function(t,e,n,r,i,o){if(!n){var a=function(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=c.from(e,n)),e}(e,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=e.objectMode?1:r.length;e.length+=s;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else k(t,e,!1,s,r,i,o);return u}(this,o,s,t,e,n)),a},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||T(this,t))},S.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new M(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(t,e,n){n(new m("_write()"))},S.prototype._writev=null,S.prototype.end=function(t,e,n){var i=this._writableState;return"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,I(t,e),n&&(e.finished?r.nextTick(n):t.once("finish",n)),e.ended=!0,t.writable=!1}(this,i,n),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),S.prototype.destroy=h.destroy,S.prototype._undestroy=h.undestroy,S.prototype._destroy=function(t,e){e(t)}}).call(this,n(63),n(40))},function(t,e,n){var r=n(37).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=l,this.end=h,e=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function l(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function d(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=a(e[r]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--r<n||-2===i?0:(i=a(e[r]))>=0?(i>0&&(t.lastNeed=i-2),i):--r<n||-2===i?0:(i=a(e[r]))>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){t.exports=l;var r=n(46).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(47);function c(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(e,n){d(t,e,n)}))}function d(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new s;if(t._transformState.transforming)throw new a;return t.push(null)}n(24)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,n){n(new i("_transform()"))},l.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e,n){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 o in t){const a=t[o];i[o]="function"==typeof a&&n(o)?r(a,e):a}return i}},function(t,e,n){const r=n(173),i=n(174)();function o(t){this.currentProvider=t}function a(t){return function(){const e=this;var n=[].slice.call(arguments),r=n.pop();e.sendAsync({method:t,params:n},r)}}function s(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=o,o.prototype.getBalance=s(2,"eth_getBalance"),o.prototype.getCode=s(2,"eth_getCode"),o.prototype.getTransactionCount=s(2,"eth_getTransactionCount"),o.prototype.getStorageAt=s(3,"eth_getStorageAt"),o.prototype.call=s(2,"eth_call"),o.prototype.protocolVersion=a("eth_protocolVersion"),o.prototype.syncing=a("eth_syncing"),o.prototype.coinbase=a("eth_coinbase"),o.prototype.mining=a("eth_mining"),o.prototype.hashrate=a("eth_hashrate"),o.prototype.gasPrice=a("eth_gasPrice"),o.prototype.accounts=a("eth_accounts"),o.prototype.blockNumber=a("eth_blockNumber"),o.prototype.getBlockTransactionCountByHash=a("eth_getBlockTransactionCountByHash"),o.prototype.getBlockTransactionCountByNumber=a("eth_getBlockTransactionCountByNumber"),o.prototype.getUncleCountByBlockHash=a("eth_getUncleCountByBlockHash"),o.prototype.getUncleCountByBlockNumber=a("eth_getUncleCountByBlockNumber"),o.prototype.sign=a("eth_sign"),o.prototype.sendTransaction=a("eth_sendTransaction"),o.prototype.sendRawTransaction=a("eth_sendRawTransaction"),o.prototype.estimateGas=a("eth_estimateGas"),o.prototype.getBlockByHash=a("eth_getBlockByHash"),o.prototype.getBlockByNumber=a("eth_getBlockByNumber"),o.prototype.getTransactionByHash=a("eth_getTransactionByHash"),o.prototype.getTransactionByBlockHashAndIndex=a("eth_getTransactionByBlockHashAndIndex"),o.prototype.getTransactionByBlockNumberAndIndex=a("eth_getTransactionByBlockNumberAndIndex"),o.prototype.getTransactionReceipt=a("eth_getTransactionReceipt"),o.prototype.getUncleByBlockHashAndIndex=a("eth_getUncleByBlockHashAndIndex"),o.prototype.getUncleByBlockNumberAndIndex=a("eth_getUncleByBlockNumberAndIndex"),o.prototype.getCompilers=a("eth_getCompilers"),o.prototype.compileLLL=a("eth_compileLLL"),o.prototype.compileSolidity=a("eth_compileSolidity"),o.prototype.compileSerpent=a("eth_compileSerpent"),o.prototype.newFilter=a("eth_newFilter"),o.prototype.newBlockFilter=a("eth_newBlockFilter"),o.prototype.newPendingTransactionFilter=a("eth_newPendingTransactionFilter"),o.prototype.uninstallFilter=a("eth_uninstallFilter"),o.prototype.getFilterChanges=a("eth_getFilterChanges"),o.prototype.getFilterLogs=a("eth_getFilterLogs"),o.prototype.getLogs=a("eth_getLogs"),o.prototype.getWork=a("eth_getWork"),o.prototype.submitWork=a("eth_submitWork"),o.prototype.submitHashrate=a("eth_submitHashrate"),o.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)}))}},function(t,e,n){t.exports=n(180)},function(t,e,n){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(181),e),i(n(182),e),i(n(183),e),i(n(121),e),i(n(122),e),i(n(186),e)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.getUniqueId=void 0;let r=Math.floor(4294967295*Math.random());e.getUniqueId=function(){return r=(r+1)%4294967295,r}},function(t,e,n){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(64)),o=n(184);class a extends i.default{constructor(){super(),this._middleware=[]}push(t){this._middleware.push(t)}handle(t,e){if(e&&"function"!=typeof e)throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?e?this._handleBatch(t,e):this._handleBatch(t):e?this._handle(t,e):this._promiseHandle(t)}asMiddleware(){return async(t,e,n,r)=>{try{const[i,o,s]=await a._runAllMiddleware(t,e,this._middleware);return o?(await a._runReturnHandlers(s),r(i)):n((async t=>{try{await a._runReturnHandlers(s)}catch(e){return t(e)}return t()}))}catch(t){return r(t)}}}async _handleBatch(t,e){try{const n=await Promise.all(t.map(this._promiseHandle.bind(this)));return e?e(null,n):n}catch(t){if(e)return e(t);throw t}}_promiseHandle(t){return new Promise((e=>{this._handle(t,((t,n)=>{e(n)}))}))}async _handle(t,e){if(!t||Array.isArray(t)||"object"!=typeof t){const n=new o.EthereumRpcError(o.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof t,{request:t});return e(n,{id:void 0,jsonrpc:"2.0",error:n})}if("string"!=typeof t.method){const n=new o.EthereumRpcError(o.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof t.method,{request:t});return e(n,{id:t.id,jsonrpc:"2.0",error:n})}const n=Object.assign({},t),r={id:n.id,jsonrpc:n.jsonrpc};let i=null;try{await this._processRequest(n,r)}catch(t){i=t}return i&&(delete r.result,r.error||(r.error=o.serializeError(i))),e(i,r)}async _processRequest(t,e){const[n,r,i]=await a._runAllMiddleware(t,e,this._middleware);if(a._checkForCompletion(t,e,r),await a._runReturnHandlers(i),n)throw n}static async _runAllMiddleware(t,e,n){const r=[];let i=null,o=!1;for(const s of n)if([i,o]=await a._runMiddleware(t,e,s,r),o)break;return[i,o,r.reverse()]}static _runMiddleware(t,e,n,r){return new Promise((i=>{const a=t=>{const n=t||e.error;n&&(e.error=o.serializeError(n)),i([n,!0])},u=n=>{e.error?a(e.error):(n&&("function"!=typeof n&&a(new o.EthereumRpcError(o.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof n}" for request:\n${s(t)}`,{request:t})),r.push(n)),i([null,!1]))};try{n(t,e,u,a)}catch(t){a(t)}}))}static async _runReturnHandlers(t){for(const e of t)await new Promise(((t,n)=>{e((e=>e?n(e):t()))}))}static _checkForCompletion(t,e,n){if(!("result"in e)&&!("error"in e))throw new o.EthereumRpcError(o.errorCodes.rpc.internal,"JsonRpcEngine: Response has no error or result for request:\n"+s(t),{request:t});if(!n)throw new o.EthereumRpcError(o.errorCodes.rpc.internal,"JsonRpcEngine: Nothing ended request:\n"+s(t),{request:t})}}function s(t){return JSON.stringify(t,null,2)}e.JsonRpcEngine=a},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=n(96),i=n(95),o=r.errorCodes.rpc.internal,a={code:o,message:s(o)};function s(t,n="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(t)){const n=t.toString();if(h(r.errorValues,n))return r.errorValues[n].message;if(c(t))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function u(t){if(!Number.isInteger(t))return!1;const e=t.toString();return!!r.errorValues[e]||!!c(t)}function c(t){return t>=-32099&&t<=-32e3}function l(t){return t&&"object"==typeof t&&!Array.isArray(t)?Object.assign({},t):t}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=s,e.isValidCode=u,e.serializeError=function(t,{fallbackError:e=a,shouldIncludeStack:n=!1}={}){var r,o;if(!e||!Number.isInteger(e.code)||"string"!=typeof e.message)throw new Error("Must provide fallback error with integer number code and string message.");if(t instanceof i.EthereumRpcError)return t.serialize();const c={};if(t&&"object"==typeof t&&!Array.isArray(t)&&h(t,"code")&&u(t.code)){const e=t;c.code=e.code,e.message&&"string"==typeof e.message?(c.message=e.message,h(e,"data")&&(c.data=e.data)):(c.message=s(c.code),c.data={originalError:l(t)})}else{c.code=e.code;const n=null===(r=t)||void 0===r?void 0:r.message;c.message=n&&"string"==typeof n?n:e.message,c.data={originalError:l(t)}}const d=null===(o=t)||void 0===o?void 0:o.stack;return n&&t&&d&&"string"==typeof d&&(c.stack=d),c}},function(t,e,n){function r(t){var e,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=r(t[e]))&&(i&&(i+=" "),i+=n);else for(e in t)t[e]&&(i&&(i+=" "),i+=e);return i}n.r(e),e.default=function(){for(var t,e,n=0,i="";n<arguments.length;)(t=arguments[n++])&&(e=r(t))&&(i&&(i+=" "),i+=e);return i}},function(t,e,n){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",t.selectProvider="selectProvider"}(e.Web3Method||(e.Web3Method={}))},function(t,e,n){n.r(e);var r=n(84);n.d(e,"CoinbaseWalletProvider",(function(){return r.CoinbaseWalletProvider})),n.d(e,"CoinbaseWalletSDK",(function(){return r.CoinbaseWalletSDK}))},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.walletLogo=void 0,e.walletLogo=(t,e)=>{let n;switch(t){case"standard":default:return n=e,`data:image/svg+xml,%3Csvg width='${e}' height='${n}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return n=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${n}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return n=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return n=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return n=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return n=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`}}},function(t,e,n){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}`}}},function(t,e,n){e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=c(t),a=r[0],s=r[1],u=new o(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),l=0,h=s>0?a-4:a;for(n=0;n<h;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;return 2===s&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,u[l++]=255&e),1===s&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e),u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(l(t,a,a+16383>s?s:a+16383));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,n){for(var i,o,a=[],s=e;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){
|
|
98
98
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
99
|
-
e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,h=n?i-1:0,d=n?-1:1,f=t[e+h];for(h+=d,o=f&(1<<-l)-1,f>>=-l,l+=s;l>0;o=256*o+t[e+h],h+=d,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+h],h+=d,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=c}return(f?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,h=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+h>=1?d/u:d*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=l?(s=0,a=l):a+h>=1?(s=(e*u-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[n+f]=255&s,f+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[n+f]=255&a,f+=p,a/=256,c-=8);t[n+f-p]|=128*m}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const r=n(87),i=n(103),o=n(88);function a(t,e){const[n,o]=u(e);return new r.EthereumRpcError(t,n||i.getMessageFromCode(t),o)}function s(t,e){const[n,o]=u(e);return new r.EthereumProviderError(t,n||i.getMessageFromCode(t),o)}function u(t){if(t){if("string"==typeof t)return[t];if("object"==typeof t&&!Array.isArray(t)){const{message:e,data:n}=t;if(e&&"string"!=typeof e)throw new Error("Must specify string message.");return[e||void 0,n]}}return[]}e.ethErrors={rpc:{parse:t=>a(o.errorCodes.rpc.parse,t),invalidRequest:t=>a(o.errorCodes.rpc.invalidRequest,t),invalidParams:t=>a(o.errorCodes.rpc.invalidParams,t),methodNotFound:t=>a(o.errorCodes.rpc.methodNotFound,t),internal:t=>a(o.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return a(e,t)},invalidInput:t=>a(o.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>a(o.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>a(o.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>a(o.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>a(o.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>a(o.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>s(o.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>s(o.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>s(o.errorCodes.provider.unsupportedMethod,t),disconnected:t=>s(o.errorCodes.provider.disconnected,t),chainDisconnected:t=>s(o.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:n,data:i}=t;if(!n||"string"!=typeof n)throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(e,n,i)}}}},function(t,e,n){(e=t.exports=function(t){t=t.toLowerCase();var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n}).sha=n(136),e.sha1=n(137),e.sha224=n(138),e.sha256=n(104),e.sha384=n(139),e.sha512=n(105)},function(t,e,n){var r=n(24),i=n(45),o=n(37).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t){return t<<30|t>>>2}function l(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,h=0;h<16;++h)n[h]=t.readInt32BE(4*h);for(;h<80;++h)n[h]=n[h-3]^n[h-8]^n[h-14]^n[h-16];for(var d=0;d<80;++d){var f=~~(d/20),p=0|((e=r)<<5|e>>>27)+l(f,i,o,s)+u+n[d]+a[f];u=s,s=o,o=c(i),i=r,r=p}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,n){var r=n(24),i=n(45),o=n(37).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t){return t<<5|t>>>27}function l(t){return t<<30|t>>>2}function h(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,d=0;d<16;++d)n[d]=t.readInt32BE(4*d);for(;d<80;++d)n[d]=(e=n[d-3]^n[d-8]^n[d-14]^n[d-16])<<1|e>>>31;for(var f=0;f<80;++f){var p=~~(f/20),m=c(r)+h(p,i,o,s)+u+n[f]+a[p]|0;u=s,s=o,o=l(i),i=r,r=m}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,n){var r=n(24),i=n(104),o=n(45),a=n(37).Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}r(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},function(t,e,n){var r=n(24),i=n(105),o=n(45),a=n(37).Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}r(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(48);function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},function(t,e,n){var r=n(141),i=n(151),o=n(93);t.exports={formats:o,parse:i,stringify:r}},function(t,e,n){var r=n(142),i=n(106),o=n(93),a=Object.prototype.hasOwnProperty,s={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},u=Array.isArray,c=String.prototype.split,l=Array.prototype.push,h=function(t,e){l.apply(t,u(e)?e:[e])},d=Date.prototype.toISOString,f=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(t){return d.call(t)},skipNulls:!1,strictNullHandling:!1},m={},y=function t(e,n,o,a,s,l,d,f,y,g,b,v,w,M,_,E){for(var A,S=e,k=E,N=0,T=!1;void 0!==(k=k.get(m))&&!T;){var x=k.get(e);if(N+=1,void 0!==x){if(x===N)throw new RangeError("Cyclic object value");T=!0}void 0===k.get(m)&&(N=0)}if("function"==typeof f?S=f(n,S):S instanceof Date?S=b(S):"comma"===o&&u(S)&&(S=i.maybeMap(S,(function(t){return t instanceof Date?b(t):t}))),null===S){if(s)return d&&!M?d(n,p.encoder,_,"key",v):n;S=""}if("string"==typeof(A=S)||"number"==typeof A||"boolean"==typeof A||"symbol"==typeof A||"bigint"==typeof A||i.isBuffer(S)){if(d){var L=M?n:d(n,p.encoder,_,"key",v);if("comma"===o&&M){for(var I=c.call(String(S),","),j="",C=0;C<I.length;++C)j+=(0===C?"":",")+w(d(I[C],p.encoder,_,"value",v));return[w(L)+(a&&u(S)&&1===I.length?"[]":"")+"="+j]}return[w(L)+"="+w(d(S,p.encoder,_,"value",v))]}return[w(n)+"="+w(String(S))]}var D,O=[];if(void 0===S)return O;if("comma"===o&&u(S))D=[{value:S.length>0?S.join(",")||null:void 0}];else if(u(f))D=f;else{var P=Object.keys(S);D=y?P.sort(y):P}for(var z=a&&u(S)&&1===S.length?n+"[]":n,R=0;R<D.length;++R){var B=D[R],U="object"==typeof B&&void 0!==B.value?B.value:S[B];if(!l||null!==U){var F=u(S)?"function"==typeof o?o(z,B):z:z+(g?"."+B:"["+B+"]");E.set(e,N);var Y=r();Y.set(m,E),h(O,t(U,F,o,a,s,l,d,f,y,g,b,v,w,M,_,Y))}}return O};t.exports=function(t,e){var n,i=t,c=function(t){if(!t)return p;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||p.charset;if(void 0!==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=o.default;if(void 0!==t.format){if(!a.call(o.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var r=o.formatters[n],i=p.filter;return("function"==typeof t.filter||u(t.filter))&&(i=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:p.addQueryPrefix,allowDots:void 0===t.allowDots?p.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:p.charsetSentinel,delimiter:void 0===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 c.filter?i=(0,c.filter)("",i):u(c.filter)&&(n=c.filter);var l,d=[];if("object"!=typeof i||null===i)return"";l=e&&e.arrayFormat in s?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var f=s[l];if(e&&"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var m="comma"===f&&e&&e.commaRoundTrip;n||(n=Object.keys(i)),c.sort&&n.sort(c.sort);for(var g=r(),b=0;b<n.length;++b){var v=n[b];c.skipNulls&&null===i[v]||h(d,y(i[v],v,f,m,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,g))}var w=d.join(c.delimiter),M=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?M+="utf8=%26%2310003%3B&":M+="utf8=%E2%9C%93&"),w.length>0?M+w:""}},function(t,e,n){var r=n(91),i=n(147),o=n(149),a=r("%TypeError%"),s=r("%WeakMap%",!0),u=r("%Map%",!0),c=i("WeakMap.prototype.get",!0),l=i("WeakMap.prototype.set",!0),h=i("WeakMap.prototype.has",!0),d=i("Map.prototype.get",!0),f=i("Map.prototype.set",!0),p=i("Map.prototype.has",!0),m=function(t,e){for(var n,r=t;null!==(n=r.next);r=n)if(n.key===e)return r.next=n.next,n.next=t.next,t.next=n,n};t.exports=function(){var t,e,n,r={assert:function(t){if(!r.has(t))throw new a("Side channel does not contain "+o(t))},get:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(t)return c(t,r)}else if(u){if(e)return d(e,r)}else if(n)return function(t,e){var n=m(t,e);return n&&n.value}(n,r)},has:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(t)return h(t,r)}else if(u){if(e)return p(e,r)}else if(n)return function(t,e){return!!m(t,e)}(n,r);return!1},set:function(r,i){s&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new s),l(t,r,i)):u?(e||(e=new u),f(e,r,i)):(n||(n={key:{},next:null}),function(t,e,n){var r=m(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}}(n,r,i))}};return r}},function(t,e,n){var r="undefined"!=typeof Symbol&&Symbol,i=n(144);t.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&i()}},function(t,e,n){t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},function(t,e,n){var r="Function.prototype.bind called on incompatible ",i=Array.prototype.slice,o=Object.prototype.toString;t.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==o.call(e))throw new TypeError(r+e);for(var n,a=i.call(arguments,1),s=function(){if(this instanceof n){var r=e.apply(this,a.concat(i.call(arguments)));return Object(r)===r?r:this}return e.apply(t,a.concat(i.call(arguments)))},u=Math.max(0,e.length-a.length),c=[],l=0;l<u;l++)c.push("$"+l);if(n=Function("binder","return function ("+c.join(",")+"){ return binder.apply(this,arguments); }")(s),e.prototype){var h=function(){};h.prototype=e.prototype,n.prototype=new h,h.prototype=null}return n}},function(t,e,n){var r=n(92);t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},function(t,e,n){var r=n(91),i=n(148),o=i(r("String.prototype.indexOf"));t.exports=function(t,e){var n=r(t,!!e);return"function"==typeof n&&o(t,".prototype.")>-1?i(n):n}},function(t,e,n){var r=n(92),i=n(91),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||r.call(a,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=s(r,a,arguments);if(u&&c){var n=u(e,"length");n.configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))})}return e};var h=function(){return s(r,o,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h},function(t,e,n){var r="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"==typeof i.get?i.get:null,a=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,h="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,m=Object.prototype.toString,y=Function.prototype.toString,g=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,M=String.prototype.toLowerCase,_=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,S=Array.prototype.slice,k=Math.floor,N="function"==typeof BigInt?BigInt.prototype.valueOf:null,T=Object.getOwnPropertySymbols,x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,L="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,j=Object.prototype.propertyIsEnumerable,C=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function D(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||_.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var r=t<0?-k(-t):k(t);if(r!==t){var i=String(r),o=b.call(e,i.length+1);return v.call(i,n,"$&_")+"."+v.call(v.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,n,"$&_")}var O=n(150),P=O.custom,z=Y(P)?P:null;function R(t,e,n){var r="double"===(n.quoteStyle||e)?'"':"'";return r+t+r}function B(t){return v.call(String(t),/"/g,""")}function U(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function F(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function Y(t){if(L)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!x)return!1;try{return x.call(t),!0}catch(t){}return!1}t.exports=function t(e,n,r,i){var s=n||{};if(W(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(W(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!W(s,"customInspect")||s.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(W(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(W(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var m=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return function t(e,n){if(e.length>n.maxStringLength){var r=e.length-n.maxStringLength,i="... "+r+" more character"+(r>1?"s":"");return t(b.call(e,0,n.maxStringLength),n)+i}return R(v.call(v.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,q),"single",n)}(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var w=String(e);return m?D(e,w):w}if("bigint"==typeof e){var _=String(e)+"n";return m?D(e,_):_}var k=void 0===s.depth?5:s.depth;if(void 0===r&&(r=0),r>=k&&k>0&&"object"==typeof e)return U(e)?"[Array]":"[Object]";var T=function(t,e){var n;if("\t"===t.indent)n="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;n=A.call(Array(t.indent+1)," ")}return{base:n,prev:A.call(Array(e+1),n)}}(s,r);if(void 0===i)i=[];else if(G(i,e)>=0)return"[Circular]";function P(e,n,o){if(n&&(i=S.call(i)).push(n),o){var a={depth:s.depth};return W(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,r+1,i)}return t(e,s,r+1,i)}if("function"==typeof e&&!F(e)){var Q=function(t){if(t.name)return t.name;var e=g.call(y.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),$=X(e,P);return"[Function"+(Q?": "+Q:" (anonymous)")+"]"+($.length>0?" { "+A.call($,", ")+" }":"")}if(Y(e)){var tt=L?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):x.call(e);return"object"!=typeof e||L?tt:Z(tt)}if(function(t){return!(!t||"object"!=typeof t)&&("undefined"!=typeof HTMLElement&&t instanceof HTMLElement||"string"==typeof t.nodeName&&"function"==typeof t.getAttribute)}(e)){for(var et="<"+M.call(String(e.nodeName)),nt=e.attributes||[],rt=0;rt<nt.length;rt++)et+=" "+nt[rt].name+"="+R(B(nt[rt].value),"double",s);return et+=">",e.childNodes&&e.childNodes.length&&(et+="..."),et+"</"+M.call(String(e.nodeName))+">"}if(U(e)){if(0===e.length)return"[]";var it=X(e,P);return T&&!function(t){for(var e=0;e<t.length;e++)if(G(t[e],"\n")>=0)return!1;return!0}(it)?"["+K(it,T)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var ot=X(e,P);return"cause"in Error.prototype||!("cause"in e)||j.call(e,"cause")?0===ot.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(ot,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+P(e.cause),ot),", ")+" }"}if("object"==typeof e&&u){if(z&&"function"==typeof e[z]&&O)return O(e,{depth:k-r});if("symbol"!==u&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!o||!t||"object"!=typeof t)return!1;try{o.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var at=[];return a.call(e,(function(t,n){at.push(P(n,e,!0)+" => "+P(t,e))})),J("Map",o.call(e),at,T)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{o.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var st=[];return l.call(e,(function(t){st.push(P(t,e))})),J("Set",c.call(e),st,T)}if(function(t){if(!h||!t||"object"!=typeof t)return!1;try{h.call(t,h);try{d.call(t,d)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return V("WeakMap");if(function(t){if(!d||!t||"object"!=typeof t)return!1;try{d.call(t,d);try{h.call(t,h)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return V("WeakSet");if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{return f.call(t),!0}catch(t){}return!1}(e))return V("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return Z(P(Number(e)));if(function(t){if(!t||"object"!=typeof t||!N)return!1;try{return N.call(t),!0}catch(t){}return!1}(e))return Z(P(N.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return Z(p.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return Z(P(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!F(e)){var ut=X(e,P),ct=C?C(e)===Object.prototype:e instanceof Object||e.constructor===Object,lt=e instanceof Object?"":"null prototype",ht=!ct&&I&&Object(e)===e&&I in e?b.call(H(e),8,-1):lt?"Object":"",dt=(ct||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(ht||lt?"["+A.call(E.call([],ht||[],lt||[]),": ")+"] ":"");return 0===ut.length?dt+"{}":T?dt+"{"+K(ut,T)+"}":dt+"{ "+A.call(ut,", ")+" }"}return String(e)};var Q=Object.prototype.hasOwnProperty||function(t){return t in this};function W(t,e){return Q.call(t,e)}function H(t){return m.call(t)}function G(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function q(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+w.call(e.toString(16))}function Z(t){return"Object("+t+")"}function V(t){return t+" { ? }"}function J(t,e,n,r){return t+" ("+e+") {"+(r?K(n,r):A.call(n,", "))+"}"}function K(t,e){if(0===t.length)return"";var n="\n"+e.prev+e.base;return n+A.call(t,","+n)+"\n"+e.prev}function X(t,e){var n=U(t),r=[];if(n){r.length=t.length;for(var i=0;i<t.length;i++)r[i]=W(t,i)?e(t[i],t):""}var o,a="function"==typeof T?T(t):[];if(L){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var u in t)W(t,u)&&(n&&String(Number(u))===u&&u<t.length||L&&o["$"+u]instanceof Symbol||(_.call(/[^\w$]/,u)?r.push(e(u,t)+": "+e(t[u],t)):r.push(u+": "+e(t[u],t))));if("function"==typeof T)for(var c=0;c<a.length;c++)j.call(t,a[c])&&r.push("["+e(a[c])+"]: "+e(t[a[c]],t));return r}},function(t,e){},function(t,e,n){var r=n(106),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={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},s=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},u=function(t,e){return t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},c=function(t,e,n,r){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=s?o.slice(0,s.index):o,l=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}for(var h=0;n.depth>0&&null!==(s=a.exec(o))&&h<n.depth;){if(h+=1,!n.plainObjects&&i.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+o.slice(s.index)+"]"),function(t,e,n,r){for(var i=r?e:u(e,n),o=t.length-1;o>=0;--o){var a,s=t[o];if("[]"===s&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(c,10);n.parseArrays||""!==c?!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(a=[])[l]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(l,e,n,r)}};t.exports=function(t,e){var n=function(t){if(!t)return a;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==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=void 0===t.charset?a.charset:t.charset;return{allowDots:void 0===t.allowDots?a.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:a.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:a.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:a.comma,decoder:"function"==typeof t.decoder?t.decoder:a.decoder,delimiter:"string"==typeof t.delimiter||r.isRegExp(t.delimiter)?t.delimiter:a.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:a.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:a.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:a.strictNullHandling}}(e);if(""===t||null==t)return n.plainObjects?Object.create(null):{};for(var l="string"==typeof t?function(t,e){var n,c={},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 m,y,g=d[n],b=g.indexOf("]="),v=-1===b?g.indexOf("="):b+1;-1===v?(m=e.decoder(g,a.decoder,p,"key"),y=e.strictNullHandling?null:""):(m=e.decoder(g.slice(0,v),a.decoder,p,"key"),y=r.maybeMap(u(g.slice(v+1),e),(function(t){return e.decoder(t,a.decoder,p,"value")}))),y&&e.interpretNumericEntities&&"iso-8859-1"===p&&(y=s(y)),g.indexOf("[]=")>-1&&(y=o(y)?[y]:y),i.call(c,m)?c[m]=r.combine(c[m],y):c[m]=y}return c}(t,n):t,h=n.plainObjects?Object.create(null):{},d=Object.keys(l),f=0;f<d.length;++f){var p=d[f],m=c(p,l[p],n,"string"==typeof t);h=r.merge(h,m,n)}return!0===n.allowSparse?h:r.compact(h)}},function(t,e,n){(function(e){const r=n(108),i=n(167),o={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},a={encodeData(t,n,o,a=!0){const s=["bytes32"],u=[this.hashType(t,o)];if(a){const c=(t,n,s)=>{if(void 0!==o[n])return["bytes32",null==s?"0x0000000000000000000000000000000000000000000000000000000000000000":r.keccak(this.encodeData(n,s,o,a))];if(void 0===s)throw new Error(`missing value for field ${t} of type ${n}`);if("bytes"===n)return["bytes32",r.keccak(s)];if("string"===n)return"string"==typeof s&&(s=e.from(s,"utf8")),["bytes32",r.keccak(s)];if(n.lastIndexOf("]")===n.length-1){const e=n.slice(0,n.lastIndexOf("[")),o=s.map((n=>c(t,e,n)));return["bytes32",r.keccak(i.rawEncode(o.map((([t])=>t)),o.map((([,t])=>t))))]}return[n,s]};for(const e of o[t]){const[t,r]=c(e.name,e.type,n[e.name]);s.push(t),u.push(r)}}else for(const i of o[t]){let t=n[i.name];if(void 0!==t)if("bytes"===i.type)s.push("bytes32"),t=r.keccak(t),u.push(t);else if("string"===i.type)s.push("bytes32"),"string"==typeof t&&(t=e.from(t,"utf8")),t=r.keccak(t),u.push(t);else if(void 0!==o[i.type])s.push("bytes32"),t=r.keccak(this.encodeData(i.type,t,o,a)),u.push(t);else{if(i.type.lastIndexOf("]")===i.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");s.push(i.type),u.push(t)}}return i.rawEncode(s,u)},encodeType(t,e){let n="",r=this.findTypeDependencies(t,e).filter((e=>e!==t));r=[t].concat(r.sort());for(const t of r){if(!e[t])throw new Error("No type definition specified: "+t);n+=t+"("+e[t].map((({name:t,type:e})=>e+" "+t)).join(",")+")"}return n},findTypeDependencies(t,e,n=[]){if(t=t.match(/^\w*/)[0],n.includes(t)||void 0===e[t])return n;n.push(t);for(const r of e[t])for(const t of this.findTypeDependencies(r.type,e,n))!n.includes(t)&&n.push(t);return n},hashStruct(t,e,n,i=!0){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 o.properties)t[n]&&(e[n]=t[n]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(t,n=!0){const i=this.sanitizeData(t),o=[e.from("1901","hex")];return o.push(this.hashStruct("EIP712Domain",i.domain,i.types,n)),"EIP712Domain"!==i.primaryType&&o.push(this.hashStruct(i.primaryType,i.message,i.types,n)),r.keccak(e.concat(o))}};t.exports={TYPED_MESSAGE_SCHEMA:o,TypedDataUtils:a,hashForSignTypedDataLegacy:function(t){return function(t){const e=new Error("Expect argument to be non-empty array");if("object"!=typeof t||!t.length)throw e;const n=t.map((function(t){return"bytes"===t.type?r.toBuffer(t.value):t.value})),o=t.map((function(t){return t.type})),a=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"),a),i.soliditySHA3(o,n)])}(t.data)},hashForSignTypedData_v3:function(t){return a.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return a.hash(t.data)}}}).call(this,n(19).Buffer)},function(t,e,n){t.exports=n(154)(n(165))},function(t,e,n){const r=n(155),i=n(164);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)}}}},function(t,e,n){(function(e){const{Transform:r}=n(109);t.exports=t=>class n extends r{constructor(e,n,r,i,o){super(o),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._hashBitLength=i,this._options=o,this._state=new t,this._state.initialize(e,n),this._finalized=!1}_transform(t,e,n){let r=null;try{this.update(t,e)}catch(t){r=t}n(r)}_flush(t){let e=null;try{this.push(this.digest())}catch(t){e=t}t(e)}update(t,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(19).Buffer)},function(t,e){},function(t,e,n){function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o=n(19).Buffer,a=n(158).inspect,s=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e;return(e=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n}},{key:"concat",value:function(t){if(0===this.length)return o.alloc(0);for(var e,n,r,i=o.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,n=i,r=s,o.prototype.copy.call(e,n,r),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(t,e){var n;return t<this.head.data.length?(n=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):n=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,n=1,r=e.data;for(t-=r.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?r+=i:r+=i.slice(0,t),0==(t-=o)){o===i.length?(++n,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(t){var e=o.allocUnsafe(t),n=this.head,r=1;for(n.data.copy(e),t-=n.data.length;n=n.next;){var i=n.data,a=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,a),0==(t-=a)){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,e}},{key:s,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(t.prototype,e),t}()},function(t,e){},function(t,e,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(this,n(63))},function(t,e,n){(function(e){var r;function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o=n(94),a=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function f(t,e){return{value:t,done:e}}function p(t){var e=t[a];if(null!==e){var n=t[d].read();null!==n&&(t[l]=null,t[a]=null,t[s]=null,e(f(n,!1)))}}function m(t){e.nextTick(p,t)}var y=Object.getPrototypeOf((function(){})),g=Object.setPrototypeOf((i(r={get stream(){return this[d]},next:function(){var t=this,n=this[u];if(null!==n)return Promise.reject(n);if(this[c])return Promise.resolve(f(void 0,!0));if(this[d].destroyed)return new Promise((function(n,r){e.nextTick((function(){t[u]?r(t[u]):n(f(void 0,!0))}))}));var r,i=this[l];if(i)r=new Promise(function(t,e){return function(n,r){t.then((function(){e[c]?n(f(void 0,!0)):e[h](n,r)}),r)}}(i,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(f(o,!1));r=new Promise(this[h])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var t=this;return new Promise((function(e,n){t[d].destroy(null,(function(t){t?n(t):e(f(void 0,!0))}))}))})),r),y);t.exports=function(t){var e,n=Object.create(g,(i(e={},d,{value:t,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,h,{value:function(t,e){var r=n[d].read();r?(n[l]=null,n[a]=null,n[s]=null,t(f(r,!1))):(n[a]=t,n[s]=e)},writable:!0}),e));return n[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=n[s];return null!==e&&(n[l]=null,n[a]=null,n[s]=null,e(t)),void(n[u]=t)}var r=n[a];null!==r&&(n[l]=null,n[a]=null,n[s]=null,r(f(void 0,!0))),n[c]=!0})),t.on("readable",m.bind(null,n)),n}}).call(this,n(40))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,n){t.exports=i;var r=n(116);function i(t){if(!(this instanceof i))return new i(t);r.call(this,t)}n(24)(i,r),i.prototype._transform=function(t,e,n){n(null,t)}},function(t,e,n){var r,i=n(46).codes,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var s=!1;t.on("close",(function(){s=!0})),void 0===r&&(r=n(94)),r(t,{readable:e,writable:i},(function(t){if(t)return o(t);s=!0,o()}));var u=!1;return function(e){if(!s&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new a("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?s:t.pop():s}t.exports=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var a=e.map((function(t,n){var o=n<e.length-1;return u(t,o,n>0,(function(t){r||(r=t),t&&a.forEach(c),o||(a.forEach(c),i(r))}))}));return e.reduce(l)}},function(t,e,n){(function(e){const{Transform:r}=n(109);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(t){r=t}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(19).Buffer)},function(t,e,n){(function(e){const r=n(166);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 t=0;t<50;++t)this.state[t]=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(19).Buffer)},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],o=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],s=t[4]^t[14]^t[24]^t[34]^t[44],u=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],h=t[8]^t[18]^t[28]^t[38]^t[48],d=t[9]^t[19]^t[29]^t[39]^t[49];let f=h^(o<<1|a>>>31),p=d^(a<<1|o>>>31);const m=t[0]^f,y=t[1]^p,g=t[10]^f,b=t[11]^p,v=t[20]^f,w=t[21]^p,M=t[30]^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,t[0]^=n[2*e],t[1]^=n[2*e+1]}}},function(t,e,n){(function(e){const r=n(108),i=n(66);function o(t){return t.startsWith("int[")?"int256"+t.slice(3):"int"===t?"int256":t.startsWith("uint[")?"uint256"+t.slice(4):"uint"===t?"uint256":t.startsWith("fixed[")?"fixed128x128"+t.slice(5):"fixed"===t?"fixed128x128":t.startsWith("ufixed[")?"ufixed128x128"+t.slice(6):"ufixed"===t?"ufixed128x128":t}function a(t){return parseInt(/^\D+(\d+)$/.exec(t)[1],10)}function s(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function u(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?""===e[2]?"dynamic":parseInt(e[2],10):null}function c(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 o,h,d,f;if("address"===t)return l("uint160",c(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(void 0===n.length)throw new Error("Not an array?");if("dynamic"!==(o=u(t))&&0!==o&&n.length>o)throw new Error("Elements exceed array size: "+o);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"===o){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((o=a(t))<1||o>32)throw new Error("Invalid bytes<N> width: "+o);return r.setLengthRight(n,32)}if(t.startsWith("uint")){if((o=a(t))%8||o<8||o>256)throw new Error("Invalid uint<N> width: "+o);if((h=c(n)).bitLength()>o)throw new Error("Supplied uint exceeds width: "+o+" vs "+h.bitLength());if(h<0)throw new Error("Supplied uint is negative");return h.toArrayLike(e,"be",32)}if(t.startsWith("int")){if((o=a(t))%8||o<8||o>256)throw new Error("Invalid int<N> width: "+o);if((h=c(n)).bitLength()>o)throw new Error("Supplied int exceeds width: "+o+" vs "+h.bitLength());return h.toTwos(256).toArrayLike(e,"be",32)}if(t.startsWith("ufixed")){if(o=s(t),(h=c(n))<0)throw new Error("Supplied ufixed is negative");return l("uint256",h.mul(new i(2).pow(new i(o[1]))))}if(t.startsWith("fixed"))return o=s(t),l("int256",c(n).mul(new i(2).pow(new i(o[1]))));throw new Error("Unsupported or invalid type: "+t)}function h(t){return"string"===t||"bytes"===t||"dynamic"===u(t)}function d(t,n){if(t.length!==n.length)throw new Error("Number of types are not matching the values");for(var i,s,u=[],l=0;l<t.length;l++){var h=o(t[l]),d=n[l];if("bytes"===h)u.push(d);else if("string"===h)u.push(new e(d,"utf8"));else if("bool"===h)u.push(new e(d?"01":"00","hex"));else if("address"===h)u.push(r.setLength(d,20));else if(h.startsWith("bytes")){if((i=a(h))<1||i>32)throw new Error("Invalid bytes<N> width: "+i);u.push(r.setLengthRight(d,i))}else if(h.startsWith("uint")){if((i=a(h))%8||i<8||i>256)throw new Error("Invalid uint<N> width: "+i);if((s=c(d)).bitLength()>i)throw new Error("Supplied uint exceeds width: "+i+" vs "+s.bitLength());u.push(s.toArrayLike(e,"be",i/8))}else{if(!h.startsWith("int"))throw new Error("Unsupported or invalid type: "+h);if((i=a(h))%8||i<8||i>256)throw new Error("Invalid int<N> width: "+i);if((s=c(d)).bitLength()>i)throw new Error("Supplied int exceeds width: "+i+" vs "+s.bitLength());u.push(s.toTwos(i).toArrayLike(e,"be",i/8))}}return e.concat(u)}t.exports={rawEncode:function(t,n){var r=[],i=[],a=32*t.length;for(var s in t){var u=o(t[s]),c=l(u,n[s]);h(u)?(r.push(l("uint256",a)),i.push(c),a+=c.length):r.push(c)}return e.concat(r.concat(i))},solidityPack:d,soliditySHA3:function(t,e){return r.keccak(d(t,e))}}}).call(this,n(19).Buffer)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.filterFromParam=e.FilterPolyfill=void 0;const r=n(68),i=n(38),o={jsonrpc:"2.0",id:0};function a(t){return{fromBlock:u(t.fromBlock),toBlock:u(t.toBlock),addresses:void 0===t.address?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}function s(t){const e={fromBlock:c(t.fromBlock),toBlock:c(t.toBlock),topics:t.topics};return null!==t.addresses&&(e.address=t.addresses),e}function u(t){if(void 0===t||"latest"===t||"pending"===t)return"latest";if("earliest"===t)return(0,r.IntNumber)(0);if((0,i.isHexString)(t))return(0,i.intNumberFromHexString)(t);throw new Error("Invalid block option: "+String(t))}function c(t){return"latest"===t?t:(0,i.hexStringFromIntNumber)(t)}function l(){return Object.assign(Object.assign({},o),{error:{code:-32e3,message:"filter not found"}})}function h(){return Object.assign(Object.assign({},o),{result:[]})}e.FilterPolyfill=class{constructor(t){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,r.IntNumber)(1),this.provider=t}async newFilter(t){const e=a(t),n=this.makeFilterId(),r=await this.setInitialCursorPosition(n,e.fromBlock);return console.log(`Installing new log filter(${n}):`,e,"initial cursor position:",r),this.logFilters.set(n,e),this.setFilterTimeout(n),(0,i.hexStringFromIntNumber)(n)}async newBlockFilter(){const t=this.makeFilterId(),e=await this.setInitialCursorPosition(t,"latest");return console.log(`Installing new block filter (${t}) with initial cursor position:`,e),this.blockFilters.add(t),this.setFilterTimeout(t),(0,i.hexStringFromIntNumber)(t)}async newPendingTransactionFilter(){const t=this.makeFilterId(),e=await this.setInitialCursorPosition(t,"latest");return console.log(`Installing new block filter (${t}) with initial cursor position:`,e),this.pendingTransactionFilters.add(t),this.setFilterTimeout(t),(0,i.hexStringFromIntNumber)(t)}uninstallFilter(t){const e=(0,i.intNumberFromHexString)(t);return console.log(`Uninstalling filter (${e})`),this.deleteFilter(e),!0}getFilterChanges(t){const e=(0,i.intNumberFromHexString)(t);return this.timeouts.has(e)&&this.setFilterTimeout(e),this.logFilters.has(e)?this.getLogFilterChanges(e):this.blockFilters.has(e)?this.getBlockFilterChanges(e):this.pendingTransactionFilters.has(e)?this.getPendingTransactionFilterChanges(e):Promise.resolve(l())}async getFilterLogs(t){const e=(0,i.intNumberFromHexString)(t),n=this.logFilters.get(e);return n?this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getLogs",params:[s(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 a=await this.getCurrentBlockHeight(),u="latest"===e.toBlock?a:e.toBlock;if(n>a)return h();if(n>e.toBlock)return h();console.log(`Fetching logs from ${n} to ${u} for filter ${t}`);const c=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getLogs",params:[s(Object.assign(Object.assign({},e),{fromBlock:n,toBlock:u}))]}));if(Array.isArray(c.result)){const e=c.result.map((t=>(0,i.intNumberFromHexString)(t.blockNumber||"0x0"))),o=Math.max(...e);if(o&&o>n){const e=(0,r.IntNumber)(o+1);console.log(`Moving cursor position for filter (${t}) from ${n} to ${e}`),this.cursors.set(t,e)}}return c}async getBlockFilterChanges(t){const e=this.cursors.get(t);if(!e)return l();const n=await this.getCurrentBlockHeight();if(e>n)return h();console.log(`Fetching blocks from ${e} to ${n} for filter (${t})`);const a=(await Promise.all((0,i.range)(e,n+1).map((t=>this.getBlockHashByNumber((0,r.IntNumber)(t)))))).filter((t=>!!t)),s=(0,r.IntNumber)(e+a.length);return console.log(`Moving cursor position for filter (${t}) from ${e} to ${s}`),this.cursors.set(t,s),Object.assign(Object.assign({},o),{result:a})}async getPendingTransactionFilterChanges(t){return Promise.resolve(h())}async setInitialCursorPosition(t,e){const n=await this.getCurrentBlockHeight(),r="number"==typeof e&&e>n?e:n;return this.cursors.set(t,r),r}setFilterTimeout(t){const e=this.timeouts.get(t);e&&window.clearTimeout(e);const n=window.setTimeout((()=>{console.log(`Filter (${t}) timed out`),this.deleteFilter(t)}),3e5);this.timeouts.set(t,n)}async getCurrentBlockHeight(){const{result:t}=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_blockNumber",params:[]}));return(0,i.intNumberFromHexString)((0,i.ensureHexString)(t))}async getBlockHashByNumber(t){const e=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getBlockByNumber",params:[(0,i.hexStringFromIntNumber)(t),!1]}));return e.result&&"string"==typeof e.result.hash?(0,i.ensureHexString)(e.result.hash):null}},e.filterFromParam=a},function(t,e,n){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={}))},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionManager=void 0;const r=n(171),i=n(179),o=()=>{};e.SubscriptionManager=class{constructor(t){const e=new r({provider:t,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:o}=i({blockTracker:e,provider:t});this.events=n,this.subscriptionMiddleware=o}async handleRequest(t){const e={};return await this.subscriptionMiddleware(t,e,o,o),e}destroy(){this.subscriptionMiddleware.destroy()}}},function(t,e,n){const r=n(117),i=n(172);function o(t,e){return new Promise((n=>{const r=setTimeout(n,t);r.unref&&e&&r.unref()}))}t.exports=class extends i{constructor(t={}){if(!t.provider)throw new Error("PollingBlockTracker - no provider specified.");const e=t.pollingInterval||2e4,n=t.retryTimeout||e/10,r=void 0===t.keepEventLoopActive||t.keepEventLoopActive,i=t.setSkipCacheFlag||!1;super(Object.assign({blockResetDuration:e},t)),this._provider=t.provider,this._pollingInterval=e,this._retryTimeout=n,this._keepEventLoopActive=r,this._setSkipCacheFlag=i}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}_start(){this._performSync().catch((t=>this.emit("error",t)))}async _performSync(){for(;this._isRunning;)try{await this._updateLatestBlock(),await o(this._pollingInterval,!this._keepEventLoopActive)}catch(t){const e=new Error("PollingBlockTracker - encountered an error while attempting to update latest block:\n"+t.stack);try{this.emit("error",e)}catch(t){console.error(e)}await o(this._retryTimeout,!this._keepEventLoopActive)}}async _updateLatestBlock(){const t=await this._fetchLatestBlock();this._newPotentialLatest(t)}async _fetchLatestBlock(){const t={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(t.skipCache=!0);const e=await r((e=>this._provider.sendAsync(t,e)))();if(e.error)throw new Error("PollingBlockTracker - encountered error fetching block:\n"+e.error);return e.result}}},function(t,e,n){n(118),n(117);const r=n(175),i=(t,e)=>t+e,o=["sync","latest"];function a(t){return Number.parseInt(t,16)}t.exports=class extends r{constructor(t={}){super(),this._blockResetDuration=t.blockResetDuration||2e4,this._blockResetTimeout,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise((t=>this.once("latest",t)))}removeAllListeners(t){t?super.removeAllListeners(t):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener()}_start(){}_end(){}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(t,e){o.includes(t)&&this._maybeStart()}_onRemoveListener(t,e){this._getBlockTrackerEventCount()>0||this._maybeEnd()}_maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),this._start())}_maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),this._end())}_getBlockTrackerEventCount(){return o.map((t=>this.listenerCount(t))).reduce(i)}_newPotentialLatest(t){const e=this._currentBlock;e&&a(t)<=a(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}}},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},function(t,e){t.exports=function(t){var e=(t=t||{}).max||Number.MAX_SAFE_INTEGER,n=void 0!==t.start?t.start:Math.floor(Math.random()*e);return function(){return n%=e,n++}}},function(t,e,n){const r=n(176),i=n(65);var o="object"==typeof Reflect?Reflect:null,a=o&&"function"==typeof o.apply?o.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};function s(){i.call(this)}function u(t,e,n){try{a(t,e,n)}catch(t){setTimeout((()=>{throw t}))}}function c(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}t.exports=s,r.inherits(s,i),s.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 o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=i[t];if(void 0===s)return!1;if("function"==typeof s)u(s,this,e);else{var l=s.length,h=c(s,l);for(n=0;n<l;++n)u(h[n],this,e)}return!0}},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(s(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(t).replace(i,(function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}})),u=r[n];n<o;u=r[++n])m(u)||!w(u)?a+=" "+u:a+=" "+s(u);return a},e.deprecate=function(n,r){if(void 0!==t&&!0===t.noDeprecation)return n;if(void 0===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 o,a={};function s(t,n){var r={seen:[],stylize:c};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),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),l(r,t,r.depth)}function u(t,e){var n=s.styles[e];return n?"["+s.colors[n][0]+"m"+t+"["+s.colors[n][1]+"m":t}function c(t,e){return t}function l(t,n,r){if(t.customInspect&&n&&E(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 o=function(t,e){if(b(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")}return y(e)?t.stylize(""+e,"number"):p(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}(t,n);if(o)return o;var a=Object.keys(n),s=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),_(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(n);if(0===a.length){if(E(n)){var u=n.name?": "+n.name:"";return t.stylize("[Function"+u+"]","special")}if(v(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(M(n))return t.stylize(Date.prototype.toString.call(n),"date");if(_(n))return h(n)}var c,w="",A=!1,S=["{","}"];return f(n)&&(A=!0,S=["[","]"]),E(n)&&(w=" [Function"+(n.name?": "+n.name:"")+"]"),v(n)&&(w=" "+RegExp.prototype.toString.call(n)),M(n)&&(w=" "+Date.prototype.toUTCString.call(n)),_(n)&&(w=" "+h(n)),0!==a.length||A&&0!=n.length?r<0?v(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),c=A?function(t,e,n,r,i){for(var o=[],a=0,s=e.length;a<s;++a)T(e,String(a))?o.push(d(t,e,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(d(t,e,n,r,i,!0))})),o}(t,n,r,s,a):a.map((function(e){return d(t,n,r,s,e,A)})),t.seen.pop(),function(t,e,n){return t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}(c,w,S)):S[0]+w+S[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),T(r,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=m(n)?l(t,u.value,null):l(t,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),b(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function f(t){return Array.isArray(t)}function p(t){return"boolean"==typeof t}function m(t){return null===t}function y(t){return"number"==typeof t}function g(t){return"string"==typeof t}function b(t){return void 0===t}function v(t){return w(t)&&"[object RegExp]"===A(t)}function w(t){return"object"==typeof t&&null!==t}function M(t){return w(t)&&"[object Date]"===A(t)}function _(t){return w(t)&&("[object Error]"===A(t)||t instanceof Error)}function E(t){return"function"==typeof t}function A(t){return Object.prototype.toString.call(t)}function S(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(n){if(b(o)&&(o=t.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=t.pid;a[n]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",n,r,t)}}else a[n]=function(){};return a[n]},e.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=f,e.isBoolean=p,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=y,e.isString=g,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=b,e.isRegExp=v,e.isObject=w,e.isDate=M,e.isError=_,e.isFunction=E,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(177);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function N(){var t=new Date,e=[S(t.getHours()),S(t.getMinutes()),S(t.getSeconds())].join(":");return[t.getDate(),k[t.getMonth()],e].join(" ")}function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",N(),e.format.apply(e,arguments))},e.inherits=n(178),e._extend=function(t,e){if(!e||!w(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var x="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function L(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(x&&t[x]){var e;if("function"!=typeof(e=t[x]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,x,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,r=new Promise((function(t,r){e=t,n=r})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(t,r){t?n(t):e(r)}));try{t.apply(this,i)}catch(t){n(t)}return r}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),x&&Object.defineProperty(e,x,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,r(t))},e.promisify.custom=x,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 o=this,a=function(){return i.apply(o,arguments)};e.apply(this,n).then((function(e){t.nextTick(a,null,e)}),(function(e){t.nextTick(L,e,a)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,r(e)),n}}).call(this,n(40))},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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}},function(t,e,n){const r=n(64).default,i=n(119),{createAsyncMiddleware:o}=n(120),a=n(187),{unsafeRandomBytes:s,incrementHexInt:u}=n(60),c=n(98);function l(t){return{hash:t.hash,parentHash:t.parentHash,sha3Uncles:t.sha3Uncles,miner:t.miner,stateRoot:t.stateRoot,transactionsRoot:t.transactionsRoot,receiptsRoot:t.receiptsRoot,logsBloom:t.logsBloom,difficulty:t.difficulty,number:t.number,gasLimit:t.gasLimit,gasUsed:t.gasUsed,nonce:t.nonce,mixHash:t.mixHash,timestamp:t.timestamp,extraData:t.extraData}}t.exports=function({blockTracker:t,provider:e}){const n={},h=a({blockTracker:t,provider:e});let d=!1;const f=new r,p=i({eth_subscribe:o((async function(r,i){if(d)throw new Error("SubscriptionManager - attempting to use after destroying");const o=r.params[0],a=s(16);let f;switch(o){case"newHeads":f=function({subId:n}){const r={type:o,destroy:async()=>{t.removeListener("sync",r.update)},update:async({oldBlock:t,newBlock:r})=>{const i=r,o=u(t);(await c({provider:e,fromBlock:o,toBlock:i})).map(l).forEach((t=>{m(n,t)}))}};return t.on("sync",r.update),r}({subId:a});break;case"logs":const n=r.params[1];f=function({subId:t,filter:e}){return e.on("update",(e=>m(t,e))),{type:o,destroy:async()=>await h.uninstallFilter(e.idHex)}}({subId:a,filter:await h.newLogFilter(n)});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${o}"`)}return n[a]=f,void(i.result=a)})),eth_unsubscribe:o((async function(t,e){if(d)throw new Error("SubscriptionManager - attempting to use after destroying");const r=t.params[0],i=n[r];i?(delete n[r],await i.destroy(),e.result=!0):e.result=!1}))});return p.destroy=function(){f.removeAllListeners();for(const t in n)n[t].destroy(),delete n[t];d=!0},{events:f,middleware:p};function m(t,e){f.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:t,result:e}})}}},function(t,e){t.exports=function(t){return(e,n,r,i)=>{const o=t[e.method];return void 0===o?r():"function"==typeof o?o(e,n,r,i):(n.result=o,i())}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.createIdRemapMiddleware=void 0;const r=n(121);e.createIdRemapMiddleware=function(){return(t,e,n,i)=>{const o=t.id,a=r.getUniqueId();t.id=a,e.id=a,n((n=>{t.id=o,e.id=o,n()}))}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.createAsyncMiddleware=void 0,e.createAsyncMiddleware=function(t){return async(e,n,r,i)=>{let o;const a=new Promise((t=>{o=t}));let s=null,u=!1;const c=async()=>{u=!0,r((t=>{s=t,o()})),await a};try{await t(e,n,c),u?(await a,s(null)):i(null)}catch(t){s?s(t):i(t)}}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.createScaffoldMiddleware=void 0,e.createScaffoldMiddleware=function(t){return(e,n,r,i)=>{const o=t[e.method];return void 0===o?r():"function"==typeof o?o(e,n,r,i):(n.result=o,i())}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const r=n(95);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(123);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const o=n(185);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const a=n(96);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return a.errorCodes}})},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const r=n(95),i=n(123),o=n(96);function a(t,e){const[n,o]=u(e);return new r.EthereumRpcError(t,n||i.getMessageFromCode(t),o)}function s(t,e){const[n,o]=u(e);return new r.EthereumProviderError(t,n||i.getMessageFromCode(t),o)}function u(t){if(t){if("string"==typeof t)return[t];if("object"==typeof t&&!Array.isArray(t)){const{message:e,data:n}=t;if(e&&"string"!=typeof e)throw new Error("Must specify string message.");return[e||void 0,n]}}return[]}e.ethErrors={rpc:{parse:t=>a(o.errorCodes.rpc.parse,t),invalidRequest:t=>a(o.errorCodes.rpc.invalidRequest,t),invalidParams:t=>a(o.errorCodes.rpc.invalidParams,t),methodNotFound:t=>a(o.errorCodes.rpc.methodNotFound,t),internal:t=>a(o.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return a(e,t)},invalidInput:t=>a(o.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>a(o.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>a(o.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>a(o.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>a(o.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>a(o.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>s(o.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>s(o.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>s(o.errorCodes.provider.unsupportedMethod,t),disconnected:t=>s(o.errorCodes.provider.disconnected,t),chainDisconnected:t=>s(o.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:n,data:i}=t;if(!n||"string"!=typeof n)throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(e,n,i)}}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMiddleware=void 0;const r=n(122);e.mergeMiddleware=function(t){const e=new r.JsonRpcEngine;return t.forEach((t=>e.push(t))),e.asMiddleware()}},function(t,e,n){const r=n(224).Mutex,{createAsyncMiddleware:i}=n(120),o=n(119),a=n(188),s=n(191),u=n(192),{intToHex:c,hexToInt:l}=n(60);function h(t){return d((async(...e)=>{const n=await t(...e);return c(n.id)}))}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 e in t)n.push(t[e]);return n}t.exports=function({blockTracker:t,provider:e}){let n=0,i={};const p=new r,m=function({mutex:t}){return e=>async(n,r,i,o)=>{(await t.acquire())(),e(n,r,i,o)}}({mutex:p}),y=o({eth_newFilter:m(h(b)),eth_newBlockFilter:m(h(v)),eth_newPendingTransactionFilter:m(h(w)),eth_uninstallFilter:m(d(E)),eth_getFilterChanges:m(d(M)),eth_getFilterLogs:m(d(_))}),g=async({oldBlock:t,newBlock:e})=>{if(0===i.length)return;const n=await p.acquire();try{await Promise.all(f(i).map((async n=>{try{await n.update({oldBlock:t,newBlock:e})}catch(t){console.error(t)}})))}catch(t){console.error(t)}n()};return y.newLogFilter=b,y.newBlockFilter=v,y.newPendingTransactionFilter=w,y.uninstallFilter=E,y.getFilterChanges=M,y.getFilterLogs=_,y.destroy=()=>{!async function(){const t=f(i).length;i={},S({prevFilterCount:t,newFilterCount:0})}()},y;async function b(t){const n=new a({provider:e,params:t});return await A(n),n}async function v(){const t=new s({provider:e});return await A(t),t}async function w(){const t=new u({provider:e});return await A(t),t}async function M(t){const e=l(t),n=i[e];if(!n)throw new Error(`No filter for index "${e}"`);return n.getChangesAndClear()}async function _(t){const e=l(t),n=i[e];if(!n)throw new Error(`No filter for index "${e}"`);return"log"===n.type?results=n.getAllResults():results=[],results}async function E(t){const e=l(t),n=i[e],r=Boolean(n);return r&&await async function(t){const e=f(i).length;delete i[t];S({prevFilterCount:e,newFilterCount:f(i).length})}(e),r}async function A(e){const r=f(i).length,o=await t.getLatestBlock();return await e.initialize({currentBlock:o}),n++,i[n]=e,e.id=n,e.idHex=c(n),S({prevFilterCount:r,newFilterCount:f(i).length}),n}function S({prevFilterCount:e,newFilterCount:n}){0===e&&n>0?t.on("sync",g):e>0&&0===n&&t.removeListener("sync",g)}}},function(t,e,n){const r=n(118),i=n(189),o=n(190),{bnToHex:a,hexToInt:s,incrementHexInt:u,minBlockRef:c,blockRefIsNumber:l}=n(60);t.exports=class extends o{constructor({provider:t,params:e}){super(),this.type="log",this.ethQuery=new r(t),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},e),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map((t=>t.toLowerCase())))}async initialize({currentBlock:t}){let e=this.params.fromBlock;["latest","pending"].includes(e)&&(e=t),"earliest"===e&&(e="0x0"),this.params.fromBlock=e;const n=c(this.params.toBlock,t),r=Object.assign({},this.params,{toBlock:n}),i=await this._fetchLogs(r);this.addInitialResults(i)}async update({oldBlock:t,newBlock:e}){const n=e;let r;r=t?u(t):e;const i=Object.assign({},this.params,{fromBlock:r,toBlock:n}),o=(await this._fetchLogs(i)).filter((t=>this.matchLog(t)));this.addResults(o)}async _fetchLogs(t){return await i((e=>this.ethQuery.getLogs(t,e)))()}matchLog(t){if(s(this.params.fromBlock)>=s(t.blockNumber))return!1;if(l(this.params.toBlock)&&s(this.params.toBlock)<=s(t.blockNumber))return!1;const e=t.address&&t.address.toLowerCase();return!(this.params.address&&e&&!this.params.address.includes(e))&&this.params.topics.every(((e,n)=>{let r=t.topics[n];if(!r)return!1;r=r.toLowerCase();let i=Array.isArray(e)?e:[e];return!!i.includes(null)||(i=i.map((t=>t.toLowerCase())),i.includes(r))}))}}},function(t,e,n){const r=(t,e,n,r)=>function(...i){return new e.promiseModule(((o,a)=>{e.multiArgs?i.push(((...t)=>{e.errorFirst?t[0]?a(t):(t.shift(),o(t)):o(t)})):e.errorFirst?i.push(((t,e)=>{t?a(t):o(e)})):i.push(o);const s=this===n?r:this;Reflect.apply(t,s,i)}))},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 o=new WeakMap,a=new Proxy(t,{apply(t,n,i){const s=o.get(t);if(s)return Reflect.apply(s,n,i);const u=e.excludeMain?t:r(t,e,a,t);return o.set(t,u),Reflect.apply(u,n,i)},get(t,n){const s=t[n];if(!((t,n)=>{let r=i.get(t);if(r||(r={},i.set(t,r)),n in r)return r[n];const o=t=>"string"==typeof t||"symbol"==typeof n?n===t:t.test(n),a=Reflect.getOwnPropertyDescriptor(t,n),s=void 0===a||a.writable||a.configurable,u=(e.include?e.include.some(o):!e.exclude.some(o))&&s;return r[n]=u,u})(t,n)||s===Function.prototype[n])return s;const u=o.get(s);if(u)return u;if("function"==typeof s){const n=r(s,e,a,t);return o.set(s,n),n}return s}});return a}},function(t,e,n){const r=n(97);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}}},function(t,e,n){const r=n(97),i=n(98),{incrementHexInt:o}=n(60);t.exports=class extends r{constructor({provider:t,params:e}){super(),this.type="block",this.provider=t}async update({oldBlock:t,newBlock:e}){const n=e,r=o(t),a=(await i({provider:this.provider,fromBlock:r,toBlock:n})).map((t=>t.hash));this.addResults(a)}}},function(t,e,n){const r=n(97),i=n(98),{incrementHexInt:o}=n(60);t.exports=class extends r{constructor({provider:t}){super(),this.type="tx",this.provider=t}async update({oldBlock:t}){const e=t,n=o(t),r=await i({provider:this.provider,fromBlock:n,toBlock:e}),a=[];for(const t of r)a.push(...t.transactions);this.addResults(a)}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKUI=void 0;const r=n(194),i=n(206),o=n(208);e.WalletSDKUI=class{constructor(t){this.standalone=null,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,o.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}setStandalone(t){this.standalone=t}isStandalone(){var t;return null!==(t=this.standalone)&&void 0!==t&&t}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkFlow=void 0;const r=n(8),i=n(48),o=n(195);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)(o.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)}}},function(t,e,n){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(124)),o=n(8),a=n(99),s=n(38),u=n(196),c=r(n(197)),l=r(n(198)),h=r(n(199)),d=r(n(200)),f=n(201),p=n(203),m=r(n(205));e.TryExtensionLinkDialog=t=>{const{isOpen:e,darkMode:n}=t,[r,s]=(0,a.useState)(!e),[u,c]=(0,a.useState)(!e);(0,a.useEffect)((()=>{const t=[window.setTimeout((()=>{c(!e)}),10)];return e?s(!1):t.push(window.setTimeout((()=>{s(!0)}),360)),()=>{t.forEach(window.clearTimeout)}}),[t.isOpen]);const l=n?"dark":"light";return(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-container",r&&"-cbwsdk-extension-dialog-container-hidden")},(0,o.h)("style",null,m.default),(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-backdrop",l,u&&"-cbwsdk-extension-dialog-backdrop-hidden")}),(0,o.h)("div",{class:"-cbwsdk-extension-dialog"},(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-box",u&&"-cbwsdk-extension-dialog-box-hidden")},(0,o.h)(y,{darkMode:n,onInstallClick:()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")}}),t.connectDisabled?null:(0,o.h)(g,{darkMode:n,version:t.version,sessionId:t.sessionId,sessionSecret:t.sessionSecret,linkAPIUrl:t.linkAPIUrl,isConnected:t.isConnected,isParentConnection:t.isParentConnection}),t.onCancel&&(0,o.h)(v,{darkMode:n,onClick:t.onCancel}))))};const y=({darkMode:t,onInstallClick:e})=>{const[n,r]=(0,a.useState)(!1),s=(0,a.useCallback)((()=>{n?window.location.reload():(e(),r(!0))}),[e,n]),u=t?"dark":"light";return(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-box-top",u)},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-install-region"},(0,o.h)("h2",{class:u},"Try the Coinbase Wallet extension"),n&&(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-subtext"},"After installing Coinbase Wallet, refresh the page and connect again."),(0,o.h)("button",{type:"button",onClick:s},n?"Refresh":"Install")),(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-box-top-info-region",u)},(0,o.h)(b,{darkMode:t,icon:l.default,text:"Connect to crypto apps with one click"}),(0,o.h)(b,{darkMode:t,icon:h.default,text:"Your private key is stored securely"}),(0,o.h)(b,{darkMode:t,icon:c.default,text:"Works with Ethereum, Polygon, and more"})))},g=t=>{const e=(0,s.createQrUrl)(t.sessionId,t.sessionSecret,t.linkAPIUrl,t.isParentConnection),n=t.darkMode?"dark":"light";return(0,o.h)("div",{"data-testid":"scan-qr-box",class:(0,i.default)("-cbwsdk-extension-dialog-box-bottom",n)},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-description-region"},(0,o.h)("h2",{class:n},"Or scan to connect"),(0,o.h)("body",{class:(0,i.default)("-cbwsdk-extension-dialog-box-bottom-description",n)},"Open"," ",(0,o.h)("a",{href:"https://wallet.coinbase.com/",target:"_blank",rel:"noopener noreferrer"},"Coinbase Wallet")," ","on your mobile phone and scan")),(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-qr-region"},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-qr-wrapper"},(0,o.h)(f.QRCode,{content:e,width:150,height:150,fgColor:"#000",bgColor:"transparent",image:{svg:d.default,width:34,height:34}})),(0,o.h)("input",{type:"hidden",name:"cbwsdk-version",value:u.LIB_VERSION}),(0,o.h)("input",{type:"hidden",value:e}),!t.isConnected&&(0,o.h)("div",{"data-testid":"connecting-spinner",class:(0,i.default)("-cbwsdk-extension-dialog-box-bottom-qr-connecting",n)},(0,o.h)(p.Spinner,{size:36,color:t.darkMode?"#FFF":"#000"}),(0,o.h)("p",null,"Connecting..."))))},b=t=>{const e=t.darkMode?"dark":"light";return(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-description"},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-description-icon-wrapper"},(0,o.h)("img",{src:t.icon})),(0,o.h)("body",{class:(0,i.default)("-cbwsdk-extension-dialog-box-top-description-text",e)},t.text))},v=t=>{const e=t.darkMode?"dark":"light";return(0,o.h)("button",{type:"button",class:(0,i.default)("-cbwsdk-extension-dialog-box-cancel",e),onClick:t.onClick},(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-box-cancel-x",e)}))}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.LIB_VERSION=void 0,e.LIB_VERSION="3.4.0"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggMEMzLjU4IDAgMCAzLjU4IDAgOHMzLjU4IDggOCA4IDgtMy41OCA4LTgtMy41OC04LTgtOFptNS45MSA3aC0xLjk0Yy0uMS0xLjU3LS40Mi0zLS45MS00LjE1IDEuNDguODggMi41NSAyLjM4IDIuODUgNC4xNVpNOCAxNGMtLjQ1IDAtMS43Mi0xLjc3LTEuOTUtNWgzLjljLS4yMyAzLjIzLTEuNSA1LTEuOTUgNVpN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uNzQ1YTMuMTMgMy4xMyAwIDAgMC0uNTU0LS42OWwtLjYyLS42MjQtMS4xNDIgMS4xNDYuNjIxLjYyM2MuMjE4LjIyLjM4Ni40ODkuNDg3Ljc1OC4zMzUuODI2LjE2NyAxLjgyLS41MDQgMi40OTRsLTMuMjA1IDMuMjE5YTIuMjkzIDIuMjkzIDAgMCAxLTMuMjQgMCAyLjMxNiAyLjMxNiAwIDAgMSAwLTMuMjUybDEuNTI4LTEuNTM0YTQuODE1IDQuODE1IDAgMCAxLS4yODUtMi4wMDVsLTIuMzgzIDIuMzkzYTMuOTI3IDMuOTI3IDAgMCAwIDAgNS41NDQgMy45MDkgMy45MDkgMCAwIDAgNS41MzggMGwzLjIwNS0zLjIxOWEzLjk1OCAzLjk1OCAwIDAgMCAxLjA5MS0zLjQwNCA0LjIxMSA0LjIxMSAwIDAgMC0uNTM3LTEuNDQ5WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEgN3Y5aDE0VjdIMVptNy41IDQuMzlWMTRoLTF2LTIuNjFjLS40NC0uMTktLjc1LS42My0uNzUtMS4xNGExLjI1IDEuMjUgMCAwIDEgMi41IDBjMCAuNTEtLjMxLjk1LS43NSAxLjE0Wk01LjY3IDZWNC4zM0M1LjY3IDMuMDUgNi43MSAyIDggMnMyLjMzIDEuMDUgMi4zMyAyLjMzVjZoMlY0LjMzQzEyLjMzIDEuOTQgMTAuMzkgMCA4IDBTMy42NyAxLjk0IDMuNjcgNC4zM1Y2aDJaIiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+"},function(t,e,n){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'},function(t,e,n){(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(8),o=n(99),a=r(n(202));e.QRCode=e=>{const[n,r]=(0,o.useState)("");return(0,o.useEffect)((()=>{var n,i;const o=new a.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}),s=t.from(o.svg(),"utf8").toString("base64");r("data:image/svg+xml;base64,"+s)})),n?(0,i.h)("img",{src:n,alt:"QR Code"}):null}}).call(this,n(19).Buffer)},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=[],o=this.data.charCodeAt(e);o>65536?(r[0]=240|(1835008&o)>>>18,r[1]=128|(258048&o)>>>12,r[2]=128|(4032&o)>>>6,r[3]=128|63&o):o>2048?(r[0]=224|(61440&o)>>>12,r[1]=128|(4032&o)>>>6,r[2]=128|63&o):o>128?(r[0]=192|(1984&o)>>>6,r[1]=128|63&o):r[0]=o,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=o.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 o=1*i,a=0;a<this.modules[i].length;a++){var s=1*a;this.modules[i][a]&&(r.beginFill(0,100),r.moveTo(s,o),r.lineTo(s+1,o),r.lineTo(s+1,o+1),r.lineTo(s,o+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=o.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 a=-2;a<=2;a++)for(var s=-2;s<=2;s++)this.modules[r+a][i+s]=-2==a||2==a||-2==s||2==s||0==a&&0==s}},setupTypeNumber:function(t){for(var e=o.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=o.getBCHTypeInfo(n),i=0;i<15;i++){var a=!t&&1==(r>>i&1);i<6?this.modules[i][8]=a:i<8?this.modules[i+1][8]=a:this.modules[this.moduleCount-15+i][8]=a}for(i=0;i<15;i++)a=!t&&1==(r>>i&1),i<8?this.modules[8][this.moduleCount-i-1]=a:i<9?this.modules[8][15-i-1+1]=a:this.modules[8][15-i-1]=a;this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var n=-1,r=this.moduleCount-1,i=7,a=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var u=0;u<2;u++)if(null==this.modules[r][s-u]){var c=!1;a<t.length&&(c=1==(t[a]>>>i&1)),o.getMask(e,r,s-u)&&(c=!c),this.modules[r][s-u]=c,-1==--i&&(a++,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=c.getRSBlocks(t,e),a=new l,s=0;s<n.length;s++){var u=n[s];a.put(u.mode,4),a.put(u.getLength(),o.getLengthInBits(u.mode,t)),u.write(a)}var h=0;for(s=0;s<i.length;s++)h+=i[s].dataCount;if(a.getLengthInBits()>8*h)throw new Error("code length overflow. ("+a.getLengthInBits()+">"+8*h+")");for(a.getLengthInBits()+4<=8*h&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(!1);for(;!(a.getLengthInBits()>=8*h||(a.put(r.PAD0,8),a.getLengthInBits()>=8*h));)a.put(r.PAD1,8);return r.createBytes(a,i)},r.createBytes=function(t,e){for(var n=0,r=0,i=0,a=new Array(e.length),s=new Array(e.length),c=0;c<e.length;c++){var l=e[c].dataCount,h=e[c].totalCount-l;r=Math.max(r,l),i=Math.max(i,h),a[c]=new Array(l);for(var d=0;d<a[c].length;d++)a[c][d]=255&t.buffer[d+n];n+=l;var f=o.getErrorCorrectPolynomial(h),p=new u(a[c],f.getLength()-1).mod(f);for(s[c]=new Array(f.getLength()-1),d=0;d<s[c].length;d++){var m=d+p.getLength()-s[c].length;s[c][d]=m>=0?p.get(m):0}}var y=0;for(d=0;d<e.length;d++)y+=e[d].totalCount;var g=new Array(y),b=0;for(d=0;d<r;d++)for(c=0;c<e.length;c++)d<a[c].length&&(g[b++]=a[c][d]);for(d=0;d<i;d++)for(c=0;c<e.length;c++)d<s[c].length&&(g[b++]=s[c][d]);return g};for(var i={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},o={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;o.getBCHDigit(e)-o.getBCHDigit(o.G15)>=0;)e^=o.G15<<o.getBCHDigit(e)-o.getBCHDigit(o.G15);return(t<<10|e)^o.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;o.getBCHDigit(e)-o.getBCHDigit(o.G18)>=0;)e^=o.G18<<o.getBCHDigit(e)-o.getBCHDigit(o.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return o.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,n){switch(t){case 0:return(e+n)%2==0;case 1:return e%2==0;case 2:return n%3==0;case 3:return(e+n)%3==0;case 4:return(Math.floor(e/2)+Math.floor(n/3))%2==0;case 5:return e*n%2+e*n%3==0;case 6:return(e*n%2+e*n%3)%2==0;case 7:return(e*n%3+(e+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new u([1],0),n=0;n<t;n++)e=e.multiply(new u([1,a.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 o=0,a=t.isDark(r,i),s=-1;s<=1;s++)if(!(r+s<0||e<=r+s))for(var u=-1;u<=1;u++)i+u<0||e<=i+u||0==s&&0==u||a==t.isDark(r+s,i+u)&&o++;o>5&&(n+=3+o-5)}for(r=0;r<e-1;r++)for(i=0;i<e-1;i++){var c=0;t.isDark(r,i)&&c++,t.isDark(r+1,i)&&c++,t.isDark(r,i+1)&&c++,t.isDark(r+1,i+1)&&c++,0!=c&&4!=c||(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+Math.abs(100*l/e/e-50)/5*10}},a={glog:function(t){if(t<1)throw new Error("glog("+t+")");return a.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return a.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},s=0;s<8;s++)a.EXP_TABLE[s]=1<<s;for(s=8;s<256;s++)a.EXP_TABLE[s]=a.EXP_TABLE[s-4]^a.EXP_TABLE[s-5]^a.EXP_TABLE[s-6]^a.EXP_TABLE[s-8];for(s=0;s<255;s++)a.LOG_TABLE[a.EXP_TABLE[s]]=s;function u(t,e){if(null==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 c(t,e){this.totalCount=t,this.dataCount=e}function l(){this.buffer=[],this.length=0}u.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]^=a.gexp(a.glog(this.get(n))+a.glog(t.get(r)));return new u(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=a.glog(this.get(0))-a.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]^=a.gexp(a.glog(t.get(r))+e);return new u(n,0).mod(t)}},c.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]],c.getRSBlocks=function(t,e){var n=c.getRsBlockTable(t,e);if(null==n)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var r=n.length/3,i=[],o=0;o<r;o++)for(var a=n[3*o+0],s=n[3*o+1],u=n[3*o+2],l=0;l<a;l++)i.push(new c(s,u));return i},c.getRsBlockTable=function(t,e){switch(e){case 1:return c.RS_BLOCK_TABLE[4*(t-1)+0];case 0:return c.RS_BLOCK_TABLE[4*(t-1)+1];case 3:return c.RS_BLOCK_TABLE[4*(t-1)+2];case 2:return c.RS_BLOCK_TABLE[4*(t-1)+3];default:return}},l.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 h=[[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 d(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,o=0,a=h.length;o<=a;o++){var s=h[o];if(!s)throw new Error("Content too long: expected "+i+" but got "+n);switch(e){case"L":i=s[0];break;case"M":i=s[1];break;case"Q":i=s[2];break;case"H":i=s[3];break;default:throw new Error("Unknwon error correction level: "+e)}if(n<=i)break;r++}if(r>h.length)throw new Error("Content too long");return r}(n,this.options.ecl),o=function(t){switch(t){case"L":return 1;case"M":return 0;case"Q":return 3;case"H":return 2;default:throw new Error("Unknwon error correction level: "+t)}}(this.options.ecl);this.qrcode=new r(i,o),this.qrcode.addData(n),this.qrcode.make()}d.prototype.svg=function(t){var e=this.options||{},n=this.qrcode.modules;void 0===t&&(t={container:e.container||"svg"});for(var r=void 0===e.pretty||!!e.pretty,i=r?" ":"",o=r?"\r\n":"",a=e.width,s=e.height,u=n.length,c=a/(u+2*e.padding),l=s/(u+2*e.padding),h=void 0!==e.join&&!!e.join,d=void 0!==e.swap&&!!e.swap,f=void 0===e.xmlDeclaration||!!e.xmlDeclaration,p=void 0!==e.predefined&&!!e.predefined,m=p?i+'<defs><path id="qrmodule" d="M0 0 h'+l+" v"+c+' H0 z" style="fill:'+e.color+';shape-rendering:crispEdges;" /></defs>'+o:"",y=i+'<rect x="0" y="0" width="'+a+'" height="'+s+'" style="fill:'+e.background+';shape-rendering:crispEdges;"/>'+o,g="",b="",v=0;v<u;v++)for(var w=0;w<u;w++)if(n[w][v]){var M=w*c+e.padding*c,_=v*l+e.padding*l;if(d){var E=M;M=_,_=E}if(h){var A=c+M,S=l+_;M=Number.isInteger(M)?Number(M):M.toFixed(2),_=Number.isInteger(_)?Number(_):_.toFixed(2),A=Number.isInteger(A)?Number(A):A.toFixed(2),b+="M"+M+","+_+" V"+(S=Number.isInteger(S)?Number(S):S.toFixed(2))+" H"+A+" V"+_+" H"+M+" Z "}else g+=p?i+'<use x="'+M.toString()+'" y="'+_.toString()+'" href="#qrmodule" />'+o:i+'<rect x="'+M.toString()+'" y="'+_.toString()+'" width="'+c+'" height="'+l+'" style="fill:'+e.color+';shape-rendering:crispEdges;"/>'+o}h&&(g=i+'<path x="0" y="0" style="fill:'+e.color+';shape-rendering:crispEdges;" d="'+b+'" />');let k="";if(void 0!==this.options.image&&this.options.image.svg){const t=a*this.options.image.width/100,e=s*this.options.image.height/100;k+=`<svg x="${a/2-t/2}" y="${s/2-e/2}" width="${t}" height="${e}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,k+=this.options.image.svg+o,k+="</svg>"}var N="";switch(t.container){case"svg":f&&(N+='<?xml version="1.0" standalone="yes"?>'+o),N+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+a+'" height="'+s+'">'+o,N+=m+y+g,N+=k,N+="</svg>";break;case"svg-viewbox":f&&(N+='<?xml version="1.0" standalone="yes"?>'+o),N+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+a+" "+s+'">'+o,N+=m+y+g,N+=k,N+="</svg>";break;case"g":N+='<g width="'+a+'" height="'+s+'">'+o,N+=m+y+g,N+=k,N+="</g>";break;default:N+=(m+y+g+k).replace(/^\s+/,"")}return N},t.exports=d},function(t,e,n){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(8),o=r(n(204));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,o.default),(0,i.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:n,height:n}},(0,i.h)("circle",{style:{cx:50,cy:50,r:45,stroke:r}})))}},function(t,e,n){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)}}"},function(t,e,n){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;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-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;border-radius:8px;overflow:hidden;min-height:300px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top.dark{color:#fff;background-color:#000;box-shadow:0 4px 16px rgba(255,255,255,.05)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top.light{background-color:#fff}.-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-install-region button.dark{background-color:#3773f5}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-info-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-info-region.light{background-color:#fafbfc}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-info-region.dark{background-color:#141519}.-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;align-self:center}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-text.light{color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-text.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom{display:flex;flex-direction:row;overflow:hidden;border-radius:8px;margin-top:8px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom.light{background-color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom.dark{background-color:#000;box-shadow:0 4px 16px rgba(255,255,255,.05)}.-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.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description.dark a{color:#3773f5}.-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);background-color:#fff}.-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}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting.light>p{color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting.dark{background-color:rgba(20,21,25,.9)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting>p{font-size:12px;font-weight:bold;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;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel.light{background-color:#fafbfc}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel.dark{background-color:#141519}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x.light::before,.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x.light::after{background-color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x.dark::before,.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x.dark::after{background-color:#fff}.-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;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}.-cbwsdk-css-reset .-cbwsdk-extension-dialog h2.light{color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog h2.dark{color:#fff}'},function(t,e,n){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(124)),o=n(8),a=n(99),s=r(n(207));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,o.render)((0,o.h)("div",null,(0,o.h)(e.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map((([t,n])=>(0,o.h)(e.SnackbarInstance,Object.assign({},n,{key:t})))))),this.root)}},e.SnackbarContainer=t=>(0,o.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-container")},(0,o.h)("style",null,s.default),(0,o.h)("div",{class:"-cbwsdk-snackbar"},t.children)),e.SnackbarInstance=({autoExpand:t,message:e,menuItems:n})=>{const[r,s]=(0,a.useState)(!0),[u,c]=(0,a.useState)(null!=t&&t);return(0,a.useEffect)((()=>{const t=[window.setTimeout((()=>{s(!1)}),1),window.setTimeout((()=>{c(!0)}),1e4)];return()=>{t.forEach(window.clearTimeout)}})),(0,o.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance",r&&"-cbwsdk-snackbar-instance-hidden",u&&"-cbwsdk-snackbar-instance-expanded")},(0,o.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:()=>{c(!u)}},(0,o.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",class:"-cbwsdk-snackbar-instance-header-cblogo"}),(0,o.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},e),(0,o.h)("div",{class:"-gear-container"},!u&&(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,o.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),n&&n.length>0&&(0,o.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},n.map(((t,e)=>(0,o.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,o.h)("svg",{width:t.svgWidth,height:t.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":t.defaultFillRule,"clip-rule":t.defaultClipRule,d:t.path,fill:"#AAAAAA"})),(0,o.h)("span",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item-info",t.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},t.info))))))}},function(t,e,n){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}"},function(t,e,n){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(209));e.injectCssReset=function(){const t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(i.default)),document.documentElement.appendChild(t)}},function(t,e,n){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}'},function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},a=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},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelay=void 0;const u=s(n(211)),c=n(86),l=n(48),h=n(69),d=n(89),f=n(212),p=n(216),m=n(68),y=n(38),g=a(n(217)),b=n(90),v=n(107),w=n(125),M=n(218),_=n(219),E=n(220),A=n(221);class S extends v.WalletSDKRelayAbstract{constructor(t){var e;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.options=t;const{session:n,ui:r,connection:i}=this.subscribe();if(this._session=n,this.connection=i,this.relayEventManager=t.relayEventManager,t.diagnosticLogger&&t.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");t.eventListener?this.diagnostic={log:t.eventListener.onEvent}:this.diagnostic=t.diagnosticLogger,this._reloadOnDisconnect=null===(e=t.reloadOnDisconnect)||void 0===e||e,this.ui=r}subscribe(){const t=b.Session.load(this.storage)||new b.Session(this.storage).save(),e=new f.WalletSDKConnection(t.id,t.key,this.linkAPIUrl,this.diagnostic);this.subscriptions.add(e.sessionConfig$.subscribe({next:t=>{this.onSessionConfigChanged(t)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"error while invoking session config callback"})}})),this.subscriptions.add(e.incomingEvent$.pipe((0,h.filter)((t=>"Web3Response"===t.event))).subscribe({next:this.handleIncomingEvent})),this.subscriptions.add(e.linked$.pipe((0,h.skip)(1),(0,h.tap)((t=>{var e;this.isLinked=t;const n=this.storage.getItem(v.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.diagnostic)||void 0===e||e.log(d.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:t})}}}))).subscribe()),this.subscriptions.add(e.sessionConfig$.pipe((0,h.filter)((t=>!!t.metadata&&"1"===t.metadata.__destroyed))).subscribe((()=>{var t;const n=e.isDestroyed;return null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:n,sessionIdHash:this.getSessionIdHash()}),this.resetAndReload()}))),this.subscriptions.add(e.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.WalletUsername))).pipe((0,h.mergeMap)((e=>g.decrypt(e.metadata.WalletUsername,t.secret)))).subscribe({next:t=>{this.storage.setItem(v.WALLET_USER_NAME_KEY,t)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"username"})}})),this.subscriptions.add(e.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.AppVersion))).pipe((0,h.mergeMap)((e=>g.decrypt(e.metadata.AppVersion,t.secret)))).subscribe({next:t=>{this.storage.setItem(v.APP_VERSION_KEY,t)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appversion"})}})),this.subscriptions.add(e.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.ChainId&&void 0!==t.metadata.JsonRpcUrl))).pipe((0,h.mergeMap)((e=>(0,l.zip)(g.decrypt(e.metadata.ChainId,t.secret),g.decrypt(e.metadata.JsonRpcUrl,t.secret))))).pipe((0,h.distinctUntilChanged)()).subscribe({next:([t,e])=>{this.chainCallback&&this.chainCallback(t,e)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}})),this.subscriptions.add(e.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.EthereumAddress))).pipe((0,h.mergeMap)((e=>g.decrypt(e.metadata.EthereumAddress,t.secret)))).subscribe({next:t=>{this.accountsCallback&&this.accountsCallback([t]),S.accountRequestCallbackIds.size>0&&(Array.from(S.accountRequestCallbackIds.values()).forEach((e=>{const n=(0,A.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.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}}));const n=this.options.uiConstructor({linkAPIUrl:this.options.linkAPIUrl,version:this.options.version,darkMode:this.options.darkMode,session:t,connected$:e.connected$});return e.connect(),{session:t,ui:n,connection:e}}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;const i=this.ui.isStandalone();try{this.subscriptions.unsubscribe()}catch(t){null===(e=this.diagnostic)||void 0===e||e.log(d.EVENTS.GENERAL_ERROR,{message:"Had error unsubscribing"})}null===(n=this.diagnostic)||void 0===n||n.log(d.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const o=b.Session.load(this.storage);if((null==o?void 0:o.id)===this._session.id?this.storage.clear():o&&(null===(r=this.diagnostic)||void 0===r||r.log(d.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:b.Session.hash(o.id)})),this._reloadOnDisconnect)return void this.ui.reloadUI();this.accountsCallback&&this.accountsCallback([],!0);const{session:a,ui:s,connection:u}=this.subscribe();this._session=a,this.connection=u,this.ui=s,i&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.attachUI()}),(t=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(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:w.Web3Method.signEthereumMessage,params:{message:(0,y.hexStringFromBuffer)(t,!0),address:e,addPrefix:n,typedDataJson:r||null}})}ethereumAddressFromSignedMessage(t,e,n){return this.sendRequest({method:w.Web3Method.ethereumAddressFromSignedMessage,params:{message:(0,y.hexStringFromBuffer)(t,!0),signature:(0,y.hexStringFromBuffer)(e,!0),addPrefix:n}})}signEthereumTransaction(t){return this.sendRequest({method:w.Web3Method.signEthereumTransaction,params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,y.bigIntStringFromBN)(t.weiValue),data:(0,y.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,y.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.gasPriceInWei?(0,y.bigIntStringFromBN)(t.gasPriceInWei):null,maxPriorityFeePerGas:t.gasPriceInWei?(0,y.bigIntStringFromBN)(t.gasPriceInWei):null,gasLimit:t.gasLimit?(0,y.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(t){return this.sendRequest({method:w.Web3Method.signEthereumTransaction,params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,y.bigIntStringFromBN)(t.weiValue),data:(0,y.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,y.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.maxFeePerGas?(0,y.bigIntStringFromBN)(t.maxFeePerGas):null,maxPriorityFeePerGas:t.maxPriorityFeePerGas?(0,y.bigIntStringFromBN)(t.maxPriorityFeePerGas):null,gasLimit:t.gasLimit?(0,y.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!0}})}submitEthereumTransaction(t,e){return this.sendRequest({method:w.Web3Method.submitEthereumTransaction,params:{signedTransaction:(0,y.hexStringFromBuffer)(t,!0),chainId:e}})}scanQRCode(t){return this.sendRequest({method:w.Web3Method.scanQRCode,params:{regExp:t}})}getQRCodeUrl(){return(0,y.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1)}genericRequest(t,e){return this.sendRequest({method:w.Web3Method.generic,params:{action:e,data:t}})}sendGenericMessage(t){return this.sendRequest(t)}sendRequest(t){let e=null;const n=(0,y.randomBytesHex)(8),r=r=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,t.method,r),null==e||e()};return{promise:new Promise(((i,o)=>{this.ui.isStandalone()||(e=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:r,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,(t=>{if(null==e||e(),t.errorMessage)return o(new Error(t.errorMessage));i(t)})),this.ui.isStandalone()?this.sendRequestStandalone(n,t):this.publishWeb3RequestEvent(n,t)})),cancel:r}}setConnectDisabled(t){this.ui.setConnectDisabled(t)}setAccountsCallback(t){this.accountsCallback=t}setChainCallback(t){this.chainCallback=t}publishWeb3RequestEvent(t,e){var n;const r=(0,_.Web3RequestMessage)({id:t,request:e}),i=b.Session.load(this.storage);null===(n=this.diagnostic)||void 0===n||n.log(d.EVENTS.WEB3_REQUEST,{eventId:r.id,method:"relay::"+r.request.method,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?b.Session.hash(i.id):"",isSessionMismatched:((null==i?void 0:i.id)!==this._session.id).toString()}),this.subscriptions.add(this.publishEvent("Web3Request",r,!0).subscribe({next:t=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(d.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:r.id,method:"relay::"+r.request.method,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?b.Session.hash(i.id):"",isSessionMismatched:((null==i?void 0:i.id)!==this._session.id).toString()})},error:t=>{this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:r.id,response:{method:r.request.method,errorMessage:t.message}}))}}))}publishWeb3RequestCanceledEvent(t){const e=(0,M.Web3RequestCanceledMessage)(t);this.subscriptions.add(this.publishEvent("Web3RequestCanceled",e,!1).subscribe())}publishEvent(t,e,n){const r=this.session.secret;return new l.Observable((t=>{g.encrypt(JSON.stringify(Object.assign(Object.assign({},e),{origin:location.origin})),r).then((e=>{t.next(e),t.complete()}))})).pipe((0,h.mergeMap)((e=>this.connection.publishEvent(t,e,n))))}handleIncomingEvent(t){try{this.subscriptions.add(g.decrypt(t.data,this.session.secret).pipe((0,h.map)((t=>JSON.parse(t)))).subscribe({next:t=>{const e=(0,A.isWeb3ResponseMessage)(t)?t:null;e&&this.handleWeb3ResponseMessage(e)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}))}catch(t){return}}handleWeb3ResponseMessage(t){var e;const{response:n}=t;if(null===(e=this.diagnostic)||void 0===e||e.log(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,A.Web3ResponseMessage)({id:t,response:(0,E.ErrorResponse)(e,(null!=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:w.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},e=(0,y.randomBytesHex)(8),n=n=>{this.publishWeb3RequestCanceledEvent(e),this.handleErrorResponse(e,t.method,n)};return{promise:new Promise(((r,i)=>{var o;this.relayEventManager.callbacks.set(e,(t=>{if(this.ui.hideRequestEthereumAccounts(),t.errorMessage)return i(new Error(t.errorMessage));r(t)}));const a=(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)||null;if(a&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a))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,A.Web3ResponseMessage)({id:e,response:(0,E.RequestEthereumAccountsResponse)(t)}))};this.ui.requestEthereumAccounts({onCancel:n,onAccounts:t})}else{const t=c.ethErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>n(t)})}S.accountRequestCallbackIds.add(e),this.ui.inlineAccountsResponse()||this.ui.isStandalone()||this.publishWeb3RequestEvent(e,t)}})),cancel:n}}selectProvider(t){const e={method:w.Web3Method.selectProvider,params:{providerOptions:t}},n=(0,y.randomBytesHex)(8);return{cancel:t=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,t)},promise:new Promise(((e,r)=>{this.relayEventManager.callbacks.set(n,(t=>{if(t.errorMessage)return r(new Error(t.errorMessage));e(t)})),this.ui.selectProvider&&this.ui.selectProvider({onApprove:t=>{this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:n,response:(0,E.SelectProviderResponse)(t)}))},onCancel:t=>{this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:n,response:(0,E.SelectProviderResponse)(m.ProviderType.Unselected)}))},providerOptions:t})}))}}watchAsset(t,e,n,r,i,o){const a={method:w.Web3Method.watchAsset,params:{type:t,options:{address:e,symbol:n,decimals:r,image:i},chainId:o}};let s=null;const u=(0,y.randomBytesHex)(8),c=t=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,a.method,t),null==s||s()};return this.ui.inlineWatchAsset()||(s=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:c,onResetConnection:this.resetAndReload})),{cancel:c,promise:new Promise(((c,l)=>{this.relayEventManager.callbacks.set(u,(t=>{if(null==s||s(),t.errorMessage)return l(new Error(t.errorMessage));c(t)}));this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:()=>{this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:u,response:(0,E.WatchAssetReponse)(!0)}))},onCancel:t=>{this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:u,response:(0,E.WatchAssetReponse)(!1)}))},type:t,address:e,symbol:n,decimals:r,image:i,chainId:o}),this.ui.inlineWatchAsset()||this.ui.isStandalone()||this.publishWeb3RequestEvent(u,a)}))}}addEthereumChain(t,e,n,r,i,o){const a={method:w.Web3Method.addEthereumChain,params:{chainId:t,rpcUrls:e,blockExplorerUrls:r,chainName:i,iconUrls:n,nativeCurrency:o}};let s=null;const u=(0,y.randomBytesHex)(8),c=t=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,a.method,t),null==s||s()};return this.ui.inlineAddEthereumChain(t)||(s=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:c,onResetConnection:this.resetAndReload})),{promise:new Promise(((e,n)=>{this.relayEventManager.callbacks.set(u,(t=>{if(null==s||s(),t.errorMessage)return n(new Error(t.errorMessage));e(t)}));this.ui.inlineAddEthereumChain(t)&&this.ui.addEthereumChain({onCancel:t=>{this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:u,response:(0,E.AddEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:t=>{this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:u,response:(0,E.AddEthereumChainResponse)({isApproved:!0,rpcUrl:t})}))},chainId:a.params.chainId,rpcUrls:a.params.rpcUrls,blockExplorerUrls:a.params.blockExplorerUrls,chainName:a.params.chainName,iconUrls:a.params.iconUrls,nativeCurrency:a.params.nativeCurrency}),this.ui.inlineAddEthereumChain(t)||this.ui.isStandalone()||this.publishWeb3RequestEvent(u,a)})),cancel:c}}switchEthereumChain(t){const e={method:w.Web3Method.switchEthereumChain,params:{chainId:t}};let n=null;const r=(0,y.randomBytesHex)(8),i=t=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,e.method,t),null==n||n()};return this.ui.inlineSwitchEthereumChain()||(n=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload})),{promise:new Promise(((t,i)=>{this.relayEventManager.callbacks.set(r,(e=>(null==n||n(),e.errorMessage&&e.errorCode?i(c.ethErrors.provider.custom({code:e.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):e.errorMessage?i(new Error(e.errorMessage)):void t(e)))),this.ui.switchEthereumChain({onCancel:t=>{if("number"==typeof t){const e=t;this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:r,response:(0,E.ErrorResponse)(w.Web3Method.switchEthereumChain,p.WalletUIError.SwitchEthereumChainUnsupportedChainId.message,e)}))}else t instanceof p.WalletUIError?this.handleErrorResponse(r,w.Web3Method.switchEthereumChain,t,t.errorCode):this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:r,response:(0,E.SwitchEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:t=>{this.handleWeb3ResponseMessage((0,A.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 b.Session.hash(this._session.id)}sendRequestStandalone(t,e){const n=n=>{this.handleErrorResponse(t,e.method,n)},r=e=>{this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:t,response:e}))};switch(e.method){case w.Web3Method.signEthereumMessage:this.ui.signEthereumMessage({request:e,onSuccess:r,onCancel:n});break;case w.Web3Method.signEthereumTransaction:this.ui.signEthereumTransaction({request:e,onSuccess:r,onCancel:n});break;case w.Web3Method.submitEthereumTransaction:this.ui.submitEthereumTransaction({request:e,onSuccess:r,onCancel:n});break;case w.Web3Method.ethereumAddressFromSignedMessage:this.ui.ethereumAddressFromSignedMessage({request:e,onSuccess:r});break;default:n()}}onSessionConfigChanged(t){}}S.accountRequestCallbackIds=new Set,o([u.default],S.prototype,"resetAndReload",null),o([u.default],S.prototype,"handleIncomingEvent",null),e.WalletSDKRelay=S},function(t,e,n){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},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKConnection=void 0;const r=n(48),i=n(69),o=n(90),a=n(68),s=n(213),u=n(89),c=n(214),l=n(215);e.WalletSDKConnection=class{constructor(t,e,n,s,l=WebSocket){this.sessionId=t,this.sessionKey=e,this.diagnostic=s,this.subscriptions=new r.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,a.IntNumber)(1),this.connectedSubject=new r.BehaviorSubject(!1),this.linkedSubject=new r.BehaviorSubject(!1),this.sessionConfigSubject=new r.ReplaySubject(1);const h=new c.RxWebSocket(n+"/rpc",l);this.ws=h,this.subscriptions.add(h.connectionState$.pipe((0,i.tap)((e=>{var n;return null===(n=this.diagnostic)||void 0===n?void 0:n.log(u.EVENTS.CONNECTED_STATE_CHANGE,{state:e,sessionIdHash:o.Session.hash(t)})})),(0,i.skip)(1),(0,i.filter)((t=>t===c.ConnectionState.DISCONNECTED&&!this.destroyed)),(0,i.delay)(5e3),(0,i.filter)((t=>!this.destroyed)),(0,i.flatMap)((t=>h.connect())),(0,i.retry)()).subscribe()),this.subscriptions.add(h.connectionState$.pipe((0,i.skip)(2),(0,i.switchMap)((t=>(0,r.iif)((()=>t===c.ConnectionState.CONNECTED),this.authenticate().pipe((0,i.tap)((t=>this.sendIsLinked())),(0,i.tap)((t=>this.sendGetSessionConfig())),(0,i.map)((t=>!0))),(0,r.of)(!1)))),(0,i.distinctUntilChanged)(),(0,i.catchError)((t=>(0,r.of)(!1)))).subscribe((t=>this.connectedSubject.next(t)))),this.subscriptions.add(h.connectionState$.pipe((0,i.skip)(1),(0,i.switchMap)((t=>(0,r.iif)((()=>t===c.ConnectionState.CONNECTED),(0,r.timer)(0,1e4))))).subscribe((t=>0===t?this.updateLastHeartbeat():this.heartbeat()))),this.subscriptions.add(h.incomingData$.pipe((0,i.filter)((t=>"h"===t))).subscribe((t=>this.updateLastHeartbeat()))),this.subscriptions.add(h.incomingJSONData$.pipe((0,i.filter)((t=>["IsLinkedOK","Linked"].includes(t.type)))).subscribe((e=>{var n;const r=e;null===(n=this.diagnostic)||void 0===n||n.log(u.EVENTS.LINKED,{sessionIdHash:o.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.diagnostic)||void 0===n||n.log(u.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:o.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.diagnostic)||void 0===t||t.log(u.EVENTS.STARTED_CONNECTING,{sessionIdHash:o.Session.hash(this.sessionId)}),this.ws.connect().subscribe()}destroy(){var t;this.subscriptions.unsubscribe(),this.ws.disconnect(),null===(t=this.diagnostic)||void 0===t||t.log(u.EVENTS.DISCONNECTED,{sessionIdHash:o.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,s.ClientMessageSetSessionConfig)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId,metadata:{[t]:e}});return this.onceConnected$.pipe((0,i.flatMap)((t=>this.makeRequest(n))),(0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to set session metadata")})))}publishEvent(t,e,n=!1){const r=(0,s.ClientMessagePublishEvent)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId,event:t,data:e,callWebhook:n});return this.onceLinked$.pipe((0,i.flatMap)((t=>this.makeRequest(r))),(0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to publish event");return t.eventId})))}sendData(t){this.ws.sendData(JSON.stringify(t))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>2e4)this.ws.disconnect();else try{this.ws.sendData("h")}catch(t){}}makeRequest(t,e=6e4){const n=t.id;try{this.sendData(t)}catch(t){return(0,r.throwError)(t)}return this.ws.incomingJSONData$.pipe((0,i.timeoutWith)(e,(0,r.throwError)(new Error(`request ${n} timed out`))),(0,i.filter)((t=>t.id===n)),(0,i.take)(1))}authenticate(){const t=(0,s.ClientMessageHostSession)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId,sessionKey:this.sessionKey});return this.makeRequest(t).pipe((0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to authentcate")})))}sendIsLinked(){const t=(0,s.ClientMessageIsLinked)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(t)}sendGetSessionConfig(){const t=(0,s.ClientMessageGetSessionConfig)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(t)}}},function(t,e,n){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)}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.RxWebSocket=e.ConnectionState=void 0;const r=n(48),i=n(69);var o;!function(t){t[t.DISCONNECTED=0]="DISCONNECTED",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED"}(o=e.ConnectionState||(e.ConnectionState={})),e.RxWebSocket=class{constructor(t,e=WebSocket){this.WebSocketClass=e,this.webSocket=null,this.connectionStateSubject=new r.BehaviorSubject(o.DISCONNECTED),this.incomingDataSubject=new r.Subject,this.url=t.replace(/^http/,"ws")}connect(){return this.webSocket?(0,r.throwError)(new Error("webSocket object is not null")):new r.Observable((t=>{let e;try{this.webSocket=e=new this.WebSocketClass(this.url)}catch(e){return void t.error(e)}this.connectionStateSubject.next(o.CONNECTING),e.onclose=e=>{this.clearWebSocket(),t.error(new Error(`websocket error ${e.code}: ${e.reason}`)),this.connectionStateSubject.next(o.DISCONNECTED)},e.onopen=e=>{t.next(),t.complete(),this.connectionStateSubject.next(o.CONNECTED)},e.onmessage=t=>{this.incomingDataSubject.next(t.data)}})).pipe((0,i.take)(1))}disconnect(){const{webSocket:t}=this;if(t){this.clearWebSocket(),this.connectionStateSubject.next(o.DISCONNECTED);try{t.close()}catch(t){}}}get connectionState$(){return this.connectionStateSubject.asObservable()}get incomingData$(){return this.incomingDataSubject.asObservable()}get incomingJSONData$(){return this.incomingData$.pipe((0,i.flatMap)((t=>{let e;try{e=JSON.parse(t)}catch(t){return(0,r.empty)()}return(0,r.of)(e)})))}sendData(t){const{webSocket:e}=this;if(!e)throw new Error("websocket is not connected");e.send(t)}clearWebSocket(){const{webSocket:t}=this;t&&(this.webSocket=null,t.onclose=null,t.onerror=null,t.onmessage=null,t.onopen=null)}}},function(t,e,n){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}},function(t,e,n){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)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.decrypt=e.encrypt=void 0;const r=n(48),i=n(38);e.encrypt=async function(t,e){if(64!==e.length)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),r=await crypto.subtle.importKey("raw",(0,i.hexStringToUint8Array)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=new TextEncoder,a=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},r,o.encode(t)),s=a.slice(a.byteLength-16),u=a.slice(0,a.byteLength-16),c=new Uint8Array(s),l=new Uint8Array(u),h=new Uint8Array([...n,...c,...l]);return(0,i.uint8ArrayToHex)(h)},e.decrypt=function(t,e){if(64!==e.length)throw Error("secret must be 256 bits");return new r.Observable((n=>{!async function(){const r=await crypto.subtle.importKey("raw",(0,i.hexStringToUint8Array)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,i.hexStringToUint8Array)(t),a=o.slice(0,12),s=o.slice(12,28),u=o.slice(28),c=new Uint8Array([...u,...s]),l={name:"AES-GCM",iv:new Uint8Array(a)};try{const t=await window.crypto.subtle.decrypt(l,r,c),e=new TextDecoder;n.next(e.decode(t)),n.complete()}catch(t){n.error(t)}}()}))}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.Web3RequestCanceledMessage=void 0;const r=n(100);e.Web3RequestCanceledMessage=function(t){return{type:r.RelayMessageType.WEB3_REQUEST_CANCELED,id:t}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.Web3RequestMessage=void 0;const r=n(100);e.Web3RequestMessage=function(t){return Object.assign({type:r.RelayMessageType.WEB3_REQUEST},t)}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumAddressFromSignedMessageResponse=e.SubmitEthereumTransactionResponse=e.SignEthereumTransactionResponse=e.SignEthereumMessageResponse=e.isRequestEthereumAccountsResponse=e.SelectProviderResponse=e.WatchAssetReponse=e.RequestEthereumAccountsResponse=e.SwitchEthereumChainResponse=e.AddEthereumChainResponse=e.ErrorResponse=void 0;const r=n(125);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.SelectProviderResponse=function(t){return{method:r.Web3Method.selectProvider,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}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.isWeb3ResponseMessage=e.Web3ResponseMessage=void 0;const r=n(100);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}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelayEventManager=void 0;const r=n(38);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}}},function(t){t.exports=JSON.parse('{"name":"@coinbase/wallet-sdk","version":"3.4.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","buffer":"^6.0.3","clsx":"^1.1.0","eth-block-tracker":"4.4.3","eth-json-rpc-filters":"4.2.2","eth-rpc-errors":"4.0.2","json-rpc-engine":"6.1.0","keccak":"^3.0.1","preact":"^10.5.9","qs":"^6.10.3","rxjs":"^6.6.3","sha.js":"^2.4.11","stream-browserify":"^3.0.0","util":"^0.12.4"},"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","@types/sha.js":"^2.4.0","@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","jest-websocket-mock":"^2.3.0","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"}}')},function(t,e,n){function r(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function i(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}n.r(e),n.d(e,"Mutex",(function(){return a})),n.d(e,"Semaphore",(function(){return o})),n.d(e,"withTimeout",(function(){return s}));var o=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}(),a=function(){function t(){this._semaphore=new o(1)}return t.prototype.acquire=function(){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this._semaphore.acquire()];case 1:return[2,t.sent()[1]]}}))}))},t.prototype.runExclusive=function(t){return this._semaphore.runExclusive((function(){return t()}))},t.prototype.isLocked=function(){return this._semaphore.isLocked()},t.prototype.release=function(){this._semaphore.release()},t}();function s(t,e,n){var o=this;return void 0===n&&(n=new Error("timeout")),{acquire:function(){return new Promise((function(a,s){return r(o,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return r=!1,setTimeout((function(){r=!0,s(n)}),e),[4,t.acquire()];case 1:return o=i.sent(),r?(Array.isArray(o)?o[1]:o)():a(o),[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()}}}}]);void 0===TH&&console.error("esm-webpack-plugin: nothing exported!"),TH.CoinbaseWalletProvider;const xH=TH.CoinbaseWalletSDK;class LH{constructor({blockchain:t,from:e,to:n,value:r,api:i,method:o,params:a,instructions:s,sent:u,succeeded:c,failed:l}){this.blockchain=t,this.from=e&&e.match("0x")?cp(e):e,this.to=n&&n.match("0x")?cp(n):n,this.value=function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([LH,"access",t=>t.bigNumberify,"call",e=>e(r,t),"optionalAccess",t=>t.toString,"call",t=>t()]),this.api=i,this.method=o,this.params=a,this.sent=u,this.succeeded=c,this.failed=l,this.instructions=s,this._succeeded=!1,this._failed=!1}async prepare({wallet:t}){this.from=await t.account()}static bigNumberify(t,e){return"number"==typeof t?BM(t.toString(),UM[e].DECIMALS):t&&t.toString?Wd.from(t.toString()):t}getContractArguments(){let t=this.getContract().interface.fragments.find((t=>t.name==this.method));return this.params instanceof Array?this.params:this.params instanceof Object?t.inputs.map((t=>this.params[t.name])):void 0}getContract(){return new bw(this.to,this.api)}async getData(){let t,e=this.getContractArguments();return t=e?await this.getContract().populateTransaction[this.method].apply(null,e):await this.getContract().populateTransaction[this.method].apply(null),t.data}success(){return this._succeeded?Promise.resolve(this):new Promise(((t,e)=>{let n=this.succeeded;this.succeeded=e=>{n&&n(e),t(e)}}))}failure(){return this._failed?Promise.resolve(this):new Promise(((t,e)=>{let n=this.failed;this.failed=(e,r)=>{n&&n(e,r),t(e,r)}}))}}let IH=["ethereum","bsc","polygon","velas"];IH.evm=["ethereum","bsc","polygon","velas"],IH.solana=[];class jH extends IM{constructor(t,e,n){super(t),this._network=e,this._endpoint=t,this._endpoints=n}detectNetwork(){return Promise.resolve(qh(this._network).id)}requestChunk(t,e){const n=t.map((t=>t.request));return Ow(e,JSON.stringify(n)).then((e=>{t.forEach(((t,n)=>{const r=e[n];if(r.error){const e=new Error(r.error.message);e.code=r.error.code,e.data=r.error.data,t.reject(e)}else t.resolve(r.result)}))})).catch((e=>{if(e&&"SERVER_ERROR"==e.code){const e=this._endpoints.indexOf(this._endpoint)+1;this._endpoint=e>=this._endpoints.length?this._endpoints[0]:this._endpoints[e],this.requestChunk(t,this._endpoint)}else t.forEach((t=>{t.reject(e)}))}))}send(t,e){const n={method:t,params:e,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const r={request:n,resolve:null,reject:null},i=new Promise(((t,e)=>{r.resolve=t,r.reject=e}));return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const t=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const e=[];for(let n=0;n<Math.ceil(t.length/99);n++)e[n]=t.slice(99*n,99*(n+1));e.forEach((t=>(t.map((t=>t.request)),this.requestChunk(t,this._endpoint))))}),10)),i}}let CH=()=>"object"==typeof fh?fh:window;const DH={ethereum:["https://rpc.ankr.com/eth","https://eth-mainnet-public.unifra.io","https://ethereum.publicnode.com"],bsc:["https://bsc-dataseed.binance.org","https://bsc-dataseed1.ninicoin.io","https://bsc-dataseed3.defibit.io"],polygon:["https://polygon-rpc.com","https://poly-rpc.gateway.pokt.network","https://matic-mainnet.chainstacklabs.com"],velas:["https://mainnet.velas.com/rpc","https://evmexplorer.velas.com/rpc","https://explorer.velas.com/rpc"]},OH=()=>(null==CH()._clientProviders&&(CH()._clientProviders={}),CH()._clientProviders),PH=(t,e)=>{OH()[t]=e},zH=async(t,e)=>{let n,r=CH();if(null==r.fetch||void 0!==Rh&&Rh.env&&"test"==Rh.env.NODE_ENV||void 0!==r.cy)n=e[0];else{let t=await Promise.all(e.map((t=>new Promise((async e=>{let n=(new Date).getTime();setTimeout((()=>e(900)),900);if(!(await fetch(t,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({method:"net_version",id:1,jsonrpc:"2.0"})})).ok)return e(999);let r=(new Date).getTime();e(r-n)})))));const r=Math.min(...t);n=e[t.indexOf(r)]}PH(t,new jH(n,t,e))};var RH=async t=>{let e=OH();if(e&&e[t])return e[t];let n=CH();return n._getProviderPromise&&n._getProviderPromise[t]||(n._getProviderPromise||(n._getProviderPromise={}),n._getProviderPromise[t]=new Promise((async e=>{await zH(t,DH[t]),e(CH()._clientProviders[t])}))),await n._getProviderPromise[t]};let BH=()=>(null==CH()._cacheStore&&FH(),CH()._cacheStore),UH=()=>(null==CH()._promiseStore&&FH(),CH()._promiseStore),FH=()=>{CH()._cacheStore={},CH()._promiseStore={},CH()._clientProviders={}},YH=function({key:t}){UH()[t]=void 0},QH=function({call:t,key:e,expires:n=0}){return new Promise(((r,i)=>{let o,a=function({key:t}){return UH()[t]}({key:e=JSON.stringify(e)});if(a)return a.then(r).catch(i);(function({key:t,promise:e}){return UH()[t]=e,e})({key:e,promise:new Promise(((a,s)=>0===n?t().then((t=>{r(t),a(t)})).catch((t=>{i(t),s(t)})):(o=function({key:t,expires:e}){let n=BH()[t];if(function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([n,"optionalAccess",t=>t.expiresAt])>Date.now())return n.value}({key:e,expires:n}),o?(r(o),a(o),o):void t().then((t=>{t&&function({key:t,value:e,expires:n}){BH()[t]={expiresAt:Date.now()+n,value:e}}({key:e,value:t,expires:n}),r(t),a(t)})).catch((t=>{i(t),s(t)})))))}).then((()=>{YH({key:e})})).catch((()=>{YH({key:e})}))}))};let WH=({address:t,api:e,method:n,params:r,provider:i,block:o})=>{let a=new bw(t,e,i),s=(({contract:t,method:e,params:n})=>t.interface.fragments.find((t=>t.name==e)).inputs.map(((t,e)=>Array.isArray(n)?n[e]:n[t.name])))({contract:a,method:n,params:r});return a[n](...s,{blockTag:o})};let HH=async function(t,e){let{blockchain:n,address:r,method:i}=(t=>{if("object"==typeof t)return t;let e=t.match(/(?<blockchain>\w+):\/\/(?<part1>[\w\d]+)(\/(?<part2>[\w\d]+)*)?/);return null==e.groups.part2?e.groups.part1.match(/\d/)?{blockchain:e.groups.blockchain,address:e.groups.part1}:{blockchain:e.groups.blockchain,method:e.groups.part1}:{blockchain:e.groups.blockchain,address:e.groups.part1,method:e.groups.part2}})(t),{api:o,params:a,cache:s,block:u}=("object"==typeof t?t:e)||{};return await QH({expires:s||0,key:[n,r,i,a,u],call:async()=>{if(IH.evm.includes(n))return(async({blockchain:t,address:e,api:n,method:r,params:i,block:o})=>{const a=await RH(t);return n?WH({address:e,api:n,method:r,params:i,provider:a,block:o}):"latestBlockNumber"===r?a.getBlockNumber():"balance"===r?(({address:t,provider:e})=>e.getBalance(t))({address:e,provider:a}):"transactionCount"===r?(({address:t,provider:e})=>e.getTransactionCount(t))({address:e,provider:a}):void 0})({blockchain:n,address:r,api:o,method:i,params:a,block:u});throw"Unknown blockchain: "+n}})};const GH=({transaction:t,provider:e,signer:n})=>t.method?qH({transaction:t,signer:n,provider:e}):ZH({transaction:t,signer:n}),qH=({transaction:t,signer:e,provider:n})=>{let r=new bw(t.to,t.api,n),i=t.getContractArguments({contract:r}),o=r.connect(e)[t.method];return i?o(...i,{value:LH.bigNumberify(t.value,t.blockchain)}):o({value:LH.bigNumberify(t.value,t.blockchain)})},ZH=({transaction:t,signer:e})=>e.sendTransaction({to:t.to,value:LH.bigNumberify(t.value,t.blockchain)});let VH=["ethereum","bsc","polygon","velas"];function JH(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}VH.evm=["ethereum","bsc","polygon","velas"],VH.solana=[];class KH{static __initStatic(){this.info={name:"Wallet (Ethereum)",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA0NDYuNCAzNzYuOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDQ2LjQgMzc2Ljg7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojODI4NDg3O30KCS5zdDF7ZmlsbDojMzQzNDM0O30KCS5zdDJ7ZmlsbDojOEM4QzhDO30KCS5zdDN7ZmlsbDojM0MzQzNCO30KCS5zdDR7ZmlsbDojMTQxNDE0O30KCS5zdDV7ZmlsbDojMzkzOTM5O30KPC9zdHlsZT4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTM4MS43LDExMC4yaDY0LjdWNDYuNWMwLTI1LjctMjAuOC00Ni41LTQ2LjUt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IvPgo8ZyBpZD0iTGF5ZXJfeDAwMjBfMSI+Cgk8ZyBpZD0iXzE0MjEzOTQzNDI0MDAiPgoJCTxnPgoJCQk8cG9seWdvbiBjbGFzcz0ic3QxIiBwb2ludHM9IjEyOSwxNjYuMiAxMjguNywxNjcuMyAxMjguNywyMDEuNCAxMjksMjAxLjcgMTQ0LjgsMTkyLjQgCQkJIi8+CgkJCTxwb2x5Z29uIGNsYXNzPSJzdDIiIHBvaW50cz0iMTI5LDE2Ni4yIDExMy4yLDE5Mi40IDEyOSwyMDEuNyAxMjksMTg1LjIgCQkJIi8+CgkJCTxwb2x5Z29uIGNsYXNzPSJzdDMiIHBvaW50cz0iMTI5LDIwNC43IDEyOC44LDIwNC45IDEyOC44LDIxNyAxMjksMjE3LjYgMTQ0LjgsMTk1LjQgCQkJIi8+CgkJCTxwb2x5Z29uIGNsYXNzPSJzdDIiIHBvaW50cz0iMTI5LDIxNy42IDEyOSwyMDQuNyAxMTMuMiwxOTUuNCAJCQkiLz4KCQkJPHBvbHlnb24gY2xhc3M9InN0NCIgcG9pbnRzPSIxMjksMjAxLjcgMTQ0LjgsMTkyLjQgMTI5LDE4NS4yIAkJCSIvPgoJCQk8cG9seWdvbiBjbGFzcz0ic3Q1IiBwb2ludHM9IjExMy4yLDE5Mi40IDEyOSwyMDEuNyAxMjksMTg1LjIgCQkJIi8+CgkJPC9nPgoJPC9nPgo8L2c+Cjwvc3ZnPgo=",blockchains:VH.evm}}static __initStatic2(){this.isAvailable=()=>JH([window,"optionalAccess",t=>t.ethereum])&&!JH([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isMetaMask])&&!(JH([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isCoinbaseWallet])||JH([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isWalletLink]))}constructor(){this.name=this.constructor.info.name,this.logo=this.constructor.info.logo,this.blockchains=this.constructor.info.blockchains,this.sendTransaction=t=>(async({transaction:t,wallet:e})=>{if(t=new LH(t),0==await e.connectedTo(t.blockchain)&&await e.switchTo(t.blockchain),0==await e.connectedTo(t.blockchain))throw{code:"WRONG_NETWORK"};await t.prepare({wallet:e});let n=await HH({blockchain:t.blockchain,method:"transactionCount",address:t.from});t.nonce=n;let r=new OM(window.ethereum,"any"),i=r.getSigner(0);return await GH({transaction:t,provider:r,signer:i}).then((e=>{if(!e)throw"Submitting transaction failed!";t.id=e.hash,t.nonce=e.nonce||n,t.url=qh(t.blockchain).explorerUrlFor({transaction:t}),t.sent&&t.sent(t),e.wait(1).then((()=>{t._succeeded=!0,t.succeeded&&t.succeeded(t)})).catch((e=>{e&&e.code&&"TRANSACTION_REPLACED"==e.code?(e.replacement&&e.replacement.hash&&(t.id=e.replacement.hash,t.url=qh(t.blockchain).explorerUrlFor({transaction:t})),e.replacement&&e.replacement.hash&&e.receipt&&1==e.receipt.status?(t._succeeded=!0,t.succeeded&&t.succeeded(t)):e.replacement&&e.replacement.hash&&e.receipt&&0==e.receipt.status&&(t._failed=!0,t.failed&&t.failed(t,e))):(t._failed=!0,t.failed&&t.failed(t,e))}))})),t})({wallet:this,transaction:t})}async account(){if(!JH([window,"optionalAccess",t=>t.ethereum]))return;return(await window.ethereum.request({method:"eth_accounts"})).map((t=>cp(t)))[0]}async connect(){if(!JH([window,"optionalAccess",t=>t.ethereum]))return;return(await window.ethereum.request({method:"eth_requestAccounts"})).map((t=>cp(t)))[0]}on(t,e){let n;if("account"===t)n=t=>e(cp(t[0])),window.ethereum.on("accountsChanged",n);return n}off(t,e){if("account"===t)window.ethereum.removeListener("accountsChanged",e);return e}async connectedTo(t){const e=Hh(await window.ethereum.request({method:"eth_chainId"}));return t?t===e.name:e.name}addNetwork(t){return new Promise(((e,n)=>{const r=qh(t);window.ethereum.request({method:"wallet_addEthereumChain",params:[{chainId:r.id,chainName:r.fullName,nativeCurrency:{name:r.currency.name,symbol:r.currency.symbol,decimals:r.currency.decimals},rpcUrls:[r.rpc],blockExplorerUrls:[r.explorer],iconUrls:[r.logo]}]}).then(e).catch(n)}))}switchTo(t){return new Promise(((e,n)=>{const r=qh(t);window.ethereum.request({method:"wallet_switchEthereumChain",params:[{chainId:r.id}]}).then(e).catch((r=>{4902===r.code?this.addNetwork(t).then((()=>this.switchTo(t).then(e))).catch(n):n(r)}))}))}async sign(t){await this.account();let e=new OM(window.ethereum,"any").getSigner(0);return await e.signMessage(t)}}function XH(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}KH.__initStatic(),KH.__initStatic2();class $H extends KH{static __initStatic(){this.info={name:"Coinbase",logo:"data:image/svg+xml;base64,PHN2ZyBpZD0nTGF5ZXJfMScgZGF0YS1uYW1lPSdMYXllciAxJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHhtbG5zOnhsaW5rPSdodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rJyB2aWV3Qm94PScwIDAgNDg4Ljk2IDQ4OC45Nic+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50KTt9LmNscy0ye2ZpbGw6IzQzNjFhZDt9PC9zdHlsZT48bGluZWFyR3JhZGllbnQgaWQ9J2xpbmVhci1ncmFkaWVudCcgeDE9JzI1MCcgeTE9JzcuMzUnIHgyPScyNTAnIHkyPSc0OTYuMzInIGdyYWRpZW50VHJhbnNmb3JtPSdtYXRyaXgoMSwgMCwgMCwgLTEsIDAsIDUwMiknIGdyYWRpZW50VW5pdHM9J3VzZXJTcGFjZU9uVXNlJz48c3RvcCBvZmZzZXQ9JzAnIHN0b3AtY29sb3I9JyMzZDViYTknLz48c3RvcCBvZmZzZXQ9JzEnIHN0b3AtY29sb3I9JyM0ODY4YjEnLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cGF0aCBjbGFzcz0nY2xzLTEnIGQ9J00yNTAsNS42OEMxMTQuODcsNS42OCw1LjUyLDExNSw1LjUyLDI1MC4xN1MxMTQuODcsNDk0LjY1LDI1MCw0OTQuNjUsNDk0LjQ4LDM4NS4yOSw0OTQuNDgsMjUwLjE3LDM4NS4xMyw1LjY4LDI1MCw1LjY4Wm0wLDM4Ny41NEExNDMuMDYsMTQzLjA2LDAsMSwxLDM5My4wNSwyNTAuMTcsMTQzLjExLDE0My4xMSwwLDAsMSwyNTAsMzkzLjIyWicgdHJhbnNmb3JtPSd0cmFuc2xhdGUoLTUuNTIgLTUuNjgpJy8+PHBhdGggY2xhc3M9J2Nscy0yJyBkPSdNMjg0LjY5LDI5Ni4wOUgyMTUuMzFhMTEsMTEsMCwwLDEtMTAuOS0xMC45VjIxNS40OGExMSwxMSwwLDAsMSwxMC45LTEwLjkxSDI4NWExMSwxMSwwLDAsMSwxMC45LDEwLjkxdjY5LjcxQTExLjA3LDExLjA3LDAsMCwxLDI4NC42OSwyOTYuMDlaJyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgtNS41MiAtNS42OCknLz48L3N2Zz4=",blockchains:["ethereum","bsc","polygon","velas"]}}static __initStatic2(){this.isAvailable=()=>XH([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isCoinbaseWallet])||XH([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isWalletLink])}}$H.__initStatic(),$H.__initStatic2();class tG extends KH{static __initStatic(){this.info={name:"MetaMask",logo:"data:image/svg+xml;base64,PHN2ZyBpZD0nTGF5ZXJfMScgZGF0YS1uYW1lPSdMYXllciAxJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA0ODUuOTMgNDUwLjU2Jz48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6IzgyODQ4Nzt9LmNscy0ye2ZpbGw6I2UyNzcyNjtzdHJva2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I0IDU4LjEyIDE3OC44OCA1OC4xMiAyMDcuNDEgMTM2LjI4IDIxNC4wNiAyNDYuMDEgMjE2LjM0IDI4MC42MiAyMTYuNTMgMzY1LjgyIDI2OS4yMSAzNjUuODIgMjY5LjU5IDI4MC42MiAyNzIuMDYgMjQ2LjAxJy8+PC9zdmc+",blockchains:["ethereum","bsc","polygon","velas"]}}static __initStatic2(){this.isAvailable=()=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isMetaMask])}}function eG(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}tG.__initStatic(),tG.__initStatic2();const nG=({transaction:t,wallet:e})=>t.instructions?iG({transaction:t,wallet:e}):rG({transaction:t,wallet:e}),rG=async({transaction:t,wallet:e})=>{let n=new JU(await e.account()),r=new JU(t.to);const i=await AH(t.blockchain);let o=(await i.getLatestBlockhash()).blockhash,a=new fF({recentBlockhash:o,feePayer:n});return a.add(DF.transfer({fromPubkey:n,toPubkey:r,lamports:parseInt(LH.bigNumberify(t.value,t.blockchain),10)})),window.solana.signAndSendTransaction(a)},iG=async({transaction:t,wallet:e})=>{let n=new JU(await e.account());const r=await AH(t.blockchain);let i=(await r.getLatestBlockhash()).blockhash,o=new fF({recentBlockhash:i,feePayer:n});return t.instructions.forEach((t=>{o.add(t)})),window.solana.signAndSendTransaction(o)};let oG=["ethereum","bsc","polygon","solana","velas"];function aG(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}oG.evm=["ethereum","bsc","polygon","velas"],oG.solana=["solana"];class sG{static __initStatic(){this.info={name:"Wallet (Solana)",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA0NDYuNCAzNzYuOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDQ2LjQgMzc2Ljg7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojODI4NDg3O30KCS5zdDF7ZmlsbDp1cmwoI1NWR0lEXzFfKTt9Cgkuc3Qye2ZpbGw6dXJsKCNTVkdJRF8wMDAwMDE2NTIzNDE5NTQ5NTc2MDU4MDgwMDAwMDAwNjMwMzAwNDA2OTM1MjExODk1MV8pO30KCS5zdDN7ZmlsbDp1cmwoI1NWR0lEXzAwMDAwMDkyNDIyMzgxNjc5OTg1OTI5MTcwMDAwMDA2ODU0NzIyMTYxOTE4MTIzNjUzXyk7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMzgxLjcsMT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LDE4OS4xeiIvPgo8L3N2Zz4K",blockchains:oG.solana}}static __initStatic2(){this.isAvailable=()=>aG([window,"optionalAccess",t=>t.solana])&&!aG([window,"optionalAccess",t=>t.solana,"optionalAccess",t=>t.isPhantom])}constructor(){this.name=this.constructor.info.name,this.logo=this.constructor.info.logo,this.blockchains=this.constructor.info.blockchains,this.sendTransaction=t=>(async({transaction:t,wallet:e})=>(t=new LH(t),await t.prepare({wallet:e}),await nG({transaction:t,wallet:e}).then((({signature:e})=>{if(!e)throw"Submitting transaction failed!";{t.id=e,t.url=qh(t.blockchain).explorerUrlFor({transaction:t}),t.sent&&t.sent(t);let n=0;const r=setInterval((async()=>{if(n++,n>=240)return clearInterval(r);const i=await AH(t.blockchain),{value:o}=await i.getSignatureStatus(e),a=eG([o,"optionalAccess",t=>t.confirmationStatus]);if(a&&("confirmed"===a||"finalized"===a)){if(o.err){t._failed=!0;const n=await i.getConfirmedTransaction(e),r=eG([n,"optionalAccess",t=>t.meta,"optionalAccess",t=>t.logMessages])?n.meta.logMessages[n.meta.logMessages.length-1]:null;t.failed&&t.failed(t,r)}else t._succeeded=!0,t.succeeded&&t.succeeded(t);return clearInterval(r)}}),500)}})),t))({wallet:this,transaction:t})}async account(){if(null!=aG([window,"optionalAccess",t=>t.solana])){if(aG([window,"optionalAccess",t=>t.solana,"optionalAccess",t=>t.publicKey]))return window.solana.publicKey.toString();if(1!=aG([window,"optionalAccess",t=>t.solana,"optionalAccess",t=>t.isBraveWallet])){let t;try{({publicKey:t}=await window.solana.connect({onlyIfTrusted:!0}))}catch(t){}if(t)return t.toString()}}}async connect(){if(!aG([window,"optionalAccess",t=>t.solana]))return;let{publicKey:t}=await window.solana.connect();return t.toString()}on(t,e){let n;if("account"===t)n=t=>e(aG([t,"optionalAccess",t=>t.toString,"call",t=>t()])),window.solana.on("accountChanged",n);return n}off(t,e){if("account"===t)console.log("removeListener"),window.solana.removeListener("accountChanged",e);return e}async connectedTo(t){return"solana"==t}switchTo(t){return new Promise(((t,e)=>{e({code:"NOT_SUPPORTED"})}))}addNetwork(t){return new Promise(((t,e)=>{e({code:"NOT_SUPPORTED"})}))}async sign(t){const e=(new TextEncoder).encode(t),n=await window.solana.signMessage(e,"utf8");return JSON.stringify(n.signature)}}sG.__initStatic(),sG.__initStatic2();class uG extends sG{static __initStatic(){this.info={name:"Phantom",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iNjQiIGN5PSI2NCIgcj0iNjQiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcikiLz48cGF0aCBkPSJNMTEwLjU4NCA2NC45MTQySDk5LjE0MkM5OS4xNDIgNDEuNzY1MSA4MC4xNzMgMjMgNTYuNzcyNCAyM0MzMy42NjEyIDIzIDE0Ljg3MTYgNDEuMzA1NyAxNC40MTE4IDY0LjA1ODNDMTMuOTM2IDg3LjU3NyAzNi4yNDEgMTA4IDYwLjAxODYgMTA4SDYzLjAwOTRDODMuOTcyMyAxMDggMTEyLjA2OSA5MS43NjY3IDExNi40NTkgNzEuOTg3NEMxMTcuMjcgNjguMzQxMyAxMTQuMzU4IDY0LjkxNDIgMTEwLjU4NCA2NC45MTQyWk0zOS43Njg5IDY1Ljk0NTRDMzkuNzY4OSA2OS4wNDExIDM3LjIwOTUgNzEuNTcyOSAzNC4wODAyIDcxLjU3MjlDMzAuOTUwOSA3MS41NzI5IDI4LjM5MTYgNjkuMDM5OSAyOC4zOTE2IDY1Ljk0NTRWNTYuODQxNEMyOC4zOTE2IDUzLjc0NTcgMzAuOTUwOSA1MS4yMTM5IDM0LjA4MDIgNTEuMjEzOUMzNy4yMDk1IDUxLjIxMzkgMzkuNzY4OSA1My43NDU3IDM5Ljc2ODkgNTYuODQxNFY2NS45NDU0Wk01OS41MjI0IDY1Ljk0NTRDNTkuNTIyNCA2OS4wNDExIDU2Ljk2MzEgNzEuNTcyOSA1My44MzM4IDcxLjU3MjlDNTAuNzA0NSA3MS41NzI5IDQ4LjE0NTEgNjkuMDM5OSA0OC4xNDUxIDY1Ljk0NTRWNTYuODQxNEM0OC4xNDUxIDUzLjc0NTcgNTAuNzA1NiA1MS4yMTM5IDUzLjgzMzggNTEuMjEzOUM1Ni45NjMxIDUxLjIxMzkgNTkuNTIyNCA1My43NDU3IDU5LjUyMjQgNTYuODQxNFY2NS45NDU0WiIgZmlsbD0idXJsKCNwYWludDFfbGluZWFyKSIvPjxkZWZzPjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhciIgeDE9IjY0IiB5MT0iMCIgeDI9IjY0IiB5Mj0iMTI4IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agc3RvcC1jb2xvcj0iIzUzNEJCMSIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzU1MUJGOSIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJwYWludDFfbGluZWFyIiB4MT0iNjUuNDk5OCIgeTE9IjIzIiB4Mj0iNjUuNDk5OCIgeTI9IjEwOCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IndoaXRlIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSJ3aGl0ZSIgc3RvcC1vcGFjaXR5PSIwLjgyIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PC9zdmc+Cg=",blockchains:oG.solana}}static __initStatic2(){this.isAvailable=()=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([window,"optionalAccess",t=>t.solana,"optionalAccess",t=>t.isPhantom])}}function cG(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}uG.__initStatic(),uG.__initStatic2();const lG=async(t,e)=>{let n;const r=await AH(e);n=await r.getTransaction(t);let i=1;for(;i<=120&&!n;)n=await r.getTransaction(t),await new Promise((t=>setTimeout(t,5e3))),i++;return n},hG=({transaction:t,wallet:e})=>t.method?dG({transaction:t,wallet:e}):fG({transaction:t,wallet:e}),dG=async({transaction:t,wallet:e})=>{const n=await AH(t.blockchain);return e.connector.sendTransaction({from:t.from,to:t.to,value:cG([t,"access",t=>t.value,"optionalAccess",t=>t.toString,"call",t=>t()]),data:await t.getData(),gas:(await dH(t)).toString(),gasPrice:(await n.getGasPrice()).toString()})},fG=async({transaction:t,wallet:e})=>{const n=await AH(t.blockchain);return e.connector.sendTransaction({from:t.from,to:t.to,value:cG([t,"access",t=>t.value,"optionalAccess",t=>t.toString,"call",t=>t()]),gas:(await dH(t)).toString(),gasPrice:(await n.getGasPrice()).toString()})};function pG(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}const mG=()=>window._connectedWalletConnectInstance,yG=t=>{window._connectedWalletConnectInstance=t};class gG{static __initStatic(){this.info={name:"WalletConnect",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0ndXRmLTgnPz48IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMj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TQuMS0xMC41LDAtMTQuNGwyOS45LTI5LjIgYzQuMS00LDEwLjctNCwxNC44LDBsOTUuNSw5My41YzEsMSwyLjcsMSwzLjcsMGMwLDAsMCwwLDAsMGw5NS41LTkzLjVjNC4xLTQsMTAuNy00LDE0LjgsMGMwLDAsMCwwLDAsMGw5NS41LDkzLjUgYzEsMSwyLjcsMSwzLjcsMGw5NS41LTkzLjVDNDU2LjQsMjI1LjksNDYzLDIyNS45LDQ2Ny4xLDIyOS45eicvPjwvZz48L2c+PC9zdmc+Cg==",blockchains:["ethereum","bsc","polygon","velas"]}}static __initStatic2(){this.isAvailable=()=>null!=mG()}constructor(){this.name=this.constructor.info.name,this.logo=this.constructor.info.logo,this.blockchains=this.constructor.info.blockchains,this.connector=gG.instance||this.newWalletConnectInstance(),this.sendTransaction=t=>(async({transaction:t,wallet:e})=>{if(t=new LH(t),0==await e.connectedTo(t.blockchain)&&await e.switchTo(t.blockchain),0==await e.connectedTo(t.blockchain))throw{code:"WRONG_NETWORK"};await t.prepare({wallet:e});let n=await EH({blockchain:t.blockchain,method:"transactionCount",address:t.from});return t.nonce=n,await hG({transaction:t,wallet:e}).then((async e=>{if(!e)throw"Submitting transaction failed!";{let r=qh(t.blockchain);t.id=e,t.url=r.explorerUrlFor({transaction:t}),t.sent&&t.sent(t);let i=await lG(e,t.blockchain);t.nonce=i.nonce||n,i?i.wait(1).then((()=>{t._succeeded=!0,t.succeeded&&t.succeeded(t)})).catch((e=>{e&&e.code&&"TRANSACTION_REPLACED"==e.code?e.replacement&&e.replacement.hash&&e.receipt&&1==e.receipt.status?(t.id=e.replacement.hash,t._succeeded=!0,t.succeeded&&t.succeeded(t)):e.replacement&&e.replacement.hash&&e.receipt&&0==e.receipt.status&&(t.id=e.replacement.hash,t._failed=!0,t.failed&&t.failed(t,e)):(t._failed=!0,t.failed&&t.failed(t,e))})):(t._failed=!0,console.log("Error retrieving transaction"),t.failed&&t.failed(t,"Error retrieving transaction"))}})),t})({wallet:this,transaction:t})}newWalletConnectInstance(){let t=new kH({bridge:"https://bridge.walletconnect.org",qrcodeModal:NH});return t.on("connect",((t,e)=>{if(t)throw t;const{accounts:n,chainId:r}=e.params[0];this.connectedAccounts=n.map((t=>cp(t))),this.connectedChainId=r})),t.on("session_update",((t,e)=>{if(t)throw t;const{accounts:n,chainId:r}=e.params[0];this.connectedAccounts=n.map((t=>cp(t))),this.connectedChainId=r})),t.on("disconnect",((t,e)=>{if(yG(void 0),t)throw t})),t.on("modal_closed",(()=>{yG(void 0),this.connector=void 0})),t}async account(){if(null!=this.connectedAccounts)return this.connectedAccounts[0]}async connect(t){try{window.localStorage.removeItem("walletconnect"),null==this.connector&&(this.connector=this.newWalletConnectInstance()),this.connector.connected&&(await this.connector.killSession(),yG(void 0),this.connector=this.newWalletConnectInstance());let{accounts:e,chainId:n}=await this.connector.connect({chainId:pG([t,"optionalAccess",t=>t.chainId])});return e instanceof Array&&e.length&&yG(this),e=e.map((t=>cp(t))),this.connectedAccounts=e,this.connectedChainId=n,e[0]}catch(t){return void console.log("WALLETCONNECT ERROR",t)}}async connectedTo(t){let e=await this.connector.sendCustomRequest({method:"eth_chainId"});const n=Hh(e);return t?t===n.name:n.name}switchTo(t){return new Promise(((e,n)=>{let r,i;const o=qh(t);setTimeout((async()=>{await this.connectedTo(t)||r||i?e():n({code:"NOT_SUPPORTED"})}),3e3),this.connector.sendCustomRequest({method:"wallet_switchEthereumChain",params:[{chainId:o.id}]}).then((()=>{r=!0,e()})).catch((o=>{o&&"string"==typeof o.message&&o.message.match("addEthereumChain")?this.addNetwork(t).then((()=>this.switchTo(t).then((()=>{r=!0,e()})))).catch((()=>{i=!0,n({code:"NOT_SUPPORTED"})})):(i=!0,n({code:"NOT_SUPPORTED"}))}))}))}addNetwork(t){return new Promise(((e,n)=>{const r=qh(t);this.connector.sendCustomRequest({method:"wallet_addEthereumChain",params:[{chainId:r.id,chainName:r.fullName,nativeCurrency:{name:r.currency.name,symbol:r.currency.symbol,decimals:r.currency.decimals},rpcUrls:[r.rpc],blockExplorerUrls:[r.explorer],iconUrls:[r.logo]}]}).then(e).catch(n)}))}on(t,e){let n;if("account"===t)n=(t,n)=>{if(n&&n.params&&n.params[0].accounts&&n.params[0].accounts instanceof Array){const t=n.params[0].accounts.map((t=>cp(t)));e(t[0])}},this.connector.on("session_update",n);return n}off(t,e){if("account"===t)this.connector.off("session_update")}async sign(t){let e=await this.account();var n=[Cp(t),e];return await this.connector.signPersonalMessage(n)}}gG.__initStatic(),gG.__initStatic2(),gG.getConnectedInstance=mG,gG.setConnectedInstance=yG;const bG=({transaction:t,provider:e,signer:n})=>t.method?vG({transaction:t,signer:n,provider:e}):wG({transaction:t,signer:n}),vG=({transaction:t,signer:e,provider:n})=>{let r=new bw(t.to,t.api,n),i=t.getContractArguments({contract:r}),o=r.connect(e)[t.method];return i?o(...i,{value:LH.bigNumberify(t.value,t.blockchain)}):o({value:LH.bigNumberify(t.value,t.blockchain)})},wG=({transaction:t,signer:e})=>e.sendTransaction({to:t.to,value:LH.bigNumberify(t.value,t.blockchain)}),MG=()=>window._connectedWalletLinkInstance,_G=t=>{window._connectedWalletLinkInstance=t};class EG{static __initStatic(){this.info={name:"Coinbase",logo:$H.info.logo,blockchains:["ethereum","bsc","polygon","velas"]}}static __initStatic2(){this.isAvailable=()=>null!=MG()}constructor(){this.name=this.constructor.info.name,this.logo=this.constructor.info.logo,this.blockchains=this.constructor.info.blockchains,this.connector=EG.instance||this.newWalletLinkInstance(),this.sendTransaction=t=>(async({transaction:t,wallet:e})=>{if(t=new LH(t),0==await e.connectedTo(t.blockchain)&&await e.switchTo(t.blockchain),0==await e.connectedTo(t.blockchain))throw{code:"WRONG_NETWORK"};await t.prepare({wallet:e});let n=new OM(e.connector,"any"),r=n.getSigner(0);return await bG({transaction:t,provider:n,signer:r}).then((e=>{if(!e)throw"Submitting transaction failed!";t.id=e.hash,t.nonce=e.nonce,t.url=qh(t.blockchain).explorerUrlFor({transaction:t}),t.sent&&t.sent(t),e.wait(1).then((()=>{t._succeeded=!0,t.succeeded&&t.succeeded(t)})).catch((e=>{e&&e.code&&"TRANSACTION_REPLACED"==e.code?(e.replacement&&e.replacement.hash&&(t.id=e.replacement.hash,t.url=qh(t.blockchain).explorerUrlFor({transaction:t})),e.replacement&&e.replacement.hash&&e.receipt&&1==e.receipt.status?(t._succeeded=!0,t.succeeded&&t.succeeded(t)):e.replacement&&e.replacement.hash&&e.receipt&&0==e.receipt.status&&(t._failed=!0,t.failed&&t.failed(t,e))):(t._failed=!0,t.failed&&t.failed(t,e))}))})),t})({wallet:this,transaction:t})}newWalletLinkInstance(){return new xH({}).makeWeb3Provider()}async account(){if(null!=this.connectedAccounts)return cp(this.connectedAccounts[0])}async connect(t){(await this.connector._relayProvider()).setConnectDisabled(!1);let e=await this.connector.enable();return e instanceof Array&&e.length&&_G(this),e=e.map((t=>cp(t))),this.connectedAccounts=e,this.connectedChainId=await this.connector.getChainId(),e[0]}async connectedTo(t){let e=await this.connector.getChainId();const n=Gh(e);return t?t===n.name:n.name}switchTo(t){return new Promise(((e,n)=>{const r=qh(t);this.connector.request({method:"wallet_switchEthereumChain",params:[{chainId:r.id}]}).then(e).catch((r=>{4902===r.code?this.addNetwork(t).then((()=>this.switchTo(t).then(e))).catch(n):n(r)}))}))}addNetwork(t){return new Promise(((e,n)=>{const r=qh(t);this.connector.request({method:"wallet_addEthereumChain",params:[{chainId:r.id,chainName:r.fullName,nativeCurrency:{name:r.currency.name,symbol:r.currency.symbol,decimals:r.currency.decimals},rpcUrls:[r.rpc],blockExplorerUrls:[r.explorer],iconUrls:[r.logo]}]}).then(e).catch(n)}))}on(t,e){let n;if("account"===t)n=t=>e(cp(t[0])),this.connector.on("accountsChanged",n);return n}off(t,e){if("account"===t)this.connector.removeListener("accountsChanged",e);return e}async sign(t){await this.account();let e=new OM(this.connector,"any").getSigner(0);return await e.signMessage(t)}}EG.__initStatic(),EG.__initStatic2(),EG.getConnectedInstance=MG,EG.setConnectedInstance=_G;var AG={MetaMask:tG,Phantom:uG,Coinbase:$H,WindowEthereum:KH,WindowSolana:sG,WalletConnect:gG,WalletLink:EG};let SG={};const kG=()=>{let t=[];return Object.keys(AG).forEach((e=>{let n=AG[e];n.isAvailable()&&(SG[n]||(n.getConnectedInstance&&n.getConnectedInstance()?SG[n]=n.getConnectedInstance():SG[n]=new n),t.push(SG[n]))})),t},NG=async()=>(await Promise.all(kG().map((async t=>{if(await t.account())return t})))).filter((t=>!!t));var TG=function(t){var n=h(G.useState(!1),2),r=n[0],i=n[1],o=G.useContext(ah).navigate,a=kG()[0];G.useEffect((function(){e(u.mark((function e(){var n;return u.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,NG();case 2:if(n=e.sent,!a||0!=n){e.next=8;break}return e.next=6,a.account();case 6:null==e.sent&&(o("ConnectingWallet"),t.connect(a));case 8:case"end":return e.stop()}}),e)})))()}),[a]);var s=[AG.WalletConnect,AG.WalletLink];a&&s.unshift(a.constructor);var c=s.map((function(e,n){var r=e.info.name;return"WalletConnect"==r&&(r="via WalletConnect"),G.createElement("div",{key:n,className:"PaddingBottomXS"},G.createElement("button",{className:"Card small",title:"Connect ".concat(r),onClick:function(){return function(e){var n=new e;t.setWallet(n),o("ConnectingWallet"),t.connect(n)}(e)}},G.createElement("div",{className:"CardImage square"},G.createElement("img",{className:"transparent",src:e.info.logo})),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper PaddingLeftXS"},G.createElement("h2",{className:"CardText FontWeightBold"},r)))))}));return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},G.createElement("h1",{className:"LineHeightL FontSizeL"},"Select a wallet")),body:G.createElement("div",{className:"PaddingBottomS PaddingLeftS PaddingRightS"},c),footer:G.createElement("div",{className:"PaddingBottomS"},G.createElement("button",{className:"FontSizeS FontWeightBold TextButton",onClick:function(){return i(!r)}},G.createElement("strong",{className:"Opacity05"},"What is a wallet?")),r&&G.createElement("p",{className:"PaddingLeftM PaddingRightM"},"Wallets are used to send, receive, and store digital assets. Wallets come in many forms. They are either built into your browser, an extension added to your browser, a piece of hardware plugged into your computer or even an app on your phone."))})},xG=function(t){var n=G.useContext(q),r=n.open,i=n.close,o=h(G.useState(),2),a=o[0],s=o[1],c=h(G.useState(),2),l=c[0],d=c[1],f=function(n){n.connect().then(e(u.mark((function e(){var r;return u.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.account();case 2:(r=e.sent)&&(t.autoClose&&i(),t.resolve&&t.resolve({wallet:n,account:r}));case 4:case"end":return e.stop()}}),e)})))).catch((function(e){s(!1),4001!=(null==e?void 0:e.code)&&(-32002!=(null==e?void 0:e.code)?t.reject&&t.reject(e):s(!0))}))};return G.useEffect((function(){var t=kG()[0];t&&d(t)}),[]),G.useEffect((function(){e(u.mark((function e(){var n;return u.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!l){e.next=5;break}return e.next=3,l.account();case 3:(n=e.sent)&&(t.autoClose&&i(),t.resolve&&t.resolve({wallet:l,account:n}));case 5:case"end":return e.stop()}}),e)})))()}),[l]),G.createElement(ch,{open:r,close:i,start:"SelectWallet",container:t.container,document:t.document,dialogs:{SelectWallet:G.createElement(TG,{setWallet:d,connect:f}),ConnectingWallet:G.createElement(hh,{wallet:l,pending:a,connect:f})}})},LG=function(t){return void 0===t?window.document:t};function IG(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===n(e)?e:String(e)}function jG(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,IG(r.key),r)}}function CG(t,e){return CG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},CG(t,e)}function DG(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function OG(t){return OG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},OG(t)}var PG=G.createContext(),zG="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAGHCAMAAADx+xo1AAAAeFBMVEVHcEweFhTcf2s2ERDegW3egWw1EBDbg2s1EBD/h4fSfWM1EBDTf2T/h4fTf2Q1EBDVgmYvEhI8EhJWLCV1QTWWV0a3Y07Ab1fOd1/PfWLXhWjUlH3/h4e8pZ3br12tub3ppI6hyNaY1Or+u6nx3mbO6/b14M3///8kXrGSAAAAEXRSTlMADSI/RWdshpqipsDG1OPj/QoziQ8AAB1ySURBVHja7J3bkqIwEIYBQTwLEUxgvNiqqZp5/zdczkFDEhCiPaa/q11WZcf+6f67ExgHQRAEQRAEQbSszmTlIPZyJmTvINayJoRsHMRaigRwdh3EVlZFAlg7iLVsCgFgArAXl6AFtJo1VgC72ROCUwCLKSvA2UHshZQK2KxXK9ddFaAdtI0N6YHlwD7ccy/6OBO0EHe97zSAHYGl1PV/TXAmZDV7rABWsyG4KmQzG+wBrAbjbzdr7ACsZoXxtxq3ir9bdIPrzX6/wUpgG5UBwGmQvdyNg3GHiH3cZQBcILYQtxgEr9elAzhjBrCcd94m4HolfkEQBGHBruRQc+qIWnKBaJjurc1nlR9bfn5xmuJk1VldC4agQeCNCIJpE1hGuQ1xHd46qDkAIjnZidOKqFaQ5zl/g+Ptdtv62vgsORF0q1h3oT6dQIR5vkqyAtbndNiFhRRAZxH/VnEMXO1MyH063s2V/TnRViuBy4ALIfCBZgSvFoAuDWymNwGeH4RlxHMrKWTAHmWwC32AySC8dRwD6asmeUCviLylcX9QQTagggBaKvDCI9fA1pt5q6AfHj49x08VAXvkEPoOLIKjJg2sR1k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Gj7UTJYJB4FengEPGYg0ezi7P1kQ6EsGKRqCsmFbG11afVw/b0USaPTbI2FxDBTSOVSEGEpGCg7b9dHg9dCtwCvdxPx088RBoDcjFi80k0gkL05YdmLVfEiPSCrEEi+7ChEuJMv3gNMfHxy7Cte3xV53EqhKqskm8PjPB8fHTuL1+l02OwlUXbXL8a+zChzZgjV/MO2tipXxl6ETj4fEjT78cyeBamPFpjb+EC2l50Ct4q5ujC92Fe6W6j1LI2hMnEx4F/qMg2euAQZ34viSgLkGGFTG4UsCnrERdMc04BNbEjAHAX8vfkMYX+zQJQFzEPDWcTeoQJSF4LkRFK4YjFIDzkEgnApEqQHnIBDOiugKwXMQCOvHkWrA8/thy2jGmEoOYSG4FQRmFzC6GTEWgs9IZgKMXs3BqwErpJsQh4FOAUc7TkoDzgiiAvFtBpgRsqeLWgPOGN+QqDXgjPFdOdpC8AwF+4SE/9u7gxWHYRiKonkITMAL4///2XEndFzquEEhBJW5Z9GNQV3o2VEaaBrTMMx5h0fZow6Xgu/SXqJRN9menTx1+5jysw73A1/ESu3K78e50eG1TpT/4MdIi15ZHck9Aw6KSQspCEXd5/5Xc5ZNdVT6d0R5K8t/pplcd6S24DlI1rpjfayQghA0ZfVz75bBUYq6tkAGQtBgsnf7COdT6uQcIQMhhAoACbidYgWABNxN8s4AJp80mQFIQAhyHgHZ5JXKzgFAAKLwJKCsvf0elt/q0P84jrZvLlvP8toe5Jxnaf2r1NpPAAI5bp6ZrrFVov/B6KT5L4DXVcQ9Lm+UXHg2FMIlnfecCQt9D4jtCQAAAAAAAAAAAABvfgCECMuQGDaxMAAAAABJRU5ErkJggg==";function RG(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=OG(t);if(e){var i=OG(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return DG(this,n)}}var BG,UG=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&CG(t,e)}(o,G.Component);var e,n,r,i=RG(o);function o(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,t)}return e=o,n=[{key:"componentDidCatch",value:function(t,e){t.error&&(t=t.error),this.props.setError(t)}},{key:"render",value:function(){return this.props.children}}],n&&jG(e.prototype,n),r&&jG(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(),FG=function(t){var e=h(G.useState(t.error),2),n=e[0],r=e[1],i=h(G.useState(!0),2),o=i[0],a=i[1],s=function(e){e.error&&(e=e.error),r(e),t.errorCallback&&t.errorCallback(e.message||e.toString())},u=function(){a(!1),setTimeout(t.unmount,300)};return n?G.createElement(ih,{container:t.container,close:u,open:o},G.createElement("div",{className:"Dialog ReactDialogAnimation"},G.createElement("div",{className:"DialogHeader"},G.createElement("div",{className:"PaddingTopS PaddingLeftS PaddingRightS"})),G.createElement("div",{className:"DialogBody TextCenter"},G.createElement("div",{className:"GraphicWrapper PaddingTopS"},G.createElement("img",{className:"Graphic",src:zG})),G.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Oops, Something Went Wrong"),G.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},G.createElement("div",{className:"PaddingLeftS PaddingRightS"},G.createElement("pre",{className:"ErrorSnippetText"},n.message||n.toString())),G.createElement("div",{className:"PaddingTopS PaddingBottomS"},G.createElement("strong",{className:"FontSizeM PaddingTopS"},"If this keeps happening, please report it.")))),G.createElement("div",{className:"DialogFooter"},G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("button",{className:"ButtonPrimary",onClick:u},"Try again"))))):G.createElement(PG.Provider,{value:{setError:s,errorCallback:t.errorCallback}},G.createElement(UG,{setError:s},t.children))},YG=function(t){return"\n\n .ButtonPrimary {\n align-items: center;\n align-self: center;\n background: ".concat(t.colors.primary,";\n border-radius: 13px;\n border: 1px solid transparent;\n box-shadow: 0 0 16px rgba(0,0,0,0.1);\n font-size: 21px;\n font-weight: 400;\n line-height: 45px;\n height: 58px;\n justify-content: center;\n width: 100%;\n overflow: hidden;\n padding: 7px 0;\n position: relative;\n text-align: center;\n text-decoration: none;\n text-overflow: ellipsis;\n transition: background 0.1s;\n vertical-align: middle;\n display: inline-block;\n }\n\n .ButtonPrimary, .ButtonPrimary * {\n color: ").concat(t.colors.buttonText,";\n }\n\n .ButtonPrimary.disabled {\n background: rgb(210,210,210);\n color: rgb(140,140,140);\n }\n\n .ButtonPrimary:not(.disabled){\n cursor: pointer;\n }\n .ButtonPrimary:not(.disabled):hover {\n box-shadow: inset 0 0 300px rgba(0,0,0,0.1);\n }\n .ButtonPrimary:not(.disabled):active {\n box-shadow: inset 0 0 300px rgba(0,0,0,0.2);\n }\n ")},QG=function(t){return"\n\n .Card {\n align-items: center;\n background: rgb(255,255,255);\n border-radius: 13px;\n box-shadow: 0 0 8px rgba(0,0,0,0.03);\n cursor: pointer;\n display: flex;\n flex-direction: row;\n margin-bottom: 8px;\n min-height: 76px;\n padding: 16px 10px;\n width: 100%;\n }\n\n .Card.Row {\n border-radius: 0;\n margin-bottom: 0;\n box-shadow: none;\n min-height: 69px;\n padding: 7px 21px;\n border-top: 1px solid rgba(0,0,0,0.05);\n }\n\n .Card.Row .CardText {\n font-size: 19px;\n line-height: 40px;\n }\n\n .CardTokenSymbol {\n width: 40%;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .CardTokenFullName {\n width: 100%;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .CardTokenName {\n text-align: right;\n opacity: 0.5;\n width: 60%;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n \n .Card.Row .CardTokenName .CardText {\n font-size: 17px;\n }\n\n .Card.Row .CardImage {\n width: 40px;\n }\n\n .Card.Row .CardImage img {\n height: 30px;\n width: 30px;\n }\n\n a.Card, a.Card * {\n color: inherit;\n text-decoration: none;\n }\n\n .Card.transparent {\n background: none;\n box-shadow: none;\n }\n\n .Card.small {\n min-height: auto;\n padding: 8px 8px;\n margin: 0;\n }\n\n .CardImage.small {\n width: 27px;\n }\n\n .CardImage.small img {\n height: 27px;\n width: 27px;\n }\n\n .Card.disabled {\n cursor: default;\n }\n\n .Card:hover:not(.disabled) {\n background: rgb(240,240,240);\n box-shadow: 0 0 0 rgba(0,0,0,0); \n }\n\n .Card:active:not(.disabled) {\n background: rgb(235,235,235);\n box-shadow: inset 0 0 6px rgba(0,0,0,0.02);\n color: inherit;\n }\n\n .Card:hover:not(.disabled) .CardAction {\n opacity: 0.4;\n }\n\n .CardImage, .CardBody, .CardAction, .CardInfo {\n align-items: center;\n display: flex;\n min-width: 0;\n padding: 0 7px;\n }\n\n .CardImage {\n display: inline-flex;\n flex-basis: auto;\n flex-grow: 0;\n flex-shrink: 0;\n justify-content: center;\n position: relative;\n width: 58px;\n }\n\n .CardBody {\n flex-basis: auto;\n flex-grow: 1;\n flex-shrink: 1;\n line-height: 27px;\n padding-left: 10px;\n text-align: left;\n }\n\n .CardBodyWrapper {\n min-width: 0;\n }\n\n .CardAction {\n flex-basis: auto;\n flex-shrink: 0;\n flex-grow: 0;\n padding-right: 0;\n margin-left: auto;\n }\n\n .Card.disabled .CardAction {\n opacity: 0; \n }\n\n .CardInfo {\n display: flex;\n flex-basis: auto;\n flex-direction: column;\n flex-grow: 0;\n flex-shrink: 1;\n justify-content: center;\n margin-left: auto; \n padding-right: 0;\n }\n\n .CardImage img {\n background: white;\n border-radius: 9999px;\n border: 1px solid white;\n box-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n height: 45px;\n position: relative;\n vertical-align: middle;\n width: 45px;\n }\n\n .CardImage.square img {\n border-radius: 0;\n }\n\n .CardImage img.transparent {\n border: none;\n background: none;\n box-shadow: none;\n }\n \n .CardImage .BlockchainLogo {\n position: absolute;\n bottom: 0;\n right: 0;\n }\n\n .CardTitle {\n font-size: 15px;\n color: rgb(150,150,150);\n line-height: 20px;\n }\n \n .CardText, a .CardText {\n color: ".concat(t.colors.text,";\n flex: 1;\n font-size: 21px;\n line-height: 26px;\n }\n\n .CardText strong {\n font-weight: 500;\n }\n\n .CardText.small, .CardText.small small {\n font-size: 18px;\n color: rgb(150,150,150);\n line-height: 20px;\n }\n\n .CardAction {\n opacity: 0.2;\n }\n\n .Card.More {\n display: inline-block;\n text-align: center;\n }\n ")},WG=function(t){return"\n\n *, div, div * {\n font-family: ".concat(t.fontFamily,";\n }\n\n .FontSizeS {\n font-size: 16px;\n }\n\n .FontSizeM {\n font-size: 19px;\n }\n\n .FontSizeL {\n font-size: 23px;\n }\n\n .FontSizeXL {\n font-size: 32px;\n }\n\n .FontSizeXXL {\n font-size: 42px;\n }\n\n .FontWeightBold {\n font-weight: bold;\n }\n\n .FontItalic {\n font-style: italic;\n }\n ")},HG=function(t){return"\n\n .Icon {\n fill : ".concat(t.colors.icons,";\n stroke : ").concat(t.colors.icons,";\n }\n\n .ChevronLeft, .ChevronRight {\n position: relative;\n top: 1px;\n }\n\n .Checkmark {\n height: 24px;\n position: relative;\n top: -1px;\n vertical-align: middle;\n width: 24px;\n }\n\n .AlertIcon {\n height: 20px;\n position: relative;\n top: -1px;\n vertical-align: middle;\n width: 20px;\n fill: #e42626;\n stroke: transparent;\n }\n\n .CheckMark.small {\n height: 16px;\n width: 16px;\n }\n\n .DigitalWalletIcon {\n height: 24px;\n position: relative;\n top: -1px;\n vertical-align: middle;\n width: 24px;\n }\n\n .ButtonPrimary .Icon {\n fill : ").concat(t.colors.buttonText,";\n stroke : ").concat(t.colors.buttonText,";\n }\n\n .Loading {\n border: 3px solid ").concat(t.colors.primary,";\n border-top: 3px solid rgba(0,0,0,0.1);\n border-radius: 100%;\n position: relative;\n left: -1px;\n width: 18px;\n height: 18px;\n animation: spin 1.5s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n ")},GG=function(t){return"\n\n .Link {\n color: ".concat(t.colors.primary,";\n cursor: pointer;\n text-decoration: none;\n }\n\n .Link:hover {\n filter: brightness(0.8);\n }\n\n .Link:active {\n filter: brightness(1.0);\n }\n ")},qG=function(t){return"\n\n .LoadingText {\n color: ".concat(t.colors.buttonText,";\n display: inline-block;\n text-decoration: none;\n }\n\n @keyframes blink {\n 0% { opacity: .2; }\n 20% { opacity: 1; }\n 100% { opacity: .2; }\n }\n \n .LoadingText .dot {\n animation-name: blink;\n animation-duration: 1.4s;\n animation-iteration-count: infinite;\n animation-fill-mode: both;\n }\n \n .LoadingText .dot:nth-child(2) {\n animation-delay: .2s;\n }\n \n .LoadingText .dot:nth-child(3) {\n animation-delay: .4s;\n }\n ")},ZG=function(t){return"\n\n .rangeslider {\n margin: 20px 0;\n position: relative;\n background: #e6e6e6;\n -ms-touch-action: none;\n touch-action: none;\n }\n\n .rangeslider,\n .rangeslider__fill {\n display: block;\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);\n }\n\n .rangeslider__handle {\n outline: none;\n cursor: pointer;\n display: inline-block;\n position: absolute;\n border-radius: 50%;\n background-color: "+t.colors.primary+";\n border: 1px solid white;\n box-shadow: 0 0 8px rgba(0,0,0,0.1);\n }\n\n .rangeslider__handle:hover {\n box-shadow: inset 0 0 300px rgba(0,0,0,0.2);\n }\n\n .rangeslider__handle:active {\n box-shadow: inset 0 0 300px rgba(0,0,0,0.3);\n }\n\n .rangeslider__active {\n opacity: 1;\n }\n\n .rangeslider__handle-tooltip {\n display: none;\n }\n\n .rangeslider-horizontal {\n height: 12px;\n border-radius: 10px;\n }\n\n .rangeslider-horizontal .rangeslider__fill {\n height: 100%;\n background-color: "+t.colors.primary+";\n border-radius: 10px;\n top: 0;\n }\n .rangeslider-horizontal .rangeslider__handle {\n width: 18px;\n height: 18px;\n border-radius: 30px;\n top: 50%;\n transform: translate3d(-50%, -50%, 0);\n }\n\n\n .rangeslider-horizontal .rangeslider__handle-tooltip {\n top: -55px;\n }\n\n "},VG=function(t){return"\n\n .Search {\n border-radius: 13px;\n border: 1px solid rgba(0,0,0,0.2);\n outline: none !important;\n color: ".concat(t.colors.text,";\n font-size: 19px;\n padding: 13px;\n width: 100%;\n }\n\n .Search::placeholder {\n color: rgb(180,180,180);\n } \n\n .Search:focus, .Search:focus-visible {\n border: 1px solid ").concat(t.colors.primary,";\n }\n\n ")},JG=function(t){return"\n\n .TextButton {\n cursor: pointer;\n font-size: 16px;\n color: ".concat(t.colors.primary,"\n }\n\n .TextButton:hover * {\n opacity: 1.0;\n }\n ")},KG=function(t){return"\n\n * {\n color: ".concat(t.colors.text,";\n }\n\n h1, h2, h3, h4, h5, h6 {\n display: block;\n }\n\n .Text {\n font-size: 16px;\n line-height: 24px\n }\n\n .TextLeft, .TextLeft * {\n text-align: left !important;\n }\n\n .TextCenter, .TextCenter * {\n text-align: center;\n }\n\n .LineHeightL {\n line-height: 32px;\n }\n\n .ErrorSnippetText {\n background: rgb(30, 30, 20);\n border-radius: 19px;\n border: 8px solid rgb(30, 30, 20);\n color: #00FF41;\n font-size: 15px;\n font-style: italic;\n max-height: 100px;\n padding: 6px;\n overflow-wrap: break-word;\n overflow-y: auto;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n ")},XG=function(t){return"\n\n .Tooltip {\n background: ".concat(t.colors.primary,";\n border-radius: 10px;\n color: ").concat(t.colors.buttonText,";\n padding: 10px 13px;\n position: relative;\n box-shadow: 0 0 8px rgba(0,0,0,0.2);\n }\n\n .TooltipArrowUp {\n border-bottom: 10px solid ").concat(t.colors.primary,";\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n height: 0; \n left: 12px;\n position: absolute;\n top: -8px;\n width: 0; \n }\n ")};BG=eh.createRoot;const $G="ReactShadowDOMInsideContainer";function tq(t){return t.replace(/\s*[\r\n]\s*/g,"")}function eq({document:t,element:e,content:n,outsideStyle:r="",insideStyle:i="",insideClasses:o=[]}){const a=function({document:t,element:e,style:n}){const r=t.createElement("div");return r.setAttribute("class","ReactShadowDOMOutsideContainer"),r.setAttribute("style",n),e.appendChild(r),r}({document:t,element:e,style:tq(r)}),s=function({document:t,shadow:e,style:n,classes:r=[]}){const i=t.createElement("div");if(i.setAttribute("class",[$G].concat(r).join(" ")),e.appendChild(i),n&&n.length){const r=t.createElement("style");r.type="text/css",r.appendChild(t.createTextNode(n)),e.appendChild(r)}return i}({document:t,shadow:function(t){let e;return e=t.shadowRoot?t.shadowRoot:t.attachShadow({mode:"open"}),e}(a),style:tq(i),classes:o});"function"==typeof n&&(n=n(s));const u=BG(s);return u.render(n),{content:n,unmount:()=>function({insideRoot:t,outsideContainer:e}){t.unmount(),e.remove()}({insideRoot:u,outsideContainer:a})}}var nq=function(t,e){var n=t.style,r=t.container,i=t.document,o=t.closed,a=function(t){var e,n;return t={colors:Object.assign({primary:"#ea357a",buttonText:"#ffffff",icons:"#000000",text:"#212529"},(null===(e=t)||void 0===e?void 0:e.colors)||{}),fontFamily:(null===(n=t)||void 0===n?void 0:n.fontFamily)||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'},["\n\n html, body, div, span, applet, object, iframe,\n h1, h2, h3, h4, h5, h6, p, blockquote, pre,\n a, abbr, acronym, address, big, cite, code,\n del, dfn, em, img, ins, kbd, q, s, samp,\n small, strike, strong, sub, sup, tt, var,\n b, u, i, center,\n dl, dt, dd, ol, ul, li,\n fieldset, form, label, legend,\n table, caption, tbody, tfoot, thead, tr, th, td,\n article, aside, canvas, details, embed, \n figure, figcaption, footer, header, hgroup, \n menu, nav, output, ruby, section, summary,\n time, mark, audio, video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n text-align: inherit;\n vertical-align: baseline;\n }\n\n article, aside, details, figcaption, figure, \n footer, header, hgroup, menu, nav, section {\n display: block;\n }\n\n body {\n line-height: 1;\n }\n\n ol, ul {\n list-style: none;\n }\n\n blockquote, q {\n quotes: none;\n }\n\n blockquote:before, blockquote:after,\n q:before, q:after {\n content: '';\n content: none;\n }\n \n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n * {\n box-sizing: border-box;\n }\n\n button {\n border: 0;\n background: none;\n outline: none;\n }\n\n ","\n\n .ReactDialogBackground {\n backdrop-filter: blur(5px);\n background: rgba(0,0,0,0.7);\n }\n\n .contained .ReactDialog {\n position: absolute;\n height: 100%;\n min-height: 100%;\n width: 100%;\n min-width: 100%;\n }\n\n .contained .ReactDialogBackground {\n position: absolute;\n }\n\n .contained .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n top: 0;\n }\n\n .Dialog {\n margin: 0 auto;\n position: relative;\n width: 420px;\n box-shadow: 0 0 20px rgba(0,0,0,0.2);\n border-radius: 13px;\n background: rgb(248,248,248);\n }\n\n @media (max-width: 450px) {\n\n .Dialog {\n border-radius: 0;\n width: 100%;\n }\n }\n\n @media (orientation: portrait) and (max-width: 800px) {\n\n .ReactDialogAnimation {\n width: 100%;\n }\n\n .ReactDialog {\n height: 100%;\n min-height: 100%;\n }\n\n .ReactDialogStack {\n align-items: flex-end;\n }\n\n .Dialog {\n align-content: stretch;\n border-radius: 13px;\n border-top-radius: 13px;\n display: flex;\n flex-direction: column;\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n }\n\n .DialogFooter {\n padding-bottom: 20px;\n }\n\n .ReactDialogAnimation {\n margin-bottom: -100px !important;\n top: inherit !important;\n position: relative;\n transition: opacity 0.4s ease, margin-bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n margin-bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n .ReactShadowDOMInsideContainer > .ReactDialog {\n align-items: flex-end;\n }\n }\n\n .DialogBody {\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .DialogBody.ScrollHeight {\n height: 30vh !important;\n max-height: 30vh !important;\n }\n\n .DialogHeader {\n border-top-left-radius: 13px;\n border-top-right-radius: 13px;\n min-height: 54px;\n position: relative;\n width: 100%;\n }\n\n .DialogHeaderActionRight {\n position: absolute;\n top: 0;\n right: 0;\n height: 48px;\n }\n\n .DialogHeaderActionLeft {\n position: absolute;\n top: 0;\n left: 0;\n height: 48px;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 13px;\n border-bottom-right-radius: 13px;\n line-height: 24px;\n min-height: 32px;\n position: relative;\n text-align: center;\n }\n\n ","\n\n .ButtonCircular {\n border-radius: 9999px;\n cursor: pointer;\n height: 34px;\n opacity: 0.5;\n padding: 5px 4px 4px 4px;\n width: 34px;\n }\n\n .ButtonCircular:hover {\n background: rgba(0,0,0,0.1);\n opacity: 1;\n }\n\n .ButtonCircular:active {\n background: rgba(0,0,0,0.25);\n opacity: 1;\n }\n ",YG(t),QG(t),'\n\n .PoweredByWrapper {\n display: block;\n left: 0;\n padding-top: 3px;\n position: fixed;\n right: 0;\n text-align: center;\n top: 0;\n }\n\n .contained .PoweredByWrapper {\n position: absolute;\n }\n\n .PoweredByLink {\n color: white;\n display: inline-block;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;\n font-size: 14px;\n font-style: italic;\n font-weight: bold;\n letter-spacing: -0.2px;\n margin-left: 8px;\n opacity: 0.5;\n text-decoration: none;\n text-shadow: black 0 0 2px;\n }\n\n .PoweredByLink:hover, .PoweredByLink:active {\n opacity: 1.0;\n }\n ',"\n\n .GraphicWrapper {\n display: block;\n }\n\n .Graphic {\n width: 50%;\n position: relative;\n }\n ","\n \n .Skeleton {\n background: rgb(230,230,230) !important;\n border: 0px solid transparent !important;\n box-shadow: none !important;\n cursor: inherit !important;\n line-height: 0;\n overflow: hidden;\n position: relative;\n }\n\n @keyframes SkeletonBackgroundAnimation {\n from {\n left: -500px;\n }\n to {\n left: +120%;\n }\n }\n\n .SkeletonBackground {\n animation: 2s SkeletonBackgroundAnimation 0.2s ease infinite;\n background: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.1) 50%, transparent 100%);\n height: 100%;\n left: -140%;\n position: absolute;\n top: 0;\n width: 400px;\n }\n\n .SkeletonWrapper {\n line-height: 0;\n }\n ","\n \n .TokenAmountRow {\n min-width: 0;\n width: 100%;\n display: flex;\n flex-direction: row;\n }\n\n .TokenAmountCell {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .TokenSymbolCell {\n }\n ",KG(t),WG(t),HG(t),"\n\n .Opacity05 {\n opacity: 0.5;\n }\n ","\n\n .PaddingTopXS {\n padding-top: 3px;\n }\n\n .PaddingRightXS {\n padding-right: 3px;\n }\n\n .PaddingBottomXS {\n padding-bottom: 3px;\n }\n\n .PaddingLeftXS {\n padding-left: 3px; \n }\n\n .PaddingTopS {\n padding-top: 13px;\n }\n\n .PaddingRightS {\n padding-right: 13px;\n }\n\n .PaddingBottomS {\n padding-bottom: 13px;\n }\n\n .PaddingLeftS {\n padding-left: 13px; \n }\n\n .PaddingTopM {\n padding-top: 19px;\n }\n\n .PaddingRightM {\n padding-right: 19px;\n }\n\n .PaddingBottomM {\n padding-bottom: 19px;\n }\n\n .PaddingLeftM {\n padding-left: 19px; \n }\n\n .PaddingTopL {\n padding-top: 29px;\n }\n\n .PaddingRightL {\n padding-right: 29px;\n }\n\n .PaddingBottomL {\n padding-bottom: 29px;\n }\n\n .PaddingLeftL {\n padding-left: 29px; \n }\n ","\n\n .MaxHeight {\n max-height: 320px;\n overflow-y: auto;\n }\n ",qG(t),ZG(t),"\n\n .Input {\n background: none;\n border: 1px solid transparent;\n margin: 0;\n outline: none !important;\n padding: 0 0 0 14px;\n width: 100%;\n }\n\n .Input::placeholder {\n color: rgb(210,210,210);\n }\n \n ",JG(t),"\n\n .MaxAmountImage {\n display: inline-block;\n padding-right: 6px;\n }\n \n .MaxAmountImage img {\n height: 16px;\n width: 16px;\n position: relative;\n top: 3px;\n }\n ","\n\n .BlockchainLogo {\n border-radius: 999px;\n }\n\n .BlockchainLogo.small {\n height: 18px;\n width: 18px;\n }\n ",VG(t),"\n\n .TokenImage img {\n border-radius: 9999px;\n border: 1px solid white;\n background: white;\n box-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n height: 45px;\n position: relative;\n vertical-align: middle;\n width: 45px;\n }\n\n .TokenImage.medium img {\n height: 93px;\n width: 93px;\n }\n ","\n\n .Alert {\n background: rgba(0,0,0,0.08);\n border-radius: 7px;\n font-weight: 500;\n padding: 8px;\n }\n ","\n\n .Table {\n border-collapse: separate;\n border-radius: 7px;\n border-style: hidden;\n border: 1px solid rgba(0,0,0,0.1);\n width: 100%;\n }\n\n .Table tr.small td {\n font-size: 14px;\n }\n\n .Table tr td {\n border-bottom: 1px solid rgba(0,0,0,0.1);\n word-break: break-all;\n }\n \n .Table tr:last-child td {\n border-bottom: none;\n }\n \n .Table tr td {\n padding: 8px 15px;\n text-align: left;\n }\n \n .Table tr td:first-child {\n width: 30%\n }\n\n .Table tr td:last-child {\n width: 70%\n }\n \n .Table .TableSubTitle {\n font-weight: 300;\n opacity: 0.7;\n }\n\n .Table tr td:last-child {\n font-weight: 500;\n }\n ",GG(t),XG(t)].join("")}(n);n&&n.css&&(a=[a,n.css].join(" "));var s;s=r?"\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 99999;\n ":"\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 99999;\n ";var u=eq({document:i,element:r||i.body,content:e((function(){setTimeout((function(){u(),"function"==typeof o&&o()}),300)})),outsideStyle:s,insideStyle:a,insideClasses:r?["contained"]:[]}).unmount;return u},rq=function(){return G.createElement("div",{className:"PoweredByWrapper"},G.createElement("a",{href:"https://depay.com",rel:"noopener noreferrer",target:"_blank",className:"PoweredByLink"},"by DePay"))},iq=function(){if(parseInt(G.version.split(".")[0])<17)throw"depay/widgets require at least React v17"},oq=function(t){var e=h(G.useState(!0),2),n=e[0],r=e[1];return G.createElement(Z.Provider,{value:{updatable:n,setUpdatable:r}},t.children)},aq=G.createContext(),sq=G.createContext(),uq=G.createContext();function cq(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||l(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var lq,hq,dq=function(t){var e=cq(t).sort((function(t,e){var n=Wd.from(t.fromBalance).div(Wd.from(t.fromAmount)),r=Wd.from(e.fromBalance).div(Wd.from(e.fromAmount));return n.lt(r)?-1:r.lt(n)?1:0}));return e[e.length-1]},fq=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"up",r=parseFloat(t),i=r.toString().match(/\d+\.0*(\d{4})/);if(null!==(e=i)&&void 0!==e&&e.length){var o,a,s=(i=i[0]).match(/\d{4}$/)[0];return s.match(/^0/)?(o=parseFloat("".concat(s[1],".").concat(s[2]).concat(s[3])),a=parseFloat(o).toFixed(2),a="0".concat(a).replace(".","")):(o="up"==n?parseFloat("".concat(s[0],".").concat(s[1]).concat(s[2],"9")):parseFloat("".concat(s[0],".").concat(s[1]).concat(s[2],"1")),a=parseFloat(o).toFixed(2).replace(".","")),"0999"==a&&0==parseInt(r.toFixed(0))?(a="up"==n?"1000":"0999",parseFloat(i.replace(/\d{4}$/,a))):"1000"==a&&0==parseInt(r.toFixed(0))?parseFloat(i.replace(/\d{5}$/,a)):"0"!=a.toString()[0]&&a.toString().length>3?parseInt(r.toFixed(0)):parseFloat(i.replace(/\d{4}$/,a))}return parseFloat(r.toFixed(3))},pq=G.createContext(),mq=i((function(t,e){(function(){var n,i="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",s=16,u=32,c=64,l=128,h=256,d=1/0,f=9007199254740991,p=NaN,m=4294967295,y=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",u],["partialRight",c],["rearg",h]],g="[object Arguments]",b="[object Array]",v="[object Boolean]",w="[object Date]",M="[object Error]",_="[object Function]",E="[object GeneratorFunction]",A="[object Map]",S="[object Number]",k="[object Object]",N="[object Promise]",T="[object RegExp]",x="[object Set]",L="[object String]",I="[object Symbol]",j="[object WeakMap]",C="[object ArrayBuffer]",D="[object DataView]",O="[object Float32Array]",P="[object Float64Array]",z="[object Int8Array]",R="[object Int16Array]",B="[object Int32Array]",U="[object Uint8Array]",F="[object Uint8ClampedArray]",Y="[object Uint16Array]",Q="[object Uint32Array]",W=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,Z=/[&<>"']/g,V=RegExp(q.source),J=RegExp(Z.source),K=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,et=/^\w*$/,nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rt=/[\\^$.*+?()[\]{}|]/g,it=RegExp(rt.source),ot=/^\s+/,at=/\s/,st=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ut=/\{\n\/\* \[wrapped with (.+)\] \*/,ct=/,? & /,lt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ht=/[()=,{}\[\]\/\s]/,dt=/\\(\\)?/g,ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,mt=/^[-+]0x[0-9a-f]+$/i,yt=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,bt=/^0o[0-7]+$/i,vt=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Mt=/($^)/,_t=/['\n\r\u2028\u2029\\]/g,Et="\\ud800-\\udfff",At="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",St="\\u2700-\\u27bf",kt="a-z\\xdf-\\xf6\\xf8-\\xff",Nt="A-Z\\xc0-\\xd6\\xd8-\\xde",Tt="\\ufe0e\\ufe0f",xt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Lt="['’]",It="["+Et+"]",jt="["+xt+"]",Ct="["+At+"]",Dt="\\d+",Ot="["+St+"]",Pt="["+kt+"]",zt="[^"+Et+xt+Dt+St+kt+Nt+"]",Rt="\\ud83c[\\udffb-\\udfff]",Bt="[^"+Et+"]",Ut="(?:\\ud83c[\\udde6-\\uddff]){2}",Ft="[\\ud800-\\udbff][\\udc00-\\udfff]",Yt="["+Nt+"]",Qt="\\u200d",Wt="(?:"+Pt+"|"+zt+")",Ht="(?:"+Yt+"|"+zt+")",Gt="(?:['’](?:d|ll|m|re|s|t|ve))?",qt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Zt="(?:"+Ct+"|"+Rt+")"+"?",Vt="["+Tt+"]?",Jt=Vt+Zt+("(?:"+Qt+"(?:"+[Bt,Ut,Ft].join("|")+")"+Vt+Zt+")*"),Kt="(?:"+[Ot,Ut,Ft].join("|")+")"+Jt,Xt="(?:"+[Bt+Ct+"?",Ct,Ut,Ft,It].join("|")+")",$t=RegExp(Lt,"g"),te=RegExp(Ct,"g"),ee=RegExp(Rt+"(?="+Rt+")|"+Xt+Jt,"g"),ne=RegExp([Yt+"?"+Pt+"+"+Gt+"(?="+[jt,Yt,"$"].join("|")+")",Ht+"+"+qt+"(?="+[jt,Yt+Wt,"$"].join("|")+")",Yt+"?"+Wt+"+"+Gt,Yt+"+"+qt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Dt,Kt].join("|"),"g"),re=RegExp("["+Qt+Et+At+Tt+"]"),ie=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,oe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ae=-1,se={};se[O]=se[P]=se[z]=se[R]=se[B]=se[U]=se[F]=se[Y]=se[Q]=!0,se[g]=se[b]=se[C]=se[v]=se[D]=se[w]=se[M]=se[_]=se[A]=se[S]=se[k]=se[T]=se[x]=se[L]=se[j]=!1;var ue={};ue[g]=ue[b]=ue[C]=ue[D]=ue[v]=ue[w]=ue[O]=ue[P]=ue[z]=ue[R]=ue[B]=ue[A]=ue[S]=ue[k]=ue[T]=ue[x]=ue[L]=ue[I]=ue[U]=ue[F]=ue[Y]=ue[Q]=!0,ue[M]=ue[_]=ue[j]=!1;var ce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},le=parseFloat,he=parseInt,de="object"==typeof r&&r&&r.Object===Object&&r,fe="object"==typeof self&&self&&self.Object===Object&&self,pe=de||fe||Function("return this")(),me=e&&!e.nodeType&&e,ye=me&&t&&!t.nodeType&&t,ge=ye&&ye.exports===me,be=ge&&de.process,ve=function(){try{var t=ye&&ye.require&&ye.require("util").types;return t||be&&be.binding&&be.binding("util")}catch(t){}}(),we=ve&&ve.isArrayBuffer,Me=ve&&ve.isDate,_e=ve&&ve.isMap,Ee=ve&&ve.isRegExp,Ae=ve&&ve.isSet,Se=ve&&ve.isTypedArray;function ke(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ne(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function Te(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function xe(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Le(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Ie(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function je(t,e){return!!(null==t?0:t.length)&&Ye(t,e,0)>-1}function Ce(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function De(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function Oe(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Pe(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function ze(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Re(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Be=Ge("length");function Ue(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function Fe(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Ye(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):Fe(t,We,n)}function Qe(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function We(t){return t!=t}function He(t,e){var n=null==t?0:t.length;return n?Ve(t,e)/n:p}function Ge(t){return function(e){return null==e?n:e[t]}}function qe(t){return function(e){return null==t?n:t[e]}}function Ze(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function Ve(t,e){for(var r,i=-1,o=t.length;++i<o;){var a=e(t[i]);a!==n&&(r=r===n?a:r+a)}return r}function Je(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ke(t){return t?t.slice(0,yn(t)+1).replace(ot,""):t}function Xe(t){return function(e){return t(e)}}function $e(t,e){return De(e,(function(e){return t[e]}))}function tn(t,e){return t.has(e)}function en(t,e){for(var n=-1,r=t.length;++n<r&&Ye(e,t[n],0)>-1;);return n}function nn(t,e){for(var n=t.length;n--&&Ye(e,t[n],0)>-1;);return n}function rn(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var on=qe({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),an=qe({"&":"&","<":"<",">":">",'"':""","'":"'"});function sn(t){return"\\"+ce[t]}function un(t){return re.test(t)}function cn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function ln(t,e){return function(n){return t(e(n))}}function hn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var s=t[n];s!==e&&s!==a||(t[n]=a,o[i++]=n)}return o}function dn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function fn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function pn(t){return un(t)?function(t){var e=ee.lastIndex=0;for(;ee.test(t);)++e;return e}(t):Be(t)}function mn(t){return un(t)?function(t){return t.match(ee)||[]}(t):function(t){return t.split("")}(t)}function yn(t){for(var e=t.length;e--&&at.test(t.charAt(e)););return e}var gn=qe({"&":"&","<":"<",">":">",""":'"',"'":"'"});var bn=function t(e){var r,at=(e=null==e?pe:bn.defaults(pe.Object(),e,bn.pick(pe,oe))).Array,Et=e.Date,At=e.Error,St=e.Function,kt=e.Math,Nt=e.Object,Tt=e.RegExp,xt=e.String,Lt=e.TypeError,It=at.prototype,jt=St.prototype,Ct=Nt.prototype,Dt=e["__core-js_shared__"],Ot=jt.toString,Pt=Ct.hasOwnProperty,zt=0,Rt=(r=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Bt=Ct.toString,Ut=Ot.call(Nt),Ft=pe._,Yt=Tt("^"+Ot.call(Pt).replace(rt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qt=ge?e.Buffer:n,Wt=e.Symbol,Ht=e.Uint8Array,Gt=Qt?Qt.allocUnsafe:n,qt=ln(Nt.getPrototypeOf,Nt),Zt=Nt.create,Vt=Ct.propertyIsEnumerable,Jt=It.splice,Kt=Wt?Wt.isConcatSpreadable:n,Xt=Wt?Wt.iterator:n,ee=Wt?Wt.toStringTag:n,re=function(){try{var t=po(Nt,"defineProperty");return t({},"",{}),t}catch(t){}}(),ce=e.clearTimeout!==pe.clearTimeout&&e.clearTimeout,de=Et&&Et.now!==pe.Date.now&&Et.now,fe=e.setTimeout!==pe.setTimeout&&e.setTimeout,me=kt.ceil,ye=kt.floor,be=Nt.getOwnPropertySymbols,ve=Qt?Qt.isBuffer:n,Be=e.isFinite,qe=It.join,vn=ln(Nt.keys,Nt),wn=kt.max,Mn=kt.min,_n=Et.now,En=e.parseInt,An=kt.random,Sn=It.reverse,kn=po(e,"DataView"),Nn=po(e,"Map"),Tn=po(e,"Promise"),xn=po(e,"Set"),Ln=po(e,"WeakMap"),In=po(Nt,"create"),jn=Ln&&new Ln,Cn={},Dn=Fo(kn),On=Fo(Nn),Pn=Fo(Tn),zn=Fo(xn),Rn=Fo(Ln),Bn=Wt?Wt.prototype:n,Un=Bn?Bn.valueOf:n,Fn=Bn?Bn.toString:n;function Yn(t){if(is(t)&&!qa(t)&&!(t instanceof Gn)){if(t instanceof Hn)return t;if(Pt.call(t,"__wrapped__"))return Yo(t)}return new Hn(t)}var Qn=function(){function t(){}return function(e){if(!rs(e))return{};if(Zt)return Zt(e);t.prototype=e;var r=new t;return t.prototype=n,r}}();function Wn(){}function Hn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=n}function Gn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function qn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Zn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Vn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Jn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Vn;++e<n;)this.add(t[e])}function Kn(t){var e=this.__data__=new Zn(t);this.size=e.size}function Xn(t,e){var n=qa(t),r=!n&&Ga(t),i=!n&&!r&&Ka(t),o=!n&&!r&&!i&&ds(t),a=n||r||i||o,s=a?Je(t.length,xt):[],u=s.length;for(var c in t)!e&&!Pt.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Mo(c,u))||s.push(c);return s}function $n(t){var e=t.length;return e?t[Jr(0,e-1)]:n}function tr(t,e){return Ro(Ii(t),cr(e,0,t.length))}function er(t){return Ro(Ii(t))}function nr(t,e,r){(r!==n&&!Qa(t[e],r)||r===n&&!(e in t))&&sr(t,e,r)}function rr(t,e,r){var i=t[e];Pt.call(t,e)&&Qa(i,r)&&(r!==n||e in t)||sr(t,e,r)}function ir(t,e){for(var n=t.length;n--;)if(Qa(t[n][0],e))return n;return-1}function or(t,e,n,r){return pr(t,(function(t,i,o){e(r,t,n(t),o)})),r}function ar(t,e){return t&&ji(e,Ds(e),t)}function sr(t,e,n){"__proto__"==e&&re?re(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ur(t,e){for(var r=-1,i=e.length,o=at(i),a=null==t;++r<i;)o[r]=a?n:xs(t,e[r]);return o}function cr(t,e,r){return t==t&&(r!==n&&(t=t<=r?t:r),e!==n&&(t=t>=e?t:e)),t}function lr(t,e,r,i,o,a){var s,u=1&e,c=2&e,l=4&e;if(r&&(s=o?r(t,i,o,a):r(t)),s!==n)return s;if(!rs(t))return t;var h=qa(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&Pt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!u)return Ii(t,s)}else{var d=go(t),f=d==_||d==E;if(Ka(t))return Si(t,u);if(d==k||d==g||f&&!o){if(s=c||f?{}:vo(t),!u)return c?function(t,e){return ji(t,yo(t),e)}(t,function(t,e){return t&&ji(e,Os(e),t)}(s,t)):function(t,e){return ji(t,mo(t),e)}(t,ar(s,t))}else{if(!ue[d])return o?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case C:return ki(t);case v:case w:return new r(+t);case D:return function(t,e){var n=e?ki(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case O:case P:case z:case R:case B:case U:case F:case Y:case Q:return Ni(t,n);case A:return new r;case S:case L:return new r(t);case T:return function(t){var e=new t.constructor(t.source,pt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case x:return new r;case I:return i=t,Un?Nt(Un.call(i)):{}}var i}(t,d,u)}}a||(a=new Kn);var p=a.get(t);if(p)return p;a.set(t,s),cs(t)?t.forEach((function(n){s.add(lr(n,e,r,n,t,a))})):os(t)&&t.forEach((function(n,i){s.set(i,lr(n,e,r,i,t,a))}));var m=h?n:(l?c?ao:oo:c?Os:Ds)(t);return Te(m||t,(function(n,i){m&&(n=t[i=n]),rr(s,i,lr(n,e,r,i,t,a))})),s}function hr(t,e,r){var i=r.length;if(null==t)return!i;for(t=Nt(t);i--;){var o=r[i],a=e[o],s=t[o];if(s===n&&!(o in t)||!a(s))return!1}return!0}function dr(t,e,r){if("function"!=typeof t)throw new Lt(i);return Do((function(){t.apply(n,r)}),e)}function fr(t,e,n,r){var i=-1,o=je,a=!0,s=t.length,u=[],c=e.length;if(!s)return u;n&&(e=De(e,Xe(n))),r?(o=Ce,a=!1):e.length>=200&&(o=tn,a=!1,e=new Jn(e));t:for(;++i<s;){var l=t[i],h=null==n?l:n(l);if(l=r||0!==l?l:0,a&&h==h){for(var d=c;d--;)if(e[d]===h)continue t;u.push(l)}else o(e,h,r)||u.push(l)}return u}Yn.templateSettings={escape:K,evaluate:X,interpolate:$,variable:"",imports:{_:Yn}},Yn.prototype=Wn.prototype,Yn.prototype.constructor=Yn,Hn.prototype=Qn(Wn.prototype),Hn.prototype.constructor=Hn,Gn.prototype=Qn(Wn.prototype),Gn.prototype.constructor=Gn,qn.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},qn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},qn.prototype.get=function(t){var e=this.__data__;if(In){var r=e[t];return r===o?n:r}return Pt.call(e,t)?e[t]:n},qn.prototype.has=function(t){var e=this.__data__;return In?e[t]!==n:Pt.call(e,t)},qn.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=In&&e===n?o:e,this},Zn.prototype.clear=function(){this.__data__=[],this.size=0},Zn.prototype.delete=function(t){var e=this.__data__,n=ir(e,t);return!(n<0)&&(n==e.length-1?e.pop():Jt.call(e,n,1),--this.size,!0)},Zn.prototype.get=function(t){var e=this.__data__,r=ir(e,t);return r<0?n:e[r][1]},Zn.prototype.has=function(t){return ir(this.__data__,t)>-1},Zn.prototype.set=function(t,e){var n=this.__data__,r=ir(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new qn,map:new(Nn||Zn),string:new qn}},Vn.prototype.delete=function(t){var e=ho(this,t).delete(t);return this.size-=e?1:0,e},Vn.prototype.get=function(t){return ho(this,t).get(t)},Vn.prototype.has=function(t){return ho(this,t).has(t)},Vn.prototype.set=function(t,e){var n=ho(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Jn.prototype.add=Jn.prototype.push=function(t){return this.__data__.set(t,o),this},Jn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.clear=function(){this.__data__=new Zn,this.size=0},Kn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Kn.prototype.get=function(t){return this.__data__.get(t)},Kn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Zn){var r=n.__data__;if(!Nn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Vn(r)}return n.set(t,e),this.size=n.size,this};var pr=Oi(_r),mr=Oi(Er,!0);function yr(t,e){var n=!0;return pr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function gr(t,e,r){for(var i=-1,o=t.length;++i<o;){var a=t[i],s=e(a);if(null!=s&&(u===n?s==s&&!hs(s):r(s,u)))var u=s,c=a}return c}function br(t,e){var n=[];return pr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function vr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=wo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?vr(s,e-1,n,r,i):Oe(i,s):r||(i[i.length]=s)}return i}var wr=Pi(),Mr=Pi(!0);function _r(t,e){return t&&wr(t,e,Ds)}function Er(t,e){return t&&Mr(t,e,Ds)}function Ar(t,e){return Ie(e,(function(e){return ts(t[e])}))}function Sr(t,e){for(var r=0,i=(e=Mi(e,t)).length;null!=t&&r<i;)t=t[Uo(e[r++])];return r&&r==i?t:n}function kr(t,e,n){var r=e(t);return qa(t)?r:Oe(r,n(t))}function Nr(t){return null==t?t===n?"[object Undefined]":"[object Null]":ee&&ee in Nt(t)?function(t){var e=Pt.call(t,ee),r=t[ee];try{t[ee]=n;var i=!0}catch(t){}var o=Bt.call(t);i&&(e?t[ee]=r:delete t[ee]);return o}(t):function(t){return Bt.call(t)}(t)}function Tr(t,e){return t>e}function xr(t,e){return null!=t&&Pt.call(t,e)}function Lr(t,e){return null!=t&&e in Nt(t)}function Ir(t,e,r){for(var i=r?Ce:je,o=t[0].length,a=t.length,s=a,u=at(a),c=1/0,l=[];s--;){var h=t[s];s&&e&&(h=De(h,Xe(e))),c=Mn(h.length,c),u[s]=!r&&(e||o>=120&&h.length>=120)?new Jn(s&&h):n}h=t[0];var d=-1,f=u[0];t:for(;++d<o&&l.length<c;){var p=h[d],m=e?e(p):p;if(p=r||0!==p?p:0,!(f?tn(f,m):i(l,m,r))){for(s=a;--s;){var y=u[s];if(!(y?tn(y,m):i(t[s],m,r)))continue t}f&&f.push(m),l.push(p)}}return l}function jr(t,e,r){var i=null==(t=Lo(t,e=Mi(e,t)))?t:t[Uo($o(e))];return null==i?n:ke(i,t,r)}function Cr(t){return is(t)&&Nr(t)==g}function Dr(t,e,r,i,o){return t===e||(null==t||null==e||!is(t)&&!is(e)?t!=t&&e!=e:function(t,e,r,i,o,a){var s=qa(t),u=qa(e),c=s?b:go(t),l=u?b:go(e),h=(c=c==g?k:c)==k,d=(l=l==g?k:l)==k,f=c==l;if(f&&Ka(t)){if(!Ka(e))return!1;s=!0,h=!1}if(f&&!h)return a||(a=new Kn),s||ds(t)?ro(t,e,r,i,o,a):function(t,e,n,r,i,o,a){switch(n){case D:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case C:return!(t.byteLength!=e.byteLength||!o(new Ht(t),new Ht(e)));case v:case w:case S:return Qa(+t,+e);case M:return t.name==e.name&&t.message==e.message;case T:case L:return t==e+"";case A:var s=cn;case x:var u=1&r;if(s||(s=dn),t.size!=e.size&&!u)return!1;var c=a.get(t);if(c)return c==e;r|=2,a.set(t,e);var l=ro(s(t),s(e),r,i,o,a);return a.delete(t),l;case I:if(Un)return Un.call(t)==Un.call(e)}return!1}(t,e,c,r,i,o,a);if(!(1&r)){var p=h&&Pt.call(t,"__wrapped__"),m=d&&Pt.call(e,"__wrapped__");if(p||m){var y=p?t.value():t,_=m?e.value():e;return a||(a=new Kn),o(y,_,r,i,a)}}if(!f)return!1;return a||(a=new Kn),function(t,e,r,i,o,a){var s=1&r,u=oo(t),c=u.length,l=oo(e),h=l.length;if(c!=h&&!s)return!1;var d=c;for(;d--;){var f=u[d];if(!(s?f in e:Pt.call(e,f)))return!1}var p=a.get(t),m=a.get(e);if(p&&m)return p==e&&m==t;var y=!0;a.set(t,e),a.set(e,t);var g=s;for(;++d<c;){var b=t[f=u[d]],v=e[f];if(i)var w=s?i(v,b,f,e,t,a):i(b,v,f,t,e,a);if(!(w===n?b===v||o(b,v,r,i,a):w)){y=!1;break}g||(g="constructor"==f)}if(y&&!g){var M=t.constructor,_=e.constructor;M==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof M&&M instanceof M&&"function"==typeof _&&_ instanceof _||(y=!1)}return a.delete(t),a.delete(e),y}(t,e,r,i,o,a)}(t,e,r,i,Dr,o))}function Or(t,e,r,i){var o=r.length,a=o,s=!i;if(null==t)return!a;for(t=Nt(t);o--;){var u=r[o];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<a;){var c=(u=r[o])[0],l=t[c],h=u[1];if(s&&u[2]){if(l===n&&!(c in t))return!1}else{var d=new Kn;if(i)var f=i(l,h,c,t,e,d);if(!(f===n?Dr(h,l,3,i,d):f))return!1}}return!0}function Pr(t){return!(!rs(t)||(e=t,Rt&&Rt in e))&&(ts(t)?Yt:gt).test(Fo(t));var e}function zr(t){return"function"==typeof t?t:null==t?au:"object"==typeof t?qa(t)?Qr(t[0],t[1]):Yr(t):mu(t)}function Rr(t){if(!ko(t))return vn(t);var e=[];for(var n in Nt(t))Pt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Br(t){if(!rs(t))return function(t){var e=[];if(null!=t)for(var n in Nt(t))e.push(n);return e}(t);var e=ko(t),n=[];for(var r in t)("constructor"!=r||!e&&Pt.call(t,r))&&n.push(r);return n}function Ur(t,e){return t<e}function Fr(t,e){var n=-1,r=Va(t)?at(t.length):[];return pr(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function Yr(t){var e=fo(t);return 1==e.length&&e[0][2]?To(e[0][0],e[0][1]):function(n){return n===t||Or(n,t,e)}}function Qr(t,e){return Eo(t)&&No(e)?To(Uo(t),e):function(r){var i=xs(r,t);return i===n&&i===e?Ls(r,t):Dr(e,i,3)}}function Wr(t,e,r,i,o){t!==e&&wr(e,(function(a,s){if(o||(o=new Kn),rs(a))!function(t,e,r,i,o,a,s){var u=jo(t,r),c=jo(e,r),l=s.get(c);if(l)return void nr(t,r,l);var h=a?a(u,c,r+"",t,e,s):n,d=h===n;if(d){var f=qa(c),p=!f&&Ka(c),m=!f&&!p&&ds(c);h=c,f||p||m?qa(u)?h=u:Ja(u)?h=Ii(u):p?(d=!1,h=Si(c,!0)):m?(d=!1,h=Ni(c,!0)):h=[]:ss(c)||Ga(c)?(h=u,Ga(u)?h=ws(u):rs(u)&&!ts(u)||(h=vo(c))):d=!1}d&&(s.set(c,h),o(h,c,i,a,s),s.delete(c));nr(t,r,h)}(t,e,s,r,Wr,i,o);else{var u=i?i(jo(t,s),a,s+"",t,e,o):n;u===n&&(u=a),nr(t,s,u)}}),Os)}function Hr(t,e){var r=t.length;if(r)return Mo(e+=e<0?r:0,r)?t[e]:n}function Gr(t,e,n){e=e.length?De(e,(function(t){return qa(t)?function(e){return Sr(e,1===t.length?t[0]:t)}:t})):[au];var r=-1;e=De(e,Xe(lo()));var i=Fr(t,(function(t,n,i){var o=De(e,(function(e){return e(t)}));return{criteria:o,index:++r,value:t}}));return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(i,(function(t,e){return function(t,e,n){var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;for(;++r<a;){var u=Ti(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function qr(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Sr(t,a);n(s,a)&&ei(o,Mi(a,t),s)}return o}function Zr(t,e,n,r){var i=r?Qe:Ye,o=-1,a=e.length,s=t;for(t===e&&(e=Ii(e)),n&&(s=De(t,Xe(n)));++o<a;)for(var u=0,c=e[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==t&&Jt.call(s,u,1),Jt.call(t,u,1);return t}function Vr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;Mo(i)?Jt.call(t,i,1):fi(t,i)}}return t}function Jr(t,e){return t+ye(An()*(e-t+1))}function Kr(t,e){var n="";if(!t||e<1||e>f)return n;do{e%2&&(n+=t),(e=ye(e/2))&&(t+=t)}while(e);return n}function Xr(t,e){return Oo(xo(t,e,au),t+"")}function $r(t){return $n(Qs(t))}function ti(t,e){var n=Qs(t);return Ro(n,cr(e,0,n.length))}function ei(t,e,r,i){if(!rs(t))return t;for(var o=-1,a=(e=Mi(e,t)).length,s=a-1,u=t;null!=u&&++o<a;){var c=Uo(e[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=s){var h=u[c];(l=i?i(h,c,u):n)===n&&(l=rs(h)?h:Mo(e[o+1])?[]:{})}rr(u,c,l),u=u[c]}return t}var ni=jn?function(t,e){return jn.set(t,e),t}:au,ri=re?function(t,e){return re(t,"toString",{configurable:!0,enumerable:!1,value:ru(e),writable:!0})}:au;function ii(t){return Ro(Qs(t))}function oi(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=at(i);++r<i;)o[r]=t[r+e];return o}function ai(t,e){var n;return pr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function si(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!hs(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return ui(t,e,au,n)}function ui(t,e,r,i){var o=0,a=null==t?0:t.length;if(0===a)return 0;for(var s=(e=r(e))!=e,u=null===e,c=hs(e),l=e===n;o<a;){var h=ye((o+a)/2),d=r(t[h]),f=d!==n,p=null===d,m=d==d,y=hs(d);if(s)var g=i||m;else g=l?m&&(i||f):u?m&&f&&(i||!p):c?m&&f&&!p&&(i||!y):!p&&!y&&(i?d<=e:d<e);g?o=h+1:a=h}return Mn(a,4294967294)}function ci(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!Qa(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function li(t){return"number"==typeof t?t:hs(t)?p:+t}function hi(t){if("string"==typeof t)return t;if(qa(t))return De(t,hi)+"";if(hs(t))return Fn?Fn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function di(t,e,n){var r=-1,i=je,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=Ce;else if(o>=200){var c=e?null:Ki(t);if(c)return dn(c);a=!1,i=tn,u=new Jn}else u=e?[]:s;t:for(;++r<o;){var l=t[r],h=e?e(l):l;if(l=n||0!==l?l:0,a&&h==h){for(var d=u.length;d--;)if(u[d]===h)continue t;e&&u.push(h),s.push(l)}else i(u,h,n)||(u!==s&&u.push(h),s.push(l))}return s}function fi(t,e){return null==(t=Lo(t,e=Mi(e,t)))||delete t[Uo($o(e))]}function pi(t,e,n,r){return ei(t,e,n(Sr(t,e)),r)}function mi(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?oi(t,r?0:o,r?o+1:i):oi(t,r?o+1:0,r?i:o)}function yi(t,e){var n=t;return n instanceof Gn&&(n=n.value()),Pe(e,(function(t,e){return e.func.apply(e.thisArg,Oe([t],e.args))}),n)}function gi(t,e,n){var r=t.length;if(r<2)return r?di(t[0]):[];for(var i=-1,o=at(r);++i<r;)for(var a=t[i],s=-1;++s<r;)s!=i&&(o[i]=fr(o[i]||a,t[s],e,n));return di(vr(o,1),e,n)}function bi(t,e,r){for(var i=-1,o=t.length,a=e.length,s={};++i<o;){var u=i<a?e[i]:n;r(s,t[i],u)}return s}function vi(t){return Ja(t)?t:[]}function wi(t){return"function"==typeof t?t:au}function Mi(t,e){return qa(t)?t:Eo(t,e)?[t]:Bo(Ms(t))}var _i=Xr;function Ei(t,e,r){var i=t.length;return r=r===n?i:r,!e&&r>=i?t:oi(t,e,r)}var Ai=ce||function(t){return pe.clearTimeout(t)};function Si(t,e){if(e)return t.slice();var n=t.length,r=Gt?Gt(n):new t.constructor(n);return t.copy(r),r}function ki(t){var e=new t.constructor(t.byteLength);return new Ht(e).set(new Ht(t)),e}function Ni(t,e){var n=e?ki(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ti(t,e){if(t!==e){var r=t!==n,i=null===t,o=t==t,a=hs(t),s=e!==n,u=null===e,c=e==e,l=hs(e);if(!u&&!l&&!a&&t>e||a&&s&&c&&!u&&!l||i&&s&&c||!r&&c||!o)return 1;if(!i&&!a&&!l&&t<e||l&&r&&o&&!i&&!a||u&&r&&o||!s&&o||!c)return-1}return 0}function xi(t,e,n,r){for(var i=-1,o=t.length,a=n.length,s=-1,u=e.length,c=wn(o-a,0),l=at(u+c),h=!r;++s<u;)l[s]=e[s];for(;++i<a;)(h||i<o)&&(l[n[i]]=t[i]);for(;c--;)l[s++]=t[i++];return l}function Li(t,e,n,r){for(var i=-1,o=t.length,a=-1,s=n.length,u=-1,c=e.length,l=wn(o-s,0),h=at(l+c),d=!r;++i<l;)h[i]=t[i];for(var f=i;++u<c;)h[f+u]=e[u];for(;++a<s;)(d||i<o)&&(h[f+n[a]]=t[i++]);return h}function Ii(t,e){var n=-1,r=t.length;for(e||(e=at(r));++n<r;)e[n]=t[n];return e}function ji(t,e,r,i){var o=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var u=e[a],c=i?i(r[u],t[u],u,r,t):n;c===n&&(c=t[u]),o?sr(r,u,c):rr(r,u,c)}return r}function Ci(t,e){return function(n,r){var i=qa(n)?Ne:or,o=e?e():{};return i(n,t,lo(r,2),o)}}function Di(t){return Xr((function(e,r){var i=-1,o=r.length,a=o>1?r[o-1]:n,s=o>2?r[2]:n;for(a=t.length>3&&"function"==typeof a?(o--,a):n,s&&_o(r[0],r[1],s)&&(a=o<3?n:a,o=1),e=Nt(e);++i<o;){var u=r[i];u&&t(e,u,i,a)}return e}))}function Oi(t,e){return function(n,r){if(null==n)return n;if(!Va(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Nt(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Pi(t){return function(e,n,r){for(var i=-1,o=Nt(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}function zi(t){return function(e){var r=un(e=Ms(e))?mn(e):n,i=r?r[0]:e.charAt(0),o=r?Ei(r,1).join(""):e.slice(1);return i[t]()+o}}function Ri(t){return function(e){return Pe(tu(Gs(e).replace($t,"")),t,"")}}function Bi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Qn(t.prototype),r=t.apply(n,e);return rs(r)?r:n}}function Ui(t){return function(e,r,i){var o=Nt(e);if(!Va(e)){var a=lo(r,3);e=Ds(e),r=function(t){return a(o[t],t,o)}}var s=t(e,r,i);return s>-1?o[a?e[s]:s]:n}}function Fi(t){return io((function(e){var r=e.length,o=r,a=Hn.prototype.thru;for(t&&e.reverse();o--;){var s=e[o];if("function"!=typeof s)throw new Lt(i);if(a&&!u&&"wrapper"==uo(s))var u=new Hn([],!0)}for(o=u?o:r;++o<r;){var c=uo(s=e[o]),l="wrapper"==c?so(s):n;u=l&&Ao(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[uo(l[0])].apply(u,l[3]):1==s.length&&Ao(s)?u[c]():u.thru(s)}return function(){var t=arguments,n=t[0];if(u&&1==t.length&&qa(n))return u.plant(n).value();for(var i=0,o=r?e[i].apply(this,t):n;++i<r;)o=e[i].call(this,o);return o}}))}function Yi(t,e,r,i,o,a,s,u,c,h){var d=e&l,f=1&e,p=2&e,m=24&e,y=512&e,g=p?n:Bi(t);return function n(){for(var l=arguments.length,b=at(l),v=l;v--;)b[v]=arguments[v];if(m)var w=co(n),M=rn(b,w);if(i&&(b=xi(b,i,o,m)),a&&(b=Li(b,a,s,m)),l-=M,m&&l<h){var _=hn(b,w);return Vi(t,e,Yi,n.placeholder,r,b,_,u,c,h-l)}var E=f?r:this,A=p?E[t]:t;return l=b.length,u?b=Io(b,u):y&&l>1&&b.reverse(),d&&c<l&&(b.length=c),this&&this!==pe&&this instanceof n&&(A=g||Bi(A)),A.apply(E,b)}}function Qi(t,e){return function(n,r){return function(t,e,n,r){return _r(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Wi(t,e){return function(r,i){var o;if(r===n&&i===n)return e;if(r!==n&&(o=r),i!==n){if(o===n)return i;"string"==typeof r||"string"==typeof i?(r=hi(r),i=hi(i)):(r=li(r),i=li(i)),o=t(r,i)}return o}}function Hi(t){return io((function(e){return e=De(e,Xe(lo())),Xr((function(n){var r=this;return t(e,(function(t){return ke(t,r,n)}))}))}))}function Gi(t,e){var r=(e=e===n?" ":hi(e)).length;if(r<2)return r?Kr(e,t):e;var i=Kr(e,me(t/pn(e)));return un(e)?Ei(mn(i),0,t).join(""):i.slice(0,t)}function qi(t){return function(e,r,i){return i&&"number"!=typeof i&&_o(e,r,i)&&(r=i=n),e=ys(e),r===n?(r=e,e=0):r=ys(r),function(t,e,n,r){for(var i=-1,o=wn(me((e-t)/(n||1)),0),a=at(o);o--;)a[r?o:++i]=t,t+=n;return a}(e,r,i=i===n?e<r?1:-1:ys(i),t)}}function Zi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=vs(e),n=vs(n)),t(e,n)}}function Vi(t,e,r,i,o,a,s,l,h,d){var f=8&e;e|=f?u:c,4&(e&=~(f?c:u))||(e&=-4);var p=[t,e,o,f?a:n,f?s:n,f?n:a,f?n:s,l,h,d],m=r.apply(n,p);return Ao(t)&&Co(m,p),m.placeholder=i,Po(m,t,e)}function Ji(t){var e=kt[t];return function(t,n){if(t=vs(t),(n=null==n?0:Mn(gs(n),292))&&Be(t)){var r=(Ms(t)+"e").split("e");return+((r=(Ms(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Ki=xn&&1/dn(new xn([,-0]))[1]==d?function(t){return new xn(t)}:hu;function Xi(t){return function(e){var n=go(e);return n==A?cn(e):n==x?fn(e):function(t,e){return De(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function $i(t,e,r,o,d,f,p,m){var y=2&e;if(!y&&"function"!=typeof t)throw new Lt(i);var g=o?o.length:0;if(g||(e&=-97,o=d=n),p=p===n?p:wn(gs(p),0),m=m===n?m:gs(m),g-=d?d.length:0,e&c){var b=o,v=d;o=d=n}var w=y?n:so(t),M=[t,e,r,o,d,b,v,f,p,m];if(w&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,s=r==l&&8==n||r==l&&n==h&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!s)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var u=e[3];if(u){var c=t[3];t[3]=c?xi(c,u,e[4]):u,t[4]=c?hn(t[3],a):e[4]}(u=e[5])&&(c=t[5],t[5]=c?Li(c,u,e[6]):u,t[6]=c?hn(t[5],a):e[6]);(u=e[7])&&(t[7]=u);r&l&&(t[8]=null==t[8]?e[8]:Mn(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=i}(M,w),t=M[0],e=M[1],r=M[2],o=M[3],d=M[4],!(m=M[9]=M[9]===n?y?0:t.length:wn(M[9]-g,0))&&24&e&&(e&=-25),e&&1!=e)_=8==e||e==s?function(t,e,r){var i=Bi(t);return function o(){for(var a=arguments.length,s=at(a),u=a,c=co(o);u--;)s[u]=arguments[u];var l=a<3&&s[0]!==c&&s[a-1]!==c?[]:hn(s,c);return(a-=l.length)<r?Vi(t,e,Yi,o.placeholder,n,s,l,n,n,r-a):ke(this&&this!==pe&&this instanceof o?i:t,this,s)}}(t,e,m):e!=u&&33!=e||d.length?Yi.apply(n,M):function(t,e,n,r){var i=1&e,o=Bi(t);return function e(){for(var a=-1,s=arguments.length,u=-1,c=r.length,l=at(c+s),h=this&&this!==pe&&this instanceof e?o:t;++u<c;)l[u]=r[u];for(;s--;)l[u++]=arguments[++a];return ke(h,i?n:this,l)}}(t,e,r,o);else var _=function(t,e,n){var r=1&e,i=Bi(t);return function e(){return(this&&this!==pe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,r);return Po((w?ni:Co)(_,M),t,e)}function to(t,e,r,i){return t===n||Qa(t,Ct[r])&&!Pt.call(i,r)?e:t}function eo(t,e,r,i,o,a){return rs(t)&&rs(e)&&(a.set(e,t),Wr(t,e,n,eo,a),a.delete(e)),t}function no(t){return ss(t)?n:t}function ro(t,e,r,i,o,a){var s=1&r,u=t.length,c=e.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(t),h=a.get(e);if(l&&h)return l==e&&h==t;var d=-1,f=!0,p=2&r?new Jn:n;for(a.set(t,e),a.set(e,t);++d<u;){var m=t[d],y=e[d];if(i)var g=s?i(y,m,d,e,t,a):i(m,y,d,t,e,a);if(g!==n){if(g)continue;f=!1;break}if(p){if(!Re(e,(function(t,e){if(!tn(p,e)&&(m===t||o(m,t,r,i,a)))return p.push(e)}))){f=!1;break}}else if(m!==y&&!o(m,y,r,i,a)){f=!1;break}}return a.delete(t),a.delete(e),f}function io(t){return Oo(xo(t,n,Zo),t+"")}function oo(t){return kr(t,Ds,mo)}function ao(t){return kr(t,Os,yo)}var so=jn?function(t){return jn.get(t)}:hu;function uo(t){for(var e=t.name+"",n=Cn[e],r=Pt.call(Cn,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function co(t){return(Pt.call(Yn,"placeholder")?Yn:t).placeholder}function lo(){var t=Yn.iteratee||su;return t=t===su?zr:t,arguments.length?t(arguments[0],arguments[1]):t}function ho(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function fo(t){for(var e=Ds(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,No(i)]}return e}function po(t,e){var r=function(t,e){return null==t?n:t[e]}(t,e);return Pr(r)?r:n}var mo=be?function(t){return null==t?[]:(t=Nt(t),Ie(be(t),(function(e){return Vt.call(t,e)})))}:bu,yo=be?function(t){for(var e=[];t;)Oe(e,mo(t)),t=qt(t);return e}:bu,go=Nr;function bo(t,e,n){for(var r=-1,i=(e=Mi(e,t)).length,o=!1;++r<i;){var a=Uo(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&ns(i)&&Mo(a,i)&&(qa(t)||Ga(t))}function vo(t){return"function"!=typeof t.constructor||ko(t)?{}:Qn(qt(t))}function wo(t){return qa(t)||Ga(t)||!!(Kt&&t&&t[Kt])}function Mo(t,e){var n=typeof t;return!!(e=null==e?f:e)&&("number"==n||"symbol"!=n&&vt.test(t))&&t>-1&&t%1==0&&t<e}function _o(t,e,n){if(!rs(n))return!1;var r=typeof e;return!!("number"==r?Va(n)&&Mo(e,n.length):"string"==r&&e in n)&&Qa(n[e],t)}function Eo(t,e){if(qa(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!hs(t))||(et.test(t)||!tt.test(t)||null!=e&&t in Nt(e))}function Ao(t){var e=uo(t),n=Yn[e];if("function"!=typeof n||!(e in Gn.prototype))return!1;if(t===n)return!0;var r=so(n);return!!r&&t===r[0]}(kn&&go(new kn(new ArrayBuffer(1)))!=D||Nn&&go(new Nn)!=A||Tn&&go(Tn.resolve())!=N||xn&&go(new xn)!=x||Ln&&go(new Ln)!=j)&&(go=function(t){var e=Nr(t),r=e==k?t.constructor:n,i=r?Fo(r):"";if(i)switch(i){case Dn:return D;case On:return A;case Pn:return N;case zn:return x;case Rn:return j}return e});var So=Dt?ts:vu;function ko(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ct)}function No(t){return t==t&&!rs(t)}function To(t,e){return function(r){return null!=r&&(r[t]===e&&(e!==n||t in Nt(r)))}}function xo(t,e,r){return e=wn(e===n?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=wn(n.length-e,0),a=at(o);++i<o;)a[i]=n[e+i];i=-1;for(var s=at(e+1);++i<e;)s[i]=n[i];return s[e]=r(a),ke(t,this,s)}}function Lo(t,e){return e.length<2?t:Sr(t,oi(e,0,-1))}function Io(t,e){for(var r=t.length,i=Mn(e.length,r),o=Ii(t);i--;){var a=e[i];t[i]=Mo(a,r)?o[a]:n}return t}function jo(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Co=zo(ni),Do=fe||function(t,e){return pe.setTimeout(t,e)},Oo=zo(ri);function Po(t,e,n){var r=e+"";return Oo(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(st,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Te(y,(function(n){var r="_."+n[0];e&n[1]&&!je(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(ut);return e?e[1].split(ct):[]}(r),n)))}function zo(t){var e=0,r=0;return function(){var i=_n(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(n,arguments)}}function Ro(t,e){var r=-1,i=t.length,o=i-1;for(e=e===n?i:e;++r<e;){var a=Jr(r,o),s=t[a];t[a]=t[r],t[r]=s}return t.length=e,t}var Bo=function(t){var e=za(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(nt,(function(t,n,r,i){e.push(r?i.replace(dt,"$1"):n||t)})),e}));function Uo(t){if("string"==typeof t||hs(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Fo(t){if(null!=t){try{return Ot.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Yo(t){if(t instanceof Gn)return t.clone();var e=new Hn(t.__wrapped__,t.__chain__);return e.__actions__=Ii(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Qo=Xr((function(t,e){return Ja(t)?fr(t,vr(e,1,Ja,!0)):[]})),Wo=Xr((function(t,e){var r=$o(e);return Ja(r)&&(r=n),Ja(t)?fr(t,vr(e,1,Ja,!0),lo(r,2)):[]})),Ho=Xr((function(t,e){var r=$o(e);return Ja(r)&&(r=n),Ja(t)?fr(t,vr(e,1,Ja,!0),n,r):[]}));function Go(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:gs(n);return i<0&&(i=wn(r+i,0)),Fe(t,lo(e,3),i)}function qo(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return r!==n&&(o=gs(r),o=r<0?wn(i+o,0):Mn(o,i-1)),Fe(t,lo(e,3),o,!0)}function Zo(t){return(null==t?0:t.length)?vr(t,1):[]}function Vo(t){return t&&t.length?t[0]:n}var Jo=Xr((function(t){var e=De(t,vi);return e.length&&e[0]===t[0]?Ir(e):[]})),Ko=Xr((function(t){var e=$o(t),r=De(t,vi);return e===$o(r)?e=n:r.pop(),r.length&&r[0]===t[0]?Ir(r,lo(e,2)):[]})),Xo=Xr((function(t){var e=$o(t),r=De(t,vi);return(e="function"==typeof e?e:n)&&r.pop(),r.length&&r[0]===t[0]?Ir(r,n,e):[]}));function $o(t){var e=null==t?0:t.length;return e?t[e-1]:n}var ta=Xr(ea);function ea(t,e){return t&&t.length&&e&&e.length?Zr(t,e):t}var na=io((function(t,e){var n=null==t?0:t.length,r=ur(t,e);return Vr(t,De(e,(function(t){return Mo(t,n)?+t:t})).sort(Ti)),r}));function ra(t){return null==t?t:Sn.call(t)}var ia=Xr((function(t){return di(vr(t,1,Ja,!0))})),oa=Xr((function(t){var e=$o(t);return Ja(e)&&(e=n),di(vr(t,1,Ja,!0),lo(e,2))})),aa=Xr((function(t){var e=$o(t);return e="function"==typeof e?e:n,di(vr(t,1,Ja,!0),n,e)}));function sa(t){if(!t||!t.length)return[];var e=0;return t=Ie(t,(function(t){if(Ja(t))return e=wn(t.length,e),!0})),Je(e,(function(e){return De(t,Ge(e))}))}function ua(t,e){if(!t||!t.length)return[];var r=sa(t);return null==e?r:De(r,(function(t){return ke(e,n,t)}))}var ca=Xr((function(t,e){return Ja(t)?fr(t,e):[]})),la=Xr((function(t){return gi(Ie(t,Ja))})),ha=Xr((function(t){var e=$o(t);return Ja(e)&&(e=n),gi(Ie(t,Ja),lo(e,2))})),da=Xr((function(t){var e=$o(t);return e="function"==typeof e?e:n,gi(Ie(t,Ja),n,e)})),fa=Xr(sa);var pa=Xr((function(t){var e=t.length,r=e>1?t[e-1]:n;return r="function"==typeof r?(t.pop(),r):n,ua(t,r)}));function ma(t){var e=Yn(t);return e.__chain__=!0,e}function ya(t,e){return e(t)}var ga=io((function(t){var e=t.length,r=e?t[0]:0,i=this.__wrapped__,o=function(e){return ur(e,t)};return!(e>1||this.__actions__.length)&&i instanceof Gn&&Mo(r)?((i=i.slice(r,+r+(e?1:0))).__actions__.push({func:ya,args:[o],thisArg:n}),new Hn(i,this.__chain__).thru((function(t){return e&&!t.length&&t.push(n),t}))):this.thru(o)}));var ba=Ci((function(t,e,n){Pt.call(t,n)?++t[n]:sr(t,n,1)}));var va=Ui(Go),wa=Ui(qo);function Ma(t,e){return(qa(t)?Te:pr)(t,lo(e,3))}function _a(t,e){return(qa(t)?xe:mr)(t,lo(e,3))}var Ea=Ci((function(t,e,n){Pt.call(t,n)?t[n].push(e):sr(t,n,[e])}));var Aa=Xr((function(t,e,n){var r=-1,i="function"==typeof e,o=Va(t)?at(t.length):[];return pr(t,(function(t){o[++r]=i?ke(e,t,n):jr(t,e,n)})),o})),Sa=Ci((function(t,e,n){sr(t,n,e)}));function ka(t,e){return(qa(t)?De:Fr)(t,lo(e,3))}var Na=Ci((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var Ta=Xr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&_o(t,e[0],e[1])?e=[]:n>2&&_o(e[0],e[1],e[2])&&(e=[e[0]]),Gr(t,vr(e,1),[])})),xa=de||function(){return pe.Date.now()};function La(t,e,r){return e=r?n:e,e=t&&null==e?t.length:e,$i(t,l,n,n,n,n,e)}function Ia(t,e){var r;if("function"!=typeof e)throw new Lt(i);return t=gs(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=n),r}}var ja=Xr((function(t,e,n){var r=1;if(n.length){var i=hn(n,co(ja));r|=u}return $i(t,r,e,n,i)})),Ca=Xr((function(t,e,n){var r=3;if(n.length){var i=hn(n,co(Ca));r|=u}return $i(e,r,t,n,i)}));function Da(t,e,r){var o,a,s,u,c,l,h=0,d=!1,f=!1,p=!0;if("function"!=typeof t)throw new Lt(i);function m(e){var r=o,i=a;return o=a=n,h=e,u=t.apply(i,r)}function y(t){return h=t,c=Do(b,e),d?m(t):u}function g(t){var r=t-l;return l===n||r>=e||r<0||f&&t-h>=s}function b(){var t=xa();if(g(t))return v(t);c=Do(b,function(t){var n=e-(t-l);return f?Mn(n,s-(t-h)):n}(t))}function v(t){return c=n,p&&o?m(t):(o=a=n,u)}function w(){var t=xa(),r=g(t);if(o=arguments,a=this,l=t,r){if(c===n)return y(l);if(f)return Ai(c),c=Do(b,e),m(l)}return c===n&&(c=Do(b,e)),u}return e=vs(e)||0,rs(r)&&(d=!!r.leading,s=(f="maxWait"in r)?wn(vs(r.maxWait)||0,e):s,p="trailing"in r?!!r.trailing:p),w.cancel=function(){c!==n&&Ai(c),h=0,o=l=a=c=n},w.flush=function(){return c===n?u:v(xa())},w}var Oa=Xr((function(t,e){return dr(t,1,e)})),Pa=Xr((function(t,e,n){return dr(t,vs(e)||0,n)}));function za(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Lt(i);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(za.Cache||Vn),n}function Ra(t){if("function"!=typeof t)throw new Lt(i);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}za.Cache=Vn;var Ba=_i((function(t,e){var n=(e=1==e.length&&qa(e[0])?De(e[0],Xe(lo())):De(vr(e,1),Xe(lo()))).length;return Xr((function(r){for(var i=-1,o=Mn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return ke(t,this,r)}))})),Ua=Xr((function(t,e){var r=hn(e,co(Ua));return $i(t,u,n,e,r)})),Fa=Xr((function(t,e){var r=hn(e,co(Fa));return $i(t,c,n,e,r)})),Ya=io((function(t,e){return $i(t,h,n,n,n,e)}));function Qa(t,e){return t===e||t!=t&&e!=e}var Wa=Zi(Tr),Ha=Zi((function(t,e){return t>=e})),Ga=Cr(function(){return arguments}())?Cr:function(t){return is(t)&&Pt.call(t,"callee")&&!Vt.call(t,"callee")},qa=at.isArray,Za=we?Xe(we):function(t){return is(t)&&Nr(t)==C};function Va(t){return null!=t&&ns(t.length)&&!ts(t)}function Ja(t){return is(t)&&Va(t)}var Ka=ve||vu,Xa=Me?Xe(Me):function(t){return is(t)&&Nr(t)==w};function $a(t){if(!is(t))return!1;var e=Nr(t);return e==M||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ss(t)}function ts(t){if(!rs(t))return!1;var e=Nr(t);return e==_||e==E||"[object AsyncFunction]"==e||"[object Proxy]"==e}function es(t){return"number"==typeof t&&t==gs(t)}function ns(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=f}function rs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function is(t){return null!=t&&"object"==typeof t}var os=_e?Xe(_e):function(t){return is(t)&&go(t)==A};function as(t){return"number"==typeof t||is(t)&&Nr(t)==S}function ss(t){if(!is(t)||Nr(t)!=k)return!1;var e=qt(t);if(null===e)return!0;var n=Pt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Ot.call(n)==Ut}var us=Ee?Xe(Ee):function(t){return is(t)&&Nr(t)==T};var cs=Ae?Xe(Ae):function(t){return is(t)&&go(t)==x};function ls(t){return"string"==typeof t||!qa(t)&&is(t)&&Nr(t)==L}function hs(t){return"symbol"==typeof t||is(t)&&Nr(t)==I}var ds=Se?Xe(Se):function(t){return is(t)&&ns(t.length)&&!!se[Nr(t)]};var fs=Zi(Ur),ps=Zi((function(t,e){return t<=e}));function ms(t){if(!t)return[];if(Va(t))return ls(t)?mn(t):Ii(t);if(Xt&&t[Xt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Xt]());var e=go(t);return(e==A?cn:e==x?dn:Qs)(t)}function ys(t){return t?(t=vs(t))===d||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function gs(t){var e=ys(t),n=e%1;return e==e?n?e-n:e:0}function bs(t){return t?cr(gs(t),0,m):0}function vs(t){if("number"==typeof t)return t;if(hs(t))return p;if(rs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=rs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ke(t);var n=yt.test(t);return n||bt.test(t)?he(t.slice(2),n?2:8):mt.test(t)?p:+t}function ws(t){return ji(t,Os(t))}function Ms(t){return null==t?"":hi(t)}var _s=Di((function(t,e){if(ko(e)||Va(e))ji(e,Ds(e),t);else for(var n in e)Pt.call(e,n)&&rr(t,n,e[n])})),Es=Di((function(t,e){ji(e,Os(e),t)})),As=Di((function(t,e,n,r){ji(e,Os(e),t,r)})),Ss=Di((function(t,e,n,r){ji(e,Ds(e),t,r)})),ks=io(ur);var Ns=Xr((function(t,e){t=Nt(t);var r=-1,i=e.length,o=i>2?e[2]:n;for(o&&_o(e[0],e[1],o)&&(i=1);++r<i;)for(var a=e[r],s=Os(a),u=-1,c=s.length;++u<c;){var l=s[u],h=t[l];(h===n||Qa(h,Ct[l])&&!Pt.call(t,l))&&(t[l]=a[l])}return t})),Ts=Xr((function(t){return t.push(n,eo),ke(zs,n,t)}));function xs(t,e,r){var i=null==t?n:Sr(t,e);return i===n?r:i}function Ls(t,e){return null!=t&&bo(t,e,Lr)}var Is=Qi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Bt.call(e)),t[e]=n}),ru(au)),js=Qi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Bt.call(e)),Pt.call(t,e)?t[e].push(n):t[e]=[n]}),lo),Cs=Xr(jr);function Ds(t){return Va(t)?Xn(t):Rr(t)}function Os(t){return Va(t)?Xn(t,!0):Br(t)}var Ps=Di((function(t,e,n){Wr(t,e,n)})),zs=Di((function(t,e,n,r){Wr(t,e,n,r)})),Rs=io((function(t,e){var n={};if(null==t)return n;var r=!1;e=De(e,(function(e){return e=Mi(e,t),r||(r=e.length>1),e})),ji(t,ao(t),n),r&&(n=lr(n,7,no));for(var i=e.length;i--;)fi(n,e[i]);return n}));var Bs=io((function(t,e){return null==t?{}:function(t,e){return qr(t,e,(function(e,n){return Ls(t,n)}))}(t,e)}));function Us(t,e){if(null==t)return{};var n=De(ao(t),(function(t){return[t]}));return e=lo(e),qr(t,n,(function(t,n){return e(t,n[0])}))}var Fs=Xi(Ds),Ys=Xi(Os);function Qs(t){return null==t?[]:$e(t,Ds(t))}var Ws=Ri((function(t,e,n){return e=e.toLowerCase(),t+(n?Hs(e):e)}));function Hs(t){return $s(Ms(t).toLowerCase())}function Gs(t){return(t=Ms(t))&&t.replace(wt,on).replace(te,"")}var qs=Ri((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Zs=Ri((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Vs=zi("toLowerCase");var Js=Ri((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Ks=Ri((function(t,e,n){return t+(n?" ":"")+$s(e)}));var Xs=Ri((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),$s=zi("toUpperCase");function tu(t,e,r){return t=Ms(t),(e=r?n:e)===n?function(t){return ie.test(t)}(t)?function(t){return t.match(ne)||[]}(t):function(t){return t.match(lt)||[]}(t):t.match(e)||[]}var eu=Xr((function(t,e){try{return ke(t,n,e)}catch(t){return $a(t)?t:new At(t)}})),nu=io((function(t,e){return Te(e,(function(e){e=Uo(e),sr(t,e,ja(t[e],t))})),t}));function ru(t){return function(){return t}}var iu=Fi(),ou=Fi(!0);function au(t){return t}function su(t){return zr("function"==typeof t?t:lr(t,1))}var uu=Xr((function(t,e){return function(n){return jr(n,t,e)}})),cu=Xr((function(t,e){return function(n){return jr(t,n,e)}}));function lu(t,e,n){var r=Ds(e),i=Ar(e,r);null!=n||rs(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Ar(e,Ds(e)));var o=!(rs(n)&&"chain"in n&&!n.chain),a=ts(t);return Te(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=Ii(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Oe([this.value()],arguments))})})),t}function hu(){}var du=Hi(De),fu=Hi(Le),pu=Hi(Re);function mu(t){return Eo(t)?Ge(Uo(t)):function(t){return function(e){return Sr(e,t)}}(t)}var yu=qi(),gu=qi(!0);function bu(){return[]}function vu(){return!1}var wu=Wi((function(t,e){return t+e}),0),Mu=Ji("ceil"),_u=Wi((function(t,e){return t/e}),1),Eu=Ji("floor");var Au,Su=Wi((function(t,e){return t*e}),1),ku=Ji("round"),Nu=Wi((function(t,e){return t-e}),0);return Yn.after=function(t,e){if("function"!=typeof e)throw new Lt(i);return t=gs(t),function(){if(--t<1)return e.apply(this,arguments)}},Yn.ary=La,Yn.assign=_s,Yn.assignIn=Es,Yn.assignInWith=As,Yn.assignWith=Ss,Yn.at=ks,Yn.before=Ia,Yn.bind=ja,Yn.bindAll=nu,Yn.bindKey=Ca,Yn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return qa(t)?t:[t]},Yn.chain=ma,Yn.chunk=function(t,e,r){e=(r?_o(t,e,r):e===n)?1:wn(gs(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,a=0,s=at(me(i/e));o<i;)s[a++]=oi(t,o,o+=e);return s},Yn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},Yn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=at(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Oe(qa(n)?Ii(n):[n],vr(e,1))},Yn.cond=function(t){var e=null==t?0:t.length,n=lo();return t=e?De(t,(function(t){if("function"!=typeof t[1])throw new Lt(i);return[n(t[0]),t[1]]})):[],Xr((function(n){for(var r=-1;++r<e;){var i=t[r];if(ke(i[0],this,n))return ke(i[1],this,n)}}))},Yn.conforms=function(t){return function(t){var e=Ds(t);return function(n){return hr(n,t,e)}}(lr(t,1))},Yn.constant=ru,Yn.countBy=ba,Yn.create=function(t,e){var n=Qn(t);return null==e?n:ar(n,e)},Yn.curry=function t(e,r,i){var o=$i(e,8,n,n,n,n,n,r=i?n:r);return o.placeholder=t.placeholder,o},Yn.curryRight=function t(e,r,i){var o=$i(e,s,n,n,n,n,n,r=i?n:r);return o.placeholder=t.placeholder,o},Yn.debounce=Da,Yn.defaults=Ns,Yn.defaultsDeep=Ts,Yn.defer=Oa,Yn.delay=Pa,Yn.difference=Qo,Yn.differenceBy=Wo,Yn.differenceWith=Ho,Yn.drop=function(t,e,r){var i=null==t?0:t.length;return i?oi(t,(e=r||e===n?1:gs(e))<0?0:e,i):[]},Yn.dropRight=function(t,e,r){var i=null==t?0:t.length;return i?oi(t,0,(e=i-(e=r||e===n?1:gs(e)))<0?0:e):[]},Yn.dropRightWhile=function(t,e){return t&&t.length?mi(t,lo(e,3),!0,!0):[]},Yn.dropWhile=function(t,e){return t&&t.length?mi(t,lo(e,3),!0):[]},Yn.fill=function(t,e,r,i){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&_o(t,e,r)&&(r=0,i=o),function(t,e,r,i){var o=t.length;for((r=gs(r))<0&&(r=-r>o?0:o+r),(i=i===n||i>o?o:gs(i))<0&&(i+=o),i=r>i?0:bs(i);r<i;)t[r++]=e;return t}(t,e,r,i)):[]},Yn.filter=function(t,e){return(qa(t)?Ie:br)(t,lo(e,3))},Yn.flatMap=function(t,e){return vr(ka(t,e),1)},Yn.flatMapDeep=function(t,e){return vr(ka(t,e),d)},Yn.flatMapDepth=function(t,e,r){return r=r===n?1:gs(r),vr(ka(t,e),r)},Yn.flatten=Zo,Yn.flattenDeep=function(t){return(null==t?0:t.length)?vr(t,d):[]},Yn.flattenDepth=function(t,e){return(null==t?0:t.length)?vr(t,e=e===n?1:gs(e)):[]},Yn.flip=function(t){return $i(t,512)},Yn.flow=iu,Yn.flowRight=ou,Yn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},Yn.functions=function(t){return null==t?[]:Ar(t,Ds(t))},Yn.functionsIn=function(t){return null==t?[]:Ar(t,Os(t))},Yn.groupBy=Ea,Yn.initial=function(t){return(null==t?0:t.length)?oi(t,0,-1):[]},Yn.intersection=Jo,Yn.intersectionBy=Ko,Yn.intersectionWith=Xo,Yn.invert=Is,Yn.invertBy=js,Yn.invokeMap=Aa,Yn.iteratee=su,Yn.keyBy=Sa,Yn.keys=Ds,Yn.keysIn=Os,Yn.map=ka,Yn.mapKeys=function(t,e){var n={};return e=lo(e,3),_r(t,(function(t,r,i){sr(n,e(t,r,i),t)})),n},Yn.mapValues=function(t,e){var n={};return e=lo(e,3),_r(t,(function(t,r,i){sr(n,r,e(t,r,i))})),n},Yn.matches=function(t){return Yr(lr(t,1))},Yn.matchesProperty=function(t,e){return Qr(t,lr(e,1))},Yn.memoize=za,Yn.merge=Ps,Yn.mergeWith=zs,Yn.method=uu,Yn.methodOf=cu,Yn.mixin=lu,Yn.negate=Ra,Yn.nthArg=function(t){return t=gs(t),Xr((function(e){return Hr(e,t)}))},Yn.omit=Rs,Yn.omitBy=function(t,e){return Us(t,Ra(lo(e)))},Yn.once=function(t){return Ia(2,t)},Yn.orderBy=function(t,e,r,i){return null==t?[]:(qa(e)||(e=null==e?[]:[e]),qa(r=i?n:r)||(r=null==r?[]:[r]),Gr(t,e,r))},Yn.over=du,Yn.overArgs=Ba,Yn.overEvery=fu,Yn.overSome=pu,Yn.partial=Ua,Yn.partialRight=Fa,Yn.partition=Na,Yn.pick=Bs,Yn.pickBy=Us,Yn.property=mu,Yn.propertyOf=function(t){return function(e){return null==t?n:Sr(t,e)}},Yn.pull=ta,Yn.pullAll=ea,Yn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Zr(t,e,lo(n,2)):t},Yn.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?Zr(t,e,n,r):t},Yn.pullAt=na,Yn.range=yu,Yn.rangeRight=gu,Yn.rearg=Ya,Yn.reject=function(t,e){return(qa(t)?Ie:br)(t,Ra(lo(e,3)))},Yn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=lo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return Vr(t,i),n},Yn.rest=function(t,e){if("function"!=typeof t)throw new Lt(i);return Xr(t,e=e===n?e:gs(e))},Yn.reverse=ra,Yn.sampleSize=function(t,e,r){return e=(r?_o(t,e,r):e===n)?1:gs(e),(qa(t)?tr:ti)(t,e)},Yn.set=function(t,e,n){return null==t?t:ei(t,e,n)},Yn.setWith=function(t,e,r,i){return i="function"==typeof i?i:n,null==t?t:ei(t,e,r,i)},Yn.shuffle=function(t){return(qa(t)?er:ii)(t)},Yn.slice=function(t,e,r){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&_o(t,e,r)?(e=0,r=i):(e=null==e?0:gs(e),r=r===n?i:gs(r)),oi(t,e,r)):[]},Yn.sortBy=Ta,Yn.sortedUniq=function(t){return t&&t.length?ci(t):[]},Yn.sortedUniqBy=function(t,e){return t&&t.length?ci(t,lo(e,2)):[]},Yn.split=function(t,e,r){return r&&"number"!=typeof r&&_o(t,e,r)&&(e=r=n),(r=r===n?m:r>>>0)?(t=Ms(t))&&("string"==typeof e||null!=e&&!us(e))&&!(e=hi(e))&&un(t)?Ei(mn(t),0,r):t.split(e,r):[]},Yn.spread=function(t,e){if("function"!=typeof t)throw new Lt(i);return e=null==e?0:wn(gs(e),0),Xr((function(n){var r=n[e],i=Ei(n,0,e);return r&&Oe(i,r),ke(t,this,i)}))},Yn.tail=function(t){var e=null==t?0:t.length;return e?oi(t,1,e):[]},Yn.take=function(t,e,r){return t&&t.length?oi(t,0,(e=r||e===n?1:gs(e))<0?0:e):[]},Yn.takeRight=function(t,e,r){var i=null==t?0:t.length;return i?oi(t,(e=i-(e=r||e===n?1:gs(e)))<0?0:e,i):[]},Yn.takeRightWhile=function(t,e){return t&&t.length?mi(t,lo(e,3),!1,!0):[]},Yn.takeWhile=function(t,e){return t&&t.length?mi(t,lo(e,3)):[]},Yn.tap=function(t,e){return e(t),t},Yn.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new Lt(i);return rs(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Da(t,e,{leading:r,maxWait:e,trailing:o})},Yn.thru=ya,Yn.toArray=ms,Yn.toPairs=Fs,Yn.toPairsIn=Ys,Yn.toPath=function(t){return qa(t)?De(t,Uo):hs(t)?[t]:Ii(Bo(Ms(t)))},Yn.toPlainObject=ws,Yn.transform=function(t,e,n){var r=qa(t),i=r||Ka(t)||ds(t);if(e=lo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:rs(t)&&ts(o)?Qn(qt(t)):{}}return(i?Te:_r)(t,(function(t,r,i){return e(n,t,r,i)})),n},Yn.unary=function(t){return La(t,1)},Yn.union=ia,Yn.unionBy=oa,Yn.unionWith=aa,Yn.uniq=function(t){return t&&t.length?di(t):[]},Yn.uniqBy=function(t,e){return t&&t.length?di(t,lo(e,2)):[]},Yn.uniqWith=function(t,e){return e="function"==typeof e?e:n,t&&t.length?di(t,n,e):[]},Yn.unset=function(t,e){return null==t||fi(t,e)},Yn.unzip=sa,Yn.unzipWith=ua,Yn.update=function(t,e,n){return null==t?t:pi(t,e,wi(n))},Yn.updateWith=function(t,e,r,i){return i="function"==typeof i?i:n,null==t?t:pi(t,e,wi(r),i)},Yn.values=Qs,Yn.valuesIn=function(t){return null==t?[]:$e(t,Os(t))},Yn.without=ca,Yn.words=tu,Yn.wrap=function(t,e){return Ua(wi(e),t)},Yn.xor=la,Yn.xorBy=ha,Yn.xorWith=da,Yn.zip=fa,Yn.zipObject=function(t,e){return bi(t||[],e||[],rr)},Yn.zipObjectDeep=function(t,e){return bi(t||[],e||[],ei)},Yn.zipWith=pa,Yn.entries=Fs,Yn.entriesIn=Ys,Yn.extend=Es,Yn.extendWith=As,lu(Yn,Yn),Yn.add=wu,Yn.attempt=eu,Yn.camelCase=Ws,Yn.capitalize=Hs,Yn.ceil=Mu,Yn.clamp=function(t,e,r){return r===n&&(r=e,e=n),r!==n&&(r=(r=vs(r))==r?r:0),e!==n&&(e=(e=vs(e))==e?e:0),cr(vs(t),e,r)},Yn.clone=function(t){return lr(t,4)},Yn.cloneDeep=function(t){return lr(t,5)},Yn.cloneDeepWith=function(t,e){return lr(t,5,e="function"==typeof e?e:n)},Yn.cloneWith=function(t,e){return lr(t,4,e="function"==typeof e?e:n)},Yn.conformsTo=function(t,e){return null==e||hr(t,e,Ds(e))},Yn.deburr=Gs,Yn.defaultTo=function(t,e){return null==t||t!=t?e:t},Yn.divide=_u,Yn.endsWith=function(t,e,r){t=Ms(t),e=hi(e);var i=t.length,o=r=r===n?i:cr(gs(r),0,i);return(r-=e.length)>=0&&t.slice(r,o)==e},Yn.eq=Qa,Yn.escape=function(t){return(t=Ms(t))&&J.test(t)?t.replace(Z,an):t},Yn.escapeRegExp=function(t){return(t=Ms(t))&&it.test(t)?t.replace(rt,"\\$&"):t},Yn.every=function(t,e,r){var i=qa(t)?Le:yr;return r&&_o(t,e,r)&&(e=n),i(t,lo(e,3))},Yn.find=va,Yn.findIndex=Go,Yn.findKey=function(t,e){return Ue(t,lo(e,3),_r)},Yn.findLast=wa,Yn.findLastIndex=qo,Yn.findLastKey=function(t,e){return Ue(t,lo(e,3),Er)},Yn.floor=Eu,Yn.forEach=Ma,Yn.forEachRight=_a,Yn.forIn=function(t,e){return null==t?t:wr(t,lo(e,3),Os)},Yn.forInRight=function(t,e){return null==t?t:Mr(t,lo(e,3),Os)},Yn.forOwn=function(t,e){return t&&_r(t,lo(e,3))},Yn.forOwnRight=function(t,e){return t&&Er(t,lo(e,3))},Yn.get=xs,Yn.gt=Wa,Yn.gte=Ha,Yn.has=function(t,e){return null!=t&&bo(t,e,xr)},Yn.hasIn=Ls,Yn.head=Vo,Yn.identity=au,Yn.includes=function(t,e,n,r){t=Va(t)?t:Qs(t),n=n&&!r?gs(n):0;var i=t.length;return n<0&&(n=wn(i+n,0)),ls(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Ye(t,e,n)>-1},Yn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:gs(n);return i<0&&(i=wn(r+i,0)),Ye(t,e,i)},Yn.inRange=function(t,e,r){return e=ys(e),r===n?(r=e,e=0):r=ys(r),function(t,e,n){return t>=Mn(e,n)&&t<wn(e,n)}(t=vs(t),e,r)},Yn.invoke=Cs,Yn.isArguments=Ga,Yn.isArray=qa,Yn.isArrayBuffer=Za,Yn.isArrayLike=Va,Yn.isArrayLikeObject=Ja,Yn.isBoolean=function(t){return!0===t||!1===t||is(t)&&Nr(t)==v},Yn.isBuffer=Ka,Yn.isDate=Xa,Yn.isElement=function(t){return is(t)&&1===t.nodeType&&!ss(t)},Yn.isEmpty=function(t){if(null==t)return!0;if(Va(t)&&(qa(t)||"string"==typeof t||"function"==typeof t.splice||Ka(t)||ds(t)||Ga(t)))return!t.length;var e=go(t);if(e==A||e==x)return!t.size;if(ko(t))return!Rr(t).length;for(var n in t)if(Pt.call(t,n))return!1;return!0},Yn.isEqual=function(t,e){return Dr(t,e)},Yn.isEqualWith=function(t,e,r){var i=(r="function"==typeof r?r:n)?r(t,e):n;return i===n?Dr(t,e,n,r):!!i},Yn.isError=$a,Yn.isFinite=function(t){return"number"==typeof t&&Be(t)},Yn.isFunction=ts,Yn.isInteger=es,Yn.isLength=ns,Yn.isMap=os,Yn.isMatch=function(t,e){return t===e||Or(t,e,fo(e))},Yn.isMatchWith=function(t,e,r){return r="function"==typeof r?r:n,Or(t,e,fo(e),r)},Yn.isNaN=function(t){return as(t)&&t!=+t},Yn.isNative=function(t){if(So(t))throw new At("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Pr(t)},Yn.isNil=function(t){return null==t},Yn.isNull=function(t){return null===t},Yn.isNumber=as,Yn.isObject=rs,Yn.isObjectLike=is,Yn.isPlainObject=ss,Yn.isRegExp=us,Yn.isSafeInteger=function(t){return es(t)&&t>=-9007199254740991&&t<=f},Yn.isSet=cs,Yn.isString=ls,Yn.isSymbol=hs,Yn.isTypedArray=ds,Yn.isUndefined=function(t){return t===n},Yn.isWeakMap=function(t){return is(t)&&go(t)==j},Yn.isWeakSet=function(t){return is(t)&&"[object WeakSet]"==Nr(t)},Yn.join=function(t,e){return null==t?"":qe.call(t,e)},Yn.kebabCase=qs,Yn.last=$o,Yn.lastIndexOf=function(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=gs(r))<0?wn(i+o,0):Mn(o,i-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):Fe(t,We,o,!0)},Yn.lowerCase=Zs,Yn.lowerFirst=Vs,Yn.lt=fs,Yn.lte=ps,Yn.max=function(t){return t&&t.length?gr(t,au,Tr):n},Yn.maxBy=function(t,e){return t&&t.length?gr(t,lo(e,2),Tr):n},Yn.mean=function(t){return He(t,au)},Yn.meanBy=function(t,e){return He(t,lo(e,2))},Yn.min=function(t){return t&&t.length?gr(t,au,Ur):n},Yn.minBy=function(t,e){return t&&t.length?gr(t,lo(e,2),Ur):n},Yn.stubArray=bu,Yn.stubFalse=vu,Yn.stubObject=function(){return{}},Yn.stubString=function(){return""},Yn.stubTrue=function(){return!0},Yn.multiply=Su,Yn.nth=function(t,e){return t&&t.length?Hr(t,gs(e)):n},Yn.noConflict=function(){return pe._===this&&(pe._=Ft),this},Yn.noop=hu,Yn.now=xa,Yn.pad=function(t,e,n){t=Ms(t);var r=(e=gs(e))?pn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Gi(ye(i),n)+t+Gi(me(i),n)},Yn.padEnd=function(t,e,n){t=Ms(t);var r=(e=gs(e))?pn(t):0;return e&&r<e?t+Gi(e-r,n):t},Yn.padStart=function(t,e,n){t=Ms(t);var r=(e=gs(e))?pn(t):0;return e&&r<e?Gi(e-r,n)+t:t},Yn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),En(Ms(t).replace(ot,""),e||0)},Yn.random=function(t,e,r){if(r&&"boolean"!=typeof r&&_o(t,e,r)&&(e=r=n),r===n&&("boolean"==typeof e?(r=e,e=n):"boolean"==typeof t&&(r=t,t=n)),t===n&&e===n?(t=0,e=1):(t=ys(t),e===n?(e=t,t=0):e=ys(e)),t>e){var i=t;t=e,e=i}if(r||t%1||e%1){var o=An();return Mn(t+o*(e-t+le("1e-"+((o+"").length-1))),e)}return Jr(t,e)},Yn.reduce=function(t,e,n){var r=qa(t)?Pe:Ze,i=arguments.length<3;return r(t,lo(e,4),n,i,pr)},Yn.reduceRight=function(t,e,n){var r=qa(t)?ze:Ze,i=arguments.length<3;return r(t,lo(e,4),n,i,mr)},Yn.repeat=function(t,e,r){return e=(r?_o(t,e,r):e===n)?1:gs(e),Kr(Ms(t),e)},Yn.replace=function(){var t=arguments,e=Ms(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Yn.result=function(t,e,r){var i=-1,o=(e=Mi(e,t)).length;for(o||(o=1,t=n);++i<o;){var a=null==t?n:t[Uo(e[i])];a===n&&(i=o,a=r),t=ts(a)?a.call(t):a}return t},Yn.round=ku,Yn.runInContext=t,Yn.sample=function(t){return(qa(t)?$n:$r)(t)},Yn.size=function(t){if(null==t)return 0;if(Va(t))return ls(t)?pn(t):t.length;var e=go(t);return e==A||e==x?t.size:Rr(t).length},Yn.snakeCase=Js,Yn.some=function(t,e,r){var i=qa(t)?Re:ai;return r&&_o(t,e,r)&&(e=n),i(t,lo(e,3))},Yn.sortedIndex=function(t,e){return si(t,e)},Yn.sortedIndexBy=function(t,e,n){return ui(t,e,lo(n,2))},Yn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=si(t,e);if(r<n&&Qa(t[r],e))return r}return-1},Yn.sortedLastIndex=function(t,e){return si(t,e,!0)},Yn.sortedLastIndexBy=function(t,e,n){return ui(t,e,lo(n,2),!0)},Yn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=si(t,e,!0)-1;if(Qa(t[n],e))return n}return-1},Yn.startCase=Ks,Yn.startsWith=function(t,e,n){return t=Ms(t),n=null==n?0:cr(gs(n),0,t.length),e=hi(e),t.slice(n,n+e.length)==e},Yn.subtract=Nu,Yn.sum=function(t){return t&&t.length?Ve(t,au):0},Yn.sumBy=function(t,e){return t&&t.length?Ve(t,lo(e,2)):0},Yn.template=function(t,e,r){var i=Yn.templateSettings;r&&_o(t,e,r)&&(e=n),t=Ms(t),e=As({},e,i,to);var o,a,s=As({},e.imports,i.imports,to),u=Ds(s),c=$e(s,u),l=0,h=e.interpolate||Mt,d="__p += '",f=Tt((e.escape||Mt).source+"|"+h.source+"|"+(h===$?ft:Mt).source+"|"+(e.evaluate||Mt).source+"|$","g"),p="//# sourceURL="+(Pt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ae+"]")+"\n";t.replace(f,(function(e,n,r,i,s,u){return r||(r=i),d+=t.slice(l,u).replace(_t,sn),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e})),d+="';\n";var m=Pt.call(e,"variable")&&e.variable;if(m){if(ht.test(m))throw new At("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(W,""):d).replace(H,"$1").replace(G,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var y=eu((function(){return St(u,p+"return "+d).apply(n,c)}));if(y.source=d,$a(y))throw y;return y},Yn.times=function(t,e){if((t=gs(t))<1||t>f)return[];var n=m,r=Mn(t,m);e=lo(e),t-=m;for(var i=Je(r,e);++n<t;)e(n);return i},Yn.toFinite=ys,Yn.toInteger=gs,Yn.toLength=bs,Yn.toLower=function(t){return Ms(t).toLowerCase()},Yn.toNumber=vs,Yn.toSafeInteger=function(t){return t?cr(gs(t),-9007199254740991,f):0===t?t:0},Yn.toString=Ms,Yn.toUpper=function(t){return Ms(t).toUpperCase()},Yn.trim=function(t,e,r){if((t=Ms(t))&&(r||e===n))return Ke(t);if(!t||!(e=hi(e)))return t;var i=mn(t),o=mn(e);return Ei(i,en(i,o),nn(i,o)+1).join("")},Yn.trimEnd=function(t,e,r){if((t=Ms(t))&&(r||e===n))return t.slice(0,yn(t)+1);if(!t||!(e=hi(e)))return t;var i=mn(t);return Ei(i,0,nn(i,mn(e))+1).join("")},Yn.trimStart=function(t,e,r){if((t=Ms(t))&&(r||e===n))return t.replace(ot,"");if(!t||!(e=hi(e)))return t;var i=mn(t);return Ei(i,en(i,mn(e))).join("")},Yn.truncate=function(t,e){var r=30,i="...";if(rs(e)){var o="separator"in e?e.separator:o;r="length"in e?gs(e.length):r,i="omission"in e?hi(e.omission):i}var a=(t=Ms(t)).length;if(un(t)){var s=mn(t);a=s.length}if(r>=a)return t;var u=r-pn(i);if(u<1)return i;var c=s?Ei(s,0,u).join(""):t.slice(0,u);if(o===n)return c+i;if(s&&(u+=c.length-u),us(o)){if(t.slice(u).search(o)){var l,h=c;for(o.global||(o=Tt(o.source,Ms(pt.exec(o))+"g")),o.lastIndex=0;l=o.exec(h);)var d=l.index;c=c.slice(0,d===n?u:d)}}else if(t.indexOf(hi(o),u)!=u){var f=c.lastIndexOf(o);f>-1&&(c=c.slice(0,f))}return c+i},Yn.unescape=function(t){return(t=Ms(t))&&V.test(t)?t.replace(q,gn):t},Yn.uniqueId=function(t){var e=++zt;return Ms(t)+e},Yn.upperCase=Xs,Yn.upperFirst=$s,Yn.each=Ma,Yn.eachRight=_a,Yn.first=Vo,lu(Yn,(Au={},_r(Yn,(function(t,e){Pt.call(Yn.prototype,e)||(Au[e]=t)})),Au),{chain:!1}),Yn.VERSION="4.17.21",Te(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Yn[t].placeholder=Yn})),Te(["drop","take"],(function(t,e){Gn.prototype[t]=function(r){r=r===n?1:wn(gs(r),0);var i=this.__filtered__&&!e?new Gn(this):this.clone();return i.__filtered__?i.__takeCount__=Mn(r,i.__takeCount__):i.__views__.push({size:Mn(r,m),type:t+(i.__dir__<0?"Right":"")}),i},Gn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Te(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Gn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:lo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Te(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Gn.prototype[t]=function(){return this[n](1).value()[0]}})),Te(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Gn.prototype[t]=function(){return this.__filtered__?new Gn(this):this[n](1)}})),Gn.prototype.compact=function(){return this.filter(au)},Gn.prototype.find=function(t){return this.filter(t).head()},Gn.prototype.findLast=function(t){return this.reverse().find(t)},Gn.prototype.invokeMap=Xr((function(t,e){return"function"==typeof t?new Gn(this):this.map((function(n){return jr(n,t,e)}))})),Gn.prototype.reject=function(t){return this.filter(Ra(lo(t)))},Gn.prototype.slice=function(t,e){t=gs(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Gn(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==n&&(r=(e=gs(e))<0?r.dropRight(-e):r.take(e-t)),r)},Gn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Gn.prototype.toArray=function(){return this.take(m)},_r(Gn.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),o=Yn[i?"take"+("last"==e?"Right":""):e],a=i||/^find/.test(e);o&&(Yn.prototype[e]=function(){var e=this.__wrapped__,s=i?[1]:arguments,u=e instanceof Gn,c=s[0],l=u||qa(e),h=function(t){var e=o.apply(Yn,Oe([t],s));return i&&d?e[0]:e};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var d=this.__chain__,f=!!this.__actions__.length,p=a&&!d,m=u&&!f;if(!a&&l){e=m?e:new Gn(this);var y=t.apply(e,s);return y.__actions__.push({func:ya,args:[h],thisArg:n}),new Hn(y,d)}return p&&m?t.apply(this,s):(y=this.thru(h),p?i?y.value()[0]:y.value():y)})})),Te(["pop","push","shift","sort","splice","unshift"],(function(t){var e=It[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Yn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(qa(i)?i:[],t)}return this[n]((function(n){return e.apply(qa(n)?n:[],t)}))}})),_r(Gn.prototype,(function(t,e){var n=Yn[e];if(n){var r=n.name+"";Pt.call(Cn,r)||(Cn[r]=[]),Cn[r].push({name:e,func:n})}})),Cn[Yi(n,2).name]=[{name:"wrapper",func:n}],Gn.prototype.clone=function(){var t=new Gn(this.__wrapped__);return t.__actions__=Ii(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ii(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ii(this.__views__),t},Gn.prototype.reverse=function(){if(this.__filtered__){var t=new Gn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Gn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=qa(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=Mn(e,t+a);break;case"takeRight":t=wn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,h=l.length,d=0,f=Mn(u,this.__takeCount__);if(!n||!r&&i==u&&f==u)return yi(t,this.__actions__);var p=[];t:for(;u--&&d<f;){for(var m=-1,y=t[c+=e];++m<h;){var g=l[m],b=g.iteratee,v=g.type,w=b(y);if(2==v)y=w;else if(!w){if(1==v)continue t;break t}}p[d++]=y}return p},Yn.prototype.at=ga,Yn.prototype.chain=function(){return ma(this)},Yn.prototype.commit=function(){return new Hn(this.value(),this.__chain__)},Yn.prototype.next=function(){this.__values__===n&&(this.__values__=ms(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?n:this.__values__[this.__index__++]}},Yn.prototype.plant=function(t){for(var e,r=this;r instanceof Wn;){var i=Yo(r);i.__index__=0,i.__values__=n,e?o.__wrapped__=i:e=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,e},Yn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Gn){var e=t;return this.__actions__.length&&(e=new Gn(this)),(e=e.reverse()).__actions__.push({func:ya,args:[ra],thisArg:n}),new Hn(e,this.__chain__)}return this.thru(ra)},Yn.prototype.toJSON=Yn.prototype.valueOf=Yn.prototype.value=function(){return yi(this.__wrapped__,this.__actions__)},Yn.prototype.first=Yn.prototype.head,Xt&&(Yn.prototype[Xt]=function(){return this}),Yn}();ye?((ye.exports=bn)._=bn,me._=bn):pe._=bn}).call(r)})),yq=9e15,gq=1e9,bq="0123456789abcdef",vq="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",wq="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Mq={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-yq,maxE:yq,crypto:!1},_q=!0,Eq="[DecimalError] ",Aq=Eq+"Invalid argument: ",Sq=Eq+"Precision limit exceeded",kq=Eq+"crypto unavailable",Nq="[object Decimal]",Tq=Math.floor,xq=Math.pow,Lq=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Iq=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,jq=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Cq=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Dq=1e7,Oq=vq.length-1,Pq=wq.length-1,zq={toStringTag:Nq};function Rq(t){var e,n,r,i=t.length-1,o="",a=t[0];if(i>0){for(o+=a,e=1;e<i;e++)(n=7-(r=t[e]+"").length)&&(o+=Vq(n)),o+=r;(n=7-(r=(a=t[e])+"").length)&&(o+=Vq(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function Bq(t,e,n){if(t!==~~t||t<e||t>n)throw Error(Aq+t)}function Uq(t,e,n,r){var i,o,a,s;for(o=t[0];o>=10;o/=10)--e;return--e<0?(e+=7,i=0):(i=Math.ceil((e+1)/7),e%=7),o=xq(10,7-e),s=t[i]%o|0,null==r?e<3?(0==e?s=s/100|0:1==e&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(t[i+1]/o/100|0)==xq(10,e-2)-1||(s==o/2||0==s)&&0==(t[i+1]/o/100|0):e<4?(0==e?s=s/1e3|0:1==e?s=s/100|0:2==e&&(s=s/10|0),a=(r||n<4)&&9999==s||!r&&n>3&&4999==s):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(t[i+1]/o/1e3|0)==xq(10,e-3)-1,a}function Fq(t,e,n){for(var r,i,o=[0],a=0,s=t.length;a<s;){for(i=o.length;i--;)o[i]*=e;for(o[0]+=bq.indexOf(t.charAt(a++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}zq.absoluteValue=zq.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),Qq(t)},zq.ceil=function(){return Qq(new this.constructor(this),this.e+1,2)},zq.clampedTo=zq.clamp=function(t,e){var n=this,r=n.constructor;if(t=new r(t),e=new r(e),!t.s||!e.s)return new r(NaN);if(t.gt(e))throw Error(Aq+e);return n.cmp(t)<0?t:n.cmp(e)>0?e:new r(n)},zq.comparedTo=zq.cmp=function(t){var e,n,r,i,o=this,a=o.d,s=(t=new o.constructor(t)).d,u=o.s,c=t.s;if(!a||!s)return u&&c?u!==c?u:a===s?0:!a^u<0?1:-1:NaN;if(!a[0]||!s[0])return a[0]?u:s[0]?-c:0;if(u!==c)return u;if(o.e!==t.e)return o.e>t.e^u<0?1:-1;for(e=0,n=(r=a.length)<(i=s.length)?r:i;e<n;++e)if(a[e]!==s[e])return a[e]>s[e]^u<0?1:-1;return r===i?0:r>i^u<0?1:-1},zq.cosine=zq.cos=function(){var t,e,n=this,r=n.constructor;return n.d?n.d[0]?(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(t,e){var n,r,i;if(e.isZero())return e;r=e.d.length,r<32?i=(1/oZ(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10");t.precision+=n,e=iZ(t,1,e.times(i),new t(1));for(var o=n;o--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return t.precision-=n,e}(r,aZ(r,n)),r.precision=t,r.rounding=e,Qq(2==hq||3==hq?n.neg():n,t,e,!0)):new r(1):new r(NaN)},zq.cubeRoot=zq.cbrt=function(){var t,e,n,r,i,o,a,s,u,c,l=this,h=l.constructor;if(!l.isFinite()||l.isZero())return new h(l);for(_q=!1,(o=l.s*xq(l.s*l,1/3))&&Math.abs(o)!=1/0?r=new h(o.toString()):(n=Rq(l.d),(o=((t=l.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=xq(n,1/3),t=Tq((t+1)/3)-(t%3==(t<0?-1:2)),(r=new h(n=o==1/0?"5e"+t:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+t)).s=l.s),a=(t=h.precision)+3;;)if(c=(u=(s=r).times(s).times(s)).plus(l),r=Yq(c.plus(l).times(s),c.plus(u),a+2,1),Rq(s.d).slice(0,a)===(n=Rq(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(Qq(r,t+1,1),e=!r.times(r).times(r).eq(l));break}if(!i&&(Qq(s,t+1,0),s.times(s).times(s).eq(l))){r=s;break}a+=4,i=1}return _q=!0,Qq(r,t,h.rounding,e)},zq.decimalPlaces=zq.dp=function(){var t,e=this.d,n=NaN;if(e){if(n=7*((t=e.length-1)-Tq(this.e/7)),t=e[t])for(;t%10==0;t/=10)n--;n<0&&(n=0)}return n},zq.dividedBy=zq.div=function(t){return Yq(this,new this.constructor(t))},zq.dividedToIntegerBy=zq.divToInt=function(t){var e=this.constructor;return Qq(Yq(this,new e(t),0,1,1),e.precision,e.rounding)},zq.equals=zq.eq=function(t){return 0===this.cmp(t)},zq.floor=function(){return Qq(new this.constructor(this),this.e+1,3)},zq.greaterThan=zq.gt=function(t){return this.cmp(t)>0},zq.greaterThanOrEqualTo=zq.gte=function(t){var e=this.cmp(t);return 1==e||0===e},zq.hyperbolicCosine=zq.cosh=function(){var t,e,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?e=(1/oZ(4,t=Math.ceil(i/3))).toString():(t=16,e="2.3283064365386962890625e-10"),o=iZ(a,1,o.times(e),new a(1),!0);for(var u,c=t,l=new a(8);c--;)u=o.times(o),o=s.minus(u.times(l.minus(u.times(l))));return Qq(o,a.precision=n,a.rounding=r,!0)},zq.hyperbolicSine=zq.sinh=function(){var t,e,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(e=o.precision,n=o.rounding,o.precision=e+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=iZ(o,2,i,i,!0);else{t=(t=1.4*Math.sqrt(r))>16?16:0|t,i=iZ(o,2,i=i.times(1/oZ(5,t)),i,!0);for(var a,s=new o(5),u=new o(16),c=new o(20);t--;)a=i.times(i),i=i.times(s.plus(a.times(u.times(a).plus(c))))}return o.precision=e,o.rounding=n,Qq(i,e,n,!0)},zq.hyperbolicTangent=zq.tanh=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+7,r.rounding=1,Yq(n.sinh(),n.cosh(),r.precision=t,r.rounding=e)):new r(n.s)},zq.inverseCosine=zq.acos=function(){var t,e=this,n=e.constructor,r=e.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?e.isNeg()?qq(n,i,o):new n(0):new n(NaN):e.isZero()?qq(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,e=e.asin(),t=qq(n,i+4,o).times(.5),n.precision=i,n.rounding=o,t.minus(e))},zq.inverseHyperbolicCosine=zq.acosh=function(){var t,e,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(t=r.precision,e=r.rounding,r.precision=t+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,_q=!1,n=n.times(n).minus(1).sqrt().plus(n),_q=!0,r.precision=t,r.rounding=e,n.ln()):new r(n)},zq.inverseHyperbolicSine=zq.asinh=function(){var t,e,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,_q=!1,n=n.times(n).plus(1).sqrt().plus(n),_q=!0,r.precision=t,r.rounding=e,n.ln())},zq.inverseHyperbolicTangent=zq.atanh=function(){var t,e,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(t=o.precision,e=o.rounding,r=i.sd(),Math.max(r,t)<2*-i.e-1?Qq(new o(i),t,e,!0):(o.precision=n=r-i.e,i=Yq(i.plus(1),new o(1).minus(i),n+t,1),o.precision=t+4,o.rounding=1,i=i.ln(),o.precision=t,o.rounding=e,i.times(.5))):new o(NaN)},zq.inverseSine=zq.asin=function(){var t,e,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(e=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==e?0===e?((t=qq(o,n+4,r).times(.5)).s=i.s,t):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},zq.inverseTangent=zq.atan=function(){var t,e,n,r,i,o,a,s,u,c=this,l=c.constructor,h=l.precision,d=l.rounding;if(c.isFinite()){if(c.isZero())return new l(c);if(c.abs().eq(1)&&h+4<=Pq)return(a=qq(l,h+4,d).times(.25)).s=c.s,a}else{if(!c.s)return new l(NaN);if(h+4<=Pq)return(a=qq(l,h+4,d).times(.5)).s=c.s,a}for(l.precision=s=h+10,l.rounding=1,t=n=Math.min(28,s/7+2|0);t;--t)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(_q=!1,e=Math.ceil(s/7),r=1,u=c.times(c),a=new l(c),i=c;-1!==t;)if(i=i.times(u),o=a.minus(i.div(r+=2)),i=i.times(u),void 0!==(a=o.plus(i.div(r+=2))).d[e])for(t=e;a.d[t]===o.d[t]&&t--;);return n&&(a=a.times(2<<n-1)),_q=!0,Qq(a,l.precision=h,l.rounding=d,!0)},zq.isFinite=function(){return!!this.d},zq.isInteger=zq.isInt=function(){return!!this.d&&Tq(this.e/7)>this.d.length-2},zq.isNaN=function(){return!this.s},zq.isNegative=zq.isNeg=function(){return this.s<0},zq.isPositive=zq.isPos=function(){return this.s>0},zq.isZero=function(){return!!this.d&&0===this.d[0]},zq.lessThan=zq.lt=function(t){return this.cmp(t)<0},zq.lessThanOrEqualTo=zq.lte=function(t){return this.cmp(t)<1},zq.logarithm=zq.log=function(t){var e,n,r,i,o,a,s,u,c=this,l=c.constructor,h=l.precision,d=l.rounding;if(null==t)t=new l(10),e=!0;else{if(n=(t=new l(t)).d,t.s<0||!n||!n[0]||t.eq(1))return new l(NaN);e=t.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new l(n&&!n[0]?-1/0:1!=c.s?NaN:n?0:1/0);if(e)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(_q=!1,a=tZ(c,s=h+5),r=e?Gq(l,s+10):tZ(t,s),Uq((u=Yq(a,r,s,1)).d,i=h,d))do{if(a=tZ(c,s+=10),r=e?Gq(l,s+10):tZ(t,s),u=Yq(a,r,s,1),!o){+Rq(u.d).slice(i+1,i+15)+1==1e14&&(u=Qq(u,h+1,0));break}}while(Uq(u.d,i+=10,d));return _q=!0,Qq(u,h,d)},zq.minus=zq.sub=function(t){var e,n,r,i,o,a,s,u,c,l,h,d,f=this,p=f.constructor;if(t=new p(t),!f.d||!t.d)return f.s&&t.s?f.d?t.s=-t.s:t=new p(t.d||f.s!==t.s?f:NaN):t=new p(NaN),t;if(f.s!=t.s)return t.s=-t.s,f.plus(t);if(c=f.d,d=t.d,s=p.precision,u=p.rounding,!c[0]||!d[0]){if(d[0])t.s=-t.s;else{if(!c[0])return new p(3===u?-0:0);t=new p(f)}return _q?Qq(t,s,u):t}if(n=Tq(t.e/7),l=Tq(f.e/7),c=c.slice(),o=l-n){for((h=o<0)?(e=c,o=-o,a=d.length):(e=d,n=l,a=c.length),o>(r=Math.max(Math.ceil(s/7),a)+2)&&(o=r,e.length=1),e.reverse(),r=o;r--;)e.push(0);e.reverse()}else{for((h=(r=c.length)<(a=d.length))&&(a=r),r=0;r<a;r++)if(c[r]!=d[r]){h=c[r]<d[r];break}o=0}for(h&&(e=c,c=d,d=e,t.s=-t.s),a=c.length,r=d.length-a;r>0;--r)c[a++]=0;for(r=d.length;r>o;){if(c[--r]<d[r]){for(i=r;i&&0===c[--i];)c[i]=Dq-1;--c[i],c[r]+=Dq}c[r]-=d[r]}for(;0===c[--a];)c.pop();for(;0===c[0];c.shift())--n;return c[0]?(t.d=c,t.e=Hq(c,n),_q?Qq(t,s,u):t):new p(3===u?-0:0)},zq.modulo=zq.mod=function(t){var e,n=this,r=n.constructor;return t=new r(t),!n.d||!t.s||t.d&&!t.d[0]?new r(NaN):!t.d||n.d&&!n.d[0]?Qq(new r(n),r.precision,r.rounding):(_q=!1,9==r.modulo?(e=Yq(n,t.abs(),0,3,1)).s*=t.s:e=Yq(n,t,0,r.modulo,1),e=e.times(t),_q=!0,n.minus(e))},zq.naturalExponential=zq.exp=function(){return $q(this)},zq.naturalLogarithm=zq.ln=function(){return tZ(this)},zq.negated=zq.neg=function(){var t=new this.constructor(this);return t.s=-t.s,Qq(t)},zq.plus=zq.add=function(t){var e,n,r,i,o,a,s,u,c,l,h=this,d=h.constructor;if(t=new d(t),!h.d||!t.d)return h.s&&t.s?h.d||(t=new d(t.d||h.s===t.s?h:NaN)):t=new d(NaN),t;if(h.s!=t.s)return t.s=-t.s,h.minus(t);if(c=h.d,l=t.d,s=d.precision,u=d.rounding,!c[0]||!l[0])return l[0]||(t=new d(h)),_q?Qq(t,s,u):t;if(o=Tq(h.e/7),r=Tq(t.e/7),c=c.slice(),i=o-r){for(i<0?(n=c,i=-i,a=l.length):(n=l,r=o,a=c.length),i>(a=(o=Math.ceil(s/7))>a?o+1:a+1)&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=c.length)-(i=l.length)<0&&(i=a,n=l,l=c,c=n),e=0;i;)e=(c[--i]=c[i]+l[i]+e)/Dq|0,c[i]%=Dq;for(e&&(c.unshift(e),++r),a=c.length;0==c[--a];)c.pop();return t.d=c,t.e=Hq(c,r),_q?Qq(t,s,u):t},zq.precision=zq.sd=function(t){var e,n=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(Aq+t);return n.d?(e=Zq(n.d),t&&n.e+1>e&&(e=n.e+1)):e=NaN,e},zq.round=function(){var t=this,e=t.constructor;return Qq(new e(t),t.e+1,e.rounding)},zq.sine=zq.sin=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(t,e){var n,r=e.d.length;if(r<3)return e.isZero()?e:iZ(t,2,e,e);n=1.4*Math.sqrt(r),n=n>16?16:0|n,e=e.times(1/oZ(5,n)),e=iZ(t,2,e,e);for(var i,o=new t(5),a=new t(16),s=new t(20);n--;)i=e.times(e),e=e.times(o.plus(i.times(a.times(i).minus(s))));return e}(r,aZ(r,n)),r.precision=t,r.rounding=e,Qq(hq>2?n.neg():n,t,e,!0)):new r(NaN)},zq.squareRoot=zq.sqrt=function(){var t,e,n,r,i,o,a=this,s=a.d,u=a.e,c=a.s,l=a.constructor;if(1!==c||!s||!s[0])return new l(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);for(_q=!1,0==(c=Math.sqrt(+a))||c==1/0?(((e=Rq(s)).length+u)%2==0&&(e+="0"),c=Math.sqrt(e),u=Tq((u+1)/2)-(u<0||u%2),r=new l(e=c==1/0?"5e"+u:(e=c.toExponential()).slice(0,e.indexOf("e")+1)+u)):r=new l(c.toString()),n=(u=l.precision)+3;;)if(r=(o=r).plus(Yq(a,o,n+2,1)).times(.5),Rq(o.d).slice(0,n)===(e=Rq(r.d)).slice(0,n)){if("9999"!=(e=e.slice(n-3,n+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(Qq(r,u+1,1),t=!r.times(r).eq(a));break}if(!i&&(Qq(o,u+1,0),o.times(o).eq(a))){r=o;break}n+=4,i=1}return _q=!0,Qq(r,u,l.rounding,t)},zq.tangent=zq.tan=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+10,r.rounding=1,(n=n.sin()).s=1,n=Yq(n,new r(1).minus(n.times(n)).sqrt(),t+10,0),r.precision=t,r.rounding=e,Qq(2==hq||4==hq?n.neg():n,t,e,!0)):new r(NaN)},zq.times=zq.mul=function(t){var e,n,r,i,o,a,s,u,c,l=this,h=l.constructor,d=l.d,f=(t=new h(t)).d;if(t.s*=l.s,!(d&&d[0]&&f&&f[0]))return new h(!t.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:d&&f?0*t.s:t.s/0);for(n=Tq(l.e/7)+Tq(t.e/7),(u=d.length)<(c=f.length)&&(o=d,d=f,f=o,a=u,u=c,c=a),o=[],r=a=u+c;r--;)o.push(0);for(r=c;--r>=0;){for(e=0,i=u+r;i>r;)s=o[i]+f[r]*d[i-r-1]+e,o[i--]=s%Dq|0,e=s/Dq|0;o[i]=(o[i]+e)%Dq|0}for(;!o[--a];)o.pop();return e?++n:o.shift(),t.d=o,t.e=Hq(o,n),_q?Qq(t,h.precision,h.rounding):t},zq.toBinary=function(t,e){return sZ(this,2,t,e)},zq.toDecimalPlaces=zq.toDP=function(t,e){var n=this,r=n.constructor;return n=new r(n),void 0===t?n:(Bq(t,0,gq),void 0===e?e=r.rounding:Bq(e,0,8),Qq(n,t+n.e+1,e))},zq.toExponential=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=Wq(r,!0):(Bq(t,0,gq),void 0===e?e=i.rounding:Bq(e,0,8),n=Wq(r=Qq(new i(r),t+1,e),!0,t+1)),r.isNeg()&&!r.isZero()?"-"+n:n},zq.toFixed=function(t,e){var n,r,i=this,o=i.constructor;return void 0===t?n=Wq(i):(Bq(t,0,gq),void 0===e?e=o.rounding:Bq(e,0,8),n=Wq(r=Qq(new o(i),t+i.e+1,e),!1,t+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},zq.toFraction=function(t){var e,n,r,i,o,a,s,u,c,l,h,d,f=this,p=f.d,m=f.constructor;if(!p)return new m(f);if(c=n=new m(1),r=u=new m(0),a=(o=(e=new m(r)).e=Zq(p)-f.e-1)%7,e.d[0]=xq(10,a<0?7+a:a),null==t)t=o>0?e:c;else{if(!(s=new m(t)).isInt()||s.lt(c))throw Error(Aq+s);t=s.gt(e)?o>0?e:c:s}for(_q=!1,s=new m(Rq(p)),l=m.precision,m.precision=o=7*p.length*2;h=Yq(s,e,0,1,1),1!=(i=n.plus(h.times(r))).cmp(t);)n=r,r=i,i=c,c=u.plus(h.times(i)),u=i,i=e,e=s.minus(h.times(i)),s=i;return i=Yq(t.minus(n),r,0,1,1),u=u.plus(i.times(c)),n=n.plus(i.times(r)),u.s=c.s=f.s,d=Yq(c,r,o,1).minus(f).abs().cmp(Yq(u,n,o,1).minus(f).abs())<1?[c,r]:[u,n],m.precision=l,_q=!0,d},zq.toHexadecimal=zq.toHex=function(t,e){return sZ(this,16,t,e)},zq.toNearest=function(t,e){var n=this,r=n.constructor;if(n=new r(n),null==t){if(!n.d)return n;t=new r(1),e=r.rounding}else{if(t=new r(t),void 0===e?e=r.rounding:Bq(e,0,8),!n.d)return t.s?n:t;if(!t.d)return t.s&&(t.s=n.s),t}return t.d[0]?(_q=!1,n=Yq(n,t,0,e,1).times(t),_q=!0,Qq(n)):(t.s=n.s,n=t),n},zq.toNumber=function(){return+this},zq.toOctal=function(t,e){return sZ(this,8,t,e)},zq.toPower=zq.pow=function(t){var e,n,r,i,o,a,s=this,u=s.constructor,c=+(t=new u(t));if(!(s.d&&t.d&&s.d[0]&&t.d[0]))return new u(xq(+s,c));if((s=new u(s)).eq(1))return s;if(r=u.precision,o=u.rounding,t.eq(1))return Qq(s,r,o);if((e=Tq(t.e/7))>=t.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=Jq(u,s,n,r),t.s<0?new u(1).div(i):Qq(i,r,o);if((a=s.s)<0){if(e<t.d.length-1)return new u(NaN);if(0==(1&t.d[e])&&(a=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=a,s}return(e=0!=(n=xq(+s,c))&&isFinite(n)?new u(n+"").e:Tq(c*(Math.log("0."+Rq(s.d))/Math.LN10+s.e+1)))>u.maxE+1||e<u.minE-1?new u(e>0?a/0:0):(_q=!1,u.rounding=s.s=1,n=Math.min(12,(e+"").length),(i=$q(t.times(tZ(s,r+n)),r)).d&&Uq((i=Qq(i,r+5,1)).d,r,o)&&(e=r+10,+Rq((i=Qq($q(t.times(tZ(s,e+n)),e),e+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=Qq(i,r+1,0))),i.s=a,_q=!0,u.rounding=o,Qq(i,r,o))},zq.toPrecision=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=Wq(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(Bq(t,1,gq),void 0===e?e=i.rounding:Bq(e,0,8),n=Wq(r=Qq(new i(r),t,e),t<=r.e||r.e<=i.toExpNeg,t)),r.isNeg()&&!r.isZero()?"-"+n:n},zq.toSignificantDigits=zq.toSD=function(t,e){var n=this.constructor;return void 0===t?(t=n.precision,e=n.rounding):(Bq(t,1,gq),void 0===e?e=n.rounding:Bq(e,0,8)),Qq(new n(this),t,e)},zq.toString=function(){var t=this,e=t.constructor,n=Wq(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+n:n},zq.truncated=zq.trunc=function(){return Qq(new this.constructor(this),this.e+1,1)},zq.valueOf=zq.toJSON=function(){var t=this,e=t.constructor,n=Wq(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+n:n};var Yq=function(){function t(t,e,n){var r,i=0,o=t.length;for(t=t.slice();o--;)r=t[o]*e+i,t[o]=r%n|0,i=r/n|0;return i&&t.unshift(i),t}function e(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function n(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]<e[n]?1:0,t[n]=i*r+t[n]-e[n];for(;!t[0]&&t.length>1;)t.shift()}return function(r,i,o,a,s,u){var c,l,h,d,f,p,m,y,g,b,v,w,M,_,E,A,S,k,N,T,x=r.constructor,L=r.s==i.s?1:-1,I=r.d,j=i.d;if(!(I&&I[0]&&j&&j[0]))return new x(r.s&&i.s&&(I?!j||I[0]!=j[0]:j)?I&&0==I[0]||!j?0*L:L/0:NaN);for(u?(f=1,l=r.e-i.e):(u=Dq,f=7,l=Tq(r.e/f)-Tq(i.e/f)),N=j.length,S=I.length,b=(g=new x(L)).d=[],h=0;j[h]==(I[h]||0);h++);if(j[h]>(I[h]||0)&&l--,null==o?(_=o=x.precision,a=x.rounding):_=s?o+(r.e-i.e)+1:o,_<0)b.push(1),p=!0;else{if(_=_/f+2|0,h=0,1==N){for(d=0,j=j[0],_++;(h<S||d)&&_--;h++)E=d*u+(I[h]||0),b[h]=E/j|0,d=E%j|0;p=d||h<S}else{for((d=u/(j[0]+1)|0)>1&&(j=t(j,d,u),I=t(I,d,u),N=j.length,S=I.length),A=N,w=(v=I.slice(0,N)).length;w<N;)v[w++]=0;(T=j.slice()).unshift(0),k=j[0],j[1]>=u/2&&++k;do{d=0,(c=e(j,v,N,w))<0?(M=v[0],N!=w&&(M=M*u+(v[1]||0)),(d=M/k|0)>1?(d>=u&&(d=u-1),1==(c=e(m=t(j,d,u),v,y=m.length,w=v.length))&&(d--,n(m,N<y?T:j,y,u))):(0==d&&(c=d=1),m=j.slice()),(y=m.length)<w&&m.unshift(0),n(v,m,w,u),-1==c&&(c=e(j,v,N,w=v.length))<1&&(d++,n(v,N<w?T:j,w,u)),w=v.length):0===c&&(d++,v=[0]),b[h++]=d,c&&v[0]?v[w++]=I[A]||0:(v=[I[A]],w=1)}while((A++<S||void 0!==v[0])&&_--);p=void 0!==v[0]}b[0]||b.shift()}if(1==f)g.e=l,lq=p;else{for(h=1,d=b[0];d>=10;d/=10)h++;g.e=h+l*f-1,Qq(g,s?o+g.e+1:o,a,p)}return g}}();function Qq(t,e,n,r){var i,o,a,s,u,c,l,h,d,f=t.constructor;t:if(null!=e){if(!(h=t.d))return t;for(i=1,s=h[0];s>=10;s/=10)i++;if((o=e-i)<0)o+=7,a=e,u=(l=h[d=0])/xq(10,i-a-1)%10|0;else if((d=Math.ceil((o+1)/7))>=(s=h.length)){if(!r)break t;for(;s++<=d;)h.push(0);l=u=0,i=1,a=(o%=7)-7+1}else{for(l=s=h[d],i=1;s>=10;s/=10)i++;u=(a=(o%=7)-7+i)<0?0:l/xq(10,i-a-1)%10|0}if(r=r||e<0||void 0!==h[d+1]||(a<0?l:l%xq(10,i-a-1)),c=n<4?(u||r)&&(0==n||n==(t.s<0?3:2)):u>5||5==u&&(4==n||r||6==n&&(o>0?a>0?l/xq(10,i-a):0:h[d-1])%10&1||n==(t.s<0?8:7)),e<1||!h[0])return h.length=0,c?(e-=t.e+1,h[0]=xq(10,(7-e%7)%7),t.e=-e||0):h[0]=t.e=0,t;if(0==o?(h.length=d,s=1,d--):(h.length=d+1,s=xq(10,7-o),h[d]=a>0?(l/xq(10,i-a)%xq(10,a)|0)*s:0),c)for(;;){if(0==d){for(o=1,a=h[0];a>=10;a/=10)o++;for(a=h[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(t.e++,h[0]==Dq&&(h[0]=1));break}if(h[d]+=s,h[d]!=Dq)break;h[d--]=0,s=1}for(o=h.length;0===h[--o];)h.pop()}return _q&&(t.e>f.maxE?(t.d=null,t.e=NaN):t.e<f.minE&&(t.e=0,t.d=[0])),t}function Wq(t,e,n){if(!t.isFinite())return eZ(t);var r,i=t.e,o=Rq(t.d),a=o.length;return e?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+Vq(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(t.e<0?"e":"e+")+t.e):i<0?(o="0."+Vq(-i-1)+o,n&&(r=n-a)>0&&(o+=Vq(r))):i>=a?(o+=Vq(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Vq(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=Vq(r))),o}function Hq(t,e){var n=t[0];for(e*=7;n>=10;n/=10)e++;return e}function Gq(t,e,n){if(e>Oq)throw _q=!0,n&&(t.precision=n),Error(Sq);return Qq(new t(vq),e,1,!0)}function qq(t,e,n){if(e>Pq)throw Error(Sq);return Qq(new t(wq),e,n,!0)}function Zq(t){var e=t.length-1,n=7*e+1;if(e=t[e]){for(;e%10==0;e/=10)n--;for(e=t[0];e>=10;e/=10)n++}return n}function Vq(t){for(var e="";t--;)e+="0";return e}function Jq(t,e,n,r){var i,o=new t(1),a=Math.ceil(r/7+4);for(_q=!1;;){if(n%2&&uZ((o=o.times(e)).d,a)&&(i=!0),0===(n=Tq(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}uZ((e=e.times(e)).d,a)}return _q=!0,o}function Kq(t){return 1&t.d[t.d.length-1]}function Xq(t,e,n){for(var r,i=new t(e[0]),o=0;++o<e.length;){if(!(r=new t(e[o])).s){i=r;break}i[n](r)&&(i=r)}return i}function $q(t,e){var n,r,i,o,a,s,u,c=0,l=0,h=0,d=t.constructor,f=d.rounding,p=d.precision;if(!t.d||!t.d[0]||t.e>17)return new d(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(null==e?(_q=!1,u=p):u=e,s=new d(.03125);t.e>-2;)t=t.times(s),h+=5;for(u+=r=Math.log(xq(2,h))/Math.LN10*2+5|0,n=o=a=new d(1),d.precision=u;;){if(o=Qq(o.times(t),u,1),n=n.times(++l),Rq((s=a.plus(Yq(o,n,u,1))).d).slice(0,u)===Rq(a.d).slice(0,u)){for(i=h;i--;)a=Qq(a.times(a),u,1);if(null!=e)return d.precision=p,a;if(!(c<3&&Uq(a.d,u-r,f,c)))return Qq(a,d.precision=p,f,_q=!0);d.precision=u+=10,n=o=s=new d(1),l=0,c++}a=s}}function tZ(t,e){var n,r,i,o,a,s,u,c,l,h,d,f=1,p=t,m=p.d,y=p.constructor,g=y.rounding,b=y.precision;if(p.s<0||!m||!m[0]||!p.e&&1==m[0]&&1==m.length)return new y(m&&!m[0]?-1/0:1!=p.s?NaN:m?0:p);if(null==e?(_q=!1,l=b):l=e,y.precision=l+=10,r=(n=Rq(m)).charAt(0),!(Math.abs(o=p.e)<15e14))return c=Gq(y,l+2,b).times(o+""),p=tZ(new y(r+"."+n.slice(1)),l-10).plus(c),y.precision=b,null==e?Qq(p,b,g,_q=!0):p;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=Rq((p=p.times(t)).d)).charAt(0),f++;for(o=p.e,r>1?(p=new y("0."+n),o++):p=new y(r+"."+n.slice(1)),h=p,u=a=p=Yq(p.minus(1),p.plus(1),l,1),d=Qq(p.times(p),l,1),i=3;;){if(a=Qq(a.times(d),l,1),Rq((c=u.plus(Yq(a,new y(i),l,1))).d).slice(0,l)===Rq(u.d).slice(0,l)){if(u=u.times(2),0!==o&&(u=u.plus(Gq(y,l+2,b).times(o+""))),u=Yq(u,new y(f),l,1),null!=e)return y.precision=b,u;if(!Uq(u.d,l-10,g,s))return Qq(u,y.precision=b,g,_q=!0);y.precision=l+=10,c=a=p=Yq(h.minus(1),h.plus(1),l,1),d=Qq(p.times(p),l,1),i=s=1}u=c,i+=2}}function eZ(t){return String(t.s*t.s/0)}function nZ(t,e){var n,r,i;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;48===e.charCodeAt(r);r++);for(i=e.length;48===e.charCodeAt(i-1);--i);if(e=e.slice(r,i)){if(i-=r,t.e=n=n-r-1,t.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&t.d.push(+e.slice(0,r)),i-=7;r<i;)t.d.push(+e.slice(r,r+=7));r=7-(e=e.slice(r)).length}else r-=i;for(;r--;)e+="0";t.d.push(+e),_q&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function rZ(t,e){var n,r,i,o,a,s,u,c,l;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),Cq.test(e))return nZ(t,e)}else if("Infinity"===e||"NaN"===e)return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(Iq.test(e))n=16,e=e.toLowerCase();else if(Lq.test(e))n=2;else{if(!jq.test(e))throw Error(Aq+e);n=8}for((o=e.search(/p/i))>0?(u=+e.slice(o+1),e=e.substring(2,o)):e=e.slice(2),a=(o=e.indexOf("."))>=0,r=t.constructor,a&&(o=(s=(e=e.replace(".","")).length)-o,i=Jq(r,new r(n),o,2*o)),o=l=(c=Fq(e,n,Dq)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*t.s):(t.e=Hq(c,l),t.d=c,_q=!1,a&&(t=Yq(t,i,4*s)),u&&(t=t.times(Math.abs(u)<54?xq(2,u):VZ.pow(2,u))),_q=!0,t)}function iZ(t,e,n,r,i){var o,a,s,u,c=t.precision,l=Math.ceil(c/7);for(_q=!1,u=n.times(n),s=new t(r);;){if(a=Yq(s.times(u),new t(e++*e++),c,1),s=i?r.plus(a):r.minus(a),r=Yq(a.times(u),new t(e++*e++),c,1),void 0!==(a=s.plus(r)).d[l]){for(o=l;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=r,r=a,a=o}return _q=!0,a.d.length=l+1,a}function oZ(t,e){for(var n=t;--e;)n*=t;return n}function aZ(t,e){var n,r=e.s<0,i=qq(t,t.precision,1),o=i.times(.5);if((e=e.abs()).lte(o))return hq=r?4:1,e;if((n=e.divToInt(i)).isZero())hq=r?3:2;else{if((e=e.minus(n.times(i))).lte(o))return hq=Kq(n)?r?2:3:r?4:1,e;hq=Kq(n)?r?1:4:r?3:2}return e.minus(i).abs()}function sZ(t,e,n,r){var i,o,a,s,u,c,l,h,d,f=t.constructor,p=void 0!==n;if(p?(Bq(n,1,gq),void 0===r?r=f.rounding:Bq(r,0,8)):(n=f.precision,r=f.rounding),t.isFinite()){for(p?(i=2,16==e?n=4*n-3:8==e&&(n=3*n-2)):i=e,(a=(l=Wq(t)).indexOf("."))>=0&&(l=l.replace(".",""),(d=new f(1)).e=l.length-a,d.d=Fq(Wq(d),10,i),d.e=d.d.length),o=u=(h=Fq(l,10,i)).length;0==h[--u];)h.pop();if(h[0]){if(a<0?o--:((t=new f(t)).d=h,t.e=o,h=(t=Yq(t,d,n,r,0,i)).d,o=t.e,c=lq),a=h[n],s=i/2,c=c||void 0!==h[n+1],c=r<4?(void 0!==a||c)&&(0===r||r===(t.s<0?3:2)):a>s||a===s&&(4===r||c||6===r&&1&h[n-1]||r===(t.s<0?8:7)),h.length=n,c)for(;++h[--n]>i-1;)h[n]=0,n||(++o,h.unshift(1));for(u=h.length;!h[u-1];--u);for(a=0,l="";a<u;a++)l+=bq.charAt(h[a]);if(p){if(u>1)if(16==e||8==e){for(a=16==e?4:3,--u;u%a;u++)l+="0";for(u=(h=Fq(l,i,e)).length;!h[u-1];--u);for(a=1,l="1.";a<u;a++)l+=bq.charAt(h[a])}else l=l.charAt(0)+"."+l.slice(1);l=l+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)l="0"+l;l="0."+l}else if(++o>u)for(o-=u;o--;)l+="0";else o<u&&(l=l.slice(0,o)+"."+l.slice(o))}else l=p?"0p+0":"0";l=(16==e?"0x":2==e?"0b":8==e?"0o":"")+l}else l=eZ(t);return t.s<0?"-"+l:l}function uZ(t,e){if(t.length>e)return t.length=e,!0}function cZ(t){return new this(t).abs()}function lZ(t){return new this(t).acos()}function hZ(t){return new this(t).acosh()}function dZ(t,e){return new this(t).plus(e)}function fZ(t){return new this(t).asin()}function pZ(t){return new this(t).asinh()}function mZ(t){return new this(t).atan()}function yZ(t){return new this(t).atanh()}function gZ(t,e){t=new this(t),e=new this(e);var n,r=this.precision,i=this.rounding,o=r+4;return t.s&&e.s?t.d||e.d?!e.d||t.isZero()?(n=e.s<0?qq(this,r,i):new this(0)).s=t.s:!t.d||e.isZero()?(n=qq(this,o,1).times(.5)).s=t.s:e.s<0?(this.precision=o,this.rounding=1,n=this.atan(Yq(t,e,o,1)),e=qq(this,o,1),this.precision=r,this.rounding=i,n=t.s<0?n.minus(e):n.plus(e)):n=this.atan(Yq(t,e,o,1)):(n=qq(this,o,1).times(e.s>0?.25:.75)).s=t.s:n=new this(NaN),n}function bZ(t){return new this(t).cbrt()}function vZ(t){return Qq(t=new this(t),t.e+1,2)}function wZ(t,e,n){return new this(t).clamp(e,n)}function MZ(t){if(!t||"object"!=typeof t)throw Error(Eq+"Object expected");var e,n,r,i=!0===t.defaults,o=["precision",1,gq,"rounding",0,8,"toExpNeg",-yq,0,"toExpPos",0,yq,"maxE",0,yq,"minE",-yq,0,"modulo",0,9];for(e=0;e<o.length;e+=3)if(n=o[e],i&&(this[n]=Mq[n]),void 0!==(r=t[n])){if(!(Tq(r)===r&&r>=o[e+1]&&r<=o[e+2]))throw Error(Aq+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=Mq[n]),void 0!==(r=t[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(Aq+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(kq);this[n]=!0}else this[n]=!1}return this}function _Z(t){return new this(t).cos()}function EZ(t){return new this(t).cosh()}function AZ(t,e){return new this(t).div(e)}function SZ(t){return new this(t).exp()}function kZ(t){return Qq(t=new this(t),t.e+1,3)}function NZ(){var t,e,n=new this(0);for(_q=!1,t=0;t<arguments.length;)if((e=new this(arguments[t++])).d)n.d&&(n=n.plus(e.times(e)));else{if(e.s)return _q=!0,new this(1/0);n=e}return _q=!0,n.sqrt()}function TZ(t){return t instanceof VZ||t&&t.toStringTag===Nq||!1}function xZ(t){return new this(t).ln()}function LZ(t,e){return new this(t).log(e)}function IZ(t){return new this(t).log(2)}function jZ(t){return new this(t).log(10)}function CZ(){return Xq(this,arguments,"lt")}function DZ(){return Xq(this,arguments,"gt")}function OZ(t,e){return new this(t).mod(e)}function PZ(t,e){return new this(t).mul(e)}function zZ(t,e){return new this(t).pow(e)}function RZ(t){var e,n,r,i,o=0,a=new this(1),s=[];if(void 0===t?t=this.precision:Bq(t,1,gq),r=Math.ceil(t/7),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=e[o])>=429e7?e[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(kq);for(e=crypto.randomBytes(r*=4);o<r;)(i=e[o]+(e[o+1]<<8)+(e[o+2]<<16)+((127&e[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(e,o):(s.push(i%1e7),o+=4);o=r/4}else for(;o<r;)s[o++]=1e7*Math.random()|0;for(t%=7,(r=s[--o])&&t&&(i=xq(10,7-t),s[o]=(r/i|0)*i);0===s[o];o--)s.pop();if(o<0)n=0,s=[0];else{for(n=-1;0===s[0];n-=7)s.shift();for(r=1,i=s[0];i>=10;i/=10)r++;r<7&&(n-=7-r)}return a.e=n,a.d=s,a}function BZ(t){return Qq(t=new this(t),t.e+1,this.rounding)}function UZ(t){return(t=new this(t)).d?t.d[0]?t.s:0*t.s:t.s||NaN}function FZ(t){return new this(t).sin()}function YZ(t){return new this(t).sinh()}function QZ(t){return new this(t).sqrt()}function WZ(t,e){return new this(t).sub(e)}function HZ(){var t=0,e=arguments,n=new this(e[t]);for(_q=!1;n.s&&++t<e.length;)n=n.plus(e[t]);return _q=!0,Qq(n,this.precision,this.rounding)}function GZ(t){return new this(t).tan()}function qZ(t){return new this(t).tanh()}function ZZ(t){return Qq(t=new this(t),t.e+1,1)}zq[Symbol.for("nodejs.util.inspect.custom")]=zq.toString,zq[Symbol.toStringTag]="Decimal";var VZ=zq.constructor=function t(e){var n,r,i;function o(t){var e,n,r,i=this;if(!(i instanceof o))return new o(t);if(i.constructor=o,TZ(t))return i.s=t.s,void(_q?!t.d||t.e>o.maxE?(i.e=NaN,i.d=null):t.e<o.minE?(i.e=0,i.d=[0]):(i.e=t.e,i.d=t.d.slice()):(i.e=t.e,i.d=t.d?t.d.slice():t.d));if("number"===(r=typeof t)){if(0===t)return i.s=1/t<0?-1:1,i.e=0,void(i.d=[0]);if(t<0?(t=-t,i.s=-1):i.s=1,t===~~t&&t<1e7){for(e=0,n=t;n>=10;n/=10)e++;return void(_q?e>o.maxE?(i.e=NaN,i.d=null):e<o.minE?(i.e=0,i.d=[0]):(i.e=e,i.d=[t]):(i.e=e,i.d=[t]))}return 0*t!=0?(t||(i.s=NaN),i.e=NaN,void(i.d=null)):nZ(i,t.toString())}if("string"!==r)throw Error(Aq+t);return 45===(n=t.charCodeAt(0))?(t=t.slice(1),i.s=-1):(43===n&&(t=t.slice(1)),i.s=1),Cq.test(t)?nZ(i,t):rZ(i,t)}if(o.prototype=zq,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=MZ,o.clone=t,o.isDecimal=TZ,o.abs=cZ,o.acos=lZ,o.acosh=hZ,o.add=dZ,o.asin=fZ,o.asinh=pZ,o.atan=mZ,o.atanh=yZ,o.atan2=gZ,o.cbrt=bZ,o.ceil=vZ,o.clamp=wZ,o.cos=_Z,o.cosh=EZ,o.div=AZ,o.exp=SZ,o.floor=kZ,o.hypot=NZ,o.ln=xZ,o.log=LZ,o.log10=jZ,o.log2=IZ,o.max=CZ,o.min=DZ,o.mod=OZ,o.mul=PZ,o.pow=zZ,o.random=RZ,o.round=BZ,o.sign=UZ,o.sin=FZ,o.sinh=YZ,o.sqrt=QZ,o.sub=WZ,o.sum=HZ,o.tan=GZ,o.tanh=qZ,o.trunc=ZZ,void 0===e&&(e={}),e&&!0!==e.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<i.length;)e.hasOwnProperty(r=i[n++])||(e[r]=this[r]);return o.config(e),o}(Mq);vq=new VZ(vq),wq=new VZ(wq);const JZ="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",KZ="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";var XZ=async({token:t,owner:e})=>{const[n]=await JU.findProgramAddress([new JU(e).toBuffer(),new JU(JZ).toBuffer(),new JU(t).toBuffer()],new JU(KZ));return function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([n,"optionalAccess",t=>t.toString,"call",t=>t()])};const $Z=WW([qW("mintAuthorityOption"),FW("mintAuthority"),ZW("supply"),VW("decimals"),BW("isInitialized"),qW("freezeAuthorityOption"),FW("freezeAuthority")]),tV=YW([WW([],"uninitialized"),WW([],"editionV1"),WW([],"masterEditionV1"),WW([],"reservationListV1"),WW([],"metadataV1"),WW([],"reservationListV2"),WW([],"masterEditionV2"),WW([],"editionMarker")]),eV=WW([FW("address"),BW("verified"),VW("share")]),nV=WW([QW("name"),QW("symbol"),QW("uri"),GW("sellerFeeBasisPoints"),UW(JW(eV.replicate("creators")),"creators")]),rV=WW([tV.replicate("key"),FW("updateAuthority"),FW("mint"),nV.replicate("data"),BW("primarySaleHappened"),BW("isMutable"),UW(VW(),"editionNonce")]),iV=WW([VW("instruction"),ZW("amount")]),oV=WW([FW("mint"),FW("owner"),ZW("amount"),qW("delegateOption"),FW("delegate"),VW("state"),qW("isNativeOption"),ZW("isNative"),ZW("delegatedAmount"),qW("closeAuthorityOption"),FW("closeAuthority")]),aV=WW([VW("instruction"),FW("owner")]),sV=WW([VW("instruction")]);var uV=Object.freeze({__proto__:null,createTransferInstruction:async({token:t,amount:e,from:n,to:r})=>{let i=await XZ({token:t,owner:n}),o=await XZ({token:t,owner:r});const a=[{pubkey:new JU(i),isSigner:!1,isWritable:!0},{pubkey:new JU(o),isSigner:!1,isWritable:!0},{pubkey:new JU(n),isSigner:!0,isWritable:!1}],s=PW.alloc(iV.span);return iV.encode({instruction:3,amount:new zW(e)},s),new dF({keys:a,programId:new JU(JZ),data:s})},createAssociatedTokenAccountInstruction:async({token:t,owner:e,payer:n})=>{let r=await XZ({token:t,owner:e});const i=[{pubkey:new JU(n),isSigner:!0,isWritable:!0},{pubkey:new JU(r),isSigner:!1,isWritable:!0},{pubkey:new JU(e),isSigner:!1,isWritable:!1},{pubkey:new JU(t),isSigner:!1,isWritable:!1},{pubkey:DF.programId,isSigner:!1,isWritable:!1},{pubkey:new JU(JZ),isSigner:!1,isWritable:!1}];return new dF({keys:i,programId:KZ,data:PW.alloc(0)})},initializeAccountInstruction:({account:t,token:e,owner:n})=>{const r=[{pubkey:new JU(t),isSigner:!1,isWritable:!0},{pubkey:new JU(e),isSigner:!1,isWritable:!1}],i=PW.alloc(aV.span);return aV.encode({instruction:18,owner:new JU(n)},i),new dF({keys:r,programId:new JU(JZ),data:i})},closeAccountInstruction:({account:t,owner:e})=>{const n=[{pubkey:new JU(t),isSigner:!1,isWritable:!0},{pubkey:new JU(e),isSigner:!1,isWritable:!0},{pubkey:new JU(e),isSigner:!0,isWritable:!1}],r=PW.alloc(sV.span);return sV.encode({instruction:9},r),new dF({keys:n,programId:new JU(JZ),data:r})}}),cV=[{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"renounceOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}],lV=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],hV=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}],dV=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}];const fV=[{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];var pV=({blockchain:t,address:e,api:n,id:r})=>r?new Promise((n=>{EH({blockchain:t,address:e,api:fV,method:"uri",params:[r]}).then((t=>{var e;t=t.match("0x{id}")?t.replace("0x{id}",r):t,(e=t,new Promise((t=>{e.match(/^ipfs/)&&(e=`https://ipfs.io/ipfs/${e.split("://")[1]}`),fetch(e).then((e=>{if(e.ok)return e.json();t()})).then((e=>{if(e){let n=e.name;n?t(n):t()}})).catch((()=>t()))}))).then(n)})).catch((t=>{console.log("error",t),n()}))})):EH({blockchain:t,address:e,api:n,method:"name",cache:864e5});function mV(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}const yV="metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s",gV=new RegExp("\0","g"),bV=async({blockchain:t,address:e})=>{let n=new JU(e),r=new JU(yV),i=await(async({metaDataPublicKey:t,mintPublicKey:e})=>{let n=[PW.from("metadata"),t.toBuffer(),e.toBuffer()];return(await JU.findProgramAddress(n,t))[0]})({metaDataPublicKey:r,mintPublicKey:n}),o=await EH({blockchain:t,address:i.toString(),api:rV,cache:864e5});return{name:mV([o,"optionalAccess",t=>t.data,"optionalAccess",t=>t.name,"optionalAccess",t=>t.replace,"call",t=>t(gV,"")]),symbol:mV([o,"optionalAccess",t=>t.data,"optionalAccess",t=>t.symbol,"optionalAccess",t=>t.replace,"call",t=>t(gV,"")])}};var vV=[{name:"Approval",type:"event",inputs:[{name:"src",type:"address",indexed:!0,internalType:"address"},{name:"guy",type:"address",indexed:!0,internalType:"address"},{name:"wad",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{name:"Deposit",type:"event",inputs:[{name:"dst",type:"address",indexed:!0,internalType:"address"},{name:"wad",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{name:"Transfer",type:"event",inputs:[{name:"src",type:"address",indexed:!0,internalType:"address"},{name:"dst",type:"address",indexed:!0,internalType:"address"},{name:"wad",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{name:"Withdrawal",type:"event",inputs:[{name:"src",type:"address",indexed:!0,internalType:"address"},{name:"wad",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"fallback",stateMutability:"payable"},{name:"allowance",type:"function",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{name:"approve",type:"function",inputs:[{name:"guy",type:"address",internalType:"address"},{name:"wad",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"nonpayable"},{name:"balanceOf",type:"function",inputs:[{name:"",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{name:"decimals",type:"function",inputs:[],outputs:[{name:"",type:"uint8",internalType:"uint8"}],stateMutability:"view"},{name:"deposit",type:"function",inputs:[],outputs:[],stateMutability:"payable"},{name:"name",type:"function",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{name:"symbol",type:"function",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{name:"totalSupply",type:"function",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{name:"transfer",type:"function",inputs:[{name:"dst",type:"address",internalType:"address"},{name:"wad",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"nonpayable"},{name:"transferFrom",type:"function",inputs:[{name:"src",type:"address",internalType:"address"},{name:"dst",type:"address",internalType:"address"},{name:"wad",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"nonpayable"},{name:"withdraw",type:"function",inputs:[{name:"wad",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"}];let wV=["ethereum","bsc","polygon","solana","velas"];function MV(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}wV.evm=["ethereum","bsc","polygon","velas"],wV.solana=["solana"];class _V{constructor({blockchain:t,address:e}){this.blockchain=t,wV.evm.includes(this.blockchain)?this.address=cp(e):wV.solana.includes(this.blockchain)&&(this.address=e)}async decimals(){if(this.address==UM[this.blockchain].NATIVE)return UM[this.blockchain].DECIMALS;let t;try{wV.evm.includes(this.blockchain)?t=await(({blockchain:t,address:e,api:n})=>EH({blockchain:t,address:e,api:n,method:"decimals",cache:864e5}))({blockchain:this.blockchain,address:this.address,api:_V[this.blockchain].DEFAULT}):wV.solana.includes(this.blockchain)&&(t=await(async({blockchain:t,address:e})=>(await EH({blockchain:t,address:e,api:$Z})).decimals)({blockchain:this.blockchain,address:this.address}))}catch(t){}return t}async symbol(){return this.address==UM[this.blockchain].NATIVE?UM[this.blockchain].SYMBOL:wV.evm.includes(this.blockchain)?await(({blockchain:t,address:e,api:n})=>EH({blockchain:t,address:e,api:n,method:"symbol",cache:864e5}))({blockchain:this.blockchain,address:this.address,api:_V[this.blockchain].DEFAULT}):wV.solana.includes(this.blockchain)?await(async({blockchain:t,address:e})=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([await bV({blockchain:t,address:e}),"optionalAccess",t=>t.symbol]))({blockchain:this.blockchain,address:this.address}):void 0}async name(t){return this.address==UM[this.blockchain].NATIVE?UM[this.blockchain].CURRENCY:wV.evm.includes(this.blockchain)?await pV({blockchain:this.blockchain,address:this.address,api:_V[this.blockchain].DEFAULT,id:MV([t,"optionalAccess",t=>t.id])}):wV.solana.includes(this.blockchain)?await(async({blockchain:t,address:e})=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([await bV({blockchain:t,address:e}),"optionalAccess",t=>t.name]))({blockchain:this.blockchain,address:this.address}):void 0}async balance(t,e){return wV.evm.includes(this.blockchain)?await(async({blockchain:t,address:e,account:n,api:r,id:i})=>e==UM[t].NATIVE?await EH({blockchain:t,address:n,method:"balance",cache:1e4}):await EH({blockchain:t,address:e,method:"balanceOf",api:r,params:i?[n,i]:[n],cache:1e4}))({blockchain:this.blockchain,account:t,address:this.address,api:e?_V[this.blockchain][1155]:_V[this.blockchain].DEFAULT,id:e}):wV.solana.includes(this.blockchain)?await(async({blockchain:t,address:e,account:n,api:r})=>{if(e==UM[t].NATIVE)return Wd.from(await EH(`solana://${n}/balance`));{let t=[{dataSize:165},{memcmp:{offset:32,bytes:n}},{memcmp:{offset:0,bytes:e}}],r=await EH("solana://TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA/getProgramAccounts",{params:{filters:t}}),i=Wd.from("0");return await Promise.all(r.map((t=>EH(`solana://${t.pubkey.toString()}/getTokenAccountBalance`)))).then((t=>{t.forEach((t=>{i=i.add(Wd.from(t.value.amount))}))})),i}})({blockchain:this.blockchain,account:t,address:this.address,api:_V[this.blockchain].DEFAULT}):void 0}async allowance(t,e){return this.address==UM[this.blockchain].NATIVE?Wd.from(UM[this.blockchain].MAXINT):wV.evm.includes(this.blockchain)?await(({blockchain:t,address:e,api:n,owner:r,spender:i})=>EH({blockchain:t,address:e,api:n,method:"allowance",params:[r,i],cache:5e3}))({blockchain:this.blockchain,address:this.address,api:_V[this.blockchain].DEFAULT,owner:t,spender:e}):wV.solana.includes(this.blockchain)?Wd.from(UM[this.blockchain].MAXINT):void 0}async BigNumber(t){let e=await this.decimals();return BM(_V.safeAmount({amount:parseFloat(t),decimals:e}).toString(),e)}async readable(t){let e=await this.decimals(),n=RM(t.toString(),e);return n=n.replace(/0+$/,""),n=n.replace(/\.$/,""),n}}_V.BigNumber=async({amount:t,blockchain:e,address:n})=>new _V({blockchain:e,address:n}).BigNumber(t),_V.readable=async({amount:t,blockchain:e,address:n})=>new _V({blockchain:e,address:n}).readable(t),_V.safeAmount=({amount:t,decimals:e})=>parseFloat(t.toFixed(e)),_V.ethereum={DEFAULT:hV,ERC20:hV,20:hV,1155:[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}]},_V.bsc={DEFAULT:cV,BEP20:cV,20:cV,1155:lV},_V.polygon={DEFAULT:dV,ERC20:dV,20:dV,1155:lV},_V.velas={DEFAULT:vV,VRC20:vV,20:vV,1155:lV},_V.solana={MINT_LAYOUT:$Z,METADATA_LAYOUT:rV,TRANSFER_LAYOUT:iV,METADATA_ACCOUNT:yV,TOKEN_PROGRAM:JZ,TOKEN_LAYOUT:oV,ASSOCIATED_TOKEN_PROGRAM:KZ,findProgramAddress:XZ,findAccount:async({token:t,owner:e})=>{let n=(await EH(`solana://${JZ}/getProgramAccounts`,{api:oV,params:{filters:[{dataSize:165},{memcmp:{offset:32,bytes:e}},{memcmp:{offset:0,bytes:t}}]}})).sort(((t,e)=>t.account.data.amount.lt(e.account.data.amount)?1:-1))[0];if(n)return n.pubkey.toString()},getMetaData:bV,...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iIgZmlsbD0iI0ZFREM5MCIvPgo8cGF0aCBkPSJNNzUuNjEzNSAxMTcuODk2Qzc1LjYxMzUgMTI3LjYxNCA3MS4wMjEgMTMyLjY3NSA2NS4zNTU4IDEzMi42NzVDNTkuNjkwNyAxMzIuNjc1IDU1LjA5ODEgMTI3LjYxNCA1NS4wOTgxIDExNy44OTZDNTUuMDk4MSAxMDguMTc4IDU5LjY5MDcgMTAzLjExNyA2NS4zNTU4IDEwMy4xMTdDNzEuMDIxIDEwMy4xMTcgNzUuNjEzNSAxMDguMTc4IDc1LjYxMzUgMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPHBhdGggZD0iTTE0Mi4yODggMTE3Ljg5NkMxNDIuMjg4IDEyNy42MTQgMTM3LjY5NiAxMzIuNjc1IDEzMi4wMzEgMTMyLjY3NUMxMjYuMzY1IDEzMi42NzUgMTIxLjc3MyAxMjcuNjE0IDEyMS43NzMgMTE3Ljg5NkMxMjEuNzczIDEwOC4xNzggMTI2LjM2NSAxMDMuMTE3IDEzMi4wMzEgMTAzLjExN0MxMzcuNjk2IDEwMy4xMTcgMTQyLjI4OCAxMDguMTc4IDE0Mi4yODggMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPC9zdmc+Cg==",router:{address:"0x10ED43C718714eb63d5aA57B78B54704E256024E",api:[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"amountADesired",type:"uint256"},{internalType:"uint256",name:"amountBDesired",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountTokenDesired",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountIn",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountOut",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsIn",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsOut",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"reserveA",type:"uint256"},{internalType:"uint256",name:"reserveB",type:"uint256"}],name:"quote",outputs:[{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETHSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermit",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityWithPermit",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapETHForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETHSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]},factory:{address:"0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73",api:[{inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!1,internalType:"address",name:"pair",type:"address"},{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"PairCreated",type:"event"},{constant:!0,inputs:[],name:"INIT_CODE_PAIR_HASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"allPairs",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"allPairsLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"}],name:"createPair",outputs:[{internalType:"address",name:"pair",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"feeTo",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"feeToSetter",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"getPair",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeTo",type:"address"}],name:"setFeeTo",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],name:"setFeeToSetter",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},pair:{api:[{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount0Out",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1Out",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint112",name:"reserve0",type:"uint112"},{indexed:!1,internalType:"uint112",name:"reserve1",type:"uint112"}],name:"Sync",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"MINIMUM_LIQUIDITY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getReserves",outputs:[{internalType:"uint112",name:"_reserve0",type:"uint112"},{internalType:"uint112",name:"_reserve1",type:"uint112"},{internalType:"uint32",name:"_blockTimestampLast",type:"uint32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_token0",type:"address"},{internalType:"address",name:"_token1",type:"address"}],name:"initialize",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"kLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[{internalType:"uint256",name:"liquidity",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"price0CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"price1CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"skim",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"amount0Out",type:"uint256"},{internalType:"uint256",name:"amount1Out",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"sync",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}]},slippage:!0};function AV(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}class SV{constructor({tokenIn:t,tokenOut:e,path:n,amountIn:r,amountInMax:i,amountOut:o,amountOutMin:a,exchange:s,getTransaction:u}){this.tokenIn=t,this.tokenOut=e,this.path=n,this.amountIn=AV([r,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountOutMin=AV([a,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountOut=AV([o,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountInMax=AV([i,"optionalAccess",t=>t.toString,"call",t=>t()]),this.exchange=s,this.getTransaction=u}}let kV=["ethereum","bsc","polygon","solana","velas"];kV.evm=["ethereum","bsc","polygon","velas"],kV.solana=["solana"];const NV=async({exchange:t,fixedPath:e,amountIn:n,amountOut:r})=>{let i=n.add(n.mul(100*parseFloat("0.5")).div(1e4));if(!kV.evm.includes(t.blockchain))return i;const o=await EH({blockchain:t.blockchain,method:"latestBlockNumber"});let a=[];for(var s=0;s<=2;s++)a.push(o-s);const u=await Promise.all(a.map((async n=>{let{amountIn:i}=await t.getAmounts({path:e,amountOut:r,block:n});return i})));if(!u[0]||!u[1]||!u[2])return i;let c;if(u[0].gt(u[1])&&u[1].gt(u[2])){const t=u[0].sub(u[1]),e=u[1].sub(u[2]),n=t.add(e).div(2);if(c=u[0].add(n),c.gt(i))return c}else if(!u[0].eq(u[1])&&!u[1].eq(u[2])){const t=u[0].sub(u[1]).abs(),e=u[1].sub(u[2]).abs();let n,r;if(n=t.lt(e)?t:e,r=u[0].gt(u[1])&&u[0].gt(u[2])?u[0]:u[1].gt(u[2])&&u[1].gt(u[0])?u[1]:u[2],c=r.add(n),c.gt(i))return c}return i},TV=async({exchange:t,fixedPath:e,amounts:n,tokenIn:r,tokenOut:i,amountIn:o,amountInMax:a,amountOut:s,amountOutMin:u,amountInInput:c,amountOutInput:l,amountInMaxInput:h,amountOutMinInput:d})=>{if(d||l){if(kV.evm.includes(t.blockchain))o=a=await NV({exchange:t,fixedPath:e,amountIn:o,amountOut:d||s});else if(kV.solana.includes(t.blockchain)){let r=[];await Promise.all(e.map(((i,o)=>{if(0!=o){let i=NV({exchange:t,fixedPath:[e[o-1],e[o]],amountIn:n[o-1],amountOut:n[o]});return i.then((t=>r.push(t))),i}}))),r.push(n[n.length-1]),o=a=(n=r)[0]}}else if((h||c)&&kV.solana.includes(t.blockchain)){let r=[];await Promise.all(e.map(((i,o)=>{if(0!==o&&o<e.length-1)r.unshift(n[o]);else if(o===e.length-1){let i=(async({exchange:t,fixedPath:e,amountOut:n,amountIn:r})=>n.sub(n.mul(100*parseFloat("0.5")).div(1e4)))({exchange:t,fixedPath:[e[o-1],e[o]],amountIn:n[o-1],amountOut:n[o]});return i.then((t=>(r.unshift(t),t))),i}}))),r.push(n[0]),s=u=(n=r.slice().reverse())[n.length-1]}return{amountIn:o,amountInMax:a,amountOut:s,amountOutMin:u,amounts:n}},xV=t=>t.match("0x")?cp(t):t;let LV=async({amount:t,blockchain:e,address:n})=>await _V.BigNumber({amount:t,blockchain:e,address:n}),IV=async({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{let u={exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s};return o&&"number"==typeof o&&(u.amountOut=await LV({amount:o,blockchain:t,address:r})),s&&"number"==typeof s&&(u.amountOutMin=await LV({amount:s,blockchain:t,address:r})),i&&"number"==typeof i&&(u.amountIn=await LV({amount:i,blockchain:t,address:n})),a&&"number"==typeof a&&(u.amountInMax=await LV({amount:a,blockchain:t,address:n})),u};class jV{constructor({name:t,blockchain:e,alternativeNames:n,label:r,logo:i,router:o,factory:a,wrapper:s,pair:u,market:c,findPath:l,getAmounts:h,getTransaction:d,slippage:f}){this.name=t,this.blockchain=e,this.alternativeNames=n,this.label=r,this.logo=i,this.router=o,this.factory=a,this.wrapper=s,this.pair=u,this.market=c,this.findPath=l,this.getAmounts=h,this.getTransaction=d,this.slippage=f}async route({tokenIn:t,tokenOut:e,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o,amountOutMax:a,amountInMin:s}){return t===e?Promise.resolve():((({tokenIn:t,tokenOut:e,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o,amountOutMax:a,amountInMin:s})=>{if(void 0!==a)throw"You cannot not set amountOutMax! Only amountInMax or amountOutMin!";if(void 0!==s)throw"You cannot not set amountInMin! Only amountInMax or amountOutMin!";if(void 0!==r&&void 0!==n)throw"You cannot set amountIn and amountOut at the same time, use amountInMax or amountOutMin to describe the non exact part of the swap!";if(void 0!==i&&void 0!==o)throw"You cannot set amountInMax and amountOutMin at the same time, use amountIn or amountOut to describe the part of the swap that needs to be exact!";if(void 0!==n&&void 0!==i)throw"Setting amountIn and amountInMax at the same time makes no sense. Decide if amountIn needs to be exact or not!";if(void 0!==r&&void 0!==o)throw"Setting amountOut and amountOutMin at the same time makes no sense. Decide if amountOut needs to be exact or not!"})({tokenIn:t,tokenOut:e,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o,amountOutMax:a,amountInMin:s}),await(({exchange:t,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a,findPath:s,getAmounts:u,getTransaction:c,slippage:l})=>(e=xV(e),n=xV(n),new Promise((async h=>{let{path:d,fixedPath:f}=await s({tokenIn:e,tokenOut:n});if(void 0===d||0==d.length)return h();let p,[m,y,g,b]=[r,i,o,a];if(({amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a,amounts:p}=await u({path:d,tokenIn:e,tokenOut:n,amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a})),[r,o,i,a].every((t=>null==t)))return h();l&&({amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a,amounts:p}=await TV({exchange:t,fixedPath:f,amounts:p,tokenIn:e,tokenOut:n,amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a,amountInInput:m,amountOutInput:y,amountInMaxInput:g,amountOutMinInput:b})),h(new SV({tokenIn:e,tokenOut:n,path:d,amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a,exchange:t,getTransaction:async({from:e})=>await c({exchange:t,path:d,amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a,amounts:p,amountInInput:m,amountOutInput:y,amountInMaxInput:g,amountOutMinInput:b,fromAddress:e})}))}))))({...await IV({blockchain:this.blockchain,exchange:this,tokenIn:t,tokenOut:e,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o}),findPath:this.findPath,getAmounts:this.getAmounts,getTransaction:this.getTransaction,slippage:this.slippage}))}}function CV(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}let DV=t=>{if(!t)return;let e=t.map(((e,n)=>e===UM.bsc.NATIVE&&t[n+1]!=UM.bsc.WRAPPED&&t[n-1]!=UM.bsc.WRAPPED?UM.bsc.WRAPPED:e));return e[0]==UM.bsc.NATIVE&&e[1]==UM.bsc.WRAPPED?e.splice(0,1):e[e.length-1]==UM.bsc.NATIVE&&e[e.length-2]==UM.bsc.WRAPPED&&e.splice(e.length-1,1),e},OV=({reserves:t,min:e,token:n,token0:r,token1:i,decimals:o})=>r.toLowerCase()==n.toLowerCase()?t[0].gte(BM(e.toString(),o)):i.toLowerCase()==n.toLowerCase()&&t[1].gte(BM(e.toString(),o)),PV=async t=>{if(1==DV(t).length)return!1;let e=await EH({blockchain:"bsc",address:EV.factory.address,method:"getPair",api:EV.factory.api,cache:36e5,params:DV(t)});if(e==UM.bsc.ZERO)return!1;let[n,r,i]=await Promise.all([EH({blockchain:"bsc",address:e,method:"getReserves",api:EV.pair.api,cache:36e5}),EH({blockchain:"bsc",address:e,method:"token0",api:EV.pair.api,cache:36e5}),EH({blockchain:"bsc",address:e,method:"token1",api:EV.pair.api,cache:36e5})]);if(t.includes(UM.bsc.WRAPPED))return OV({min:1,token:UM.bsc.WRAPPED,decimals:UM.bsc.DECIMALS,reserves:n,token0:r,token1:i});if(t.includes(UM.bsc.USD)){let t=new _V({blockchain:"bsc",address:UM.bsc.USD}),e=await t.decimals();return OV({min:1e3,token:UM.bsc.USD,decimals:e,reserves:n,token0:r,token1:i})}return!0},zV=({path:t,amountIn:e,tokenIn:n,tokenOut:r})=>new Promise((n=>{EH({blockchain:"bsc",address:EV.router.address,method:"getAmountsOut",api:EV.router.api,params:{amountIn:e,path:DV(t)}}).then((t=>{n(t[t.length-1])})).catch((()=>n()))})),RV=({path:t,amountOut:e,block:n})=>new Promise((r=>{EH({blockchain:"bsc",address:EV.router.address,method:"getAmountsIn",api:EV.router.api,params:{amountOut:e,path:DV(t)},block:n}).then((t=>r(t[0]))).catch((()=>r()))}));var BV=new jV(Object.assign(EV,{findPath:async({tokenIn:t,tokenOut:e})=>{if([t,e].includes(UM.bsc.NATIVE)&&[t,e].includes(UM.bsc.WRAPPED))return{path:void 0,fixedPath:void 0};let n;return await PV([t,e])?n=[t,e]:t!=UM.bsc.WRAPPED&&await PV([t,UM.bsc.WRAPPED])&&e!=UM.bsc.WRAPPED&&await PV([e,UM.bsc.WRAPPED])?n=[t,UM.bsc.WRAPPED,e]:t!=UM.bsc.USD&&await PV([t,UM.bsc.USD])&&e!=UM.bsc.WRAPPED&&await PV([UM.bsc.WRAPPED,e])?n=[t,UM.bsc.USD,UM.bsc.WRAPPED,e]:t!=UM.bsc.WRAPPED&&await PV([t,UM.bsc.WRAPPED])&&e!=UM.bsc.USD&&await PV([UM.bsc.USD,e])&&(n=[t,UM.bsc.WRAPPED,UM.bsc.USD,e]),CV([n,"optionalAccess",t=>t.length])&&n[0]==UM.bsc.NATIVE?n.splice(1,0,UM.bsc.WRAPPED):CV([n,"optionalAccess",t=>t.length])&&n[n.length-1]==UM.bsc.NATIVE&&n.splice(n.length-1,0,UM.bsc.WRAPPED),{path:n,fixedPath:DV(n)}},getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>{if(i){if(null==(o=await RV({block:e,path:t,amountOut:i,tokenIn:n,tokenOut:r}))||a&&o.gt(a))return{};void 0===a&&(a=o)}else if(o){if(null==(i=await zV({path:t,amountIn:o,tokenIn:n,tokenOut:r}))||s&&i.lt(s))return{};void 0===s&&(s=i)}else if(s){if(null==(o=await RV({block:e,path:t,amountOut:s,tokenIn:n,tokenOut:r}))||a&&o.gt(a))return{};void 0===a&&(a=o)}else if(a){if(null==(i=await zV({path:t,amountIn:a,tokenIn:n,tokenOut:r}))||s&&i.lt(s))return{};void 0===s&&(s=i)}return{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}},getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>{let l="bsc",h={blockchain:l,from:c,to:EV.router.address,api:EV.router.api};return t[0]===UM[l].NATIVE?o||u?(h.method="swapExactETHForTokens",h.value=e.toString(),h.params={amountOutMin:i.toString()}):(a||s)&&(h.method="swapETHForExactTokens",h.value=n.toString(),h.params={amountOut:r.toString()}):t[t.length-1]===UM[l].NATIVE?o||u?(h.method="swapExactTokensForETH",h.params={amountIn:e.toString(),amountOutMin:i.toString()}):(a||s)&&(h.method="swapTokensForExactETH",h.params={amountInMax:n.toString(),amountOut:r.toString()}):o||u?(h.method="swapExactTokensForTokens",h.params={amountIn:e.toString(),amountOutMin:i.toString()}):(a||s)&&(h.method="swapTokensForExactTokens",h.params={amountInMax:n.toString(),amountOut:r.toString()}),h.params=Object.assign({},h.params,{path:DV(t),to:c,deadline:Math.round(Date.now()/1e3)+1800}),h}}));var UV={blockchain:"polygon",name:"quickswap",alternativeNames:[],label:"QuickSwap",logo:"data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNzAyLjQ1IDcwMi40NyI+PGRlZnM+PGNsaXBQYXRoIGlkPSJjbGlwLXBhdGgiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMy43OCAtMjMuNzcpIj48cmVjdCB3aWR0aD0iNz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zLjc4IC0yMy43NykiIGZpbGw9IiMwZTFmNjYiLz48L2c+PC9zdmc+",router:{address:"0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff",api:[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"amountADesired",type:"uint256"},{internalType:"uint256",name:"amountBDesired",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountTokenDesired",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountIn",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountOut",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsIn",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsOut",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"reserveA",type:"uint256"},{internalType:"uint256",name:"reserveB",type:"uint256"}],name:"quote",outputs:[{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETHSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermit",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityWithPermit",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapETHForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETHSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]},factory:{address:"0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32",api:[{inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!1,internalType:"address",name:"pair",type:"address"},{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"PairCreated",type:"event"},{constant:!0,inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"allPairs",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"allPairsLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"}],name:"createPair",outputs:[{internalType:"address",name:"pair",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"feeTo",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"feeToSetter",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"getPair",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeTo",type:"address"}],name:"setFeeTo",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],name:"setFeeToSetter",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},pair:{api:[{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount0Out",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1Out",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint112",name:"reserve0",type:"uint112"},{indexed:!1,internalType:"uint112",name:"reserve1",type:"uint112"}],name:"Sync",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"MINIMUM_LIQUIDITY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getReserves",outputs:[{internalType:"uint112",name:"_reserve0",type:"uint112"},{internalType:"uint112",name:"_reserve1",type:"uint112"},{internalType:"uint32",name:"_blockTimestampLast",type:"uint32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_token0",type:"address"},{internalType:"address",name:"_token1",type:"address"}],name:"initialize",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"kLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[{internalType:"uint256",name:"liquidity",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"price0CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"price1CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"skim",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"amount0Out",type:"uint256"},{internalType:"uint256",name:"amount1Out",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"sync",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}]},slippage:!0};function FV(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}let YV=t=>{if(!t)return;let e=t.map(((e,n)=>e===UM.polygon.NATIVE&&t[n+1]!=UM.polygon.WRAPPED&&t[n-1]!=UM.polygon.WRAPPED?UM.polygon.WRAPPED:e));return e[0]==UM.polygon.NATIVE&&e[1]==UM.polygon.WRAPPED?e.splice(0,1):e[e.length-1]==UM.polygon.NATIVE&&e[e.length-2]==UM.polygon.WRAPPED&&e.splice(e.length-1,1),e},QV=({reserves:t,min:e,token:n,token0:r,token1:i,decimals:o})=>r.toLowerCase()==n.toLowerCase()?t[0].gte(BM(e.toString(),o)):i.toLowerCase()==n.toLowerCase()&&t[1].gte(BM(e.toString(),o)),WV=async t=>{if(1==YV(t).length)return!1;let e=await EH({blockchain:"polygon",address:UV.factory.address,method:"getPair",api:UV.factory.api,cache:36e5,params:YV(t)});if(e==UM.polygon.ZERO)return!1;let[n,r,i]=await Promise.all([EH({blockchain:"polygon",address:e,method:"getReserves",api:UV.pair.api,cache:36e5}),EH({blockchain:"polygon",address:e,method:"token0",api:UV.pair.api,cache:36e5}),EH({blockchain:"polygon",address:e,method:"token1",api:UV.pair.api,cache:36e5})]);if(t.includes(UM.polygon.WRAPPED))return QV({min:1,token:UM.polygon.WRAPPED,decimals:UM.polygon.DECIMALS,reserves:n,token0:r,token1:i});if(t.includes(UM.polygon.USD)){let t=new _V({blockchain:"polygon",address:UM.polygon.USD}),e=await t.decimals();return QV({min:1e3,token:UM.polygon.USD,decimals:e,reserves:n,token0:r,token1:i})}return!0},HV=({path:t,amountIn:e,tokenIn:n,tokenOut:r})=>new Promise((n=>{EH({blockchain:"polygon",address:UV.router.address,method:"getAmountsOut",api:UV.router.api,params:{amountIn:e,path:YV(t)}}).then((t=>{n(t[t.length-1])})).catch((()=>n()))})),GV=({path:t,amountOut:e,block:n})=>new Promise((r=>{EH({blockchain:"polygon",address:UV.router.address,method:"getAmountsIn",api:UV.router.api,params:{amountOut:e,path:YV(t)},block:n}).then((t=>r(t[0]))).catch((()=>r()))}));var qV=new jV(Object.assign(UV,{findPath:async({tokenIn:t,tokenOut:e})=>{if([t,e].includes(UM.polygon.NATIVE)&&[t,e].includes(UM.polygon.WRAPPED))return{path:void 0,fixedPath:void 0};let n;return await WV([t,e])?n=[t,e]:t!=UM.polygon.WRAPPED&&await WV([t,UM.polygon.WRAPPED])&&e!=UM.polygon.WRAPPED&&await WV([e,UM.polygon.WRAPPED])?n=[t,UM.polygon.WRAPPED,e]:t!=UM.polygon.USD&&await WV([t,UM.polygon.USD])&&e!=UM.polygon.WRAPPED&&await WV([UM.polygon.WRAPPED,e])?n=[t,UM.polygon.USD,UM.polygon.WRAPPED,e]:t!=UM.polygon.WRAPPED&&await WV([t,UM.polygon.WRAPPED])&&e!=UM.polygon.USD&&await WV([UM.polygon.USD,e])&&(n=[t,UM.polygon.WRAPPED,UM.polygon.USD,e]),FV([n,"optionalAccess",t=>t.length])&&n[0]==UM.polygon.NATIVE?n.splice(1,0,UM.polygon.WRAPPED):FV([n,"optionalAccess",t=>t.length])&&n[n.length-1]==UM.polygon.NATIVE&&n.splice(n.length-1,0,UM.polygon.WRAPPED),{path:n,fixedPath:YV(n)}},getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>{if(i){if(null==(o=await GV({block:e,path:t,amountOut:i,tokenIn:n,tokenOut:r}))||a&&o.gt(a))return{};void 0===a&&(a=o)}else if(o){if(null==(i=await HV({path:t,amountIn:o,tokenIn:n,tokenOut:r}))||s&&i.lt(s))return{};void 0===s&&(s=i)}else if(s){if(null==(o=await GV({block:e,path:t,amountOut:s,tokenIn:n,tokenOut:r}))||a&&o.gt(a))return{};void 0===a&&(a=o)}else if(a){if(null==(i=await HV({path:t,amountIn:a,tokenIn:n,tokenOut:r}))||s&&i.lt(s))return{};void 0===s&&(s=i)}return{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}},getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>{let l={blockchain:"polygon",from:c,to:UV.router.address,api:UV.router.api};return t[0]===UM.polygon.NATIVE?o||u?(l.method="swapExactETHForTokens",l.value=e.toString(),l.params={amountOutMin:i.toString()}):(a||s)&&(l.method="swapETHForExactTokens",l.value=n.toString(),l.params={amountOut:r.toString()}):t[t.length-1]===UM.polygon.NATIVE?o||u?(l.method="swapExactTokensForETH",l.params={amountIn:e.toString(),amountOutMin:i.toString()}):(a||s)&&(l.method="swapTokensForExactETH",l.params={amountInMax:n.toString(),amountOut:r.toString()}):o||u?(l.method="swapExactTokensForTokens",l.params={amountIn:e.toString(),amountOutMin:i.toString()}):(a||s)&&(l.method="swapTokensForExactTokens",l.params={amountInMax:n.toString(),amountOut:r.toString()}),l.params=Object.assign({},l.params,{path:YV(t),to:c,deadline:Math.round(Date.now()/1e3)+1800}),l}}));const ZV=WW([ZW("status"),ZW("nonce"),ZW("maxOrder"),ZW("depth"),ZW("baseDecimal"),ZW("quoteDecimal"),ZW("state"),ZW("resetFlag"),ZW("minSize"),ZW("volMaxCutRatio"),ZW("amountWaveRatio"),ZW("baseLotSize"),ZW("quoteLotSize"),ZW("minPriceMultiplier"),ZW("maxPriceMultiplier"),ZW("systemDecimalValue"),ZW("minSeparateNumerator"),ZW("minSeparateDenominator"),ZW("tradeFeeNumerator"),ZW("tradeFeeDenominator"),ZW("pnlNumerator"),ZW("pnlDenominator"),ZW("swapFeeNumerator"),ZW("swapFeeDenominator"),ZW("baseNeedTakePnl"),ZW("quoteNeedTakePnl"),ZW("quoteTotalPnl"),ZW("baseTotalPnl"),HW("quoteTotalDeposited"),HW("baseTotalDeposited"),HW("swapBaseInAmount"),HW("swapQuoteOutAmount"),ZW("swapBase2QuoteFee"),HW("swapQuoteInAmount"),HW("swapBaseOutAmount"),ZW("swapQuote2BaseFee"),FW("baseVault"),FW("quoteVault"),FW("baseMint"),FW("quoteMint"),FW("lpMint"),FW("openOrders"),FW("marketId"),FW("marketProgramId"),FW("targetOrders"),FW("withdrawQueue"),FW("lpVault"),FW("owner"),ZW("lpReserve"),IW(ZW(),3,"padding")]),VV=WW([VW("instruction"),VW("simulateType")]),JV=WW([jW(5),jW(8),FW("ownAddress"),ZW("vaultSignerNonce"),FW("baseMint"),FW("quoteMint"),FW("baseVault"),ZW("baseDepositsTotal"),ZW("baseFeesAccrued"),FW("quoteVault"),ZW("quoteDepositsTotal"),ZW("quoteFeesAccrued"),ZW("quoteDustThreshold"),FW("requestQueue"),FW("eventQueue"),FW("bids"),FW("asks"),ZW("baseLotSize"),ZW("quoteLotSize"),ZW("feeRateBps"),ZW("referrerRebatesAccrued"),jW(7)]);var KV={blockchain:"solana",name:"raydium",alternativeNames:[],label:"Raydium",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyNi4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4wIiBpZD0ia2F0bWFuXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNjAwIDQ1MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNjAwIDQ1MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHN0eWxlIHR5cGU9InRleHQvY3N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DITY_FEES_DENOMINATOR:Wd.from(1e4)}},router:{v1:{address:"routeUGWgWzqBWFcrCfv8tritsqukccJPu3q5GPP3xS"}},market:{v3:{address:"9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin",api:JV}},slippage:!0};const XV=1,$V=6;let tJ=async(t,e)=>await EH(`solana://${KV.pair.v4.address}/getProgramAccounts`,{params:{filters:[{dataSize:KV.pair.v4.api.span},{memcmp:{offset:400,bytes:t}},{memcmp:{offset:432,bytes:e}}]},api:KV.pair.v4.api,cache:36e5}),eJ=async(t,e)=>{try{let n=await tJ(t,e);return 0==n.length&&(n=await tJ(e,t)),n}catch(t){return console.log(t),[]}},nJ=async(t,e)=>{let n=await eJ(t,e);return 1==n.length?n[0]:n.length<1?null:n.reduce(((t,e)=>{if(![XV,$V].includes(e.data.status.toNumber()))return;let n=e.data.lpReserve;return t.data.lpReserve.gte(n)?t:e}))},rJ=async(t,e)=>(await eJ(t,e)).length>0;function iJ(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}const oJ=UM.solana.NATIVE,aJ=UM.solana.WRAPPED,sJ=UM.solana.USD;let uJ=t=>{if(!t)return;let e=t.map(((e,n)=>e===oJ&&t[n+1]!=aJ&&t[n-1]!=aJ?aJ:e));return e[0]==oJ&&e[1]==aJ?e.splice(0,1):e[e.length-1]==oJ&&e[e.length-2]==aJ&&e.splice(e.length-1,1),e},cJ=async t=>1!=t.length&&(t=uJ(t),!(!await rJ(t[0],t[1])&&!await rJ(t[1],t[0])));const lJ=async t=>await EH({blockchain:"solana",address:t,api:KV.market.v3.api,cache:36e5}),hJ=async t=>{const e=PW.alloc(VV.span);VV.encode({instruction:12,simulateType:0},e);const n=await lJ(t.data.marketId.toString()),r=[{pubkey:t.pubkey,isWritable:!1,isSigner:!1},{pubkey:new JU(KV.pair.v4.authority),isWritable:!1,isSigner:!1},{pubkey:t.data.openOrders,isWritable:!1,isSigner:!1},{pubkey:t.data.baseVault,isWritable:!1,isSigner:!1},{pubkey:t.data.quoteVault,isWritable:!1,isSigner:!1},{pubkey:t.data.lpMint,isWritable:!1,isSigner:!1},{pubkey:t.data.marketId,isWritable:!1,isSigner:!1},{pubkey:n.eventQueue,isWritable:!1,isSigner:!1}],i=new dF({programId:new JU(KV.pair.v4.address),keys:r,data:e}),o=new JU("RaydiumSimuLateTransaction11111111111111111");let a,s=new fF({feePayer:o});s.add(i);const u=await AH("solana");try{a=await u.simulateTransaction(s)}catch(t){}let c;if(a&&a.value&&a.value.logs){let t=a.value.logs.find((t=>t.match("GetPoolData:")));t&&(c=JSON.parse(t.replace(/.*GetPoolData:\s/,"")))}return c};let dJ=async({path:t,amountIn:e})=>{let n=[e];return await Promise.all(t.map((async(e,r)=>{const i=t[r+1];if(null==i)return;const o=await nJ(e,i),a=await hJ(o),s=o.data.baseMint.toString(),u=[Wd.from(a.pool_coin_amount),Wd.from(a.pool_pc_amount)],[c,l]=s==e?[u[0],u[1]]:[u[1],u[0]],h=n[r].mul(KV.pair.v4.LIQUIDITY_FEES_NUMERATOR).div(KV.pair.v4.LIQUIDITY_FEES_DENOMINATOR),d=n[r].sub(h),f=c.add(d),p=l.mul(d).div(f);n.push(p)}))),n},fJ=async({path:t,amountOut:e})=>{t=t.slice().reverse();let n=[e];return await Promise.all(t.map((async(e,r)=>{const i=t[r+1];if(null==i)return;const o=await nJ(e,i),a=await hJ(o);o.pubkey.toString();const s=o.data.baseMint.toString();o.data.quoteMint.toString();const u=[Wd.from(a.pool_coin_amount),Wd.from(a.pool_pc_amount)],[c,l]=s==e?[u[1],u[0]]:[u[0],u[1]],h=l.sub(n[r]),d=c.mul(n[r]).div(h).mul(KV.pair.v4.LIQUIDITY_FEES_DENOMINATOR).div(KV.pair.v4.LIQUIDITY_FEES_DENOMINATOR.sub(KV.pair.v4.LIQUIDITY_FEES_NUMERATOR));n.push(d)}))),n.slice().reverse()};const pJ=({pair:t,amountIn:e,amountOutMin:n,amountOut:r,amountInMax:i,fix:o})=>{let a,s;return"in"===o?(a=WW([VW("instruction"),ZW("amountIn"),ZW("minAmountOut")]),s=PW.alloc(a.span),a.encode({instruction:9,amountIn:new zW(e.toString()),minAmountOut:new zW(n.toString())},s)):"out"===o&&(a=WW([VW("instruction"),ZW("maxAmountIn"),ZW("amountOut")]),s=PW.alloc(a.span),a.encode({instruction:11,maxAmountIn:new zW(i.toString()),amountOut:new zW(r.toString())},s)),s},mJ=async({tokenIn:t,tokenInAccount:e,tokenOut:n,tokenOutAccount:r,pair:i,market:o,fromAddress:a})=>{e||(e=await _V.solana.findAccount({owner:a,token:t})),e||(e=await _V.solana.findProgramAddress({owner:a,token:t})),r||(r=await _V.solana.findAccount({owner:a,token:n})),r||(r=await _V.solana.findProgramAddress({owner:a,token:n}));let s=await(async(t,e)=>{const n=[e.toBuffer()];let r,i=0;for(;i<100;){try{const e=n.concat(PW.from([i]),PW.alloc(7));r=await JU.createProgramAddress(e,t)}catch(t){if(t instanceof TypeError)throw t;i++;continue}return r}})(i.data.marketProgramId,i.data.marketId);return[{pubkey:new JU(_V.solana.TOKEN_PROGRAM),isWritable:!1,isSigner:!1},{pubkey:i.pubkey,isWritable:!0,isSigner:!1},{pubkey:new JU(KV.pair.v4.authority),isWritable:!1,isSigner:!1},{pubkey:i.data.openOrders,isWritable:!0,isSigner:!1},{pubkey:i.data.targetOrders,isWritable:!0,isSigner:!1},{pubkey:i.data.baseVault,isWritable:!0,isSigner:!1},{pubkey:i.data.quoteVault,isWritable:!0,isSigner:!1},{pubkey:i.data.marketProgramId,isWritable:!1,isSigner:!1},{pubkey:i.data.marketId,isWritable:!0,isSigner:!1},{pubkey:o.bids,isWritable:!0,isSigner:!1},{pubkey:o.asks,isWritable:!0,isSigner:!1},{pubkey:o.eventQueue,isWritable:!0,isSigner:!1},{pubkey:o.baseVault,isWritable:!0,isSigner:!1},{pubkey:o.quoteVault,isWritable:!0,isSigner:!1},{pubkey:s,isWritable:!1,isSigner:!1},{pubkey:new JU(e),isWritable:!0,isSigner:!1},{pubkey:new JU(r),isWritable:!0,isSigner:!1},{pubkey:new JU(a),isWritable:!1,isSigner:!0}]};var yJ=new jV(Object.assign(KV,{findPath:async({tokenIn:t,tokenOut:e})=>{if([t,e].includes(oJ)&&[t,e].includes(aJ))return{path:void 0,fixedPath:void 0};let n;return await cJ([t,e])?n=[t,e]:t!=aJ&&t!=oJ&&await cJ([t,aJ])&&e!=aJ&&e!=oJ&&await cJ([e,aJ])?n=[t,aJ,e]:t!=sJ&&await cJ([t,sJ])&&e!=sJ&&await cJ([e,sJ])&&(n=[t,sJ,e]),iJ([n,"optionalAccess",t=>t.length])&&n[0]==oJ?n.splice(1,0,aJ):iJ([n,"optionalAccess",t=>t.length])&&n[n.length-1]==oJ&&n.splice(n.length-1,0,aJ),{path:n,fixedPath:uJ(n)}},getAmounts:async({path:t,tokenIn:e,tokenOut:n,amountOut:r,amountIn:i,amountInMax:o,amountOutMin:a})=>{let s;if(t=uJ(t),r){if(s=await fJ({path:t,amountOut:r,tokenIn:e,tokenOut:n}),null==(i=s?s[0]:void 0)||o&&i.gt(o))return{};void 0===o&&(o=i)}else if(i){if(s=await dJ({path:t,amountIn:i,tokenIn:e,tokenOut:n}),null==(r=s?s[s.length-1]:void 0)||a&&r.lt(a))return{};void 0===a&&(a=r)}else if(a){if(s=await fJ({path:t,amountOut:a,tokenIn:e,tokenOut:n}),null==(i=s?s[0]:void 0)||o&&i.gt(o))return{};void 0===o&&(o=i)}else if(o){if(s=await dJ({path:t,amountIn:o,tokenIn:e,tokenOut:n}),null==(r=s?s[s.length-1]:void 0)||a&&r.lt(a))return{};void 0===a&&(a=r)}return{amountOut:r||a,amountIn:i||o,amountInMax:o||i,amountOutMin:a||r,amounts:s}},getTransaction:async({exchange:t,path:e,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o,amounts:a,amountInInput:s,amountOutInput:u,amountInMaxInput:c,amountOutMinInput:l,fromAddress:h})=>{let d={blockchain:"solana"},f=[];const p=uJ(e);if(p.length>3)throw"Raydium can only handle fixed paths with a max length of 3!";const m=p[0],y=3==p.length?p[1]:void 0,g=p[p.length-1];let b,v,w;2==p.length?(b=[await nJ(m,g)],v=[await lJ(b[0].data.marketId.toString())]):(b=[await nJ(m,y),await nJ(y,g)],v=[await lJ(b[0].data.marketId.toString()),await lJ(b[1].data.marketId.toString())],w=a[1]);let M,_=e[0]===UM.solana.NATIVE&&p[0]===UM.solana.WRAPPED,E=e[e.length-1]===UM.solana.NATIVE&&p[p.length-1]===UM.solana.WRAPPED;const A=await AH("solana");if(_||E){const t=await A.getMinimumBalanceForRentExemption(_V.solana.TOKEN_LAYOUT.span);M=_Q.generate().publicKey.toString();const e=_?new zW(n.toString()).add(new zW(t)):new zW(t);f.push(DF.createAccount({fromPubkey:new JU(h),newAccountPubkey:new JU(M),programId:new JU(_V.solana.TOKEN_PROGRAM),space:_V.solana.TOKEN_LAYOUT.span,lamports:e})),f.push(_V.solana.initializeAccountInstruction({account:M,token:UM.solana.WRAPPED,owner:h}))}return(await Promise.all(b.map((async(t,e)=>{let a=v[e],u=m,c=g,d=n||r,f=r||n,p=i||o,A=o||i,S=s||l?"in":"out",k=_?M:void 0,N=E?M:void 0;return 2===b.length&&0===e?(u=m,c=y,p=A=w,S="out",M&&(N=M)):2===b.length&&1===e&&(u=y,c=g,d=f=w,S="in",M&&(k=M)),new dF({programId:new JU(KV.pair.v4.address),keys:await mJ({tokenIn:u,tokenInAccount:k,tokenOut:c,tokenOutAccount:N,pair:t,market:a,fromAddress:h}),data:pJ({pair:t,amountIn:d,amountOutMin:A,amountOut:p,amountInMax:f,fix:S})})})))).forEach((t=>f.push(t))),(_||E)&&f.push(_V.solana.closeAccountInstruction({account:M,owner:h})),d.instructions=f,d}}));var gJ={blockchain:"ethereum",name:"uni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MjUyLjgwNyAyNjAuOTM4IDI0OC41NTIgMjYyLjI0NFpNMjY2LjM2NCAyNzYuMTcyQzI2OC43MTQgMjcyLjgzNCAyNjcuNjg2IDI2OS4yMjUgMjYzLjY5IDI2Ni43ODVDMjU2LjA4IDI2Mi4xMzggMjQ0LjU3MSAyNjUuOTgzIDI0NC41NzEgMjczLjE3M0MyNDQuNTcxIDI3Ni43NTIgMjUwLjU3MiAyODAuNjU2IDI1Ni4wNzQgMjgwLjY1NkMyNTkuNzM1IDI4MC42NTYgMjY0Ljc0NiAyNzguNDczIDI2Ni4zNjQgMjc2LjE3MloiIGZpbGw9IiNGRjAwN0EiLz4KPC9zdmc+Cg==",router:{address:"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",api:[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"amountADesired",type:"uint256"},{internalType:"uint256",name:"amountBDesired",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountTokenDesired",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountIn",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountOut",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsIn",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsOut",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"reserveA",type:"uint256"},{internalType:"uint256",name:"reserveB",type:"uint256"}],name:"quote",outputs:[{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETHSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermit",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityWithPermit",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapETHForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETHSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]},factory:{address:"0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",api:[{inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!1,internalType:"address",name:"pair",type:"address"},{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"PairCreated",type:"event"},{constant:!0,inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"allPairs",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"allPairsLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"}],name:"createPair",outputs:[{internalType:"address",name:"pair",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"feeTo",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"feeToSetter",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"getPair",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeTo",type:"address"}],name:"setFeeTo",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],name:"setFeeToSetter",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},pair:{api:[{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount0Out",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1Out",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint112",name:"reserve0",type:"uint112"},{indexed:!1,internalType:"uint112",name:"reserve1",type:"uint112"}],name:"Sync",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"MINIMUM_LIQUIDITY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getReserves",outputs:[{internalType:"uint112",name:"_reserve0",type:"uint112"},{internalType:"uint112",name:"_reserve1",type:"uint112"},{internalType:"uint32",name:"_blockTimestampLast",type:"uint32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_token0",type:"address"},{internalType:"address",name:"_token1",type:"address"}],name:"initialize",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"kLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[{internalType:"uint256",name:"liquidity",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"price0CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"price1CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"skim",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"amount0Out",type:"uint256"},{internalType:"uint256",name:"amount1Out",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"sync",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}]},slippage:!0};function bJ(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}let vJ=t=>{if(!t)return;let e=t.map(((e,n)=>e===UM.ethereum.NATIVE&&t[n+1]!=UM.ethereum.WRAPPED&&t[n-1]!=UM.ethereum.WRAPPED?UM.ethereum.WRAPPED:e));return e[0]==UM.ethereum.NATIVE&&e[1]==UM.ethereum.WRAPPED?e.splice(0,1):e[e.length-1]==UM.ethereum.NATIVE&&e[e.length-2]==UM.ethereum.WRAPPED&&e.splice(e.length-1,1),e},wJ=({reserves:t,min:e,token:n,token0:r,token1:i,decimals:o})=>r.toLowerCase()==n.toLowerCase()?t[0].gte(BM(e.toString(),o)):i.toLowerCase()==n.toLowerCase()&&t[1].gte(BM(e.toString(),o)),MJ=async t=>{if(1==vJ(t).length)return!1;let e=await EH({blockchain:"ethereum",address:gJ.factory.address,method:"getPair",api:gJ.factory.api,cache:36e5,params:vJ(t)});if(e==UM.ethereum.ZERO)return!1;let[n,r,i]=await Promise.all([EH({blockchain:"ethereum",address:e,method:"getReserves",api:gJ.pair.api,cache:36e5}),EH({blockchain:"ethereum",address:e,method:"token0",api:gJ.pair.api,cache:36e5}),EH({blockchain:"ethereum",address:e,method:"token1",api:gJ.pair.api,cache:36e5})]);if(t.includes(UM.ethereum.WRAPPED))return wJ({min:1,token:UM.ethereum.WRAPPED,decimals:UM.ethereum.DECIMALS,reserves:n,token0:r,token1:i});if(t.includes(UM.ethereum.USD)){let t=new _V({blockchain:"ethereum",address:UM.ethereum.USD}),e=await t.decimals();return wJ({min:1e3,token:UM.ethereum.USD,decimals:e,reserves:n,token0:r,token1:i})}return!0},_J=({path:t,amountIn:e,tokenIn:n,tokenOut:r})=>new Promise((n=>{EH({blockchain:"ethereum",address:gJ.router.address,method:"getAmountsOut",api:gJ.router.api,params:{amountIn:e,path:vJ(t)}}).then((t=>{n(t[t.length-1])})).catch((()=>n()))})),EJ=({path:t,amountOut:e,block:n})=>new Promise((r=>{EH({blockchain:"ethereum",address:gJ.router.address,method:"getAmountsIn",api:gJ.router.api,params:{amountOut:e,path:vJ(t)},block:n}).then((t=>r(t[0]))).catch((()=>r()))}));var AJ=new jV(Object.assign(gJ,{findPath:async({tokenIn:t,tokenOut:e})=>{if([t,e].includes(UM.ethereum.NATIVE)&&[t,e].includes(UM.ethereum.WRAPPED))return{path:void 0,fixedPath:void 0};let n;return await MJ([t,e])?n=[t,e]:t!=UM.ethereum.WRAPPED&&await MJ([t,UM.ethereum.WRAPPED])&&e!=UM.ethereum.WRAPPED&&await MJ([e,UM.ethereum.WRAPPED])?n=[t,UM.ethereum.WRAPPED,e]:t!=UM.ethereum.USD&&await MJ([t,UM.ethereum.USD])&&e!=UM.ethereum.WRAPPED&&await MJ([UM.ethereum.WRAPPED,e])?n=[t,UM.ethereum.USD,UM.ethereum.WRAPPED,e]:t!=UM.ethereum.WRAPPED&&await MJ([t,UM.ethereum.WRAPPED])&&e!=UM.ethereum.USD&&await MJ([UM.ethereum.USD,e])&&(n=[t,UM.ethereum.WRAPPED,UM.ethereum.USD,e]),bJ([n,"optionalAccess",t=>t.length])&&n[0]==UM.ethereum.NATIVE?n.splice(1,0,UM.ethereum.WRAPPED):bJ([n,"optionalAccess",t=>t.length])&&n[n.length-1]==UM.ethereum.NATIVE&&n.splice(n.length-1,0,UM.ethereum.WRAPPED),{path:n,fixedPath:vJ(n)}},getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>{if(i){if(null==(o=await EJ({block:e,path:t,amountOut:i,tokenIn:n,tokenOut:r}))||a&&o.gt(a))return{};void 0===a&&(a=o)}else if(o){if(null==(i=await _J({path:t,amountIn:o,tokenIn:n,tokenOut:r}))||s&&i.lt(s))return{};void 0===s&&(s=i)}else if(s){if(null==(o=await EJ({block:e,path:t,amountOut:s,tokenIn:n,tokenOut:r}))||a&&o.gt(a))return{};void 0===a&&(a=o)}else if(a){if(null==(i=await _J({path:t,amountIn:a,tokenIn:n,tokenOut:r}))||s&&i.lt(s))return{};void 0===s&&(s=i)}return{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}},getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>{let l={blockchain:"ethereum",from:c,to:gJ.router.address,api:gJ.router.api};return t[0]===UM.ethereum.NATIVE?o||u?(l.method="swapExactETHForTokens",l.value=e.toString(),l.params={amountOutMin:i.toString()}):(a||s)&&(l.method="swapETHForExactTokens",l.value=n.toString(),l.params={amountOut:r.toString()}):t[t.length-1]===UM.ethereum.NATIVE?o||u?(l.method="swapExactTokensForETH",l.params={amountIn:e.toString(),amountOutMin:i.toString()}):(a||s)&&(l.method="swapTokensForExactETH",l.params={amountInMax:n.toString(),amountOut:r.toString()}):o||u?(l.method="swapExactTokensForTokens",l.params={amountIn:e.toString(),amountOutMin:i.toString()}):(a||s)&&(l.method="swapTokensForExactTokens",l.params={amountInMax:n.toString(),amountOut:r.toString()}),l.params=Object.assign({},l.params,{path:vJ(t),to:c,deadline:Math.round(Date.now()/1e3)+1800}),l}}));var SJ={blockchain:"velas",name:"wagyuswap",alternativeNames:[],label:"WagyuSwap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DEuMDYsNy4yMS0yLDEwLjI5LTgsMTQuMS0xMC4zNSwxLjktMS4xOSwxMi05LjMxLDI0LjExLTEuNDZBNDIuMDYsNDIuMDYsMCwwLDAsMTE3LjI4LDk2LjQ1WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIyLjM3IC0xMC43OSkiIGZpbGw9IiNmNGVhZTYiLz48L2c+PC9zdmc+",router:{address:"0x3D1c58B6d4501E34DF37Cf0f664A58059a188F00",api:[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"amountADesired",type:"uint256"},{internalType:"uint256",name:"amountBDesired",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountTokenDesired",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountIn",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountOut",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsIn",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsOut",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"reserveA",type:"uint256"},{internalType:"uint256",name:"reserveB",type:"uint256"}],name:"quote",outputs:[{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETHSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermit",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityWithPermit",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapETHForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETHSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]},factory:{address:"0x69f3212344a38b35844cce4864c2af9c717f35e3",api:[{inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!1,internalType:"address",name:"pair",type:"address"},{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"PairCreated",type:"event"},{constant:!0,inputs:[],name:"INIT_CODE_PAIR_HASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"allPairs",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"allPairsLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"}],name:"createPair",outputs:[{internalType:"address",name:"pair",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"feeTo",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"feeToSetter",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"getPair",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeTo",type:"address"}],name:"setFeeTo",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],name:"setFeeToSetter",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},pair:{api:[{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount0Out",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1Out",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint112",name:"reserve0",type:"uint112"},{indexed:!1,internalType:"uint112",name:"reserve1",type:"uint112"}],name:"Sync",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"MINIMUM_LIQUIDITY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getReserves",outputs:[{internalType:"uint112",name:"_reserve0",type:"uint112"},{internalType:"uint112",name:"_reserve1",type:"uint112"},{internalType:"uint32",name:"_blockTimestampLast",type:"uint32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_token0",type:"address"},{internalType:"address",name:"_token1",type:"address"}],name:"initialize",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"kLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[{internalType:"uint256",name:"liquidity",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"price0CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"price1CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"skim",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"amount0Out",type:"uint256"},{internalType:"uint256",name:"amount1Out",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"sync",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}]},slippage:!0};function kJ(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}let NJ=t=>{if(!t)return;let e=t.map(((e,n)=>e===UM.velas.NATIVE&&t[n+1]!=UM.velas.WRAPPED&&t[n-1]!=UM.velas.WRAPPED?UM.velas.WRAPPED:e));return e[0]==UM.velas.NATIVE&&e[1]==UM.velas.WRAPPED?e.splice(0,1):e[e.length-1]==UM.velas.NATIVE&&e[e.length-2]==UM.velas.WRAPPED&&e.splice(e.length-1,1),e},TJ=({reserves:t,min:e,token:n,token0:r,token1:i,decimals:o})=>r.toLowerCase()==n.toLowerCase()?t[0].gte(BM(e.toString(),o)):i.toLowerCase()==n.toLowerCase()&&t[1].gte(BM(e.toString(),o)),xJ=async t=>{if(1==NJ(t).length)return!1;let e=await EH({blockchain:"velas",address:SJ.factory.address,method:"getPair",api:SJ.factory.api,cache:36e5,params:NJ(t)});if(e==UM.velas.ZERO)return!1;let[n,r,i]=await Promise.all([EH({blockchain:"velas",address:e,method:"getReserves",api:SJ.pair.api,cache:36e5}),EH({blockchain:"velas",address:e,method:"token0",api:SJ.pair.api,cache:36e5}),EH({blockchain:"velas",address:e,method:"token1",api:SJ.pair.api,cache:36e5})]);if(t.includes(UM.velas.WRAPPED))return TJ({min:1,token:UM.velas.WRAPPED,decimals:UM.velas.DECIMALS,reserves:n,token0:r,token1:i});if(t.includes(UM.velas.USD)){let t=new _V({blockchain:"velas",address:UM.velas.USD}),e=await t.decimals();return TJ({min:1e3,token:UM.velas.USD,decimals:e,reserves:n,token0:r,token1:i})}return!0},LJ=({path:t,amountIn:e,tokenIn:n,tokenOut:r})=>new Promise((n=>{EH({blockchain:"velas",address:SJ.router.address,method:"getAmountsOut",api:SJ.router.api,params:{amountIn:e,path:NJ(t)}}).then((t=>{n(t[t.length-1])})).catch((()=>n()))})),IJ=({path:t,amountOut:e,block:n})=>new Promise((r=>{EH({blockchain:"velas",address:SJ.router.address,method:"getAmountsIn",api:SJ.router.api,params:{amountOut:e,path:NJ(t)},block:n}).then((t=>r(t[0]))).catch((()=>r()))}));var jJ=new jV(Object.assign(SJ,{findPath:async({tokenIn:t,tokenOut:e})=>{if([t,e].includes(UM.velas.NATIVE)&&[t,e].includes(UM.velas.WRAPPED))return{path:void 0,fixedPath:void 0};let n;return await xJ([t,e])?n=[t,e]:t!=UM.velas.WRAPPED&&await xJ([t,UM.velas.WRAPPED])&&e!=UM.velas.WRAPPED&&await xJ([e,UM.velas.WRAPPED])?n=[t,UM.velas.WRAPPED,e]:t!=UM.velas.USD&&await xJ([t,UM.velas.USD])&&e!=UM.velas.WRAPPED&&await xJ([UM.velas.WRAPPED,e])?n=[t,UM.velas.USD,UM.velas.WRAPPED,e]:t!=UM.velas.WRAPPED&&await xJ([t,UM.velas.WRAPPED])&&e!=UM.velas.USD&&await xJ([UM.velas.USD,e])&&(n=[t,UM.velas.WRAPPED,UM.velas.USD,e]),kJ([n,"optionalAccess",t=>t.length])&&n[0]==UM.velas.NATIVE?n.splice(1,0,UM.velas.WRAPPED):kJ([n,"optionalAccess",t=>t.length])&&n[n.length-1]==UM.velas.NATIVE&&n.splice(n.length-1,0,UM.velas.WRAPPED),{path:n,fixedPath:NJ(n)}},getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>{if(i){if(null==(o=await IJ({block:e,path:t,amountOut:i,tokenIn:n,tokenOut:r}))||a&&o.gt(a))return{};void 0===a&&(a=o)}else if(o){if(null==(i=await LJ({path:t,amountIn:o,tokenIn:n,tokenOut:r}))||s&&i.lt(s))return{};void 0===s&&(s=i)}else if(s){if(null==(o=await IJ({block:e,path:t,amountOut:s,tokenIn:n,tokenOut:r}))||a&&o.gt(a))return{};void 0===a&&(a=o)}else if(a){if(null==(i=await LJ({path:t,amountIn:a,tokenIn:n,tokenOut:r}))||s&&i.lt(s))return{};void 0===s&&(s=i)}return{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}},getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>{let l={blockchain:"velas",from:c,to:SJ.router.address,api:SJ.router.api};return t[0]===UM.velas.NATIVE?o||u?(l.method="swapExactETHForTokens",l.value=e.toString(),l.params={amountOutMin:i.toString()}):(a||s)&&(l.method="swapETHForExactTokens",l.value=n.toString(),l.params={amountOut:r.toString()}):t[t.length-1]===UM.velas.NATIVE?o||u?(l.method="swapExactTokensForETH",l.params={amountIn:e.toString(),amountOutMin:i.toString()}):(a||s)&&(l.method="swapTokensForExactETH",l.params={amountInMax:n.toString(),amountOut:r.toString()}):o||u?(l.method="swapExactTokensForTokens",l.params={amountIn:e.toString(),amountOutMin:i.toString()}):(a||s)&&(l.method="swapTokensForExactTokens",l.params={amountInMax:n.toString(),amountOut:r.toString()}),l.params=Object.assign({},l.params,{path:NJ(t),to:c,deadline:Math.round(Date.now()/1e3)+1800}),l}}));var CJ={blockchain:"bsc",name:"wbnb",alternativeNames:[],label:"Wrapped BNB",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246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uNiw1Ni40bDE1LjQsOWwxNS40LTlMOTYsNDcuNUM5Niw0Ny40LDgwLjYsNTYuNCw4MC42LDU2LjRMODAuNiw1Ni40eiBNNDMuMSw2NS40bDE1LjQtOWwtMTUuNC05bC0xNS40LDl2MThsMTUuNCw5TDQzLjEsNjUuNAoJTDQzLjEsNjUuNHogTTQzLjEsOTUuOUwyNy43LDg3djQ4LjVsNDIsMjQuMnYtMThsLTI2LjYtMTUuM1Y5NS45TDQzLjEsOTUuOXoiLz4KPC9zdmc+Cg==",wrapper:{address:UM.bsc.WRAPPED,api:[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"guy",type:"address"},{name:"wad",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"src",type:"address"},{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"},{name:"",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"guy",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Withdrawal",type:"event"}]}};var DJ=new jV(Object.assign(CJ,{findPath:async({tokenIn:t,tokenOut:e})=>{if(![t,e].includes(UM.bsc.NATIVE)||![t,e].includes(UM.bsc.WRAPPED))return{path:void 0,fixedPath:void 0};let n=[t,e];return{path:n,fixedPath:n}},getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>(i?o=a=s=i:o?i=a=s=o:s?o=a=i=s:a&&(i=s=o=a),{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>{let l={blockchain:"bsc",from:c,to:CJ.wrapper.address,api:CJ.wrapper.api};return t[0]===UM.bsc.NATIVE&&t[1]===UM.bsc.WRAPPED?(l.method="deposit",l.value=e.toString(),l):t[0]===UM.bsc.WRAPPED&&t[1]===UM.bsc.NATIVE?(l.method="withdraw",l.value=0,l.params={wad:e},l):void 0}}));var OJ={blockchain:"ethereum",name:"weth",alternativeNames:[],label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgd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D0iTTE0MS43LDE5OS40bC0wLjgsMS4xdjU0LjZsMC44LDIuNWw3MS4yLTEwMC4zTDE0MS43LDE5OS40eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNTcuNnYtNTguMmwtNzEuMS00Mi4xTDE0MS43LDI1Ny42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",wrapper:{address:UM.ethereum.WRAPPED,api:[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"guy",type:"address"},{name:"wad",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"src",type:"address"},{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"},{name:"",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"guy",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Withdrawal",type:"event"}]}};var PJ=new jV(Object.assign(OJ,{findPath:async({tokenIn:t,tokenOut:e})=>{if(![t,e].includes(UM.ethereum.NATIVE)||![t,e].includes(UM.ethereum.WRAPPED))return{path:void 0,fixedPath:void 0};let n=[t,e];return{path:n,fixedPath:n}},getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>(i?o=a=s=i:o?i=a=s=o:s?o=a=i=s:a&&(i=s=o=a),{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>{let l={blockchain:"ethereum",from:c,to:OJ.wrapper.address,api:OJ.wrapper.api};return t[0]===UM.ethereum.NATIVE&&t[1]===UM.ethereum.WRAPPED?(l.method="deposit",l.value=e.toString(),l):t[0]===UM.ethereum.WRAPPED&&t[1]===UM.ethereum.NATIVE?(l.method="withdraw",l.value=0,l.params={wad:e},l):void 0}}));var zJ={blockchain:"polygon",name:"wmatic",alternativeNames:[],label:"Wrapped MATIC",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA0NS40IDQ1LjQiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ1LjQgNDUuNDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiM4MjQ3RTU7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMzEuOSwxNi42Yy0wLjctMC40LTEuNi0wLjQtMi4yLDBsLTUuMywzLjFsLTMuNSwybC01LjEsMy4xYy0wLjcsMC40LTEuNiwwLjQtMi4yLDBsLTQtMi40CgljLTAuNi0wLjQtMS4xLTEuMS0xLjEtMnYtNC42YzAtMC45LDAuNS0xLjYsMS4xLTJsNC0yLjNjMC43LTAuNCwxLjUtMC40LDIuMiwwbDQsMi40YzAuNywwLjQsMS4xLDEuMSwxLjEsMnYzLjFsMy41LTIuMXYtMy4yCgljMC0wLjktMC40LTEuNi0xLjEtMmwtNy41LTQuNGMtMC43LTAuNC0xLjUtMC40LTIuMiwwTDYsMTEuN2MtMC43LDAuNC0xLjEsMS4xLTEuMSwxLjh2OC43YzAsMC45LDAuNCwxLjYsMS4xLDJsNy42LDQuNAoJYzAuNywwLjQsMS41LDAuNCwyLjIsMGw1LjEtMi45bDMuNS0yLjFsNS4xLTIuOWMwLjctMC40LDEuNi0wLjQsMi4yLDBsNCwyLjNjMC43LDAuNCwxLjEsMS4xLDEuMSwydjQuNmMwLDAuOS0wLjQsMS42LTEuMSwyCglsLTMuOSwyLjNjLTAuNywwLjQtMS41LDAuNC0yLjIsMGwtNC0yLjNjLTAuNy0wLjQtMS4xLTEuMS0xLjEtMnYtMi45TDIxLDI4Ljd2My4xYzAsMC45LDAuNCwxLjYsMS4xLDJsNy41LDQuNAoJYzAuNywwLjQsMS41LDAuNCwyLjIsMGw3LjUtNC40YzAuNy0wLjQsMS4xLTEuMSwxLjEtMlYyM2MwLTAuOS0wLjQtMS42LTEuMS0yQzM5LjIsMjEsMzEuOSwxNi42LDMxLjksMTYuNnoiLz4KPC9zdmc+Cg==",wrapper:{address:UM.polygon.WRAPPED,api:[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"guy",type:"address"},{name:"wad",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"src",type:"address"},{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"},{name:"",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"guy",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Withdrawal",type:"event"}]}};var RJ=new jV(Object.assign(zJ,{findPath:async({tokenIn:t,tokenOut:e})=>{if(![t,e].includes(UM.polygon.NATIVE)||![t,e].includes(UM.polygon.WRAPPED))return{path:void 0,fixedPath:void 0};let n=[t,e];return{path:n,fixedPath:n}},getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>(i?o=a=s=i:o?i=a=s=o:s?o=a=i=s:a&&(i=s=o=a),{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>{let l={blockchain:"polygon",from:c,to:zJ.wrapper.address,api:zJ.wrapper.api};return t[0]===UM.polygon.NATIVE&&t[1]===UM.polygon.WRAPPED?(l.method="deposit",l.value=e.toString(),l):t[0]===UM.polygon.WRAPPED&&t[1]===UM.polygon.NATIVE?(l.method="withdraw",l.value=0,l.params={wad:e},l):void 0}}));var BJ={blockchain:"velas",name:"wvlx",alternativeNames:[],label:"Wrapped Velas",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIKCSBpZD0iTGF5ZXJfMSIgdGV4dC1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iIGltYWdlLXJlbmRlcmluZz0ib3B0aW1pemVRdWFsaXR5IgoJIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDUuNCA0NS40IgoJIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ1LjQgNDUuNDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiMwMDM3QzE7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjguOCwyMi44bC02LjEsMTAuNmwtNi4xLTEwLjdMMjguOCwyMi44TDI4LjgsMjIuOHogTTM0LjksMTkuMkgxMC41bDEyLjIsMjEuNEwzNC45LDE5LjJ6IE02LjUsMTIuMWwyLDMuNgoJaDI4LjNsMi4xLTMuNkg2LjV6Ii8+Cjwvc3ZnPgo=",wrapper:{address:UM.velas.WRAPPED,api:[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"guy",type:"address"},{name:"wad",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"src",type:"address"},{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"},{name:"",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"guy",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Withdrawal",type:"event"}]}};let UJ={ethereum:[AJ,PJ],bsc:[BV,DJ],polygon:[qV,RJ],solana:[yJ],velas:[jJ,new jV(Object.assign(BJ,{findPath:async({tokenIn:t,tokenOut:e})=>{if(![t,e].includes(UM.velas.NATIVE)||![t,e].includes(UM.velas.WRAPPED))return{path:void 0,fixedPath:void 0};let n=[t,e];return{path:n,fixedPath:n}},getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>(i?o=a=s=i:o?i=a=s=o:s?o=a=i=s:a&&(i=s=o=a),{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>{let l={blockchain:"velas",from:c,to:BJ.wrapper.address,api:BJ.wrapper.api};return t[0]===UM.velas.NATIVE&&t[1]===UM.velas.WRAPPED?(l.method="deposit",l.value=e.toString(),l):t[0]===UM.velas.WRAPPED&&t[1]===UM.velas.NATIVE?(l.method="withdraw",l.value=0,l.params={wad:e},l):void 0}}))]},FJ=({blockchain:t,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a,amountOutMax:s,amountInMin:u})=>Promise.all(UJ[t].map((t=>t.route({tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a,amountOutMax:s,amountInMin:u})))).then((t=>t.filter(Boolean)));var YJ=function(t){var e=function(t){return!t.every((function(t){return void 0!==t.amount||void 0!==t.fromAmount}))},r=G.useContext(sq),i=r.amount;r.toAmount;var o,a=r.recover,s=h(G.useState(null==a&&e(t.accept)),2),u=s[0],c=s[1],l=G.useContext(pq).account,d=G.useContext(uq),f=d.conversionRate,p=d.fixedCurrencyConversionRate,m=G.useContext(PG).setError,y=h(G.useState(),2),g=y[0],b=y[1],v=h(G.useState("object"==n(i)&&i.fix&&i.currency?i.fix:null),1)[0],w=h(G.useState("object"==n(i)&&i.fix&&i.currency?i.currency:null),1)[0];u&&(o="object"==n(i)&&i.start&&i.start?i.start:"object"==n(i)&&i.fix?i.fix:1);var M=h(G.useState(o),2),_=M[0],E=M[1],A=h(G.useState(),2),S=A[0],k=A[1],N=h(G.useState(),2),T=N[0],x=N[1];G.useEffect((function(){a||c(e(t.accept))}),[t.accept,a]);var L=function(e){var n=e.amount,r=e.conversionRate,o=e.fixedCurrencyConversionRate;return new Promise((function(e,a){i&&i.token?e(t.accept.map((function(){return n}))):Promise.all(t.accept.map((function(t){return v?UM[t.blockchain].USD==t.token?1/o*v:FJ({blockchain:t.blockchain,tokenIn:UM[t.blockchain].USD,amountIn:1/o*v,tokenOut:t.token,fromAddress:l,toAddress:l}):UM[t.blockchain].USD==t.token?1/r*n:FJ({blockchain:t.blockchain,tokenIn:UM[t.blockchain].USD,amountIn:1/r*n,tokenOut:t.token,fromAddress:l,toAddress:l})}))).then((function(n){Promise.all(n.map((function(e,n){return"number"==typeof e?e:null==e[0]?void 0:_V.readable({blockchain:t.accept[n].blockchain,amount:e[0].amountOut,address:e[0].tokenOut})}))).then(e).catch(m)})).catch(m)}))},I=G.useCallback(mq.debounce((function(e){var n=e.account,r=e.amount,i=e.conversionRate,o=e.fixedCurrencyConversionRate;L({amount:r,conversionRate:i,fixedCurrencyConversionRate:o}).then((function(e){b(t.accept.map((function(t,r){if(null!=e[r])return{blockchain:t.blockchain,amount:fq(e[r]),token:t.token,receiver:t.receiver||n}})).filter((function(t){return!!t})))})).catch(m)}),500),[]);return G.useEffect((function(){a||u&&l&&f&&(!v||p)&&I({account:l,amount:_,conversionRate:f,fixedCurrencyConversionRate:p})}),[u,l,f,v,p,_,a]),G.useEffect((function(){u&&S?S.fromToken.readable(S.fromBalance).then((function(t){if(i&&i.token)FJ({blockchain:S.blockchain,tokenIn:S.fromToken.address,tokenOut:S.toToken.address,amountIn:parseFloat(t),fromAddress:l,toAddress:l}).then((function(t){null!=t[0]?_V.readable({amount:t[0].amountOut,blockchain:S.blockchain,address:S.toToken.address}).then((function(t){var e=parseFloat(new VZ(t).div(1.01).mul(f).toString());x(e>10?Math.round(e-1):fq(e-1))})).catch(m):_V.readable({amount:S.fromBalance,blockchain:S.blockchain,address:S.fromToken.address}).then(x)})).catch(m);else if(S.fromToken.address==UM[S.blockchain].USD){var e=parseFloat(new VZ(t).mul(f).toString());x(e>10?Math.round(e-1):e-1)}else FJ({blockchain:S.blockchain,tokenIn:S.fromToken.address,tokenOut:UM[S.blockchain].USD,amountIn:parseFloat(t),fromAddress:l,toAddress:l}).then((function(t){null!=t[0]&&_V.readable({amount:t[0].amountOut,blockchain:S.blockchain,address:UM[S.blockchain].USD}).then((function(t){var e=parseFloat(new VZ(t).div(1.01).mul(f).toString());x(e>10?Math.round(e):fq(e))})).catch(m)})).catch(m)})).catch(m):x(100)}),[l,S]),G.createElement(aq.Provider,{value:{amountsMissing:u,fixedAmount:v,fixedCurrency:w,acceptWithAmount:g,amount:_,setAmount:E,setMaxRoute:k,maxAmount:T}},t.children)},QJ={"Pacific/Midway":"USD","Pacific/Niue":"NZD","Pacific/Pago_Pago":"USD","America/Adak":"USD","Pacific/Honolulu":"USD","Pacific/Rarotonga":"NZD","Pacific/Tahiti":"XPF","Pacific/Marquesas":"XPF","America/Anchorage":"USD","America/Juneau":"USD","America/Metlakatla":"USD","America/Nome":"USD","America/Sitka":"USD","America/Yakutat":"USD","Pacific/Gambier":"XPF","America/Los_Angeles":"USD","America/Tijuana":"MXN","America/Vancouver":"CAD","Pacific/Pitcairn":"NZD","America/Boise":"USD","America/Cambridge_Bay":"CAD","America/Chihuahua":"MXN","America/Creston":"CAD","America/Dawson":"CAD","America/Dawson_Creek":"CAD","America/Denver":"USD","America/Edmonton":"CAD","America/Fort_Nelson":"CAD","America/Hermosillo":"MXN","America/Inuvik":"CAD","America/Mazatlan":"MXN","America/Ojinaga":"MXN","America/Phoenix":"USD","America/Whitehorse":"CAD","America/Yellowknife":"CAD","America/Bahia_Banderas":"MXN","America/Belize":"BZD","America/Chicago":"USD","America/Costa_Rica":"CRC","America/El_Salvador":"USD","America/Guatemala":"GTQ","America/Indiana/Knox":"USD","America/Indiana/Tell_City":"USD","America/Managua":"NIO","America/Matamoros":"MXN","America/Menominee":"USD","America/Merida":"MXN","America/Mexico_City":"MXN","America/Monterrey":"MXN","America/North_Dakota/Beulah":"USD","America/North_Dakota/Center":"USD","America/North_Dakota/New_Salem":"USD","America/Rainy_River":"CAD","America/Rankin_Inlet":"CAD","America/Regina":"CAD","America/Resolute":"CAD","America/Swift_Current":"CAD","America/Tegucigalpa":"HNL","America/Winnipeg":"CAD","Pacific/Easter":"CLP","Pacific/Galapagos":"USD","America/Atikokan":"CAD","America/Bogota":"COP","America/Cancun":"MXN","America/Cayman":"KYD","America/Detroit":"USD","America/Eirunepe":"BRL","America/Grand_Turk":"USD","America/Guayaquil":"USD","America/Havana":"CUP","America/Indiana/Indianapolis":"USD","America/Indiana/Marengo":"USD","America/Indiana/Petersburg":"USD","America/Indiana/Vevay":"USD","America/Indiana/Vincennes":"USD","America/Indiana/Winamac":"USD","America/Iqaluit":"CAD","America/Jamaica":"JMD","America/Kentucky/Louisville":"USD","America/Kentucky/Monticello":"USD","America/Lima":"PEN","America/Nassau":"BSD","America/New_York":"USD","America/Nipigon":"CAD","America/Panama":"PAB","America/Pangnirtung":"CAD","America/Port-au-Prince":"HTG","America/Rio_Branco":"BRL","America/Thunder_Bay":"CAD","America/Toronto":"CAD","America/AnguillaSandy Hill":"XCD","America/Antigua":"XCD","America/Aruba":"AWG","America/Asuncion":"PYG","America/Barbados":"BBD","America/Blanc-Sablon":"CAD","America/Boa_Vista":"BRL","America/Campo_Grande":"BRL","America/Caracas":"VEB","America/Cuiaba":"BRL","America/Curacao":"ANG","America/Dominica":"DOP","America/Glace_Bay":"CAD","America/Goose_Bay":"CAD","America/Grenada":"XCD","America/Guadeloupe":"EUR","America/Guyana":"GYD","America/Halifax":"CAD","America/Kralendijk":"USD","America/La_Paz":"BOB","America/Lower_Princes":"USD","America/Manaus":"BRL","America/Marigot":"EUR","America/Martinique":"EUR","America/Moncton":"CAD","America/Montserrat":"XCD","America/Porto_Velho":"BRL","America/Port_of_Spain":"BZD","America/Puerto_Rico":"USD","America/Santiago":"CLP","America/Santo_Domingo":"DOP","America/St_Barthelemy":"EUR","America/St_Kitts":"XCD","America/St_Lucia":"XCD","America/St_Thomas":"USD","America/St_Vincent":"XCD","America/Thule":"DKK","America/Tortola":"USD","Atlantic/Bermuda":"BMD","America/St_Johns":"CAD","America/Araguaina":"BRL","America/Argentina/Buenos_Aires":"ARS","America/Argentina/Catamarca":"ARS","America/Argentina/Cordoba":"ARS","America/Argentina/Jujuy":"ARS","America/Argentina/La_Rioja":"ARS","America/Argentina/Mendoza":"ARS","America/Argentina/Rio_Gallegos":"ARS","America/Argentina/Salta":"ARS","America/Argentina/San_Juan":"ARS","America/Argentina/San_Luis":"ARS","America/Argentina/Tucuman":"ARS","America/Argentina/Ushuaia":"ARS","America/Bahia":"BRL","America/Belem":"BRL","America/Cayenne":"EUR","America/Fortaleza":"BRL","America/Godthab":"DKK","America/Maceio":"BRL","America/Miquelon":"EUR","America/Montevideo":"UYU","America/Paramaribo":"SRD","America/Punta_Arenas":"CLP","America/Recife":"BRL","America/Santarem":"BRL","America/Sao_Paulo":"BRL","Antarctica/Palmer":"USD","Antarctica/Rothera":"USD","Atlantic/Stanley":"FKP","America/Noronha":"BRL","Atlantic/South_Georgia":"GBP","America/Scoresbysund":"DKK","Atlantic/Azores":"EUR","Atlantic/Cape_Verde":"CVE","Africa/Abidjan":"XOF","Africa/Accra":"GHC","Africa/Bamako":"XOF","Africa/Banjul":"GMD","Africa/Bissau":"XOF","Africa/Casablanca":"MAD","Africa/Conakry":"GNF","Africa/Dakar":"XOF","Africa/El_Aaiun":"MAD","Africa/Freetown":"SLL","Africa/Lome":"XOF","Africa/Monrovia":"LRD","Africa/Nouakchott":"MRU","Africa/Ouagadougou":"XOF","Africa/Sao_Tome":"STD","America/Danmarkshavn":"DKK","Antarctica/Troll":"NOK","Atlantic/Canary":"EUR","Atlantic/Faroe":"DKK","Atlantic/Madeira":"EUR","Atlantic/Reykjavik":"ISK","Atlantic/St_Helena":"SHP","Europe/Dublin":"EUR","Europe/Guernsey":"GBP","Europe/Isle_of_Man":"IMP","Europe/Jersey":"GBP","Europe/Lisbon":"EUR","Europe/London":"GBP","Africa/Algiers":"DZD","Africa/Bangui":"XAF","Africa/Brazzaville":"XAF","Africa/Ceuta":"EUR","Africa/Douala":"XAF","Africa/Kinshasa":"CDF","Africa/Lagos":"NGN","Africa/Libreville":"XAF","Africa/Luanda":"AOA","Africa/Malabo":"XAF","Africa/Ndjamena":"XAF","Africa/Niamey":"XOF","Africa/Porto-Novo":"XOF","Africa/Tunis":"TND","Africa/Windhoek":"NAD","Arctic/Longyearbyen":"NOK","Europe/Amsterdam":"EUR","Europe/Andorra":"EUR","Europe/Belgrade":"RSD","Europe/Berlin":"EUR","Europe/Bratislava":"EUR","Europe/Brussels":"EUR","Europe/Budapest":"HUF","Europe/Copenhagen":"DKK","Europe/Gibraltar":"GIP","Europe/Ljubljana":"EUR","Europe/Luxembourg":"EUR","Europe/Madrid":"EUR","Europe/Malta":"EUR","Europe/Monaco":"EUR","Europe/Oslo":"NOK","Europe/Paris":"EUR","Europe/Podgorica":"EUR","Europe/Prague":"CZK","Europe/Rome":"EUR","Europe/San_Marino":"EUR","Europe/Sarajevo":"BAM","Europe/Skopje":"MKD","Europe/Stockholm":"SEK","Europe/Tirane":"ALL","Europe/Vaduz":"CHF","Europe/Vatican":"EUR","Europe/Vienna":"EUR","Europe/Warsaw":"PLN","Europe/Zagreb":"HRK","Europe/Zurich":"CHF","Africa/Blantyre":"MWK","Africa/Bujumbura":"BIF","Africa/Cairo":"EGP","Africa/Gaborone":"BWP","Africa/Harare":"ZWL","Africa/Johannesburg":"ZAR","Africa/Juba":"SSP","Africa/Khartoum":"SDG","Africa/Kigali":"RWF","Africa/Lubumbashi":"CDF","Africa/Lusaka":"ZMW","Africa/Maputo":"MZM","Africa/Maseru":"LSL","Africa/Mbabane":"SZL","Africa/Tripoli":"LYD","Asia/Amman":"JOD","Asia/Beirut":"LBP","Asia/Damascus":"SYP","Asia/Famagusta":"TRY","Asia/Gaza":"ILS","Asia/Hebron":"ILS","Asia/Jerusalem":"ILS","Asia/Nicosia":"EUR","Europe/Athens":"EUR","Europe/Bucharest":"RON","Europe/Chisinau":"MDL","Europe/Helsinki":"EUR","Europe/Kaliningrad":"RUB","Europe/Kiev":"UAH","Europe/Mariehamn":"EUR","Europe/Riga":"EUR","Europe/Sofia":"BGN","Europe/Tallinn":"EUR","Europe/Uzhgorod":"UAH","Europe/Vilnius":"EUR","Europe/Zaporozhye":"UAH","Africa/Addis_Ababa":"ETB","Africa/Asmara":"ERN","Africa/Dar_es_Salaam":"TZS","Africa/Djibouti":"DJF","Africa/Kampala":"UGX","Africa/Mogadishu":"SOS","Africa/Nairobi":"KES","Antarctica/Syowa":"EUR","Asia/Aden":"YER","Asia/Baghdad":"IQD","Asia/Bahrain":"BHD","Asia/Kuwait":"KWD","Asia/Qatar":"QAR","Asia/Riyadh":"SAR","Europe/Istanbul":"TRY","Europe/Kirov":"RUB","Europe/Minsk":"BYN","Europe/Moscow":"RUB","Europe/Simferopol":"RUB","Europe/Volgograd":"RUB","Indian/Antananarivo":"MGA","Indian/Comoro":"USD","Indian/Mayotte":"EUR","Asia/Tehran":"IRR","Asia/Baku":"AZN","Asia/Dubai":"AED","Asia/Muscat":"OMR","Asia/Tbilisi":"GEL","Asia/Yerevan":"AMD","Europe/Astrakhan":"RUB","Europe/Samara":"RUB","Europe/Saratov":"RUB","Europe/Ulyanovsk":"RUB","Indian/Mahe":"SCR","Indian/Mauritius":"MUR","Indian/Reunion":"EUR","Asia/Kabul":"AFN","Antarctica/Mawson":"USD","Asia/Aqtau":"KZT","Asia/Aqtobe":"KZT","Asia/Ashgabat":"TMM","Asia/Atyrau":"KZT","Asia/Dushanbe":"TJS","Asia/Karachi":"PKR","Asia/Oral":"KZT","Asia/Qyzylorda":"KZT","Asia/Samarkand":"UZS","Asia/Tashkent":"UZS","Asia/Yekaterinburg":"RUB","Indian/Kerguelen":"EUR","Indian/Maldives":"MVR","Asia/Colombo":"LKR","Asia/Kolkata":"INR","Asia/Kathmandu":"NPR","Antarctica/Vostok":"USD","Asia/Almaty":"KZT","Asia/Bishkek":"KGS","Asia/Dhaka":"BDT","Asia/Omsk":"RUB","Asia/Qostanay":"KZT","Asia/Thimphu":"BTN","Asia/Urumqi":"CNY","Indian/Chagos":"USD","Asia/Yangon":"MMK","Indian/Cocos":"AUD","Antarctica/Davis":"USD","Asia/Bangkok":"THB","Asia/Barnaul":"RUB","Asia/Hovd":"MNT","Asia/Ho_Chi_Minh":"VND","Asia/Jakarta":"IDR","Asia/Krasnoyarsk":"RUB","Asia/Novokuznetsk":"RUB","Asia/Novosibirsk":"RUB","Asia/Phnom_Penh":"KHR","Asia/Pontianak":"IDR","Asia/Tomsk":"RUB","Asia/Vientiane":"LAK","Indian/Christmas":"AUD","Asia/Brunei":"BND","Asia/Choibalsan":"MNT","Asia/Hong_Kong":"HKD","Asia/Irkutsk":"RUB","Asia/Kuala_Lumpur":"MYR","Asia/Kuching":"MYR","Asia/Macau":"MOP","Asia/Makassar":"IDR","Asia/Manila":"PHP","Asia/Shanghai":"CNY","Asia/Singapore":"SGD","Asia/Taipei":"TWD","Asia/Ulaanbaatar":"MNT","Australia/Perth":"AUD","Australia/Eucla":"AUD","Asia/Chita":"RUB","Asia/Dili":"USD","Asia/Jayapura":"IDR","Asia/Khandyga":"RUB","Asia/Pyongyang":"KPW","Asia/Seoul":"KRW","Asia/Tokyo":"JPY","Asia/Yakutsk":"RUB","Pacific/Palau":"USD","Australia/Adelaide":"AUD","Australia/Broken_Hill":"AUD","Australia/Darwin":"AUD","Antarctica/DumontDUrville":"USD","Antarctica/Macquarie":"USD","Asia/Ust-Nera":"RUB","Asia/Vladivostok":"RUB","Australia/Brisbane":"AUD","Australia/Currie":"AUD","Australia/Hobart":"AUD","Australia/Lindeman":"AUD","Australia/Melbourne":"AUD","Australia/Sydney":"AUD","Pacific/Chuuk":"USD","Pacific/GuamVillage":"USD","Pacific/Port_Moresby":"PGK","Pacific/Saipan":"USD","Australia/Lord_Howe":"AUD","Antarctica/Casey":"USD","Asia/Magadan":"RUB","Asia/Sakhalin":"RUB","Asia/Srednekolymsk":"RUB","Pacific/Bougainville":"PGK","Pacific/Efate":"VUV","Pacific/Guadalcanal":"SBD","Pacific/Kosrae":"USD","Pacific/Norfolk":"USD","Pacific/Noumea":"XPF","Pacific/Pohnpei":"USD","Antarctica/McMurdo":"USD","Asia/Anadyr":"RUB","Asia/Kamchatka":"RUB","Pacific/Auckland":"NZD","Pacific/Fiji":"FJD","Pacific/Funafuti":"AUD","Pacific/Kwajalein":"USD","Pacific/Majuro":"USD","Pacific/Nauru":"AUD","Pacific/Tarawa":"AUD","Pacific/Wake":"USD","Pacific/Wallis":"XPF","Pacific/Chatham":"CAD","Pacific/Apia":"NGN","Pacific/Enderbury":"USD","Pacific/Fakaofo":"NZD","Pacific/Tongatapu":"TOP","Pacific/Kiritimati":"AUD"};class WJ{constructor({amount:t,code:e,timeZone:n=WJ.timeZone()}){this.amount=t,this.code=e||window._LocalCurrencyCode||WJ.getCode(n),this.timeZone=n}static getCode(t){return window._LocalCurrencyCode||QJ[t||WJ.timeZone()]||"USD"}static async rate({from:t,to:e}){null==e&&(e=WJ.getCode());let n=await WJ.fromUSD({amount:1,code:t}),r=await WJ.fromUSD({amount:1,code:e});return n.amount/r.amount}static async fromUSD({amount:t,code:e,timeZone:n}){let r=new WJ({amount:t,code:e,timeZone:n}),i=await fetch("https://public.depay.com/currencies/"+r.code).then((t=>t.json())).then((t=>parseFloat(t))).catch((()=>(r.code="USD",1)));return r.amount=r.amount*i,r}static timeZone(){return Intl.DateTimeFormat().resolvedOptions().timeZone}toString(t={}){return null==t.minimumFractionDigits&&this.amount%1==0&&this.amount>=100?t.minimumFractionDigits=0:null==t.minimumFractionDigits&&(t.minimumFractionDigits=2),new Intl.NumberFormat(navigator.language,{...t,style:"currency",currency:this.code}).format(this.amount)}}var HJ=function(t){var e=new WJ({code:t.configuration.currency}).code;return G.useEffect((function(){null!=t.configuration.providers&&Object.entries(t.configuration.providers).forEach((function(t){((t,e)=>{if(_H.evm.includes(t))return aH(t,e);if(_H.solana.includes(t))return wH(t,e);throw"Unknown blockchain: "+t})(t[0],t[1])}))}),[t.configuration]),G.createElement(sq.Provider,{value:Object.assign({},t.configuration,{currencyCode:e})},t.children)},GJ=function(t){G.useContext(PG).setError;var e=G.useContext(sq),r=e.amount,i=e.currency,o=h(G.useState(),2),a=o[0],s=o[1],u=h(G.useState(),2),c=u[0],l=u[1];return G.useEffect((function(){"object"==n(r)&&r.currency&&WJ.fromUSD({amount:1,code:r.currency}).then((function(t){return l(t.amount)})),WJ.fromUSD({amount:1,code:i}).then((function(t){return s(t.amount)})).catch(s(1))}),[]),G.createElement(uq.Provider,{value:{conversionRate:a,fixedCurrencyConversionRate:c}},t.children)},qJ=G.createContext(),ZJ=G.createContext(),VJ=function(){var t=G.useContext(q).close;return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"}),body:G.createElement("div",{className:"TextCenter"},G.createElement("div",{className:"GraphicWrapper"},G.createElement("img",{className:"Graphic",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAHQCAMAAADgcCJ6AAAAXVBMVEVHcEwiGxq6jYEwExPTf2RKx+4uEhLSf2PSfmMvEhJK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OI/5KJeF9HmJqJAhEy7YEC6LtTzYsgcAAAAAAAAAAAAAAAAAAAAAAAD0/AOU5ijBfZTOtQAAAABJRU5ErkJggg=="})),G.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Insufficient Balance"),G.createElement("div",{className:"Text PaddingTopS PaddingBottomM PaddingLeftM PaddingRightM"},G.createElement("strong",{className:"FontSizeM"},"We were not able to find any asset with enough value in your wallet. Please top up your account in order to proceed with this payment."))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("button",{className:"ButtonPrimary",onClick:t},"Ok"))})},JJ=G.createContext(),KJ=G.createContext(),XJ=G.createContext(),$J=G.createContext(),tK=function(t){var n=G.useContext(PG).setError,r=G.useContext(sq),i=r.sent,o=r.succeeded,a=r.failed,s=r.recover,c=r.before,l=G.useContext(KJ),d=l.selectedRoute;l.getPaymentRoutes;var f=G.useContext(q),p=f.open,m=f.close,y=f.setClosable,g=G.useContext(KJ).allRoutes,b=G.useContext(Z).setUpdatable,v=G.useContext(ZJ),w=v.navigate,M=v.set,_=G.useContext(pq).wallet,E=G.useContext(XJ),A=E.release,S=E.synchronousTracking,k=E.asynchronousTracking,N=E.trackingInitialized,T=E.initializeTracking,x=E.preTrack,L=G.useContext($J),I=L.foundTransaction,j=L.initializeTracking,C=h(G.useState(),2),D=C[0],O=C[1],P=h(G.useState(),2),z=P[0],R=P[1],B=h(G.useState(),2),U=B[0],F=B[1],Y=h(G.useState("initialized"),2),Q=Y[0],W=Y[1],H=function(t){0!=S||0!=k&&1!=N||y(!0),W("success"),o&&o(t)},V=function(t,e){0!=k&&1!=N||y(!0),M(["PaymentFailed"]),W("failed"),a&&a(t,e)},J=function(){var t=e(u.mark((function t(){var e;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!c){t.next=6;break}return t.next=3,c(D.route.transaction);case 3:if(!1!==t.sent){t.next=6;break}return t.abrupt("return");case 6:return y(!1),W("paying"),b(!1),t.next=11,EH({blockchain:D.route.transaction.blockchain,method:"latestBlockNumber"});case 11:return e=t.sent,t.next=14,x(e,D.route).then((function(){_.sendTransaction(Object.assign({},D.route.transaction,{sent:function(t){j(t,e),i&&i(t)},succeeded:H,failed:V})).then((function(t){R(t),T(t,e,D.route)})).catch((function(t){console.log("error",t),W("initialized"),y(!0),b(!0),"WRONG_NETWORK"!=(null==t?void 0:t.code)&&"NOT_SUPPORTED"!=(null==t?void 0:t.code)||w("WrongNetwork")}))})).catch((function(t){console.log(t),W("initialized"),y(!0),b(!0),w("PreTrackingFailed")}));case 14:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return G.useEffect((function(){A&&W("success")}),[A]),G.useEffect((function(){k&&N&&("success"==Q||"failed"==Q)&&y(!0)}),[N,Q]),G.useEffect((function(){if(s){y(!1),b(!1),W("paying"),R({blockchain:s.blockchain,id:s.transaction,url:qh(s.blockchain).explorerUrlFor({transaction:{id:s.transaction}})});var t=new _V({blockchain:s.blockchain,address:s.token});Promise.all([t.name(),t.symbol()]).then((function(t){var e=h(t,2),n=e[0],r=e[1];O({blockchain:s.blockchain,token:s.token,name:n,symbol:r.toUpperCase(),amount:s.amount})})).catch(n)}}),[s]),G.useEffect((function(){var t;I&&I.id&&I.status&&(I.id!=z.id&&(t=Object.assign({},z,{id:I.id,url:qh(z.blockchain).explorerUrlFor({transaction:I})}),R(t)),"success"==I.status?H(t||z):"failed"==I.status&&V(t||z))}),[I,z]),G.useEffect((function(){if(d){var t=d.fromToken;Promise.all([t.name(),t.symbol(),t.readable(d.fromAmount)]).then((function(e){var n=h(e,3),r=n[0],i=n[1],o=n[2];O({blockchain:d.blockchain,route:d,token:t.address,name:r,symbol:i.toUpperCase(),amount:o})})).catch(n)}else O(void 0)}),[d]),G.useEffect((function(){g&&0==g.length?b(!1):g&&g.length>0&&b(!0)}),[g]),g instanceof Array&&0==g.length?G.createElement(ch,{open:p,close:m,start:"NoPaymentMethodFound",container:t.container,document:t.document,dialogs:{NoPaymentMethodFound:G.createElement(VJ,null)}}):G.createElement(JJ.Provider,{value:{payment:D,paymentState:Q,pay:J,transaction:z,approve:function(){y(!1),W("approving"),_.sendTransaction(Object.assign({},D.route.approvalTransaction,{succeeded:function(){D.route.approvalRequired=!1,O(D),y(!0),W("initialized")}})).then((function(t){F(t)})).catch((function(t){console.log("error",t),W("initialized"),y(!0)}))},approvalTransaction:U}},t.children)};function eK(t,e,n){return(e=IG(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const nK=({assets:t,blockchain:e,options:n})=>n.only?t.filter((t=>(n.only[e]||[]).find((e=>e.toLowerCase()==t.address.toLowerCase())))):n.exclude?t.filter((t=>(n.exclude[e]||[]).find((e=>e.toLowerCase()!=t.address.toLowerCase())))):t;var rK=async t=>{void 0===t&&(t={accounts:{}});let e=Promise.all(Object.keys(t.accounts).map((e=>new Promise(((n,r)=>{const i=t.accounts[e],o=new AbortController;setTimeout((()=>o.abort()),1e4),fetch(`https://public.depay.com/accounts/${e}/${i}/assets`,{signal:o.signal}).catch((t=>{console.log(t),n([])})).then((t=>{if(t&&t.ok)return t.json();n([])})).then((async r=>{if(r&&r.length)return await(async({address:t,options:e,assets:n,blockchain:r})=>{if(e.only&&e.only[r]&&!e.only[r].find((t=>t.toLowerCase()==UM[r].NATIVE.toLowerCase())))return n;if(e.exclude&&e.exclude[r]&&e.exclude[r].find((t=>t.toLowerCase()==UM[r].NATIVE.toLowerCase())))return n;if(!n.find((t=>t.address.toLowerCase()==UM[r].NATIVE.toLowerCase()))){let e=await EH({blockchain:r,address:t,method:"balance"},{cache:3e4});n=[{name:UM[r].CURRENCY,symbol:UM[r].SYMBOL,address:UM[r].NATIVE,type:"NATIVE",blockchain:r,balance:e.toString()},...n]}return n})({address:i,options:t,assets:nK({assets:r,blockchain:e,options:t}).map((t=>Object.assign(t,{blockchain:e}))),blockchain:e});n([])})).then(n).catch((t=>{console.log(t),n([])}))}))))).then((t=>t.flat()));return e};const iK=(t,e)=>Object.assign({},{address:t.address,symbol:t.symbol,name:t.name,decimals:t.decimals,type:t.type,blockchain:t.blockchain},{balance:e.toString()}),oK=({assets:t,asset:e})=>!!t.find((t=>t.blockchain==e.blockchain&&t.address.toLowerCase()==e.address.toLowerCase())),aK=({options:t,address:e,blockchain:n})=>!(!(t&&t.only&&t.only[n])||t.only[n].find((t=>t.toLowerCase()==e.toLowerCase())))||!!(t&&t.exclude&&t.exclude[n]&&t.exclude[n].find((t=>t.toLowerCase()==e.toLowerCase())));const sK=t=>(t.params.path=t.params.path.filter(((e,n,r)=>(1!=n||e!=UM[t.blockchain].WRAPPED||r[0]!=UM[t.blockchain].NATIVE)&&(n!=r.length-2||e!=UM[t.blockchain].WRAPPED||r[r.length-1]!=UM[t.blockchain].NATIVE))),t);var uK={ethereum:{payment:{address:"0x99F3F4685a7178F26EB4F4Ca8B75a1724F1577B9"},weth:{wrap:{address:"0xF4cc97D00dD0639c3e383D7CafB3d815616cbB2C"},unwrap:{address:"0xcA575c6C5305e8127F3D376bb22776eAD370De4a"}},uniswap_v2:{address:"0xe04b08Dfc6CaA0F4Ec523a3Ae283Ece7efE00019",prepareTransaction:sK},paymentWithEvent:{address:"0xD8fBC10787b019fE4059Eb5AA5fB11a5862229EF"},paymentFee:{address:"0x874Cb669D7BFff79d4A6A30F4ea52c5e413BD6A7"},paymentFeeWithEvent:{address:"0x981cAd45c768d56136FDBb2C5E115F33D971bE6C"}},bsc:{payment:{address:"0x8B127D169D232D5F3ebE1C3D06CE343FD7C1AA11"},wbnb:{wrap:{address:"0xf361888459a4C863a8498ee344C2688C9196Be51"},unwrap:{address:"0x65693291C20271f5e5030261766D1D6b3AC9d44E"}},pancakeswap:{address:"0xAC3Ec4e420DD78bA86d932501E1f3867dbbfb77B",prepareTransaction:sK},paymentWithEvent:{address:"0x1869E236c03eE67B9FfEd3aCA139f4AeBA79Dc21"},paymentFee:{address:"0xae33f10AD57A38113f74FCdc1ffA6B1eC47B94E3"},paymentFeeWithEvent:{address:"0xF1a05D715AaBFA380543719F7bA8754d0331c5A9"}},polygon:{payment:{address:"0x78C0F1c712A9AA2004C1F401A7307d8bCB62abBd"},wmatic:{wrap:{address:"0x8B62F604499c1204573664447D445690E0A0011b"},unwrap:{address:"0x2fd0a07a4F73285d0eBa8176426BF9B8c0121206"}},quickswap:{address:"0x0Dfb7137bC64b63F7a0de7Cb9CDa178702666220",prepareTransaction:sK},paymentWithEvent:{address:"0xfAD2F276D464EAdB71435127BA2c2e9dDefb93a4"},paymentFee:{address:"0xd625c7087E940b2A91ed8bD8db45cB24D3526B56"},paymentFeeWithEvent:{address:"0xBC56ED8E32b64a33f64Ed7A5fF9EACdFC117e07a"}}},cK={ethereum:{address:"0xae60aC8e69414C2Dc362D0e6a03af643d1D85b92",api:[{inputs:[{internalType:"address",name:"_configuration",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"configuration",outputs:[{internalType:"contract DePayRouterV1Configuration",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pluginAddress",type:"address"}],name:"isApproved",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"path",type:"address[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"address[]",name:"addresses",type:"address[]"},{internalType:"address[]",name:"plugins",type:"address[]"},{internalType:"string[]",name:"data",type:"string[]"}],name:"route",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdraw",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]},bsc:{address:"0x0Dfb7137bC64b63F7a0de7Cb9CDa178702666220",api:[{inputs:[{internalType:"address",name:"_configuration",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"configuration",outputs:[{internalType:"contract DePayRouterV1Configuration",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pluginAddress",type:"address"}],name:"isApproved",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"path",type:"address[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"address[]",name:"addresses",type:"address[]"},{internalType:"address[]",name:"plugins",type:"address[]"},{internalType:"string[]",name:"data",type:"string[]"}],name:"route",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdraw",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]},polygon:{address:"0x2CA727BC33915823e3D05fe043d310B8c5b2dC5b",api:[{inputs:[{internalType:"address",name:"_configuration",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"configuration",outputs:[{internalType:"contract DePayRouterV1Configuration",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pluginAddress",type:"address"}],name:"isApproved",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"path",type:"address[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"address[]",name:"addresses",type:"address[]"},{internalType:"address[]",name:"plugins",type:"address[]"},{internalType:"string[]",name:"data",type:"string[]"}],name:"route",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdraw",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]}};let lK=({paymentRoute:t,fee:e})=>t.directTransfer&&!e?t.toToken.address==UM[t.blockchain].NATIVE?t.toAddress:t.toToken.address:cK[t.blockchain].address,hK=({paymentRoute:t,fee:e})=>t.directTransfer&&!e?t.toToken.address==UM[t.blockchain].NATIVE?void 0:_V[t.blockchain].DEFAULT:cK[t.blockchain].api,dK=({paymentRoute:t,fee:e})=>t.directTransfer&&!e?t.toToken.address==UM[t.blockchain].NATIVE?void 0:"transfer":"route",fK=({paymentRoute:t,exchangeRoute:e,event:n,fee:r})=>t.directTransfer&&!r?t.toToken.address==UM[t.blockchain].NATIVE?void 0:[t.toAddress,t.toAmount]:{path:pK({paymentRoute:t,exchangeRoute:e}),amounts:mK({paymentRoute:t,exchangeRoute:e,fee:r}),addresses:bK({paymentRoute:t,fee:r}),plugins:vK({paymentRoute:t,exchangeRoute:e,event:n,fee:r}),data:[]},pK=({paymentRoute:t,exchangeRoute:e})=>e?e.path:[t.toToken.address],mK=({paymentRoute:t,exchangeRoute:e,fee:n})=>{let r;r=e?e&&e.exchange.wrapper?[e.amountIn.toString(),yK({amount:e.amountOutMin.toString(),paymentRoute:t,fee:n})]:[e.amountIn.toString(),yK({amount:e.amountOutMin.toString(),paymentRoute:t,fee:n}),Math.round(Date.now()/1e3)+1800]:[t.toAmount,yK({amount:t.toAmount,paymentRoute:t,fee:n})],n&&(r[4]=gK({paymentRoute:t,fee:n}));for(var i=0;i<r.length;i++)null==r[i]&&(r[i]="0");return r},yK=({amount:t,paymentRoute:e,fee:n})=>{if(n){let r=gK({paymentRoute:e,fee:n});return Wd.from(t).sub(r).toString()}return t},gK=({paymentRoute:t,fee:e})=>{if("string"==typeof e.amount&&e.amount.match("%"))return Wd.from(t.toAmount).mul(10*parseFloat(e.amount)).div(1e3).toString();if("string"==typeof e.amount)return e.amount;if("number"==typeof e.amount)return BM(e.amount.toString(),t.toDecimals).toString();throw"Unknown fee amount type!"},bK=({paymentRoute:t,fee:e})=>e?[t.fromAddress,e.receiver,t.toAddress]:[t.fromAddress,t.toAddress],vK=({paymentRoute:t,exchangeRoute:e,event:n,fee:r})=>{let i=[];return e&&(t.exchangePlugin=uK[t.blockchain][e.exchange.name],t.exchangePlugin.wrap&&t.fromToken.address==UM[t.blockchain].NATIVE?i.push(t.exchangePlugin.wrap.address):t.exchangePlugin.wrap&&t.fromToken.address==UM[t.blockchain].WRAPPED?i.push(t.exchangePlugin.unwrap.address):i.push(t.exchangePlugin.address)),("ifSwapped"!=n||t.directTransfer)&&("ifRoutedAndNative"!=n||t.directTransfer||t.toToken.address!=UM[t.blockchain].NATIVE)?i.push(uK[t.blockchain].payment.address):i.push(uK[t.blockchain].paymentWithEvent.address),r&&("ifRoutedAndNative"!=n||t.directTransfer||t.toToken.address!=UM[t.blockchain].NATIVE?i.push(uK[t.blockchain].paymentFee.address):i.push(uK[t.blockchain].paymentFeeWithEvent.address)),i},wK=({paymentRoute:t,exchangeRoute:e})=>t.fromToken.address==UM[t.blockchain].NATIVE?e?e.amountIn.toString():t.toAmount.toString():Wd.from("0").toString();var MK=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},_K="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==fh?fh:"undefined"!=typeof self?self:{},EK="object"==typeof _K&&_K&&_K.Object===Object&&_K,AK="object"==typeof self&&self&&self.Object===Object&&self,SK=EK||AK||Function("return this")(),kK=function(){return SK.Date.now()},NK=/\s/;var TK=function(t){for(var e=t.length;e--&&NK.test(t.charAt(e)););return e},xK=/^\s+/;var LK=function(t){return t?t.slice(0,TK(t)+1).replace(xK,""):t},IK=SK.Symbol,jK=Object.prototype,CK=jK.hasOwnProperty,DK=jK.toString,OK=IK?IK.toStringTag:void 0;var PK=function(t){var e=CK.call(t,OK),n=t[OK];try{t[OK]=void 0;var r=!0}catch(t){}var i=DK.call(t);return r&&(e?t[OK]=n:delete t[OK]),i},zK=Object.prototype.toString;var RK=function(t){return zK.call(t)},BK=IK?IK.toStringTag:void 0;var UK=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":BK&&BK in Object(t)?PK(t):RK(t)};var FK=function(t){return null!=t&&"object"==typeof t};var YK=function(t){return"symbol"==typeof t||FK(t)&&"[object Symbol]"==UK(t)},QK=/^[-+]0x[0-9a-f]+$/i,WK=/^0b[01]+$/i,HK=/^0o[0-7]+$/i,GK=parseInt;var qK=function(t){if("number"==typeof t)return t;if(YK(t))return NaN;if(MK(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=MK(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=LK(t);var n=WK.test(t);return n||HK.test(t)?GK(t.slice(2),n?2:8):QK.test(t)?NaN:+t},ZK=Math.max,VK=Math.min;var JK=function(t,e,n){var r,i,o,a,s,u,c=0,l=!1,h=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(e){var n=r,o=i;return r=i=void 0,c=e,a=t.apply(o,n)}function p(t){return c=t,s=setTimeout(y,e),l?f(t):a}function m(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-c>=o}function y(){var t=kK();if(m(t))return g(t);s=setTimeout(y,function(t){var n=e-(t-u);return h?VK(n,o-(t-c)):n}(t))}function g(t){return s=void 0,d&&r?f(t):(r=i=void 0,a)}function b(){var t=kK(),n=m(t);if(r=arguments,i=this,u=t,n){if(void 0===s)return p(u);if(h)return clearTimeout(s),s=setTimeout(y,e),f(u)}return void 0===s&&(s=setTimeout(y,e)),a}return e=qK(e)||0,MK(n)&&(l=!!n.leading,o=(h="maxWait"in n)?ZK(qK(n.maxWait)||0,e):o,d="trailing"in n?!!n.trailing:d),b.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},b.flush=function(){return void 0===s?a:g(kK())},b};var KK=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return MK(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),JK(t,e,{leading:r,maxWait:e,trailing:i})};function XK(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}class $K{constructor({blockchain:t,fromAddress:e,fromToken:n,fromDecimals:r,fromAmount:i,fromBalance:o,toToken:a,toDecimals:s,toAmount:u,toAddress:c}){this.blockchain=t,this.fromAddress=e,this.fromToken=n,this.fromAmount=XK([i,"optionalAccess",t=>t.toString,"call",t=>t()]),this.fromDecimals=r,this.fromBalance=o,this.toToken=a,this.toAmount=XK([u,"optionalAccess",t=>t.toString,"call",t=>t()]),this.toDecimals=s,this.toAddress=c,this.exchangeRoutes=[],this.transaction=void 0,this.approvalRequired=void 0,this.approvalTransaction=void 0,this.directTransfer=void 0}}function tX({assets:t,blacklist:e,accept:n,from:r,event:i,fee:o}){return Promise.resolve(nX({assets:t,blacklist:e})).then((t=>function({assets:t,accept:e,from:n}){return Promise.all(t.map((async t=>{let r=e.filter((e=>e.blockchain==t.blockchain)),i=new _V(t);return Promise.all(r.map((async e=>{if(e.token&&e.amount){let r=e.blockchain,o=t.decimals,a=new _V({blockchain:r,address:e.token}),s=await a.decimals(),u=(await a.BigNumber(e.amount)).toString();return new $K({blockchain:r,fromToken:i,fromDecimals:o,toToken:a,toAmount:u,toDecimals:s,fromBalance:t.balance,fromAddress:n[e.blockchain],toAddress:e.toAddress})}if(e.fromToken&&e.fromAmount&&i.address.toLowerCase()==e.fromToken.toLowerCase()){let r=e.blockchain,o=(await i.BigNumber(e.fromAmount)).toString(),a=t.decimals,s=new _V({blockchain:r,address:e.toToken}),u=await s.decimals();return new $K({blockchain:r,fromToken:i,fromDecimals:a,fromAmount:o,toToken:s,toDecimals:u,fromBalance:t.balance,fromAddress:n[e.blockchain],toAddress:e.toAddress})}})))}))).then((t=>t.flat().filter((t=>t))))}({assets:t,accept:n,from:r}))).then((t=>uX({routes:t,fee:o}))).then(rX).then(iX).then(oX).then(aX).then((t=>fX({routes:t,event:i,fee:o}))).then(cX).then(sX).then(dX).then(lX)}function eX({accept:t,from:e,whitelist:n,blacklist:r,event:i,fee:o,update:a}){if(o&&o.amount&&"string"==typeof o.amount&&o.amount.match(/\.\d\d+\%/))throw"Only up to 1 decimal is supported for fee amounts!";return new Promise((async(s,u)=>{let c,l=[];if(n)for(const t in n)(n[t]||[]).forEach((e=>{l.push({blockchain:t,address:e})}));else t.forEach((t=>{l.push({blockchain:t.blockchain,address:t.token||t.toToken})}));a&&(c=KK((async({assets:t,blacklist:e,accept:n,from:r,event:i,fee:o})=>{a.callback(await tX({assets:t,blacklist:e,accept:n,from:r,event:i,fee:o}))}),a.every));let h=[];const d=await(async t=>{void 0===t&&(t={accounts:{},priority:[]});let e=[],n=[];n=n.concat((t.priority||[]).map((n=>new Promise((async(r,i)=>{try{let i=new _V(n),o=Object.assign({},n,{name:await i.name(),symbol:await i.symbol(),decimals:await i.decimals(),balance:(await i.balance(t.accounts[n.blockchain])).toString()});if("0"!=o.balance){if(oK({assets:e,asset:n}))return r();e.push(o),"function"==typeof t.drip&&t.drip(o),r(o)}else r()}catch(t){r()}})))));let r=[];for(var i in t.accounts)qh(i).tokens.forEach((e=>{aK({options:t,address:e.address,blockchain:i})||r.push(Object.assign({},e,{blockchain:i}))}));if(n=n.concat(r.map((n=>new Promise(((r,i)=>{new _V(n).balance(t.accounts[n.blockchain]).then((i=>{if(oK({assets:e,asset:n}))return r();const o=iK(n,i);"0"!=o.balance?(e.push(o),"function"==typeof t.drip&&t.drip(o),r(o)):r()})).catch((t=>{console.log(t),r()}))}))))),null==t.only||Object.keys(t.only).every((t=>0==t.length))){let r=await rK(t);n=n.concat(r.map((n=>new Promise(((r,i)=>new _V(n).balance(t.accounts[n.blockchain]).then((i=>{if(oK({assets:e,asset:n}))return r();const o=iK(n,i);"0"!=o.balance?(e.push(o),"function"==typeof t.drip&&t.drip(o),r(o)):r()})).catch((t=>{console.log(t),r()})))))))}return await Promise.all(n),e})({accounts:e,priority:l,only:n,exclude:r,drip:n=>{a&&(h.push(n),c({assets:h,blacklist:r,accept:t,from:e,event:i,fee:o}))}});s(await tX({assets:d,blacklist:r,accept:t,from:e,event:i,fee:o}))}))}let nX=({assets:t,blacklist:e})=>null==e?t:t.filter((t=>null==e[t.blockchain]||!e[t.blockchain].find((e=>e.toLowerCase()==t.address.toLowerCase())))),rX=async t=>await Promise.all(t.map((t=>t.directTransfer?[]:t.toToken&&t.toAmount?FJ({blockchain:t.blockchain,tokenIn:t.fromToken.address,tokenOut:t.toToken.address,amountOutMin:t.toAmount,fromAddress:t.fromAddress,toAddress:t.toAddress}):t.fromToken&&t.fromAmount?FJ({blockchain:t.blockchain,tokenIn:t.fromToken.address,tokenOut:t.toToken.address,amountIn:t.fromAmount,fromAddress:t.fromAddress,toAddress:t.toAddress}):void 0))).then((e=>t.map(((t,n)=>(t.exchangeRoutes=e[n],t))))),iX=t=>t.filter((t=>0==t.exchangeRoutes.length||null!=uK[t.blockchain][t.exchangeRoutes[0].exchange.name])),oX=t=>t.filter((t=>0!=t.exchangeRoutes.length||t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase())),aX=async t=>t.filter((t=>t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()?Wd.from(t.fromBalance).gte(Wd.from(t.toAmount)):t.fromAmount&&t.toAmount?Wd.from(t.fromBalance).gte(Wd.from(t.exchangeRoutes[0].amountInMax)):t.exchangeRoutes[0]&&t.exchangeRoutes[0].amountIn?Wd.from(t.fromBalance).gte(Wd.from(t.exchangeRoutes[0].amountIn)):void 0)),sX=t=>Promise.all(t.map((t=>t.fromToken.allowance(t.fromAddress,cK[t.blockchain].address)))).then((e=>(t.forEach(((n,r)=>{n.directTransfer||n.fromToken.address.toLowerCase()==UM[n.blockchain].NATIVE.toLowerCase()?t[r].approvalRequired=!1:(t[r].approvalRequired=Wd.from(n.fromAmount).gte(Wd.from(e[r])),t[r].approvalRequired&&(t[r].approvalTransaction={blockchain:n.blockchain,to:n.fromToken.address,api:_V[n.blockchain].DEFAULT,method:"approve",params:[cK[n.blockchain].address,UM[n.blockchain].MAXINT]}))})),t))),uX=({routes:t,fee:e})=>t.map((t=>(t.directTransfer=t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()&&null==e,t))),cX=t=>t.map((t=>(t.directTransfer&&!t.fee?t.fromToken.address.toLowerCase()==UM[t.blockchain].NATIVE.toLowerCase()?(t.fromAmount=t.transaction.value,t.toAmount=t.transaction.value):(t.fromAmount=t.transaction.params[1],t.toAmount=t.transaction.params[1]):(t.fromAmount=t.transaction.params.amounts[0],t.toAmount=t.transaction.params.amounts[1],t.fee&&(t.feeAmount=t.transaction.params.amounts[4])),t))),lX=t=>t.filter(((e,n)=>null==t.find(((t,r)=>e.fromToken.address==t.fromToken.address&&(e.fromToken.blockchain==t.fromToken.blockchain&&(!(!t.directTransfer||e.directTransfer)||(!(!Wd.from(t.fromAmount).lt(Wd.from(e.fromAmount))||e.directTransfer)||(t.fromAmount==e.fromAmount&&r<n||void 0)))))))),hX=t=>{switch(t){case"polygon":return 50;case"bsc":return 90;case"ethereum":return 99;default:return 100}},dX=t=>t.sort(((t,e)=>hX(t.fromToken.blockchain)<hX(e.fromToken.blockchain)?-1:hX(e.fromToken.blockchain)<hX(t.fromToken.blockchain)?1:t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()?-1:e.fromToken.address.toLowerCase()==e.toToken.address.toLowerCase()||t.approvalRequired&&!e.approvalRequired?1:e.approvalRequired&&!t.approvalRequired||JSON.stringify([t.fromToken.address.toLowerCase(),t.toToken.address.toLowerCase()].sort())==JSON.stringify([UM[t.blockchain].NATIVE.toLowerCase(),UM[t.blockchain].WRAPPED.toLowerCase()].sort())?-1:JSON.stringify([e.fromToken.address.toLowerCase(),e.toToken.address.toLowerCase()].sort())==JSON.stringify([UM[e.blockchain].NATIVE.toLowerCase(),UM[e.blockchain].WRAPPED.toLowerCase()].sort())?1:t.fromToken.address.toLowerCase()==UM[t.blockchain].NATIVE.toLowerCase()?-1:e.fromToken.address.toLowerCase()==UM[e.blockchain].NATIVE.toLowerCase()?1:0)),fX=({routes:t,event:e,fee:n})=>Promise.all(t.map((async t=>(t.transaction=await(async({paymentRoute:t,event:e,fee:n})=>{let r=t.exchangeRoutes[0],i={blockchain:t.blockchain,to:lK({paymentRoute:t,fee:n}),api:hK({paymentRoute:t,fee:n}),method:dK({paymentRoute:t,fee:n}),params:fK({paymentRoute:t,exchangeRoute:r,event:e,fee:n}),value:wK({paymentRoute:t,exchangeRoute:r})};return r&&t.exchangePlugin&&t.exchangePlugin.prepareTransaction&&(i=t.exchangePlugin.prepareTransaction(i)),i})({paymentRoute:t,event:e,fee:n}),t.fee=!!n,t))));function pX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function mX(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pX(Object(n),!0).forEach((function(e){eK(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pX(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var yX=function(t){var e="object"==n(t.receiver)?t.receiver.address:t.receiver,r="object"==n(t.receiver)?t.receiver:void 0;return mX(mX({},t),{},{toAddress:e,toContract:r})},gX=function(t,e){var n={};return t.forEach((function(t){n[t.blockchain]=e})),n},bX=function(t){var e=t.accept,n=t.account,r=t.whitelist,i=t.blacklist,o=t.fee;return eX({accept:e.map(yX),from:gX(e,n),whitelist:r,blacklist:i,event:"ifRoutedAndNative",fee:o})};function vX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function wX(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?vX(Object(n),!0).forEach((function(e){eK(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vX(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var MX=function(t){var n=h(G.useState(),2),r=n[0],i=n[1],o=h(G.useState(),2),a=o[0],s=o[1],c=h(G.useState(),2),l=c[0],d=c[1],f=h(G.useState(!1),2),p=f[0],m=f[1],y=h(G.useState(0),2),g=y[0],b=y[1],v=G.useContext(pq).account,w=G.useContext(Z).updatable,M=G.useContext(sq).recover,_=function(){var n=e(u.mark((function n(r){return u.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:0==r.length?(i([]),t.setMaxRoute&&t.setMaxRoute(null)):k(r).then(function(){var n=e(u.mark((function e(n){var r,o;return u.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:void 0===l?(r=n[0],d(r)):(o=n[n.findIndex((function(t){return t.fromToken.address==l.fromToken.address&&t.blockchain==l.blockchain}))],o&&l.fromAmount!=o.fromAmount&&s(o)),i(n),t.setMaxRoute&&t.setMaxRoute(dq(n));case 3:case"end":return e.stop()}}),e)})));return function(t){return n.apply(this,arguments)}}());case 1:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}(),E=function(e){if(e.allRoutes,e.selectedRoute,0!=e.updatable&&t.accept&&v){var n=setTimeout((function(){m(!0)}),4e3);bX(Object.assign({},t,{account:v})).then((function(t){clearInterval(n),_(t)}))}},A=function(t,e){t.fromAmount=e.toString(),t.transaction.params.amounts[0]=e.toString(),t.transaction.value&&"0"!=t.transaction.value.toString()&&(t.transaction.value=e.toString())},S=function(){var t=e(u.mark((function t(e,n){var r,i;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.directTransfer){t.next=2;break}return t.abrupt("return",e);case 2:return t.next=4,e.fromToken.readable(n||e.transaction.params.amounts[0]);case 4:return r=t.sent,t.next=7,e.fromToken.BigNumber(fq(r));case 7:return i=t.sent,A(e,i),t.abrupt("return",e);case 10:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),k=function(){var t=e(u.mark((function t(e){return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.all(e.map((function(t){return S(t)}))));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),N=function(){var t=e(u.mark((function t(){return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:d(wX({},a)),s(null);case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return G.useEffect((function(){var t=setTimeout((function(){b(g+1),E({allRoutes:r,selectedRoute:l,updatable:w})}),15e3);return function(){return clearTimeout(t)}}),[g,r,l,w]),G.useEffect((function(){v&&t.accept&&null==M&&E({})}),[v,t.accept]),G.createElement(KJ.Provider,{value:{selectedRoute:l,setSelectedRoute:d,getPaymentRoutes:E,allRoutes:r,setAllRoutes:i,slowRouting:p,updatedRouteWithNewPrice:a,updateRouteWithNewPrice:N}},t.children)},_X=G.createContext(),EX=function(t){var e=G.useContext(PG).setError,n=G.useContext(pq).account,r=G.useContext(Z).updatable,i=G.useContext(sq),o=i.amount,a=i.currencyCode,s=G.useContext(aq).amount,u=G.useContext(JJ).payment,c=h(G.useState(),2),l=c[0],d=c[1],f=h(G.useState(),2),p=f[0],m=f[1],y=h(G.useState(),2),g=y[0],b=y[1],v=G.useContext(sq).currency,w=h(G.useState(0),2),M=w[0],_=w[1],E=function(t){var r=t.updatable,i=t.payment;0!=r&&null!=(null==i?void 0:i.route)&&(b(null),Promise.all([FJ({blockchain:i.route.blockchain,tokenIn:i.route.fromToken.address,tokenOut:UM[i.route.blockchain].USD,amountIn:i.route.fromAmount,fromAddress:n,toAddress:n}),i.route.directTransfer?Promise.resolve([]):FJ({blockchain:i.route.blockchain,tokenIn:i.route.toToken.address,tokenOut:i.route.fromToken.address,amountIn:i.route.toAmount,fromAddress:n,toAddress:n}),new _V({blockchain:i.route.blockchain,address:UM[i.route.blockchain].USD}).decimals()]).then((function(t){var e,n=h(t,3),r=n[0],o=n[1],a=n[2],s=r[0],u=o[0];if(u){var c=Wd.from(u.amountOut),l=Wd.from(i.route.fromAmount),f=100-c.mul(Wd.from("100")).div(l).abs().toString();b(f>=10?f:null)}if(i.route.fromToken.address==UM[i.route.blockchain].USD)e=i.route.fromAmount.toString();else{if(null==s)return void d("");e=s.amountOut.toString()}var p=RM(e,a);WJ.fromUSD({amount:p,code:v}).then(d)})).catch(e))};return G.useEffect((function(){l&&s&&o&&o.currency&&o.fix?m(l.toString()):!s||null!=o&&1==(null==o?void 0:o.token)?l&&l.toString().length&&1!=(null==o?void 0:o.token)?m(l.toString()):u&&m("".concat(u.symbol," ").concat(u.amount)):m(new WJ({amount:s.toFixed(2),code:a}).toString())}),[l,u,s,o]),G.useEffect((function(){n&&u&&E({updatable:r,payment:u})}),[u,n]),G.useEffect((function(){var t=setTimeout((function(){_(M+1),E({updatable:r})}),15e3);return function(){return clearTimeout(t)}}),[M,r]),G.createElement(_X.Provider,{value:{paymentValue:l,paymentValueLoss:g,displayedPaymentValue:p}},t.children)},AX=function(t){var e=G.useContext(aq),n=e.acceptWithAmount,r=e.setMaxRoute,i=G.useContext(sq),o=i.blacklist,a=i.whitelist,s=i.fee;return G.createElement(qJ.Provider,{value:{}},G.createElement(MX,{accept:n,whitelist:a,blacklist:o,setMaxRoute:r,fee:s},G.createElement(tK,{container:t.container,document:t.document},G.createElement(EX,null,t.children))))},SX=function(t){var e=fq(t),n=e.toString();if(new RegExp(/\./).test(n)){var r=n.split(".");return(new Intl.NumberFormat).format(parseInt(r[0]))+"."+r[1]}return(new Intl.NumberFormat).format(e)};let kX=["ethereum","bsc","polygon","solana","velas"];kX.evm=["ethereum","bsc","polygon","velas"],kX.solana=["solana"];const NX=[{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],TX=[{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];let xX=function(t){const[e,n]=G.useState(),[r,i]=G.useState("repository"),o=t.blockchain.toLowerCase(),a=t.address,s=t.id;G.useEffect((()=>{UM[o].NATIVE.toLowerCase()==a.toLowerCase()?n(qh(o).logo):n(u({blockchain:o,address:a}))}),[o,a]);const u=({blockchain:t,address:e})=>["ethereum","bsc","polygon","solana"].includes(t)?`https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/${c(t)}/assets/${e}/logo.png`:"velas"==t?`https://raw.githubusercontent.com/wagyuswapapp/assets/master/blockchains/velas/assets/${e.toLowerCase()}/logo.png`:void 0,c=t=>{switch(t){case"ethereum":return"ethereum";case"bsc":return"smartchain";case"polygon":return"polygon";case"solana":return"solana";default:throw"DePayReactTokenImage: Unknown blockchain"}},l=()=>{i("unknown"),n("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjgzLjUgMjgzLjUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDI4My41IDI4My41OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxjaXJjbGUgZmlsbD0iI0YwRUZFRiIgY3g9IjE0MS43IiBjeT0iMTQxLjciIHI9IjE0MS43Ii8+CjxnPgoJPHBhdGggZmlsbD0iI0FCQUJBQiIgZD0iTTEyNywxNzUuMXYtNC40YzAtOC40LDEuMS0xNS4zLDMuNC0yMC43YzIuMy01LjQsNS4xLTEwLDguNC0xMy44YzMuMy0zLjcsNi42LTcsMTAuMS05LjdzNi4zLTUuNiw4LjYtOC41CgkJYzIuMy0yLjksMy40LTYuNCwzLjQtMTAuNWMwLTUtMS4xLTguNy0zLjMtMTEuMWMtMi4yLTIuNC01LTQtOC40LTQuOGMtMy40LTAuOC02LjktMS4zLTEwLjUtMS4zYy01LjgsMC0xMS44LDEtMTcuOSwyLjkKCQljLTYuMSwxLjktMTEuNSw0LjctMTYsOC40Vjc0YzIuMy0xLjcsNS40LTMuMyw5LjQtNC45YzQtMS42LDguNC0yLjksMTMuNC00YzUtMS4xLDEwLjEtMS42LDE1LjUtMS42YzguMSwwLDE1LjEsMS4xLDIxLjEsMy40CgkJYzYsMi4zLDEwLjgsNS41LDE0LjcsOS41YzMuOCw0LDYuNyw4LjcsOC42LDE0LjFjMS45LDUuMywyLjksMTEuMSwyLjksMTcuMmMwLDYuNi0xLjEsMTItMy40LDE2LjNjLTIuMyw0LjMtNS4xLDgtOC41LDExLjIKCQljLTMuNCwzLjItNi44LDYuNC0xMC4yLDkuNWMtMy40LDMuMS02LjMsNi44LTguNiwxMWMtMi4zLDQuMi0zLjQsOS41LTMuNCwxNS45djMuNEgxMjd6IE0xMjUuMiwyMTguMnYtMjcuN2gzM3YyNy43SDEyNS4yeiIvPgo8L2c+Cjwvc3ZnPgo=")},h=t=>{t.match(/^ipfs/)&&(t=`https://ipfs.io/ipfs/${t.split("://")[1]}`),fetch(t).then((t=>{if(t.ok)return t.json();l()})).then((t=>{if(t){let e=t.image;e?(e.match(/^ipfs/)&&(e=`https://ipfs.io/ipfs/${e.split("://")[1]}`),i("meta"),n(e)):l()}})).catch(l)};return null==e?null:G.createElement("img",{className:t.className,src:e,onError:t=>{"repository"==r?(i("depay"),n(`https://integrate.depay.com/tokens/${o}/${a}/image`)):"depay"==r&&kX.evm.includes(o)?s?EH({blockchain:o,address:a,api:TX,method:"uri",params:[s]}).then((t=>{t=t.match("0x{id}")?t.replace("0x{id}",s):t,h(t)})).catch(l):EH({blockchain:o,address:a,api:NX,method:"tokenURI",params:[1]}).then(h).catch(l):l()},__self:this,__source:{fileName:"/Users/sebastian/Work/DePay/react-token-image/src/index.js",lineNumber:105}})};var LX=function(t){var e=G.useContext(ah).navigate;G.useContext(PG).setError,G.useContext(pq).account;var r=G.useContext(aq),i=r.amount,o=r.setAmount,a=r.maxAmount;G.useContext(_X).displayedPaymentValue;var s=h(G.useState(i),2),u=s[0],c=s[1],l=G.useContext(sq),d=l.currencyCode,f=l.amount,p=G.useContext(KJ);p.allRoutes;var m=p.setSelectedRoute,y="object"==n(f)&&f.min?f.min:1,g="object"==n(f)&&f.step?f.step:1,b=null!=f&&f.token?null:d,v=function(t){Number.isNaN(t)||c(t)},w=function(t){return g&&(t=parseFloat(new VZ(Math.floor(new VZ(t).div(g))).mul(g).toString())),t},M=function(t){return t=w(t),a&&(t=Math.max(y,Math.min(t,a))),t=w(t)};return G.createElement(lh,{stacked:!0,header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM PaddingBottomS"},G.createElement("h1",{className:"LineHeightL FontSizeL TextCenter"},"Change Amount"),G.createElement("div",{className:"FontSizeL TextCenter FontWeightBold"},G.createElement("strong",null,b))),body:G.createElement("div",{className:"MaxHeight PaddingTopXS"},G.createElement("div",{className:"PaddingLeftM PaddingRightM"},G.createElement("div",{className:"PaddingTopS TextCenter PaddingBottomL"},G.createElement("div",{className:"PaddingBottomM"},G.createElement("input",{max:a?parseFloat(a):null,min:y,step:g,className:"Input FontSizeXXL TextAlignCenter",type:"number",name:"amount",value:parseFloat(u),onChange:function(t){v(t.target.value)},onBlur:function(t){var e;e=t.target.value,c(M(e))}})),a&&G.createElement("div",{style:{height:"40px"}},G.createElement("div",{className:"FontSizeS"},SX(w(a)),G.createElement("div",null,G.createElement("button",{className:"TextButton",onClick:function(){v(M(a))}},"(Max)"))))))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("button",{className:"ButtonPrimary",onClick:function(){var t=M(parseFloat(u));t!=i&&(m(void 0),o(t)),e("back")}},"Done"))})},IX=function(t){var e=G.useContext(_X).paymentValue;return G.createElement(lh,{stacked:!0,header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM PaddingBottomS"},G.createElement("h1",{className:"LineHeightL FontSizeL TextCenter"},"Change Payment"),null!=e&&G.createElement("div",{className:"FontSizeL TextCenter FontWeightBold"},G.createElement("strong",null,e.toString()))),body:G.createElement("div",{className:"MaxHeight PaddingTopXS"},G.createElement("div",{className:"PaddingLeftM PaddingRightM"},G.createElement("div",{className:"Card Skeleton"},G.createElement("div",{className:"SkeletonBackground"})),G.createElement("div",{className:"Card Skeleton"},G.createElement("div",{className:"SkeletonBackground"})),G.createElement("div",{className:"Card Skeleton"},G.createElement("div",{className:"SkeletonBackground"}))))})},jX=function(t){var e=G.useContext(PG).setError,n=G.useContext(KJ),r=n.allRoutes,i=n.setSelectedRoute,o=G.useContext(_X);o.paymentValue;var a=o.displayedPaymentValue,s=G.useContext(ah).navigate,u=h(G.useState([]),2),c=u[0],l=u[1],d=h(G.useState([]),2),f=d[0],p=d[1];return G.useEffect((function(){null!=r&&Promise.all(r.map((function(t){return t.exchangeRoutes[0],t.fromToken,Promise.all([t.fromToken.name(),t.fromToken.symbol(),t.fromToken.decimals(),t.fromToken.readable(t.fromAmount)])}))).then((function(t){l(r.map((function(e,n){return{name:t[n][0],symbol:t[n][1].toUpperCase(),decimals:t[n][2],amount:t[n][3],route:e}})))})).catch(e)}),[r]),G.useEffect((function(){p(c.map((function(t,e){var n=qh(t.route.blockchain);return G.createElement("div",{key:e,className:"Card",title:"Select ".concat(t.symbol," as payment"),onClick:function(){i(t.route),s("back")}},G.createElement("div",{className:"CardImage"},G.createElement(xX,{blockchain:t.route.blockchain,address:t.route.fromToken.address}),G.createElement("img",{className:"BlockchainLogo small",src:n.logo,alt:n.label,title:n.label})),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("h2",{className:"CardText"},G.createElement("div",{className:"TokenAmountRow"},G.createElement("span",{className:"TokenSymbolCell"},t.symbol),G.createElement("span",null," "),G.createElement("span",{className:"TokenAmountCell"},SX(t.amount)))),G.createElement("h3",{className:"CardText small"},G.createElement("small",null,SX(fq(parseFloat(t.route.fromBalance.toString())/Math.pow(10,t.decimals),"down")))))))})))}),[c]),0==c.length||0==f.length?G.createElement(IX,null):G.createElement(lh,{stacked:!0,header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM PaddingBottomS"},G.createElement("h1",{className:"LineHeightL FontSizeL TextCenter"},"Change Payment"),null!=a&&G.createElement("div",{className:"FontSizeL TextCenter FontWeightBold"},G.createElement("strong",null,a.toString()))),body:G.createElement("div",{className:"MaxHeight PaddingTopXS"},G.createElement("div",{className:"PaddingLeftM PaddingRightM"},f)),footer:G.createElement("div",null)})},CX=function(t){var e=G.useContext(sq).title;return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},G.createElement("h1",{className:"LineHeightL FontSizeL"},e||"Donation")),body:G.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},G.createElement("div",{className:"Card Skeleton"},G.createElement("div",{className:"SkeletonBackground"})),G.createElement("div",{className:"Card Skeleton"},G.createElement("div",{className:"SkeletonBackground"}))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("div",{className:"SkeletonWrapper"},G.createElement("div",{className:"ButtonPrimary Skeleton"},G.createElement("div",{className:"SkeletonBackground"}))))})},DX=function(t){return G.createElement("svg",{className:"Checkmark Icon "+t.className,version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 24 24"},G.createElement("path",{d:"M20,4.9L9.2,16l-5.4-3.9c-0.7-0.5-1.6-0.3-2.1,0.3c-0.5,0.7-0.3,1.6,0.3,2.1l6.4,4.7c0.3,0.2,0.6,0.3,0.9,0.3 c0.4,0,0.8-0.2,1.1-0.5l11.7-12c0.6-0.6,0.6-1.6,0-2.2C21.6,4.3,20.6,4.3,20,4.9z"}))},OX=function(t){return G.createElement("svg",{className:"DigitalWalletIcon Icon "+t.className,version:"1.1",xmlns:"http://www.w3.org/2000/svg",height:"24",width:"24",viewBox:"0 0 24 24"},G.createElement("path",{d:"M8.51,4.84l-.39-.53,4-2.89a2.2,2.2,0,0,1,3.06.48l.4.56-.53.39-.4-.56A1.54,1.54,0,0,0,12.5,2Z",transform:"translate(-0.81 -1)"}),G.createElement("path",{d:"M9.77,4.89l-.21-.62,6.31-2.13h0a2.18,2.18,0,0,1,.67-.1h0a2.21,2.21,0,0,1,2.08,1.49l.32.95-.63.21L18,3.73a1.53,1.53,0,0,0-1.45-1h0a1.61,1.61,0,0,0-.48.08h0Z",transform:"translate(-0.81 -1)"}),G.createElement("path",{d:"M19.72,16.2H18.27a3.28,3.28,0,1,1,0-6.56h1.45a3.21,3.21,0,0,1,1.33.28h0a3.28,3.28,0,0,1,0,6A3.21,3.21,0,0,1,19.72,16.2Zm-1.45-5.9a2.63,2.63,0,0,0,0,5.25h1.45a2.56,2.56,0,0,0,1.06-.23,2.62,2.62,0,0,0,0-4.8,2.55,2.55,0,0,0-1.06-.22ZM19,14.53a1.61,1.61,0,1,1,1.61-1.61A1.62,1.62,0,0,1,19,14.53ZM19,12a1,1,0,1,0,.95.95A1,1,0,0,0,19,12Z",transform:"translate(-0.81 -1)"}),G.createElement("path",{d:"M10.49,19.69a1.58,1.58,0,1,1,1.58-1.57A1.57,1.57,0,0,1,10.49,19.69Zm0-2.49a.92.92,0,1,0,.92.92A.92.92,0,0,0,10.49,17.2Z",transform:"translate(-0.81 -1)"}),G.createElement("path",{d:"M19.09,22.14H2.79a2,2,0,0,1-2-2V6.25a2.1,2.1,0,0,1,0-.43,2,2,0,0,1,.48-.92,2,2,0,0,1,1.48-.65H19.09a2,2,0,0,1,.64.1,2,2,0,0,1,1.36,1.79v0a.28.28,0,0,1,0,.09v3.91h-.66v-4a1.49,1.49,0,0,0-.23-.69A1.35,1.35,0,0,0,19.52,5a1.26,1.26,0,0,0-.43-.08H2.82a1.34,1.34,0,0,0-1,.44A1.49,1.49,0,0,0,1.5,6a1.5,1.5,0,0,0,0,.29V20.13a1.36,1.36,0,0,0,1.34,1.35H19.09a1.35,1.35,0,0,0,1.35-1.35V15.68h.66v4.45A2,2,0,0,1,19.09,22.14Z",transform:"translate(-0.81 -1)"}),G.createElement("path",{d:"M9.27,9.31a1.58,1.58,0,1,1,0-3.15,1.58,1.58,0,0,1,0,3.15Zm0-2.5a.92.92,0,1,0,.92.92A.92.92,0,0,0,9.27,6.81Z",transform:"translate(-0.81 -1)"}),G.createElement("path",{d:"M7.11,14.67A1.58,1.58,0,1,1,8.69,13.1,1.57,1.57,0,0,1,7.11,14.67Zm0-2.49A.92.92,0,1,0,8,13.1.92.92,0,0,0,7.11,12.18Z",transform:"translate(-0.81 -1)"}),G.createElement("rect",{x:"0.33",y:"11.77",width:"4.72",height:"0.66"}),G.createElement("polygon",{points:"2.08 9.53 0.33 9.53 0.33 8.87 1.8 8.87 4.28 6.39 7.21 6.39 7.21 7.05 4.55 7.05 2.08 9.53"}),G.createElement("polygon",{points:"8.43 17.45 4.53 17.45 2.63 15.55 0.33 15.55 0.33 14.89 2.9 14.89 4.8 16.79 8.43 16.79 8.43 17.45"}))},PX={ethereum:13,bsc:4,polygon:3},zX=function(t){return G.createElement("div",{className:"LoadingText"},t.children,G.createElement("span",{className:"dot"},"."),G.createElement("span",{className:"dot"},"."),G.createElement("span",{className:"dot"},"."))},RX=function(){var t=G.useContext(aq);t.amount,t.amountsMissing;var e=G.useContext(XJ),n=e.synchronousTracking,r=e.asynchronousTracking,i=e.trackingInitialized,o=e.release,a=e.forwardTo,s=e.confirmationsRequired,u=e.confirmationsPassed,c=G.useContext(JJ),l=c.payment,d=c.paymentState,f=c.pay,p=c.transaction,m=c.approve,y=c.approvalTransaction,g=G.useContext(_X);g.paymentValue;var b=g.displayedPaymentValue,v=g.paymentValueLoss,w=G.useContext(KJ),M=w.updatedRouteWithNewPrice,_=w.updateRouteWithNewPrice;G.useContext(ah).navigate;var E=G.useContext(q).close,A=h(G.useState(),2),S=A[0],k=A[1],N=h(G.useState(0),2),T=N[0],x=N[1];G.useEffect((function(){if(s){var t=setInterval((function(){x(T+1)}),1e3);return function(){clearInterval(t)}}}),[s,T]),G.useEffect((function(){u&&k(function(t,e,n){return(e-n)*PX[t]}(l.blockchain,s,u)-T)}),[u,T]),G.useEffect((function(){u&&x(0)}),[u]);return G.createElement("div",null,null==l.route||!l.route.approvalRequired||l.route.directTransfer?null:"initialized"==d?G.createElement("div",{className:"PaddingBottomXS"},G.createElement("button",{className:"ButtonPrimary",onClick:m,title:"Allow ".concat(l.symbol," to be used as payment")},"Allow ",l.symbol," to be used as payment")):"approving"==d?G.createElement("div",{className:"PaddingBottomXS"},G.createElement("a",{className:"ButtonPrimary",title:"Approving payment token - please wait",href:null==y?void 0:y.url,target:"_blank",rel:"noopener noreferrer"},G.createElement(zX,null,"Approving"))):void 0,"paying"==d&&null==p?G.createElement("div",{className:"PaddingBottomS"},G.createElement("div",{className:"Card transparent disabled small"},G.createElement("div",{className:"CardImage"},G.createElement("div",{className:"TextCenter Opacity05"},G.createElement(OX,{className:"small"}))),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("div",{className:"Opacity05"},"Confirm transaction in your wallet"))))):"success"==d?G.createElement("div",{className:"PaddingBottomS"},G.createElement("div",null,G.createElement("a",{className:"Card transparent small",title:"Transaction has been confirmed by the network",href:null==p?void 0:p.url,target:"_blank",rel:"noopener noreferrer"},G.createElement("div",{className:"CardImage"},G.createElement("div",{className:"TextCenter Opacity05"},G.createElement(DX,{className:"small"}))),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("div",{className:"Opacity05"},"Transaction confirmed"))))),0==n&&0==r||r&&i?null:r&&0==i?G.createElement("div",null,G.createElement("div",{className:"Card transparent small disabled"},G.createElement("div",{className:"CardImage"},G.createElement("div",{className:"TextCenter"},G.createElement("div",{className:"Loading Icon"}))),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("div",{className:"Opacity05"},"Initializing tracking"))))):o?G.createElement("div",null,G.createElement("div",{className:"Card transparent small disabled"},G.createElement("div",{className:"CardImage"},G.createElement("div",{className:"TextCenter Opacity05"},G.createElement(DX,{className:"small"}))),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("div",{className:"Opacity05"},"Payment validated"))))):G.createElement("div",null,G.createElement("div",{className:"Card transparent small disabled"},G.createElement("div",{className:"CardImage"},G.createElement("div",{className:"TextCenter"},G.createElement("div",{className:"Loading Icon"}))),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("div",{className:"Opacity05"},"Validating payment",s&&S>0&&G.createElement("span",{title:"".concat(u,"/").concat(s," required confirmations")}," ",S,"s"))))))):void 0,M?G.createElement("div",null,G.createElement("div",{className:"PaddingBottomXS"},G.createElement("div",{className:"Alert"},G.createElement("strong",null,"Price updated!"))),G.createElement("button",{className:"ButtonPrimary",onClick:function(){_()}},"Reload")):v?G.createElement("div",null,G.createElement("div",{className:"PaddingBottomXS"},G.createElement("div",{className:"Alert"},G.createElement("strong",null,"Payment token would lose ",v,"% of it's value!"))),G.createElement("button",{className:"ButtonPrimary disabled",onClick:function(){}},"Pay ",b)):"initialized"!=d&&"approving"!=d||!l.route?"paying"==d?G.createElement("a",{className:"ButtonPrimary",title:"Performing the payment - please wait",href:null==p?void 0:p.url,target:"_blank",rel:"noopener noreferrer"},G.createElement(zX,null,"Paying")):"success"==d?1==n?o?a?G.createElement("a",{className:"ButtonPrimary",href:a,rel:"noopener noreferrer"},"Continue"):G.createElement("button",{className:"ButtonPrimary",onClick:E},"Continue"):G.createElement("button",{className:"ButtonPrimary disabled",onClick:function(){}},"Continue"):1==r&&0==i?G.createElement("button",{className:"ButtonPrimary disabled",onClick:function(){}},"Close"):G.createElement("button",{className:"ButtonPrimary",onClick:E},"Close"):void 0:G.createElement("button",{className:["ButtonPrimary",l.route.approvalRequired&&!l.route.directTransfer?"disabled":""].join(" "),onClick:function(){l.route.approvalRequired&&!l.route.directTransfer||f()}},"Pay ",b))},BX=function(t){var e=G.useContext(sq);e.currencyCode;var n=e.title;G.useContext(aq).amount;var r=G.useContext(JJ),i=r.payment,o=r.paymentState,a=G.useContext(_X).displayedPaymentValue,s=G.useContext(ah).navigate;if(null==i)return G.createElement(CX,null);var u=qh(i.blockchain);return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},G.createElement("h1",{className:"LineHeightL FontSizeL"},n||"Donation")),body:G.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},G.createElement("div",{className:["Card","initialized"==o?"":"disabled"].join(" "),title:"initialized"==o?"Change amount":void 0,onClick:function(){"initialized"==o&&s("ChangeAmount")}},G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("h4",{className:"CardTitle"},"Amount"),G.createElement("h2",{className:"CardText"},G.createElement("div",{className:"TokenAmountRow"},a)))),G.createElement("div",{className:"CardAction"},G.createElement(dh,null))),G.createElement("div",{className:["Card","initialized"==o?"":"disabled"].join(" "),title:"initialized"==o?"Change payment":void 0,onClick:function(){"initialized"==o&&s("ChangePayment")}},G.createElement("div",{className:"CardImage",title:i.name},G.createElement(xX,{blockchain:i.route.blockchain,address:i.token}),G.createElement("img",{className:"BlockchainLogo small",src:u.logo,alt:u.label,title:u.label})),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("h4",{className:"CardTitle"},"Payment"),G.createElement("h2",{className:"CardText"},G.createElement("div",{className:"TokenAmountRow"},G.createElement("span",{className:"TokenSymbolCell"},i.symbol),G.createElement("span",null," "),G.createElement("span",{className:"TokenAmountCell"},SX(i.amount)))))),G.createElement("div",{className:"CardAction"},G.createElement(dh,null)))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement(RX,null))})},UX=function(){var t=G.useContext(q).close,e=G.useContext(JJ).transaction;return G.createElement(lh,{stacked:!1,header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"}),body:G.createElement("div",{className:"TextCenter"},G.createElement("div",{className:"GraphicWrapper"},G.createElement("img",{className:"Graphic",src:zG})),G.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Payment Failed"),G.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},G.createElement("strong",{className:"FontSizeM"},"Unfortunately executing your payment failed, but you can try again."),e&&G.createElement("div",{className:"PaddingTopS"},G.createElement("a",{className:"Link",title:"Check your transaction on a block explorer",href:null==e?void 0:e.url,target:"_blank",rel:"noopener noreferrer"},"View on explorer")))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("button",{className:"ButtonPrimary",onClick:function(){return t()}},"Try again"))})},FX=function(t){var e=G.useContext(JJ).payment,n=G.useContext(ah).navigate,r=qh(e.route.blockchain);return G.createElement(lh,{stacked:!0,header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},G.createElement("h1",{className:"LineHeightL FontSizeL"},"Wrong Network")),body:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM PaddingBottomXS TextCenter"},G.createElement("div",{className:"GraphicWrapper"},G.createElement("img",{className:"Graphic",src:"data:image/png;base64,iVBORw0KG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3yLPF1ZSN5yFJAQKwf2F5SCfsT+DePQqi/u7+wLklsUJDzXMX+Fn34M+c+btQzG/zIHSxgKRAhgCA/Xh3xS7hEMEKDoIlghADhE8FIWGIiuHNiIrh3YiK4d/Lg79qLhEXGUmDnfNDR4YhiYwNCkfBEBeydqIC9w8uogH3Dy1gL7Btexn7AvuFZ6BN4kbBs9Ox4BI1tP0IkgoDsTmOFeg5DJDR5SeM0biQUPCNyIDsSiscDWUp6Z7MiayAYHMzfwCGdCD46DsA7Gt9/6V90HVsnzxYd1eT6fH/sKH8CnL28sRNe5m1Y8Xlj+EY023sKXWT8+Xxg0eeXeTNF+0QHhXqrNzzLJwrg04CH9UwRBfDJcHicgwUIFrF+/DDa1M5ueCY3ecA/Mre4a1/mDVG/VH9on+zAo+EjVv4Hb1pRc1A6sKoAAAAASUVORK5CYII="})),G.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Connect to ",r.label),G.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},G.createElement("strong",{className:"FontSizeM"},"Please make sure you connect your wallet to the correct network before you try again!"))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("button",{className:"ButtonPrimary",onClick:function(){return n("back")}},"Try again"))})},YX=function(t){var e=G.useContext(q),n=e.open,r=e.close,i=G.useContext(ZJ).setNavigator;return G.createElement(ch,{setNavigator:i,open:n,close:r,start:"DonationOverview",container:t.container,document:t.document,dialogs:{DonationOverview:G.createElement(BX,null),ChangeAmount:G.createElement(LX,null),ChangePayment:G.createElement(jX,null),PaymentFailed:G.createElement(UX,null),WrongNetwork:G.createElement(FX,null)}})},QX=function(t){var e;return G.createElement(ZJ.Provider,{value:{navigate:function(t){e&&e.navigate(t)},set:function(t){e&&e.set(t)},setNavigator:function(t){e=t}}},t.children)},WX=function(t){G.useContext(PG).errorCallback;var n=G.useContext(sq),r=n.track,i=n.validated,o=n.integration,a=n.link,s=n.type,c=G.useContext(pq),l=c.account;c.wallet;var d=h(G.useState(),2),f=d[0],p=d[1],m=h(G.useState(),2),y=m[0],g=m[1],b=h(G.useState(),2),v=b[0],w=b[1],M=h(G.useState(),2),_=M[0],E=M[1],A=h(G.useState(),2);A[0],A[1];var S=h(G.useState(),2),k=S[0],N=S[1],T=h(G.useState(!1),2),x=T[0],L=T[1],I=h(G.useState(!(!r||!r.endpoint&&"function"!=typeof r.method||1==r.async)),1)[0],j=h(G.useState(!(!r||1!=r.async)),1)[0],C=h(G.useState(!(!r||!r.poll||!r.poll.endpoint&&"function"!=typeof r.poll.method||1==r.async)),1)[0],D=h(G.useState(!1),2),O=D[0],P=D[1],z=h(G.useState(),2),R=z[0],B=z[1],U=G.useContext(q).setClosable,F=G.useContext(ZJ),Y=F.navigate;F.set;var Q=function e(n){var r=new WebSocket("wss://integrate.depay.com/cable");r.onopen=function(t){var e,i={command:"subscribe",identifier:JSON.stringify({blockchain:n.blockchain,sender:n.from,nonce:null==n||null===(e=n.nonce)||void 0===e?void 0:e.toString(),channel:"PaymentChannel"})};r.send(JSON.stringify(i))},r.onclose=function(t){t&&1e3==t.code||e(n)},r.onmessage=function(e){var n=JSON.parse(e.data);"ping"!==n.type&&n.message&&(i&&i("success"==n.message.status),n.message.release?(P(!0),U(!n.message.forward_to),B(n.message.forward_to),r.close(1e3),n.message.forward_to&&setTimeout((function(){t.document.location.href=n.message.forward_to}),200)):n.message.confirmations&&(g(n.message.confirmations.required),w(n.message.confirmations.passed)))},r.onerror=function(t){console.log("WebSocket Error: "+t)}},W=function(t,e,n,i){(i=parseInt(i||1,10))<((null==r?void 0:r.attempts)||40)?setTimeout((function(){H(t,e,n,i+1)}),3e3):Y("TrackingFailed")},H=function(t,e,n,i){var o,a;(function(t){if(r.endpoint)return fetch(r.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((function(t){if(200==t.status||201==t.status)return t;throw t}));if(r.method)return r.method(t);throw"No tracking defined!"})({blockchain:t.blockchain,transaction:t.id,sender:t.from,nonce:null==t||null===(o=t.nonce)||void 0===o?void 0:o.toString(),after_block:e.toString(),from_token:n.fromToken.address,from_amount:n.fromAmount.toString(),from_decimals:n.fromDecimals,to_token:n.toToken.address,to_amount:n.toAmount.toString(),to_decimals:n.toDecimals,fee_amount:null==n||null===(a=n.feeAmount)||void 0===a?void 0:a.toString()}).then((function(t){L(!0),console.log("PAYMENT TRACKING INITIALIZED")})).catch((function(r){console.log("PAYMENT TRACKING FAILED",r),W(t,e,n,i)}))};G.useEffect((function(){if(C&&I){var e=setInterval((function(){return function(e,n,i,o,a){var s;if(e&&null!=n&&null!=i&&null!=o){var u={blockchain:n.blockchain,transaction:n.id,sender:n.from,nonce:null==n||null===(s=n.nonce)||void 0===s?void 0:s.toString(),after_block:i.toString(),to_token:o.toToken.address},c=function(e){e&&(e&&e.forward_to?(B(e.forward_to),setTimeout((function(){t.document.location.href=e.forward_to}),100)):U(!0),clearInterval(a),P(!0))};r.poll.endpoint?fetch(r.poll.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(u)}).then((function(t){return 200==t.status||201==t.status?t.json().catch((function(){U(!0)})):void 0})).then(c):r.poll.method&&r.poll.method(u).then(c)}}(C,f,_,k,e)}),5e3);return function(){clearInterval(e)}}}),[C,f,_,k]);var Z=function t(e,n,r,i){var u;fetch("https://public.depay.com/payments",{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({blockchain:e.blockchain,transaction:e.id,sender:e.from,nonce:null==e||null===(u=e.nonce)||void 0===u?void 0:u.toString(),receiver:r.toAddress,token:r.toToken.address,amount:r.fee?RM(r.transaction.params.amounts[1],r.toDecimals):RM(r.toAmount,r.toDecimals),confirmations:1,after_block:n.toString(),uuid:e.id,payload:{sender_id:e.from,sender_token_id:r.fromToken.address,sender_amount:RM(r.fromAmount,r.fromDecimals),integration:o,link:a,type:s},fee_amount:r.fee?RM(r.transaction.params.amounts[4],r.toDecimals):null,fee_receiver:r.fee?r.transaction.params.addresses[1]:null})}).then((function(i){200==i.status||201==i.status||setTimeout((function(){t(e,n,r)}),3e3)})).catch((function(i){setTimeout((function(){t(e,n,r)}),3e3)}))};return G.createElement(XJ.Provider,{value:{synchronousTracking:I,asynchronousTracking:j,initializeTracking:function(t,e,n){Z(t,e,n),(I||r&&1==r.async)&&H(t,e,n),0!=I&&(p(t),E(e),N(n),Q(t))},preTrack:function(t,n){return I||j?new Promise(function(){var i=e(u.mark((function e(i,o){var a,s;return u.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=n.blockchain,e.t1=l,e.next=4,EH({blockchain:n.blockchain,address:l,method:"transactionCount"});case 4:if(e.t2=e.sent.toString(),e.t3=t.toString(),e.t4=n.fromToken.address,e.t5=n.fromAmount.toString(),e.t6=n.fromDecimals,e.t7=n.toToken.address,e.t8=n.toAmount.toString(),e.t9=n.toDecimals,e.t10=null==n||null===(a=n.feeAmount)||void 0===a?void 0:a.toString(),s={blockchain:e.t0,sender:e.t1,nonce:e.t2,after_block:e.t3,from_token:e.t4,from_amount:e.t5,from_decimals:e.t6,to_token:e.t7,to_amount:e.t8,to_decimals:e.t9,fee_amount:e.t10},!r.endpoint){e.next=18;break}return e.abrupt("return",fetch(r.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).then((function(t){return 200==t.status||201==t.status?(console.log("PAYMENT PRETRACKING INITIALIZED"),i()):o("PRETRACKING REQUEST FAILED")})));case 18:r.method?r.method(s).then(i).catch(o):o("No tracking defined!");case 19:case"end":return e.stop()}}),e)})));return function(t,e){return i.apply(this,arguments)}}()):Promise.resolve()},trackingInitialized:x,continueTryTracking:function(){W(f,_,k,1)},release:O,forwardTo:R,confirmationsRequired:y,confirmationsPassed:v}},t.children)},HX=function(t){var e=h(G.useState(),2),n=e[0],r=e[1],i=h(G.useState(),2),o=i[0],a=i[1],s=h(G.useState(!1),2),u=s[0],c=s[1];G.useContext(PG).errorCallback;var l=G.useContext(sq).recover;G.useEffect((function(){if(u){var t=function(){fetch("https://public.depay.com/transactions/".concat(n.blockchain,"/").concat(n.from,"/").concat(n.nonce)).then((function(t){200==t.status&&t.json().then((function(t){"pending"!=t.status&&(a({id:t.external_id,status:t.status}),c(!1))}))}))},e=setInterval(t,5e3);return t(),function(){clearInterval(e)}}}),[u]);var d=function t(e,n,r){var i;r>3?console.log("TRANSACTION TRACKING FAILED AFTER 3 ATTEMPTS!"):fetch("https://public.depay.com/transactions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id,after_block:n.toString(),blockchain:e.blockchain,sender:e.from,nonce:null==e||null===(i=e.nonce)||void 0===i?void 0:i.toString()})}).then((function(i){200==i.status||201==i.status?console.log("TRANSACTION TRACKING INITIALIZED"):(console.log("TRANSACTION TRACKING FAILED",i),setTimeout((function(){t(e,n,r+1)}),3e3))})).catch((function(i){console.log("TRANSACTION TRACKING FAILED",i),setTimeout((function(){t(e,n,r+1)}),3e3)}))},f=function t(e){var n=new WebSocket("wss://integrate.depay.com/cable");n.onopen=function(t){var r,i={command:"subscribe",identifier:JSON.stringify({blockchain:e.blockchain,sender:e.from,nonce:null==e||null===(r=e.nonce)||void 0===r?void 0:r.toString(),channel:"TransactionChannel"})};n.send(JSON.stringify(i))},n.onclose=function(n){n&&1e3==n.code||t(e)},n.onmessage=function(t){var e=JSON.parse(t.data);"ping"!==e.type&&e.message&&e.message.status&&"pending"!=e.message.status&&(a(e.message),n.close(1e3))},n.onerror=function(t){console.log("WebSocket Error: "+t)}},p=function(t,e){r(t),null==l&&d(t,e,1),f(t),c(!0)};return G.useEffect((function(){l&&p({blockchain:l.blockchain,id:l.transaction,from:l.sender,nonce:l.nonce},l.afterBlock)}),[l]),G.createElement($J.Provider,{value:{initializeTracking:p,foundTransaction:o}},t.children)},GX=function(t){var n=G.useContext(sq).recover;G.useContext(PG).setError;var r=h(G.useState(),2),i=r[0],o=r[1],a=h(G.useState(),2),s=a[0],c=a[1],l=h(G.useState(),2),d=l[0],f=l[1],p=function(e){var n=e.account,r=e.wallet;c(n),o(r),f("connected"),t.connected&&t.connected(n)};return G.useEffect((function(){if(null==n){var t=function(){var t=e(u.mark((function t(){var e,n,r;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,NG();case 2:if(!(e=t.sent)||1!=e.length){t.next=9;break}return n=e[0],t.next=7,n.account();case 7:r=t.sent,p({account:r,wallet:n});case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t()}}),[]),"connected"==d||null!=n?G.createElement(pq.Provider,{value:{account:s,wallet:i,walletState:d}},t.children):G.createElement(xG,{document:t.document,container:t.container,resolve:p})},qX=function(){var t=e(u.mark((function t(e){var n;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=e.accept)instanceof Array&&0!=n.length){t.next=3;break}throw"You need to set the tokens you accept as donation!";case 3:n.forEach((function(t){if(void 0===t.blockchain)throw"You need to set the blockchain you want to receive the donation on!";if(!["ethereum","bsc","polygon"].includes(t.blockchain))throw"You need to set a supported blockchain!";if(void 0===t.token)throw"You need to set the token you want to receive as donation!";if(void 0===t.receiver)throw"You need to set the receiver address that you want to receive the donation!"}));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ZX=function(){var t=e(u.mark((function t(e){var n,r,i,o,a,s,c,l,h,d,f,p,m,y,g,b,v,w,M,_,E,A,S,k,N;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.amount,r=e.accept,i=e.event,o=e.sent,a=e.succeeded,s=e.validated,c=e.failed,l=e.error,h=e.critical,d=e.style,f=e.whitelist,p=e.blacklist,m=e.providers,y=e.currency,g=e.connected,b=e.closed,v=e.track,w=e.fee,M=e.closable,_=e.integration,E=e.link,A=e.container,S=e.title,k=e.document,iq(),t.prev=2,t.next=5,qX({accept:r});case 5:return N=nq({style:d,container:A,document:LG(k),closed:b},(function(t){return function(e){return G.createElement(FG,{errorCallback:l,container:e,unmount:t},G.createElement(HJ,{configuration:{type:"donation",amount:n,accept:r,currency:y,event:i,track:v,fee:w,sent:o,succeeded:a,validated:s,failed:c,blacklist:p,whitelist:f,providers:m,integration:_,link:E,title:S}},G.createElement(oq,null,G.createElement(V,{unmount:t,closable:M},G.createElement(GX,{container:e,connected:g,unmount:t},G.createElement(QX,null,G.createElement(GJ,null,G.createElement(YJ,{accept:r},G.createElement(HX,null,G.createElement(WX,{document:LG(k)},G.createElement(AX,{container:e,document:k},G.createElement(YX,{document:k,container:e}),G.createElement(rq,null))))))))))))}})),t.abrupt("return",{unmount:N});case 9:t.prev=9,t.t0=t.catch(2),console.log("critical error",t.t0),null!=h&&h(t.t0);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}(),VX=function(t){var e=G.useContext(PG).setError,n=G.useContext(sq),r=n.message,i=n.endpoint,o=G.useContext(sq).recoverSignature,a=G.useContext(pq).wallet;if(!a)return null;null==a||!a.name||a.name;var s=null!=a&&a.logo?a.logo:void 0;"function"!=typeof o&&(o=function(t){var n=t.message,r=t.signature;return new Promise((function(t,o){fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:n,signature:r})}).then((function(n){200==n.status?n.text().then((function(e){t(e)})).catch(e):n.text().then((function(t){e(t||"Recovering login signature failed!")}))}))}))});return G.createElement(lh,{body:G.createElement("div",{className:"TextCenter"},s&&G.createElement("div",{className:"GraphicWrapper PaddingTopS PaddingBottomS"},G.createElement("img",{className:"Graphic",src:s})),G.createElement("h1",{className:"LineHeightL Text FontSizeL FontWeightBold PaddingTopS"},"Wallet Login"),G.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},G.createElement("p",{className:"FontSizeM PaddingLeftM PaddingRightM PaddingBottomS"},'Please click "Log in" and sign the message with your connected wallet.'))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("button",{className:"ButtonPrimary",onClick:function(){a.sign(r).then((function(n){o({message:r,signature:n}).then(t.resolve).catch(e)})).catch((function(t){t&&t.code&&4001==t.code||e(t)}))}},"Log in"))})},JX=function(t){var e=G.useContext(q),n=e.open,r=e.close;return G.createElement(ch,{open:n,close:r,start:"SignLogin",container:t.container,document:t.document,dialogs:{SignLogin:G.createElement(VX,{resolve:t.resolve,userClosedDialog:t.userClosedDialog})}})},KX=G.createContext(),XX=function(t){var e=G.useContext(aq),n=e.amountsMissing,r=e.acceptWithAmount,i=e.setMaxRoute,o=h(G.useState(),2),a=o[0],s=o[1];return G.useEffect((function(){n?r&&s(r):s(t.accept)}),[n,r]),G.createElement(KX.Provider,{value:{}},G.createElement(MX,{accept:a,whitelist:t.whitelist,blacklist:t.blacklist,event:t.event,setMaxRoute:i,fee:t.fee},t.children))},$X=function(t){var e=G.useContext(aq),n=e.amountsMissing,r=e.fixedAmount,i=G.useContext(KJ),o=i.slowRouting,a=i.selectedRoute;return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},G.createElement("h1",{className:"LineHeightL FontSizeL"},"Payment")),body:G.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},n&&!r&&G.createElement("div",{className:"Card Skeleton"},G.createElement("div",{className:"SkeletonBackground"})),G.createElement("div",{className:"Card Skeleton"},G.createElement("div",{className:"SkeletonBackground"}))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("div",{className:"SkeletonWrapper"},G.createElement("div",{className:"ButtonPrimary Skeleton"},G.createElement("div",{className:"SkeletonBackground"}))),null==a&&o&&G.createElement("div",{className:"TextCenter Opacity05 PaddingTopS"},G.createElement("strong",null,"Loading payment routes...")))})},t$=function(t){var e=G.useContext(sq),n=e.currencyCode,r=e.recover,i=e.amount,o=G.useContext(JJ),a=o.payment,s=o.paymentState,u=G.useContext(aq),c=u.amount,l=u.amountsMissing,h=u.fixedAmount,d=u.fixedCurrency,f=G.useContext(_X).paymentValue,p=G.useContext(ah).navigate,m=null!=i&&i.token?null:n;if(null==a||null==r&&null==f)return G.createElement($X,null);var y=qh(a.blockchain);return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},G.createElement("h1",{className:"LineHeightL FontSizeL"},"Payment")),body:G.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},l&&!h&&G.createElement("div",{className:["Card","initialized"==s?"":"disabled"].join(" "),title:"initialized"==s?"Change amount":void 0,onClick:function(){"initialized"==s&&p("ChangeAmount")}},G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("h4",{className:"CardTitle"},"Amount"),G.createElement("h2",{className:"CardText"},m&&G.createElement("div",{className:"TokenAmountRow"},new WJ({amount:c.toFixed(2),code:n}).toString()),!m&&G.createElement("div",{className:"TokenAmountRow"},c)))),G.createElement("div",{className:"CardAction"},G.createElement(dh,null))),G.createElement("div",{className:["Card","initialized"==s?"":"disabled"].join(" "),title:"initialized"==s?"Change payment":void 0,onClick:function(){"initialized"==s&&p("ChangePayment")}},G.createElement("div",{className:"CardImage",title:a.name},G.createElement(xX,{blockchain:a.blockchain,address:a.token}),G.createElement("img",{className:"BlockchainLogo small",src:y.logo,alt:y.label,title:y.label})),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},l&&!d&&G.createElement("h4",{className:"CardTitle"},"Payment"),G.createElement("h2",{className:"CardText"},G.createElement("div",{className:"TokenAmountRow"},G.createElement("span",{className:"TokenSymbolCell"},a.symbol),G.createElement("span",null," "),G.createElement("span",{className:"TokenAmountCell"},SX(a.amount)))))),G.createElement("div",{className:"CardAction"},G.createElement(dh,null)))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement(RX,null))})},e$=function(){G.useContext(JJ).transaction;var t=G.useContext(ah).navigate;return G.createElement(lh,{stacked:!1,header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"}),body:G.createElement("div",{className:"TextCenter"},G.createElement("div",{className:"GraphicWrapper"},G.createElement("img",{className:"Graphic",src:zG})),G.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Tracking payment failed"),G.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},G.createElement("strong",{className:"FontSizeM"},'Please ensure you are connected to the internet, then click "Try again".'),G.createElement("div",{className:"PaddingTopS"},G.createElement("span",null,"If this keeps happening, please report it.")))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("button",{className:"ButtonPrimary",onClick:function(){t("back")}},"Try again"))})},n$=function(){var t=G.useContext(XJ).continueTryTracking;G.useContext(JJ).transaction;var e=G.useContext(ah).navigate;return G.createElement(lh,{stacked:!1,header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"}),body:G.createElement("div",{className:"TextCenter"},G.createElement("div",{className:"GraphicWrapper"},G.createElement("img",{className:"Graphic",src:zG})),G.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Tracking payment failed"),G.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},G.createElement("strong",{className:"FontSizeM"},'Please ensure you are connected to the internet, then click "Try again".'),G.createElement("div",{className:"PaddingTopS"},G.createElement("span",null,"If this keeps happening, please report it.")))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("button",{className:"ButtonPrimary",onClick:function(){t(),e("back")}},"Try again"))})},r$=function(t){var e=G.useContext(q),n=e.open,r=e.close,i=G.useContext(ZJ).setNavigator;return G.createElement(ch,{setNavigator:i,open:n,close:r,start:"PaymentOverview",container:t.container,document:t.document,dialogs:{PaymentOverview:G.createElement(t$,null),ChangeAmount:G.createElement(LX,null),ChangePayment:G.createElement(jX,null),PaymentFailed:G.createElement(UX,null),WrongNetwork:G.createElement(FX,null),TrackingFailed:G.createElement(n$,null),PreTrackingFailed:G.createElement(e$,null)}})},i$=function(){var t=e(u.mark((function t(e){var n;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.accept,!e.recover){t.next=3;break}return t.abrupt("return");case 3:n.forEach((function(t){if(void 0===t.blockchain)throw"You need to set the blockchain your want to receive the payment on!";if(!["ethereum","bsc","polygon"].includes(t.blockchain))throw"You need to set a supported blockchain!";if(void 0===t.token&&void 0===t.fromToken&&void 0===t.fromAmount&&void 0===t.toToken)throw"You need to set the token you want to receive as payment!";if(void 0===t.token&&void 0!==t.fromToken&&void 0===t.fromAmount&&void 0===t.toToken)throw"You need to set the fromToken, fromAmount and toToken!";if(void 0===t.receiver)throw"You need to set the receiver address that you want to receive the payment!"}));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),o$=function(){var t=e(u.mark((function t(e){var n,r,i,o,a,s,c,l,h,d,f,p,m,y,g,b,v,w,M,_,E,A,S,k,N;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.accept,r=e.amount,i=e.sent,o=e.succeeded,a=e.validated,s=e.failed,c=e.error,l=e.critical,h=e.style,d=e.whitelist,f=e.blacklist,p=e.providers,m=e.currency,y=e.connected,g=e.closed,b=e.track,v=e.fee,w=e.recover,M=e.closable,_=e.integration,E=e.link,A=e.container,S=e.before,k=e.document,iq(),t.prev=2,t.next=5,i$({accept:n,recover:w});case 5:return N=nq({style:h,container:A,document:LG(k),closed:g},(function(t){return function(e){return G.createElement(FG,{errorCallback:c,container:e,unmount:t},G.createElement(HJ,{configuration:{type:"payment",before:S,amount:r,accept:n,currency:m,event:event,sent:i,succeeded:o,validated:a,failed:s,whitelist:d,blacklist:f,providers:p,track:b,fee:v,recover:w,integration:_,link:E}},G.createElement(oq,null,G.createElement(V,{unmount:t,closable:M},G.createElement(GX,{document:k,container:e,connected:y,unmount:t},G.createElement(QX,null,G.createElement(GJ,null,G.createElement(YJ,{accept:n},G.createElement(XX,{accept:n,whitelist:d,blacklist:f,event:event,fee:v},G.createElement(HX,null,G.createElement(WX,{document:LG(k)},G.createElement(tK,{container:e,document:k},G.createElement(EX,null,G.createElement(r$,{document:k,container:e}),G.createElement(rq,null))))))))))))))}})),t.abrupt("return",{unmount:N});case 9:t.prev=9,t.t0=t.catch(2),console.log("critical error",t.t0),null!=l&&l(t.t0);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}();o$.preload=function(t){var e=t.account,n=t.accept,r=t.whitelist,i=t.blacklist;t.event;var o=t.fee;bX({account:e,accept:n,whitelist:r,blacklist:i,fee:o})};var a$=G.createContext(),s$=G.createContext(),u$=function(t){var e=G.useContext(JJ).payment,n=h(G.useState(),2),r=n[0],i=n[1],o=h(G.useState(),2),a=o[0],s=o[1];return G.useEffect((function(){e&&Promise.all([e.route.toToken.symbol(),e.route.toToken.readable(e.route.toAmount)]).then((function(t){var n=h(t,2),r=n[0],o=n[1];i({address:e.route.toToken.address,symbol:r}),s(o)}))}),[e]),G.createElement(s$.Provider,{value:{toToken:r,toTokenReadableAmount:a}},t.children)},c$=function(t){var e=G.useContext(aq),n=e.acceptWithAmount,r=e.setMaxRoute,i=G.useContext(sq).sell,o=G.useContext(sq).blacklist;for(var a in null==o&&(o={}),i){var s=i[a];o[a]instanceof Array?o[a].push(s):o[a]=[s]}return G.createElement(a$.Provider,{value:{}},G.createElement(MX,{accept:n,blacklist:o,setMaxRoute:r},G.createElement(tK,{container:t.container,document:t.document},G.createElement(EX,null,G.createElement(u$,null,t.children)))))},l$=function(t){return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},G.createElement("h1",{className:"LineHeightL FontSizeL"},"Purchase")),body:G.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},G.createElement("div",{className:"Card Skeleton",style:{height:"100px"}},G.createElement("div",{className:"SkeletonBackground"})),G.createElement("div",{className:"Card Skeleton"},G.createElement("div",{className:"SkeletonBackground"}))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("div",{className:"SkeletonWrapper"},G.createElement("div",{className:"ButtonPrimary Skeleton"},G.createElement("div",{className:"SkeletonBackground"}))))})},h$=function(t){G.useContext(aq).amount;var e,n=G.useContext(sq),r=n.tokenImage,i=n.amount,o=G.useContext(_X).paymentValue,a=G.useContext(JJ),s=a.payment,u=a.paymentState,c=G.useContext(ah).navigate,l=G.useContext(s$),d=l.toToken,f=l.toTokenReadableAmount,p=h(G.useState(),2),m=p[0],y=p[1];if(G.useEffect((function(){if(o&&(null==i||1!=i.token)&&f){var t=o.amount/parseFloat(f),e=new WJ({amount:t,code:o.code}).toString();e!=new WJ({amount:0,code:o.code}).toString()&&y(e)}}),[o,f]),null==d||null==f||null==s||null==o)return G.createElement(l$,null);e=r?G.createElement("img",{src:r}):G.createElement(xX,{blockchain:s.route.blockchain,address:d.address});var g=qh(s.blockchain);return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},G.createElement("h1",{className:"LineHeightL FontSizeL"},"Purchase")),body:G.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},G.createElement("div",{className:["Card","initialized"==u?"":"disabled"].join(" "),title:"initialized"==u?"Change amount":void 0,onClick:function(){"initialized"==u&&c("ChangeAmount")}},G.createElement("div",{className:"CardImage",title:s.name},e,G.createElement("img",{className:"BlockchainLogo small",src:g.logo,alt:g.label,title:g.label})),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("h4",{className:"CardTitle"},"Amount"),G.createElement("h2",{className:"CardText"},G.createElement("div",{className:"TokenAmountRow"},G.createElement("span",{className:"TokenSymbolCell"},d.symbol),G.createElement("span",null," "),G.createElement("span",{className:"TokenAmountCell"},SX(f)))),m&&G.createElement("h3",{className:"CardText small"},G.createElement("small",null,m," per token")))),G.createElement("div",{className:"CardAction"},G.createElement(dh,null))),G.createElement("div",{className:["Card","initialized"==u?"":"disabled"].join(" "),title:"initialized"==u?"Change payment":void 0,onClick:function(){"initialized"==u&&c("ChangePayment")}},G.createElement("div",{className:"CardImage",title:s.name},G.createElement(xX,{blockchain:s.route.blockchain,address:s.token})),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("h4",{className:"CardTitle"},"Payment"),G.createElement("h2",{className:"CardText"},G.createElement("div",{className:"TokenAmountRow"},G.createElement("span",{className:"TokenSymbolCell"},s.symbol),G.createElement("span",null," "),G.createElement("span",{className:"TokenAmountCell"},SX(s.amount)))))),G.createElement("div",{className:"CardAction"},G.createElement(dh,null)))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement(RX,null))})},d$=function(t){var e=G.useContext(q),n=e.open,r=e.close,i=G.useContext(ZJ).setNavigator;return G.createElement(ch,{setNavigator:i,open:n,close:r,start:"SaleOverview",container:t.container,document:t.document,dialogs:{SaleOverview:G.createElement(h$,null),ChangeAmount:G.createElement(LX,null),ChangePayment:G.createElement(jX,null),NoPaymentMethodFound:G.createElement(VJ,null),PaymentFailed:G.createElement(UX,null),WrongNetwork:G.createElement(FX,null)}})},f$=function(){var t=e(u.mark((function t(e){var r;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("object"==n(r=e.sell)){t.next=3;break}throw'You need to configure at least 1 "blockchain": "token"';case 3:if(0!=Object.keys(r).length){t.next=5;break}throw'You need to configure at least 1 "blockchain": "token"';case 5:if(0!=Object.values(r).length){t.next=7;break}throw'You need to configure at least 1 "blockchain": "token"';case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),p$=function(){var t=e(u.mark((function t(e){var n,r,i,o,a,s,c,l,h,d,f,p,m,y,g,b,v,w,M;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.amount,r=e.sell,i=e.sent,o=e.succeeded,a=e.failed,s=e.error,c=e.critical,l=e.style,h=e.blacklist,d=e.providers,f=e.currency,p=e.connected,m=e.closed,y=e.tokenImage,g=e.closable,b=e.integration,v=e.document,iq(),t.prev=2,t.next=5,f$({sell:r});case 5:return w=Object.keys(r).map((function(t){return{blockchain:t,token:r[t]}})),M=nq({style:l,document:LG(v),closed:m},(function(t){return function(e){return G.createElement(FG,{errorCallback:s,container:e,unmount:t},G.createElement(HJ,{configuration:{type:"sale",tokenImage:y,amount:n,sell:r,currency:f,sent:i,succeeded:o,failed:a,blacklist:h,providers:d,integration:b}},G.createElement(oq,null,G.createElement(V,{unmount:t,closable:g},G.createElement(GX,{container:e,connected:p,unmount:t},G.createElement(QX,null,G.createElement(GJ,null,G.createElement(YJ,{accept:w},G.createElement(HX,null,G.createElement(WX,{document:LG(v)},G.createElement(c$,{container:e,document:v},G.createElement(d$,{document:v,container:e}),G.createElement(rq,null))))))))))))}})),t.abrupt("return",{unmount:M});case 10:t.prev=10,t.t0=t.catch(2),console.log("critical error",t.t0),null!=c&&c(t.t0);case 14:case"end":return t.stop()}}),t,null,[[2,10]])})));return function(e){return t.apply(this,arguments)}}(),m$=G.createContext(),y$=function(t){var e=h(G.useState({}),2),n=e[0],r=e[1];return G.createElement(m$.Provider,{value:{selection:n,setSelection:r}},t.children)};function g$(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(void 0===t)return t;var n="";return n+=t.slice(0,e+2),n+="...",n+=t.slice(t.length-e,t.length)}var b$=function(t){var e,n,r,i,o;return o=Math.floor(t/1e3),i=Math.floor(o/60),o%=60,r=Math.floor(i/60),i%=60,n=Math.floor(r/24),r%=24,e=Math.floor(n/30),n%=30,{year:Math.floor(e/12),month:e%=12,day:n,hour:r,minute:i,second:o}};function v$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function w$(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?v$(Object(n),!0).forEach((function(e){eK(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):v$(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var M$=function(t){var e,n,r=G.useContext(m$),i=r.selection;r.setSelection;var o,a,s=G.useContext(q).setOpen,u=G.useContext(ah).navigate;i.nft.createdAt&&(o=[(o=b$(new Date-new Date(i.nft.createdAt))).year&&o.year>=1?o.year>=2?"".concat(o.year," years"):"1 year":void 0,o.month&&o.month>=1?o.month>=2?"".concat(o.month," months"):"1 month":void 0,o.day&&o.day>=1&&o.month<=1&&o.year<1?o.day>=2?"".concat(o.day," days !!!"):"1 day !!!":void 0].filter((function(t){return t})).join(" ")),i.nft.holders&&(a=i.nft.holders>1e6?"Millions":i.nft.holders>1e5?"Hundreds of Thousands":i.nft.holders>2e3?"Thousands":i.nft.holders>100?"Hundreds":"Only a Few!!!");var c=(null===(e=i.nft)||void 0===e?void 0:e.blockchain)||(null===(n=i.blockchain)||void 0===n?void 0:n.name);if(null==c)return u("SelectBlockchain"),null;return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},G.createElement("div",null,G.createElement("h1",{className:"LineHeightL FontSizeL"},"Confirm Selection"))),stacked:!0,body:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},G.createElement("div",{className:"TokenImage medium TextCenter"},i.nft.image&&G.createElement("img",{src:i.nft.image})),G.createElement("div",{className:"PaddingTopS TextCenter"},G.createElement("div",{className:"Alert FontSizeS"},G.createElement("strong",null,"Please review this information"))),G.createElement("div",{className:"PaddingTopXS"},G.createElement("table",{className:"Table TextLeft FontSizeS"},G.createElement("tbody",null,G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Address")),G.createElement("td",null,G.createElement("div",null,G.createElement("a",{className:"Link",title:i.nft.address,href:qh(c).explorerUrlFor({token:i.nft.address}),target:"_blank",rel:"noopener noreferrer"},g$(i.nft.address,6))))),i.nft.id&&G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Token ID")),G.createElement("td",null,G.createElement("div",null,i.nft.id))),G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Blockchain")),G.createElement("td",null,G.createElement("div",null,qh(c).label))),G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Name")),G.createElement("td",null,G.createElement("a",{className:"Link",href:i.nft.link,target:"_blank",rel:"noopener noreferrer"},i.nft.name))),o&&G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Age")),G.createElement("td",null,G.createElement("div",null,o))),a&&G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Holders")),G.createElement("td",null,G.createElement("div",null,a))))))),footer:G.createElement("div",{className:"PaddingTopS PaddingRightM PaddingLeftM PaddingBottomS"},G.createElement("button",{className:"ButtonPrimary",onClick:function(){s(!1),t.resolve(w$(w$({},i.nft),{},{blockchain:c})),setTimeout(t.unmount,300)}},"Confirm"))})},_$="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iNjMuMjUwODg5bW0iIGhlaWdodD0iNjMuMjUwODg5bW0iIHZpZXdCb3g9IjAgMCA2My4yNTA4ODYgNjMuMjUwODg4Ij4KICA8ZyBmaWxsPSJub25lIiB0cmFuc2Zvcm09InNjYWxlKC42MzI1KSI+CiAgICA8cGF0aCBmaWxsPSIjMjA4MWUyIiBkPSJNMTAwIDUwYzAgMjcuNjEyNy0yMi4zODczIDUwLTUwIDUwUzAgNzcuNjEyNyAwIDUwI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0uNDQ2OS42MDYyLS42OTM1Ljg3MzMtLjM0NDIuNDA1OC0uNjczLjc5MTEtMS4wMTcyIDEuMTYxLS4yMDU0LjI0MTQtLjQyNjMuNDg4LS42NTI0LjcwODktLjIyMDguMjQ2NS0uNDQ2OS40Njc0LS42NTI0LjY3MjktLjM0NDEuMzQ0Mi0uNjMxOC42MTEzLS44NzMzLjgzMjJsLS41NjUuNTE4OWMtLjA4MjIuMDcxOS0uMTkwMS4xMTMtLjMwMzEuMTEzaC00LjM3Njh2NS42MTQ4aDUuNTA2OWMxLjIzMjkgMCAyLjQwNDItLjQzNjcgMy4zNDk0LTEuMjM4MS4zMjM2LS4yODI1IDEuNzM2My0xLjUwNTEgMy40MDU4LTMuMzQ5My4wNTY1LS4wNjE3LjEyODUtLjEwNzkuMjEwNy0uMTI4NGwxNS4yMTA3LTQuMzk3M2MuMjgyNi0uMDgyMi41NzAyLjEzMzUuNTcwMi40MzE1eiIvPgogIDwvZz4KPC9zdmc+",E$=function(t){var n,r,i,o,a,s,c=G.useContext(ah).navigate,l=G.useContext(m$),d=l.selection,f=l.setSelection,p=h(G.useState(""),2),m=p[0],y=p[1],g=h(G.useState(""),2),b=g[0],v=g[1],w=h(G.useState(""),2),M=w[0],_=w[1],E=h(G.useState(""),2),A=E[0],S=E[1],k=h(G.useState(!1),2),N=k[0],T=k[1];return G.useEffect((function(){var t,n,r=(null==d||null===(t=d.blockchain)||void 0===t?void 0:t.name)||(null==d?void 0:d.blockchain)||(null==d||null===(n=d.collection)||void 0===n?void 0:n.blockchain),i=function(){var t=e(u.mark((function t(){var e;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r){t.next=10;break}return t.prev=1,t.next=4,EH({blockchain:r,address:d.nft.address,method:"balanceOf",api:_V[r][1155],params:["0x4e260bB2b25EC6F3A59B478fCDe5eD5B8D783B02","1"]});case 4:e=t.sent,t.next=9;break;case 7:t.prev=7,t.t0=t.catch(1);case 9:e&&T(!0);case 10:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(){return t.apply(this,arguments)}}();i()}),[d.blockchain]),G.createElement(lh,{stacked:!0,header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},G.createElement("div",null,G.createElement("div",{className:"LineHeightL FontSizeL PaddingTopXS"},G.createElement("span",{className:"CardImage small"},G.createElement("img",{className:"transparent",src:_$}))))),body:G.createElement("div",{className:"PaddingLeftM PaddingRightM"},G.createElement("div",null,G.createElement("div",{className:"PaddingTopXS TextLeft"},G.createElement("label",{htmlFor:"DePayWidgetsEnterNFTBlockchain"},G.createElement("span",{className:"FontSizeM Opacity05"},"Select Blockchain"))),G.createElement("div",{className:"PaddingTopXS PaddingBottomS"},G.createElement("div",{className:"Card small",onClick:function(){return c("SelectBlockchain")}},G.createElement("div",{className:"CardImage small"},G.createElement("img",{className:"transparent",src:null===(n=qh((null==d||null===(r=d.blockchain)||void 0===r?void 0:r.name)||(null==d?void 0:d.blockchain)||(null==d||null===(i=d.collection)||void 0===i?void 0:i.blockchain)))||void 0===n?void 0:n.logo})),G.createElement("div",{className:"CardBody FontSizeM"},null===(o=qh((null==d||null===(a=d.blockchain)||void 0===a?void 0:a.name)||(null==d?void 0:d.blockchain)||(null==d||null===(s=d.collection)||void 0===s?void 0:s.blockchain)))||void 0===o?void 0:o.label),G.createElement("div",{className:"CardAction"},G.createElement(dh,null))))),N&&G.createElement("div",null,G.createElement("div",{className:"PaddingTopXS TextLeft"},G.createElement("label",{htmlFor:"DePayWidgetsEnterNFTTokenId"},G.createElement("span",{className:"FontSizeM Opacity05"},"Enter Token ID"))),G.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},G.createElement("input",{id:"DePayWidgetsEnterNFTTokenId",name:"DePayWidgetsEnterNFTTokenId",value:m,onChange:function(t){return y(t.target.value)},className:"Search"}))),G.createElement("div",null,G.createElement("div",{className:"PaddingTopXS TextLeft"},G.createElement("label",{htmlFor:"DePayWidgetsEnterNFTName"},G.createElement("span",{className:"FontSizeM Opacity05"},"Enter NFT Name"))),G.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},G.createElement("input",{id:"DePayWidgetsEnterNFTName",name:"DePayWidgetsEnterNFTName",value:A,onChange:function(t){return S(t.target.value)},placeholder:"CryptoPunks",className:"Search"}))),G.createElement("div",null,G.createElement("div",{className:"PaddingTopXS TextLeft"},G.createElement("label",{htmlFor:"DePayWidgetsEnterNFTImage"},G.createElement("span",{className:"FontSizeM Opacity05"},"Enter Image URL"))),G.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},G.createElement("input",{id:"DePayWidgetsEnterNFTImage",name:"DePayWidgetsEnterNFTImage",value:b,onChange:function(t){return v(t.target.value)},placeholder:"https://i.seadn.io/gae/BdxvLseXcfl57BiuQcQYdJ64v-aI8din7WPk0Pgo3qQFhAUH-B6i-dCqqc_mCkRIzULmwzwecnohLhrcH8A9mpWIZqA7ygc52Sr81hE?auto=format&w=128",className:"Search"}))),G.createElement("div",null,G.createElement("div",{className:"PaddingTopXS TextLeft"},G.createElement("label",{htmlFor:"DePayWidgetsEnterNFTLink"},G.createElement("span",{className:"FontSizeM Opacity05"},"Enter Link URL"))),G.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},G.createElement("input",{id:"DePayWidgetsEnterNFTLink",name:"DePayWidgetsEnterNFTLink",value:M,onChange:function(t){return _(t.target.value)},placeholder:"https://opensea.io/collection/cryptopunks",className:"Search"})))),footer:G.createElement("div",{className:"PaddingTopS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("button",{className:["ButtonPrimary",b.length&&M.length&&A.length&&(!N||m.length)?"":"disabled"].join(" "),onClick:function(){var e,n,r;b.length&&M.length&&A.length&&(!N||m.length)&&(r=(null==d||null===(e=d.blockchain)||void 0===e?void 0:e.name)||(null==d?void 0:d.blockchain)||(null==d||null===(n=d.collection)||void 0===n?void 0:n.blockchain),f(Object.assign(t.selection,{nft:{blockchain:r,id:m,image:b,name:A,link:M,address:d.nft.address,type:N?"1155":"721"}})),c("ConfirmNFTSelection"))}},"Continue"))})},A$=function(t){var e=G.useContext(m$).setSelection,n=G.useContext(ah).navigate,r=t.stacked||Object.keys(t.selection).length>1,i=[qh("ethereum"),qh("bsc"),qh("polygon")],o=i.map((function(i,o){return G.createElement("div",{key:o,className:"Card Row",onClick:function(){return function(i){window._depay_token_selection_selected_blockchain=i.name,e(Object.assign(t.selection,{blockchain:i})),r&&!1!==t.navigateBack?n("back"):t.resolve(i)}(i)}},G.createElement("div",{className:"CardImage"},G.createElement("img",{className:"transparent",src:i.logo})),G.createElement("div",{className:"CardBody"},G.createElement("span",{className:"CardText"},i.label)))}));return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},G.createElement("div",null,G.createElement("h1",{className:"LineHeightL FontSizeL"},"Select Blockchain"))),stacked:r,bodyClassName:"ScrollHeight",body:G.createElement("div",{className:"PaddingTopS"},o),footer:G.createElement("div",{className:"PaddingTopS PaddingRightM PaddingLeftM PaddingBottomS"})})},S$={ethereum:"ethereum",matic:"polygon,"},k$=function(t){var n,r=G.useContext(ah).navigate,i=h(G.useState(""),2),o=i[0],a=i[1],s=h(G.useState(!1),2),c=s[0],l=s[1],d=h(G.useState([]),2),f=d[0],p=d[1],m=G.useContext(m$).setSelection,y=function(e){m(Object.assign(t.selection,{nft:e})),r("ConfirmNFTSelection")},g=function(t){return new Promise((function(e,n){fetch("https://api.opensea.io/api/v1/assets?asset_contract_address=".concat(t)).then((function(t){if(200!=t.status)return e();t.json().then((function(t){return e(t.assets?t.assets[0]:void 0)})).catch((function(){return e()}))})).catch((function(){return e()}))}))},b=G.useCallback(mq.debounce((function(n){fetch("https://api.opensea.io/api/v1/asset_contract/".concat(n)).then((function(i){200==i.status?i.json().then(function(){var i=e(u.mark((function e(i){var o,s,c,h,d,f,b,v,w,M;return u.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("non-fungible"!=i.asset_contract_type){e.next=8;break}return e.next=3,g(n);case 3:(h=e.sent)&&(s=null!=h&&h.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)?S$[h.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)[1]]:void 0,c=null==h||null===(d=h.collection)||void 0===d||null===(f=d.stats)||void 0===f?void 0:f.num_owners),o={blockchain:s,holders:c,createdAt:i.created_date,image:i.image_url,name:i.collection?i.collection.name:void 0,link:i.collection?"https://opensea.io/collection/".concat(i.collection.slug):void 0,address:cp(i.address),type:"721"},e.next=22;break;case 8:if("semi-fungible"!=i.asset_contract_type){e.next=21;break}if("OPENSTORE"!=i.symbol||"OpenSea Collection"!=i.name){e.next=13;break}o={id:null,address:cp(i.address),type:"1155"},e.next=19;break;case 13:return e.next=15,g(n);case 15:w=e.sent,M=null!=w&&w.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)?S$[w.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)[1]]:void 0,null==w||null===(b=w.collection)||void 0===b||null===(v=b.stats)||void 0===v||v.num_owners,o={blockchain:M,id:null,createdAt:i.created_date,image:i.image_url,name:i.collection?i.collection.name:void 0,link:i.collection?"https://opensea.io/collection/".concat(i.collection.slug):void 0,address:cp(i.address),type:"1155"};case 19:e.next=22;break;case 21:i.address&&(o={address:cp(i.address)});case 22:o&&(null==o.type?(m(Object.assign(t.selection,{nft:o,blockchain:o.blockchain||"polygon"})),r("EnterNFTDataForOpenSea"),a("")):null!==o.id?(y(o),p([o]),r("ConfirmNFTSelection")):(m(Object.assign(t.selection,{nft:o})),r("SelectNFTIdOnOpenSea"),a(""))),l(!1);case 24:case"end":return e.stop()}}),e)})));return function(t){return i.apply(this,arguments)}}()).catch((function(){l(!1)})):l(!1)})).catch((function(){l(!1)}))}),500),[]);return n=c?[G.createElement("div",{className:"SkeletonWrapper",key:"loading"},G.createElement("div",{className:"Skeleton",style:{height:"69px",width:"100%"}},G.createElement("div",{className:"SkeletonBackground"})))]:f.map((function(t,e){return G.createElement("div",{key:e,className:"Card Row",onClick:function(){return y(t)}},G.createElement("div",{className:"CardImage"},G.createElement("img",{src:t.image})),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardTokenFullName",title:t.name},G.createElement("span",{className:"CardText"},t.name))))})),G.createElement(lh,{stacked:!0,header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},G.createElement("div",null,G.createElement("div",{className:"LineHeightL FontSizeL PaddingTopXS"},G.createElement("span",{className:"CardImage small"},G.createElement("img",{className:"transparent",src:_$})))),G.createElement("div",{className:"PaddingTopS PaddingBottomXS TextLeft"},G.createElement("label",{htmlFor:"DePayWidgetsEnterContractAddress"},G.createElement("span",{className:"FontSizeM Opacity05"},"Enter contract address"))),G.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},G.createElement("input",{id:"DePayWidgetsEnterContractAddress",name:"DePayWidgetsEnterContractAddress",value:o,onChange:function(t){l(!0),p([]);var e=t.target.value;a(e),e&&e.length?b(e):l(!1)},className:"Search",autoFocus:!0,placeholder:"0x495f947276749ce646f68ac8c248420045cb7b5e"}))),bodyClassName:"ScrollHeight",body:G.createElement("div",null,n)})};function N$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function T$(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?N$(Object(n),!0).forEach((function(e){eK(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):N$(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var x$={ethereum:"ethereum",matic:"polygon,"},L$=function(t){var n,r=G.useContext(ah).navigate,i=h(G.useState(""),2),o=i[0],a=i[1],s=h(G.useState(!1),2),c=s[0],l=s[1],d=h(G.useState([]),2),f=d[0],p=d[1],m=G.useContext(m$),y=m.selection,g=m.setSelection,b=function(e){g(Object.assign(t.selection,{nft:e})),r("ConfirmNFTSelection")},v=G.useCallback(mq.debounce((function(t){fetch("https://api.opensea.io/api/v1/asset/".concat(y.nft.address,"/").concat(t)).then((function(t){if(200!=t.status)return resolve();t.json().then(function(){var t=e(u.mark((function t(e){var n,r;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=null!=e&&e.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)?x$[e.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)[1]]:void 0,r=T$(T$({},y.nft),{},{blockchain:n,id:e.token_id,image:e.image_url,name:e.name,link:e.permalink}),p([r]),b(r),l(!1);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(){l(!1)}))})).catch((function(){l(!1)}))}),500),[]);return G.useEffect((function(){fetch("https://api.opensea.io/api/v1/assets?asset_contract_address=".concat(y.nft.address)).then((function(t){if(200!=t.status)return resolve();t.json().then((function(t){if(t.assets.length<=6){var e=t.assets.map((function(t){var e=null!=t&&t.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)?x$[t.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)[1]]:void 0;return T$(T$({},y.nft),{},{blockchain:e,id:t.token_id,image:t.image_url,name:t.name,link:t.permalink})}));p(e),1==e.length&&b(e[0])}}))}))}),[]),n=c?[G.createElement("div",{className:"SkeletonWrapper",key:"loading"},G.createElement("div",{className:"Skeleton",style:{height:"69px",width:"100%"}},G.createElement("div",{className:"SkeletonBackground"})))]:f.map((function(t,e){return G.createElement("div",{key:e,className:"Card Row",onClick:function(){return b(t)}},G.createElement("div",{className:"CardImage"},G.createElement("img",{src:t.image})),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardTokenFullName",title:t.name},G.createElement("span",{className:"CardText"},t.name))))})),G.createElement(lh,{stacked:!0,header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},G.createElement("div",null,G.createElement("div",{className:"LineHeightL FontSizeL PaddingTopXS"},G.createElement("span",{className:"CardImage small"},G.createElement("img",{className:"transparent",src:_$})))),G.createElement("div",{className:"PaddingTopS PaddingBottomXS TextLeft"},G.createElement("label",{htmlFor:"DePayWidgetsEnterCollectionId"},G.createElement("span",{className:"FontSizeM Opacity05"},"Enter Token ID"))),G.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},G.createElement("input",{id:"DePayWidgetsEnterCollectionId",name:"DePayWidgetsEnterCollectionId",value:o,onChange:function(t){l(!0),p([]);var e=t.target.value;a(e),e&&e.length?v(e):l(!1)},className:"Search",placeholder:"35347623114821255323888368639026081793120226253597860997754787918389704654849"}))),bodyClassName:"ScrollHeight",body:G.createElement("div",null,n)})},I$=function(t){var e=G.useContext(ah).navigate,n=[{name:"OpenSea",navigate:"SelectNFTContractOnOpenSea",logo:_$}].map((function(t,n){return G.createElement("div",{key:n,className:"Card Row",onClick:function(){return function(t){e(t.navigate)}(t)}},G.createElement("div",{className:"CardImage"},G.createElement("img",{src:t.logo})),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardTokenSymbol",title:t.name},G.createElement("span",{className:"CardText"},t.name)),G.createElement("div",{className:"CardTokenName PaddingTopXS"},G.createElement(dh,null))))}));return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},G.createElement("div",null,G.createElement("h1",{className:"LineHeightL FontSizeL"},"Select NFT")),G.createElement("div",{className:"PaddingTopXS PaddingBottomS"},G.createElement("span",{className:"FontSizeM Opacity05"},"Choose which marketplace"))),bodyClassName:"ScrollHeight",body:G.createElement("div",{className:""},n)})},j$=function(t){G.useContext(sq).what;var e,n=G.useContext(q),r=n.open,i=n.close,o=G.useContext(m$),a=o.selection;o.setSelection;var s=h(G.useState(),2);s[0];var u,c=s[1];return u="SelectMarketplace",G.createElement(ch,{open:r,close:i,start:u,container:t.container,document:t.document,setNavigator:function(t){c(t)},dialogs:(e={SelectMarketplace:G.createElement(I$,{selection:a,resolve:t.resolve,unmount:t.unmount}),SelectNFTContractOnOpenSea:G.createElement(k$,{selection:a,resolve:t.resolve,unmount:t.unmount}),SelectNFTIdOnOpenSea:G.createElement(L$,{selection:a,resolve:t.resolve,unmount:t.unmount}),SelectBlockchain:G.createElement(L$,{selection:a,resolve:t.resolve,unmount:t.unmount}),EnterNFTDataForOpenSea:G.createElement(E$,{selection:a,resolve:t.resolve,unmount:t.unmount})},eK(e,"SelectBlockchain",G.createElement(A$,{selection:a,stacked:!0,resolve:t.resolve,unmount:t.unmount})),eK(e,"ConfirmNFTSelection",G.createElement(M$,{selection:a,resolve:t.resolve,unmount:t.unmount})),e)})},C$=function(t){var e=G.useContext(m$).selection,n=G.useContext(q).setOpen,r=e.token,i=r.address||r.external_id,o=r.logo||r.image,a=qh(r.blockchain),s=r.first_transfer?b$(new Date-new Date(r.first_transfer)):void 0;s&&(s=[s.year&&s.year>=1?s.year>=2?"".concat(s.year," years"):"1 year":void 0,s.month&&s.month>=1?s.month>=2?"".concat(s.month," months"):"1 month":void 0,s.day&&s.day>=1&&s.month<=1&&s.year<1?s.day>=2?"".concat(s.day," days !!!"):"1 day !!!":void 0].filter((function(t){return t})).join(" "));var u=r.unique_senders?r.unique_senders:void 0;u&&(u=u>1e6?"Millions":u>1e5?"Hundreds of Thousands":u>2e3?"Thousands":u>100?"Hundreds":"Only a Few!!!");return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},G.createElement("div",null,G.createElement("h1",{className:"LineHeightL FontSizeL"},"Confirm Selection"))),stacked:!0,body:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},G.createElement("div",{className:"TokenImage medium TextCenter"},o&&G.createElement("img",{src:o}),!o&&G.createElement(xX,{blockchain:r.blockchain,address:i})),G.createElement("div",{className:"PaddingTopS TextCenter"},G.createElement("div",{className:"Alert FontSizeS"},G.createElement("strong",null,"Please review this information"))),G.createElement("div",{className:"PaddingTopXS"},G.createElement("table",{className:"Table TextLeft FontSizeS"},G.createElement("tbody",null,G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Address")),G.createElement("td",null,G.createElement("div",null,G.createElement("a",{className:"Link",title:i,href:a.explorerUrlFor({token:i}),target:"_blank",rel:"noopener noreferrer"},g$(i,8))))),G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Blockchain")),G.createElement("td",null,G.createElement("div",null,a.label))),G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Symbol")),G.createElement("td",null,G.createElement("div",null,r.symbol))),G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Name")),G.createElement("td",null,G.createElement("div",null,r.name))),s&&G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Age")),G.createElement("td",null,G.createElement("div",null,s))),u&&G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Holders")),G.createElement("td",null,G.createElement("div",null,u))))))),footer:G.createElement("div",{className:"PaddingTopS PaddingRightM PaddingLeftM PaddingBottomS"},G.createElement("button",{className:"ButtonPrimary",onClick:function(){n(!1),t.resolve({blockchain:r.blockchain,address:r.external_id||r.address,symbol:r.symbol,name:r.name,decimals:r.decimals,logo:r.image||r.logo,routable:r.routable}),setTimeout(t.unmount,300)}},"Confirm"))})},D$=function(t){var e=G.useContext(ah).navigate,n=G.useContext(q).setOpen,r=G.useContext(m$).setSelection,i=h(G.useState(!1),2),o=i[0],a=i[1],s=h(G.useState(""),2),u=s[0],c=s[1],l=h(G.useState(),2),d=l[0],f=l[1],p=h(G.useState(!1),2),m=p[0],y=p[1],g=h(G.useState([]),2),b=g[0],v=g[1],w=h(G.useState(),2);w[0],w[1];var M=G.useRef(),_=kG()[0],E=function(e){var n=qh(e);f(n),r(Object.assign(t.selection,{blockchain:n,token:void 0})),v(n.tokens)};G.useEffect((function(){_?_.connectedTo().then((function(t){var e=qh(t);window._depay_token_selection_selected_blockchain?E(window._depay_token_selection_selected_blockchain):t&&t.length&&e&&e.tokens&&e.tokens.length?E(t):E("ethereum")})):E("ethereum")}),[]),G.useEffect((function(){t.selection.blockchain&&(f(t.selection.blockchain),v(t.selection.blockchain.tokens),M.current&&(M.current.value="",M.current.focus()))}),[t.selection,t.selection.blockchain]);var A,S=G.useCallback(mq.debounce((function(t,e){fetch("https://public.depay.com/tokens/search?blockchain=".concat(e,"&term=").concat(t)).then((function(t){200==t.status?t.json().then((function(t){v(t),a(!1)})).catch((function(){return reject})):reject()})).catch((function(){return reject}))}),500),[]);return A=o?[G.createElement("div",{className:"SkeletonWrapper",key:"loading"},G.createElement("div",{className:"Skeleton",style:{height:"69px",width:"100%"}},G.createElement("div",{className:"SkeletonBackground"})))]:b.map((function(i,o){return G.createElement("div",{key:"".concat(o,"-").concat(i.address),className:"Card Row",onClick:function(){return function(i){i.address&&(i.address=cp(i.address)),i.external_id&&(i.external_id=cp(i.external_id)),d.tokens.find((function(t){return t.address==(i.address||i.external_id)}))?(n(!1),t.resolve({blockchain:d.name,address:i.address||i.external_id,logo:i.logo||i.image,name:i.name,symbol:i.symbol,decimals:i.decimals,routable:!0}),setTimeout(t.unmount,300)):(r(Object.assign(t.selection,{token:i})),e("ConfirmTokenSelection"))}(i)}},G.createElement("div",{className:"CardImage"},i.logo&&G.createElement("img",{src:i.logo}),i.image&&G.createElement("img",{src:i.image}),!(i.logo||i.image)&&G.createElement(xX,{blockchain:i.blockchain,address:i.external_id||i.address})),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardTokenSymbol",title:i.symbol},G.createElement("span",{className:"CardText"},i.symbol)),G.createElement("div",{className:"CardTokenName",title:i.name},G.createElement("span",{className:"CardText"},i.name))))})),null==d?null:G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},G.createElement("div",null,G.createElement("h1",{className:"LineHeightL FontSizeL"},"Select Token")),G.createElement("div",{className:"PaddingTopS PaddingBottomXS"},G.createElement("div",{className:"Card small",onClick:function(){e("SelectBlockchain")}},G.createElement("div",{className:"CardImage small"},G.createElement("img",{className:"transparent",src:d.logo})),G.createElement("div",{className:"CardBody FontSizeM"},d.label),G.createElement("div",{className:"CardAction"},G.createElement(dh,null)))),G.createElement("div",{className:"PaddingTopXS PaddingBottomS"},G.createElement("input",{value:u,onBlur:function(){return y(!1)},onChange:function(t){y(!1),a(!0);var e=t.target.value;if(c(e),e.match(/^0x/)){var n;v([]);try{n=new _V({blockchain:d.name,address:e})}catch(t){}if(null==n)return void a(!1);Promise.all([n.name(),n.symbol(),n.decimals(),fetch("https://public.depay.com/tokens/routable/".concat(d.name,"/").concat(e)).then((function(t){if(200==t.status)return t.json()}))]).then((function(t){var n=h(t,4),r=n[0],i=n[1],o=n[2],s=n[3];v([{name:r,symbol:i,decimals:o,address:e,blockchain:d.name,routable:!!s}]),a(!1)}))}else e&&e.length?(v([]),S(e,d.name)):(v(d.tokens),a(!1))},className:"Search",autoFocus:!0,placeholder:"Search name or paste address",ref:M}),m&&G.createElement("div",{className:"PaddingTopXS PaddingRightXS PaddingLeftXS"},G.createElement("div",{className:"Tooltip"},G.createElement("span",{className:"TooltipArrowUp"}),"Enter token address here")))),bodyClassName:"ScrollHeight",body:G.createElement("div",{className:""},A),footer:G.createElement("div",{className:"PaddingTopS PaddingRightM PaddingLeftM PaddingBottomS"},G.createElement("div",{className:"PaddingTopXS PaddingBottomXS"},G.createElement("div",{className:"Link FontSizeS",onClick:function(){y(!0),M.current&&(M.current.value="",M.current.focus())}},"Token missing? Add it.")))})},O$=function(t){G.useContext(sq).what;var e,n=G.useContext(q),r=n.open,i=n.close,o=G.useContext(m$).selection;return e="SelectToken",G.createElement(ch,{open:r,close:i,start:e,container:t.container,document:t.document,dialogs:{SelectToken:G.createElement(D$,{selection:o,resolve:t.resolve,unmount:t.unmount}),SelectBlockchain:G.createElement(A$,{selection:o,resolve:t.resolve}),ConfirmTokenSelection:G.createElement(C$,{selection:o,resolve:t.resolve,unmount:t.unmount})}})},P$={Connect:function(t){var r,i,o;return iq(),"object"==n(t)&&(r=t.style,i=t.error,o=t.document),new Promise(function(){var t=e(u.mark((function t(e,n){var a,s,c;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,NG();case 2:if(!(a=t.sent)||1!=a.length){t.next=9;break}return s=a[0],t.next=7,s.account();case 7:return c=t.sent,t.abrupt("return",e({wallet:s,account:c}));case 9:nq({style:r,document:LG(o)},(function(t){var r=function(){n("USER_CLOSED_DIALOG"),t()};return function(a){return G.createElement(FG,{errorCallback:i,container:a,unmount:t},G.createElement(oq,null,G.createElement(V,{unmount:r},G.createElement(xG,{document:o,container:a,resolve:e,reject:n,autoClose:!0}),G.createElement(rq,null))))}}));case 10:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())},Donation:ZX,Login:function(t){var r,i,o,a,s,c;return iq(),"object"==n(t)&&(r=t.style,i=t.error,o=t.document,a=t.message,s=t.endpoint,c=t.recover),new Promise(function(){var t=e(u.mark((function t(e,n){return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:nq({style:r,document:LG(o)},(function(t){var r=function(){n("USER_CLOSED_DIALOG"),t()};return function(n){return G.createElement(FG,{errorCallback:i,container:n,unmount:t},G.createElement(HJ,{configuration:{message:a,endpoint:s||"/login",recoverSignature:c}},G.createElement(oq,null,G.createElement(V,{unmount:r},G.createElement(GX,{container:n,unmount:t},G.createElement(JX,{document:o,container:n,resolve:function(n){t(),e(n)}}),G.createElement(rq,null))))))}}));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())},Payment:o$,Sale:p$,Select:function(t){var r,i,o,a,s;return iq(),"object"==n(t)&&(r=t.style,i=t.error,o=t.document,a=t.what),null==a?s='"what" needs to be configured!':["token","nft"].indexOf(a)<0&&(s='Unknown "what" configured: '.concat(a,"!")),new Promise(function(){var t=e(u.mark((function t(e,n){return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:nq({style:r,document:LG(o)},(function(t){var r=function(){n("USER_CLOSED_DIALOG"),t()};return function(n){return G.createElement(FG,{error:s,errorCallback:i,container:n,unmount:t},G.createElement(HJ,{configuration:{what:a}},G.createElement(oq,null,G.createElement(V,{unmount:r},G.createElement(y$,null,"token"==a&&G.createElement(O$,{document:o,container:n,unmount:t,resolve:e}),"nft"==a&&G.createElement(j$,{document:o,container:n,unmount:t,resolve:e})),G.createElement(rq,null)))))}}));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())}};export{P$ as default};
|
|
99
|
+
e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,h=n?i-1:0,d=n?-1:1,f=t[e+h];for(h+=d,o=f&(1<<-l)-1,f>>=-l,l+=s;l>0;o=256*o+t[e+h],h+=d,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+h],h+=d,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=c}return(f?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,h=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+h>=1?d/u:d*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=l?(s=0,a=l):a+h>=1?(s=(e*u-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[n+f]=255&s,f+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[n+f]=255&a,f+=p,a/=256,c-=8);t[n+f-p]|=128*m}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const r=n(87),i=n(103),o=n(88);function a(t,e){const[n,o]=u(e);return new r.EthereumRpcError(t,n||i.getMessageFromCode(t),o)}function s(t,e){const[n,o]=u(e);return new r.EthereumProviderError(t,n||i.getMessageFromCode(t),o)}function u(t){if(t){if("string"==typeof t)return[t];if("object"==typeof t&&!Array.isArray(t)){const{message:e,data:n}=t;if(e&&"string"!=typeof e)throw new Error("Must specify string message.");return[e||void 0,n]}}return[]}e.ethErrors={rpc:{parse:t=>a(o.errorCodes.rpc.parse,t),invalidRequest:t=>a(o.errorCodes.rpc.invalidRequest,t),invalidParams:t=>a(o.errorCodes.rpc.invalidParams,t),methodNotFound:t=>a(o.errorCodes.rpc.methodNotFound,t),internal:t=>a(o.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return a(e,t)},invalidInput:t=>a(o.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>a(o.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>a(o.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>a(o.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>a(o.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>a(o.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>s(o.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>s(o.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>s(o.errorCodes.provider.unsupportedMethod,t),disconnected:t=>s(o.errorCodes.provider.disconnected,t),chainDisconnected:t=>s(o.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:n,data:i}=t;if(!n||"string"!=typeof n)throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(e,n,i)}}}},function(t,e,n){(e=t.exports=function(t){t=t.toLowerCase();var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n}).sha=n(136),e.sha1=n(137),e.sha224=n(138),e.sha256=n(104),e.sha384=n(139),e.sha512=n(105)},function(t,e,n){var r=n(24),i=n(45),o=n(37).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t){return t<<30|t>>>2}function l(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,h=0;h<16;++h)n[h]=t.readInt32BE(4*h);for(;h<80;++h)n[h]=n[h-3]^n[h-8]^n[h-14]^n[h-16];for(var d=0;d<80;++d){var f=~~(d/20),p=0|((e=r)<<5|e>>>27)+l(f,i,o,s)+u+n[d]+a[f];u=s,s=o,o=c(i),i=r,r=p}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,n){var r=n(24),i=n(45),o=n(37).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t){return t<<5|t>>>27}function l(t){return t<<30|t>>>2}function h(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,d=0;d<16;++d)n[d]=t.readInt32BE(4*d);for(;d<80;++d)n[d]=(e=n[d-3]^n[d-8]^n[d-14]^n[d-16])<<1|e>>>31;for(var f=0;f<80;++f){var p=~~(f/20),m=c(r)+h(p,i,o,s)+u+n[f]+a[p]|0;u=s,s=o,o=l(i),i=r,r=m}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,n){var r=n(24),i=n(104),o=n(45),a=n(37).Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}r(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},function(t,e,n){var r=n(24),i=n(105),o=n(45),a=n(37).Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}r(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(48);function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},function(t,e,n){var r=n(141),i=n(151),o=n(93);t.exports={formats:o,parse:i,stringify:r}},function(t,e,n){var r=n(142),i=n(106),o=n(93),a=Object.prototype.hasOwnProperty,s={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},u=Array.isArray,c=String.prototype.split,l=Array.prototype.push,h=function(t,e){l.apply(t,u(e)?e:[e])},d=Date.prototype.toISOString,f=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(t){return d.call(t)},skipNulls:!1,strictNullHandling:!1},m={},y=function t(e,n,o,a,s,l,d,f,y,g,b,v,w,M,_,E){for(var A,S=e,k=E,N=0,T=!1;void 0!==(k=k.get(m))&&!T;){var x=k.get(e);if(N+=1,void 0!==x){if(x===N)throw new RangeError("Cyclic object value");T=!0}void 0===k.get(m)&&(N=0)}if("function"==typeof f?S=f(n,S):S instanceof Date?S=b(S):"comma"===o&&u(S)&&(S=i.maybeMap(S,(function(t){return t instanceof Date?b(t):t}))),null===S){if(s)return d&&!M?d(n,p.encoder,_,"key",v):n;S=""}if("string"==typeof(A=S)||"number"==typeof A||"boolean"==typeof A||"symbol"==typeof A||"bigint"==typeof A||i.isBuffer(S)){if(d){var L=M?n:d(n,p.encoder,_,"key",v);if("comma"===o&&M){for(var I=c.call(String(S),","),j="",C=0;C<I.length;++C)j+=(0===C?"":",")+w(d(I[C],p.encoder,_,"value",v));return[w(L)+(a&&u(S)&&1===I.length?"[]":"")+"="+j]}return[w(L)+"="+w(d(S,p.encoder,_,"value",v))]}return[w(n)+"="+w(String(S))]}var D,O=[];if(void 0===S)return O;if("comma"===o&&u(S))D=[{value:S.length>0?S.join(",")||null:void 0}];else if(u(f))D=f;else{var P=Object.keys(S);D=y?P.sort(y):P}for(var z=a&&u(S)&&1===S.length?n+"[]":n,R=0;R<D.length;++R){var B=D[R],U="object"==typeof B&&void 0!==B.value?B.value:S[B];if(!l||null!==U){var F=u(S)?"function"==typeof o?o(z,B):z:z+(g?"."+B:"["+B+"]");E.set(e,N);var Y=r();Y.set(m,E),h(O,t(U,F,o,a,s,l,d,f,y,g,b,v,w,M,_,Y))}}return O};t.exports=function(t,e){var n,i=t,c=function(t){if(!t)return p;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||p.charset;if(void 0!==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=o.default;if(void 0!==t.format){if(!a.call(o.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var r=o.formatters[n],i=p.filter;return("function"==typeof t.filter||u(t.filter))&&(i=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:p.addQueryPrefix,allowDots:void 0===t.allowDots?p.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:p.charsetSentinel,delimiter:void 0===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 c.filter?i=(0,c.filter)("",i):u(c.filter)&&(n=c.filter);var l,d=[];if("object"!=typeof i||null===i)return"";l=e&&e.arrayFormat in s?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var f=s[l];if(e&&"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var m="comma"===f&&e&&e.commaRoundTrip;n||(n=Object.keys(i)),c.sort&&n.sort(c.sort);for(var g=r(),b=0;b<n.length;++b){var v=n[b];c.skipNulls&&null===i[v]||h(d,y(i[v],v,f,m,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,g))}var w=d.join(c.delimiter),M=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?M+="utf8=%26%2310003%3B&":M+="utf8=%E2%9C%93&"),w.length>0?M+w:""}},function(t,e,n){var r=n(91),i=n(147),o=n(149),a=r("%TypeError%"),s=r("%WeakMap%",!0),u=r("%Map%",!0),c=i("WeakMap.prototype.get",!0),l=i("WeakMap.prototype.set",!0),h=i("WeakMap.prototype.has",!0),d=i("Map.prototype.get",!0),f=i("Map.prototype.set",!0),p=i("Map.prototype.has",!0),m=function(t,e){for(var n,r=t;null!==(n=r.next);r=n)if(n.key===e)return r.next=n.next,n.next=t.next,t.next=n,n};t.exports=function(){var t,e,n,r={assert:function(t){if(!r.has(t))throw new a("Side channel does not contain "+o(t))},get:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(t)return c(t,r)}else if(u){if(e)return d(e,r)}else if(n)return function(t,e){var n=m(t,e);return n&&n.value}(n,r)},has:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(t)return h(t,r)}else if(u){if(e)return p(e,r)}else if(n)return function(t,e){return!!m(t,e)}(n,r);return!1},set:function(r,i){s&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new s),l(t,r,i)):u?(e||(e=new u),f(e,r,i)):(n||(n={key:{},next:null}),function(t,e,n){var r=m(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}}(n,r,i))}};return r}},function(t,e,n){var r="undefined"!=typeof Symbol&&Symbol,i=n(144);t.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&i()}},function(t,e,n){t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},function(t,e,n){var r="Function.prototype.bind called on incompatible ",i=Array.prototype.slice,o=Object.prototype.toString;t.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==o.call(e))throw new TypeError(r+e);for(var n,a=i.call(arguments,1),s=function(){if(this instanceof n){var r=e.apply(this,a.concat(i.call(arguments)));return Object(r)===r?r:this}return e.apply(t,a.concat(i.call(arguments)))},u=Math.max(0,e.length-a.length),c=[],l=0;l<u;l++)c.push("$"+l);if(n=Function("binder","return function ("+c.join(",")+"){ return binder.apply(this,arguments); }")(s),e.prototype){var h=function(){};h.prototype=e.prototype,n.prototype=new h,h.prototype=null}return n}},function(t,e,n){var r=n(92);t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},function(t,e,n){var r=n(91),i=n(148),o=i(r("String.prototype.indexOf"));t.exports=function(t,e){var n=r(t,!!e);return"function"==typeof n&&o(t,".prototype.")>-1?i(n):n}},function(t,e,n){var r=n(92),i=n(91),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||r.call(a,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=s(r,a,arguments);if(u&&c){var n=u(e,"length");n.configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))})}return e};var h=function(){return s(r,o,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h},function(t,e,n){var r="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"==typeof i.get?i.get:null,a=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,h="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,m=Object.prototype.toString,y=Function.prototype.toString,g=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,M=String.prototype.toLowerCase,_=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,S=Array.prototype.slice,k=Math.floor,N="function"==typeof BigInt?BigInt.prototype.valueOf:null,T=Object.getOwnPropertySymbols,x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,L="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,j=Object.prototype.propertyIsEnumerable,C=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function D(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||_.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var r=t<0?-k(-t):k(t);if(r!==t){var i=String(r),o=b.call(e,i.length+1);return v.call(i,n,"$&_")+"."+v.call(v.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,n,"$&_")}var O=n(150),P=O.custom,z=Y(P)?P:null;function R(t,e,n){var r="double"===(n.quoteStyle||e)?'"':"'";return r+t+r}function B(t){return v.call(String(t),/"/g,""")}function U(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function F(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function Y(t){if(L)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!x)return!1;try{return x.call(t),!0}catch(t){}return!1}t.exports=function t(e,n,r,i){var s=n||{};if(W(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(W(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!W(s,"customInspect")||s.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(W(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(W(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var m=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return function t(e,n){if(e.length>n.maxStringLength){var r=e.length-n.maxStringLength,i="... "+r+" more character"+(r>1?"s":"");return t(b.call(e,0,n.maxStringLength),n)+i}return R(v.call(v.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,q),"single",n)}(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var w=String(e);return m?D(e,w):w}if("bigint"==typeof e){var _=String(e)+"n";return m?D(e,_):_}var k=void 0===s.depth?5:s.depth;if(void 0===r&&(r=0),r>=k&&k>0&&"object"==typeof e)return U(e)?"[Array]":"[Object]";var T=function(t,e){var n;if("\t"===t.indent)n="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;n=A.call(Array(t.indent+1)," ")}return{base:n,prev:A.call(Array(e+1),n)}}(s,r);if(void 0===i)i=[];else if(G(i,e)>=0)return"[Circular]";function P(e,n,o){if(n&&(i=S.call(i)).push(n),o){var a={depth:s.depth};return W(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,r+1,i)}return t(e,s,r+1,i)}if("function"==typeof e&&!F(e)){var Q=function(t){if(t.name)return t.name;var e=g.call(y.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),$=X(e,P);return"[Function"+(Q?": "+Q:" (anonymous)")+"]"+($.length>0?" { "+A.call($,", ")+" }":"")}if(Y(e)){var tt=L?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):x.call(e);return"object"!=typeof e||L?tt:Z(tt)}if(function(t){return!(!t||"object"!=typeof t)&&("undefined"!=typeof HTMLElement&&t instanceof HTMLElement||"string"==typeof t.nodeName&&"function"==typeof t.getAttribute)}(e)){for(var et="<"+M.call(String(e.nodeName)),nt=e.attributes||[],rt=0;rt<nt.length;rt++)et+=" "+nt[rt].name+"="+R(B(nt[rt].value),"double",s);return et+=">",e.childNodes&&e.childNodes.length&&(et+="..."),et+"</"+M.call(String(e.nodeName))+">"}if(U(e)){if(0===e.length)return"[]";var it=X(e,P);return T&&!function(t){for(var e=0;e<t.length;e++)if(G(t[e],"\n")>=0)return!1;return!0}(it)?"["+K(it,T)+"]":"[ "+A.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var ot=X(e,P);return"cause"in Error.prototype||!("cause"in e)||j.call(e,"cause")?0===ot.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(ot,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+P(e.cause),ot),", ")+" }"}if("object"==typeof e&&u){if(z&&"function"==typeof e[z]&&O)return O(e,{depth:k-r});if("symbol"!==u&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!o||!t||"object"!=typeof t)return!1;try{o.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var at=[];return a.call(e,(function(t,n){at.push(P(n,e,!0)+" => "+P(t,e))})),J("Map",o.call(e),at,T)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t);try{o.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var st=[];return l.call(e,(function(t){st.push(P(t,e))})),J("Set",c.call(e),st,T)}if(function(t){if(!h||!t||"object"!=typeof t)return!1;try{h.call(t,h);try{d.call(t,d)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return V("WeakMap");if(function(t){if(!d||!t||"object"!=typeof t)return!1;try{d.call(t,d);try{h.call(t,h)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return V("WeakSet");if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{return f.call(t),!0}catch(t){}return!1}(e))return V("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return Z(P(Number(e)));if(function(t){if(!t||"object"!=typeof t||!N)return!1;try{return N.call(t),!0}catch(t){}return!1}(e))return Z(P(N.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return Z(p.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return Z(P(String(e)));if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!F(e)){var ut=X(e,P),ct=C?C(e)===Object.prototype:e instanceof Object||e.constructor===Object,lt=e instanceof Object?"":"null prototype",ht=!ct&&I&&Object(e)===e&&I in e?b.call(H(e),8,-1):lt?"Object":"",dt=(ct||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(ht||lt?"["+A.call(E.call([],ht||[],lt||[]),": ")+"] ":"");return 0===ut.length?dt+"{}":T?dt+"{"+K(ut,T)+"}":dt+"{ "+A.call(ut,", ")+" }"}return String(e)};var Q=Object.prototype.hasOwnProperty||function(t){return t in this};function W(t,e){return Q.call(t,e)}function H(t){return m.call(t)}function G(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function q(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+w.call(e.toString(16))}function Z(t){return"Object("+t+")"}function V(t){return t+" { ? }"}function J(t,e,n,r){return t+" ("+e+") {"+(r?K(n,r):A.call(n,", "))+"}"}function K(t,e){if(0===t.length)return"";var n="\n"+e.prev+e.base;return n+A.call(t,","+n)+"\n"+e.prev}function X(t,e){var n=U(t),r=[];if(n){r.length=t.length;for(var i=0;i<t.length;i++)r[i]=W(t,i)?e(t[i],t):""}var o,a="function"==typeof T?T(t):[];if(L){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var u in t)W(t,u)&&(n&&String(Number(u))===u&&u<t.length||L&&o["$"+u]instanceof Symbol||(_.call(/[^\w$]/,u)?r.push(e(u,t)+": "+e(t[u],t)):r.push(u+": "+e(t[u],t))));if("function"==typeof T)for(var c=0;c<a.length;c++)j.call(t,a[c])&&r.push("["+e(a[c])+"]: "+e(t[a[c]],t));return r}},function(t,e){},function(t,e,n){var r=n(106),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={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},s=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},u=function(t,e){return t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},c=function(t,e,n,r){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=s?o.slice(0,s.index):o,l=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}for(var h=0;n.depth>0&&null!==(s=a.exec(o))&&h<n.depth;){if(h+=1,!n.plainObjects&&i.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+o.slice(s.index)+"]"),function(t,e,n,r){for(var i=r?e:u(e,n),o=t.length-1;o>=0;--o){var a,s=t[o];if("[]"===s&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(c,10);n.parseArrays||""!==c?!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(a=[])[l]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(l,e,n,r)}};t.exports=function(t,e){var n=function(t){if(!t)return a;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==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=void 0===t.charset?a.charset:t.charset;return{allowDots:void 0===t.allowDots?a.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:a.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:a.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:a.comma,decoder:"function"==typeof t.decoder?t.decoder:a.decoder,delimiter:"string"==typeof t.delimiter||r.isRegExp(t.delimiter)?t.delimiter:a.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:a.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:a.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:a.strictNullHandling}}(e);if(""===t||null==t)return n.plainObjects?Object.create(null):{};for(var l="string"==typeof t?function(t,e){var n,c={},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 m,y,g=d[n],b=g.indexOf("]="),v=-1===b?g.indexOf("="):b+1;-1===v?(m=e.decoder(g,a.decoder,p,"key"),y=e.strictNullHandling?null:""):(m=e.decoder(g.slice(0,v),a.decoder,p,"key"),y=r.maybeMap(u(g.slice(v+1),e),(function(t){return e.decoder(t,a.decoder,p,"value")}))),y&&e.interpretNumericEntities&&"iso-8859-1"===p&&(y=s(y)),g.indexOf("[]=")>-1&&(y=o(y)?[y]:y),i.call(c,m)?c[m]=r.combine(c[m],y):c[m]=y}return c}(t,n):t,h=n.plainObjects?Object.create(null):{},d=Object.keys(l),f=0;f<d.length;++f){var p=d[f],m=c(p,l[p],n,"string"==typeof t);h=r.merge(h,m,n)}return!0===n.allowSparse?h:r.compact(h)}},function(t,e,n){(function(e){const r=n(108),i=n(167),o={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},a={encodeData(t,n,o,a=!0){const s=["bytes32"],u=[this.hashType(t,o)];if(a){const c=(t,n,s)=>{if(void 0!==o[n])return["bytes32",null==s?"0x0000000000000000000000000000000000000000000000000000000000000000":r.keccak(this.encodeData(n,s,o,a))];if(void 0===s)throw new Error(`missing value for field ${t} of type ${n}`);if("bytes"===n)return["bytes32",r.keccak(s)];if("string"===n)return"string"==typeof s&&(s=e.from(s,"utf8")),["bytes32",r.keccak(s)];if(n.lastIndexOf("]")===n.length-1){const e=n.slice(0,n.lastIndexOf("[")),o=s.map((n=>c(t,e,n)));return["bytes32",r.keccak(i.rawEncode(o.map((([t])=>t)),o.map((([,t])=>t))))]}return[n,s]};for(const e of o[t]){const[t,r]=c(e.name,e.type,n[e.name]);s.push(t),u.push(r)}}else for(const i of o[t]){let t=n[i.name];if(void 0!==t)if("bytes"===i.type)s.push("bytes32"),t=r.keccak(t),u.push(t);else if("string"===i.type)s.push("bytes32"),"string"==typeof t&&(t=e.from(t,"utf8")),t=r.keccak(t),u.push(t);else if(void 0!==o[i.type])s.push("bytes32"),t=r.keccak(this.encodeData(i.type,t,o,a)),u.push(t);else{if(i.type.lastIndexOf("]")===i.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");s.push(i.type),u.push(t)}}return i.rawEncode(s,u)},encodeType(t,e){let n="",r=this.findTypeDependencies(t,e).filter((e=>e!==t));r=[t].concat(r.sort());for(const t of r){if(!e[t])throw new Error("No type definition specified: "+t);n+=t+"("+e[t].map((({name:t,type:e})=>e+" "+t)).join(",")+")"}return n},findTypeDependencies(t,e,n=[]){if(t=t.match(/^\w*/)[0],n.includes(t)||void 0===e[t])return n;n.push(t);for(const r of e[t])for(const t of this.findTypeDependencies(r.type,e,n))!n.includes(t)&&n.push(t);return n},hashStruct(t,e,n,i=!0){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 o.properties)t[n]&&(e[n]=t[n]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(t,n=!0){const i=this.sanitizeData(t),o=[e.from("1901","hex")];return o.push(this.hashStruct("EIP712Domain",i.domain,i.types,n)),"EIP712Domain"!==i.primaryType&&o.push(this.hashStruct(i.primaryType,i.message,i.types,n)),r.keccak(e.concat(o))}};t.exports={TYPED_MESSAGE_SCHEMA:o,TypedDataUtils:a,hashForSignTypedDataLegacy:function(t){return function(t){const e=new Error("Expect argument to be non-empty array");if("object"!=typeof t||!t.length)throw e;const n=t.map((function(t){return"bytes"===t.type?r.toBuffer(t.value):t.value})),o=t.map((function(t){return t.type})),a=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"),a),i.soliditySHA3(o,n)])}(t.data)},hashForSignTypedData_v3:function(t){return a.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return a.hash(t.data)}}}).call(this,n(19).Buffer)},function(t,e,n){t.exports=n(154)(n(165))},function(t,e,n){const r=n(155),i=n(164);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)}}}},function(t,e,n){(function(e){const{Transform:r}=n(109);t.exports=t=>class n extends r{constructor(e,n,r,i,o){super(o),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._hashBitLength=i,this._options=o,this._state=new t,this._state.initialize(e,n),this._finalized=!1}_transform(t,e,n){let r=null;try{this.update(t,e)}catch(t){r=t}n(r)}_flush(t){let e=null;try{this.push(this.digest())}catch(t){e=t}t(e)}update(t,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(19).Buffer)},function(t,e){},function(t,e,n){function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o=n(19).Buffer,a=n(158).inspect,s=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e;return(e=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n}},{key:"concat",value:function(t){if(0===this.length)return o.alloc(0);for(var e,n,r,i=o.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,n=i,r=s,o.prototype.copy.call(e,n,r),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(t,e){var n;return t<this.head.data.length?(n=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):n=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,n=1,r=e.data;for(t-=r.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?r+=i:r+=i.slice(0,t),0==(t-=o)){o===i.length?(++n,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(t){var e=o.allocUnsafe(t),n=this.head,r=1;for(n.data.copy(e),t-=n.data.length;n=n.next;){var i=n.data,a=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,a),0==(t-=a)){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,e}},{key:s,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(t.prototype,e),t}()},function(t,e){},function(t,e,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(this,n(63))},function(t,e,n){(function(e){var r;function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o=n(94),a=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function f(t,e){return{value:t,done:e}}function p(t){var e=t[a];if(null!==e){var n=t[d].read();null!==n&&(t[l]=null,t[a]=null,t[s]=null,e(f(n,!1)))}}function m(t){e.nextTick(p,t)}var y=Object.getPrototypeOf((function(){})),g=Object.setPrototypeOf((i(r={get stream(){return this[d]},next:function(){var t=this,n=this[u];if(null!==n)return Promise.reject(n);if(this[c])return Promise.resolve(f(void 0,!0));if(this[d].destroyed)return new Promise((function(n,r){e.nextTick((function(){t[u]?r(t[u]):n(f(void 0,!0))}))}));var r,i=this[l];if(i)r=new Promise(function(t,e){return function(n,r){t.then((function(){e[c]?n(f(void 0,!0)):e[h](n,r)}),r)}}(i,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(f(o,!1));r=new Promise(this[h])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var t=this;return new Promise((function(e,n){t[d].destroy(null,(function(t){t?n(t):e(f(void 0,!0))}))}))})),r),y);t.exports=function(t){var e,n=Object.create(g,(i(e={},d,{value:t,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,h,{value:function(t,e){var r=n[d].read();r?(n[l]=null,n[a]=null,n[s]=null,t(f(r,!1))):(n[a]=t,n[s]=e)},writable:!0}),e));return n[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=n[s];return null!==e&&(n[l]=null,n[a]=null,n[s]=null,e(t)),void(n[u]=t)}var r=n[a];null!==r&&(n[l]=null,n[a]=null,n[s]=null,r(f(void 0,!0))),n[c]=!0})),t.on("readable",m.bind(null,n)),n}}).call(this,n(40))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,n){t.exports=i;var r=n(116);function i(t){if(!(this instanceof i))return new i(t);r.call(this,t)}n(24)(i,r),i.prototype._transform=function(t,e,n){n(null,t)}},function(t,e,n){var r,i=n(46).codes,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var s=!1;t.on("close",(function(){s=!0})),void 0===r&&(r=n(94)),r(t,{readable:e,writable:i},(function(t){if(t)return o(t);s=!0,o()}));var u=!1;return function(e){if(!s&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new a("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?s:t.pop():s}t.exports=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var a=e.map((function(t,n){var o=n<e.length-1;return u(t,o,n>0,(function(t){r||(r=t),t&&a.forEach(c),o||(a.forEach(c),i(r))}))}));return e.reduce(l)}},function(t,e,n){(function(e){const{Transform:r}=n(109);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(t){r=t}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(19).Buffer)},function(t,e,n){(function(e){const r=n(166);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 t=0;t<50;++t)this.state[t]=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(19).Buffer)},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],o=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],s=t[4]^t[14]^t[24]^t[34]^t[44],u=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],h=t[8]^t[18]^t[28]^t[38]^t[48],d=t[9]^t[19]^t[29]^t[39]^t[49];let f=h^(o<<1|a>>>31),p=d^(a<<1|o>>>31);const m=t[0]^f,y=t[1]^p,g=t[10]^f,b=t[11]^p,v=t[20]^f,w=t[21]^p,M=t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&Wt,t[0]^=n[2*e],t[1]^=n[2*e+1]}}},function(t,e,n){(function(e){const r=n(108),i=n(66);function o(t){return t.startsWith("int[")?"int256"+t.slice(3):"int"===t?"int256":t.startsWith("uint[")?"uint256"+t.slice(4):"uint"===t?"uint256":t.startsWith("fixed[")?"fixed128x128"+t.slice(5):"fixed"===t?"fixed128x128":t.startsWith("ufixed[")?"ufixed128x128"+t.slice(6):"ufixed"===t?"ufixed128x128":t}function a(t){return parseInt(/^\D+(\d+)$/.exec(t)[1],10)}function s(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function u(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?""===e[2]?"dynamic":parseInt(e[2],10):null}function c(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 o,h,d,f;if("address"===t)return l("uint160",c(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(void 0===n.length)throw new Error("Not an array?");if("dynamic"!==(o=u(t))&&0!==o&&n.length>o)throw new Error("Elements exceed array size: "+o);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"===o){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((o=a(t))<1||o>32)throw new Error("Invalid bytes<N> width: "+o);return r.setLengthRight(n,32)}if(t.startsWith("uint")){if((o=a(t))%8||o<8||o>256)throw new Error("Invalid uint<N> width: "+o);if((h=c(n)).bitLength()>o)throw new Error("Supplied uint exceeds width: "+o+" vs "+h.bitLength());if(h<0)throw new Error("Supplied uint is negative");return h.toArrayLike(e,"be",32)}if(t.startsWith("int")){if((o=a(t))%8||o<8||o>256)throw new Error("Invalid int<N> width: "+o);if((h=c(n)).bitLength()>o)throw new Error("Supplied int exceeds width: "+o+" vs "+h.bitLength());return h.toTwos(256).toArrayLike(e,"be",32)}if(t.startsWith("ufixed")){if(o=s(t),(h=c(n))<0)throw new Error("Supplied ufixed is negative");return l("uint256",h.mul(new i(2).pow(new i(o[1]))))}if(t.startsWith("fixed"))return o=s(t),l("int256",c(n).mul(new i(2).pow(new i(o[1]))));throw new Error("Unsupported or invalid type: "+t)}function h(t){return"string"===t||"bytes"===t||"dynamic"===u(t)}function d(t,n){if(t.length!==n.length)throw new Error("Number of types are not matching the values");for(var i,s,u=[],l=0;l<t.length;l++){var h=o(t[l]),d=n[l];if("bytes"===h)u.push(d);else if("string"===h)u.push(new e(d,"utf8"));else if("bool"===h)u.push(new e(d?"01":"00","hex"));else if("address"===h)u.push(r.setLength(d,20));else if(h.startsWith("bytes")){if((i=a(h))<1||i>32)throw new Error("Invalid bytes<N> width: "+i);u.push(r.setLengthRight(d,i))}else if(h.startsWith("uint")){if((i=a(h))%8||i<8||i>256)throw new Error("Invalid uint<N> width: "+i);if((s=c(d)).bitLength()>i)throw new Error("Supplied uint exceeds width: "+i+" vs "+s.bitLength());u.push(s.toArrayLike(e,"be",i/8))}else{if(!h.startsWith("int"))throw new Error("Unsupported or invalid type: "+h);if((i=a(h))%8||i<8||i>256)throw new Error("Invalid int<N> width: "+i);if((s=c(d)).bitLength()>i)throw new Error("Supplied int exceeds width: "+i+" vs "+s.bitLength());u.push(s.toTwos(i).toArrayLike(e,"be",i/8))}}return e.concat(u)}t.exports={rawEncode:function(t,n){var r=[],i=[],a=32*t.length;for(var s in t){var u=o(t[s]),c=l(u,n[s]);h(u)?(r.push(l("uint256",a)),i.push(c),a+=c.length):r.push(c)}return e.concat(r.concat(i))},solidityPack:d,soliditySHA3:function(t,e){return r.keccak(d(t,e))}}}).call(this,n(19).Buffer)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.filterFromParam=e.FilterPolyfill=void 0;const r=n(68),i=n(38),o={jsonrpc:"2.0",id:0};function a(t){return{fromBlock:u(t.fromBlock),toBlock:u(t.toBlock),addresses:void 0===t.address?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}function s(t){const e={fromBlock:c(t.fromBlock),toBlock:c(t.toBlock),topics:t.topics};return null!==t.addresses&&(e.address=t.addresses),e}function u(t){if(void 0===t||"latest"===t||"pending"===t)return"latest";if("earliest"===t)return(0,r.IntNumber)(0);if((0,i.isHexString)(t))return(0,i.intNumberFromHexString)(t);throw new Error("Invalid block option: "+String(t))}function c(t){return"latest"===t?t:(0,i.hexStringFromIntNumber)(t)}function l(){return Object.assign(Object.assign({},o),{error:{code:-32e3,message:"filter not found"}})}function h(){return Object.assign(Object.assign({},o),{result:[]})}e.FilterPolyfill=class{constructor(t){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,r.IntNumber)(1),this.provider=t}async newFilter(t){const e=a(t),n=this.makeFilterId(),r=await this.setInitialCursorPosition(n,e.fromBlock);return console.log(`Installing new log filter(${n}):`,e,"initial cursor position:",r),this.logFilters.set(n,e),this.setFilterTimeout(n),(0,i.hexStringFromIntNumber)(n)}async newBlockFilter(){const t=this.makeFilterId(),e=await this.setInitialCursorPosition(t,"latest");return console.log(`Installing new block filter (${t}) with initial cursor position:`,e),this.blockFilters.add(t),this.setFilterTimeout(t),(0,i.hexStringFromIntNumber)(t)}async newPendingTransactionFilter(){const t=this.makeFilterId(),e=await this.setInitialCursorPosition(t,"latest");return console.log(`Installing new block filter (${t}) with initial cursor position:`,e),this.pendingTransactionFilters.add(t),this.setFilterTimeout(t),(0,i.hexStringFromIntNumber)(t)}uninstallFilter(t){const e=(0,i.intNumberFromHexString)(t);return console.log(`Uninstalling filter (${e})`),this.deleteFilter(e),!0}getFilterChanges(t){const e=(0,i.intNumberFromHexString)(t);return this.timeouts.has(e)&&this.setFilterTimeout(e),this.logFilters.has(e)?this.getLogFilterChanges(e):this.blockFilters.has(e)?this.getBlockFilterChanges(e):this.pendingTransactionFilters.has(e)?this.getPendingTransactionFilterChanges(e):Promise.resolve(l())}async getFilterLogs(t){const e=(0,i.intNumberFromHexString)(t),n=this.logFilters.get(e);return n?this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getLogs",params:[s(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 a=await this.getCurrentBlockHeight(),u="latest"===e.toBlock?a:e.toBlock;if(n>a)return h();if(n>e.toBlock)return h();console.log(`Fetching logs from ${n} to ${u} for filter ${t}`);const c=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getLogs",params:[s(Object.assign(Object.assign({},e),{fromBlock:n,toBlock:u}))]}));if(Array.isArray(c.result)){const e=c.result.map((t=>(0,i.intNumberFromHexString)(t.blockNumber||"0x0"))),o=Math.max(...e);if(o&&o>n){const e=(0,r.IntNumber)(o+1);console.log(`Moving cursor position for filter (${t}) from ${n} to ${e}`),this.cursors.set(t,e)}}return c}async getBlockFilterChanges(t){const e=this.cursors.get(t);if(!e)return l();const n=await this.getCurrentBlockHeight();if(e>n)return h();console.log(`Fetching blocks from ${e} to ${n} for filter (${t})`);const a=(await Promise.all((0,i.range)(e,n+1).map((t=>this.getBlockHashByNumber((0,r.IntNumber)(t)))))).filter((t=>!!t)),s=(0,r.IntNumber)(e+a.length);return console.log(`Moving cursor position for filter (${t}) from ${e} to ${s}`),this.cursors.set(t,s),Object.assign(Object.assign({},o),{result:a})}async getPendingTransactionFilterChanges(t){return Promise.resolve(h())}async setInitialCursorPosition(t,e){const n=await this.getCurrentBlockHeight(),r="number"==typeof e&&e>n?e:n;return this.cursors.set(t,r),r}setFilterTimeout(t){const e=this.timeouts.get(t);e&&window.clearTimeout(e);const n=window.setTimeout((()=>{console.log(`Filter (${t}) timed out`),this.deleteFilter(t)}),3e5);this.timeouts.set(t,n)}async getCurrentBlockHeight(){const{result:t}=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_blockNumber",params:[]}));return(0,i.intNumberFromHexString)((0,i.ensureHexString)(t))}async getBlockHashByNumber(t){const e=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getBlockByNumber",params:[(0,i.hexStringFromIntNumber)(t),!1]}));return e.result&&"string"==typeof e.result.hash?(0,i.ensureHexString)(e.result.hash):null}},e.filterFromParam=a},function(t,e,n){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={}))},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionManager=void 0;const r=n(171),i=n(179),o=()=>{};e.SubscriptionManager=class{constructor(t){const e=new r({provider:t,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:o}=i({blockTracker:e,provider:t});this.events=n,this.subscriptionMiddleware=o}async handleRequest(t){const e={};return await this.subscriptionMiddleware(t,e,o,o),e}destroy(){this.subscriptionMiddleware.destroy()}}},function(t,e,n){const r=n(117),i=n(172);function o(t,e){return new Promise((n=>{const r=setTimeout(n,t);r.unref&&e&&r.unref()}))}t.exports=class extends i{constructor(t={}){if(!t.provider)throw new Error("PollingBlockTracker - no provider specified.");const e=t.pollingInterval||2e4,n=t.retryTimeout||e/10,r=void 0===t.keepEventLoopActive||t.keepEventLoopActive,i=t.setSkipCacheFlag||!1;super(Object.assign({blockResetDuration:e},t)),this._provider=t.provider,this._pollingInterval=e,this._retryTimeout=n,this._keepEventLoopActive=r,this._setSkipCacheFlag=i}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}_start(){this._performSync().catch((t=>this.emit("error",t)))}async _performSync(){for(;this._isRunning;)try{await this._updateLatestBlock(),await o(this._pollingInterval,!this._keepEventLoopActive)}catch(t){const e=new Error("PollingBlockTracker - encountered an error while attempting to update latest block:\n"+t.stack);try{this.emit("error",e)}catch(t){console.error(e)}await o(this._retryTimeout,!this._keepEventLoopActive)}}async _updateLatestBlock(){const t=await this._fetchLatestBlock();this._newPotentialLatest(t)}async _fetchLatestBlock(){const t={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(t.skipCache=!0);const e=await r((e=>this._provider.sendAsync(t,e)))();if(e.error)throw new Error("PollingBlockTracker - encountered error fetching block:\n"+e.error);return e.result}}},function(t,e,n){n(118),n(117);const r=n(175),i=(t,e)=>t+e,o=["sync","latest"];function a(t){return Number.parseInt(t,16)}t.exports=class extends r{constructor(t={}){super(),this._blockResetDuration=t.blockResetDuration||2e4,this._blockResetTimeout,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise((t=>this.once("latest",t)))}removeAllListeners(t){t?super.removeAllListeners(t):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener()}_start(){}_end(){}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(t,e){o.includes(t)&&this._maybeStart()}_onRemoveListener(t,e){this._getBlockTrackerEventCount()>0||this._maybeEnd()}_maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),this._start())}_maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),this._end())}_getBlockTrackerEventCount(){return o.map((t=>this.listenerCount(t))).reduce(i)}_newPotentialLatest(t){const e=this._currentBlock;e&&a(t)<=a(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}}},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},function(t,e){t.exports=function(t){var e=(t=t||{}).max||Number.MAX_SAFE_INTEGER,n=void 0!==t.start?t.start:Math.floor(Math.random()*e);return function(){return n%=e,n++}}},function(t,e,n){const r=n(176),i=n(65);var o="object"==typeof Reflect?Reflect:null,a=o&&"function"==typeof o.apply?o.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};function s(){i.call(this)}function u(t,e,n){try{a(t,e,n)}catch(t){setTimeout((()=>{throw t}))}}function c(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}t.exports=s,r.inherits(s,i),s.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 o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=i[t];if(void 0===s)return!1;if("function"==typeof s)u(s,this,e);else{var l=s.length,h=c(s,l);for(n=0;n<l;++n)u(h[n],this,e)}return!0}},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(s(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(t).replace(i,(function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}})),u=r[n];n<o;u=r[++n])m(u)||!w(u)?a+=" "+u:a+=" "+s(u);return a},e.deprecate=function(n,r){if(void 0!==t&&!0===t.noDeprecation)return n;if(void 0===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 o,a={};function s(t,n){var r={seen:[],stylize:c};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),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),l(r,t,r.depth)}function u(t,e){var n=s.styles[e];return n?"["+s.colors[n][0]+"m"+t+"["+s.colors[n][1]+"m":t}function c(t,e){return t}function l(t,n,r){if(t.customInspect&&n&&E(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 o=function(t,e){if(b(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")}return y(e)?t.stylize(""+e,"number"):p(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}(t,n);if(o)return o;var a=Object.keys(n),s=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),_(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(n);if(0===a.length){if(E(n)){var u=n.name?": "+n.name:"";return t.stylize("[Function"+u+"]","special")}if(v(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(M(n))return t.stylize(Date.prototype.toString.call(n),"date");if(_(n))return h(n)}var c,w="",A=!1,S=["{","}"];return f(n)&&(A=!0,S=["[","]"]),E(n)&&(w=" [Function"+(n.name?": "+n.name:"")+"]"),v(n)&&(w=" "+RegExp.prototype.toString.call(n)),M(n)&&(w=" "+Date.prototype.toUTCString.call(n)),_(n)&&(w=" "+h(n)),0!==a.length||A&&0!=n.length?r<0?v(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),c=A?function(t,e,n,r,i){for(var o=[],a=0,s=e.length;a<s;++a)T(e,String(a))?o.push(d(t,e,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(d(t,e,n,r,i,!0))})),o}(t,n,r,s,a):a.map((function(e){return d(t,n,r,s,e,A)})),t.seen.pop(),function(t,e,n){return t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}(c,w,S)):S[0]+w+S[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),T(r,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=m(n)?l(t,u.value,null):l(t,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),b(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function f(t){return Array.isArray(t)}function p(t){return"boolean"==typeof t}function m(t){return null===t}function y(t){return"number"==typeof t}function g(t){return"string"==typeof t}function b(t){return void 0===t}function v(t){return w(t)&&"[object RegExp]"===A(t)}function w(t){return"object"==typeof t&&null!==t}function M(t){return w(t)&&"[object Date]"===A(t)}function _(t){return w(t)&&("[object Error]"===A(t)||t instanceof Error)}function E(t){return"function"==typeof t}function A(t){return Object.prototype.toString.call(t)}function S(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(n){if(b(o)&&(o=t.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=t.pid;a[n]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",n,r,t)}}else a[n]=function(){};return a[n]},e.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=f,e.isBoolean=p,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=y,e.isString=g,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=b,e.isRegExp=v,e.isObject=w,e.isDate=M,e.isError=_,e.isFunction=E,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(177);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function N(){var t=new Date,e=[S(t.getHours()),S(t.getMinutes()),S(t.getSeconds())].join(":");return[t.getDate(),k[t.getMonth()],e].join(" ")}function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",N(),e.format.apply(e,arguments))},e.inherits=n(178),e._extend=function(t,e){if(!e||!w(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var x="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function L(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(x&&t[x]){var e;if("function"!=typeof(e=t[x]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,x,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,r=new Promise((function(t,r){e=t,n=r})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(t,r){t?n(t):e(r)}));try{t.apply(this,i)}catch(t){n(t)}return r}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),x&&Object.defineProperty(e,x,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,r(t))},e.promisify.custom=x,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 o=this,a=function(){return i.apply(o,arguments)};e.apply(this,n).then((function(e){t.nextTick(a,null,e)}),(function(e){t.nextTick(L,e,a)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,r(e)),n}}).call(this,n(40))},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},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}},function(t,e,n){const r=n(64).default,i=n(119),{createAsyncMiddleware:o}=n(120),a=n(187),{unsafeRandomBytes:s,incrementHexInt:u}=n(60),c=n(98);function l(t){return{hash:t.hash,parentHash:t.parentHash,sha3Uncles:t.sha3Uncles,miner:t.miner,stateRoot:t.stateRoot,transactionsRoot:t.transactionsRoot,receiptsRoot:t.receiptsRoot,logsBloom:t.logsBloom,difficulty:t.difficulty,number:t.number,gasLimit:t.gasLimit,gasUsed:t.gasUsed,nonce:t.nonce,mixHash:t.mixHash,timestamp:t.timestamp,extraData:t.extraData}}t.exports=function({blockTracker:t,provider:e}){const n={},h=a({blockTracker:t,provider:e});let d=!1;const f=new r,p=i({eth_subscribe:o((async function(r,i){if(d)throw new Error("SubscriptionManager - attempting to use after destroying");const o=r.params[0],a=s(16);let f;switch(o){case"newHeads":f=function({subId:n}){const r={type:o,destroy:async()=>{t.removeListener("sync",r.update)},update:async({oldBlock:t,newBlock:r})=>{const i=r,o=u(t);(await c({provider:e,fromBlock:o,toBlock:i})).map(l).forEach((t=>{m(n,t)}))}};return t.on("sync",r.update),r}({subId:a});break;case"logs":const n=r.params[1];f=function({subId:t,filter:e}){return e.on("update",(e=>m(t,e))),{type:o,destroy:async()=>await h.uninstallFilter(e.idHex)}}({subId:a,filter:await h.newLogFilter(n)});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${o}"`)}return n[a]=f,void(i.result=a)})),eth_unsubscribe:o((async function(t,e){if(d)throw new Error("SubscriptionManager - attempting to use after destroying");const r=t.params[0],i=n[r];i?(delete n[r],await i.destroy(),e.result=!0):e.result=!1}))});return p.destroy=function(){f.removeAllListeners();for(const t in n)n[t].destroy(),delete n[t];d=!0},{events:f,middleware:p};function m(t,e){f.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:t,result:e}})}}},function(t,e){t.exports=function(t){return(e,n,r,i)=>{const o=t[e.method];return void 0===o?r():"function"==typeof o?o(e,n,r,i):(n.result=o,i())}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.createIdRemapMiddleware=void 0;const r=n(121);e.createIdRemapMiddleware=function(){return(t,e,n,i)=>{const o=t.id,a=r.getUniqueId();t.id=a,e.id=a,n((n=>{t.id=o,e.id=o,n()}))}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.createAsyncMiddleware=void 0,e.createAsyncMiddleware=function(t){return async(e,n,r,i)=>{let o;const a=new Promise((t=>{o=t}));let s=null,u=!1;const c=async()=>{u=!0,r((t=>{s=t,o()})),await a};try{await t(e,n,c),u?(await a,s(null)):i(null)}catch(t){s?s(t):i(t)}}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.createScaffoldMiddleware=void 0,e.createScaffoldMiddleware=function(t){return(e,n,r,i)=>{const o=t[e.method];return void 0===o?r():"function"==typeof o?o(e,n,r,i):(n.result=o,i())}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const r=n(95);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(123);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const o=n(185);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const a=n(96);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return a.errorCodes}})},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const r=n(95),i=n(123),o=n(96);function a(t,e){const[n,o]=u(e);return new r.EthereumRpcError(t,n||i.getMessageFromCode(t),o)}function s(t,e){const[n,o]=u(e);return new r.EthereumProviderError(t,n||i.getMessageFromCode(t),o)}function u(t){if(t){if("string"==typeof t)return[t];if("object"==typeof t&&!Array.isArray(t)){const{message:e,data:n}=t;if(e&&"string"!=typeof e)throw new Error("Must specify string message.");return[e||void 0,n]}}return[]}e.ethErrors={rpc:{parse:t=>a(o.errorCodes.rpc.parse,t),invalidRequest:t=>a(o.errorCodes.rpc.invalidRequest,t),invalidParams:t=>a(o.errorCodes.rpc.invalidParams,t),methodNotFound:t=>a(o.errorCodes.rpc.methodNotFound,t),internal:t=>a(o.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return a(e,t)},invalidInput:t=>a(o.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>a(o.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>a(o.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>a(o.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>a(o.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>a(o.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>s(o.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>s(o.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>s(o.errorCodes.provider.unsupportedMethod,t),disconnected:t=>s(o.errorCodes.provider.disconnected,t),chainDisconnected:t=>s(o.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:n,data:i}=t;if(!n||"string"!=typeof n)throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(e,n,i)}}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMiddleware=void 0;const r=n(122);e.mergeMiddleware=function(t){const e=new r.JsonRpcEngine;return t.forEach((t=>e.push(t))),e.asMiddleware()}},function(t,e,n){const r=n(224).Mutex,{createAsyncMiddleware:i}=n(120),o=n(119),a=n(188),s=n(191),u=n(192),{intToHex:c,hexToInt:l}=n(60);function h(t){return d((async(...e)=>{const n=await t(...e);return c(n.id)}))}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 e in t)n.push(t[e]);return n}t.exports=function({blockTracker:t,provider:e}){let n=0,i={};const p=new r,m=function({mutex:t}){return e=>async(n,r,i,o)=>{(await t.acquire())(),e(n,r,i,o)}}({mutex:p}),y=o({eth_newFilter:m(h(b)),eth_newBlockFilter:m(h(v)),eth_newPendingTransactionFilter:m(h(w)),eth_uninstallFilter:m(d(E)),eth_getFilterChanges:m(d(M)),eth_getFilterLogs:m(d(_))}),g=async({oldBlock:t,newBlock:e})=>{if(0===i.length)return;const n=await p.acquire();try{await Promise.all(f(i).map((async n=>{try{await n.update({oldBlock:t,newBlock:e})}catch(t){console.error(t)}})))}catch(t){console.error(t)}n()};return y.newLogFilter=b,y.newBlockFilter=v,y.newPendingTransactionFilter=w,y.uninstallFilter=E,y.getFilterChanges=M,y.getFilterLogs=_,y.destroy=()=>{!async function(){const t=f(i).length;i={},S({prevFilterCount:t,newFilterCount:0})}()},y;async function b(t){const n=new a({provider:e,params:t});return await A(n),n}async function v(){const t=new s({provider:e});return await A(t),t}async function w(){const t=new u({provider:e});return await A(t),t}async function M(t){const e=l(t),n=i[e];if(!n)throw new Error(`No filter for index "${e}"`);return n.getChangesAndClear()}async function _(t){const e=l(t),n=i[e];if(!n)throw new Error(`No filter for index "${e}"`);return"log"===n.type?results=n.getAllResults():results=[],results}async function E(t){const e=l(t),n=i[e],r=Boolean(n);return r&&await async function(t){const e=f(i).length;delete i[t];S({prevFilterCount:e,newFilterCount:f(i).length})}(e),r}async function A(e){const r=f(i).length,o=await t.getLatestBlock();return await e.initialize({currentBlock:o}),n++,i[n]=e,e.id=n,e.idHex=c(n),S({prevFilterCount:r,newFilterCount:f(i).length}),n}function S({prevFilterCount:e,newFilterCount:n}){0===e&&n>0?t.on("sync",g):e>0&&0===n&&t.removeListener("sync",g)}}},function(t,e,n){const r=n(118),i=n(189),o=n(190),{bnToHex:a,hexToInt:s,incrementHexInt:u,minBlockRef:c,blockRefIsNumber:l}=n(60);t.exports=class extends o{constructor({provider:t,params:e}){super(),this.type="log",this.ethQuery=new r(t),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},e),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map((t=>t.toLowerCase())))}async initialize({currentBlock:t}){let e=this.params.fromBlock;["latest","pending"].includes(e)&&(e=t),"earliest"===e&&(e="0x0"),this.params.fromBlock=e;const n=c(this.params.toBlock,t),r=Object.assign({},this.params,{toBlock:n}),i=await this._fetchLogs(r);this.addInitialResults(i)}async update({oldBlock:t,newBlock:e}){const n=e;let r;r=t?u(t):e;const i=Object.assign({},this.params,{fromBlock:r,toBlock:n}),o=(await this._fetchLogs(i)).filter((t=>this.matchLog(t)));this.addResults(o)}async _fetchLogs(t){return await i((e=>this.ethQuery.getLogs(t,e)))()}matchLog(t){if(s(this.params.fromBlock)>=s(t.blockNumber))return!1;if(l(this.params.toBlock)&&s(this.params.toBlock)<=s(t.blockNumber))return!1;const e=t.address&&t.address.toLowerCase();return!(this.params.address&&e&&!this.params.address.includes(e))&&this.params.topics.every(((e,n)=>{let r=t.topics[n];if(!r)return!1;r=r.toLowerCase();let i=Array.isArray(e)?e:[e];return!!i.includes(null)||(i=i.map((t=>t.toLowerCase())),i.includes(r))}))}}},function(t,e,n){const r=(t,e,n,r)=>function(...i){return new e.promiseModule(((o,a)=>{e.multiArgs?i.push(((...t)=>{e.errorFirst?t[0]?a(t):(t.shift(),o(t)):o(t)})):e.errorFirst?i.push(((t,e)=>{t?a(t):o(e)})):i.push(o);const s=this===n?r:this;Reflect.apply(t,s,i)}))},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 o=new WeakMap,a=new Proxy(t,{apply(t,n,i){const s=o.get(t);if(s)return Reflect.apply(s,n,i);const u=e.excludeMain?t:r(t,e,a,t);return o.set(t,u),Reflect.apply(u,n,i)},get(t,n){const s=t[n];if(!((t,n)=>{let r=i.get(t);if(r||(r={},i.set(t,r)),n in r)return r[n];const o=t=>"string"==typeof t||"symbol"==typeof n?n===t:t.test(n),a=Reflect.getOwnPropertyDescriptor(t,n),s=void 0===a||a.writable||a.configurable,u=(e.include?e.include.some(o):!e.exclude.some(o))&&s;return r[n]=u,u})(t,n)||s===Function.prototype[n])return s;const u=o.get(s);if(u)return u;if("function"==typeof s){const n=r(s,e,a,t);return o.set(s,n),n}return s}});return a}},function(t,e,n){const r=n(97);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}}},function(t,e,n){const r=n(97),i=n(98),{incrementHexInt:o}=n(60);t.exports=class extends r{constructor({provider:t,params:e}){super(),this.type="block",this.provider=t}async update({oldBlock:t,newBlock:e}){const n=e,r=o(t),a=(await i({provider:this.provider,fromBlock:r,toBlock:n})).map((t=>t.hash));this.addResults(a)}}},function(t,e,n){const r=n(97),i=n(98),{incrementHexInt:o}=n(60);t.exports=class extends r{constructor({provider:t}){super(),this.type="tx",this.provider=t}async update({oldBlock:t}){const e=t,n=o(t),r=await i({provider:this.provider,fromBlock:n,toBlock:e}),a=[];for(const t of r)a.push(...t.transactions);this.addResults(a)}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKUI=void 0;const r=n(194),i=n(206),o=n(208);e.WalletSDKUI=class{constructor(t){this.standalone=null,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,o.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}setStandalone(t){this.standalone=t}isStandalone(){var t;return null!==(t=this.standalone)&&void 0!==t&&t}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkFlow=void 0;const r=n(8),i=n(48),o=n(195);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)(o.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)}}},function(t,e,n){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(124)),o=n(8),a=n(99),s=n(38),u=n(196),c=r(n(197)),l=r(n(198)),h=r(n(199)),d=r(n(200)),f=n(201),p=n(203),m=r(n(205));e.TryExtensionLinkDialog=t=>{const{isOpen:e,darkMode:n}=t,[r,s]=(0,a.useState)(!e),[u,c]=(0,a.useState)(!e);(0,a.useEffect)((()=>{const t=[window.setTimeout((()=>{c(!e)}),10)];return e?s(!1):t.push(window.setTimeout((()=>{s(!0)}),360)),()=>{t.forEach(window.clearTimeout)}}),[t.isOpen]);const l=n?"dark":"light";return(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-container",r&&"-cbwsdk-extension-dialog-container-hidden")},(0,o.h)("style",null,m.default),(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-backdrop",l,u&&"-cbwsdk-extension-dialog-backdrop-hidden")}),(0,o.h)("div",{class:"-cbwsdk-extension-dialog"},(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-box",u&&"-cbwsdk-extension-dialog-box-hidden")},(0,o.h)(y,{darkMode:n,onInstallClick:()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")}}),t.connectDisabled?null:(0,o.h)(g,{darkMode:n,version:t.version,sessionId:t.sessionId,sessionSecret:t.sessionSecret,linkAPIUrl:t.linkAPIUrl,isConnected:t.isConnected,isParentConnection:t.isParentConnection}),t.onCancel&&(0,o.h)(v,{darkMode:n,onClick:t.onCancel}))))};const y=({darkMode:t,onInstallClick:e})=>{const[n,r]=(0,a.useState)(!1),s=(0,a.useCallback)((()=>{n?window.location.reload():(e(),r(!0))}),[e,n]),u=t?"dark":"light";return(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-box-top",u)},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-install-region"},(0,o.h)("h2",{class:u},"Try the Coinbase Wallet extension"),n&&(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-subtext"},"After installing Coinbase Wallet, refresh the page and connect again."),(0,o.h)("button",{type:"button",onClick:s},n?"Refresh":"Install")),(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-box-top-info-region",u)},(0,o.h)(b,{darkMode:t,icon:l.default,text:"Connect to crypto apps with one click"}),(0,o.h)(b,{darkMode:t,icon:h.default,text:"Your private key is stored securely"}),(0,o.h)(b,{darkMode:t,icon:c.default,text:"Works with Ethereum, Polygon, and more"})))},g=t=>{const e=(0,s.createQrUrl)(t.sessionId,t.sessionSecret,t.linkAPIUrl,t.isParentConnection),n=t.darkMode?"dark":"light";return(0,o.h)("div",{"data-testid":"scan-qr-box",class:(0,i.default)("-cbwsdk-extension-dialog-box-bottom",n)},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-description-region"},(0,o.h)("h2",{class:n},"Or scan to connect"),(0,o.h)("body",{class:(0,i.default)("-cbwsdk-extension-dialog-box-bottom-description",n)},"Open"," ",(0,o.h)("a",{href:"https://wallet.coinbase.com/",target:"_blank",rel:"noopener noreferrer"},"Coinbase Wallet")," ","on your mobile phone and scan")),(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-qr-region"},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-qr-wrapper"},(0,o.h)(f.QRCode,{content:e,width:150,height:150,fgColor:"#000",bgColor:"transparent",image:{svg:d.default,width:34,height:34}})),(0,o.h)("input",{type:"hidden",name:"cbwsdk-version",value:u.LIB_VERSION}),(0,o.h)("input",{type:"hidden",value:e}),!t.isConnected&&(0,o.h)("div",{"data-testid":"connecting-spinner",class:(0,i.default)("-cbwsdk-extension-dialog-box-bottom-qr-connecting",n)},(0,o.h)(p.Spinner,{size:36,color:t.darkMode?"#FFF":"#000"}),(0,o.h)("p",null,"Connecting..."))))},b=t=>{const e=t.darkMode?"dark":"light";return(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-description"},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-description-icon-wrapper"},(0,o.h)("img",{src:t.icon})),(0,o.h)("body",{class:(0,i.default)("-cbwsdk-extension-dialog-box-top-description-text",e)},t.text))},v=t=>{const e=t.darkMode?"dark":"light";return(0,o.h)("button",{type:"button",class:(0,i.default)("-cbwsdk-extension-dialog-box-cancel",e),onClick:t.onClick},(0,o.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-box-cancel-x",e)}))}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.LIB_VERSION=void 0,e.LIB_VERSION="3.4.0"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggMEMzLjU4IDAgMCAzLjU4IDAgOHMzLjU4IDggOCA4IDgtMy41OCA4LTgtMy41OC04LTgtOFptNS45MSA3aC0xLjk0Yy0uMS0xLjU3LS40Mi0zLS45MS00LjE1IDEuNDguODggMi41NSAyLjM4IDIuODUgNC4xNVpNOCAxNGMtLjQ1IDAtMS43Mi0xLjc3LTEuOTUtNWgzLjljLS4yMyAzLjIzLTEuNSA1LTEuOTUg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xIDcuNzQ1YTMuMTMgMy4xMyAwIDAgMC0uNTU0LS42OWwtLjYyLS42MjQtMS4xNDIgMS4xNDYuNjIxLjYyM2MuMjE4LjIyLjM4Ni40ODkuNDg3Ljc1OC4zMzUuODI2LjE2NyAxLjgyLS41MDQgMi40OTRsLTMuMjA1IDMuMjE5YTIuMjkzIDIuMjkzIDAgMCAxLTMuMjQgMCAyLjMxNiAyLjMxNiAwIDAgMSAwLTMuMjUybDEuNTI4LTEuNTM0YTQuODE1IDQuODE1IDAgMCAxLS4yODUtMi4wMDVsLTIuMzgzIDIuMzkzYTMuOTI3IDMuOTI3IDAgMCAwIDAgNS41NDQgMy45MDkgMy45MDkgMCAwIDAgNS41MzggMGwzLjIwNS0zLjIxOWEzLjk1OCAzLjk1OCAwIDAgMCAxLjA5MS0zLjQwNCA0LjIxMSA0LjIxMSAwIDAgMC0uNTM3LTEuNDQ5WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEgN3Y5aDE0VjdIMVptNy41IDQuMzlWMTRoLTF2LTIuNjFjLS40NC0uMTktLjc1LS42My0uNzUtMS4xNGExLjI1IDEuMjUgMCAwIDEgMi41IDBjMCAuNTEtLjMxLjk1LS43NSAxLjE0Wk01LjY3IDZWNC4zM0M1LjY3IDMuMDUgNi43MSAyIDggMnMyLjMzIDEuMDUgMi4zMyAyLjMzVjZoMlY0LjMzQzEyLjMzIDEuOTQgMTAuMzkgMCA4IDBTMy42NyAxLjk0IDMuNjcgNC4zM1Y2aDJaIiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+"},function(t,e,n){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'},function(t,e,n){(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(8),o=n(99),a=r(n(202));e.QRCode=e=>{const[n,r]=(0,o.useState)("");return(0,o.useEffect)((()=>{var n,i;const o=new a.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}),s=t.from(o.svg(),"utf8").toString("base64");r("data:image/svg+xml;base64,"+s)})),n?(0,i.h)("img",{src:n,alt:"QR Code"}):null}}).call(this,n(19).Buffer)},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=[],o=this.data.charCodeAt(e);o>65536?(r[0]=240|(1835008&o)>>>18,r[1]=128|(258048&o)>>>12,r[2]=128|(4032&o)>>>6,r[3]=128|63&o):o>2048?(r[0]=224|(61440&o)>>>12,r[1]=128|(4032&o)>>>6,r[2]=128|63&o):o>128?(r[0]=192|(1984&o)>>>6,r[1]=128|63&o):r[0]=o,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=o.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 o=1*i,a=0;a<this.modules[i].length;a++){var s=1*a;this.modules[i][a]&&(r.beginFill(0,100),r.moveTo(s,o),r.lineTo(s+1,o),r.lineTo(s+1,o+1),r.lineTo(s,o+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=o.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 a=-2;a<=2;a++)for(var s=-2;s<=2;s++)this.modules[r+a][i+s]=-2==a||2==a||-2==s||2==s||0==a&&0==s}},setupTypeNumber:function(t){for(var e=o.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=o.getBCHTypeInfo(n),i=0;i<15;i++){var a=!t&&1==(r>>i&1);i<6?this.modules[i][8]=a:i<8?this.modules[i+1][8]=a:this.modules[this.moduleCount-15+i][8]=a}for(i=0;i<15;i++)a=!t&&1==(r>>i&1),i<8?this.modules[8][this.moduleCount-i-1]=a:i<9?this.modules[8][15-i-1+1]=a:this.modules[8][15-i-1]=a;this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var n=-1,r=this.moduleCount-1,i=7,a=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var u=0;u<2;u++)if(null==this.modules[r][s-u]){var c=!1;a<t.length&&(c=1==(t[a]>>>i&1)),o.getMask(e,r,s-u)&&(c=!c),this.modules[r][s-u]=c,-1==--i&&(a++,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=c.getRSBlocks(t,e),a=new l,s=0;s<n.length;s++){var u=n[s];a.put(u.mode,4),a.put(u.getLength(),o.getLengthInBits(u.mode,t)),u.write(a)}var h=0;for(s=0;s<i.length;s++)h+=i[s].dataCount;if(a.getLengthInBits()>8*h)throw new Error("code length overflow. ("+a.getLengthInBits()+">"+8*h+")");for(a.getLengthInBits()+4<=8*h&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(!1);for(;!(a.getLengthInBits()>=8*h||(a.put(r.PAD0,8),a.getLengthInBits()>=8*h));)a.put(r.PAD1,8);return r.createBytes(a,i)},r.createBytes=function(t,e){for(var n=0,r=0,i=0,a=new Array(e.length),s=new Array(e.length),c=0;c<e.length;c++){var l=e[c].dataCount,h=e[c].totalCount-l;r=Math.max(r,l),i=Math.max(i,h),a[c]=new Array(l);for(var d=0;d<a[c].length;d++)a[c][d]=255&t.buffer[d+n];n+=l;var f=o.getErrorCorrectPolynomial(h),p=new u(a[c],f.getLength()-1).mod(f);for(s[c]=new Array(f.getLength()-1),d=0;d<s[c].length;d++){var m=d+p.getLength()-s[c].length;s[c][d]=m>=0?p.get(m):0}}var y=0;for(d=0;d<e.length;d++)y+=e[d].totalCount;var g=new Array(y),b=0;for(d=0;d<r;d++)for(c=0;c<e.length;c++)d<a[c].length&&(g[b++]=a[c][d]);for(d=0;d<i;d++)for(c=0;c<e.length;c++)d<s[c].length&&(g[b++]=s[c][d]);return g};for(var i={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},o={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;o.getBCHDigit(e)-o.getBCHDigit(o.G15)>=0;)e^=o.G15<<o.getBCHDigit(e)-o.getBCHDigit(o.G15);return(t<<10|e)^o.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;o.getBCHDigit(e)-o.getBCHDigit(o.G18)>=0;)e^=o.G18<<o.getBCHDigit(e)-o.getBCHDigit(o.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return o.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,n){switch(t){case 0:return(e+n)%2==0;case 1:return e%2==0;case 2:return n%3==0;case 3:return(e+n)%3==0;case 4:return(Math.floor(e/2)+Math.floor(n/3))%2==0;case 5:return e*n%2+e*n%3==0;case 6:return(e*n%2+e*n%3)%2==0;case 7:return(e*n%3+(e+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new u([1],0),n=0;n<t;n++)e=e.multiply(new u([1,a.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 o=0,a=t.isDark(r,i),s=-1;s<=1;s++)if(!(r+s<0||e<=r+s))for(var u=-1;u<=1;u++)i+u<0||e<=i+u||0==s&&0==u||a==t.isDark(r+s,i+u)&&o++;o>5&&(n+=3+o-5)}for(r=0;r<e-1;r++)for(i=0;i<e-1;i++){var c=0;t.isDark(r,i)&&c++,t.isDark(r+1,i)&&c++,t.isDark(r,i+1)&&c++,t.isDark(r+1,i+1)&&c++,0!=c&&4!=c||(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+Math.abs(100*l/e/e-50)/5*10}},a={glog:function(t){if(t<1)throw new Error("glog("+t+")");return a.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return a.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},s=0;s<8;s++)a.EXP_TABLE[s]=1<<s;for(s=8;s<256;s++)a.EXP_TABLE[s]=a.EXP_TABLE[s-4]^a.EXP_TABLE[s-5]^a.EXP_TABLE[s-6]^a.EXP_TABLE[s-8];for(s=0;s<255;s++)a.LOG_TABLE[a.EXP_TABLE[s]]=s;function u(t,e){if(null==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 c(t,e){this.totalCount=t,this.dataCount=e}function l(){this.buffer=[],this.length=0}u.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]^=a.gexp(a.glog(this.get(n))+a.glog(t.get(r)));return new u(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=a.glog(this.get(0))-a.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]^=a.gexp(a.glog(t.get(r))+e);return new u(n,0).mod(t)}},c.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]],c.getRSBlocks=function(t,e){var n=c.getRsBlockTable(t,e);if(null==n)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var r=n.length/3,i=[],o=0;o<r;o++)for(var a=n[3*o+0],s=n[3*o+1],u=n[3*o+2],l=0;l<a;l++)i.push(new c(s,u));return i},c.getRsBlockTable=function(t,e){switch(e){case 1:return c.RS_BLOCK_TABLE[4*(t-1)+0];case 0:return c.RS_BLOCK_TABLE[4*(t-1)+1];case 3:return c.RS_BLOCK_TABLE[4*(t-1)+2];case 2:return c.RS_BLOCK_TABLE[4*(t-1)+3];default:return}},l.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 h=[[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 d(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,o=0,a=h.length;o<=a;o++){var s=h[o];if(!s)throw new Error("Content too long: expected "+i+" but got "+n);switch(e){case"L":i=s[0];break;case"M":i=s[1];break;case"Q":i=s[2];break;case"H":i=s[3];break;default:throw new Error("Unknwon error correction level: "+e)}if(n<=i)break;r++}if(r>h.length)throw new Error("Content too long");return r}(n,this.options.ecl),o=function(t){switch(t){case"L":return 1;case"M":return 0;case"Q":return 3;case"H":return 2;default:throw new Error("Unknwon error correction level: "+t)}}(this.options.ecl);this.qrcode=new r(i,o),this.qrcode.addData(n),this.qrcode.make()}d.prototype.svg=function(t){var e=this.options||{},n=this.qrcode.modules;void 0===t&&(t={container:e.container||"svg"});for(var r=void 0===e.pretty||!!e.pretty,i=r?" ":"",o=r?"\r\n":"",a=e.width,s=e.height,u=n.length,c=a/(u+2*e.padding),l=s/(u+2*e.padding),h=void 0!==e.join&&!!e.join,d=void 0!==e.swap&&!!e.swap,f=void 0===e.xmlDeclaration||!!e.xmlDeclaration,p=void 0!==e.predefined&&!!e.predefined,m=p?i+'<defs><path id="qrmodule" d="M0 0 h'+l+" v"+c+' H0 z" style="fill:'+e.color+';shape-rendering:crispEdges;" /></defs>'+o:"",y=i+'<rect x="0" y="0" width="'+a+'" height="'+s+'" style="fill:'+e.background+';shape-rendering:crispEdges;"/>'+o,g="",b="",v=0;v<u;v++)for(var w=0;w<u;w++)if(n[w][v]){var M=w*c+e.padding*c,_=v*l+e.padding*l;if(d){var E=M;M=_,_=E}if(h){var A=c+M,S=l+_;M=Number.isInteger(M)?Number(M):M.toFixed(2),_=Number.isInteger(_)?Number(_):_.toFixed(2),A=Number.isInteger(A)?Number(A):A.toFixed(2),b+="M"+M+","+_+" V"+(S=Number.isInteger(S)?Number(S):S.toFixed(2))+" H"+A+" V"+_+" H"+M+" Z "}else g+=p?i+'<use x="'+M.toString()+'" y="'+_.toString()+'" href="#qrmodule" />'+o:i+'<rect x="'+M.toString()+'" y="'+_.toString()+'" width="'+c+'" height="'+l+'" style="fill:'+e.color+';shape-rendering:crispEdges;"/>'+o}h&&(g=i+'<path x="0" y="0" style="fill:'+e.color+';shape-rendering:crispEdges;" d="'+b+'" />');let k="";if(void 0!==this.options.image&&this.options.image.svg){const t=a*this.options.image.width/100,e=s*this.options.image.height/100;k+=`<svg x="${a/2-t/2}" y="${s/2-e/2}" width="${t}" height="${e}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,k+=this.options.image.svg+o,k+="</svg>"}var N="";switch(t.container){case"svg":f&&(N+='<?xml version="1.0" standalone="yes"?>'+o),N+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+a+'" height="'+s+'">'+o,N+=m+y+g,N+=k,N+="</svg>";break;case"svg-viewbox":f&&(N+='<?xml version="1.0" standalone="yes"?>'+o),N+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+a+" "+s+'">'+o,N+=m+y+g,N+=k,N+="</svg>";break;case"g":N+='<g width="'+a+'" height="'+s+'">'+o,N+=m+y+g,N+=k,N+="</g>";break;default:N+=(m+y+g+k).replace(/^\s+/,"")}return N},t.exports=d},function(t,e,n){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(8),o=r(n(204));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,o.default),(0,i.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:n,height:n}},(0,i.h)("circle",{style:{cx:50,cy:50,r:45,stroke:r}})))}},function(t,e,n){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)}}"},function(t,e,n){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;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-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;border-radius:8px;overflow:hidden;min-height:300px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top.dark{color:#fff;background-color:#000;box-shadow:0 4px 16px rgba(255,255,255,.05)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top.light{background-color:#fff}.-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-install-region button.dark{background-color:#3773f5}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-info-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-info-region.light{background-color:#fafbfc}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-info-region.dark{background-color:#141519}.-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;align-self:center}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-text.light{color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-text.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom{display:flex;flex-direction:row;overflow:hidden;border-radius:8px;margin-top:8px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom.light{background-color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom.dark{background-color:#000;box-shadow:0 4px 16px rgba(255,255,255,.05)}.-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.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description.dark a{color:#3773f5}.-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);background-color:#fff}.-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}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting.light>p{color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting.dark{background-color:rgba(20,21,25,.9)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting>p{font-size:12px;font-weight:bold;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;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel.light{background-color:#fafbfc}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel.dark{background-color:#141519}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x.light::before,.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x.light::after{background-color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x.dark::before,.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x.dark::after{background-color:#fff}.-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;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}.-cbwsdk-css-reset .-cbwsdk-extension-dialog h2.light{color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog h2.dark{color:#fff}'},function(t,e,n){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(124)),o=n(8),a=n(99),s=r(n(207));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,o.render)((0,o.h)("div",null,(0,o.h)(e.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map((([t,n])=>(0,o.h)(e.SnackbarInstance,Object.assign({},n,{key:t})))))),this.root)}},e.SnackbarContainer=t=>(0,o.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-container")},(0,o.h)("style",null,s.default),(0,o.h)("div",{class:"-cbwsdk-snackbar"},t.children)),e.SnackbarInstance=({autoExpand:t,message:e,menuItems:n})=>{const[r,s]=(0,a.useState)(!0),[u,c]=(0,a.useState)(null!=t&&t);return(0,a.useEffect)((()=>{const t=[window.setTimeout((()=>{s(!1)}),1),window.setTimeout((()=>{c(!0)}),1e4)];return()=>{t.forEach(window.clearTimeout)}})),(0,o.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance",r&&"-cbwsdk-snackbar-instance-hidden",u&&"-cbwsdk-snackbar-instance-expanded")},(0,o.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:()=>{c(!u)}},(0,o.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",class:"-cbwsdk-snackbar-instance-header-cblogo"}),(0,o.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},e),(0,o.h)("div",{class:"-gear-container"},!u&&(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,o.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),n&&n.length>0&&(0,o.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},n.map(((t,e)=>(0,o.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,o.h)("svg",{width:t.svgWidth,height:t.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":t.defaultFillRule,"clip-rule":t.defaultClipRule,d:t.path,fill:"#AAAAAA"})),(0,o.h)("span",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item-info",t.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},t.info))))))}},function(t,e,n){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}"},function(t,e,n){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(209));e.injectCssReset=function(){const t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(i.default)),document.documentElement.appendChild(t)}},function(t,e,n){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}'},function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},a=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},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelay=void 0;const u=s(n(211)),c=n(86),l=n(48),h=n(69),d=n(89),f=n(212),p=n(216),m=n(68),y=n(38),g=a(n(217)),b=n(90),v=n(107),w=n(125),M=n(218),_=n(219),E=n(220),A=n(221);class S extends v.WalletSDKRelayAbstract{constructor(t){var e;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.options=t;const{session:n,ui:r,connection:i}=this.subscribe();if(this._session=n,this.connection=i,this.relayEventManager=t.relayEventManager,t.diagnosticLogger&&t.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");t.eventListener?this.diagnostic={log:t.eventListener.onEvent}:this.diagnostic=t.diagnosticLogger,this._reloadOnDisconnect=null===(e=t.reloadOnDisconnect)||void 0===e||e,this.ui=r}subscribe(){const t=b.Session.load(this.storage)||new b.Session(this.storage).save(),e=new f.WalletSDKConnection(t.id,t.key,this.linkAPIUrl,this.diagnostic);this.subscriptions.add(e.sessionConfig$.subscribe({next:t=>{this.onSessionConfigChanged(t)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"error while invoking session config callback"})}})),this.subscriptions.add(e.incomingEvent$.pipe((0,h.filter)((t=>"Web3Response"===t.event))).subscribe({next:this.handleIncomingEvent})),this.subscriptions.add(e.linked$.pipe((0,h.skip)(1),(0,h.tap)((t=>{var e;this.isLinked=t;const n=this.storage.getItem(v.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.diagnostic)||void 0===e||e.log(d.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:t})}}}))).subscribe()),this.subscriptions.add(e.sessionConfig$.pipe((0,h.filter)((t=>!!t.metadata&&"1"===t.metadata.__destroyed))).subscribe((()=>{var t;const n=e.isDestroyed;return null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:n,sessionIdHash:this.getSessionIdHash()}),this.resetAndReload()}))),this.subscriptions.add(e.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.WalletUsername))).pipe((0,h.mergeMap)((e=>g.decrypt(e.metadata.WalletUsername,t.secret)))).subscribe({next:t=>{this.storage.setItem(v.WALLET_USER_NAME_KEY,t)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"username"})}})),this.subscriptions.add(e.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.AppVersion))).pipe((0,h.mergeMap)((e=>g.decrypt(e.metadata.AppVersion,t.secret)))).subscribe({next:t=>{this.storage.setItem(v.APP_VERSION_KEY,t)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appversion"})}})),this.subscriptions.add(e.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.ChainId&&void 0!==t.metadata.JsonRpcUrl))).pipe((0,h.mergeMap)((e=>(0,l.zip)(g.decrypt(e.metadata.ChainId,t.secret),g.decrypt(e.metadata.JsonRpcUrl,t.secret))))).pipe((0,h.distinctUntilChanged)()).subscribe({next:([t,e])=>{this.chainCallback&&this.chainCallback(t,e)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}})),this.subscriptions.add(e.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.EthereumAddress))).pipe((0,h.mergeMap)((e=>g.decrypt(e.metadata.EthereumAddress,t.secret)))).subscribe({next:t=>{this.accountsCallback&&this.accountsCallback([t]),S.accountRequestCallbackIds.size>0&&(Array.from(S.accountRequestCallbackIds.values()).forEach((e=>{const n=(0,A.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.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}}));const n=this.options.uiConstructor({linkAPIUrl:this.options.linkAPIUrl,version:this.options.version,darkMode:this.options.darkMode,session:t,connected$:e.connected$});return e.connect(),{session:t,ui:n,connection:e}}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;const i=this.ui.isStandalone();try{this.subscriptions.unsubscribe()}catch(t){null===(e=this.diagnostic)||void 0===e||e.log(d.EVENTS.GENERAL_ERROR,{message:"Had error unsubscribing"})}null===(n=this.diagnostic)||void 0===n||n.log(d.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const o=b.Session.load(this.storage);if((null==o?void 0:o.id)===this._session.id?this.storage.clear():o&&(null===(r=this.diagnostic)||void 0===r||r.log(d.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:b.Session.hash(o.id)})),this._reloadOnDisconnect)return void this.ui.reloadUI();this.accountsCallback&&this.accountsCallback([],!0);const{session:a,ui:s,connection:u}=this.subscribe();this._session=a,this.connection=u,this.ui=s,i&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.attachUI()}),(t=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(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:w.Web3Method.signEthereumMessage,params:{message:(0,y.hexStringFromBuffer)(t,!0),address:e,addPrefix:n,typedDataJson:r||null}})}ethereumAddressFromSignedMessage(t,e,n){return this.sendRequest({method:w.Web3Method.ethereumAddressFromSignedMessage,params:{message:(0,y.hexStringFromBuffer)(t,!0),signature:(0,y.hexStringFromBuffer)(e,!0),addPrefix:n}})}signEthereumTransaction(t){return this.sendRequest({method:w.Web3Method.signEthereumTransaction,params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,y.bigIntStringFromBN)(t.weiValue),data:(0,y.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,y.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.gasPriceInWei?(0,y.bigIntStringFromBN)(t.gasPriceInWei):null,maxPriorityFeePerGas:t.gasPriceInWei?(0,y.bigIntStringFromBN)(t.gasPriceInWei):null,gasLimit:t.gasLimit?(0,y.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(t){return this.sendRequest({method:w.Web3Method.signEthereumTransaction,params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,y.bigIntStringFromBN)(t.weiValue),data:(0,y.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,y.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.maxFeePerGas?(0,y.bigIntStringFromBN)(t.maxFeePerGas):null,maxPriorityFeePerGas:t.maxPriorityFeePerGas?(0,y.bigIntStringFromBN)(t.maxPriorityFeePerGas):null,gasLimit:t.gasLimit?(0,y.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!0}})}submitEthereumTransaction(t,e){return this.sendRequest({method:w.Web3Method.submitEthereumTransaction,params:{signedTransaction:(0,y.hexStringFromBuffer)(t,!0),chainId:e}})}scanQRCode(t){return this.sendRequest({method:w.Web3Method.scanQRCode,params:{regExp:t}})}getQRCodeUrl(){return(0,y.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1)}genericRequest(t,e){return this.sendRequest({method:w.Web3Method.generic,params:{action:e,data:t}})}sendGenericMessage(t){return this.sendRequest(t)}sendRequest(t){let e=null;const n=(0,y.randomBytesHex)(8),r=r=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,t.method,r),null==e||e()};return{promise:new Promise(((i,o)=>{this.ui.isStandalone()||(e=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:r,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,(t=>{if(null==e||e(),t.errorMessage)return o(new Error(t.errorMessage));i(t)})),this.ui.isStandalone()?this.sendRequestStandalone(n,t):this.publishWeb3RequestEvent(n,t)})),cancel:r}}setConnectDisabled(t){this.ui.setConnectDisabled(t)}setAccountsCallback(t){this.accountsCallback=t}setChainCallback(t){this.chainCallback=t}publishWeb3RequestEvent(t,e){var n;const r=(0,_.Web3RequestMessage)({id:t,request:e}),i=b.Session.load(this.storage);null===(n=this.diagnostic)||void 0===n||n.log(d.EVENTS.WEB3_REQUEST,{eventId:r.id,method:"relay::"+r.request.method,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?b.Session.hash(i.id):"",isSessionMismatched:((null==i?void 0:i.id)!==this._session.id).toString()}),this.subscriptions.add(this.publishEvent("Web3Request",r,!0).subscribe({next:t=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(d.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:r.id,method:"relay::"+r.request.method,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?b.Session.hash(i.id):"",isSessionMismatched:((null==i?void 0:i.id)!==this._session.id).toString()})},error:t=>{this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:r.id,response:{method:r.request.method,errorMessage:t.message}}))}}))}publishWeb3RequestCanceledEvent(t){const e=(0,M.Web3RequestCanceledMessage)(t);this.subscriptions.add(this.publishEvent("Web3RequestCanceled",e,!1).subscribe())}publishEvent(t,e,n){const r=this.session.secret;return new l.Observable((t=>{g.encrypt(JSON.stringify(Object.assign(Object.assign({},e),{origin:location.origin})),r).then((e=>{t.next(e),t.complete()}))})).pipe((0,h.mergeMap)((e=>this.connection.publishEvent(t,e,n))))}handleIncomingEvent(t){try{this.subscriptions.add(g.decrypt(t.data,this.session.secret).pipe((0,h.map)((t=>JSON.parse(t)))).subscribe({next:t=>{const e=(0,A.isWeb3ResponseMessage)(t)?t:null;e&&this.handleWeb3ResponseMessage(e)},error:()=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}))}catch(t){return}}handleWeb3ResponseMessage(t){var e;const{response:n}=t;if(null===(e=this.diagnostic)||void 0===e||e.log(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,A.Web3ResponseMessage)({id:t,response:(0,E.ErrorResponse)(e,(null!=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:w.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},e=(0,y.randomBytesHex)(8),n=n=>{this.publishWeb3RequestCanceledEvent(e),this.handleErrorResponse(e,t.method,n)};return{promise:new Promise(((r,i)=>{var o;this.relayEventManager.callbacks.set(e,(t=>{if(this.ui.hideRequestEthereumAccounts(),t.errorMessage)return i(new Error(t.errorMessage));r(t)}));const a=(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)||null;if(a&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a))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,A.Web3ResponseMessage)({id:e,response:(0,E.RequestEthereumAccountsResponse)(t)}))};this.ui.requestEthereumAccounts({onCancel:n,onAccounts:t})}else{const t=c.ethErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>n(t)})}S.accountRequestCallbackIds.add(e),this.ui.inlineAccountsResponse()||this.ui.isStandalone()||this.publishWeb3RequestEvent(e,t)}})),cancel:n}}selectProvider(t){const e={method:w.Web3Method.selectProvider,params:{providerOptions:t}},n=(0,y.randomBytesHex)(8);return{cancel:t=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,t)},promise:new Promise(((e,r)=>{this.relayEventManager.callbacks.set(n,(t=>{if(t.errorMessage)return r(new Error(t.errorMessage));e(t)})),this.ui.selectProvider&&this.ui.selectProvider({onApprove:t=>{this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:n,response:(0,E.SelectProviderResponse)(t)}))},onCancel:t=>{this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:n,response:(0,E.SelectProviderResponse)(m.ProviderType.Unselected)}))},providerOptions:t})}))}}watchAsset(t,e,n,r,i,o){const a={method:w.Web3Method.watchAsset,params:{type:t,options:{address:e,symbol:n,decimals:r,image:i},chainId:o}};let s=null;const u=(0,y.randomBytesHex)(8),c=t=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,a.method,t),null==s||s()};return this.ui.inlineWatchAsset()||(s=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:c,onResetConnection:this.resetAndReload})),{cancel:c,promise:new Promise(((c,l)=>{this.relayEventManager.callbacks.set(u,(t=>{if(null==s||s(),t.errorMessage)return l(new Error(t.errorMessage));c(t)}));this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:()=>{this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:u,response:(0,E.WatchAssetReponse)(!0)}))},onCancel:t=>{this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:u,response:(0,E.WatchAssetReponse)(!1)}))},type:t,address:e,symbol:n,decimals:r,image:i,chainId:o}),this.ui.inlineWatchAsset()||this.ui.isStandalone()||this.publishWeb3RequestEvent(u,a)}))}}addEthereumChain(t,e,n,r,i,o){const a={method:w.Web3Method.addEthereumChain,params:{chainId:t,rpcUrls:e,blockExplorerUrls:r,chainName:i,iconUrls:n,nativeCurrency:o}};let s=null;const u=(0,y.randomBytesHex)(8),c=t=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,a.method,t),null==s||s()};return this.ui.inlineAddEthereumChain(t)||(s=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:c,onResetConnection:this.resetAndReload})),{promise:new Promise(((e,n)=>{this.relayEventManager.callbacks.set(u,(t=>{if(null==s||s(),t.errorMessage)return n(new Error(t.errorMessage));e(t)}));this.ui.inlineAddEthereumChain(t)&&this.ui.addEthereumChain({onCancel:t=>{this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:u,response:(0,E.AddEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:t=>{this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:u,response:(0,E.AddEthereumChainResponse)({isApproved:!0,rpcUrl:t})}))},chainId:a.params.chainId,rpcUrls:a.params.rpcUrls,blockExplorerUrls:a.params.blockExplorerUrls,chainName:a.params.chainName,iconUrls:a.params.iconUrls,nativeCurrency:a.params.nativeCurrency}),this.ui.inlineAddEthereumChain(t)||this.ui.isStandalone()||this.publishWeb3RequestEvent(u,a)})),cancel:c}}switchEthereumChain(t){const e={method:w.Web3Method.switchEthereumChain,params:{chainId:t}};let n=null;const r=(0,y.randomBytesHex)(8),i=t=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,e.method,t),null==n||n()};return this.ui.inlineSwitchEthereumChain()||(n=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload})),{promise:new Promise(((t,i)=>{this.relayEventManager.callbacks.set(r,(e=>(null==n||n(),e.errorMessage&&e.errorCode?i(c.ethErrors.provider.custom({code:e.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):e.errorMessage?i(new Error(e.errorMessage)):void t(e)))),this.ui.switchEthereumChain({onCancel:t=>{if("number"==typeof t){const e=t;this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:r,response:(0,E.ErrorResponse)(w.Web3Method.switchEthereumChain,p.WalletUIError.SwitchEthereumChainUnsupportedChainId.message,e)}))}else t instanceof p.WalletUIError?this.handleErrorResponse(r,w.Web3Method.switchEthereumChain,t,t.errorCode):this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:r,response:(0,E.SwitchEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:t=>{this.handleWeb3ResponseMessage((0,A.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 b.Session.hash(this._session.id)}sendRequestStandalone(t,e){const n=n=>{this.handleErrorResponse(t,e.method,n)},r=e=>{this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:t,response:e}))};switch(e.method){case w.Web3Method.signEthereumMessage:this.ui.signEthereumMessage({request:e,onSuccess:r,onCancel:n});break;case w.Web3Method.signEthereumTransaction:this.ui.signEthereumTransaction({request:e,onSuccess:r,onCancel:n});break;case w.Web3Method.submitEthereumTransaction:this.ui.submitEthereumTransaction({request:e,onSuccess:r,onCancel:n});break;case w.Web3Method.ethereumAddressFromSignedMessage:this.ui.ethereumAddressFromSignedMessage({request:e,onSuccess:r});break;default:n()}}onSessionConfigChanged(t){}}S.accountRequestCallbackIds=new Set,o([u.default],S.prototype,"resetAndReload",null),o([u.default],S.prototype,"handleIncomingEvent",null),e.WalletSDKRelay=S},function(t,e,n){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},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKConnection=void 0;const r=n(48),i=n(69),o=n(90),a=n(68),s=n(213),u=n(89),c=n(214),l=n(215);e.WalletSDKConnection=class{constructor(t,e,n,s,l=WebSocket){this.sessionId=t,this.sessionKey=e,this.diagnostic=s,this.subscriptions=new r.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,a.IntNumber)(1),this.connectedSubject=new r.BehaviorSubject(!1),this.linkedSubject=new r.BehaviorSubject(!1),this.sessionConfigSubject=new r.ReplaySubject(1);const h=new c.RxWebSocket(n+"/rpc",l);this.ws=h,this.subscriptions.add(h.connectionState$.pipe((0,i.tap)((e=>{var n;return null===(n=this.diagnostic)||void 0===n?void 0:n.log(u.EVENTS.CONNECTED_STATE_CHANGE,{state:e,sessionIdHash:o.Session.hash(t)})})),(0,i.skip)(1),(0,i.filter)((t=>t===c.ConnectionState.DISCONNECTED&&!this.destroyed)),(0,i.delay)(5e3),(0,i.filter)((t=>!this.destroyed)),(0,i.flatMap)((t=>h.connect())),(0,i.retry)()).subscribe()),this.subscriptions.add(h.connectionState$.pipe((0,i.skip)(2),(0,i.switchMap)((t=>(0,r.iif)((()=>t===c.ConnectionState.CONNECTED),this.authenticate().pipe((0,i.tap)((t=>this.sendIsLinked())),(0,i.tap)((t=>this.sendGetSessionConfig())),(0,i.map)((t=>!0))),(0,r.of)(!1)))),(0,i.distinctUntilChanged)(),(0,i.catchError)((t=>(0,r.of)(!1)))).subscribe((t=>this.connectedSubject.next(t)))),this.subscriptions.add(h.connectionState$.pipe((0,i.skip)(1),(0,i.switchMap)((t=>(0,r.iif)((()=>t===c.ConnectionState.CONNECTED),(0,r.timer)(0,1e4))))).subscribe((t=>0===t?this.updateLastHeartbeat():this.heartbeat()))),this.subscriptions.add(h.incomingData$.pipe((0,i.filter)((t=>"h"===t))).subscribe((t=>this.updateLastHeartbeat()))),this.subscriptions.add(h.incomingJSONData$.pipe((0,i.filter)((t=>["IsLinkedOK","Linked"].includes(t.type)))).subscribe((e=>{var n;const r=e;null===(n=this.diagnostic)||void 0===n||n.log(u.EVENTS.LINKED,{sessionIdHash:o.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.diagnostic)||void 0===n||n.log(u.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:o.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.diagnostic)||void 0===t||t.log(u.EVENTS.STARTED_CONNECTING,{sessionIdHash:o.Session.hash(this.sessionId)}),this.ws.connect().subscribe()}destroy(){var t;this.subscriptions.unsubscribe(),this.ws.disconnect(),null===(t=this.diagnostic)||void 0===t||t.log(u.EVENTS.DISCONNECTED,{sessionIdHash:o.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,s.ClientMessageSetSessionConfig)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId,metadata:{[t]:e}});return this.onceConnected$.pipe((0,i.flatMap)((t=>this.makeRequest(n))),(0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to set session metadata")})))}publishEvent(t,e,n=!1){const r=(0,s.ClientMessagePublishEvent)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId,event:t,data:e,callWebhook:n});return this.onceLinked$.pipe((0,i.flatMap)((t=>this.makeRequest(r))),(0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to publish event");return t.eventId})))}sendData(t){this.ws.sendData(JSON.stringify(t))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>2e4)this.ws.disconnect();else try{this.ws.sendData("h")}catch(t){}}makeRequest(t,e=6e4){const n=t.id;try{this.sendData(t)}catch(t){return(0,r.throwError)(t)}return this.ws.incomingJSONData$.pipe((0,i.timeoutWith)(e,(0,r.throwError)(new Error(`request ${n} timed out`))),(0,i.filter)((t=>t.id===n)),(0,i.take)(1))}authenticate(){const t=(0,s.ClientMessageHostSession)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId,sessionKey:this.sessionKey});return this.makeRequest(t).pipe((0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to authentcate")})))}sendIsLinked(){const t=(0,s.ClientMessageIsLinked)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(t)}sendGetSessionConfig(){const t=(0,s.ClientMessageGetSessionConfig)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(t)}}},function(t,e,n){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)}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.RxWebSocket=e.ConnectionState=void 0;const r=n(48),i=n(69);var o;!function(t){t[t.DISCONNECTED=0]="DISCONNECTED",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED"}(o=e.ConnectionState||(e.ConnectionState={})),e.RxWebSocket=class{constructor(t,e=WebSocket){this.WebSocketClass=e,this.webSocket=null,this.connectionStateSubject=new r.BehaviorSubject(o.DISCONNECTED),this.incomingDataSubject=new r.Subject,this.url=t.replace(/^http/,"ws")}connect(){return this.webSocket?(0,r.throwError)(new Error("webSocket object is not null")):new r.Observable((t=>{let e;try{this.webSocket=e=new this.WebSocketClass(this.url)}catch(e){return void t.error(e)}this.connectionStateSubject.next(o.CONNECTING),e.onclose=e=>{this.clearWebSocket(),t.error(new Error(`websocket error ${e.code}: ${e.reason}`)),this.connectionStateSubject.next(o.DISCONNECTED)},e.onopen=e=>{t.next(),t.complete(),this.connectionStateSubject.next(o.CONNECTED)},e.onmessage=t=>{this.incomingDataSubject.next(t.data)}})).pipe((0,i.take)(1))}disconnect(){const{webSocket:t}=this;if(t){this.clearWebSocket(),this.connectionStateSubject.next(o.DISCONNECTED);try{t.close()}catch(t){}}}get connectionState$(){return this.connectionStateSubject.asObservable()}get incomingData$(){return this.incomingDataSubject.asObservable()}get incomingJSONData$(){return this.incomingData$.pipe((0,i.flatMap)((t=>{let e;try{e=JSON.parse(t)}catch(t){return(0,r.empty)()}return(0,r.of)(e)})))}sendData(t){const{webSocket:e}=this;if(!e)throw new Error("websocket is not connected");e.send(t)}clearWebSocket(){const{webSocket:t}=this;t&&(this.webSocket=null,t.onclose=null,t.onerror=null,t.onmessage=null,t.onopen=null)}}},function(t,e,n){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}},function(t,e,n){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)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.decrypt=e.encrypt=void 0;const r=n(48),i=n(38);e.encrypt=async function(t,e){if(64!==e.length)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),r=await crypto.subtle.importKey("raw",(0,i.hexStringToUint8Array)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=new TextEncoder,a=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},r,o.encode(t)),s=a.slice(a.byteLength-16),u=a.slice(0,a.byteLength-16),c=new Uint8Array(s),l=new Uint8Array(u),h=new Uint8Array([...n,...c,...l]);return(0,i.uint8ArrayToHex)(h)},e.decrypt=function(t,e){if(64!==e.length)throw Error("secret must be 256 bits");return new r.Observable((n=>{!async function(){const r=await crypto.subtle.importKey("raw",(0,i.hexStringToUint8Array)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,i.hexStringToUint8Array)(t),a=o.slice(0,12),s=o.slice(12,28),u=o.slice(28),c=new Uint8Array([...u,...s]),l={name:"AES-GCM",iv:new Uint8Array(a)};try{const t=await window.crypto.subtle.decrypt(l,r,c),e=new TextDecoder;n.next(e.decode(t)),n.complete()}catch(t){n.error(t)}}()}))}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.Web3RequestCanceledMessage=void 0;const r=n(100);e.Web3RequestCanceledMessage=function(t){return{type:r.RelayMessageType.WEB3_REQUEST_CANCELED,id:t}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.Web3RequestMessage=void 0;const r=n(100);e.Web3RequestMessage=function(t){return Object.assign({type:r.RelayMessageType.WEB3_REQUEST},t)}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumAddressFromSignedMessageResponse=e.SubmitEthereumTransactionResponse=e.SignEthereumTransactionResponse=e.SignEthereumMessageResponse=e.isRequestEthereumAccountsResponse=e.SelectProviderResponse=e.WatchAssetReponse=e.RequestEthereumAccountsResponse=e.SwitchEthereumChainResponse=e.AddEthereumChainResponse=e.ErrorResponse=void 0;const r=n(125);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.SelectProviderResponse=function(t){return{method:r.Web3Method.selectProvider,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}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.isWeb3ResponseMessage=e.Web3ResponseMessage=void 0;const r=n(100);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}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelayEventManager=void 0;const r=n(38);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}}},function(t){t.exports=JSON.parse('{"name":"@coinbase/wallet-sdk","version":"3.4.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","buffer":"^6.0.3","clsx":"^1.1.0","eth-block-tracker":"4.4.3","eth-json-rpc-filters":"4.2.2","eth-rpc-errors":"4.0.2","json-rpc-engine":"6.1.0","keccak":"^3.0.1","preact":"^10.5.9","qs":"^6.10.3","rxjs":"^6.6.3","sha.js":"^2.4.11","stream-browserify":"^3.0.0","util":"^0.12.4"},"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","@types/sha.js":"^2.4.0","@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","jest-websocket-mock":"^2.3.0","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"}}')},function(t,e,n){function r(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function i(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}n.r(e),n.d(e,"Mutex",(function(){return a})),n.d(e,"Semaphore",(function(){return o})),n.d(e,"withTimeout",(function(){return s}));var o=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}(),a=function(){function t(){this._semaphore=new o(1)}return t.prototype.acquire=function(){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this._semaphore.acquire()];case 1:return[2,t.sent()[1]]}}))}))},t.prototype.runExclusive=function(t){return this._semaphore.runExclusive((function(){return t()}))},t.prototype.isLocked=function(){return this._semaphore.isLocked()},t.prototype.release=function(){this._semaphore.release()},t}();function s(t,e,n){var o=this;return void 0===n&&(n=new Error("timeout")),{acquire:function(){return new Promise((function(a,s){return r(o,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return r=!1,setTimeout((function(){r=!0,s(n)}),e),[4,t.acquire()];case 1:return o=i.sent(),r?(Array.isArray(o)?o[1]:o)():a(o),[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()}}}}]);void 0===TH&&console.error("esm-webpack-plugin: nothing exported!"),TH.CoinbaseWalletProvider;const xH=TH.CoinbaseWalletSDK;class LH{constructor({blockchain:t,from:e,to:n,value:r,api:i,method:o,params:a,instructions:s,sent:u,succeeded:c,failed:l}){this.blockchain=t,this.from=e&&e.match("0x")?cp(e):e,this.to=n&&n.match("0x")?cp(n):n,this.value=function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([LH,"access",t=>t.bigNumberify,"call",e=>e(r,t),"optionalAccess",t=>t.toString,"call",t=>t()]),this.api=i,this.method=o,this.params=a,this.sent=u,this.succeeded=c,this.failed=l,this.instructions=s,this._succeeded=!1,this._failed=!1}async prepare({wallet:t}){this.from=await t.account()}static bigNumberify(t,e){return"number"==typeof t?BM(t.toString(),UM[e].DECIMALS):t&&t.toString?Wd.from(t.toString()):t}getContractArguments(){let t=this.getContract().interface.fragments.find((t=>t.name==this.method));return this.params instanceof Array?this.params:this.params instanceof Object?t.inputs.map((t=>this.params[t.name])):void 0}getContract(){return new bw(this.to,this.api)}async getData(){let t,e=this.getContractArguments();return t=e?await this.getContract().populateTransaction[this.method].apply(null,e):await this.getContract().populateTransaction[this.method].apply(null),t.data}success(){return this._succeeded?Promise.resolve(this):new Promise(((t,e)=>{let n=this.succeeded;this.succeeded=e=>{n&&n(e),t(e)}}))}failure(){return this._failed?Promise.resolve(this):new Promise(((t,e)=>{let n=this.failed;this.failed=(e,r)=>{n&&n(e,r),t(e,r)}}))}}let IH=["ethereum","bsc","polygon","velas"];IH.evm=["ethereum","bsc","polygon","velas"],IH.solana=[];class jH extends IM{constructor(t,e,n){super(t),this._network=e,this._endpoint=t,this._endpoints=n}detectNetwork(){return Promise.resolve(qh(this._network).id)}requestChunk(t,e){const n=t.map((t=>t.request));return Ow(e,JSON.stringify(n)).then((e=>{t.forEach(((t,n)=>{const r=e[n];if(r.error){const e=new Error(r.error.message);e.code=r.error.code,e.data=r.error.data,t.reject(e)}else t.resolve(r.result)}))})).catch((e=>{if(e&&"SERVER_ERROR"==e.code){const e=this._endpoints.indexOf(this._endpoint)+1;this._endpoint=e>=this._endpoints.length?this._endpoints[0]:this._endpoints[e],this.requestChunk(t,this._endpoint)}else t.forEach((t=>{t.reject(e)}))}))}send(t,e){const n={method:t,params:e,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const r={request:n,resolve:null,reject:null},i=new Promise(((t,e)=>{r.resolve=t,r.reject=e}));return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const t=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const e=[];for(let n=0;n<Math.ceil(t.length/99);n++)e[n]=t.slice(99*n,99*(n+1));e.forEach((t=>(t.map((t=>t.request)),this.requestChunk(t,this._endpoint))))}),10)),i}}let CH=()=>"object"==typeof fh?fh:window;const DH={ethereum:["https://rpc.ankr.com/eth","https://eth-mainnet-public.unifra.io","https://ethereum.publicnode.com"],bsc:["https://bsc-dataseed.binance.org","https://bsc-dataseed1.ninicoin.io","https://bsc-dataseed3.defibit.io"],polygon:["https://polygon-rpc.com","https://poly-rpc.gateway.pokt.network","https://matic-mainnet.chainstacklabs.com"],velas:["https://mainnet.velas.com/rpc","https://evmexplorer.velas.com/rpc","https://explorer.velas.com/rpc"]},OH=()=>(null==CH()._clientProviders&&(CH()._clientProviders={}),CH()._clientProviders),PH=(t,e)=>{OH()[t]=e},zH=async(t,e)=>{let n,r=CH();if(null==r.fetch||void 0!==Rh&&Rh.env&&"test"==Rh.env.NODE_ENV||void 0!==r.cy)n=e[0];else{let t=await Promise.all(e.map((t=>new Promise((async e=>{let n=(new Date).getTime();setTimeout((()=>e(900)),900);if(!(await fetch(t,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({method:"net_version",id:1,jsonrpc:"2.0"})})).ok)return e(999);let r=(new Date).getTime();e(r-n)})))));const r=Math.min(...t);n=e[t.indexOf(r)]}PH(t,new jH(n,t,e))};var RH=async t=>{let e=OH();if(e&&e[t])return e[t];let n=CH();return n._getProviderPromise&&n._getProviderPromise[t]||(n._getProviderPromise||(n._getProviderPromise={}),n._getProviderPromise[t]=new Promise((async e=>{await zH(t,DH[t]),e(CH()._clientProviders[t])}))),await n._getProviderPromise[t]};let BH=()=>(null==CH()._cacheStore&&FH(),CH()._cacheStore),UH=()=>(null==CH()._promiseStore&&FH(),CH()._promiseStore),FH=()=>{CH()._cacheStore={},CH()._promiseStore={},CH()._clientProviders={}},YH=function({key:t}){UH()[t]=void 0},QH=function({call:t,key:e,expires:n=0}){return new Promise(((r,i)=>{let o,a=function({key:t}){return UH()[t]}({key:e=JSON.stringify(e)});if(a)return a.then(r).catch(i);(function({key:t,promise:e}){return UH()[t]=e,e})({key:e,promise:new Promise(((a,s)=>0===n?t().then((t=>{r(t),a(t)})).catch((t=>{i(t),s(t)})):(o=function({key:t,expires:e}){let n=BH()[t];if(function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([n,"optionalAccess",t=>t.expiresAt])>Date.now())return n.value}({key:e,expires:n}),o?(r(o),a(o),o):void t().then((t=>{t&&function({key:t,value:e,expires:n}){BH()[t]={expiresAt:Date.now()+n,value:e}}({key:e,value:t,expires:n}),r(t),a(t)})).catch((t=>{i(t),s(t)})))))}).then((()=>{YH({key:e})})).catch((()=>{YH({key:e})}))}))};let WH=({address:t,api:e,method:n,params:r,provider:i,block:o})=>{let a=new bw(t,e,i),s=(({contract:t,method:e,params:n})=>t.interface.fragments.find((t=>t.name==e)).inputs.map(((t,e)=>Array.isArray(n)?n[e]:n[t.name])))({contract:a,method:n,params:r});return a[n](...s,{blockTag:o})};let HH=async function(t,e){let{blockchain:n,address:r,method:i}=(t=>{if("object"==typeof t)return t;let e=t.match(/(?<blockchain>\w+):\/\/(?<part1>[\w\d]+)(\/(?<part2>[\w\d]+)*)?/);return null==e.groups.part2?e.groups.part1.match(/\d/)?{blockchain:e.groups.blockchain,address:e.groups.part1}:{blockchain:e.groups.blockchain,method:e.groups.part1}:{blockchain:e.groups.blockchain,address:e.groups.part1,method:e.groups.part2}})(t),{api:o,params:a,cache:s,block:u}=("object"==typeof t?t:e)||{};return await QH({expires:s||0,key:[n,r,i,a,u],call:async()=>{if(IH.evm.includes(n))return(async({blockchain:t,address:e,api:n,method:r,params:i,block:o})=>{const a=await RH(t);return n?WH({address:e,api:n,method:r,params:i,provider:a,block:o}):"latestBlockNumber"===r?a.getBlockNumber():"balance"===r?(({address:t,provider:e})=>e.getBalance(t))({address:e,provider:a}):"transactionCount"===r?(({address:t,provider:e})=>e.getTransactionCount(t))({address:e,provider:a}):void 0})({blockchain:n,address:r,api:o,method:i,params:a,block:u});throw"Unknown blockchain: "+n}})};const GH=({transaction:t,provider:e,signer:n})=>t.method?qH({transaction:t,signer:n,provider:e}):ZH({transaction:t,signer:n}),qH=({transaction:t,signer:e,provider:n})=>{let r=new bw(t.to,t.api,n),i=t.getContractArguments({contract:r}),o=r.connect(e)[t.method];return i?o(...i,{value:LH.bigNumberify(t.value,t.blockchain)}):o({value:LH.bigNumberify(t.value,t.blockchain)})},ZH=({transaction:t,signer:e})=>e.sendTransaction({to:t.to,value:LH.bigNumberify(t.value,t.blockchain)});let VH=["ethereum","bsc","polygon","velas"];function JH(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}VH.evm=["ethereum","bsc","polygon","velas"],VH.solana=[];class KH{static __initStatic(){this.info={name:"Wallet (Ethereum)",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA0NDYuNCAzNzYuOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDQ2LjQgMzc2Ljg7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojODI4NDg3O30KCS5zdDF7ZmlsbDojMzQzNDM0O30KCS5zdDJ7ZmlsbDojOEM4QzhDO30KCS5zdDN7ZmlsbDojM0MzQzNCO30KCS5zdDR7ZmlsbDojMTQxNDE0O30KCS5zdDV7ZmlsbDojMzkzOTM5O30KPC9zdHlsZT4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTM4MS43LDExMC4yaDY0LjdWNDYuNWMwLTI1LjctMjAuOC00Ni41LTQ2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S40eiIvPgo8ZyBpZD0iTGF5ZXJfeDAwMjBfMSI+Cgk8ZyBpZD0iXzE0MjEzOTQzNDI0MDAiPgoJCTxnPgoJCQk8cG9seWdvbiBjbGFzcz0ic3QxIiBwb2ludHM9IjEyOSwxNjYuMiAxMjguNywxNjcuMyAxMjguNywyMDEuNCAxMjksMjAxLjcgMTQ0LjgsMTkyLjQgCQkJIi8+CgkJCTxwb2x5Z29uIGNsYXNzPSJzdDIiIHBvaW50cz0iMTI5LDE2Ni4yIDExMy4yLDE5Mi40IDEyOSwyMDEuNyAxMjksMTg1LjIgCQkJIi8+CgkJCTxwb2x5Z29uIGNsYXNzPSJzdDMiIHBvaW50cz0iMTI5LDIwNC43IDEyOC44LDIwNC45IDEyOC44LDIxNyAxMjksMjE3LjYgMTQ0LjgsMTk1LjQgCQkJIi8+CgkJCTxwb2x5Z29uIGNsYXNzPSJzdDIiIHBvaW50cz0iMTI5LDIxNy42IDEyOSwyMDQuNyAxMTMuMiwxOTUuNCAJCQkiLz4KCQkJPHBvbHlnb24gY2xhc3M9InN0NCIgcG9pbnRzPSIxMjksMjAxLjcgMTQ0LjgsMTkyLjQgMTI5LDE4NS4yIAkJCSIvPgoJCQk8cG9seWdvbiBjbGFzcz0ic3Q1IiBwb2ludHM9IjExMy4yLDE5Mi40IDEyOSwyMDEuNyAxMjksMTg1LjIgCQkJIi8+CgkJPC9nPgoJPC9nPgo8L2c+Cjwvc3ZnPgo=",blockchains:VH.evm}}static __initStatic2(){this.isAvailable=()=>JH([window,"optionalAccess",t=>t.ethereum])&&!JH([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isMetaMask])&&!(JH([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isCoinbaseWallet])||JH([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isWalletLink]))}constructor(){this.name=this.constructor.info.name,this.logo=this.constructor.info.logo,this.blockchains=this.constructor.info.blockchains,this.sendTransaction=t=>(async({transaction:t,wallet:e})=>{if(t=new LH(t),0==await e.connectedTo(t.blockchain)&&await e.switchTo(t.blockchain),0==await e.connectedTo(t.blockchain))throw{code:"WRONG_NETWORK"};await t.prepare({wallet:e});let n=await HH({blockchain:t.blockchain,method:"transactionCount",address:t.from});t.nonce=n;let r=new OM(window.ethereum,"any"),i=r.getSigner(0);return await GH({transaction:t,provider:r,signer:i}).then((e=>{if(!e)throw"Submitting transaction failed!";t.id=e.hash,t.nonce=e.nonce||n,t.url=qh(t.blockchain).explorerUrlFor({transaction:t}),t.sent&&t.sent(t),e.wait(1).then((()=>{t._succeeded=!0,t.succeeded&&t.succeeded(t)})).catch((e=>{e&&e.code&&"TRANSACTION_REPLACED"==e.code?(e.replacement&&e.replacement.hash&&(t.id=e.replacement.hash,t.url=qh(t.blockchain).explorerUrlFor({transaction:t})),e.replacement&&e.replacement.hash&&e.receipt&&1==e.receipt.status?(t._succeeded=!0,t.succeeded&&t.succeeded(t)):e.replacement&&e.replacement.hash&&e.receipt&&0==e.receipt.status&&(t._failed=!0,t.failed&&t.failed(t,e))):(t._failed=!0,t.failed&&t.failed(t,e))}))})),t})({wallet:this,transaction:t})}async account(){if(!JH([window,"optionalAccess",t=>t.ethereum]))return;return(await window.ethereum.request({method:"eth_accounts"})).map((t=>cp(t)))[0]}async connect(){if(!JH([window,"optionalAccess",t=>t.ethereum]))return;return(await window.ethereum.request({method:"eth_requestAccounts"})).map((t=>cp(t)))[0]}on(t,e){let n;if("account"===t)n=t=>e(cp(t[0])),window.ethereum.on("accountsChanged",n);return n}off(t,e){if("account"===t)window.ethereum.removeListener("accountsChanged",e);return e}async connectedTo(t){const e=Hh(await window.ethereum.request({method:"eth_chainId"}));return t?t===e.name:e.name}addNetwork(t){return new Promise(((e,n)=>{const r=qh(t);window.ethereum.request({method:"wallet_addEthereumChain",params:[{chainId:r.id,chainName:r.fullName,nativeCurrency:{name:r.currency.name,symbol:r.currency.symbol,decimals:r.currency.decimals},rpcUrls:[r.rpc],blockExplorerUrls:[r.explorer],iconUrls:[r.logo]}]}).then(e).catch(n)}))}switchTo(t){return new Promise(((e,n)=>{const r=qh(t);window.ethereum.request({method:"wallet_switchEthereumChain",params:[{chainId:r.id}]}).then(e).catch((r=>{4902===r.code?this.addNetwork(t).then((()=>this.switchTo(t).then(e))).catch(n):n(r)}))}))}async sign(t){await this.account();let e=new OM(window.ethereum,"any").getSigner(0);return await e.signMessage(t)}}function XH(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}KH.__initStatic(),KH.__initStatic2();class $H extends KH{static __initStatic(){this.info={name:"Coinbase",logo:"data:image/svg+xml;base64,PHN2ZyBpZD0nTGF5ZXJfMScgZGF0YS1uYW1lPSdMYXllciAxJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHhtbG5zOnhsaW5rPSdodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rJyB2aWV3Qm94PScwIDAgNDg4Ljk2IDQ4OC45Nic+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50KTt9LmNscy0ye2ZpbGw6IzQzNjFhZDt9PC9zdHlsZT48bGluZWFyR3JhZGllbnQgaWQ9J2xpbmVhci1ncmFkaWVudCcgeDE9JzI1MCcgeTE9JzcuMzUnIHgyPScyNTAnIHkyPSc0OTYuMzInIGdyYWRpZW50VHJhbnNmb3JtPSdtYXRyaXgoMSwgMCwgMCwgLTEsIDAsIDUwMiknIGdyYWRpZW50VW5pdHM9J3VzZXJTcGFjZU9uVXNlJz48c3RvcCBvZmZzZXQ9JzAnIHN0b3AtY29sb3I9JyMzZDViYTknLz48c3RvcCBvZmZzZXQ9JzEnIHN0b3AtY29sb3I9JyM0ODY4YjEnLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cGF0aCBjbGFzcz0nY2xzLTEnIGQ9J00yNTAsNS42OEMxMTQuODcsNS42OCw1LjUyLDExNSw1LjUyLDI1MC4xN1MxMTQuODcsNDk0LjY1LDI1MCw0OTQuNjUsNDk0LjQ4LDM4NS4yOSw0OTQuNDgsMjUwLjE3LDM4NS4xMyw1LjY4LDI1MCw1LjY4Wm0wLDM4Ny41NEExNDMuMDYsMTQzLjA2LDAsMSwxLDM5My4wNSwyNTAuMTcsMTQzLjExLDE0My4xMSwwLDAsMSwyNTAsMzkzLjIyWicgdHJhbnNmb3JtPSd0cmFuc2xhdGUoLTUuNTIgLTUuNjgpJy8+PHBhdGggY2xhc3M9J2Nscy0yJyBkPSdNMjg0LjY5LDI5Ni4wOUgyMTUuMzFhMTEsMTEsMCwwLDEtMTAuOS0xMC45VjIxNS40OGExMSwxMSwwLDAsMSwxMC45LTEwLjkxSDI4NWExMSwxMSwwLDAsMSwxMC45LDEwLjkxdjY5LjcxQTExLjA3LDExLjA3LDAsMCwxLDI4NC42OSwyOTYuMDlaJyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgtNS41MiAtNS42OCknLz48L3N2Zz4=",blockchains:["ethereum","bsc","polygon","velas"]}}static __initStatic2(){this.isAvailable=()=>XH([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isCoinbaseWallet])||XH([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isWalletLink])}}$H.__initStatic(),$H.__initStatic2();class tG extends KH{static __initStatic(){this.info={name:"MetaMask",logo:"data:image/svg+xml;base64,PHN2ZyBpZD0nTGF5ZXJfMScgZGF0YS1uYW1lPSdMYXllciAxJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA0ODUuOTMgNDUwLjU2Jz48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6IzgyODQ4Nzt9LmNscy0ye2ZpbGw6I2UyNzcyNjtzd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A3LjI0IDU4LjEyIDE3OC44OCA1OC4xMiAyMDcuNDEgMTM2LjI4IDIxNC4wNiAyNDYuMDEgMjE2LjM0IDI4MC42MiAyMTYuNTMgMzY1LjgyIDI2OS4yMSAzNjUuODIgMjY5LjU5IDI4MC42MiAyNzIuMDYgMjQ2LjAxJy8+PC9zdmc+",blockchains:["ethereum","bsc","polygon","velas"]}}static __initStatic2(){this.isAvailable=()=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([window,"optionalAccess",t=>t.ethereum,"optionalAccess",t=>t.isMetaMask])}}function eG(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}tG.__initStatic(),tG.__initStatic2();const nG=({transaction:t,wallet:e})=>t.instructions?iG({transaction:t,wallet:e}):rG({transaction:t,wallet:e}),rG=async({transaction:t,wallet:e})=>{let n=new JU(await e.account()),r=new JU(t.to);const i=await AH(t.blockchain);let o=(await i.getLatestBlockhash()).blockhash,a=new fF({recentBlockhash:o,feePayer:n});return a.add(DF.transfer({fromPubkey:n,toPubkey:r,lamports:parseInt(LH.bigNumberify(t.value,t.blockchain),10)})),window.solana.signAndSendTransaction(a)},iG=async({transaction:t,wallet:e})=>{let n=new JU(await e.account());const r=await AH(t.blockchain);let i=(await r.getLatestBlockhash()).blockhash,o=new fF({recentBlockhash:i,feePayer:n});return t.instructions.forEach((t=>{o.add(t)})),window.solana.signAndSendTransaction(o)};let oG=["ethereum","bsc","polygon","solana","velas"];function aG(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}oG.evm=["ethereum","bsc","polygon","velas"],oG.solana=["solana"];class sG{static __initStatic(){this.info={name:"Wallet (Solana)",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA0NDYuNCAzNzYuOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDQ2LjQgMzc2Ljg7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojODI4NDg3O30KCS5zdDF7ZmlsbDp1cmwoI1NWR0lEXzFfKTt9Cgkuc3Qye2ZpbGw6dXJsKCNTVkdJRF8wMDAwMDE2NTIzNDE5NTQ5NTc2MDU4MDgwMDAwMDAwNjMwMzAwNDA2OTM1MjExODk1MV8pO30KCS5zdDN7ZmlsbDp1cmwoI1NWR0lEXzAwMDAwMDkyNDIyMzgxNjc5OTg1OTI5MTcwMDAwMDA2ODU0NzIyMTYxOTE4MTIzNjUzXyk7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMzgxLj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0NS42LDE4OS4xeiIvPgo8L3N2Zz4K",blockchains:oG.solana}}static __initStatic2(){this.isAvailable=()=>aG([window,"optionalAccess",t=>t.solana])&&!aG([window,"optionalAccess",t=>t.solana,"optionalAccess",t=>t.isPhantom])}constructor(){this.name=this.constructor.info.name,this.logo=this.constructor.info.logo,this.blockchains=this.constructor.info.blockchains,this.sendTransaction=t=>(async({transaction:t,wallet:e})=>(t=new LH(t),await t.prepare({wallet:e}),await nG({transaction:t,wallet:e}).then((({signature:e})=>{if(!e)throw"Submitting transaction failed!";{t.id=e,t.url=qh(t.blockchain).explorerUrlFor({transaction:t}),t.sent&&t.sent(t);let n=0;const r=setInterval((async()=>{if(n++,n>=240)return clearInterval(r);const i=await AH(t.blockchain),{value:o}=await i.getSignatureStatus(e),a=eG([o,"optionalAccess",t=>t.confirmationStatus]);if(a&&("confirmed"===a||"finalized"===a)){if(o.err){t._failed=!0;const n=await i.getConfirmedTransaction(e),r=eG([n,"optionalAccess",t=>t.meta,"optionalAccess",t=>t.logMessages])?n.meta.logMessages[n.meta.logMessages.length-1]:null;t.failed&&t.failed(t,r)}else t._succeeded=!0,t.succeeded&&t.succeeded(t);return clearInterval(r)}}),500)}})),t))({wallet:this,transaction:t})}async account(){if(null!=aG([window,"optionalAccess",t=>t.solana])){if(aG([window,"optionalAccess",t=>t.solana,"optionalAccess",t=>t.publicKey]))return window.solana.publicKey.toString();if(1!=aG([window,"optionalAccess",t=>t.solana,"optionalAccess",t=>t.isBraveWallet])){let t;try{({publicKey:t}=await window.solana.connect({onlyIfTrusted:!0}))}catch(t){}if(t)return t.toString()}}}async connect(){if(!aG([window,"optionalAccess",t=>t.solana]))return;let{publicKey:t}=await window.solana.connect();return t.toString()}on(t,e){let n;if("account"===t)n=t=>e(aG([t,"optionalAccess",t=>t.toString,"call",t=>t()])),window.solana.on("accountChanged",n);return n}off(t,e){if("account"===t)console.log("removeListener"),window.solana.removeListener("accountChanged",e);return e}async connectedTo(t){return"solana"==t}switchTo(t){return new Promise(((t,e)=>{e({code:"NOT_SUPPORTED"})}))}addNetwork(t){return new Promise(((t,e)=>{e({code:"NOT_SUPPORTED"})}))}async sign(t){const e=(new TextEncoder).encode(t),n=await window.solana.signMessage(e,"utf8");return JSON.stringify(n.signature)}}sG.__initStatic(),sG.__initStatic2();class uG extends sG{static __initStatic(){this.info={name:"Phantom",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iNjQiIGN5PSI2NCIgcj0iNjQiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcikiLz48cGF0aCBkPSJNMTEwLjU4NCA2NC45MTQySDk5LjE0MkM5OS4xNDIgNDEuNzY1MSA4MC4xNzMgMjMgNTYuNzcyNCAyM0MzMy42NjEyIDIzIDE0Ljg3MTYgNDEuMzA1NyAxNC40MTE4IDY0LjA1ODNDMTMuOTM2IDg3LjU3NyAzNi4yNDEgMTA4IDYwLjAxODYgMTA4SDYzLjAwOTRDODMuOTcyMyAxMDggMTEyLjA2OSA5MS43NjY3IDExNi40NTkgNzEuOTg3NEMxMTcuMjcgNjguMzQxMyAxMTQuMzU4IDY0LjkxNDIgMTEwLjU4NCA2NC45MTQyWk0zOS43Njg5IDY1Ljk0NTRDMzkuNzY4OSA2OS4wNDExIDM3LjIwOTUgNzEuNTcyOSAzNC4wODAyIDcxLjU3MjlDMzAuOTUwOSA3MS41NzI5IDI4LjM5MTYgNjkuMDM5OSAyOC4zOTE2IDY1Ljk0NTRWNTYuODQxNEMyOC4zOTE2IDUzLjc0NTcgMzAuOTUwOSA1MS4yMTM5IDM0LjA4MDIgNTEuMjEzOUMzNy4yMDk1IDUxLjIxMzkgMzkuNzY4OSA1My43NDU3IDM5Ljc2ODkgNTYuODQxNFY2NS45NDU0Wk01OS41MjI0IDY1Ljk0NTRDNTkuNTIyNCA2OS4wNDExIDU2Ljk2MzEgNzEuNTcyOSA1My44MzM4IDcxLjU3MjlDNTAuNzA0NSA3MS41NzI5IDQ4LjE0NTEgNjkuMDM5OSA0OC4xNDUxIDY1Ljk0NTRWNTYuODQxNEM0OC4xNDUxIDUzLjc0NTcgNTAuNzA1NiA1MS4yMTM5IDUzLjgzMzggNTEuMjEzOUM1Ni45NjMxIDUxLjIxMzkgNTkuNTIyNCA1My43NDU3IDU5LjUyMjQgNTYuODQxNFY2NS45NDU0WiIgZmlsbD0idXJsKCNwYWludDFfbGluZWFyKSIvPjxkZWZzPjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhciIgeDE9IjY0IiB5MT0iMCIgeDI9IjY0IiB5Mj0iMTI4IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agc3RvcC1jb2xvcj0iIzUzNEJCMSIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzU1MUJGOSIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJwYWludDFfbGluZWFyIiB4MT0iNjUuNDk5OCIgeTE9IjIzIiB4Mj0iNjUuNDk5OCIgeTI9IjEwOCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IndoaXRlIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSJ3aGl0ZSIgc3RvcC1vcGFjaXR5PSIwLjgyIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PC9zdmc+Cg=",blockchains:oG.solana}}static __initStatic2(){this.isAvailable=()=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([window,"optionalAccess",t=>t.solana,"optionalAccess",t=>t.isPhantom])}}function cG(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}uG.__initStatic(),uG.__initStatic2();const lG=async(t,e)=>{let n;const r=await AH(e);n=await r.getTransaction(t);let i=1;for(;i<=120&&!n;)n=await r.getTransaction(t),await new Promise((t=>setTimeout(t,5e3))),i++;return n},hG=({transaction:t,wallet:e})=>t.method?dG({transaction:t,wallet:e}):fG({transaction:t,wallet:e}),dG=async({transaction:t,wallet:e})=>{const n=await AH(t.blockchain);return e.connector.sendTransaction({from:t.from,to:t.to,value:cG([t,"access",t=>t.value,"optionalAccess",t=>t.toString,"call",t=>t()]),data:await t.getData(),gas:(await dH(t)).toString(),gasPrice:(await n.getGasPrice()).toString()})},fG=async({transaction:t,wallet:e})=>{const n=await AH(t.blockchain);return e.connector.sendTransaction({from:t.from,to:t.to,value:cG([t,"access",t=>t.value,"optionalAccess",t=>t.toString,"call",t=>t()]),gas:(await dH(t)).toString(),gasPrice:(await n.getGasPrice()).toString()})};function pG(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}const mG=()=>window._connectedWalletConnectInstance,yG=t=>{window._connectedWalletConnectInstance=t};class gG{static __initStatic(){this.info={name:"WalletConnect",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0ndXRmLTgnPz48IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3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MS00LTQuMS0xMC41LDAtMTQuNGwyOS45LTI5LjIgYzQuMS00LDEwLjctNCwxNC44LDBsOTUuNSw5My41YzEsMSwyLjcsMSwzLjcsMGMwLDAsMCwwLDAsMGw5NS41LTkzLjVjNC4xLTQsMTAuNy00LDE0LjgsMGMwLDAsMCwwLDAsMGw5NS41LDkzLjUgYzEsMSwyLjcsMSwzLjcsMGw5NS41LTkzLjVDNDU2LjQsMjI1LjksNDYzLDIyNS45LDQ2Ny4xLDIyOS45eicvPjwvZz48L2c+PC9zdmc+Cg==",blockchains:["ethereum","bsc","polygon","velas"]}}static __initStatic2(){this.isAvailable=()=>null!=mG()}constructor(){this.name=this.constructor.info.name,this.logo=this.constructor.info.logo,this.blockchains=this.constructor.info.blockchains,this.connector=gG.instance||this.newWalletConnectInstance(),this.sendTransaction=t=>(async({transaction:t,wallet:e})=>{if(t=new LH(t),0==await e.connectedTo(t.blockchain)&&await e.switchTo(t.blockchain),0==await e.connectedTo(t.blockchain))throw{code:"WRONG_NETWORK"};await t.prepare({wallet:e});let n=await EH({blockchain:t.blockchain,method:"transactionCount",address:t.from});return t.nonce=n,await hG({transaction:t,wallet:e}).then((async e=>{if(!e)throw"Submitting transaction failed!";{let r=qh(t.blockchain);t.id=e,t.url=r.explorerUrlFor({transaction:t}),t.sent&&t.sent(t);let i=await lG(e,t.blockchain);t.nonce=i.nonce||n,i?i.wait(1).then((()=>{t._succeeded=!0,t.succeeded&&t.succeeded(t)})).catch((e=>{e&&e.code&&"TRANSACTION_REPLACED"==e.code?e.replacement&&e.replacement.hash&&e.receipt&&1==e.receipt.status?(t.id=e.replacement.hash,t._succeeded=!0,t.succeeded&&t.succeeded(t)):e.replacement&&e.replacement.hash&&e.receipt&&0==e.receipt.status&&(t.id=e.replacement.hash,t._failed=!0,t.failed&&t.failed(t,e)):(t._failed=!0,t.failed&&t.failed(t,e))})):(t._failed=!0,console.log("Error retrieving transaction"),t.failed&&t.failed(t,"Error retrieving transaction"))}})),t})({wallet:this,transaction:t})}newWalletConnectInstance(){let t=new kH({bridge:"https://bridge.walletconnect.org",qrcodeModal:NH});return t.on("connect",((t,e)=>{if(t)throw t;const{accounts:n,chainId:r}=e.params[0];this.connectedAccounts=n.map((t=>cp(t))),this.connectedChainId=r})),t.on("session_update",((t,e)=>{if(t)throw t;const{accounts:n,chainId:r}=e.params[0];this.connectedAccounts=n.map((t=>cp(t))),this.connectedChainId=r})),t.on("disconnect",((t,e)=>{if(yG(void 0),t)throw t})),t.on("modal_closed",(()=>{yG(void 0),this.connector=void 0})),t}async account(){if(null!=this.connectedAccounts)return this.connectedAccounts[0]}async connect(t){try{window.localStorage.removeItem("walletconnect"),null==this.connector&&(this.connector=this.newWalletConnectInstance()),this.connector.connected&&(await this.connector.killSession(),yG(void 0),this.connector=this.newWalletConnectInstance());let{accounts:e,chainId:n}=await this.connector.connect({chainId:pG([t,"optionalAccess",t=>t.chainId])});return e instanceof Array&&e.length&&yG(this),e=e.map((t=>cp(t))),this.connectedAccounts=e,this.connectedChainId=n,e[0]}catch(t){return void console.log("WALLETCONNECT ERROR",t)}}async connectedTo(t){let e=await this.connector.sendCustomRequest({method:"eth_chainId"});const n=Hh(e);return t?t===n.name:n.name}switchTo(t){return new Promise(((e,n)=>{let r,i;const o=qh(t);setTimeout((async()=>{await this.connectedTo(t)||r||i?e():n({code:"NOT_SUPPORTED"})}),3e3),this.connector.sendCustomRequest({method:"wallet_switchEthereumChain",params:[{chainId:o.id}]}).then((()=>{r=!0,e()})).catch((o=>{o&&"string"==typeof o.message&&o.message.match("addEthereumChain")?this.addNetwork(t).then((()=>this.switchTo(t).then((()=>{r=!0,e()})))).catch((()=>{i=!0,n({code:"NOT_SUPPORTED"})})):(i=!0,n({code:"NOT_SUPPORTED"}))}))}))}addNetwork(t){return new Promise(((e,n)=>{const r=qh(t);this.connector.sendCustomRequest({method:"wallet_addEthereumChain",params:[{chainId:r.id,chainName:r.fullName,nativeCurrency:{name:r.currency.name,symbol:r.currency.symbol,decimals:r.currency.decimals},rpcUrls:[r.rpc],blockExplorerUrls:[r.explorer],iconUrls:[r.logo]}]}).then(e).catch(n)}))}on(t,e){let n;if("account"===t)n=(t,n)=>{if(n&&n.params&&n.params[0].accounts&&n.params[0].accounts instanceof Array){const t=n.params[0].accounts.map((t=>cp(t)));e(t[0])}},this.connector.on("session_update",n);return n}off(t,e){if("account"===t)this.connector.off("session_update")}async sign(t){let e=await this.account();var n=[Cp(t),e];return await this.connector.signPersonalMessage(n)}}gG.__initStatic(),gG.__initStatic2(),gG.getConnectedInstance=mG,gG.setConnectedInstance=yG;const bG=({transaction:t,provider:e,signer:n})=>t.method?vG({transaction:t,signer:n,provider:e}):wG({transaction:t,signer:n}),vG=({transaction:t,signer:e,provider:n})=>{let r=new bw(t.to,t.api,n),i=t.getContractArguments({contract:r}),o=r.connect(e)[t.method];return i?o(...i,{value:LH.bigNumberify(t.value,t.blockchain)}):o({value:LH.bigNumberify(t.value,t.blockchain)})},wG=({transaction:t,signer:e})=>e.sendTransaction({to:t.to,value:LH.bigNumberify(t.value,t.blockchain)}),MG=()=>window._connectedWalletLinkInstance,_G=t=>{window._connectedWalletLinkInstance=t};class EG{static __initStatic(){this.info={name:"Coinbase",logo:$H.info.logo,blockchains:["ethereum","bsc","polygon","velas"]}}static __initStatic2(){this.isAvailable=()=>null!=MG()}constructor(){this.name=this.constructor.info.name,this.logo=this.constructor.info.logo,this.blockchains=this.constructor.info.blockchains,this.connector=EG.instance||this.newWalletLinkInstance(),this.sendTransaction=t=>(async({transaction:t,wallet:e})=>{if(t=new LH(t),0==await e.connectedTo(t.blockchain)&&await e.switchTo(t.blockchain),0==await e.connectedTo(t.blockchain))throw{code:"WRONG_NETWORK"};await t.prepare({wallet:e});let n=new OM(e.connector,"any"),r=n.getSigner(0);return await bG({transaction:t,provider:n,signer:r}).then((e=>{if(!e)throw"Submitting transaction failed!";t.id=e.hash,t.nonce=e.nonce,t.url=qh(t.blockchain).explorerUrlFor({transaction:t}),t.sent&&t.sent(t),e.wait(1).then((()=>{t._succeeded=!0,t.succeeded&&t.succeeded(t)})).catch((e=>{e&&e.code&&"TRANSACTION_REPLACED"==e.code?(e.replacement&&e.replacement.hash&&(t.id=e.replacement.hash,t.url=qh(t.blockchain).explorerUrlFor({transaction:t})),e.replacement&&e.replacement.hash&&e.receipt&&1==e.receipt.status?(t._succeeded=!0,t.succeeded&&t.succeeded(t)):e.replacement&&e.replacement.hash&&e.receipt&&0==e.receipt.status&&(t._failed=!0,t.failed&&t.failed(t,e))):(t._failed=!0,t.failed&&t.failed(t,e))}))})),t})({wallet:this,transaction:t})}newWalletLinkInstance(){return new xH({}).makeWeb3Provider()}async account(){if(null!=this.connectedAccounts)return cp(this.connectedAccounts[0])}async connect(t){(await this.connector._relayProvider()).setConnectDisabled(!1);let e=await this.connector.enable();return e instanceof Array&&e.length&&_G(this),e=e.map((t=>cp(t))),this.connectedAccounts=e,this.connectedChainId=await this.connector.getChainId(),e[0]}async connectedTo(t){let e=await this.connector.getChainId();const n=Gh(e);return t?t===n.name:n.name}switchTo(t){return new Promise(((e,n)=>{const r=qh(t);this.connector.request({method:"wallet_switchEthereumChain",params:[{chainId:r.id}]}).then(e).catch((r=>{4902===r.code?this.addNetwork(t).then((()=>this.switchTo(t).then(e))).catch(n):n(r)}))}))}addNetwork(t){return new Promise(((e,n)=>{const r=qh(t);this.connector.request({method:"wallet_addEthereumChain",params:[{chainId:r.id,chainName:r.fullName,nativeCurrency:{name:r.currency.name,symbol:r.currency.symbol,decimals:r.currency.decimals},rpcUrls:[r.rpc],blockExplorerUrls:[r.explorer],iconUrls:[r.logo]}]}).then(e).catch(n)}))}on(t,e){let n;if("account"===t)n=t=>e(cp(t[0])),this.connector.on("accountsChanged",n);return n}off(t,e){if("account"===t)this.connector.removeListener("accountsChanged",e);return e}async sign(t){await this.account();let e=new OM(this.connector,"any").getSigner(0);return await e.signMessage(t)}}EG.__initStatic(),EG.__initStatic2(),EG.getConnectedInstance=MG,EG.setConnectedInstance=_G;var AG={MetaMask:tG,Phantom:uG,Coinbase:$H,WindowEthereum:KH,WindowSolana:sG,WalletConnect:gG,WalletLink:EG};let SG={};const kG=()=>{let t=[];return Object.keys(AG).forEach((e=>{let n=AG[e];n.isAvailable()&&(SG[n]||(n.getConnectedInstance&&n.getConnectedInstance()?SG[n]=n.getConnectedInstance():SG[n]=new n),t.push(SG[n]))})),t},NG=async()=>(await Promise.all(kG().map((async t=>{if(await t.account())return t})))).filter((t=>!!t));var TG=function(t){var n=h(G.useState(!1),2),r=n[0],i=n[1],o=G.useContext(ah).navigate,a=kG()[0];G.useEffect((function(){e(u.mark((function e(){var n;return u.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,NG();case 2:if(n=e.sent,!a||0!=n){e.next=8;break}return e.next=6,a.account();case 6:null==e.sent&&(o("ConnectingWallet"),t.connect(a));case 8:case"end":return e.stop()}}),e)})))()}),[a]);var s=[AG.WalletConnect,AG.WalletLink];a&&s.unshift(a.constructor);var c=s.map((function(e,n){var r=e.info.name;return"WalletConnect"==r&&(r="via WalletConnect"),G.createElement("div",{key:n,className:"PaddingBottomXS"},G.createElement("button",{className:"Card small",title:"Connect ".concat(r),onClick:function(){return function(e){var n=new e;t.setWallet(n),o("ConnectingWallet"),t.connect(n)}(e)}},G.createElement("div",{className:"CardImage square"},G.createElement("img",{className:"transparent",src:e.info.logo})),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper PaddingLeftXS"},G.createElement("h2",{className:"CardText FontWeightBold"},r)))))}));return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},G.createElement("h1",{className:"LineHeightL FontSizeL"},"Select a wallet")),body:G.createElement("div",{className:"PaddingBottomS PaddingLeftS PaddingRightS"},c),footer:G.createElement("div",{className:"PaddingBottomS"},G.createElement("button",{className:"FontSizeS FontWeightBold TextButton",onClick:function(){return i(!r)}},G.createElement("strong",{className:"Opacity05"},"What is a wallet?")),r&&G.createElement("p",{className:"PaddingLeftM PaddingRightM"},"Wallets are used to send, receive, and store digital assets. Wallets come in many forms. They are either built into your browser, an extension added to your browser, a piece of hardware plugged into your computer or even an app on your phone."))})},xG=function(t){var n=G.useContext(q),r=n.open,i=n.close,o=h(G.useState(),2),a=o[0],s=o[1],c=h(G.useState(),2),l=c[0],d=c[1],f=function(n){n.connect().then(e(u.mark((function e(){var r;return u.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.account();case 2:(r=e.sent)&&(t.autoClose&&i(),t.resolve&&t.resolve({wallet:n,account:r}));case 4:case"end":return e.stop()}}),e)})))).catch((function(e){s(!1),4001!=(null==e?void 0:e.code)&&(-32002!=(null==e?void 0:e.code)?t.reject&&t.reject(e):s(!0))}))};return G.useEffect((function(){var t=kG()[0];t&&d(t)}),[]),G.useEffect((function(){e(u.mark((function e(){var n;return u.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!l){e.next=5;break}return e.next=3,l.account();case 3:(n=e.sent)&&(t.autoClose&&i(),t.resolve&&t.resolve({wallet:l,account:n}));case 5:case"end":return e.stop()}}),e)})))()}),[l]),G.createElement(ch,{open:r,close:i,start:"SelectWallet",container:t.container,document:t.document,dialogs:{SelectWallet:G.createElement(TG,{setWallet:d,connect:f}),ConnectingWallet:G.createElement(hh,{wallet:l,pending:a,connect:f})}})},LG=function(t){return void 0===t?window.document:t};function IG(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===n(e)?e:String(e)}function jG(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,IG(r.key),r)}}function CG(t,e){return CG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},CG(t,e)}function DG(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function OG(t){return OG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},OG(t)}var PG=G.createContext(),zG="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAGHCAMAAADx+xo1AAAAeFBMVEVHcEweFhTcf2s2ERDegW3egWw1EBDbg2s1EBD/h4fSfWM1EBDTf2T/h4fTf2Q1EBDVgmYvEhI8EhJWLCV1QTWWV0a3Y07Ab1fOd1/PfWLXhWjUlH3/h4e8pZ3br12tub3ppI6hyNaY1Or+u6nx3mbO6/b14M3///8kXrGSAAAAEXRSTlMADSI/RWdshpqipsDG1OPj/QoziQ8AAB1ySURBVHja7J3bkqIwEIYBQTwLEUxgvNiqqZp5/zdczkFDEhCiPaa/q11WZcf+6f67ExgHQRAEQRAEQbSszmTlIPZyJmTvINayJoRsHMRaigRwdh3EVlZFAlg7iLVsCgFgArAXl6AFtJo1VgC72ROCUwCLKSvA2UHshZQK2KxXK9ddFaAdtI0N6YHlwD7ccy/6OBO0EHe97zSAHYGl1PV/TXAmZDV7rABWsyG4KmQzG+wBrAbjbzdr7ACsZoXxtxq3ir9bdIPrzX6/wUpgG5UBwGmQvdyNg3GHiH3cZQBcILYQtxgEr9elAzhjBrCcd94m4HolfkEQBGHBruRQc+qIWnKBaJjurc1nlR9bfn5xmuJk1VldC4agQeCNCIJpE1hGuQ1xHd46qDkAIjnZidOKqFaQ5zl/g+Ptdtv62vgsORF0q1h3oT6dQIR5vkqyAtbndNiFhRRAZxH/VnEMXO1MyH063s2V/TnRViuBy4ALIfCBZgSvFoAuDWymNwGeH4RlxHMrKWTAHmWwC32AySC8dRwD6asmeUCviLylcX9QQTagggBaKvDCI9fA1pt5q6AfHj49x08VAXvkEPoOLIKjJg2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JsNWGj7UTJYJB4FengEPGYg0ezi7P1kQ6EsGKRqCsmFbG11afVw/b0USaPTbI2FxDBTSOVSEGEpGCg7b9dHg9dCtwCvdxPx088RBoDcjFi80k0gkL05YdmLVfEiPSCrEEi+7ChEuJMv3gNMfHxy7Cte3xV53EqhKqskm8PjPB8fHTuL1+l02OwlUXbXL8a+zChzZgjV/MO2tipXxl6ETj4fEjT78cyeBamPFpjb+EC2l50Ct4q5ujC92Fe6W6j1LI2hMnEx4F/qMg2euAQZ34viSgLkGGFTG4UsCnrERdMc04BNbEjAHAX8vfkMYX+zQJQFzEPDWcTeoQJSF4LkRFK4YjFIDzkEgnApEqQHnIBDOiugKwXMQCOvHkWrA8/thy2jGmEoOYSG4FQRmFzC6GTEWgs9IZgKMXs3BqwErpJsQh4FOAUc7TkoDzgiiAvFtBpgRsqeLWgPOGN+QqDXgjPFdOdpC8AwF+4SE/9u7gxWHYRiKonkITMAL4///2XEndFzquEEhBJW5Z9GNQV3o2VEaaBrTMMx5h0fZow6Xgu/SXqJRN9menTx1+5jysw73A1/ESu3K78e50eG1TpT/4MdIi15ZHck9Aw6KSQspCEXd5/5Xc5ZNdVT6d0R5K8t/pplcd6S24DlI1rpjfayQghA0ZfVz75bBUYq6tkAGQtBgsnf7COdT6uQcIQMhhAoACbidYgWABNxN8s4AJp80mQFIQAhyHgHZ5JXKzgFAAKLwJKCsvf0elt/q0P84jrZvLlvP8toe5Jxnaf2r1NpPAAI5bp6ZrrFVov/B6KT5L4DXVcQ9Lm+UXHg2FMIlnfecCQt9D4jtCQAAAAAAAAAAAABvfgCECMuQGDaxMAAAAABJRU5ErkJggg==";function RG(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=OG(t);if(e){var i=OG(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return DG(this,n)}}var BG,UG=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&CG(t,e)}(o,G.Component);var e,n,r,i=RG(o);function o(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,t)}return e=o,n=[{key:"componentDidCatch",value:function(t,e){t.error&&(t=t.error),this.props.setError(t)}},{key:"render",value:function(){return this.props.children}}],n&&jG(e.prototype,n),r&&jG(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(),FG=function(t){var e=h(G.useState(t.error),2),n=e[0],r=e[1],i=h(G.useState(!0),2),o=i[0],a=i[1],s=function(e){e.error&&(e=e.error),r(e),t.errorCallback&&t.errorCallback(e.message||e.toString())},u=function(){a(!1),setTimeout(t.unmount,300)};return n?G.createElement(ih,{container:t.container,close:u,open:o},G.createElement("div",{className:"Dialog ReactDialogAnimation"},G.createElement("div",{className:"DialogHeader"},G.createElement("div",{className:"PaddingTopS PaddingLeftS PaddingRightS"})),G.createElement("div",{className:"DialogBody TextCenter"},G.createElement("div",{className:"GraphicWrapper PaddingTopS"},G.createElement("img",{className:"Graphic",src:zG})),G.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Oops, Something Went Wrong"),G.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},G.createElement("div",{className:"PaddingLeftS PaddingRightS"},G.createElement("pre",{className:"ErrorSnippetText"},n.message||n.toString())),G.createElement("div",{className:"PaddingTopS PaddingBottomS"},G.createElement("strong",{className:"FontSizeM PaddingTopS"},"If this keeps happening, please report it.")))),G.createElement("div",{className:"DialogFooter"},G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("button",{className:"ButtonPrimary",onClick:u},"Try again"))))):G.createElement(PG.Provider,{value:{setError:s,errorCallback:t.errorCallback}},G.createElement(UG,{setError:s},t.children))},YG=function(t){return"\n\n .ButtonPrimary {\n align-items: center;\n align-self: center;\n background: ".concat(t.colors.primary,";\n border-radius: 13px;\n border: 1px solid transparent;\n box-shadow: 0 0 16px rgba(0,0,0,0.1);\n font-size: 21px;\n font-weight: 400;\n line-height: 45px;\n height: 58px;\n justify-content: center;\n width: 100%;\n overflow: hidden;\n padding: 7px 0;\n position: relative;\n text-align: center;\n text-decoration: none;\n text-overflow: ellipsis;\n transition: background 0.1s;\n vertical-align: middle;\n display: inline-block;\n }\n\n .ButtonPrimary, .ButtonPrimary * {\n color: ").concat(t.colors.buttonText,";\n }\n\n .ButtonPrimary.disabled {\n background: rgb(210,210,210);\n color: rgb(140,140,140);\n }\n\n .ButtonPrimary:not(.disabled){\n cursor: pointer;\n }\n .ButtonPrimary:not(.disabled):hover {\n box-shadow: inset 0 0 300px rgba(0,0,0,0.1);\n }\n .ButtonPrimary:not(.disabled):active {\n box-shadow: inset 0 0 300px rgba(0,0,0,0.2);\n }\n ")},QG=function(t){return"\n\n .Card {\n align-items: center;\n background: rgb(255,255,255);\n border-radius: 13px;\n box-shadow: 0 0 8px rgba(0,0,0,0.03);\n cursor: pointer;\n display: flex;\n flex-direction: row;\n margin-bottom: 8px;\n min-height: 76px;\n padding: 16px 10px;\n width: 100%;\n }\n\n .Card.Row {\n border-radius: 0;\n margin-bottom: 0;\n box-shadow: none;\n min-height: 69px;\n padding: 7px 21px;\n border-top: 1px solid rgba(0,0,0,0.05);\n }\n\n .Card.Row .CardText {\n font-size: 19px;\n line-height: 40px;\n }\n\n .CardTokenSymbol {\n width: 40%;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .CardTokenFullName {\n width: 100%;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .CardTokenName {\n text-align: right;\n opacity: 0.5;\n width: 60%;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n \n .Card.Row .CardTokenName .CardText {\n font-size: 17px;\n }\n\n .Card.Row .CardImage {\n width: 40px;\n }\n\n .Card.Row .CardImage img {\n height: 30px;\n width: 30px;\n }\n\n a.Card, a.Card * {\n color: inherit;\n text-decoration: none;\n }\n\n .Card.transparent {\n background: none;\n box-shadow: none;\n }\n\n .Card.small {\n min-height: auto;\n padding: 8px 8px;\n margin: 0;\n }\n\n .CardImage.small {\n width: 27px;\n }\n\n .CardImage.small img {\n height: 27px;\n width: 27px;\n }\n\n .Card.disabled {\n cursor: default;\n }\n\n .Card:hover:not(.disabled) {\n background: rgb(240,240,240);\n box-shadow: 0 0 0 rgba(0,0,0,0); \n }\n\n .Card:active:not(.disabled) {\n background: rgb(235,235,235);\n box-shadow: inset 0 0 6px rgba(0,0,0,0.02);\n color: inherit;\n }\n\n .Card:hover:not(.disabled) .CardAction {\n opacity: 0.4;\n }\n\n .CardImage, .CardBody, .CardAction, .CardInfo {\n align-items: center;\n display: flex;\n min-width: 0;\n padding: 0 7px;\n }\n\n .CardImage {\n display: inline-flex;\n flex-basis: auto;\n flex-grow: 0;\n flex-shrink: 0;\n justify-content: center;\n position: relative;\n width: 58px;\n }\n\n .CardBody {\n flex-basis: auto;\n flex-grow: 1;\n flex-shrink: 1;\n line-height: 27px;\n padding-left: 10px;\n text-align: left;\n }\n\n .CardBodyWrapper {\n min-width: 0;\n }\n\n .CardAction {\n flex-basis: auto;\n flex-shrink: 0;\n flex-grow: 0;\n padding-right: 0;\n margin-left: auto;\n }\n\n .Card.disabled .CardAction {\n opacity: 0; \n }\n\n .CardInfo {\n display: flex;\n flex-basis: auto;\n flex-direction: column;\n flex-grow: 0;\n flex-shrink: 1;\n justify-content: center;\n margin-left: auto; \n padding-right: 0;\n }\n\n .CardImage img {\n background: white;\n border-radius: 9999px;\n border: 1px solid white;\n box-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n height: 45px;\n position: relative;\n vertical-align: middle;\n width: 45px;\n }\n\n .CardImage.square img {\n border-radius: 0;\n }\n\n .CardImage img.transparent {\n border: none;\n background: none;\n box-shadow: none;\n }\n \n .CardImage .BlockchainLogo {\n position: absolute;\n bottom: 0;\n right: 0;\n }\n\n .CardTitle {\n font-size: 15px;\n color: rgb(150,150,150);\n line-height: 20px;\n }\n \n .CardText, a .CardText {\n color: ".concat(t.colors.text,";\n flex: 1;\n font-size: 21px;\n line-height: 26px;\n }\n\n .CardText strong {\n font-weight: 500;\n }\n\n .CardText.small, .CardText.small small {\n font-size: 18px;\n color: rgb(150,150,150);\n line-height: 20px;\n }\n\n .CardAction {\n opacity: 0.2;\n }\n\n .Card.More {\n display: inline-block;\n text-align: center;\n }\n ")},WG=function(t){return"\n\n *, div, div * {\n font-family: ".concat(t.fontFamily,";\n }\n\n .FontSizeS {\n font-size: 16px;\n }\n\n .FontSizeM {\n font-size: 19px;\n }\n\n .FontSizeL {\n font-size: 23px;\n }\n\n .FontSizeXL {\n font-size: 32px;\n }\n\n .FontSizeXXL {\n font-size: 42px;\n }\n\n .FontWeightBold {\n font-weight: bold;\n }\n\n .FontItalic {\n font-style: italic;\n }\n ")},HG=function(t){return"\n\n .Icon {\n fill : ".concat(t.colors.icons,";\n stroke : ").concat(t.colors.icons,";\n }\n\n .ChevronLeft, .ChevronRight {\n position: relative;\n top: 1px;\n }\n\n .Checkmark {\n height: 24px;\n position: relative;\n top: -1px;\n vertical-align: middle;\n width: 24px;\n }\n\n .AlertIcon {\n height: 20px;\n position: relative;\n top: -1px;\n vertical-align: middle;\n width: 20px;\n fill: #e42626;\n stroke: transparent;\n }\n\n .CheckMark.small {\n height: 16px;\n width: 16px;\n }\n\n .DigitalWalletIcon {\n height: 24px;\n position: relative;\n top: -1px;\n vertical-align: middle;\n width: 24px;\n }\n\n .ButtonPrimary .Icon {\n fill : ").concat(t.colors.buttonText,";\n stroke : ").concat(t.colors.buttonText,";\n }\n\n .Loading {\n border: 3px solid ").concat(t.colors.primary,";\n border-top: 3px solid rgba(0,0,0,0.1);\n border-radius: 100%;\n position: relative;\n left: -1px;\n width: 18px;\n height: 18px;\n animation: spin 1.5s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n ")},GG=function(t){return"\n\n .Link {\n color: ".concat(t.colors.primary,";\n cursor: pointer;\n text-decoration: none;\n }\n\n .Link:hover {\n filter: brightness(0.8);\n }\n\n .Link:active {\n filter: brightness(1.0);\n }\n ")},qG=function(t){return"\n\n .LoadingText {\n color: ".concat(t.colors.buttonText,";\n display: inline-block;\n text-decoration: none;\n }\n\n @keyframes blink {\n 0% { opacity: .2; }\n 20% { opacity: 1; }\n 100% { opacity: .2; }\n }\n \n .LoadingText .dot {\n animation-name: blink;\n animation-duration: 1.4s;\n animation-iteration-count: infinite;\n animation-fill-mode: both;\n }\n \n .LoadingText .dot:nth-child(2) {\n animation-delay: .2s;\n }\n \n .LoadingText .dot:nth-child(3) {\n animation-delay: .4s;\n }\n ")},ZG=function(t){return"\n\n .rangeslider {\n margin: 20px 0;\n position: relative;\n background: #e6e6e6;\n -ms-touch-action: none;\n touch-action: none;\n }\n\n .rangeslider,\n .rangeslider__fill {\n display: block;\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);\n }\n\n .rangeslider__handle {\n outline: none;\n cursor: pointer;\n display: inline-block;\n position: absolute;\n border-radius: 50%;\n background-color: "+t.colors.primary+";\n border: 1px solid white;\n box-shadow: 0 0 8px rgba(0,0,0,0.1);\n }\n\n .rangeslider__handle:hover {\n box-shadow: inset 0 0 300px rgba(0,0,0,0.2);\n }\n\n .rangeslider__handle:active {\n box-shadow: inset 0 0 300px rgba(0,0,0,0.3);\n }\n\n .rangeslider__active {\n opacity: 1;\n }\n\n .rangeslider__handle-tooltip {\n display: none;\n }\n\n .rangeslider-horizontal {\n height: 12px;\n border-radius: 10px;\n }\n\n .rangeslider-horizontal .rangeslider__fill {\n height: 100%;\n background-color: "+t.colors.primary+";\n border-radius: 10px;\n top: 0;\n }\n .rangeslider-horizontal .rangeslider__handle {\n width: 18px;\n height: 18px;\n border-radius: 30px;\n top: 50%;\n transform: translate3d(-50%, -50%, 0);\n }\n\n\n .rangeslider-horizontal .rangeslider__handle-tooltip {\n top: -55px;\n }\n\n "},VG=function(t){return"\n\n .Search {\n border-radius: 13px;\n border: 1px solid rgba(0,0,0,0.2);\n outline: none !important;\n color: ".concat(t.colors.text,";\n font-size: 19px;\n padding: 13px;\n width: 100%;\n }\n\n .Search::placeholder {\n color: rgb(180,180,180);\n } \n\n .Search:focus, .Search:focus-visible {\n border: 1px solid ").concat(t.colors.primary,";\n }\n\n ")},JG=function(t){return"\n\n .TextButton {\n cursor: pointer;\n font-size: 16px;\n color: ".concat(t.colors.primary,"\n }\n\n .TextButton:hover * {\n opacity: 1.0;\n }\n ")},KG=function(t){return"\n\n * {\n color: ".concat(t.colors.text,";\n }\n\n h1, h2, h3, h4, h5, h6 {\n display: block;\n }\n\n .Text {\n font-size: 16px;\n line-height: 24px\n }\n\n .TextLeft, .TextLeft * {\n text-align: left !important;\n }\n\n .TextCenter, .TextCenter * {\n text-align: center;\n }\n\n .LineHeightL {\n line-height: 32px;\n }\n\n .ErrorSnippetText {\n background: rgb(30, 30, 20);\n border-radius: 19px;\n border: 8px solid rgb(30, 30, 20);\n color: #00FF41;\n font-size: 15px;\n font-style: italic;\n max-height: 100px;\n padding: 6px;\n overflow-wrap: break-word;\n overflow-y: auto;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n ")},XG=function(t){return"\n\n .Tooltip {\n background: ".concat(t.colors.primary,";\n border-radius: 10px;\n color: ").concat(t.colors.buttonText,";\n padding: 10px 13px;\n position: relative;\n box-shadow: 0 0 8px rgba(0,0,0,0.2);\n }\n\n .TooltipArrowUp {\n border-bottom: 10px solid ").concat(t.colors.primary,";\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n height: 0; \n left: 12px;\n position: absolute;\n top: -8px;\n width: 0; \n }\n ")};BG=eh.createRoot;const $G="ReactShadowDOMInsideContainer";function tq(t){return t.replace(/\s*[\r\n]\s*/g,"")}function eq({document:t,element:e,content:n,outsideStyle:r="",insideStyle:i="",insideClasses:o=[]}){const a=function({document:t,element:e,style:n}){const r=t.createElement("div");return r.setAttribute("class","ReactShadowDOMOutsideContainer"),r.setAttribute("style",n),e.appendChild(r),r}({document:t,element:e,style:tq(r)}),s=function({document:t,shadow:e,style:n,classes:r=[]}){const i=t.createElement("div");if(i.setAttribute("class",[$G].concat(r).join(" ")),e.appendChild(i),n&&n.length){const r=t.createElement("style");r.type="text/css",r.appendChild(t.createTextNode(n)),e.appendChild(r)}return i}({document:t,shadow:function(t){let e;return e=t.shadowRoot?t.shadowRoot:t.attachShadow({mode:"open"}),e}(a),style:tq(i),classes:o});"function"==typeof n&&(n=n(s));const u=BG(s);return u.render(n),{content:n,unmount:()=>function({insideRoot:t,outsideContainer:e}){t.unmount(),e.remove()}({insideRoot:u,outsideContainer:a})}}var nq=function(t,e){var n=t.style,r=t.container,i=t.document,o=t.closed,a=function(t){var e,n;return t={colors:Object.assign({primary:"#ea357a",buttonText:"#ffffff",icons:"#000000",text:"#212529"},(null===(e=t)||void 0===e?void 0:e.colors)||{}),fontFamily:(null===(n=t)||void 0===n?void 0:n.fontFamily)||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'},["\n\n html, body, div, span, applet, object, iframe,\n h1, h2, h3, h4, h5, h6, p, blockquote, pre,\n a, abbr, acronym, address, big, cite, code,\n del, dfn, em, img, ins, kbd, q, s, samp,\n small, strike, strong, sub, sup, tt, var,\n b, u, i, center,\n dl, dt, dd, ol, ul, li,\n fieldset, form, label, legend,\n table, caption, tbody, tfoot, thead, tr, th, td,\n article, aside, canvas, details, embed, \n figure, figcaption, footer, header, hgroup, \n menu, nav, output, ruby, section, summary,\n time, mark, audio, video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n text-align: inherit;\n vertical-align: baseline;\n }\n\n article, aside, details, figcaption, figure, \n footer, header, hgroup, menu, nav, section {\n display: block;\n }\n\n body {\n line-height: 1;\n }\n\n ol, ul {\n list-style: none;\n }\n\n blockquote, q {\n quotes: none;\n }\n\n blockquote:before, blockquote:after,\n q:before, q:after {\n content: '';\n content: none;\n }\n \n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n * {\n box-sizing: border-box;\n }\n\n button {\n border: 0;\n background: none;\n outline: none;\n }\n\n ","\n\n .ReactDialogBackground {\n backdrop-filter: blur(5px);\n background: rgba(0,0,0,0.7);\n }\n\n .contained .ReactDialog {\n position: absolute;\n height: 100%;\n min-height: 100%;\n width: 100%;\n min-width: 100%;\n }\n\n .contained .ReactDialogBackground {\n position: absolute;\n }\n\n .contained .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n top: 0;\n }\n\n .Dialog {\n margin: 0 auto;\n position: relative;\n width: 420px;\n box-shadow: 0 0 20px rgba(0,0,0,0.2);\n border-radius: 13px;\n background: rgb(248,248,248);\n }\n\n @media (max-width: 450px) {\n\n .Dialog {\n border-radius: 0;\n width: 100%;\n }\n }\n\n @media (orientation: portrait) and (max-width: 800px) {\n\n .ReactDialogAnimation {\n width: 100%;\n }\n\n .ReactDialog {\n height: 100%;\n min-height: 100%;\n }\n\n .ReactDialogStack {\n align-items: flex-end;\n }\n\n .Dialog {\n align-content: stretch;\n border-radius: 13px;\n border-top-radius: 13px;\n display: flex;\n flex-direction: column;\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n }\n\n .DialogFooter {\n padding-bottom: 20px;\n }\n\n .ReactDialogAnimation {\n margin-bottom: -100px !important;\n top: inherit !important;\n position: relative;\n transition: opacity 0.4s ease, margin-bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n margin-bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n .ReactShadowDOMInsideContainer > .ReactDialog {\n align-items: flex-end;\n }\n }\n\n .DialogBody {\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .DialogBody.ScrollHeight {\n height: 30vh !important;\n max-height: 30vh !important;\n }\n\n .DialogHeader {\n border-top-left-radius: 13px;\n border-top-right-radius: 13px;\n min-height: 54px;\n position: relative;\n width: 100%;\n }\n\n .DialogHeaderActionRight {\n position: absolute;\n top: 0;\n right: 0;\n height: 48px;\n }\n\n .DialogHeaderActionLeft {\n position: absolute;\n top: 0;\n left: 0;\n height: 48px;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 13px;\n border-bottom-right-radius: 13px;\n line-height: 24px;\n min-height: 32px;\n position: relative;\n text-align: center;\n }\n\n ","\n\n .ButtonCircular {\n border-radius: 9999px;\n cursor: pointer;\n height: 34px;\n opacity: 0.5;\n padding: 5px 4px 4px 4px;\n width: 34px;\n }\n\n .ButtonCircular:hover {\n background: rgba(0,0,0,0.1);\n opacity: 1;\n }\n\n .ButtonCircular:active {\n background: rgba(0,0,0,0.25);\n opacity: 1;\n }\n ",YG(t),QG(t),'\n\n .PoweredByWrapper {\n display: block;\n left: 0;\n padding-top: 3px;\n position: fixed;\n right: 0;\n text-align: center;\n top: 0;\n }\n\n .contained .PoweredByWrapper {\n position: absolute;\n }\n\n .PoweredByLink {\n color: white;\n display: inline-block;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;\n font-size: 14px;\n font-style: italic;\n font-weight: bold;\n letter-spacing: -0.2px;\n margin-left: 8px;\n opacity: 0.5;\n text-decoration: none;\n text-shadow: black 0 0 2px;\n }\n\n .PoweredByLink:hover, .PoweredByLink:active {\n opacity: 1.0;\n }\n ',"\n\n .GraphicWrapper {\n display: block;\n }\n\n .Graphic {\n width: 50%;\n position: relative;\n }\n ","\n \n .Skeleton {\n background: rgb(230,230,230) !important;\n border: 0px solid transparent !important;\n box-shadow: none !important;\n cursor: inherit !important;\n line-height: 0;\n overflow: hidden;\n position: relative;\n }\n\n @keyframes SkeletonBackgroundAnimation {\n from {\n left: -500px;\n }\n to {\n left: +120%;\n }\n }\n\n .SkeletonBackground {\n animation: 2s SkeletonBackgroundAnimation 0.2s ease infinite;\n background: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.1) 50%, transparent 100%);\n height: 100%;\n left: -140%;\n position: absolute;\n top: 0;\n width: 400px;\n }\n\n .SkeletonWrapper {\n line-height: 0;\n }\n ","\n \n .TokenAmountRow {\n min-width: 0;\n width: 100%;\n display: flex;\n flex-direction: row;\n }\n\n .TokenAmountCell {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .TokenSymbolCell {\n }\n ",KG(t),WG(t),HG(t),"\n\n .Opacity05 {\n opacity: 0.5;\n }\n ","\n\n .PaddingTopXS {\n padding-top: 3px;\n }\n\n .PaddingRightXS {\n padding-right: 3px;\n }\n\n .PaddingBottomXS {\n padding-bottom: 3px;\n }\n\n .PaddingLeftXS {\n padding-left: 3px; \n }\n\n .PaddingTopS {\n padding-top: 13px;\n }\n\n .PaddingRightS {\n padding-right: 13px;\n }\n\n .PaddingBottomS {\n padding-bottom: 13px;\n }\n\n .PaddingLeftS {\n padding-left: 13px; \n }\n\n .PaddingTopM {\n padding-top: 19px;\n }\n\n .PaddingRightM {\n padding-right: 19px;\n }\n\n .PaddingBottomM {\n padding-bottom: 19px;\n }\n\n .PaddingLeftM {\n padding-left: 19px; \n }\n\n .PaddingTopL {\n padding-top: 29px;\n }\n\n .PaddingRightL {\n padding-right: 29px;\n }\n\n .PaddingBottomL {\n padding-bottom: 29px;\n }\n\n .PaddingLeftL {\n padding-left: 29px; \n }\n ","\n\n .MaxHeight {\n max-height: 320px;\n overflow-y: auto;\n }\n ",qG(t),ZG(t),"\n\n .Input {\n background: none;\n border: 1px solid transparent;\n margin: 0;\n outline: none !important;\n padding: 0 0 0 14px;\n width: 100%;\n }\n\n .Input::placeholder {\n color: rgb(210,210,210);\n }\n \n ",JG(t),"\n\n .MaxAmountImage {\n display: inline-block;\n padding-right: 6px;\n }\n \n .MaxAmountImage img {\n height: 16px;\n width: 16px;\n position: relative;\n top: 3px;\n }\n ","\n\n .BlockchainLogo {\n border-radius: 999px;\n }\n\n .BlockchainLogo.small {\n height: 18px;\n width: 18px;\n }\n ",VG(t),"\n\n .TokenImage img {\n border-radius: 9999px;\n border: 1px solid white;\n background: white;\n box-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n height: 45px;\n position: relative;\n vertical-align: middle;\n width: 45px;\n }\n\n .TokenImage.medium img {\n height: 93px;\n width: 93px;\n }\n ","\n\n .Alert {\n background: rgba(0,0,0,0.08);\n border-radius: 7px;\n font-weight: 500;\n padding: 8px;\n }\n ","\n\n .Table {\n border-collapse: separate;\n border-radius: 7px;\n border-style: hidden;\n border: 1px solid rgba(0,0,0,0.1);\n width: 100%;\n }\n\n .Table tr.small td {\n font-size: 14px;\n }\n\n .Table tr td {\n border-bottom: 1px solid rgba(0,0,0,0.1);\n word-break: break-all;\n }\n \n .Table tr:last-child td {\n border-bottom: none;\n }\n \n .Table tr td {\n padding: 8px 15px;\n text-align: left;\n }\n \n .Table tr td:first-child {\n width: 30%\n }\n\n .Table tr td:last-child {\n width: 70%\n }\n \n .Table .TableSubTitle {\n font-weight: 300;\n opacity: 0.7;\n }\n\n .Table tr td:last-child {\n font-weight: 500;\n }\n ",GG(t),XG(t)].join("")}(n);n&&n.css&&(a=[a,n.css].join(" "));var s;s=r?"\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 99999;\n ":"\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n z-index: 99999;\n ";var u=eq({document:i,element:r||i.body,content:e((function(){setTimeout((function(){u(),"function"==typeof o&&o()}),300)})),outsideStyle:s,insideStyle:a,insideClasses:r?["contained"]:[]}).unmount;return u},rq=function(){return G.createElement("div",{className:"PoweredByWrapper"},G.createElement("a",{href:"https://depay.com",rel:"noopener noreferrer",target:"_blank",className:"PoweredByLink"},"by DePay"))},iq=function(){if(parseInt(G.version.split(".")[0])<17)throw"depay/widgets require at least React v17"},oq=function(t){var e=h(G.useState(!0),2),n=e[0],r=e[1];return G.createElement(Z.Provider,{value:{updatable:n,setUpdatable:r}},t.children)},aq=G.createContext(),sq=G.createContext(),uq=G.createContext();function cq(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||l(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var lq,hq,dq=function(t){var e=cq(t).sort((function(t,e){var n=Wd.from(t.fromBalance).div(Wd.from(t.fromAmount)),r=Wd.from(e.fromBalance).div(Wd.from(e.fromAmount));return n.lt(r)?-1:r.lt(n)?1:0}));return e[e.length-1]},fq=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"up",r=parseFloat(t),i=r.toString().match(/\d+\.0*(\d{4})/);if(null!==(e=i)&&void 0!==e&&e.length){var o,a,s=(i=i[0]).match(/\d{4}$/)[0];return s.match(/^0/)?(o=parseFloat("".concat(s[1],".").concat(s[2]).concat(s[3])),a=parseFloat(o).toFixed(2),a="0".concat(a).replace(".","")):(o="up"==n?parseFloat("".concat(s[0],".").concat(s[1]).concat(s[2],"9")):parseFloat("".concat(s[0],".").concat(s[1]).concat(s[2],"1")),a=parseFloat(o).toFixed(2).replace(".","")),"0999"==a&&0==parseInt(r.toFixed(0))?(a="up"==n?"1000":"0999",parseFloat(i.replace(/\d{4}$/,a))):"1000"==a&&0==parseInt(r.toFixed(0))?parseFloat(i.replace(/\d{5}$/,a)):"0"!=a.toString()[0]&&a.toString().length>3?parseInt(r.toFixed(0)):parseFloat(i.replace(/\d{4}$/,a))}return parseFloat(r.toFixed(3))},pq=G.createContext(),mq=i((function(t,e){(function(){var n,i="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",s=16,u=32,c=64,l=128,h=256,d=1/0,f=9007199254740991,p=NaN,m=4294967295,y=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",u],["partialRight",c],["rearg",h]],g="[object Arguments]",b="[object Array]",v="[object Boolean]",w="[object Date]",M="[object Error]",_="[object Function]",E="[object GeneratorFunction]",A="[object Map]",S="[object Number]",k="[object Object]",N="[object Promise]",T="[object RegExp]",x="[object Set]",L="[object String]",I="[object Symbol]",j="[object WeakMap]",C="[object ArrayBuffer]",D="[object DataView]",O="[object Float32Array]",P="[object Float64Array]",z="[object Int8Array]",R="[object Int16Array]",B="[object Int32Array]",U="[object Uint8Array]",F="[object Uint8ClampedArray]",Y="[object Uint16Array]",Q="[object Uint32Array]",W=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,Z=/[&<>"']/g,V=RegExp(q.source),J=RegExp(Z.source),K=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,et=/^\w*$/,nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rt=/[\\^$.*+?()[\]{}|]/g,it=RegExp(rt.source),ot=/^\s+/,at=/\s/,st=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ut=/\{\n\/\* \[wrapped with (.+)\] \*/,ct=/,? & /,lt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ht=/[()=,{}\[\]\/\s]/,dt=/\\(\\)?/g,ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,mt=/^[-+]0x[0-9a-f]+$/i,yt=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,bt=/^0o[0-7]+$/i,vt=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Mt=/($^)/,_t=/['\n\r\u2028\u2029\\]/g,Et="\\ud800-\\udfff",At="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",St="\\u2700-\\u27bf",kt="a-z\\xdf-\\xf6\\xf8-\\xff",Nt="A-Z\\xc0-\\xd6\\xd8-\\xde",Tt="\\ufe0e\\ufe0f",xt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Lt="['’]",It="["+Et+"]",jt="["+xt+"]",Ct="["+At+"]",Dt="\\d+",Ot="["+St+"]",Pt="["+kt+"]",zt="[^"+Et+xt+Dt+St+kt+Nt+"]",Rt="\\ud83c[\\udffb-\\udfff]",Bt="[^"+Et+"]",Ut="(?:\\ud83c[\\udde6-\\uddff]){2}",Ft="[\\ud800-\\udbff][\\udc00-\\udfff]",Yt="["+Nt+"]",Qt="\\u200d",Wt="(?:"+Pt+"|"+zt+")",Ht="(?:"+Yt+"|"+zt+")",Gt="(?:['’](?:d|ll|m|re|s|t|ve))?",qt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Zt="(?:"+Ct+"|"+Rt+")"+"?",Vt="["+Tt+"]?",Jt=Vt+Zt+("(?:"+Qt+"(?:"+[Bt,Ut,Ft].join("|")+")"+Vt+Zt+")*"),Kt="(?:"+[Ot,Ut,Ft].join("|")+")"+Jt,Xt="(?:"+[Bt+Ct+"?",Ct,Ut,Ft,It].join("|")+")",$t=RegExp(Lt,"g"),te=RegExp(Ct,"g"),ee=RegExp(Rt+"(?="+Rt+")|"+Xt+Jt,"g"),ne=RegExp([Yt+"?"+Pt+"+"+Gt+"(?="+[jt,Yt,"$"].join("|")+")",Ht+"+"+qt+"(?="+[jt,Yt+Wt,"$"].join("|")+")",Yt+"?"+Wt+"+"+Gt,Yt+"+"+qt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Dt,Kt].join("|"),"g"),re=RegExp("["+Qt+Et+At+Tt+"]"),ie=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,oe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ae=-1,se={};se[O]=se[P]=se[z]=se[R]=se[B]=se[U]=se[F]=se[Y]=se[Q]=!0,se[g]=se[b]=se[C]=se[v]=se[D]=se[w]=se[M]=se[_]=se[A]=se[S]=se[k]=se[T]=se[x]=se[L]=se[j]=!1;var ue={};ue[g]=ue[b]=ue[C]=ue[D]=ue[v]=ue[w]=ue[O]=ue[P]=ue[z]=ue[R]=ue[B]=ue[A]=ue[S]=ue[k]=ue[T]=ue[x]=ue[L]=ue[I]=ue[U]=ue[F]=ue[Y]=ue[Q]=!0,ue[M]=ue[_]=ue[j]=!1;var ce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},le=parseFloat,he=parseInt,de="object"==typeof r&&r&&r.Object===Object&&r,fe="object"==typeof self&&self&&self.Object===Object&&self,pe=de||fe||Function("return this")(),me=e&&!e.nodeType&&e,ye=me&&t&&!t.nodeType&&t,ge=ye&&ye.exports===me,be=ge&&de.process,ve=function(){try{var t=ye&&ye.require&&ye.require("util").types;return t||be&&be.binding&&be.binding("util")}catch(t){}}(),we=ve&&ve.isArrayBuffer,Me=ve&&ve.isDate,_e=ve&&ve.isMap,Ee=ve&&ve.isRegExp,Ae=ve&&ve.isSet,Se=ve&&ve.isTypedArray;function ke(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ne(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function Te(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function xe(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Le(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Ie(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function je(t,e){return!!(null==t?0:t.length)&&Ye(t,e,0)>-1}function Ce(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function De(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function Oe(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Pe(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function ze(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Re(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Be=Ge("length");function Ue(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function Fe(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Ye(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):Fe(t,We,n)}function Qe(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function We(t){return t!=t}function He(t,e){var n=null==t?0:t.length;return n?Ve(t,e)/n:p}function Ge(t){return function(e){return null==e?n:e[t]}}function qe(t){return function(e){return null==t?n:t[e]}}function Ze(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function Ve(t,e){for(var r,i=-1,o=t.length;++i<o;){var a=e(t[i]);a!==n&&(r=r===n?a:r+a)}return r}function Je(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ke(t){return t?t.slice(0,yn(t)+1).replace(ot,""):t}function Xe(t){return function(e){return t(e)}}function $e(t,e){return De(e,(function(e){return t[e]}))}function tn(t,e){return t.has(e)}function en(t,e){for(var n=-1,r=t.length;++n<r&&Ye(e,t[n],0)>-1;);return n}function nn(t,e){for(var n=t.length;n--&&Ye(e,t[n],0)>-1;);return n}function rn(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var on=qe({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),an=qe({"&":"&","<":"<",">":">",'"':""","'":"'"});function sn(t){return"\\"+ce[t]}function un(t){return re.test(t)}function cn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function ln(t,e){return function(n){return t(e(n))}}function hn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var s=t[n];s!==e&&s!==a||(t[n]=a,o[i++]=n)}return o}function dn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function fn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function pn(t){return un(t)?function(t){var e=ee.lastIndex=0;for(;ee.test(t);)++e;return e}(t):Be(t)}function mn(t){return un(t)?function(t){return t.match(ee)||[]}(t):function(t){return t.split("")}(t)}function yn(t){for(var e=t.length;e--&&at.test(t.charAt(e)););return e}var gn=qe({"&":"&","<":"<",">":">",""":'"',"'":"'"});var bn=function t(e){var r,at=(e=null==e?pe:bn.defaults(pe.Object(),e,bn.pick(pe,oe))).Array,Et=e.Date,At=e.Error,St=e.Function,kt=e.Math,Nt=e.Object,Tt=e.RegExp,xt=e.String,Lt=e.TypeError,It=at.prototype,jt=St.prototype,Ct=Nt.prototype,Dt=e["__core-js_shared__"],Ot=jt.toString,Pt=Ct.hasOwnProperty,zt=0,Rt=(r=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Bt=Ct.toString,Ut=Ot.call(Nt),Ft=pe._,Yt=Tt("^"+Ot.call(Pt).replace(rt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qt=ge?e.Buffer:n,Wt=e.Symbol,Ht=e.Uint8Array,Gt=Qt?Qt.allocUnsafe:n,qt=ln(Nt.getPrototypeOf,Nt),Zt=Nt.create,Vt=Ct.propertyIsEnumerable,Jt=It.splice,Kt=Wt?Wt.isConcatSpreadable:n,Xt=Wt?Wt.iterator:n,ee=Wt?Wt.toStringTag:n,re=function(){try{var t=po(Nt,"defineProperty");return t({},"",{}),t}catch(t){}}(),ce=e.clearTimeout!==pe.clearTimeout&&e.clearTimeout,de=Et&&Et.now!==pe.Date.now&&Et.now,fe=e.setTimeout!==pe.setTimeout&&e.setTimeout,me=kt.ceil,ye=kt.floor,be=Nt.getOwnPropertySymbols,ve=Qt?Qt.isBuffer:n,Be=e.isFinite,qe=It.join,vn=ln(Nt.keys,Nt),wn=kt.max,Mn=kt.min,_n=Et.now,En=e.parseInt,An=kt.random,Sn=It.reverse,kn=po(e,"DataView"),Nn=po(e,"Map"),Tn=po(e,"Promise"),xn=po(e,"Set"),Ln=po(e,"WeakMap"),In=po(Nt,"create"),jn=Ln&&new Ln,Cn={},Dn=Fo(kn),On=Fo(Nn),Pn=Fo(Tn),zn=Fo(xn),Rn=Fo(Ln),Bn=Wt?Wt.prototype:n,Un=Bn?Bn.valueOf:n,Fn=Bn?Bn.toString:n;function Yn(t){if(is(t)&&!qa(t)&&!(t instanceof Gn)){if(t instanceof Hn)return t;if(Pt.call(t,"__wrapped__"))return Yo(t)}return new Hn(t)}var Qn=function(){function t(){}return function(e){if(!rs(e))return{};if(Zt)return Zt(e);t.prototype=e;var r=new t;return t.prototype=n,r}}();function Wn(){}function Hn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=n}function Gn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function qn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Zn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Vn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Jn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Vn;++e<n;)this.add(t[e])}function Kn(t){var e=this.__data__=new Zn(t);this.size=e.size}function Xn(t,e){var n=qa(t),r=!n&&Ga(t),i=!n&&!r&&Ka(t),o=!n&&!r&&!i&&ds(t),a=n||r||i||o,s=a?Je(t.length,xt):[],u=s.length;for(var c in t)!e&&!Pt.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Mo(c,u))||s.push(c);return s}function $n(t){var e=t.length;return e?t[Jr(0,e-1)]:n}function tr(t,e){return Ro(Ii(t),cr(e,0,t.length))}function er(t){return Ro(Ii(t))}function nr(t,e,r){(r!==n&&!Qa(t[e],r)||r===n&&!(e in t))&&sr(t,e,r)}function rr(t,e,r){var i=t[e];Pt.call(t,e)&&Qa(i,r)&&(r!==n||e in t)||sr(t,e,r)}function ir(t,e){for(var n=t.length;n--;)if(Qa(t[n][0],e))return n;return-1}function or(t,e,n,r){return pr(t,(function(t,i,o){e(r,t,n(t),o)})),r}function ar(t,e){return t&&ji(e,Ds(e),t)}function sr(t,e,n){"__proto__"==e&&re?re(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ur(t,e){for(var r=-1,i=e.length,o=at(i),a=null==t;++r<i;)o[r]=a?n:xs(t,e[r]);return o}function cr(t,e,r){return t==t&&(r!==n&&(t=t<=r?t:r),e!==n&&(t=t>=e?t:e)),t}function lr(t,e,r,i,o,a){var s,u=1&e,c=2&e,l=4&e;if(r&&(s=o?r(t,i,o,a):r(t)),s!==n)return s;if(!rs(t))return t;var h=qa(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&Pt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!u)return Ii(t,s)}else{var d=go(t),f=d==_||d==E;if(Ka(t))return Si(t,u);if(d==k||d==g||f&&!o){if(s=c||f?{}:vo(t),!u)return c?function(t,e){return ji(t,yo(t),e)}(t,function(t,e){return t&&ji(e,Os(e),t)}(s,t)):function(t,e){return ji(t,mo(t),e)}(t,ar(s,t))}else{if(!ue[d])return o?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case C:return ki(t);case v:case w:return new r(+t);case D:return function(t,e){var n=e?ki(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case O:case P:case z:case R:case B:case U:case F:case Y:case Q:return Ni(t,n);case A:return new r;case S:case L:return new r(t);case T:return function(t){var e=new t.constructor(t.source,pt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case x:return new r;case I:return i=t,Un?Nt(Un.call(i)):{}}var i}(t,d,u)}}a||(a=new Kn);var p=a.get(t);if(p)return p;a.set(t,s),cs(t)?t.forEach((function(n){s.add(lr(n,e,r,n,t,a))})):os(t)&&t.forEach((function(n,i){s.set(i,lr(n,e,r,i,t,a))}));var m=h?n:(l?c?ao:oo:c?Os:Ds)(t);return Te(m||t,(function(n,i){m&&(n=t[i=n]),rr(s,i,lr(n,e,r,i,t,a))})),s}function hr(t,e,r){var i=r.length;if(null==t)return!i;for(t=Nt(t);i--;){var o=r[i],a=e[o],s=t[o];if(s===n&&!(o in t)||!a(s))return!1}return!0}function dr(t,e,r){if("function"!=typeof t)throw new Lt(i);return Do((function(){t.apply(n,r)}),e)}function fr(t,e,n,r){var i=-1,o=je,a=!0,s=t.length,u=[],c=e.length;if(!s)return u;n&&(e=De(e,Xe(n))),r?(o=Ce,a=!1):e.length>=200&&(o=tn,a=!1,e=new Jn(e));t:for(;++i<s;){var l=t[i],h=null==n?l:n(l);if(l=r||0!==l?l:0,a&&h==h){for(var d=c;d--;)if(e[d]===h)continue t;u.push(l)}else o(e,h,r)||u.push(l)}return u}Yn.templateSettings={escape:K,evaluate:X,interpolate:$,variable:"",imports:{_:Yn}},Yn.prototype=Wn.prototype,Yn.prototype.constructor=Yn,Hn.prototype=Qn(Wn.prototype),Hn.prototype.constructor=Hn,Gn.prototype=Qn(Wn.prototype),Gn.prototype.constructor=Gn,qn.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},qn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},qn.prototype.get=function(t){var e=this.__data__;if(In){var r=e[t];return r===o?n:r}return Pt.call(e,t)?e[t]:n},qn.prototype.has=function(t){var e=this.__data__;return In?e[t]!==n:Pt.call(e,t)},qn.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=In&&e===n?o:e,this},Zn.prototype.clear=function(){this.__data__=[],this.size=0},Zn.prototype.delete=function(t){var e=this.__data__,n=ir(e,t);return!(n<0)&&(n==e.length-1?e.pop():Jt.call(e,n,1),--this.size,!0)},Zn.prototype.get=function(t){var e=this.__data__,r=ir(e,t);return r<0?n:e[r][1]},Zn.prototype.has=function(t){return ir(this.__data__,t)>-1},Zn.prototype.set=function(t,e){var n=this.__data__,r=ir(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new qn,map:new(Nn||Zn),string:new qn}},Vn.prototype.delete=function(t){var e=ho(this,t).delete(t);return this.size-=e?1:0,e},Vn.prototype.get=function(t){return ho(this,t).get(t)},Vn.prototype.has=function(t){return ho(this,t).has(t)},Vn.prototype.set=function(t,e){var n=ho(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Jn.prototype.add=Jn.prototype.push=function(t){return this.__data__.set(t,o),this},Jn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.clear=function(){this.__data__=new Zn,this.size=0},Kn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Kn.prototype.get=function(t){return this.__data__.get(t)},Kn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Zn){var r=n.__data__;if(!Nn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Vn(r)}return n.set(t,e),this.size=n.size,this};var pr=Oi(_r),mr=Oi(Er,!0);function yr(t,e){var n=!0;return pr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function gr(t,e,r){for(var i=-1,o=t.length;++i<o;){var a=t[i],s=e(a);if(null!=s&&(u===n?s==s&&!hs(s):r(s,u)))var u=s,c=a}return c}function br(t,e){var n=[];return pr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function vr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=wo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?vr(s,e-1,n,r,i):Oe(i,s):r||(i[i.length]=s)}return i}var wr=Pi(),Mr=Pi(!0);function _r(t,e){return t&&wr(t,e,Ds)}function Er(t,e){return t&&Mr(t,e,Ds)}function Ar(t,e){return Ie(e,(function(e){return ts(t[e])}))}function Sr(t,e){for(var r=0,i=(e=Mi(e,t)).length;null!=t&&r<i;)t=t[Uo(e[r++])];return r&&r==i?t:n}function kr(t,e,n){var r=e(t);return qa(t)?r:Oe(r,n(t))}function Nr(t){return null==t?t===n?"[object Undefined]":"[object Null]":ee&&ee in Nt(t)?function(t){var e=Pt.call(t,ee),r=t[ee];try{t[ee]=n;var i=!0}catch(t){}var o=Bt.call(t);i&&(e?t[ee]=r:delete t[ee]);return o}(t):function(t){return Bt.call(t)}(t)}function Tr(t,e){return t>e}function xr(t,e){return null!=t&&Pt.call(t,e)}function Lr(t,e){return null!=t&&e in Nt(t)}function Ir(t,e,r){for(var i=r?Ce:je,o=t[0].length,a=t.length,s=a,u=at(a),c=1/0,l=[];s--;){var h=t[s];s&&e&&(h=De(h,Xe(e))),c=Mn(h.length,c),u[s]=!r&&(e||o>=120&&h.length>=120)?new Jn(s&&h):n}h=t[0];var d=-1,f=u[0];t:for(;++d<o&&l.length<c;){var p=h[d],m=e?e(p):p;if(p=r||0!==p?p:0,!(f?tn(f,m):i(l,m,r))){for(s=a;--s;){var y=u[s];if(!(y?tn(y,m):i(t[s],m,r)))continue t}f&&f.push(m),l.push(p)}}return l}function jr(t,e,r){var i=null==(t=Lo(t,e=Mi(e,t)))?t:t[Uo($o(e))];return null==i?n:ke(i,t,r)}function Cr(t){return is(t)&&Nr(t)==g}function Dr(t,e,r,i,o){return t===e||(null==t||null==e||!is(t)&&!is(e)?t!=t&&e!=e:function(t,e,r,i,o,a){var s=qa(t),u=qa(e),c=s?b:go(t),l=u?b:go(e),h=(c=c==g?k:c)==k,d=(l=l==g?k:l)==k,f=c==l;if(f&&Ka(t)){if(!Ka(e))return!1;s=!0,h=!1}if(f&&!h)return a||(a=new Kn),s||ds(t)?ro(t,e,r,i,o,a):function(t,e,n,r,i,o,a){switch(n){case D:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case C:return!(t.byteLength!=e.byteLength||!o(new Ht(t),new Ht(e)));case v:case w:case S:return Qa(+t,+e);case M:return t.name==e.name&&t.message==e.message;case T:case L:return t==e+"";case A:var s=cn;case x:var u=1&r;if(s||(s=dn),t.size!=e.size&&!u)return!1;var c=a.get(t);if(c)return c==e;r|=2,a.set(t,e);var l=ro(s(t),s(e),r,i,o,a);return a.delete(t),l;case I:if(Un)return Un.call(t)==Un.call(e)}return!1}(t,e,c,r,i,o,a);if(!(1&r)){var p=h&&Pt.call(t,"__wrapped__"),m=d&&Pt.call(e,"__wrapped__");if(p||m){var y=p?t.value():t,_=m?e.value():e;return a||(a=new Kn),o(y,_,r,i,a)}}if(!f)return!1;return a||(a=new Kn),function(t,e,r,i,o,a){var s=1&r,u=oo(t),c=u.length,l=oo(e),h=l.length;if(c!=h&&!s)return!1;var d=c;for(;d--;){var f=u[d];if(!(s?f in e:Pt.call(e,f)))return!1}var p=a.get(t),m=a.get(e);if(p&&m)return p==e&&m==t;var y=!0;a.set(t,e),a.set(e,t);var g=s;for(;++d<c;){var b=t[f=u[d]],v=e[f];if(i)var w=s?i(v,b,f,e,t,a):i(b,v,f,t,e,a);if(!(w===n?b===v||o(b,v,r,i,a):w)){y=!1;break}g||(g="constructor"==f)}if(y&&!g){var M=t.constructor,_=e.constructor;M==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof M&&M instanceof M&&"function"==typeof _&&_ instanceof _||(y=!1)}return a.delete(t),a.delete(e),y}(t,e,r,i,o,a)}(t,e,r,i,Dr,o))}function Or(t,e,r,i){var o=r.length,a=o,s=!i;if(null==t)return!a;for(t=Nt(t);o--;){var u=r[o];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<a;){var c=(u=r[o])[0],l=t[c],h=u[1];if(s&&u[2]){if(l===n&&!(c in t))return!1}else{var d=new Kn;if(i)var f=i(l,h,c,t,e,d);if(!(f===n?Dr(h,l,3,i,d):f))return!1}}return!0}function Pr(t){return!(!rs(t)||(e=t,Rt&&Rt in e))&&(ts(t)?Yt:gt).test(Fo(t));var e}function zr(t){return"function"==typeof t?t:null==t?au:"object"==typeof t?qa(t)?Qr(t[0],t[1]):Yr(t):mu(t)}function Rr(t){if(!ko(t))return vn(t);var e=[];for(var n in Nt(t))Pt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Br(t){if(!rs(t))return function(t){var e=[];if(null!=t)for(var n in Nt(t))e.push(n);return e}(t);var e=ko(t),n=[];for(var r in t)("constructor"!=r||!e&&Pt.call(t,r))&&n.push(r);return n}function Ur(t,e){return t<e}function Fr(t,e){var n=-1,r=Va(t)?at(t.length):[];return pr(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function Yr(t){var e=fo(t);return 1==e.length&&e[0][2]?To(e[0][0],e[0][1]):function(n){return n===t||Or(n,t,e)}}function Qr(t,e){return Eo(t)&&No(e)?To(Uo(t),e):function(r){var i=xs(r,t);return i===n&&i===e?Ls(r,t):Dr(e,i,3)}}function Wr(t,e,r,i,o){t!==e&&wr(e,(function(a,s){if(o||(o=new Kn),rs(a))!function(t,e,r,i,o,a,s){var u=jo(t,r),c=jo(e,r),l=s.get(c);if(l)return void nr(t,r,l);var h=a?a(u,c,r+"",t,e,s):n,d=h===n;if(d){var f=qa(c),p=!f&&Ka(c),m=!f&&!p&&ds(c);h=c,f||p||m?qa(u)?h=u:Ja(u)?h=Ii(u):p?(d=!1,h=Si(c,!0)):m?(d=!1,h=Ni(c,!0)):h=[]:ss(c)||Ga(c)?(h=u,Ga(u)?h=ws(u):rs(u)&&!ts(u)||(h=vo(c))):d=!1}d&&(s.set(c,h),o(h,c,i,a,s),s.delete(c));nr(t,r,h)}(t,e,s,r,Wr,i,o);else{var u=i?i(jo(t,s),a,s+"",t,e,o):n;u===n&&(u=a),nr(t,s,u)}}),Os)}function Hr(t,e){var r=t.length;if(r)return Mo(e+=e<0?r:0,r)?t[e]:n}function Gr(t,e,n){e=e.length?De(e,(function(t){return qa(t)?function(e){return Sr(e,1===t.length?t[0]:t)}:t})):[au];var r=-1;e=De(e,Xe(lo()));var i=Fr(t,(function(t,n,i){var o=De(e,(function(e){return e(t)}));return{criteria:o,index:++r,value:t}}));return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(i,(function(t,e){return function(t,e,n){var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;for(;++r<a;){var u=Ti(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function qr(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Sr(t,a);n(s,a)&&ei(o,Mi(a,t),s)}return o}function Zr(t,e,n,r){var i=r?Qe:Ye,o=-1,a=e.length,s=t;for(t===e&&(e=Ii(e)),n&&(s=De(t,Xe(n)));++o<a;)for(var u=0,c=e[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==t&&Jt.call(s,u,1),Jt.call(t,u,1);return t}function Vr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;Mo(i)?Jt.call(t,i,1):fi(t,i)}}return t}function Jr(t,e){return t+ye(An()*(e-t+1))}function Kr(t,e){var n="";if(!t||e<1||e>f)return n;do{e%2&&(n+=t),(e=ye(e/2))&&(t+=t)}while(e);return n}function Xr(t,e){return Oo(xo(t,e,au),t+"")}function $r(t){return $n(Qs(t))}function ti(t,e){var n=Qs(t);return Ro(n,cr(e,0,n.length))}function ei(t,e,r,i){if(!rs(t))return t;for(var o=-1,a=(e=Mi(e,t)).length,s=a-1,u=t;null!=u&&++o<a;){var c=Uo(e[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=s){var h=u[c];(l=i?i(h,c,u):n)===n&&(l=rs(h)?h:Mo(e[o+1])?[]:{})}rr(u,c,l),u=u[c]}return t}var ni=jn?function(t,e){return jn.set(t,e),t}:au,ri=re?function(t,e){return re(t,"toString",{configurable:!0,enumerable:!1,value:ru(e),writable:!0})}:au;function ii(t){return Ro(Qs(t))}function oi(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=at(i);++r<i;)o[r]=t[r+e];return o}function ai(t,e){var n;return pr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function si(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!hs(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return ui(t,e,au,n)}function ui(t,e,r,i){var o=0,a=null==t?0:t.length;if(0===a)return 0;for(var s=(e=r(e))!=e,u=null===e,c=hs(e),l=e===n;o<a;){var h=ye((o+a)/2),d=r(t[h]),f=d!==n,p=null===d,m=d==d,y=hs(d);if(s)var g=i||m;else g=l?m&&(i||f):u?m&&f&&(i||!p):c?m&&f&&!p&&(i||!y):!p&&!y&&(i?d<=e:d<e);g?o=h+1:a=h}return Mn(a,4294967294)}function ci(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!Qa(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function li(t){return"number"==typeof t?t:hs(t)?p:+t}function hi(t){if("string"==typeof t)return t;if(qa(t))return De(t,hi)+"";if(hs(t))return Fn?Fn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function di(t,e,n){var r=-1,i=je,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=Ce;else if(o>=200){var c=e?null:Ki(t);if(c)return dn(c);a=!1,i=tn,u=new Jn}else u=e?[]:s;t:for(;++r<o;){var l=t[r],h=e?e(l):l;if(l=n||0!==l?l:0,a&&h==h){for(var d=u.length;d--;)if(u[d]===h)continue t;e&&u.push(h),s.push(l)}else i(u,h,n)||(u!==s&&u.push(h),s.push(l))}return s}function fi(t,e){return null==(t=Lo(t,e=Mi(e,t)))||delete t[Uo($o(e))]}function pi(t,e,n,r){return ei(t,e,n(Sr(t,e)),r)}function mi(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?oi(t,r?0:o,r?o+1:i):oi(t,r?o+1:0,r?i:o)}function yi(t,e){var n=t;return n instanceof Gn&&(n=n.value()),Pe(e,(function(t,e){return e.func.apply(e.thisArg,Oe([t],e.args))}),n)}function gi(t,e,n){var r=t.length;if(r<2)return r?di(t[0]):[];for(var i=-1,o=at(r);++i<r;)for(var a=t[i],s=-1;++s<r;)s!=i&&(o[i]=fr(o[i]||a,t[s],e,n));return di(vr(o,1),e,n)}function bi(t,e,r){for(var i=-1,o=t.length,a=e.length,s={};++i<o;){var u=i<a?e[i]:n;r(s,t[i],u)}return s}function vi(t){return Ja(t)?t:[]}function wi(t){return"function"==typeof t?t:au}function Mi(t,e){return qa(t)?t:Eo(t,e)?[t]:Bo(Ms(t))}var _i=Xr;function Ei(t,e,r){var i=t.length;return r=r===n?i:r,!e&&r>=i?t:oi(t,e,r)}var Ai=ce||function(t){return pe.clearTimeout(t)};function Si(t,e){if(e)return t.slice();var n=t.length,r=Gt?Gt(n):new t.constructor(n);return t.copy(r),r}function ki(t){var e=new t.constructor(t.byteLength);return new Ht(e).set(new Ht(t)),e}function Ni(t,e){var n=e?ki(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ti(t,e){if(t!==e){var r=t!==n,i=null===t,o=t==t,a=hs(t),s=e!==n,u=null===e,c=e==e,l=hs(e);if(!u&&!l&&!a&&t>e||a&&s&&c&&!u&&!l||i&&s&&c||!r&&c||!o)return 1;if(!i&&!a&&!l&&t<e||l&&r&&o&&!i&&!a||u&&r&&o||!s&&o||!c)return-1}return 0}function xi(t,e,n,r){for(var i=-1,o=t.length,a=n.length,s=-1,u=e.length,c=wn(o-a,0),l=at(u+c),h=!r;++s<u;)l[s]=e[s];for(;++i<a;)(h||i<o)&&(l[n[i]]=t[i]);for(;c--;)l[s++]=t[i++];return l}function Li(t,e,n,r){for(var i=-1,o=t.length,a=-1,s=n.length,u=-1,c=e.length,l=wn(o-s,0),h=at(l+c),d=!r;++i<l;)h[i]=t[i];for(var f=i;++u<c;)h[f+u]=e[u];for(;++a<s;)(d||i<o)&&(h[f+n[a]]=t[i++]);return h}function Ii(t,e){var n=-1,r=t.length;for(e||(e=at(r));++n<r;)e[n]=t[n];return e}function ji(t,e,r,i){var o=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var u=e[a],c=i?i(r[u],t[u],u,r,t):n;c===n&&(c=t[u]),o?sr(r,u,c):rr(r,u,c)}return r}function Ci(t,e){return function(n,r){var i=qa(n)?Ne:or,o=e?e():{};return i(n,t,lo(r,2),o)}}function Di(t){return Xr((function(e,r){var i=-1,o=r.length,a=o>1?r[o-1]:n,s=o>2?r[2]:n;for(a=t.length>3&&"function"==typeof a?(o--,a):n,s&&_o(r[0],r[1],s)&&(a=o<3?n:a,o=1),e=Nt(e);++i<o;){var u=r[i];u&&t(e,u,i,a)}return e}))}function Oi(t,e){return function(n,r){if(null==n)return n;if(!Va(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Nt(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Pi(t){return function(e,n,r){for(var i=-1,o=Nt(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}function zi(t){return function(e){var r=un(e=Ms(e))?mn(e):n,i=r?r[0]:e.charAt(0),o=r?Ei(r,1).join(""):e.slice(1);return i[t]()+o}}function Ri(t){return function(e){return Pe(tu(Gs(e).replace($t,"")),t,"")}}function Bi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Qn(t.prototype),r=t.apply(n,e);return rs(r)?r:n}}function Ui(t){return function(e,r,i){var o=Nt(e);if(!Va(e)){var a=lo(r,3);e=Ds(e),r=function(t){return a(o[t],t,o)}}var s=t(e,r,i);return s>-1?o[a?e[s]:s]:n}}function Fi(t){return io((function(e){var r=e.length,o=r,a=Hn.prototype.thru;for(t&&e.reverse();o--;){var s=e[o];if("function"!=typeof s)throw new Lt(i);if(a&&!u&&"wrapper"==uo(s))var u=new Hn([],!0)}for(o=u?o:r;++o<r;){var c=uo(s=e[o]),l="wrapper"==c?so(s):n;u=l&&Ao(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[uo(l[0])].apply(u,l[3]):1==s.length&&Ao(s)?u[c]():u.thru(s)}return function(){var t=arguments,n=t[0];if(u&&1==t.length&&qa(n))return u.plant(n).value();for(var i=0,o=r?e[i].apply(this,t):n;++i<r;)o=e[i].call(this,o);return o}}))}function Yi(t,e,r,i,o,a,s,u,c,h){var d=e&l,f=1&e,p=2&e,m=24&e,y=512&e,g=p?n:Bi(t);return function n(){for(var l=arguments.length,b=at(l),v=l;v--;)b[v]=arguments[v];if(m)var w=co(n),M=rn(b,w);if(i&&(b=xi(b,i,o,m)),a&&(b=Li(b,a,s,m)),l-=M,m&&l<h){var _=hn(b,w);return Vi(t,e,Yi,n.placeholder,r,b,_,u,c,h-l)}var E=f?r:this,A=p?E[t]:t;return l=b.length,u?b=Io(b,u):y&&l>1&&b.reverse(),d&&c<l&&(b.length=c),this&&this!==pe&&this instanceof n&&(A=g||Bi(A)),A.apply(E,b)}}function Qi(t,e){return function(n,r){return function(t,e,n,r){return _r(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Wi(t,e){return function(r,i){var o;if(r===n&&i===n)return e;if(r!==n&&(o=r),i!==n){if(o===n)return i;"string"==typeof r||"string"==typeof i?(r=hi(r),i=hi(i)):(r=li(r),i=li(i)),o=t(r,i)}return o}}function Hi(t){return io((function(e){return e=De(e,Xe(lo())),Xr((function(n){var r=this;return t(e,(function(t){return ke(t,r,n)}))}))}))}function Gi(t,e){var r=(e=e===n?" ":hi(e)).length;if(r<2)return r?Kr(e,t):e;var i=Kr(e,me(t/pn(e)));return un(e)?Ei(mn(i),0,t).join(""):i.slice(0,t)}function qi(t){return function(e,r,i){return i&&"number"!=typeof i&&_o(e,r,i)&&(r=i=n),e=ys(e),r===n?(r=e,e=0):r=ys(r),function(t,e,n,r){for(var i=-1,o=wn(me((e-t)/(n||1)),0),a=at(o);o--;)a[r?o:++i]=t,t+=n;return a}(e,r,i=i===n?e<r?1:-1:ys(i),t)}}function Zi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=vs(e),n=vs(n)),t(e,n)}}function Vi(t,e,r,i,o,a,s,l,h,d){var f=8&e;e|=f?u:c,4&(e&=~(f?c:u))||(e&=-4);var p=[t,e,o,f?a:n,f?s:n,f?n:a,f?n:s,l,h,d],m=r.apply(n,p);return Ao(t)&&Co(m,p),m.placeholder=i,Po(m,t,e)}function Ji(t){var e=kt[t];return function(t,n){if(t=vs(t),(n=null==n?0:Mn(gs(n),292))&&Be(t)){var r=(Ms(t)+"e").split("e");return+((r=(Ms(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Ki=xn&&1/dn(new xn([,-0]))[1]==d?function(t){return new xn(t)}:hu;function Xi(t){return function(e){var n=go(e);return n==A?cn(e):n==x?fn(e):function(t,e){return De(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function $i(t,e,r,o,d,f,p,m){var y=2&e;if(!y&&"function"!=typeof t)throw new Lt(i);var g=o?o.length:0;if(g||(e&=-97,o=d=n),p=p===n?p:wn(gs(p),0),m=m===n?m:gs(m),g-=d?d.length:0,e&c){var b=o,v=d;o=d=n}var w=y?n:so(t),M=[t,e,r,o,d,b,v,f,p,m];if(w&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,s=r==l&&8==n||r==l&&n==h&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!s)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var u=e[3];if(u){var c=t[3];t[3]=c?xi(c,u,e[4]):u,t[4]=c?hn(t[3],a):e[4]}(u=e[5])&&(c=t[5],t[5]=c?Li(c,u,e[6]):u,t[6]=c?hn(t[5],a):e[6]);(u=e[7])&&(t[7]=u);r&l&&(t[8]=null==t[8]?e[8]:Mn(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=i}(M,w),t=M[0],e=M[1],r=M[2],o=M[3],d=M[4],!(m=M[9]=M[9]===n?y?0:t.length:wn(M[9]-g,0))&&24&e&&(e&=-25),e&&1!=e)_=8==e||e==s?function(t,e,r){var i=Bi(t);return function o(){for(var a=arguments.length,s=at(a),u=a,c=co(o);u--;)s[u]=arguments[u];var l=a<3&&s[0]!==c&&s[a-1]!==c?[]:hn(s,c);return(a-=l.length)<r?Vi(t,e,Yi,o.placeholder,n,s,l,n,n,r-a):ke(this&&this!==pe&&this instanceof o?i:t,this,s)}}(t,e,m):e!=u&&33!=e||d.length?Yi.apply(n,M):function(t,e,n,r){var i=1&e,o=Bi(t);return function e(){for(var a=-1,s=arguments.length,u=-1,c=r.length,l=at(c+s),h=this&&this!==pe&&this instanceof e?o:t;++u<c;)l[u]=r[u];for(;s--;)l[u++]=arguments[++a];return ke(h,i?n:this,l)}}(t,e,r,o);else var _=function(t,e,n){var r=1&e,i=Bi(t);return function e(){return(this&&this!==pe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,r);return Po((w?ni:Co)(_,M),t,e)}function to(t,e,r,i){return t===n||Qa(t,Ct[r])&&!Pt.call(i,r)?e:t}function eo(t,e,r,i,o,a){return rs(t)&&rs(e)&&(a.set(e,t),Wr(t,e,n,eo,a),a.delete(e)),t}function no(t){return ss(t)?n:t}function ro(t,e,r,i,o,a){var s=1&r,u=t.length,c=e.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(t),h=a.get(e);if(l&&h)return l==e&&h==t;var d=-1,f=!0,p=2&r?new Jn:n;for(a.set(t,e),a.set(e,t);++d<u;){var m=t[d],y=e[d];if(i)var g=s?i(y,m,d,e,t,a):i(m,y,d,t,e,a);if(g!==n){if(g)continue;f=!1;break}if(p){if(!Re(e,(function(t,e){if(!tn(p,e)&&(m===t||o(m,t,r,i,a)))return p.push(e)}))){f=!1;break}}else if(m!==y&&!o(m,y,r,i,a)){f=!1;break}}return a.delete(t),a.delete(e),f}function io(t){return Oo(xo(t,n,Zo),t+"")}function oo(t){return kr(t,Ds,mo)}function ao(t){return kr(t,Os,yo)}var so=jn?function(t){return jn.get(t)}:hu;function uo(t){for(var e=t.name+"",n=Cn[e],r=Pt.call(Cn,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function co(t){return(Pt.call(Yn,"placeholder")?Yn:t).placeholder}function lo(){var t=Yn.iteratee||su;return t=t===su?zr:t,arguments.length?t(arguments[0],arguments[1]):t}function ho(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function fo(t){for(var e=Ds(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,No(i)]}return e}function po(t,e){var r=function(t,e){return null==t?n:t[e]}(t,e);return Pr(r)?r:n}var mo=be?function(t){return null==t?[]:(t=Nt(t),Ie(be(t),(function(e){return Vt.call(t,e)})))}:bu,yo=be?function(t){for(var e=[];t;)Oe(e,mo(t)),t=qt(t);return e}:bu,go=Nr;function bo(t,e,n){for(var r=-1,i=(e=Mi(e,t)).length,o=!1;++r<i;){var a=Uo(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&ns(i)&&Mo(a,i)&&(qa(t)||Ga(t))}function vo(t){return"function"!=typeof t.constructor||ko(t)?{}:Qn(qt(t))}function wo(t){return qa(t)||Ga(t)||!!(Kt&&t&&t[Kt])}function Mo(t,e){var n=typeof t;return!!(e=null==e?f:e)&&("number"==n||"symbol"!=n&&vt.test(t))&&t>-1&&t%1==0&&t<e}function _o(t,e,n){if(!rs(n))return!1;var r=typeof e;return!!("number"==r?Va(n)&&Mo(e,n.length):"string"==r&&e in n)&&Qa(n[e],t)}function Eo(t,e){if(qa(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!hs(t))||(et.test(t)||!tt.test(t)||null!=e&&t in Nt(e))}function Ao(t){var e=uo(t),n=Yn[e];if("function"!=typeof n||!(e in Gn.prototype))return!1;if(t===n)return!0;var r=so(n);return!!r&&t===r[0]}(kn&&go(new kn(new ArrayBuffer(1)))!=D||Nn&&go(new Nn)!=A||Tn&&go(Tn.resolve())!=N||xn&&go(new xn)!=x||Ln&&go(new Ln)!=j)&&(go=function(t){var e=Nr(t),r=e==k?t.constructor:n,i=r?Fo(r):"";if(i)switch(i){case Dn:return D;case On:return A;case Pn:return N;case zn:return x;case Rn:return j}return e});var So=Dt?ts:vu;function ko(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ct)}function No(t){return t==t&&!rs(t)}function To(t,e){return function(r){return null!=r&&(r[t]===e&&(e!==n||t in Nt(r)))}}function xo(t,e,r){return e=wn(e===n?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=wn(n.length-e,0),a=at(o);++i<o;)a[i]=n[e+i];i=-1;for(var s=at(e+1);++i<e;)s[i]=n[i];return s[e]=r(a),ke(t,this,s)}}function Lo(t,e){return e.length<2?t:Sr(t,oi(e,0,-1))}function Io(t,e){for(var r=t.length,i=Mn(e.length,r),o=Ii(t);i--;){var a=e[i];t[i]=Mo(a,r)?o[a]:n}return t}function jo(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Co=zo(ni),Do=fe||function(t,e){return pe.setTimeout(t,e)},Oo=zo(ri);function Po(t,e,n){var r=e+"";return Oo(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(st,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Te(y,(function(n){var r="_."+n[0];e&n[1]&&!je(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(ut);return e?e[1].split(ct):[]}(r),n)))}function zo(t){var e=0,r=0;return function(){var i=_n(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(n,arguments)}}function Ro(t,e){var r=-1,i=t.length,o=i-1;for(e=e===n?i:e;++r<e;){var a=Jr(r,o),s=t[a];t[a]=t[r],t[r]=s}return t.length=e,t}var Bo=function(t){var e=za(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(nt,(function(t,n,r,i){e.push(r?i.replace(dt,"$1"):n||t)})),e}));function Uo(t){if("string"==typeof t||hs(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Fo(t){if(null!=t){try{return Ot.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Yo(t){if(t instanceof Gn)return t.clone();var e=new Hn(t.__wrapped__,t.__chain__);return e.__actions__=Ii(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Qo=Xr((function(t,e){return Ja(t)?fr(t,vr(e,1,Ja,!0)):[]})),Wo=Xr((function(t,e){var r=$o(e);return Ja(r)&&(r=n),Ja(t)?fr(t,vr(e,1,Ja,!0),lo(r,2)):[]})),Ho=Xr((function(t,e){var r=$o(e);return Ja(r)&&(r=n),Ja(t)?fr(t,vr(e,1,Ja,!0),n,r):[]}));function Go(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:gs(n);return i<0&&(i=wn(r+i,0)),Fe(t,lo(e,3),i)}function qo(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return r!==n&&(o=gs(r),o=r<0?wn(i+o,0):Mn(o,i-1)),Fe(t,lo(e,3),o,!0)}function Zo(t){return(null==t?0:t.length)?vr(t,1):[]}function Vo(t){return t&&t.length?t[0]:n}var Jo=Xr((function(t){var e=De(t,vi);return e.length&&e[0]===t[0]?Ir(e):[]})),Ko=Xr((function(t){var e=$o(t),r=De(t,vi);return e===$o(r)?e=n:r.pop(),r.length&&r[0]===t[0]?Ir(r,lo(e,2)):[]})),Xo=Xr((function(t){var e=$o(t),r=De(t,vi);return(e="function"==typeof e?e:n)&&r.pop(),r.length&&r[0]===t[0]?Ir(r,n,e):[]}));function $o(t){var e=null==t?0:t.length;return e?t[e-1]:n}var ta=Xr(ea);function ea(t,e){return t&&t.length&&e&&e.length?Zr(t,e):t}var na=io((function(t,e){var n=null==t?0:t.length,r=ur(t,e);return Vr(t,De(e,(function(t){return Mo(t,n)?+t:t})).sort(Ti)),r}));function ra(t){return null==t?t:Sn.call(t)}var ia=Xr((function(t){return di(vr(t,1,Ja,!0))})),oa=Xr((function(t){var e=$o(t);return Ja(e)&&(e=n),di(vr(t,1,Ja,!0),lo(e,2))})),aa=Xr((function(t){var e=$o(t);return e="function"==typeof e?e:n,di(vr(t,1,Ja,!0),n,e)}));function sa(t){if(!t||!t.length)return[];var e=0;return t=Ie(t,(function(t){if(Ja(t))return e=wn(t.length,e),!0})),Je(e,(function(e){return De(t,Ge(e))}))}function ua(t,e){if(!t||!t.length)return[];var r=sa(t);return null==e?r:De(r,(function(t){return ke(e,n,t)}))}var ca=Xr((function(t,e){return Ja(t)?fr(t,e):[]})),la=Xr((function(t){return gi(Ie(t,Ja))})),ha=Xr((function(t){var e=$o(t);return Ja(e)&&(e=n),gi(Ie(t,Ja),lo(e,2))})),da=Xr((function(t){var e=$o(t);return e="function"==typeof e?e:n,gi(Ie(t,Ja),n,e)})),fa=Xr(sa);var pa=Xr((function(t){var e=t.length,r=e>1?t[e-1]:n;return r="function"==typeof r?(t.pop(),r):n,ua(t,r)}));function ma(t){var e=Yn(t);return e.__chain__=!0,e}function ya(t,e){return e(t)}var ga=io((function(t){var e=t.length,r=e?t[0]:0,i=this.__wrapped__,o=function(e){return ur(e,t)};return!(e>1||this.__actions__.length)&&i instanceof Gn&&Mo(r)?((i=i.slice(r,+r+(e?1:0))).__actions__.push({func:ya,args:[o],thisArg:n}),new Hn(i,this.__chain__).thru((function(t){return e&&!t.length&&t.push(n),t}))):this.thru(o)}));var ba=Ci((function(t,e,n){Pt.call(t,n)?++t[n]:sr(t,n,1)}));var va=Ui(Go),wa=Ui(qo);function Ma(t,e){return(qa(t)?Te:pr)(t,lo(e,3))}function _a(t,e){return(qa(t)?xe:mr)(t,lo(e,3))}var Ea=Ci((function(t,e,n){Pt.call(t,n)?t[n].push(e):sr(t,n,[e])}));var Aa=Xr((function(t,e,n){var r=-1,i="function"==typeof e,o=Va(t)?at(t.length):[];return pr(t,(function(t){o[++r]=i?ke(e,t,n):jr(t,e,n)})),o})),Sa=Ci((function(t,e,n){sr(t,n,e)}));function ka(t,e){return(qa(t)?De:Fr)(t,lo(e,3))}var Na=Ci((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var Ta=Xr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&_o(t,e[0],e[1])?e=[]:n>2&&_o(e[0],e[1],e[2])&&(e=[e[0]]),Gr(t,vr(e,1),[])})),xa=de||function(){return pe.Date.now()};function La(t,e,r){return e=r?n:e,e=t&&null==e?t.length:e,$i(t,l,n,n,n,n,e)}function Ia(t,e){var r;if("function"!=typeof e)throw new Lt(i);return t=gs(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=n),r}}var ja=Xr((function(t,e,n){var r=1;if(n.length){var i=hn(n,co(ja));r|=u}return $i(t,r,e,n,i)})),Ca=Xr((function(t,e,n){var r=3;if(n.length){var i=hn(n,co(Ca));r|=u}return $i(e,r,t,n,i)}));function Da(t,e,r){var o,a,s,u,c,l,h=0,d=!1,f=!1,p=!0;if("function"!=typeof t)throw new Lt(i);function m(e){var r=o,i=a;return o=a=n,h=e,u=t.apply(i,r)}function y(t){return h=t,c=Do(b,e),d?m(t):u}function g(t){var r=t-l;return l===n||r>=e||r<0||f&&t-h>=s}function b(){var t=xa();if(g(t))return v(t);c=Do(b,function(t){var n=e-(t-l);return f?Mn(n,s-(t-h)):n}(t))}function v(t){return c=n,p&&o?m(t):(o=a=n,u)}function w(){var t=xa(),r=g(t);if(o=arguments,a=this,l=t,r){if(c===n)return y(l);if(f)return Ai(c),c=Do(b,e),m(l)}return c===n&&(c=Do(b,e)),u}return e=vs(e)||0,rs(r)&&(d=!!r.leading,s=(f="maxWait"in r)?wn(vs(r.maxWait)||0,e):s,p="trailing"in r?!!r.trailing:p),w.cancel=function(){c!==n&&Ai(c),h=0,o=l=a=c=n},w.flush=function(){return c===n?u:v(xa())},w}var Oa=Xr((function(t,e){return dr(t,1,e)})),Pa=Xr((function(t,e,n){return dr(t,vs(e)||0,n)}));function za(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Lt(i);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(za.Cache||Vn),n}function Ra(t){if("function"!=typeof t)throw new Lt(i);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}za.Cache=Vn;var Ba=_i((function(t,e){var n=(e=1==e.length&&qa(e[0])?De(e[0],Xe(lo())):De(vr(e,1),Xe(lo()))).length;return Xr((function(r){for(var i=-1,o=Mn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return ke(t,this,r)}))})),Ua=Xr((function(t,e){var r=hn(e,co(Ua));return $i(t,u,n,e,r)})),Fa=Xr((function(t,e){var r=hn(e,co(Fa));return $i(t,c,n,e,r)})),Ya=io((function(t,e){return $i(t,h,n,n,n,e)}));function Qa(t,e){return t===e||t!=t&&e!=e}var Wa=Zi(Tr),Ha=Zi((function(t,e){return t>=e})),Ga=Cr(function(){return arguments}())?Cr:function(t){return is(t)&&Pt.call(t,"callee")&&!Vt.call(t,"callee")},qa=at.isArray,Za=we?Xe(we):function(t){return is(t)&&Nr(t)==C};function Va(t){return null!=t&&ns(t.length)&&!ts(t)}function Ja(t){return is(t)&&Va(t)}var Ka=ve||vu,Xa=Me?Xe(Me):function(t){return is(t)&&Nr(t)==w};function $a(t){if(!is(t))return!1;var e=Nr(t);return e==M||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ss(t)}function ts(t){if(!rs(t))return!1;var e=Nr(t);return e==_||e==E||"[object AsyncFunction]"==e||"[object Proxy]"==e}function es(t){return"number"==typeof t&&t==gs(t)}function ns(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=f}function rs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function is(t){return null!=t&&"object"==typeof t}var os=_e?Xe(_e):function(t){return is(t)&&go(t)==A};function as(t){return"number"==typeof t||is(t)&&Nr(t)==S}function ss(t){if(!is(t)||Nr(t)!=k)return!1;var e=qt(t);if(null===e)return!0;var n=Pt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Ot.call(n)==Ut}var us=Ee?Xe(Ee):function(t){return is(t)&&Nr(t)==T};var cs=Ae?Xe(Ae):function(t){return is(t)&&go(t)==x};function ls(t){return"string"==typeof t||!qa(t)&&is(t)&&Nr(t)==L}function hs(t){return"symbol"==typeof t||is(t)&&Nr(t)==I}var ds=Se?Xe(Se):function(t){return is(t)&&ns(t.length)&&!!se[Nr(t)]};var fs=Zi(Ur),ps=Zi((function(t,e){return t<=e}));function ms(t){if(!t)return[];if(Va(t))return ls(t)?mn(t):Ii(t);if(Xt&&t[Xt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Xt]());var e=go(t);return(e==A?cn:e==x?dn:Qs)(t)}function ys(t){return t?(t=vs(t))===d||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function gs(t){var e=ys(t),n=e%1;return e==e?n?e-n:e:0}function bs(t){return t?cr(gs(t),0,m):0}function vs(t){if("number"==typeof t)return t;if(hs(t))return p;if(rs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=rs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ke(t);var n=yt.test(t);return n||bt.test(t)?he(t.slice(2),n?2:8):mt.test(t)?p:+t}function ws(t){return ji(t,Os(t))}function Ms(t){return null==t?"":hi(t)}var _s=Di((function(t,e){if(ko(e)||Va(e))ji(e,Ds(e),t);else for(var n in e)Pt.call(e,n)&&rr(t,n,e[n])})),Es=Di((function(t,e){ji(e,Os(e),t)})),As=Di((function(t,e,n,r){ji(e,Os(e),t,r)})),Ss=Di((function(t,e,n,r){ji(e,Ds(e),t,r)})),ks=io(ur);var Ns=Xr((function(t,e){t=Nt(t);var r=-1,i=e.length,o=i>2?e[2]:n;for(o&&_o(e[0],e[1],o)&&(i=1);++r<i;)for(var a=e[r],s=Os(a),u=-1,c=s.length;++u<c;){var l=s[u],h=t[l];(h===n||Qa(h,Ct[l])&&!Pt.call(t,l))&&(t[l]=a[l])}return t})),Ts=Xr((function(t){return t.push(n,eo),ke(zs,n,t)}));function xs(t,e,r){var i=null==t?n:Sr(t,e);return i===n?r:i}function Ls(t,e){return null!=t&&bo(t,e,Lr)}var Is=Qi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Bt.call(e)),t[e]=n}),ru(au)),js=Qi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Bt.call(e)),Pt.call(t,e)?t[e].push(n):t[e]=[n]}),lo),Cs=Xr(jr);function Ds(t){return Va(t)?Xn(t):Rr(t)}function Os(t){return Va(t)?Xn(t,!0):Br(t)}var Ps=Di((function(t,e,n){Wr(t,e,n)})),zs=Di((function(t,e,n,r){Wr(t,e,n,r)})),Rs=io((function(t,e){var n={};if(null==t)return n;var r=!1;e=De(e,(function(e){return e=Mi(e,t),r||(r=e.length>1),e})),ji(t,ao(t),n),r&&(n=lr(n,7,no));for(var i=e.length;i--;)fi(n,e[i]);return n}));var Bs=io((function(t,e){return null==t?{}:function(t,e){return qr(t,e,(function(e,n){return Ls(t,n)}))}(t,e)}));function Us(t,e){if(null==t)return{};var n=De(ao(t),(function(t){return[t]}));return e=lo(e),qr(t,n,(function(t,n){return e(t,n[0])}))}var Fs=Xi(Ds),Ys=Xi(Os);function Qs(t){return null==t?[]:$e(t,Ds(t))}var Ws=Ri((function(t,e,n){return e=e.toLowerCase(),t+(n?Hs(e):e)}));function Hs(t){return $s(Ms(t).toLowerCase())}function Gs(t){return(t=Ms(t))&&t.replace(wt,on).replace(te,"")}var qs=Ri((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Zs=Ri((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Vs=zi("toLowerCase");var Js=Ri((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Ks=Ri((function(t,e,n){return t+(n?" ":"")+$s(e)}));var Xs=Ri((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),$s=zi("toUpperCase");function tu(t,e,r){return t=Ms(t),(e=r?n:e)===n?function(t){return ie.test(t)}(t)?function(t){return t.match(ne)||[]}(t):function(t){return t.match(lt)||[]}(t):t.match(e)||[]}var eu=Xr((function(t,e){try{return ke(t,n,e)}catch(t){return $a(t)?t:new At(t)}})),nu=io((function(t,e){return Te(e,(function(e){e=Uo(e),sr(t,e,ja(t[e],t))})),t}));function ru(t){return function(){return t}}var iu=Fi(),ou=Fi(!0);function au(t){return t}function su(t){return zr("function"==typeof t?t:lr(t,1))}var uu=Xr((function(t,e){return function(n){return jr(n,t,e)}})),cu=Xr((function(t,e){return function(n){return jr(t,n,e)}}));function lu(t,e,n){var r=Ds(e),i=Ar(e,r);null!=n||rs(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Ar(e,Ds(e)));var o=!(rs(n)&&"chain"in n&&!n.chain),a=ts(t);return Te(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=Ii(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Oe([this.value()],arguments))})})),t}function hu(){}var du=Hi(De),fu=Hi(Le),pu=Hi(Re);function mu(t){return Eo(t)?Ge(Uo(t)):function(t){return function(e){return Sr(e,t)}}(t)}var yu=qi(),gu=qi(!0);function bu(){return[]}function vu(){return!1}var wu=Wi((function(t,e){return t+e}),0),Mu=Ji("ceil"),_u=Wi((function(t,e){return t/e}),1),Eu=Ji("floor");var Au,Su=Wi((function(t,e){return t*e}),1),ku=Ji("round"),Nu=Wi((function(t,e){return t-e}),0);return Yn.after=function(t,e){if("function"!=typeof e)throw new Lt(i);return t=gs(t),function(){if(--t<1)return e.apply(this,arguments)}},Yn.ary=La,Yn.assign=_s,Yn.assignIn=Es,Yn.assignInWith=As,Yn.assignWith=Ss,Yn.at=ks,Yn.before=Ia,Yn.bind=ja,Yn.bindAll=nu,Yn.bindKey=Ca,Yn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return qa(t)?t:[t]},Yn.chain=ma,Yn.chunk=function(t,e,r){e=(r?_o(t,e,r):e===n)?1:wn(gs(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,a=0,s=at(me(i/e));o<i;)s[a++]=oi(t,o,o+=e);return s},Yn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},Yn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=at(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Oe(qa(n)?Ii(n):[n],vr(e,1))},Yn.cond=function(t){var e=null==t?0:t.length,n=lo();return t=e?De(t,(function(t){if("function"!=typeof t[1])throw new Lt(i);return[n(t[0]),t[1]]})):[],Xr((function(n){for(var r=-1;++r<e;){var i=t[r];if(ke(i[0],this,n))return ke(i[1],this,n)}}))},Yn.conforms=function(t){return function(t){var e=Ds(t);return function(n){return hr(n,t,e)}}(lr(t,1))},Yn.constant=ru,Yn.countBy=ba,Yn.create=function(t,e){var n=Qn(t);return null==e?n:ar(n,e)},Yn.curry=function t(e,r,i){var o=$i(e,8,n,n,n,n,n,r=i?n:r);return o.placeholder=t.placeholder,o},Yn.curryRight=function t(e,r,i){var o=$i(e,s,n,n,n,n,n,r=i?n:r);return o.placeholder=t.placeholder,o},Yn.debounce=Da,Yn.defaults=Ns,Yn.defaultsDeep=Ts,Yn.defer=Oa,Yn.delay=Pa,Yn.difference=Qo,Yn.differenceBy=Wo,Yn.differenceWith=Ho,Yn.drop=function(t,e,r){var i=null==t?0:t.length;return i?oi(t,(e=r||e===n?1:gs(e))<0?0:e,i):[]},Yn.dropRight=function(t,e,r){var i=null==t?0:t.length;return i?oi(t,0,(e=i-(e=r||e===n?1:gs(e)))<0?0:e):[]},Yn.dropRightWhile=function(t,e){return t&&t.length?mi(t,lo(e,3),!0,!0):[]},Yn.dropWhile=function(t,e){return t&&t.length?mi(t,lo(e,3),!0):[]},Yn.fill=function(t,e,r,i){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&_o(t,e,r)&&(r=0,i=o),function(t,e,r,i){var o=t.length;for((r=gs(r))<0&&(r=-r>o?0:o+r),(i=i===n||i>o?o:gs(i))<0&&(i+=o),i=r>i?0:bs(i);r<i;)t[r++]=e;return t}(t,e,r,i)):[]},Yn.filter=function(t,e){return(qa(t)?Ie:br)(t,lo(e,3))},Yn.flatMap=function(t,e){return vr(ka(t,e),1)},Yn.flatMapDeep=function(t,e){return vr(ka(t,e),d)},Yn.flatMapDepth=function(t,e,r){return r=r===n?1:gs(r),vr(ka(t,e),r)},Yn.flatten=Zo,Yn.flattenDeep=function(t){return(null==t?0:t.length)?vr(t,d):[]},Yn.flattenDepth=function(t,e){return(null==t?0:t.length)?vr(t,e=e===n?1:gs(e)):[]},Yn.flip=function(t){return $i(t,512)},Yn.flow=iu,Yn.flowRight=ou,Yn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},Yn.functions=function(t){return null==t?[]:Ar(t,Ds(t))},Yn.functionsIn=function(t){return null==t?[]:Ar(t,Os(t))},Yn.groupBy=Ea,Yn.initial=function(t){return(null==t?0:t.length)?oi(t,0,-1):[]},Yn.intersection=Jo,Yn.intersectionBy=Ko,Yn.intersectionWith=Xo,Yn.invert=Is,Yn.invertBy=js,Yn.invokeMap=Aa,Yn.iteratee=su,Yn.keyBy=Sa,Yn.keys=Ds,Yn.keysIn=Os,Yn.map=ka,Yn.mapKeys=function(t,e){var n={};return e=lo(e,3),_r(t,(function(t,r,i){sr(n,e(t,r,i),t)})),n},Yn.mapValues=function(t,e){var n={};return e=lo(e,3),_r(t,(function(t,r,i){sr(n,r,e(t,r,i))})),n},Yn.matches=function(t){return Yr(lr(t,1))},Yn.matchesProperty=function(t,e){return Qr(t,lr(e,1))},Yn.memoize=za,Yn.merge=Ps,Yn.mergeWith=zs,Yn.method=uu,Yn.methodOf=cu,Yn.mixin=lu,Yn.negate=Ra,Yn.nthArg=function(t){return t=gs(t),Xr((function(e){return Hr(e,t)}))},Yn.omit=Rs,Yn.omitBy=function(t,e){return Us(t,Ra(lo(e)))},Yn.once=function(t){return Ia(2,t)},Yn.orderBy=function(t,e,r,i){return null==t?[]:(qa(e)||(e=null==e?[]:[e]),qa(r=i?n:r)||(r=null==r?[]:[r]),Gr(t,e,r))},Yn.over=du,Yn.overArgs=Ba,Yn.overEvery=fu,Yn.overSome=pu,Yn.partial=Ua,Yn.partialRight=Fa,Yn.partition=Na,Yn.pick=Bs,Yn.pickBy=Us,Yn.property=mu,Yn.propertyOf=function(t){return function(e){return null==t?n:Sr(t,e)}},Yn.pull=ta,Yn.pullAll=ea,Yn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Zr(t,e,lo(n,2)):t},Yn.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?Zr(t,e,n,r):t},Yn.pullAt=na,Yn.range=yu,Yn.rangeRight=gu,Yn.rearg=Ya,Yn.reject=function(t,e){return(qa(t)?Ie:br)(t,Ra(lo(e,3)))},Yn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=lo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return Vr(t,i),n},Yn.rest=function(t,e){if("function"!=typeof t)throw new Lt(i);return Xr(t,e=e===n?e:gs(e))},Yn.reverse=ra,Yn.sampleSize=function(t,e,r){return e=(r?_o(t,e,r):e===n)?1:gs(e),(qa(t)?tr:ti)(t,e)},Yn.set=function(t,e,n){return null==t?t:ei(t,e,n)},Yn.setWith=function(t,e,r,i){return i="function"==typeof i?i:n,null==t?t:ei(t,e,r,i)},Yn.shuffle=function(t){return(qa(t)?er:ii)(t)},Yn.slice=function(t,e,r){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&_o(t,e,r)?(e=0,r=i):(e=null==e?0:gs(e),r=r===n?i:gs(r)),oi(t,e,r)):[]},Yn.sortBy=Ta,Yn.sortedUniq=function(t){return t&&t.length?ci(t):[]},Yn.sortedUniqBy=function(t,e){return t&&t.length?ci(t,lo(e,2)):[]},Yn.split=function(t,e,r){return r&&"number"!=typeof r&&_o(t,e,r)&&(e=r=n),(r=r===n?m:r>>>0)?(t=Ms(t))&&("string"==typeof e||null!=e&&!us(e))&&!(e=hi(e))&&un(t)?Ei(mn(t),0,r):t.split(e,r):[]},Yn.spread=function(t,e){if("function"!=typeof t)throw new Lt(i);return e=null==e?0:wn(gs(e),0),Xr((function(n){var r=n[e],i=Ei(n,0,e);return r&&Oe(i,r),ke(t,this,i)}))},Yn.tail=function(t){var e=null==t?0:t.length;return e?oi(t,1,e):[]},Yn.take=function(t,e,r){return t&&t.length?oi(t,0,(e=r||e===n?1:gs(e))<0?0:e):[]},Yn.takeRight=function(t,e,r){var i=null==t?0:t.length;return i?oi(t,(e=i-(e=r||e===n?1:gs(e)))<0?0:e,i):[]},Yn.takeRightWhile=function(t,e){return t&&t.length?mi(t,lo(e,3),!1,!0):[]},Yn.takeWhile=function(t,e){return t&&t.length?mi(t,lo(e,3)):[]},Yn.tap=function(t,e){return e(t),t},Yn.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new Lt(i);return rs(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Da(t,e,{leading:r,maxWait:e,trailing:o})},Yn.thru=ya,Yn.toArray=ms,Yn.toPairs=Fs,Yn.toPairsIn=Ys,Yn.toPath=function(t){return qa(t)?De(t,Uo):hs(t)?[t]:Ii(Bo(Ms(t)))},Yn.toPlainObject=ws,Yn.transform=function(t,e,n){var r=qa(t),i=r||Ka(t)||ds(t);if(e=lo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:rs(t)&&ts(o)?Qn(qt(t)):{}}return(i?Te:_r)(t,(function(t,r,i){return e(n,t,r,i)})),n},Yn.unary=function(t){return La(t,1)},Yn.union=ia,Yn.unionBy=oa,Yn.unionWith=aa,Yn.uniq=function(t){return t&&t.length?di(t):[]},Yn.uniqBy=function(t,e){return t&&t.length?di(t,lo(e,2)):[]},Yn.uniqWith=function(t,e){return e="function"==typeof e?e:n,t&&t.length?di(t,n,e):[]},Yn.unset=function(t,e){return null==t||fi(t,e)},Yn.unzip=sa,Yn.unzipWith=ua,Yn.update=function(t,e,n){return null==t?t:pi(t,e,wi(n))},Yn.updateWith=function(t,e,r,i){return i="function"==typeof i?i:n,null==t?t:pi(t,e,wi(r),i)},Yn.values=Qs,Yn.valuesIn=function(t){return null==t?[]:$e(t,Os(t))},Yn.without=ca,Yn.words=tu,Yn.wrap=function(t,e){return Ua(wi(e),t)},Yn.xor=la,Yn.xorBy=ha,Yn.xorWith=da,Yn.zip=fa,Yn.zipObject=function(t,e){return bi(t||[],e||[],rr)},Yn.zipObjectDeep=function(t,e){return bi(t||[],e||[],ei)},Yn.zipWith=pa,Yn.entries=Fs,Yn.entriesIn=Ys,Yn.extend=Es,Yn.extendWith=As,lu(Yn,Yn),Yn.add=wu,Yn.attempt=eu,Yn.camelCase=Ws,Yn.capitalize=Hs,Yn.ceil=Mu,Yn.clamp=function(t,e,r){return r===n&&(r=e,e=n),r!==n&&(r=(r=vs(r))==r?r:0),e!==n&&(e=(e=vs(e))==e?e:0),cr(vs(t),e,r)},Yn.clone=function(t){return lr(t,4)},Yn.cloneDeep=function(t){return lr(t,5)},Yn.cloneDeepWith=function(t,e){return lr(t,5,e="function"==typeof e?e:n)},Yn.cloneWith=function(t,e){return lr(t,4,e="function"==typeof e?e:n)},Yn.conformsTo=function(t,e){return null==e||hr(t,e,Ds(e))},Yn.deburr=Gs,Yn.defaultTo=function(t,e){return null==t||t!=t?e:t},Yn.divide=_u,Yn.endsWith=function(t,e,r){t=Ms(t),e=hi(e);var i=t.length,o=r=r===n?i:cr(gs(r),0,i);return(r-=e.length)>=0&&t.slice(r,o)==e},Yn.eq=Qa,Yn.escape=function(t){return(t=Ms(t))&&J.test(t)?t.replace(Z,an):t},Yn.escapeRegExp=function(t){return(t=Ms(t))&&it.test(t)?t.replace(rt,"\\$&"):t},Yn.every=function(t,e,r){var i=qa(t)?Le:yr;return r&&_o(t,e,r)&&(e=n),i(t,lo(e,3))},Yn.find=va,Yn.findIndex=Go,Yn.findKey=function(t,e){return Ue(t,lo(e,3),_r)},Yn.findLast=wa,Yn.findLastIndex=qo,Yn.findLastKey=function(t,e){return Ue(t,lo(e,3),Er)},Yn.floor=Eu,Yn.forEach=Ma,Yn.forEachRight=_a,Yn.forIn=function(t,e){return null==t?t:wr(t,lo(e,3),Os)},Yn.forInRight=function(t,e){return null==t?t:Mr(t,lo(e,3),Os)},Yn.forOwn=function(t,e){return t&&_r(t,lo(e,3))},Yn.forOwnRight=function(t,e){return t&&Er(t,lo(e,3))},Yn.get=xs,Yn.gt=Wa,Yn.gte=Ha,Yn.has=function(t,e){return null!=t&&bo(t,e,xr)},Yn.hasIn=Ls,Yn.head=Vo,Yn.identity=au,Yn.includes=function(t,e,n,r){t=Va(t)?t:Qs(t),n=n&&!r?gs(n):0;var i=t.length;return n<0&&(n=wn(i+n,0)),ls(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Ye(t,e,n)>-1},Yn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:gs(n);return i<0&&(i=wn(r+i,0)),Ye(t,e,i)},Yn.inRange=function(t,e,r){return e=ys(e),r===n?(r=e,e=0):r=ys(r),function(t,e,n){return t>=Mn(e,n)&&t<wn(e,n)}(t=vs(t),e,r)},Yn.invoke=Cs,Yn.isArguments=Ga,Yn.isArray=qa,Yn.isArrayBuffer=Za,Yn.isArrayLike=Va,Yn.isArrayLikeObject=Ja,Yn.isBoolean=function(t){return!0===t||!1===t||is(t)&&Nr(t)==v},Yn.isBuffer=Ka,Yn.isDate=Xa,Yn.isElement=function(t){return is(t)&&1===t.nodeType&&!ss(t)},Yn.isEmpty=function(t){if(null==t)return!0;if(Va(t)&&(qa(t)||"string"==typeof t||"function"==typeof t.splice||Ka(t)||ds(t)||Ga(t)))return!t.length;var e=go(t);if(e==A||e==x)return!t.size;if(ko(t))return!Rr(t).length;for(var n in t)if(Pt.call(t,n))return!1;return!0},Yn.isEqual=function(t,e){return Dr(t,e)},Yn.isEqualWith=function(t,e,r){var i=(r="function"==typeof r?r:n)?r(t,e):n;return i===n?Dr(t,e,n,r):!!i},Yn.isError=$a,Yn.isFinite=function(t){return"number"==typeof t&&Be(t)},Yn.isFunction=ts,Yn.isInteger=es,Yn.isLength=ns,Yn.isMap=os,Yn.isMatch=function(t,e){return t===e||Or(t,e,fo(e))},Yn.isMatchWith=function(t,e,r){return r="function"==typeof r?r:n,Or(t,e,fo(e),r)},Yn.isNaN=function(t){return as(t)&&t!=+t},Yn.isNative=function(t){if(So(t))throw new At("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Pr(t)},Yn.isNil=function(t){return null==t},Yn.isNull=function(t){return null===t},Yn.isNumber=as,Yn.isObject=rs,Yn.isObjectLike=is,Yn.isPlainObject=ss,Yn.isRegExp=us,Yn.isSafeInteger=function(t){return es(t)&&t>=-9007199254740991&&t<=f},Yn.isSet=cs,Yn.isString=ls,Yn.isSymbol=hs,Yn.isTypedArray=ds,Yn.isUndefined=function(t){return t===n},Yn.isWeakMap=function(t){return is(t)&&go(t)==j},Yn.isWeakSet=function(t){return is(t)&&"[object WeakSet]"==Nr(t)},Yn.join=function(t,e){return null==t?"":qe.call(t,e)},Yn.kebabCase=qs,Yn.last=$o,Yn.lastIndexOf=function(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=gs(r))<0?wn(i+o,0):Mn(o,i-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):Fe(t,We,o,!0)},Yn.lowerCase=Zs,Yn.lowerFirst=Vs,Yn.lt=fs,Yn.lte=ps,Yn.max=function(t){return t&&t.length?gr(t,au,Tr):n},Yn.maxBy=function(t,e){return t&&t.length?gr(t,lo(e,2),Tr):n},Yn.mean=function(t){return He(t,au)},Yn.meanBy=function(t,e){return He(t,lo(e,2))},Yn.min=function(t){return t&&t.length?gr(t,au,Ur):n},Yn.minBy=function(t,e){return t&&t.length?gr(t,lo(e,2),Ur):n},Yn.stubArray=bu,Yn.stubFalse=vu,Yn.stubObject=function(){return{}},Yn.stubString=function(){return""},Yn.stubTrue=function(){return!0},Yn.multiply=Su,Yn.nth=function(t,e){return t&&t.length?Hr(t,gs(e)):n},Yn.noConflict=function(){return pe._===this&&(pe._=Ft),this},Yn.noop=hu,Yn.now=xa,Yn.pad=function(t,e,n){t=Ms(t);var r=(e=gs(e))?pn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Gi(ye(i),n)+t+Gi(me(i),n)},Yn.padEnd=function(t,e,n){t=Ms(t);var r=(e=gs(e))?pn(t):0;return e&&r<e?t+Gi(e-r,n):t},Yn.padStart=function(t,e,n){t=Ms(t);var r=(e=gs(e))?pn(t):0;return e&&r<e?Gi(e-r,n)+t:t},Yn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),En(Ms(t).replace(ot,""),e||0)},Yn.random=function(t,e,r){if(r&&"boolean"!=typeof r&&_o(t,e,r)&&(e=r=n),r===n&&("boolean"==typeof e?(r=e,e=n):"boolean"==typeof t&&(r=t,t=n)),t===n&&e===n?(t=0,e=1):(t=ys(t),e===n?(e=t,t=0):e=ys(e)),t>e){var i=t;t=e,e=i}if(r||t%1||e%1){var o=An();return Mn(t+o*(e-t+le("1e-"+((o+"").length-1))),e)}return Jr(t,e)},Yn.reduce=function(t,e,n){var r=qa(t)?Pe:Ze,i=arguments.length<3;return r(t,lo(e,4),n,i,pr)},Yn.reduceRight=function(t,e,n){var r=qa(t)?ze:Ze,i=arguments.length<3;return r(t,lo(e,4),n,i,mr)},Yn.repeat=function(t,e,r){return e=(r?_o(t,e,r):e===n)?1:gs(e),Kr(Ms(t),e)},Yn.replace=function(){var t=arguments,e=Ms(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Yn.result=function(t,e,r){var i=-1,o=(e=Mi(e,t)).length;for(o||(o=1,t=n);++i<o;){var a=null==t?n:t[Uo(e[i])];a===n&&(i=o,a=r),t=ts(a)?a.call(t):a}return t},Yn.round=ku,Yn.runInContext=t,Yn.sample=function(t){return(qa(t)?$n:$r)(t)},Yn.size=function(t){if(null==t)return 0;if(Va(t))return ls(t)?pn(t):t.length;var e=go(t);return e==A||e==x?t.size:Rr(t).length},Yn.snakeCase=Js,Yn.some=function(t,e,r){var i=qa(t)?Re:ai;return r&&_o(t,e,r)&&(e=n),i(t,lo(e,3))},Yn.sortedIndex=function(t,e){return si(t,e)},Yn.sortedIndexBy=function(t,e,n){return ui(t,e,lo(n,2))},Yn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=si(t,e);if(r<n&&Qa(t[r],e))return r}return-1},Yn.sortedLastIndex=function(t,e){return si(t,e,!0)},Yn.sortedLastIndexBy=function(t,e,n){return ui(t,e,lo(n,2),!0)},Yn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=si(t,e,!0)-1;if(Qa(t[n],e))return n}return-1},Yn.startCase=Ks,Yn.startsWith=function(t,e,n){return t=Ms(t),n=null==n?0:cr(gs(n),0,t.length),e=hi(e),t.slice(n,n+e.length)==e},Yn.subtract=Nu,Yn.sum=function(t){return t&&t.length?Ve(t,au):0},Yn.sumBy=function(t,e){return t&&t.length?Ve(t,lo(e,2)):0},Yn.template=function(t,e,r){var i=Yn.templateSettings;r&&_o(t,e,r)&&(e=n),t=Ms(t),e=As({},e,i,to);var o,a,s=As({},e.imports,i.imports,to),u=Ds(s),c=$e(s,u),l=0,h=e.interpolate||Mt,d="__p += '",f=Tt((e.escape||Mt).source+"|"+h.source+"|"+(h===$?ft:Mt).source+"|"+(e.evaluate||Mt).source+"|$","g"),p="//# sourceURL="+(Pt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ae+"]")+"\n";t.replace(f,(function(e,n,r,i,s,u){return r||(r=i),d+=t.slice(l,u).replace(_t,sn),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e})),d+="';\n";var m=Pt.call(e,"variable")&&e.variable;if(m){if(ht.test(m))throw new At("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(W,""):d).replace(H,"$1").replace(G,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var y=eu((function(){return St(u,p+"return "+d).apply(n,c)}));if(y.source=d,$a(y))throw y;return y},Yn.times=function(t,e){if((t=gs(t))<1||t>f)return[];var n=m,r=Mn(t,m);e=lo(e),t-=m;for(var i=Je(r,e);++n<t;)e(n);return i},Yn.toFinite=ys,Yn.toInteger=gs,Yn.toLength=bs,Yn.toLower=function(t){return Ms(t).toLowerCase()},Yn.toNumber=vs,Yn.toSafeInteger=function(t){return t?cr(gs(t),-9007199254740991,f):0===t?t:0},Yn.toString=Ms,Yn.toUpper=function(t){return Ms(t).toUpperCase()},Yn.trim=function(t,e,r){if((t=Ms(t))&&(r||e===n))return Ke(t);if(!t||!(e=hi(e)))return t;var i=mn(t),o=mn(e);return Ei(i,en(i,o),nn(i,o)+1).join("")},Yn.trimEnd=function(t,e,r){if((t=Ms(t))&&(r||e===n))return t.slice(0,yn(t)+1);if(!t||!(e=hi(e)))return t;var i=mn(t);return Ei(i,0,nn(i,mn(e))+1).join("")},Yn.trimStart=function(t,e,r){if((t=Ms(t))&&(r||e===n))return t.replace(ot,"");if(!t||!(e=hi(e)))return t;var i=mn(t);return Ei(i,en(i,mn(e))).join("")},Yn.truncate=function(t,e){var r=30,i="...";if(rs(e)){var o="separator"in e?e.separator:o;r="length"in e?gs(e.length):r,i="omission"in e?hi(e.omission):i}var a=(t=Ms(t)).length;if(un(t)){var s=mn(t);a=s.length}if(r>=a)return t;var u=r-pn(i);if(u<1)return i;var c=s?Ei(s,0,u).join(""):t.slice(0,u);if(o===n)return c+i;if(s&&(u+=c.length-u),us(o)){if(t.slice(u).search(o)){var l,h=c;for(o.global||(o=Tt(o.source,Ms(pt.exec(o))+"g")),o.lastIndex=0;l=o.exec(h);)var d=l.index;c=c.slice(0,d===n?u:d)}}else if(t.indexOf(hi(o),u)!=u){var f=c.lastIndexOf(o);f>-1&&(c=c.slice(0,f))}return c+i},Yn.unescape=function(t){return(t=Ms(t))&&V.test(t)?t.replace(q,gn):t},Yn.uniqueId=function(t){var e=++zt;return Ms(t)+e},Yn.upperCase=Xs,Yn.upperFirst=$s,Yn.each=Ma,Yn.eachRight=_a,Yn.first=Vo,lu(Yn,(Au={},_r(Yn,(function(t,e){Pt.call(Yn.prototype,e)||(Au[e]=t)})),Au),{chain:!1}),Yn.VERSION="4.17.21",Te(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Yn[t].placeholder=Yn})),Te(["drop","take"],(function(t,e){Gn.prototype[t]=function(r){r=r===n?1:wn(gs(r),0);var i=this.__filtered__&&!e?new Gn(this):this.clone();return i.__filtered__?i.__takeCount__=Mn(r,i.__takeCount__):i.__views__.push({size:Mn(r,m),type:t+(i.__dir__<0?"Right":"")}),i},Gn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Te(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Gn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:lo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Te(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Gn.prototype[t]=function(){return this[n](1).value()[0]}})),Te(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Gn.prototype[t]=function(){return this.__filtered__?new Gn(this):this[n](1)}})),Gn.prototype.compact=function(){return this.filter(au)},Gn.prototype.find=function(t){return this.filter(t).head()},Gn.prototype.findLast=function(t){return this.reverse().find(t)},Gn.prototype.invokeMap=Xr((function(t,e){return"function"==typeof t?new Gn(this):this.map((function(n){return jr(n,t,e)}))})),Gn.prototype.reject=function(t){return this.filter(Ra(lo(t)))},Gn.prototype.slice=function(t,e){t=gs(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Gn(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==n&&(r=(e=gs(e))<0?r.dropRight(-e):r.take(e-t)),r)},Gn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Gn.prototype.toArray=function(){return this.take(m)},_r(Gn.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),o=Yn[i?"take"+("last"==e?"Right":""):e],a=i||/^find/.test(e);o&&(Yn.prototype[e]=function(){var e=this.__wrapped__,s=i?[1]:arguments,u=e instanceof Gn,c=s[0],l=u||qa(e),h=function(t){var e=o.apply(Yn,Oe([t],s));return i&&d?e[0]:e};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var d=this.__chain__,f=!!this.__actions__.length,p=a&&!d,m=u&&!f;if(!a&&l){e=m?e:new Gn(this);var y=t.apply(e,s);return y.__actions__.push({func:ya,args:[h],thisArg:n}),new Hn(y,d)}return p&&m?t.apply(this,s):(y=this.thru(h),p?i?y.value()[0]:y.value():y)})})),Te(["pop","push","shift","sort","splice","unshift"],(function(t){var e=It[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Yn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(qa(i)?i:[],t)}return this[n]((function(n){return e.apply(qa(n)?n:[],t)}))}})),_r(Gn.prototype,(function(t,e){var n=Yn[e];if(n){var r=n.name+"";Pt.call(Cn,r)||(Cn[r]=[]),Cn[r].push({name:e,func:n})}})),Cn[Yi(n,2).name]=[{name:"wrapper",func:n}],Gn.prototype.clone=function(){var t=new Gn(this.__wrapped__);return t.__actions__=Ii(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ii(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ii(this.__views__),t},Gn.prototype.reverse=function(){if(this.__filtered__){var t=new Gn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Gn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=qa(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=Mn(e,t+a);break;case"takeRight":t=wn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,h=l.length,d=0,f=Mn(u,this.__takeCount__);if(!n||!r&&i==u&&f==u)return yi(t,this.__actions__);var p=[];t:for(;u--&&d<f;){for(var m=-1,y=t[c+=e];++m<h;){var g=l[m],b=g.iteratee,v=g.type,w=b(y);if(2==v)y=w;else if(!w){if(1==v)continue t;break t}}p[d++]=y}return p},Yn.prototype.at=ga,Yn.prototype.chain=function(){return ma(this)},Yn.prototype.commit=function(){return new Hn(this.value(),this.__chain__)},Yn.prototype.next=function(){this.__values__===n&&(this.__values__=ms(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?n:this.__values__[this.__index__++]}},Yn.prototype.plant=function(t){for(var e,r=this;r instanceof Wn;){var i=Yo(r);i.__index__=0,i.__values__=n,e?o.__wrapped__=i:e=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,e},Yn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Gn){var e=t;return this.__actions__.length&&(e=new Gn(this)),(e=e.reverse()).__actions__.push({func:ya,args:[ra],thisArg:n}),new Hn(e,this.__chain__)}return this.thru(ra)},Yn.prototype.toJSON=Yn.prototype.valueOf=Yn.prototype.value=function(){return yi(this.__wrapped__,this.__actions__)},Yn.prototype.first=Yn.prototype.head,Xt&&(Yn.prototype[Xt]=function(){return this}),Yn}();ye?((ye.exports=bn)._=bn,me._=bn):pe._=bn}).call(r)})),yq=9e15,gq=1e9,bq="0123456789abcdef",vq="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",wq="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Mq={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-yq,maxE:yq,crypto:!1},_q=!0,Eq="[DecimalError] ",Aq=Eq+"Invalid argument: ",Sq=Eq+"Precision limit exceeded",kq=Eq+"crypto unavailable",Nq="[object Decimal]",Tq=Math.floor,xq=Math.pow,Lq=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Iq=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,jq=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Cq=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Dq=1e7,Oq=vq.length-1,Pq=wq.length-1,zq={toStringTag:Nq};function Rq(t){var e,n,r,i=t.length-1,o="",a=t[0];if(i>0){for(o+=a,e=1;e<i;e++)(n=7-(r=t[e]+"").length)&&(o+=Vq(n)),o+=r;(n=7-(r=(a=t[e])+"").length)&&(o+=Vq(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function Bq(t,e,n){if(t!==~~t||t<e||t>n)throw Error(Aq+t)}function Uq(t,e,n,r){var i,o,a,s;for(o=t[0];o>=10;o/=10)--e;return--e<0?(e+=7,i=0):(i=Math.ceil((e+1)/7),e%=7),o=xq(10,7-e),s=t[i]%o|0,null==r?e<3?(0==e?s=s/100|0:1==e&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(t[i+1]/o/100|0)==xq(10,e-2)-1||(s==o/2||0==s)&&0==(t[i+1]/o/100|0):e<4?(0==e?s=s/1e3|0:1==e?s=s/100|0:2==e&&(s=s/10|0),a=(r||n<4)&&9999==s||!r&&n>3&&4999==s):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(t[i+1]/o/1e3|0)==xq(10,e-3)-1,a}function Fq(t,e,n){for(var r,i,o=[0],a=0,s=t.length;a<s;){for(i=o.length;i--;)o[i]*=e;for(o[0]+=bq.indexOf(t.charAt(a++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}zq.absoluteValue=zq.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),Qq(t)},zq.ceil=function(){return Qq(new this.constructor(this),this.e+1,2)},zq.clampedTo=zq.clamp=function(t,e){var n=this,r=n.constructor;if(t=new r(t),e=new r(e),!t.s||!e.s)return new r(NaN);if(t.gt(e))throw Error(Aq+e);return n.cmp(t)<0?t:n.cmp(e)>0?e:new r(n)},zq.comparedTo=zq.cmp=function(t){var e,n,r,i,o=this,a=o.d,s=(t=new o.constructor(t)).d,u=o.s,c=t.s;if(!a||!s)return u&&c?u!==c?u:a===s?0:!a^u<0?1:-1:NaN;if(!a[0]||!s[0])return a[0]?u:s[0]?-c:0;if(u!==c)return u;if(o.e!==t.e)return o.e>t.e^u<0?1:-1;for(e=0,n=(r=a.length)<(i=s.length)?r:i;e<n;++e)if(a[e]!==s[e])return a[e]>s[e]^u<0?1:-1;return r===i?0:r>i^u<0?1:-1},zq.cosine=zq.cos=function(){var t,e,n=this,r=n.constructor;return n.d?n.d[0]?(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(t,e){var n,r,i;if(e.isZero())return e;r=e.d.length,r<32?i=(1/oZ(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10");t.precision+=n,e=iZ(t,1,e.times(i),new t(1));for(var o=n;o--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return t.precision-=n,e}(r,aZ(r,n)),r.precision=t,r.rounding=e,Qq(2==hq||3==hq?n.neg():n,t,e,!0)):new r(1):new r(NaN)},zq.cubeRoot=zq.cbrt=function(){var t,e,n,r,i,o,a,s,u,c,l=this,h=l.constructor;if(!l.isFinite()||l.isZero())return new h(l);for(_q=!1,(o=l.s*xq(l.s*l,1/3))&&Math.abs(o)!=1/0?r=new h(o.toString()):(n=Rq(l.d),(o=((t=l.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=xq(n,1/3),t=Tq((t+1)/3)-(t%3==(t<0?-1:2)),(r=new h(n=o==1/0?"5e"+t:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+t)).s=l.s),a=(t=h.precision)+3;;)if(c=(u=(s=r).times(s).times(s)).plus(l),r=Yq(c.plus(l).times(s),c.plus(u),a+2,1),Rq(s.d).slice(0,a)===(n=Rq(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(Qq(r,t+1,1),e=!r.times(r).times(r).eq(l));break}if(!i&&(Qq(s,t+1,0),s.times(s).times(s).eq(l))){r=s;break}a+=4,i=1}return _q=!0,Qq(r,t,h.rounding,e)},zq.decimalPlaces=zq.dp=function(){var t,e=this.d,n=NaN;if(e){if(n=7*((t=e.length-1)-Tq(this.e/7)),t=e[t])for(;t%10==0;t/=10)n--;n<0&&(n=0)}return n},zq.dividedBy=zq.div=function(t){return Yq(this,new this.constructor(t))},zq.dividedToIntegerBy=zq.divToInt=function(t){var e=this.constructor;return Qq(Yq(this,new e(t),0,1,1),e.precision,e.rounding)},zq.equals=zq.eq=function(t){return 0===this.cmp(t)},zq.floor=function(){return Qq(new this.constructor(this),this.e+1,3)},zq.greaterThan=zq.gt=function(t){return this.cmp(t)>0},zq.greaterThanOrEqualTo=zq.gte=function(t){var e=this.cmp(t);return 1==e||0===e},zq.hyperbolicCosine=zq.cosh=function(){var t,e,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?e=(1/oZ(4,t=Math.ceil(i/3))).toString():(t=16,e="2.3283064365386962890625e-10"),o=iZ(a,1,o.times(e),new a(1),!0);for(var u,c=t,l=new a(8);c--;)u=o.times(o),o=s.minus(u.times(l.minus(u.times(l))));return Qq(o,a.precision=n,a.rounding=r,!0)},zq.hyperbolicSine=zq.sinh=function(){var t,e,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(e=o.precision,n=o.rounding,o.precision=e+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=iZ(o,2,i,i,!0);else{t=(t=1.4*Math.sqrt(r))>16?16:0|t,i=iZ(o,2,i=i.times(1/oZ(5,t)),i,!0);for(var a,s=new o(5),u=new o(16),c=new o(20);t--;)a=i.times(i),i=i.times(s.plus(a.times(u.times(a).plus(c))))}return o.precision=e,o.rounding=n,Qq(i,e,n,!0)},zq.hyperbolicTangent=zq.tanh=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+7,r.rounding=1,Yq(n.sinh(),n.cosh(),r.precision=t,r.rounding=e)):new r(n.s)},zq.inverseCosine=zq.acos=function(){var t,e=this,n=e.constructor,r=e.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?e.isNeg()?qq(n,i,o):new n(0):new n(NaN):e.isZero()?qq(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,e=e.asin(),t=qq(n,i+4,o).times(.5),n.precision=i,n.rounding=o,t.minus(e))},zq.inverseHyperbolicCosine=zq.acosh=function(){var t,e,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(t=r.precision,e=r.rounding,r.precision=t+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,_q=!1,n=n.times(n).minus(1).sqrt().plus(n),_q=!0,r.precision=t,r.rounding=e,n.ln()):new r(n)},zq.inverseHyperbolicSine=zq.asinh=function(){var t,e,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,_q=!1,n=n.times(n).plus(1).sqrt().plus(n),_q=!0,r.precision=t,r.rounding=e,n.ln())},zq.inverseHyperbolicTangent=zq.atanh=function(){var t,e,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(t=o.precision,e=o.rounding,r=i.sd(),Math.max(r,t)<2*-i.e-1?Qq(new o(i),t,e,!0):(o.precision=n=r-i.e,i=Yq(i.plus(1),new o(1).minus(i),n+t,1),o.precision=t+4,o.rounding=1,i=i.ln(),o.precision=t,o.rounding=e,i.times(.5))):new o(NaN)},zq.inverseSine=zq.asin=function(){var t,e,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(e=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==e?0===e?((t=qq(o,n+4,r).times(.5)).s=i.s,t):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},zq.inverseTangent=zq.atan=function(){var t,e,n,r,i,o,a,s,u,c=this,l=c.constructor,h=l.precision,d=l.rounding;if(c.isFinite()){if(c.isZero())return new l(c);if(c.abs().eq(1)&&h+4<=Pq)return(a=qq(l,h+4,d).times(.25)).s=c.s,a}else{if(!c.s)return new l(NaN);if(h+4<=Pq)return(a=qq(l,h+4,d).times(.5)).s=c.s,a}for(l.precision=s=h+10,l.rounding=1,t=n=Math.min(28,s/7+2|0);t;--t)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(_q=!1,e=Math.ceil(s/7),r=1,u=c.times(c),a=new l(c),i=c;-1!==t;)if(i=i.times(u),o=a.minus(i.div(r+=2)),i=i.times(u),void 0!==(a=o.plus(i.div(r+=2))).d[e])for(t=e;a.d[t]===o.d[t]&&t--;);return n&&(a=a.times(2<<n-1)),_q=!0,Qq(a,l.precision=h,l.rounding=d,!0)},zq.isFinite=function(){return!!this.d},zq.isInteger=zq.isInt=function(){return!!this.d&&Tq(this.e/7)>this.d.length-2},zq.isNaN=function(){return!this.s},zq.isNegative=zq.isNeg=function(){return this.s<0},zq.isPositive=zq.isPos=function(){return this.s>0},zq.isZero=function(){return!!this.d&&0===this.d[0]},zq.lessThan=zq.lt=function(t){return this.cmp(t)<0},zq.lessThanOrEqualTo=zq.lte=function(t){return this.cmp(t)<1},zq.logarithm=zq.log=function(t){var e,n,r,i,o,a,s,u,c=this,l=c.constructor,h=l.precision,d=l.rounding;if(null==t)t=new l(10),e=!0;else{if(n=(t=new l(t)).d,t.s<0||!n||!n[0]||t.eq(1))return new l(NaN);e=t.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new l(n&&!n[0]?-1/0:1!=c.s?NaN:n?0:1/0);if(e)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(_q=!1,a=tZ(c,s=h+5),r=e?Gq(l,s+10):tZ(t,s),Uq((u=Yq(a,r,s,1)).d,i=h,d))do{if(a=tZ(c,s+=10),r=e?Gq(l,s+10):tZ(t,s),u=Yq(a,r,s,1),!o){+Rq(u.d).slice(i+1,i+15)+1==1e14&&(u=Qq(u,h+1,0));break}}while(Uq(u.d,i+=10,d));return _q=!0,Qq(u,h,d)},zq.minus=zq.sub=function(t){var e,n,r,i,o,a,s,u,c,l,h,d,f=this,p=f.constructor;if(t=new p(t),!f.d||!t.d)return f.s&&t.s?f.d?t.s=-t.s:t=new p(t.d||f.s!==t.s?f:NaN):t=new p(NaN),t;if(f.s!=t.s)return t.s=-t.s,f.plus(t);if(c=f.d,d=t.d,s=p.precision,u=p.rounding,!c[0]||!d[0]){if(d[0])t.s=-t.s;else{if(!c[0])return new p(3===u?-0:0);t=new p(f)}return _q?Qq(t,s,u):t}if(n=Tq(t.e/7),l=Tq(f.e/7),c=c.slice(),o=l-n){for((h=o<0)?(e=c,o=-o,a=d.length):(e=d,n=l,a=c.length),o>(r=Math.max(Math.ceil(s/7),a)+2)&&(o=r,e.length=1),e.reverse(),r=o;r--;)e.push(0);e.reverse()}else{for((h=(r=c.length)<(a=d.length))&&(a=r),r=0;r<a;r++)if(c[r]!=d[r]){h=c[r]<d[r];break}o=0}for(h&&(e=c,c=d,d=e,t.s=-t.s),a=c.length,r=d.length-a;r>0;--r)c[a++]=0;for(r=d.length;r>o;){if(c[--r]<d[r]){for(i=r;i&&0===c[--i];)c[i]=Dq-1;--c[i],c[r]+=Dq}c[r]-=d[r]}for(;0===c[--a];)c.pop();for(;0===c[0];c.shift())--n;return c[0]?(t.d=c,t.e=Hq(c,n),_q?Qq(t,s,u):t):new p(3===u?-0:0)},zq.modulo=zq.mod=function(t){var e,n=this,r=n.constructor;return t=new r(t),!n.d||!t.s||t.d&&!t.d[0]?new r(NaN):!t.d||n.d&&!n.d[0]?Qq(new r(n),r.precision,r.rounding):(_q=!1,9==r.modulo?(e=Yq(n,t.abs(),0,3,1)).s*=t.s:e=Yq(n,t,0,r.modulo,1),e=e.times(t),_q=!0,n.minus(e))},zq.naturalExponential=zq.exp=function(){return $q(this)},zq.naturalLogarithm=zq.ln=function(){return tZ(this)},zq.negated=zq.neg=function(){var t=new this.constructor(this);return t.s=-t.s,Qq(t)},zq.plus=zq.add=function(t){var e,n,r,i,o,a,s,u,c,l,h=this,d=h.constructor;if(t=new d(t),!h.d||!t.d)return h.s&&t.s?h.d||(t=new d(t.d||h.s===t.s?h:NaN)):t=new d(NaN),t;if(h.s!=t.s)return t.s=-t.s,h.minus(t);if(c=h.d,l=t.d,s=d.precision,u=d.rounding,!c[0]||!l[0])return l[0]||(t=new d(h)),_q?Qq(t,s,u):t;if(o=Tq(h.e/7),r=Tq(t.e/7),c=c.slice(),i=o-r){for(i<0?(n=c,i=-i,a=l.length):(n=l,r=o,a=c.length),i>(a=(o=Math.ceil(s/7))>a?o+1:a+1)&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=c.length)-(i=l.length)<0&&(i=a,n=l,l=c,c=n),e=0;i;)e=(c[--i]=c[i]+l[i]+e)/Dq|0,c[i]%=Dq;for(e&&(c.unshift(e),++r),a=c.length;0==c[--a];)c.pop();return t.d=c,t.e=Hq(c,r),_q?Qq(t,s,u):t},zq.precision=zq.sd=function(t){var e,n=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(Aq+t);return n.d?(e=Zq(n.d),t&&n.e+1>e&&(e=n.e+1)):e=NaN,e},zq.round=function(){var t=this,e=t.constructor;return Qq(new e(t),t.e+1,e.rounding)},zq.sine=zq.sin=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(t,e){var n,r=e.d.length;if(r<3)return e.isZero()?e:iZ(t,2,e,e);n=1.4*Math.sqrt(r),n=n>16?16:0|n,e=e.times(1/oZ(5,n)),e=iZ(t,2,e,e);for(var i,o=new t(5),a=new t(16),s=new t(20);n--;)i=e.times(e),e=e.times(o.plus(i.times(a.times(i).minus(s))));return e}(r,aZ(r,n)),r.precision=t,r.rounding=e,Qq(hq>2?n.neg():n,t,e,!0)):new r(NaN)},zq.squareRoot=zq.sqrt=function(){var t,e,n,r,i,o,a=this,s=a.d,u=a.e,c=a.s,l=a.constructor;if(1!==c||!s||!s[0])return new l(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);for(_q=!1,0==(c=Math.sqrt(+a))||c==1/0?(((e=Rq(s)).length+u)%2==0&&(e+="0"),c=Math.sqrt(e),u=Tq((u+1)/2)-(u<0||u%2),r=new l(e=c==1/0?"5e"+u:(e=c.toExponential()).slice(0,e.indexOf("e")+1)+u)):r=new l(c.toString()),n=(u=l.precision)+3;;)if(r=(o=r).plus(Yq(a,o,n+2,1)).times(.5),Rq(o.d).slice(0,n)===(e=Rq(r.d)).slice(0,n)){if("9999"!=(e=e.slice(n-3,n+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(Qq(r,u+1,1),t=!r.times(r).eq(a));break}if(!i&&(Qq(o,u+1,0),o.times(o).eq(a))){r=o;break}n+=4,i=1}return _q=!0,Qq(r,u,l.rounding,t)},zq.tangent=zq.tan=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+10,r.rounding=1,(n=n.sin()).s=1,n=Yq(n,new r(1).minus(n.times(n)).sqrt(),t+10,0),r.precision=t,r.rounding=e,Qq(2==hq||4==hq?n.neg():n,t,e,!0)):new r(NaN)},zq.times=zq.mul=function(t){var e,n,r,i,o,a,s,u,c,l=this,h=l.constructor,d=l.d,f=(t=new h(t)).d;if(t.s*=l.s,!(d&&d[0]&&f&&f[0]))return new h(!t.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:d&&f?0*t.s:t.s/0);for(n=Tq(l.e/7)+Tq(t.e/7),(u=d.length)<(c=f.length)&&(o=d,d=f,f=o,a=u,u=c,c=a),o=[],r=a=u+c;r--;)o.push(0);for(r=c;--r>=0;){for(e=0,i=u+r;i>r;)s=o[i]+f[r]*d[i-r-1]+e,o[i--]=s%Dq|0,e=s/Dq|0;o[i]=(o[i]+e)%Dq|0}for(;!o[--a];)o.pop();return e?++n:o.shift(),t.d=o,t.e=Hq(o,n),_q?Qq(t,h.precision,h.rounding):t},zq.toBinary=function(t,e){return sZ(this,2,t,e)},zq.toDecimalPlaces=zq.toDP=function(t,e){var n=this,r=n.constructor;return n=new r(n),void 0===t?n:(Bq(t,0,gq),void 0===e?e=r.rounding:Bq(e,0,8),Qq(n,t+n.e+1,e))},zq.toExponential=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=Wq(r,!0):(Bq(t,0,gq),void 0===e?e=i.rounding:Bq(e,0,8),n=Wq(r=Qq(new i(r),t+1,e),!0,t+1)),r.isNeg()&&!r.isZero()?"-"+n:n},zq.toFixed=function(t,e){var n,r,i=this,o=i.constructor;return void 0===t?n=Wq(i):(Bq(t,0,gq),void 0===e?e=o.rounding:Bq(e,0,8),n=Wq(r=Qq(new o(i),t+i.e+1,e),!1,t+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},zq.toFraction=function(t){var e,n,r,i,o,a,s,u,c,l,h,d,f=this,p=f.d,m=f.constructor;if(!p)return new m(f);if(c=n=new m(1),r=u=new m(0),a=(o=(e=new m(r)).e=Zq(p)-f.e-1)%7,e.d[0]=xq(10,a<0?7+a:a),null==t)t=o>0?e:c;else{if(!(s=new m(t)).isInt()||s.lt(c))throw Error(Aq+s);t=s.gt(e)?o>0?e:c:s}for(_q=!1,s=new m(Rq(p)),l=m.precision,m.precision=o=7*p.length*2;h=Yq(s,e,0,1,1),1!=(i=n.plus(h.times(r))).cmp(t);)n=r,r=i,i=c,c=u.plus(h.times(i)),u=i,i=e,e=s.minus(h.times(i)),s=i;return i=Yq(t.minus(n),r,0,1,1),u=u.plus(i.times(c)),n=n.plus(i.times(r)),u.s=c.s=f.s,d=Yq(c,r,o,1).minus(f).abs().cmp(Yq(u,n,o,1).minus(f).abs())<1?[c,r]:[u,n],m.precision=l,_q=!0,d},zq.toHexadecimal=zq.toHex=function(t,e){return sZ(this,16,t,e)},zq.toNearest=function(t,e){var n=this,r=n.constructor;if(n=new r(n),null==t){if(!n.d)return n;t=new r(1),e=r.rounding}else{if(t=new r(t),void 0===e?e=r.rounding:Bq(e,0,8),!n.d)return t.s?n:t;if(!t.d)return t.s&&(t.s=n.s),t}return t.d[0]?(_q=!1,n=Yq(n,t,0,e,1).times(t),_q=!0,Qq(n)):(t.s=n.s,n=t),n},zq.toNumber=function(){return+this},zq.toOctal=function(t,e){return sZ(this,8,t,e)},zq.toPower=zq.pow=function(t){var e,n,r,i,o,a,s=this,u=s.constructor,c=+(t=new u(t));if(!(s.d&&t.d&&s.d[0]&&t.d[0]))return new u(xq(+s,c));if((s=new u(s)).eq(1))return s;if(r=u.precision,o=u.rounding,t.eq(1))return Qq(s,r,o);if((e=Tq(t.e/7))>=t.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=Jq(u,s,n,r),t.s<0?new u(1).div(i):Qq(i,r,o);if((a=s.s)<0){if(e<t.d.length-1)return new u(NaN);if(0==(1&t.d[e])&&(a=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=a,s}return(e=0!=(n=xq(+s,c))&&isFinite(n)?new u(n+"").e:Tq(c*(Math.log("0."+Rq(s.d))/Math.LN10+s.e+1)))>u.maxE+1||e<u.minE-1?new u(e>0?a/0:0):(_q=!1,u.rounding=s.s=1,n=Math.min(12,(e+"").length),(i=$q(t.times(tZ(s,r+n)),r)).d&&Uq((i=Qq(i,r+5,1)).d,r,o)&&(e=r+10,+Rq((i=Qq($q(t.times(tZ(s,e+n)),e),e+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=Qq(i,r+1,0))),i.s=a,_q=!0,u.rounding=o,Qq(i,r,o))},zq.toPrecision=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=Wq(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(Bq(t,1,gq),void 0===e?e=i.rounding:Bq(e,0,8),n=Wq(r=Qq(new i(r),t,e),t<=r.e||r.e<=i.toExpNeg,t)),r.isNeg()&&!r.isZero()?"-"+n:n},zq.toSignificantDigits=zq.toSD=function(t,e){var n=this.constructor;return void 0===t?(t=n.precision,e=n.rounding):(Bq(t,1,gq),void 0===e?e=n.rounding:Bq(e,0,8)),Qq(new n(this),t,e)},zq.toString=function(){var t=this,e=t.constructor,n=Wq(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+n:n},zq.truncated=zq.trunc=function(){return Qq(new this.constructor(this),this.e+1,1)},zq.valueOf=zq.toJSON=function(){var t=this,e=t.constructor,n=Wq(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+n:n};var Yq=function(){function t(t,e,n){var r,i=0,o=t.length;for(t=t.slice();o--;)r=t[o]*e+i,t[o]=r%n|0,i=r/n|0;return i&&t.unshift(i),t}function e(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function n(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]<e[n]?1:0,t[n]=i*r+t[n]-e[n];for(;!t[0]&&t.length>1;)t.shift()}return function(r,i,o,a,s,u){var c,l,h,d,f,p,m,y,g,b,v,w,M,_,E,A,S,k,N,T,x=r.constructor,L=r.s==i.s?1:-1,I=r.d,j=i.d;if(!(I&&I[0]&&j&&j[0]))return new x(r.s&&i.s&&(I?!j||I[0]!=j[0]:j)?I&&0==I[0]||!j?0*L:L/0:NaN);for(u?(f=1,l=r.e-i.e):(u=Dq,f=7,l=Tq(r.e/f)-Tq(i.e/f)),N=j.length,S=I.length,b=(g=new x(L)).d=[],h=0;j[h]==(I[h]||0);h++);if(j[h]>(I[h]||0)&&l--,null==o?(_=o=x.precision,a=x.rounding):_=s?o+(r.e-i.e)+1:o,_<0)b.push(1),p=!0;else{if(_=_/f+2|0,h=0,1==N){for(d=0,j=j[0],_++;(h<S||d)&&_--;h++)E=d*u+(I[h]||0),b[h]=E/j|0,d=E%j|0;p=d||h<S}else{for((d=u/(j[0]+1)|0)>1&&(j=t(j,d,u),I=t(I,d,u),N=j.length,S=I.length),A=N,w=(v=I.slice(0,N)).length;w<N;)v[w++]=0;(T=j.slice()).unshift(0),k=j[0],j[1]>=u/2&&++k;do{d=0,(c=e(j,v,N,w))<0?(M=v[0],N!=w&&(M=M*u+(v[1]||0)),(d=M/k|0)>1?(d>=u&&(d=u-1),1==(c=e(m=t(j,d,u),v,y=m.length,w=v.length))&&(d--,n(m,N<y?T:j,y,u))):(0==d&&(c=d=1),m=j.slice()),(y=m.length)<w&&m.unshift(0),n(v,m,w,u),-1==c&&(c=e(j,v,N,w=v.length))<1&&(d++,n(v,N<w?T:j,w,u)),w=v.length):0===c&&(d++,v=[0]),b[h++]=d,c&&v[0]?v[w++]=I[A]||0:(v=[I[A]],w=1)}while((A++<S||void 0!==v[0])&&_--);p=void 0!==v[0]}b[0]||b.shift()}if(1==f)g.e=l,lq=p;else{for(h=1,d=b[0];d>=10;d/=10)h++;g.e=h+l*f-1,Qq(g,s?o+g.e+1:o,a,p)}return g}}();function Qq(t,e,n,r){var i,o,a,s,u,c,l,h,d,f=t.constructor;t:if(null!=e){if(!(h=t.d))return t;for(i=1,s=h[0];s>=10;s/=10)i++;if((o=e-i)<0)o+=7,a=e,u=(l=h[d=0])/xq(10,i-a-1)%10|0;else if((d=Math.ceil((o+1)/7))>=(s=h.length)){if(!r)break t;for(;s++<=d;)h.push(0);l=u=0,i=1,a=(o%=7)-7+1}else{for(l=s=h[d],i=1;s>=10;s/=10)i++;u=(a=(o%=7)-7+i)<0?0:l/xq(10,i-a-1)%10|0}if(r=r||e<0||void 0!==h[d+1]||(a<0?l:l%xq(10,i-a-1)),c=n<4?(u||r)&&(0==n||n==(t.s<0?3:2)):u>5||5==u&&(4==n||r||6==n&&(o>0?a>0?l/xq(10,i-a):0:h[d-1])%10&1||n==(t.s<0?8:7)),e<1||!h[0])return h.length=0,c?(e-=t.e+1,h[0]=xq(10,(7-e%7)%7),t.e=-e||0):h[0]=t.e=0,t;if(0==o?(h.length=d,s=1,d--):(h.length=d+1,s=xq(10,7-o),h[d]=a>0?(l/xq(10,i-a)%xq(10,a)|0)*s:0),c)for(;;){if(0==d){for(o=1,a=h[0];a>=10;a/=10)o++;for(a=h[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(t.e++,h[0]==Dq&&(h[0]=1));break}if(h[d]+=s,h[d]!=Dq)break;h[d--]=0,s=1}for(o=h.length;0===h[--o];)h.pop()}return _q&&(t.e>f.maxE?(t.d=null,t.e=NaN):t.e<f.minE&&(t.e=0,t.d=[0])),t}function Wq(t,e,n){if(!t.isFinite())return eZ(t);var r,i=t.e,o=Rq(t.d),a=o.length;return e?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+Vq(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(t.e<0?"e":"e+")+t.e):i<0?(o="0."+Vq(-i-1)+o,n&&(r=n-a)>0&&(o+=Vq(r))):i>=a?(o+=Vq(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Vq(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=Vq(r))),o}function Hq(t,e){var n=t[0];for(e*=7;n>=10;n/=10)e++;return e}function Gq(t,e,n){if(e>Oq)throw _q=!0,n&&(t.precision=n),Error(Sq);return Qq(new t(vq),e,1,!0)}function qq(t,e,n){if(e>Pq)throw Error(Sq);return Qq(new t(wq),e,n,!0)}function Zq(t){var e=t.length-1,n=7*e+1;if(e=t[e]){for(;e%10==0;e/=10)n--;for(e=t[0];e>=10;e/=10)n++}return n}function Vq(t){for(var e="";t--;)e+="0";return e}function Jq(t,e,n,r){var i,o=new t(1),a=Math.ceil(r/7+4);for(_q=!1;;){if(n%2&&uZ((o=o.times(e)).d,a)&&(i=!0),0===(n=Tq(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}uZ((e=e.times(e)).d,a)}return _q=!0,o}function Kq(t){return 1&t.d[t.d.length-1]}function Xq(t,e,n){for(var r,i=new t(e[0]),o=0;++o<e.length;){if(!(r=new t(e[o])).s){i=r;break}i[n](r)&&(i=r)}return i}function $q(t,e){var n,r,i,o,a,s,u,c=0,l=0,h=0,d=t.constructor,f=d.rounding,p=d.precision;if(!t.d||!t.d[0]||t.e>17)return new d(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(null==e?(_q=!1,u=p):u=e,s=new d(.03125);t.e>-2;)t=t.times(s),h+=5;for(u+=r=Math.log(xq(2,h))/Math.LN10*2+5|0,n=o=a=new d(1),d.precision=u;;){if(o=Qq(o.times(t),u,1),n=n.times(++l),Rq((s=a.plus(Yq(o,n,u,1))).d).slice(0,u)===Rq(a.d).slice(0,u)){for(i=h;i--;)a=Qq(a.times(a),u,1);if(null!=e)return d.precision=p,a;if(!(c<3&&Uq(a.d,u-r,f,c)))return Qq(a,d.precision=p,f,_q=!0);d.precision=u+=10,n=o=s=new d(1),l=0,c++}a=s}}function tZ(t,e){var n,r,i,o,a,s,u,c,l,h,d,f=1,p=t,m=p.d,y=p.constructor,g=y.rounding,b=y.precision;if(p.s<0||!m||!m[0]||!p.e&&1==m[0]&&1==m.length)return new y(m&&!m[0]?-1/0:1!=p.s?NaN:m?0:p);if(null==e?(_q=!1,l=b):l=e,y.precision=l+=10,r=(n=Rq(m)).charAt(0),!(Math.abs(o=p.e)<15e14))return c=Gq(y,l+2,b).times(o+""),p=tZ(new y(r+"."+n.slice(1)),l-10).plus(c),y.precision=b,null==e?Qq(p,b,g,_q=!0):p;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=Rq((p=p.times(t)).d)).charAt(0),f++;for(o=p.e,r>1?(p=new y("0."+n),o++):p=new y(r+"."+n.slice(1)),h=p,u=a=p=Yq(p.minus(1),p.plus(1),l,1),d=Qq(p.times(p),l,1),i=3;;){if(a=Qq(a.times(d),l,1),Rq((c=u.plus(Yq(a,new y(i),l,1))).d).slice(0,l)===Rq(u.d).slice(0,l)){if(u=u.times(2),0!==o&&(u=u.plus(Gq(y,l+2,b).times(o+""))),u=Yq(u,new y(f),l,1),null!=e)return y.precision=b,u;if(!Uq(u.d,l-10,g,s))return Qq(u,y.precision=b,g,_q=!0);y.precision=l+=10,c=a=p=Yq(h.minus(1),h.plus(1),l,1),d=Qq(p.times(p),l,1),i=s=1}u=c,i+=2}}function eZ(t){return String(t.s*t.s/0)}function nZ(t,e){var n,r,i;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;48===e.charCodeAt(r);r++);for(i=e.length;48===e.charCodeAt(i-1);--i);if(e=e.slice(r,i)){if(i-=r,t.e=n=n-r-1,t.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&t.d.push(+e.slice(0,r)),i-=7;r<i;)t.d.push(+e.slice(r,r+=7));r=7-(e=e.slice(r)).length}else r-=i;for(;r--;)e+="0";t.d.push(+e),_q&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function rZ(t,e){var n,r,i,o,a,s,u,c,l;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),Cq.test(e))return nZ(t,e)}else if("Infinity"===e||"NaN"===e)return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(Iq.test(e))n=16,e=e.toLowerCase();else if(Lq.test(e))n=2;else{if(!jq.test(e))throw Error(Aq+e);n=8}for((o=e.search(/p/i))>0?(u=+e.slice(o+1),e=e.substring(2,o)):e=e.slice(2),a=(o=e.indexOf("."))>=0,r=t.constructor,a&&(o=(s=(e=e.replace(".","")).length)-o,i=Jq(r,new r(n),o,2*o)),o=l=(c=Fq(e,n,Dq)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*t.s):(t.e=Hq(c,l),t.d=c,_q=!1,a&&(t=Yq(t,i,4*s)),u&&(t=t.times(Math.abs(u)<54?xq(2,u):VZ.pow(2,u))),_q=!0,t)}function iZ(t,e,n,r,i){var o,a,s,u,c=t.precision,l=Math.ceil(c/7);for(_q=!1,u=n.times(n),s=new t(r);;){if(a=Yq(s.times(u),new t(e++*e++),c,1),s=i?r.plus(a):r.minus(a),r=Yq(a.times(u),new t(e++*e++),c,1),void 0!==(a=s.plus(r)).d[l]){for(o=l;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=r,r=a,a=o}return _q=!0,a.d.length=l+1,a}function oZ(t,e){for(var n=t;--e;)n*=t;return n}function aZ(t,e){var n,r=e.s<0,i=qq(t,t.precision,1),o=i.times(.5);if((e=e.abs()).lte(o))return hq=r?4:1,e;if((n=e.divToInt(i)).isZero())hq=r?3:2;else{if((e=e.minus(n.times(i))).lte(o))return hq=Kq(n)?r?2:3:r?4:1,e;hq=Kq(n)?r?1:4:r?3:2}return e.minus(i).abs()}function sZ(t,e,n,r){var i,o,a,s,u,c,l,h,d,f=t.constructor,p=void 0!==n;if(p?(Bq(n,1,gq),void 0===r?r=f.rounding:Bq(r,0,8)):(n=f.precision,r=f.rounding),t.isFinite()){for(p?(i=2,16==e?n=4*n-3:8==e&&(n=3*n-2)):i=e,(a=(l=Wq(t)).indexOf("."))>=0&&(l=l.replace(".",""),(d=new f(1)).e=l.length-a,d.d=Fq(Wq(d),10,i),d.e=d.d.length),o=u=(h=Fq(l,10,i)).length;0==h[--u];)h.pop();if(h[0]){if(a<0?o--:((t=new f(t)).d=h,t.e=o,h=(t=Yq(t,d,n,r,0,i)).d,o=t.e,c=lq),a=h[n],s=i/2,c=c||void 0!==h[n+1],c=r<4?(void 0!==a||c)&&(0===r||r===(t.s<0?3:2)):a>s||a===s&&(4===r||c||6===r&&1&h[n-1]||r===(t.s<0?8:7)),h.length=n,c)for(;++h[--n]>i-1;)h[n]=0,n||(++o,h.unshift(1));for(u=h.length;!h[u-1];--u);for(a=0,l="";a<u;a++)l+=bq.charAt(h[a]);if(p){if(u>1)if(16==e||8==e){for(a=16==e?4:3,--u;u%a;u++)l+="0";for(u=(h=Fq(l,i,e)).length;!h[u-1];--u);for(a=1,l="1.";a<u;a++)l+=bq.charAt(h[a])}else l=l.charAt(0)+"."+l.slice(1);l=l+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)l="0"+l;l="0."+l}else if(++o>u)for(o-=u;o--;)l+="0";else o<u&&(l=l.slice(0,o)+"."+l.slice(o))}else l=p?"0p+0":"0";l=(16==e?"0x":2==e?"0b":8==e?"0o":"")+l}else l=eZ(t);return t.s<0?"-"+l:l}function uZ(t,e){if(t.length>e)return t.length=e,!0}function cZ(t){return new this(t).abs()}function lZ(t){return new this(t).acos()}function hZ(t){return new this(t).acosh()}function dZ(t,e){return new this(t).plus(e)}function fZ(t){return new this(t).asin()}function pZ(t){return new this(t).asinh()}function mZ(t){return new this(t).atan()}function yZ(t){return new this(t).atanh()}function gZ(t,e){t=new this(t),e=new this(e);var n,r=this.precision,i=this.rounding,o=r+4;return t.s&&e.s?t.d||e.d?!e.d||t.isZero()?(n=e.s<0?qq(this,r,i):new this(0)).s=t.s:!t.d||e.isZero()?(n=qq(this,o,1).times(.5)).s=t.s:e.s<0?(this.precision=o,this.rounding=1,n=this.atan(Yq(t,e,o,1)),e=qq(this,o,1),this.precision=r,this.rounding=i,n=t.s<0?n.minus(e):n.plus(e)):n=this.atan(Yq(t,e,o,1)):(n=qq(this,o,1).times(e.s>0?.25:.75)).s=t.s:n=new this(NaN),n}function bZ(t){return new this(t).cbrt()}function vZ(t){return Qq(t=new this(t),t.e+1,2)}function wZ(t,e,n){return new this(t).clamp(e,n)}function MZ(t){if(!t||"object"!=typeof t)throw Error(Eq+"Object expected");var e,n,r,i=!0===t.defaults,o=["precision",1,gq,"rounding",0,8,"toExpNeg",-yq,0,"toExpPos",0,yq,"maxE",0,yq,"minE",-yq,0,"modulo",0,9];for(e=0;e<o.length;e+=3)if(n=o[e],i&&(this[n]=Mq[n]),void 0!==(r=t[n])){if(!(Tq(r)===r&&r>=o[e+1]&&r<=o[e+2]))throw Error(Aq+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=Mq[n]),void 0!==(r=t[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(Aq+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(kq);this[n]=!0}else this[n]=!1}return this}function _Z(t){return new this(t).cos()}function EZ(t){return new this(t).cosh()}function AZ(t,e){return new this(t).div(e)}function SZ(t){return new this(t).exp()}function kZ(t){return Qq(t=new this(t),t.e+1,3)}function NZ(){var t,e,n=new this(0);for(_q=!1,t=0;t<arguments.length;)if((e=new this(arguments[t++])).d)n.d&&(n=n.plus(e.times(e)));else{if(e.s)return _q=!0,new this(1/0);n=e}return _q=!0,n.sqrt()}function TZ(t){return t instanceof VZ||t&&t.toStringTag===Nq||!1}function xZ(t){return new this(t).ln()}function LZ(t,e){return new this(t).log(e)}function IZ(t){return new this(t).log(2)}function jZ(t){return new this(t).log(10)}function CZ(){return Xq(this,arguments,"lt")}function DZ(){return Xq(this,arguments,"gt")}function OZ(t,e){return new this(t).mod(e)}function PZ(t,e){return new this(t).mul(e)}function zZ(t,e){return new this(t).pow(e)}function RZ(t){var e,n,r,i,o=0,a=new this(1),s=[];if(void 0===t?t=this.precision:Bq(t,1,gq),r=Math.ceil(t/7),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=e[o])>=429e7?e[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(kq);for(e=crypto.randomBytes(r*=4);o<r;)(i=e[o]+(e[o+1]<<8)+(e[o+2]<<16)+((127&e[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(e,o):(s.push(i%1e7),o+=4);o=r/4}else for(;o<r;)s[o++]=1e7*Math.random()|0;for(t%=7,(r=s[--o])&&t&&(i=xq(10,7-t),s[o]=(r/i|0)*i);0===s[o];o--)s.pop();if(o<0)n=0,s=[0];else{for(n=-1;0===s[0];n-=7)s.shift();for(r=1,i=s[0];i>=10;i/=10)r++;r<7&&(n-=7-r)}return a.e=n,a.d=s,a}function BZ(t){return Qq(t=new this(t),t.e+1,this.rounding)}function UZ(t){return(t=new this(t)).d?t.d[0]?t.s:0*t.s:t.s||NaN}function FZ(t){return new this(t).sin()}function YZ(t){return new this(t).sinh()}function QZ(t){return new this(t).sqrt()}function WZ(t,e){return new this(t).sub(e)}function HZ(){var t=0,e=arguments,n=new this(e[t]);for(_q=!1;n.s&&++t<e.length;)n=n.plus(e[t]);return _q=!0,Qq(n,this.precision,this.rounding)}function GZ(t){return new this(t).tan()}function qZ(t){return new this(t).tanh()}function ZZ(t){return Qq(t=new this(t),t.e+1,1)}zq[Symbol.for("nodejs.util.inspect.custom")]=zq.toString,zq[Symbol.toStringTag]="Decimal";var VZ=zq.constructor=function t(e){var n,r,i;function o(t){var e,n,r,i=this;if(!(i instanceof o))return new o(t);if(i.constructor=o,TZ(t))return i.s=t.s,void(_q?!t.d||t.e>o.maxE?(i.e=NaN,i.d=null):t.e<o.minE?(i.e=0,i.d=[0]):(i.e=t.e,i.d=t.d.slice()):(i.e=t.e,i.d=t.d?t.d.slice():t.d));if("number"===(r=typeof t)){if(0===t)return i.s=1/t<0?-1:1,i.e=0,void(i.d=[0]);if(t<0?(t=-t,i.s=-1):i.s=1,t===~~t&&t<1e7){for(e=0,n=t;n>=10;n/=10)e++;return void(_q?e>o.maxE?(i.e=NaN,i.d=null):e<o.minE?(i.e=0,i.d=[0]):(i.e=e,i.d=[t]):(i.e=e,i.d=[t]))}return 0*t!=0?(t||(i.s=NaN),i.e=NaN,void(i.d=null)):nZ(i,t.toString())}if("string"!==r)throw Error(Aq+t);return 45===(n=t.charCodeAt(0))?(t=t.slice(1),i.s=-1):(43===n&&(t=t.slice(1)),i.s=1),Cq.test(t)?nZ(i,t):rZ(i,t)}if(o.prototype=zq,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=MZ,o.clone=t,o.isDecimal=TZ,o.abs=cZ,o.acos=lZ,o.acosh=hZ,o.add=dZ,o.asin=fZ,o.asinh=pZ,o.atan=mZ,o.atanh=yZ,o.atan2=gZ,o.cbrt=bZ,o.ceil=vZ,o.clamp=wZ,o.cos=_Z,o.cosh=EZ,o.div=AZ,o.exp=SZ,o.floor=kZ,o.hypot=NZ,o.ln=xZ,o.log=LZ,o.log10=jZ,o.log2=IZ,o.max=CZ,o.min=DZ,o.mod=OZ,o.mul=PZ,o.pow=zZ,o.random=RZ,o.round=BZ,o.sign=UZ,o.sin=FZ,o.sinh=YZ,o.sqrt=QZ,o.sub=WZ,o.sum=HZ,o.tan=GZ,o.tanh=qZ,o.trunc=ZZ,void 0===e&&(e={}),e&&!0!==e.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<i.length;)e.hasOwnProperty(r=i[n++])||(e[r]=this[r]);return o.config(e),o}(Mq);vq=new VZ(vq),wq=new VZ(wq);const JZ="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",KZ="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";var XZ=async({token:t,owner:e})=>{const[n]=await JU.findProgramAddress([new JU(e).toBuffer(),new JU(JZ).toBuffer(),new JU(t).toBuffer()],new JU(KZ));return function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([n,"optionalAccess",t=>t.toString,"call",t=>t()])};const $Z=WW([qW("mintAuthorityOption"),FW("mintAuthority"),ZW("supply"),VW("decimals"),BW("isInitialized"),qW("freezeAuthorityOption"),FW("freezeAuthority")]),tV=YW([WW([],"uninitialized"),WW([],"editionV1"),WW([],"masterEditionV1"),WW([],"reservationListV1"),WW([],"metadataV1"),WW([],"reservationListV2"),WW([],"masterEditionV2"),WW([],"editionMarker")]),eV=WW([FW("address"),BW("verified"),VW("share")]),nV=WW([QW("name"),QW("symbol"),QW("uri"),GW("sellerFeeBasisPoints"),UW(JW(eV.replicate("creators")),"creators")]),rV=WW([tV.replicate("key"),FW("updateAuthority"),FW("mint"),nV.replicate("data"),BW("primarySaleHappened"),BW("isMutable"),UW(VW(),"editionNonce")]),iV=WW([VW("instruction"),ZW("amount")]),oV=WW([FW("mint"),FW("owner"),ZW("amount"),qW("delegateOption"),FW("delegate"),VW("state"),qW("isNativeOption"),ZW("isNative"),ZW("delegatedAmount"),qW("closeAuthorityOption"),FW("closeAuthority")]),aV=WW([VW("instruction"),FW("owner")]),sV=WW([VW("instruction")]);var uV=Object.freeze({__proto__:null,createTransferInstruction:async({token:t,amount:e,from:n,to:r})=>{let i=await XZ({token:t,owner:n}),o=await XZ({token:t,owner:r});const a=[{pubkey:new JU(i),isSigner:!1,isWritable:!0},{pubkey:new JU(o),isSigner:!1,isWritable:!0},{pubkey:new JU(n),isSigner:!0,isWritable:!1}],s=PW.alloc(iV.span);return iV.encode({instruction:3,amount:new zW(e)},s),new dF({keys:a,programId:new JU(JZ),data:s})},createAssociatedTokenAccountInstruction:async({token:t,owner:e,payer:n})=>{let r=await XZ({token:t,owner:e});const i=[{pubkey:new JU(n),isSigner:!0,isWritable:!0},{pubkey:new JU(r),isSigner:!1,isWritable:!0},{pubkey:new JU(e),isSigner:!1,isWritable:!1},{pubkey:new JU(t),isSigner:!1,isWritable:!1},{pubkey:DF.programId,isSigner:!1,isWritable:!1},{pubkey:new JU(JZ),isSigner:!1,isWritable:!1}];return new dF({keys:i,programId:KZ,data:PW.alloc(0)})},initializeAccountInstruction:({account:t,token:e,owner:n})=>{const r=[{pubkey:new JU(t),isSigner:!1,isWritable:!0},{pubkey:new JU(e),isSigner:!1,isWritable:!1}],i=PW.alloc(aV.span);return aV.encode({instruction:18,owner:new JU(n)},i),new dF({keys:r,programId:new JU(JZ),data:i})},closeAccountInstruction:({account:t,owner:e})=>{const n=[{pubkey:new JU(t),isSigner:!1,isWritable:!0},{pubkey:new JU(e),isSigner:!1,isWritable:!0},{pubkey:new JU(e),isSigner:!0,isWritable:!1}],r=PW.alloc(sV.span);return sV.encode({instruction:9},r),new dF({keys:n,programId:new JU(JZ),data:r})}}),cV=[{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"renounceOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}],lV=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],hV=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}],dV=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}];const fV=[{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];var pV=({blockchain:t,address:e,api:n,id:r})=>r?new Promise((n=>{EH({blockchain:t,address:e,api:fV,method:"uri",params:[r]}).then((t=>{var e;t=t.match("0x{id}")?t.replace("0x{id}",r):t,(e=t,new Promise((t=>{e.match(/^ipfs/)&&(e=`https://ipfs.io/ipfs/${e.split("://")[1]}`),fetch(e).then((e=>{if(e.ok)return e.json();t()})).then((e=>{if(e){let n=e.name;n?t(n):t()}})).catch((()=>t()))}))).then(n)})).catch((t=>{console.log("error",t),n()}))})):EH({blockchain:t,address:e,api:n,method:"name",cache:864e5});function mV(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}const yV="metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s",gV=new RegExp("\0","g"),bV=async({blockchain:t,address:e})=>{let n=new JU(e),r=new JU(yV),i=await(async({metaDataPublicKey:t,mintPublicKey:e})=>{let n=[PW.from("metadata"),t.toBuffer(),e.toBuffer()];return(await JU.findProgramAddress(n,t))[0]})({metaDataPublicKey:r,mintPublicKey:n}),o=await EH({blockchain:t,address:i.toString(),api:rV,cache:864e5});return{name:mV([o,"optionalAccess",t=>t.data,"optionalAccess",t=>t.name,"optionalAccess",t=>t.replace,"call",t=>t(gV,"")]),symbol:mV([o,"optionalAccess",t=>t.data,"optionalAccess",t=>t.symbol,"optionalAccess",t=>t.replace,"call",t=>t(gV,"")])}};var vV=[{name:"Approval",type:"event",inputs:[{name:"src",type:"address",indexed:!0,internalType:"address"},{name:"guy",type:"address",indexed:!0,internalType:"address"},{name:"wad",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{name:"Deposit",type:"event",inputs:[{name:"dst",type:"address",indexed:!0,internalType:"address"},{name:"wad",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{name:"Transfer",type:"event",inputs:[{name:"src",type:"address",indexed:!0,internalType:"address"},{name:"dst",type:"address",indexed:!0,internalType:"address"},{name:"wad",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{name:"Withdrawal",type:"event",inputs:[{name:"src",type:"address",indexed:!0,internalType:"address"},{name:"wad",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"fallback",stateMutability:"payable"},{name:"allowance",type:"function",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{name:"approve",type:"function",inputs:[{name:"guy",type:"address",internalType:"address"},{name:"wad",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"nonpayable"},{name:"balanceOf",type:"function",inputs:[{name:"",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{name:"decimals",type:"function",inputs:[],outputs:[{name:"",type:"uint8",internalType:"uint8"}],stateMutability:"view"},{name:"deposit",type:"function",inputs:[],outputs:[],stateMutability:"payable"},{name:"name",type:"function",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{name:"symbol",type:"function",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{name:"totalSupply",type:"function",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{name:"transfer",type:"function",inputs:[{name:"dst",type:"address",internalType:"address"},{name:"wad",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"nonpayable"},{name:"transferFrom",type:"function",inputs:[{name:"src",type:"address",internalType:"address"},{name:"dst",type:"address",internalType:"address"},{name:"wad",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"nonpayable"},{name:"withdraw",type:"function",inputs:[{name:"wad",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"}];let wV=["ethereum","bsc","polygon","solana","velas"];function MV(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}wV.evm=["ethereum","bsc","polygon","velas"],wV.solana=["solana"];class _V{constructor({blockchain:t,address:e}){this.blockchain=t,wV.evm.includes(this.blockchain)?this.address=cp(e):wV.solana.includes(this.blockchain)&&(this.address=e)}async decimals(){if(this.address==UM[this.blockchain].NATIVE)return UM[this.blockchain].DECIMALS;let t;try{wV.evm.includes(this.blockchain)?t=await(({blockchain:t,address:e,api:n})=>EH({blockchain:t,address:e,api:n,method:"decimals",cache:864e5}))({blockchain:this.blockchain,address:this.address,api:_V[this.blockchain].DEFAULT}):wV.solana.includes(this.blockchain)&&(t=await(async({blockchain:t,address:e})=>(await EH({blockchain:t,address:e,api:$Z})).decimals)({blockchain:this.blockchain,address:this.address}))}catch(t){}return t}async symbol(){return this.address==UM[this.blockchain].NATIVE?UM[this.blockchain].SYMBOL:wV.evm.includes(this.blockchain)?await(({blockchain:t,address:e,api:n})=>EH({blockchain:t,address:e,api:n,method:"symbol",cache:864e5}))({blockchain:this.blockchain,address:this.address,api:_V[this.blockchain].DEFAULT}):wV.solana.includes(this.blockchain)?await(async({blockchain:t,address:e})=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([await bV({blockchain:t,address:e}),"optionalAccess",t=>t.symbol]))({blockchain:this.blockchain,address:this.address}):void 0}async name(t){return this.address==UM[this.blockchain].NATIVE?UM[this.blockchain].CURRENCY:wV.evm.includes(this.blockchain)?await pV({blockchain:this.blockchain,address:this.address,api:_V[this.blockchain].DEFAULT,id:MV([t,"optionalAccess",t=>t.id])}):wV.solana.includes(this.blockchain)?await(async({blockchain:t,address:e})=>function(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([await bV({blockchain:t,address:e}),"optionalAccess",t=>t.name]))({blockchain:this.blockchain,address:this.address}):void 0}async balance(t,e){return wV.evm.includes(this.blockchain)?await(async({blockchain:t,address:e,account:n,api:r,id:i})=>e==UM[t].NATIVE?await EH({blockchain:t,address:n,method:"balance",cache:1e4}):await EH({blockchain:t,address:e,method:"balanceOf",api:r,params:i?[n,i]:[n],cache:1e4}))({blockchain:this.blockchain,account:t,address:this.address,api:e?_V[this.blockchain][1155]:_V[this.blockchain].DEFAULT,id:e}):wV.solana.includes(this.blockchain)?await(async({blockchain:t,address:e,account:n,api:r})=>{if(e==UM[t].NATIVE)return Wd.from(await EH(`solana://${n}/balance`));{let t=[{dataSize:165},{memcmp:{offset:32,bytes:n}},{memcmp:{offset:0,bytes:e}}],r=await EH("solana://TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA/getProgramAccounts",{params:{filters:t}}),i=Wd.from("0");return await Promise.all(r.map((t=>EH(`solana://${t.pubkey.toString()}/getTokenAccountBalance`)))).then((t=>{t.forEach((t=>{i=i.add(Wd.from(t.value.amount))}))})),i}})({blockchain:this.blockchain,account:t,address:this.address,api:_V[this.blockchain].DEFAULT}):void 0}async allowance(t,e){return this.address==UM[this.blockchain].NATIVE?Wd.from(UM[this.blockchain].MAXINT):wV.evm.includes(this.blockchain)?await(({blockchain:t,address:e,api:n,owner:r,spender:i})=>EH({blockchain:t,address:e,api:n,method:"allowance",params:[r,i],cache:5e3}))({blockchain:this.blockchain,address:this.address,api:_V[this.blockchain].DEFAULT,owner:t,spender:e}):wV.solana.includes(this.blockchain)?Wd.from(UM[this.blockchain].MAXINT):void 0}async BigNumber(t){let e=await this.decimals();return BM(_V.safeAmount({amount:parseFloat(t),decimals:e}).toString(),e)}async readable(t){let e=await this.decimals(),n=RM(t.toString(),e);return n=n.replace(/0+$/,""),n=n.replace(/\.$/,""),n}}_V.BigNumber=async({amount:t,blockchain:e,address:n})=>new _V({blockchain:e,address:n}).BigNumber(t),_V.readable=async({amount:t,blockchain:e,address:n})=>new _V({blockchain:e,address:n}).readable(t),_V.safeAmount=({amount:t,decimals:e})=>parseFloat(t.toFixed(e)),_V.ethereum={DEFAULT:hV,ERC20:hV,20:hV,1155:[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}]},_V.bsc={DEFAULT:cV,BEP20:cV,20:cV,1155:lV},_V.polygon={DEFAULT:dV,ERC20:dV,20:dV,1155:lV},_V.velas={DEFAULT:vV,VRC20:vV,20:vV,1155:lV},_V.solana={MINT_LAYOUT:$Z,METADATA_LAYOUT:rV,TRANSFER_LAYOUT:iV,METADATA_ACCOUNT:yV,TOKEN_PROGRAM:JZ,TOKEN_LAYOUT:oV,ASSOCIATED_TOKEN_PROGRAM:KZ,findProgramAddress:XZ,findAccount:async({token:t,owner:e})=>{let n=(await EH(`solana://${JZ}/getProgramAccounts`,{api:oV,params:{filters:[{dataSize:165},{memcmp:{offset:32,bytes:e}},{memcmp:{offset:0,bytes:t}}]}})).sort(((t,e)=>t.account.data.amount.lt(e.account.data.amount)?1:-1))[0];if(n)return n.pubkey.toString()},getMetaData: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zU1WiIgZmlsbD0iI0ZFREM5MCIvPgo8cGF0aCBkPSJNNzUuNjEzNSAxMTcuODk2Qzc1LjYxMzUgMTI3LjYxNCA3MS4wMjEgMTMyLjY3NSA2NS4zNTU4IDEzMi42NzVDNTkuNjkwNyAxMzIuNjc1IDU1LjA5ODEgMTI3LjYxNCA1NS4wOTgxIDExNy44OTZDNTUuMDk4MSAxMDguMTc4IDU5LjY5MDcgMTAzLjExNyA2NS4zNTU4IDEwMy4xMTdDNzEuMDIxIDEwMy4xMTcgNzUuNjEzNSAxMDguMTc4IDc1LjYxMzUgMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPHBhdGggZD0iTTE0Mi4yODggMTE3Ljg5NkMxNDIuMjg4IDEyNy42MTQgMTM3LjY5NiAxMzIuNjc1IDEzMi4wMzEgMTMyLjY3NUMxMjYuMzY1IDEzMi42NzUgMTIxLjc3MyAxMjcuNjE0IDEyMS43NzMgMTE3Ljg5NkMxMjEuNzczIDEwOC4xNzggMTI2LjM2NSAxMDMuMTE3IDEzMi4wMzEgMTAzLjExN0MxMzcuNjk2IDEwMy4xMTcgMTQyLjI4OCAxMDguMTc4IDE0Mi4yODggMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPC9zdmc+Cg==",router:{address:"0x10ED43C718714eb63d5aA57B78B54704E256024E",api:[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"amountADesired",type:"uint256"},{internalType:"uint256",name:"amountBDesired",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountTokenDesired",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountIn",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountOut",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsIn",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsOut",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"reserveA",type:"uint256"},{internalType:"uint256",name:"reserveB",type:"uint256"}],name:"quote",outputs:[{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETHSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermit",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityWithPermit",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapETHForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETHSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]},factory:{address:"0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73",api:[{inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!1,internalType:"address",name:"pair",type:"address"},{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"PairCreated",type:"event"},{constant:!0,inputs:[],name:"INIT_CODE_PAIR_HASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"allPairs",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"allPairsLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"}],name:"createPair",outputs:[{internalType:"address",name:"pair",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"feeTo",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"feeToSetter",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"getPair",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeTo",type:"address"}],name:"setFeeTo",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],name:"setFeeToSetter",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},pair:{api:[{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount0Out",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1Out",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint112",name:"reserve0",type:"uint112"},{indexed:!1,internalType:"uint112",name:"reserve1",type:"uint112"}],name:"Sync",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"MINIMUM_LIQUIDITY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getReserves",outputs:[{internalType:"uint112",name:"_reserve0",type:"uint112"},{internalType:"uint112",name:"_reserve1",type:"uint112"},{internalType:"uint32",name:"_blockTimestampLast",type:"uint32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_token0",type:"address"},{internalType:"address",name:"_token1",type:"address"}],name:"initialize",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"kLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[{internalType:"uint256",name:"liquidity",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"price0CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"price1CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"skim",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"amount0Out",type:"uint256"},{internalType:"uint256",name:"amount1Out",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"sync",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}]},slippage:!0};function AV(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}class SV{constructor({tokenIn:t,tokenOut:e,path:n,amountIn:r,amountInMax:i,amountOut:o,amountOutMin:a,exchange:s,getTransaction:u}){this.tokenIn=t,this.tokenOut=e,this.path=n,this.amountIn=AV([r,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountOutMin=AV([a,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountOut=AV([o,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountInMax=AV([i,"optionalAccess",t=>t.toString,"call",t=>t()]),this.exchange=s,this.getTransaction=u}}let kV=["ethereum","bsc","polygon","solana","velas"];kV.evm=["ethereum","bsc","polygon","velas"],kV.solana=["solana"];const NV=async({exchange:t,fixedPath:e,amountIn:n,amountOut:r})=>{let i=n.add(n.mul(100*parseFloat("0.5")).div(1e4));if(!kV.evm.includes(t.blockchain))return i;const o=await EH({blockchain:t.blockchain,method:"latestBlockNumber"});let a=[];for(var s=0;s<=2;s++)a.push(o-s);const u=await Promise.all(a.map((async n=>{let{amountIn:i}=await t.getAmounts({path:e,amountOut:r,block:n});return i})));if(!u[0]||!u[1]||!u[2])return i;let c;if(u[0].gt(u[1])&&u[1].gt(u[2])){const t=u[0].sub(u[1]),e=u[1].sub(u[2]),n=t.add(e).div(2);if(c=u[0].add(n),c.gt(i))return c}else if(!u[0].eq(u[1])&&!u[1].eq(u[2])){const t=u[0].sub(u[1]).abs(),e=u[1].sub(u[2]).abs();let n,r;if(n=t.lt(e)?t:e,r=u[0].gt(u[1])&&u[0].gt(u[2])?u[0]:u[1].gt(u[2])&&u[1].gt(u[0])?u[1]:u[2],c=r.add(n),c.gt(i))return c}return i},TV=async({exchange:t,fixedPath:e,amounts:n,tokenIn:r,tokenOut:i,amountIn:o,amountInMax:a,amountOut:s,amountOutMin:u,amountInInput:c,amountOutInput:l,amountInMaxInput:h,amountOutMinInput:d})=>{if(d||l){if(kV.evm.includes(t.blockchain))o=a=await NV({exchange:t,fixedPath:e,amountIn:o,amountOut:d||s});else if(kV.solana.includes(t.blockchain)){let r=[];await Promise.all(e.map(((i,o)=>{if(0!=o){let i=NV({exchange:t,fixedPath:[e[o-1],e[o]],amountIn:n[o-1],amountOut:n[o]});return i.then((t=>r.push(t))),i}}))),r.push(n[n.length-1]),o=a=(n=r)[0]}}else if((h||c)&&kV.solana.includes(t.blockchain)){let r=[];await Promise.all(e.map(((i,o)=>{if(0!==o&&o<e.length-1)r.unshift(n[o]);else if(o===e.length-1){let i=(async({exchange:t,fixedPath:e,amountOut:n,amountIn:r})=>n.sub(n.mul(100*parseFloat("0.5")).div(1e4)))({exchange:t,fixedPath:[e[o-1],e[o]],amountIn:n[o-1],amountOut:n[o]});return i.then((t=>(r.unshift(t),t))),i}}))),r.push(n[0]),s=u=(n=r.slice().reverse())[n.length-1]}return{amountIn:o,amountInMax:a,amountOut:s,amountOutMin:u,amounts:n}},xV=t=>t.match("0x")?cp(t):t;let LV=async({amount:t,blockchain:e,address:n})=>await _V.BigNumber({amount:t,blockchain:e,address:n}),IV=async({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{let u={exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s};return o&&"number"==typeof o&&(u.amountOut=await LV({amount:o,blockchain:t,address:r})),s&&"number"==typeof s&&(u.amountOutMin=await LV({amount:s,blockchain:t,address:r})),i&&"number"==typeof i&&(u.amountIn=await LV({amount:i,blockchain:t,address:n})),a&&"number"==typeof a&&(u.amountInMax=await LV({amount:a,blockchain:t,address:n})),u};class jV{constructor({name:t,blockchain:e,alternativeNames:n,label:r,logo:i,router:o,factory:a,wrapper:s,pair:u,market:c,findPath:l,getAmounts:h,getTransaction:d,slippage:f}){this.name=t,this.blockchain=e,this.alternativeNames=n,this.label=r,this.logo=i,this.router=o,this.factory=a,this.wrapper=s,this.pair=u,this.market=c,this.findPath=l,this.getAmounts=h,this.getTransaction=d,this.slippage=f}async route({tokenIn:t,tokenOut:e,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o,amountOutMax:a,amountInMin:s}){return t===e?Promise.resolve():((({tokenIn:t,tokenOut:e,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o,amountOutMax:a,amountInMin:s})=>{if(void 0!==a)throw"You cannot not set amountOutMax! Only amountInMax or amountOutMin!";if(void 0!==s)throw"You cannot not set amountInMin! Only amountInMax or amountOutMin!";if(void 0!==r&&void 0!==n)throw"You cannot set amountIn and amountOut at the same time, use amountInMax or amountOutMin to describe the non exact part of the swap!";if(void 0!==i&&void 0!==o)throw"You cannot set amountInMax and amountOutMin at the same time, use amountIn or amountOut to describe the part of the swap that needs to be exact!";if(void 0!==n&&void 0!==i)throw"Setting amountIn and amountInMax at the same time makes no sense. Decide if amountIn needs to be exact or not!";if(void 0!==r&&void 0!==o)throw"Setting amountOut and amountOutMin at the same time makes no sense. Decide if amountOut needs to be exact or not!"})({tokenIn:t,tokenOut:e,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o,amountOutMax:a,amountInMin:s}),await(({exchange:t,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a,findPath:s,getAmounts:u,getTransaction:c,slippage:l})=>(e=xV(e),n=xV(n),new Promise((async h=>{let{path:d,fixedPath:f}=await s({tokenIn:e,tokenOut:n});if(void 0===d||0==d.length)return h();let p,[m,y,g,b]=[r,i,o,a];if(({amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a,amounts:p}=await u({path:d,tokenIn:e,tokenOut:n,amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a})),[r,o,i,a].every((t=>null==t)))return h();l&&({amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a,amounts:p}=await TV({exchange:t,fixedPath:f,amounts:p,tokenIn:e,tokenOut:n,amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a,amountInInput:m,amountOutInput:y,amountInMaxInput:g,amountOutMinInput:b})),h(new SV({tokenIn:e,tokenOut:n,path:d,amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a,exchange:t,getTransaction:async({from:e})=>await c({exchange:t,path:d,amountIn:r,amountInMax:o,amountOut:i,amountOutMin:a,amounts:p,amountInInput:m,amountOutInput:y,amountInMaxInput:g,amountOutMinInput:b,fromAddress:e})}))}))))({...await IV({blockchain:this.blockchain,exchange:this,tokenIn:t,tokenOut:e,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o}),findPath:this.findPath,getAmounts:this.getAmounts,getTransaction:this.getTransaction,slippage:this.slippage}))}}function CV(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}let DV=t=>{if(!t)return;let e=t.map(((e,n)=>e===UM.bsc.NATIVE&&t[n+1]!=UM.bsc.WRAPPED&&t[n-1]!=UM.bsc.WRAPPED?UM.bsc.WRAPPED:e));return e[0]==UM.bsc.NATIVE&&e[1]==UM.bsc.WRAPPED?e.splice(0,1):e[e.length-1]==UM.bsc.NATIVE&&e[e.length-2]==UM.bsc.WRAPPED&&e.splice(e.length-1,1),e},OV=({reserves:t,min:e,token:n,token0:r,token1:i,decimals:o})=>r.toLowerCase()==n.toLowerCase()?t[0].gte(BM(e.toString(),o)):i.toLowerCase()==n.toLowerCase()&&t[1].gte(BM(e.toString(),o)),PV=async t=>{if(1==DV(t).length)return!1;let e=await EH({blockchain:"bsc",address:EV.factory.address,method:"getPair",api:EV.factory.api,cache:36e5,params:DV(t)});if(e==UM.bsc.ZERO)return!1;let[n,r,i]=await Promise.all([EH({blockchain:"bsc",address:e,method:"getReserves",api:EV.pair.api,cache:36e5}),EH({blockchain:"bsc",address:e,method:"token0",api:EV.pair.api,cache:36e5}),EH({blockchain:"bsc",address:e,method:"token1",api:EV.pair.api,cache:36e5})]);if(t.includes(UM.bsc.WRAPPED))return OV({min:1,token:UM.bsc.WRAPPED,decimals:UM.bsc.DECIMALS,reserves:n,token0:r,token1:i});if(t.includes(UM.bsc.USD)){let t=new _V({blockchain:"bsc",address:UM.bsc.USD}),e=await t.decimals();return OV({min:1e3,token:UM.bsc.USD,decimals:e,reserves:n,token0:r,token1:i})}return!0},zV=({path:t,amountIn:e,tokenIn:n,tokenOut:r})=>new Promise((n=>{EH({blockchain:"bsc",address:EV.router.address,method:"getAmountsOut",api:EV.router.api,params:{amountIn:e,path:DV(t)}}).then((t=>{n(t[t.length-1])})).catch((()=>n()))})),RV=({path:t,amountOut:e,block:n})=>new Promise((r=>{EH({blockchain:"bsc",address:EV.router.address,method:"getAmountsIn",api:EV.router.api,params:{amountOut:e,path:DV(t)},block:n}).then((t=>r(t[0]))).catch((()=>r()))}));var BV=new jV(Object.assign(EV,{findPath:async({tokenIn:t,tokenOut:e})=>{if([t,e].includes(UM.bsc.NATIVE)&&[t,e].includes(UM.bsc.WRAPPED))return{path:void 0,fixedPath:void 0};let n;return await PV([t,e])?n=[t,e]:t!=UM.bsc.WRAPPED&&await PV([t,UM.bsc.WRAPPED])&&e!=UM.bsc.WRAPPED&&await PV([e,UM.bsc.WRAPPED])?n=[t,UM.bsc.WRAPPED,e]:t!=UM.bsc.USD&&await PV([t,UM.bsc.USD])&&e!=UM.bsc.WRAPPED&&await PV([UM.bsc.WRAPPED,e])?n=[t,UM.bsc.USD,UM.bsc.WRAPPED,e]:t!=UM.bsc.WRAPPED&&await PV([t,UM.bsc.WRAPPED])&&e!=UM.bsc.USD&&await PV([UM.bsc.USD,e])&&(n=[t,UM.bsc.WRAPPED,UM.bsc.USD,e]),CV([n,"optionalAccess",t=>t.length])&&n[0]==UM.bsc.NATIVE?n.splice(1,0,UM.bsc.WRAPPED):CV([n,"optionalAccess",t=>t.length])&&n[n.length-1]==UM.bsc.NATIVE&&n.splice(n.length-1,0,UM.bsc.WRAPPED),{path:n,fixedPath:DV(n)}},getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>{if(i){if(null==(o=await RV({block:e,path:t,amountOut:i,tokenIn:n,tokenOut:r}))||a&&o.gt(a))return{};void 0===a&&(a=o)}else if(o){if(null==(i=await zV({path:t,amountIn:o,tokenIn:n,tokenOut:r}))||s&&i.lt(s))return{};void 0===s&&(s=i)}else if(s){if(null==(o=await RV({block:e,path:t,amountOut:s,tokenIn:n,tokenOut:r}))||a&&o.gt(a))return{};void 0===a&&(a=o)}else if(a){if(null==(i=await zV({path:t,amountIn:a,tokenIn:n,tokenOut:r}))||s&&i.lt(s))return{};void 0===s&&(s=i)}return{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}},getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>{let l="bsc",h={blockchain:l,from:c,to:EV.router.address,api:EV.router.api};return t[0]===UM[l].NATIVE?o||u?(h.method="swapExactETHForTokens",h.value=e.toString(),h.params={amountOutMin:i.toString()}):(a||s)&&(h.method="swapETHForExactTokens",h.value=n.toString(),h.params={amountOut:r.toString()}):t[t.length-1]===UM[l].NATIVE?o||u?(h.method="swapExactTokensForETH",h.params={amountIn:e.toString(),amountOutMin:i.toString()}):(a||s)&&(h.method="swapTokensForExactETH",h.params={amountInMax:n.toString(),amountOut:r.toString()}):o||u?(h.method="swapExactTokensForTokens",h.params={amountIn:e.toString(),amountOutMin:i.toString()}):(a||s)&&(h.method="swapTokensForExactTokens",h.params={amountInMax:n.toString(),amountOut:r.toString()}),h.params=Object.assign({},h.params,{path:DV(t),to:c,deadline:Math.round(Date.now()/1e3)+1800}),h}}));var UV={blockchain:"polygon",name:"quickswap",alternativeNames:[],label:"QuickSwap",logo:"data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNzAyLjQ1IDcwMi40NyI+PGRlZnM+PGNsaXBQYXRoIGlkPSJjbGlwLXBhdGgiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMy43OCAtMjMuNzcpIj48cmVjdCB3aWR0aD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oLTIzLjc4IC0yMy43NykiIGZpbGw9IiMwZTFmNjYiLz48L2c+PC9zdmc+",router:{address:"0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff",api:[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"amountADesired",type:"uint256"},{internalType:"uint256",name:"amountBDesired",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountTokenDesired",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountIn",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountOut",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsIn",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsOut",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"reserveA",type:"uint256"},{internalType:"uint256",name:"reserveB",type:"uint256"}],name:"quote",outputs:[{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETHSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermit",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityWithPermit",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapETHForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETHSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]},factory:{address:"0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32",api:[{inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!1,internalType:"address",name:"pair",type:"address"},{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"PairCreated",type:"event"},{constant:!0,inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"allPairs",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"allPairsLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"}],name:"createPair",outputs:[{internalType:"address",name:"pair",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"feeTo",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"feeToSetter",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"getPair",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeTo",type:"address"}],name:"setFeeTo",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],name:"setFeeToSetter",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},pair:{api:[{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount0Out",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1Out",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint112",name:"reserve0",type:"uint112"},{indexed:!1,internalType:"uint112",name:"reserve1",type:"uint112"}],name:"Sync",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"MINIMUM_LIQUIDITY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getReserves",outputs:[{internalType:"uint112",name:"_reserve0",type:"uint112"},{internalType:"uint112",name:"_reserve1",type:"uint112"},{internalType:"uint32",name:"_blockTimestampLast",type:"uint32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_token0",type:"address"},{internalType:"address",name:"_token1",type:"address"}],name:"initialize",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"kLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[{internalType:"uint256",name:"liquidity",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"price0CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"price1CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"skim",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"amount0Out",type:"uint256"},{internalType:"uint256",name:"amount1Out",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"sync",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}]},slippage:!0};function FV(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}let YV=t=>{if(!t)return;let e=t.map(((e,n)=>e===UM.polygon.NATIVE&&t[n+1]!=UM.polygon.WRAPPED&&t[n-1]!=UM.polygon.WRAPPED?UM.polygon.WRAPPED:e));return e[0]==UM.polygon.NATIVE&&e[1]==UM.polygon.WRAPPED?e.splice(0,1):e[e.length-1]==UM.polygon.NATIVE&&e[e.length-2]==UM.polygon.WRAPPED&&e.splice(e.length-1,1),e},QV=({reserves:t,min:e,token:n,token0:r,token1:i,decimals:o})=>r.toLowerCase()==n.toLowerCase()?t[0].gte(BM(e.toString(),o)):i.toLowerCase()==n.toLowerCase()&&t[1].gte(BM(e.toString(),o)),WV=async t=>{if(1==YV(t).length)return!1;let e=await EH({blockchain:"polygon",address:UV.factory.address,method:"getPair",api:UV.factory.api,cache:36e5,params:YV(t)});if(e==UM.polygon.ZERO)return!1;let[n,r,i]=await Promise.all([EH({blockchain:"polygon",address:e,method:"getReserves",api:UV.pair.api,cache:36e5}),EH({blockchain:"polygon",address:e,method:"token0",api:UV.pair.api,cache:36e5}),EH({blockchain:"polygon",address:e,method:"token1",api:UV.pair.api,cache:36e5})]);if(t.includes(UM.polygon.WRAPPED))return QV({min:1,token:UM.polygon.WRAPPED,decimals:UM.polygon.DECIMALS,reserves:n,token0:r,token1:i});if(t.includes(UM.polygon.USD)){let t=new _V({blockchain:"polygon",address:UM.polygon.USD}),e=await t.decimals();return QV({min:1e3,token:UM.polygon.USD,decimals:e,reserves:n,token0:r,token1:i})}return!0},HV=({path:t,amountIn:e,tokenIn:n,tokenOut:r})=>new Promise((n=>{EH({blockchain:"polygon",address:UV.router.address,method:"getAmountsOut",api:UV.router.api,params:{amountIn:e,path:YV(t)}}).then((t=>{n(t[t.length-1])})).catch((()=>n()))})),GV=({path:t,amountOut:e,block:n})=>new Promise((r=>{EH({blockchain:"polygon",address:UV.router.address,method:"getAmountsIn",api:UV.router.api,params:{amountOut:e,path:YV(t)},block:n}).then((t=>r(t[0]))).catch((()=>r()))}));var qV=new jV(Object.assign(UV,{findPath:async({tokenIn:t,tokenOut:e})=>{if([t,e].includes(UM.polygon.NATIVE)&&[t,e].includes(UM.polygon.WRAPPED))return{path:void 0,fixedPath:void 0};let n;return await WV([t,e])?n=[t,e]:t!=UM.polygon.WRAPPED&&await WV([t,UM.polygon.WRAPPED])&&e!=UM.polygon.WRAPPED&&await WV([e,UM.polygon.WRAPPED])?n=[t,UM.polygon.WRAPPED,e]:t!=UM.polygon.USD&&await WV([t,UM.polygon.USD])&&e!=UM.polygon.WRAPPED&&await WV([UM.polygon.WRAPPED,e])?n=[t,UM.polygon.USD,UM.polygon.WRAPPED,e]:t!=UM.polygon.WRAPPED&&await WV([t,UM.polygon.WRAPPED])&&e!=UM.polygon.USD&&await WV([UM.polygon.USD,e])&&(n=[t,UM.polygon.WRAPPED,UM.polygon.USD,e]),FV([n,"optionalAccess",t=>t.length])&&n[0]==UM.polygon.NATIVE?n.splice(1,0,UM.polygon.WRAPPED):FV([n,"optionalAccess",t=>t.length])&&n[n.length-1]==UM.polygon.NATIVE&&n.splice(n.length-1,0,UM.polygon.WRAPPED),{path:n,fixedPath:YV(n)}},getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>{if(i){if(null==(o=await GV({block:e,path:t,amountOut:i,tokenIn:n,tokenOut:r}))||a&&o.gt(a))return{};void 0===a&&(a=o)}else if(o){if(null==(i=await HV({path:t,amountIn:o,tokenIn:n,tokenOut:r}))||s&&i.lt(s))return{};void 0===s&&(s=i)}else if(s){if(null==(o=await GV({block:e,path:t,amountOut:s,tokenIn:n,tokenOut:r}))||a&&o.gt(a))return{};void 0===a&&(a=o)}else if(a){if(null==(i=await HV({path:t,amountIn:a,tokenIn:n,tokenOut:r}))||s&&i.lt(s))return{};void 0===s&&(s=i)}return{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}},getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>{let l={blockchain:"polygon",from:c,to:UV.router.address,api:UV.router.api};return t[0]===UM.polygon.NATIVE?o||u?(l.method="swapExactETHForTokens",l.value=e.toString(),l.params={amountOutMin:i.toString()}):(a||s)&&(l.method="swapETHForExactTokens",l.value=n.toString(),l.params={amountOut:r.toString()}):t[t.length-1]===UM.polygon.NATIVE?o||u?(l.method="swapExactTokensForETH",l.params={amountIn:e.toString(),amountOutMin:i.toString()}):(a||s)&&(l.method="swapTokensForExactETH",l.params={amountInMax:n.toString(),amountOut:r.toString()}):o||u?(l.method="swapExactTokensForTokens",l.params={amountIn:e.toString(),amountOutMin:i.toString()}):(a||s)&&(l.method="swapTokensForExactTokens",l.params={amountInMax:n.toString(),amountOut:r.toString()}),l.params=Object.assign({},l.params,{path:YV(t),to:c,deadline:Math.round(Date.now()/1e3)+1800}),l}}));const ZV=WW([ZW("status"),ZW("nonce"),ZW("maxOrder"),ZW("depth"),ZW("baseDecimal"),ZW("quoteDecimal"),ZW("state"),ZW("resetFlag"),ZW("minSize"),ZW("volMaxCutRatio"),ZW("amountWaveRatio"),ZW("baseLotSize"),ZW("quoteLotSize"),ZW("minPriceMultiplier"),ZW("maxPriceMultiplier"),ZW("systemDecimalValue"),ZW("minSeparateNumerator"),ZW("minSeparateDenominator"),ZW("tradeFeeNumerator"),ZW("tradeFeeDenominator"),ZW("pnlNumerator"),ZW("pnlDenominator"),ZW("swapFeeNumerator"),ZW("swapFeeDenominator"),ZW("baseNeedTakePnl"),ZW("quoteNeedTakePnl"),ZW("quoteTotalPnl"),ZW("baseTotalPnl"),HW("quoteTotalDeposited"),HW("baseTotalDeposited"),HW("swapBaseInAmount"),HW("swapQuoteOutAmount"),ZW("swapBase2QuoteFee"),HW("swapQuoteInAmount"),HW("swapBaseOutAmount"),ZW("swapQuote2BaseFee"),FW("baseVault"),FW("quoteVault"),FW("baseMint"),FW("quoteMint"),FW("lpMint"),FW("openOrders"),FW("marketId"),FW("marketProgramId"),FW("targetOrders"),FW("withdrawQueue"),FW("lpVault"),FW("owner"),ZW("lpReserve"),IW(ZW(),3,"padding")]),VV=WW([VW("instruction"),VW("simulateType")]),JV=WW([jW(5),jW(8),FW("ownAddress"),ZW("vaultSignerNonce"),FW("baseMint"),FW("quoteMint"),FW("baseVault"),ZW("baseDepositsTotal"),ZW("baseFeesAccrued"),FW("quoteVault"),ZW("quoteDepositsTotal"),ZW("quoteFeesAccrued"),ZW("quoteDustThreshold"),FW("requestQueue"),FW("eventQueue"),FW("bids"),FW("asks"),ZW("baseLotSize"),ZW("quoteLotSize"),ZW("feeRateBps"),ZW("referrerRebatesAccrued"),jW(7)]);var KV={blockchain:"solana",name:"raydium",alternativeNames:[],label:"Raydium",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyNi4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4wIiBpZD0ia2F0bWFuXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNjAwIDQ1MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNjAwIDQ1MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHN0eWxlIHR5cGU9InRleHQ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IQUIDITY_FEES_DENOMINATOR:Wd.from(1e4)}},router:{v1:{address:"routeUGWgWzqBWFcrCfv8tritsqukccJPu3q5GPP3xS"}},market:{v3:{address:"9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin",api:JV}},slippage:!0};const XV=1,$V=6;let tJ=async(t,e)=>await EH(`solana://${KV.pair.v4.address}/getProgramAccounts`,{params:{filters:[{dataSize:KV.pair.v4.api.span},{memcmp:{offset:400,bytes:t}},{memcmp:{offset:432,bytes:e}}]},api:KV.pair.v4.api,cache:36e5}),eJ=async(t,e)=>{try{let n=await tJ(t,e);return 0==n.length&&(n=await tJ(e,t)),n}catch(t){return console.log(t),[]}},nJ=async(t,e)=>{let n=await eJ(t,e);return 1==n.length?n[0]:n.length<1?null:n.reduce(((t,e)=>{if(![XV,$V].includes(e.data.status.toNumber()))return;let n=e.data.lpReserve;return t.data.lpReserve.gte(n)?t:e}))},rJ=async(t,e)=>(await eJ(t,e)).length>0;function iJ(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}const oJ=UM.solana.NATIVE,aJ=UM.solana.WRAPPED,sJ=UM.solana.USD;let uJ=t=>{if(!t)return;let e=t.map(((e,n)=>e===oJ&&t[n+1]!=aJ&&t[n-1]!=aJ?aJ:e));return e[0]==oJ&&e[1]==aJ?e.splice(0,1):e[e.length-1]==oJ&&e[e.length-2]==aJ&&e.splice(e.length-1,1),e},cJ=async t=>1!=t.length&&(t=uJ(t),!(!await rJ(t[0],t[1])&&!await rJ(t[1],t[0])));const lJ=async t=>await EH({blockchain:"solana",address:t,api:KV.market.v3.api,cache:36e5}),hJ=async t=>{const e=PW.alloc(VV.span);VV.encode({instruction:12,simulateType:0},e);const n=await lJ(t.data.marketId.toString()),r=[{pubkey:t.pubkey,isWritable:!1,isSigner:!1},{pubkey:new JU(KV.pair.v4.authority),isWritable:!1,isSigner:!1},{pubkey:t.data.openOrders,isWritable:!1,isSigner:!1},{pubkey:t.data.baseVault,isWritable:!1,isSigner:!1},{pubkey:t.data.quoteVault,isWritable:!1,isSigner:!1},{pubkey:t.data.lpMint,isWritable:!1,isSigner:!1},{pubkey:t.data.marketId,isWritable:!1,isSigner:!1},{pubkey:n.eventQueue,isWritable:!1,isSigner:!1}],i=new dF({programId:new JU(KV.pair.v4.address),keys:r,data:e}),o=new JU("RaydiumSimuLateTransaction11111111111111111");let a,s=new fF({feePayer:o});s.add(i);const u=await AH("solana");try{a=await u.simulateTransaction(s)}catch(t){}let c;if(a&&a.value&&a.value.logs){let t=a.value.logs.find((t=>t.match("GetPoolData:")));t&&(c=JSON.parse(t.replace(/.*GetPoolData:\s/,"")))}return c};let dJ=async({path:t,amountIn:e})=>{let n=[e];return await Promise.all(t.map((async(e,r)=>{const i=t[r+1];if(null==i)return;const o=await nJ(e,i),a=await hJ(o),s=o.data.baseMint.toString(),u=[Wd.from(a.pool_coin_amount),Wd.from(a.pool_pc_amount)],[c,l]=s==e?[u[0],u[1]]:[u[1],u[0]],h=n[r].mul(KV.pair.v4.LIQUIDITY_FEES_NUMERATOR).div(KV.pair.v4.LIQUIDITY_FEES_DENOMINATOR),d=n[r].sub(h),f=c.add(d),p=l.mul(d).div(f);n.push(p)}))),n},fJ=async({path:t,amountOut:e})=>{t=t.slice().reverse();let n=[e];return await Promise.all(t.map((async(e,r)=>{const i=t[r+1];if(null==i)return;const o=await nJ(e,i),a=await hJ(o);o.pubkey.toString();const s=o.data.baseMint.toString();o.data.quoteMint.toString();const u=[Wd.from(a.pool_coin_amount),Wd.from(a.pool_pc_amount)],[c,l]=s==e?[u[1],u[0]]:[u[0],u[1]],h=l.sub(n[r]),d=c.mul(n[r]).div(h).mul(KV.pair.v4.LIQUIDITY_FEES_DENOMINATOR).div(KV.pair.v4.LIQUIDITY_FEES_DENOMINATOR.sub(KV.pair.v4.LIQUIDITY_FEES_NUMERATOR));n.push(d)}))),n.slice().reverse()};const pJ=({pair:t,amountIn:e,amountOutMin:n,amountOut:r,amountInMax:i,fix:o})=>{let a,s;return"in"===o?(a=WW([VW("instruction"),ZW("amountIn"),ZW("minAmountOut")]),s=PW.alloc(a.span),a.encode({instruction:9,amountIn:new zW(e.toString()),minAmountOut:new zW(n.toString())},s)):"out"===o&&(a=WW([VW("instruction"),ZW("maxAmountIn"),ZW("amountOut")]),s=PW.alloc(a.span),a.encode({instruction:11,maxAmountIn:new zW(i.toString()),amountOut:new zW(r.toString())},s)),s},mJ=async({tokenIn:t,tokenInAccount:e,tokenOut:n,tokenOutAccount:r,pair:i,market:o,fromAddress:a})=>{e||(e=await _V.solana.findAccount({owner:a,token:t})),e||(e=await _V.solana.findProgramAddress({owner:a,token:t})),r||(r=await _V.solana.findAccount({owner:a,token:n})),r||(r=await _V.solana.findProgramAddress({owner:a,token:n}));let s=await(async(t,e)=>{const n=[e.toBuffer()];let r,i=0;for(;i<100;){try{const e=n.concat(PW.from([i]),PW.alloc(7));r=await JU.createProgramAddress(e,t)}catch(t){if(t instanceof TypeError)throw t;i++;continue}return r}})(i.data.marketProgramId,i.data.marketId);return[{pubkey:new JU(_V.solana.TOKEN_PROGRAM),isWritable:!1,isSigner:!1},{pubkey:i.pubkey,isWritable:!0,isSigner:!1},{pubkey:new JU(KV.pair.v4.authority),isWritable:!1,isSigner:!1},{pubkey:i.data.openOrders,isWritable:!0,isSigner:!1},{pubkey:i.data.targetOrders,isWritable:!0,isSigner:!1},{pubkey:i.data.baseVault,isWritable:!0,isSigner:!1},{pubkey:i.data.quoteVault,isWritable:!0,isSigner:!1},{pubkey:i.data.marketProgramId,isWritable:!1,isSigner:!1},{pubkey:i.data.marketId,isWritable:!0,isSigner:!1},{pubkey:o.bids,isWritable:!0,isSigner:!1},{pubkey:o.asks,isWritable:!0,isSigner:!1},{pubkey:o.eventQueue,isWritable:!0,isSigner:!1},{pubkey:o.baseVault,isWritable:!0,isSigner:!1},{pubkey:o.quoteVault,isWritable:!0,isSigner:!1},{pubkey:s,isWritable:!1,isSigner:!1},{pubkey:new JU(e),isWritable:!0,isSigner:!1},{pubkey:new JU(r),isWritable:!0,isSigner:!1},{pubkey:new JU(a),isWritable:!1,isSigner:!0}]};var yJ=new jV(Object.assign(KV,{findPath:async({tokenIn:t,tokenOut:e})=>{if([t,e].includes(oJ)&&[t,e].includes(aJ))return{path:void 0,fixedPath:void 0};let n;return await cJ([t,e])?n=[t,e]:t!=aJ&&t!=oJ&&await cJ([t,aJ])&&e!=aJ&&e!=oJ&&await cJ([e,aJ])?n=[t,aJ,e]:t!=sJ&&await cJ([t,sJ])&&e!=sJ&&await cJ([e,sJ])&&(n=[t,sJ,e]),iJ([n,"optionalAccess",t=>t.length])&&n[0]==oJ?n.splice(1,0,aJ):iJ([n,"optionalAccess",t=>t.length])&&n[n.length-1]==oJ&&n.splice(n.length-1,0,aJ),{path:n,fixedPath:uJ(n)}},getAmounts:async({path:t,tokenIn:e,tokenOut:n,amountOut:r,amountIn:i,amountInMax:o,amountOutMin:a})=>{let s;if(t=uJ(t),r){if(s=await fJ({path:t,amountOut:r,tokenIn:e,tokenOut:n}),null==(i=s?s[0]:void 0)||o&&i.gt(o))return{};void 0===o&&(o=i)}else if(i){if(s=await dJ({path:t,amountIn:i,tokenIn:e,tokenOut:n}),null==(r=s?s[s.length-1]:void 0)||a&&r.lt(a))return{};void 0===a&&(a=r)}else if(a){if(s=await fJ({path:t,amountOut:a,tokenIn:e,tokenOut:n}),null==(i=s?s[0]:void 0)||o&&i.gt(o))return{};void 0===o&&(o=i)}else if(o){if(s=await dJ({path:t,amountIn:o,tokenIn:e,tokenOut:n}),null==(r=s?s[s.length-1]:void 0)||a&&r.lt(a))return{};void 0===a&&(a=r)}return{amountOut:r||a,amountIn:i||o,amountInMax:o||i,amountOutMin:a||r,amounts:s}},getTransaction:async({exchange:t,path:e,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o,amounts:a,amountInInput:s,amountOutInput:u,amountInMaxInput:c,amountOutMinInput:l,fromAddress:h})=>{let d={blockchain:"solana"},f=[];const p=uJ(e);if(p.length>3)throw"Raydium can only handle fixed paths with a max length of 3!";const m=p[0],y=3==p.length?p[1]:void 0,g=p[p.length-1];let b,v,w;2==p.length?(b=[await nJ(m,g)],v=[await lJ(b[0].data.marketId.toString())]):(b=[await nJ(m,y),await nJ(y,g)],v=[await lJ(b[0].data.marketId.toString()),await lJ(b[1].data.marketId.toString())],w=a[1]);let M,_=e[0]===UM.solana.NATIVE&&p[0]===UM.solana.WRAPPED,E=e[e.length-1]===UM.solana.NATIVE&&p[p.length-1]===UM.solana.WRAPPED;const A=await AH("solana");if(_||E){const t=await A.getMinimumBalanceForRentExemption(_V.solana.TOKEN_LAYOUT.span);M=_Q.generate().publicKey.toString();const e=_?new zW(n.toString()).add(new zW(t)):new zW(t);f.push(DF.createAccount({fromPubkey:new JU(h),newAccountPubkey:new JU(M),programId:new JU(_V.solana.TOKEN_PROGRAM),space:_V.solana.TOKEN_LAYOUT.span,lamports:e})),f.push(_V.solana.initializeAccountInstruction({account:M,token:UM.solana.WRAPPED,owner:h}))}return(await Promise.all(b.map((async(t,e)=>{let a=v[e],u=m,c=g,d=n||r,f=r||n,p=i||o,A=o||i,S=s||l?"in":"out",k=_?M:void 0,N=E?M:void 0;return 2===b.length&&0===e?(u=m,c=y,p=A=w,S="out",M&&(N=M)):2===b.length&&1===e&&(u=y,c=g,d=f=w,S="in",M&&(k=M)),new dF({programId:new JU(KV.pair.v4.address),keys:await mJ({tokenIn:u,tokenInAccount:k,tokenOut:c,tokenOutAccount:N,pair:t,market:a,fromAddress:h}),data:pJ({pair:t,amountIn:d,amountOutMin:A,amountOut:p,amountInMax:f,fix:S})})})))).forEach((t=>f.push(t))),(_||E)&&f.push(_V.solana.closeAccountInstruction({account:M,owner:h})),d.instructions=f,d}}));var gJ={blockchain:"ethereum",name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NzIgMjUyLjgwNyAyNjAuOTM4IDI0OC41NTIgMjYyLjI0NFpNMjY2LjM2NCAyNzYuMTcyQzI2OC43MTQgMjcyLjgzNCAyNjcuNjg2IDI2OS4yMjUgMjYzLjY5IDI2Ni43ODVDMjU2LjA4IDI2Mi4xMzggMjQ0LjU3MSAyNjUuOTgzIDI0NC41NzEgMjczLjE3M0MyNDQuNTcxIDI3Ni43NTIgMjUwLjU3MiAyODAuNjU2IDI1Ni4wNzQgMjgwLjY1NkMyNTkuNzM1IDI4MC42NTYgMjY0Ljc0NiAyNzguNDczIDI2Ni4zNjQgMjc2LjE3MloiIGZpbGw9IiNGRjAwN0EiLz4KPC9zdmc+Cg==",router:{address:"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",api:[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"amountADesired",type:"uint256"},{internalType:"uint256",name:"amountBDesired",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountTokenDesired",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountIn",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountOut",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsIn",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsOut",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"reserveA",type:"uint256"},{internalType:"uint256",name:"reserveB",type:"uint256"}],name:"quote",outputs:[{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETHSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermit",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityWithPermit",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapETHForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETHSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]},factory:{address:"0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",api:[{inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!1,internalType:"address",name:"pair",type:"address"},{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"PairCreated",type:"event"},{constant:!0,inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"allPairs",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"allPairsLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"}],name:"createPair",outputs:[{internalType:"address",name:"pair",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"feeTo",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"feeToSetter",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"getPair",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeTo",type:"address"}],name:"setFeeTo",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],name:"setFeeToSetter",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},pair:{api:[{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount0Out",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1Out",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint112",name:"reserve0",type:"uint112"},{indexed:!1,internalType:"uint112",name:"reserve1",type:"uint112"}],name:"Sync",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"MINIMUM_LIQUIDITY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getReserves",outputs:[{internalType:"uint112",name:"_reserve0",type:"uint112"},{internalType:"uint112",name:"_reserve1",type:"uint112"},{internalType:"uint32",name:"_blockTimestampLast",type:"uint32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_token0",type:"address"},{internalType:"address",name:"_token1",type:"address"}],name:"initialize",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"kLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[{internalType:"uint256",name:"liquidity",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"price0CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"price1CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"skim",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"amount0Out",type:"uint256"},{internalType:"uint256",name:"amount1Out",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"sync",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}]},slippage:!0};function bJ(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}let vJ=t=>{if(!t)return;let e=t.map(((e,n)=>e===UM.ethereum.NATIVE&&t[n+1]!=UM.ethereum.WRAPPED&&t[n-1]!=UM.ethereum.WRAPPED?UM.ethereum.WRAPPED:e));return e[0]==UM.ethereum.NATIVE&&e[1]==UM.ethereum.WRAPPED?e.splice(0,1):e[e.length-1]==UM.ethereum.NATIVE&&e[e.length-2]==UM.ethereum.WRAPPED&&e.splice(e.length-1,1),e},wJ=({reserves:t,min:e,token:n,token0:r,token1:i,decimals:o})=>r.toLowerCase()==n.toLowerCase()?t[0].gte(BM(e.toString(),o)):i.toLowerCase()==n.toLowerCase()&&t[1].gte(BM(e.toString(),o)),MJ=async t=>{if(1==vJ(t).length)return!1;let e=await EH({blockchain:"ethereum",address:gJ.factory.address,method:"getPair",api:gJ.factory.api,cache:36e5,params:vJ(t)});if(e==UM.ethereum.ZERO)return!1;let[n,r,i]=await Promise.all([EH({blockchain:"ethereum",address:e,method:"getReserves",api:gJ.pair.api,cache:36e5}),EH({blockchain:"ethereum",address:e,method:"token0",api:gJ.pair.api,cache:36e5}),EH({blockchain:"ethereum",address:e,method:"token1",api:gJ.pair.api,cache:36e5})]);if(t.includes(UM.ethereum.WRAPPED))return wJ({min:1,token:UM.ethereum.WRAPPED,decimals:UM.ethereum.DECIMALS,reserves:n,token0:r,token1:i});if(t.includes(UM.ethereum.USD)){let t=new _V({blockchain:"ethereum",address:UM.ethereum.USD}),e=await t.decimals();return wJ({min:1e3,token:UM.ethereum.USD,decimals:e,reserves:n,token0:r,token1:i})}return!0},_J=({path:t,amountIn:e,tokenIn:n,tokenOut:r})=>new Promise((n=>{EH({blockchain:"ethereum",address:gJ.router.address,method:"getAmountsOut",api:gJ.router.api,params:{amountIn:e,path:vJ(t)}}).then((t=>{n(t[t.length-1])})).catch((()=>n()))})),EJ=({path:t,amountOut:e,block:n})=>new Promise((r=>{EH({blockchain:"ethereum",address:gJ.router.address,method:"getAmountsIn",api:gJ.router.api,params:{amountOut:e,path:vJ(t)},block:n}).then((t=>r(t[0]))).catch((()=>r()))}));var AJ=new jV(Object.assign(gJ,{findPath:async({tokenIn:t,tokenOut:e})=>{if([t,e].includes(UM.ethereum.NATIVE)&&[t,e].includes(UM.ethereum.WRAPPED))return{path:void 0,fixedPath:void 0};let n;return await MJ([t,e])?n=[t,e]:t!=UM.ethereum.WRAPPED&&await MJ([t,UM.ethereum.WRAPPED])&&e!=UM.ethereum.WRAPPED&&await MJ([e,UM.ethereum.WRAPPED])?n=[t,UM.ethereum.WRAPPED,e]:t!=UM.ethereum.USD&&await MJ([t,UM.ethereum.USD])&&e!=UM.ethereum.WRAPPED&&await MJ([UM.ethereum.WRAPPED,e])?n=[t,UM.ethereum.USD,UM.ethereum.WRAPPED,e]:t!=UM.ethereum.WRAPPED&&await MJ([t,UM.ethereum.WRAPPED])&&e!=UM.ethereum.USD&&await MJ([UM.ethereum.USD,e])&&(n=[t,UM.ethereum.WRAPPED,UM.ethereum.USD,e]),bJ([n,"optionalAccess",t=>t.length])&&n[0]==UM.ethereum.NATIVE?n.splice(1,0,UM.ethereum.WRAPPED):bJ([n,"optionalAccess",t=>t.length])&&n[n.length-1]==UM.ethereum.NATIVE&&n.splice(n.length-1,0,UM.ethereum.WRAPPED),{path:n,fixedPath:vJ(n)}},getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>{if(i){if(null==(o=await EJ({block:e,path:t,amountOut:i,tokenIn:n,tokenOut:r}))||a&&o.gt(a))return{};void 0===a&&(a=o)}else if(o){if(null==(i=await _J({path:t,amountIn:o,tokenIn:n,tokenOut:r}))||s&&i.lt(s))return{};void 0===s&&(s=i)}else if(s){if(null==(o=await EJ({block:e,path:t,amountOut:s,tokenIn:n,tokenOut:r}))||a&&o.gt(a))return{};void 0===a&&(a=o)}else if(a){if(null==(i=await _J({path:t,amountIn:a,tokenIn:n,tokenOut:r}))||s&&i.lt(s))return{};void 0===s&&(s=i)}return{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}},getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>{let l={blockchain:"ethereum",from:c,to:gJ.router.address,api:gJ.router.api};return t[0]===UM.ethereum.NATIVE?o||u?(l.method="swapExactETHForTokens",l.value=e.toString(),l.params={amountOutMin:i.toString()}):(a||s)&&(l.method="swapETHForExactTokens",l.value=n.toString(),l.params={amountOut:r.toString()}):t[t.length-1]===UM.ethereum.NATIVE?o||u?(l.method="swapExactTokensForETH",l.params={amountIn:e.toString(),amountOutMin:i.toString()}):(a||s)&&(l.method="swapTokensForExactETH",l.params={amountInMax:n.toString(),amountOut:r.toString()}):o||u?(l.method="swapExactTokensForTokens",l.params={amountIn:e.toString(),amountOutMin:i.toString()}):(a||s)&&(l.method="swapTokensForExactTokens",l.params={amountInMax:n.toString(),amountOut:r.toString()}),l.params=Object.assign({},l.params,{path:vJ(t),to:c,deadline:Math.round(Date.now()/1e3)+1800}),l}}));var SJ={blockchain:"velas",name:"wagyuswap",alternativeNames:[],label:"Wagy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jA4LDEuMDYsNy4yMS0yLDEwLjI5LTgsMTQuMS0xMC4zNSwxLjktMS4xOSwxMi05LjMxLDI0LjExLTEuNDZBNDIuMDYsNDIuMDYsMCwwLDAsMTE3LjI4LDk2LjQ1WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIyLjM3IC0xMC43OSkiIGZpbGw9IiNmNGVhZTYiLz48L2c+PC9zdmc+",router:{address:"0x3D1c58B6d4501E34DF37Cf0f664A58059a188F00",api:[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"amountADesired",type:"uint256"},{internalType:"uint256",name:"amountBDesired",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountTokenDesired",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountIn",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountOut",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsIn",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsOut",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"reserveA",type:"uint256"},{internalType:"uint256",name:"reserveB",type:"uint256"}],name:"quote",outputs:[{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETHSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermit",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityWithPermit",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapETHForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETHSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]},factory:{address:"0x69f3212344a38b35844cce4864c2af9c717f35e3",api:[{inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!1,internalType:"address",name:"pair",type:"address"},{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"PairCreated",type:"event"},{constant:!0,inputs:[],name:"INIT_CODE_PAIR_HASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"allPairs",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"allPairsLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"}],name:"createPair",outputs:[{internalType:"address",name:"pair",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"feeTo",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"feeToSetter",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"getPair",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeTo",type:"address"}],name:"setFeeTo",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],name:"setFeeToSetter",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},pair:{api:[{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount0Out",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1Out",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint112",name:"reserve0",type:"uint112"},{indexed:!1,internalType:"uint112",name:"reserve1",type:"uint112"}],name:"Sync",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"MINIMUM_LIQUIDITY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getReserves",outputs:[{internalType:"uint112",name:"_reserve0",type:"uint112"},{internalType:"uint112",name:"_reserve1",type:"uint112"},{internalType:"uint32",name:"_blockTimestampLast",type:"uint32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_token0",type:"address"},{internalType:"address",name:"_token1",type:"address"}],name:"initialize",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"kLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[{internalType:"uint256",name:"liquidity",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"price0CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"price1CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"skim",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"amount0Out",type:"uint256"},{internalType:"uint256",name:"amount1Out",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"sync",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}]},slippage:!0};function kJ(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}let NJ=t=>{if(!t)return;let e=t.map(((e,n)=>e===UM.velas.NATIVE&&t[n+1]!=UM.velas.WRAPPED&&t[n-1]!=UM.velas.WRAPPED?UM.velas.WRAPPED:e));return e[0]==UM.velas.NATIVE&&e[1]==UM.velas.WRAPPED?e.splice(0,1):e[e.length-1]==UM.velas.NATIVE&&e[e.length-2]==UM.velas.WRAPPED&&e.splice(e.length-1,1),e},TJ=({reserves:t,min:e,token:n,token0:r,token1:i,decimals:o})=>r.toLowerCase()==n.toLowerCase()?t[0].gte(BM(e.toString(),o)):i.toLowerCase()==n.toLowerCase()&&t[1].gte(BM(e.toString(),o)),xJ=async t=>{if(1==NJ(t).length)return!1;let e=await EH({blockchain:"velas",address:SJ.factory.address,method:"getPair",api:SJ.factory.api,cache:36e5,params:NJ(t)});if(e==UM.velas.ZERO)return!1;let[n,r,i]=await Promise.all([EH({blockchain:"velas",address:e,method:"getReserves",api:SJ.pair.api,cache:36e5}),EH({blockchain:"velas",address:e,method:"token0",api:SJ.pair.api,cache:36e5}),EH({blockchain:"velas",address:e,method:"token1",api:SJ.pair.api,cache:36e5})]);if(t.includes(UM.velas.WRAPPED))return TJ({min:1,token:UM.velas.WRAPPED,decimals:UM.velas.DECIMALS,reserves:n,token0:r,token1:i});if(t.includes(UM.velas.USD)){let t=new _V({blockchain:"velas",address:UM.velas.USD}),e=await t.decimals();return TJ({min:1e3,token:UM.velas.USD,decimals:e,reserves:n,token0:r,token1:i})}return!0},LJ=({path:t,amountIn:e,tokenIn:n,tokenOut:r})=>new Promise((n=>{EH({blockchain:"velas",address:SJ.router.address,method:"getAmountsOut",api:SJ.router.api,params:{amountIn:e,path:NJ(t)}}).then((t=>{n(t[t.length-1])})).catch((()=>n()))})),IJ=({path:t,amountOut:e,block:n})=>new Promise((r=>{EH({blockchain:"velas",address:SJ.router.address,method:"getAmountsIn",api:SJ.router.api,params:{amountOut:e,path:NJ(t)},block:n}).then((t=>r(t[0]))).catch((()=>r()))}));var jJ=new jV(Object.assign(SJ,{findPath:async({tokenIn:t,tokenOut:e})=>{if([t,e].includes(UM.velas.NATIVE)&&[t,e].includes(UM.velas.WRAPPED))return{path:void 0,fixedPath:void 0};let n;return await xJ([t,e])?n=[t,e]:t!=UM.velas.WRAPPED&&await xJ([t,UM.velas.WRAPPED])&&e!=UM.velas.WRAPPED&&await xJ([e,UM.velas.WRAPPED])?n=[t,UM.velas.WRAPPED,e]:t!=UM.velas.USD&&await xJ([t,UM.velas.USD])&&e!=UM.velas.WRAPPED&&await xJ([UM.velas.WRAPPED,e])?n=[t,UM.velas.USD,UM.velas.WRAPPED,e]:t!=UM.velas.WRAPPED&&await xJ([t,UM.velas.WRAPPED])&&e!=UM.velas.USD&&await xJ([UM.velas.USD,e])&&(n=[t,UM.velas.WRAPPED,UM.velas.USD,e]),kJ([n,"optionalAccess",t=>t.length])&&n[0]==UM.velas.NATIVE?n.splice(1,0,UM.velas.WRAPPED):kJ([n,"optionalAccess",t=>t.length])&&n[n.length-1]==UM.velas.NATIVE&&n.splice(n.length-1,0,UM.velas.WRAPPED),{path:n,fixedPath:NJ(n)}},getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>{if(i){if(null==(o=await IJ({block:e,path:t,amountOut:i,tokenIn:n,tokenOut:r}))||a&&o.gt(a))return{};void 0===a&&(a=o)}else if(o){if(null==(i=await LJ({path:t,amountIn:o,tokenIn:n,tokenOut:r}))||s&&i.lt(s))return{};void 0===s&&(s=i)}else if(s){if(null==(o=await IJ({block:e,path:t,amountOut:s,tokenIn:n,tokenOut:r}))||a&&o.gt(a))return{};void 0===a&&(a=o)}else if(a){if(null==(i=await LJ({path:t,amountIn:a,tokenIn:n,tokenOut:r}))||s&&i.lt(s))return{};void 0===s&&(s=i)}return{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}},getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>{let l={blockchain:"velas",from:c,to:SJ.router.address,api:SJ.router.api};return t[0]===UM.velas.NATIVE?o||u?(l.method="swapExactETHForTokens",l.value=e.toString(),l.params={amountOutMin:i.toString()}):(a||s)&&(l.method="swapETHForExactTokens",l.value=n.toString(),l.params={amountOut:r.toString()}):t[t.length-1]===UM.velas.NATIVE?o||u?(l.method="swapExactTokensForETH",l.params={amountIn:e.toString(),amountOutMin:i.toString()}):(a||s)&&(l.method="swapTokensForExactETH",l.params={amountInMax:n.toString(),amountOut:r.toString()}):o||u?(l.method="swapExactTokensForTokens",l.params={amountIn:e.toString(),amountOutMin:i.toString()}):(a||s)&&(l.method="swapTokensForExactTokens",l.params={amountInMax:n.toString(),amountOut:r.toString()}),l.params=Object.assign({},l.params,{path:NJ(t),to:c,deadline:Math.round(Date.now()/1e3)+1800}),l}}));var CJ={blockchain:"bsc",name:"wbnb",alternativeNames:[],label:"Wrapped BNB",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcn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BNODAuNiw1Ni40bDE1LjQsOWwxNS40LTlMOTYsNDcuNUM5Niw0Ny40LDgwLjYsNTYuNCw4MC42LDU2LjRMODAuNiw1Ni40eiBNNDMuMSw2NS40bDE1LjQtOWwtMTUuNC05bC0xNS40LDl2MThsMTUuNCw5TDQzLjEsNjUuNAoJTDQzLjEsNjUuNHogTTQzLjEsOTUuOUwyNy43LDg3djQ4LjVsNDIsMjQuMnYtMThsLTI2LjYtMTUuM1Y5NS45TDQzLjEsOTUuOXoiLz4KPC9zdmc+Cg==",wrapper:{address:UM.bsc.WRAPPED,api:[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"guy",type:"address"},{name:"wad",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"src",type:"address"},{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"},{name:"",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"guy",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Withdrawal",type:"event"}]}};var DJ=new jV(Object.assign(CJ,{findPath:async({tokenIn:t,tokenOut:e})=>{if(![t,e].includes(UM.bsc.NATIVE)||![t,e].includes(UM.bsc.WRAPPED))return{path:void 0,fixedPath:void 0};let n=[t,e];return{path:n,fixedPath:n}},getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>(i?o=a=s=i:o?i=a=s=o:s?o=a=i=s:a&&(i=s=o=a),{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>{let l={blockchain:"bsc",from:c,to:CJ.wrapper.address,api:CJ.wrapper.api};return t[0]===UM.bsc.NATIVE&&t[1]===UM.bsc.WRAPPED?(l.method="deposit",l.value=e.toString(),l):t[0]===UM.bsc.WRAPPED&&t[1]===UM.bsc.NATIVE?(l.method="withdraw",l.value=0,l.params={wad:e},l):void 0}}));var OJ={blockchain:"ethereum",name:"weth",alternativeNames:[],label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94b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iIgZD0iTTE0MS43LDE5OS40bC0wLjgsMS4xdjU0LjZsMC44LDIuNWw3MS4yLTEwMC4zTDE0MS43LDE5OS40eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNTcuNnYtNTguMmwtNzEuMS00Mi4xTDE0MS43LDI1Ny42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",wrapper:{address:UM.ethereum.WRAPPED,api:[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"guy",type:"address"},{name:"wad",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"src",type:"address"},{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"},{name:"",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"guy",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Withdrawal",type:"event"}]}};var PJ=new jV(Object.assign(OJ,{findPath:async({tokenIn:t,tokenOut:e})=>{if(![t,e].includes(UM.ethereum.NATIVE)||![t,e].includes(UM.ethereum.WRAPPED))return{path:void 0,fixedPath:void 0};let n=[t,e];return{path:n,fixedPath:n}},getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>(i?o=a=s=i:o?i=a=s=o:s?o=a=i=s:a&&(i=s=o=a),{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>{let l={blockchain:"ethereum",from:c,to:OJ.wrapper.address,api:OJ.wrapper.api};return t[0]===UM.ethereum.NATIVE&&t[1]===UM.ethereum.WRAPPED?(l.method="deposit",l.value=e.toString(),l):t[0]===UM.ethereum.WRAPPED&&t[1]===UM.ethereum.NATIVE?(l.method="withdraw",l.value=0,l.params={wad:e},l):void 0}}));var zJ={blockchain:"polygon",name:"wmatic",alternativeNames:[],label:"Wrapped MATIC",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA0NS40IDQ1LjQiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ1LjQgNDUuNDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiM4MjQ3RTU7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMzEuOSwxNi42Yy0wLjctMC40LTEuNi0wLjQtMi4yLDBsLTUuMywzLjFsLTMuNSwybC01LjEsMy4xYy0wLjcsMC40LTEuNiwwLjQtMi4yLDBsLTQtMi40CgljLTAuNi0wLjQtMS4xLTEuMS0xLjEtMnYtNC42YzAtMC45LDAuNS0xLjYsMS4xLTJsNC0yLjNjMC43LTAuNCwxLjUtMC40LDIuMiwwbDQsMi40YzAuNywwLjQsMS4xLDEuMSwxLjEsMnYzLjFsMy41LTIuMXYtMy4yCgljMC0wLjktMC40LTEuNi0xLjEtMmwtNy41LTQuNGMtMC43LTAuNC0xLjUtMC40LTIuMiwwTDYsMTEuN2MtMC43LDAuNC0xLjEsMS4xLTEuMSwxLjh2OC43YzAsMC45LDAuNCwxLjYsMS4xLDJsNy42LDQuNAoJYzAuNywwLjQsMS41LDAuNCwyLjIsMGw1LjEtMi45bDMuNS0yLjFsNS4xLTIuOWMwLjctMC40LDEuNi0wLjQsMi4yLDBsNCwyLjNjMC43LDAuNCwxLjEsMS4xLDEuMSwydjQuNmMwLDAuOS0wLjQsMS42LTEuMSwyCglsLTMuOSwyLjNjLTAuNywwLjQtMS41LDAuNC0yLjIsMGwtNC0yLjNjLTAuNy0wLjQtMS4xLTEuMS0xLjEtMnYtMi45TDIxLDI4Ljd2My4xYzAsMC45LDAuNCwxLjYsMS4xLDJsNy41LDQuNAoJYzAuNywwLjQsMS41LDAuNCwyLjIsMGw3LjUtNC40YzAuNy0wLjQsMS4xLTEuMSwxLjEtMlYyM2MwLTAuOS0wLjQtMS42LTEuMS0yQzM5LjIsMjEsMzEuOSwxNi42LDMxLjksMTYuNnoiLz4KPC9zdmc+Cg==",wrapper:{address:UM.polygon.WRAPPED,api:[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"guy",type:"address"},{name:"wad",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"src",type:"address"},{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"},{name:"",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"guy",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Withdrawal",type:"event"}]}};var RJ=new jV(Object.assign(zJ,{findPath:async({tokenIn:t,tokenOut:e})=>{if(![t,e].includes(UM.polygon.NATIVE)||![t,e].includes(UM.polygon.WRAPPED))return{path:void 0,fixedPath:void 0};let n=[t,e];return{path:n,fixedPath:n}},getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>(i?o=a=s=i:o?i=a=s=o:s?o=a=i=s:a&&(i=s=o=a),{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>{let l={blockchain:"polygon",from:c,to:zJ.wrapper.address,api:zJ.wrapper.api};return t[0]===UM.polygon.NATIVE&&t[1]===UM.polygon.WRAPPED?(l.method="deposit",l.value=e.toString(),l):t[0]===UM.polygon.WRAPPED&&t[1]===UM.polygon.NATIVE?(l.method="withdraw",l.value=0,l.params={wad:e},l):void 0}}));var BJ={blockchain:"velas",name:"wvlx",alternativeNames:[],label:"Wrapped Velas",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIKCSBpZD0iTGF5ZXJfMSIgdGV4dC1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iIGltYWdlLXJlbmRlcmluZz0ib3B0aW1pemVRdWFsaXR5IgoJIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDUuNCA0NS40IgoJIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ1LjQgNDUuNDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiMwMDM3QzE7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjguOCwyMi44bC02LjEsMTAuNmwtNi4xLTEwLjdMMjguOCwyMi44TDI4LjgsMjIuOHogTTM0LjksMTkuMkgxMC41bDEyLjIsMjEuNEwzNC45LDE5LjJ6IE02LjUsMTIuMWwyLDMuNgoJaDI4LjNsMi4xLTMuNkg2LjV6Ii8+Cjwvc3ZnPgo=",wrapper:{address:UM.velas.WRAPPED,api:[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"guy",type:"address"},{name:"wad",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"src",type:"address"},{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"},{name:"",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"guy",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Withdrawal",type:"event"}]}};let UJ={ethereum:[AJ,PJ],bsc:[BV,DJ],polygon:[qV,RJ],solana:[yJ],velas:[jJ,new jV(Object.assign(BJ,{findPath:async({tokenIn:t,tokenOut:e})=>{if(![t,e].includes(UM.velas.NATIVE)||![t,e].includes(UM.velas.WRAPPED))return{path:void 0,fixedPath:void 0};let n=[t,e];return{path:n,fixedPath:n}},getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>(i?o=a=s=i:o?i=a=s=o:s?o=a=i=s:a&&(i=s=o=a),{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amountInInput:o,amountOutInput:a,amountInMaxInput:s,amountOutMinInput:u,fromAddress:c})=>{let l={blockchain:"velas",from:c,to:BJ.wrapper.address,api:BJ.wrapper.api};return t[0]===UM.velas.NATIVE&&t[1]===UM.velas.WRAPPED?(l.method="deposit",l.value=e.toString(),l):t[0]===UM.velas.WRAPPED&&t[1]===UM.velas.NATIVE?(l.method="withdraw",l.value=0,l.params={wad:e},l):void 0}}))]},FJ=({blockchain:t,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a,amountOutMax:s,amountInMin:u})=>Promise.all(UJ[t].map((t=>t.route({tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a,amountOutMax:s,amountInMin:u})))).then((t=>t.filter(Boolean)));var YJ=function(t){var e=function(t){return!t.every((function(t){return void 0!==t.amount||void 0!==t.fromAmount}))},r=G.useContext(sq),i=r.amount;r.toAmount;var o,a=r.recover,s=h(G.useState(null==a&&e(t.accept)),2),u=s[0],c=s[1],l=G.useContext(pq).account,d=G.useContext(uq),f=d.conversionRate,p=d.fixedCurrencyConversionRate,m=G.useContext(PG).setError,y=h(G.useState(),2),g=y[0],b=y[1],v=h(G.useState("object"==n(i)&&i.fix&&i.currency?i.fix:null),1)[0],w=h(G.useState("object"==n(i)&&i.fix&&i.currency?i.currency:null),1)[0];u&&(o="object"==n(i)&&i.start&&i.start?i.start:"object"==n(i)&&i.fix?i.fix:1);var M=h(G.useState(o),2),_=M[0],E=M[1],A=h(G.useState(),2),S=A[0],k=A[1],N=h(G.useState(),2),T=N[0],x=N[1];G.useEffect((function(){a||c(e(t.accept))}),[t.accept,a]);var L=function(e){var n=e.amount,r=e.conversionRate,o=e.fixedCurrencyConversionRate;return new Promise((function(e,a){i&&i.token?e(t.accept.map((function(){return n}))):Promise.all(t.accept.map((function(t){return v?UM[t.blockchain].USD==t.token?1/o*v:FJ({blockchain:t.blockchain,tokenIn:UM[t.blockchain].USD,amountIn:1/o*v,tokenOut:t.token,fromAddress:l,toAddress:l}):UM[t.blockchain].USD==t.token?1/r*n:FJ({blockchain:t.blockchain,tokenIn:UM[t.blockchain].USD,amountIn:1/r*n,tokenOut:t.token,fromAddress:l,toAddress:l})}))).then((function(n){Promise.all(n.map((function(e,n){return"number"==typeof e?e:null==e[0]?void 0:_V.readable({blockchain:t.accept[n].blockchain,amount:e[0].amountOut,address:e[0].tokenOut})}))).then(e).catch(m)})).catch(m)}))},I=G.useCallback(mq.debounce((function(e){var n=e.account,r=e.amount,i=e.conversionRate,o=e.fixedCurrencyConversionRate;L({amount:r,conversionRate:i,fixedCurrencyConversionRate:o}).then((function(e){b(t.accept.map((function(t,r){if(null!=e[r])return{blockchain:t.blockchain,amount:fq(e[r]),token:t.token,receiver:t.receiver||n}})).filter((function(t){return!!t})))})).catch(m)}),500),[]);return G.useEffect((function(){a||u&&l&&f&&(!v||p)&&I({account:l,amount:_,conversionRate:f,fixedCurrencyConversionRate:p})}),[u,l,f,v,p,_,a]),G.useEffect((function(){u&&S?S.fromToken.readable(S.fromBalance).then((function(t){if(i&&i.token)FJ({blockchain:S.blockchain,tokenIn:S.fromToken.address,tokenOut:S.toToken.address,amountIn:parseFloat(t),fromAddress:l,toAddress:l}).then((function(t){null!=t[0]?_V.readable({amount:t[0].amountOut,blockchain:S.blockchain,address:S.toToken.address}).then((function(t){var e=parseFloat(new VZ(t).div(1.01).mul(f).toString());x(e>10?Math.round(e-1):fq(e-1))})).catch(m):_V.readable({amount:S.fromBalance,blockchain:S.blockchain,address:S.fromToken.address}).then(x)})).catch(m);else if(S.fromToken.address==UM[S.blockchain].USD){var e=parseFloat(new VZ(t).mul(f).toString());x(e>10?Math.round(e-1):e-1)}else FJ({blockchain:S.blockchain,tokenIn:S.fromToken.address,tokenOut:UM[S.blockchain].USD,amountIn:parseFloat(t),fromAddress:l,toAddress:l}).then((function(t){null!=t[0]&&_V.readable({amount:t[0].amountOut,blockchain:S.blockchain,address:UM[S.blockchain].USD}).then((function(t){var e=parseFloat(new VZ(t).div(1.01).mul(f).toString());x(e>10?Math.round(e):fq(e))})).catch(m)})).catch(m)})).catch(m):x(100)}),[l,S]),G.createElement(aq.Provider,{value:{amountsMissing:u,fixedAmount:v,fixedCurrency:w,acceptWithAmount:g,amount:_,setAmount:E,setMaxRoute:k,maxAmount:T}},t.children)},QJ={"Pacific/Midway":"USD","Pacific/Niue":"NZD","Pacific/Pago_Pago":"USD","America/Adak":"USD","Pacific/Honolulu":"USD","Pacific/Rarotonga":"NZD","Pacific/Tahiti":"XPF","Pacific/Marquesas":"XPF","America/Anchorage":"USD","America/Juneau":"USD","America/Metlakatla":"USD","America/Nome":"USD","America/Sitka":"USD","America/Yakutat":"USD","Pacific/Gambier":"XPF","America/Los_Angeles":"USD","America/Tijuana":"MXN","America/Vancouver":"CAD","Pacific/Pitcairn":"NZD","America/Boise":"USD","America/Cambridge_Bay":"CAD","America/Chihuahua":"MXN","America/Creston":"CAD","America/Dawson":"CAD","America/Dawson_Creek":"CAD","America/Denver":"USD","America/Edmonton":"CAD","America/Fort_Nelson":"CAD","America/Hermosillo":"MXN","America/Inuvik":"CAD","America/Mazatlan":"MXN","America/Ojinaga":"MXN","America/Phoenix":"USD","America/Whitehorse":"CAD","America/Yellowknife":"CAD","America/Bahia_Banderas":"MXN","America/Belize":"BZD","America/Chicago":"USD","America/Costa_Rica":"CRC","America/El_Salvador":"USD","America/Guatemala":"GTQ","America/Indiana/Knox":"USD","America/Indiana/Tell_City":"USD","America/Managua":"NIO","America/Matamoros":"MXN","America/Menominee":"USD","America/Merida":"MXN","America/Mexico_City":"MXN","America/Monterrey":"MXN","America/North_Dakota/Beulah":"USD","America/North_Dakota/Center":"USD","America/North_Dakota/New_Salem":"USD","America/Rainy_River":"CAD","America/Rankin_Inlet":"CAD","America/Regina":"CAD","America/Resolute":"CAD","America/Swift_Current":"CAD","America/Tegucigalpa":"HNL","America/Winnipeg":"CAD","Pacific/Easter":"CLP","Pacific/Galapagos":"USD","America/Atikokan":"CAD","America/Bogota":"COP","America/Cancun":"MXN","America/Cayman":"KYD","America/Detroit":"USD","America/Eirunepe":"BRL","America/Grand_Turk":"USD","America/Guayaquil":"USD","America/Havana":"CUP","America/Indiana/Indianapolis":"USD","America/Indiana/Marengo":"USD","America/Indiana/Petersburg":"USD","America/Indiana/Vevay":"USD","America/Indiana/Vincennes":"USD","America/Indiana/Winamac":"USD","America/Iqaluit":"CAD","America/Jamaica":"JMD","America/Kentucky/Louisville":"USD","America/Kentucky/Monticello":"USD","America/Lima":"PEN","America/Nassau":"BSD","America/New_York":"USD","America/Nipigon":"CAD","America/Panama":"PAB","America/Pangnirtung":"CAD","America/Port-au-Prince":"HTG","America/Rio_Branco":"BRL","America/Thunder_Bay":"CAD","America/Toronto":"CAD","America/AnguillaSandy Hill":"XCD","America/Antigua":"XCD","America/Aruba":"AWG","America/Asuncion":"PYG","America/Barbados":"BBD","America/Blanc-Sablon":"CAD","America/Boa_Vista":"BRL","America/Campo_Grande":"BRL","America/Caracas":"VEB","America/Cuiaba":"BRL","America/Curacao":"ANG","America/Dominica":"DOP","America/Glace_Bay":"CAD","America/Goose_Bay":"CAD","America/Grenada":"XCD","America/Guadeloupe":"EUR","America/Guyana":"GYD","America/Halifax":"CAD","America/Kralendijk":"USD","America/La_Paz":"BOB","America/Lower_Princes":"USD","America/Manaus":"BRL","America/Marigot":"EUR","America/Martinique":"EUR","America/Moncton":"CAD","America/Montserrat":"XCD","America/Porto_Velho":"BRL","America/Port_of_Spain":"BZD","America/Puerto_Rico":"USD","America/Santiago":"CLP","America/Santo_Domingo":"DOP","America/St_Barthelemy":"EUR","America/St_Kitts":"XCD","America/St_Lucia":"XCD","America/St_Thomas":"USD","America/St_Vincent":"XCD","America/Thule":"DKK","America/Tortola":"USD","Atlantic/Bermuda":"BMD","America/St_Johns":"CAD","America/Araguaina":"BRL","America/Argentina/Buenos_Aires":"ARS","America/Argentina/Catamarca":"ARS","America/Argentina/Cordoba":"ARS","America/Argentina/Jujuy":"ARS","America/Argentina/La_Rioja":"ARS","America/Argentina/Mendoza":"ARS","America/Argentina/Rio_Gallegos":"ARS","America/Argentina/Salta":"ARS","America/Argentina/San_Juan":"ARS","America/Argentina/San_Luis":"ARS","America/Argentina/Tucuman":"ARS","America/Argentina/Ushuaia":"ARS","America/Bahia":"BRL","America/Belem":"BRL","America/Cayenne":"EUR","America/Fortaleza":"BRL","America/Godthab":"DKK","America/Maceio":"BRL","America/Miquelon":"EUR","America/Montevideo":"UYU","America/Paramaribo":"SRD","America/Punta_Arenas":"CLP","America/Recife":"BRL","America/Santarem":"BRL","America/Sao_Paulo":"BRL","Antarctica/Palmer":"USD","Antarctica/Rothera":"USD","Atlantic/Stanley":"FKP","America/Noronha":"BRL","Atlantic/South_Georgia":"GBP","America/Scoresbysund":"DKK","Atlantic/Azores":"EUR","Atlantic/Cape_Verde":"CVE","Africa/Abidjan":"XOF","Africa/Accra":"GHC","Africa/Bamako":"XOF","Africa/Banjul":"GMD","Africa/Bissau":"XOF","Africa/Casablanca":"MAD","Africa/Conakry":"GNF","Africa/Dakar":"XOF","Africa/El_Aaiun":"MAD","Africa/Freetown":"SLL","Africa/Lome":"XOF","Africa/Monrovia":"LRD","Africa/Nouakchott":"MRU","Africa/Ouagadougou":"XOF","Africa/Sao_Tome":"STD","America/Danmarkshavn":"DKK","Antarctica/Troll":"NOK","Atlantic/Canary":"EUR","Atlantic/Faroe":"DKK","Atlantic/Madeira":"EUR","Atlantic/Reykjavik":"ISK","Atlantic/St_Helena":"SHP","Europe/Dublin":"EUR","Europe/Guernsey":"GBP","Europe/Isle_of_Man":"IMP","Europe/Jersey":"GBP","Europe/Lisbon":"EUR","Europe/London":"GBP","Africa/Algiers":"DZD","Africa/Bangui":"XAF","Africa/Brazzaville":"XAF","Africa/Ceuta":"EUR","Africa/Douala":"XAF","Africa/Kinshasa":"CDF","Africa/Lagos":"NGN","Africa/Libreville":"XAF","Africa/Luanda":"AOA","Africa/Malabo":"XAF","Africa/Ndjamena":"XAF","Africa/Niamey":"XOF","Africa/Porto-Novo":"XOF","Africa/Tunis":"TND","Africa/Windhoek":"NAD","Arctic/Longyearbyen":"NOK","Europe/Amsterdam":"EUR","Europe/Andorra":"EUR","Europe/Belgrade":"RSD","Europe/Berlin":"EUR","Europe/Bratislava":"EUR","Europe/Brussels":"EUR","Europe/Budapest":"HUF","Europe/Copenhagen":"DKK","Europe/Gibraltar":"GIP","Europe/Ljubljana":"EUR","Europe/Luxembourg":"EUR","Europe/Madrid":"EUR","Europe/Malta":"EUR","Europe/Monaco":"EUR","Europe/Oslo":"NOK","Europe/Paris":"EUR","Europe/Podgorica":"EUR","Europe/Prague":"CZK","Europe/Rome":"EUR","Europe/San_Marino":"EUR","Europe/Sarajevo":"BAM","Europe/Skopje":"MKD","Europe/Stockholm":"SEK","Europe/Tirane":"ALL","Europe/Vaduz":"CHF","Europe/Vatican":"EUR","Europe/Vienna":"EUR","Europe/Warsaw":"PLN","Europe/Zagreb":"HRK","Europe/Zurich":"CHF","Africa/Blantyre":"MWK","Africa/Bujumbura":"BIF","Africa/Cairo":"EGP","Africa/Gaborone":"BWP","Africa/Harare":"ZWL","Africa/Johannesburg":"ZAR","Africa/Juba":"SSP","Africa/Khartoum":"SDG","Africa/Kigali":"RWF","Africa/Lubumbashi":"CDF","Africa/Lusaka":"ZMW","Africa/Maputo":"MZM","Africa/Maseru":"LSL","Africa/Mbabane":"SZL","Africa/Tripoli":"LYD","Asia/Amman":"JOD","Asia/Beirut":"LBP","Asia/Damascus":"SYP","Asia/Famagusta":"TRY","Asia/Gaza":"ILS","Asia/Hebron":"ILS","Asia/Jerusalem":"ILS","Asia/Nicosia":"EUR","Europe/Athens":"EUR","Europe/Bucharest":"RON","Europe/Chisinau":"MDL","Europe/Helsinki":"EUR","Europe/Kaliningrad":"RUB","Europe/Kiev":"UAH","Europe/Mariehamn":"EUR","Europe/Riga":"EUR","Europe/Sofia":"BGN","Europe/Tallinn":"EUR","Europe/Uzhgorod":"UAH","Europe/Vilnius":"EUR","Europe/Zaporozhye":"UAH","Africa/Addis_Ababa":"ETB","Africa/Asmara":"ERN","Africa/Dar_es_Salaam":"TZS","Africa/Djibouti":"DJF","Africa/Kampala":"UGX","Africa/Mogadishu":"SOS","Africa/Nairobi":"KES","Antarctica/Syowa":"EUR","Asia/Aden":"YER","Asia/Baghdad":"IQD","Asia/Bahrain":"BHD","Asia/Kuwait":"KWD","Asia/Qatar":"QAR","Asia/Riyadh":"SAR","Europe/Istanbul":"TRY","Europe/Kirov":"RUB","Europe/Minsk":"BYN","Europe/Moscow":"RUB","Europe/Simferopol":"RUB","Europe/Volgograd":"RUB","Indian/Antananarivo":"MGA","Indian/Comoro":"USD","Indian/Mayotte":"EUR","Asia/Tehran":"IRR","Asia/Baku":"AZN","Asia/Dubai":"AED","Asia/Muscat":"OMR","Asia/Tbilisi":"GEL","Asia/Yerevan":"AMD","Europe/Astrakhan":"RUB","Europe/Samara":"RUB","Europe/Saratov":"RUB","Europe/Ulyanovsk":"RUB","Indian/Mahe":"SCR","Indian/Mauritius":"MUR","Indian/Reunion":"EUR","Asia/Kabul":"AFN","Antarctica/Mawson":"USD","Asia/Aqtau":"KZT","Asia/Aqtobe":"KZT","Asia/Ashgabat":"TMM","Asia/Atyrau":"KZT","Asia/Dushanbe":"TJS","Asia/Karachi":"PKR","Asia/Oral":"KZT","Asia/Qyzylorda":"KZT","Asia/Samarkand":"UZS","Asia/Tashkent":"UZS","Asia/Yekaterinburg":"RUB","Indian/Kerguelen":"EUR","Indian/Maldives":"MVR","Asia/Colombo":"LKR","Asia/Kolkata":"INR","Asia/Kathmandu":"NPR","Antarctica/Vostok":"USD","Asia/Almaty":"KZT","Asia/Bishkek":"KGS","Asia/Dhaka":"BDT","Asia/Omsk":"RUB","Asia/Qostanay":"KZT","Asia/Thimphu":"BTN","Asia/Urumqi":"CNY","Indian/Chagos":"USD","Asia/Yangon":"MMK","Indian/Cocos":"AUD","Antarctica/Davis":"USD","Asia/Bangkok":"THB","Asia/Barnaul":"RUB","Asia/Hovd":"MNT","Asia/Ho_Chi_Minh":"VND","Asia/Jakarta":"IDR","Asia/Krasnoyarsk":"RUB","Asia/Novokuznetsk":"RUB","Asia/Novosibirsk":"RUB","Asia/Phnom_Penh":"KHR","Asia/Pontianak":"IDR","Asia/Tomsk":"RUB","Asia/Vientiane":"LAK","Indian/Christmas":"AUD","Asia/Brunei":"BND","Asia/Choibalsan":"MNT","Asia/Hong_Kong":"HKD","Asia/Irkutsk":"RUB","Asia/Kuala_Lumpur":"MYR","Asia/Kuching":"MYR","Asia/Macau":"MOP","Asia/Makassar":"IDR","Asia/Manila":"PHP","Asia/Shanghai":"CNY","Asia/Singapore":"SGD","Asia/Taipei":"TWD","Asia/Ulaanbaatar":"MNT","Australia/Perth":"AUD","Australia/Eucla":"AUD","Asia/Chita":"RUB","Asia/Dili":"USD","Asia/Jayapura":"IDR","Asia/Khandyga":"RUB","Asia/Pyongyang":"KPW","Asia/Seoul":"KRW","Asia/Tokyo":"JPY","Asia/Yakutsk":"RUB","Pacific/Palau":"USD","Australia/Adelaide":"AUD","Australia/Broken_Hill":"AUD","Australia/Darwin":"AUD","Antarctica/DumontDUrville":"USD","Antarctica/Macquarie":"USD","Asia/Ust-Nera":"RUB","Asia/Vladivostok":"RUB","Australia/Brisbane":"AUD","Australia/Currie":"AUD","Australia/Hobart":"AUD","Australia/Lindeman":"AUD","Australia/Melbourne":"AUD","Australia/Sydney":"AUD","Pacific/Chuuk":"USD","Pacific/GuamVillage":"USD","Pacific/Port_Moresby":"PGK","Pacific/Saipan":"USD","Australia/Lord_Howe":"AUD","Antarctica/Casey":"USD","Asia/Magadan":"RUB","Asia/Sakhalin":"RUB","Asia/Srednekolymsk":"RUB","Pacific/Bougainville":"PGK","Pacific/Efate":"VUV","Pacific/Guadalcanal":"SBD","Pacific/Kosrae":"USD","Pacific/Norfolk":"USD","Pacific/Noumea":"XPF","Pacific/Pohnpei":"USD","Antarctica/McMurdo":"USD","Asia/Anadyr":"RUB","Asia/Kamchatka":"RUB","Pacific/Auckland":"NZD","Pacific/Fiji":"FJD","Pacific/Funafuti":"AUD","Pacific/Kwajalein":"USD","Pacific/Majuro":"USD","Pacific/Nauru":"AUD","Pacific/Tarawa":"AUD","Pacific/Wake":"USD","Pacific/Wallis":"XPF","Pacific/Chatham":"CAD","Pacific/Apia":"NGN","Pacific/Enderbury":"USD","Pacific/Fakaofo":"NZD","Pacific/Tongatapu":"TOP","Pacific/Kiritimati":"AUD"};class WJ{constructor({amount:t,code:e,timeZone:n=WJ.timeZone()}){this.amount=t,this.code=e||window._LocalCurrencyCode||WJ.getCode(n),this.timeZone=n}static getCode(t){return window._LocalCurrencyCode||QJ[t||WJ.timeZone()]||"USD"}static async rate({from:t,to:e}){null==e&&(e=WJ.getCode());let n=await WJ.fromUSD({amount:1,code:t}),r=await WJ.fromUSD({amount:1,code:e});return n.amount/r.amount}static async fromUSD({amount:t,code:e,timeZone:n}){let r=new WJ({amount:t,code:e,timeZone:n}),i=await fetch("https://public.depay.com/currencies/"+r.code).then((t=>t.json())).then((t=>parseFloat(t))).catch((()=>(r.code="USD",1)));return r.amount=r.amount*i,r}static timeZone(){return Intl.DateTimeFormat().resolvedOptions().timeZone}toString(t={}){return null==t.minimumFractionDigits&&this.amount%1==0&&this.amount>=100?t.minimumFractionDigits=0:null==t.minimumFractionDigits&&(t.minimumFractionDigits=2),new Intl.NumberFormat(navigator.language,{...t,style:"currency",currency:this.code}).format(this.amount)}}var HJ=function(t){var e=new WJ({code:t.configuration.currency}).code;return G.useEffect((function(){null!=t.configuration.providers&&Object.entries(t.configuration.providers).forEach((function(t){((t,e)=>{if(_H.evm.includes(t))return aH(t,e);if(_H.solana.includes(t))return wH(t,e);throw"Unknown blockchain: "+t})(t[0],t[1])}))}),[t.configuration]),G.createElement(sq.Provider,{value:Object.assign({},t.configuration,{currencyCode:e})},t.children)},GJ=function(t){G.useContext(PG).setError;var e=G.useContext(sq),r=e.amount,i=e.currency,o=h(G.useState(),2),a=o[0],s=o[1],u=h(G.useState(),2),c=u[0],l=u[1];return G.useEffect((function(){"object"==n(r)&&r.currency&&WJ.fromUSD({amount:1,code:r.currency}).then((function(t){return l(t.amount)})),WJ.fromUSD({amount:1,code:i}).then((function(t){return s(t.amount)})).catch(s(1))}),[]),G.createElement(uq.Provider,{value:{conversionRate:a,fixedCurrencyConversionRate:c}},t.children)},qJ=G.createContext(),ZJ=G.createContext(),VJ=function(){var t=G.useContext(q).close;return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"}),body:G.createElement("div",{className:"TextCenter"},G.createElement("div",{className:"GraphicWrapper"},G.createElement("img",{className:"Graphic",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAHQCAMAAADgcCJ6AAAAXVBMVEVHcEwiGxq6jYEwExPTf2RKx+4uEhLSf2PSfmMv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ukP9gOI/5KJeF9HmJqJAhEy7YEC6LtTzYsgcAAAAAAAAAAAAAAAAAAAAAAAD0/AOU5ijBfZTOtQAAAABJRU5ErkJggg=="})),G.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Insufficient Balance"),G.createElement("div",{className:"Text PaddingTopS PaddingBottomM PaddingLeftM PaddingRightM"},G.createElement("strong",{className:"FontSizeM"},"We were not able to find any asset with enough value in your wallet. Please top up your account in order to proceed with this payment."))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("button",{className:"ButtonPrimary",onClick:t},"Ok"))})},JJ=G.createContext(),KJ=G.createContext(),XJ=G.createContext(),$J=G.createContext(),tK=function(t){var n=G.useContext(PG).setError,r=G.useContext(sq),i=r.sent,o=r.succeeded,a=r.failed,s=r.recover,c=r.before,l=G.useContext(KJ),d=l.selectedRoute;l.getPaymentRoutes;var f=G.useContext(q),p=f.open,m=f.close,y=f.setClosable,g=G.useContext(KJ).allRoutes,b=G.useContext(Z).setUpdatable,v=G.useContext(ZJ),w=v.navigate,M=v.set,_=G.useContext(pq).wallet,E=G.useContext(XJ),A=E.release,S=E.synchronousTracking,k=E.asynchronousTracking,N=E.trackingInitialized,T=E.initializeTracking,x=E.preTrack,L=G.useContext($J),I=L.foundTransaction,j=L.initializeTracking,C=h(G.useState(),2),D=C[0],O=C[1],P=h(G.useState(),2),z=P[0],R=P[1],B=h(G.useState(),2),U=B[0],F=B[1],Y=h(G.useState("initialized"),2),Q=Y[0],W=Y[1],H=function(t){0!=S||0!=k&&1!=N||y(!0),W("success"),o&&o(t)},V=function(t,e){0!=k&&1!=N||y(!0),M(["PaymentFailed"]),W("failed"),a&&a(t,e)},J=function(){var t=e(u.mark((function t(){var e;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!c){t.next=6;break}return t.next=3,c(D.route.transaction);case 3:if(!1!==t.sent){t.next=6;break}return t.abrupt("return");case 6:return y(!1),W("paying"),b(!1),t.next=11,EH({blockchain:D.route.transaction.blockchain,method:"latestBlockNumber"});case 11:return e=t.sent,t.next=14,x(e,D.route).then((function(){_.sendTransaction(Object.assign({},D.route.transaction,{sent:function(t){j(t,e),i&&i(t)},succeeded:H,failed:V})).then((function(t){R(t),T(t,e,D.route)})).catch((function(t){console.log("error",t),W("initialized"),y(!0),b(!0),"WRONG_NETWORK"!=(null==t?void 0:t.code)&&"NOT_SUPPORTED"!=(null==t?void 0:t.code)||w("WrongNetwork")}))})).catch((function(t){console.log(t),W("initialized"),y(!0),b(!0),w("PreTrackingFailed")}));case 14:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return G.useEffect((function(){A&&W("success")}),[A]),G.useEffect((function(){k&&N&&("success"==Q||"failed"==Q)&&y(!0)}),[N,Q]),G.useEffect((function(){if(s){y(!1),b(!1),W("paying"),R({blockchain:s.blockchain,id:s.transaction,url:qh(s.blockchain).explorerUrlFor({transaction:{id:s.transaction}})});var t=new _V({blockchain:s.blockchain,address:s.token});Promise.all([t.name(),t.symbol()]).then((function(t){var e=h(t,2),n=e[0],r=e[1];O({blockchain:s.blockchain,token:s.token,name:n,symbol:r.toUpperCase(),amount:s.amount})})).catch(n)}}),[s]),G.useEffect((function(){var t;I&&I.id&&I.status&&(I.id!=z.id&&(t=Object.assign({},z,{id:I.id,url:qh(z.blockchain).explorerUrlFor({transaction:I})}),R(t)),"success"==I.status?H(t||z):"failed"==I.status&&V(t||z))}),[I,z]),G.useEffect((function(){if(d){var t=d.fromToken;Promise.all([t.name(),t.symbol(),t.readable(d.fromAmount)]).then((function(e){var n=h(e,3),r=n[0],i=n[1],o=n[2];O({blockchain:d.blockchain,route:d,token:t.address,name:r,symbol:i.toUpperCase(),amount:o})})).catch(n)}else O(void 0)}),[d]),G.useEffect((function(){g&&0==g.length?b(!1):g&&g.length>0&&b(!0)}),[g]),g instanceof Array&&0==g.length?G.createElement(ch,{open:p,close:m,start:"NoPaymentMethodFound",container:t.container,document:t.document,dialogs:{NoPaymentMethodFound:G.createElement(VJ,null)}}):G.createElement(JJ.Provider,{value:{payment:D,paymentState:Q,pay:J,transaction:z,approve:function(){y(!1),W("approving"),_.sendTransaction(Object.assign({},D.route.approvalTransaction,{succeeded:function(){D.route.approvalRequired=!1,O(D),y(!0),W("initialized")}})).then((function(t){F(t)})).catch((function(t){console.log("error",t),W("initialized"),y(!0)}))},approvalTransaction:U}},t.children)};function eK(t,e,n){return(e=IG(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const nK=({assets:t,blockchain:e,options:n})=>n.only?t.filter((t=>(n.only[e]||[]).find((e=>e.toLowerCase()==t.address.toLowerCase())))):n.exclude?t.filter((t=>(n.exclude[e]||[]).find((e=>e.toLowerCase()!=t.address.toLowerCase())))):t;var rK=async t=>{void 0===t&&(t={accounts:{}});let e=Promise.all(Object.keys(t.accounts).map((e=>new Promise(((n,r)=>{const i=t.accounts[e],o=new AbortController;setTimeout((()=>o.abort()),1e4),fetch(`https://public.depay.com/accounts/${e}/${i}/assets`,{signal:o.signal}).catch((t=>{console.log(t),n([])})).then((t=>{if(t&&t.ok)return t.json();n([])})).then((async r=>{if(r&&r.length)return await(async({address:t,options:e,assets:n,blockchain:r})=>{if(e.only&&e.only[r]&&!e.only[r].find((t=>t.toLowerCase()==UM[r].NATIVE.toLowerCase())))return n;if(e.exclude&&e.exclude[r]&&e.exclude[r].find((t=>t.toLowerCase()==UM[r].NATIVE.toLowerCase())))return n;if(!n.find((t=>t.address.toLowerCase()==UM[r].NATIVE.toLowerCase()))){let e=await EH({blockchain:r,address:t,method:"balance"},{cache:3e4});n=[{name:UM[r].CURRENCY,symbol:UM[r].SYMBOL,address:UM[r].NATIVE,type:"NATIVE",blockchain:r,balance:e.toString()},...n]}return n})({address:i,options:t,assets:nK({assets:r,blockchain:e,options:t}).map((t=>Object.assign(t,{blockchain:e}))),blockchain:e});n([])})).then(n).catch((t=>{console.log(t),n([])}))}))))).then((t=>t.flat()));return e};const iK=(t,e)=>Object.assign({},{address:t.address,symbol:t.symbol,name:t.name,decimals:t.decimals,type:t.type,blockchain:t.blockchain},{balance:e.toString()}),oK=({assets:t,asset:e})=>!!t.find((t=>t.blockchain==e.blockchain&&t.address.toLowerCase()==e.address.toLowerCase())),aK=({options:t,address:e,blockchain:n})=>!(!(t&&t.only&&t.only[n])||t.only[n].find((t=>t.toLowerCase()==e.toLowerCase())))||!!(t&&t.exclude&&t.exclude[n]&&t.exclude[n].find((t=>t.toLowerCase()==e.toLowerCase())));const sK=t=>(t.params.path=t.params.path.filter(((e,n,r)=>(1!=n||e!=UM[t.blockchain].WRAPPED||r[0]!=UM[t.blockchain].NATIVE)&&(n!=r.length-2||e!=UM[t.blockchain].WRAPPED||r[r.length-1]!=UM[t.blockchain].NATIVE))),t);var uK={ethereum:{payment:{address:"0x99F3F4685a7178F26EB4F4Ca8B75a1724F1577B9"},weth:{wrap:{address:"0xF4cc97D00dD0639c3e383D7CafB3d815616cbB2C"},unwrap:{address:"0xcA575c6C5305e8127F3D376bb22776eAD370De4a"}},uniswap_v2:{address:"0xe04b08Dfc6CaA0F4Ec523a3Ae283Ece7efE00019",prepareTransaction:sK},paymentWithEvent:{address:"0xD8fBC10787b019fE4059Eb5AA5fB11a5862229EF"},paymentFee:{address:"0x874Cb669D7BFff79d4A6A30F4ea52c5e413BD6A7"},paymentFeeWithEvent:{address:"0x981cAd45c768d56136FDBb2C5E115F33D971bE6C"}},bsc:{payment:{address:"0x8B127D169D232D5F3ebE1C3D06CE343FD7C1AA11"},wbnb:{wrap:{address:"0xf361888459a4C863a8498ee344C2688C9196Be51"},unwrap:{address:"0x65693291C20271f5e5030261766D1D6b3AC9d44E"}},pancakeswap:{address:"0xAC3Ec4e420DD78bA86d932501E1f3867dbbfb77B",prepareTransaction:sK},paymentWithEvent:{address:"0x1869E236c03eE67B9FfEd3aCA139f4AeBA79Dc21"},paymentFee:{address:"0xae33f10AD57A38113f74FCdc1ffA6B1eC47B94E3"},paymentFeeWithEvent:{address:"0xF1a05D715AaBFA380543719F7bA8754d0331c5A9"}},polygon:{payment:{address:"0x78C0F1c712A9AA2004C1F401A7307d8bCB62abBd"},wmatic:{wrap:{address:"0x8B62F604499c1204573664447D445690E0A0011b"},unwrap:{address:"0x2fd0a07a4F73285d0eBa8176426BF9B8c0121206"}},quickswap:{address:"0x0Dfb7137bC64b63F7a0de7Cb9CDa178702666220",prepareTransaction:sK},paymentWithEvent:{address:"0xfAD2F276D464EAdB71435127BA2c2e9dDefb93a4"},paymentFee:{address:"0xd625c7087E940b2A91ed8bD8db45cB24D3526B56"},paymentFeeWithEvent:{address:"0xBC56ED8E32b64a33f64Ed7A5fF9EACdFC117e07a"}}},cK={ethereum:{address:"0xae60aC8e69414C2Dc362D0e6a03af643d1D85b92",api:[{inputs:[{internalType:"address",name:"_configuration",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"configuration",outputs:[{internalType:"contract DePayRouterV1Configuration",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pluginAddress",type:"address"}],name:"isApproved",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"path",type:"address[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"address[]",name:"addresses",type:"address[]"},{internalType:"address[]",name:"plugins",type:"address[]"},{internalType:"string[]",name:"data",type:"string[]"}],name:"route",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdraw",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]},bsc:{address:"0x0Dfb7137bC64b63F7a0de7Cb9CDa178702666220",api:[{inputs:[{internalType:"address",name:"_configuration",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"configuration",outputs:[{internalType:"contract DePayRouterV1Configuration",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pluginAddress",type:"address"}],name:"isApproved",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"path",type:"address[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"address[]",name:"addresses",type:"address[]"},{internalType:"address[]",name:"plugins",type:"address[]"},{internalType:"string[]",name:"data",type:"string[]"}],name:"route",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdraw",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]},polygon:{address:"0x2CA727BC33915823e3D05fe043d310B8c5b2dC5b",api:[{inputs:[{internalType:"address",name:"_configuration",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"configuration",outputs:[{internalType:"contract DePayRouterV1Configuration",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pluginAddress",type:"address"}],name:"isApproved",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"path",type:"address[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"address[]",name:"addresses",type:"address[]"},{internalType:"address[]",name:"plugins",type:"address[]"},{internalType:"string[]",name:"data",type:"string[]"}],name:"route",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdraw",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}]}};let lK=({paymentRoute:t,fee:e})=>t.directTransfer&&!e?t.toToken.address==UM[t.blockchain].NATIVE?t.toAddress:t.toToken.address:cK[t.blockchain].address,hK=({paymentRoute:t,fee:e})=>t.directTransfer&&!e?t.toToken.address==UM[t.blockchain].NATIVE?void 0:_V[t.blockchain].DEFAULT:cK[t.blockchain].api,dK=({paymentRoute:t,fee:e})=>t.directTransfer&&!e?t.toToken.address==UM[t.blockchain].NATIVE?void 0:"transfer":"route",fK=({paymentRoute:t,exchangeRoute:e,event:n,fee:r})=>t.directTransfer&&!r?t.toToken.address==UM[t.blockchain].NATIVE?void 0:[t.toAddress,t.toAmount]:{path:pK({paymentRoute:t,exchangeRoute:e}),amounts:mK({paymentRoute:t,exchangeRoute:e,fee:r}),addresses:bK({paymentRoute:t,fee:r}),plugins:vK({paymentRoute:t,exchangeRoute:e,event:n,fee:r}),data:[]},pK=({paymentRoute:t,exchangeRoute:e})=>e?e.path:[t.toToken.address],mK=({paymentRoute:t,exchangeRoute:e,fee:n})=>{let r;r=e?e&&e.exchange.wrapper?[e.amountIn.toString(),yK({amount:e.amountOutMin.toString(),paymentRoute:t,fee:n})]:[e.amountIn.toString(),yK({amount:e.amountOutMin.toString(),paymentRoute:t,fee:n}),Math.round(Date.now()/1e3)+1800]:[t.toAmount,yK({amount:t.toAmount,paymentRoute:t,fee:n})],n&&(r[4]=gK({paymentRoute:t,fee:n}));for(var i=0;i<r.length;i++)null==r[i]&&(r[i]="0");return r},yK=({amount:t,paymentRoute:e,fee:n})=>{if(n){let r=gK({paymentRoute:e,fee:n});return Wd.from(t).sub(r).toString()}return t},gK=({paymentRoute:t,fee:e})=>{if("string"==typeof e.amount&&e.amount.match("%"))return Wd.from(t.toAmount).mul(10*parseFloat(e.amount)).div(1e3).toString();if("string"==typeof e.amount)return e.amount;if("number"==typeof e.amount)return BM(e.amount.toString(),t.toDecimals).toString();throw"Unknown fee amount type!"},bK=({paymentRoute:t,fee:e})=>e?[t.fromAddress,e.receiver,t.toAddress]:[t.fromAddress,t.toAddress],vK=({paymentRoute:t,exchangeRoute:e,event:n,fee:r})=>{let i=[];return e&&(t.exchangePlugin=uK[t.blockchain][e.exchange.name],t.exchangePlugin.wrap&&t.fromToken.address==UM[t.blockchain].NATIVE?i.push(t.exchangePlugin.wrap.address):t.exchangePlugin.wrap&&t.fromToken.address==UM[t.blockchain].WRAPPED?i.push(t.exchangePlugin.unwrap.address):i.push(t.exchangePlugin.address)),("ifSwapped"!=n||t.directTransfer)&&("ifRoutedAndNative"!=n||t.directTransfer||t.toToken.address!=UM[t.blockchain].NATIVE)?i.push(uK[t.blockchain].payment.address):i.push(uK[t.blockchain].paymentWithEvent.address),r&&("ifRoutedAndNative"!=n||t.directTransfer||t.toToken.address!=UM[t.blockchain].NATIVE?i.push(uK[t.blockchain].paymentFee.address):i.push(uK[t.blockchain].paymentFeeWithEvent.address)),i},wK=({paymentRoute:t,exchangeRoute:e})=>t.fromToken.address==UM[t.blockchain].NATIVE?e?e.amountIn.toString():t.toAmount.toString():Wd.from("0").toString();var MK=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},_K="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==fh?fh:"undefined"!=typeof self?self:{},EK="object"==typeof _K&&_K&&_K.Object===Object&&_K,AK="object"==typeof self&&self&&self.Object===Object&&self,SK=EK||AK||Function("return this")(),kK=function(){return SK.Date.now()},NK=/\s/;var TK=function(t){for(var e=t.length;e--&&NK.test(t.charAt(e)););return e},xK=/^\s+/;var LK=function(t){return t?t.slice(0,TK(t)+1).replace(xK,""):t},IK=SK.Symbol,jK=Object.prototype,CK=jK.hasOwnProperty,DK=jK.toString,OK=IK?IK.toStringTag:void 0;var PK=function(t){var e=CK.call(t,OK),n=t[OK];try{t[OK]=void 0;var r=!0}catch(t){}var i=DK.call(t);return r&&(e?t[OK]=n:delete t[OK]),i},zK=Object.prototype.toString;var RK=function(t){return zK.call(t)},BK=IK?IK.toStringTag:void 0;var UK=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":BK&&BK in Object(t)?PK(t):RK(t)};var FK=function(t){return null!=t&&"object"==typeof t};var YK=function(t){return"symbol"==typeof t||FK(t)&&"[object Symbol]"==UK(t)},QK=/^[-+]0x[0-9a-f]+$/i,WK=/^0b[01]+$/i,HK=/^0o[0-7]+$/i,GK=parseInt;var qK=function(t){if("number"==typeof t)return t;if(YK(t))return NaN;if(MK(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=MK(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=LK(t);var n=WK.test(t);return n||HK.test(t)?GK(t.slice(2),n?2:8):QK.test(t)?NaN:+t},ZK=Math.max,VK=Math.min;var JK=function(t,e,n){var r,i,o,a,s,u,c=0,l=!1,h=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(e){var n=r,o=i;return r=i=void 0,c=e,a=t.apply(o,n)}function p(t){return c=t,s=setTimeout(y,e),l?f(t):a}function m(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-c>=o}function y(){var t=kK();if(m(t))return g(t);s=setTimeout(y,function(t){var n=e-(t-u);return h?VK(n,o-(t-c)):n}(t))}function g(t){return s=void 0,d&&r?f(t):(r=i=void 0,a)}function b(){var t=kK(),n=m(t);if(r=arguments,i=this,u=t,n){if(void 0===s)return p(u);if(h)return clearTimeout(s),s=setTimeout(y,e),f(u)}return void 0===s&&(s=setTimeout(y,e)),a}return e=qK(e)||0,MK(n)&&(l=!!n.leading,o=(h="maxWait"in n)?ZK(qK(n.maxWait)||0,e):o,d="trailing"in n?!!n.trailing:d),b.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},b.flush=function(){return void 0===s?a:g(kK())},b};var KK=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return MK(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),JK(t,e,{leading:r,maxWait:e,trailing:i})};function XK(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],o=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}class $K{constructor({blockchain:t,fromAddress:e,fromToken:n,fromDecimals:r,fromAmount:i,fromBalance:o,toToken:a,toDecimals:s,toAmount:u,toAddress:c}){this.blockchain=t,this.fromAddress=e,this.fromToken=n,this.fromAmount=XK([i,"optionalAccess",t=>t.toString,"call",t=>t()]),this.fromDecimals=r,this.fromBalance=o,this.toToken=a,this.toAmount=XK([u,"optionalAccess",t=>t.toString,"call",t=>t()]),this.toDecimals=s,this.toAddress=c,this.exchangeRoutes=[],this.transaction=void 0,this.approvalRequired=void 0,this.approvalTransaction=void 0,this.directTransfer=void 0}}function tX({assets:t,blacklist:e,accept:n,from:r,event:i,fee:o}){return Promise.resolve(nX({assets:t,blacklist:e})).then((t=>function({assets:t,accept:e,from:n}){return Promise.all(t.map((async t=>{let r=e.filter((e=>e.blockchain==t.blockchain)),i=new _V(t);return Promise.all(r.map((async e=>{if(e.token&&e.amount){let r=e.blockchain,o=t.decimals,a=new _V({blockchain:r,address:e.token}),s=await a.decimals(),u=(await a.BigNumber(e.amount)).toString();return new $K({blockchain:r,fromToken:i,fromDecimals:o,toToken:a,toAmount:u,toDecimals:s,fromBalance:t.balance,fromAddress:n[e.blockchain],toAddress:e.toAddress})}if(e.fromToken&&e.fromAmount&&i.address.toLowerCase()==e.fromToken.toLowerCase()){let r=e.blockchain,o=(await i.BigNumber(e.fromAmount)).toString(),a=t.decimals,s=new _V({blockchain:r,address:e.toToken}),u=await s.decimals();return new $K({blockchain:r,fromToken:i,fromDecimals:a,fromAmount:o,toToken:s,toDecimals:u,fromBalance:t.balance,fromAddress:n[e.blockchain],toAddress:e.toAddress})}})))}))).then((t=>t.flat().filter((t=>t))))}({assets:t,accept:n,from:r}))).then((t=>uX({routes:t,fee:o}))).then(rX).then(iX).then(oX).then(aX).then((t=>fX({routes:t,event:i,fee:o}))).then(cX).then(sX).then(dX).then(lX)}function eX({accept:t,from:e,whitelist:n,blacklist:r,event:i,fee:o,update:a}){if(o&&o.amount&&"string"==typeof o.amount&&o.amount.match(/\.\d\d+\%/))throw"Only up to 1 decimal is supported for fee amounts!";return new Promise((async(s,u)=>{let c,l=[];if(n)for(const t in n)(n[t]||[]).forEach((e=>{l.push({blockchain:t,address:e})}));else t.forEach((t=>{l.push({blockchain:t.blockchain,address:t.token||t.toToken})}));a&&(c=KK((async({assets:t,blacklist:e,accept:n,from:r,event:i,fee:o})=>{a.callback(await tX({assets:t,blacklist:e,accept:n,from:r,event:i,fee:o}))}),a.every));let h=[];const d=await(async t=>{void 0===t&&(t={accounts:{},priority:[]});let e=[],n=[];n=n.concat((t.priority||[]).map((n=>new Promise((async(r,i)=>{try{let i=new _V(n),o=Object.assign({},n,{name:await i.name(),symbol:await i.symbol(),decimals:await i.decimals(),balance:(await i.balance(t.accounts[n.blockchain])).toString()});if("0"!=o.balance){if(oK({assets:e,asset:n}))return r();e.push(o),"function"==typeof t.drip&&t.drip(o),r(o)}else r()}catch(t){r()}})))));let r=[];for(var i in t.accounts)qh(i).tokens.forEach((e=>{aK({options:t,address:e.address,blockchain:i})||r.push(Object.assign({},e,{blockchain:i}))}));if(n=n.concat(r.map((n=>new Promise(((r,i)=>{new _V(n).balance(t.accounts[n.blockchain]).then((i=>{if(oK({assets:e,asset:n}))return r();const o=iK(n,i);"0"!=o.balance?(e.push(o),"function"==typeof t.drip&&t.drip(o),r(o)):r()})).catch((t=>{console.log(t),r()}))}))))),null==t.only||Object.keys(t.only).every((t=>0==t.length))){let r=await rK(t);n=n.concat(r.map((n=>new Promise(((r,i)=>new _V(n).balance(t.accounts[n.blockchain]).then((i=>{if(oK({assets:e,asset:n}))return r();const o=iK(n,i);"0"!=o.balance?(e.push(o),"function"==typeof t.drip&&t.drip(o),r(o)):r()})).catch((t=>{console.log(t),r()})))))))}return await Promise.all(n),e})({accounts:e,priority:l,only:n,exclude:r,drip:n=>{a&&(h.push(n),c({assets:h,blacklist:r,accept:t,from:e,event:i,fee:o}))}});s(await tX({assets:d,blacklist:r,accept:t,from:e,event:i,fee:o}))}))}let nX=({assets:t,blacklist:e})=>null==e?t:t.filter((t=>null==e[t.blockchain]||!e[t.blockchain].find((e=>e.toLowerCase()==t.address.toLowerCase())))),rX=async t=>await Promise.all(t.map((t=>t.directTransfer?[]:t.toToken&&t.toAmount?FJ({blockchain:t.blockchain,tokenIn:t.fromToken.address,tokenOut:t.toToken.address,amountOutMin:t.toAmount,fromAddress:t.fromAddress,toAddress:t.toAddress}):t.fromToken&&t.fromAmount?FJ({blockchain:t.blockchain,tokenIn:t.fromToken.address,tokenOut:t.toToken.address,amountIn:t.fromAmount,fromAddress:t.fromAddress,toAddress:t.toAddress}):void 0))).then((e=>t.map(((t,n)=>(t.exchangeRoutes=e[n],t))))),iX=t=>t.filter((t=>0==t.exchangeRoutes.length||null!=uK[t.blockchain][t.exchangeRoutes[0].exchange.name])),oX=t=>t.filter((t=>0!=t.exchangeRoutes.length||t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase())),aX=async t=>t.filter((t=>t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()?Wd.from(t.fromBalance).gte(Wd.from(t.toAmount)):t.fromAmount&&t.toAmount?Wd.from(t.fromBalance).gte(Wd.from(t.exchangeRoutes[0].amountInMax)):t.exchangeRoutes[0]&&t.exchangeRoutes[0].amountIn?Wd.from(t.fromBalance).gte(Wd.from(t.exchangeRoutes[0].amountIn)):void 0)),sX=t=>Promise.all(t.map((t=>t.fromToken.allowance(t.fromAddress,cK[t.blockchain].address)))).then((e=>(t.forEach(((n,r)=>{n.directTransfer||n.fromToken.address.toLowerCase()==UM[n.blockchain].NATIVE.toLowerCase()?t[r].approvalRequired=!1:(t[r].approvalRequired=Wd.from(n.fromAmount).gte(Wd.from(e[r])),t[r].approvalRequired&&(t[r].approvalTransaction={blockchain:n.blockchain,to:n.fromToken.address,api:_V[n.blockchain].DEFAULT,method:"approve",params:[cK[n.blockchain].address,UM[n.blockchain].MAXINT]}))})),t))),uX=({routes:t,fee:e})=>t.map((t=>(t.directTransfer=t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()&&null==e,t))),cX=t=>t.map((t=>(t.directTransfer&&!t.fee?t.fromToken.address.toLowerCase()==UM[t.blockchain].NATIVE.toLowerCase()?(t.fromAmount=t.transaction.value,t.toAmount=t.transaction.value):(t.fromAmount=t.transaction.params[1],t.toAmount=t.transaction.params[1]):(t.fromAmount=t.transaction.params.amounts[0],t.toAmount=t.transaction.params.amounts[1],t.fee&&(t.feeAmount=t.transaction.params.amounts[4])),t))),lX=t=>t.filter(((e,n)=>null==t.find(((t,r)=>e.fromToken.address==t.fromToken.address&&(e.fromToken.blockchain==t.fromToken.blockchain&&(!(!t.directTransfer||e.directTransfer)||(!(!Wd.from(t.fromAmount).lt(Wd.from(e.fromAmount))||e.directTransfer)||(t.fromAmount==e.fromAmount&&r<n||void 0)))))))),hX=t=>{switch(t){case"polygon":return 50;case"bsc":return 90;case"ethereum":return 99;default:return 100}},dX=t=>t.sort(((t,e)=>hX(t.fromToken.blockchain)<hX(e.fromToken.blockchain)?-1:hX(e.fromToken.blockchain)<hX(t.fromToken.blockchain)?1:t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()?-1:e.fromToken.address.toLowerCase()==e.toToken.address.toLowerCase()||t.approvalRequired&&!e.approvalRequired?1:e.approvalRequired&&!t.approvalRequired||JSON.stringify([t.fromToken.address.toLowerCase(),t.toToken.address.toLowerCase()].sort())==JSON.stringify([UM[t.blockchain].NATIVE.toLowerCase(),UM[t.blockchain].WRAPPED.toLowerCase()].sort())?-1:JSON.stringify([e.fromToken.address.toLowerCase(),e.toToken.address.toLowerCase()].sort())==JSON.stringify([UM[e.blockchain].NATIVE.toLowerCase(),UM[e.blockchain].WRAPPED.toLowerCase()].sort())?1:t.fromToken.address.toLowerCase()==UM[t.blockchain].NATIVE.toLowerCase()?-1:e.fromToken.address.toLowerCase()==UM[e.blockchain].NATIVE.toLowerCase()?1:0)),fX=({routes:t,event:e,fee:n})=>Promise.all(t.map((async t=>(t.transaction=await(async({paymentRoute:t,event:e,fee:n})=>{let r=t.exchangeRoutes[0],i={blockchain:t.blockchain,to:lK({paymentRoute:t,fee:n}),api:hK({paymentRoute:t,fee:n}),method:dK({paymentRoute:t,fee:n}),params:fK({paymentRoute:t,exchangeRoute:r,event:e,fee:n}),value:wK({paymentRoute:t,exchangeRoute:r})};return r&&t.exchangePlugin&&t.exchangePlugin.prepareTransaction&&(i=t.exchangePlugin.prepareTransaction(i)),i})({paymentRoute:t,event:e,fee:n}),t.fee=!!n,t))));function pX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function mX(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pX(Object(n),!0).forEach((function(e){eK(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pX(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var yX=function(t){var e="object"==n(t.receiver)?t.receiver.address:t.receiver,r="object"==n(t.receiver)?t.receiver:void 0;return mX(mX({},t),{},{toAddress:e,toContract:r})},gX=function(t,e){var n={};return t.forEach((function(t){n[t.blockchain]=e})),n},bX=function(t){var e=t.accept,n=t.account,r=t.whitelist,i=t.blacklist,o=t.fee;return eX({accept:e.map(yX),from:gX(e,n),whitelist:r,blacklist:i,event:"ifRoutedAndNative",fee:o})};function vX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function wX(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?vX(Object(n),!0).forEach((function(e){eK(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vX(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var MX=function(t){var n=h(G.useState(),2),r=n[0],i=n[1],o=h(G.useState(),2),a=o[0],s=o[1],c=h(G.useState(),2),l=c[0],d=c[1],f=h(G.useState(!1),2),p=f[0],m=f[1],y=h(G.useState(0),2),g=y[0],b=y[1],v=G.useContext(pq).account,w=G.useContext(Z).updatable,M=G.useContext(sq).recover,_=function(){var n=e(u.mark((function n(r){return u.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:0==r.length?(i([]),t.setMaxRoute&&t.setMaxRoute(null)):k(r).then(function(){var n=e(u.mark((function e(n){var r,o;return u.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:void 0===l?(r=n[0],d(r)):(o=n[n.findIndex((function(t){return t.fromToken.address==l.fromToken.address&&t.blockchain==l.blockchain}))],o&&l.fromAmount!=o.fromAmount&&s(o)),i(n),t.setMaxRoute&&t.setMaxRoute(dq(n));case 3:case"end":return e.stop()}}),e)})));return function(t){return n.apply(this,arguments)}}());case 1:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}(),E=function(e){if(e.allRoutes,e.selectedRoute,0!=e.updatable&&t.accept&&v){var n=setTimeout((function(){m(!0)}),4e3);bX(Object.assign({},t,{account:v})).then((function(t){clearInterval(n),_(t)}))}},A=function(t,e){t.fromAmount=e.toString(),t.transaction.params.amounts[0]=e.toString(),t.transaction.value&&"0"!=t.transaction.value.toString()&&(t.transaction.value=e.toString())},S=function(){var t=e(u.mark((function t(e,n){var r,i;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.directTransfer){t.next=2;break}return t.abrupt("return",e);case 2:return t.next=4,e.fromToken.readable(n||e.transaction.params.amounts[0]);case 4:return r=t.sent,t.next=7,e.fromToken.BigNumber(fq(r));case 7:return i=t.sent,A(e,i),t.abrupt("return",e);case 10:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),k=function(){var t=e(u.mark((function t(e){return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.all(e.map((function(t){return S(t)}))));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),N=function(){var t=e(u.mark((function t(){return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:d(wX({},a)),s(null);case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return G.useEffect((function(){var t=setTimeout((function(){b(g+1),E({allRoutes:r,selectedRoute:l,updatable:w})}),15e3);return function(){return clearTimeout(t)}}),[g,r,l,w]),G.useEffect((function(){v&&t.accept&&null==M&&E({})}),[v,t.accept]),G.createElement(KJ.Provider,{value:{selectedRoute:l,setSelectedRoute:d,getPaymentRoutes:E,allRoutes:r,setAllRoutes:i,slowRouting:p,updatedRouteWithNewPrice:a,updateRouteWithNewPrice:N}},t.children)},_X=G.createContext(),EX=function(t){var e=G.useContext(PG).setError,n=G.useContext(pq).account,r=G.useContext(Z).updatable,i=G.useContext(sq),o=i.amount,a=i.currencyCode,s=G.useContext(aq).amount,u=G.useContext(JJ).payment,c=h(G.useState(),2),l=c[0],d=c[1],f=h(G.useState(),2),p=f[0],m=f[1],y=h(G.useState(),2),g=y[0],b=y[1],v=G.useContext(sq).currency,w=h(G.useState(0),2),M=w[0],_=w[1],E=function(t){var r=t.updatable,i=t.payment;0!=r&&null!=(null==i?void 0:i.route)&&(b(null),Promise.all([FJ({blockchain:i.route.blockchain,tokenIn:i.route.fromToken.address,tokenOut:UM[i.route.blockchain].USD,amountIn:i.route.fromAmount,fromAddress:n,toAddress:n}),i.route.directTransfer?Promise.resolve([]):FJ({blockchain:i.route.blockchain,tokenIn:i.route.toToken.address,tokenOut:i.route.fromToken.address,amountIn:i.route.toAmount,fromAddress:n,toAddress:n}),new _V({blockchain:i.route.blockchain,address:UM[i.route.blockchain].USD}).decimals()]).then((function(t){var e,n=h(t,3),r=n[0],o=n[1],a=n[2],s=r[0],u=o[0];if(u){var c=Wd.from(u.amountOut),l=Wd.from(i.route.fromAmount),f=100-c.mul(Wd.from("100")).div(l).abs().toString();b(f>=10?f:null)}if(i.route.fromToken.address==UM[i.route.blockchain].USD)e=i.route.fromAmount.toString();else{if(null==s)return void d("");e=s.amountOut.toString()}var p=RM(e,a);WJ.fromUSD({amount:p,code:v}).then(d)})).catch(e))};return G.useEffect((function(){l&&s&&o&&o.currency&&o.fix?m(l.toString()):!s||null!=o&&1==(null==o?void 0:o.token)?l&&l.toString().length&&1!=(null==o?void 0:o.token)?m(l.toString()):u&&m("".concat(u.symbol," ").concat(u.amount)):m(new WJ({amount:s.toFixed(2),code:a}).toString())}),[l,u,s,o]),G.useEffect((function(){n&&u&&E({updatable:r,payment:u})}),[u,n]),G.useEffect((function(){var t=setTimeout((function(){_(M+1),E({updatable:r})}),15e3);return function(){return clearTimeout(t)}}),[M,r]),G.createElement(_X.Provider,{value:{paymentValue:l,paymentValueLoss:g,displayedPaymentValue:p}},t.children)},AX=function(t){var e=G.useContext(aq),n=e.acceptWithAmount,r=e.setMaxRoute,i=G.useContext(sq),o=i.blacklist,a=i.whitelist,s=i.fee;return G.createElement(qJ.Provider,{value:{}},G.createElement(MX,{accept:n,whitelist:a,blacklist:o,setMaxRoute:r,fee:s},G.createElement(tK,{container:t.container,document:t.document},G.createElement(EX,null,t.children))))},SX=function(t){var e=fq(t),n=e.toString();if(new RegExp(/\./).test(n)){var r=n.split(".");return(new Intl.NumberFormat).format(parseInt(r[0]))+"."+r[1]}return(new Intl.NumberFormat).format(e)};let kX=["ethereum","bsc","polygon","solana","velas"];kX.evm=["ethereum","bsc","polygon","velas"],kX.solana=["solana"];const NX=[{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],TX=[{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];let xX=function(t){const[e,n]=G.useState(),[r,i]=G.useState("repository"),o=t.blockchain.toLowerCase(),a=t.address,s=t.id;G.useEffect((()=>{UM[o].NATIVE.toLowerCase()==a.toLowerCase()?n(qh(o).logo):n(u({blockchain:o,address:a}))}),[o,a]);const u=({blockchain:t,address:e})=>["ethereum","bsc","polygon","solana"].includes(t)?`https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/${c(t)}/assets/${e}/logo.png`:"velas"==t?`https://raw.githubusercontent.com/wagyuswapapp/assets/master/blockchains/velas/assets/${e.toLowerCase()}/logo.png`:void 0,c=t=>{switch(t){case"ethereum":return"ethereum";case"bsc":return"smartchain";case"polygon":return"polygon";case"solana":return"solana";default:throw"DePayReactTokenImage: Unknown blockchain"}},l=()=>{i("unknown"),n("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjgzLjUgMjgzLjUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDI4My41IDI4My41OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxjaXJjbGUgZmlsbD0iI0YwRUZFRiIgY3g9IjE0MS43IiBjeT0iMTQxLjciIHI9IjE0MS43Ii8+CjxnPgoJPHBhdGggZmlsbD0iI0FCQUJBQiIgZD0iTTEyNywxNzUuMXYtNC40YzAtOC40LDEuMS0xNS4zLDMuNC0yMC43YzIuMy01LjQsNS4xLTEwLDguNC0xMy44YzMuMy0zLjcsNi42LTcsMTAuMS05LjdzNi4zLTUuNiw4LjYtOC41CgkJYzIuMy0yLjksMy40LTYuNCwzLjQtMTAuNWMwLTUtMS4xLTguNy0zLjMtMTEuMWMtMi4yLTIuNC01LTQtOC40LTQuOGMtMy40LTAuOC02LjktMS4zLTEwLjUtMS4zYy01LjgsMC0xMS44LDEtMTcuOSwyLjkKCQljLTYuMSwxLjktMTEuNSw0LjctMTYsOC40Vjc0YzIuMy0xLjcsNS40LTMuMyw5LjQtNC45YzQtMS42LDguNC0yLjksMTMuNC00YzUtMS4xLDEwLjEtMS42LDE1LjUtMS42YzguMSwwLDE1LjEsMS4xLDIxLjEsMy40CgkJYzYsMi4zLDEwLjgsNS41LDE0LjcsOS41YzMuOCw0LDYuNyw4LjcsOC42LDE0LjFjMS45LDUuMywyLjksMTEuMSwyLjksMTcuMmMwLDYuNi0xLjEsMTItMy40LDE2LjNjLTIuMyw0LjMtNS4xLDgtOC41LDExLjIKCQljLTMuNCwzLjItNi44LDYuNC0xMC4yLDkuNWMtMy40LDMuMS02LjMsNi44LTguNiwxMWMtMi4zLDQuMi0zLjQsOS41LTMuNCwxNS45djMuNEgxMjd6IE0xMjUuMiwyMTguMnYtMjcuN2gzM3YyNy43SDEyNS4yeiIvPgo8L2c+Cjwvc3ZnPgo=")},h=t=>{t.match(/^ipfs/)&&(t=`https://ipfs.io/ipfs/${t.split("://")[1]}`),fetch(t).then((t=>{if(t.ok)return t.json();l()})).then((t=>{if(t){let e=t.image;e?(e.match(/^ipfs/)&&(e=`https://ipfs.io/ipfs/${e.split("://")[1]}`),i("meta"),n(e)):l()}})).catch(l)};return null==e?null:G.createElement("img",{className:t.className,src:e,onError:t=>{"repository"==r?(i("depay"),n(`https://integrate.depay.com/tokens/${o}/${a}/image`)):"depay"==r&&kX.evm.includes(o)?s?EH({blockchain:o,address:a,api:TX,method:"uri",params:[s]}).then((t=>{t=t.match("0x{id}")?t.replace("0x{id}",s):t,h(t)})).catch(l):EH({blockchain:o,address:a,api:NX,method:"tokenURI",params:[1]}).then(h).catch(l):l()},__self:this,__source:{fileName:"/Users/sebastian/Work/DePay/react-token-image/src/index.js",lineNumber:105}})};var LX=function(t){var e=G.useContext(ah).navigate;G.useContext(PG).setError,G.useContext(pq).account;var r=G.useContext(aq),i=r.amount,o=r.setAmount,a=r.maxAmount;G.useContext(_X).displayedPaymentValue;var s=h(G.useState(i),2),u=s[0],c=s[1],l=G.useContext(sq),d=l.currencyCode,f=l.amount,p=G.useContext(KJ);p.allRoutes;var m=p.setSelectedRoute,y="object"==n(f)&&f.min?f.min:1,g="object"==n(f)&&f.step?f.step:1,b=null!=f&&f.token?null:d,v=function(t){Number.isNaN(t)||c(t)},w=function(t){return g&&(t=parseFloat(new VZ(Math.floor(new VZ(t).div(g))).mul(g).toString())),t},M=function(t){return t=w(t),a&&(t=Math.max(y,Math.min(t,a))),t=w(t)};return G.createElement(lh,{stacked:!0,header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM PaddingBottomS"},G.createElement("h1",{className:"LineHeightL FontSizeL TextCenter"},"Change Amount"),G.createElement("div",{className:"FontSizeL TextCenter FontWeightBold"},G.createElement("strong",null,b))),body:G.createElement("div",{className:"MaxHeight PaddingTopXS"},G.createElement("div",{className:"PaddingLeftM PaddingRightM"},G.createElement("div",{className:"PaddingTopS TextCenter PaddingBottomL"},G.createElement("div",{className:"PaddingBottomM"},G.createElement("input",{max:a?parseFloat(a):null,min:y,step:g,className:"Input FontSizeXXL TextAlignCenter",type:"number",name:"amount",value:parseFloat(u),onChange:function(t){v(t.target.value)},onBlur:function(t){var e;e=t.target.value,c(M(e))}})),a&&G.createElement("div",{style:{height:"40px"}},G.createElement("div",{className:"FontSizeS"},SX(w(a)),G.createElement("div",null,G.createElement("button",{className:"TextButton",onClick:function(){v(M(a))}},"(Max)"))))))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("button",{className:"ButtonPrimary",onClick:function(){var t=M(parseFloat(u));t!=i&&(m(void 0),o(t)),e("back")}},"Done"))})},IX=function(t){var e=G.useContext(_X).paymentValue;return G.createElement(lh,{stacked:!0,header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM PaddingBottomS"},G.createElement("h1",{className:"LineHeightL FontSizeL TextCenter"},"Change Payment"),null!=e&&G.createElement("div",{className:"FontSizeL TextCenter FontWeightBold"},G.createElement("strong",null,e.toString()))),body:G.createElement("div",{className:"MaxHeight PaddingTopXS"},G.createElement("div",{className:"PaddingLeftM PaddingRightM"},G.createElement("div",{className:"Card Skeleton"},G.createElement("div",{className:"SkeletonBackground"})),G.createElement("div",{className:"Card Skeleton"},G.createElement("div",{className:"SkeletonBackground"})),G.createElement("div",{className:"Card Skeleton"},G.createElement("div",{className:"SkeletonBackground"}))))})},jX=function(t){var e=G.useContext(PG).setError,n=G.useContext(KJ),r=n.allRoutes,i=n.setSelectedRoute,o=G.useContext(_X);o.paymentValue;var a=o.displayedPaymentValue,s=G.useContext(ah).navigate,u=h(G.useState([]),2),c=u[0],l=u[1],d=h(G.useState([]),2),f=d[0],p=d[1];return G.useEffect((function(){null!=r&&Promise.all(r.map((function(t){return t.exchangeRoutes[0],t.fromToken,Promise.all([t.fromToken.name(),t.fromToken.symbol(),t.fromToken.decimals(),t.fromToken.readable(t.fromAmount)])}))).then((function(t){l(r.map((function(e,n){return{name:t[n][0],symbol:t[n][1].toUpperCase(),decimals:t[n][2],amount:t[n][3],route:e}})))})).catch(e)}),[r]),G.useEffect((function(){p(c.map((function(t,e){var n=qh(t.route.blockchain);return G.createElement("div",{key:e,className:"Card",title:"Select ".concat(t.symbol," as payment"),onClick:function(){i(t.route),s("back")}},G.createElement("div",{className:"CardImage"},G.createElement(xX,{blockchain:t.route.blockchain,address:t.route.fromToken.address}),G.createElement("img",{className:"BlockchainLogo small",src:n.logo,alt:n.label,title:n.label})),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("h2",{className:"CardText"},G.createElement("div",{className:"TokenAmountRow"},G.createElement("span",{className:"TokenSymbolCell"},t.symbol),G.createElement("span",null," "),G.createElement("span",{className:"TokenAmountCell"},SX(t.amount)))),G.createElement("h3",{className:"CardText small"},G.createElement("small",null,SX(fq(parseFloat(t.route.fromBalance.toString())/Math.pow(10,t.decimals),"down")))))))})))}),[c]),0==c.length||0==f.length?G.createElement(IX,null):G.createElement(lh,{stacked:!0,header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM PaddingBottomS"},G.createElement("h1",{className:"LineHeightL FontSizeL TextCenter"},"Change Payment"),null!=a&&G.createElement("div",{className:"FontSizeL TextCenter FontWeightBold"},G.createElement("strong",null,a.toString()))),body:G.createElement("div",{className:"MaxHeight PaddingTopXS"},G.createElement("div",{className:"PaddingLeftM PaddingRightM"},f)),footer:G.createElement("div",null)})},CX=function(t){var e=G.useContext(sq).title;return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},G.createElement("h1",{className:"LineHeightL FontSizeL"},e||"Donation")),body:G.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},G.createElement("div",{className:"Card Skeleton"},G.createElement("div",{className:"SkeletonBackground"})),G.createElement("div",{className:"Card Skeleton"},G.createElement("div",{className:"SkeletonBackground"}))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("div",{className:"SkeletonWrapper"},G.createElement("div",{className:"ButtonPrimary Skeleton"},G.createElement("div",{className:"SkeletonBackground"}))))})},DX=function(t){return G.createElement("svg",{className:"Checkmark Icon "+t.className,version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 24 24"},G.createElement("path",{d:"M20,4.9L9.2,16l-5.4-3.9c-0.7-0.5-1.6-0.3-2.1,0.3c-0.5,0.7-0.3,1.6,0.3,2.1l6.4,4.7c0.3,0.2,0.6,0.3,0.9,0.3 c0.4,0,0.8-0.2,1.1-0.5l11.7-12c0.6-0.6,0.6-1.6,0-2.2C21.6,4.3,20.6,4.3,20,4.9z"}))},OX=function(t){return G.createElement("svg",{className:"DigitalWalletIcon Icon "+t.className,version:"1.1",xmlns:"http://www.w3.org/2000/svg",height:"24",width:"24",viewBox:"0 0 24 24"},G.createElement("path",{d:"M8.51,4.84l-.39-.53,4-2.89a2.2,2.2,0,0,1,3.06.48l.4.56-.53.39-.4-.56A1.54,1.54,0,0,0,12.5,2Z",transform:"translate(-0.81 -1)"}),G.createElement("path",{d:"M9.77,4.89l-.21-.62,6.31-2.13h0a2.18,2.18,0,0,1,.67-.1h0a2.21,2.21,0,0,1,2.08,1.49l.32.95-.63.21L18,3.73a1.53,1.53,0,0,0-1.45-1h0a1.61,1.61,0,0,0-.48.08h0Z",transform:"translate(-0.81 -1)"}),G.createElement("path",{d:"M19.72,16.2H18.27a3.28,3.28,0,1,1,0-6.56h1.45a3.21,3.21,0,0,1,1.33.28h0a3.28,3.28,0,0,1,0,6A3.21,3.21,0,0,1,19.72,16.2Zm-1.45-5.9a2.63,2.63,0,0,0,0,5.25h1.45a2.56,2.56,0,0,0,1.06-.23,2.62,2.62,0,0,0,0-4.8,2.55,2.55,0,0,0-1.06-.22ZM19,14.53a1.61,1.61,0,1,1,1.61-1.61A1.62,1.62,0,0,1,19,14.53ZM19,12a1,1,0,1,0,.95.95A1,1,0,0,0,19,12Z",transform:"translate(-0.81 -1)"}),G.createElement("path",{d:"M10.49,19.69a1.58,1.58,0,1,1,1.58-1.57A1.57,1.57,0,0,1,10.49,19.69Zm0-2.49a.92.92,0,1,0,.92.92A.92.92,0,0,0,10.49,17.2Z",transform:"translate(-0.81 -1)"}),G.createElement("path",{d:"M19.09,22.14H2.79a2,2,0,0,1-2-2V6.25a2.1,2.1,0,0,1,0-.43,2,2,0,0,1,.48-.92,2,2,0,0,1,1.48-.65H19.09a2,2,0,0,1,.64.1,2,2,0,0,1,1.36,1.79v0a.28.28,0,0,1,0,.09v3.91h-.66v-4a1.49,1.49,0,0,0-.23-.69A1.35,1.35,0,0,0,19.52,5a1.26,1.26,0,0,0-.43-.08H2.82a1.34,1.34,0,0,0-1,.44A1.49,1.49,0,0,0,1.5,6a1.5,1.5,0,0,0,0,.29V20.13a1.36,1.36,0,0,0,1.34,1.35H19.09a1.35,1.35,0,0,0,1.35-1.35V15.68h.66v4.45A2,2,0,0,1,19.09,22.14Z",transform:"translate(-0.81 -1)"}),G.createElement("path",{d:"M9.27,9.31a1.58,1.58,0,1,1,0-3.15,1.58,1.58,0,0,1,0,3.15Zm0-2.5a.92.92,0,1,0,.92.92A.92.92,0,0,0,9.27,6.81Z",transform:"translate(-0.81 -1)"}),G.createElement("path",{d:"M7.11,14.67A1.58,1.58,0,1,1,8.69,13.1,1.57,1.57,0,0,1,7.11,14.67Zm0-2.49A.92.92,0,1,0,8,13.1.92.92,0,0,0,7.11,12.18Z",transform:"translate(-0.81 -1)"}),G.createElement("rect",{x:"0.33",y:"11.77",width:"4.72",height:"0.66"}),G.createElement("polygon",{points:"2.08 9.53 0.33 9.53 0.33 8.87 1.8 8.87 4.28 6.39 7.21 6.39 7.21 7.05 4.55 7.05 2.08 9.53"}),G.createElement("polygon",{points:"8.43 17.45 4.53 17.45 2.63 15.55 0.33 15.55 0.33 14.89 2.9 14.89 4.8 16.79 8.43 16.79 8.43 17.45"}))},PX={ethereum:13,bsc:4,polygon:3},zX=function(t){return G.createElement("div",{className:"LoadingText"},t.children,G.createElement("span",{className:"dot"},"."),G.createElement("span",{className:"dot"},"."),G.createElement("span",{className:"dot"},"."))},RX=function(){var t=G.useContext(aq);t.amount,t.amountsMissing;var e=G.useContext(XJ),n=e.synchronousTracking,r=e.asynchronousTracking,i=e.trackingInitialized,o=e.release,a=e.forwardTo,s=e.confirmationsRequired,u=e.confirmationsPassed,c=G.useContext(JJ),l=c.payment,d=c.paymentState,f=c.pay,p=c.transaction,m=c.approve,y=c.approvalTransaction,g=G.useContext(_X);g.paymentValue;var b=g.displayedPaymentValue,v=g.paymentValueLoss,w=G.useContext(KJ),M=w.updatedRouteWithNewPrice,_=w.updateRouteWithNewPrice;G.useContext(ah).navigate;var E=G.useContext(q).close,A=h(G.useState(),2),S=A[0],k=A[1],N=h(G.useState(0),2),T=N[0],x=N[1];G.useEffect((function(){if(s){var t=setInterval((function(){x(T+1)}),1e3);return function(){clearInterval(t)}}}),[s,T]),G.useEffect((function(){u&&k(function(t,e,n){return(e-n)*PX[t]}(l.blockchain,s,u)-T)}),[u,T]),G.useEffect((function(){u&&x(0)}),[u]);return G.createElement("div",null,null==l.route||!l.route.approvalRequired||l.route.directTransfer?null:"initialized"==d?G.createElement("div",{className:"PaddingBottomXS"},G.createElement("button",{className:"ButtonPrimary",onClick:m,title:"Allow ".concat(l.symbol," to be used as payment")},"Allow ",l.symbol," to be used as payment")):"approving"==d?G.createElement("div",{className:"PaddingBottomXS"},G.createElement("a",{className:"ButtonPrimary",title:"Approving payment token - please wait",href:null==y?void 0:y.url,target:"_blank",rel:"noopener noreferrer"},G.createElement(zX,null,"Approving"))):void 0,"paying"==d&&null==p?G.createElement("div",{className:"PaddingBottomS"},G.createElement("div",{className:"Card transparent disabled small"},G.createElement("div",{className:"CardImage"},G.createElement("div",{className:"TextCenter Opacity05"},G.createElement(OX,{className:"small"}))),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("div",{className:"Opacity05"},"Confirm transaction in your wallet"))))):"success"==d?G.createElement("div",{className:"PaddingBottomS"},G.createElement("div",null,G.createElement("a",{className:"Card transparent small",title:"Transaction has been confirmed by the network",href:null==p?void 0:p.url,target:"_blank",rel:"noopener noreferrer"},G.createElement("div",{className:"CardImage"},G.createElement("div",{className:"TextCenter Opacity05"},G.createElement(DX,{className:"small"}))),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("div",{className:"Opacity05"},"Transaction confirmed"))))),0==n&&0==r||r&&i?null:r&&0==i?G.createElement("div",null,G.createElement("div",{className:"Card transparent small disabled"},G.createElement("div",{className:"CardImage"},G.createElement("div",{className:"TextCenter"},G.createElement("div",{className:"Loading Icon"}))),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("div",{className:"Opacity05"},"Initializing tracking"))))):o?G.createElement("div",null,G.createElement("div",{className:"Card transparent small disabled"},G.createElement("div",{className:"CardImage"},G.createElement("div",{className:"TextCenter Opacity05"},G.createElement(DX,{className:"small"}))),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("div",{className:"Opacity05"},"Payment validated"))))):G.createElement("div",null,G.createElement("div",{className:"Card transparent small disabled"},G.createElement("div",{className:"CardImage"},G.createElement("div",{className:"TextCenter"},G.createElement("div",{className:"Loading Icon"}))),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("div",{className:"Opacity05"},"Validating payment",s&&S>0&&G.createElement("span",{title:"".concat(u,"/").concat(s," required confirmations")}," ",S,"s"))))))):void 0,M?G.createElement("div",null,G.createElement("div",{className:"PaddingBottomXS"},G.createElement("div",{className:"Alert"},G.createElement("strong",null,"Price updated!"))),G.createElement("button",{className:"ButtonPrimary",onClick:function(){_()}},"Reload")):v?G.createElement("div",null,G.createElement("div",{className:"PaddingBottomXS"},G.createElement("div",{className:"Alert"},G.createElement("strong",null,"Payment token would lose ",v,"% of it's value!"))),G.createElement("button",{className:"ButtonPrimary disabled",onClick:function(){}},"Pay ",b)):"initialized"!=d&&"approving"!=d||!l.route?"paying"==d?G.createElement("a",{className:"ButtonPrimary",title:"Performing the payment - please wait",href:null==p?void 0:p.url,target:"_blank",rel:"noopener noreferrer"},G.createElement(zX,null,"Paying")):"success"==d?1==n?o?a?G.createElement("a",{className:"ButtonPrimary",href:a,rel:"noopener noreferrer"},"Continue"):G.createElement("button",{className:"ButtonPrimary",onClick:E},"Continue"):G.createElement("button",{className:"ButtonPrimary disabled",onClick:function(){}},"Continue"):1==r&&0==i?G.createElement("button",{className:"ButtonPrimary disabled",onClick:function(){}},"Close"):G.createElement("button",{className:"ButtonPrimary",onClick:E},"Close"):void 0:G.createElement("button",{className:["ButtonPrimary",l.route.approvalRequired&&!l.route.directTransfer?"disabled":""].join(" "),onClick:function(){l.route.approvalRequired&&!l.route.directTransfer||f()}},"Pay ",b))},BX=function(t){var e=G.useContext(sq);e.currencyCode;var n=e.title;G.useContext(aq).amount;var r=G.useContext(JJ),i=r.payment,o=r.paymentState,a=G.useContext(_X).displayedPaymentValue,s=G.useContext(ah).navigate;if(null==i)return G.createElement(CX,null);var u=qh(i.blockchain);return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},G.createElement("h1",{className:"LineHeightL FontSizeL"},n||"Donation")),body:G.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},G.createElement("div",{className:["Card","initialized"==o?"":"disabled"].join(" "),title:"initialized"==o?"Change amount":void 0,onClick:function(){"initialized"==o&&s("ChangeAmount")}},G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("h4",{className:"CardTitle"},"Amount"),G.createElement("h2",{className:"CardText"},G.createElement("div",{className:"TokenAmountRow"},a)))),G.createElement("div",{className:"CardAction"},G.createElement(dh,null))),G.createElement("div",{className:["Card","initialized"==o?"":"disabled"].join(" "),title:"initialized"==o?"Change payment":void 0,onClick:function(){"initialized"==o&&s("ChangePayment")}},G.createElement("div",{className:"CardImage",title:i.name},G.createElement(xX,{blockchain:i.route.blockchain,address:i.token}),G.createElement("img",{className:"BlockchainLogo small",src:u.logo,alt:u.label,title:u.label})),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("h4",{className:"CardTitle"},"Payment"),G.createElement("h2",{className:"CardText"},G.createElement("div",{className:"TokenAmountRow"},G.createElement("span",{className:"TokenSymbolCell"},i.symbol),G.createElement("span",null," "),G.createElement("span",{className:"TokenAmountCell"},SX(i.amount)))))),G.createElement("div",{className:"CardAction"},G.createElement(dh,null)))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement(RX,null))})},UX=function(){var t=G.useContext(q).close,e=G.useContext(JJ).transaction;return G.createElement(lh,{stacked:!1,header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"}),body:G.createElement("div",{className:"TextCenter"},G.createElement("div",{className:"GraphicWrapper"},G.createElement("img",{className:"Graphic",src:zG})),G.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Payment Failed"),G.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},G.createElement("strong",{className:"FontSizeM"},"Unfortunately executing your payment failed, but you can try again."),e&&G.createElement("div",{className:"PaddingTopS"},G.createElement("a",{className:"Link",title:"Check your transaction on a block explorer",href:null==e?void 0:e.url,target:"_blank",rel:"noopener noreferrer"},"View on explorer")))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("button",{className:"ButtonPrimary",onClick:function(){return t()}},"Try again"))})},FX=function(t){var e=G.useContext(JJ).payment,n=G.useContext(ah).navigate,r=qh(e.route.blockchain);return G.createElement(lh,{stacked:!0,header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},G.createElement("h1",{className:"LineHeightL FontSizeL"},"Wrong Network")),body:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM PaddingBottomXS TextCenter"},G.createElement("div",{className:"GraphicWrapper"},G.createElement("img",{className:"Graphic",src:"data:image/png;base64,iVBOR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+s5N3yLPF1ZSN5yFJAQKwf2F5SCfsT+DePQqi/u7+wLklsUJDzXMX+Fn34M+c+btQzG/zIHSxgKRAhgCA/Xh3xS7hEMEKDoIlghADhE8FIWGIiuHNiIrh3YiK4d/Lg79qLhEXGUmDnfNDR4YhiYwNCkfBEBeydqIC9w8uogH3Dy1gL7Btexn7AvuFZ6BN4kbBs9Ox4BI1tP0IkgoDsTmOFeg5DJDR5SeM0biQUPCNyIDsSiscDWUp6Z7MiayAYHMzfwCGdCD46DsA7Gt9/6V90HVsnzxYd1eT6fH/sKH8CnL28sRNe5m1Y8Xlj+EY023sKXWT8+Xxg0eeXeTNF+0QHhXqrNzzLJwrg04CH9UwRBfDJcHicgwUIFrF+/DDa1M5ueCY3ecA/Mre4a1/mDVG/VH9on+zAo+EjVv4Hb1pRc1A6sKoAAAAASUVORK5CYII="})),G.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Connect to ",r.label),G.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},G.createElement("strong",{className:"FontSizeM"},"Please make sure you connect your wallet to the correct network before you try again!"))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("button",{className:"ButtonPrimary",onClick:function(){return n("back")}},"Try again"))})},YX=function(t){var e=G.useContext(q),n=e.open,r=e.close,i=G.useContext(ZJ).setNavigator;return G.createElement(ch,{setNavigator:i,open:n,close:r,start:"DonationOverview",container:t.container,document:t.document,dialogs:{DonationOverview:G.createElement(BX,null),ChangeAmount:G.createElement(LX,null),ChangePayment:G.createElement(jX,null),PaymentFailed:G.createElement(UX,null),WrongNetwork:G.createElement(FX,null)}})},QX=function(t){var e;return G.createElement(ZJ.Provider,{value:{navigate:function(t){e&&e.navigate(t)},set:function(t){e&&e.set(t)},setNavigator:function(t){e=t}}},t.children)},WX=function(t){G.useContext(PG).errorCallback;var n=G.useContext(sq),r=n.track,i=n.validated,o=n.integration,a=n.link,s=n.type,c=G.useContext(pq),l=c.account;c.wallet;var d=h(G.useState(),2),f=d[0],p=d[1],m=h(G.useState(),2),y=m[0],g=m[1],b=h(G.useState(),2),v=b[0],w=b[1],M=h(G.useState(),2),_=M[0],E=M[1],A=h(G.useState(),2);A[0],A[1];var S=h(G.useState(),2),k=S[0],N=S[1],T=h(G.useState(!1),2),x=T[0],L=T[1],I=h(G.useState(!(!r||!r.endpoint&&"function"!=typeof r.method||1==r.async)),1)[0],j=h(G.useState(!(!r||1!=r.async)),1)[0],C=h(G.useState(!(!r||!r.poll||!r.poll.endpoint&&"function"!=typeof r.poll.method||1==r.async)),1)[0],D=h(G.useState(!1),2),O=D[0],P=D[1],z=h(G.useState(),2),R=z[0],B=z[1],U=G.useContext(q).setClosable,F=G.useContext(ZJ),Y=F.navigate;F.set;var Q=function e(n){var r=new WebSocket("wss://integrate.depay.com/cable");r.onopen=function(t){var e,i={command:"subscribe",identifier:JSON.stringify({blockchain:n.blockchain,sender:n.from,nonce:null==n||null===(e=n.nonce)||void 0===e?void 0:e.toString(),channel:"PaymentChannel"})};r.send(JSON.stringify(i))},r.onclose=function(t){t&&1e3==t.code||e(n)},r.onmessage=function(e){var n=JSON.parse(e.data);"ping"!==n.type&&n.message&&(i&&i("success"==n.message.status),n.message.release?(P(!0),U(!n.message.forward_to),B(n.message.forward_to),r.close(1e3),n.message.forward_to&&setTimeout((function(){t.document.location.href=n.message.forward_to}),200)):n.message.confirmations&&(g(n.message.confirmations.required),w(n.message.confirmations.passed)))},r.onerror=function(t){console.log("WebSocket Error: "+t)}},W=function(t,e,n,i){(i=parseInt(i||1,10))<((null==r?void 0:r.attempts)||40)?setTimeout((function(){H(t,e,n,i+1)}),3e3):Y("TrackingFailed")},H=function(t,e,n,i){var o,a;(function(t){if(r.endpoint)return fetch(r.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((function(t){if(200==t.status||201==t.status)return t;throw t}));if(r.method)return r.method(t);throw"No tracking defined!"})({blockchain:t.blockchain,transaction:t.id,sender:t.from,nonce:null==t||null===(o=t.nonce)||void 0===o?void 0:o.toString(),after_block:e.toString(),from_token:n.fromToken.address,from_amount:n.fromAmount.toString(),from_decimals:n.fromDecimals,to_token:n.toToken.address,to_amount:n.toAmount.toString(),to_decimals:n.toDecimals,fee_amount:null==n||null===(a=n.feeAmount)||void 0===a?void 0:a.toString()}).then((function(t){L(!0),console.log("PAYMENT TRACKING INITIALIZED")})).catch((function(r){console.log("PAYMENT TRACKING FAILED",r),W(t,e,n,i)}))};G.useEffect((function(){if(C&&I){var e=setInterval((function(){return function(e,n,o,a,s){var u;if(e&&null!=n&&null!=o&&null!=a){var c={blockchain:n.blockchain,transaction:n.id,sender:n.from,nonce:null==n||null===(u=n.nonce)||void 0===u?void 0:u.toString(),after_block:o.toString(),to_token:a.toToken.address},l=function(e){e&&(e&&e.forward_to?(B(e.forward_to),setTimeout((function(){t.document.location.href=e.forward_to}),100)):U(!0),clearInterval(s),i&&i(!0),P(!0))};r.poll.endpoint?fetch(r.poll.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)}).then((function(t){return 200==t.status||201==t.status?t.json().catch((function(){U(!0)})):void 0})).then(l):r.poll.method&&r.poll.method(c).then(l)}}(C,f,_,k,e)}),5e3);return function(){clearInterval(e)}}}),[C,f,_,k]);var Z=function t(e,n,r,i){var u;fetch("https://public.depay.com/payments",{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({blockchain:e.blockchain,transaction:e.id,sender:e.from,nonce:null==e||null===(u=e.nonce)||void 0===u?void 0:u.toString(),receiver:r.toAddress,token:r.toToken.address,amount:r.fee?RM(r.transaction.params.amounts[1],r.toDecimals):RM(r.toAmount,r.toDecimals),confirmations:1,after_block:n.toString(),uuid:e.id,payload:{sender_id:e.from,sender_token_id:r.fromToken.address,sender_amount:RM(r.fromAmount,r.fromDecimals),integration:o,link:a,type:s},fee_amount:r.fee?RM(r.transaction.params.amounts[4],r.toDecimals):null,fee_receiver:r.fee?r.transaction.params.addresses[1]:null})}).then((function(i){200==i.status||201==i.status||setTimeout((function(){t(e,n,r)}),3e3)})).catch((function(i){setTimeout((function(){t(e,n,r)}),3e3)}))};return G.createElement(XJ.Provider,{value:{synchronousTracking:I,asynchronousTracking:j,initializeTracking:function(t,e,n){Z(t,e,n),(I||r&&1==r.async)&&H(t,e,n),0!=I&&(p(t),E(e),N(n),Q(t))},preTrack:function(t,n){return I||j?new Promise(function(){var i=e(u.mark((function e(i,o){var a,s;return u.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=n.blockchain,e.t1=l,e.next=4,EH({blockchain:n.blockchain,address:l,method:"transactionCount"});case 4:if(e.t2=e.sent.toString(),e.t3=t.toString(),e.t4=n.fromToken.address,e.t5=n.fromAmount.toString(),e.t6=n.fromDecimals,e.t7=n.toToken.address,e.t8=n.toAmount.toString(),e.t9=n.toDecimals,e.t10=null==n||null===(a=n.feeAmount)||void 0===a?void 0:a.toString(),s={blockchain:e.t0,sender:e.t1,nonce:e.t2,after_block:e.t3,from_token:e.t4,from_amount:e.t5,from_decimals:e.t6,to_token:e.t7,to_amount:e.t8,to_decimals:e.t9,fee_amount:e.t10},!r.endpoint){e.next=18;break}return e.abrupt("return",fetch(r.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).then((function(t){return 200==t.status||201==t.status?(console.log("PAYMENT PRETRACKING INITIALIZED"),i()):o("PRETRACKING REQUEST FAILED")})));case 18:r.method?r.method(s).then(i).catch(o):o("No tracking defined!");case 19:case"end":return e.stop()}}),e)})));return function(t,e){return i.apply(this,arguments)}}()):Promise.resolve()},trackingInitialized:x,continueTryTracking:function(){W(f,_,k,1)},release:O,forwardTo:R,confirmationsRequired:y,confirmationsPassed:v}},t.children)},HX=function(t){var e=h(G.useState(),2),n=e[0],r=e[1],i=h(G.useState(),2),o=i[0],a=i[1],s=h(G.useState(!1),2),u=s[0],c=s[1];G.useContext(PG).errorCallback;var l=G.useContext(sq).recover;G.useEffect((function(){if(u){var t=function(){fetch("https://public.depay.com/transactions/".concat(n.blockchain,"/").concat(n.from,"/").concat(n.nonce)).then((function(t){200==t.status&&t.json().then((function(t){"pending"!=t.status&&(a({id:t.external_id,status:t.status}),c(!1))}))}))},e=setInterval(t,5e3);return t(),function(){clearInterval(e)}}}),[u]);var d=function t(e,n,r){var i;r>3?console.log("TRANSACTION TRACKING FAILED AFTER 3 ATTEMPTS!"):fetch("https://public.depay.com/transactions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id,after_block:n.toString(),blockchain:e.blockchain,sender:e.from,nonce:null==e||null===(i=e.nonce)||void 0===i?void 0:i.toString()})}).then((function(i){200==i.status||201==i.status?console.log("TRANSACTION TRACKING INITIALIZED"):(console.log("TRANSACTION TRACKING FAILED",i),setTimeout((function(){t(e,n,r+1)}),3e3))})).catch((function(i){console.log("TRANSACTION TRACKING FAILED",i),setTimeout((function(){t(e,n,r+1)}),3e3)}))},f=function t(e){var n=new WebSocket("wss://integrate.depay.com/cable");n.onopen=function(t){var r,i={command:"subscribe",identifier:JSON.stringify({blockchain:e.blockchain,sender:e.from,nonce:null==e||null===(r=e.nonce)||void 0===r?void 0:r.toString(),channel:"TransactionChannel"})};n.send(JSON.stringify(i))},n.onclose=function(n){n&&1e3==n.code||t(e)},n.onmessage=function(t){var e=JSON.parse(t.data);"ping"!==e.type&&e.message&&e.message.status&&"pending"!=e.message.status&&(a(e.message),n.close(1e3))},n.onerror=function(t){console.log("WebSocket Error: "+t)}},p=function(t,e){r(t),null==l&&d(t,e,1),f(t),c(!0)};return G.useEffect((function(){l&&p({blockchain:l.blockchain,id:l.transaction,from:l.sender,nonce:l.nonce},l.afterBlock)}),[l]),G.createElement($J.Provider,{value:{initializeTracking:p,foundTransaction:o}},t.children)},GX=function(t){var n=G.useContext(sq).recover;G.useContext(PG).setError;var r=h(G.useState(),2),i=r[0],o=r[1],a=h(G.useState(),2),s=a[0],c=a[1],l=h(G.useState(),2),d=l[0],f=l[1],p=function(e){var n=e.account,r=e.wallet;c(n),o(r),f("connected"),t.connected&&t.connected(n)};return G.useEffect((function(){if(null==n){var t=function(){var t=e(u.mark((function t(){var e,n,r;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,NG();case 2:if(!(e=t.sent)||1!=e.length){t.next=9;break}return n=e[0],t.next=7,n.account();case 7:r=t.sent,p({account:r,wallet:n});case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t()}}),[]),"connected"==d||null!=n?G.createElement(pq.Provider,{value:{account:s,wallet:i,walletState:d}},t.children):G.createElement(xG,{document:t.document,container:t.container,resolve:p})},qX=function(){var t=e(u.mark((function t(e){var n;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=e.accept)instanceof Array&&0!=n.length){t.next=3;break}throw"You need to set the tokens you accept as donation!";case 3:n.forEach((function(t){if(void 0===t.blockchain)throw"You need to set the blockchain you want to receive the donation on!";if(!["ethereum","bsc","polygon"].includes(t.blockchain))throw"You need to set a supported blockchain!";if(void 0===t.token)throw"You need to set the token you want to receive as donation!";if(void 0===t.receiver)throw"You need to set the receiver address that you want to receive the donation!"}));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ZX=function(){var t=e(u.mark((function t(e){var n,r,i,o,a,s,c,l,h,d,f,p,m,y,g,b,v,w,M,_,E,A,S,k,N;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.amount,r=e.accept,i=e.event,o=e.sent,a=e.succeeded,s=e.validated,c=e.failed,l=e.error,h=e.critical,d=e.style,f=e.whitelist,p=e.blacklist,m=e.providers,y=e.currency,g=e.connected,b=e.closed,v=e.track,w=e.fee,M=e.closable,_=e.integration,E=e.link,A=e.container,S=e.title,k=e.document,iq(),t.prev=2,t.next=5,qX({accept:r});case 5:return N=nq({style:d,container:A,document:LG(k),closed:b},(function(t){return function(e){return G.createElement(FG,{errorCallback:l,container:e,unmount:t},G.createElement(HJ,{configuration:{type:"donation",amount:n,accept:r,currency:y,event:i,track:v,fee:w,sent:o,succeeded:a,validated:s,failed:c,blacklist:p,whitelist:f,providers:m,integration:_,link:E,title:S}},G.createElement(oq,null,G.createElement(V,{unmount:t,closable:M},G.createElement(GX,{container:e,connected:g,unmount:t},G.createElement(QX,null,G.createElement(GJ,null,G.createElement(YJ,{accept:r},G.createElement(HX,null,G.createElement(WX,{document:LG(k)},G.createElement(AX,{container:e,document:k},G.createElement(YX,{document:k,container:e}),G.createElement(rq,null))))))))))))}})),t.abrupt("return",{unmount:N});case 9:t.prev=9,t.t0=t.catch(2),console.log("critical error",t.t0),null!=h&&h(t.t0);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}(),VX=function(t){var e=G.useContext(PG).setError,n=G.useContext(sq),r=n.message,i=n.endpoint,o=G.useContext(sq).recoverSignature,a=G.useContext(pq).wallet;if(!a)return null;null==a||!a.name||a.name;var s=null!=a&&a.logo?a.logo:void 0;"function"!=typeof o&&(o=function(t){var n=t.message,r=t.signature;return new Promise((function(t,o){fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:n,signature:r})}).then((function(n){200==n.status?n.text().then((function(e){t(e)})).catch(e):n.text().then((function(t){e(t||"Recovering login signature failed!")}))}))}))});return G.createElement(lh,{body:G.createElement("div",{className:"TextCenter"},s&&G.createElement("div",{className:"GraphicWrapper PaddingTopS PaddingBottomS"},G.createElement("img",{className:"Graphic",src:s})),G.createElement("h1",{className:"LineHeightL Text FontSizeL FontWeightBold PaddingTopS"},"Wallet Login"),G.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},G.createElement("p",{className:"FontSizeM PaddingLeftM PaddingRightM PaddingBottomS"},'Please click "Log in" and sign the message with your connected wallet.'))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("button",{className:"ButtonPrimary",onClick:function(){a.sign(r).then((function(n){o({message:r,signature:n}).then(t.resolve).catch(e)})).catch((function(t){t&&t.code&&4001==t.code||e(t)}))}},"Log in"))})},JX=function(t){var e=G.useContext(q),n=e.open,r=e.close;return G.createElement(ch,{open:n,close:r,start:"SignLogin",container:t.container,document:t.document,dialogs:{SignLogin:G.createElement(VX,{resolve:t.resolve,userClosedDialog:t.userClosedDialog})}})},KX=G.createContext(),XX=function(t){var e=G.useContext(aq),n=e.amountsMissing,r=e.acceptWithAmount,i=e.setMaxRoute,o=h(G.useState(),2),a=o[0],s=o[1];return G.useEffect((function(){n?r&&s(r):s(t.accept)}),[n,r]),G.createElement(KX.Provider,{value:{}},G.createElement(MX,{accept:a,whitelist:t.whitelist,blacklist:t.blacklist,event:t.event,setMaxRoute:i,fee:t.fee},t.children))},$X=function(t){var e=G.useContext(aq),n=e.amountsMissing,r=e.fixedAmount,i=G.useContext(KJ),o=i.slowRouting,a=i.selectedRoute;return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},G.createElement("h1",{className:"LineHeightL FontSizeL"},"Payment")),body:G.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},n&&!r&&G.createElement("div",{className:"Card Skeleton"},G.createElement("div",{className:"SkeletonBackground"})),G.createElement("div",{className:"Card Skeleton"},G.createElement("div",{className:"SkeletonBackground"}))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("div",{className:"SkeletonWrapper"},G.createElement("div",{className:"ButtonPrimary Skeleton"},G.createElement("div",{className:"SkeletonBackground"}))),null==a&&o&&G.createElement("div",{className:"TextCenter Opacity05 PaddingTopS"},G.createElement("strong",null,"Loading payment routes...")))})},t$=function(t){var e=G.useContext(sq),n=e.currencyCode,r=e.recover,i=e.amount,o=G.useContext(JJ),a=o.payment,s=o.paymentState,u=G.useContext(aq),c=u.amount,l=u.amountsMissing,h=u.fixedAmount,d=u.fixedCurrency,f=G.useContext(_X).paymentValue,p=G.useContext(ah).navigate,m=null!=i&&i.token?null:n;if(null==a||null==r&&null==f)return G.createElement($X,null);var y=qh(a.blockchain);return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},G.createElement("h1",{className:"LineHeightL FontSizeL"},"Payment")),body:G.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},l&&!h&&G.createElement("div",{className:["Card","initialized"==s?"":"disabled"].join(" "),title:"initialized"==s?"Change amount":void 0,onClick:function(){"initialized"==s&&p("ChangeAmount")}},G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("h4",{className:"CardTitle"},"Amount"),G.createElement("h2",{className:"CardText"},m&&G.createElement("div",{className:"TokenAmountRow"},new WJ({amount:c.toFixed(2),code:n}).toString()),!m&&G.createElement("div",{className:"TokenAmountRow"},c)))),G.createElement("div",{className:"CardAction"},G.createElement(dh,null))),G.createElement("div",{className:["Card","initialized"==s?"":"disabled"].join(" "),title:"initialized"==s?"Change payment":void 0,onClick:function(){"initialized"==s&&p("ChangePayment")}},G.createElement("div",{className:"CardImage",title:a.name},G.createElement(xX,{blockchain:a.blockchain,address:a.token}),G.createElement("img",{className:"BlockchainLogo small",src:y.logo,alt:y.label,title:y.label})),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},l&&!d&&G.createElement("h4",{className:"CardTitle"},"Payment"),G.createElement("h2",{className:"CardText"},G.createElement("div",{className:"TokenAmountRow"},G.createElement("span",{className:"TokenSymbolCell"},a.symbol),G.createElement("span",null," "),G.createElement("span",{className:"TokenAmountCell"},SX(a.amount)))))),G.createElement("div",{className:"CardAction"},G.createElement(dh,null)))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement(RX,null))})},e$=function(){G.useContext(JJ).transaction;var t=G.useContext(ah).navigate;return G.createElement(lh,{stacked:!1,header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"}),body:G.createElement("div",{className:"TextCenter"},G.createElement("div",{className:"GraphicWrapper"},G.createElement("img",{className:"Graphic",src:zG})),G.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Tracking payment failed"),G.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},G.createElement("strong",{className:"FontSizeM"},'Please ensure you are connected to the internet, then click "Try again".'),G.createElement("div",{className:"PaddingTopS"},G.createElement("span",null,"If this keeps happening, please report it.")))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("button",{className:"ButtonPrimary",onClick:function(){t("back")}},"Try again"))})},n$=function(){var t=G.useContext(XJ).continueTryTracking;G.useContext(JJ).transaction;var e=G.useContext(ah).navigate;return G.createElement(lh,{stacked:!1,header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"}),body:G.createElement("div",{className:"TextCenter"},G.createElement("div",{className:"GraphicWrapper"},G.createElement("img",{className:"Graphic",src:zG})),G.createElement("h1",{className:"LineHeightL Text FontSizeL PaddingTopS FontWeightBold"},"Tracking payment failed"),G.createElement("div",{className:"Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},G.createElement("strong",{className:"FontSizeM"},'Please ensure you are connected to the internet, then click "Try again".'),G.createElement("div",{className:"PaddingTopS"},G.createElement("span",null,"If this keeps happening, please report it.")))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("button",{className:"ButtonPrimary",onClick:function(){t(),e("back")}},"Try again"))})},r$=function(t){var e=G.useContext(q),n=e.open,r=e.close,i=G.useContext(ZJ).setNavigator;return G.createElement(ch,{setNavigator:i,open:n,close:r,start:"PaymentOverview",container:t.container,document:t.document,dialogs:{PaymentOverview:G.createElement(t$,null),ChangeAmount:G.createElement(LX,null),ChangePayment:G.createElement(jX,null),PaymentFailed:G.createElement(UX,null),WrongNetwork:G.createElement(FX,null),TrackingFailed:G.createElement(n$,null),PreTrackingFailed:G.createElement(e$,null)}})},i$=function(){var t=e(u.mark((function t(e){var n;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.accept,!e.recover){t.next=3;break}return t.abrupt("return");case 3:n.forEach((function(t){if(void 0===t.blockchain)throw"You need to set the blockchain your want to receive the payment on!";if(!["ethereum","bsc","polygon"].includes(t.blockchain))throw"You need to set a supported blockchain!";if(void 0===t.token&&void 0===t.fromToken&&void 0===t.fromAmount&&void 0===t.toToken)throw"You need to set the token you want to receive as payment!";if(void 0===t.token&&void 0!==t.fromToken&&void 0===t.fromAmount&&void 0===t.toToken)throw"You need to set the fromToken, fromAmount and toToken!";if(void 0===t.receiver)throw"You need to set the receiver address that you want to receive the payment!"}));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),o$=function(){var t=e(u.mark((function t(e){var n,r,i,o,a,s,c,l,h,d,f,p,m,y,g,b,v,w,M,_,E,A,S,k,N;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.accept,r=e.amount,i=e.sent,o=e.succeeded,a=e.validated,s=e.failed,c=e.error,l=e.critical,h=e.style,d=e.whitelist,f=e.blacklist,p=e.providers,m=e.currency,y=e.connected,g=e.closed,b=e.track,v=e.fee,w=e.recover,M=e.closable,_=e.integration,E=e.link,A=e.container,S=e.before,k=e.document,iq(),t.prev=2,t.next=5,i$({accept:n,recover:w});case 5:return N=nq({style:h,container:A,document:LG(k),closed:g},(function(t){return function(e){return G.createElement(FG,{errorCallback:c,container:e,unmount:t},G.createElement(HJ,{configuration:{type:"payment",before:S,amount:r,accept:n,currency:m,event:event,sent:i,succeeded:o,validated:a,failed:s,whitelist:d,blacklist:f,providers:p,track:b,fee:v,recover:w,integration:_,link:E}},G.createElement(oq,null,G.createElement(V,{unmount:t,closable:M},G.createElement(GX,{document:k,container:e,connected:y,unmount:t},G.createElement(QX,null,G.createElement(GJ,null,G.createElement(YJ,{accept:n},G.createElement(XX,{accept:n,whitelist:d,blacklist:f,event:event,fee:v},G.createElement(HX,null,G.createElement(WX,{document:LG(k)},G.createElement(tK,{container:e,document:k},G.createElement(EX,null,G.createElement(r$,{document:k,container:e}),G.createElement(rq,null))))))))))))))}})),t.abrupt("return",{unmount:N});case 9:t.prev=9,t.t0=t.catch(2),console.log("critical error",t.t0),null!=l&&l(t.t0);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}();o$.preload=function(t){var e=t.account,n=t.accept,r=t.whitelist,i=t.blacklist;t.event;var o=t.fee;bX({account:e,accept:n,whitelist:r,blacklist:i,fee:o})};var a$=G.createContext(),s$=G.createContext(),u$=function(t){var e=G.useContext(JJ).payment,n=h(G.useState(),2),r=n[0],i=n[1],o=h(G.useState(),2),a=o[0],s=o[1];return G.useEffect((function(){e&&Promise.all([e.route.toToken.symbol(),e.route.toToken.readable(e.route.toAmount)]).then((function(t){var n=h(t,2),r=n[0],o=n[1];i({address:e.route.toToken.address,symbol:r}),s(o)}))}),[e]),G.createElement(s$.Provider,{value:{toToken:r,toTokenReadableAmount:a}},t.children)},c$=function(t){var e=G.useContext(aq),n=e.acceptWithAmount,r=e.setMaxRoute,i=G.useContext(sq).sell,o=G.useContext(sq).blacklist;for(var a in null==o&&(o={}),i){var s=i[a];o[a]instanceof Array?o[a].push(s):o[a]=[s]}return G.createElement(a$.Provider,{value:{}},G.createElement(MX,{accept:n,blacklist:o,setMaxRoute:r},G.createElement(tK,{container:t.container,document:t.document},G.createElement(EX,null,G.createElement(u$,null,t.children)))))},l$=function(t){return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},G.createElement("h1",{className:"LineHeightL FontSizeL"},"Purchase")),body:G.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},G.createElement("div",{className:"Card Skeleton",style:{height:"100px"}},G.createElement("div",{className:"SkeletonBackground"})),G.createElement("div",{className:"Card Skeleton"},G.createElement("div",{className:"SkeletonBackground"}))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("div",{className:"SkeletonWrapper"},G.createElement("div",{className:"ButtonPrimary Skeleton"},G.createElement("div",{className:"SkeletonBackground"}))))})},h$=function(t){G.useContext(aq).amount;var e,n=G.useContext(sq),r=n.tokenImage,i=n.amount,o=G.useContext(_X).paymentValue,a=G.useContext(JJ),s=a.payment,u=a.paymentState,c=G.useContext(ah).navigate,l=G.useContext(s$),d=l.toToken,f=l.toTokenReadableAmount,p=h(G.useState(),2),m=p[0],y=p[1];if(G.useEffect((function(){if(o&&(null==i||1!=i.token)&&f){var t=o.amount/parseFloat(f),e=new WJ({amount:t,code:o.code}).toString();e!=new WJ({amount:0,code:o.code}).toString()&&y(e)}}),[o,f]),null==d||null==f||null==s||null==o)return G.createElement(l$,null);e=r?G.createElement("img",{src:r}):G.createElement(xX,{blockchain:s.route.blockchain,address:d.address});var g=qh(s.blockchain);return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},G.createElement("h1",{className:"LineHeightL FontSizeL"},"Purchase")),body:G.createElement("div",{className:"PaddingLeftM PaddingRightM PaddingBottomXS"},G.createElement("div",{className:["Card","initialized"==u?"":"disabled"].join(" "),title:"initialized"==u?"Change amount":void 0,onClick:function(){"initialized"==u&&c("ChangeAmount")}},G.createElement("div",{className:"CardImage",title:s.name},e,G.createElement("img",{className:"BlockchainLogo small",src:g.logo,alt:g.label,title:g.label})),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("h4",{className:"CardTitle"},"Amount"),G.createElement("h2",{className:"CardText"},G.createElement("div",{className:"TokenAmountRow"},G.createElement("span",{className:"TokenSymbolCell"},d.symbol),G.createElement("span",null," "),G.createElement("span",{className:"TokenAmountCell"},SX(f)))),m&&G.createElement("h3",{className:"CardText small"},G.createElement("small",null,m," per token")))),G.createElement("div",{className:"CardAction"},G.createElement(dh,null))),G.createElement("div",{className:["Card","initialized"==u?"":"disabled"].join(" "),title:"initialized"==u?"Change payment":void 0,onClick:function(){"initialized"==u&&c("ChangePayment")}},G.createElement("div",{className:"CardImage",title:s.name},G.createElement(xX,{blockchain:s.route.blockchain,address:s.token})),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardBodyWrapper"},G.createElement("h4",{className:"CardTitle"},"Payment"),G.createElement("h2",{className:"CardText"},G.createElement("div",{className:"TokenAmountRow"},G.createElement("span",{className:"TokenSymbolCell"},s.symbol),G.createElement("span",null," "),G.createElement("span",{className:"TokenAmountCell"},SX(s.amount)))))),G.createElement("div",{className:"CardAction"},G.createElement(dh,null)))),footer:G.createElement("div",{className:"PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement(RX,null))})},d$=function(t){var e=G.useContext(q),n=e.open,r=e.close,i=G.useContext(ZJ).setNavigator;return G.createElement(ch,{setNavigator:i,open:n,close:r,start:"SaleOverview",container:t.container,document:t.document,dialogs:{SaleOverview:G.createElement(h$,null),ChangeAmount:G.createElement(LX,null),ChangePayment:G.createElement(jX,null),NoPaymentMethodFound:G.createElement(VJ,null),PaymentFailed:G.createElement(UX,null),WrongNetwork:G.createElement(FX,null)}})},f$=function(){var t=e(u.mark((function t(e){var r;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("object"==n(r=e.sell)){t.next=3;break}throw'You need to configure at least 1 "blockchain": "token"';case 3:if(0!=Object.keys(r).length){t.next=5;break}throw'You need to configure at least 1 "blockchain": "token"';case 5:if(0!=Object.values(r).length){t.next=7;break}throw'You need to configure at least 1 "blockchain": "token"';case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),p$=function(){var t=e(u.mark((function t(e){var n,r,i,o,a,s,c,l,h,d,f,p,m,y,g,b,v,w,M;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.amount,r=e.sell,i=e.sent,o=e.succeeded,a=e.failed,s=e.error,c=e.critical,l=e.style,h=e.blacklist,d=e.providers,f=e.currency,p=e.connected,m=e.closed,y=e.tokenImage,g=e.closable,b=e.integration,v=e.document,iq(),t.prev=2,t.next=5,f$({sell:r});case 5:return w=Object.keys(r).map((function(t){return{blockchain:t,token:r[t]}})),M=nq({style:l,document:LG(v),closed:m},(function(t){return function(e){return G.createElement(FG,{errorCallback:s,container:e,unmount:t},G.createElement(HJ,{configuration:{type:"sale",tokenImage:y,amount:n,sell:r,currency:f,sent:i,succeeded:o,failed:a,blacklist:h,providers:d,integration:b}},G.createElement(oq,null,G.createElement(V,{unmount:t,closable:g},G.createElement(GX,{container:e,connected:p,unmount:t},G.createElement(QX,null,G.createElement(GJ,null,G.createElement(YJ,{accept:w},G.createElement(HX,null,G.createElement(WX,{document:LG(v)},G.createElement(c$,{container:e,document:v},G.createElement(d$,{document:v,container:e}),G.createElement(rq,null))))))))))))}})),t.abrupt("return",{unmount:M});case 10:t.prev=10,t.t0=t.catch(2),console.log("critical error",t.t0),null!=c&&c(t.t0);case 14:case"end":return t.stop()}}),t,null,[[2,10]])})));return function(e){return t.apply(this,arguments)}}(),m$=G.createContext(),y$=function(t){var e=h(G.useState({}),2),n=e[0],r=e[1];return G.createElement(m$.Provider,{value:{selection:n,setSelection:r}},t.children)};function g$(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(void 0===t)return t;var n="";return n+=t.slice(0,e+2),n+="...",n+=t.slice(t.length-e,t.length)}var b$=function(t){var e,n,r,i,o;return o=Math.floor(t/1e3),i=Math.floor(o/60),o%=60,r=Math.floor(i/60),i%=60,n=Math.floor(r/24),r%=24,e=Math.floor(n/30),n%=30,{year:Math.floor(e/12),month:e%=12,day:n,hour:r,minute:i,second:o}};function v$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function w$(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?v$(Object(n),!0).forEach((function(e){eK(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):v$(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var M$=function(t){var e,n,r=G.useContext(m$),i=r.selection;r.setSelection;var o,a,s=G.useContext(q).setOpen,u=G.useContext(ah).navigate;i.nft.createdAt&&(o=[(o=b$(new Date-new Date(i.nft.createdAt))).year&&o.year>=1?o.year>=2?"".concat(o.year," years"):"1 year":void 0,o.month&&o.month>=1?o.month>=2?"".concat(o.month," months"):"1 month":void 0,o.day&&o.day>=1&&o.month<=1&&o.year<1?o.day>=2?"".concat(o.day," days !!!"):"1 day !!!":void 0].filter((function(t){return t})).join(" ")),i.nft.holders&&(a=i.nft.holders>1e6?"Millions":i.nft.holders>1e5?"Hundreds of Thousands":i.nft.holders>2e3?"Thousands":i.nft.holders>100?"Hundreds":"Only a Few!!!");var c=(null===(e=i.nft)||void 0===e?void 0:e.blockchain)||(null===(n=i.blockchain)||void 0===n?void 0:n.name);if(null==c)return u("SelectBlockchain"),null;return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},G.createElement("div",null,G.createElement("h1",{className:"LineHeightL FontSizeL"},"Confirm Selection"))),stacked:!0,body:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},G.createElement("div",{className:"TokenImage medium TextCenter"},i.nft.image&&G.createElement("img",{src:i.nft.image})),G.createElement("div",{className:"PaddingTopS TextCenter"},G.createElement("div",{className:"Alert FontSizeS"},G.createElement("strong",null,"Please review this information"))),G.createElement("div",{className:"PaddingTopXS"},G.createElement("table",{className:"Table TextLeft FontSizeS"},G.createElement("tbody",null,G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Address")),G.createElement("td",null,G.createElement("div",null,G.createElement("a",{className:"Link",title:i.nft.address,href:qh(c).explorerUrlFor({token:i.nft.address}),target:"_blank",rel:"noopener noreferrer"},g$(i.nft.address,6))))),i.nft.id&&G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Token ID")),G.createElement("td",null,G.createElement("div",null,i.nft.id))),G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Blockchain")),G.createElement("td",null,G.createElement("div",null,qh(c).label))),G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Name")),G.createElement("td",null,G.createElement("a",{className:"Link",href:i.nft.link,target:"_blank",rel:"noopener noreferrer"},i.nft.name))),o&&G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Age")),G.createElement("td",null,G.createElement("div",null,o))),a&&G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Holders")),G.createElement("td",null,G.createElement("div",null,a))))))),footer:G.createElement("div",{className:"PaddingTopS PaddingRightM PaddingLeftM PaddingBottomS"},G.createElement("button",{className:"ButtonPrimary",onClick:function(){s(!1),t.resolve(w$(w$({},i.nft),{},{blockchain:c})),setTimeout(t.unmount,300)}},"Confirm"))})},_$="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iNjMuMjUwODg5bW0iIGhlaWdodD0iNjMuMjUwODg5bW0iIHZpZXdCb3g9IjAgMCA2My4yNTA4ODYgNjMuMjUwODg4Ij4KICA8ZyBmaWxsPSJub25lIiB0cmFuc2Zvcm09InNjYWxlKC42MzI1KSI+CiAgICA8cGF0aCBmaWxsPSIjMjA4MWUyIiBkPSJNMTAwIDUwYzAgMjcuNjEyNy0yMi4zODczIDUwLTUwIDUwUzAgNzcuN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IyMDkuMzAzMS0uNDQ2OS42MDYyLS42OTM1Ljg3MzMtLjM0NDIuNDA1OC0uNjczLjc5MTEtMS4wMTcyIDEuMTYxLS4yMDU0LjI0MTQtLjQyNjMuNDg4LS42NTI0LjcwODktLjIyMDguMjQ2NS0uNDQ2OS40Njc0LS42NTI0LjY3MjktLjM0NDEuMzQ0Mi0uNjMxOC42MTEzLS44NzMzLjgzMjJsLS41NjUuNTE4OWMtLjA4MjIuMDcxOS0uMTkwMS4xMTMtLjMwMzEuMTEzaC00LjM3Njh2NS42MTQ4aDUuNTA2OWMxLjIzMjkgMCAyLjQwNDItLjQzNjcgMy4zNDk0LTEuMjM4MS4zMjM2LS4yODI1IDEuNzM2My0xLjUwNTEgMy40MDU4LTMuMzQ5My4wNTY1LS4wNjE3LjEyODUtLjEwNzkuMjEwNy0uMTI4NGwxNS4yMTA3LTQuMzk3M2MuMjgyNi0uMDgyMi41NzAyLjEzMzUuNTcwMi40MzE1eiIvPgogIDwvZz4KPC9zdmc+",E$=function(t){var n,r,i,o,a,s,c=G.useContext(ah).navigate,l=G.useContext(m$),d=l.selection,f=l.setSelection,p=h(G.useState(""),2),m=p[0],y=p[1],g=h(G.useState(""),2),b=g[0],v=g[1],w=h(G.useState(""),2),M=w[0],_=w[1],E=h(G.useState(""),2),A=E[0],S=E[1],k=h(G.useState(!1),2),N=k[0],T=k[1];return G.useEffect((function(){var t,n,r=(null==d||null===(t=d.blockchain)||void 0===t?void 0:t.name)||(null==d?void 0:d.blockchain)||(null==d||null===(n=d.collection)||void 0===n?void 0:n.blockchain),i=function(){var t=e(u.mark((function t(){var e;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r){t.next=10;break}return t.prev=1,t.next=4,EH({blockchain:r,address:d.nft.address,method:"balanceOf",api:_V[r][1155],params:["0x4e260bB2b25EC6F3A59B478fCDe5eD5B8D783B02","1"]});case 4:e=t.sent,t.next=9;break;case 7:t.prev=7,t.t0=t.catch(1);case 9:e&&T(!0);case 10:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(){return t.apply(this,arguments)}}();i()}),[d.blockchain]),G.createElement(lh,{stacked:!0,header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},G.createElement("div",null,G.createElement("div",{className:"LineHeightL FontSizeL PaddingTopXS"},G.createElement("span",{className:"CardImage small"},G.createElement("img",{className:"transparent",src:_$}))))),body:G.createElement("div",{className:"PaddingLeftM PaddingRightM"},G.createElement("div",null,G.createElement("div",{className:"PaddingTopXS TextLeft"},G.createElement("label",{htmlFor:"DePayWidgetsEnterNFTBlockchain"},G.createElement("span",{className:"FontSizeM Opacity05"},"Select Blockchain"))),G.createElement("div",{className:"PaddingTopXS PaddingBottomS"},G.createElement("div",{className:"Card small",onClick:function(){return c("SelectBlockchain")}},G.createElement("div",{className:"CardImage small"},G.createElement("img",{className:"transparent",src:null===(n=qh((null==d||null===(r=d.blockchain)||void 0===r?void 0:r.name)||(null==d?void 0:d.blockchain)||(null==d||null===(i=d.collection)||void 0===i?void 0:i.blockchain)))||void 0===n?void 0:n.logo})),G.createElement("div",{className:"CardBody FontSizeM"},null===(o=qh((null==d||null===(a=d.blockchain)||void 0===a?void 0:a.name)||(null==d?void 0:d.blockchain)||(null==d||null===(s=d.collection)||void 0===s?void 0:s.blockchain)))||void 0===o?void 0:o.label),G.createElement("div",{className:"CardAction"},G.createElement(dh,null))))),N&&G.createElement("div",null,G.createElement("div",{className:"PaddingTopXS TextLeft"},G.createElement("label",{htmlFor:"DePayWidgetsEnterNFTTokenId"},G.createElement("span",{className:"FontSizeM Opacity05"},"Enter Token ID"))),G.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},G.createElement("input",{id:"DePayWidgetsEnterNFTTokenId",name:"DePayWidgetsEnterNFTTokenId",value:m,onChange:function(t){return y(t.target.value)},className:"Search"}))),G.createElement("div",null,G.createElement("div",{className:"PaddingTopXS TextLeft"},G.createElement("label",{htmlFor:"DePayWidgetsEnterNFTName"},G.createElement("span",{className:"FontSizeM Opacity05"},"Enter NFT Name"))),G.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},G.createElement("input",{id:"DePayWidgetsEnterNFTName",name:"DePayWidgetsEnterNFTName",value:A,onChange:function(t){return S(t.target.value)},placeholder:"CryptoPunks",className:"Search"}))),G.createElement("div",null,G.createElement("div",{className:"PaddingTopXS TextLeft"},G.createElement("label",{htmlFor:"DePayWidgetsEnterNFTImage"},G.createElement("span",{className:"FontSizeM Opacity05"},"Enter Image URL"))),G.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},G.createElement("input",{id:"DePayWidgetsEnterNFTImage",name:"DePayWidgetsEnterNFTImage",value:b,onChange:function(t){return v(t.target.value)},placeholder:"https://i.seadn.io/gae/BdxvLseXcfl57BiuQcQYdJ64v-aI8din7WPk0Pgo3qQFhAUH-B6i-dCqqc_mCkRIzULmwzwecnohLhrcH8A9mpWIZqA7ygc52Sr81hE?auto=format&w=128",className:"Search"}))),G.createElement("div",null,G.createElement("div",{className:"PaddingTopXS TextLeft"},G.createElement("label",{htmlFor:"DePayWidgetsEnterNFTLink"},G.createElement("span",{className:"FontSizeM Opacity05"},"Enter Link URL"))),G.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},G.createElement("input",{id:"DePayWidgetsEnterNFTLink",name:"DePayWidgetsEnterNFTLink",value:M,onChange:function(t){return _(t.target.value)},placeholder:"https://opensea.io/collection/cryptopunks",className:"Search"})))),footer:G.createElement("div",{className:"PaddingTopS PaddingRightM PaddingLeftM PaddingBottomM"},G.createElement("button",{className:["ButtonPrimary",b.length&&M.length&&A.length&&(!N||m.length)?"":"disabled"].join(" "),onClick:function(){var e,n,r;b.length&&M.length&&A.length&&(!N||m.length)&&(r=(null==d||null===(e=d.blockchain)||void 0===e?void 0:e.name)||(null==d?void 0:d.blockchain)||(null==d||null===(n=d.collection)||void 0===n?void 0:n.blockchain),f(Object.assign(t.selection,{nft:{blockchain:r,id:m,image:b,name:A,link:M,address:d.nft.address,type:N?"1155":"721"}})),c("ConfirmNFTSelection"))}},"Continue"))})},A$=function(t){var e=G.useContext(m$).setSelection,n=G.useContext(ah).navigate,r=t.stacked||Object.keys(t.selection).length>1,i=[qh("ethereum"),qh("bsc"),qh("polygon")],o=i.map((function(i,o){return G.createElement("div",{key:o,className:"Card Row",onClick:function(){return function(i){window._depay_token_selection_selected_blockchain=i.name,e(Object.assign(t.selection,{blockchain:i})),r&&!1!==t.navigateBack?n("back"):t.resolve(i)}(i)}},G.createElement("div",{className:"CardImage"},G.createElement("img",{className:"transparent",src:i.logo})),G.createElement("div",{className:"CardBody"},G.createElement("span",{className:"CardText"},i.label)))}));return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},G.createElement("div",null,G.createElement("h1",{className:"LineHeightL FontSizeL"},"Select Blockchain"))),stacked:r,bodyClassName:"ScrollHeight",body:G.createElement("div",{className:"PaddingTopS"},o),footer:G.createElement("div",{className:"PaddingTopS PaddingRightM PaddingLeftM PaddingBottomS"})})},S$={ethereum:"ethereum",matic:"polygon,"},k$=function(t){var n,r=G.useContext(ah).navigate,i=h(G.useState(""),2),o=i[0],a=i[1],s=h(G.useState(!1),2),c=s[0],l=s[1],d=h(G.useState([]),2),f=d[0],p=d[1],m=G.useContext(m$).setSelection,y=function(e){m(Object.assign(t.selection,{nft:e})),r("ConfirmNFTSelection")},g=function(t){return new Promise((function(e,n){fetch("https://api.opensea.io/api/v1/assets?asset_contract_address=".concat(t)).then((function(t){if(200!=t.status)return e();t.json().then((function(t){return e(t.assets?t.assets[0]:void 0)})).catch((function(){return e()}))})).catch((function(){return e()}))}))},b=G.useCallback(mq.debounce((function(n){fetch("https://api.opensea.io/api/v1/asset_contract/".concat(n)).then((function(i){200==i.status?i.json().then(function(){var i=e(u.mark((function e(i){var o,s,c,h,d,f,b,v,w,M;return u.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("non-fungible"!=i.asset_contract_type){e.next=8;break}return e.next=3,g(n);case 3:(h=e.sent)&&(s=null!=h&&h.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)?S$[h.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)[1]]:void 0,c=null==h||null===(d=h.collection)||void 0===d||null===(f=d.stats)||void 0===f?void 0:f.num_owners),o={blockchain:s,holders:c,createdAt:i.created_date,image:i.image_url,name:i.collection?i.collection.name:void 0,link:i.collection?"https://opensea.io/collection/".concat(i.collection.slug):void 0,address:cp(i.address),type:"721"},e.next=22;break;case 8:if("semi-fungible"!=i.asset_contract_type){e.next=21;break}if("OPENSTORE"!=i.symbol||"OpenSea Collection"!=i.name){e.next=13;break}o={id:null,address:cp(i.address),type:"1155"},e.next=19;break;case 13:return e.next=15,g(n);case 15:w=e.sent,M=null!=w&&w.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)?S$[w.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)[1]]:void 0,null==w||null===(b=w.collection)||void 0===b||null===(v=b.stats)||void 0===v||v.num_owners,o={blockchain:M,id:null,createdAt:i.created_date,image:i.image_url,name:i.collection?i.collection.name:void 0,link:i.collection?"https://opensea.io/collection/".concat(i.collection.slug):void 0,address:cp(i.address),type:"1155"};case 19:e.next=22;break;case 21:i.address&&(o={address:cp(i.address)});case 22:o&&(null==o.type?(m(Object.assign(t.selection,{nft:o,blockchain:o.blockchain||"polygon"})),r("EnterNFTDataForOpenSea"),a("")):null!==o.id?(y(o),p([o]),r("ConfirmNFTSelection")):(m(Object.assign(t.selection,{nft:o})),r("SelectNFTIdOnOpenSea"),a(""))),l(!1);case 24:case"end":return e.stop()}}),e)})));return function(t){return i.apply(this,arguments)}}()).catch((function(){l(!1)})):l(!1)})).catch((function(){l(!1)}))}),500),[]);return n=c?[G.createElement("div",{className:"SkeletonWrapper",key:"loading"},G.createElement("div",{className:"Skeleton",style:{height:"69px",width:"100%"}},G.createElement("div",{className:"SkeletonBackground"})))]:f.map((function(t,e){return G.createElement("div",{key:e,className:"Card Row",onClick:function(){return y(t)}},G.createElement("div",{className:"CardImage"},G.createElement("img",{src:t.image})),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardTokenFullName",title:t.name},G.createElement("span",{className:"CardText"},t.name))))})),G.createElement(lh,{stacked:!0,header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},G.createElement("div",null,G.createElement("div",{className:"LineHeightL FontSizeL PaddingTopXS"},G.createElement("span",{className:"CardImage small"},G.createElement("img",{className:"transparent",src:_$})))),G.createElement("div",{className:"PaddingTopS PaddingBottomXS TextLeft"},G.createElement("label",{htmlFor:"DePayWidgetsEnterContractAddress"},G.createElement("span",{className:"FontSizeM Opacity05"},"Enter contract address"))),G.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},G.createElement("input",{id:"DePayWidgetsEnterContractAddress",name:"DePayWidgetsEnterContractAddress",value:o,onChange:function(t){l(!0),p([]);var e=t.target.value;a(e),e&&e.length?b(e):l(!1)},className:"Search",autoFocus:!0,placeholder:"0x495f947276749ce646f68ac8c248420045cb7b5e"}))),bodyClassName:"ScrollHeight",body:G.createElement("div",null,n)})};function N$(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function T$(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?N$(Object(n),!0).forEach((function(e){eK(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):N$(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var x$={ethereum:"ethereum",matic:"polygon,"},L$=function(t){var n,r=G.useContext(ah).navigate,i=h(G.useState(""),2),o=i[0],a=i[1],s=h(G.useState(!1),2),c=s[0],l=s[1],d=h(G.useState([]),2),f=d[0],p=d[1],m=G.useContext(m$),y=m.selection,g=m.setSelection,b=function(e){g(Object.assign(t.selection,{nft:e})),r("ConfirmNFTSelection")},v=G.useCallback(mq.debounce((function(t){fetch("https://api.opensea.io/api/v1/asset/".concat(y.nft.address,"/").concat(t)).then((function(t){if(200!=t.status)return resolve();t.json().then(function(){var t=e(u.mark((function t(e){var n,r;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=null!=e&&e.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)?x$[e.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)[1]]:void 0,r=T$(T$({},y.nft),{},{blockchain:n,id:e.token_id,image:e.image_url,name:e.name,link:e.permalink}),p([r]),b(r),l(!1);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(){l(!1)}))})).catch((function(){l(!1)}))}),500),[]);return G.useEffect((function(){fetch("https://api.opensea.io/api/v1/assets?asset_contract_address=".concat(y.nft.address)).then((function(t){if(200!=t.status)return resolve();t.json().then((function(t){if(t.assets.length<=6){var e=t.assets.map((function(t){var e=null!=t&&t.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)?x$[t.permalink.match(/https:\/\/opensea\.io\/assets\/(\w*)\//)[1]]:void 0;return T$(T$({},y.nft),{},{blockchain:e,id:t.token_id,image:t.image_url,name:t.name,link:t.permalink})}));p(e),1==e.length&&b(e[0])}}))}))}),[]),n=c?[G.createElement("div",{className:"SkeletonWrapper",key:"loading"},G.createElement("div",{className:"Skeleton",style:{height:"69px",width:"100%"}},G.createElement("div",{className:"SkeletonBackground"})))]:f.map((function(t,e){return G.createElement("div",{key:e,className:"Card Row",onClick:function(){return b(t)}},G.createElement("div",{className:"CardImage"},G.createElement("img",{src:t.image})),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardTokenFullName",title:t.name},G.createElement("span",{className:"CardText"},t.name))))})),G.createElement(lh,{stacked:!0,header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},G.createElement("div",null,G.createElement("div",{className:"LineHeightL FontSizeL PaddingTopXS"},G.createElement("span",{className:"CardImage small"},G.createElement("img",{className:"transparent",src:_$})))),G.createElement("div",{className:"PaddingTopS PaddingBottomXS TextLeft"},G.createElement("label",{htmlFor:"DePayWidgetsEnterCollectionId"},G.createElement("span",{className:"FontSizeM Opacity05"},"Enter Token ID"))),G.createElement("div",{className:"PaddingTopXS PaddingBottomS TextLeft"},G.createElement("input",{id:"DePayWidgetsEnterCollectionId",name:"DePayWidgetsEnterCollectionId",value:o,onChange:function(t){l(!0),p([]);var e=t.target.value;a(e),e&&e.length?v(e):l(!1)},className:"Search",placeholder:"35347623114821255323888368639026081793120226253597860997754787918389704654849"}))),bodyClassName:"ScrollHeight",body:G.createElement("div",null,n)})},I$=function(t){var e=G.useContext(ah).navigate,n=[{name:"OpenSea",navigate:"SelectNFTContractOnOpenSea",logo:_$}].map((function(t,n){return G.createElement("div",{key:n,className:"Card Row",onClick:function(){return function(t){e(t.navigate)}(t)}},G.createElement("div",{className:"CardImage"},G.createElement("img",{src:t.logo})),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardTokenSymbol",title:t.name},G.createElement("span",{className:"CardText"},t.name)),G.createElement("div",{className:"CardTokenName PaddingTopXS"},G.createElement(dh,null))))}));return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},G.createElement("div",null,G.createElement("h1",{className:"LineHeightL FontSizeL"},"Select NFT")),G.createElement("div",{className:"PaddingTopXS PaddingBottomS"},G.createElement("span",{className:"FontSizeM Opacity05"},"Choose which marketplace"))),bodyClassName:"ScrollHeight",body:G.createElement("div",{className:""},n)})},j$=function(t){G.useContext(sq).what;var e,n=G.useContext(q),r=n.open,i=n.close,o=G.useContext(m$),a=o.selection;o.setSelection;var s=h(G.useState(),2);s[0];var u,c=s[1];return u="SelectMarketplace",G.createElement(ch,{open:r,close:i,start:u,container:t.container,document:t.document,setNavigator:function(t){c(t)},dialogs:(e={SelectMarketplace:G.createElement(I$,{selection:a,resolve:t.resolve,unmount:t.unmount}),SelectNFTContractOnOpenSea:G.createElement(k$,{selection:a,resolve:t.resolve,unmount:t.unmount}),SelectNFTIdOnOpenSea:G.createElement(L$,{selection:a,resolve:t.resolve,unmount:t.unmount}),SelectBlockchain:G.createElement(L$,{selection:a,resolve:t.resolve,unmount:t.unmount}),EnterNFTDataForOpenSea:G.createElement(E$,{selection:a,resolve:t.resolve,unmount:t.unmount})},eK(e,"SelectBlockchain",G.createElement(A$,{selection:a,stacked:!0,resolve:t.resolve,unmount:t.unmount})),eK(e,"ConfirmNFTSelection",G.createElement(M$,{selection:a,resolve:t.resolve,unmount:t.unmount})),e)})},C$=function(t){var e=G.useContext(m$).selection,n=G.useContext(q).setOpen,r=e.token,i=r.address||r.external_id,o=r.logo||r.image,a=qh(r.blockchain),s=r.first_transfer?b$(new Date-new Date(r.first_transfer)):void 0;s&&(s=[s.year&&s.year>=1?s.year>=2?"".concat(s.year," years"):"1 year":void 0,s.month&&s.month>=1?s.month>=2?"".concat(s.month," months"):"1 month":void 0,s.day&&s.day>=1&&s.month<=1&&s.year<1?s.day>=2?"".concat(s.day," days !!!"):"1 day !!!":void 0].filter((function(t){return t})).join(" "));var u=r.unique_senders?r.unique_senders:void 0;u&&(u=u>1e6?"Millions":u>1e5?"Hundreds of Thousands":u>2e3?"Thousands":u>100?"Hundreds":"Only a Few!!!");return G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},G.createElement("div",null,G.createElement("h1",{className:"LineHeightL FontSizeL"},"Confirm Selection"))),stacked:!0,body:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},G.createElement("div",{className:"TokenImage medium TextCenter"},o&&G.createElement("img",{src:o}),!o&&G.createElement(xX,{blockchain:r.blockchain,address:i})),G.createElement("div",{className:"PaddingTopS TextCenter"},G.createElement("div",{className:"Alert FontSizeS"},G.createElement("strong",null,"Please review this information"))),G.createElement("div",{className:"PaddingTopXS"},G.createElement("table",{className:"Table TextLeft FontSizeS"},G.createElement("tbody",null,G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Address")),G.createElement("td",null,G.createElement("div",null,G.createElement("a",{className:"Link",title:i,href:a.explorerUrlFor({token:i}),target:"_blank",rel:"noopener noreferrer"},g$(i,8))))),G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Blockchain")),G.createElement("td",null,G.createElement("div",null,a.label))),G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Symbol")),G.createElement("td",null,G.createElement("div",null,r.symbol))),G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Name")),G.createElement("td",null,G.createElement("div",null,r.name))),s&&G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Age")),G.createElement("td",null,G.createElement("div",null,s))),u&&G.createElement("tr",null,G.createElement("td",null,G.createElement("div",{className:"TableSubTitle"},"Holders")),G.createElement("td",null,G.createElement("div",null,u))))))),footer:G.createElement("div",{className:"PaddingTopS PaddingRightM PaddingLeftM PaddingBottomS"},G.createElement("button",{className:"ButtonPrimary",onClick:function(){n(!1),t.resolve({blockchain:r.blockchain,address:r.external_id||r.address,symbol:r.symbol,name:r.name,decimals:r.decimals,logo:r.image||r.logo,routable:r.routable}),setTimeout(t.unmount,300)}},"Confirm"))})},D$=function(t){var e=G.useContext(ah).navigate,n=G.useContext(q).setOpen,r=G.useContext(m$).setSelection,i=h(G.useState(!1),2),o=i[0],a=i[1],s=h(G.useState(""),2),u=s[0],c=s[1],l=h(G.useState(),2),d=l[0],f=l[1],p=h(G.useState(!1),2),m=p[0],y=p[1],g=h(G.useState([]),2),b=g[0],v=g[1],w=h(G.useState(),2);w[0],w[1];var M=G.useRef(),_=kG()[0],E=function(e){var n=qh(e);f(n),r(Object.assign(t.selection,{blockchain:n,token:void 0})),v(n.tokens)};G.useEffect((function(){_?_.connectedTo().then((function(t){var e=qh(t);window._depay_token_selection_selected_blockchain?E(window._depay_token_selection_selected_blockchain):t&&t.length&&e&&e.tokens&&e.tokens.length?E(t):E("ethereum")})).catch((function(){return E("ethereum")})):E("ethereum")}),[]),G.useEffect((function(){t.selection.blockchain&&(f(t.selection.blockchain),v(t.selection.blockchain.tokens),M.current&&(M.current.value="",M.current.focus()))}),[t.selection,t.selection.blockchain]);var A,S=G.useCallback(mq.debounce((function(t,e){fetch("https://public.depay.com/tokens/search?blockchain=".concat(e,"&term=").concat(t)).then((function(t){200==t.status?t.json().then((function(t){v(t),a(!1)})).catch((function(){return reject})):reject()})).catch((function(){return reject}))}),500),[]);return A=o?[G.createElement("div",{className:"SkeletonWrapper",key:"loading"},G.createElement("div",{className:"Skeleton",style:{height:"69px",width:"100%"}},G.createElement("div",{className:"SkeletonBackground"})))]:b.map((function(i,o){return G.createElement("div",{key:"".concat(o,"-").concat(i.address),className:"Card Row",onClick:function(){return function(i){i.address&&(i.address=cp(i.address)),i.external_id&&(i.external_id=cp(i.external_id)),d.tokens.find((function(t){return t.address==(i.address||i.external_id)}))?(n(!1),t.resolve({blockchain:d.name,address:i.address||i.external_id,logo:i.logo||i.image,name:i.name,symbol:i.symbol,decimals:i.decimals,routable:!0}),setTimeout(t.unmount,300)):(r(Object.assign(t.selection,{token:i})),e("ConfirmTokenSelection"))}(i)}},G.createElement("div",{className:"CardImage"},i.logo&&G.createElement("img",{src:i.logo}),i.image&&G.createElement("img",{src:i.image}),!(i.logo||i.image)&&G.createElement(xX,{blockchain:i.blockchain,address:i.external_id||i.address})),G.createElement("div",{className:"CardBody"},G.createElement("div",{className:"CardTokenSymbol",title:i.symbol},G.createElement("span",{className:"CardText"},i.symbol)),G.createElement("div",{className:"CardTokenName",title:i.name},G.createElement("span",{className:"CardText"},i.name))))})),null==d?null:G.createElement(lh,{header:G.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM TextLeft"},G.createElement("div",null,G.createElement("h1",{className:"LineHeightL FontSizeL"},"Select Token")),G.createElement("div",{className:"PaddingTopS PaddingBottomXS"},G.createElement("div",{className:"Card small",onClick:function(){e("SelectBlockchain")}},G.createElement("div",{className:"CardImage small"},G.createElement("img",{className:"transparent",src:d.logo})),G.createElement("div",{className:"CardBody FontSizeM"},d.label),G.createElement("div",{className:"CardAction"},G.createElement(dh,null)))),G.createElement("div",{className:"PaddingTopXS PaddingBottomS"},G.createElement("input",{value:u,onBlur:function(){return y(!1)},onChange:function(t){y(!1),a(!0);var e=t.target.value;if(c(e),e.match(/^0x/)){var n;v([]);try{n=new _V({blockchain:d.name,address:e})}catch(t){}if(null==n)return void a(!1);Promise.all([n.name(),n.symbol(),n.decimals(),fetch("https://public.depay.com/tokens/routable/".concat(d.name,"/").concat(e)).then((function(t){if(200==t.status)return t.json()}))]).then((function(t){var n=h(t,4),r=n[0],i=n[1],o=n[2],s=n[3];v([{name:r,symbol:i,decimals:o,address:e,blockchain:d.name,routable:!!s}]),a(!1)}))}else e&&e.length?(v([]),S(e,d.name)):(v(d.tokens),a(!1))},className:"Search",autoFocus:!0,placeholder:"Search name or paste address",ref:M}),m&&G.createElement("div",{className:"PaddingTopXS PaddingRightXS PaddingLeftXS"},G.createElement("div",{className:"Tooltip"},G.createElement("span",{className:"TooltipArrowUp"}),"Enter token address here")))),bodyClassName:"ScrollHeight",body:G.createElement("div",{className:""},A),footer:G.createElement("div",{className:"PaddingTopS PaddingRightM PaddingLeftM PaddingBottomS"},G.createElement("div",{className:"PaddingTopXS PaddingBottomXS"},G.createElement("div",{className:"Link FontSizeS",onClick:function(){y(!0),M.current&&(M.current.value="",M.current.focus())}},"Token missing? Add it.")))})},O$=function(t){G.useContext(sq).what;var e,n=G.useContext(q),r=n.open,i=n.close,o=G.useContext(m$).selection;return e="SelectToken",G.createElement(ch,{open:r,close:i,start:e,container:t.container,document:t.document,dialogs:{SelectToken:G.createElement(D$,{selection:o,resolve:t.resolve,unmount:t.unmount}),SelectBlockchain:G.createElement(A$,{selection:o,resolve:t.resolve}),ConfirmTokenSelection:G.createElement(C$,{selection:o,resolve:t.resolve,unmount:t.unmount})}})},P$={Connect:function(t){var r,i,o;return iq(),"object"==n(t)&&(r=t.style,i=t.error,o=t.document),new Promise(function(){var t=e(u.mark((function t(e,n){var a,s,c;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,NG();case 2:if(!(a=t.sent)||1!=a.length){t.next=9;break}return s=a[0],t.next=7,s.account();case 7:return c=t.sent,t.abrupt("return",e({wallet:s,account:c}));case 9:nq({style:r,document:LG(o)},(function(t){var r=function(){n("USER_CLOSED_DIALOG"),t()};return function(a){return G.createElement(FG,{errorCallback:i,container:a,unmount:t},G.createElement(oq,null,G.createElement(V,{unmount:r},G.createElement(xG,{document:o,container:a,resolve:e,reject:n,autoClose:!0}),G.createElement(rq,null))))}}));case 10:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())},Donation:ZX,Login:function(t){var r,i,o,a,s,c;return iq(),"object"==n(t)&&(r=t.style,i=t.error,o=t.document,a=t.message,s=t.endpoint,c=t.recover),new Promise(function(){var t=e(u.mark((function t(e,n){return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:nq({style:r,document:LG(o)},(function(t){var r=function(){n("USER_CLOSED_DIALOG"),t()};return function(n){return G.createElement(FG,{errorCallback:i,container:n,unmount:t},G.createElement(HJ,{configuration:{message:a,endpoint:s||"/login",recoverSignature:c}},G.createElement(oq,null,G.createElement(V,{unmount:r},G.createElement(GX,{container:n,unmount:t},G.createElement(JX,{document:o,container:n,resolve:function(n){t(),e(n)}}),G.createElement(rq,null))))))}}));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())},Payment:o$,Sale:p$,Select:function(t){var r,i,o,a,s;return iq(),"object"==n(t)&&(r=t.style,i=t.error,o=t.document,a=t.what),null==a?s='"what" needs to be configured!':["token","nft"].indexOf(a)<0&&(s='Unknown "what" configured: '.concat(a,"!")),new Promise(function(){var t=e(u.mark((function t(e,n){return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:nq({style:r,document:LG(o)},(function(t){var r=function(){n("USER_CLOSED_DIALOG"),t()};return function(n){return G.createElement(FG,{error:s,errorCallback:i,container:n,unmount:t},G.createElement(HJ,{configuration:{what:a}},G.createElement(oq,null,G.createElement(V,{unmount:r},G.createElement(y$,null,"token"==a&&G.createElement(O$,{document:o,container:n,unmount:t,resolve:e}),"nft"==a&&G.createElement(j$,{document:o,container:n,unmount:t,resolve:e})),G.createElement(rq,null)))))}}));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())}};export{P$ as default};
|