@walletconnect/ethereum-provider 2.7.3 → 2.7.4-rc-a7ad32
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/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(wn,dr){typeof exports=="object"&&typeof module<"u"?dr(exports):typeof define=="function"&&define.amd?define(["exports"],dr):(wn=typeof globalThis<"u"?globalThis:wn||self,dr(wn["@walletconnect/ethereum-provider"]={}))})(this,function(wn){"use strict";var dr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zm(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ii(t){var e=t.default;if(typeof e=="function"){var r=function(){return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var vr={exports:{}},ps=typeof Reflect=="object"?Reflect:null,Z0=ps&&typeof ps.apply=="function"?ps.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},Da;ps&&typeof ps.ownKeys=="function"?Da=ps.ownKeys:Object.getOwnPropertySymbols?Da=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Da=function(e){return Object.getOwnPropertyNames(e)};function Ym(t){console&&console.warn&&console.warn(t)}var Y0=Number.isNaN||function(e){return e!==e};function _t(){_t.init.call(this)}vr.exports=_t,vr.exports.once=ew,_t.EventEmitter=_t,_t.prototype._events=void 0,_t.prototype._eventsCount=0,_t.prototype._maxListeners=void 0;var J0=10;function Oa(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(_t,"defaultMaxListeners",{enumerable:!0,get:function(){return J0},set:function(t){if(typeof t!="number"||t<0||Y0(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");J0=t}}),_t.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},_t.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||Y0(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function X0(t){return t._maxListeners===void 0?_t.defaultMaxListeners:t._maxListeners}_t.prototype.getMaxListeners=function(){return X0(this)},_t.prototype.emit=function(e){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=e==="error",o=this._events;if(o!==void 0)i=i&&o.error===void 0;else if(!i)return!1;if(i){var c;if(r.length>0&&(c=r[0]),c instanceof Error)throw c;var l=new Error("Unhandled error."+(c?" ("+c.message+")":""));throw l.context=c,l}var h=o[e];if(h===void 0)return!1;if(typeof h=="function")Z0(h,this,r);else for(var d=h.length,v=nd(h,d),n=0;n<d;++n)Z0(v[n],this,r);return!0};function Q0(t,e,r,n){var i,o,c;if(Oa(r),o=t._events,o===void 0?(o=t._events=Object.create(null),t._eventsCount=0):(o.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),c=o[e]),c===void 0)c=o[e]=r,++t._eventsCount;else if(typeof c=="function"?c=o[e]=n?[r,c]:[c,r]:n?c.unshift(r):c.push(r),i=X0(t),i>0&&c.length>i&&!c.warned){c.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+c.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=c.length,Ym(l)}return t}_t.prototype.addListener=function(e,r){return Q0(this,e,r,!1)},_t.prototype.on=_t.prototype.addListener,_t.prototype.prependListener=function(e,r){return Q0(this,e,r,!0)};function Jm(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function ed(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=Jm.bind(n);return i.listener=r,n.wrapFn=i,i}_t.prototype.once=function(e,r){return Oa(r),this.on(e,ed(this,e,r)),this},_t.prototype.prependOnceListener=function(e,r){return Oa(r),this.prependListener(e,ed(this,e,r)),this},_t.prototype.removeListener=function(e,r){var n,i,o,c,l;if(Oa(r),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(o=-1,c=n.length-1;c>=0;c--)if(n[c]===r||n[c].listener===r){l=n[c].listener,o=c;break}if(o<0)return this;o===0?n.shift():Xm(n,o),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,l||r)}return this},_t.prototype.off=_t.prototype.removeListener,_t.prototype.removeAllListeners=function(e){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var o=Object.keys(n),c;for(i=0;i<o.length;++i)c=o[i],c!=="removeListener"&&this.removeAllListeners(c);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[e],typeof r=="function")this.removeListener(e,r);else if(r!==void 0)for(i=r.length-1;i>=0;i--)this.removeListener(e,r[i]);return this};function td(t,e,r){var n=t._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?Qm(i):nd(i,i.length)}_t.prototype.listeners=function(e){return td(this,e,!0)},_t.prototype.rawListeners=function(e){return td(this,e,!1)},_t.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):rd.call(t,e)},_t.prototype.listenerCount=rd;function rd(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}_t.prototype.eventNames=function(){return this._eventsCount>0?Da(this._events):[]};function nd(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function Xm(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function Qm(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function ew(t,e){return new Promise(function(r,n){function i(c){t.removeListener(e,o),n(c)}function o(){typeof t.removeListener=="function"&&t.removeListener("error",i),r([].slice.call(arguments))}id(t,e,o,{once:!0}),e!=="error"&&tw(t,i,{once:!0})})}function tw(t,e,r){typeof t.on=="function"&&id(t,"error",e,r)}function id(t,e,r,n){if(typeof t.on=="function")n.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function i(o){n.once&&t.removeEventListener(e,i),r(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var kl={},Aa={},Qe={},sd={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(l,h){var d=l>>>16&65535,v=l&65535,E=h>>>16&65535,_=h&65535;return v*_+(d*_+v*E<<16>>>0)|0}t.mul=Math.imul||e;function r(l,h){return l+h|0}t.add=r;function n(l,h){return l-h|0}t.sub=n;function i(l,h){return l<<h|l>>>32-h}t.rotl=i;function o(l,h){return l<<32-h|l>>>h}t.rotr=o;function c(l){return typeof l=="number"&&isFinite(l)&&Math.floor(l)===l}t.isInteger=Number.isInteger||c,t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(l){return t.isInteger(l)&&l>=-t.MAX_SAFE_INTEGER&&l<=t.MAX_SAFE_INTEGER}})(sd),Object.defineProperty(Qe,"__esModule",{value:!0});var od=sd;function rw(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16}Qe.readInt16BE=rw;function nw(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])>>>0}Qe.readUint16BE=nw;function iw(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])<<16>>16}Qe.readInt16LE=iw;function sw(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])>>>0}Qe.readUint16LE=sw;function ad(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>8,e[r+1]=t>>>0,e}Qe.writeUint16BE=ad,Qe.writeInt16BE=ad;function cd(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e}Qe.writeUint16LE=cd,Qe.writeInt16LE=cd;function Hl(t,e){return e===void 0&&(e=0),t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}Qe.readInt32BE=Hl;function zl(t,e){return e===void 0&&(e=0),(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}Qe.readUint32BE=zl;function Wl(t,e){return e===void 0&&(e=0),t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}Qe.readInt32LE=Wl;function ql(t,e){return e===void 0&&(e=0),(t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e])>>>0}Qe.readUint32LE=ql;function $a(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>24,e[r+1]=t>>>16,e[r+2]=t>>>8,e[r+3]=t>>>0,e}Qe.writeUint32BE=$a,Qe.writeInt32BE=$a;function Pa(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24,e}Qe.writeUint32LE=Pa,Qe.writeInt32LE=Pa;function ow(t,e){e===void 0&&(e=0);var r=Hl(t,e),n=Hl(t,e+4);return r*4294967296+n-(n>>31)*4294967296}Qe.readInt64BE=ow;function aw(t,e){e===void 0&&(e=0);var r=zl(t,e),n=zl(t,e+4);return r*4294967296+n}Qe.readUint64BE=aw;function cw(t,e){e===void 0&&(e=0);var r=Wl(t,e),n=Wl(t,e+4);return n*4294967296+r-(r>>31)*4294967296}Qe.readInt64LE=cw;function lw(t,e){e===void 0&&(e=0);var r=ql(t,e),n=ql(t,e+4);return n*4294967296+r}Qe.readUint64LE=lw;function ld(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),$a(t/4294967296>>>0,e,r),$a(t>>>0,e,r+4),e}Qe.writeUint64BE=ld,Qe.writeInt64BE=ld;function ud(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),Pa(t>>>0,e,r),Pa(t/4294967296>>>0,e,r+4),e}Qe.writeUint64LE=ud,Qe.writeInt64LE=ud;function uw(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,o=t/8+r-1;o>=r;o--)n+=e[o]*i,i*=256;return n}Qe.readUintBE=uw;function hw(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,o=r;o<r+t/8;o++)n+=e[o]*i,i*=256;return n}Qe.readUintLE=hw;function fw(t,e,r,n){if(r===void 0&&(r=new Uint8Array(t/8)),n===void 0&&(n=0),t%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!od.isSafeInteger(e))throw new Error("writeUintBE value must be an integer");for(var i=1,o=t/8+n-1;o>=n;o--)r[o]=e/i&255,i*=256;return r}Qe.writeUintBE=fw;function dw(t,e,r,n){if(r===void 0&&(r=new Uint8Array(t/8)),n===void 0&&(n=0),t%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!od.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var i=1,o=n;o<n+t/8;o++)r[o]=e/i&255,i*=256;return r}Qe.writeUintLE=dw;function pw(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat32(e)}Qe.readFloat32BE=pw;function gw(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat32(e,!0)}Qe.readFloat32LE=gw;function mw(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat64(e)}Qe.readFloat64BE=mw;function ww(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat64(e,!0)}Qe.readFloat64LE=ww;function vw(t,e,r){e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat32(r,t),e}Qe.writeFloat32BE=vw;function yw(t,e,r){e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat32(r,t,!0),e}Qe.writeFloat32LE=yw;function bw(t,e,r){e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat64(r,t),e}Qe.writeFloat64BE=bw;function _w(t,e,r){e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat64(r,t,!0),e}Qe.writeFloat64LE=_w;var Kr={};Object.defineProperty(Kr,"__esModule",{value:!0});function Ew(t){for(var e=0;e<t.length;e++)t[e]=0;return t}Kr.wipe=Ew,Object.defineProperty(Aa,"__esModule",{value:!0});var Er=Qe,Vl=Kr,xw=20;function Cw(t,e,r){for(var n=1634760805,i=857760878,o=2036477234,c=1797285236,l=r[3]<<24|r[2]<<16|r[1]<<8|r[0],h=r[7]<<24|r[6]<<16|r[5]<<8|r[4],d=r[11]<<24|r[10]<<16|r[9]<<8|r[8],v=r[15]<<24|r[14]<<16|r[13]<<8|r[12],E=r[19]<<24|r[18]<<16|r[17]<<8|r[16],_=r[23]<<24|r[22]<<16|r[21]<<8|r[20],S=r[27]<<24|r[26]<<16|r[25]<<8|r[24],P=r[31]<<24|r[30]<<16|r[29]<<8|r[28],L=e[3]<<24|e[2]<<16|e[1]<<8|e[0],k=e[7]<<24|e[6]<<16|e[5]<<8|e[4],q=e[11]<<24|e[10]<<16|e[9]<<8|e[8],T=e[15]<<24|e[14]<<16|e[13]<<8|e[12],M=n,A=i,R=o,C=c,f=l,x=h,J=d,z=v,ee=E,de=_,me=S,D=P,U=L,ae=k,le=q,re=T,ne=0;ne<xw;ne+=2)M=M+f|0,U^=M,U=U>>>32-16|U<<16,ee=ee+U|0,f^=ee,f=f>>>32-12|f<<12,A=A+x|0,ae^=A,ae=ae>>>32-16|ae<<16,de=de+ae|0,x^=de,x=x>>>32-12|x<<12,R=R+J|0,le^=R,le=le>>>32-16|le<<16,me=me+le|0,J^=me,J=J>>>32-12|J<<12,C=C+z|0,re^=C,re=re>>>32-16|re<<16,D=D+re|0,z^=D,z=z>>>32-12|z<<12,R=R+J|0,le^=R,le=le>>>32-8|le<<8,me=me+le|0,J^=me,J=J>>>32-7|J<<7,C=C+z|0,re^=C,re=re>>>32-8|re<<8,D=D+re|0,z^=D,z=z>>>32-7|z<<7,A=A+x|0,ae^=A,ae=ae>>>32-8|ae<<8,de=de+ae|0,x^=de,x=x>>>32-7|x<<7,M=M+f|0,U^=M,U=U>>>32-8|U<<8,ee=ee+U|0,f^=ee,f=f>>>32-7|f<<7,M=M+x|0,re^=M,re=re>>>32-16|re<<16,me=me+re|0,x^=me,x=x>>>32-12|x<<12,A=A+J|0,U^=A,U=U>>>32-16|U<<16,D=D+U|0,J^=D,J=J>>>32-12|J<<12,R=R+z|0,ae^=R,ae=ae>>>32-16|ae<<16,ee=ee+ae|0,z^=ee,z=z>>>32-12|z<<12,C=C+f|0,le^=C,le=le>>>32-16|le<<16,de=de+le|0,f^=de,f=f>>>32-12|f<<12,R=R+z|0,ae^=R,ae=ae>>>32-8|ae<<8,ee=ee+ae|0,z^=ee,z=z>>>32-7|z<<7,C=C+f|0,le^=C,le=le>>>32-8|le<<8,de=de+le|0,f^=de,f=f>>>32-7|f<<7,A=A+J|0,U^=A,U=U>>>32-8|U<<8,D=D+U|0,J^=D,J=J>>>32-7|J<<7,M=M+x|0,re^=M,re=re>>>32-8|re<<8,me=me+re|0,x^=me,x=x>>>32-7|x<<7;Er.writeUint32LE(M+n|0,t,0),Er.writeUint32LE(A+i|0,t,4),Er.writeUint32LE(R+o|0,t,8),Er.writeUint32LE(C+c|0,t,12),Er.writeUint32LE(f+l|0,t,16),Er.writeUint32LE(x+h|0,t,20),Er.writeUint32LE(J+d|0,t,24),Er.writeUint32LE(z+v|0,t,28),Er.writeUint32LE(ee+E|0,t,32),Er.writeUint32LE(de+_|0,t,36),Er.writeUint32LE(me+S|0,t,40),Er.writeUint32LE(D+P|0,t,44),Er.writeUint32LE(U+L|0,t,48),Er.writeUint32LE(ae+k|0,t,52),Er.writeUint32LE(le+q|0,t,56),Er.writeUint32LE(re+T|0,t,60)}function hd(t,e,r,n,i){if(i===void 0&&(i=0),t.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(n.length<r.length)throw new Error("ChaCha: destination is shorter than source");var o,c;if(i===0){if(e.length!==8&&e.length!==12)throw new Error("ChaCha nonce must be 8 or 12 bytes");o=new Uint8Array(16),c=o.length-e.length,o.set(e,c)}else{if(e.length!==16)throw new Error("ChaCha nonce with counter must be 16 bytes");o=e,c=i}for(var l=new Uint8Array(64),h=0;h<r.length;h+=64){Cw(l,o,t);for(var d=h;d<h+64&&d<r.length;d++)n[d]=r[d]^l[d-h];Sw(o,0,c)}return Vl.wipe(l),i===0&&Vl.wipe(o),n}Aa.streamXOR=hd;function Iw(t,e,r,n){return n===void 0&&(n=0),Vl.wipe(r),hd(t,e,r,r,n)}Aa.stream=Iw;function Sw(t,e,r){for(var n=1;r--;)n=n+(t[e]&255)|0,t[e]=n&255,n>>>=8,e++;if(n>0)throw new Error("ChaCha: counter overflow")}var fd={},ri={};Object.defineProperty(ri,"__esModule",{value:!0});function Dw(t,e,r){return~(t-1)&e|t-1&r}ri.select=Dw;function Ow(t,e){return(t|0)-(e|0)-1>>>31&1}ri.lessOrEqual=Ow;function dd(t,e){if(t.length!==e.length)return 0;for(var r=0,n=0;n<t.length;n++)r|=t[n]^e[n];return 1&r-1>>>8}ri.compare=dd;function Aw(t,e){return t.length===0||e.length===0?!1:dd(t,e)!==0}ri.equal=Aw,function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ri,r=Kr;t.DIGEST_LENGTH=16;var n=function(){function c(l){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var h=l[0]|l[1]<<8;this._r[0]=h&8191;var d=l[2]|l[3]<<8;this._r[1]=(h>>>13|d<<3)&8191;var v=l[4]|l[5]<<8;this._r[2]=(d>>>10|v<<6)&7939;var E=l[6]|l[7]<<8;this._r[3]=(v>>>7|E<<9)&8191;var _=l[8]|l[9]<<8;this._r[4]=(E>>>4|_<<12)&255,this._r[5]=_>>>1&8190;var S=l[10]|l[11]<<8;this._r[6]=(_>>>14|S<<2)&8191;var P=l[12]|l[13]<<8;this._r[7]=(S>>>11|P<<5)&8065;var L=l[14]|l[15]<<8;this._r[8]=(P>>>8|L<<8)&8191,this._r[9]=L>>>5&127,this._pad[0]=l[16]|l[17]<<8,this._pad[1]=l[18]|l[19]<<8,this._pad[2]=l[20]|l[21]<<8,this._pad[3]=l[22]|l[23]<<8,this._pad[4]=l[24]|l[25]<<8,this._pad[5]=l[26]|l[27]<<8,this._pad[6]=l[28]|l[29]<<8,this._pad[7]=l[30]|l[31]<<8}return c.prototype._blocks=function(l,h,d){for(var v=this._fin?0:2048,E=this._h[0],_=this._h[1],S=this._h[2],P=this._h[3],L=this._h[4],k=this._h[5],q=this._h[6],T=this._h[7],M=this._h[8],A=this._h[9],R=this._r[0],C=this._r[1],f=this._r[2],x=this._r[3],J=this._r[4],z=this._r[5],ee=this._r[6],de=this._r[7],me=this._r[8],D=this._r[9];d>=16;){var U=l[h+0]|l[h+1]<<8;E+=U&8191;var ae=l[h+2]|l[h+3]<<8;_+=(U>>>13|ae<<3)&8191;var le=l[h+4]|l[h+5]<<8;S+=(ae>>>10|le<<6)&8191;var re=l[h+6]|l[h+7]<<8;P+=(le>>>7|re<<9)&8191;var ne=l[h+8]|l[h+9]<<8;L+=(re>>>4|ne<<12)&8191,k+=ne>>>1&8191;var oe=l[h+10]|l[h+11]<<8;q+=(ne>>>14|oe<<2)&8191;var ie=l[h+12]|l[h+13]<<8;T+=(oe>>>11|ie<<5)&8191;var Se=l[h+14]|l[h+15]<<8;M+=(ie>>>8|Se<<8)&8191,A+=Se>>>5|v;var ge=0,Ne=ge;Ne+=E*R,Ne+=_*(5*D),Ne+=S*(5*me),Ne+=P*(5*de),Ne+=L*(5*ee),ge=Ne>>>13,Ne&=8191,Ne+=k*(5*z),Ne+=q*(5*J),Ne+=T*(5*x),Ne+=M*(5*f),Ne+=A*(5*C),ge+=Ne>>>13,Ne&=8191;var be=ge;be+=E*C,be+=_*R,be+=S*(5*D),be+=P*(5*me),be+=L*(5*de),ge=be>>>13,be&=8191,be+=k*(5*ee),be+=q*(5*z),be+=T*(5*J),be+=M*(5*x),be+=A*(5*f),ge+=be>>>13,be&=8191;var Ae=ge;Ae+=E*f,Ae+=_*C,Ae+=S*R,Ae+=P*(5*D),Ae+=L*(5*me),ge=Ae>>>13,Ae&=8191,Ae+=k*(5*de),Ae+=q*(5*ee),Ae+=T*(5*z),Ae+=M*(5*J),Ae+=A*(5*x),ge+=Ae>>>13,Ae&=8191;var X=ge;X+=E*x,X+=_*f,X+=S*C,X+=P*R,X+=L*(5*D),ge=X>>>13,X&=8191,X+=k*(5*me),X+=q*(5*de),X+=T*(5*ee),X+=M*(5*z),X+=A*(5*J),ge+=X>>>13,X&=8191;var Y=ge;Y+=E*J,Y+=_*x,Y+=S*f,Y+=P*C,Y+=L*R,ge=Y>>>13,Y&=8191,Y+=k*(5*D),Y+=q*(5*me),Y+=T*(5*de),Y+=M*(5*ee),Y+=A*(5*z),ge+=Y>>>13,Y&=8191;var W=ge;W+=E*z,W+=_*J,W+=S*x,W+=P*f,W+=L*C,ge=W>>>13,W&=8191,W+=k*R,W+=q*(5*D),W+=T*(5*me),W+=M*(5*de),W+=A*(5*ee),ge+=W>>>13,W&=8191;var w=ge;w+=E*ee,w+=_*z,w+=S*J,w+=P*x,w+=L*f,ge=w>>>13,w&=8191,w+=k*C,w+=q*R,w+=T*(5*D),w+=M*(5*me),w+=A*(5*de),ge+=w>>>13,w&=8191;var F=ge;F+=E*de,F+=_*ee,F+=S*z,F+=P*J,F+=L*x,ge=F>>>13,F&=8191,F+=k*f,F+=q*C,F+=T*R,F+=M*(5*D),F+=A*(5*me),ge+=F>>>13,F&=8191;var we=ge;we+=E*me,we+=_*de,we+=S*ee,we+=P*z,we+=L*J,ge=we>>>13,we&=8191,we+=k*x,we+=q*f,we+=T*C,we+=M*R,we+=A*(5*D),ge+=we>>>13,we&=8191;var ve=ge;ve+=E*D,ve+=_*me,ve+=S*de,ve+=P*ee,ve+=L*z,ge=ve>>>13,ve&=8191,ve+=k*J,ve+=q*x,ve+=T*f,ve+=M*C,ve+=A*R,ge+=ve>>>13,ve&=8191,ge=(ge<<2)+ge|0,ge=ge+Ne|0,Ne=ge&8191,ge=ge>>>13,be+=ge,E=Ne,_=be,S=Ae,P=X,L=Y,k=W,q=w,T=F,M=we,A=ve,h+=16,d-=16}this._h[0]=E,this._h[1]=_,this._h[2]=S,this._h[3]=P,this._h[4]=L,this._h[5]=k,this._h[6]=q,this._h[7]=T,this._h[8]=M,this._h[9]=A},c.prototype.finish=function(l,h){h===void 0&&(h=0);var d=new Uint16Array(10),v,E,_,S;if(this._leftover){for(S=this._leftover,this._buffer[S++]=1;S<16;S++)this._buffer[S]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(v=this._h[1]>>>13,this._h[1]&=8191,S=2;S<10;S++)this._h[S]+=v,v=this._h[S]>>>13,this._h[S]&=8191;for(this._h[0]+=v*5,v=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=v,v=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=v,d[0]=this._h[0]+5,v=d[0]>>>13,d[0]&=8191,S=1;S<10;S++)d[S]=this._h[S]+v,v=d[S]>>>13,d[S]&=8191;for(d[9]-=1<<13,E=(v^1)-1,S=0;S<10;S++)d[S]&=E;for(E=~E,S=0;S<10;S++)this._h[S]=this._h[S]&E|d[S];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,_=this._h[0]+this._pad[0],this._h[0]=_&65535,S=1;S<8;S++)_=(this._h[S]+this._pad[S]|0)+(_>>>16)|0,this._h[S]=_&65535;return l[h+0]=this._h[0]>>>0,l[h+1]=this._h[0]>>>8,l[h+2]=this._h[1]>>>0,l[h+3]=this._h[1]>>>8,l[h+4]=this._h[2]>>>0,l[h+5]=this._h[2]>>>8,l[h+6]=this._h[3]>>>0,l[h+7]=this._h[3]>>>8,l[h+8]=this._h[4]>>>0,l[h+9]=this._h[4]>>>8,l[h+10]=this._h[5]>>>0,l[h+11]=this._h[5]>>>8,l[h+12]=this._h[6]>>>0,l[h+13]=this._h[6]>>>8,l[h+14]=this._h[7]>>>0,l[h+15]=this._h[7]>>>8,this._finished=!0,this},c.prototype.update=function(l){var h=0,d=l.length,v;if(this._leftover){v=16-this._leftover,v>d&&(v=d);for(var E=0;E<v;E++)this._buffer[this._leftover+E]=l[h+E];if(d-=v,h+=v,this._leftover+=v,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(d>=16&&(v=d-d%16,this._blocks(l,h,v),h+=v,d-=v),d){for(var E=0;E<d;E++)this._buffer[this._leftover+E]=l[h+E];this._leftover+=d}return this},c.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var l=new Uint8Array(16);return this.finish(l),l},c.prototype.clean=function(){return r.wipe(this._buffer),r.wipe(this._r),r.wipe(this._h),r.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},c}();t.Poly1305=n;function i(c,l){var h=new n(c);h.update(l);var d=h.digest();return h.clean(),d}t.oneTimeAuth=i;function o(c,l){return c.length!==t.DIGEST_LENGTH||l.length!==t.DIGEST_LENGTH?!1:e.equal(c,l)}t.equal=o}(fd),function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Aa,r=fd,n=Kr,i=Qe,o=ri;t.KEY_LENGTH=32,t.NONCE_LENGTH=12,t.TAG_LENGTH=16;var c=new Uint8Array(16),l=function(){function h(d){if(this.nonceLength=t.NONCE_LENGTH,this.tagLength=t.TAG_LENGTH,d.length!==t.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(d)}return h.prototype.seal=function(d,v,E,_){if(d.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var S=new Uint8Array(16);S.set(d,S.length-d.length);var P=new Uint8Array(32);e.stream(this._key,S,P,4);var L=v.length+this.tagLength,k;if(_){if(_.length!==L)throw new Error("ChaCha20Poly1305: incorrect destination length");k=_}else k=new Uint8Array(L);return e.streamXOR(this._key,S,v,k,4),this._authenticate(k.subarray(k.length-this.tagLength,k.length),P,k.subarray(0,k.length-this.tagLength),E),n.wipe(S),k},h.prototype.open=function(d,v,E,_){if(d.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(v.length<this.tagLength)return null;var S=new Uint8Array(16);S.set(d,S.length-d.length);var P=new Uint8Array(32);e.stream(this._key,S,P,4);var L=new Uint8Array(this.tagLength);if(this._authenticate(L,P,v.subarray(0,v.length-this.tagLength),E),!o.equal(L,v.subarray(v.length-this.tagLength,v.length)))return null;var k=v.length-this.tagLength,q;if(_){if(_.length!==k)throw new Error("ChaCha20Poly1305: incorrect destination length");q=_}else q=new Uint8Array(k);return e.streamXOR(this._key,S,v.subarray(0,v.length-this.tagLength),q,4),n.wipe(S),q},h.prototype.clean=function(){return n.wipe(this._key),this},h.prototype._authenticate=function(d,v,E,_){var S=new r.Poly1305(v);_&&(S.update(_),_.length%16>0&&S.update(c.subarray(_.length%16))),S.update(E),E.length%16>0&&S.update(c.subarray(E.length%16));var P=new Uint8Array(8);_&&i.writeUint64LE(_.length,P),S.update(P),i.writeUint64LE(E.length,P),S.update(P);for(var L=S.digest(),k=0;k<L.length;k++)d[k]=L[k];S.clean(),n.wipe(L),n.wipe(P)},h}();t.ChaCha20Poly1305=l}(kl);var pd={},lo={},Kl={};Object.defineProperty(Kl,"__esModule",{value:!0});function $w(t){return typeof t.saveState<"u"&&typeof t.restoreState<"u"&&typeof t.cleanSavedState<"u"}Kl.isSerializableHash=$w,Object.defineProperty(lo,"__esModule",{value:!0});var In=Kl,Pw=ri,Tw=Kr,gd=function(){function t(e,r){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);r.length>this.blockSize?this._inner.update(r).finish(n).clean():n.set(r);for(var i=0;i<n.length;i++)n[i]^=54;this._inner.update(n);for(var i=0;i<n.length;i++)n[i]^=106;this._outer.update(n),In.isSerializableHash(this._inner)&&In.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),Tw.wipe(n)}return t.prototype.reset=function(){if(!In.isSerializableHash(this._inner)||!In.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},t.prototype.clean=function(){In.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),In.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},t.prototype.update=function(e){return this._inner.update(e),this},t.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},t.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},t.prototype.saveState=function(){if(!In.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},t.prototype.restoreState=function(e){if(!In.isSerializableHash(this._inner)||!In.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},t.prototype.cleanSavedState=function(e){if(!In.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},t}();lo.HMAC=gd;function Rw(t,e,r){var n=new gd(t,e);n.update(r);var i=n.digest();return n.clean(),i}lo.hmac=Rw,lo.equal=Pw.equal,Object.defineProperty(pd,"__esModule",{value:!0});var md=lo,wd=Kr,Nw=function(){function t(e,r,n,i){n===void 0&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=i;var o=md.hmac(this._hash,n,r);this._hmac=new md.HMAC(e,o),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return t.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(e===0)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},t.prototype.expand=function(e){for(var r=new Uint8Array(e),n=0;n<r.length;n++)this._bufpos===this._buffer.length&&this._fillBuffer(),r[n]=this._buffer[this._bufpos++];return r},t.prototype.clean=function(){this._hmac.clean(),wd.wipe(this._buffer),wd.wipe(this._counter),this._bufpos=0},t}(),Mw=pd.HKDF=Nw,gs={},Ta={},Ra={};Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.BrowserRandomSource=void 0;const vd=65536;class Lw{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e=typeof self<"u"?self.crypto||self.msCrypto:null;e&&e.getRandomValues!==void 0&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const r=new Uint8Array(e);for(let n=0;n<r.length;n+=vd)this._crypto.getRandomValues(r.subarray(n,n+Math.min(r.length-n,vd)));return r}}Ra.BrowserRandomSource=Lw;function jw(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Na={},Uw={},Fw=Object.freeze({__proto__:null,default:Uw}),Bw=Ii(Fw);Object.defineProperty(Na,"__esModule",{value:!0}),Na.NodeRandomSource=void 0;const kw=Kr;class Hw{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof jw<"u"){const e=Bw;e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let r=this._crypto.randomBytes(e);if(r.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const n=new Uint8Array(e);for(let i=0;i<n.length;i++)n[i]=r[i];return(0,kw.wipe)(r),n}}Na.NodeRandomSource=Hw,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.SystemRandomSource=void 0;const zw=Ra,Ww=Na;class qw{constructor(){if(this.isAvailable=!1,this.name="",this._source=new zw.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new Ww.NodeRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Node";return}}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}}Ta.SystemRandomSource=qw,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const e=Ta,r=Qe,n=Kr;t.defaultRandomSource=new e.SystemRandomSource;function i(d,v=t.defaultRandomSource){return v.randomBytes(d)}t.randomBytes=i;function o(d=t.defaultRandomSource){const v=i(4,d),E=(0,r.readUint32LE)(v);return(0,n.wipe)(v),E}t.randomUint32=o;const c="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function l(d,v=c,E=t.defaultRandomSource){if(v.length<2)throw new Error("randomString charset is too short");if(v.length>256)throw new Error("randomString charset is too long");let _="";const S=v.length,P=256-256%S;for(;d>0;){const L=i(Math.ceil(d*256/P),E);for(let k=0;k<L.length&&d>0;k++){const q=L[k];q<P&&(_+=v.charAt(q%S),d--)}(0,n.wipe)(L)}return _}t.randomString=l;function h(d,v=c,E=t.defaultRandomSource){const _=Math.ceil(d/(Math.log(v.length)/Math.LN2));return l(_,v,E)}t.randomStringForEntropy=h}(gs);var Ma={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Qe,r=Kr;t.DIGEST_LENGTH=32,t.BLOCK_SIZE=64;var n=function(){function l(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return l.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},l.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},l.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._temp),this.reset()},l.prototype.update=function(h,d){if(d===void 0&&(d=h.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var v=0;if(this._bytesHashed+=d,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&d>0;)this._buffer[this._bufferLength++]=h[v++],d--;this._bufferLength===this.blockSize&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(d>=this.blockSize&&(v=o(this._temp,this._state,h,v,d),d%=this.blockSize);d>0;)this._buffer[this._bufferLength++]=h[v++],d--;return this},l.prototype.finish=function(h){if(!this._finished){var d=this._bytesHashed,v=this._bufferLength,E=d/536870912|0,_=d<<3,S=d%64<56?64:128;this._buffer[v]=128;for(var P=v+1;P<S-8;P++)this._buffer[P]=0;e.writeUint32BE(E,this._buffer,S-8),e.writeUint32BE(_,this._buffer,S-4),o(this._temp,this._state,this._buffer,0,S),this._finished=!0}for(var P=0;P<this.digestLength/4;P++)e.writeUint32BE(this._state[P],h,P*4);return this},l.prototype.digest=function(){var h=new Uint8Array(this.digestLength);return this.finish(h),h},l.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},l.prototype.restoreState=function(h){return this._state.set(h.state),this._bufferLength=h.bufferLength,h.buffer&&this._buffer.set(h.buffer),this._bytesHashed=h.bytesHashed,this._finished=!1,this},l.prototype.cleanSavedState=function(h){r.wipe(h.state),h.buffer&&r.wipe(h.buffer),h.bufferLength=0,h.bytesHashed=0},l}();t.SHA256=n;var i=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function o(l,h,d,v,E){for(;E>=64;){for(var _=h[0],S=h[1],P=h[2],L=h[3],k=h[4],q=h[5],T=h[6],M=h[7],A=0;A<16;A++){var R=v+A*4;l[A]=e.readUint32BE(d,R)}for(var A=16;A<64;A++){var C=l[A-2],f=(C>>>17|C<<32-17)^(C>>>19|C<<32-19)^C>>>10;C=l[A-15];var x=(C>>>7|C<<32-7)^(C>>>18|C<<32-18)^C>>>3;l[A]=(f+l[A-7]|0)+(x+l[A-16]|0)}for(var A=0;A<64;A++){var f=(((k>>>6|k<<26)^(k>>>11|k<<21)^(k>>>25|k<<7))+(k&q^~k&T)|0)+(M+(i[A]+l[A]|0)|0)|0,x=((_>>>2|_<<32-2)^(_>>>13|_<<32-13)^(_>>>22|_<<32-22))+(_&S^_&P^S&P)|0;M=T,T=q,q=k,k=L+f|0,L=P,P=S,S=_,_=f+x|0}h[0]+=_,h[1]+=S,h[2]+=P,h[3]+=L,h[4]+=k,h[5]+=q,h[6]+=T,h[7]+=M,v+=64,E-=64}return v}function c(l){var h=new n;h.update(l);var d=h.digest();return h.clean(),d}t.hash=c})(Ma);var Gl={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sharedKey=t.generateKeyPair=t.generateKeyPairFromSeed=t.scalarMultBase=t.scalarMult=t.SHARED_KEY_LENGTH=t.SECRET_KEY_LENGTH=t.PUBLIC_KEY_LENGTH=void 0;const e=gs,r=Kr;t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=32,t.SHARED_KEY_LENGTH=32;function n(A){const R=new Float64Array(16);if(A)for(let C=0;C<A.length;C++)R[C]=A[C];return R}const i=new Uint8Array(32);i[0]=9;const o=n([56129,1]);function c(A){let R=1;for(let C=0;C<16;C++){let f=A[C]+R+65535;R=Math.floor(f/65536),A[C]=f-R*65536}A[0]+=R-1+37*(R-1)}function l(A,R,C){const f=~(C-1);for(let x=0;x<16;x++){const J=f&(A[x]^R[x]);A[x]^=J,R[x]^=J}}function h(A,R){const C=n(),f=n();for(let x=0;x<16;x++)f[x]=R[x];c(f),c(f),c(f);for(let x=0;x<2;x++){C[0]=f[0]-65517;for(let z=1;z<15;z++)C[z]=f[z]-65535-(C[z-1]>>16&1),C[z-1]&=65535;C[15]=f[15]-32767-(C[14]>>16&1);const J=C[15]>>16&1;C[14]&=65535,l(f,C,1-J)}for(let x=0;x<16;x++)A[2*x]=f[x]&255,A[2*x+1]=f[x]>>8}function d(A,R){for(let C=0;C<16;C++)A[C]=R[2*C]+(R[2*C+1]<<8);A[15]&=32767}function v(A,R,C){for(let f=0;f<16;f++)A[f]=R[f]+C[f]}function E(A,R,C){for(let f=0;f<16;f++)A[f]=R[f]-C[f]}function _(A,R,C){let f,x,J=0,z=0,ee=0,de=0,me=0,D=0,U=0,ae=0,le=0,re=0,ne=0,oe=0,ie=0,Se=0,ge=0,Ne=0,be=0,Ae=0,X=0,Y=0,W=0,w=0,F=0,we=0,ve=0,Pe=0,tt=0,ot=0,qe=0,At=0,$t=0,Ye=C[0],je=C[1],Me=C[2],ze=C[3],et=C[4],Te=C[5],Ve=C[6],b=C[7],p=C[8],m=C[9],$=C[10],B=C[11],G=C[12],Q=C[13],xe=C[14],Oe=C[15];f=R[0],J+=f*Ye,z+=f*je,ee+=f*Me,de+=f*ze,me+=f*et,D+=f*Te,U+=f*Ve,ae+=f*b,le+=f*p,re+=f*m,ne+=f*$,oe+=f*B,ie+=f*G,Se+=f*Q,ge+=f*xe,Ne+=f*Oe,f=R[1],z+=f*Ye,ee+=f*je,de+=f*Me,me+=f*ze,D+=f*et,U+=f*Te,ae+=f*Ve,le+=f*b,re+=f*p,ne+=f*m,oe+=f*$,ie+=f*B,Se+=f*G,ge+=f*Q,Ne+=f*xe,be+=f*Oe,f=R[2],ee+=f*Ye,de+=f*je,me+=f*Me,D+=f*ze,U+=f*et,ae+=f*Te,le+=f*Ve,re+=f*b,ne+=f*p,oe+=f*m,ie+=f*$,Se+=f*B,ge+=f*G,Ne+=f*Q,be+=f*xe,Ae+=f*Oe,f=R[3],de+=f*Ye,me+=f*je,D+=f*Me,U+=f*ze,ae+=f*et,le+=f*Te,re+=f*Ve,ne+=f*b,oe+=f*p,ie+=f*m,Se+=f*$,ge+=f*B,Ne+=f*G,be+=f*Q,Ae+=f*xe,X+=f*Oe,f=R[4],me+=f*Ye,D+=f*je,U+=f*Me,ae+=f*ze,le+=f*et,re+=f*Te,ne+=f*Ve,oe+=f*b,ie+=f*p,Se+=f*m,ge+=f*$,Ne+=f*B,be+=f*G,Ae+=f*Q,X+=f*xe,Y+=f*Oe,f=R[5],D+=f*Ye,U+=f*je,ae+=f*Me,le+=f*ze,re+=f*et,ne+=f*Te,oe+=f*Ve,ie+=f*b,Se+=f*p,ge+=f*m,Ne+=f*$,be+=f*B,Ae+=f*G,X+=f*Q,Y+=f*xe,W+=f*Oe,f=R[6],U+=f*Ye,ae+=f*je,le+=f*Me,re+=f*ze,ne+=f*et,oe+=f*Te,ie+=f*Ve,Se+=f*b,ge+=f*p,Ne+=f*m,be+=f*$,Ae+=f*B,X+=f*G,Y+=f*Q,W+=f*xe,w+=f*Oe,f=R[7],ae+=f*Ye,le+=f*je,re+=f*Me,ne+=f*ze,oe+=f*et,ie+=f*Te,Se+=f*Ve,ge+=f*b,Ne+=f*p,be+=f*m,Ae+=f*$,X+=f*B,Y+=f*G,W+=f*Q,w+=f*xe,F+=f*Oe,f=R[8],le+=f*Ye,re+=f*je,ne+=f*Me,oe+=f*ze,ie+=f*et,Se+=f*Te,ge+=f*Ve,Ne+=f*b,be+=f*p,Ae+=f*m,X+=f*$,Y+=f*B,W+=f*G,w+=f*Q,F+=f*xe,we+=f*Oe,f=R[9],re+=f*Ye,ne+=f*je,oe+=f*Me,ie+=f*ze,Se+=f*et,ge+=f*Te,Ne+=f*Ve,be+=f*b,Ae+=f*p,X+=f*m,Y+=f*$,W+=f*B,w+=f*G,F+=f*Q,we+=f*xe,ve+=f*Oe,f=R[10],ne+=f*Ye,oe+=f*je,ie+=f*Me,Se+=f*ze,ge+=f*et,Ne+=f*Te,be+=f*Ve,Ae+=f*b,X+=f*p,Y+=f*m,W+=f*$,w+=f*B,F+=f*G,we+=f*Q,ve+=f*xe,Pe+=f*Oe,f=R[11],oe+=f*Ye,ie+=f*je,Se+=f*Me,ge+=f*ze,Ne+=f*et,be+=f*Te,Ae+=f*Ve,X+=f*b,Y+=f*p,W+=f*m,w+=f*$,F+=f*B,we+=f*G,ve+=f*Q,Pe+=f*xe,tt+=f*Oe,f=R[12],ie+=f*Ye,Se+=f*je,ge+=f*Me,Ne+=f*ze,be+=f*et,Ae+=f*Te,X+=f*Ve,Y+=f*b,W+=f*p,w+=f*m,F+=f*$,we+=f*B,ve+=f*G,Pe+=f*Q,tt+=f*xe,ot+=f*Oe,f=R[13],Se+=f*Ye,ge+=f*je,Ne+=f*Me,be+=f*ze,Ae+=f*et,X+=f*Te,Y+=f*Ve,W+=f*b,w+=f*p,F+=f*m,we+=f*$,ve+=f*B,Pe+=f*G,tt+=f*Q,ot+=f*xe,qe+=f*Oe,f=R[14],ge+=f*Ye,Ne+=f*je,be+=f*Me,Ae+=f*ze,X+=f*et,Y+=f*Te,W+=f*Ve,w+=f*b,F+=f*p,we+=f*m,ve+=f*$,Pe+=f*B,tt+=f*G,ot+=f*Q,qe+=f*xe,At+=f*Oe,f=R[15],Ne+=f*Ye,be+=f*je,Ae+=f*Me,X+=f*ze,Y+=f*et,W+=f*Te,w+=f*Ve,F+=f*b,we+=f*p,ve+=f*m,Pe+=f*$,tt+=f*B,ot+=f*G,qe+=f*Q,At+=f*xe,$t+=f*Oe,J+=38*be,z+=38*Ae,ee+=38*X,de+=38*Y,me+=38*W,D+=38*w,U+=38*F,ae+=38*we,le+=38*ve,re+=38*Pe,ne+=38*tt,oe+=38*ot,ie+=38*qe,Se+=38*At,ge+=38*$t,x=1,f=J+x+65535,x=Math.floor(f/65536),J=f-x*65536,f=z+x+65535,x=Math.floor(f/65536),z=f-x*65536,f=ee+x+65535,x=Math.floor(f/65536),ee=f-x*65536,f=de+x+65535,x=Math.floor(f/65536),de=f-x*65536,f=me+x+65535,x=Math.floor(f/65536),me=f-x*65536,f=D+x+65535,x=Math.floor(f/65536),D=f-x*65536,f=U+x+65535,x=Math.floor(f/65536),U=f-x*65536,f=ae+x+65535,x=Math.floor(f/65536),ae=f-x*65536,f=le+x+65535,x=Math.floor(f/65536),le=f-x*65536,f=re+x+65535,x=Math.floor(f/65536),re=f-x*65536,f=ne+x+65535,x=Math.floor(f/65536),ne=f-x*65536,f=oe+x+65535,x=Math.floor(f/65536),oe=f-x*65536,f=ie+x+65535,x=Math.floor(f/65536),ie=f-x*65536,f=Se+x+65535,x=Math.floor(f/65536),Se=f-x*65536,f=ge+x+65535,x=Math.floor(f/65536),ge=f-x*65536,f=Ne+x+65535,x=Math.floor(f/65536),Ne=f-x*65536,J+=x-1+37*(x-1),x=1,f=J+x+65535,x=Math.floor(f/65536),J=f-x*65536,f=z+x+65535,x=Math.floor(f/65536),z=f-x*65536,f=ee+x+65535,x=Math.floor(f/65536),ee=f-x*65536,f=de+x+65535,x=Math.floor(f/65536),de=f-x*65536,f=me+x+65535,x=Math.floor(f/65536),me=f-x*65536,f=D+x+65535,x=Math.floor(f/65536),D=f-x*65536,f=U+x+65535,x=Math.floor(f/65536),U=f-x*65536,f=ae+x+65535,x=Math.floor(f/65536),ae=f-x*65536,f=le+x+65535,x=Math.floor(f/65536),le=f-x*65536,f=re+x+65535,x=Math.floor(f/65536),re=f-x*65536,f=ne+x+65535,x=Math.floor(f/65536),ne=f-x*65536,f=oe+x+65535,x=Math.floor(f/65536),oe=f-x*65536,f=ie+x+65535,x=Math.floor(f/65536),ie=f-x*65536,f=Se+x+65535,x=Math.floor(f/65536),Se=f-x*65536,f=ge+x+65535,x=Math.floor(f/65536),ge=f-x*65536,f=Ne+x+65535,x=Math.floor(f/65536),Ne=f-x*65536,J+=x-1+37*(x-1),A[0]=J,A[1]=z,A[2]=ee,A[3]=de,A[4]=me,A[5]=D,A[6]=U,A[7]=ae,A[8]=le,A[9]=re,A[10]=ne,A[11]=oe,A[12]=ie,A[13]=Se,A[14]=ge,A[15]=Ne}function S(A,R){_(A,R,R)}function P(A,R){const C=n();for(let f=0;f<16;f++)C[f]=R[f];for(let f=253;f>=0;f--)S(C,C),f!==2&&f!==4&&_(C,C,R);for(let f=0;f<16;f++)A[f]=C[f]}function L(A,R){const C=new Uint8Array(32),f=new Float64Array(80),x=n(),J=n(),z=n(),ee=n(),de=n(),me=n();for(let le=0;le<31;le++)C[le]=A[le];C[31]=A[31]&127|64,C[0]&=248,d(f,R);for(let le=0;le<16;le++)J[le]=f[le];x[0]=ee[0]=1;for(let le=254;le>=0;--le){const re=C[le>>>3]>>>(le&7)&1;l(x,J,re),l(z,ee,re),v(de,x,z),E(x,x,z),v(z,J,ee),E(J,J,ee),S(ee,de),S(me,x),_(x,z,x),_(z,J,de),v(de,x,z),E(x,x,z),S(J,x),E(z,ee,me),_(x,z,o),v(x,x,ee),_(z,z,x),_(x,ee,me),_(ee,J,f),S(J,de),l(x,J,re),l(z,ee,re)}for(let le=0;le<16;le++)f[le+16]=x[le],f[le+32]=z[le],f[le+48]=J[le],f[le+64]=ee[le];const D=f.subarray(32),U=f.subarray(16);P(D,D),_(U,U,D);const ae=new Uint8Array(32);return h(ae,U),ae}t.scalarMult=L;function k(A){return L(A,i)}t.scalarMultBase=k;function q(A){if(A.length!==t.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${t.SECRET_KEY_LENGTH} bytes`);const R=new Uint8Array(A);return{publicKey:k(R),secretKey:R}}t.generateKeyPairFromSeed=q;function T(A){const R=(0,e.randomBytes)(32,A),C=q(R);return(0,r.wipe)(R),C}t.generateKeyPair=T;function M(A,R,C=!1){if(A.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(R.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const f=L(A,R);if(C){let x=0;for(let J=0;J<f.length;J++)x|=f[J];if(x===0)throw new Error("X25519: invalid shared key")}return f}t.sharedKey=M})(Gl);function Zl(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function yd(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?Zl(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function Yl(t,e){e||(e=t.reduce((i,o)=>i+o.length,0));const r=yd(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return Zl(r)}function Vw(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),c=o.charCodeAt(0);if(r[c]!==255)throw new TypeError(o+" is ambiguous");r[c]=i}var l=t.length,h=t.charAt(0),d=Math.log(l)/Math.log(256),v=Math.log(256)/Math.log(l);function E(P){if(P instanceof Uint8Array||(ArrayBuffer.isView(P)?P=new Uint8Array(P.buffer,P.byteOffset,P.byteLength):Array.isArray(P)&&(P=Uint8Array.from(P))),!(P instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(P.length===0)return"";for(var L=0,k=0,q=0,T=P.length;q!==T&&P[q]===0;)q++,L++;for(var M=(T-q)*v+1>>>0,A=new Uint8Array(M);q!==T;){for(var R=P[q],C=0,f=M-1;(R!==0||C<k)&&f!==-1;f--,C++)R+=256*A[f]>>>0,A[f]=R%l>>>0,R=R/l>>>0;if(R!==0)throw new Error("Non-zero carry");k=C,q++}for(var x=M-k;x!==M&&A[x]===0;)x++;for(var J=h.repeat(L);x<M;++x)J+=t.charAt(A[x]);return J}function _(P){if(typeof P!="string")throw new TypeError("Expected String");if(P.length===0)return new Uint8Array;var L=0;if(P[L]!==" "){for(var k=0,q=0;P[L]===h;)k++,L++;for(var T=(P.length-L)*d+1>>>0,M=new Uint8Array(T);P[L];){var A=r[P.charCodeAt(L)];if(A===255)return;for(var R=0,C=T-1;(A!==0||R<q)&&C!==-1;C--,R++)A+=l*M[C]>>>0,M[C]=A%256>>>0,A=A/256>>>0;if(A!==0)throw new Error("Non-zero carry");q=R,L++}if(P[L]!==" "){for(var f=T-q;f!==T&&M[f]===0;)f++;for(var x=new Uint8Array(k+(T-f)),J=k;f!==T;)x[J++]=M[f++];return x}}}function S(P){var L=_(P);if(L)return L;throw new Error(`Non-${e} character`)}return{encode:E,decodeUnsafe:_,decode:S}}var Kw=Vw,Gw=Kw;const bd=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},Zw=t=>new TextEncoder().encode(t),Yw=t=>new TextDecoder().decode(t);class Jw{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class Xw{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return _d(this,e)}}class Qw{constructor(e){this.decoders=e}or(e){return _d(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const _d=(t,e)=>new Qw({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class ev{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new Jw(e,r,n),this.decoder=new Xw(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const La=({name:t,prefix:e,encode:r,decode:n})=>new ev(t,e,r,n),uo=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=Gw(r,e);return La({prefix:t,name:e,encode:n,decode:o=>bd(i(o))})},tv=(t,e,r,n)=>{const i={};for(let v=0;v<e.length;++v)i[e[v]]=v;let o=t.length;for(;t[o-1]==="=";)--o;const c=new Uint8Array(o*r/8|0);let l=0,h=0,d=0;for(let v=0;v<o;++v){const E=i[t[v]];if(E===void 0)throw new SyntaxError(`Non-${n} character`);h=h<<r|E,l+=r,l>=8&&(l-=8,c[d++]=255&h>>l)}if(l>=r||255&h<<8-l)throw new SyntaxError("Unexpected end of data");return c},rv=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<<r)-1;let o="",c=0,l=0;for(let h=0;h<t.length;++h)for(l=l<<8|t[h],c+=8;c>r;)c-=r,o+=e[i&l>>c];if(c&&(o+=e[i&l<<r-c]),n)for(;o.length*r&7;)o+="=";return o},yr=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>La({prefix:e,name:t,encode(i){return rv(i,n,r)},decode(i){return tv(i,n,r,t)}}),nv=La({prefix:"\0",name:"identity",encode:t=>Yw(t),decode:t=>Zw(t)});var iv=Object.freeze({__proto__:null,identity:nv});const sv=yr({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var ov=Object.freeze({__proto__:null,base2:sv});const av=yr({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var cv=Object.freeze({__proto__:null,base8:av});const lv=uo({prefix:"9",name:"base10",alphabet:"0123456789"});var uv=Object.freeze({__proto__:null,base10:lv});const hv=yr({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),fv=yr({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var dv=Object.freeze({__proto__:null,base16:hv,base16upper:fv});const pv=yr({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),gv=yr({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),mv=yr({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),wv=yr({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),vv=yr({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),yv=yr({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),bv=yr({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),_v=yr({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Ev=yr({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var xv=Object.freeze({__proto__:null,base32:pv,base32upper:gv,base32pad:mv,base32padupper:wv,base32hex:vv,base32hexupper:yv,base32hexpad:bv,base32hexpadupper:_v,base32z:Ev});const Cv=uo({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Iv=uo({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Sv=Object.freeze({__proto__:null,base36:Cv,base36upper:Iv});const Dv=uo({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Ov=uo({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Av=Object.freeze({__proto__:null,base58btc:Dv,base58flickr:Ov});const $v=yr({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Pv=yr({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Tv=yr({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Rv=yr({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Nv=Object.freeze({__proto__:null,base64:$v,base64pad:Pv,base64url:Tv,base64urlpad:Rv});const Ed=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),Mv=Ed.reduce((t,e,r)=>(t[r]=e,t),[]),Lv=Ed.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function jv(t){return t.reduce((e,r)=>(e+=Mv[r],e),"")}function Uv(t){const e=[];for(const r of t){const n=Lv[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const Fv=La({prefix:"\u{1F680}",name:"base256emoji",encode:jv,decode:Uv});var Bv=Object.freeze({__proto__:null,base256emoji:Fv}),kv=Cd,xd=128,Hv=127,zv=~Hv,Wv=Math.pow(2,31);function Cd(t,e,r){e=e||[],r=r||0;for(var n=r;t>=Wv;)e[r++]=t&255|xd,t/=128;for(;t&zv;)e[r++]=t&255|xd,t>>>=7;return e[r]=t|0,Cd.bytes=r-n+1,e}var qv=Jl,Vv=128,Id=127;function Jl(t,n){var r=0,n=n||0,i=0,o=n,c,l=t.length;do{if(o>=l)throw Jl.bytes=0,new RangeError("Could not decode varint");c=t[o++],r+=i<28?(c&Id)<<i:(c&Id)*Math.pow(2,i),i+=7}while(c>=Vv);return Jl.bytes=o-n,r}var Kv=Math.pow(2,7),Gv=Math.pow(2,14),Zv=Math.pow(2,21),Yv=Math.pow(2,28),Jv=Math.pow(2,35),Xv=Math.pow(2,42),Qv=Math.pow(2,49),ey=Math.pow(2,56),ty=Math.pow(2,63),ry=function(t){return t<Kv?1:t<Gv?2:t<Zv?3:t<Yv?4:t<Jv?5:t<Xv?6:t<Qv?7:t<ey?8:t<ty?9:10},ny={encode:kv,decode:qv,encodingLength:ry},Sd=ny;const Dd=(t,e,r=0)=>(Sd.encode(t,e,r),e),Od=t=>Sd.encodingLength(t),Xl=(t,e)=>{const r=e.byteLength,n=Od(t),i=n+Od(r),o=new Uint8Array(i+r);return Dd(t,o,0),Dd(r,o,n),o.set(e,i),new iy(t,r,e,o)};class iy{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}}const Ad=({name:t,code:e,encode:r})=>new sy(t,e,r);class sy{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){const r=this.encode(e);return r instanceof Uint8Array?Xl(this.code,r):r.then(n=>Xl(this.code,n))}else throw Error("Unknown type, must be binary type")}}const $d=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),oy=Ad({name:"sha2-256",code:18,encode:$d("SHA-256")}),ay=Ad({name:"sha2-512",code:19,encode:$d("SHA-512")});var cy=Object.freeze({__proto__:null,sha256:oy,sha512:ay});const Pd=0,ly="identity",Td=bd;var uy=Object.freeze({__proto__:null,identity:{code:Pd,name:ly,encode:Td,digest:t=>Xl(Pd,Td(t))}});new TextEncoder,new TextDecoder;const Rd={...iv,...ov,...cv,...uv,...dv,...xv,...Sv,...Av,...Nv,...Bv};({...cy,...uy});function Nd(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const Md=Nd("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),Ql=Nd("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=yd(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),Ld={utf8:Md,"utf-8":Md,hex:Rd.base16,latin1:Ql,ascii:Ql,binary:Ql,...Rd};function Ur(t,e="utf8"){const r=Ld[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?Zl(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}function Sr(t,e="utf8"){const r=Ld[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf8"):r.encoder.encode(t).substring(1)}var jd=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},hy=function(){function t(e,r,n){this.name=e,this.version=r,this.os=n,this.type="browser"}return t}(),fy=function(){function t(e){this.version=e,this.type="node",this.name="node",this.os=process.platform}return t}(),dy=function(){function t(e,r,n,i){this.name=e,this.version=r,this.os=n,this.bot=i,this.type="bot-device"}return t}(),py=function(){function t(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return t}(),gy=function(){function t(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return t}(),my=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,wy=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Ud=3,vy=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",my]],Fd=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function yy(t){return t?Bd(t):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new gy:typeof navigator<"u"?Bd(navigator.userAgent):Ey()}function by(t){return t!==""&&vy.reduce(function(e,r){var n=r[0],i=r[1];if(e)return e;var o=i.exec(t);return!!o&&[n,o]},!1)}function Bd(t){var e=by(t);if(!e)return null;var r=e[0],n=e[1];if(r==="searchbot")return new py;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length<Ud&&(i=jd(jd([],i,!0),xy(Ud-i.length),!0)):i=[];var o=i.join("."),c=_y(t),l=wy.exec(t);return l&&l[1]?new dy(r,o,c,l[1]):new hy(r,o,c)}function _y(t){for(var e=0,r=Fd.length;e<r;e++){var n=Fd[e],i=n[0],o=n[1],c=o.exec(t);if(c)return i}return null}function Ey(){var t=typeof process<"u"&&process.version;return t?new fy(process.version.slice(1)):null}function xy(t){for(var e=[],r=0;r<t;r++)e.push("0");return e}var Le={};/*! *****************************************************************************
|
|
1
|
+
(function(bn,dr){typeof exports=="object"&&typeof module<"u"?dr(exports):typeof define=="function"&&define.amd?define(["exports"],dr):(bn=typeof globalThis<"u"?globalThis:bn||self,dr(bn["@walletconnect/ethereum-provider"]={}))})(this,function(bn){"use strict";var dr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Li(t){var e=t.default;if(typeof e=="function"){var r=function(){return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var yr={exports:{}},Es=typeof Reflect=="object"?Reflect:null,ad=Es&&typeof Es.apply=="function"?Es.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},La;Es&&typeof Es.ownKeys=="function"?La=Es.ownKeys:Object.getOwnPropertySymbols?La=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:La=function(e){return Object.getOwnPropertyNames(e)};function dw(t){console&&console.warn&&console.warn(t)}var cd=Number.isNaN||function(e){return e!==e};function _t(){_t.init.call(this)}yr.exports=_t,yr.exports.once=ww,_t.EventEmitter=_t,_t.prototype._events=void 0,_t.prototype._eventsCount=0,_t.prototype._maxListeners=void 0;var ld=10;function Ma(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(_t,"defaultMaxListeners",{enumerable:!0,get:function(){return ld},set:function(t){if(typeof t!="number"||t<0||cd(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");ld=t}}),_t.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},_t.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||cd(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function ud(t){return t._maxListeners===void 0?_t.defaultMaxListeners:t._maxListeners}_t.prototype.getMaxListeners=function(){return ud(this)},_t.prototype.emit=function(e){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=e==="error",o=this._events;if(o!==void 0)i=i&&o.error===void 0;else if(!i)return!1;if(i){var c;if(r.length>0&&(c=r[0]),c instanceof Error)throw c;var l=new Error("Unhandled error."+(c?" ("+c.message+")":""));throw l.context=c,l}var h=o[e];if(h===void 0)return!1;if(typeof h=="function")ad(h,this,r);else for(var d=h.length,v=gd(h,d),n=0;n<d;++n)ad(v[n],this,r);return!0};function hd(t,e,r,n){var i,o,c;if(Ma(r),o=t._events,o===void 0?(o=t._events=Object.create(null),t._eventsCount=0):(o.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),c=o[e]),c===void 0)c=o[e]=r,++t._eventsCount;else if(typeof c=="function"?c=o[e]=n?[r,c]:[c,r]:n?c.unshift(r):c.push(r),i=ud(t),i>0&&c.length>i&&!c.warned){c.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+c.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=c.length,dw(l)}return t}_t.prototype.addListener=function(e,r){return hd(this,e,r,!1)},_t.prototype.on=_t.prototype.addListener,_t.prototype.prependListener=function(e,r){return hd(this,e,r,!0)};function pw(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function fd(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=pw.bind(n);return i.listener=r,n.wrapFn=i,i}_t.prototype.once=function(e,r){return Ma(r),this.on(e,fd(this,e,r)),this},_t.prototype.prependOnceListener=function(e,r){return Ma(r),this.prependListener(e,fd(this,e,r)),this},_t.prototype.removeListener=function(e,r){var n,i,o,c,l;if(Ma(r),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(o=-1,c=n.length-1;c>=0;c--)if(n[c]===r||n[c].listener===r){l=n[c].listener,o=c;break}if(o<0)return this;o===0?n.shift():gw(n,o),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,l||r)}return this},_t.prototype.off=_t.prototype.removeListener,_t.prototype.removeAllListeners=function(e){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var o=Object.keys(n),c;for(i=0;i<o.length;++i)c=o[i],c!=="removeListener"&&this.removeAllListeners(c);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[e],typeof r=="function")this.removeListener(e,r);else if(r!==void 0)for(i=r.length-1;i>=0;i--)this.removeListener(e,r[i]);return this};function dd(t,e,r){var n=t._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?mw(i):gd(i,i.length)}_t.prototype.listeners=function(e){return dd(this,e,!0)},_t.prototype.rawListeners=function(e){return dd(this,e,!1)},_t.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):pd.call(t,e)},_t.prototype.listenerCount=pd;function pd(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}_t.prototype.eventNames=function(){return this._eventsCount>0?La(this._events):[]};function gd(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function gw(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function mw(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function ww(t,e){return new Promise(function(r,n){function i(c){t.removeListener(e,o),n(c)}function o(){typeof t.removeListener=="function"&&t.removeListener("error",i),r([].slice.call(arguments))}md(t,e,o,{once:!0}),e!=="error"&&vw(t,i,{once:!0})})}function vw(t,e,r){typeof t.on=="function"&&md(t,"error",e,r)}function md(t,e,r,n){if(typeof t.on=="function")n.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function i(o){n.once&&t.removeEventListener(e,i),r(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var Xl={},Ua={},et={},wd={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(l,h){var d=l>>>16&65535,v=l&65535,E=h>>>16&65535,_=h&65535;return v*_+(d*_+v*E<<16>>>0)|0}t.mul=Math.imul||e;function r(l,h){return l+h|0}t.add=r;function n(l,h){return l-h|0}t.sub=n;function i(l,h){return l<<h|l>>>32-h}t.rotl=i;function o(l,h){return l<<32-h|l>>>h}t.rotr=o;function c(l){return typeof l=="number"&&isFinite(l)&&Math.floor(l)===l}t.isInteger=Number.isInteger||c,t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(l){return t.isInteger(l)&&l>=-t.MAX_SAFE_INTEGER&&l<=t.MAX_SAFE_INTEGER}})(wd),Object.defineProperty(et,"__esModule",{value:!0});var vd=wd;function yw(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16}et.readInt16BE=yw;function bw(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])>>>0}et.readUint16BE=bw;function _w(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])<<16>>16}et.readInt16LE=_w;function Ew(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])>>>0}et.readUint16LE=Ew;function yd(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>8,e[r+1]=t>>>0,e}et.writeUint16BE=yd,et.writeInt16BE=yd;function bd(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e}et.writeUint16LE=bd,et.writeInt16LE=bd;function Ql(t,e){return e===void 0&&(e=0),t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}et.readInt32BE=Ql;function eu(t,e){return e===void 0&&(e=0),(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}et.readUint32BE=eu;function tu(t,e){return e===void 0&&(e=0),t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}et.readInt32LE=tu;function ru(t,e){return e===void 0&&(e=0),(t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e])>>>0}et.readUint32LE=ru;function ja(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>24,e[r+1]=t>>>16,e[r+2]=t>>>8,e[r+3]=t>>>0,e}et.writeUint32BE=ja,et.writeInt32BE=ja;function Fa(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24,e}et.writeUint32LE=Fa,et.writeInt32LE=Fa;function xw(t,e){e===void 0&&(e=0);var r=Ql(t,e),n=Ql(t,e+4);return r*4294967296+n-(n>>31)*4294967296}et.readInt64BE=xw;function Cw(t,e){e===void 0&&(e=0);var r=eu(t,e),n=eu(t,e+4);return r*4294967296+n}et.readUint64BE=Cw;function Iw(t,e){e===void 0&&(e=0);var r=tu(t,e),n=tu(t,e+4);return n*4294967296+r-(r>>31)*4294967296}et.readInt64LE=Iw;function Sw(t,e){e===void 0&&(e=0);var r=ru(t,e),n=ru(t,e+4);return n*4294967296+r}et.readUint64LE=Sw;function _d(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),ja(t/4294967296>>>0,e,r),ja(t>>>0,e,r+4),e}et.writeUint64BE=_d,et.writeInt64BE=_d;function Ed(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),Fa(t>>>0,e,r),Fa(t/4294967296>>>0,e,r+4),e}et.writeUint64LE=Ed,et.writeInt64LE=Ed;function Ow(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,o=t/8+r-1;o>=r;o--)n+=e[o]*i,i*=256;return n}et.readUintBE=Ow;function Dw(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,o=r;o<r+t/8;o++)n+=e[o]*i,i*=256;return n}et.readUintLE=Dw;function Aw(t,e,r,n){if(r===void 0&&(r=new Uint8Array(t/8)),n===void 0&&(n=0),t%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!vd.isSafeInteger(e))throw new Error("writeUintBE value must be an integer");for(var i=1,o=t/8+n-1;o>=n;o--)r[o]=e/i&255,i*=256;return r}et.writeUintBE=Aw;function $w(t,e,r,n){if(r===void 0&&(r=new Uint8Array(t/8)),n===void 0&&(n=0),t%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!vd.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var i=1,o=n;o<n+t/8;o++)r[o]=e/i&255,i*=256;return r}et.writeUintLE=$w;function Pw(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat32(e)}et.readFloat32BE=Pw;function Tw(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat32(e,!0)}et.readFloat32LE=Tw;function Rw(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat64(e)}et.readFloat64BE=Rw;function Nw(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat64(e,!0)}et.readFloat64LE=Nw;function Lw(t,e,r){e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat32(r,t),e}et.writeFloat32BE=Lw;function Mw(t,e,r){e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat32(r,t,!0),e}et.writeFloat32LE=Mw;function Uw(t,e,r){e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat64(r,t),e}et.writeFloat64BE=Uw;function jw(t,e,r){e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat64(r,t,!0),e}et.writeFloat64LE=jw;var Zr={};Object.defineProperty(Zr,"__esModule",{value:!0});function Fw(t){for(var e=0;e<t.length;e++)t[e]=0;return t}Zr.wipe=Fw,Object.defineProperty(Ua,"__esModule",{value:!0});var Cr=et,nu=Zr,Bw=20;function kw(t,e,r){for(var n=1634760805,i=857760878,o=2036477234,c=1797285236,l=r[3]<<24|r[2]<<16|r[1]<<8|r[0],h=r[7]<<24|r[6]<<16|r[5]<<8|r[4],d=r[11]<<24|r[10]<<16|r[9]<<8|r[8],v=r[15]<<24|r[14]<<16|r[13]<<8|r[12],E=r[19]<<24|r[18]<<16|r[17]<<8|r[16],_=r[23]<<24|r[22]<<16|r[21]<<8|r[20],O=r[27]<<24|r[26]<<16|r[25]<<8|r[24],P=r[31]<<24|r[30]<<16|r[29]<<8|r[28],U=e[3]<<24|e[2]<<16|e[1]<<8|e[0],H=e[7]<<24|e[6]<<16|e[5]<<8|e[4],G=e[11]<<24|e[10]<<16|e[9]<<8|e[8],N=e[15]<<24|e[14]<<16|e[13]<<8|e[12],L=n,$=i,T=o,I=c,f=l,x=h,J=d,z=v,ee=E,de=_,me=O,S=P,j=U,ce=H,le=G,re=N,ne=0;ne<Bw;ne+=2)L=L+f|0,j^=L,j=j>>>32-16|j<<16,ee=ee+j|0,f^=ee,f=f>>>32-12|f<<12,$=$+x|0,ce^=$,ce=ce>>>32-16|ce<<16,de=de+ce|0,x^=de,x=x>>>32-12|x<<12,T=T+J|0,le^=T,le=le>>>32-16|le<<16,me=me+le|0,J^=me,J=J>>>32-12|J<<12,I=I+z|0,re^=I,re=re>>>32-16|re<<16,S=S+re|0,z^=S,z=z>>>32-12|z<<12,T=T+J|0,le^=T,le=le>>>32-8|le<<8,me=me+le|0,J^=me,J=J>>>32-7|J<<7,I=I+z|0,re^=I,re=re>>>32-8|re<<8,S=S+re|0,z^=S,z=z>>>32-7|z<<7,$=$+x|0,ce^=$,ce=ce>>>32-8|ce<<8,de=de+ce|0,x^=de,x=x>>>32-7|x<<7,L=L+f|0,j^=L,j=j>>>32-8|j<<8,ee=ee+j|0,f^=ee,f=f>>>32-7|f<<7,L=L+x|0,re^=L,re=re>>>32-16|re<<16,me=me+re|0,x^=me,x=x>>>32-12|x<<12,$=$+J|0,j^=$,j=j>>>32-16|j<<16,S=S+j|0,J^=S,J=J>>>32-12|J<<12,T=T+z|0,ce^=T,ce=ce>>>32-16|ce<<16,ee=ee+ce|0,z^=ee,z=z>>>32-12|z<<12,I=I+f|0,le^=I,le=le>>>32-16|le<<16,de=de+le|0,f^=de,f=f>>>32-12|f<<12,T=T+z|0,ce^=T,ce=ce>>>32-8|ce<<8,ee=ee+ce|0,z^=ee,z=z>>>32-7|z<<7,I=I+f|0,le^=I,le=le>>>32-8|le<<8,de=de+le|0,f^=de,f=f>>>32-7|f<<7,$=$+J|0,j^=$,j=j>>>32-8|j<<8,S=S+j|0,J^=S,J=J>>>32-7|J<<7,L=L+x|0,re^=L,re=re>>>32-8|re<<8,me=me+re|0,x^=me,x=x>>>32-7|x<<7;Cr.writeUint32LE(L+n|0,t,0),Cr.writeUint32LE($+i|0,t,4),Cr.writeUint32LE(T+o|0,t,8),Cr.writeUint32LE(I+c|0,t,12),Cr.writeUint32LE(f+l|0,t,16),Cr.writeUint32LE(x+h|0,t,20),Cr.writeUint32LE(J+d|0,t,24),Cr.writeUint32LE(z+v|0,t,28),Cr.writeUint32LE(ee+E|0,t,32),Cr.writeUint32LE(de+_|0,t,36),Cr.writeUint32LE(me+O|0,t,40),Cr.writeUint32LE(S+P|0,t,44),Cr.writeUint32LE(j+U|0,t,48),Cr.writeUint32LE(ce+H|0,t,52),Cr.writeUint32LE(le+G|0,t,56),Cr.writeUint32LE(re+N|0,t,60)}function xd(t,e,r,n,i){if(i===void 0&&(i=0),t.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(n.length<r.length)throw new Error("ChaCha: destination is shorter than source");var o,c;if(i===0){if(e.length!==8&&e.length!==12)throw new Error("ChaCha nonce must be 8 or 12 bytes");o=new Uint8Array(16),c=o.length-e.length,o.set(e,c)}else{if(e.length!==16)throw new Error("ChaCha nonce with counter must be 16 bytes");o=e,c=i}for(var l=new Uint8Array(64),h=0;h<r.length;h+=64){kw(l,o,t);for(var d=h;d<h+64&&d<r.length;d++)n[d]=r[d]^l[d-h];zw(o,0,c)}return nu.wipe(l),i===0&&nu.wipe(o),n}Ua.streamXOR=xd;function Hw(t,e,r,n){return n===void 0&&(n=0),nu.wipe(r),xd(t,e,r,r,n)}Ua.stream=Hw;function zw(t,e,r){for(var n=1;r--;)n=n+(t[e]&255)|0,t[e]=n&255,n>>>=8,e++;if(n>0)throw new Error("ChaCha: counter overflow")}var Cd={},ci={};Object.defineProperty(ci,"__esModule",{value:!0});function Ww(t,e,r){return~(t-1)&e|t-1&r}ci.select=Ww;function qw(t,e){return(t|0)-(e|0)-1>>>31&1}ci.lessOrEqual=qw;function Id(t,e){if(t.length!==e.length)return 0;for(var r=0,n=0;n<t.length;n++)r|=t[n]^e[n];return 1&r-1>>>8}ci.compare=Id;function Vw(t,e){return t.length===0||e.length===0?!1:Id(t,e)!==0}ci.equal=Vw,function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ci,r=Zr;t.DIGEST_LENGTH=16;var n=function(){function c(l){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var h=l[0]|l[1]<<8;this._r[0]=h&8191;var d=l[2]|l[3]<<8;this._r[1]=(h>>>13|d<<3)&8191;var v=l[4]|l[5]<<8;this._r[2]=(d>>>10|v<<6)&7939;var E=l[6]|l[7]<<8;this._r[3]=(v>>>7|E<<9)&8191;var _=l[8]|l[9]<<8;this._r[4]=(E>>>4|_<<12)&255,this._r[5]=_>>>1&8190;var O=l[10]|l[11]<<8;this._r[6]=(_>>>14|O<<2)&8191;var P=l[12]|l[13]<<8;this._r[7]=(O>>>11|P<<5)&8065;var U=l[14]|l[15]<<8;this._r[8]=(P>>>8|U<<8)&8191,this._r[9]=U>>>5&127,this._pad[0]=l[16]|l[17]<<8,this._pad[1]=l[18]|l[19]<<8,this._pad[2]=l[20]|l[21]<<8,this._pad[3]=l[22]|l[23]<<8,this._pad[4]=l[24]|l[25]<<8,this._pad[5]=l[26]|l[27]<<8,this._pad[6]=l[28]|l[29]<<8,this._pad[7]=l[30]|l[31]<<8}return c.prototype._blocks=function(l,h,d){for(var v=this._fin?0:2048,E=this._h[0],_=this._h[1],O=this._h[2],P=this._h[3],U=this._h[4],H=this._h[5],G=this._h[6],N=this._h[7],L=this._h[8],$=this._h[9],T=this._r[0],I=this._r[1],f=this._r[2],x=this._r[3],J=this._r[4],z=this._r[5],ee=this._r[6],de=this._r[7],me=this._r[8],S=this._r[9];d>=16;){var j=l[h+0]|l[h+1]<<8;E+=j&8191;var ce=l[h+2]|l[h+3]<<8;_+=(j>>>13|ce<<3)&8191;var le=l[h+4]|l[h+5]<<8;O+=(ce>>>10|le<<6)&8191;var re=l[h+6]|l[h+7]<<8;P+=(le>>>7|re<<9)&8191;var ne=l[h+8]|l[h+9]<<8;U+=(re>>>4|ne<<12)&8191,H+=ne>>>1&8191;var ae=l[h+10]|l[h+11]<<8;G+=(ne>>>14|ae<<2)&8191;var ie=l[h+12]|l[h+13]<<8;N+=(ae>>>11|ie<<5)&8191;var De=l[h+14]|l[h+15]<<8;L+=(ie>>>8|De<<8)&8191,$+=De>>>5|v;var ge=0,Fe=ge;Fe+=E*T,Fe+=_*(5*S),Fe+=O*(5*me),Fe+=P*(5*de),Fe+=U*(5*ee),ge=Fe>>>13,Fe&=8191,Fe+=H*(5*z),Fe+=G*(5*J),Fe+=N*(5*x),Fe+=L*(5*f),Fe+=$*(5*I),ge+=Fe>>>13,Fe&=8191;var ye=ge;ye+=E*I,ye+=_*T,ye+=O*(5*S),ye+=P*(5*me),ye+=U*(5*de),ge=ye>>>13,ye&=8191,ye+=H*(5*ee),ye+=G*(5*z),ye+=N*(5*J),ye+=L*(5*x),ye+=$*(5*f),ge+=ye>>>13,ye&=8191;var Le=ge;Le+=E*f,Le+=_*I,Le+=O*T,Le+=P*(5*S),Le+=U*(5*me),ge=Le>>>13,Le&=8191,Le+=H*(5*de),Le+=G*(5*ee),Le+=N*(5*z),Le+=L*(5*J),Le+=$*(5*x),ge+=Le>>>13,Le&=8191;var X=ge;X+=E*x,X+=_*f,X+=O*I,X+=P*T,X+=U*(5*S),ge=X>>>13,X&=8191,X+=H*(5*me),X+=G*(5*de),X+=N*(5*ee),X+=L*(5*z),X+=$*(5*J),ge+=X>>>13,X&=8191;var Y=ge;Y+=E*J,Y+=_*x,Y+=O*f,Y+=P*I,Y+=U*T,ge=Y>>>13,Y&=8191,Y+=H*(5*S),Y+=G*(5*me),Y+=N*(5*de),Y+=L*(5*ee),Y+=$*(5*z),ge+=Y>>>13,Y&=8191;var W=ge;W+=E*z,W+=_*J,W+=O*x,W+=P*f,W+=U*I,ge=W>>>13,W&=8191,W+=H*T,W+=G*(5*S),W+=N*(5*me),W+=L*(5*de),W+=$*(5*ee),ge+=W>>>13,W&=8191;var w=ge;w+=E*ee,w+=_*z,w+=O*J,w+=P*x,w+=U*f,ge=w>>>13,w&=8191,w+=H*I,w+=G*T,w+=N*(5*S),w+=L*(5*me),w+=$*(5*de),ge+=w>>>13,w&=8191;var F=ge;F+=E*de,F+=_*ee,F+=O*z,F+=P*J,F+=U*x,ge=F>>>13,F&=8191,F+=H*f,F+=G*I,F+=N*T,F+=L*(5*S),F+=$*(5*me),ge+=F>>>13,F&=8191;var we=ge;we+=E*me,we+=_*de,we+=O*ee,we+=P*z,we+=U*J,ge=we>>>13,we&=8191,we+=H*x,we+=G*f,we+=N*I,we+=L*T,we+=$*(5*S),ge+=we>>>13,we&=8191;var ve=ge;ve+=E*S,ve+=_*me,ve+=O*de,ve+=P*ee,ve+=U*z,ge=ve>>>13,ve&=8191,ve+=H*J,ve+=G*x,ve+=N*f,ve+=L*I,ve+=$*T,ge+=ve>>>13,ve&=8191,ge=(ge<<2)+ge|0,ge=ge+Fe|0,Fe=ge&8191,ge=ge>>>13,ye+=ge,E=Fe,_=ye,O=Le,P=X,U=Y,H=W,G=w,N=F,L=we,$=ve,h+=16,d-=16}this._h[0]=E,this._h[1]=_,this._h[2]=O,this._h[3]=P,this._h[4]=U,this._h[5]=H,this._h[6]=G,this._h[7]=N,this._h[8]=L,this._h[9]=$},c.prototype.finish=function(l,h){h===void 0&&(h=0);var d=new Uint16Array(10),v,E,_,O;if(this._leftover){for(O=this._leftover,this._buffer[O++]=1;O<16;O++)this._buffer[O]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(v=this._h[1]>>>13,this._h[1]&=8191,O=2;O<10;O++)this._h[O]+=v,v=this._h[O]>>>13,this._h[O]&=8191;for(this._h[0]+=v*5,v=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=v,v=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=v,d[0]=this._h[0]+5,v=d[0]>>>13,d[0]&=8191,O=1;O<10;O++)d[O]=this._h[O]+v,v=d[O]>>>13,d[O]&=8191;for(d[9]-=1<<13,E=(v^1)-1,O=0;O<10;O++)d[O]&=E;for(E=~E,O=0;O<10;O++)this._h[O]=this._h[O]&E|d[O];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,_=this._h[0]+this._pad[0],this._h[0]=_&65535,O=1;O<8;O++)_=(this._h[O]+this._pad[O]|0)+(_>>>16)|0,this._h[O]=_&65535;return l[h+0]=this._h[0]>>>0,l[h+1]=this._h[0]>>>8,l[h+2]=this._h[1]>>>0,l[h+3]=this._h[1]>>>8,l[h+4]=this._h[2]>>>0,l[h+5]=this._h[2]>>>8,l[h+6]=this._h[3]>>>0,l[h+7]=this._h[3]>>>8,l[h+8]=this._h[4]>>>0,l[h+9]=this._h[4]>>>8,l[h+10]=this._h[5]>>>0,l[h+11]=this._h[5]>>>8,l[h+12]=this._h[6]>>>0,l[h+13]=this._h[6]>>>8,l[h+14]=this._h[7]>>>0,l[h+15]=this._h[7]>>>8,this._finished=!0,this},c.prototype.update=function(l){var h=0,d=l.length,v;if(this._leftover){v=16-this._leftover,v>d&&(v=d);for(var E=0;E<v;E++)this._buffer[this._leftover+E]=l[h+E];if(d-=v,h+=v,this._leftover+=v,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(d>=16&&(v=d-d%16,this._blocks(l,h,v),h+=v,d-=v),d){for(var E=0;E<d;E++)this._buffer[this._leftover+E]=l[h+E];this._leftover+=d}return this},c.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var l=new Uint8Array(16);return this.finish(l),l},c.prototype.clean=function(){return r.wipe(this._buffer),r.wipe(this._r),r.wipe(this._h),r.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},c}();t.Poly1305=n;function i(c,l){var h=new n(c);h.update(l);var d=h.digest();return h.clean(),d}t.oneTimeAuth=i;function o(c,l){return c.length!==t.DIGEST_LENGTH||l.length!==t.DIGEST_LENGTH?!1:e.equal(c,l)}t.equal=o}(Cd),function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ua,r=Cd,n=Zr,i=et,o=ci;t.KEY_LENGTH=32,t.NONCE_LENGTH=12,t.TAG_LENGTH=16;var c=new Uint8Array(16),l=function(){function h(d){if(this.nonceLength=t.NONCE_LENGTH,this.tagLength=t.TAG_LENGTH,d.length!==t.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(d)}return h.prototype.seal=function(d,v,E,_){if(d.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var O=new Uint8Array(16);O.set(d,O.length-d.length);var P=new Uint8Array(32);e.stream(this._key,O,P,4);var U=v.length+this.tagLength,H;if(_){if(_.length!==U)throw new Error("ChaCha20Poly1305: incorrect destination length");H=_}else H=new Uint8Array(U);return e.streamXOR(this._key,O,v,H,4),this._authenticate(H.subarray(H.length-this.tagLength,H.length),P,H.subarray(0,H.length-this.tagLength),E),n.wipe(O),H},h.prototype.open=function(d,v,E,_){if(d.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(v.length<this.tagLength)return null;var O=new Uint8Array(16);O.set(d,O.length-d.length);var P=new Uint8Array(32);e.stream(this._key,O,P,4);var U=new Uint8Array(this.tagLength);if(this._authenticate(U,P,v.subarray(0,v.length-this.tagLength),E),!o.equal(U,v.subarray(v.length-this.tagLength,v.length)))return null;var H=v.length-this.tagLength,G;if(_){if(_.length!==H)throw new Error("ChaCha20Poly1305: incorrect destination length");G=_}else G=new Uint8Array(H);return e.streamXOR(this._key,O,v.subarray(0,v.length-this.tagLength),G,4),n.wipe(O),G},h.prototype.clean=function(){return n.wipe(this._key),this},h.prototype._authenticate=function(d,v,E,_){var O=new r.Poly1305(v);_&&(O.update(_),_.length%16>0&&O.update(c.subarray(_.length%16))),O.update(E),E.length%16>0&&O.update(c.subarray(E.length%16));var P=new Uint8Array(8);_&&i.writeUint64LE(_.length,P),O.update(P),i.writeUint64LE(E.length,P),O.update(P);for(var U=O.digest(),H=0;H<U.length;H++)d[H]=U[H];O.clean(),n.wipe(U),n.wipe(P)},h}();t.ChaCha20Poly1305=l}(Xl);var Sd={},yo={},iu={};Object.defineProperty(iu,"__esModule",{value:!0});function Kw(t){return typeof t.saveState<"u"&&typeof t.restoreState<"u"&&typeof t.cleanSavedState<"u"}iu.isSerializableHash=Kw,Object.defineProperty(yo,"__esModule",{value:!0});var Dn=iu,Gw=ci,Zw=Zr,Od=function(){function t(e,r){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);r.length>this.blockSize?this._inner.update(r).finish(n).clean():n.set(r);for(var i=0;i<n.length;i++)n[i]^=54;this._inner.update(n);for(var i=0;i<n.length;i++)n[i]^=106;this._outer.update(n),Dn.isSerializableHash(this._inner)&&Dn.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),Zw.wipe(n)}return t.prototype.reset=function(){if(!Dn.isSerializableHash(this._inner)||!Dn.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},t.prototype.clean=function(){Dn.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),Dn.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},t.prototype.update=function(e){return this._inner.update(e),this},t.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},t.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},t.prototype.saveState=function(){if(!Dn.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},t.prototype.restoreState=function(e){if(!Dn.isSerializableHash(this._inner)||!Dn.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},t.prototype.cleanSavedState=function(e){if(!Dn.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},t}();yo.HMAC=Od;function Yw(t,e,r){var n=new Od(t,e);n.update(r);var i=n.digest();return n.clean(),i}yo.hmac=Yw,yo.equal=Gw.equal,Object.defineProperty(Sd,"__esModule",{value:!0});var Dd=yo,Ad=Zr,Jw=function(){function t(e,r,n,i){n===void 0&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=i;var o=Dd.hmac(this._hash,n,r);this._hmac=new Dd.HMAC(e,o),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return t.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(e===0)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},t.prototype.expand=function(e){for(var r=new Uint8Array(e),n=0;n<r.length;n++)this._bufpos===this._buffer.length&&this._fillBuffer(),r[n]=this._buffer[this._bufpos++];return r},t.prototype.clean=function(){this._hmac.clean(),Ad.wipe(this._buffer),Ad.wipe(this._counter),this._bufpos=0},t}(),Xw=Sd.HKDF=Jw,xs={},Ba={},ka={};Object.defineProperty(ka,"__esModule",{value:!0}),ka.BrowserRandomSource=void 0;const $d=65536;class Qw{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e=typeof self<"u"?self.crypto||self.msCrypto:null;e&&e.getRandomValues!==void 0&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const r=new Uint8Array(e);for(let n=0;n<r.length;n+=$d)this._crypto.getRandomValues(r.subarray(n,n+Math.min(r.length-n,$d)));return r}}ka.BrowserRandomSource=Qw;function ev(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ha={},tv={},rv=Object.freeze({__proto__:null,default:tv}),nv=Li(rv);Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.NodeRandomSource=void 0;const iv=Zr;class sv{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof ev<"u"){const e=nv;e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let r=this._crypto.randomBytes(e);if(r.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const n=new Uint8Array(e);for(let i=0;i<n.length;i++)n[i]=r[i];return(0,iv.wipe)(r),n}}Ha.NodeRandomSource=sv,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.SystemRandomSource=void 0;const ov=ka,av=Ha;class cv{constructor(){if(this.isAvailable=!1,this.name="",this._source=new ov.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new av.NodeRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Node";return}}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}}Ba.SystemRandomSource=cv,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const e=Ba,r=et,n=Zr;t.defaultRandomSource=new e.SystemRandomSource;function i(d,v=t.defaultRandomSource){return v.randomBytes(d)}t.randomBytes=i;function o(d=t.defaultRandomSource){const v=i(4,d),E=(0,r.readUint32LE)(v);return(0,n.wipe)(v),E}t.randomUint32=o;const c="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function l(d,v=c,E=t.defaultRandomSource){if(v.length<2)throw new Error("randomString charset is too short");if(v.length>256)throw new Error("randomString charset is too long");let _="";const O=v.length,P=256-256%O;for(;d>0;){const U=i(Math.ceil(d*256/P),E);for(let H=0;H<U.length&&d>0;H++){const G=U[H];G<P&&(_+=v.charAt(G%O),d--)}(0,n.wipe)(U)}return _}t.randomString=l;function h(d,v=c,E=t.defaultRandomSource){const _=Math.ceil(d/(Math.log(v.length)/Math.LN2));return l(_,v,E)}t.randomStringForEntropy=h}(xs);var za={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=et,r=Zr;t.DIGEST_LENGTH=32,t.BLOCK_SIZE=64;var n=function(){function l(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return l.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},l.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},l.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._temp),this.reset()},l.prototype.update=function(h,d){if(d===void 0&&(d=h.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var v=0;if(this._bytesHashed+=d,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&d>0;)this._buffer[this._bufferLength++]=h[v++],d--;this._bufferLength===this.blockSize&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(d>=this.blockSize&&(v=o(this._temp,this._state,h,v,d),d%=this.blockSize);d>0;)this._buffer[this._bufferLength++]=h[v++],d--;return this},l.prototype.finish=function(h){if(!this._finished){var d=this._bytesHashed,v=this._bufferLength,E=d/536870912|0,_=d<<3,O=d%64<56?64:128;this._buffer[v]=128;for(var P=v+1;P<O-8;P++)this._buffer[P]=0;e.writeUint32BE(E,this._buffer,O-8),e.writeUint32BE(_,this._buffer,O-4),o(this._temp,this._state,this._buffer,0,O),this._finished=!0}for(var P=0;P<this.digestLength/4;P++)e.writeUint32BE(this._state[P],h,P*4);return this},l.prototype.digest=function(){var h=new Uint8Array(this.digestLength);return this.finish(h),h},l.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},l.prototype.restoreState=function(h){return this._state.set(h.state),this._bufferLength=h.bufferLength,h.buffer&&this._buffer.set(h.buffer),this._bytesHashed=h.bytesHashed,this._finished=!1,this},l.prototype.cleanSavedState=function(h){r.wipe(h.state),h.buffer&&r.wipe(h.buffer),h.bufferLength=0,h.bytesHashed=0},l}();t.SHA256=n;var i=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function o(l,h,d,v,E){for(;E>=64;){for(var _=h[0],O=h[1],P=h[2],U=h[3],H=h[4],G=h[5],N=h[6],L=h[7],$=0;$<16;$++){var T=v+$*4;l[$]=e.readUint32BE(d,T)}for(var $=16;$<64;$++){var I=l[$-2],f=(I>>>17|I<<32-17)^(I>>>19|I<<32-19)^I>>>10;I=l[$-15];var x=(I>>>7|I<<32-7)^(I>>>18|I<<32-18)^I>>>3;l[$]=(f+l[$-7]|0)+(x+l[$-16]|0)}for(var $=0;$<64;$++){var f=(((H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7))+(H&G^~H&N)|0)+(L+(i[$]+l[$]|0)|0)|0,x=((_>>>2|_<<32-2)^(_>>>13|_<<32-13)^(_>>>22|_<<32-22))+(_&O^_&P^O&P)|0;L=N,N=G,G=H,H=U+f|0,U=P,P=O,O=_,_=f+x|0}h[0]+=_,h[1]+=O,h[2]+=P,h[3]+=U,h[4]+=H,h[5]+=G,h[6]+=N,h[7]+=L,v+=64,E-=64}return v}function c(l){var h=new n;h.update(l);var d=h.digest();return h.clean(),d}t.hash=c})(za);var su={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sharedKey=t.generateKeyPair=t.generateKeyPairFromSeed=t.scalarMultBase=t.scalarMult=t.SHARED_KEY_LENGTH=t.SECRET_KEY_LENGTH=t.PUBLIC_KEY_LENGTH=void 0;const e=xs,r=Zr;t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=32,t.SHARED_KEY_LENGTH=32;function n($){const T=new Float64Array(16);if($)for(let I=0;I<$.length;I++)T[I]=$[I];return T}const i=new Uint8Array(32);i[0]=9;const o=n([56129,1]);function c($){let T=1;for(let I=0;I<16;I++){let f=$[I]+T+65535;T=Math.floor(f/65536),$[I]=f-T*65536}$[0]+=T-1+37*(T-1)}function l($,T,I){const f=~(I-1);for(let x=0;x<16;x++){const J=f&($[x]^T[x]);$[x]^=J,T[x]^=J}}function h($,T){const I=n(),f=n();for(let x=0;x<16;x++)f[x]=T[x];c(f),c(f),c(f);for(let x=0;x<2;x++){I[0]=f[0]-65517;for(let z=1;z<15;z++)I[z]=f[z]-65535-(I[z-1]>>16&1),I[z-1]&=65535;I[15]=f[15]-32767-(I[14]>>16&1);const J=I[15]>>16&1;I[14]&=65535,l(f,I,1-J)}for(let x=0;x<16;x++)$[2*x]=f[x]&255,$[2*x+1]=f[x]>>8}function d($,T){for(let I=0;I<16;I++)$[I]=T[2*I]+(T[2*I+1]<<8);$[15]&=32767}function v($,T,I){for(let f=0;f<16;f++)$[f]=T[f]+I[f]}function E($,T,I){for(let f=0;f<16;f++)$[f]=T[f]-I[f]}function _($,T,I){let f,x,J=0,z=0,ee=0,de=0,me=0,S=0,j=0,ce=0,le=0,re=0,ne=0,ae=0,ie=0,De=0,ge=0,Fe=0,ye=0,Le=0,X=0,Y=0,W=0,w=0,F=0,we=0,ve=0,Me=0,nt=0,at=0,Ge=0,At=0,$t=0,Je=I[0],He=I[1],Be=I[2],Ke=I[3],rt=I[4],Ue=I[5],Ze=I[6],b=I[7],p=I[8],m=I[9],A=I[10],B=I[11],K=I[12],Q=I[13],Ee=I[14],Te=I[15];f=T[0],J+=f*Je,z+=f*He,ee+=f*Be,de+=f*Ke,me+=f*rt,S+=f*Ue,j+=f*Ze,ce+=f*b,le+=f*p,re+=f*m,ne+=f*A,ae+=f*B,ie+=f*K,De+=f*Q,ge+=f*Ee,Fe+=f*Te,f=T[1],z+=f*Je,ee+=f*He,de+=f*Be,me+=f*Ke,S+=f*rt,j+=f*Ue,ce+=f*Ze,le+=f*b,re+=f*p,ne+=f*m,ae+=f*A,ie+=f*B,De+=f*K,ge+=f*Q,Fe+=f*Ee,ye+=f*Te,f=T[2],ee+=f*Je,de+=f*He,me+=f*Be,S+=f*Ke,j+=f*rt,ce+=f*Ue,le+=f*Ze,re+=f*b,ne+=f*p,ae+=f*m,ie+=f*A,De+=f*B,ge+=f*K,Fe+=f*Q,ye+=f*Ee,Le+=f*Te,f=T[3],de+=f*Je,me+=f*He,S+=f*Be,j+=f*Ke,ce+=f*rt,le+=f*Ue,re+=f*Ze,ne+=f*b,ae+=f*p,ie+=f*m,De+=f*A,ge+=f*B,Fe+=f*K,ye+=f*Q,Le+=f*Ee,X+=f*Te,f=T[4],me+=f*Je,S+=f*He,j+=f*Be,ce+=f*Ke,le+=f*rt,re+=f*Ue,ne+=f*Ze,ae+=f*b,ie+=f*p,De+=f*m,ge+=f*A,Fe+=f*B,ye+=f*K,Le+=f*Q,X+=f*Ee,Y+=f*Te,f=T[5],S+=f*Je,j+=f*He,ce+=f*Be,le+=f*Ke,re+=f*rt,ne+=f*Ue,ae+=f*Ze,ie+=f*b,De+=f*p,ge+=f*m,Fe+=f*A,ye+=f*B,Le+=f*K,X+=f*Q,Y+=f*Ee,W+=f*Te,f=T[6],j+=f*Je,ce+=f*He,le+=f*Be,re+=f*Ke,ne+=f*rt,ae+=f*Ue,ie+=f*Ze,De+=f*b,ge+=f*p,Fe+=f*m,ye+=f*A,Le+=f*B,X+=f*K,Y+=f*Q,W+=f*Ee,w+=f*Te,f=T[7],ce+=f*Je,le+=f*He,re+=f*Be,ne+=f*Ke,ae+=f*rt,ie+=f*Ue,De+=f*Ze,ge+=f*b,Fe+=f*p,ye+=f*m,Le+=f*A,X+=f*B,Y+=f*K,W+=f*Q,w+=f*Ee,F+=f*Te,f=T[8],le+=f*Je,re+=f*He,ne+=f*Be,ae+=f*Ke,ie+=f*rt,De+=f*Ue,ge+=f*Ze,Fe+=f*b,ye+=f*p,Le+=f*m,X+=f*A,Y+=f*B,W+=f*K,w+=f*Q,F+=f*Ee,we+=f*Te,f=T[9],re+=f*Je,ne+=f*He,ae+=f*Be,ie+=f*Ke,De+=f*rt,ge+=f*Ue,Fe+=f*Ze,ye+=f*b,Le+=f*p,X+=f*m,Y+=f*A,W+=f*B,w+=f*K,F+=f*Q,we+=f*Ee,ve+=f*Te,f=T[10],ne+=f*Je,ae+=f*He,ie+=f*Be,De+=f*Ke,ge+=f*rt,Fe+=f*Ue,ye+=f*Ze,Le+=f*b,X+=f*p,Y+=f*m,W+=f*A,w+=f*B,F+=f*K,we+=f*Q,ve+=f*Ee,Me+=f*Te,f=T[11],ae+=f*Je,ie+=f*He,De+=f*Be,ge+=f*Ke,Fe+=f*rt,ye+=f*Ue,Le+=f*Ze,X+=f*b,Y+=f*p,W+=f*m,w+=f*A,F+=f*B,we+=f*K,ve+=f*Q,Me+=f*Ee,nt+=f*Te,f=T[12],ie+=f*Je,De+=f*He,ge+=f*Be,Fe+=f*Ke,ye+=f*rt,Le+=f*Ue,X+=f*Ze,Y+=f*b,W+=f*p,w+=f*m,F+=f*A,we+=f*B,ve+=f*K,Me+=f*Q,nt+=f*Ee,at+=f*Te,f=T[13],De+=f*Je,ge+=f*He,Fe+=f*Be,ye+=f*Ke,Le+=f*rt,X+=f*Ue,Y+=f*Ze,W+=f*b,w+=f*p,F+=f*m,we+=f*A,ve+=f*B,Me+=f*K,nt+=f*Q,at+=f*Ee,Ge+=f*Te,f=T[14],ge+=f*Je,Fe+=f*He,ye+=f*Be,Le+=f*Ke,X+=f*rt,Y+=f*Ue,W+=f*Ze,w+=f*b,F+=f*p,we+=f*m,ve+=f*A,Me+=f*B,nt+=f*K,at+=f*Q,Ge+=f*Ee,At+=f*Te,f=T[15],Fe+=f*Je,ye+=f*He,Le+=f*Be,X+=f*Ke,Y+=f*rt,W+=f*Ue,w+=f*Ze,F+=f*b,we+=f*p,ve+=f*m,Me+=f*A,nt+=f*B,at+=f*K,Ge+=f*Q,At+=f*Ee,$t+=f*Te,J+=38*ye,z+=38*Le,ee+=38*X,de+=38*Y,me+=38*W,S+=38*w,j+=38*F,ce+=38*we,le+=38*ve,re+=38*Me,ne+=38*nt,ae+=38*at,ie+=38*Ge,De+=38*At,ge+=38*$t,x=1,f=J+x+65535,x=Math.floor(f/65536),J=f-x*65536,f=z+x+65535,x=Math.floor(f/65536),z=f-x*65536,f=ee+x+65535,x=Math.floor(f/65536),ee=f-x*65536,f=de+x+65535,x=Math.floor(f/65536),de=f-x*65536,f=me+x+65535,x=Math.floor(f/65536),me=f-x*65536,f=S+x+65535,x=Math.floor(f/65536),S=f-x*65536,f=j+x+65535,x=Math.floor(f/65536),j=f-x*65536,f=ce+x+65535,x=Math.floor(f/65536),ce=f-x*65536,f=le+x+65535,x=Math.floor(f/65536),le=f-x*65536,f=re+x+65535,x=Math.floor(f/65536),re=f-x*65536,f=ne+x+65535,x=Math.floor(f/65536),ne=f-x*65536,f=ae+x+65535,x=Math.floor(f/65536),ae=f-x*65536,f=ie+x+65535,x=Math.floor(f/65536),ie=f-x*65536,f=De+x+65535,x=Math.floor(f/65536),De=f-x*65536,f=ge+x+65535,x=Math.floor(f/65536),ge=f-x*65536,f=Fe+x+65535,x=Math.floor(f/65536),Fe=f-x*65536,J+=x-1+37*(x-1),x=1,f=J+x+65535,x=Math.floor(f/65536),J=f-x*65536,f=z+x+65535,x=Math.floor(f/65536),z=f-x*65536,f=ee+x+65535,x=Math.floor(f/65536),ee=f-x*65536,f=de+x+65535,x=Math.floor(f/65536),de=f-x*65536,f=me+x+65535,x=Math.floor(f/65536),me=f-x*65536,f=S+x+65535,x=Math.floor(f/65536),S=f-x*65536,f=j+x+65535,x=Math.floor(f/65536),j=f-x*65536,f=ce+x+65535,x=Math.floor(f/65536),ce=f-x*65536,f=le+x+65535,x=Math.floor(f/65536),le=f-x*65536,f=re+x+65535,x=Math.floor(f/65536),re=f-x*65536,f=ne+x+65535,x=Math.floor(f/65536),ne=f-x*65536,f=ae+x+65535,x=Math.floor(f/65536),ae=f-x*65536,f=ie+x+65535,x=Math.floor(f/65536),ie=f-x*65536,f=De+x+65535,x=Math.floor(f/65536),De=f-x*65536,f=ge+x+65535,x=Math.floor(f/65536),ge=f-x*65536,f=Fe+x+65535,x=Math.floor(f/65536),Fe=f-x*65536,J+=x-1+37*(x-1),$[0]=J,$[1]=z,$[2]=ee,$[3]=de,$[4]=me,$[5]=S,$[6]=j,$[7]=ce,$[8]=le,$[9]=re,$[10]=ne,$[11]=ae,$[12]=ie,$[13]=De,$[14]=ge,$[15]=Fe}function O($,T){_($,T,T)}function P($,T){const I=n();for(let f=0;f<16;f++)I[f]=T[f];for(let f=253;f>=0;f--)O(I,I),f!==2&&f!==4&&_(I,I,T);for(let f=0;f<16;f++)$[f]=I[f]}function U($,T){const I=new Uint8Array(32),f=new Float64Array(80),x=n(),J=n(),z=n(),ee=n(),de=n(),me=n();for(let le=0;le<31;le++)I[le]=$[le];I[31]=$[31]&127|64,I[0]&=248,d(f,T);for(let le=0;le<16;le++)J[le]=f[le];x[0]=ee[0]=1;for(let le=254;le>=0;--le){const re=I[le>>>3]>>>(le&7)&1;l(x,J,re),l(z,ee,re),v(de,x,z),E(x,x,z),v(z,J,ee),E(J,J,ee),O(ee,de),O(me,x),_(x,z,x),_(z,J,de),v(de,x,z),E(x,x,z),O(J,x),E(z,ee,me),_(x,z,o),v(x,x,ee),_(z,z,x),_(x,ee,me),_(ee,J,f),O(J,de),l(x,J,re),l(z,ee,re)}for(let le=0;le<16;le++)f[le+16]=x[le],f[le+32]=z[le],f[le+48]=J[le],f[le+64]=ee[le];const S=f.subarray(32),j=f.subarray(16);P(S,S),_(j,j,S);const ce=new Uint8Array(32);return h(ce,j),ce}t.scalarMult=U;function H($){return U($,i)}t.scalarMultBase=H;function G($){if($.length!==t.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${t.SECRET_KEY_LENGTH} bytes`);const T=new Uint8Array($);return{publicKey:H(T),secretKey:T}}t.generateKeyPairFromSeed=G;function N($){const T=(0,e.randomBytes)(32,$),I=G(T);return(0,r.wipe)(T),I}t.generateKeyPair=N;function L($,T,I=!1){if($.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(T.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const f=U($,T);if(I){let x=0;for(let J=0;J<f.length;J++)x|=f[J];if(x===0)throw new Error("X25519: invalid shared key")}return f}t.sharedKey=L})(su);function ou(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function Pd(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?ou(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function au(t,e){e||(e=t.reduce((i,o)=>i+o.length,0));const r=Pd(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return ou(r)}function lv(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),c=o.charCodeAt(0);if(r[c]!==255)throw new TypeError(o+" is ambiguous");r[c]=i}var l=t.length,h=t.charAt(0),d=Math.log(l)/Math.log(256),v=Math.log(256)/Math.log(l);function E(P){if(P instanceof Uint8Array||(ArrayBuffer.isView(P)?P=new Uint8Array(P.buffer,P.byteOffset,P.byteLength):Array.isArray(P)&&(P=Uint8Array.from(P))),!(P instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(P.length===0)return"";for(var U=0,H=0,G=0,N=P.length;G!==N&&P[G]===0;)G++,U++;for(var L=(N-G)*v+1>>>0,$=new Uint8Array(L);G!==N;){for(var T=P[G],I=0,f=L-1;(T!==0||I<H)&&f!==-1;f--,I++)T+=256*$[f]>>>0,$[f]=T%l>>>0,T=T/l>>>0;if(T!==0)throw new Error("Non-zero carry");H=I,G++}for(var x=L-H;x!==L&&$[x]===0;)x++;for(var J=h.repeat(U);x<L;++x)J+=t.charAt($[x]);return J}function _(P){if(typeof P!="string")throw new TypeError("Expected String");if(P.length===0)return new Uint8Array;var U=0;if(P[U]!==" "){for(var H=0,G=0;P[U]===h;)H++,U++;for(var N=(P.length-U)*d+1>>>0,L=new Uint8Array(N);P[U];){var $=r[P.charCodeAt(U)];if($===255)return;for(var T=0,I=N-1;($!==0||T<G)&&I!==-1;I--,T++)$+=l*L[I]>>>0,L[I]=$%256>>>0,$=$/256>>>0;if($!==0)throw new Error("Non-zero carry");G=T,U++}if(P[U]!==" "){for(var f=N-G;f!==N&&L[f]===0;)f++;for(var x=new Uint8Array(H+(N-f)),J=H;f!==N;)x[J++]=L[f++];return x}}}function O(P){var U=_(P);if(U)return U;throw new Error(`Non-${e} character`)}return{encode:E,decodeUnsafe:_,decode:O}}var uv=lv,hv=uv;const Td=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},fv=t=>new TextEncoder().encode(t),dv=t=>new TextDecoder().decode(t);class pv{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class gv{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return Rd(this,e)}}class mv{constructor(e){this.decoders=e}or(e){return Rd(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Rd=(t,e)=>new mv({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class wv{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new pv(e,r,n),this.decoder=new gv(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Wa=({name:t,prefix:e,encode:r,decode:n})=>new wv(t,e,r,n),bo=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=hv(r,e);return Wa({prefix:t,name:e,encode:n,decode:o=>Td(i(o))})},vv=(t,e,r,n)=>{const i={};for(let v=0;v<e.length;++v)i[e[v]]=v;let o=t.length;for(;t[o-1]==="=";)--o;const c=new Uint8Array(o*r/8|0);let l=0,h=0,d=0;for(let v=0;v<o;++v){const E=i[t[v]];if(E===void 0)throw new SyntaxError(`Non-${n} character`);h=h<<r|E,l+=r,l>=8&&(l-=8,c[d++]=255&h>>l)}if(l>=r||255&h<<8-l)throw new SyntaxError("Unexpected end of data");return c},yv=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<<r)-1;let o="",c=0,l=0;for(let h=0;h<t.length;++h)for(l=l<<8|t[h],c+=8;c>r;)c-=r,o+=e[i&l>>c];if(c&&(o+=e[i&l<<r-c]),n)for(;o.length*r&7;)o+="=";return o},br=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>Wa({prefix:e,name:t,encode(i){return yv(i,n,r)},decode(i){return vv(i,n,r,t)}}),bv=Wa({prefix:"\0",name:"identity",encode:t=>dv(t),decode:t=>fv(t)});var _v=Object.freeze({__proto__:null,identity:bv});const Ev=br({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var xv=Object.freeze({__proto__:null,base2:Ev});const Cv=br({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Iv=Object.freeze({__proto__:null,base8:Cv});const Sv=bo({prefix:"9",name:"base10",alphabet:"0123456789"});var Ov=Object.freeze({__proto__:null,base10:Sv});const Dv=br({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Av=br({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var $v=Object.freeze({__proto__:null,base16:Dv,base16upper:Av});const Pv=br({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Tv=br({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Rv=br({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Nv=br({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Lv=br({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Mv=br({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Uv=br({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),jv=br({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Fv=br({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Bv=Object.freeze({__proto__:null,base32:Pv,base32upper:Tv,base32pad:Rv,base32padupper:Nv,base32hex:Lv,base32hexupper:Mv,base32hexpad:Uv,base32hexpadupper:jv,base32z:Fv});const kv=bo({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Hv=bo({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var zv=Object.freeze({__proto__:null,base36:kv,base36upper:Hv});const Wv=bo({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),qv=bo({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Vv=Object.freeze({__proto__:null,base58btc:Wv,base58flickr:qv});const Kv=br({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Gv=br({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Zv=br({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Yv=br({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Jv=Object.freeze({__proto__:null,base64:Kv,base64pad:Gv,base64url:Zv,base64urlpad:Yv});const Nd=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),Xv=Nd.reduce((t,e,r)=>(t[r]=e,t),[]),Qv=Nd.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function ey(t){return t.reduce((e,r)=>(e+=Xv[r],e),"")}function ty(t){const e=[];for(const r of t){const n=Qv[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const ry=Wa({prefix:"\u{1F680}",name:"base256emoji",encode:ey,decode:ty});var ny=Object.freeze({__proto__:null,base256emoji:ry}),iy=Md,Ld=128,sy=127,oy=~sy,ay=Math.pow(2,31);function Md(t,e,r){e=e||[],r=r||0;for(var n=r;t>=ay;)e[r++]=t&255|Ld,t/=128;for(;t&oy;)e[r++]=t&255|Ld,t>>>=7;return e[r]=t|0,Md.bytes=r-n+1,e}var cy=cu,ly=128,Ud=127;function cu(t,n){var r=0,n=n||0,i=0,o=n,c,l=t.length;do{if(o>=l)throw cu.bytes=0,new RangeError("Could not decode varint");c=t[o++],r+=i<28?(c&Ud)<<i:(c&Ud)*Math.pow(2,i),i+=7}while(c>=ly);return cu.bytes=o-n,r}var uy=Math.pow(2,7),hy=Math.pow(2,14),fy=Math.pow(2,21),dy=Math.pow(2,28),py=Math.pow(2,35),gy=Math.pow(2,42),my=Math.pow(2,49),wy=Math.pow(2,56),vy=Math.pow(2,63),yy=function(t){return t<uy?1:t<hy?2:t<fy?3:t<dy?4:t<py?5:t<gy?6:t<my?7:t<wy?8:t<vy?9:10},by={encode:iy,decode:cy,encodingLength:yy},jd=by;const Fd=(t,e,r=0)=>(jd.encode(t,e,r),e),Bd=t=>jd.encodingLength(t),lu=(t,e)=>{const r=e.byteLength,n=Bd(t),i=n+Bd(r),o=new Uint8Array(i+r);return Fd(t,o,0),Fd(r,o,n),o.set(e,i),new _y(t,r,e,o)};class _y{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}}const kd=({name:t,code:e,encode:r})=>new Ey(t,e,r);class Ey{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){const r=this.encode(e);return r instanceof Uint8Array?lu(this.code,r):r.then(n=>lu(this.code,n))}else throw Error("Unknown type, must be binary type")}}const Hd=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),xy=kd({name:"sha2-256",code:18,encode:Hd("SHA-256")}),Cy=kd({name:"sha2-512",code:19,encode:Hd("SHA-512")});var Iy=Object.freeze({__proto__:null,sha256:xy,sha512:Cy});const zd=0,Sy="identity",Wd=Td;var Oy=Object.freeze({__proto__:null,identity:{code:zd,name:Sy,encode:Wd,digest:t=>lu(zd,Wd(t))}});new TextEncoder,new TextDecoder;const qd={..._v,...xv,...Iv,...Ov,...$v,...Bv,...zv,...Vv,...Jv,...ny};({...Iy,...Oy});function Vd(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const Kd=Vd("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),uu=Vd("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=Pd(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),Gd={utf8:Kd,"utf-8":Kd,hex:qd.base16,latin1:uu,ascii:uu,binary:uu,...qd};function kr(t,e="utf8"){const r=Gd[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?ou(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}function Dr(t,e="utf8"){const r=Gd[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf8"):r.encoder.encode(t).substring(1)}var Zd=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},Dy=function(){function t(e,r,n){this.name=e,this.version=r,this.os=n,this.type="browser"}return t}(),Ay=function(){function t(e){this.version=e,this.type="node",this.name="node",this.os=process.platform}return t}(),$y=function(){function t(e,r,n,i){this.name=e,this.version=r,this.os=n,this.bot=i,this.type="bot-device"}return t}(),Py=function(){function t(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return t}(),Ty=function(){function t(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return t}(),Ry=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,Ny=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Yd=3,Ly=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",Ry]],Jd=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function My(t){return t?Xd(t):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new Ty:typeof navigator<"u"?Xd(navigator.userAgent):Fy()}function Uy(t){return t!==""&&Ly.reduce(function(e,r){var n=r[0],i=r[1];if(e)return e;var o=i.exec(t);return!!o&&[n,o]},!1)}function Xd(t){var e=Uy(t);if(!e)return null;var r=e[0],n=e[1];if(r==="searchbot")return new Py;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length<Yd&&(i=Zd(Zd([],i,!0),By(Yd-i.length),!0)):i=[];var o=i.join("."),c=jy(t),l=Ny.exec(t);return l&&l[1]?new $y(r,o,c,l[1]):new Dy(r,o,c)}function jy(t){for(var e=0,r=Jd.length;e<r;e++){var n=Jd[e],i=n[0],o=n[1],c=o.exec(t);if(c)return i}return null}function Fy(){var t=typeof process<"u"&&process.version;return t?new Ay(process.version.slice(1)):null}function By(t){for(var e=[],r=0;r<t;r++)e.push("0");return e}var ke={};/*! *****************************************************************************
|
|
2
2
|
Copyright (c) Microsoft Corporation.
|
|
3
3
|
|
|
4
4
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
12
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
13
|
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
-
***************************************************************************** */var eu=function(t,e){return eu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},eu(t,e)};function Cy(t,e){eu(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var tu=function(){return tu=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},tu.apply(this,arguments)};function Iy(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function Sy(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(o=(i<3?c(o):i>3?c(e,r,o):c(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o}function Dy(t,e){return function(r,n){e(r,n,t)}}function Oy(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function Ay(t,e,r,n){function i(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function l(v){try{d(n.next(v))}catch(E){c(E)}}function h(v){try{d(n.throw(v))}catch(E){c(E)}}function d(v){v.done?o(v.value):i(v.value).then(l,h)}d((n=n.apply(t,e||[])).next())})}function $y(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(v){return h([d,v])}}function h(d){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=d[0]&2?i.return:d[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,d[1])).done)return o;switch(i=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,i=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){r.label=d[1];break}if(d[0]===6&&r.label<o[1]){r.label=o[1],o=d;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(d);break}o[2]&&r.ops.pop(),r.trys.pop();continue}d=e.call(t,r)}catch(v){d=[6,v],i=0}finally{n=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Py(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function Ty(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function ru(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function kd(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],c;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(l){c={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return o}function Ry(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(kd(arguments[e]));return t}function Ny(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var o=arguments[e],c=0,l=o.length;c<l;c++,i++)n[i]=o[c];return n}function ho(t){return this instanceof ho?(this.v=t,this):new ho(t)}function My(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,o=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(_){n[_]&&(i[_]=function(S){return new Promise(function(P,L){o.push([_,S,P,L])>1||l(_,S)})})}function l(_,S){try{h(n[_](S))}catch(P){E(o[0][3],P)}}function h(_){_.value instanceof ho?Promise.resolve(_.value.v).then(d,v):E(o[0][2],_)}function d(_){l("next",_)}function v(_){l("throw",_)}function E(_,S){_(S),o.shift(),o.length&&l(o[0][0],o[0][1])}}function Ly(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,o){e[i]=t[i]?function(c){return(r=!r)?{value:ho(t[i](c)),done:i==="return"}:o?o(c):c}:o}}function jy(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof ru=="function"?ru(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(c){return new Promise(function(l,h){c=t[o](c),i(l,h,c.done,c.value)})}}function i(o,c,l,h){Promise.resolve(h).then(function(d){o({value:d,done:l})},c)}}function Uy(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function Fy(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function By(t){return t&&t.__esModule?t:{default:t}}function ky(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function Hy(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}var zy=Object.freeze({__proto__:null,__extends:Cy,get __assign(){return tu},__rest:Iy,__decorate:Sy,__param:Dy,__metadata:Oy,__awaiter:Ay,__generator:$y,__createBinding:Py,__exportStar:Ty,__values:ru,__read:kd,__spread:Ry,__spreadArrays:Ny,__await:ho,__asyncGenerator:My,__asyncDelegator:Ly,__asyncValues:jy,__makeTemplateObject:Uy,__importStar:Fy,__importDefault:By,__classPrivateFieldGet:ky,__classPrivateFieldSet:Hy}),ja=Ii(zy),nu={},fo={},Hd;function Wy(){if(Hd)return fo;Hd=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.delay=void 0;function t(e){return new Promise(r=>{setTimeout(()=>{r(!0)},e)})}return fo.delay=t,fo}var Si={},iu={},Di={},zd;function qy(){return zd||(zd=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.ONE_THOUSAND=Di.ONE_HUNDRED=void 0,Di.ONE_HUNDRED=100,Di.ONE_THOUSAND=1e3),Di}var su={},Wd;function Vy(){return Wd||(Wd=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=t.ONE_MINUTE*5,t.TEN_MINUTES=t.ONE_MINUTE*10,t.THIRTY_MINUTES=t.ONE_MINUTE*30,t.SIXTY_MINUTES=t.ONE_MINUTE*60,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=t.ONE_HOUR*3,t.SIX_HOURS=t.ONE_HOUR*6,t.TWELVE_HOURS=t.ONE_HOUR*12,t.TWENTY_FOUR_HOURS=t.ONE_HOUR*24,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=t.ONE_DAY*3,t.FIVE_DAYS=t.ONE_DAY*5,t.SEVEN_DAYS=t.ONE_DAY*7,t.THIRTY_DAYS=t.ONE_DAY*30,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=t.ONE_WEEK*2,t.THREE_WEEKS=t.ONE_WEEK*3,t.FOUR_WEEKS=t.ONE_WEEK*4,t.ONE_YEAR=t.ONE_DAY*365}(su)),su}var qd;function Vd(){return qd||(qd=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=ja;e.__exportStar(qy(),t),e.__exportStar(Vy(),t)}(iu)),iu}var Kd;function Ky(){if(Kd)return Si;Kd=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.fromMiliseconds=Si.toMiliseconds=void 0;const t=Vd();function e(n){return n*t.ONE_THOUSAND}Si.toMiliseconds=e;function r(n){return Math.floor(n/t.ONE_THOUSAND)}return Si.fromMiliseconds=r,Si}var Gd;function Gy(){return Gd||(Gd=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=ja;e.__exportStar(Wy(),t),e.__exportStar(Ky(),t)}(nu)),nu}var ms={},Zd;function Zy(){if(Zd)return ms;Zd=1,Object.defineProperty(ms,"__esModule",{value:!0}),ms.Watch=void 0;class t{constructor(){this.timestamps=new Map}start(r){if(this.timestamps.has(r))throw new Error(`Watch already started for label: ${r}`);this.timestamps.set(r,{started:Date.now()})}stop(r){const n=this.get(r);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${r}`);const i=Date.now()-n.started;this.timestamps.set(r,{started:n.started,elapsed:i})}get(r){const n=this.timestamps.get(r);if(typeof n>"u")throw new Error(`No timestamp found for label: ${r}`);return n}elapsed(r){const n=this.get(r);return n.elapsed||Date.now()-n.started}}return ms.Watch=t,ms.default=t,ms}var ou={},po={},Yd;function Yy(){if(Yd)return po;Yd=1,Object.defineProperty(po,"__esModule",{value:!0}),po.IWatch=void 0;class t{}return po.IWatch=t,po}var Jd;function Jy(){return Jd||(Jd=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),ja.__exportStar(Yy(),t)}(ou)),ou}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=ja;e.__exportStar(Gy(),t),e.__exportStar(Zy(),t),e.__exportStar(Jy(),t),e.__exportStar(Vd(),t)})(Le);var Ot={};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.getLocalStorage=Ot.getLocalStorageOrThrow=Ot.getCrypto=Ot.getCryptoOrThrow=Qd=Ot.getLocation=Ot.getLocationOrThrow=au=Ot.getNavigator=Ot.getNavigatorOrThrow=Xd=Ot.getDocument=Ot.getDocumentOrThrow=Ot.getFromWindowOrThrow=Ot.getFromWindow=void 0;function Oi(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}Ot.getFromWindow=Oi;function ws(t){const e=Oi(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}Ot.getFromWindowOrThrow=ws;function Xy(){return ws("document")}Ot.getDocumentOrThrow=Xy;function Qy(){return Oi("document")}var Xd=Ot.getDocument=Qy;function e5(){return ws("navigator")}Ot.getNavigatorOrThrow=e5;function t5(){return Oi("navigator")}var au=Ot.getNavigator=t5;function r5(){return ws("location")}Ot.getLocationOrThrow=r5;function n5(){return Oi("location")}var Qd=Ot.getLocation=n5;function i5(){return ws("crypto")}Ot.getCryptoOrThrow=i5;function s5(){return Oi("crypto")}Ot.getCrypto=s5;function o5(){return ws("localStorage")}Ot.getLocalStorageOrThrow=o5;function a5(){return Oi("localStorage")}Ot.getLocalStorage=a5;var cu={};Object.defineProperty(cu,"__esModule",{value:!0});var e1=cu.getWindowMetadata=void 0;const t1=Ot;function c5(){let t,e;try{t=t1.getDocumentOrThrow(),e=t1.getLocationOrThrow()}catch{return null}function r(){const E=t.getElementsByTagName("link"),_=[];for(let S=0;S<E.length;S++){const P=E[S],L=P.getAttribute("rel");if(L&&L.toLowerCase().indexOf("icon")>-1){const k=P.getAttribute("href");if(k)if(k.toLowerCase().indexOf("https:")===-1&&k.toLowerCase().indexOf("http:")===-1&&k.indexOf("//")!==0){let q=e.protocol+"//"+e.host;if(k.indexOf("/")===0)q+=k;else{const T=e.pathname.split("/");T.pop();const M=T.join("/");q+=M+"/"+k}_.push(q)}else if(k.indexOf("//")===0){const q=e.protocol+k;_.push(q)}else _.push(k)}}return _}function n(...E){const _=t.getElementsByTagName("meta");for(let S=0;S<_.length;S++){const P=_[S],L=["itemprop","property","name"].map(k=>P.getAttribute(k)).filter(k=>k?E.includes(k):!1);if(L.length&&L){const k=P.getAttribute("content");if(k)return k}}return""}function i(){let E=n("name","og:site_name","og:title","twitter:title");return E||(E=t.title),E}function o(){return n("description","og:description","twitter:description","keywords")}const c=i(),l=o(),h=e.origin,d=r();return{description:l,url:h,icons:d,name:c}}e1=cu.getWindowMetadata=c5;var go={},l5=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),r1="%[a-f0-9]{2}",n1=new RegExp("("+r1+")|([^%]+?)","gi"),i1=new RegExp("("+r1+")+","gi");function lu(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],lu(r),lu(n))}function u5(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(n1)||[],r=1;r<e.length;r++)t=lu(e,r).join(""),e=t.match(n1)||[];return t}}function h5(t){for(var e={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},r=i1.exec(t);r;){try{e[r[0]]=decodeURIComponent(r[0])}catch{var n=u5(r[0]);n!==r[0]&&(e[r[0]]=n)}r=i1.exec(t)}e["%C2"]="\uFFFD";for(var i=Object.keys(e),o=0;o<i.length;o++){var c=i[o];t=t.replace(new RegExp(c,"g"),e[c])}return t}var f5=function(t){if(typeof t!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch{return h5(t)}},d5=(t,e)=>{if(!(typeof t=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e==="")return[t];const r=t.indexOf(e);return r===-1?[t]:[t.slice(0,r),t.slice(r+e.length)]},p5=function(t,e){for(var r={},n=Object.keys(t),i=Array.isArray(e),o=0;o<n.length;o++){var c=n[o],l=t[c];(i?e.indexOf(c)!==-1:e(c,l,t))&&(r[c]=l)}return r};(function(t){const e=l5,r=f5,n=d5,i=p5,o=T=>T==null,c=Symbol("encodeFragmentIdentifier");function l(T){switch(T.arrayFormat){case"index":return M=>(A,R)=>{const C=A.length;return R===void 0||T.skipNull&&R===null||T.skipEmptyString&&R===""?A:R===null?[...A,[v(M,T),"[",C,"]"].join("")]:[...A,[v(M,T),"[",v(C,T),"]=",v(R,T)].join("")]};case"bracket":return M=>(A,R)=>R===void 0||T.skipNull&&R===null||T.skipEmptyString&&R===""?A:R===null?[...A,[v(M,T),"[]"].join("")]:[...A,[v(M,T),"[]=",v(R,T)].join("")];case"colon-list-separator":return M=>(A,R)=>R===void 0||T.skipNull&&R===null||T.skipEmptyString&&R===""?A:R===null?[...A,[v(M,T),":list="].join("")]:[...A,[v(M,T),":list=",v(R,T)].join("")];case"comma":case"separator":case"bracket-separator":{const M=T.arrayFormat==="bracket-separator"?"[]=":"=";return A=>(R,C)=>C===void 0||T.skipNull&&C===null||T.skipEmptyString&&C===""?R:(C=C===null?"":C,R.length===0?[[v(A,T),M,v(C,T)].join("")]:[[R,v(C,T)].join(T.arrayFormatSeparator)])}default:return M=>(A,R)=>R===void 0||T.skipNull&&R===null||T.skipEmptyString&&R===""?A:R===null?[...A,v(M,T)]:[...A,[v(M,T),"=",v(R,T)].join("")]}}function h(T){let M;switch(T.arrayFormat){case"index":return(A,R,C)=>{if(M=/\[(\d*)\]$/.exec(A),A=A.replace(/\[\d*\]$/,""),!M){C[A]=R;return}C[A]===void 0&&(C[A]={}),C[A][M[1]]=R};case"bracket":return(A,R,C)=>{if(M=/(\[\])$/.exec(A),A=A.replace(/\[\]$/,""),!M){C[A]=R;return}if(C[A]===void 0){C[A]=[R];return}C[A]=[].concat(C[A],R)};case"colon-list-separator":return(A,R,C)=>{if(M=/(:list)$/.exec(A),A=A.replace(/:list$/,""),!M){C[A]=R;return}if(C[A]===void 0){C[A]=[R];return}C[A]=[].concat(C[A],R)};case"comma":case"separator":return(A,R,C)=>{const f=typeof R=="string"&&R.includes(T.arrayFormatSeparator),x=typeof R=="string"&&!f&&E(R,T).includes(T.arrayFormatSeparator);R=x?E(R,T):R;const J=f||x?R.split(T.arrayFormatSeparator).map(z=>E(z,T)):R===null?R:E(R,T);C[A]=J};case"bracket-separator":return(A,R,C)=>{const f=/(\[\])$/.test(A);if(A=A.replace(/\[\]$/,""),!f){C[A]=R&&E(R,T);return}const x=R===null?[]:R.split(T.arrayFormatSeparator).map(J=>E(J,T));if(C[A]===void 0){C[A]=x;return}C[A]=[].concat(C[A],x)};default:return(A,R,C)=>{if(C[A]===void 0){C[A]=R;return}C[A]=[].concat(C[A],R)}}}function d(T){if(typeof T!="string"||T.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function v(T,M){return M.encode?M.strict?e(T):encodeURIComponent(T):T}function E(T,M){return M.decode?r(T):T}function _(T){return Array.isArray(T)?T.sort():typeof T=="object"?_(Object.keys(T)).sort((M,A)=>Number(M)-Number(A)).map(M=>T[M]):T}function S(T){const M=T.indexOf("#");return M!==-1&&(T=T.slice(0,M)),T}function P(T){let M="";const A=T.indexOf("#");return A!==-1&&(M=T.slice(A)),M}function L(T){T=S(T);const M=T.indexOf("?");return M===-1?"":T.slice(M+1)}function k(T,M){return M.parseNumbers&&!Number.isNaN(Number(T))&&typeof T=="string"&&T.trim()!==""?T=Number(T):M.parseBooleans&&T!==null&&(T.toLowerCase()==="true"||T.toLowerCase()==="false")&&(T=T.toLowerCase()==="true"),T}function q(T,M){M=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},M),d(M.arrayFormatSeparator);const A=h(M),R=Object.create(null);if(typeof T!="string"||(T=T.trim().replace(/^[?#&]/,""),!T))return R;for(const C of T.split("&")){if(C==="")continue;let[f,x]=n(M.decode?C.replace(/\+/g," "):C,"=");x=x===void 0?null:["comma","separator","bracket-separator"].includes(M.arrayFormat)?x:E(x,M),A(E(f,M),x,R)}for(const C of Object.keys(R)){const f=R[C];if(typeof f=="object"&&f!==null)for(const x of Object.keys(f))f[x]=k(f[x],M);else R[C]=k(f,M)}return M.sort===!1?R:(M.sort===!0?Object.keys(R).sort():Object.keys(R).sort(M.sort)).reduce((C,f)=>{const x=R[f];return Boolean(x)&&typeof x=="object"&&!Array.isArray(x)?C[f]=_(x):C[f]=x,C},Object.create(null))}t.extract=L,t.parse=q,t.stringify=(T,M)=>{if(!T)return"";M=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},M),d(M.arrayFormatSeparator);const A=x=>M.skipNull&&o(T[x])||M.skipEmptyString&&T[x]==="",R=l(M),C={};for(const x of Object.keys(T))A(x)||(C[x]=T[x]);const f=Object.keys(C);return M.sort!==!1&&f.sort(M.sort),f.map(x=>{const J=T[x];return J===void 0?"":J===null?v(x,M):Array.isArray(J)?J.length===0&&M.arrayFormat==="bracket-separator"?v(x,M)+"[]":J.reduce(R(x),[]).join("&"):v(x,M)+"="+v(J,M)}).filter(x=>x.length>0).join("&")},t.parseUrl=(T,M)=>{M=Object.assign({decode:!0},M);const[A,R]=n(T,"#");return Object.assign({url:A.split("?")[0]||"",query:q(L(T),M)},M&&M.parseFragmentIdentifier&&R?{fragmentIdentifier:E(R,M)}:{})},t.stringifyUrl=(T,M)=>{M=Object.assign({encode:!0,strict:!0,[c]:!0},M);const A=S(T.url).split("?")[0]||"",R=t.extract(T.url),C=t.parse(R,{sort:!1}),f=Object.assign(C,T.query);let x=t.stringify(f,M);x&&(x=`?${x}`);let J=P(T.url);return T.fragmentIdentifier&&(J=`#${M[c]?v(T.fragmentIdentifier,M):T.fragmentIdentifier}`),`${A}${x}${J}`},t.pick=(T,M,A)=>{A=Object.assign({parseFragmentIdentifier:!0,[c]:!1},A);const{url:R,query:C,fragmentIdentifier:f}=t.parseUrl(T,A);return t.stringifyUrl({url:R,query:i(C,M),fragmentIdentifier:f},A)},t.exclude=(T,M,A)=>{const R=Array.isArray(M)?C=>!M.includes(C):(C,f)=>!M(C,f);return t.pick(T,R,A)}})(go);const g5={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}};function m5(t,e=[]){const r=[];return Object.keys(t).forEach(n=>{if(e.length&&!e.includes(n))return;const i=t[n];r.push(...i.accounts)}),r}function s1(t,e){return t.includes(":")?[t]:e.chains||[]}const o1="base10",Dr="base16",uu="base64pad",hu="utf8",a1=0,Ai=1,w5=0,c1=1,fu=12,du=32;function v5(){const t=Gl.generateKeyPair();return{privateKey:Sr(t.secretKey,Dr),publicKey:Sr(t.publicKey,Dr)}}function pu(){const t=gs.randomBytes(du);return Sr(t,Dr)}function y5(t,e){const r=Gl.sharedKey(Ur(t,Dr),Ur(e,Dr)),n=new Mw(Ma.SHA256,r).expand(du);return Sr(n,Dr)}function b5(t){const e=Ma.hash(Ur(t,Dr));return Sr(e,Dr)}function $i(t){const e=Ma.hash(Ur(t,hu));return Sr(e,Dr)}function _5(t){return Ur(`${t}`,o1)}function mo(t){return Number(Sr(t,o1))}function E5(t){const e=_5(typeof t.type<"u"?t.type:a1);if(mo(e)===Ai&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof t.senderPublicKey<"u"?Ur(t.senderPublicKey,Dr):void 0,n=typeof t.iv<"u"?Ur(t.iv,Dr):gs.randomBytes(fu),i=new kl.ChaCha20Poly1305(Ur(t.symKey,Dr)).seal(n,Ur(t.message,hu));return C5({type:e,sealed:i,iv:n,senderPublicKey:r})}function x5(t){const e=new kl.ChaCha20Poly1305(Ur(t.symKey,Dr)),{sealed:r,iv:n}=Ua(t.encoded),i=e.open(n,r);if(i===null)throw new Error("Failed to decrypt");return Sr(i,hu)}function C5(t){if(mo(t.type)===Ai){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Sr(Yl([t.type,t.senderPublicKey,t.iv,t.sealed]),uu)}return Sr(Yl([t.type,t.iv,t.sealed]),uu)}function Ua(t){const e=Ur(t,uu),r=e.slice(w5,c1),n=c1;if(mo(r)===Ai){const l=n+du,h=l+fu,d=e.slice(n,l),v=e.slice(l,h),E=e.slice(h);return{type:r,sealed:E,iv:v,senderPublicKey:d}}const i=n+fu,o=e.slice(n,i),c=e.slice(i);return{type:r,sealed:c,iv:o}}function I5(t,e){const r=Ua(t);return l1({type:mo(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?Sr(r.senderPublicKey,Dr):void 0,receiverPublicKey:e?.receiverPublicKey})}function l1(t){const e=t?.type||a1;if(e===Ai){if(typeof t?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof t?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:t?.senderPublicKey,receiverPublicKey:t?.receiverPublicKey}}function u1(t){return t.type===Ai&&typeof t.senderPublicKey=="string"&&typeof t.receiverPublicKey=="string"}var S5=Object.defineProperty,h1=Object.getOwnPropertySymbols,D5=Object.prototype.hasOwnProperty,O5=Object.prototype.propertyIsEnumerable,f1=(t,e,r)=>e in t?S5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,d1=(t,e)=>{for(var r in e||(e={}))D5.call(e,r)&&f1(t,r,e[r]);if(h1)for(var r of h1(e))O5.call(e,r)&&f1(t,r,e[r]);return t};const A5="ReactNative",Pi={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},$5="js";function gu(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function p1(){return!Xd()&&!!au()&&navigator.product===A5}function mu(){return!gu()&&!!au()}function g1(){return p1()?Pi.reactNative:gu()?Pi.node:mu()?Pi.browser:Pi.unknown}function P5(t,e){let r=go.parse(t);return r=d1(d1({},r),e),t=go.stringify(r),t}function T5(){return e1()||{name:"",description:"",url:"",icons:[""]}}function R5(){const t=yy();if(t===null)return"unknown";const e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return t.type==="browser"?[e,t.name,t.version].join("-"):[e,t.version].join("-")}function N5(){var t;const e=g1();return e===Pi.browser?[e,((t=Qd())==null?void 0:t.host)||"unknown"].join(":"):e}function M5(t,e,r){const n=R5(),i=N5();return[[t,e].join("-"),[$5,r].join("-"),n,i].join("/")}function L5({protocol:t,version:e,relayUrl:r,sdkVersion:n,auth:i,projectId:o,useOnCloseEvent:c}){const l=r.split("?"),h=M5(t,e,n),d={auth:i,ua:h,projectId:o,useOnCloseEvent:c||void 0},v=P5(l[1]||"",d);return l[0]+"?"+v}function Ti(t,e){return t.filter(r=>e.includes(r)).length===t.length}function m1(t){return Object.fromEntries(t.entries())}function w1(t){return new Map(Object.entries(t))}function vs(t=Le.FIVE_MINUTES,e){const r=Le.toMiliseconds(t||Le.FIVE_MINUTES);let n,i,o;return{resolve:c=>{o&&n&&(clearTimeout(o),n(c))},reject:c=>{o&&i&&(clearTimeout(o),i(c))},done:()=>new Promise((c,l)=>{o=setTimeout(()=>{l(new Error(e))},r),n=c,i=l})}}function Fa(t,e,r){return new Promise(async(n,i)=>{const o=setTimeout(()=>i(new Error(r)),e);try{const c=await t;n(c)}catch(c){i(c)}clearTimeout(o)})}function v1(t,e){if(typeof e=="string"&&e.startsWith(`${t}:`))return e;if(t.toLowerCase()==="topic"){if(typeof e!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}else if(t.toLowerCase()==="id"){if(typeof e!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${t}`)}function j5(t){return v1("topic",t)}function U5(t){return v1("id",t)}function y1(t){const[e,r]=t.split(":"),n={id:void 0,topic:void 0};if(e==="topic"&&typeof r=="string")n.topic=r;else if(e==="id"&&Number.isInteger(Number(r)))n.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${r}`);return n}function Sn(t,e){return Le.fromMiliseconds((e||Date.now())+Le.toMiliseconds(t))}function ni(t){return Date.now()>=Le.toMiliseconds(t)}function Qt(t,e){return`${t}${e?`:${e}`:""}`}function wu(t=[],e=[]){return[...new Set([...t,...e])]}const F5="irn";function vu(t){return t?.relay||{protocol:F5}}function Ba(t){const e=g5[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var B5=Object.defineProperty,b1=Object.getOwnPropertySymbols,k5=Object.prototype.hasOwnProperty,H5=Object.prototype.propertyIsEnumerable,_1=(t,e,r)=>e in t?B5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,z5=(t,e)=>{for(var r in e||(e={}))k5.call(e,r)&&_1(t,r,e[r]);if(b1)for(var r of b1(e))H5.call(e,r)&&_1(t,r,e[r]);return t};function W5(t,e="-"){const r={},n="relay"+e;return Object.keys(t).forEach(i=>{if(i.startsWith(n)){const o=i.replace(n,""),c=t[i];r[o]=c}}),r}function q5(t){const e=t.indexOf(":"),r=t.indexOf("?")!==-1?t.indexOf("?"):void 0,n=t.substring(0,e),i=t.substring(e+1,r).split("@"),o=typeof r<"u"?t.substring(r):"",c=go.parse(o);return{protocol:n,topic:i[0],version:parseInt(i[1],10),symKey:c.symKey,relay:W5(c)}}function V5(t,e="-"){const r="relay",n={};return Object.keys(t).forEach(i=>{const o=r+e+i;t[i]&&(n[o]=t[i])}),n}function K5(t){return`${t.protocol}:${t.topic}@${t.version}?`+go.stringify(z5({symKey:t.symKey},V5(t.relay)))}function ys(t){const e=[];return t.forEach(r=>{const[n,i]=r.split(":");e.push(`${n}:${i}`)}),e}function G5(t){const e=[];return Object.values(t).forEach(r=>{e.push(...ys(r.accounts))}),e}function Z5(t,e){const r=[];return Object.values(t).forEach(n=>{ys(n.accounts).includes(e)&&r.push(...n.methods)}),r}function Y5(t,e){const r=[];return Object.values(t).forEach(n=>{ys(n.accounts).includes(e)&&r.push(...n.events)}),r}function J5(t,e){const r=Ha(t,e);if(r)throw new Error(r.message);const n={};for(const[i,o]of Object.entries(t))n[i]={methods:o.methods,events:o.events,chains:o.accounts.map(c=>`${c.split(":")[0]}:${c.split(":")[1]}`)};return n}function E1(t){return t.includes(":")}function ka(t){return E1(t)?t.split(":")[0]:t}const X5={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},Q5={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function Ee(t,e){const{message:r,code:n}=Q5[t];return{message:e?`${r} ${e}`:r,code:n}}function Gt(t,e){const{message:r,code:n}=X5[t];return{message:e?`${r} ${e}`:r,code:n}}function Un(t,e){return Array.isArray(t)?typeof e<"u"&&t.length?t.every(e):!0:!1}function bs(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function Or(t){return typeof t>"u"}function pr(t,e){return e&&Or(t)?!0:typeof t=="string"&&Boolean(t.trim().length)}function yu(t,e){return e&&Or(t)?!0:typeof t=="number"&&!isNaN(t)}function eb(t,e){const{requiredNamespaces:r}=e,n=Object.keys(t.namespaces),i=Object.keys(r);let o=!0;return Ti(i,n)?(n.forEach(c=>{const{accounts:l,methods:h,events:d}=t.namespaces[c],v=ys(l),E=r[c];(!Ti(s1(c,E),v)||!Ti(E.methods,h)||!Ti(E.events,d))&&(o=!1)}),o):!1}function bu(t){return pr(t,!1)&&t.includes(":")?t.split(":").length===2:!1}function tb(t){if(pr(t,!1)&&t.includes(":")){const e=t.split(":");if(e.length===3){const r=e[0]+":"+e[1];return!!e[2]&&bu(r)}}return!1}function rb(t){if(pr(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}function nb(t){var e;return(e=t?.proposer)==null?void 0:e.publicKey}function ib(t){return t?.topic}function sb(t,e){let r=null;return pr(t?.publicKey,!1)||(r=Ee("MISSING_OR_INVALID",`${e} controller public key should be a string`)),r}function x1(t){let e=!0;return Un(t)?t.length&&(e=t.every(r=>pr(r,!1))):e=!1,e}function ob(t,e,r){let n=null;return Un(e)?e.forEach(i=>{n||(!bu(i)||!i.includes(t))&&(n=Gt("UNSUPPORTED_CHAINS",`${r}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):n=Gt("UNSUPPORTED_CHAINS",`${r}, chains ${e} should be an array of strings conforming to "namespace:chainId" format`),n}function ab(t,e){let r=null;return Object.entries(t).forEach(([n,i])=>{if(r)return;const o=ob(n,s1(n,i),`${e} requiredNamespace`);o&&(r=o)}),r}function cb(t,e){let r=null;return Un(t)?t.forEach(n=>{r||tb(n)||(r=Gt("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=Gt("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function lb(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=cb(n?.accounts,`${e} namespace`);i&&(r=i)}),r}function ub(t,e){let r=null;return x1(t?.methods)?x1(t?.events)||(r=Gt("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):r=Gt("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),r}function C1(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=ub(n,`${e}, namespace`);i&&(r=i)}),r}function hb(t,e,r){let n=null;if(t&&bs(t)){const i=C1(t,e);i&&(n=i);const o=ab(t,e);o&&(n=o)}else n=Ee("MISSING_OR_INVALID",`${e}, ${r} should be an object with data`);return n}function Ha(t,e){let r=null;if(t&&bs(t)){const n=C1(t,e);n&&(r=n);const i=lb(t,e);i&&(r=i)}else r=Ee("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return r}function I1(t){return pr(t.protocol,!0)}function fb(t,e){let r=!1;return e&&!t?r=!0:t&&Un(t)&&t.length&&t.forEach(n=>{r=I1(n)}),r}function db(t){return typeof t=="number"}function Fr(t){return typeof t<"u"&&typeof t!==null}function pb(t){return!(!t||typeof t!="object"||!t.code||!yu(t.code,!1)||!t.message||!pr(t.message,!1))}function gb(t){return!(Or(t)||!pr(t.method,!1))}function mb(t){return!(Or(t)||Or(t.result)&&Or(t.error)||!yu(t.id,!1)||!pr(t.jsonrpc,!1))}function wb(t){return!(Or(t)||!pr(t.name,!1))}function S1(t,e){return!(!bu(e)||!G5(t).includes(e))}function vb(t,e,r){return pr(r,!1)?Z5(t,e).includes(r):!1}function yb(t,e,r){return pr(r,!1)?Y5(t,e).includes(r):!1}function D1(t,e,r){let n=null;const i=bb(t),o=_b(e),c=Object.keys(i),l=Object.keys(o),h=O1(Object.keys(t)),d=O1(Object.keys(e)),v=h.filter(E=>!d.includes(E));return v.length&&(n=Ee("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.
|
|
14
|
+
***************************************************************************** */var hu=function(t,e){return hu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},hu(t,e)};function ky(t,e){hu(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var fu=function(){return fu=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},fu.apply(this,arguments)};function Hy(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function zy(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(o=(i<3?c(o):i>3?c(e,r,o):c(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o}function Wy(t,e){return function(r,n){e(r,n,t)}}function qy(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function Vy(t,e,r,n){function i(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function l(v){try{d(n.next(v))}catch(E){c(E)}}function h(v){try{d(n.throw(v))}catch(E){c(E)}}function d(v){v.done?o(v.value):i(v.value).then(l,h)}d((n=n.apply(t,e||[])).next())})}function Ky(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(v){return h([d,v])}}function h(d){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=d[0]&2?i.return:d[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,d[1])).done)return o;switch(i=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,i=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){r.label=d[1];break}if(d[0]===6&&r.label<o[1]){r.label=o[1],o=d;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(d);break}o[2]&&r.ops.pop(),r.trys.pop();continue}d=e.call(t,r)}catch(v){d=[6,v],i=0}finally{n=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Gy(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function Zy(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function du(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Qd(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],c;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(l){c={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return o}function Yy(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Qd(arguments[e]));return t}function Jy(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var o=arguments[e],c=0,l=o.length;c<l;c++,i++)n[i]=o[c];return n}function _o(t){return this instanceof _o?(this.v=t,this):new _o(t)}function Xy(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,o=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(_){n[_]&&(i[_]=function(O){return new Promise(function(P,U){o.push([_,O,P,U])>1||l(_,O)})})}function l(_,O){try{h(n[_](O))}catch(P){E(o[0][3],P)}}function h(_){_.value instanceof _o?Promise.resolve(_.value.v).then(d,v):E(o[0][2],_)}function d(_){l("next",_)}function v(_){l("throw",_)}function E(_,O){_(O),o.shift(),o.length&&l(o[0][0],o[0][1])}}function Qy(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,o){e[i]=t[i]?function(c){return(r=!r)?{value:_o(t[i](c)),done:i==="return"}:o?o(c):c}:o}}function e5(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof du=="function"?du(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(c){return new Promise(function(l,h){c=t[o](c),i(l,h,c.done,c.value)})}}function i(o,c,l,h){Promise.resolve(h).then(function(d){o({value:d,done:l})},c)}}function t5(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function r5(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function n5(t){return t&&t.__esModule?t:{default:t}}function i5(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function s5(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}var o5=Object.freeze({__proto__:null,__extends:ky,get __assign(){return fu},__rest:Hy,__decorate:zy,__param:Wy,__metadata:qy,__awaiter:Vy,__generator:Ky,__createBinding:Gy,__exportStar:Zy,__values:du,__read:Qd,__spread:Yy,__spreadArrays:Jy,__await:_o,__asyncGenerator:Xy,__asyncDelegator:Qy,__asyncValues:e5,__makeTemplateObject:t5,__importStar:r5,__importDefault:n5,__classPrivateFieldGet:i5,__classPrivateFieldSet:s5}),qa=Li(o5),pu={},Eo={},e1;function a5(){if(e1)return Eo;e1=1,Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.delay=void 0;function t(e){return new Promise(r=>{setTimeout(()=>{r(!0)},e)})}return Eo.delay=t,Eo}var Mi={},gu={},Ui={},t1;function c5(){return t1||(t1=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.ONE_THOUSAND=Ui.ONE_HUNDRED=void 0,Ui.ONE_HUNDRED=100,Ui.ONE_THOUSAND=1e3),Ui}var mu={},r1;function l5(){return r1||(r1=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=t.ONE_MINUTE*5,t.TEN_MINUTES=t.ONE_MINUTE*10,t.THIRTY_MINUTES=t.ONE_MINUTE*30,t.SIXTY_MINUTES=t.ONE_MINUTE*60,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=t.ONE_HOUR*3,t.SIX_HOURS=t.ONE_HOUR*6,t.TWELVE_HOURS=t.ONE_HOUR*12,t.TWENTY_FOUR_HOURS=t.ONE_HOUR*24,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=t.ONE_DAY*3,t.FIVE_DAYS=t.ONE_DAY*5,t.SEVEN_DAYS=t.ONE_DAY*7,t.THIRTY_DAYS=t.ONE_DAY*30,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=t.ONE_WEEK*2,t.THREE_WEEKS=t.ONE_WEEK*3,t.FOUR_WEEKS=t.ONE_WEEK*4,t.ONE_YEAR=t.ONE_DAY*365}(mu)),mu}var n1;function i1(){return n1||(n1=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=qa;e.__exportStar(c5(),t),e.__exportStar(l5(),t)}(gu)),gu}var s1;function u5(){if(s1)return Mi;s1=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.fromMiliseconds=Mi.toMiliseconds=void 0;const t=i1();function e(n){return n*t.ONE_THOUSAND}Mi.toMiliseconds=e;function r(n){return Math.floor(n/t.ONE_THOUSAND)}return Mi.fromMiliseconds=r,Mi}var o1;function h5(){return o1||(o1=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=qa;e.__exportStar(a5(),t),e.__exportStar(u5(),t)}(pu)),pu}var Cs={},a1;function f5(){if(a1)return Cs;a1=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.Watch=void 0;class t{constructor(){this.timestamps=new Map}start(r){if(this.timestamps.has(r))throw new Error(`Watch already started for label: ${r}`);this.timestamps.set(r,{started:Date.now()})}stop(r){const n=this.get(r);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${r}`);const i=Date.now()-n.started;this.timestamps.set(r,{started:n.started,elapsed:i})}get(r){const n=this.timestamps.get(r);if(typeof n>"u")throw new Error(`No timestamp found for label: ${r}`);return n}elapsed(r){const n=this.get(r);return n.elapsed||Date.now()-n.started}}return Cs.Watch=t,Cs.default=t,Cs}var wu={},xo={},c1;function d5(){if(c1)return xo;c1=1,Object.defineProperty(xo,"__esModule",{value:!0}),xo.IWatch=void 0;class t{}return xo.IWatch=t,xo}var l1;function p5(){return l1||(l1=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),qa.__exportStar(d5(),t)}(wu)),wu}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=qa;e.__exportStar(h5(),t),e.__exportStar(f5(),t),e.__exportStar(p5(),t),e.__exportStar(i1(),t)})(ke);var Dt={};Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.getLocalStorage=Dt.getLocalStorageOrThrow=Dt.getCrypto=Dt.getCryptoOrThrow=h1=Dt.getLocation=Dt.getLocationOrThrow=vu=Dt.getNavigator=Dt.getNavigatorOrThrow=u1=Dt.getDocument=Dt.getDocumentOrThrow=Dt.getFromWindowOrThrow=Dt.getFromWindow=void 0;function ji(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}Dt.getFromWindow=ji;function Is(t){const e=ji(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}Dt.getFromWindowOrThrow=Is;function g5(){return Is("document")}Dt.getDocumentOrThrow=g5;function m5(){return ji("document")}var u1=Dt.getDocument=m5;function w5(){return Is("navigator")}Dt.getNavigatorOrThrow=w5;function v5(){return ji("navigator")}var vu=Dt.getNavigator=v5;function y5(){return Is("location")}Dt.getLocationOrThrow=y5;function b5(){return ji("location")}var h1=Dt.getLocation=b5;function _5(){return Is("crypto")}Dt.getCryptoOrThrow=_5;function E5(){return ji("crypto")}Dt.getCrypto=E5;function x5(){return Is("localStorage")}Dt.getLocalStorageOrThrow=x5;function C5(){return ji("localStorage")}Dt.getLocalStorage=C5;var yu={};Object.defineProperty(yu,"__esModule",{value:!0});var f1=yu.getWindowMetadata=void 0;const d1=Dt;function I5(){let t,e;try{t=d1.getDocumentOrThrow(),e=d1.getLocationOrThrow()}catch{return null}function r(){const E=t.getElementsByTagName("link"),_=[];for(let O=0;O<E.length;O++){const P=E[O],U=P.getAttribute("rel");if(U&&U.toLowerCase().indexOf("icon")>-1){const H=P.getAttribute("href");if(H)if(H.toLowerCase().indexOf("https:")===-1&&H.toLowerCase().indexOf("http:")===-1&&H.indexOf("//")!==0){let G=e.protocol+"//"+e.host;if(H.indexOf("/")===0)G+=H;else{const N=e.pathname.split("/");N.pop();const L=N.join("/");G+=L+"/"+H}_.push(G)}else if(H.indexOf("//")===0){const G=e.protocol+H;_.push(G)}else _.push(H)}}return _}function n(...E){const _=t.getElementsByTagName("meta");for(let O=0;O<_.length;O++){const P=_[O],U=["itemprop","property","name"].map(H=>P.getAttribute(H)).filter(H=>H?E.includes(H):!1);if(U.length&&U){const H=P.getAttribute("content");if(H)return H}}return""}function i(){let E=n("name","og:site_name","og:title","twitter:title");return E||(E=t.title),E}function o(){return n("description","og:description","twitter:description","keywords")}const c=i(),l=o(),h=e.origin,d=r();return{description:l,url:h,icons:d,name:c}}f1=yu.getWindowMetadata=I5;var Co={},S5=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),p1="%[a-f0-9]{2}",g1=new RegExp("("+p1+")|([^%]+?)","gi"),m1=new RegExp("("+p1+")+","gi");function bu(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],bu(r),bu(n))}function O5(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(g1)||[],r=1;r<e.length;r++)t=bu(e,r).join(""),e=t.match(g1)||[];return t}}function D5(t){for(var e={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},r=m1.exec(t);r;){try{e[r[0]]=decodeURIComponent(r[0])}catch{var n=O5(r[0]);n!==r[0]&&(e[r[0]]=n)}r=m1.exec(t)}e["%C2"]="\uFFFD";for(var i=Object.keys(e),o=0;o<i.length;o++){var c=i[o];t=t.replace(new RegExp(c,"g"),e[c])}return t}var A5=function(t){if(typeof t!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch{return D5(t)}},$5=(t,e)=>{if(!(typeof t=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e==="")return[t];const r=t.indexOf(e);return r===-1?[t]:[t.slice(0,r),t.slice(r+e.length)]},P5=function(t,e){for(var r={},n=Object.keys(t),i=Array.isArray(e),o=0;o<n.length;o++){var c=n[o],l=t[c];(i?e.indexOf(c)!==-1:e(c,l,t))&&(r[c]=l)}return r};(function(t){const e=S5,r=A5,n=$5,i=P5,o=N=>N==null,c=Symbol("encodeFragmentIdentifier");function l(N){switch(N.arrayFormat){case"index":return L=>($,T)=>{const I=$.length;return T===void 0||N.skipNull&&T===null||N.skipEmptyString&&T===""?$:T===null?[...$,[v(L,N),"[",I,"]"].join("")]:[...$,[v(L,N),"[",v(I,N),"]=",v(T,N)].join("")]};case"bracket":return L=>($,T)=>T===void 0||N.skipNull&&T===null||N.skipEmptyString&&T===""?$:T===null?[...$,[v(L,N),"[]"].join("")]:[...$,[v(L,N),"[]=",v(T,N)].join("")];case"colon-list-separator":return L=>($,T)=>T===void 0||N.skipNull&&T===null||N.skipEmptyString&&T===""?$:T===null?[...$,[v(L,N),":list="].join("")]:[...$,[v(L,N),":list=",v(T,N)].join("")];case"comma":case"separator":case"bracket-separator":{const L=N.arrayFormat==="bracket-separator"?"[]=":"=";return $=>(T,I)=>I===void 0||N.skipNull&&I===null||N.skipEmptyString&&I===""?T:(I=I===null?"":I,T.length===0?[[v($,N),L,v(I,N)].join("")]:[[T,v(I,N)].join(N.arrayFormatSeparator)])}default:return L=>($,T)=>T===void 0||N.skipNull&&T===null||N.skipEmptyString&&T===""?$:T===null?[...$,v(L,N)]:[...$,[v(L,N),"=",v(T,N)].join("")]}}function h(N){let L;switch(N.arrayFormat){case"index":return($,T,I)=>{if(L=/\[(\d*)\]$/.exec($),$=$.replace(/\[\d*\]$/,""),!L){I[$]=T;return}I[$]===void 0&&(I[$]={}),I[$][L[1]]=T};case"bracket":return($,T,I)=>{if(L=/(\[\])$/.exec($),$=$.replace(/\[\]$/,""),!L){I[$]=T;return}if(I[$]===void 0){I[$]=[T];return}I[$]=[].concat(I[$],T)};case"colon-list-separator":return($,T,I)=>{if(L=/(:list)$/.exec($),$=$.replace(/:list$/,""),!L){I[$]=T;return}if(I[$]===void 0){I[$]=[T];return}I[$]=[].concat(I[$],T)};case"comma":case"separator":return($,T,I)=>{const f=typeof T=="string"&&T.includes(N.arrayFormatSeparator),x=typeof T=="string"&&!f&&E(T,N).includes(N.arrayFormatSeparator);T=x?E(T,N):T;const J=f||x?T.split(N.arrayFormatSeparator).map(z=>E(z,N)):T===null?T:E(T,N);I[$]=J};case"bracket-separator":return($,T,I)=>{const f=/(\[\])$/.test($);if($=$.replace(/\[\]$/,""),!f){I[$]=T&&E(T,N);return}const x=T===null?[]:T.split(N.arrayFormatSeparator).map(J=>E(J,N));if(I[$]===void 0){I[$]=x;return}I[$]=[].concat(I[$],x)};default:return($,T,I)=>{if(I[$]===void 0){I[$]=T;return}I[$]=[].concat(I[$],T)}}}function d(N){if(typeof N!="string"||N.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function v(N,L){return L.encode?L.strict?e(N):encodeURIComponent(N):N}function E(N,L){return L.decode?r(N):N}function _(N){return Array.isArray(N)?N.sort():typeof N=="object"?_(Object.keys(N)).sort((L,$)=>Number(L)-Number($)).map(L=>N[L]):N}function O(N){const L=N.indexOf("#");return L!==-1&&(N=N.slice(0,L)),N}function P(N){let L="";const $=N.indexOf("#");return $!==-1&&(L=N.slice($)),L}function U(N){N=O(N);const L=N.indexOf("?");return L===-1?"":N.slice(L+1)}function H(N,L){return L.parseNumbers&&!Number.isNaN(Number(N))&&typeof N=="string"&&N.trim()!==""?N=Number(N):L.parseBooleans&&N!==null&&(N.toLowerCase()==="true"||N.toLowerCase()==="false")&&(N=N.toLowerCase()==="true"),N}function G(N,L){L=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},L),d(L.arrayFormatSeparator);const $=h(L),T=Object.create(null);if(typeof N!="string"||(N=N.trim().replace(/^[?#&]/,""),!N))return T;for(const I of N.split("&")){if(I==="")continue;let[f,x]=n(L.decode?I.replace(/\+/g," "):I,"=");x=x===void 0?null:["comma","separator","bracket-separator"].includes(L.arrayFormat)?x:E(x,L),$(E(f,L),x,T)}for(const I of Object.keys(T)){const f=T[I];if(typeof f=="object"&&f!==null)for(const x of Object.keys(f))f[x]=H(f[x],L);else T[I]=H(f,L)}return L.sort===!1?T:(L.sort===!0?Object.keys(T).sort():Object.keys(T).sort(L.sort)).reduce((I,f)=>{const x=T[f];return Boolean(x)&&typeof x=="object"&&!Array.isArray(x)?I[f]=_(x):I[f]=x,I},Object.create(null))}t.extract=U,t.parse=G,t.stringify=(N,L)=>{if(!N)return"";L=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},L),d(L.arrayFormatSeparator);const $=x=>L.skipNull&&o(N[x])||L.skipEmptyString&&N[x]==="",T=l(L),I={};for(const x of Object.keys(N))$(x)||(I[x]=N[x]);const f=Object.keys(I);return L.sort!==!1&&f.sort(L.sort),f.map(x=>{const J=N[x];return J===void 0?"":J===null?v(x,L):Array.isArray(J)?J.length===0&&L.arrayFormat==="bracket-separator"?v(x,L)+"[]":J.reduce(T(x),[]).join("&"):v(x,L)+"="+v(J,L)}).filter(x=>x.length>0).join("&")},t.parseUrl=(N,L)=>{L=Object.assign({decode:!0},L);const[$,T]=n(N,"#");return Object.assign({url:$.split("?")[0]||"",query:G(U(N),L)},L&&L.parseFragmentIdentifier&&T?{fragmentIdentifier:E(T,L)}:{})},t.stringifyUrl=(N,L)=>{L=Object.assign({encode:!0,strict:!0,[c]:!0},L);const $=O(N.url).split("?")[0]||"",T=t.extract(N.url),I=t.parse(T,{sort:!1}),f=Object.assign(I,N.query);let x=t.stringify(f,L);x&&(x=`?${x}`);let J=P(N.url);return N.fragmentIdentifier&&(J=`#${L[c]?v(N.fragmentIdentifier,L):N.fragmentIdentifier}`),`${$}${x}${J}`},t.pick=(N,L,$)=>{$=Object.assign({parseFragmentIdentifier:!0,[c]:!1},$);const{url:T,query:I,fragmentIdentifier:f}=t.parseUrl(N,$);return t.stringifyUrl({url:T,query:i(I,L),fragmentIdentifier:f},$)},t.exclude=(N,L,$)=>{const T=Array.isArray(L)?I=>!L.includes(I):(I,f)=>!L(I,f);return t.pick(N,T,$)}})(Co);const T5={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}};function R5(t,e=[]){const r=[];return Object.keys(t).forEach(n=>{if(e.length&&!e.includes(n))return;const i=t[n];r.push(...i.accounts)}),r}function w1(t,e){return t.includes(":")?[t]:e.chains||[]}const v1="base10",Ar="base16",_u="base64pad",Eu="utf8",y1=0,Fi=1,N5=0,b1=1,xu=12,Cu=32;function L5(){const t=su.generateKeyPair();return{privateKey:Dr(t.secretKey,Ar),publicKey:Dr(t.publicKey,Ar)}}function Iu(){const t=xs.randomBytes(Cu);return Dr(t,Ar)}function M5(t,e){const r=su.sharedKey(kr(t,Ar),kr(e,Ar)),n=new Xw(za.SHA256,r).expand(Cu);return Dr(n,Ar)}function U5(t){const e=za.hash(kr(t,Ar));return Dr(e,Ar)}function Ss(t){const e=za.hash(kr(t,Eu));return Dr(e,Ar)}function j5(t){return kr(`${t}`,v1)}function Io(t){return Number(Dr(t,v1))}function F5(t){const e=j5(typeof t.type<"u"?t.type:y1);if(Io(e)===Fi&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof t.senderPublicKey<"u"?kr(t.senderPublicKey,Ar):void 0,n=typeof t.iv<"u"?kr(t.iv,Ar):xs.randomBytes(xu),i=new Xl.ChaCha20Poly1305(kr(t.symKey,Ar)).seal(n,kr(t.message,Eu));return k5({type:e,sealed:i,iv:n,senderPublicKey:r})}function B5(t){const e=new Xl.ChaCha20Poly1305(kr(t.symKey,Ar)),{sealed:r,iv:n}=Va(t.encoded),i=e.open(n,r);if(i===null)throw new Error("Failed to decrypt");return Dr(i,Eu)}function k5(t){if(Io(t.type)===Fi){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Dr(au([t.type,t.senderPublicKey,t.iv,t.sealed]),_u)}return Dr(au([t.type,t.iv,t.sealed]),_u)}function Va(t){const e=kr(t,_u),r=e.slice(N5,b1),n=b1;if(Io(r)===Fi){const l=n+Cu,h=l+xu,d=e.slice(n,l),v=e.slice(l,h),E=e.slice(h);return{type:r,sealed:E,iv:v,senderPublicKey:d}}const i=n+xu,o=e.slice(n,i),c=e.slice(i);return{type:r,sealed:c,iv:o}}function H5(t,e){const r=Va(t);return _1({type:Io(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?Dr(r.senderPublicKey,Ar):void 0,receiverPublicKey:e?.receiverPublicKey})}function _1(t){const e=t?.type||y1;if(e===Fi){if(typeof t?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof t?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:t?.senderPublicKey,receiverPublicKey:t?.receiverPublicKey}}function E1(t){return t.type===Fi&&typeof t.senderPublicKey=="string"&&typeof t.receiverPublicKey=="string"}var z5=Object.defineProperty,x1=Object.getOwnPropertySymbols,W5=Object.prototype.hasOwnProperty,q5=Object.prototype.propertyIsEnumerable,C1=(t,e,r)=>e in t?z5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,I1=(t,e)=>{for(var r in e||(e={}))W5.call(e,r)&&C1(t,r,e[r]);if(x1)for(var r of x1(e))q5.call(e,r)&&C1(t,r,e[r]);return t};const V5="ReactNative",Bi={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},K5="js";function Su(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function S1(){return!u1()&&!!vu()&&navigator.product===V5}function Ou(){return!Su()&&!!vu()}function O1(){return S1()?Bi.reactNative:Su()?Bi.node:Ou()?Bi.browser:Bi.unknown}function G5(t,e){let r=Co.parse(t);return r=I1(I1({},r),e),t=Co.stringify(r),t}function Z5(){return f1()||{name:"",description:"",url:"",icons:[""]}}function Y5(){const t=My();if(t===null)return"unknown";const e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return t.type==="browser"?[e,t.name,t.version].join("-"):[e,t.version].join("-")}function J5(){var t;const e=O1();return e===Bi.browser?[e,((t=h1())==null?void 0:t.host)||"unknown"].join(":"):e}function X5(t,e,r){const n=Y5(),i=J5();return[[t,e].join("-"),[K5,r].join("-"),n,i].join("/")}function Q5({protocol:t,version:e,relayUrl:r,sdkVersion:n,auth:i,projectId:o,useOnCloseEvent:c}){const l=r.split("?"),h=X5(t,e,n),d={auth:i,ua:h,projectId:o,useOnCloseEvent:c||void 0},v=G5(l[1]||"",d);return l[0]+"?"+v}function ki(t,e){return t.filter(r=>e.includes(r)).length===t.length}function D1(t){return Object.fromEntries(t.entries())}function A1(t){return new Map(Object.entries(t))}function Os(t=ke.FIVE_MINUTES,e){const r=ke.toMiliseconds(t||ke.FIVE_MINUTES);let n,i,o;return{resolve:c=>{o&&n&&(clearTimeout(o),n(c))},reject:c=>{o&&i&&(clearTimeout(o),i(c))},done:()=>new Promise((c,l)=>{o=setTimeout(()=>{l(new Error(e))},r),n=c,i=l})}}function Ka(t,e,r){return new Promise(async(n,i)=>{const o=setTimeout(()=>i(new Error(r)),e);try{const c=await t;n(c)}catch(c){i(c)}clearTimeout(o)})}function $1(t,e){if(typeof e=="string"&&e.startsWith(`${t}:`))return e;if(t.toLowerCase()==="topic"){if(typeof e!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}else if(t.toLowerCase()==="id"){if(typeof e!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${t}`)}function eb(t){return $1("topic",t)}function tb(t){return $1("id",t)}function P1(t){const[e,r]=t.split(":"),n={id:void 0,topic:void 0};if(e==="topic"&&typeof r=="string")n.topic=r;else if(e==="id"&&Number.isInteger(Number(r)))n.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${r}`);return n}function An(t,e){return ke.fromMiliseconds((e||Date.now())+ke.toMiliseconds(t))}function li(t){return Date.now()>=ke.toMiliseconds(t)}function er(t,e){return`${t}${e?`:${e}`:""}`}function Du(t=[],e=[]){return[...new Set([...t,...e])]}const rb="irn";function Au(t){return t?.relay||{protocol:rb}}function Ga(t){const e=T5[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var nb=Object.defineProperty,T1=Object.getOwnPropertySymbols,ib=Object.prototype.hasOwnProperty,sb=Object.prototype.propertyIsEnumerable,R1=(t,e,r)=>e in t?nb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ob=(t,e)=>{for(var r in e||(e={}))ib.call(e,r)&&R1(t,r,e[r]);if(T1)for(var r of T1(e))sb.call(e,r)&&R1(t,r,e[r]);return t};function ab(t,e="-"){const r={},n="relay"+e;return Object.keys(t).forEach(i=>{if(i.startsWith(n)){const o=i.replace(n,""),c=t[i];r[o]=c}}),r}function cb(t){const e=t.indexOf(":"),r=t.indexOf("?")!==-1?t.indexOf("?"):void 0,n=t.substring(0,e),i=t.substring(e+1,r).split("@"),o=typeof r<"u"?t.substring(r):"",c=Co.parse(o);return{protocol:n,topic:i[0],version:parseInt(i[1],10),symKey:c.symKey,relay:ab(c)}}function lb(t,e="-"){const r="relay",n={};return Object.keys(t).forEach(i=>{const o=r+e+i;t[i]&&(n[o]=t[i])}),n}function ub(t){return`${t.protocol}:${t.topic}@${t.version}?`+Co.stringify(ob({symKey:t.symKey},lb(t.relay)))}function Ds(t){const e=[];return t.forEach(r=>{const[n,i]=r.split(":");e.push(`${n}:${i}`)}),e}function hb(t){const e=[];return Object.values(t).forEach(r=>{e.push(...Ds(r.accounts))}),e}function fb(t,e){const r=[];return Object.values(t).forEach(n=>{Ds(n.accounts).includes(e)&&r.push(...n.methods)}),r}function db(t,e){const r=[];return Object.values(t).forEach(n=>{Ds(n.accounts).includes(e)&&r.push(...n.events)}),r}function pb(t,e){const r=Ya(t,e);if(r)throw new Error(r.message);const n={};for(const[i,o]of Object.entries(t))n[i]={methods:o.methods,events:o.events,chains:o.accounts.map(c=>`${c.split(":")[0]}:${c.split(":")[1]}`)};return n}function N1(t){return t.includes(":")}function Za(t){return N1(t)?t.split(":")[0]:t}const gb={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},mb={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function _e(t,e){const{message:r,code:n}=mb[t];return{message:e?`${r} ${e}`:r,code:n}}function Zt(t,e){const{message:r,code:n}=gb[t];return{message:e?`${r} ${e}`:r,code:n}}function Hn(t,e){return Array.isArray(t)?typeof e<"u"&&t.length?t.every(e):!0:!1}function As(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function $r(t){return typeof t>"u"}function pr(t,e){return e&&$r(t)?!0:typeof t=="string"&&Boolean(t.trim().length)}function $u(t,e){return e&&$r(t)?!0:typeof t=="number"&&!isNaN(t)}function wb(t,e){const{requiredNamespaces:r}=e,n=Object.keys(t.namespaces),i=Object.keys(r);let o=!0;return ki(i,n)?(n.forEach(c=>{const{accounts:l,methods:h,events:d}=t.namespaces[c],v=Ds(l),E=r[c];(!ki(w1(c,E),v)||!ki(E.methods,h)||!ki(E.events,d))&&(o=!1)}),o):!1}function Pu(t){return pr(t,!1)&&t.includes(":")?t.split(":").length===2:!1}function vb(t){if(pr(t,!1)&&t.includes(":")){const e=t.split(":");if(e.length===3){const r=e[0]+":"+e[1];return!!e[2]&&Pu(r)}}return!1}function yb(t){if(pr(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}function bb(t){var e;return(e=t?.proposer)==null?void 0:e.publicKey}function _b(t){return t?.topic}function Eb(t,e){let r=null;return pr(t?.publicKey,!1)||(r=_e("MISSING_OR_INVALID",`${e} controller public key should be a string`)),r}function L1(t){let e=!0;return Hn(t)?t.length&&(e=t.every(r=>pr(r,!1))):e=!1,e}function xb(t,e,r){let n=null;return Hn(e)?e.forEach(i=>{n||(!Pu(i)||!i.includes(t))&&(n=Zt("UNSUPPORTED_CHAINS",`${r}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):n=Zt("UNSUPPORTED_CHAINS",`${r}, chains ${e} should be an array of strings conforming to "namespace:chainId" format`),n}function Cb(t,e){let r=null;return Object.entries(t).forEach(([n,i])=>{if(r)return;const o=xb(n,w1(n,i),`${e} requiredNamespace`);o&&(r=o)}),r}function Ib(t,e){let r=null;return Hn(t)?t.forEach(n=>{r||vb(n)||(r=Zt("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=Zt("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function Sb(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=Ib(n?.accounts,`${e} namespace`);i&&(r=i)}),r}function Ob(t,e){let r=null;return L1(t?.methods)?L1(t?.events)||(r=Zt("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):r=Zt("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),r}function M1(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=Ob(n,`${e}, namespace`);i&&(r=i)}),r}function Db(t,e,r){let n=null;if(t&&As(t)){const i=M1(t,e);i&&(n=i);const o=Cb(t,e);o&&(n=o)}else n=_e("MISSING_OR_INVALID",`${e}, ${r} should be an object with data`);return n}function Ya(t,e){let r=null;if(t&&As(t)){const n=M1(t,e);n&&(r=n);const i=Sb(t,e);i&&(r=i)}else r=_e("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return r}function U1(t){return pr(t.protocol,!0)}function Ab(t,e){let r=!1;return e&&!t?r=!0:t&&Hn(t)&&t.length&&t.forEach(n=>{r=U1(n)}),r}function $b(t){return typeof t=="number"}function Hr(t){return typeof t<"u"&&typeof t!==null}function Pb(t){return!(!t||typeof t!="object"||!t.code||!$u(t.code,!1)||!t.message||!pr(t.message,!1))}function Tb(t){return!($r(t)||!pr(t.method,!1))}function Rb(t){return!($r(t)||$r(t.result)&&$r(t.error)||!$u(t.id,!1)||!pr(t.jsonrpc,!1))}function Nb(t){return!($r(t)||!pr(t.name,!1))}function j1(t,e){return!(!Pu(e)||!hb(t).includes(e))}function Lb(t,e,r){return pr(r,!1)?fb(t,e).includes(r):!1}function Mb(t,e,r){return pr(r,!1)?db(t,e).includes(r):!1}function F1(t,e,r){let n=null;const i=Ub(t),o=jb(e),c=Object.keys(i),l=Object.keys(o),h=B1(Object.keys(t)),d=B1(Object.keys(e)),v=h.filter(E=>!d.includes(E));return v.length&&(n=_e("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.
|
|
15
15
|
Required: ${v.toString()}
|
|
16
|
-
Received: ${Object.keys(e).toString()}`)),
|
|
16
|
+
Received: ${Object.keys(e).toString()}`)),ki(c,l)||(n=_e("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces.
|
|
17
17
|
Required: ${c.toString()}
|
|
18
|
-
Approved: ${l.toString()}`)),Object.keys(e).forEach(E=>{if(!E.includes(":")||n)return;const _=
|
|
18
|
+
Approved: ${l.toString()}`)),Object.keys(e).forEach(E=>{if(!E.includes(":")||n)return;const _=Ds(e[E].accounts);_.includes(E)||(n=_e("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${E}
|
|
19
19
|
Required: ${E}
|
|
20
|
-
Approved: ${_.toString()}`))}),c.forEach(E=>{n||(
|
|
20
|
+
Approved: ${_.toString()}`))}),c.forEach(E=>{n||(ki(i[E].methods,o[E].methods)?ki(i[E].events,o[E].events)||(n=_e("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${E}`)):n=_e("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${E}`))}),n}function Ub(t){const e={};return Object.keys(t).forEach(r=>{var n;r.includes(":")?e[r]=t[r]:(n=t[r].chains)==null||n.forEach(i=>{e[i]={methods:t[r].methods,events:t[r].events}})}),e}function B1(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function jb(t){const e={};return Object.keys(t).forEach(r=>{if(r.includes(":"))e[r]=t[r];else{const n=Ds(t[r].accounts);n?.forEach(i=>{e[i]={accounts:t[r].accounts.filter(o=>o.includes(`${i}:`)),methods:t[r].methods,events:t[r].events}})}}),e}function Fb(t,e){return $u(t,!1)&&t<=e.max&&t>=e.min}var Ja={};/*! *****************************************************************************
|
|
21
21
|
Copyright (c) Microsoft Corporation.
|
|
22
22
|
|
|
23
23
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
31
31
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
32
32
|
PERFORMANCE OF THIS SOFTWARE.
|
|
33
|
-
***************************************************************************** */var
|
|
33
|
+
***************************************************************************** */var Tu=function(t,e){return Tu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},Tu(t,e)};function Bb(t,e){Tu(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Ru=function(){return Ru=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Ru.apply(this,arguments)};function kb(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function Hb(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(o=(i<3?c(o):i>3?c(e,r,o):c(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o}function zb(t,e){return function(r,n){e(r,n,t)}}function Wb(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function qb(t,e,r,n){function i(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function l(v){try{d(n.next(v))}catch(E){c(E)}}function h(v){try{d(n.throw(v))}catch(E){c(E)}}function d(v){v.done?o(v.value):i(v.value).then(l,h)}d((n=n.apply(t,e||[])).next())})}function Vb(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(v){return h([d,v])}}function h(d){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=d[0]&2?i.return:d[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,d[1])).done)return o;switch(i=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,i=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){r.label=d[1];break}if(d[0]===6&&r.label<o[1]){r.label=o[1],o=d;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(d);break}o[2]&&r.ops.pop(),r.trys.pop();continue}d=e.call(t,r)}catch(v){d=[6,v],i=0}finally{n=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Kb(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function Gb(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function Nu(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function k1(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],c;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(l){c={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return o}function Zb(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(k1(arguments[e]));return t}function Yb(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var o=arguments[e],c=0,l=o.length;c<l;c++,i++)n[i]=o[c];return n}function So(t){return this instanceof So?(this.v=t,this):new So(t)}function Jb(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,o=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(_){n[_]&&(i[_]=function(O){return new Promise(function(P,U){o.push([_,O,P,U])>1||l(_,O)})})}function l(_,O){try{h(n[_](O))}catch(P){E(o[0][3],P)}}function h(_){_.value instanceof So?Promise.resolve(_.value.v).then(d,v):E(o[0][2],_)}function d(_){l("next",_)}function v(_){l("throw",_)}function E(_,O){_(O),o.shift(),o.length&&l(o[0][0],o[0][1])}}function Xb(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,o){e[i]=t[i]?function(c){return(r=!r)?{value:So(t[i](c)),done:i==="return"}:o?o(c):c}:o}}function Qb(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Nu=="function"?Nu(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(c){return new Promise(function(l,h){c=t[o](c),i(l,h,c.done,c.value)})}}function i(o,c,l,h){Promise.resolve(h).then(function(d){o({value:d,done:l})},c)}}function e6(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function t6(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function r6(t){return t&&t.__esModule?t:{default:t}}function n6(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function i6(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}var s6=Object.freeze({__proto__:null,__extends:Bb,get __assign(){return Ru},__rest:kb,__decorate:Hb,__param:zb,__metadata:Wb,__awaiter:qb,__generator:Vb,__createBinding:Kb,__exportStar:Gb,__values:Nu,__read:k1,__spread:Zb,__spreadArrays:Yb,__await:So,__asyncGenerator:Jb,__asyncDelegator:Xb,__asyncValues:Qb,__makeTemplateObject:e6,__importStar:t6,__importDefault:r6,__classPrivateFieldGet:n6,__classPrivateFieldSet:i6}),H1=Li(s6),Oo={};Object.defineProperty(Oo,"__esModule",{value:!0});function o6(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return JSON.parse(t)}catch{return t}}Oo.safeJsonParse=o6;function a6(t){return typeof t=="string"?t:JSON.stringify(t,(e,r)=>typeof r>"u"?null:r)}Oo.safeJsonStringify=a6;var Do={exports:{}},z1;function c6(){return z1||(z1=1,function(){let t;function e(){}t=e,t.prototype.getItem=function(r){return this.hasOwnProperty(r)?String(this[r]):null},t.prototype.setItem=function(r,n){this[r]=String(n)},t.prototype.removeItem=function(r){delete this[r]},t.prototype.clear=function(){const r=this;Object.keys(r).forEach(function(n){r[n]=void 0,delete r[n]})},t.prototype.key=function(r){return r=r||0,Object.keys(this)[r]},t.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof dr<"u"&&dr.localStorage?Do.exports=dr.localStorage:typeof window<"u"&&window.localStorage?Do.exports=window.localStorage:Do.exports=new e}()),Do.exports}var Lu={},Ao={},W1;function l6(){if(W1)return Ao;W1=1,Object.defineProperty(Ao,"__esModule",{value:!0}),Ao.IKeyValueStorage=void 0;class t{}return Ao.IKeyValueStorage=t,Ao}var $o={},q1;function u6(){if(q1)return $o;q1=1,Object.defineProperty($o,"__esModule",{value:!0}),$o.parseEntry=void 0;const t=Oo;function e(r){var n;return[r[0],t.safeJsonParse((n=r[1])!==null&&n!==void 0?n:"")]}return $o.parseEntry=e,$o}var V1;function h6(){return V1||(V1=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=H1;e.__exportStar(l6(),t),e.__exportStar(u6(),t)}(Lu)),Lu}Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.KeyValueStorage=void 0;const $s=H1,K1=Oo,f6=$s.__importDefault(c6()),d6=h6();class G1{constructor(){this.localStorage=f6.default}getKeys(){return $s.__awaiter(this,void 0,void 0,function*(){return Object.keys(this.localStorage)})}getEntries(){return $s.__awaiter(this,void 0,void 0,function*(){return Object.entries(this.localStorage).map(d6.parseEntry)})}getItem(e){return $s.__awaiter(this,void 0,void 0,function*(){const r=this.localStorage.getItem(e);if(r!==null)return K1.safeJsonParse(r)})}setItem(e,r){return $s.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(e,K1.safeJsonStringify(r))})}removeItem(e){return $s.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(e)})}}Ja.KeyValueStorage=G1;var p6=Ja.default=G1,Po={};/*! *****************************************************************************
|
|
34
34
|
Copyright (c) Microsoft Corporation.
|
|
35
35
|
|
|
36
36
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
44
44
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
45
45
|
PERFORMANCE OF THIS SOFTWARE.
|
|
46
|
-
***************************************************************************** */var
|
|
46
|
+
***************************************************************************** */var Mu=function(t,e){return Mu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},Mu(t,e)};function g6(t,e){Mu(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Uu=function(){return Uu=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Uu.apply(this,arguments)};function m6(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function w6(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(o=(i<3?c(o):i>3?c(e,r,o):c(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o}function v6(t,e){return function(r,n){e(r,n,t)}}function y6(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function b6(t,e,r,n){function i(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function l(v){try{d(n.next(v))}catch(E){c(E)}}function h(v){try{d(n.throw(v))}catch(E){c(E)}}function d(v){v.done?o(v.value):i(v.value).then(l,h)}d((n=n.apply(t,e||[])).next())})}function _6(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(v){return h([d,v])}}function h(d){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=d[0]&2?i.return:d[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,d[1])).done)return o;switch(i=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,i=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){r.label=d[1];break}if(d[0]===6&&r.label<o[1]){r.label=o[1],o=d;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(d);break}o[2]&&r.ops.pop(),r.trys.pop();continue}d=e.call(t,r)}catch(v){d=[6,v],i=0}finally{n=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function E6(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function x6(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function ju(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Z1(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],c;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(l){c={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return o}function C6(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Z1(arguments[e]));return t}function I6(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var o=arguments[e],c=0,l=o.length;c<l;c++,i++)n[i]=o[c];return n}function To(t){return this instanceof To?(this.v=t,this):new To(t)}function S6(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,o=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(_){n[_]&&(i[_]=function(O){return new Promise(function(P,U){o.push([_,O,P,U])>1||l(_,O)})})}function l(_,O){try{h(n[_](O))}catch(P){E(o[0][3],P)}}function h(_){_.value instanceof To?Promise.resolve(_.value.v).then(d,v):E(o[0][2],_)}function d(_){l("next",_)}function v(_){l("throw",_)}function E(_,O){_(O),o.shift(),o.length&&l(o[0][0],o[0][1])}}function O6(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,o){e[i]=t[i]?function(c){return(r=!r)?{value:To(t[i](c)),done:i==="return"}:o?o(c):c}:o}}function D6(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof ju=="function"?ju(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(c){return new Promise(function(l,h){c=t[o](c),i(l,h,c.done,c.value)})}}function i(o,c,l,h){Promise.resolve(h).then(function(d){o({value:d,done:l})},c)}}function A6(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function $6(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function P6(t){return t&&t.__esModule?t:{default:t}}function T6(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function R6(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}var N6=Object.freeze({__proto__:null,__extends:g6,get __assign(){return Uu},__rest:m6,__decorate:w6,__param:v6,__metadata:y6,__awaiter:b6,__generator:_6,__createBinding:E6,__exportStar:x6,__values:ju,__read:Z1,__spread:C6,__spreadArrays:I6,__await:To,__asyncGenerator:S6,__asyncDelegator:O6,__asyncValues:D6,__makeTemplateObject:A6,__importStar:$6,__importDefault:P6,__classPrivateFieldGet:T6,__classPrivateFieldSet:R6}),Xa=Li(N6),Ro={},Fu={},No={};class Hi{}var L6=Object.freeze({__proto__:null,IEvents:Hi}),M6=Li(L6),Y1;function U6(){if(Y1)return No;Y1=1,Object.defineProperty(No,"__esModule",{value:!0}),No.IHeartBeat=void 0;const t=M6;class e extends t.IEvents{constructor(n){super()}}return No.IHeartBeat=e,No}var J1;function X1(){return J1||(J1=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Xa.__exportStar(U6(),t)}(Fu)),Fu}var Bu={},zi={},Q1;function j6(){if(Q1)return zi;Q1=1,Object.defineProperty(zi,"__esModule",{value:!0}),zi.HEARTBEAT_EVENTS=zi.HEARTBEAT_INTERVAL=void 0;const t=ke;return zi.HEARTBEAT_INTERVAL=t.FIVE_SECONDS,zi.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},zi}var ep;function tp(){return ep||(ep=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Xa.__exportStar(j6(),t)}(Bu)),Bu}var rp;function F6(){if(rp)return Ro;rp=1,Object.defineProperty(Ro,"__esModule",{value:!0}),Ro.HeartBeat=void 0;const t=Xa,e=yr.exports,r=ke,n=X1(),i=tp();class o extends n.IHeartBeat{constructor(l){super(l),this.events=new e.EventEmitter,this.interval=i.HEARTBEAT_INTERVAL,this.interval=l?.interval||i.HEARTBEAT_INTERVAL}static init(l){return t.__awaiter(this,void 0,void 0,function*(){const h=new o(l);return yield h.init(),h})}init(){return t.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(l,h){this.events.on(l,h)}once(l,h){this.events.once(l,h)}off(l,h){this.events.off(l,h)}removeListener(l,h){this.events.removeListener(l,h)}initialize(){return t.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),r.toMiliseconds(this.interval))})}pulse(){this.events.emit(i.HEARTBEAT_EVENTS.pulse)}}return Ro.HeartBeat=o,Ro}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Xa;e.__exportStar(F6(),t),e.__exportStar(X1(),t),e.__exportStar(tp(),t)})(Po);var pt={};/*! *****************************************************************************
|
|
47
47
|
Copyright (c) Microsoft Corporation.
|
|
48
48
|
|
|
49
49
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
57
57
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
58
58
|
PERFORMANCE OF THIS SOFTWARE.
|
|
59
|
-
***************************************************************************** */var $u=function(t,e){return $u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},$u(t,e)};function x6(t,e){$u(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Pu=function(){return Pu=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Pu.apply(this,arguments)};function C6(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function I6(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(o=(i<3?c(o):i>3?c(e,r,o):c(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o}function S6(t,e){return function(r,n){e(r,n,t)}}function D6(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function O6(t,e,r,n){function i(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function l(v){try{d(n.next(v))}catch(E){c(E)}}function h(v){try{d(n.throw(v))}catch(E){c(E)}}function d(v){v.done?o(v.value):i(v.value).then(l,h)}d((n=n.apply(t,e||[])).next())})}function A6(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(v){return h([d,v])}}function h(d){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=d[0]&2?i.return:d[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,d[1])).done)return o;switch(i=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,i=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){r.label=d[1];break}if(d[0]===6&&r.label<o[1]){r.label=o[1],o=d;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(d);break}o[2]&&r.ops.pop(),r.trys.pop();continue}d=e.call(t,r)}catch(v){d=[6,v],i=0}finally{n=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function $6(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function P6(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function Tu(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function q1(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],c;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(l){c={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return o}function T6(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(q1(arguments[e]));return t}function R6(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var o=arguments[e],c=0,l=o.length;c<l;c++,i++)n[i]=o[c];return n}function So(t){return this instanceof So?(this.v=t,this):new So(t)}function N6(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,o=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(_){n[_]&&(i[_]=function(S){return new Promise(function(P,L){o.push([_,S,P,L])>1||l(_,S)})})}function l(_,S){try{h(n[_](S))}catch(P){E(o[0][3],P)}}function h(_){_.value instanceof So?Promise.resolve(_.value.v).then(d,v):E(o[0][2],_)}function d(_){l("next",_)}function v(_){l("throw",_)}function E(_,S){_(S),o.shift(),o.length&&l(o[0][0],o[0][1])}}function M6(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,o){e[i]=t[i]?function(c){return(r=!r)?{value:So(t[i](c)),done:i==="return"}:o?o(c):c}:o}}function L6(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Tu=="function"?Tu(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(c){return new Promise(function(l,h){c=t[o](c),i(l,h,c.done,c.value)})}}function i(o,c,l,h){Promise.resolve(h).then(function(d){o({value:d,done:l})},c)}}function j6(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function U6(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function F6(t){return t&&t.__esModule?t:{default:t}}function B6(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function k6(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}var H6=Object.freeze({__proto__:null,__extends:x6,get __assign(){return Pu},__rest:C6,__decorate:I6,__param:S6,__metadata:D6,__awaiter:O6,__generator:A6,__createBinding:$6,__exportStar:P6,__values:Tu,__read:q1,__spread:T6,__spreadArrays:R6,__await:So,__asyncGenerator:N6,__asyncDelegator:M6,__asyncValues:L6,__makeTemplateObject:j6,__importStar:U6,__importDefault:F6,__classPrivateFieldGet:B6,__classPrivateFieldSet:k6}),z6=Ii(H6),Ru,V1;function W6(){if(V1)return Ru;V1=1;function t(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}Ru=e;function e(r,n,i){var o=i&&i.stringify||t,c=1;if(typeof r=="object"&&r!==null){var l=n.length+c;if(l===1)return r;var h=new Array(l);h[0]=o(r);for(var d=1;d<l;d++)h[d]=o(n[d]);return h.join(" ")}if(typeof r!="string")return r;var v=n.length;if(v===0)return r;for(var E="",_=1-c,S=-1,P=r&&r.length||0,L=0;L<P;){if(r.charCodeAt(L)===37&&L+1<P){switch(S=S>-1?S:0,r.charCodeAt(L+1)){case 100:case 102:if(_>=v||n[_]==null)break;S<L&&(E+=r.slice(S,L)),E+=Number(n[_]),S=L+2,L++;break;case 105:if(_>=v||n[_]==null)break;S<L&&(E+=r.slice(S,L)),E+=Math.floor(Number(n[_])),S=L+2,L++;break;case 79:case 111:case 106:if(_>=v||n[_]===void 0)break;S<L&&(E+=r.slice(S,L));var k=typeof n[_];if(k==="string"){E+="'"+n[_]+"'",S=L+2,L++;break}if(k==="function"){E+=n[_].name||"<anonymous>",S=L+2,L++;break}E+=o(n[_]),S=L+2,L++;break;case 115:if(_>=v)break;S<L&&(E+=r.slice(S,L)),E+=String(n[_]),S=L+2,L++;break;case 37:S<L&&(E+=r.slice(S,L)),E+="%",S=L+2,L++,_--;break}++_}++L}return S===-1?r:(S<P&&(E+=r.slice(S)),E)}return Ru}var Nu,K1;function q6(){if(K1)return Nu;K1=1;const t=W6();Nu=i;const e=R().console||{},r={mapHttpRequest:P,mapHttpResponse:P,wrapRequestSerializer:L,wrapResponseSerializer:L,wrapErrorSerializer:L,req:P,res:P,err:_};function n(C,f){return Array.isArray(C)?C.filter(function(J){return J!=="!stdSerializers.err"}):C===!0?Object.keys(f):!1}function i(C){C=C||{},C.browser=C.browser||{};const f=C.browser.transmit;if(f&&typeof f.send!="function")throw Error("pino: transmit option must have a send function");const x=C.browser.write||e;C.browser.write&&(C.browser.asObject=!0);const J=C.serializers||{},z=n(C.browser.serialize,J);let ee=C.browser.serialize;Array.isArray(C.browser.serialize)&&C.browser.serialize.indexOf("!stdSerializers.err")>-1&&(ee=!1);const de=["error","fatal","warn","info","debug","trace"];typeof x=="function"&&(x.error=x.fatal=x.warn=x.info=x.debug=x.trace=x),C.enabled===!1&&(C.level="silent");const me=C.level||"info",D=Object.create(x);D.log||(D.log=k),Object.defineProperty(D,"levelVal",{get:ae}),Object.defineProperty(D,"level",{get:le,set:re});const U={transmit:f,serialize:z,asObject:C.browser.asObject,levels:de,timestamp:S(C)};D.levels=i.levels,D.level=me,D.setMaxListeners=D.getMaxListeners=D.emit=D.addListener=D.on=D.prependListener=D.once=D.prependOnceListener=D.removeListener=D.removeAllListeners=D.listeners=D.listenerCount=D.eventNames=D.write=D.flush=k,D.serializers=J,D._serialize=z,D._stdErrSerialize=ee,D.child=ne,f&&(D._logEvent=E());function ae(){return this.level==="silent"?1/0:this.levels.values[this.level]}function le(){return this._level}function re(oe){if(oe!=="silent"&&!this.levels.values[oe])throw Error("unknown level "+oe);this._level=oe,o(U,D,"error","log"),o(U,D,"fatal","error"),o(U,D,"warn","error"),o(U,D,"info","log"),o(U,D,"debug","log"),o(U,D,"trace","log")}function ne(oe,ie){if(!oe)throw new Error("missing bindings for child Pino");ie=ie||{},z&&oe.serializers&&(ie.serializers=oe.serializers);const Se=ie.serializers;if(z&&Se){var ge=Object.assign({},J,Se),Ne=C.browser.serialize===!0?Object.keys(ge):z;delete oe.serializers,h([oe],Ne,ge,this._stdErrSerialize)}function be(Ae){this._childLevel=(Ae._childLevel|0)+1,this.error=d(Ae,oe,"error"),this.fatal=d(Ae,oe,"fatal"),this.warn=d(Ae,oe,"warn"),this.info=d(Ae,oe,"info"),this.debug=d(Ae,oe,"debug"),this.trace=d(Ae,oe,"trace"),ge&&(this.serializers=ge,this._serialize=Ne),f&&(this._logEvent=E([].concat(Ae._logEvent.bindings,oe)))}return be.prototype=this,new be(this)}return D}i.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},i.stdSerializers=r,i.stdTimeFunctions=Object.assign({},{nullTime:q,epochTime:T,unixTime:M,isoTime:A});function o(C,f,x,J){const z=Object.getPrototypeOf(f);f[x]=f.levelVal>f.levels.values[x]?k:z[x]?z[x]:e[x]||e[J]||k,c(C,f,x)}function c(C,f,x){!C.transmit&&f[x]===k||(f[x]=function(J){return function(){const ee=C.timestamp(),de=new Array(arguments.length),me=Object.getPrototypeOf&&Object.getPrototypeOf(this)===e?e:this;for(var D=0;D<de.length;D++)de[D]=arguments[D];if(C.serialize&&!C.asObject&&h(de,this._serialize,this.serializers,this._stdErrSerialize),C.asObject?J.call(me,l(this,x,de,ee)):J.apply(me,de),C.transmit){const U=C.transmit.level||f.level,ae=i.levels.values[U],le=i.levels.values[x];if(le<ae)return;v(this,{ts:ee,methodLevel:x,methodValue:le,transmitLevel:U,transmitValue:i.levels.values[C.transmit.level||f.level],send:C.transmit.send,val:f.levelVal},de)}}}(f[x]))}function l(C,f,x,J){C._serialize&&h(x,C._serialize,C.serializers,C._stdErrSerialize);const z=x.slice();let ee=z[0];const de={};J&&(de.time=J),de.level=i.levels.values[f];let me=(C._childLevel|0)+1;if(me<1&&(me=1),ee!==null&&typeof ee=="object"){for(;me--&&typeof z[0]=="object";)Object.assign(de,z.shift());ee=z.length?t(z.shift(),z):void 0}else typeof ee=="string"&&(ee=t(z.shift(),z));return ee!==void 0&&(de.msg=ee),de}function h(C,f,x,J){for(const z in C)if(J&&C[z]instanceof Error)C[z]=i.stdSerializers.err(C[z]);else if(typeof C[z]=="object"&&!Array.isArray(C[z]))for(const ee in C[z])f&&f.indexOf(ee)>-1&&ee in x&&(C[z][ee]=x[ee](C[z][ee]))}function d(C,f,x){return function(){const J=new Array(1+arguments.length);J[0]=f;for(var z=1;z<J.length;z++)J[z]=arguments[z-1];return C[x].apply(this,J)}}function v(C,f,x){const J=f.send,z=f.ts,ee=f.methodLevel,de=f.methodValue,me=f.val,D=C._logEvent.bindings;h(x,C._serialize||Object.keys(C.serializers),C.serializers,C._stdErrSerialize===void 0?!0:C._stdErrSerialize),C._logEvent.ts=z,C._logEvent.messages=x.filter(function(U){return D.indexOf(U)===-1}),C._logEvent.level.label=ee,C._logEvent.level.value=de,J(ee,C._logEvent,me),C._logEvent=E(D)}function E(C){return{ts:0,messages:[],bindings:C||[],level:{label:"",value:0}}}function _(C){const f={type:C.constructor.name,msg:C.message,stack:C.stack};for(const x in C)f[x]===void 0&&(f[x]=C[x]);return f}function S(C){return typeof C.timestamp=="function"?C.timestamp:C.timestamp===!1?q:T}function P(){return{}}function L(C){return C}function k(){}function q(){return!1}function T(){return Date.now()}function M(){return Math.round(Date.now()/1e3)}function A(){return new Date(Date.now()).toISOString()}function R(){function C(f){return typeof f<"u"&&f}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return C(self)||C(window)||C(this)||{}}}return Nu}var Mi={},G1;function Z1(){return G1||(G1=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.PINO_CUSTOM_CONTEXT_KEY=Mi.PINO_LOGGER_DEFAULTS=void 0,Mi.PINO_LOGGER_DEFAULTS={level:"info"},Mi.PINO_CUSTOM_CONTEXT_KEY="custom_context"),Mi}var Ar={},Y1;function V6(){if(Y1)return Ar;Y1=1,Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.generateChildLogger=Ar.formatChildLoggerContext=Ar.getLoggerContext=Ar.setBrowserLoggerContext=Ar.getBrowserLoggerContext=Ar.getDefaultLoggerOptions=void 0;const t=Z1();function e(l){return Object.assign(Object.assign({},l),{level:l?.level||t.PINO_LOGGER_DEFAULTS.level})}Ar.getDefaultLoggerOptions=e;function r(l,h=t.PINO_CUSTOM_CONTEXT_KEY){return l[h]||""}Ar.getBrowserLoggerContext=r;function n(l,h,d=t.PINO_CUSTOM_CONTEXT_KEY){return l[d]=h,l}Ar.setBrowserLoggerContext=n;function i(l,h=t.PINO_CUSTOM_CONTEXT_KEY){let d="";return typeof l.bindings>"u"?d=r(l,h):d=l.bindings().context||"",d}Ar.getLoggerContext=i;function o(l,h,d=t.PINO_CUSTOM_CONTEXT_KEY){const v=i(l,d);return v.trim()?`${v}/${h}`:h}Ar.formatChildLoggerContext=o;function c(l,h,d=t.PINO_CUSTOM_CONTEXT_KEY){const v=o(l,h,d),E=l.child({context:v});return n(E,v,d)}return Ar.generateChildLogger=c,Ar}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.pino=void 0;const e=z6,r=e.__importDefault(q6());Object.defineProperty(t,"pino",{enumerable:!0,get:function(){return r.default}}),e.__exportStar(Z1(),t),e.__exportStar(V6(),t)})(pt);class K6 extends Ri{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class G6 extends Ri{constructor(e,r){super(),this.core=e,this.logger=r,this.records=new Map}}class Z6{constructor(e,r){this.logger=e,this.core=r}}class Y6 extends Ri{constructor(e,r){super(),this.relayer=e,this.logger=r}}class J6 extends Ri{constructor(e){super()}}class X6{constructor(e,r,n,i){this.core=e,this.logger=r,this.name=n}}class Q6 extends Ri{constructor(e,r){super(),this.relayer=e,this.logger=r}}class e4 extends Ri{constructor(e,r){super(),this.core=e,this.logger=r}}class t4{constructor(e,r){this.projectId=e,this.logger=r}}class r4{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}class n4{constructor(e){this.client=e}}const i4=t=>JSON.stringify(t,(e,r)=>typeof r=="bigint"?r.toString()+"n":r),s4=t=>{const e=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,r=t.replace(e,'$1"$2n"$3');return JSON.parse(r,(n,i)=>typeof i=="string"&&i.match(/^\d+n$/)?BigInt(i.substring(0,i.length-1)):i)};function Mu(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return s4(t)}catch{return t}}function Do(t){return typeof t=="string"?t:i4(t)||""}var Lu={},J1={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Qe,r=Kr;t.DIGEST_LENGTH=64,t.BLOCK_SIZE=128;var n=function(){function l(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return l.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},l.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},l.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._tempHi),r.wipe(this._tempLo),this.reset()},l.prototype.update=function(h,d){if(d===void 0&&(d=h.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var v=0;if(this._bytesHashed+=d,this._bufferLength>0){for(;this._bufferLength<t.BLOCK_SIZE&&d>0;)this._buffer[this._bufferLength++]=h[v++],d--;this._bufferLength===this.blockSize&&(o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(d>=this.blockSize&&(v=o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,h,v,d),d%=this.blockSize);d>0;)this._buffer[this._bufferLength++]=h[v++],d--;return this},l.prototype.finish=function(h){if(!this._finished){var d=this._bytesHashed,v=this._bufferLength,E=d/536870912|0,_=d<<3,S=d%128<112?128:256;this._buffer[v]=128;for(var P=v+1;P<S-8;P++)this._buffer[P]=0;e.writeUint32BE(E,this._buffer,S-8),e.writeUint32BE(_,this._buffer,S-4),o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,S),this._finished=!0}for(var P=0;P<this.digestLength/8;P++)e.writeUint32BE(this._stateHi[P],h,P*8),e.writeUint32BE(this._stateLo[P],h,P*8+4);return this},l.prototype.digest=function(){var h=new Uint8Array(this.digestLength);return this.finish(h),h},l.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},l.prototype.restoreState=function(h){return this._stateHi.set(h.stateHi),this._stateLo.set(h.stateLo),this._bufferLength=h.bufferLength,h.buffer&&this._buffer.set(h.buffer),this._bytesHashed=h.bytesHashed,this._finished=!1,this},l.prototype.cleanSavedState=function(h){r.wipe(h.stateHi),r.wipe(h.stateLo),h.buffer&&r.wipe(h.buffer),h.bufferLength=0,h.bytesHashed=0},l}();t.SHA512=n;var i=new Int32Array([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]);function o(l,h,d,v,E,_,S){for(var P=d[0],L=d[1],k=d[2],q=d[3],T=d[4],M=d[5],A=d[6],R=d[7],C=v[0],f=v[1],x=v[2],J=v[3],z=v[4],ee=v[5],de=v[6],me=v[7],D,U,ae,le,re,ne,oe,ie;S>=128;){for(var Se=0;Se<16;Se++){var ge=8*Se+_;l[Se]=e.readUint32BE(E,ge),h[Se]=e.readUint32BE(E,ge+4)}for(var Se=0;Se<80;Se++){var Ne=P,be=L,Ae=k,X=q,Y=T,W=M,w=A,F=R,we=C,ve=f,Pe=x,tt=J,ot=z,qe=ee,At=de,$t=me;if(D=R,U=me,re=U&65535,ne=U>>>16,oe=D&65535,ie=D>>>16,D=(T>>>14|z<<32-14)^(T>>>18|z<<32-18)^(z>>>41-32|T<<32-(41-32)),U=(z>>>14|T<<32-14)^(z>>>18|T<<32-18)^(T>>>41-32|z<<32-(41-32)),re+=U&65535,ne+=U>>>16,oe+=D&65535,ie+=D>>>16,D=T&M^~T&A,U=z&ee^~z&de,re+=U&65535,ne+=U>>>16,oe+=D&65535,ie+=D>>>16,D=i[Se*2],U=i[Se*2+1],re+=U&65535,ne+=U>>>16,oe+=D&65535,ie+=D>>>16,D=l[Se%16],U=h[Se%16],re+=U&65535,ne+=U>>>16,oe+=D&65535,ie+=D>>>16,ne+=re>>>16,oe+=ne>>>16,ie+=oe>>>16,ae=oe&65535|ie<<16,le=re&65535|ne<<16,D=ae,U=le,re=U&65535,ne=U>>>16,oe=D&65535,ie=D>>>16,D=(P>>>28|C<<32-28)^(C>>>34-32|P<<32-(34-32))^(C>>>39-32|P<<32-(39-32)),U=(C>>>28|P<<32-28)^(P>>>34-32|C<<32-(34-32))^(P>>>39-32|C<<32-(39-32)),re+=U&65535,ne+=U>>>16,oe+=D&65535,ie+=D>>>16,D=P&L^P&k^L&k,U=C&f^C&x^f&x,re+=U&65535,ne+=U>>>16,oe+=D&65535,ie+=D>>>16,ne+=re>>>16,oe+=ne>>>16,ie+=oe>>>16,F=oe&65535|ie<<16,$t=re&65535|ne<<16,D=X,U=tt,re=U&65535,ne=U>>>16,oe=D&65535,ie=D>>>16,D=ae,U=le,re+=U&65535,ne+=U>>>16,oe+=D&65535,ie+=D>>>16,ne+=re>>>16,oe+=ne>>>16,ie+=oe>>>16,X=oe&65535|ie<<16,tt=re&65535|ne<<16,L=Ne,k=be,q=Ae,T=X,M=Y,A=W,R=w,P=F,f=we,x=ve,J=Pe,z=tt,ee=ot,de=qe,me=At,C=$t,Se%16===15)for(var ge=0;ge<16;ge++)D=l[ge],U=h[ge],re=U&65535,ne=U>>>16,oe=D&65535,ie=D>>>16,D=l[(ge+9)%16],U=h[(ge+9)%16],re+=U&65535,ne+=U>>>16,oe+=D&65535,ie+=D>>>16,ae=l[(ge+1)%16],le=h[(ge+1)%16],D=(ae>>>1|le<<32-1)^(ae>>>8|le<<32-8)^ae>>>7,U=(le>>>1|ae<<32-1)^(le>>>8|ae<<32-8)^(le>>>7|ae<<32-7),re+=U&65535,ne+=U>>>16,oe+=D&65535,ie+=D>>>16,ae=l[(ge+14)%16],le=h[(ge+14)%16],D=(ae>>>19|le<<32-19)^(le>>>61-32|ae<<32-(61-32))^ae>>>6,U=(le>>>19|ae<<32-19)^(ae>>>61-32|le<<32-(61-32))^(le>>>6|ae<<32-6),re+=U&65535,ne+=U>>>16,oe+=D&65535,ie+=D>>>16,ne+=re>>>16,oe+=ne>>>16,ie+=oe>>>16,l[ge]=oe&65535|ie<<16,h[ge]=re&65535|ne<<16}D=P,U=C,re=U&65535,ne=U>>>16,oe=D&65535,ie=D>>>16,D=d[0],U=v[0],re+=U&65535,ne+=U>>>16,oe+=D&65535,ie+=D>>>16,ne+=re>>>16,oe+=ne>>>16,ie+=oe>>>16,d[0]=P=oe&65535|ie<<16,v[0]=C=re&65535|ne<<16,D=L,U=f,re=U&65535,ne=U>>>16,oe=D&65535,ie=D>>>16,D=d[1],U=v[1],re+=U&65535,ne+=U>>>16,oe+=D&65535,ie+=D>>>16,ne+=re>>>16,oe+=ne>>>16,ie+=oe>>>16,d[1]=L=oe&65535|ie<<16,v[1]=f=re&65535|ne<<16,D=k,U=x,re=U&65535,ne=U>>>16,oe=D&65535,ie=D>>>16,D=d[2],U=v[2],re+=U&65535,ne+=U>>>16,oe+=D&65535,ie+=D>>>16,ne+=re>>>16,oe+=ne>>>16,ie+=oe>>>16,d[2]=k=oe&65535|ie<<16,v[2]=x=re&65535|ne<<16,D=q,U=J,re=U&65535,ne=U>>>16,oe=D&65535,ie=D>>>16,D=d[3],U=v[3],re+=U&65535,ne+=U>>>16,oe+=D&65535,ie+=D>>>16,ne+=re>>>16,oe+=ne>>>16,ie+=oe>>>16,d[3]=q=oe&65535|ie<<16,v[3]=J=re&65535|ne<<16,D=T,U=z,re=U&65535,ne=U>>>16,oe=D&65535,ie=D>>>16,D=d[4],U=v[4],re+=U&65535,ne+=U>>>16,oe+=D&65535,ie+=D>>>16,ne+=re>>>16,oe+=ne>>>16,ie+=oe>>>16,d[4]=T=oe&65535|ie<<16,v[4]=z=re&65535|ne<<16,D=M,U=ee,re=U&65535,ne=U>>>16,oe=D&65535,ie=D>>>16,D=d[5],U=v[5],re+=U&65535,ne+=U>>>16,oe+=D&65535,ie+=D>>>16,ne+=re>>>16,oe+=ne>>>16,ie+=oe>>>16,d[5]=M=oe&65535|ie<<16,v[5]=ee=re&65535|ne<<16,D=A,U=de,re=U&65535,ne=U>>>16,oe=D&65535,ie=D>>>16,D=d[6],U=v[6],re+=U&65535,ne+=U>>>16,oe+=D&65535,ie+=D>>>16,ne+=re>>>16,oe+=ne>>>16,ie+=oe>>>16,d[6]=A=oe&65535|ie<<16,v[6]=de=re&65535|ne<<16,D=R,U=me,re=U&65535,ne=U>>>16,oe=D&65535,ie=D>>>16,D=d[7],U=v[7],re+=U&65535,ne+=U>>>16,oe+=D&65535,ie+=D>>>16,ne+=re>>>16,oe+=ne>>>16,ie+=oe>>>16,d[7]=R=oe&65535|ie<<16,v[7]=me=re&65535|ne<<16,_+=128,S-=128}return _}function c(l){var h=new n;h.update(l);var d=h.digest();return h.clean(),d}t.hash=c})(J1),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertSecretKeyToX25519=t.convertPublicKeyToX25519=t.verify=t.sign=t.extractPublicKeyFromSecretKey=t.generateKeyPair=t.generateKeyPairFromSeed=t.SEED_LENGTH=t.SECRET_KEY_LENGTH=t.PUBLIC_KEY_LENGTH=t.SIGNATURE_LENGTH=void 0;const e=gs,r=J1,n=Kr;t.SIGNATURE_LENGTH=64,t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=64,t.SEED_LENGTH=32;function i(X){const Y=new Float64Array(16);if(X)for(let W=0;W<X.length;W++)Y[W]=X[W];return Y}const o=new Uint8Array(32);o[0]=9;const c=i(),l=i([1]),h=i([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),d=i([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),v=i([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),E=i([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),_=i([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function S(X,Y){for(let W=0;W<16;W++)X[W]=Y[W]|0}function P(X){let Y=1;for(let W=0;W<16;W++){let w=X[W]+Y+65535;Y=Math.floor(w/65536),X[W]=w-Y*65536}X[0]+=Y-1+37*(Y-1)}function L(X,Y,W){const w=~(W-1);for(let F=0;F<16;F++){const we=w&(X[F]^Y[F]);X[F]^=we,Y[F]^=we}}function k(X,Y){const W=i(),w=i();for(let F=0;F<16;F++)w[F]=Y[F];P(w),P(w),P(w);for(let F=0;F<2;F++){W[0]=w[0]-65517;for(let ve=1;ve<15;ve++)W[ve]=w[ve]-65535-(W[ve-1]>>16&1),W[ve-1]&=65535;W[15]=w[15]-32767-(W[14]>>16&1);const we=W[15]>>16&1;W[14]&=65535,L(w,W,1-we)}for(let F=0;F<16;F++)X[2*F]=w[F]&255,X[2*F+1]=w[F]>>8}function q(X,Y){let W=0;for(let w=0;w<32;w++)W|=X[w]^Y[w];return(1&W-1>>>8)-1}function T(X,Y){const W=new Uint8Array(32),w=new Uint8Array(32);return k(W,X),k(w,Y),q(W,w)}function M(X){const Y=new Uint8Array(32);return k(Y,X),Y[0]&1}function A(X,Y){for(let W=0;W<16;W++)X[W]=Y[2*W]+(Y[2*W+1]<<8);X[15]&=32767}function R(X,Y,W){for(let w=0;w<16;w++)X[w]=Y[w]+W[w]}function C(X,Y,W){for(let w=0;w<16;w++)X[w]=Y[w]-W[w]}function f(X,Y,W){let w,F,we=0,ve=0,Pe=0,tt=0,ot=0,qe=0,At=0,$t=0,Ye=0,je=0,Me=0,ze=0,et=0,Te=0,Ve=0,b=0,p=0,m=0,$=0,B=0,G=0,Q=0,xe=0,Oe=0,it=0,ut=0,ct=0,Rr=0,Wn=0,pi=0,es=0,kt=W[0],Mt=W[1],Ht=W[2],zt=W[3],Ut=W[4],Lt=W[5],er=W[6],tr=W[7],Wt=W[8],rr=W[9],qt=W[10],Zt=W[11],Vt=W[12],Pt=W[13],nr=W[14],ir=W[15];w=Y[0],we+=w*kt,ve+=w*Mt,Pe+=w*Ht,tt+=w*zt,ot+=w*Ut,qe+=w*Lt,At+=w*er,$t+=w*tr,Ye+=w*Wt,je+=w*rr,Me+=w*qt,ze+=w*Zt,et+=w*Vt,Te+=w*Pt,Ve+=w*nr,b+=w*ir,w=Y[1],ve+=w*kt,Pe+=w*Mt,tt+=w*Ht,ot+=w*zt,qe+=w*Ut,At+=w*Lt,$t+=w*er,Ye+=w*tr,je+=w*Wt,Me+=w*rr,ze+=w*qt,et+=w*Zt,Te+=w*Vt,Ve+=w*Pt,b+=w*nr,p+=w*ir,w=Y[2],Pe+=w*kt,tt+=w*Mt,ot+=w*Ht,qe+=w*zt,At+=w*Ut,$t+=w*Lt,Ye+=w*er,je+=w*tr,Me+=w*Wt,ze+=w*rr,et+=w*qt,Te+=w*Zt,Ve+=w*Vt,b+=w*Pt,p+=w*nr,m+=w*ir,w=Y[3],tt+=w*kt,ot+=w*Mt,qe+=w*Ht,At+=w*zt,$t+=w*Ut,Ye+=w*Lt,je+=w*er,Me+=w*tr,ze+=w*Wt,et+=w*rr,Te+=w*qt,Ve+=w*Zt,b+=w*Vt,p+=w*Pt,m+=w*nr,$+=w*ir,w=Y[4],ot+=w*kt,qe+=w*Mt,At+=w*Ht,$t+=w*zt,Ye+=w*Ut,je+=w*Lt,Me+=w*er,ze+=w*tr,et+=w*Wt,Te+=w*rr,Ve+=w*qt,b+=w*Zt,p+=w*Vt,m+=w*Pt,$+=w*nr,B+=w*ir,w=Y[5],qe+=w*kt,At+=w*Mt,$t+=w*Ht,Ye+=w*zt,je+=w*Ut,Me+=w*Lt,ze+=w*er,et+=w*tr,Te+=w*Wt,Ve+=w*rr,b+=w*qt,p+=w*Zt,m+=w*Vt,$+=w*Pt,B+=w*nr,G+=w*ir,w=Y[6],At+=w*kt,$t+=w*Mt,Ye+=w*Ht,je+=w*zt,Me+=w*Ut,ze+=w*Lt,et+=w*er,Te+=w*tr,Ve+=w*Wt,b+=w*rr,p+=w*qt,m+=w*Zt,$+=w*Vt,B+=w*Pt,G+=w*nr,Q+=w*ir,w=Y[7],$t+=w*kt,Ye+=w*Mt,je+=w*Ht,Me+=w*zt,ze+=w*Ut,et+=w*Lt,Te+=w*er,Ve+=w*tr,b+=w*Wt,p+=w*rr,m+=w*qt,$+=w*Zt,B+=w*Vt,G+=w*Pt,Q+=w*nr,xe+=w*ir,w=Y[8],Ye+=w*kt,je+=w*Mt,Me+=w*Ht,ze+=w*zt,et+=w*Ut,Te+=w*Lt,Ve+=w*er,b+=w*tr,p+=w*Wt,m+=w*rr,$+=w*qt,B+=w*Zt,G+=w*Vt,Q+=w*Pt,xe+=w*nr,Oe+=w*ir,w=Y[9],je+=w*kt,Me+=w*Mt,ze+=w*Ht,et+=w*zt,Te+=w*Ut,Ve+=w*Lt,b+=w*er,p+=w*tr,m+=w*Wt,$+=w*rr,B+=w*qt,G+=w*Zt,Q+=w*Vt,xe+=w*Pt,Oe+=w*nr,it+=w*ir,w=Y[10],Me+=w*kt,ze+=w*Mt,et+=w*Ht,Te+=w*zt,Ve+=w*Ut,b+=w*Lt,p+=w*er,m+=w*tr,$+=w*Wt,B+=w*rr,G+=w*qt,Q+=w*Zt,xe+=w*Vt,Oe+=w*Pt,it+=w*nr,ut+=w*ir,w=Y[11],ze+=w*kt,et+=w*Mt,Te+=w*Ht,Ve+=w*zt,b+=w*Ut,p+=w*Lt,m+=w*er,$+=w*tr,B+=w*Wt,G+=w*rr,Q+=w*qt,xe+=w*Zt,Oe+=w*Vt,it+=w*Pt,ut+=w*nr,ct+=w*ir,w=Y[12],et+=w*kt,Te+=w*Mt,Ve+=w*Ht,b+=w*zt,p+=w*Ut,m+=w*Lt,$+=w*er,B+=w*tr,G+=w*Wt,Q+=w*rr,xe+=w*qt,Oe+=w*Zt,it+=w*Vt,ut+=w*Pt,ct+=w*nr,Rr+=w*ir,w=Y[13],Te+=w*kt,Ve+=w*Mt,b+=w*Ht,p+=w*zt,m+=w*Ut,$+=w*Lt,B+=w*er,G+=w*tr,Q+=w*Wt,xe+=w*rr,Oe+=w*qt,it+=w*Zt,ut+=w*Vt,ct+=w*Pt,Rr+=w*nr,Wn+=w*ir,w=Y[14],Ve+=w*kt,b+=w*Mt,p+=w*Ht,m+=w*zt,$+=w*Ut,B+=w*Lt,G+=w*er,Q+=w*tr,xe+=w*Wt,Oe+=w*rr,it+=w*qt,ut+=w*Zt,ct+=w*Vt,Rr+=w*Pt,Wn+=w*nr,pi+=w*ir,w=Y[15],b+=w*kt,p+=w*Mt,m+=w*Ht,$+=w*zt,B+=w*Ut,G+=w*Lt,Q+=w*er,xe+=w*tr,Oe+=w*Wt,it+=w*rr,ut+=w*qt,ct+=w*Zt,Rr+=w*Vt,Wn+=w*Pt,pi+=w*nr,es+=w*ir,we+=38*p,ve+=38*m,Pe+=38*$,tt+=38*B,ot+=38*G,qe+=38*Q,At+=38*xe,$t+=38*Oe,Ye+=38*it,je+=38*ut,Me+=38*ct,ze+=38*Rr,et+=38*Wn,Te+=38*pi,Ve+=38*es,F=1,w=we+F+65535,F=Math.floor(w/65536),we=w-F*65536,w=ve+F+65535,F=Math.floor(w/65536),ve=w-F*65536,w=Pe+F+65535,F=Math.floor(w/65536),Pe=w-F*65536,w=tt+F+65535,F=Math.floor(w/65536),tt=w-F*65536,w=ot+F+65535,F=Math.floor(w/65536),ot=w-F*65536,w=qe+F+65535,F=Math.floor(w/65536),qe=w-F*65536,w=At+F+65535,F=Math.floor(w/65536),At=w-F*65536,w=$t+F+65535,F=Math.floor(w/65536),$t=w-F*65536,w=Ye+F+65535,F=Math.floor(w/65536),Ye=w-F*65536,w=je+F+65535,F=Math.floor(w/65536),je=w-F*65536,w=Me+F+65535,F=Math.floor(w/65536),Me=w-F*65536,w=ze+F+65535,F=Math.floor(w/65536),ze=w-F*65536,w=et+F+65535,F=Math.floor(w/65536),et=w-F*65536,w=Te+F+65535,F=Math.floor(w/65536),Te=w-F*65536,w=Ve+F+65535,F=Math.floor(w/65536),Ve=w-F*65536,w=b+F+65535,F=Math.floor(w/65536),b=w-F*65536,we+=F-1+37*(F-1),F=1,w=we+F+65535,F=Math.floor(w/65536),we=w-F*65536,w=ve+F+65535,F=Math.floor(w/65536),ve=w-F*65536,w=Pe+F+65535,F=Math.floor(w/65536),Pe=w-F*65536,w=tt+F+65535,F=Math.floor(w/65536),tt=w-F*65536,w=ot+F+65535,F=Math.floor(w/65536),ot=w-F*65536,w=qe+F+65535,F=Math.floor(w/65536),qe=w-F*65536,w=At+F+65535,F=Math.floor(w/65536),At=w-F*65536,w=$t+F+65535,F=Math.floor(w/65536),$t=w-F*65536,w=Ye+F+65535,F=Math.floor(w/65536),Ye=w-F*65536,w=je+F+65535,F=Math.floor(w/65536),je=w-F*65536,w=Me+F+65535,F=Math.floor(w/65536),Me=w-F*65536,w=ze+F+65535,F=Math.floor(w/65536),ze=w-F*65536,w=et+F+65535,F=Math.floor(w/65536),et=w-F*65536,w=Te+F+65535,F=Math.floor(w/65536),Te=w-F*65536,w=Ve+F+65535,F=Math.floor(w/65536),Ve=w-F*65536,w=b+F+65535,F=Math.floor(w/65536),b=w-F*65536,we+=F-1+37*(F-1),X[0]=we,X[1]=ve,X[2]=Pe,X[3]=tt,X[4]=ot,X[5]=qe,X[6]=At,X[7]=$t,X[8]=Ye,X[9]=je,X[10]=Me,X[11]=ze,X[12]=et,X[13]=Te,X[14]=Ve,X[15]=b}function x(X,Y){f(X,Y,Y)}function J(X,Y){const W=i();let w;for(w=0;w<16;w++)W[w]=Y[w];for(w=253;w>=0;w--)x(W,W),w!==2&&w!==4&&f(W,W,Y);for(w=0;w<16;w++)X[w]=W[w]}function z(X,Y){const W=i();let w;for(w=0;w<16;w++)W[w]=Y[w];for(w=250;w>=0;w--)x(W,W),w!==1&&f(W,W,Y);for(w=0;w<16;w++)X[w]=W[w]}function ee(X,Y){const W=i(),w=i(),F=i(),we=i(),ve=i(),Pe=i(),tt=i(),ot=i(),qe=i();C(W,X[1],X[0]),C(qe,Y[1],Y[0]),f(W,W,qe),R(w,X[0],X[1]),R(qe,Y[0],Y[1]),f(w,w,qe),f(F,X[3],Y[3]),f(F,F,d),f(we,X[2],Y[2]),R(we,we,we),C(ve,w,W),C(Pe,we,F),R(tt,we,F),R(ot,w,W),f(X[0],ve,Pe),f(X[1],ot,tt),f(X[2],tt,Pe),f(X[3],ve,ot)}function de(X,Y,W){for(let w=0;w<4;w++)L(X[w],Y[w],W)}function me(X,Y){const W=i(),w=i(),F=i();J(F,Y[2]),f(W,Y[0],F),f(w,Y[1],F),k(X,w),X[31]^=M(W)<<7}function D(X,Y,W){S(X[0],c),S(X[1],l),S(X[2],l),S(X[3],c);for(let w=255;w>=0;--w){const F=W[w/8|0]>>(w&7)&1;de(X,Y,F),ee(Y,X),ee(X,X),de(X,Y,F)}}function U(X,Y){const W=[i(),i(),i(),i()];S(W[0],v),S(W[1],E),S(W[2],l),f(W[3],v,E),D(X,W,Y)}function ae(X){if(X.length!==t.SEED_LENGTH)throw new Error(`ed25519: seed must be ${t.SEED_LENGTH} bytes`);const Y=(0,r.hash)(X);Y[0]&=248,Y[31]&=127,Y[31]|=64;const W=new Uint8Array(32),w=[i(),i(),i(),i()];U(w,Y),me(W,w);const F=new Uint8Array(64);return F.set(X),F.set(W,32),{publicKey:W,secretKey:F}}t.generateKeyPairFromSeed=ae;function le(X){const Y=(0,e.randomBytes)(32,X),W=ae(Y);return(0,n.wipe)(Y),W}t.generateKeyPair=le;function re(X){if(X.length!==t.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${t.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(X.subarray(32))}t.extractPublicKeyFromSecretKey=re;const ne=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function oe(X,Y){let W,w,F,we;for(w=63;w>=32;--w){for(W=0,F=w-32,we=w-12;F<we;++F)Y[F]+=W-16*Y[w]*ne[F-(w-32)],W=Math.floor((Y[F]+128)/256),Y[F]-=W*256;Y[F]+=W,Y[w]=0}for(W=0,F=0;F<32;F++)Y[F]+=W-(Y[31]>>4)*ne[F],W=Y[F]>>8,Y[F]&=255;for(F=0;F<32;F++)Y[F]-=W*ne[F];for(w=0;w<32;w++)Y[w+1]+=Y[w]>>8,X[w]=Y[w]&255}function ie(X){const Y=new Float64Array(64);for(let W=0;W<64;W++)Y[W]=X[W];for(let W=0;W<64;W++)X[W]=0;oe(X,Y)}function Se(X,Y){const W=new Float64Array(64),w=[i(),i(),i(),i()],F=(0,r.hash)(X.subarray(0,32));F[0]&=248,F[31]&=127,F[31]|=64;const we=new Uint8Array(64);we.set(F.subarray(32),32);const ve=new r.SHA512;ve.update(we.subarray(32)),ve.update(Y);const Pe=ve.digest();ve.clean(),ie(Pe),U(w,Pe),me(we,w),ve.reset(),ve.update(we.subarray(0,32)),ve.update(X.subarray(32)),ve.update(Y);const tt=ve.digest();ie(tt);for(let ot=0;ot<32;ot++)W[ot]=Pe[ot];for(let ot=0;ot<32;ot++)for(let qe=0;qe<32;qe++)W[ot+qe]+=tt[ot]*F[qe];return oe(we.subarray(32),W),we}t.sign=Se;function ge(X,Y){const W=i(),w=i(),F=i(),we=i(),ve=i(),Pe=i(),tt=i();return S(X[2],l),A(X[1],Y),x(F,X[1]),f(we,F,h),C(F,F,X[2]),R(we,X[2],we),x(ve,we),x(Pe,ve),f(tt,Pe,ve),f(W,tt,F),f(W,W,we),z(W,W),f(W,W,F),f(W,W,we),f(W,W,we),f(X[0],W,we),x(w,X[0]),f(w,w,we),T(w,F)&&f(X[0],X[0],_),x(w,X[0]),f(w,w,we),T(w,F)?-1:(M(X[0])===Y[31]>>7&&C(X[0],c,X[0]),f(X[3],X[0],X[1]),0)}function Ne(X,Y,W){const w=new Uint8Array(32),F=[i(),i(),i(),i()],we=[i(),i(),i(),i()];if(W.length!==t.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${t.SIGNATURE_LENGTH} bytes`);if(ge(we,X))return!1;const ve=new r.SHA512;ve.update(W.subarray(0,32)),ve.update(X),ve.update(Y);const Pe=ve.digest();return ie(Pe),D(F,we,Pe),U(we,W.subarray(32)),ee(F,we),me(w,F),!q(W,w)}t.verify=Ne;function be(X){let Y=[i(),i(),i(),i()];if(ge(Y,X))throw new Error("Ed25519: invalid public key");let W=i(),w=i(),F=Y[1];R(W,l,F),C(w,l,F),J(w,w),f(W,W,w);let we=new Uint8Array(32);return k(we,W),we}t.convertPublicKeyToX25519=be;function Ae(X){const Y=(0,r.hash)(X.subarray(0,32));Y[0]&=248,Y[31]&=127,Y[31]|=64;const W=new Uint8Array(Y.subarray(0,32));return(0,n.wipe)(Y),W}t.convertSecretKeyToX25519=Ae}(Lu);const o4="EdDSA",a4="JWT",X1=".",Q1="base64url",c4="utf8",l4="utf8",u4=":",h4="did",f4="key",ep="base58btc",d4="z",p4="K36",g4=32;function qa(t){return Sr(Ur(Do(t),c4),Q1)}function tp(t){const e=Ur(p4,ep),r=d4+Sr(Yl([e,t]),ep);return[h4,f4,r].join(u4)}function m4(t){return Sr(t,Q1)}function w4(t){return Ur([qa(t.header),qa(t.payload)].join(X1),l4)}function v4(t){return[qa(t.header),qa(t.payload),m4(t.signature)].join(X1)}function rp(t=gs.randomBytes(g4)){return Lu.generateKeyPairFromSeed(t)}async function y4(t,e,r,n,i=Le.fromMiliseconds(Date.now())){const o={alg:o4,typ:a4},c=tp(n.publicKey),l=i+r,h={iss:c,sub:t,aud:e,iat:i,exp:l},d=w4({header:o,payload:h}),v=Lu.sign(n.secretKey,d);return v4({header:o,payload:h,signature:v})}const b4="PARSE_ERROR",_4="INVALID_REQUEST",E4="METHOD_NOT_FOUND",x4="INVALID_PARAMS",np="INTERNAL_ERROR",ju="SERVER_ERROR",C4=[-32700,-32600,-32601,-32602,-32603],Oo={[b4]:{code:-32700,message:"Parse error"},[_4]:{code:-32600,message:"Invalid Request"},[E4]:{code:-32601,message:"Method not found"},[x4]:{code:-32602,message:"Invalid params"},[np]:{code:-32603,message:"Internal error"},[ju]:{code:-32e3,message:"Server error"}},ip=ju;function I4(t){return C4.includes(t)}function sp(t){return Object.keys(Oo).includes(t)?Oo[t]:Oo[ip]}function S4(t){const e=Object.values(Oo).find(r=>r.code===t);return e||Oo[ip]}function op(t,e,r){return t.message.includes("getaddrinfo ENOTFOUND")||t.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${e}`):t}var ap={};/*! *****************************************************************************
|
|
59
|
+
***************************************************************************** */var ku=function(t,e){return ku=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},ku(t,e)};function B6(t,e){ku(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Hu=function(){return Hu=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Hu.apply(this,arguments)};function k6(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function H6(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(o=(i<3?c(o):i>3?c(e,r,o):c(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o}function z6(t,e){return function(r,n){e(r,n,t)}}function W6(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function q6(t,e,r,n){function i(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function l(v){try{d(n.next(v))}catch(E){c(E)}}function h(v){try{d(n.throw(v))}catch(E){c(E)}}function d(v){v.done?o(v.value):i(v.value).then(l,h)}d((n=n.apply(t,e||[])).next())})}function V6(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(v){return h([d,v])}}function h(d){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=d[0]&2?i.return:d[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,d[1])).done)return o;switch(i=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,i=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){r.label=d[1];break}if(d[0]===6&&r.label<o[1]){r.label=o[1],o=d;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(d);break}o[2]&&r.ops.pop(),r.trys.pop();continue}d=e.call(t,r)}catch(v){d=[6,v],i=0}finally{n=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function K6(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function G6(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function zu(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function np(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],c;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(l){c={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return o}function Z6(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(np(arguments[e]));return t}function Y6(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var o=arguments[e],c=0,l=o.length;c<l;c++,i++)n[i]=o[c];return n}function Lo(t){return this instanceof Lo?(this.v=t,this):new Lo(t)}function J6(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,o=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(_){n[_]&&(i[_]=function(O){return new Promise(function(P,U){o.push([_,O,P,U])>1||l(_,O)})})}function l(_,O){try{h(n[_](O))}catch(P){E(o[0][3],P)}}function h(_){_.value instanceof Lo?Promise.resolve(_.value.v).then(d,v):E(o[0][2],_)}function d(_){l("next",_)}function v(_){l("throw",_)}function E(_,O){_(O),o.shift(),o.length&&l(o[0][0],o[0][1])}}function X6(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,o){e[i]=t[i]?function(c){return(r=!r)?{value:Lo(t[i](c)),done:i==="return"}:o?o(c):c}:o}}function Q6(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof zu=="function"?zu(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(c){return new Promise(function(l,h){c=t[o](c),i(l,h,c.done,c.value)})}}function i(o,c,l,h){Promise.resolve(h).then(function(d){o({value:d,done:l})},c)}}function e4(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function t4(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function r4(t){return t&&t.__esModule?t:{default:t}}function n4(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function i4(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}var s4=Object.freeze({__proto__:null,__extends:B6,get __assign(){return Hu},__rest:k6,__decorate:H6,__param:z6,__metadata:W6,__awaiter:q6,__generator:V6,__createBinding:K6,__exportStar:G6,__values:zu,__read:np,__spread:Z6,__spreadArrays:Y6,__await:Lo,__asyncGenerator:J6,__asyncDelegator:X6,__asyncValues:Q6,__makeTemplateObject:e4,__importStar:t4,__importDefault:r4,__classPrivateFieldGet:n4,__classPrivateFieldSet:i4}),o4=Li(s4),Wu,ip;function a4(){if(ip)return Wu;ip=1;function t(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}Wu=e;function e(r,n,i){var o=i&&i.stringify||t,c=1;if(typeof r=="object"&&r!==null){var l=n.length+c;if(l===1)return r;var h=new Array(l);h[0]=o(r);for(var d=1;d<l;d++)h[d]=o(n[d]);return h.join(" ")}if(typeof r!="string")return r;var v=n.length;if(v===0)return r;for(var E="",_=1-c,O=-1,P=r&&r.length||0,U=0;U<P;){if(r.charCodeAt(U)===37&&U+1<P){switch(O=O>-1?O:0,r.charCodeAt(U+1)){case 100:case 102:if(_>=v||n[_]==null)break;O<U&&(E+=r.slice(O,U)),E+=Number(n[_]),O=U+2,U++;break;case 105:if(_>=v||n[_]==null)break;O<U&&(E+=r.slice(O,U)),E+=Math.floor(Number(n[_])),O=U+2,U++;break;case 79:case 111:case 106:if(_>=v||n[_]===void 0)break;O<U&&(E+=r.slice(O,U));var H=typeof n[_];if(H==="string"){E+="'"+n[_]+"'",O=U+2,U++;break}if(H==="function"){E+=n[_].name||"<anonymous>",O=U+2,U++;break}E+=o(n[_]),O=U+2,U++;break;case 115:if(_>=v)break;O<U&&(E+=r.slice(O,U)),E+=String(n[_]),O=U+2,U++;break;case 37:O<U&&(E+=r.slice(O,U)),E+="%",O=U+2,U++,_--;break}++_}++U}return O===-1?r:(O<P&&(E+=r.slice(O)),E)}return Wu}var qu,sp;function c4(){if(sp)return qu;sp=1;const t=a4();qu=i;const e=T().console||{},r={mapHttpRequest:P,mapHttpResponse:P,wrapRequestSerializer:U,wrapResponseSerializer:U,wrapErrorSerializer:U,req:P,res:P,err:_};function n(I,f){return Array.isArray(I)?I.filter(function(J){return J!=="!stdSerializers.err"}):I===!0?Object.keys(f):!1}function i(I){I=I||{},I.browser=I.browser||{};const f=I.browser.transmit;if(f&&typeof f.send!="function")throw Error("pino: transmit option must have a send function");const x=I.browser.write||e;I.browser.write&&(I.browser.asObject=!0);const J=I.serializers||{},z=n(I.browser.serialize,J);let ee=I.browser.serialize;Array.isArray(I.browser.serialize)&&I.browser.serialize.indexOf("!stdSerializers.err")>-1&&(ee=!1);const de=["error","fatal","warn","info","debug","trace"];typeof x=="function"&&(x.error=x.fatal=x.warn=x.info=x.debug=x.trace=x),I.enabled===!1&&(I.level="silent");const me=I.level||"info",S=Object.create(x);S.log||(S.log=H),Object.defineProperty(S,"levelVal",{get:ce}),Object.defineProperty(S,"level",{get:le,set:re});const j={transmit:f,serialize:z,asObject:I.browser.asObject,levels:de,timestamp:O(I)};S.levels=i.levels,S.level=me,S.setMaxListeners=S.getMaxListeners=S.emit=S.addListener=S.on=S.prependListener=S.once=S.prependOnceListener=S.removeListener=S.removeAllListeners=S.listeners=S.listenerCount=S.eventNames=S.write=S.flush=H,S.serializers=J,S._serialize=z,S._stdErrSerialize=ee,S.child=ne,f&&(S._logEvent=E());function ce(){return this.level==="silent"?1/0:this.levels.values[this.level]}function le(){return this._level}function re(ae){if(ae!=="silent"&&!this.levels.values[ae])throw Error("unknown level "+ae);this._level=ae,o(j,S,"error","log"),o(j,S,"fatal","error"),o(j,S,"warn","error"),o(j,S,"info","log"),o(j,S,"debug","log"),o(j,S,"trace","log")}function ne(ae,ie){if(!ae)throw new Error("missing bindings for child Pino");ie=ie||{},z&&ae.serializers&&(ie.serializers=ae.serializers);const De=ie.serializers;if(z&&De){var ge=Object.assign({},J,De),Fe=I.browser.serialize===!0?Object.keys(ge):z;delete ae.serializers,h([ae],Fe,ge,this._stdErrSerialize)}function ye(Le){this._childLevel=(Le._childLevel|0)+1,this.error=d(Le,ae,"error"),this.fatal=d(Le,ae,"fatal"),this.warn=d(Le,ae,"warn"),this.info=d(Le,ae,"info"),this.debug=d(Le,ae,"debug"),this.trace=d(Le,ae,"trace"),ge&&(this.serializers=ge,this._serialize=Fe),f&&(this._logEvent=E([].concat(Le._logEvent.bindings,ae)))}return ye.prototype=this,new ye(this)}return S}i.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},i.stdSerializers=r,i.stdTimeFunctions=Object.assign({},{nullTime:G,epochTime:N,unixTime:L,isoTime:$});function o(I,f,x,J){const z=Object.getPrototypeOf(f);f[x]=f.levelVal>f.levels.values[x]?H:z[x]?z[x]:e[x]||e[J]||H,c(I,f,x)}function c(I,f,x){!I.transmit&&f[x]===H||(f[x]=function(J){return function(){const ee=I.timestamp(),de=new Array(arguments.length),me=Object.getPrototypeOf&&Object.getPrototypeOf(this)===e?e:this;for(var S=0;S<de.length;S++)de[S]=arguments[S];if(I.serialize&&!I.asObject&&h(de,this._serialize,this.serializers,this._stdErrSerialize),I.asObject?J.call(me,l(this,x,de,ee)):J.apply(me,de),I.transmit){const j=I.transmit.level||f.level,ce=i.levels.values[j],le=i.levels.values[x];if(le<ce)return;v(this,{ts:ee,methodLevel:x,methodValue:le,transmitLevel:j,transmitValue:i.levels.values[I.transmit.level||f.level],send:I.transmit.send,val:f.levelVal},de)}}}(f[x]))}function l(I,f,x,J){I._serialize&&h(x,I._serialize,I.serializers,I._stdErrSerialize);const z=x.slice();let ee=z[0];const de={};J&&(de.time=J),de.level=i.levels.values[f];let me=(I._childLevel|0)+1;if(me<1&&(me=1),ee!==null&&typeof ee=="object"){for(;me--&&typeof z[0]=="object";)Object.assign(de,z.shift());ee=z.length?t(z.shift(),z):void 0}else typeof ee=="string"&&(ee=t(z.shift(),z));return ee!==void 0&&(de.msg=ee),de}function h(I,f,x,J){for(const z in I)if(J&&I[z]instanceof Error)I[z]=i.stdSerializers.err(I[z]);else if(typeof I[z]=="object"&&!Array.isArray(I[z]))for(const ee in I[z])f&&f.indexOf(ee)>-1&&ee in x&&(I[z][ee]=x[ee](I[z][ee]))}function d(I,f,x){return function(){const J=new Array(1+arguments.length);J[0]=f;for(var z=1;z<J.length;z++)J[z]=arguments[z-1];return I[x].apply(this,J)}}function v(I,f,x){const J=f.send,z=f.ts,ee=f.methodLevel,de=f.methodValue,me=f.val,S=I._logEvent.bindings;h(x,I._serialize||Object.keys(I.serializers),I.serializers,I._stdErrSerialize===void 0?!0:I._stdErrSerialize),I._logEvent.ts=z,I._logEvent.messages=x.filter(function(j){return S.indexOf(j)===-1}),I._logEvent.level.label=ee,I._logEvent.level.value=de,J(ee,I._logEvent,me),I._logEvent=E(S)}function E(I){return{ts:0,messages:[],bindings:I||[],level:{label:"",value:0}}}function _(I){const f={type:I.constructor.name,msg:I.message,stack:I.stack};for(const x in I)f[x]===void 0&&(f[x]=I[x]);return f}function O(I){return typeof I.timestamp=="function"?I.timestamp:I.timestamp===!1?G:N}function P(){return{}}function U(I){return I}function H(){}function G(){return!1}function N(){return Date.now()}function L(){return Math.round(Date.now()/1e3)}function $(){return new Date(Date.now()).toISOString()}function T(){function I(f){return typeof f<"u"&&f}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return I(self)||I(window)||I(this)||{}}}return qu}var Wi={},op;function ap(){return op||(op=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.PINO_CUSTOM_CONTEXT_KEY=Wi.PINO_LOGGER_DEFAULTS=void 0,Wi.PINO_LOGGER_DEFAULTS={level:"info"},Wi.PINO_CUSTOM_CONTEXT_KEY="custom_context"),Wi}var Pr={},cp;function l4(){if(cp)return Pr;cp=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.generateChildLogger=Pr.formatChildLoggerContext=Pr.getLoggerContext=Pr.setBrowserLoggerContext=Pr.getBrowserLoggerContext=Pr.getDefaultLoggerOptions=void 0;const t=ap();function e(l){return Object.assign(Object.assign({},l),{level:l?.level||t.PINO_LOGGER_DEFAULTS.level})}Pr.getDefaultLoggerOptions=e;function r(l,h=t.PINO_CUSTOM_CONTEXT_KEY){return l[h]||""}Pr.getBrowserLoggerContext=r;function n(l,h,d=t.PINO_CUSTOM_CONTEXT_KEY){return l[d]=h,l}Pr.setBrowserLoggerContext=n;function i(l,h=t.PINO_CUSTOM_CONTEXT_KEY){let d="";return typeof l.bindings>"u"?d=r(l,h):d=l.bindings().context||"",d}Pr.getLoggerContext=i;function o(l,h,d=t.PINO_CUSTOM_CONTEXT_KEY){const v=i(l,d);return v.trim()?`${v}/${h}`:h}Pr.formatChildLoggerContext=o;function c(l,h,d=t.PINO_CUSTOM_CONTEXT_KEY){const v=o(l,h,d),E=l.child({context:v});return n(E,v,d)}return Pr.generateChildLogger=c,Pr}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.pino=void 0;const e=o4,r=e.__importDefault(c4());Object.defineProperty(t,"pino",{enumerable:!0,get:function(){return r.default}}),e.__exportStar(ap(),t),e.__exportStar(l4(),t)})(pt);class u4 extends Hi{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class h4 extends Hi{constructor(e,r){super(),this.core=e,this.logger=r,this.records=new Map}}class f4{constructor(e,r){this.logger=e,this.core=r}}class d4 extends Hi{constructor(e,r){super(),this.relayer=e,this.logger=r}}class p4 extends Hi{constructor(e){super()}}class g4{constructor(e,r,n,i){this.core=e,this.logger=r,this.name=n}}class m4 extends Hi{constructor(e,r){super(),this.relayer=e,this.logger=r}}class w4 extends Hi{constructor(e,r){super(),this.core=e,this.logger=r}}class v4{constructor(e,r){this.projectId=e,this.logger=r}}class y4{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}class b4{constructor(e){this.client=e}}const _4=t=>JSON.stringify(t,(e,r)=>typeof r=="bigint"?r.toString()+"n":r),E4=t=>{const e=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,r=t.replace(e,'$1"$2n"$3');return JSON.parse(r,(n,i)=>typeof i=="string"&&i.match(/^\d+n$/)?BigInt(i.substring(0,i.length-1)):i)};function Vu(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return E4(t)}catch{return t}}function Mo(t){return typeof t=="string"?t:_4(t)||""}var Ku={},lp={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=et,r=Zr;t.DIGEST_LENGTH=64,t.BLOCK_SIZE=128;var n=function(){function l(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return l.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},l.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},l.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._tempHi),r.wipe(this._tempLo),this.reset()},l.prototype.update=function(h,d){if(d===void 0&&(d=h.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var v=0;if(this._bytesHashed+=d,this._bufferLength>0){for(;this._bufferLength<t.BLOCK_SIZE&&d>0;)this._buffer[this._bufferLength++]=h[v++],d--;this._bufferLength===this.blockSize&&(o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(d>=this.blockSize&&(v=o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,h,v,d),d%=this.blockSize);d>0;)this._buffer[this._bufferLength++]=h[v++],d--;return this},l.prototype.finish=function(h){if(!this._finished){var d=this._bytesHashed,v=this._bufferLength,E=d/536870912|0,_=d<<3,O=d%128<112?128:256;this._buffer[v]=128;for(var P=v+1;P<O-8;P++)this._buffer[P]=0;e.writeUint32BE(E,this._buffer,O-8),e.writeUint32BE(_,this._buffer,O-4),o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,O),this._finished=!0}for(var P=0;P<this.digestLength/8;P++)e.writeUint32BE(this._stateHi[P],h,P*8),e.writeUint32BE(this._stateLo[P],h,P*8+4);return this},l.prototype.digest=function(){var h=new Uint8Array(this.digestLength);return this.finish(h),h},l.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},l.prototype.restoreState=function(h){return this._stateHi.set(h.stateHi),this._stateLo.set(h.stateLo),this._bufferLength=h.bufferLength,h.buffer&&this._buffer.set(h.buffer),this._bytesHashed=h.bytesHashed,this._finished=!1,this},l.prototype.cleanSavedState=function(h){r.wipe(h.stateHi),r.wipe(h.stateLo),h.buffer&&r.wipe(h.buffer),h.bufferLength=0,h.bytesHashed=0},l}();t.SHA512=n;var i=new Int32Array([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]);function o(l,h,d,v,E,_,O){for(var P=d[0],U=d[1],H=d[2],G=d[3],N=d[4],L=d[5],$=d[6],T=d[7],I=v[0],f=v[1],x=v[2],J=v[3],z=v[4],ee=v[5],de=v[6],me=v[7],S,j,ce,le,re,ne,ae,ie;O>=128;){for(var De=0;De<16;De++){var ge=8*De+_;l[De]=e.readUint32BE(E,ge),h[De]=e.readUint32BE(E,ge+4)}for(var De=0;De<80;De++){var Fe=P,ye=U,Le=H,X=G,Y=N,W=L,w=$,F=T,we=I,ve=f,Me=x,nt=J,at=z,Ge=ee,At=de,$t=me;if(S=T,j=me,re=j&65535,ne=j>>>16,ae=S&65535,ie=S>>>16,S=(N>>>14|z<<32-14)^(N>>>18|z<<32-18)^(z>>>41-32|N<<32-(41-32)),j=(z>>>14|N<<32-14)^(z>>>18|N<<32-18)^(N>>>41-32|z<<32-(41-32)),re+=j&65535,ne+=j>>>16,ae+=S&65535,ie+=S>>>16,S=N&L^~N&$,j=z&ee^~z&de,re+=j&65535,ne+=j>>>16,ae+=S&65535,ie+=S>>>16,S=i[De*2],j=i[De*2+1],re+=j&65535,ne+=j>>>16,ae+=S&65535,ie+=S>>>16,S=l[De%16],j=h[De%16],re+=j&65535,ne+=j>>>16,ae+=S&65535,ie+=S>>>16,ne+=re>>>16,ae+=ne>>>16,ie+=ae>>>16,ce=ae&65535|ie<<16,le=re&65535|ne<<16,S=ce,j=le,re=j&65535,ne=j>>>16,ae=S&65535,ie=S>>>16,S=(P>>>28|I<<32-28)^(I>>>34-32|P<<32-(34-32))^(I>>>39-32|P<<32-(39-32)),j=(I>>>28|P<<32-28)^(P>>>34-32|I<<32-(34-32))^(P>>>39-32|I<<32-(39-32)),re+=j&65535,ne+=j>>>16,ae+=S&65535,ie+=S>>>16,S=P&U^P&H^U&H,j=I&f^I&x^f&x,re+=j&65535,ne+=j>>>16,ae+=S&65535,ie+=S>>>16,ne+=re>>>16,ae+=ne>>>16,ie+=ae>>>16,F=ae&65535|ie<<16,$t=re&65535|ne<<16,S=X,j=nt,re=j&65535,ne=j>>>16,ae=S&65535,ie=S>>>16,S=ce,j=le,re+=j&65535,ne+=j>>>16,ae+=S&65535,ie+=S>>>16,ne+=re>>>16,ae+=ne>>>16,ie+=ae>>>16,X=ae&65535|ie<<16,nt=re&65535|ne<<16,U=Fe,H=ye,G=Le,N=X,L=Y,$=W,T=w,P=F,f=we,x=ve,J=Me,z=nt,ee=at,de=Ge,me=At,I=$t,De%16===15)for(var ge=0;ge<16;ge++)S=l[ge],j=h[ge],re=j&65535,ne=j>>>16,ae=S&65535,ie=S>>>16,S=l[(ge+9)%16],j=h[(ge+9)%16],re+=j&65535,ne+=j>>>16,ae+=S&65535,ie+=S>>>16,ce=l[(ge+1)%16],le=h[(ge+1)%16],S=(ce>>>1|le<<32-1)^(ce>>>8|le<<32-8)^ce>>>7,j=(le>>>1|ce<<32-1)^(le>>>8|ce<<32-8)^(le>>>7|ce<<32-7),re+=j&65535,ne+=j>>>16,ae+=S&65535,ie+=S>>>16,ce=l[(ge+14)%16],le=h[(ge+14)%16],S=(ce>>>19|le<<32-19)^(le>>>61-32|ce<<32-(61-32))^ce>>>6,j=(le>>>19|ce<<32-19)^(ce>>>61-32|le<<32-(61-32))^(le>>>6|ce<<32-6),re+=j&65535,ne+=j>>>16,ae+=S&65535,ie+=S>>>16,ne+=re>>>16,ae+=ne>>>16,ie+=ae>>>16,l[ge]=ae&65535|ie<<16,h[ge]=re&65535|ne<<16}S=P,j=I,re=j&65535,ne=j>>>16,ae=S&65535,ie=S>>>16,S=d[0],j=v[0],re+=j&65535,ne+=j>>>16,ae+=S&65535,ie+=S>>>16,ne+=re>>>16,ae+=ne>>>16,ie+=ae>>>16,d[0]=P=ae&65535|ie<<16,v[0]=I=re&65535|ne<<16,S=U,j=f,re=j&65535,ne=j>>>16,ae=S&65535,ie=S>>>16,S=d[1],j=v[1],re+=j&65535,ne+=j>>>16,ae+=S&65535,ie+=S>>>16,ne+=re>>>16,ae+=ne>>>16,ie+=ae>>>16,d[1]=U=ae&65535|ie<<16,v[1]=f=re&65535|ne<<16,S=H,j=x,re=j&65535,ne=j>>>16,ae=S&65535,ie=S>>>16,S=d[2],j=v[2],re+=j&65535,ne+=j>>>16,ae+=S&65535,ie+=S>>>16,ne+=re>>>16,ae+=ne>>>16,ie+=ae>>>16,d[2]=H=ae&65535|ie<<16,v[2]=x=re&65535|ne<<16,S=G,j=J,re=j&65535,ne=j>>>16,ae=S&65535,ie=S>>>16,S=d[3],j=v[3],re+=j&65535,ne+=j>>>16,ae+=S&65535,ie+=S>>>16,ne+=re>>>16,ae+=ne>>>16,ie+=ae>>>16,d[3]=G=ae&65535|ie<<16,v[3]=J=re&65535|ne<<16,S=N,j=z,re=j&65535,ne=j>>>16,ae=S&65535,ie=S>>>16,S=d[4],j=v[4],re+=j&65535,ne+=j>>>16,ae+=S&65535,ie+=S>>>16,ne+=re>>>16,ae+=ne>>>16,ie+=ae>>>16,d[4]=N=ae&65535|ie<<16,v[4]=z=re&65535|ne<<16,S=L,j=ee,re=j&65535,ne=j>>>16,ae=S&65535,ie=S>>>16,S=d[5],j=v[5],re+=j&65535,ne+=j>>>16,ae+=S&65535,ie+=S>>>16,ne+=re>>>16,ae+=ne>>>16,ie+=ae>>>16,d[5]=L=ae&65535|ie<<16,v[5]=ee=re&65535|ne<<16,S=$,j=de,re=j&65535,ne=j>>>16,ae=S&65535,ie=S>>>16,S=d[6],j=v[6],re+=j&65535,ne+=j>>>16,ae+=S&65535,ie+=S>>>16,ne+=re>>>16,ae+=ne>>>16,ie+=ae>>>16,d[6]=$=ae&65535|ie<<16,v[6]=de=re&65535|ne<<16,S=T,j=me,re=j&65535,ne=j>>>16,ae=S&65535,ie=S>>>16,S=d[7],j=v[7],re+=j&65535,ne+=j>>>16,ae+=S&65535,ie+=S>>>16,ne+=re>>>16,ae+=ne>>>16,ie+=ae>>>16,d[7]=T=ae&65535|ie<<16,v[7]=me=re&65535|ne<<16,_+=128,O-=128}return _}function c(l){var h=new n;h.update(l);var d=h.digest();return h.clean(),d}t.hash=c})(lp),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertSecretKeyToX25519=t.convertPublicKeyToX25519=t.verify=t.sign=t.extractPublicKeyFromSecretKey=t.generateKeyPair=t.generateKeyPairFromSeed=t.SEED_LENGTH=t.SECRET_KEY_LENGTH=t.PUBLIC_KEY_LENGTH=t.SIGNATURE_LENGTH=void 0;const e=xs,r=lp,n=Zr;t.SIGNATURE_LENGTH=64,t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=64,t.SEED_LENGTH=32;function i(X){const Y=new Float64Array(16);if(X)for(let W=0;W<X.length;W++)Y[W]=X[W];return Y}const o=new Uint8Array(32);o[0]=9;const c=i(),l=i([1]),h=i([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),d=i([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),v=i([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),E=i([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),_=i([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function O(X,Y){for(let W=0;W<16;W++)X[W]=Y[W]|0}function P(X){let Y=1;for(let W=0;W<16;W++){let w=X[W]+Y+65535;Y=Math.floor(w/65536),X[W]=w-Y*65536}X[0]+=Y-1+37*(Y-1)}function U(X,Y,W){const w=~(W-1);for(let F=0;F<16;F++){const we=w&(X[F]^Y[F]);X[F]^=we,Y[F]^=we}}function H(X,Y){const W=i(),w=i();for(let F=0;F<16;F++)w[F]=Y[F];P(w),P(w),P(w);for(let F=0;F<2;F++){W[0]=w[0]-65517;for(let ve=1;ve<15;ve++)W[ve]=w[ve]-65535-(W[ve-1]>>16&1),W[ve-1]&=65535;W[15]=w[15]-32767-(W[14]>>16&1);const we=W[15]>>16&1;W[14]&=65535,U(w,W,1-we)}for(let F=0;F<16;F++)X[2*F]=w[F]&255,X[2*F+1]=w[F]>>8}function G(X,Y){let W=0;for(let w=0;w<32;w++)W|=X[w]^Y[w];return(1&W-1>>>8)-1}function N(X,Y){const W=new Uint8Array(32),w=new Uint8Array(32);return H(W,X),H(w,Y),G(W,w)}function L(X){const Y=new Uint8Array(32);return H(Y,X),Y[0]&1}function $(X,Y){for(let W=0;W<16;W++)X[W]=Y[2*W]+(Y[2*W+1]<<8);X[15]&=32767}function T(X,Y,W){for(let w=0;w<16;w++)X[w]=Y[w]+W[w]}function I(X,Y,W){for(let w=0;w<16;w++)X[w]=Y[w]-W[w]}function f(X,Y,W){let w,F,we=0,ve=0,Me=0,nt=0,at=0,Ge=0,At=0,$t=0,Je=0,He=0,Be=0,Ke=0,rt=0,Ue=0,Ze=0,b=0,p=0,m=0,A=0,B=0,K=0,Q=0,Ee=0,Te=0,st=0,ht=0,lt=0,Mr=0,Yn=0,Ci=0,cs=0,Ht=W[0],Lt=W[1],zt=W[2],Wt=W[3],Ft=W[4],Mt=W[5],nr=W[6],ir=W[7],qt=W[8],sr=W[9],Vt=W[10],Yt=W[11],Kt=W[12],Pt=W[13],or=W[14],ar=W[15];w=Y[0],we+=w*Ht,ve+=w*Lt,Me+=w*zt,nt+=w*Wt,at+=w*Ft,Ge+=w*Mt,At+=w*nr,$t+=w*ir,Je+=w*qt,He+=w*sr,Be+=w*Vt,Ke+=w*Yt,rt+=w*Kt,Ue+=w*Pt,Ze+=w*or,b+=w*ar,w=Y[1],ve+=w*Ht,Me+=w*Lt,nt+=w*zt,at+=w*Wt,Ge+=w*Ft,At+=w*Mt,$t+=w*nr,Je+=w*ir,He+=w*qt,Be+=w*sr,Ke+=w*Vt,rt+=w*Yt,Ue+=w*Kt,Ze+=w*Pt,b+=w*or,p+=w*ar,w=Y[2],Me+=w*Ht,nt+=w*Lt,at+=w*zt,Ge+=w*Wt,At+=w*Ft,$t+=w*Mt,Je+=w*nr,He+=w*ir,Be+=w*qt,Ke+=w*sr,rt+=w*Vt,Ue+=w*Yt,Ze+=w*Kt,b+=w*Pt,p+=w*or,m+=w*ar,w=Y[3],nt+=w*Ht,at+=w*Lt,Ge+=w*zt,At+=w*Wt,$t+=w*Ft,Je+=w*Mt,He+=w*nr,Be+=w*ir,Ke+=w*qt,rt+=w*sr,Ue+=w*Vt,Ze+=w*Yt,b+=w*Kt,p+=w*Pt,m+=w*or,A+=w*ar,w=Y[4],at+=w*Ht,Ge+=w*Lt,At+=w*zt,$t+=w*Wt,Je+=w*Ft,He+=w*Mt,Be+=w*nr,Ke+=w*ir,rt+=w*qt,Ue+=w*sr,Ze+=w*Vt,b+=w*Yt,p+=w*Kt,m+=w*Pt,A+=w*or,B+=w*ar,w=Y[5],Ge+=w*Ht,At+=w*Lt,$t+=w*zt,Je+=w*Wt,He+=w*Ft,Be+=w*Mt,Ke+=w*nr,rt+=w*ir,Ue+=w*qt,Ze+=w*sr,b+=w*Vt,p+=w*Yt,m+=w*Kt,A+=w*Pt,B+=w*or,K+=w*ar,w=Y[6],At+=w*Ht,$t+=w*Lt,Je+=w*zt,He+=w*Wt,Be+=w*Ft,Ke+=w*Mt,rt+=w*nr,Ue+=w*ir,Ze+=w*qt,b+=w*sr,p+=w*Vt,m+=w*Yt,A+=w*Kt,B+=w*Pt,K+=w*or,Q+=w*ar,w=Y[7],$t+=w*Ht,Je+=w*Lt,He+=w*zt,Be+=w*Wt,Ke+=w*Ft,rt+=w*Mt,Ue+=w*nr,Ze+=w*ir,b+=w*qt,p+=w*sr,m+=w*Vt,A+=w*Yt,B+=w*Kt,K+=w*Pt,Q+=w*or,Ee+=w*ar,w=Y[8],Je+=w*Ht,He+=w*Lt,Be+=w*zt,Ke+=w*Wt,rt+=w*Ft,Ue+=w*Mt,Ze+=w*nr,b+=w*ir,p+=w*qt,m+=w*sr,A+=w*Vt,B+=w*Yt,K+=w*Kt,Q+=w*Pt,Ee+=w*or,Te+=w*ar,w=Y[9],He+=w*Ht,Be+=w*Lt,Ke+=w*zt,rt+=w*Wt,Ue+=w*Ft,Ze+=w*Mt,b+=w*nr,p+=w*ir,m+=w*qt,A+=w*sr,B+=w*Vt,K+=w*Yt,Q+=w*Kt,Ee+=w*Pt,Te+=w*or,st+=w*ar,w=Y[10],Be+=w*Ht,Ke+=w*Lt,rt+=w*zt,Ue+=w*Wt,Ze+=w*Ft,b+=w*Mt,p+=w*nr,m+=w*ir,A+=w*qt,B+=w*sr,K+=w*Vt,Q+=w*Yt,Ee+=w*Kt,Te+=w*Pt,st+=w*or,ht+=w*ar,w=Y[11],Ke+=w*Ht,rt+=w*Lt,Ue+=w*zt,Ze+=w*Wt,b+=w*Ft,p+=w*Mt,m+=w*nr,A+=w*ir,B+=w*qt,K+=w*sr,Q+=w*Vt,Ee+=w*Yt,Te+=w*Kt,st+=w*Pt,ht+=w*or,lt+=w*ar,w=Y[12],rt+=w*Ht,Ue+=w*Lt,Ze+=w*zt,b+=w*Wt,p+=w*Ft,m+=w*Mt,A+=w*nr,B+=w*ir,K+=w*qt,Q+=w*sr,Ee+=w*Vt,Te+=w*Yt,st+=w*Kt,ht+=w*Pt,lt+=w*or,Mr+=w*ar,w=Y[13],Ue+=w*Ht,Ze+=w*Lt,b+=w*zt,p+=w*Wt,m+=w*Ft,A+=w*Mt,B+=w*nr,K+=w*ir,Q+=w*qt,Ee+=w*sr,Te+=w*Vt,st+=w*Yt,ht+=w*Kt,lt+=w*Pt,Mr+=w*or,Yn+=w*ar,w=Y[14],Ze+=w*Ht,b+=w*Lt,p+=w*zt,m+=w*Wt,A+=w*Ft,B+=w*Mt,K+=w*nr,Q+=w*ir,Ee+=w*qt,Te+=w*sr,st+=w*Vt,ht+=w*Yt,lt+=w*Kt,Mr+=w*Pt,Yn+=w*or,Ci+=w*ar,w=Y[15],b+=w*Ht,p+=w*Lt,m+=w*zt,A+=w*Wt,B+=w*Ft,K+=w*Mt,Q+=w*nr,Ee+=w*ir,Te+=w*qt,st+=w*sr,ht+=w*Vt,lt+=w*Yt,Mr+=w*Kt,Yn+=w*Pt,Ci+=w*or,cs+=w*ar,we+=38*p,ve+=38*m,Me+=38*A,nt+=38*B,at+=38*K,Ge+=38*Q,At+=38*Ee,$t+=38*Te,Je+=38*st,He+=38*ht,Be+=38*lt,Ke+=38*Mr,rt+=38*Yn,Ue+=38*Ci,Ze+=38*cs,F=1,w=we+F+65535,F=Math.floor(w/65536),we=w-F*65536,w=ve+F+65535,F=Math.floor(w/65536),ve=w-F*65536,w=Me+F+65535,F=Math.floor(w/65536),Me=w-F*65536,w=nt+F+65535,F=Math.floor(w/65536),nt=w-F*65536,w=at+F+65535,F=Math.floor(w/65536),at=w-F*65536,w=Ge+F+65535,F=Math.floor(w/65536),Ge=w-F*65536,w=At+F+65535,F=Math.floor(w/65536),At=w-F*65536,w=$t+F+65535,F=Math.floor(w/65536),$t=w-F*65536,w=Je+F+65535,F=Math.floor(w/65536),Je=w-F*65536,w=He+F+65535,F=Math.floor(w/65536),He=w-F*65536,w=Be+F+65535,F=Math.floor(w/65536),Be=w-F*65536,w=Ke+F+65535,F=Math.floor(w/65536),Ke=w-F*65536,w=rt+F+65535,F=Math.floor(w/65536),rt=w-F*65536,w=Ue+F+65535,F=Math.floor(w/65536),Ue=w-F*65536,w=Ze+F+65535,F=Math.floor(w/65536),Ze=w-F*65536,w=b+F+65535,F=Math.floor(w/65536),b=w-F*65536,we+=F-1+37*(F-1),F=1,w=we+F+65535,F=Math.floor(w/65536),we=w-F*65536,w=ve+F+65535,F=Math.floor(w/65536),ve=w-F*65536,w=Me+F+65535,F=Math.floor(w/65536),Me=w-F*65536,w=nt+F+65535,F=Math.floor(w/65536),nt=w-F*65536,w=at+F+65535,F=Math.floor(w/65536),at=w-F*65536,w=Ge+F+65535,F=Math.floor(w/65536),Ge=w-F*65536,w=At+F+65535,F=Math.floor(w/65536),At=w-F*65536,w=$t+F+65535,F=Math.floor(w/65536),$t=w-F*65536,w=Je+F+65535,F=Math.floor(w/65536),Je=w-F*65536,w=He+F+65535,F=Math.floor(w/65536),He=w-F*65536,w=Be+F+65535,F=Math.floor(w/65536),Be=w-F*65536,w=Ke+F+65535,F=Math.floor(w/65536),Ke=w-F*65536,w=rt+F+65535,F=Math.floor(w/65536),rt=w-F*65536,w=Ue+F+65535,F=Math.floor(w/65536),Ue=w-F*65536,w=Ze+F+65535,F=Math.floor(w/65536),Ze=w-F*65536,w=b+F+65535,F=Math.floor(w/65536),b=w-F*65536,we+=F-1+37*(F-1),X[0]=we,X[1]=ve,X[2]=Me,X[3]=nt,X[4]=at,X[5]=Ge,X[6]=At,X[7]=$t,X[8]=Je,X[9]=He,X[10]=Be,X[11]=Ke,X[12]=rt,X[13]=Ue,X[14]=Ze,X[15]=b}function x(X,Y){f(X,Y,Y)}function J(X,Y){const W=i();let w;for(w=0;w<16;w++)W[w]=Y[w];for(w=253;w>=0;w--)x(W,W),w!==2&&w!==4&&f(W,W,Y);for(w=0;w<16;w++)X[w]=W[w]}function z(X,Y){const W=i();let w;for(w=0;w<16;w++)W[w]=Y[w];for(w=250;w>=0;w--)x(W,W),w!==1&&f(W,W,Y);for(w=0;w<16;w++)X[w]=W[w]}function ee(X,Y){const W=i(),w=i(),F=i(),we=i(),ve=i(),Me=i(),nt=i(),at=i(),Ge=i();I(W,X[1],X[0]),I(Ge,Y[1],Y[0]),f(W,W,Ge),T(w,X[0],X[1]),T(Ge,Y[0],Y[1]),f(w,w,Ge),f(F,X[3],Y[3]),f(F,F,d),f(we,X[2],Y[2]),T(we,we,we),I(ve,w,W),I(Me,we,F),T(nt,we,F),T(at,w,W),f(X[0],ve,Me),f(X[1],at,nt),f(X[2],nt,Me),f(X[3],ve,at)}function de(X,Y,W){for(let w=0;w<4;w++)U(X[w],Y[w],W)}function me(X,Y){const W=i(),w=i(),F=i();J(F,Y[2]),f(W,Y[0],F),f(w,Y[1],F),H(X,w),X[31]^=L(W)<<7}function S(X,Y,W){O(X[0],c),O(X[1],l),O(X[2],l),O(X[3],c);for(let w=255;w>=0;--w){const F=W[w/8|0]>>(w&7)&1;de(X,Y,F),ee(Y,X),ee(X,X),de(X,Y,F)}}function j(X,Y){const W=[i(),i(),i(),i()];O(W[0],v),O(W[1],E),O(W[2],l),f(W[3],v,E),S(X,W,Y)}function ce(X){if(X.length!==t.SEED_LENGTH)throw new Error(`ed25519: seed must be ${t.SEED_LENGTH} bytes`);const Y=(0,r.hash)(X);Y[0]&=248,Y[31]&=127,Y[31]|=64;const W=new Uint8Array(32),w=[i(),i(),i(),i()];j(w,Y),me(W,w);const F=new Uint8Array(64);return F.set(X),F.set(W,32),{publicKey:W,secretKey:F}}t.generateKeyPairFromSeed=ce;function le(X){const Y=(0,e.randomBytes)(32,X),W=ce(Y);return(0,n.wipe)(Y),W}t.generateKeyPair=le;function re(X){if(X.length!==t.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${t.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(X.subarray(32))}t.extractPublicKeyFromSecretKey=re;const ne=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ae(X,Y){let W,w,F,we;for(w=63;w>=32;--w){for(W=0,F=w-32,we=w-12;F<we;++F)Y[F]+=W-16*Y[w]*ne[F-(w-32)],W=Math.floor((Y[F]+128)/256),Y[F]-=W*256;Y[F]+=W,Y[w]=0}for(W=0,F=0;F<32;F++)Y[F]+=W-(Y[31]>>4)*ne[F],W=Y[F]>>8,Y[F]&=255;for(F=0;F<32;F++)Y[F]-=W*ne[F];for(w=0;w<32;w++)Y[w+1]+=Y[w]>>8,X[w]=Y[w]&255}function ie(X){const Y=new Float64Array(64);for(let W=0;W<64;W++)Y[W]=X[W];for(let W=0;W<64;W++)X[W]=0;ae(X,Y)}function De(X,Y){const W=new Float64Array(64),w=[i(),i(),i(),i()],F=(0,r.hash)(X.subarray(0,32));F[0]&=248,F[31]&=127,F[31]|=64;const we=new Uint8Array(64);we.set(F.subarray(32),32);const ve=new r.SHA512;ve.update(we.subarray(32)),ve.update(Y);const Me=ve.digest();ve.clean(),ie(Me),j(w,Me),me(we,w),ve.reset(),ve.update(we.subarray(0,32)),ve.update(X.subarray(32)),ve.update(Y);const nt=ve.digest();ie(nt);for(let at=0;at<32;at++)W[at]=Me[at];for(let at=0;at<32;at++)for(let Ge=0;Ge<32;Ge++)W[at+Ge]+=nt[at]*F[Ge];return ae(we.subarray(32),W),we}t.sign=De;function ge(X,Y){const W=i(),w=i(),F=i(),we=i(),ve=i(),Me=i(),nt=i();return O(X[2],l),$(X[1],Y),x(F,X[1]),f(we,F,h),I(F,F,X[2]),T(we,X[2],we),x(ve,we),x(Me,ve),f(nt,Me,ve),f(W,nt,F),f(W,W,we),z(W,W),f(W,W,F),f(W,W,we),f(W,W,we),f(X[0],W,we),x(w,X[0]),f(w,w,we),N(w,F)&&f(X[0],X[0],_),x(w,X[0]),f(w,w,we),N(w,F)?-1:(L(X[0])===Y[31]>>7&&I(X[0],c,X[0]),f(X[3],X[0],X[1]),0)}function Fe(X,Y,W){const w=new Uint8Array(32),F=[i(),i(),i(),i()],we=[i(),i(),i(),i()];if(W.length!==t.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${t.SIGNATURE_LENGTH} bytes`);if(ge(we,X))return!1;const ve=new r.SHA512;ve.update(W.subarray(0,32)),ve.update(X),ve.update(Y);const Me=ve.digest();return ie(Me),S(F,we,Me),j(we,W.subarray(32)),ee(F,we),me(w,F),!G(W,w)}t.verify=Fe;function ye(X){let Y=[i(),i(),i(),i()];if(ge(Y,X))throw new Error("Ed25519: invalid public key");let W=i(),w=i(),F=Y[1];T(W,l,F),I(w,l,F),J(w,w),f(W,W,w);let we=new Uint8Array(32);return H(we,W),we}t.convertPublicKeyToX25519=ye;function Le(X){const Y=(0,r.hash)(X.subarray(0,32));Y[0]&=248,Y[31]&=127,Y[31]|=64;const W=new Uint8Array(Y.subarray(0,32));return(0,n.wipe)(Y),W}t.convertSecretKeyToX25519=Le}(Ku);const x4="EdDSA",C4="JWT",up=".",hp="base64url",I4="utf8",S4="utf8",O4=":",D4="did",A4="key",fp="base58btc",$4="z",P4="K36",T4=32;function Qa(t){return Dr(kr(Mo(t),I4),hp)}function dp(t){const e=kr(P4,fp),r=$4+Dr(au([e,t]),fp);return[D4,A4,r].join(O4)}function R4(t){return Dr(t,hp)}function N4(t){return kr([Qa(t.header),Qa(t.payload)].join(up),S4)}function L4(t){return[Qa(t.header),Qa(t.payload),R4(t.signature)].join(up)}function pp(t=xs.randomBytes(T4)){return Ku.generateKeyPairFromSeed(t)}async function M4(t,e,r,n,i=ke.fromMiliseconds(Date.now())){const o={alg:x4,typ:C4},c=dp(n.publicKey),l=i+r,h={iss:c,sub:t,aud:e,iat:i,exp:l},d=N4({header:o,payload:h}),v=Ku.sign(n.secretKey,d);return L4({header:o,payload:h,signature:v})}const U4="PARSE_ERROR",j4="INVALID_REQUEST",F4="METHOD_NOT_FOUND",B4="INVALID_PARAMS",gp="INTERNAL_ERROR",Gu="SERVER_ERROR",k4=[-32700,-32600,-32601,-32602,-32603],Uo={[U4]:{code:-32700,message:"Parse error"},[j4]:{code:-32600,message:"Invalid Request"},[F4]:{code:-32601,message:"Method not found"},[B4]:{code:-32602,message:"Invalid params"},[gp]:{code:-32603,message:"Internal error"},[Gu]:{code:-32e3,message:"Server error"}},mp=Gu;function H4(t){return k4.includes(t)}function wp(t){return Object.keys(Uo).includes(t)?Uo[t]:Uo[mp]}function z4(t){const e=Object.values(Uo).find(r=>r.code===t);return e||Uo[mp]}function vp(t,e,r){return t.message.includes("getaddrinfo ENOTFOUND")||t.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${e}`):t}var yp={};/*! *****************************************************************************
|
|
60
60
|
Copyright (c) Microsoft Corporation.
|
|
61
61
|
|
|
62
62
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -69,91 +69,85 @@
|
|
|
69
69
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
70
70
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
71
71
|
PERFORMANCE OF THIS SOFTWARE.
|
|
72
|
-
***************************************************************************** */var Uu=function(t,e){return Uu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},Uu(t,e)};function D4(t,e){Uu(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Fu=function(){return Fu=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Fu.apply(this,arguments)};function O4(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function A4(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(o=(i<3?c(o):i>3?c(e,r,o):c(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o}function $4(t,e){return function(r,n){e(r,n,t)}}function P4(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function T4(t,e,r,n){function i(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function l(v){try{d(n.next(v))}catch(E){c(E)}}function h(v){try{d(n.throw(v))}catch(E){c(E)}}function d(v){v.done?o(v.value):i(v.value).then(l,h)}d((n=n.apply(t,e||[])).next())})}function R4(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(v){return h([d,v])}}function h(d){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=d[0]&2?i.return:d[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,d[1])).done)return o;switch(i=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,i=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){r.label=d[1];break}if(d[0]===6&&r.label<o[1]){r.label=o[1],o=d;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(d);break}o[2]&&r.ops.pop(),r.trys.pop();continue}d=e.call(t,r)}catch(v){d=[6,v],i=0}finally{n=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function N4(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function M4(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function Bu(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function cp(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],c;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(l){c={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return o}function L4(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(cp(arguments[e]));return t}function j4(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var o=arguments[e],c=0,l=o.length;c<l;c++,i++)n[i]=o[c];return n}function Ao(t){return this instanceof Ao?(this.v=t,this):new Ao(t)}function U4(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,o=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(_){n[_]&&(i[_]=function(S){return new Promise(function(P,L){o.push([_,S,P,L])>1||l(_,S)})})}function l(_,S){try{h(n[_](S))}catch(P){E(o[0][3],P)}}function h(_){_.value instanceof Ao?Promise.resolve(_.value.v).then(d,v):E(o[0][2],_)}function d(_){l("next",_)}function v(_){l("throw",_)}function E(_,S){_(S),o.shift(),o.length&&l(o[0][0],o[0][1])}}function F4(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,o){e[i]=t[i]?function(c){return(r=!r)?{value:Ao(t[i](c)),done:i==="return"}:o?o(c):c}:o}}function B4(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Bu=="function"?Bu(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(c){return new Promise(function(l,h){c=t[o](c),i(l,h,c.done,c.value)})}}function i(o,c,l,h){Promise.resolve(h).then(function(d){o({value:d,done:l})},c)}}function k4(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function H4(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function z4(t){return t&&t.__esModule?t:{default:t}}function W4(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function q4(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}var V4=Object.freeze({__proto__:null,__extends:D4,get __assign(){return Fu},__rest:O4,__decorate:A4,__param:$4,__metadata:P4,__awaiter:T4,__generator:R4,__createBinding:N4,__exportStar:M4,__values:Bu,__read:cp,__spread:L4,__spreadArrays:j4,__await:Ao,__asyncGenerator:U4,__asyncDelegator:F4,__asyncValues:B4,__makeTemplateObject:k4,__importStar:H4,__importDefault:z4,__classPrivateFieldGet:W4,__classPrivateFieldSet:q4}),K4=Ii(V4),Fn={},lp;function G4(){if(lp)return Fn;lp=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.isBrowserCryptoAvailable=Fn.getSubtleCrypto=Fn.getBrowerCrypto=void 0;function t(){return dr?.crypto||dr?.msCrypto||{}}Fn.getBrowerCrypto=t;function e(){const n=t();return n.subtle||n.webkitSubtle}Fn.getSubtleCrypto=e;function r(){return!!t()&&!!e()}return Fn.isBrowserCryptoAvailable=r,Fn}var Bn={},up;function Z4(){if(up)return Bn;up=1,Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.isBrowser=Bn.isNode=Bn.isReactNative=void 0;function t(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}Bn.isReactNative=t;function e(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}Bn.isNode=e;function r(){return!t()&&!e()}return Bn.isBrowser=r,Bn}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=K4;e.__exportStar(G4(),t),e.__exportStar(Z4(),t)})(ap);function hp(t=3){const e=Date.now()*Math.pow(10,t),r=Math.floor(Math.random()*Math.pow(10,t));return e+r}function Y4(t=6){return BigInt(hp(t))}function Va(t,e,r){return{id:r||hp(),jsonrpc:"2.0",method:t,params:e}}function ku(t,e){return{id:t,jsonrpc:"2.0",result:e}}function Ka(t,e,r){return{id:t,jsonrpc:"2.0",error:J4(e,r)}}function J4(t,e){return typeof t>"u"?sp(np):(typeof t=="string"&&(t=Object.assign(Object.assign({},sp(ju)),{message:t})),typeof e<"u"&&(t.data=e),I4(t.code)&&(t=S4(t.code)),t)}class X4{}class Q4 extends X4{constructor(){super()}}class e_ extends Q4{constructor(e){super()}}const t_="^https?:",r_="^wss?:";function n_(t){const e=t.match(new RegExp(/^\w+:/,"gi"));if(!(!e||!e.length))return e[0]}function fp(t,e){const r=n_(t);return typeof r>"u"?!1:new RegExp(e).test(r)}function dp(t){return fp(t,t_)}function pp(t){return fp(t,r_)}function i_(t){return new RegExp("wss?://localhost(:d{2,5})?").test(t)}function gp(t){return typeof t=="object"&&"id"in t&&"jsonrpc"in t&&t.jsonrpc==="2.0"}function Hu(t){return gp(t)&&"method"in t}function zu(t){return gp(t)&&(kn(t)||vn(t))}function kn(t){return"result"in t}function vn(t){return"error"in t}class ii extends e_{constructor(e){super(e),this.events=new vr.exports.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async request(e,r){return this.requestStrict(Va(e.method,e.params||[],Y4().toString()),r)}async requestStrict(e,r){return new Promise(async(n,i)=>{if(!this.connection.connected)try{await this.open()}catch(o){i(o)}this.events.on(`${e.id}`,o=>{vn(o)?i(o.error):n(o.result)});try{await this.connection.send(e,r)}catch(o){i(o)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),zu(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const mp=10,s_=()=>typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:require("ws"),o_=()=>typeof window<"u",a_=s_();class c_{constructor(e){if(this.url=e,this.events=new vr.exports.EventEmitter,this.registering=!1,!pp(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async open(e=this.url){await this.register(e)}async close(){return new Promise((e,r)=>{if(typeof this.socket>"u"){r(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),e()},this.socket.close()})}async send(e,r){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(Do(e))}catch(n){this.onError(e.id,n)}}register(e=this.url){if(!pp(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,i)=>{this.events.once("register_error",o=>{this.resetMaxListeners(),i(o)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return i(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=e,this.registering=!0,new Promise((r,n)=>{const i=ap.isReactNative()?void 0:{rejectUnauthorized:!i_(e)},o=new a_(e,[],i);o_()?o.onerror=c=>{const l=c;n(this.emitError(l.error))}:o.on("error",c=>{n(this.emitError(c))}),o.onopen=()=>{this.onOpen(o),r(o)}})}onOpen(e){e.onmessage=r=>this.onPayload(r),e.onclose=r=>this.onClose(r),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const r=typeof e.data=="string"?Mu(e.data):e.data;this.events.emit("payload",r)}onError(e,r){const n=this.parseError(r),i=n.message||n.toString(),o=Ka(e,i);this.events.emit("payload",o)}parseError(e,r=this.url){return op(e,r,"WS")}resetMaxListeners(){this.events.getMaxListeners()>mp&&this.events.setMaxListeners(mp)}emitError(e){const r=this.parseError(new Error(e?.message||`WebSocket connection failed for URL: ${this.url}`));return this.events.emit("register_error",r),r}}var Wu={exports:{}};(function(t,e){var r=200,n="__lodash_hash_undefined__",i=1,o=2,c=9007199254740991,l="[object Arguments]",h="[object Array]",d="[object AsyncFunction]",v="[object Boolean]",E="[object Date]",_="[object Error]",S="[object Function]",P="[object GeneratorFunction]",L="[object Map]",k="[object Number]",q="[object Null]",T="[object Object]",M="[object Promise]",A="[object Proxy]",R="[object RegExp]",C="[object Set]",f="[object String]",x="[object Symbol]",J="[object Undefined]",z="[object WeakMap]",ee="[object ArrayBuffer]",de="[object DataView]",me="[object Float32Array]",D="[object Float64Array]",U="[object Int8Array]",ae="[object Int16Array]",le="[object Int32Array]",re="[object Uint8Array]",ne="[object Uint8ClampedArray]",oe="[object Uint16Array]",ie="[object Uint32Array]",Se=/[\\^$.*+?()[\]{}|]/g,ge=/^\[object .+?Constructor\]$/,Ne=/^(?:0|[1-9]\d*)$/,be={};be[me]=be[D]=be[U]=be[ae]=be[le]=be[re]=be[ne]=be[oe]=be[ie]=!0,be[l]=be[h]=be[ee]=be[v]=be[de]=be[E]=be[_]=be[S]=be[L]=be[k]=be[T]=be[R]=be[C]=be[f]=be[z]=!1;var Ae=typeof dr=="object"&&dr&&dr.Object===Object&&dr,X=typeof self=="object"&&self&&self.Object===Object&&self,Y=Ae||X||Function("return this")(),W=e&&!e.nodeType&&e,w=W&&!0&&t&&!t.nodeType&&t,F=w&&w.exports===W,we=F&&Ae.process,ve=function(){try{return we&&we.binding&&we.binding("util")}catch{}}(),Pe=ve&&ve.isTypedArray;function tt(N,V){for(var fe=-1,Ce=N==null?0:N.length,It=0,Je=[];++fe<Ce;){var Tt=N[fe];V(Tt,fe,N)&&(Je[It++]=Tt)}return Je}function ot(N,V){for(var fe=-1,Ce=V.length,It=N.length;++fe<Ce;)N[It+fe]=V[fe];return N}function qe(N,V){for(var fe=-1,Ce=N==null?0:N.length;++fe<Ce;)if(V(N[fe],fe,N))return!0;return!1}function At(N,V){for(var fe=-1,Ce=Array(N);++fe<N;)Ce[fe]=V(fe);return Ce}function $t(N){return function(V){return N(V)}}function Ye(N,V){return N.has(V)}function je(N,V){return N?.[V]}function Me(N){var V=-1,fe=Array(N.size);return N.forEach(function(Ce,It){fe[++V]=[It,Ce]}),fe}function ze(N,V){return function(fe){return N(V(fe))}}function et(N){var V=-1,fe=Array(N.size);return N.forEach(function(Ce){fe[++V]=Ce}),fe}var Te=Array.prototype,Ve=Function.prototype,b=Object.prototype,p=Y["__core-js_shared__"],m=Ve.toString,$=b.hasOwnProperty,B=function(){var N=/[^.]+$/.exec(p&&p.keys&&p.keys.IE_PROTO||"");return N?"Symbol(src)_1."+N:""}(),G=b.toString,Q=RegExp("^"+m.call($).replace(Se,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xe=F?Y.Buffer:void 0,Oe=Y.Symbol,it=Y.Uint8Array,ut=b.propertyIsEnumerable,ct=Te.splice,Rr=Oe?Oe.toStringTag:void 0,Wn=Object.getOwnPropertySymbols,pi=xe?xe.isBuffer:void 0,es=ze(Object.keys,Object),kt=Yr(Y,"DataView"),Mt=Yr(Y,"Map"),Ht=Yr(Y,"Promise"),zt=Yr(Y,"Set"),Ut=Yr(Y,"WeakMap"),Lt=Yr(Object,"create"),er=Vn(kt),tr=Vn(Mt),Wt=Vn(Ht),rr=Vn(zt),qt=Vn(Ut),Zt=Oe?Oe.prototype:void 0,Vt=Zt?Zt.valueOf:void 0;function Pt(N){var V=-1,fe=N==null?0:N.length;for(this.clear();++V<fe;){var Ce=N[V];this.set(Ce[0],Ce[1])}}function nr(){this.__data__=Lt?Lt(null):{},this.size=0}function ir(N){var V=this.has(N)&&delete this.__data__[N];return this.size-=V?1:0,V}function If(N){var V=this.__data__;if(Lt){var fe=V[N];return fe===n?void 0:fe}return $.call(V,N)?V[N]:void 0}function Sf(N){var V=this.__data__;return Lt?V[N]!==void 0:$.call(V,N)}function Df(N,V){var fe=this.__data__;return this.size+=this.has(N)?0:1,fe[N]=Lt&&V===void 0?n:V,this}Pt.prototype.clear=nr,Pt.prototype.delete=ir,Pt.prototype.get=If,Pt.prototype.has=Sf,Pt.prototype.set=Df;function cn(N){var V=-1,fe=N==null?0:N.length;for(this.clear();++V<fe;){var Ce=N[V];this.set(Ce[0],Ce[1])}}function Of(){this.__data__=[],this.size=0}function Af(N){var V=this.__data__,fe=ts(V,N);if(fe<0)return!1;var Ce=V.length-1;return fe==Ce?V.pop():ct.call(V,fe,1),--this.size,!0}function $f(N){var V=this.__data__,fe=ts(V,N);return fe<0?void 0:V[fe][1]}function Pf(N){return ts(this.__data__,N)>-1}function Tf(N,V){var fe=this.__data__,Ce=ts(fe,N);return Ce<0?(++this.size,fe.push([N,V])):fe[Ce][1]=V,this}cn.prototype.clear=Of,cn.prototype.delete=Af,cn.prototype.get=$f,cn.prototype.has=Pf,cn.prototype.set=Tf;function qn(N){var V=-1,fe=N==null?0:N.length;for(this.clear();++V<fe;){var Ce=N[V];this.set(Ce[0],Ce[1])}}function zs(){this.size=0,this.__data__={hash:new Pt,map:new(Mt||cn),string:new Pt}}function Rf(N){var V=gi(this,N).delete(N);return this.size-=V?1:0,V}function Ws(N){return gi(this,N).get(N)}function Nf(N){return gi(this,N).has(N)}function Mf(N,V){var fe=gi(this,N),Ce=fe.size;return fe.set(N,V),this.size+=fe.size==Ce?0:1,this}qn.prototype.clear=zs,qn.prototype.delete=Rf,qn.prototype.get=Ws,qn.prototype.has=Nf,qn.prototype.set=Mf;function qs(N){var V=-1,fe=N==null?0:N.length;for(this.__data__=new qn;++V<fe;)this.add(N[V])}function jc(N){return this.__data__.set(N,n),this}function Uc(N){return this.__data__.has(N)}qs.prototype.add=qs.prototype.push=jc,qs.prototype.has=Uc;function yn(N){var V=this.__data__=new cn(N);this.size=V.size}function Lf(){this.__data__=new cn,this.size=0}function jf(N){var V=this.__data__,fe=V.delete(N);return this.size=V.size,fe}function Uf(N){return this.__data__.get(N)}function Ff(N){return this.__data__.has(N)}function Fc(N,V){var fe=this.__data__;if(fe instanceof cn){var Ce=fe.__data__;if(!Mt||Ce.length<r-1)return Ce.push([N,V]),this.size=++fe.size,this;fe=this.__data__=new qn(Ce)}return fe.set(N,V),this.size=fe.size,this}yn.prototype.clear=Lf,yn.prototype.delete=jf,yn.prototype.get=Uf,yn.prototype.has=Ff,yn.prototype.set=Fc;function Bc(N,V){var fe=Gs(N),Ce=!fe&&Xc(N),It=!fe&&!Ce&&ua(N),Je=!fe&&!Ce&&!It&&tl(N),Tt=fe||Ce||It||Je,sr=Tt?At(N.length,String):[],gt=sr.length;for(var St in N)(V||$.call(N,St))&&!(Tt&&(St=="length"||It&&(St=="offset"||St=="parent")||Je&&(St=="buffer"||St=="byteLength"||St=="byteOffset")||Kc(St,gt)))&&sr.push(St);return sr}function ts(N,V){for(var fe=N.length;fe--;)if(Jc(N[fe][0],V))return fe;return-1}function ca(N,V,fe){var Ce=V(N);return Gs(N)?Ce:ot(Ce,fe(N))}function rs(N){return N==null?N===void 0?J:q:Rr&&Rr in Object(N)?qc(N):Hf(N)}function la(N){return is(N)&&rs(N)==l}function ns(N,V,fe,Ce,It){return N===V?!0:N==null||V==null||!is(N)&&!is(V)?N!==N&&V!==V:kc(N,V,fe,Ce,ns,It)}function kc(N,V,fe,Ce,It,Je){var Tt=Gs(N),sr=Gs(V),gt=Tt?h:Rn(N),St=sr?h:Rn(V);gt=gt==l?T:gt,St=St==l?T:St;var Yt=gt==T,Hr=St==T,or=gt==St;if(or&&ua(N)){if(!ua(V))return!1;Tt=!0,Yt=!1}if(or&&!Yt)return Je||(Je=new yn),Tt||tl(N)?Vs(N,V,fe,Ce,It,Je):kf(N,V,gt,fe,Ce,It,Je);if(!(fe&i)){var Rt=Yt&&$.call(N,"__wrapped__"),Nr=Hr&&$.call(V,"__wrapped__");if(Rt||Nr){var bn=Rt?N.value():N,ln=Nr?V.value():V;return Je||(Je=new yn),It(bn,ln,fe,Ce,Je)}}return or?(Je||(Je=new yn),Wc(N,V,fe,Ce,It,Je)):!1}function Bf(N){if(!el(N)||Zc(N))return!1;var V=Zs(N)?Q:ge;return V.test(Vn(N))}function Hc(N){return is(N)&&Qc(N.length)&&!!be[rs(N)]}function zc(N){if(!Yc(N))return es(N);var V=[];for(var fe in Object(N))$.call(N,fe)&&fe!="constructor"&&V.push(fe);return V}function Vs(N,V,fe,Ce,It,Je){var Tt=fe&i,sr=N.length,gt=V.length;if(sr!=gt&&!(Tt&>>sr))return!1;var St=Je.get(N);if(St&&Je.get(V))return St==V;var Yt=-1,Hr=!0,or=fe&o?new qs:void 0;for(Je.set(N,V),Je.set(V,N);++Yt<sr;){var Rt=N[Yt],Nr=V[Yt];if(Ce)var bn=Tt?Ce(Nr,Rt,Yt,V,N,Je):Ce(Rt,Nr,Yt,N,V,Je);if(bn!==void 0){if(bn)continue;Hr=!1;break}if(or){if(!qe(V,function(ln,Nn){if(!Ye(or,Nn)&&(Rt===ln||It(Rt,ln,fe,Ce,Je)))return or.push(Nn)})){Hr=!1;break}}else if(!(Rt===Nr||It(Rt,Nr,fe,Ce,Je))){Hr=!1;break}}return Je.delete(N),Je.delete(V),Hr}function kf(N,V,fe,Ce,It,Je,Tt){switch(fe){case de:if(N.byteLength!=V.byteLength||N.byteOffset!=V.byteOffset)return!1;N=N.buffer,V=V.buffer;case ee:return!(N.byteLength!=V.byteLength||!Je(new it(N),new it(V)));case v:case E:case k:return Jc(+N,+V);case _:return N.name==V.name&&N.message==V.message;case R:case f:return N==V+"";case L:var sr=Me;case C:var gt=Ce&i;if(sr||(sr=et),N.size!=V.size&&!gt)return!1;var St=Tt.get(N);if(St)return St==V;Ce|=o,Tt.set(N,V);var Yt=Vs(sr(N),sr(V),Ce,It,Je,Tt);return Tt.delete(N),Yt;case x:if(Vt)return Vt.call(N)==Vt.call(V)}return!1}function Wc(N,V,fe,Ce,It,Je){var Tt=fe&i,sr=Ks(N),gt=sr.length,St=Ks(V),Yt=St.length;if(gt!=Yt&&!Tt)return!1;for(var Hr=gt;Hr--;){var or=sr[Hr];if(!(Tt?or in V:$.call(V,or)))return!1}var Rt=Je.get(N);if(Rt&&Je.get(V))return Rt==V;var Nr=!0;Je.set(N,V),Je.set(V,N);for(var bn=Tt;++Hr<gt;){or=sr[Hr];var ln=N[or],Nn=V[or];if(Ce)var ha=Tt?Ce(Nn,ln,or,V,N,Je):Ce(ln,Nn,or,N,V,Je);if(!(ha===void 0?ln===Nn||It(ln,Nn,fe,Ce,Je):ha)){Nr=!1;break}bn||(bn=or=="constructor")}if(Nr&&!bn){var ss=N.constructor,mr=V.constructor;ss!=mr&&"constructor"in N&&"constructor"in V&&!(typeof ss=="function"&&ss instanceof ss&&typeof mr=="function"&&mr instanceof mr)&&(Nr=!1)}return Je.delete(N),Je.delete(V),Nr}function Ks(N){return ca(N,qf,Vc)}function gi(N,V){var fe=N.__data__;return Gc(V)?fe[typeof V=="string"?"string":"hash"]:fe.map}function Yr(N,V){var fe=je(N,V);return Bf(fe)?fe:void 0}function qc(N){var V=$.call(N,Rr),fe=N[Rr];try{N[Rr]=void 0;var Ce=!0}catch{}var It=G.call(N);return Ce&&(V?N[Rr]=fe:delete N[Rr]),It}var Vc=Wn?function(N){return N==null?[]:(N=Object(N),tt(Wn(N),function(V){return ut.call(N,V)}))}:Ct,Rn=rs;(kt&&Rn(new kt(new ArrayBuffer(1)))!=de||Mt&&Rn(new Mt)!=L||Ht&&Rn(Ht.resolve())!=M||zt&&Rn(new zt)!=C||Ut&&Rn(new Ut)!=z)&&(Rn=function(N){var V=rs(N),fe=V==T?N.constructor:void 0,Ce=fe?Vn(fe):"";if(Ce)switch(Ce){case er:return de;case tr:return L;case Wt:return M;case rr:return C;case qt:return z}return V});function Kc(N,V){return V=V??c,!!V&&(typeof N=="number"||Ne.test(N))&&N>-1&&N%1==0&&N<V}function Gc(N){var V=typeof N;return V=="string"||V=="number"||V=="symbol"||V=="boolean"?N!=="__proto__":N===null}function Zc(N){return!!B&&B in N}function Yc(N){var V=N&&N.constructor,fe=typeof V=="function"&&V.prototype||b;return N===fe}function Hf(N){return G.call(N)}function Vn(N){if(N!=null){try{return m.call(N)}catch{}try{return N+""}catch{}}return""}function Jc(N,V){return N===V||N!==N&&V!==V}var Xc=la(function(){return arguments}())?la:function(N){return is(N)&&$.call(N,"callee")&&!ut.call(N,"callee")},Gs=Array.isArray;function zf(N){return N!=null&&Qc(N.length)&&!Zs(N)}var ua=pi||xt;function Wf(N,V){return ns(N,V)}function Zs(N){if(!el(N))return!1;var V=rs(N);return V==S||V==P||V==d||V==A}function Qc(N){return typeof N=="number"&&N>-1&&N%1==0&&N<=c}function el(N){var V=typeof N;return N!=null&&(V=="object"||V=="function")}function is(N){return N!=null&&typeof N=="object"}var tl=Pe?$t(Pe):Hc;function qf(N){return zf(N)?Bc(N):zc(N)}function Ct(){return[]}function xt(){return!1}t.exports=Wf})(Wu,Wu.exports);var l_=Wu.exports,u_=Object.defineProperty,wp=Object.getOwnPropertySymbols,h_=Object.prototype.hasOwnProperty,f_=Object.prototype.propertyIsEnumerable,vp=(t,e,r)=>e in t?u_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,$r=(t,e)=>{for(var r in e||(e={}))h_.call(e,r)&&vp(t,r,e[r]);if(wp)for(var r of wp(e))f_.call(e,r)&&vp(t,r,e[r]);return t};function d_(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),c=o.charCodeAt(0);if(r[c]!==255)throw new TypeError(o+" is ambiguous");r[c]=i}var l=t.length,h=t.charAt(0),d=Math.log(l)/Math.log(256),v=Math.log(256)/Math.log(l);function E(P){if(P instanceof Uint8Array||(ArrayBuffer.isView(P)?P=new Uint8Array(P.buffer,P.byteOffset,P.byteLength):Array.isArray(P)&&(P=Uint8Array.from(P))),!(P instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(P.length===0)return"";for(var L=0,k=0,q=0,T=P.length;q!==T&&P[q]===0;)q++,L++;for(var M=(T-q)*v+1>>>0,A=new Uint8Array(M);q!==T;){for(var R=P[q],C=0,f=M-1;(R!==0||C<k)&&f!==-1;f--,C++)R+=256*A[f]>>>0,A[f]=R%l>>>0,R=R/l>>>0;if(R!==0)throw new Error("Non-zero carry");k=C,q++}for(var x=M-k;x!==M&&A[x]===0;)x++;for(var J=h.repeat(L);x<M;++x)J+=t.charAt(A[x]);return J}function _(P){if(typeof P!="string")throw new TypeError("Expected String");if(P.length===0)return new Uint8Array;var L=0;if(P[L]!==" "){for(var k=0,q=0;P[L]===h;)k++,L++;for(var T=(P.length-L)*d+1>>>0,M=new Uint8Array(T);P[L];){var A=r[P.charCodeAt(L)];if(A===255)return;for(var R=0,C=T-1;(A!==0||R<q)&&C!==-1;C--,R++)A+=l*M[C]>>>0,M[C]=A%256>>>0,A=A/256>>>0;if(A!==0)throw new Error("Non-zero carry");q=R,L++}if(P[L]!==" "){for(var f=T-q;f!==T&&M[f]===0;)f++;for(var x=new Uint8Array(k+(T-f)),J=k;f!==T;)x[J++]=M[f++];return x}}}function S(P){var L=_(P);if(L)return L;throw new Error(`Non-${e} character`)}return{encode:E,decodeUnsafe:_,decode:S}}var p_=d_,g_=p_;const yp=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},m_=t=>new TextEncoder().encode(t),w_=t=>new TextDecoder().decode(t);class v_{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class y_{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return bp(this,e)}}class b_{constructor(e){this.decoders=e}or(e){return bp(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const bp=(t,e)=>new b_($r($r({},t.decoders||{[t.prefix]:t}),e.decoders||{[e.prefix]:e}));class __{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new v_(e,r,n),this.decoder=new y_(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Ga=({name:t,prefix:e,encode:r,decode:n})=>new __(t,e,r,n),$o=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=g_(r,e);return Ga({prefix:t,name:e,encode:n,decode:o=>yp(i(o))})},E_=(t,e,r,n)=>{const i={};for(let v=0;v<e.length;++v)i[e[v]]=v;let o=t.length;for(;t[o-1]==="=";)--o;const c=new Uint8Array(o*r/8|0);let l=0,h=0,d=0;for(let v=0;v<o;++v){const E=i[t[v]];if(E===void 0)throw new SyntaxError(`Non-${n} character`);h=h<<r|E,l+=r,l>=8&&(l-=8,c[d++]=255&h>>l)}if(l>=r||255&h<<8-l)throw new SyntaxError("Unexpected end of data");return c},x_=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<<r)-1;let o="",c=0,l=0;for(let h=0;h<t.length;++h)for(l=l<<8|t[h],c+=8;c>r;)c-=r,o+=e[i&l>>c];if(c&&(o+=e[i&l<<r-c]),n)for(;o.length*r&7;)o+="=";return o},br=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>Ga({prefix:e,name:t,encode(i){return x_(i,n,r)},decode(i){return E_(i,n,r,t)}}),C_=Ga({prefix:"\0",name:"identity",encode:t=>w_(t),decode:t=>m_(t)});var I_=Object.freeze({__proto__:null,identity:C_});const S_=br({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var D_=Object.freeze({__proto__:null,base2:S_});const O_=br({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var A_=Object.freeze({__proto__:null,base8:O_});const $_=$o({prefix:"9",name:"base10",alphabet:"0123456789"});var P_=Object.freeze({__proto__:null,base10:$_});const T_=br({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),R_=br({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var N_=Object.freeze({__proto__:null,base16:T_,base16upper:R_});const M_=br({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),L_=br({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),j_=br({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),U_=br({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),F_=br({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),B_=br({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),k_=br({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),H_=br({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),z_=br({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var W_=Object.freeze({__proto__:null,base32:M_,base32upper:L_,base32pad:j_,base32padupper:U_,base32hex:F_,base32hexupper:B_,base32hexpad:k_,base32hexpadupper:H_,base32z:z_});const q_=$o({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),V_=$o({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var K_=Object.freeze({__proto__:null,base36:q_,base36upper:V_});const G_=$o({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Z_=$o({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Y_=Object.freeze({__proto__:null,base58btc:G_,base58flickr:Z_});const J_=br({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),X_=br({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Q_=br({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),e8=br({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var t8=Object.freeze({__proto__:null,base64:J_,base64pad:X_,base64url:Q_,base64urlpad:e8});const _p=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),r8=_p.reduce((t,e,r)=>(t[r]=e,t),[]),n8=_p.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function i8(t){return t.reduce((e,r)=>(e+=r8[r],e),"")}function s8(t){const e=[];for(const r of t){const n=n8[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const o8=Ga({prefix:"\u{1F680}",name:"base256emoji",encode:i8,decode:s8});var a8=Object.freeze({__proto__:null,base256emoji:o8}),c8=xp,Ep=128,l8=127,u8=~l8,h8=Math.pow(2,31);function xp(t,e,r){e=e||[],r=r||0;for(var n=r;t>=h8;)e[r++]=t&255|Ep,t/=128;for(;t&u8;)e[r++]=t&255|Ep,t>>>=7;return e[r]=t|0,xp.bytes=r-n+1,e}var f8=qu,d8=128,Cp=127;function qu(t,n){var r=0,n=n||0,i=0,o=n,c,l=t.length;do{if(o>=l)throw qu.bytes=0,new RangeError("Could not decode varint");c=t[o++],r+=i<28?(c&Cp)<<i:(c&Cp)*Math.pow(2,i),i+=7}while(c>=d8);return qu.bytes=o-n,r}var p8=Math.pow(2,7),g8=Math.pow(2,14),m8=Math.pow(2,21),w8=Math.pow(2,28),v8=Math.pow(2,35),y8=Math.pow(2,42),b8=Math.pow(2,49),_8=Math.pow(2,56),E8=Math.pow(2,63),x8=function(t){return t<p8?1:t<g8?2:t<m8?3:t<w8?4:t<v8?5:t<y8?6:t<b8?7:t<_8?8:t<E8?9:10},C8={encode:c8,decode:f8,encodingLength:x8},Ip=C8;const Sp=(t,e,r=0)=>(Ip.encode(t,e,r),e),Dp=t=>Ip.encodingLength(t),Vu=(t,e)=>{const r=e.byteLength,n=Dp(t),i=n+Dp(r),o=new Uint8Array(i+r);return Sp(t,o,0),Sp(r,o,n),o.set(e,i),new I8(t,r,e,o)};class I8{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}}const Op=({name:t,code:e,encode:r})=>new S8(t,e,r);class S8{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){const r=this.encode(e);return r instanceof Uint8Array?Vu(this.code,r):r.then(n=>Vu(this.code,n))}else throw Error("Unknown type, must be binary type")}}const Ap=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),D8=Op({name:"sha2-256",code:18,encode:Ap("SHA-256")}),O8=Op({name:"sha2-512",code:19,encode:Ap("SHA-512")});var A8=Object.freeze({__proto__:null,sha256:D8,sha512:O8});const $p=0,$8="identity",Pp=yp;var P8=Object.freeze({__proto__:null,identity:{code:$p,name:$8,encode:Pp,digest:t=>Vu($p,Pp(t))}});new TextEncoder,new TextDecoder;const Tp=$r($r($r($r($r($r($r($r($r($r({},I_),D_),A_),P_),N_),W_),K_),Y_),t8),a8);$r($r({},A8),P8);function Rp(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function T8(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?Rp(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function Np(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const Mp=Np("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),Ku=Np("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=T8(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),R8=$r({utf8:Mp,"utf-8":Mp,hex:Tp.base16,latin1:Ku,ascii:Ku,binary:Ku},Tp);function N8(t,e="utf8"){const r=R8[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?Rp(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}const Lp="wc",M8=2,Gu="core",si=`${Lp}@${2}:${Gu}:`,L8={name:Gu,logger:"error"},j8={database:":memory:"},U8="crypto",jp="client_ed25519_seed",F8=Le.ONE_DAY,B8="keychain",k8="0.3",H8="messages",z8="0.3",W8=Le.SIX_HOURS,q8="publisher",Up="irn",V8="error",Fp="wss://relay.walletconnect.com",K8="relayer",gr={message:"relayer_message",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",transport_closed:"relayer_transport_closed",publish:"relayer_publish"},G8="_subscription",Po={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},Z8=Le.ONE_SECOND/2,Y8="2.7.3",J8="0.3",Dn={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},X8="subscription",Q8="0.3",eE=Le.FIVE_SECONDS*1e3,tE="pairing",rE="0.3",To={wc_pairingDelete:{req:{ttl:Le.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:Le.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:Le.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:Le.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:Le.ONE_DAY,prompt:!1,tag:0},res:{ttl:Le.ONE_DAY,prompt:!1,tag:0}}},On={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},nE="history",iE="0.3",sE="expirer",rn={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},oE="0.3",Zu="verify-api",Bp="https://verify.walletconnect.com";class aE{constructor(e,r){this.core=e,this.logger=r,this.keychain=new Map,this.name=B8,this.version=k8,this.initialized=!1,this.storagePrefix=si,this.init=async()=>{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}},this.has=n=>(this.isInitialized(),this.keychain.has(n)),this.set=async(n,i)=>{this.isInitialized(),this.keychain.set(n,i),await this.persist()},this.get=n=>{this.isInitialized();const i=this.keychain.get(n);if(typeof i>"u"){const{message:o}=Ee("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(o)}return i},this.del=async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()},this.core=e,this.logger=pt.generateChildLogger(r,this.name)}get context(){return pt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,m1(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?w1(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=Ee("NOT_INITIALIZED",this.name);throw new Error(e)}}}class cE{constructor(e,r,n){this.core=e,this.logger=r,this.name=U8,this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=i=>(this.isInitialized(),this.keychain.has(i)),this.getClientId=async()=>{this.isInitialized();const i=await this.getClientSeed(),o=rp(i);return tp(o.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const i=v5();return this.setPrivateKey(i.publicKey,i.privateKey)},this.signJWT=async i=>{this.isInitialized();const o=await this.getClientSeed(),c=rp(o),l=pu();return await y4(l,i,F8,c)},this.generateSharedKey=(i,o,c)=>{this.isInitialized();const l=this.getPrivateKey(i),h=y5(l,o);return this.setSymKey(h,c)},this.setSymKey=async(i,o)=>{this.isInitialized();const c=o||b5(i);return await this.keychain.set(c,i),c},this.deleteKeyPair=async i=>{this.isInitialized(),await this.keychain.del(i)},this.deleteSymKey=async i=>{this.isInitialized(),await this.keychain.del(i)},this.encode=async(i,o,c)=>{this.isInitialized();const l=l1(c),h=Do(o);if(u1(l)){const _=l.senderPublicKey,S=l.receiverPublicKey;i=await this.generateSharedKey(_,S)}const d=this.getSymKey(i),{type:v,senderPublicKey:E}=l;return E5({type:v,symKey:d,message:h,senderPublicKey:E})},this.decode=async(i,o,c)=>{this.isInitialized();const l=I5(o,c);if(u1(l)){const v=l.receiverPublicKey,E=l.senderPublicKey;i=await this.generateSharedKey(v,E)}const h=this.getSymKey(i),d=x5({symKey:h,encoded:o});return Mu(d)},this.getPayloadType=i=>{const o=Ua(i);return mo(o.type)},this.getPayloadSenderPublicKey=i=>{const o=Ua(i);return o.senderPublicKey?Sr(o.senderPublicKey,Dr):void 0},this.core=e,this.logger=pt.generateChildLogger(r,this.name),this.keychain=n||new aE(this.core,this.logger)}get context(){return pt.getLoggerContext(this.logger)}async setPrivateKey(e,r){return await this.keychain.set(e,r),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(jp)}catch{e=pu(),await this.keychain.set(jp,e)}return N8(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=Ee("NOT_INITIALIZED",this.name);throw new Error(e)}}}class lE extends Z6{constructor(e,r){super(e,r),this.logger=e,this.core=r,this.messages=new Map,this.name=H8,this.version=z8,this.initialized=!1,this.storagePrefix=si,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}},this.set=async(n,i)=>{this.isInitialized();const o=$i(i);let c=this.messages.get(n);return typeof c>"u"&&(c={}),typeof c[o]<"u"||(c[o]=i,this.messages.set(n,c),await this.persist()),o},this.get=n=>{this.isInitialized();let i=this.messages.get(n);return typeof i>"u"&&(i={}),i},this.has=(n,i)=>{this.isInitialized();const o=this.get(n),c=$i(i);return typeof o[c]<"u"},this.del=async n=>{this.isInitialized(),this.messages.delete(n),await this.persist()},this.logger=pt.generateChildLogger(e,this.name),this.core=r}get context(){return pt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,m1(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?w1(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=Ee("NOT_INITIALIZED",this.name);throw new Error(e)}}}class uE extends Y6{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,this.events=new vr.exports.EventEmitter,this.name=q8,this.queue=new Map,this.publishTimeout=1e4,this.publish=async(n,i,o)=>{this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:o}});try{const c=o?.ttl||W8,l=vu(o),h=o?.prompt||!1,d=o?.tag||0,v={topic:n,message:i,opts:{ttl:c,relay:l,prompt:h,tag:d}},E=$i(i);this.queue.set(E,v);try{await await Fa(this.rpcPublish(n,i,c,l,h,d),this.publishTimeout),this.relayer.events.emit(gr.publish,v)}catch{this.logger.debug("Publishing Payload stalled"),this.relayer.events.emit(gr.connection_stalled);return}this.onPublish(E,v),this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:o}})}catch(c){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(c),c}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.relayer=e,this.logger=pt.generateChildLogger(r,this.name),this.registerEventListeners()}get context(){return pt.getLoggerContext(this.logger)}rpcPublish(e,r,n,i,o,c){var l,h,d,v;const E={method:Ba(i.protocol).publish,params:{topic:e,message:r,ttl:n,prompt:o,tag:c}};return Or((l=E.params)==null?void 0:l.prompt)&&((h=E.params)==null||delete h.prompt),Or((d=E.params)==null?void 0:d.tag)&&((v=E.params)==null||delete v.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:E}),this.relayer.request(E)}onPublish(e,r){this.queue.delete(e)}checkQueue(){this.queue.forEach(async e=>{const{topic:r,message:n,opts:i}=e;await this.publish(r,n,i)})}registerEventListeners(){this.relayer.core.heartbeat.on(Eo.HEARTBEAT_EVENTS.pulse,()=>{this.checkQueue()})}}class hE{constructor(){this.map=new Map,this.set=(e,r)=>{const n=this.get(e);this.exists(e,r)||this.map.set(e,[...n,r])},this.get=e=>this.map.get(e)||[],this.exists=(e,r)=>this.get(e).includes(r),this.delete=(e,r)=>{if(typeof r>"u"){this.map.delete(e);return}if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,r))return;const i=n.filter(o=>o!==r);if(!i.length){this.map.delete(e);return}this.map.set(e,i)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var fE=Object.defineProperty,dE=Object.defineProperties,pE=Object.getOwnPropertyDescriptors,kp=Object.getOwnPropertySymbols,gE=Object.prototype.hasOwnProperty,mE=Object.prototype.propertyIsEnumerable,Hp=(t,e,r)=>e in t?fE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ro=(t,e)=>{for(var r in e||(e={}))gE.call(e,r)&&Hp(t,r,e[r]);if(kp)for(var r of kp(e))mE.call(e,r)&&Hp(t,r,e[r]);return t},Yu=(t,e)=>dE(t,pE(e));class wE extends Q6{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,this.subscriptions=new Map,this.topicMap=new hE,this.events=new vr.exports.EventEmitter,this.name=X8,this.version=Q8,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=si,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restart(),this.registerEventListeners(),this.onEnable(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(n,i)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}});try{const o=vu(i),c={topic:n,relay:o};this.pending.set(n,c);const l=await this.rpcSubscribe(n,o);return this.onSubscribe(l,c),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}}),l}catch(o){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(o),o}},this.unsubscribe=async(n,i)=>{await this.restartToComplete(),this.isInitialized(),typeof i?.id<"u"?await this.unsubscribeById(n,i.id,i):await this.unsubscribeByTopic(n,i)},this.isSubscribed=async n=>this.topics.includes(n)?!0:await new Promise((i,o)=>{const c=new Le.Watch;c.start(this.pendingSubscriptionWatchLabel);const l=setInterval(()=>{!this.pending.has(n)&&this.topics.includes(n)&&(clearInterval(l),c.stop(this.pendingSubscriptionWatchLabel),i(!0)),c.elapsed(this.pendingSubscriptionWatchLabel)>=eE&&(clearInterval(l),c.stop(this.pendingSubscriptionWatchLabel),o(!1))},this.pollingInterval)}),this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=pt.generateChildLogger(r,this.name),this.clientId=""}get context(){return pt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,r){let n=!1;try{n=this.getSubscription(e).topic===r}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,r){const n=this.topicMap.get(e);await Promise.all(n.map(async i=>await this.unsubscribeById(e,i,r)))}async unsubscribeById(e,r,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:n}});try{const i=vu(n);await this.rpcUnsubscribe(e,r,i);const o=Gt("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,r,o),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:n}})}catch(i){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(i),i}}async rpcSubscribe(e,r){const n={method:Ba(r.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await Fa(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(gr.connection_stalled)}return $i(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const r=e[0].relay,n={method:Ba(r.protocol).batchSubscribe,params:{topics:e.map(i=>i.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return await await Fa(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(gr.connection_stalled)}}rpcUnsubscribe(e,r,n){const i={method:Ba(n.protocol).unsubscribe,params:{topic:e,id:r}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(e,r){this.setSubscription(e,Yu(Ro({},r),{id:e})),this.pending.delete(r.topic)}onBatchSubscribe(e){e.length&&e.forEach(r=>{this.setSubscription(r.id,Ro({},r)),this.pending.delete(r.topic)})}async onUnsubscribe(e,r,n){this.events.removeAllListeners(r),this.hasSubscription(r,e)&&this.deleteSubscription(r,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,r){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:r}),this.addSubscription(e,r))}addSubscription(e,r){this.subscriptions.set(e,Ro({},r)),this.topicMap.set(r.topic,e),this.events.emit(Dn.created,r)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const r=this.subscriptions.get(e);if(!r){const{message:n}=Ee("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return r}deleteSubscription(e,r){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:r});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(Dn.deleted,Yu(Ro({},n),{reason:r}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Dn.sync)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let r=0;r<e;r++){const n=this.cached.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(n)}}this.events.emit(Dn.resubscribed)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:r}=Ee("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const r=await this.rpcBatchSubscribe(e);Un(r)&&this.onBatchSubscribe(r.map((n,i)=>Yu(Ro({},e[i]),{id:n})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach(r=>{e.push(r)}),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(Eo.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(gr.connect,async()=>{await this.onConnect()}),this.relayer.on(gr.disconnect,()=>{this.onDisconnect()}),this.events.on(Dn.created,async e=>{const r=Dn.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),await this.persist()}),this.events.on(Dn.deleted,async e=>{const r=Dn.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Ee("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise(e=>{const r=setInterval(()=>{this.restartInProgress||(clearInterval(r),e())},this.pollingInterval)})}}var vE=Object.defineProperty,zp=Object.getOwnPropertySymbols,yE=Object.prototype.hasOwnProperty,bE=Object.prototype.propertyIsEnumerable,Wp=(t,e,r)=>e in t?vE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,_E=(t,e)=>{for(var r in e||(e={}))yE.call(e,r)&&Wp(t,r,e[r]);if(zp)for(var r of zp(e))bE.call(e,r)&&Wp(t,r,e[r]);return t};class EE extends J6{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new vr.exports.EventEmitter,this.name=K8,this.transportExplicitlyClosed=!1,this.initialized=!1,this.reconnecting=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.request=async r=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(r)}catch(n){throw this.logger.debug("Failed to Publish Request"),this.logger.error(n),n}},this.core=e.core,this.logger=typeof e.logger<"u"&&typeof e.logger!="string"?pt.generateChildLogger(e.logger,this.name):pt.pino(pt.getDefaultLoggerOptions({level:e.logger||V8})),this.messages=new lE(this.logger,e.core),this.subscriber=new wE(this,this.logger),this.publisher=new uE(this,this.logger),this.relayUrl=e?.relayUrl||Fp,this.projectId=e.projectId,this.provider={}}async init(){this.logger.trace("Initialized"),await this.createProvider(),await Promise.all([this.messages.init(),this.transportOpen(),this.subscriber.init()]),this.registerEventListeners(),this.initialized=!0}get context(){return pt.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,r,n){this.isInitialized(),await this.publisher.publish(e,r,n),await this.recordMessageEvent({topic:e,message:r,publishedAt:Date.now()})}async subscribe(e,r){this.isInitialized();let n="";return await Promise.all([new Promise(i=>{this.subscriber.once(Dn.created,o=>{o.topic===e&&i()})}),new Promise(async i=>{n=await this.subscriber.subscribe(e,r),i()})]),n}async unsubscribe(e,r){this.isInitialized(),await this.subscriber.unsubscribe(e,r)}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async transportClose(){this.transportExplicitlyClosed=!0,this.connected&&(await this.provider.disconnect(),this.events.emit(gr.transport_closed))}async transportOpen(e){if(this.transportExplicitlyClosed=!1,!this.reconnecting){this.relayUrl=e||this.relayUrl,this.reconnecting=!0;try{await Promise.all([new Promise(r=>{this.initialized||r(),this.subscriber.once(Dn.resubscribed,()=>{r()})}),await Promise.race([new Promise(async(r,n)=>{await Fa(this.provider.connect(),5e3,"socket stalled").catch(i=>n(i)).then(()=>r()).finally(()=>this.removeListener(gr.transport_closed,this.rejectTransportOpen))}),new Promise(r=>this.once(gr.transport_closed,this.rejectTransportOpen))])])}catch(r){this.logger.error(r);const n=r;if(!this.isConnectionStalled(n.message))throw r;this.events.emit(gr.transport_closed)}finally{this.reconnecting=!1}}}async restartTransport(e){this.transportExplicitlyClosed||(this.relayUrl=e||this.relayUrl,this.connected&&await Promise.all([new Promise(r=>{this.provider.once(Po.disconnect,()=>{r()})}),this.transportClose()]),await this.createProvider(),await this.transportOpen())}isConnectionStalled(e){return this.staleConnectionErrors.some(r=>e.includes(r))}rejectTransportOpen(){throw new Error("closeTransport called before connection was established")}async createProvider(){const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new ii(new c_(L5({sdkVersion:Y8,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:r,message:n}=e;await this.messages.set(r,n)}async shouldIgnoreMessageEvent(e){const{topic:r,message:n}=e;return await this.subscriber.isSubscribed(r)?this.messages.has(r,n):!0}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),Hu(e)){if(!e.method.endsWith(G8))return;const r=e.params,{topic:n,message:i,publishedAt:o}=r.data,c={topic:n,message:i,publishedAt:o};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(_E({type:"event",event:r.id},c)),this.events.emit(r.id,c),await this.acknowledgePayload(e),await this.onMessageEvent(c)}}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(gr.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const r=ku(e.id,!0);await this.provider.connection.send(r)}registerProviderListeners(){this.provider.on(Po.payload,e=>this.onProviderPayload(e)),this.provider.on(Po.connect,()=>{this.events.emit(gr.connect)}),this.provider.on(Po.disconnect,()=>{this.onProviderDisconnect()}),this.provider.on(Po.error,e=>{this.logger.error(e),this.events.emit(gr.error,e)})}registerEventListeners(){this.events.on(gr.connection_stalled,async()=>{await this.restartTransport()})}onProviderDisconnect(){this.events.emit(gr.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||setTimeout(async()=>{await this.restartTransport()},Le.toMiliseconds(Z8))}isInitialized(){if(!this.initialized){const{message:e}=Ee("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(!this.connected){if(this.connecting)return await new Promise(e=>{const r=setInterval(()=>{this.connected&&(clearInterval(r),e())},this.connectionStatusPollingInterval)});await this.restartTransport()}}}var xE=Object.defineProperty,qp=Object.getOwnPropertySymbols,CE=Object.prototype.hasOwnProperty,IE=Object.prototype.propertyIsEnumerable,Vp=(t,e,r)=>e in t?xE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Kp=(t,e)=>{for(var r in e||(e={}))CE.call(e,r)&&Vp(t,r,e[r]);if(qp)for(var r of qp(e))IE.call(e,r)&&Vp(t,r,e[r]);return t};class Za extends X6{constructor(e,r,n,i=si,o=void 0){super(e,r,n,i),this.core=e,this.logger=r,this.name=n,this.map=new Map,this.version=J8,this.cached=[],this.initialized=!1,this.storagePrefix=si,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(c=>{this.getKey&&c!==null&&!Or(c)?this.map.set(this.getKey(c),c):nb(c)?this.map.set(c.id,c):ib(c)&&this.map.set(c.topic,c)}),this.cached=[],this.initialized=!0)},this.set=async(c,l)=>{this.isInitialized(),this.map.has(c)?await this.update(c,l):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:c,value:l}),this.map.set(c,l),await this.persist())},this.get=c=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:c}),this.getData(c)),this.getAll=c=>(this.isInitialized(),c?this.values.filter(l=>Object.keys(c).every(h=>l_(l[h],c[h]))):this.values),this.update=async(c,l)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:c,update:l});const h=Kp(Kp({},this.getData(c)),l);this.map.set(c,h),await this.persist()},this.delete=async(c,l)=>{this.isInitialized(),this.map.has(c)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:c,reason:l}),this.map.delete(c),await this.persist())},this.logger=pt.generateChildLogger(r,this.name),this.storagePrefix=i,this.getKey=o}get context(){return pt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const r=this.map.get(e);if(!r){const{message:n}=Ee("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return r}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:r}=Ee("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=Ee("NOT_INITIALIZED",this.name);throw new Error(e)}}}class SE{constructor(e,r){this.core=e,this.logger=r,this.name=tE,this.version=rE,this.events=new vr.exports,this.initialized=!1,this.storagePrefix=si,this.ignoredPayloadTypes=[Ai],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]},this.create=async()=>{this.isInitialized();const n=pu(),i=await this.core.crypto.setSymKey(n),o=Sn(Le.FIVE_MINUTES),c={protocol:Up},l={topic:i,expiry:o,relay:c,active:!1},h=K5({protocol:this.core.protocol,version:this.core.version,topic:i,symKey:n,relay:c});return await this.pairings.set(i,l),await this.core.relayer.subscribe(i),this.core.expirer.set(i,o),{topic:i,uri:h}},this.pair=async n=>{this.isInitialized(),this.isValidPair(n);const{topic:i,symKey:o,relay:c}=q5(n.uri);if(this.pairings.keys.includes(i))throw new Error(`Pairing already exists: ${i}`);if(this.core.crypto.hasKeys(i))throw new Error(`Keychain already exists: ${i}`);const l=Sn(Le.FIVE_MINUTES),h={topic:i,relay:c,expiry:l,active:!1};return await this.pairings.set(i,h),await this.core.crypto.setSymKey(o,i),await this.core.relayer.subscribe(i,{relay:c}),this.core.expirer.set(i,l),n.activatePairing&&await this.activate({topic:i}),h},this.activate=async({topic:n})=>{this.isInitialized();const i=Sn(Le.THIRTY_DAYS);await this.pairings.update(n,{active:!0,expiry:i}),this.core.expirer.set(n,i)},this.ping=async n=>{this.isInitialized(),await this.isValidPing(n);const{topic:i}=n;if(this.pairings.keys.includes(i)){const o=await this.sendRequest(i,"wc_pairingPing",{}),{done:c,resolve:l,reject:h}=vs();this.events.once(Qt("pairing_ping",o),({error:d})=>{d?h(d):l()}),await c()}},this.updateExpiry=async({topic:n,expiry:i})=>{this.isInitialized(),await this.pairings.update(n,{expiry:i})},this.updateMetadata=async({topic:n,metadata:i})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:i})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:i}=n;this.pairings.keys.includes(i)&&(await this.sendRequest(i,"wc_pairingDelete",Gt("USER_DISCONNECTED")),await this.deletePairing(i))},this.sendRequest=async(n,i,o)=>{const c=Va(i,o),l=await this.core.crypto.encode(n,c),h=To[i].req;return this.core.history.set(n,c),await this.core.relayer.publish(n,l,h),c.id},this.sendResult=async(n,i,o)=>{const c=ku(n,o),l=await this.core.crypto.encode(i,c),h=await this.core.history.get(i,n),d=To[h.request.method].res;await this.core.relayer.publish(i,l,d),await this.core.history.resolve(c)},this.sendError=async(n,i,o)=>{const c=Ka(n,o),l=await this.core.crypto.encode(i,c),h=await this.core.history.get(i,n),d=To[h.request.method]?To[h.request.method].res:To.unregistered_method.res;await this.core.relayer.publish(i,l,d),await this.core.history.resolve(c)},this.deletePairing=async(n,i)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,Gt("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),i?Promise.resolve():this.core.expirer.del(n)])},this.cleanup=async()=>{const n=this.pairings.getAll().filter(i=>ni(i.expiry));await Promise.all(n.map(i=>this.deletePairing(i.topic)))},this.onRelayEventRequest=n=>{const{topic:i,payload:o}=n,c=o.method;if(this.pairings.keys.includes(i))switch(c){case"wc_pairingPing":return this.onPairingPingRequest(i,o);case"wc_pairingDelete":return this.onPairingDeleteRequest(i,o);default:return this.onUnknownRpcMethodRequest(i,o)}},this.onRelayEventResponse=async n=>{const{topic:i,payload:o}=n,c=(await this.core.history.get(i,o.id)).request.method;if(this.pairings.keys.includes(i))switch(c){case"wc_pairingPing":return this.onPairingPingResponse(i,o);default:return this.onUnknownRpcMethodResponse(c)}},this.onPairingPingRequest=async(n,i)=>{const{id:o}=i;try{this.isValidPing({topic:n}),await this.sendResult(o,n,!0),this.events.emit("pairing_ping",{id:o,topic:n})}catch(c){await this.sendError(o,n,c),this.logger.error(c)}},this.onPairingPingResponse=(n,i)=>{const{id:o}=i;setTimeout(()=>{kn(i)?this.events.emit(Qt("pairing_ping",o),{}):vn(i)&&this.events.emit(Qt("pairing_ping",o),{error:i.error})},500)},this.onPairingDeleteRequest=async(n,i)=>{const{id:o}=i;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit("pairing_delete",{id:o,topic:n})}catch(c){await this.sendError(o,n,c),this.logger.error(c)}},this.onUnknownRpcMethodRequest=async(n,i)=>{const{id:o,method:c}=i;try{if(this.registeredMethods.includes(c))return;const l=Gt("WC_METHOD_UNSUPPORTED",c);await this.sendError(o,n,l),this.logger.error(l)}catch(l){await this.sendError(o,n,l),this.logger.error(l)}},this.onUnknownRpcMethodResponse=n=>{this.registeredMethods.includes(n)||this.logger.error(Gt("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{if(!Fr(n)){const{message:i}=Ee("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(i)}if(!rb(n.uri)){const{message:i}=Ee("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(i)}},this.isValidPing=async n=>{if(!Fr(n)){const{message:o}=Ee("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(o)}const{topic:i}=n;await this.isValidPairingTopic(i)},this.isValidDisconnect=async n=>{if(!Fr(n)){const{message:o}=Ee("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(o)}const{topic:i}=n;await this.isValidPairingTopic(i)},this.isValidPairingTopic=async n=>{if(!pr(n,!1)){const{message:i}=Ee("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(i)}if(!this.pairings.keys.includes(n)){const{message:i}=Ee("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(i)}if(ni(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:i}=Ee("EXPIRED",`pairing topic: ${n}`);throw new Error(i)}},this.core=e,this.logger=pt.generateChildLogger(r,this.name),this.pairings=new Za(this.core,this.logger,this.name,this.storagePrefix)}get context(){return pt.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=Ee("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(gr.message,async e=>{const{topic:r,message:n}=e;if(this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const i=await this.core.crypto.decode(r,n);Hu(i)?(this.core.history.set(r,i),this.onRelayEventRequest({topic:r,payload:i})):zu(i)&&(await this.core.history.resolve(i),this.onRelayEventResponse({topic:r,payload:i}))})}registerExpirerEvents(){this.core.expirer.on(rn.expired,async e=>{const{topic:r}=y1(e.target);r&&this.pairings.keys.includes(r)&&(await this.deletePairing(r,!0),this.events.emit("pairing_expire",{topic:r}))})}}class DE extends G6{constructor(e,r){super(e,r),this.core=e,this.logger=r,this.records=new Map,this.events=new vr.exports.EventEmitter,this.name=nE,this.version=iE,this.cached=[],this.initialized=!1,this.storagePrefix=si,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(n,i,o)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:i,chainId:o}),this.records.has(i.id))return;const c={id:i.id,topic:n,request:{method:i.method,params:i.params||null},chainId:o};this.records.set(c.id,c),this.events.emit(On.created,c)},this.resolve=async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const i=await this.getRecord(n.id);typeof i.response>"u"&&(i.response=vn(n)?{error:n.error}:{result:n.result},this.records.set(i.id,i),this.events.emit(On.updated,i))},this.get=async(n,i)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:i}),await this.getRecord(i)),this.delete=(n,i)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:i}),this.values.forEach(o=>{if(o.topic===n){if(typeof i<"u"&&o.id!==i)return;this.records.delete(o.id),this.events.emit(On.deleted,o)}})},this.exists=async(n,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===n:!1),this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=pt.generateChildLogger(r,this.name)}get context(){return pt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(r=>{if(typeof r.response<"u")return;const n={topic:r.topic,request:Va(r.request.method,r.request.params,r.id),chainId:r.chainId};return e.push(n)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const r=this.records.get(e);if(!r){const{message:n}=Ee("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return r}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(On.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:r}=Ee("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(On.created,e=>{const r=On.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.events.on(On.updated,e=>{const r=On.updated;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.events.on(On.deleted,e=>{const r=On.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Ee("NOT_INITIALIZED",this.name);throw new Error(e)}}}class OE extends e4{constructor(e,r){super(e,r),this.core=e,this.logger=r,this.expirations=new Map,this.events=new vr.exports.EventEmitter,this.name=sE,this.version=oE,this.cached=[],this.initialized=!1,this.storagePrefix=si,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=n=>{try{const i=this.formatTarget(n);return typeof this.getExpiration(i)<"u"}catch{return!1}},this.set=(n,i)=>{this.isInitialized();const o=this.formatTarget(n),c={target:o,expiry:i};this.expirations.set(o,c),this.checkExpiry(o,c),this.events.emit(rn.created,{target:o,expiration:c})},this.get=n=>{this.isInitialized();const i=this.formatTarget(n);return this.getExpiration(i)},this.del=n=>{if(this.isInitialized(),this.has(n)){const i=this.formatTarget(n),o=this.getExpiration(i);this.expirations.delete(i),this.events.emit(rn.deleted,{target:i,expiration:o})}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=pt.generateChildLogger(r,this.name)}get context(){return pt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if(typeof e=="string")return j5(e);if(typeof e=="number")return U5(e);const{message:r}=Ee("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw new Error(r)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(rn.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:r}=Ee("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const r=this.expirations.get(e);if(!r){const{message:n}=Ee("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return r}checkExpiry(e,r){const{expiry:n}=r;Le.toMiliseconds(n)-Date.now()<=0&&this.expire(e,r)}expire(e,r){this.expirations.delete(e),this.events.emit(rn.expired,{target:e,expiration:r})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,r)=>this.checkExpiry(r,e))}registerEventListeners(){this.core.heartbeat.on(Eo.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(rn.created,e=>{const r=rn.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(rn.expired,e=>{const r=rn.expired;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(rn.deleted,e=>{const r=rn.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Ee("NOT_INITIALIZED",this.name);throw new Error(e)}}}class AE extends t4{constructor(e,r){super(e,r),this.projectId=e,this.logger=r,this.name=Zu,this.initialized=!1,this.init=async n=>{p1()||!mu()||(this.verifyUrl=n?.verifyUrl||Bp,await this.createIframe())},this.register=async n=>{var i;this.initialized||await this.init(),this.iframe&&((i=this.iframe.contentWindow)==null||i.postMessage(n.attestationId,this.verifyUrl),this.logger.info(`postMessage sent: ${n.attestationId} ${this.verifyUrl}`))},this.resolve=async n=>{var i;if(this.isDevEnv)return"";this.logger.info(`resolving attestation: ${n.attestationId}`);const o=this.startAbortTimer(Le.FIVE_SECONDS),c=await fetch(`${this.verifyUrl}/attestation/${n.attestationId}`,{signal:this.abortController.signal});return clearTimeout(o),c.status===200?(i=await c.json())==null?void 0:i.origin:""},this.createIframe=async()=>{try{await Promise.race([new Promise((n,i)=>{if(document.getElementById(Zu))return n();const o=document.createElement("iframe");o.setAttribute("id",Zu),o.setAttribute("src",`${this.verifyUrl}/${this.projectId}`),o.style.display="none",o.addEventListener("load",()=>{this.initialized=!0,n()}),o.addEventListener("error",c=>{i(c)}),document.body.append(o),this.iframe=o}),new Promise(n=>{setTimeout(()=>n("iframe load timeout"),Le.toMiliseconds(Le.ONE_SECOND/2))})])}catch(n){this.logger.error(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.error(n)}},this.logger=pt.generateChildLogger(r,this.name),this.verifyUrl=Bp,this.abortController=new AbortController,this.isDevEnv=gu()&&process.env.IS_VITEST}get context(){return pt.getLoggerContext(this.logger)}startAbortTimer(e){return setTimeout(()=>this.abortController.abort(),Le.toMiliseconds(e))}}var $E=Object.defineProperty,Gp=Object.getOwnPropertySymbols,PE=Object.prototype.hasOwnProperty,TE=Object.prototype.propertyIsEnumerable,Zp=(t,e,r)=>e in t?$E(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Yp=(t,e)=>{for(var r in e||(e={}))PE.call(e,r)&&Zp(t,r,e[r]);if(Gp)for(var r of Gp(e))TE.call(e,r)&&Zp(t,r,e[r]);return t};class Ju extends K6{constructor(e){super(e),this.protocol=Lp,this.version=M8,this.name=Gu,this.events=new vr.exports.EventEmitter,this.initialized=!1,this.on=(n,i)=>this.events.on(n,i),this.once=(n,i)=>this.events.once(n,i),this.off=(n,i)=>this.events.off(n,i),this.removeListener=(n,i)=>this.events.removeListener(n,i),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||Fp;const r=typeof e?.logger<"u"&&typeof e?.logger!="string"?e.logger:pt.pino(pt.getDefaultLoggerOptions({level:e?.logger||L8.logger}));this.logger=pt.generateChildLogger(r,this.name),this.heartbeat=new Eo.HeartBeat,this.crypto=new cE(this,this.logger,e?.keychain),this.history=new DE(this,this.logger),this.expirer=new OE(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new Jb(Yp(Yp({},j8),e?.storageOptions)),this.relayer=new EE({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new SE(this,this.logger),this.verify=new AE(this.projectId||"",this.logger)}static async init(e){const r=new Ju(e);return await r.initialize(),r}get context(){return pt.getLoggerContext(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}const RE=Ju,Jp="wc",Xp=2,Qp="client",Xu=`${Jp}@${Xp}:${Qp}:`,Qu={name:Qp,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},NE="proposal",eg="Proposal expired",ME="session",Ya=Le.SEVEN_DAYS,LE="engine",No={wc_sessionPropose:{req:{ttl:Le.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:Le.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:Le.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:Le.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:Le.ONE_DAY,prompt:!1,tag:1104},res:{ttl:Le.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:Le.ONE_DAY,prompt:!1,tag:1106},res:{ttl:Le.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:Le.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:Le.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:Le.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:Le.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:Le.ONE_DAY,prompt:!1,tag:1112},res:{ttl:Le.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:Le.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:Le.THIRTY_SECONDS,prompt:!1,tag:1115}}},eh={min:Le.FIVE_MINUTES,max:Le.SEVEN_DAYS},jE="request",UE=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var FE=Object.defineProperty,BE=Object.defineProperties,kE=Object.getOwnPropertyDescriptors,tg=Object.getOwnPropertySymbols,HE=Object.prototype.hasOwnProperty,zE=Object.prototype.propertyIsEnumerable,rg=(t,e,r)=>e in t?FE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,nn=(t,e)=>{for(var r in e||(e={}))HE.call(e,r)&&rg(t,r,e[r]);if(tg)for(var r of tg(e))zE.call(e,r)&&rg(t,r,e[r]);return t},th=(t,e)=>BE(t,kE(e));class WE extends n4{constructor(e){super(e),this.name=LE,this.events=new vr.exports,this.initialized=!1,this.ignoredPayloadTypes=[Ai],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.client.core.pairing.register({methods:Object.keys(No)}),this.initialized=!0)},this.connect=async r=>{this.isInitialized();const n=th(nn({},r),{requiredNamespaces:r.requiredNamespaces||{},optionalNamespaces:r.optionalNamespaces||{}});await this.isValidConnect(n);const{pairingTopic:i,requiredNamespaces:o,optionalNamespaces:c,sessionProperties:l,relays:h}=n;let d=i,v,E=!1;if(d&&(E=this.client.core.pairing.pairings.get(d).active),!d||!E){const{topic:M,uri:A}=await this.client.core.pairing.create();d=M,v=A}const _=await this.client.core.crypto.generateKeyPair(),S=nn({requiredNamespaces:o,optionalNamespaces:c,relays:h??[{protocol:Up}],proposer:{publicKey:_,metadata:this.client.metadata}},l&&{sessionProperties:l}),{reject:P,resolve:L,done:k}=vs(Le.FIVE_MINUTES,eg);if(this.events.once(Qt("session_connect"),async({error:M,session:A})=>{if(M)P(M);else if(A){A.self.publicKey=_;const R=th(nn({},A),{requiredNamespaces:A.requiredNamespaces,optionalNamespaces:A.optionalNamespaces});await this.client.session.set(A.topic,R),await this.setExpiry(A.topic,A.expiry),d&&await this.client.core.pairing.updateMetadata({topic:d,metadata:A.peer.metadata}),L(R)}}),!d){const{message:M}=Ee("NO_MATCHING_KEY",`connect() pairing topic: ${d}`);throw new Error(M)}const q=await this.sendRequest(d,"wc_sessionPropose",S),T=Sn(Le.FIVE_MINUTES);return await this.setProposal(q,nn({id:q,expiry:T},S)),{uri:v,approval:k}},this.pair=async r=>(this.isInitialized(),await this.client.core.pairing.pair(r)),this.approve=async r=>{this.isInitialized(),await this.isValidApprove(r);const{id:n,relayProtocol:i,namespaces:o,sessionProperties:c}=r,l=this.client.proposal.get(n);let{pairingTopic:h,proposer:d,requiredNamespaces:v,optionalNamespaces:E}=l;h=h||"",bs(v)||(v=J5(o,"approve()"));const _=await this.client.core.crypto.generateKeyPair(),S=d.publicKey,P=await this.client.core.crypto.generateSharedKey(_,S);h&&n&&(await this.client.core.pairing.updateMetadata({topic:h,metadata:d.metadata}),await this.sendResult(n,h,{relay:{protocol:i??"irn"},responderPublicKey:_}),await this.client.proposal.delete(n,Gt("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:h}));const L=nn({relay:{protocol:i??"irn"},namespaces:o,requiredNamespaces:v,optionalNamespaces:E,pairingTopic:h,controller:{publicKey:_,metadata:this.client.metadata},expiry:Sn(Ya)},c&&{sessionProperties:c});await this.client.core.relayer.subscribe(P),await this.sendRequest(P,"wc_sessionSettle",L);const k=th(nn({},L),{topic:P,pairingTopic:h,acknowledged:!1,self:L.controller,peer:{publicKey:d.publicKey,metadata:d.metadata},controller:_});return await this.client.session.set(P,k),await this.setExpiry(P,Sn(Ya)),{topic:P,acknowledged:()=>new Promise(q=>q(this.client.session.get(P)))}},this.reject=async r=>{this.isInitialized(),await this.isValidReject(r);const{id:n,reason:i}=r,{pairingTopic:o}=this.client.proposal.get(n);o&&(await this.sendError(n,o,i),await this.client.proposal.delete(n,Gt("USER_DISCONNECTED")))},this.update=async r=>{this.isInitialized(),await this.isValidUpdate(r);const{topic:n,namespaces:i}=r,o=await this.sendRequest(n,"wc_sessionUpdate",{namespaces:i}),{done:c,resolve:l,reject:h}=vs();return this.events.once(Qt("session_update",o),({error:d})=>{d?h(d):l()}),await this.client.session.update(n,{namespaces:i}),{acknowledged:c}},this.extend=async r=>{this.isInitialized(),await this.isValidExtend(r);const{topic:n}=r,i=await this.sendRequest(n,"wc_sessionExtend",{}),{done:o,resolve:c,reject:l}=vs();return this.events.once(Qt("session_extend",i),({error:h})=>{h?l(h):c()}),await this.setExpiry(n,Sn(Ya)),{acknowledged:o}},this.request=async r=>{this.isInitialized(),await this.isValidRequest(r);const{chainId:n,request:i,topic:o,expiry:c}=r,l=await this.sendRequest(o,"wc_sessionRequest",{request:i,chainId:n},c),{done:h,resolve:d,reject:v}=vs(c);return this.events.once(Qt("session_request",l),({error:E,result:_})=>{E?v(E):d(_)}),this.client.events.emit("session_request_sent",{topic:o,request:i,chainId:n,id:l}),await h()},this.respond=async r=>{this.isInitialized(),await this.isValidRespond(r);const{topic:n,response:i}=r,{id:o}=i;kn(i)?await this.sendResult(o,n,i.result):vn(i)&&await this.sendError(o,n,i.error),this.deletePendingSessionRequest(r.response.id,{message:"fulfilled",code:0})},this.ping=async r=>{this.isInitialized(),await this.isValidPing(r);const{topic:n}=r;if(this.client.session.keys.includes(n)){const i=await this.sendRequest(n,"wc_sessionPing",{}),{done:o,resolve:c,reject:l}=vs();this.events.once(Qt("session_ping",i),({error:h})=>{h?l(h):c()}),await o()}else this.client.core.pairing.pairings.keys.includes(n)&&await this.client.core.pairing.ping({topic:n})},this.emit=async r=>{this.isInitialized(),await this.isValidEmit(r);const{topic:n,event:i,chainId:o}=r;await this.sendRequest(n,"wc_sessionEvent",{event:i,chainId:o})},this.disconnect=async r=>{this.isInitialized(),await this.isValidDisconnect(r);const{topic:n}=r;this.client.session.keys.includes(n)?(await this.sendRequest(n,"wc_sessionDelete",Gt("USER_DISCONNECTED")),await this.deleteSession(n)):await this.client.core.pairing.disconnect({topic:n})},this.find=r=>(this.isInitialized(),this.client.session.getAll().filter(n=>eb(n,r))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.deleteSession=async(r,n)=>{const{self:i}=this.client.session.get(r);await this.client.core.relayer.unsubscribe(r),await Promise.all([this.client.session.delete(r,Gt("USER_DISCONNECTED")),this.client.core.crypto.deleteKeyPair(i.publicKey),this.client.core.crypto.deleteSymKey(r),n?Promise.resolve():this.client.core.expirer.del(r)])},this.deleteProposal=async(r,n)=>{await Promise.all([this.client.proposal.delete(r,Gt("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(r)])},this.deletePendingSessionRequest=async(r,n,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(r,n),i?Promise.resolve():this.client.core.expirer.del(r)])},this.setExpiry=async(r,n)=>{this.client.session.keys.includes(r)&&await this.client.session.update(r,{expiry:n}),this.client.core.expirer.set(r,n)},this.setProposal=async(r,n)=>{await this.client.proposal.set(r,n),this.client.core.expirer.set(r,n.expiry)},this.setPendingSessionRequest=async r=>{const n=No.wc_sessionRequest.req.ttl,{id:i,topic:o,params:c}=r;await this.client.pendingRequest.set(i,{id:i,topic:o,params:c}),n&&this.client.core.expirer.set(i,Sn(n))},this.sendRequest=async(r,n,i,o)=>{const c=Va(n,i);if(mu()&&UE.includes(n)){const d=$i(JSON.stringify(c));await this.client.core.verify.register({attestationId:d})}const l=await this.client.core.crypto.encode(r,c),h=No[n].req;return o&&(h.ttl=o),this.client.core.history.set(r,c),this.client.core.relayer.publish(r,l,h),c.id},this.sendResult=async(r,n,i)=>{const o=ku(r,i),c=await this.client.core.crypto.encode(n,o),l=await this.client.core.history.get(n,r),h=No[l.request.method].res;this.client.core.relayer.publish(n,c,h),await this.client.core.history.resolve(o)},this.sendError=async(r,n,i)=>{const o=Ka(r,i),c=await this.client.core.crypto.encode(n,o),l=await this.client.core.history.get(n,r),h=No[l.request.method].res;this.client.core.relayer.publish(n,c,h),await this.client.core.history.resolve(o)},this.cleanup=async()=>{const r=[],n=[];this.client.session.getAll().forEach(i=>{ni(i.expiry)&&r.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{ni(i.expiry)&&n.push(i.id)}),await Promise.all([...r.map(i=>this.deleteSession(i)),...n.map(i=>this.deleteProposal(i))])},this.onRelayEventRequest=r=>{const{topic:n,payload:i}=r,o=i.method;switch(o){case"wc_sessionPropose":return this.onSessionProposeRequest(n,i);case"wc_sessionSettle":return this.onSessionSettleRequest(n,i);case"wc_sessionUpdate":return this.onSessionUpdateRequest(n,i);case"wc_sessionExtend":return this.onSessionExtendRequest(n,i);case"wc_sessionPing":return this.onSessionPingRequest(n,i);case"wc_sessionDelete":return this.onSessionDeleteRequest(n,i);case"wc_sessionRequest":return this.onSessionRequest(n,i);case"wc_sessionEvent":return this.onSessionEventRequest(n,i);default:return this.client.logger.info(`Unsupported request method ${o}`)}},this.onRelayEventResponse=async r=>{const{topic:n,payload:i}=r,o=(await this.client.core.history.get(n,i.id)).request.method;switch(o){case"wc_sessionPropose":return this.onSessionProposeResponse(n,i);case"wc_sessionSettle":return this.onSessionSettleResponse(n,i);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,i);case"wc_sessionExtend":return this.onSessionExtendResponse(n,i);case"wc_sessionPing":return this.onSessionPingResponse(n,i);case"wc_sessionRequest":return this.onSessionRequestResponse(n,i);default:return this.client.logger.info(`Unsupported response method ${o}`)}},this.onSessionProposeRequest=async(r,n)=>{const{params:i,id:o}=n;try{this.isValidConnect(nn({},n.params));const c=Sn(Le.FIVE_MINUTES),l=nn({id:o,pairingTopic:r,expiry:c},i);await this.setProposal(o,l);const h=$i(JSON.stringify(n)),d=await this.getVerifyContext(h,l.proposer.metadata);this.client.events.emit("session_proposal",{id:o,params:l,context:d})}catch(c){await this.sendError(o,r,c),this.client.logger.error(c)}},this.onSessionProposeResponse=async(r,n)=>{const{id:i}=n;if(kn(n)){const{result:o}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:o});const c=this.client.proposal.get(i);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:c});const l=c.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:l});const h=o.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:h});const d=await this.client.core.crypto.generateSharedKey(l,h);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:d});const v=await this.client.core.relayer.subscribe(d);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:v}),await this.client.core.pairing.activate({topic:r})}else vn(n)&&(await this.client.proposal.delete(i,Gt("USER_DISCONNECTED")),this.events.emit(Qt("session_connect"),{error:n.error}))},this.onSessionSettleRequest=async(r,n)=>{const{id:i,params:o}=n;try{this.isValidSessionSettleRequest(o);const{relay:c,controller:l,expiry:h,namespaces:d,requiredNamespaces:v,optionalNamespaces:E,sessionProperties:_,pairingTopic:S}=n.params,P=nn({topic:r,relay:c,expiry:h,namespaces:d,acknowledged:!0,pairingTopic:S,requiredNamespaces:v,optionalNamespaces:E,controller:l.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:l.publicKey,metadata:l.metadata}},_&&{sessionProperties:_});await this.sendResult(n.id,r,!0),this.events.emit(Qt("session_connect"),{session:P})}catch(c){await this.sendError(i,r,c),this.client.logger.error(c)}},this.onSessionSettleResponse=async(r,n)=>{const{id:i}=n;kn(n)?(await this.client.session.update(r,{acknowledged:!0}),this.events.emit(Qt("session_approve",i),{})):vn(n)&&(await this.client.session.delete(r,Gt("USER_DISCONNECTED")),this.events.emit(Qt("session_approve",i),{error:n.error}))},this.onSessionUpdateRequest=async(r,n)=>{const{params:i,id:o}=n;try{this.isValidUpdate(nn({topic:r},i)),await this.client.session.update(r,{namespaces:i.namespaces}),await this.sendResult(o,r,!0),this.client.events.emit("session_update",{id:o,topic:r,params:i})}catch(c){await this.sendError(o,r,c),this.client.logger.error(c)}},this.onSessionUpdateResponse=(r,n)=>{const{id:i}=n;kn(n)?this.events.emit(Qt("session_update",i),{}):vn(n)&&this.events.emit(Qt("session_update",i),{error:n.error})},this.onSessionExtendRequest=async(r,n)=>{const{id:i}=n;try{this.isValidExtend({topic:r}),await this.setExpiry(r,Sn(Ya)),await this.sendResult(i,r,!0),this.client.events.emit("session_extend",{id:i,topic:r})}catch(o){await this.sendError(i,r,o),this.client.logger.error(o)}},this.onSessionExtendResponse=(r,n)=>{const{id:i}=n;kn(n)?this.events.emit(Qt("session_extend",i),{}):vn(n)&&this.events.emit(Qt("session_extend",i),{error:n.error})},this.onSessionPingRequest=async(r,n)=>{const{id:i}=n;try{this.isValidPing({topic:r}),await this.sendResult(i,r,!0),this.client.events.emit("session_ping",{id:i,topic:r})}catch(o){await this.sendError(i,r,o),this.client.logger.error(o)}},this.onSessionPingResponse=(r,n)=>{const{id:i}=n;setTimeout(()=>{kn(n)?this.events.emit(Qt("session_ping",i),{}):vn(n)&&this.events.emit(Qt("session_ping",i),{error:n.error})},500)},this.onSessionDeleteRequest=async(r,n)=>{const{id:i}=n;try{this.isValidDisconnect({topic:r,reason:n.params}),await Promise.all([new Promise(o=>{this.client.core.relayer.once(gr.publish,async()=>{o(await this.deleteSession(r))})}),this.sendResult(i,r,!0)]),this.client.events.emit("session_delete",{id:i,topic:r})}catch(o){await this.sendError(i,r,o),this.client.logger.error(o)}},this.onSessionRequest=async(r,n)=>{const{id:i,params:o}=n;try{this.isValidRequest(nn({topic:r},o)),await this.setPendingSessionRequest({id:i,topic:r,params:o});const c=$i(JSON.stringify(n)),l=this.client.session.get(r),h=await this.getVerifyContext(c,l.peer.metadata);this.client.events.emit("session_request",{id:i,topic:r,params:o,context:h})}catch(c){await this.sendError(i,r,c),this.client.logger.error(c)}},this.onSessionRequestResponse=(r,n)=>{const{id:i}=n;kn(n)?this.events.emit(Qt("session_request",i),{result:n.result}):vn(n)&&this.events.emit(Qt("session_request",i),{error:n.error})},this.onSessionEventRequest=async(r,n)=>{const{id:i,params:o}=n;try{this.isValidEmit(nn({topic:r},o)),this.client.events.emit("session_event",{id:i,topic:r,params:o})}catch(c){await this.sendError(i,r,c),this.client.logger.error(c)}},this.isValidConnect=async r=>{if(!Fr(r)){const{message:h}=Ee("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(r)}`);throw new Error(h)}const{pairingTopic:n,requiredNamespaces:i,optionalNamespaces:o,sessionProperties:c,relays:l}=r;if(Or(n)||await this.isValidPairingTopic(n),!fb(l,!0)){const{message:h}=Ee("MISSING_OR_INVALID",`connect() relays: ${l}`);throw new Error(h)}!Or(i)&&bs(i)!==0&&this.validateNamespaces(i,"requiredNamespaces"),!Or(o)&&bs(o)!==0&&this.validateNamespaces(o,"optionalNamespaces"),Or(c)||this.validateSessionProps(c,"sessionProperties")},this.validateNamespaces=(r,n)=>{const i=hb(r,"connect()",n);if(i)throw new Error(i.message)},this.isValidApprove=async r=>{if(!Fr(r))throw new Error(Ee("MISSING_OR_INVALID",`approve() params: ${r}`).message);const{id:n,namespaces:i,relayProtocol:o,sessionProperties:c}=r;await this.isValidProposalId(n);const l=this.client.proposal.get(n),h=Ha(i,"approve()");if(h)throw new Error(h.message);const d=D1(l.requiredNamespaces,i,"approve()");if(d)throw new Error(d.message);if(!pr(o,!0)){const{message:v}=Ee("MISSING_OR_INVALID",`approve() relayProtocol: ${o}`);throw new Error(v)}Or(c)||this.validateSessionProps(c,"sessionProperties")},this.isValidReject=async r=>{if(!Fr(r)){const{message:o}=Ee("MISSING_OR_INVALID",`reject() params: ${r}`);throw new Error(o)}const{id:n,reason:i}=r;if(await this.isValidProposalId(n),!pb(i)){const{message:o}=Ee("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(o)}},this.isValidSessionSettleRequest=r=>{if(!Fr(r)){const{message:d}=Ee("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${r}`);throw new Error(d)}const{relay:n,controller:i,namespaces:o,expiry:c}=r;if(!I1(n)){const{message:d}=Ee("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(d)}const l=sb(i,"onSessionSettleRequest()");if(l)throw new Error(l.message);const h=Ha(o,"onSessionSettleRequest()");if(h)throw new Error(h.message);if(ni(c)){const{message:d}=Ee("EXPIRED","onSessionSettleRequest()");throw new Error(d)}},this.isValidUpdate=async r=>{if(!Fr(r)){const{message:h}=Ee("MISSING_OR_INVALID",`update() params: ${r}`);throw new Error(h)}const{topic:n,namespaces:i}=r;await this.isValidSessionTopic(n);const o=this.client.session.get(n),c=Ha(i,"update()");if(c)throw new Error(c.message);const l=D1(o.requiredNamespaces,i,"update()");if(l)throw new Error(l.message)},this.isValidExtend=async r=>{if(!Fr(r)){const{message:i}=Ee("MISSING_OR_INVALID",`extend() params: ${r}`);throw new Error(i)}const{topic:n}=r;await this.isValidSessionTopic(n)},this.isValidRequest=async r=>{if(!Fr(r)){const{message:h}=Ee("MISSING_OR_INVALID",`request() params: ${r}`);throw new Error(h)}const{topic:n,request:i,chainId:o,expiry:c}=r;await this.isValidSessionTopic(n);const{namespaces:l}=this.client.session.get(n);if(!S1(l,o)){const{message:h}=Ee("MISSING_OR_INVALID",`request() chainId: ${o}`);throw new Error(h)}if(!gb(i)){const{message:h}=Ee("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(h)}if(!vb(l,o,i.method)){const{message:h}=Ee("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(h)}if(c&&!Eb(c,eh)){const{message:h}=Ee("MISSING_OR_INVALID",`request() expiry: ${c}. Expiry must be a number (in seconds) between ${eh.min} and ${eh.max}`);throw new Error(h)}},this.isValidRespond=async r=>{if(!Fr(r)){const{message:o}=Ee("MISSING_OR_INVALID",`respond() params: ${r}`);throw new Error(o)}const{topic:n,response:i}=r;if(await this.isValidSessionTopic(n),!mb(i)){const{message:o}=Ee("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(i)}`);throw new Error(o)}},this.isValidPing=async r=>{if(!Fr(r)){const{message:i}=Ee("MISSING_OR_INVALID",`ping() params: ${r}`);throw new Error(i)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)},this.isValidEmit=async r=>{if(!Fr(r)){const{message:l}=Ee("MISSING_OR_INVALID",`emit() params: ${r}`);throw new Error(l)}const{topic:n,event:i,chainId:o}=r;await this.isValidSessionTopic(n);const{namespaces:c}=this.client.session.get(n);if(!S1(c,o)){const{message:l}=Ee("MISSING_OR_INVALID",`emit() chainId: ${o}`);throw new Error(l)}if(!wb(i)){const{message:l}=Ee("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(l)}if(!yb(c,o,i.name)){const{message:l}=Ee("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(l)}},this.isValidDisconnect=async r=>{if(!Fr(r)){const{message:i}=Ee("MISSING_OR_INVALID",`disconnect() params: ${r}`);throw new Error(i)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)},this.getVerifyContext=async(r,n)=>{const i={verified:{verifyUrl:n.verifyUrl||"",validation:"UNKNOWN",origin:n.url||""}};try{const o=await this.client.core.verify.resolve({attestationId:r,verifyUrl:n.verifyUrl});o&&(i.verified.origin=o,i.verified.validation=o===n.url?"VALID":"INVALID")}catch(o){this.client.logger.error(o)}return this.client.logger.info(`Verify context: ${JSON.stringify(i)}`),i},this.validateSessionProps=(r,n)=>{Object.values(r).forEach(i=>{if(!pr(i,!1)){const{message:o}=Ee("MISSING_OR_INVALID",`${n} must be in Record<string, string> format. Received: ${JSON.stringify(i)}`);throw new Error(o)}})}}isInitialized(){if(!this.initialized){const{message:e}=Ee("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.client.core.relayer.on(gr.message,async e=>{const{topic:r,message:n}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const i=await this.client.core.crypto.decode(r,n);Hu(i)?(this.client.core.history.set(r,i),this.onRelayEventRequest({topic:r,payload:i})):zu(i)&&(await this.client.core.history.resolve(i),this.onRelayEventResponse({topic:r,payload:i}))})}registerExpirerEvents(){this.client.core.expirer.on(rn.expired,async e=>{const{topic:r,id:n}=y1(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,Ee("EXPIRED"),!0);r?this.client.session.keys.includes(r)&&(await this.deleteSession(r,!0),this.client.events.emit("session_expire",{topic:r})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}isValidPairingTopic(e){if(!pr(e,!1)){const{message:r}=Ee("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(r)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:r}=Ee("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(r)}if(ni(this.client.core.pairing.pairings.get(e).expiry)){const{message:r}=Ee("EXPIRED",`pairing topic: ${e}`);throw new Error(r)}}async isValidSessionTopic(e){if(!pr(e,!1)){const{message:r}=Ee("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(r)}if(!this.client.session.keys.includes(e)){const{message:r}=Ee("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(r)}if(ni(this.client.session.get(e).expiry)){await this.deleteSession(e);const{message:r}=Ee("EXPIRED",`session topic: ${e}`);throw new Error(r)}}async isValidSessionOrPairingTopic(e){if(this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(pr(e,!1)){const{message:r}=Ee("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(r)}else{const{message:r}=Ee("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(r)}}async isValidProposalId(e){if(!db(e)){const{message:r}=Ee("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(r)}if(!this.client.proposal.keys.includes(e)){const{message:r}=Ee("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(r)}if(ni(this.client.proposal.get(e).expiry)){await this.deleteProposal(e);const{message:r}=Ee("EXPIRED",`proposal id: ${e}`);throw new Error(r)}}}class qE extends Za{constructor(e,r){super(e,r,NE,Xu),this.core=e,this.logger=r}}class VE extends Za{constructor(e,r){super(e,r,ME,Xu),this.core=e,this.logger=r}}class KE extends Za{constructor(e,r){super(e,r,jE,Xu,n=>n.id),this.core=e,this.logger=r}}class rh extends r4{constructor(e){super(e),this.protocol=Jp,this.version=Xp,this.name=Qu.name,this.events=new vr.exports.EventEmitter,this.on=(n,i)=>this.events.on(n,i),this.once=(n,i)=>this.events.once(n,i),this.off=(n,i)=>this.events.off(n,i),this.removeListener=(n,i)=>this.events.removeListener(n,i),this.removeAllListeners=n=>this.events.removeAllListeners(n),this.connect=async n=>{try{return await this.engine.connect(n)}catch(i){throw this.logger.error(i.message),i}},this.pair=async n=>{try{return await this.engine.pair(n)}catch(i){throw this.logger.error(i.message),i}},this.approve=async n=>{try{return await this.engine.approve(n)}catch(i){throw this.logger.error(i.message),i}},this.reject=async n=>{try{return await this.engine.reject(n)}catch(i){throw this.logger.error(i.message),i}},this.update=async n=>{try{return await this.engine.update(n)}catch(i){throw this.logger.error(i.message),i}},this.extend=async n=>{try{return await this.engine.extend(n)}catch(i){throw this.logger.error(i.message),i}},this.request=async n=>{try{return await this.engine.request(n)}catch(i){throw this.logger.error(i.message),i}},this.respond=async n=>{try{return await this.engine.respond(n)}catch(i){throw this.logger.error(i.message),i}},this.ping=async n=>{try{return await this.engine.ping(n)}catch(i){throw this.logger.error(i.message),i}},this.emit=async n=>{try{return await this.engine.emit(n)}catch(i){throw this.logger.error(i.message),i}},this.disconnect=async n=>{try{return await this.engine.disconnect(n)}catch(i){throw this.logger.error(i.message),i}},this.find=n=>{try{return this.engine.find(n)}catch(i){throw this.logger.error(i.message),i}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}},this.name=e?.name||Qu.name,this.metadata=e?.metadata||T5();const r=typeof e?.logger<"u"&&typeof e?.logger!="string"?e.logger:pt.pino(pt.getDefaultLoggerOptions({level:e?.logger||Qu.logger}));this.core=e?.core||new RE(e),this.logger=pt.generateChildLogger(r,this.name),this.session=new VE(this.core,this.logger),this.proposal=new qE(this.core,this.logger),this.pendingRequest=new KE(this.core,this.logger),this.engine=new WE(this)}static async init(e){const r=new rh(e);return await r.initialize(),r}get context(){return pt.getLoggerContext(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}}var nh={exports:{}};(function(t,e){var r=typeof self<"u"?self:dr,n=function(){function o(){this.fetch=!1,this.DOMException=r.DOMException}return o.prototype=r,new o}();(function(o){(function(c){var l={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function h(D){return D&&DataView.prototype.isPrototypeOf(D)}if(l.arrayBuffer)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],v=ArrayBuffer.isView||function(D){return D&&d.indexOf(Object.prototype.toString.call(D))>-1};function E(D){if(typeof D!="string"&&(D=String(D)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(D))throw new TypeError("Invalid character in header field name");return D.toLowerCase()}function _(D){return typeof D!="string"&&(D=String(D)),D}function S(D){var U={next:function(){var ae=D.shift();return{done:ae===void 0,value:ae}}};return l.iterable&&(U[Symbol.iterator]=function(){return U}),U}function P(D){this.map={},D instanceof P?D.forEach(function(U,ae){this.append(ae,U)},this):Array.isArray(D)?D.forEach(function(U){this.append(U[0],U[1])},this):D&&Object.getOwnPropertyNames(D).forEach(function(U){this.append(U,D[U])},this)}P.prototype.append=function(D,U){D=E(D),U=_(U);var ae=this.map[D];this.map[D]=ae?ae+", "+U:U},P.prototype.delete=function(D){delete this.map[E(D)]},P.prototype.get=function(D){return D=E(D),this.has(D)?this.map[D]:null},P.prototype.has=function(D){return this.map.hasOwnProperty(E(D))},P.prototype.set=function(D,U){this.map[E(D)]=_(U)},P.prototype.forEach=function(D,U){for(var ae in this.map)this.map.hasOwnProperty(ae)&&D.call(U,this.map[ae],ae,this)},P.prototype.keys=function(){var D=[];return this.forEach(function(U,ae){D.push(ae)}),S(D)},P.prototype.values=function(){var D=[];return this.forEach(function(U){D.push(U)}),S(D)},P.prototype.entries=function(){var D=[];return this.forEach(function(U,ae){D.push([ae,U])}),S(D)},l.iterable&&(P.prototype[Symbol.iterator]=P.prototype.entries);function L(D){if(D.bodyUsed)return Promise.reject(new TypeError("Already read"));D.bodyUsed=!0}function k(D){return new Promise(function(U,ae){D.onload=function(){U(D.result)},D.onerror=function(){ae(D.error)}})}function q(D){var U=new FileReader,ae=k(U);return U.readAsArrayBuffer(D),ae}function T(D){var U=new FileReader,ae=k(U);return U.readAsText(D),ae}function M(D){for(var U=new Uint8Array(D),ae=new Array(U.length),le=0;le<U.length;le++)ae[le]=String.fromCharCode(U[le]);return ae.join("")}function A(D){if(D.slice)return D.slice(0);var U=new Uint8Array(D.byteLength);return U.set(new Uint8Array(D)),U.buffer}function R(){return this.bodyUsed=!1,this._initBody=function(D){this._bodyInit=D,D?typeof D=="string"?this._bodyText=D:l.blob&&Blob.prototype.isPrototypeOf(D)?this._bodyBlob=D:l.formData&&FormData.prototype.isPrototypeOf(D)?this._bodyFormData=D:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(D)?this._bodyText=D.toString():l.arrayBuffer&&l.blob&&h(D)?(this._bodyArrayBuffer=A(D.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(D)||v(D))?this._bodyArrayBuffer=A(D):this._bodyText=D=Object.prototype.toString.call(D):this._bodyText="",this.headers.get("content-type")||(typeof D=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(D)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var D=L(this);if(D)return D;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?L(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(q)}),this.text=function(){var D=L(this);if(D)return D;if(this._bodyBlob)return T(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(M(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(J)}),this.json=function(){return this.text().then(JSON.parse)},this}var C=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function f(D){var U=D.toUpperCase();return C.indexOf(U)>-1?U:D}function x(D,U){U=U||{};var ae=U.body;if(D instanceof x){if(D.bodyUsed)throw new TypeError("Already read");this.url=D.url,this.credentials=D.credentials,U.headers||(this.headers=new P(D.headers)),this.method=D.method,this.mode=D.mode,this.signal=D.signal,!ae&&D._bodyInit!=null&&(ae=D._bodyInit,D.bodyUsed=!0)}else this.url=String(D);if(this.credentials=U.credentials||this.credentials||"same-origin",(U.headers||!this.headers)&&(this.headers=new P(U.headers)),this.method=f(U.method||this.method||"GET"),this.mode=U.mode||this.mode||null,this.signal=U.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&ae)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(ae)}x.prototype.clone=function(){return new x(this,{body:this._bodyInit})};function J(D){var U=new FormData;return D.trim().split("&").forEach(function(ae){if(ae){var le=ae.split("="),re=le.shift().replace(/\+/g," "),ne=le.join("=").replace(/\+/g," ");U.append(decodeURIComponent(re),decodeURIComponent(ne))}}),U}function z(D){var U=new P,ae=D.replace(/\r?\n[\t ]+/g," ");return ae.split(/\r?\n/).forEach(function(le){var re=le.split(":"),ne=re.shift().trim();if(ne){var oe=re.join(":").trim();U.append(ne,oe)}}),U}R.call(x.prototype);function ee(D,U){U||(U={}),this.type="default",this.status=U.status===void 0?200:U.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in U?U.statusText:"OK",this.headers=new P(U.headers),this.url=U.url||"",this._initBody(D)}R.call(ee.prototype),ee.prototype.clone=function(){return new ee(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new P(this.headers),url:this.url})},ee.error=function(){var D=new ee(null,{status:0,statusText:""});return D.type="error",D};var de=[301,302,303,307,308];ee.redirect=function(D,U){if(de.indexOf(U)===-1)throw new RangeError("Invalid status code");return new ee(null,{status:U,headers:{location:D}})},c.DOMException=o.DOMException;try{new c.DOMException}catch{c.DOMException=function(U,ae){this.message=U,this.name=ae;var le=Error(U);this.stack=le.stack},c.DOMException.prototype=Object.create(Error.prototype),c.DOMException.prototype.constructor=c.DOMException}function me(D,U){return new Promise(function(ae,le){var re=new x(D,U);if(re.signal&&re.signal.aborted)return le(new c.DOMException("Aborted","AbortError"));var ne=new XMLHttpRequest;function oe(){ne.abort()}ne.onload=function(){var ie={status:ne.status,statusText:ne.statusText,headers:z(ne.getAllResponseHeaders()||"")};ie.url="responseURL"in ne?ne.responseURL:ie.headers.get("X-Request-URL");var Se="response"in ne?ne.response:ne.responseText;ae(new ee(Se,ie))},ne.onerror=function(){le(new TypeError("Network request failed"))},ne.ontimeout=function(){le(new TypeError("Network request failed"))},ne.onabort=function(){le(new c.DOMException("Aborted","AbortError"))},ne.open(re.method,re.url,!0),re.credentials==="include"?ne.withCredentials=!0:re.credentials==="omit"&&(ne.withCredentials=!1),"responseType"in ne&&l.blob&&(ne.responseType="blob"),re.headers.forEach(function(ie,Se){ne.setRequestHeader(Se,ie)}),re.signal&&(re.signal.addEventListener("abort",oe),ne.onreadystatechange=function(){ne.readyState===4&&re.signal.removeEventListener("abort",oe)}),ne.send(typeof re._bodyInit>"u"?null:re._bodyInit)})}return me.polyfill=!0,o.fetch||(o.fetch=me,o.Headers=P,o.Request=x,o.Response=ee),c.Headers=P,c.Request=x,c.Response=ee,c.fetch=me,Object.defineProperty(c,"__esModule",{value:!0}),c})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(nh,nh.exports);var ng=Zm(nh.exports);const ig={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"},sg=10;class Li{constructor(e){if(this.url=e,this.events=new vr.exports.EventEmitter,this.isAvailable=!1,this.registering=!1,!dp(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,r){this.isAvailable||await this.register();try{const n=Do(e),o=await(await ng(this.url,Object.assign(Object.assign({},ig),{body:n}))).json();this.onPayload({data:o})}catch(n){this.onError(e.id,n)}}async register(e=this.url){if(!dp(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,i)=>{this.events.once("register_error",o=>{this.resetMaxListeners(),i(o)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return i(new Error("HTTP connection is missing or invalid"));n()})})}this.url=e,this.registering=!0;try{const r=Do({id:1,jsonrpc:"2.0",method:"test",params:[]});await ng(e,Object.assign(Object.assign({},ig),{body:r})),this.onOpen()}catch(r){const n=this.parseError(r);throw this.events.emit("register_error",n),this.onClose(),n}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const r=typeof e.data=="string"?Mu(e.data):e.data;this.events.emit("payload",r)}onError(e,r){const n=this.parseError(r),i=n.message||n.toString(),o=Ka(e,i);this.events.emit("payload",o)}parseError(e,r=this.url){return op(e,r,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>sg&&this.events.setMaxListeners(sg)}}const og="error",GE="wss://relay.walletconnect.com",ZE="wc",YE="universal_provider",ag=`${ZE}@${2}:${YE}:`,JE="https://rpc.walletconnect.com/v1",oi={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var Mo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ih={exports:{}};/**
|
|
72
|
+
***************************************************************************** */var Zu=function(t,e){return Zu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},Zu(t,e)};function W4(t,e){Zu(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Yu=function(){return Yu=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Yu.apply(this,arguments)};function q4(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function V4(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(o=(i<3?c(o):i>3?c(e,r,o):c(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o}function K4(t,e){return function(r,n){e(r,n,t)}}function G4(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function Z4(t,e,r,n){function i(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function l(v){try{d(n.next(v))}catch(E){c(E)}}function h(v){try{d(n.throw(v))}catch(E){c(E)}}function d(v){v.done?o(v.value):i(v.value).then(l,h)}d((n=n.apply(t,e||[])).next())})}function Y4(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(d){return function(v){return h([d,v])}}function h(d){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=d[0]&2?i.return:d[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,d[1])).done)return o;switch(i=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,i=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){r.label=d[1];break}if(d[0]===6&&r.label<o[1]){r.label=o[1],o=d;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(d);break}o[2]&&r.ops.pop(),r.trys.pop();continue}d=e.call(t,r)}catch(v){d=[6,v],i=0}finally{n=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function J4(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function X4(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function Ju(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function bp(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],c;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(l){c={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return o}function Q4(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(bp(arguments[e]));return t}function e_(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var o=arguments[e],c=0,l=o.length;c<l;c++,i++)n[i]=o[c];return n}function jo(t){return this instanceof jo?(this.v=t,this):new jo(t)}function t_(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,o=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(_){n[_]&&(i[_]=function(O){return new Promise(function(P,U){o.push([_,O,P,U])>1||l(_,O)})})}function l(_,O){try{h(n[_](O))}catch(P){E(o[0][3],P)}}function h(_){_.value instanceof jo?Promise.resolve(_.value.v).then(d,v):E(o[0][2],_)}function d(_){l("next",_)}function v(_){l("throw",_)}function E(_,O){_(O),o.shift(),o.length&&l(o[0][0],o[0][1])}}function r_(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,o){e[i]=t[i]?function(c){return(r=!r)?{value:jo(t[i](c)),done:i==="return"}:o?o(c):c}:o}}function n_(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Ju=="function"?Ju(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(c){return new Promise(function(l,h){c=t[o](c),i(l,h,c.done,c.value)})}}function i(o,c,l,h){Promise.resolve(h).then(function(d){o({value:d,done:l})},c)}}function i_(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function s_(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function o_(t){return t&&t.__esModule?t:{default:t}}function a_(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function c_(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}var l_=Object.freeze({__proto__:null,__extends:W4,get __assign(){return Yu},__rest:q4,__decorate:V4,__param:K4,__metadata:G4,__awaiter:Z4,__generator:Y4,__createBinding:J4,__exportStar:X4,__values:Ju,__read:bp,__spread:Q4,__spreadArrays:e_,__await:jo,__asyncGenerator:t_,__asyncDelegator:r_,__asyncValues:n_,__makeTemplateObject:i_,__importStar:s_,__importDefault:o_,__classPrivateFieldGet:a_,__classPrivateFieldSet:c_}),u_=Li(l_),zn={},_p;function h_(){if(_p)return zn;_p=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.isBrowserCryptoAvailable=zn.getSubtleCrypto=zn.getBrowerCrypto=void 0;function t(){return dr?.crypto||dr?.msCrypto||{}}zn.getBrowerCrypto=t;function e(){const n=t();return n.subtle||n.webkitSubtle}zn.getSubtleCrypto=e;function r(){return!!t()&&!!e()}return zn.isBrowserCryptoAvailable=r,zn}var Wn={},Ep;function f_(){if(Ep)return Wn;Ep=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.isBrowser=Wn.isNode=Wn.isReactNative=void 0;function t(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}Wn.isReactNative=t;function e(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}Wn.isNode=e;function r(){return!t()&&!e()}return Wn.isBrowser=r,Wn}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=u_;e.__exportStar(h_(),t),e.__exportStar(f_(),t)})(yp);function xp(t=3){const e=Date.now()*Math.pow(10,t),r=Math.floor(Math.random()*Math.pow(10,t));return e+r}function Cp(t=6){return BigInt(xp(t))}function ec(t,e,r){return{id:r||xp(),jsonrpc:"2.0",method:t,params:e}}function Xu(t,e){return{id:t,jsonrpc:"2.0",result:e}}function tc(t,e,r){return{id:t,jsonrpc:"2.0",error:d_(e,r)}}function d_(t,e){return typeof t>"u"?wp(gp):(typeof t=="string"&&(t=Object.assign(Object.assign({},wp(Gu)),{message:t})),typeof e<"u"&&(t.data=e),H4(t.code)&&(t=z4(t.code)),t)}class p_{}class g_ extends p_{constructor(){super()}}class m_ extends g_{constructor(e){super()}}const w_="^https?:",v_="^wss?:";function y_(t){const e=t.match(new RegExp(/^\w+:/,"gi"));if(!(!e||!e.length))return e[0]}function Ip(t,e){const r=y_(t);return typeof r>"u"?!1:new RegExp(e).test(r)}function Sp(t){return Ip(t,w_)}function Op(t){return Ip(t,v_)}function b_(t){return new RegExp("wss?://localhost(:d{2,5})?").test(t)}function Dp(t){return typeof t=="object"&&"id"in t&&"jsonrpc"in t&&t.jsonrpc==="2.0"}function Qu(t){return Dp(t)&&"method"in t}function rc(t){return Dp(t)&&(qn(t)||_n(t))}function qn(t){return"result"in t}function _n(t){return"error"in t}class ui extends m_{constructor(e){super(e),this.events=new yr.exports.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async request(e,r){return this.requestStrict(ec(e.method,e.params||[],e.id||Cp().toString()),r)}async requestStrict(e,r){return new Promise(async(n,i)=>{if(!this.connection.connected)try{await this.open()}catch(o){i(o)}this.events.on(`${e.id}`,o=>{_n(o)?i(o.error):n(o.result)});try{await this.connection.send(e,r)}catch(o){i(o)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),rc(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const Ap=10,__=()=>typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:require("ws"),E_=()=>typeof window<"u",x_=__();class C_{constructor(e){if(this.url=e,this.events=new yr.exports.EventEmitter,this.registering=!1,!Op(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async open(e=this.url){await this.register(e)}async close(){return new Promise((e,r)=>{if(typeof this.socket>"u"){r(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),e()},this.socket.close()})}async send(e,r){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(Mo(e))}catch(n){this.onError(e.id,n)}}register(e=this.url){if(!Op(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,i)=>{this.events.once("register_error",o=>{this.resetMaxListeners(),i(o)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return i(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=e,this.registering=!0,new Promise((r,n)=>{const i=yp.isReactNative()?void 0:{rejectUnauthorized:!b_(e)},o=new x_(e,[],i);E_()?o.onerror=c=>{const l=c;n(this.emitError(l.error))}:o.on("error",c=>{n(this.emitError(c))}),o.onopen=()=>{this.onOpen(o),r(o)}})}onOpen(e){e.onmessage=r=>this.onPayload(r),e.onclose=r=>this.onClose(r),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const r=typeof e.data=="string"?Vu(e.data):e.data;this.events.emit("payload",r)}onError(e,r){const n=this.parseError(r),i=n.message||n.toString(),o=tc(e,i);this.events.emit("payload",o)}parseError(e,r=this.url){return vp(e,r,"WS")}resetMaxListeners(){this.events.getMaxListeners()>Ap&&this.events.setMaxListeners(Ap)}emitError(e){const r=this.parseError(new Error(e?.message||`WebSocket connection failed for URL: ${this.url}`));return this.events.emit("register_error",r),r}}var eh={exports:{}};(function(t,e){var r=200,n="__lodash_hash_undefined__",i=1,o=2,c=9007199254740991,l="[object Arguments]",h="[object Array]",d="[object AsyncFunction]",v="[object Boolean]",E="[object Date]",_="[object Error]",O="[object Function]",P="[object GeneratorFunction]",U="[object Map]",H="[object Number]",G="[object Null]",N="[object Object]",L="[object Promise]",$="[object Proxy]",T="[object RegExp]",I="[object Set]",f="[object String]",x="[object Symbol]",J="[object Undefined]",z="[object WeakMap]",ee="[object ArrayBuffer]",de="[object DataView]",me="[object Float32Array]",S="[object Float64Array]",j="[object Int8Array]",ce="[object Int16Array]",le="[object Int32Array]",re="[object Uint8Array]",ne="[object Uint8ClampedArray]",ae="[object Uint16Array]",ie="[object Uint32Array]",De=/[\\^$.*+?()[\]{}|]/g,ge=/^\[object .+?Constructor\]$/,Fe=/^(?:0|[1-9]\d*)$/,ye={};ye[me]=ye[S]=ye[j]=ye[ce]=ye[le]=ye[re]=ye[ne]=ye[ae]=ye[ie]=!0,ye[l]=ye[h]=ye[ee]=ye[v]=ye[de]=ye[E]=ye[_]=ye[O]=ye[U]=ye[H]=ye[N]=ye[T]=ye[I]=ye[f]=ye[z]=!1;var Le=typeof dr=="object"&&dr&&dr.Object===Object&&dr,X=typeof self=="object"&&self&&self.Object===Object&&self,Y=Le||X||Function("return this")(),W=e&&!e.nodeType&&e,w=W&&!0&&t&&!t.nodeType&&t,F=w&&w.exports===W,we=F&&Le.process,ve=function(){try{return we&&we.binding&&we.binding("util")}catch{}}(),Me=ve&&ve.isTypedArray;function nt(R,q){for(var fe=-1,Ce=R==null?0:R.length,It=0,Xe=[];++fe<Ce;){var Tt=R[fe];q(Tt,fe,R)&&(Xe[It++]=Tt)}return Xe}function at(R,q){for(var fe=-1,Ce=q.length,It=R.length;++fe<Ce;)R[It+fe]=q[fe];return R}function Ge(R,q){for(var fe=-1,Ce=R==null?0:R.length;++fe<Ce;)if(q(R[fe],fe,R))return!0;return!1}function At(R,q){for(var fe=-1,Ce=Array(R);++fe<R;)Ce[fe]=q(fe);return Ce}function $t(R){return function(q){return R(q)}}function Je(R,q){return R.has(q)}function He(R,q){return R?.[q]}function Be(R){var q=-1,fe=Array(R.size);return R.forEach(function(Ce,It){fe[++q]=[It,Ce]}),fe}function Ke(R,q){return function(fe){return R(q(fe))}}function rt(R){var q=-1,fe=Array(R.size);return R.forEach(function(Ce){fe[++q]=Ce}),fe}var Ue=Array.prototype,Ze=Function.prototype,b=Object.prototype,p=Y["__core-js_shared__"],m=Ze.toString,A=b.hasOwnProperty,B=function(){var R=/[^.]+$/.exec(p&&p.keys&&p.keys.IE_PROTO||"");return R?"Symbol(src)_1."+R:""}(),K=b.toString,Q=RegExp("^"+m.call(A).replace(De,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ee=F?Y.Buffer:void 0,Te=Y.Symbol,st=Y.Uint8Array,ht=b.propertyIsEnumerable,lt=Ue.splice,Mr=Te?Te.toStringTag:void 0,Yn=Object.getOwnPropertySymbols,Ci=Ee?Ee.isBuffer:void 0,cs=Ke(Object.keys,Object),Ht=Xr(Y,"DataView"),Lt=Xr(Y,"Map"),zt=Xr(Y,"Promise"),Wt=Xr(Y,"Set"),Ft=Xr(Y,"WeakMap"),Mt=Xr(Object,"create"),nr=Xn(Ht),ir=Xn(Lt),qt=Xn(zt),sr=Xn(Wt),Vt=Xn(Ft),Yt=Te?Te.prototype:void 0,Kt=Yt?Yt.valueOf:void 0;function Pt(R){var q=-1,fe=R==null?0:R.length;for(this.clear();++q<fe;){var Ce=R[q];this.set(Ce[0],Ce[1])}}function or(){this.__data__=Mt?Mt(null):{},this.size=0}function ar(R){var q=this.has(R)&&delete this.__data__[R];return this.size-=q?1:0,q}function Uf(R){var q=this.__data__;if(Mt){var fe=q[R];return fe===n?void 0:fe}return A.call(q,R)?q[R]:void 0}function jf(R){var q=this.__data__;return Mt?q[R]!==void 0:A.call(q,R)}function Ff(R,q){var fe=this.__data__;return this.size+=this.has(R)?0:1,fe[R]=Mt&&q===void 0?n:q,this}Pt.prototype.clear=or,Pt.prototype.delete=ar,Pt.prototype.get=Uf,Pt.prototype.has=jf,Pt.prototype.set=Ff;function hn(R){var q=-1,fe=R==null?0:R.length;for(this.clear();++q<fe;){var Ce=R[q];this.set(Ce[0],Ce[1])}}function Bf(){this.__data__=[],this.size=0}function kf(R){var q=this.__data__,fe=ls(q,R);if(fe<0)return!1;var Ce=q.length-1;return fe==Ce?q.pop():lt.call(q,fe,1),--this.size,!0}function Hf(R){var q=this.__data__,fe=ls(q,R);return fe<0?void 0:q[fe][1]}function zf(R){return ls(this.__data__,R)>-1}function Wf(R,q){var fe=this.__data__,Ce=ls(fe,R);return Ce<0?(++this.size,fe.push([R,q])):fe[Ce][1]=q,this}hn.prototype.clear=Bf,hn.prototype.delete=kf,hn.prototype.get=Hf,hn.prototype.has=zf,hn.prototype.set=Wf;function Jn(R){var q=-1,fe=R==null?0:R.length;for(this.clear();++q<fe;){var Ce=R[q];this.set(Ce[0],Ce[1])}}function Xs(){this.size=0,this.__data__={hash:new Pt,map:new(Lt||hn),string:new Pt}}function qf(R){var q=Ii(this,R).delete(R);return this.size-=q?1:0,q}function Qs(R){return Ii(this,R).get(R)}function Vf(R){return Ii(this,R).has(R)}function Kf(R,q){var fe=Ii(this,R),Ce=fe.size;return fe.set(R,q),this.size+=fe.size==Ce?0:1,this}Jn.prototype.clear=Xs,Jn.prototype.delete=qf,Jn.prototype.get=Qs,Jn.prototype.has=Vf,Jn.prototype.set=Kf;function eo(R){var q=-1,fe=R==null?0:R.length;for(this.__data__=new Jn;++q<fe;)this.add(R[q])}function Gc(R){return this.__data__.set(R,n),this}function Zc(R){return this.__data__.has(R)}eo.prototype.add=eo.prototype.push=Gc,eo.prototype.has=Zc;function En(R){var q=this.__data__=new hn(R);this.size=q.size}function Gf(){this.__data__=new hn,this.size=0}function Zf(R){var q=this.__data__,fe=q.delete(R);return this.size=q.size,fe}function Yf(R){return this.__data__.get(R)}function Jf(R){return this.__data__.has(R)}function Yc(R,q){var fe=this.__data__;if(fe instanceof hn){var Ce=fe.__data__;if(!Lt||Ce.length<r-1)return Ce.push([R,q]),this.size=++fe.size,this;fe=this.__data__=new Jn(Ce)}return fe.set(R,q),this.size=fe.size,this}En.prototype.clear=Gf,En.prototype.delete=Zf,En.prototype.get=Yf,En.prototype.has=Jf,En.prototype.set=Yc;function Jc(R,q){var fe=no(R),Ce=!fe&&ll(R),It=!fe&&!Ce&&va(R),Xe=!fe&&!Ce&&!It&&fl(R),Tt=fe||Ce||It||Xe,cr=Tt?At(R.length,String):[],mt=cr.length;for(var St in R)(q||A.call(R,St))&&!(Tt&&(St=="length"||It&&(St=="offset"||St=="parent")||Xe&&(St=="buffer"||St=="byteLength"||St=="byteOffset")||il(St,mt)))&&cr.push(St);return cr}function ls(R,q){for(var fe=R.length;fe--;)if(cl(R[fe][0],q))return fe;return-1}function ma(R,q,fe){var Ce=q(R);return no(R)?Ce:at(Ce,fe(R))}function us(R){return R==null?R===void 0?J:G:Mr&&Mr in Object(R)?rl(R):e0(R)}function wa(R){return fs(R)&&us(R)==l}function hs(R,q,fe,Ce,It){return R===q?!0:R==null||q==null||!fs(R)&&!fs(q)?R!==R&&q!==q:Xc(R,q,fe,Ce,hs,It)}function Xc(R,q,fe,Ce,It,Xe){var Tt=no(R),cr=no(q),mt=Tt?h:Un(R),St=cr?h:Un(q);mt=mt==l?N:mt,St=St==l?N:St;var Jt=mt==N,Wr=St==N,lr=mt==St;if(lr&&va(R)){if(!va(q))return!1;Tt=!0,Jt=!1}if(lr&&!Jt)return Xe||(Xe=new En),Tt||fl(R)?to(R,q,fe,Ce,It,Xe):Qf(R,q,mt,fe,Ce,It,Xe);if(!(fe&i)){var Rt=Jt&&A.call(R,"__wrapped__"),Ur=Wr&&A.call(q,"__wrapped__");if(Rt||Ur){var xn=Rt?R.value():R,fn=Ur?q.value():q;return Xe||(Xe=new En),It(xn,fn,fe,Ce,Xe)}}return lr?(Xe||(Xe=new En),tl(R,q,fe,Ce,It,Xe)):!1}function Xf(R){if(!hl(R)||ol(R))return!1;var q=io(R)?Q:ge;return q.test(Xn(R))}function Qc(R){return fs(R)&&ul(R.length)&&!!ye[us(R)]}function el(R){if(!al(R))return cs(R);var q=[];for(var fe in Object(R))A.call(R,fe)&&fe!="constructor"&&q.push(fe);return q}function to(R,q,fe,Ce,It,Xe){var Tt=fe&i,cr=R.length,mt=q.length;if(cr!=mt&&!(Tt&&mt>cr))return!1;var St=Xe.get(R);if(St&&Xe.get(q))return St==q;var Jt=-1,Wr=!0,lr=fe&o?new eo:void 0;for(Xe.set(R,q),Xe.set(q,R);++Jt<cr;){var Rt=R[Jt],Ur=q[Jt];if(Ce)var xn=Tt?Ce(Ur,Rt,Jt,q,R,Xe):Ce(Rt,Ur,Jt,R,q,Xe);if(xn!==void 0){if(xn)continue;Wr=!1;break}if(lr){if(!Ge(q,function(fn,jn){if(!Je(lr,jn)&&(Rt===fn||It(Rt,fn,fe,Ce,Xe)))return lr.push(jn)})){Wr=!1;break}}else if(!(Rt===Ur||It(Rt,Ur,fe,Ce,Xe))){Wr=!1;break}}return Xe.delete(R),Xe.delete(q),Wr}function Qf(R,q,fe,Ce,It,Xe,Tt){switch(fe){case de:if(R.byteLength!=q.byteLength||R.byteOffset!=q.byteOffset)return!1;R=R.buffer,q=q.buffer;case ee:return!(R.byteLength!=q.byteLength||!Xe(new st(R),new st(q)));case v:case E:case H:return cl(+R,+q);case _:return R.name==q.name&&R.message==q.message;case T:case f:return R==q+"";case U:var cr=Be;case I:var mt=Ce&i;if(cr||(cr=rt),R.size!=q.size&&!mt)return!1;var St=Tt.get(R);if(St)return St==q;Ce|=o,Tt.set(R,q);var Jt=to(cr(R),cr(q),Ce,It,Xe,Tt);return Tt.delete(R),Jt;case x:if(Kt)return Kt.call(R)==Kt.call(q)}return!1}function tl(R,q,fe,Ce,It,Xe){var Tt=fe&i,cr=ro(R),mt=cr.length,St=ro(q),Jt=St.length;if(mt!=Jt&&!Tt)return!1;for(var Wr=mt;Wr--;){var lr=cr[Wr];if(!(Tt?lr in q:A.call(q,lr)))return!1}var Rt=Xe.get(R);if(Rt&&Xe.get(q))return Rt==q;var Ur=!0;Xe.set(R,q),Xe.set(q,R);for(var xn=Tt;++Wr<mt;){lr=cr[Wr];var fn=R[lr],jn=q[lr];if(Ce)var ya=Tt?Ce(jn,fn,lr,q,R,Xe):Ce(fn,jn,lr,R,q,Xe);if(!(ya===void 0?fn===jn||It(fn,jn,fe,Ce,Xe):ya)){Ur=!1;break}xn||(xn=lr=="constructor")}if(Ur&&!xn){var ds=R.constructor,wr=q.constructor;ds!=wr&&"constructor"in R&&"constructor"in q&&!(typeof ds=="function"&&ds instanceof ds&&typeof wr=="function"&&wr instanceof wr)&&(Ur=!1)}return Xe.delete(R),Xe.delete(q),Ur}function ro(R){return ma(R,n0,nl)}function Ii(R,q){var fe=R.__data__;return sl(q)?fe[typeof q=="string"?"string":"hash"]:fe.map}function Xr(R,q){var fe=He(R,q);return Xf(fe)?fe:void 0}function rl(R){var q=A.call(R,Mr),fe=R[Mr];try{R[Mr]=void 0;var Ce=!0}catch{}var It=K.call(R);return Ce&&(q?R[Mr]=fe:delete R[Mr]),It}var nl=Yn?function(R){return R==null?[]:(R=Object(R),nt(Yn(R),function(q){return ht.call(R,q)}))}:Ct,Un=us;(Ht&&Un(new Ht(new ArrayBuffer(1)))!=de||Lt&&Un(new Lt)!=U||zt&&Un(zt.resolve())!=L||Wt&&Un(new Wt)!=I||Ft&&Un(new Ft)!=z)&&(Un=function(R){var q=us(R),fe=q==N?R.constructor:void 0,Ce=fe?Xn(fe):"";if(Ce)switch(Ce){case nr:return de;case ir:return U;case qt:return L;case sr:return I;case Vt:return z}return q});function il(R,q){return q=q??c,!!q&&(typeof R=="number"||Fe.test(R))&&R>-1&&R%1==0&&R<q}function sl(R){var q=typeof R;return q=="string"||q=="number"||q=="symbol"||q=="boolean"?R!=="__proto__":R===null}function ol(R){return!!B&&B in R}function al(R){var q=R&&R.constructor,fe=typeof q=="function"&&q.prototype||b;return R===fe}function e0(R){return K.call(R)}function Xn(R){if(R!=null){try{return m.call(R)}catch{}try{return R+""}catch{}}return""}function cl(R,q){return R===q||R!==R&&q!==q}var ll=wa(function(){return arguments}())?wa:function(R){return fs(R)&&A.call(R,"callee")&&!ht.call(R,"callee")},no=Array.isArray;function t0(R){return R!=null&&ul(R.length)&&!io(R)}var va=Ci||xt;function r0(R,q){return hs(R,q)}function io(R){if(!hl(R))return!1;var q=us(R);return q==O||q==P||q==d||q==$}function ul(R){return typeof R=="number"&&R>-1&&R%1==0&&R<=c}function hl(R){var q=typeof R;return R!=null&&(q=="object"||q=="function")}function fs(R){return R!=null&&typeof R=="object"}var fl=Me?$t(Me):Qc;function n0(R){return t0(R)?Jc(R):el(R)}function Ct(){return[]}function xt(){return!1}t.exports=r0})(eh,eh.exports);var I_=eh.exports,S_=Object.defineProperty,$p=Object.getOwnPropertySymbols,O_=Object.prototype.hasOwnProperty,D_=Object.prototype.propertyIsEnumerable,Pp=(t,e,r)=>e in t?S_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Tr=(t,e)=>{for(var r in e||(e={}))O_.call(e,r)&&Pp(t,r,e[r]);if($p)for(var r of $p(e))D_.call(e,r)&&Pp(t,r,e[r]);return t};function A_(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),c=o.charCodeAt(0);if(r[c]!==255)throw new TypeError(o+" is ambiguous");r[c]=i}var l=t.length,h=t.charAt(0),d=Math.log(l)/Math.log(256),v=Math.log(256)/Math.log(l);function E(P){if(P instanceof Uint8Array||(ArrayBuffer.isView(P)?P=new Uint8Array(P.buffer,P.byteOffset,P.byteLength):Array.isArray(P)&&(P=Uint8Array.from(P))),!(P instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(P.length===0)return"";for(var U=0,H=0,G=0,N=P.length;G!==N&&P[G]===0;)G++,U++;for(var L=(N-G)*v+1>>>0,$=new Uint8Array(L);G!==N;){for(var T=P[G],I=0,f=L-1;(T!==0||I<H)&&f!==-1;f--,I++)T+=256*$[f]>>>0,$[f]=T%l>>>0,T=T/l>>>0;if(T!==0)throw new Error("Non-zero carry");H=I,G++}for(var x=L-H;x!==L&&$[x]===0;)x++;for(var J=h.repeat(U);x<L;++x)J+=t.charAt($[x]);return J}function _(P){if(typeof P!="string")throw new TypeError("Expected String");if(P.length===0)return new Uint8Array;var U=0;if(P[U]!==" "){for(var H=0,G=0;P[U]===h;)H++,U++;for(var N=(P.length-U)*d+1>>>0,L=new Uint8Array(N);P[U];){var $=r[P.charCodeAt(U)];if($===255)return;for(var T=0,I=N-1;($!==0||T<G)&&I!==-1;I--,T++)$+=l*L[I]>>>0,L[I]=$%256>>>0,$=$/256>>>0;if($!==0)throw new Error("Non-zero carry");G=T,U++}if(P[U]!==" "){for(var f=N-G;f!==N&&L[f]===0;)f++;for(var x=new Uint8Array(H+(N-f)),J=H;f!==N;)x[J++]=L[f++];return x}}}function O(P){var U=_(P);if(U)return U;throw new Error(`Non-${e} character`)}return{encode:E,decodeUnsafe:_,decode:O}}var $_=A_,P_=$_;const Tp=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},T_=t=>new TextEncoder().encode(t),R_=t=>new TextDecoder().decode(t);class N_{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class L_{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return Rp(this,e)}}class M_{constructor(e){this.decoders=e}or(e){return Rp(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Rp=(t,e)=>new M_(Tr(Tr({},t.decoders||{[t.prefix]:t}),e.decoders||{[e.prefix]:e}));class U_{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new N_(e,r,n),this.decoder=new L_(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const nc=({name:t,prefix:e,encode:r,decode:n})=>new U_(t,e,r,n),Fo=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=P_(r,e);return nc({prefix:t,name:e,encode:n,decode:o=>Tp(i(o))})},j_=(t,e,r,n)=>{const i={};for(let v=0;v<e.length;++v)i[e[v]]=v;let o=t.length;for(;t[o-1]==="=";)--o;const c=new Uint8Array(o*r/8|0);let l=0,h=0,d=0;for(let v=0;v<o;++v){const E=i[t[v]];if(E===void 0)throw new SyntaxError(`Non-${n} character`);h=h<<r|E,l+=r,l>=8&&(l-=8,c[d++]=255&h>>l)}if(l>=r||255&h<<8-l)throw new SyntaxError("Unexpected end of data");return c},F_=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<<r)-1;let o="",c=0,l=0;for(let h=0;h<t.length;++h)for(l=l<<8|t[h],c+=8;c>r;)c-=r,o+=e[i&l>>c];if(c&&(o+=e[i&l<<r-c]),n)for(;o.length*r&7;)o+="=";return o},_r=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>nc({prefix:e,name:t,encode(i){return F_(i,n,r)},decode(i){return j_(i,n,r,t)}}),B_=nc({prefix:"\0",name:"identity",encode:t=>R_(t),decode:t=>T_(t)});var k_=Object.freeze({__proto__:null,identity:B_});const H_=_r({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var z_=Object.freeze({__proto__:null,base2:H_});const W_=_r({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var q_=Object.freeze({__proto__:null,base8:W_});const V_=Fo({prefix:"9",name:"base10",alphabet:"0123456789"});var K_=Object.freeze({__proto__:null,base10:V_});const G_=_r({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Z_=_r({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Y_=Object.freeze({__proto__:null,base16:G_,base16upper:Z_});const J_=_r({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),X_=_r({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Q_=_r({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),e8=_r({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),t8=_r({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),r8=_r({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),n8=_r({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),i8=_r({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),s8=_r({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var o8=Object.freeze({__proto__:null,base32:J_,base32upper:X_,base32pad:Q_,base32padupper:e8,base32hex:t8,base32hexupper:r8,base32hexpad:n8,base32hexpadupper:i8,base32z:s8});const a8=Fo({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),c8=Fo({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var l8=Object.freeze({__proto__:null,base36:a8,base36upper:c8});const u8=Fo({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),h8=Fo({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var f8=Object.freeze({__proto__:null,base58btc:u8,base58flickr:h8});const d8=_r({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),p8=_r({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),g8=_r({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),m8=_r({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var w8=Object.freeze({__proto__:null,base64:d8,base64pad:p8,base64url:g8,base64urlpad:m8});const Np=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),v8=Np.reduce((t,e,r)=>(t[r]=e,t),[]),y8=Np.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function b8(t){return t.reduce((e,r)=>(e+=v8[r],e),"")}function _8(t){const e=[];for(const r of t){const n=y8[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const E8=nc({prefix:"\u{1F680}",name:"base256emoji",encode:b8,decode:_8});var x8=Object.freeze({__proto__:null,base256emoji:E8}),C8=Mp,Lp=128,I8=127,S8=~I8,O8=Math.pow(2,31);function Mp(t,e,r){e=e||[],r=r||0;for(var n=r;t>=O8;)e[r++]=t&255|Lp,t/=128;for(;t&S8;)e[r++]=t&255|Lp,t>>>=7;return e[r]=t|0,Mp.bytes=r-n+1,e}var D8=th,A8=128,Up=127;function th(t,n){var r=0,n=n||0,i=0,o=n,c,l=t.length;do{if(o>=l)throw th.bytes=0,new RangeError("Could not decode varint");c=t[o++],r+=i<28?(c&Up)<<i:(c&Up)*Math.pow(2,i),i+=7}while(c>=A8);return th.bytes=o-n,r}var $8=Math.pow(2,7),P8=Math.pow(2,14),T8=Math.pow(2,21),R8=Math.pow(2,28),N8=Math.pow(2,35),L8=Math.pow(2,42),M8=Math.pow(2,49),U8=Math.pow(2,56),j8=Math.pow(2,63),F8=function(t){return t<$8?1:t<P8?2:t<T8?3:t<R8?4:t<N8?5:t<L8?6:t<M8?7:t<U8?8:t<j8?9:10},B8={encode:C8,decode:D8,encodingLength:F8},jp=B8;const Fp=(t,e,r=0)=>(jp.encode(t,e,r),e),Bp=t=>jp.encodingLength(t),rh=(t,e)=>{const r=e.byteLength,n=Bp(t),i=n+Bp(r),o=new Uint8Array(i+r);return Fp(t,o,0),Fp(r,o,n),o.set(e,i),new k8(t,r,e,o)};class k8{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}}const kp=({name:t,code:e,encode:r})=>new H8(t,e,r);class H8{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){const r=this.encode(e);return r instanceof Uint8Array?rh(this.code,r):r.then(n=>rh(this.code,n))}else throw Error("Unknown type, must be binary type")}}const Hp=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),z8=kp({name:"sha2-256",code:18,encode:Hp("SHA-256")}),W8=kp({name:"sha2-512",code:19,encode:Hp("SHA-512")});var q8=Object.freeze({__proto__:null,sha256:z8,sha512:W8});const zp=0,V8="identity",Wp=Tp;var K8=Object.freeze({__proto__:null,identity:{code:zp,name:V8,encode:Wp,digest:t=>rh(zp,Wp(t))}});new TextEncoder,new TextDecoder;const qp=Tr(Tr(Tr(Tr(Tr(Tr(Tr(Tr(Tr(Tr({},k_),z_),q_),K_),Y_),o8),l8),f8),w8),x8);Tr(Tr({},q8),K8);function Vp(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function G8(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?Vp(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function Kp(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const Gp=Kp("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),nh=Kp("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=G8(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),Z8=Tr({utf8:Gp,"utf-8":Gp,hex:qp.base16,latin1:nh,ascii:nh,binary:nh},qp);function Y8(t,e="utf8"){const r=Z8[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?Vp(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}const Zp="wc",J8=2,ih="core",hi=`${Zp}@${2}:${ih}:`,X8={name:ih,logger:"error"},Q8={database:":memory:"},eE="crypto",Yp="client_ed25519_seed",tE=ke.ONE_DAY,rE="keychain",nE="0.3",iE="messages",sE="0.3",oE=ke.SIX_HOURS,aE="publisher",Jp="irn",cE="error",Xp="wss://relay.walletconnect.com",lE="relayer",tr={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",transport_closed:"relayer_transport_closed",publish:"relayer_publish"},uE="_subscription",Bo={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},hE=ke.ONE_SECOND/2,fE="2.7.4-rc-a7ad32",dE="0.3",$n={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},pE="subscription",gE="0.3",mE=ke.FIVE_SECONDS*1e3,wE="pairing",vE="0.3",ko={wc_pairingDelete:{req:{ttl:ke.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:ke.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:ke.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:ke.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:ke.ONE_DAY,prompt:!1,tag:0},res:{ttl:ke.ONE_DAY,prompt:!1,tag:0}}},Pn={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},yE="history",bE="0.3",_E="expirer",sn={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},EE="0.3",sh="verify-api",Qp="https://verify.walletconnect.com";class xE{constructor(e,r){this.core=e,this.logger=r,this.keychain=new Map,this.name=rE,this.version=nE,this.initialized=!1,this.storagePrefix=hi,this.init=async()=>{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}},this.has=n=>(this.isInitialized(),this.keychain.has(n)),this.set=async(n,i)=>{this.isInitialized(),this.keychain.set(n,i),await this.persist()},this.get=n=>{this.isInitialized();const i=this.keychain.get(n);if(typeof i>"u"){const{message:o}=_e("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(o)}return i},this.del=async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()},this.core=e,this.logger=pt.generateChildLogger(r,this.name)}get context(){return pt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,D1(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?A1(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=_e("NOT_INITIALIZED",this.name);throw new Error(e)}}}class CE{constructor(e,r,n){this.core=e,this.logger=r,this.name=eE,this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=i=>(this.isInitialized(),this.keychain.has(i)),this.getClientId=async()=>{this.isInitialized();const i=await this.getClientSeed(),o=pp(i);return dp(o.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const i=L5();return this.setPrivateKey(i.publicKey,i.privateKey)},this.signJWT=async i=>{this.isInitialized();const o=await this.getClientSeed(),c=pp(o),l=Iu();return await M4(l,i,tE,c)},this.generateSharedKey=(i,o,c)=>{this.isInitialized();const l=this.getPrivateKey(i),h=M5(l,o);return this.setSymKey(h,c)},this.setSymKey=async(i,o)=>{this.isInitialized();const c=o||U5(i);return await this.keychain.set(c,i),c},this.deleteKeyPair=async i=>{this.isInitialized(),await this.keychain.del(i)},this.deleteSymKey=async i=>{this.isInitialized(),await this.keychain.del(i)},this.encode=async(i,o,c)=>{this.isInitialized();const l=_1(c),h=Mo(o);if(E1(l)){const _=l.senderPublicKey,O=l.receiverPublicKey;i=await this.generateSharedKey(_,O)}const d=this.getSymKey(i),{type:v,senderPublicKey:E}=l;return F5({type:v,symKey:d,message:h,senderPublicKey:E})},this.decode=async(i,o,c)=>{this.isInitialized();const l=H5(o,c);if(E1(l)){const v=l.receiverPublicKey,E=l.senderPublicKey;i=await this.generateSharedKey(v,E)}const h=this.getSymKey(i),d=B5({symKey:h,encoded:o});return Vu(d)},this.getPayloadType=i=>{const o=Va(i);return Io(o.type)},this.getPayloadSenderPublicKey=i=>{const o=Va(i);return o.senderPublicKey?Dr(o.senderPublicKey,Ar):void 0},this.core=e,this.logger=pt.generateChildLogger(r,this.name),this.keychain=n||new xE(this.core,this.logger)}get context(){return pt.getLoggerContext(this.logger)}async setPrivateKey(e,r){return await this.keychain.set(e,r),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(Yp)}catch{e=Iu(),await this.keychain.set(Yp,e)}return Y8(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=_e("NOT_INITIALIZED",this.name);throw new Error(e)}}}class IE extends f4{constructor(e,r){super(e,r),this.logger=e,this.core=r,this.messages=new Map,this.name=iE,this.version=sE,this.initialized=!1,this.storagePrefix=hi,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}},this.set=async(n,i)=>{this.isInitialized();const o=Ss(i);let c=this.messages.get(n);return typeof c>"u"&&(c={}),typeof c[o]<"u"||(c[o]=i,this.messages.set(n,c),await this.persist()),o},this.get=n=>{this.isInitialized();let i=this.messages.get(n);return typeof i>"u"&&(i={}),i},this.has=(n,i)=>{this.isInitialized();const o=this.get(n),c=Ss(i);return typeof o[c]<"u"},this.del=async n=>{this.isInitialized(),this.messages.delete(n),await this.persist()},this.logger=pt.generateChildLogger(e,this.name),this.core=r}get context(){return pt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,D1(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?A1(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=_e("NOT_INITIALIZED",this.name);throw new Error(e)}}}class SE extends d4{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,this.events=new yr.exports.EventEmitter,this.name=aE,this.queue=new Map,this.publishTimeout=1e4,this.publish=async(n,i,o)=>{this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:o}});try{const c=o?.ttl||oE,l=Au(o),h=o?.prompt||!1,d=o?.tag||0,v=o?.id||Cp().toString(),E={topic:n,message:i,opts:{ttl:c,relay:l,prompt:h,tag:d,id:v}};this.queue.set(v,E);try{await await Ka(this.rpcPublish(n,i,c,l,h,d,v),this.publishTimeout),this.relayer.events.emit(tr.publish,E)}catch{this.logger.debug("Publishing Payload stalled"),this.relayer.events.emit(tr.connection_stalled);return}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:o}})}catch(c){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(c),c}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.relayer=e,this.logger=pt.generateChildLogger(r,this.name),this.registerEventListeners()}get context(){return pt.getLoggerContext(this.logger)}rpcPublish(e,r,n,i,o,c,l){var h,d,v,E;const _={method:Ga(i.protocol).publish,params:{topic:e,message:r,ttl:n,prompt:o,tag:c},id:l};return $r((h=_.params)==null?void 0:h.prompt)&&((d=_.params)==null||delete d.prompt),$r((v=_.params)==null?void 0:v.tag)&&((E=_.params)==null||delete E.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:_}),this.relayer.request(_)}onPublish(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async e=>{const{topic:r,message:n,opts:i}=e;await this.publish(r,n,i)})}registerEventListeners(){this.relayer.core.heartbeat.on(Po.HEARTBEAT_EVENTS.pulse,()=>{this.checkQueue()}),this.relayer.on(tr.message_ack,e=>{this.onPublish(e.id.toString())})}}class OE{constructor(){this.map=new Map,this.set=(e,r)=>{const n=this.get(e);this.exists(e,r)||this.map.set(e,[...n,r])},this.get=e=>this.map.get(e)||[],this.exists=(e,r)=>this.get(e).includes(r),this.delete=(e,r)=>{if(typeof r>"u"){this.map.delete(e);return}if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,r))return;const i=n.filter(o=>o!==r);if(!i.length){this.map.delete(e);return}this.map.set(e,i)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var DE=Object.defineProperty,AE=Object.defineProperties,$E=Object.getOwnPropertyDescriptors,eg=Object.getOwnPropertySymbols,PE=Object.prototype.hasOwnProperty,TE=Object.prototype.propertyIsEnumerable,tg=(t,e,r)=>e in t?DE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ho=(t,e)=>{for(var r in e||(e={}))PE.call(e,r)&&tg(t,r,e[r]);if(eg)for(var r of eg(e))TE.call(e,r)&&tg(t,r,e[r]);return t},oh=(t,e)=>AE(t,$E(e));class RE extends m4{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,this.subscriptions=new Map,this.topicMap=new OE,this.events=new yr.exports.EventEmitter,this.name=pE,this.version=gE,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=hi,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restart(),this.registerEventListeners(),this.onEnable(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(n,i)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}});try{const o=Au(i),c={topic:n,relay:o};this.pending.set(n,c);const l=await this.rpcSubscribe(n,o);return this.onSubscribe(l,c),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}}),l}catch(o){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(o),o}},this.unsubscribe=async(n,i)=>{await this.restartToComplete(),this.isInitialized(),typeof i?.id<"u"?await this.unsubscribeById(n,i.id,i):await this.unsubscribeByTopic(n,i)},this.isSubscribed=async n=>this.topics.includes(n)?!0:await new Promise((i,o)=>{const c=new ke.Watch;c.start(this.pendingSubscriptionWatchLabel);const l=setInterval(()=>{!this.pending.has(n)&&this.topics.includes(n)&&(clearInterval(l),c.stop(this.pendingSubscriptionWatchLabel),i(!0)),c.elapsed(this.pendingSubscriptionWatchLabel)>=mE&&(clearInterval(l),c.stop(this.pendingSubscriptionWatchLabel),o(!1))},this.pollingInterval)}),this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=pt.generateChildLogger(r,this.name),this.clientId=""}get context(){return pt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,r){let n=!1;try{n=this.getSubscription(e).topic===r}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,r){const n=this.topicMap.get(e);await Promise.all(n.map(async i=>await this.unsubscribeById(e,i,r)))}async unsubscribeById(e,r,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:n}});try{const i=Au(n);await this.rpcUnsubscribe(e,r,i);const o=Zt("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,r,o),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:n}})}catch(i){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(i),i}}async rpcSubscribe(e,r){const n={method:Ga(r.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await Ka(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(tr.connection_stalled)}return Ss(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const r=e[0].relay,n={method:Ga(r.protocol).batchSubscribe,params:{topics:e.map(i=>i.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return await await Ka(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(tr.connection_stalled)}}rpcUnsubscribe(e,r,n){const i={method:Ga(n.protocol).unsubscribe,params:{topic:e,id:r}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(e,r){this.setSubscription(e,oh(Ho({},r),{id:e})),this.pending.delete(r.topic)}onBatchSubscribe(e){e.length&&e.forEach(r=>{this.setSubscription(r.id,Ho({},r)),this.pending.delete(r.topic)})}async onUnsubscribe(e,r,n){this.events.removeAllListeners(r),this.hasSubscription(r,e)&&this.deleteSubscription(r,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,r){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:r}),this.addSubscription(e,r))}addSubscription(e,r){this.subscriptions.set(e,Ho({},r)),this.topicMap.set(r.topic,e),this.events.emit($n.created,r)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const r=this.subscriptions.get(e);if(!r){const{message:n}=_e("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return r}deleteSubscription(e,r){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:r});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit($n.deleted,oh(Ho({},n),{reason:r}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit($n.sync)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let r=0;r<e;r++){const n=this.cached.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(n)}}this.events.emit($n.resubscribed)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:r}=_e("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const r=await this.rpcBatchSubscribe(e);Hn(r)&&this.onBatchSubscribe(r.map((n,i)=>oh(Ho({},e[i]),{id:n})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach(r=>{e.push(r)}),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(Po.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(tr.connect,async()=>{await this.onConnect()}),this.relayer.on(tr.disconnect,()=>{this.onDisconnect()}),this.events.on($n.created,async e=>{const r=$n.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),await this.persist()}),this.events.on($n.deleted,async e=>{const r=$n.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=_e("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise(e=>{const r=setInterval(()=>{this.restartInProgress||(clearInterval(r),e())},this.pollingInterval)})}}var NE=Object.defineProperty,rg=Object.getOwnPropertySymbols,LE=Object.prototype.hasOwnProperty,ME=Object.prototype.propertyIsEnumerable,ng=(t,e,r)=>e in t?NE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,UE=(t,e)=>{for(var r in e||(e={}))LE.call(e,r)&&ng(t,r,e[r]);if(rg)for(var r of rg(e))ME.call(e,r)&&ng(t,r,e[r]);return t};class jE extends p4{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new yr.exports.EventEmitter,this.name=lE,this.transportExplicitlyClosed=!1,this.initialized=!1,this.reconnecting=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.request=async r=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(r)}catch(n){throw this.logger.debug("Failed to Publish Request"),this.logger.error(n),n}},this.core=e.core,this.logger=typeof e.logger<"u"&&typeof e.logger!="string"?pt.generateChildLogger(e.logger,this.name):pt.pino(pt.getDefaultLoggerOptions({level:e.logger||cE})),this.messages=new IE(this.logger,e.core),this.subscriber=new RE(this,this.logger),this.publisher=new SE(this,this.logger),this.relayUrl=e?.relayUrl||Xp,this.projectId=e.projectId,this.provider={}}async init(){this.logger.trace("Initialized"),await this.createProvider(),await Promise.all([this.messages.init(),this.transportOpen(),this.subscriber.init()]),this.registerEventListeners(),this.initialized=!0}get context(){return pt.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,r,n){this.isInitialized(),await this.publisher.publish(e,r,n),await this.recordMessageEvent({topic:e,message:r,publishedAt:Date.now()})}async subscribe(e,r){this.isInitialized();let n="";return await Promise.all([new Promise(i=>{this.subscriber.once($n.created,o=>{o.topic===e&&i()})}),new Promise(async i=>{n=await this.subscriber.subscribe(e,r),i()})]),n}async unsubscribe(e,r){this.isInitialized(),await this.subscriber.unsubscribe(e,r)}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async transportClose(){this.transportExplicitlyClosed=!0,this.connected&&(await this.provider.disconnect(),this.events.emit(tr.transport_closed))}async transportOpen(e){if(this.transportExplicitlyClosed=!1,!this.reconnecting){this.relayUrl=e||this.relayUrl,this.reconnecting=!0;try{await Promise.all([new Promise(r=>{this.initialized||r(),this.subscriber.once($n.resubscribed,()=>{r()})}),await Promise.race([new Promise(async(r,n)=>{await Ka(this.provider.connect(),5e3,"socket stalled").catch(i=>n(i)).then(()=>r()).finally(()=>this.removeListener(tr.transport_closed,this.rejectTransportOpen))}),new Promise(r=>this.once(tr.transport_closed,this.rejectTransportOpen))])])}catch(r){this.logger.error(r);const n=r;if(!this.isConnectionStalled(n.message))throw r;this.events.emit(tr.transport_closed)}finally{this.reconnecting=!1}}}async restartTransport(e){this.transportExplicitlyClosed||(this.relayUrl=e||this.relayUrl,this.connected&&await Promise.all([new Promise(r=>{this.provider.once(Bo.disconnect,()=>{r()})}),this.transportClose()]),await this.createProvider(),await this.transportOpen())}isConnectionStalled(e){return this.staleConnectionErrors.some(r=>e.includes(r))}rejectTransportOpen(){throw new Error("closeTransport called before connection was established")}async createProvider(){const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new ui(new C_(Q5({sdkVersion:fE,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:r,message:n}=e;await this.messages.set(r,n)}async shouldIgnoreMessageEvent(e){const{topic:r,message:n}=e;return await this.subscriber.isSubscribed(r)?this.messages.has(r,n):!0}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),Qu(e)){if(!e.method.endsWith(uE))return;const r=e.params,{topic:n,message:i,publishedAt:o}=r.data,c={topic:n,message:i,publishedAt:o};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(UE({type:"event",event:r.id},c)),this.events.emit(r.id,c),await this.acknowledgePayload(e),await this.onMessageEvent(c)}else rc(e)&&this.events.emit(tr.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(tr.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const r=Xu(e.id,!0);await this.provider.connection.send(r)}registerProviderListeners(){this.provider.on(Bo.payload,e=>this.onProviderPayload(e)),this.provider.on(Bo.connect,()=>{this.events.emit(tr.connect)}),this.provider.on(Bo.disconnect,()=>{this.onProviderDisconnect()}),this.provider.on(Bo.error,e=>{this.logger.error(e),this.events.emit(tr.error,e)})}registerEventListeners(){this.events.on(tr.connection_stalled,async()=>{await this.restartTransport()})}onProviderDisconnect(){this.events.emit(tr.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||setTimeout(async()=>{await this.restartTransport()},ke.toMiliseconds(hE))}isInitialized(){if(!this.initialized){const{message:e}=_e("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(!this.connected){if(this.connecting)return await new Promise(e=>{const r=setInterval(()=>{this.connected&&(clearInterval(r),e())},this.connectionStatusPollingInterval)});await this.restartTransport()}}}var FE=Object.defineProperty,ig=Object.getOwnPropertySymbols,BE=Object.prototype.hasOwnProperty,kE=Object.prototype.propertyIsEnumerable,sg=(t,e,r)=>e in t?FE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,og=(t,e)=>{for(var r in e||(e={}))BE.call(e,r)&&sg(t,r,e[r]);if(ig)for(var r of ig(e))kE.call(e,r)&&sg(t,r,e[r]);return t};class ic extends g4{constructor(e,r,n,i=hi,o=void 0){super(e,r,n,i),this.core=e,this.logger=r,this.name=n,this.map=new Map,this.version=dE,this.cached=[],this.initialized=!1,this.storagePrefix=hi,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(c=>{this.getKey&&c!==null&&!$r(c)?this.map.set(this.getKey(c),c):bb(c)?this.map.set(c.id,c):_b(c)&&this.map.set(c.topic,c)}),this.cached=[],this.initialized=!0)},this.set=async(c,l)=>{this.isInitialized(),this.map.has(c)?await this.update(c,l):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:c,value:l}),this.map.set(c,l),await this.persist())},this.get=c=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:c}),this.getData(c)),this.getAll=c=>(this.isInitialized(),c?this.values.filter(l=>Object.keys(c).every(h=>I_(l[h],c[h]))):this.values),this.update=async(c,l)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:c,update:l});const h=og(og({},this.getData(c)),l);this.map.set(c,h),await this.persist()},this.delete=async(c,l)=>{this.isInitialized(),this.map.has(c)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:c,reason:l}),this.map.delete(c),await this.persist())},this.logger=pt.generateChildLogger(r,this.name),this.storagePrefix=i,this.getKey=o}get context(){return pt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const r=this.map.get(e);if(!r){const{message:n}=_e("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return r}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:r}=_e("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=_e("NOT_INITIALIZED",this.name);throw new Error(e)}}}class HE{constructor(e,r){this.core=e,this.logger=r,this.name=wE,this.version=vE,this.events=new yr.exports,this.initialized=!1,this.storagePrefix=hi,this.ignoredPayloadTypes=[Fi],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]},this.create=async()=>{this.isInitialized();const n=Iu(),i=await this.core.crypto.setSymKey(n),o=An(ke.FIVE_MINUTES),c={protocol:Jp},l={topic:i,expiry:o,relay:c,active:!1},h=ub({protocol:this.core.protocol,version:this.core.version,topic:i,symKey:n,relay:c});return await this.pairings.set(i,l),await this.core.relayer.subscribe(i),this.core.expirer.set(i,o),{topic:i,uri:h}},this.pair=async n=>{this.isInitialized(),this.isValidPair(n);const{topic:i,symKey:o,relay:c}=cb(n.uri);if(this.pairings.keys.includes(i))throw new Error(`Pairing already exists: ${i}`);if(this.core.crypto.hasKeys(i))throw new Error(`Keychain already exists: ${i}`);const l=An(ke.FIVE_MINUTES),h={topic:i,relay:c,expiry:l,active:!1};return await this.pairings.set(i,h),await this.core.crypto.setSymKey(o,i),await this.core.relayer.subscribe(i,{relay:c}),this.core.expirer.set(i,l),n.activatePairing&&await this.activate({topic:i}),h},this.activate=async({topic:n})=>{this.isInitialized();const i=An(ke.THIRTY_DAYS);await this.pairings.update(n,{active:!0,expiry:i}),this.core.expirer.set(n,i)},this.ping=async n=>{this.isInitialized(),await this.isValidPing(n);const{topic:i}=n;if(this.pairings.keys.includes(i)){const o=await this.sendRequest(i,"wc_pairingPing",{}),{done:c,resolve:l,reject:h}=Os();this.events.once(er("pairing_ping",o),({error:d})=>{d?h(d):l()}),await c()}},this.updateExpiry=async({topic:n,expiry:i})=>{this.isInitialized(),await this.pairings.update(n,{expiry:i})},this.updateMetadata=async({topic:n,metadata:i})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:i})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:i}=n;this.pairings.keys.includes(i)&&(await this.sendRequest(i,"wc_pairingDelete",Zt("USER_DISCONNECTED")),await this.deletePairing(i))},this.sendRequest=async(n,i,o)=>{const c=ec(i,o),l=await this.core.crypto.encode(n,c),h=ko[i].req;return this.core.history.set(n,c),this.core.relayer.publish(n,l,h),c.id},this.sendResult=async(n,i,o)=>{const c=Xu(n,o),l=await this.core.crypto.encode(i,c),h=await this.core.history.get(i,n),d=ko[h.request.method].res;await this.core.relayer.publish(i,l,d),await this.core.history.resolve(c)},this.sendError=async(n,i,o)=>{const c=tc(n,o),l=await this.core.crypto.encode(i,c),h=await this.core.history.get(i,n),d=ko[h.request.method]?ko[h.request.method].res:ko.unregistered_method.res;await this.core.relayer.publish(i,l,d),await this.core.history.resolve(c)},this.deletePairing=async(n,i)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,Zt("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),i?Promise.resolve():this.core.expirer.del(n)])},this.cleanup=async()=>{const n=this.pairings.getAll().filter(i=>li(i.expiry));await Promise.all(n.map(i=>this.deletePairing(i.topic)))},this.onRelayEventRequest=n=>{const{topic:i,payload:o}=n,c=o.method;if(this.pairings.keys.includes(i))switch(c){case"wc_pairingPing":return this.onPairingPingRequest(i,o);case"wc_pairingDelete":return this.onPairingDeleteRequest(i,o);default:return this.onUnknownRpcMethodRequest(i,o)}},this.onRelayEventResponse=async n=>{const{topic:i,payload:o}=n,c=(await this.core.history.get(i,o.id)).request.method;if(this.pairings.keys.includes(i))switch(c){case"wc_pairingPing":return this.onPairingPingResponse(i,o);default:return this.onUnknownRpcMethodResponse(c)}},this.onPairingPingRequest=async(n,i)=>{const{id:o}=i;try{this.isValidPing({topic:n}),await this.sendResult(o,n,!0),this.events.emit("pairing_ping",{id:o,topic:n})}catch(c){await this.sendError(o,n,c),this.logger.error(c)}},this.onPairingPingResponse=(n,i)=>{const{id:o}=i;setTimeout(()=>{qn(i)?this.events.emit(er("pairing_ping",o),{}):_n(i)&&this.events.emit(er("pairing_ping",o),{error:i.error})},500)},this.onPairingDeleteRequest=async(n,i)=>{const{id:o}=i;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit("pairing_delete",{id:o,topic:n})}catch(c){await this.sendError(o,n,c),this.logger.error(c)}},this.onUnknownRpcMethodRequest=async(n,i)=>{const{id:o,method:c}=i;try{if(this.registeredMethods.includes(c))return;const l=Zt("WC_METHOD_UNSUPPORTED",c);await this.sendError(o,n,l),this.logger.error(l)}catch(l){await this.sendError(o,n,l),this.logger.error(l)}},this.onUnknownRpcMethodResponse=n=>{this.registeredMethods.includes(n)||this.logger.error(Zt("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{if(!Hr(n)){const{message:i}=_e("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(i)}if(!yb(n.uri)){const{message:i}=_e("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(i)}},this.isValidPing=async n=>{if(!Hr(n)){const{message:o}=_e("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(o)}const{topic:i}=n;await this.isValidPairingTopic(i)},this.isValidDisconnect=async n=>{if(!Hr(n)){const{message:o}=_e("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(o)}const{topic:i}=n;await this.isValidPairingTopic(i)},this.isValidPairingTopic=async n=>{if(!pr(n,!1)){const{message:i}=_e("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(i)}if(!this.pairings.keys.includes(n)){const{message:i}=_e("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(i)}if(li(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:i}=_e("EXPIRED",`pairing topic: ${n}`);throw new Error(i)}},this.core=e,this.logger=pt.generateChildLogger(r,this.name),this.pairings=new ic(this.core,this.logger,this.name,this.storagePrefix)}get context(){return pt.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=_e("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(tr.message,async e=>{const{topic:r,message:n}=e;if(this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const i=await this.core.crypto.decode(r,n);Qu(i)?(this.core.history.set(r,i),this.onRelayEventRequest({topic:r,payload:i})):rc(i)&&(await this.core.history.resolve(i),this.onRelayEventResponse({topic:r,payload:i}))})}registerExpirerEvents(){this.core.expirer.on(sn.expired,async e=>{const{topic:r}=P1(e.target);r&&this.pairings.keys.includes(r)&&(await this.deletePairing(r,!0),this.events.emit("pairing_expire",{topic:r}))})}}class zE extends h4{constructor(e,r){super(e,r),this.core=e,this.logger=r,this.records=new Map,this.events=new yr.exports.EventEmitter,this.name=yE,this.version=bE,this.cached=[],this.initialized=!1,this.storagePrefix=hi,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(n,i,o)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:i,chainId:o}),this.records.has(i.id))return;const c={id:i.id,topic:n,request:{method:i.method,params:i.params||null},chainId:o};this.records.set(c.id,c),this.events.emit(Pn.created,c)},this.resolve=async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const i=await this.getRecord(n.id);typeof i.response>"u"&&(i.response=_n(n)?{error:n.error}:{result:n.result},this.records.set(i.id,i),this.events.emit(Pn.updated,i))},this.get=async(n,i)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:i}),await this.getRecord(i)),this.delete=(n,i)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:i}),this.values.forEach(o=>{if(o.topic===n){if(typeof i<"u"&&o.id!==i)return;this.records.delete(o.id),this.events.emit(Pn.deleted,o)}})},this.exists=async(n,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===n:!1),this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=pt.generateChildLogger(r,this.name)}get context(){return pt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(r=>{if(typeof r.response<"u")return;const n={topic:r.topic,request:ec(r.request.method,r.request.params,r.id),chainId:r.chainId};return e.push(n)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const r=this.records.get(e);if(!r){const{message:n}=_e("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return r}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Pn.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:r}=_e("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(Pn.created,e=>{const r=Pn.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.events.on(Pn.updated,e=>{const r=Pn.updated;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.events.on(Pn.deleted,e=>{const r=Pn.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=_e("NOT_INITIALIZED",this.name);throw new Error(e)}}}class WE extends w4{constructor(e,r){super(e,r),this.core=e,this.logger=r,this.expirations=new Map,this.events=new yr.exports.EventEmitter,this.name=_E,this.version=EE,this.cached=[],this.initialized=!1,this.storagePrefix=hi,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=n=>{try{const i=this.formatTarget(n);return typeof this.getExpiration(i)<"u"}catch{return!1}},this.set=(n,i)=>{this.isInitialized();const o=this.formatTarget(n),c={target:o,expiry:i};this.expirations.set(o,c),this.checkExpiry(o,c),this.events.emit(sn.created,{target:o,expiration:c})},this.get=n=>{this.isInitialized();const i=this.formatTarget(n);return this.getExpiration(i)},this.del=n=>{if(this.isInitialized(),this.has(n)){const i=this.formatTarget(n),o=this.getExpiration(i);this.expirations.delete(i),this.events.emit(sn.deleted,{target:i,expiration:o})}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=pt.generateChildLogger(r,this.name)}get context(){return pt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if(typeof e=="string")return eb(e);if(typeof e=="number")return tb(e);const{message:r}=_e("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw new Error(r)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(sn.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:r}=_e("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const r=this.expirations.get(e);if(!r){const{message:n}=_e("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return r}checkExpiry(e,r){const{expiry:n}=r;ke.toMiliseconds(n)-Date.now()<=0&&this.expire(e,r)}expire(e,r){this.expirations.delete(e),this.events.emit(sn.expired,{target:e,expiration:r})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,r)=>this.checkExpiry(r,e))}registerEventListeners(){this.core.heartbeat.on(Po.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(sn.created,e=>{const r=sn.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(sn.expired,e=>{const r=sn.expired;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(sn.deleted,e=>{const r=sn.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=_e("NOT_INITIALIZED",this.name);throw new Error(e)}}}class qE extends v4{constructor(e,r){super(e,r),this.projectId=e,this.logger=r,this.name=sh,this.initialized=!1,this.init=async n=>{S1()||!Ou()||(this.verifyUrl=n?.verifyUrl||Qp,await this.createIframe())},this.register=async n=>{var i;this.initialized||await this.init(),this.iframe&&((i=this.iframe.contentWindow)==null||i.postMessage(n.attestationId,this.verifyUrl),this.logger.info(`postMessage sent: ${n.attestationId} ${this.verifyUrl}`))},this.resolve=async n=>{var i;if(this.isDevEnv)return"";this.logger.info(`resolving attestation: ${n.attestationId}`);const o=this.startAbortTimer(ke.FIVE_SECONDS),c=await fetch(`${this.verifyUrl}/attestation/${n.attestationId}`,{signal:this.abortController.signal});return clearTimeout(o),c.status===200?(i=await c.json())==null?void 0:i.origin:""},this.createIframe=async()=>{try{await Promise.race([new Promise((n,i)=>{if(document.getElementById(sh))return n();const o=document.createElement("iframe");o.setAttribute("id",sh),o.setAttribute("src",`${this.verifyUrl}/${this.projectId}`),o.style.display="none",o.addEventListener("load",()=>{this.initialized=!0,n()}),o.addEventListener("error",c=>{i(c)}),document.body.append(o),this.iframe=o}),new Promise(n=>{setTimeout(()=>n("iframe load timeout"),ke.toMiliseconds(ke.ONE_SECOND/2))})])}catch(n){this.logger.error(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.error(n)}},this.logger=pt.generateChildLogger(r,this.name),this.verifyUrl=Qp,this.abortController=new AbortController,this.isDevEnv=Su()&&process.env.IS_VITEST}get context(){return pt.getLoggerContext(this.logger)}startAbortTimer(e){return setTimeout(()=>this.abortController.abort(),ke.toMiliseconds(e))}}var VE=Object.defineProperty,ag=Object.getOwnPropertySymbols,KE=Object.prototype.hasOwnProperty,GE=Object.prototype.propertyIsEnumerable,cg=(t,e,r)=>e in t?VE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,lg=(t,e)=>{for(var r in e||(e={}))KE.call(e,r)&&cg(t,r,e[r]);if(ag)for(var r of ag(e))GE.call(e,r)&&cg(t,r,e[r]);return t};class ah extends u4{constructor(e){super(e),this.protocol=Zp,this.version=J8,this.name=ih,this.events=new yr.exports.EventEmitter,this.initialized=!1,this.on=(n,i)=>this.events.on(n,i),this.once=(n,i)=>this.events.once(n,i),this.off=(n,i)=>this.events.off(n,i),this.removeListener=(n,i)=>this.events.removeListener(n,i),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||Xp;const r=typeof e?.logger<"u"&&typeof e?.logger!="string"?e.logger:pt.pino(pt.getDefaultLoggerOptions({level:e?.logger||X8.logger}));this.logger=pt.generateChildLogger(r,this.name),this.heartbeat=new Po.HeartBeat,this.crypto=new CE(this,this.logger,e?.keychain),this.history=new zE(this,this.logger),this.expirer=new WE(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new p6(lg(lg({},Q8),e?.storageOptions)),this.relayer=new jE({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new HE(this,this.logger),this.verify=new qE(this.projectId||"",this.logger)}static async init(e){const r=new ah(e);return await r.initialize(),r}get context(){return pt.getLoggerContext(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}const ZE=ah,ug="wc",hg=2,fg="client",ch=`${ug}@${hg}:${fg}:`,lh={name:fg,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},YE="proposal",dg="Proposal expired",JE="session",sc=ke.SEVEN_DAYS,XE="engine",zo={wc_sessionPropose:{req:{ttl:ke.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:ke.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:ke.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:ke.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:ke.ONE_DAY,prompt:!1,tag:1104},res:{ttl:ke.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:ke.ONE_DAY,prompt:!1,tag:1106},res:{ttl:ke.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:ke.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:ke.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:ke.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:ke.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:ke.ONE_DAY,prompt:!1,tag:1112},res:{ttl:ke.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:ke.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:ke.THIRTY_SECONDS,prompt:!1,tag:1115}}},uh={min:ke.FIVE_MINUTES,max:ke.SEVEN_DAYS},QE="request",e7=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var t7=Object.defineProperty,r7=Object.defineProperties,n7=Object.getOwnPropertyDescriptors,pg=Object.getOwnPropertySymbols,i7=Object.prototype.hasOwnProperty,s7=Object.prototype.propertyIsEnumerable,gg=(t,e,r)=>e in t?t7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,on=(t,e)=>{for(var r in e||(e={}))i7.call(e,r)&&gg(t,r,e[r]);if(pg)for(var r of pg(e))s7.call(e,r)&&gg(t,r,e[r]);return t},hh=(t,e)=>r7(t,n7(e));class o7 extends b4{constructor(e){super(e),this.name=XE,this.events=new yr.exports,this.initialized=!1,this.ignoredPayloadTypes=[Fi],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.client.core.pairing.register({methods:Object.keys(zo)}),this.initialized=!0)},this.connect=async r=>{this.isInitialized();const n=hh(on({},r),{requiredNamespaces:r.requiredNamespaces||{},optionalNamespaces:r.optionalNamespaces||{}});await this.isValidConnect(n);const{pairingTopic:i,requiredNamespaces:o,optionalNamespaces:c,sessionProperties:l,relays:h}=n;let d=i,v,E=!1;if(d&&(E=this.client.core.pairing.pairings.get(d).active),!d||!E){const{topic:L,uri:$}=await this.client.core.pairing.create();d=L,v=$}const _=await this.client.core.crypto.generateKeyPair(),O=on({requiredNamespaces:o,optionalNamespaces:c,relays:h??[{protocol:Jp}],proposer:{publicKey:_,metadata:this.client.metadata}},l&&{sessionProperties:l}),{reject:P,resolve:U,done:H}=Os(ke.FIVE_MINUTES,dg);if(this.events.once(er("session_connect"),async({error:L,session:$})=>{if(L)P(L);else if($){$.self.publicKey=_;const T=hh(on({},$),{requiredNamespaces:$.requiredNamespaces,optionalNamespaces:$.optionalNamespaces});await this.client.session.set($.topic,T),await this.setExpiry($.topic,$.expiry),d&&await this.client.core.pairing.updateMetadata({topic:d,metadata:$.peer.metadata}),U(T)}}),!d){const{message:L}=_e("NO_MATCHING_KEY",`connect() pairing topic: ${d}`);throw new Error(L)}const G=await this.sendRequest(d,"wc_sessionPropose",O),N=An(ke.FIVE_MINUTES);return await this.setProposal(G,on({id:G,expiry:N},O)),{uri:v,approval:H}},this.pair=async r=>(this.isInitialized(),await this.client.core.pairing.pair(r)),this.approve=async r=>{this.isInitialized(),await this.isValidApprove(r);const{id:n,relayProtocol:i,namespaces:o,sessionProperties:c}=r,l=this.client.proposal.get(n);let{pairingTopic:h,proposer:d,requiredNamespaces:v,optionalNamespaces:E}=l;h=h||"",As(v)||(v=pb(o,"approve()"));const _=await this.client.core.crypto.generateKeyPair(),O=d.publicKey,P=await this.client.core.crypto.generateSharedKey(_,O);h&&n&&(await this.client.core.pairing.updateMetadata({topic:h,metadata:d.metadata}),await this.sendResult(n,h,{relay:{protocol:i??"irn"},responderPublicKey:_}),await this.client.proposal.delete(n,Zt("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:h}));const U=on({relay:{protocol:i??"irn"},namespaces:o,requiredNamespaces:v,optionalNamespaces:E,pairingTopic:h,controller:{publicKey:_,metadata:this.client.metadata},expiry:An(sc)},c&&{sessionProperties:c});await this.client.core.relayer.subscribe(P),await this.sendRequest(P,"wc_sessionSettle",U);const H=hh(on({},U),{topic:P,pairingTopic:h,acknowledged:!1,self:U.controller,peer:{publicKey:d.publicKey,metadata:d.metadata},controller:_});return await this.client.session.set(P,H),await this.setExpiry(P,An(sc)),{topic:P,acknowledged:()=>new Promise(G=>setTimeout(()=>G(this.client.session.get(P)),500))}},this.reject=async r=>{this.isInitialized(),await this.isValidReject(r);const{id:n,reason:i}=r,{pairingTopic:o}=this.client.proposal.get(n);o&&(await this.sendError(n,o,i),await this.client.proposal.delete(n,Zt("USER_DISCONNECTED")))},this.update=async r=>{this.isInitialized(),await this.isValidUpdate(r);const{topic:n,namespaces:i}=r,o=await this.sendRequest(n,"wc_sessionUpdate",{namespaces:i}),{done:c,resolve:l,reject:h}=Os();return this.events.once(er("session_update",o),({error:d})=>{d?h(d):l()}),await this.client.session.update(n,{namespaces:i}),{acknowledged:c}},this.extend=async r=>{this.isInitialized(),await this.isValidExtend(r);const{topic:n}=r,i=await this.sendRequest(n,"wc_sessionExtend",{}),{done:o,resolve:c,reject:l}=Os();return this.events.once(er("session_extend",i),({error:h})=>{h?l(h):c()}),await this.setExpiry(n,An(sc)),{acknowledged:o}},this.request=async r=>{this.isInitialized(),await this.isValidRequest(r);const{chainId:n,request:i,topic:o,expiry:c}=r,l=await this.sendRequest(o,"wc_sessionRequest",{request:i,chainId:n},c),{done:h,resolve:d,reject:v}=Os(c);return this.events.once(er("session_request",l),({error:E,result:_})=>{E?v(E):d(_)}),this.client.events.emit("session_request_sent",{topic:o,request:i,chainId:n,id:l}),await h()},this.respond=async r=>{this.isInitialized(),await this.isValidRespond(r);const{topic:n,response:i}=r,{id:o}=i;qn(i)?await this.sendResult(o,n,i.result):_n(i)&&await this.sendError(o,n,i.error),this.deletePendingSessionRequest(r.response.id,{message:"fulfilled",code:0})},this.ping=async r=>{this.isInitialized(),await this.isValidPing(r);const{topic:n}=r;if(this.client.session.keys.includes(n)){const i=await this.sendRequest(n,"wc_sessionPing",{}),{done:o,resolve:c,reject:l}=Os();this.events.once(er("session_ping",i),({error:h})=>{h?l(h):c()}),await o()}else this.client.core.pairing.pairings.keys.includes(n)&&await this.client.core.pairing.ping({topic:n})},this.emit=async r=>{this.isInitialized(),await this.isValidEmit(r);const{topic:n,event:i,chainId:o}=r;await this.sendRequest(n,"wc_sessionEvent",{event:i,chainId:o})},this.disconnect=async r=>{this.isInitialized(),await this.isValidDisconnect(r);const{topic:n}=r;this.client.session.keys.includes(n)?(await this.sendRequest(n,"wc_sessionDelete",Zt("USER_DISCONNECTED")),await this.deleteSession(n)):await this.client.core.pairing.disconnect({topic:n})},this.find=r=>(this.isInitialized(),this.client.session.getAll().filter(n=>wb(n,r))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=async r=>{try{const n=this.client.core.pairing.pairings.get(r.pairingTopic),i=this.client.core.pairing.pairings.getAll().filter(o=>{var c,l;return((c=o.peerMetadata)==null?void 0:c.url)&&((l=o.peerMetadata)==null?void 0:l.url)===r.self.metadata.url&&o.topic!==n.topic});if(i.length===0)return;this.client.logger.info(`Cleaning up ${i.length} duplicate pairing(s)`),await Promise.all(i.map(o=>this.client.core.pairing.disconnect({topic:o.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(n){this.client.logger.error(n)}},this.deleteSession=async(r,n)=>{const{self:i}=this.client.session.get(r);await this.client.core.relayer.unsubscribe(r),await Promise.all([this.client.session.delete(r,Zt("USER_DISCONNECTED")),this.client.core.crypto.deleteKeyPair(i.publicKey),this.client.core.crypto.deleteSymKey(r),n?Promise.resolve():this.client.core.expirer.del(r)])},this.deleteProposal=async(r,n)=>{await Promise.all([this.client.proposal.delete(r,Zt("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(r)])},this.deletePendingSessionRequest=async(r,n,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(r,n),i?Promise.resolve():this.client.core.expirer.del(r)])},this.setExpiry=async(r,n)=>{this.client.session.keys.includes(r)&&await this.client.session.update(r,{expiry:n}),this.client.core.expirer.set(r,n)},this.setProposal=async(r,n)=>{await this.client.proposal.set(r,n),this.client.core.expirer.set(r,n.expiry)},this.setPendingSessionRequest=async r=>{const n=zo.wc_sessionRequest.req.ttl,{id:i,topic:o,params:c}=r;await this.client.pendingRequest.set(i,{id:i,topic:o,params:c}),n&&this.client.core.expirer.set(i,An(n))},this.sendRequest=async(r,n,i,o)=>{const c=ec(n,i);if(Ou()&&e7.includes(n)){const d=Ss(JSON.stringify(c));await this.client.core.verify.register({attestationId:d})}const l=await this.client.core.crypto.encode(r,c),h=zo[n].req;return o&&(h.ttl=o),this.client.core.history.set(r,c),this.client.core.relayer.publish(r,l,h),c.id},this.sendResult=async(r,n,i)=>{const o=Xu(r,i),c=await this.client.core.crypto.encode(n,o),l=await this.client.core.history.get(n,r),h=zo[l.request.method].res;this.client.core.relayer.publish(n,c,h),await this.client.core.history.resolve(o)},this.sendError=async(r,n,i)=>{const o=tc(r,i),c=await this.client.core.crypto.encode(n,o),l=await this.client.core.history.get(n,r),h=zo[l.request.method].res;this.client.core.relayer.publish(n,c,h),await this.client.core.history.resolve(o)},this.cleanup=async()=>{const r=[],n=[];this.client.session.getAll().forEach(i=>{li(i.expiry)&&r.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{li(i.expiry)&&n.push(i.id)}),await Promise.all([...r.map(i=>this.deleteSession(i)),...n.map(i=>this.deleteProposal(i))])},this.onRelayEventRequest=r=>{const{topic:n,payload:i}=r,o=i.method;switch(o){case"wc_sessionPropose":return this.onSessionProposeRequest(n,i);case"wc_sessionSettle":return this.onSessionSettleRequest(n,i);case"wc_sessionUpdate":return this.onSessionUpdateRequest(n,i);case"wc_sessionExtend":return this.onSessionExtendRequest(n,i);case"wc_sessionPing":return this.onSessionPingRequest(n,i);case"wc_sessionDelete":return this.onSessionDeleteRequest(n,i);case"wc_sessionRequest":return this.onSessionRequest(n,i);case"wc_sessionEvent":return this.onSessionEventRequest(n,i);default:return this.client.logger.info(`Unsupported request method ${o}`)}},this.onRelayEventResponse=async r=>{const{topic:n,payload:i}=r,o=(await this.client.core.history.get(n,i.id)).request.method;switch(o){case"wc_sessionPropose":return this.onSessionProposeResponse(n,i);case"wc_sessionSettle":return this.onSessionSettleResponse(n,i);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,i);case"wc_sessionExtend":return this.onSessionExtendResponse(n,i);case"wc_sessionPing":return this.onSessionPingResponse(n,i);case"wc_sessionRequest":return this.onSessionRequestResponse(n,i);default:return this.client.logger.info(`Unsupported response method ${o}`)}},this.onSessionProposeRequest=async(r,n)=>{const{params:i,id:o}=n;try{this.isValidConnect(on({},n.params));const c=An(ke.FIVE_MINUTES),l=on({id:o,pairingTopic:r,expiry:c},i);await this.setProposal(o,l);const h=Ss(JSON.stringify(n)),d=await this.getVerifyContext(h,l.proposer.metadata);this.client.events.emit("session_proposal",{id:o,params:l,verifyContext:d})}catch(c){await this.sendError(o,r,c),this.client.logger.error(c)}},this.onSessionProposeResponse=async(r,n)=>{const{id:i}=n;if(qn(n)){const{result:o}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:o});const c=this.client.proposal.get(i);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:c});const l=c.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:l});const h=o.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:h});const d=await this.client.core.crypto.generateSharedKey(l,h);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:d});const v=await this.client.core.relayer.subscribe(d);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:v}),await this.client.core.pairing.activate({topic:r})}else _n(n)&&(await this.client.proposal.delete(i,Zt("USER_DISCONNECTED")),this.events.emit(er("session_connect"),{error:n.error}))},this.onSessionSettleRequest=async(r,n)=>{const{id:i,params:o}=n;try{this.isValidSessionSettleRequest(o);const{relay:c,controller:l,expiry:h,namespaces:d,requiredNamespaces:v,optionalNamespaces:E,sessionProperties:_,pairingTopic:O}=n.params,P=on({topic:r,relay:c,expiry:h,namespaces:d,acknowledged:!0,pairingTopic:O,requiredNamespaces:v,optionalNamespaces:E,controller:l.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:l.publicKey,metadata:l.metadata}},_&&{sessionProperties:_});await this.sendResult(n.id,r,!0),this.events.emit(er("session_connect"),{session:P}),this.cleanupDuplicatePairings(P)}catch(c){await this.sendError(i,r,c),this.client.logger.error(c)}},this.onSessionSettleResponse=async(r,n)=>{const{id:i}=n;qn(n)?(await this.client.session.update(r,{acknowledged:!0}),this.events.emit(er("session_approve",i),{})):_n(n)&&(await this.client.session.delete(r,Zt("USER_DISCONNECTED")),this.events.emit(er("session_approve",i),{error:n.error}))},this.onSessionUpdateRequest=async(r,n)=>{const{params:i,id:o}=n;try{this.isValidUpdate(on({topic:r},i)),await this.client.session.update(r,{namespaces:i.namespaces}),await this.sendResult(o,r,!0),this.client.events.emit("session_update",{id:o,topic:r,params:i})}catch(c){await this.sendError(o,r,c),this.client.logger.error(c)}},this.onSessionUpdateResponse=(r,n)=>{const{id:i}=n;qn(n)?this.events.emit(er("session_update",i),{}):_n(n)&&this.events.emit(er("session_update",i),{error:n.error})},this.onSessionExtendRequest=async(r,n)=>{const{id:i}=n;try{this.isValidExtend({topic:r}),await this.setExpiry(r,An(sc)),await this.sendResult(i,r,!0),this.client.events.emit("session_extend",{id:i,topic:r})}catch(o){await this.sendError(i,r,o),this.client.logger.error(o)}},this.onSessionExtendResponse=(r,n)=>{const{id:i}=n;qn(n)?this.events.emit(er("session_extend",i),{}):_n(n)&&this.events.emit(er("session_extend",i),{error:n.error})},this.onSessionPingRequest=async(r,n)=>{const{id:i}=n;try{this.isValidPing({topic:r}),await this.sendResult(i,r,!0),this.client.events.emit("session_ping",{id:i,topic:r})}catch(o){await this.sendError(i,r,o),this.client.logger.error(o)}},this.onSessionPingResponse=(r,n)=>{const{id:i}=n;setTimeout(()=>{qn(n)?this.events.emit(er("session_ping",i),{}):_n(n)&&this.events.emit(er("session_ping",i),{error:n.error})},500)},this.onSessionDeleteRequest=async(r,n)=>{const{id:i}=n;try{this.isValidDisconnect({topic:r,reason:n.params}),await Promise.all([new Promise(o=>{this.client.core.relayer.once(tr.publish,async()=>{o(await this.deleteSession(r))})}),this.sendResult(i,r,!0)]),this.client.events.emit("session_delete",{id:i,topic:r})}catch(o){await this.sendError(i,r,o),this.client.logger.error(o)}},this.onSessionRequest=async(r,n)=>{const{id:i,params:o}=n;try{this.isValidRequest(on({topic:r},o)),await this.setPendingSessionRequest({id:i,topic:r,params:o});const c=Ss(JSON.stringify(n)),l=this.client.session.get(r),h=await this.getVerifyContext(c,l.peer.metadata);this.client.events.emit("session_request",{id:i,topic:r,params:o,verifyContext:h})}catch(c){await this.sendError(i,r,c),this.client.logger.error(c)}},this.onSessionRequestResponse=(r,n)=>{const{id:i}=n;qn(n)?this.events.emit(er("session_request",i),{result:n.result}):_n(n)&&this.events.emit(er("session_request",i),{error:n.error})},this.onSessionEventRequest=async(r,n)=>{const{id:i,params:o}=n;try{this.isValidEmit(on({topic:r},o)),this.client.events.emit("session_event",{id:i,topic:r,params:o})}catch(c){await this.sendError(i,r,c),this.client.logger.error(c)}},this.isValidConnect=async r=>{if(!Hr(r)){const{message:h}=_e("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(r)}`);throw new Error(h)}const{pairingTopic:n,requiredNamespaces:i,optionalNamespaces:o,sessionProperties:c,relays:l}=r;if($r(n)||await this.isValidPairingTopic(n),!Ab(l,!0)){const{message:h}=_e("MISSING_OR_INVALID",`connect() relays: ${l}`);throw new Error(h)}!$r(i)&&As(i)!==0&&this.validateNamespaces(i,"requiredNamespaces"),!$r(o)&&As(o)!==0&&this.validateNamespaces(o,"optionalNamespaces"),$r(c)||this.validateSessionProps(c,"sessionProperties")},this.validateNamespaces=(r,n)=>{const i=Db(r,"connect()",n);if(i)throw new Error(i.message)},this.isValidApprove=async r=>{if(!Hr(r))throw new Error(_e("MISSING_OR_INVALID",`approve() params: ${r}`).message);const{id:n,namespaces:i,relayProtocol:o,sessionProperties:c}=r;await this.isValidProposalId(n);const l=this.client.proposal.get(n),h=Ya(i,"approve()");if(h)throw new Error(h.message);const d=F1(l.requiredNamespaces,i,"approve()");if(d)throw new Error(d.message);if(!pr(o,!0)){const{message:v}=_e("MISSING_OR_INVALID",`approve() relayProtocol: ${o}`);throw new Error(v)}$r(c)||this.validateSessionProps(c,"sessionProperties")},this.isValidReject=async r=>{if(!Hr(r)){const{message:o}=_e("MISSING_OR_INVALID",`reject() params: ${r}`);throw new Error(o)}const{id:n,reason:i}=r;if(await this.isValidProposalId(n),!Pb(i)){const{message:o}=_e("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(o)}},this.isValidSessionSettleRequest=r=>{if(!Hr(r)){const{message:d}=_e("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${r}`);throw new Error(d)}const{relay:n,controller:i,namespaces:o,expiry:c}=r;if(!U1(n)){const{message:d}=_e("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(d)}const l=Eb(i,"onSessionSettleRequest()");if(l)throw new Error(l.message);const h=Ya(o,"onSessionSettleRequest()");if(h)throw new Error(h.message);if(li(c)){const{message:d}=_e("EXPIRED","onSessionSettleRequest()");throw new Error(d)}},this.isValidUpdate=async r=>{if(!Hr(r)){const{message:h}=_e("MISSING_OR_INVALID",`update() params: ${r}`);throw new Error(h)}const{topic:n,namespaces:i}=r;await this.isValidSessionTopic(n);const o=this.client.session.get(n),c=Ya(i,"update()");if(c)throw new Error(c.message);const l=F1(o.requiredNamespaces,i,"update()");if(l)throw new Error(l.message)},this.isValidExtend=async r=>{if(!Hr(r)){const{message:i}=_e("MISSING_OR_INVALID",`extend() params: ${r}`);throw new Error(i)}const{topic:n}=r;await this.isValidSessionTopic(n)},this.isValidRequest=async r=>{if(!Hr(r)){const{message:h}=_e("MISSING_OR_INVALID",`request() params: ${r}`);throw new Error(h)}const{topic:n,request:i,chainId:o,expiry:c}=r;await this.isValidSessionTopic(n);const{namespaces:l}=this.client.session.get(n);if(!j1(l,o)){const{message:h}=_e("MISSING_OR_INVALID",`request() chainId: ${o}`);throw new Error(h)}if(!Tb(i)){const{message:h}=_e("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(h)}if(!Lb(l,o,i.method)){const{message:h}=_e("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(h)}if(c&&!Fb(c,uh)){const{message:h}=_e("MISSING_OR_INVALID",`request() expiry: ${c}. Expiry must be a number (in seconds) between ${uh.min} and ${uh.max}`);throw new Error(h)}},this.isValidRespond=async r=>{if(!Hr(r)){const{message:o}=_e("MISSING_OR_INVALID",`respond() params: ${r}`);throw new Error(o)}const{topic:n,response:i}=r;if(await this.isValidSessionTopic(n),!Rb(i)){const{message:o}=_e("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(i)}`);throw new Error(o)}},this.isValidPing=async r=>{if(!Hr(r)){const{message:i}=_e("MISSING_OR_INVALID",`ping() params: ${r}`);throw new Error(i)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)},this.isValidEmit=async r=>{if(!Hr(r)){const{message:l}=_e("MISSING_OR_INVALID",`emit() params: ${r}`);throw new Error(l)}const{topic:n,event:i,chainId:o}=r;await this.isValidSessionTopic(n);const{namespaces:c}=this.client.session.get(n);if(!j1(c,o)){const{message:l}=_e("MISSING_OR_INVALID",`emit() chainId: ${o}`);throw new Error(l)}if(!Nb(i)){const{message:l}=_e("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(l)}if(!Mb(c,o,i.name)){const{message:l}=_e("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(l)}},this.isValidDisconnect=async r=>{if(!Hr(r)){const{message:i}=_e("MISSING_OR_INVALID",`disconnect() params: ${r}`);throw new Error(i)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)},this.getVerifyContext=async(r,n)=>{const i={verified:{verifyUrl:n.verifyUrl||"",validation:"UNKNOWN",origin:n.url||""}};try{const o=await this.client.core.verify.resolve({attestationId:r,verifyUrl:n.verifyUrl});o&&(i.verified.origin=o,i.verified.validation=o===n.url?"VALID":"INVALID")}catch(o){this.client.logger.error(o)}return this.client.logger.info(`Verify context: ${JSON.stringify(i)}`),i},this.validateSessionProps=(r,n)=>{Object.values(r).forEach(i=>{if(!pr(i,!1)){const{message:o}=_e("MISSING_OR_INVALID",`${n} must be in Record<string, string> format. Received: ${JSON.stringify(i)}`);throw new Error(o)}})}}isInitialized(){if(!this.initialized){const{message:e}=_e("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.client.core.relayer.on(tr.message,async e=>{const{topic:r,message:n}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const i=await this.client.core.crypto.decode(r,n);Qu(i)?(this.client.core.history.set(r,i),this.onRelayEventRequest({topic:r,payload:i})):rc(i)&&(await this.client.core.history.resolve(i),this.onRelayEventResponse({topic:r,payload:i}))})}registerExpirerEvents(){this.client.core.expirer.on(sn.expired,async e=>{const{topic:r,id:n}=P1(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,_e("EXPIRED"),!0);r?this.client.session.keys.includes(r)&&(await this.deleteSession(r,!0),this.client.events.emit("session_expire",{topic:r})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}isValidPairingTopic(e){if(!pr(e,!1)){const{message:r}=_e("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(r)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:r}=_e("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(r)}if(li(this.client.core.pairing.pairings.get(e).expiry)){const{message:r}=_e("EXPIRED",`pairing topic: ${e}`);throw new Error(r)}}async isValidSessionTopic(e){if(!pr(e,!1)){const{message:r}=_e("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(r)}if(!this.client.session.keys.includes(e)){const{message:r}=_e("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(r)}if(li(this.client.session.get(e).expiry)){await this.deleteSession(e);const{message:r}=_e("EXPIRED",`session topic: ${e}`);throw new Error(r)}}async isValidSessionOrPairingTopic(e){if(this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(pr(e,!1)){const{message:r}=_e("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(r)}else{const{message:r}=_e("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(r)}}async isValidProposalId(e){if(!$b(e)){const{message:r}=_e("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(r)}if(!this.client.proposal.keys.includes(e)){const{message:r}=_e("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(r)}if(li(this.client.proposal.get(e).expiry)){await this.deleteProposal(e);const{message:r}=_e("EXPIRED",`proposal id: ${e}`);throw new Error(r)}}}class a7 extends ic{constructor(e,r){super(e,r,YE,ch),this.core=e,this.logger=r}}class c7 extends ic{constructor(e,r){super(e,r,JE,ch),this.core=e,this.logger=r}}class l7 extends ic{constructor(e,r){super(e,r,QE,ch,n=>n.id),this.core=e,this.logger=r}}class fh extends y4{constructor(e){super(e),this.protocol=ug,this.version=hg,this.name=lh.name,this.events=new yr.exports.EventEmitter,this.on=(n,i)=>this.events.on(n,i),this.once=(n,i)=>this.events.once(n,i),this.off=(n,i)=>this.events.off(n,i),this.removeListener=(n,i)=>this.events.removeListener(n,i),this.removeAllListeners=n=>this.events.removeAllListeners(n),this.connect=async n=>{try{return await this.engine.connect(n)}catch(i){throw this.logger.error(i.message),i}},this.pair=async n=>{try{return await this.engine.pair(n)}catch(i){throw this.logger.error(i.message),i}},this.approve=async n=>{try{return await this.engine.approve(n)}catch(i){throw this.logger.error(i.message),i}},this.reject=async n=>{try{return await this.engine.reject(n)}catch(i){throw this.logger.error(i.message),i}},this.update=async n=>{try{return await this.engine.update(n)}catch(i){throw this.logger.error(i.message),i}},this.extend=async n=>{try{return await this.engine.extend(n)}catch(i){throw this.logger.error(i.message),i}},this.request=async n=>{try{return await this.engine.request(n)}catch(i){throw this.logger.error(i.message),i}},this.respond=async n=>{try{return await this.engine.respond(n)}catch(i){throw this.logger.error(i.message),i}},this.ping=async n=>{try{return await this.engine.ping(n)}catch(i){throw this.logger.error(i.message),i}},this.emit=async n=>{try{return await this.engine.emit(n)}catch(i){throw this.logger.error(i.message),i}},this.disconnect=async n=>{try{return await this.engine.disconnect(n)}catch(i){throw this.logger.error(i.message),i}},this.find=n=>{try{return this.engine.find(n)}catch(i){throw this.logger.error(i.message),i}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}},this.name=e?.name||lh.name,this.metadata=e?.metadata||Z5();const r=typeof e?.logger<"u"&&typeof e?.logger!="string"?e.logger:pt.pino(pt.getDefaultLoggerOptions({level:e?.logger||lh.logger}));this.core=e?.core||new ZE(e),this.logger=pt.generateChildLogger(r,this.name),this.session=new c7(this.core,this.logger),this.proposal=new a7(this.core,this.logger),this.pendingRequest=new l7(this.core,this.logger),this.engine=new o7(this)}static async init(e){const r=new fh(e);return await r.initialize(),r}get context(){return pt.getLoggerContext(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}}var dh={exports:{}};(function(t,e){var r=typeof self<"u"?self:dr,n=function(){function o(){this.fetch=!1,this.DOMException=r.DOMException}return o.prototype=r,new o}();(function(o){(function(c){var l={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function h(S){return S&&DataView.prototype.isPrototypeOf(S)}if(l.arrayBuffer)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],v=ArrayBuffer.isView||function(S){return S&&d.indexOf(Object.prototype.toString.call(S))>-1};function E(S){if(typeof S!="string"&&(S=String(S)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(S))throw new TypeError("Invalid character in header field name");return S.toLowerCase()}function _(S){return typeof S!="string"&&(S=String(S)),S}function O(S){var j={next:function(){var ce=S.shift();return{done:ce===void 0,value:ce}}};return l.iterable&&(j[Symbol.iterator]=function(){return j}),j}function P(S){this.map={},S instanceof P?S.forEach(function(j,ce){this.append(ce,j)},this):Array.isArray(S)?S.forEach(function(j){this.append(j[0],j[1])},this):S&&Object.getOwnPropertyNames(S).forEach(function(j){this.append(j,S[j])},this)}P.prototype.append=function(S,j){S=E(S),j=_(j);var ce=this.map[S];this.map[S]=ce?ce+", "+j:j},P.prototype.delete=function(S){delete this.map[E(S)]},P.prototype.get=function(S){return S=E(S),this.has(S)?this.map[S]:null},P.prototype.has=function(S){return this.map.hasOwnProperty(E(S))},P.prototype.set=function(S,j){this.map[E(S)]=_(j)},P.prototype.forEach=function(S,j){for(var ce in this.map)this.map.hasOwnProperty(ce)&&S.call(j,this.map[ce],ce,this)},P.prototype.keys=function(){var S=[];return this.forEach(function(j,ce){S.push(ce)}),O(S)},P.prototype.values=function(){var S=[];return this.forEach(function(j){S.push(j)}),O(S)},P.prototype.entries=function(){var S=[];return this.forEach(function(j,ce){S.push([ce,j])}),O(S)},l.iterable&&(P.prototype[Symbol.iterator]=P.prototype.entries);function U(S){if(S.bodyUsed)return Promise.reject(new TypeError("Already read"));S.bodyUsed=!0}function H(S){return new Promise(function(j,ce){S.onload=function(){j(S.result)},S.onerror=function(){ce(S.error)}})}function G(S){var j=new FileReader,ce=H(j);return j.readAsArrayBuffer(S),ce}function N(S){var j=new FileReader,ce=H(j);return j.readAsText(S),ce}function L(S){for(var j=new Uint8Array(S),ce=new Array(j.length),le=0;le<j.length;le++)ce[le]=String.fromCharCode(j[le]);return ce.join("")}function $(S){if(S.slice)return S.slice(0);var j=new Uint8Array(S.byteLength);return j.set(new Uint8Array(S)),j.buffer}function T(){return this.bodyUsed=!1,this._initBody=function(S){this._bodyInit=S,S?typeof S=="string"?this._bodyText=S:l.blob&&Blob.prototype.isPrototypeOf(S)?this._bodyBlob=S:l.formData&&FormData.prototype.isPrototypeOf(S)?this._bodyFormData=S:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(S)?this._bodyText=S.toString():l.arrayBuffer&&l.blob&&h(S)?(this._bodyArrayBuffer=$(S.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(S)||v(S))?this._bodyArrayBuffer=$(S):this._bodyText=S=Object.prototype.toString.call(S):this._bodyText="",this.headers.get("content-type")||(typeof S=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(S)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var S=U(this);if(S)return S;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?U(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(G)}),this.text=function(){var S=U(this);if(S)return S;if(this._bodyBlob)return N(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(L(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(J)}),this.json=function(){return this.text().then(JSON.parse)},this}var I=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function f(S){var j=S.toUpperCase();return I.indexOf(j)>-1?j:S}function x(S,j){j=j||{};var ce=j.body;if(S instanceof x){if(S.bodyUsed)throw new TypeError("Already read");this.url=S.url,this.credentials=S.credentials,j.headers||(this.headers=new P(S.headers)),this.method=S.method,this.mode=S.mode,this.signal=S.signal,!ce&&S._bodyInit!=null&&(ce=S._bodyInit,S.bodyUsed=!0)}else this.url=String(S);if(this.credentials=j.credentials||this.credentials||"same-origin",(j.headers||!this.headers)&&(this.headers=new P(j.headers)),this.method=f(j.method||this.method||"GET"),this.mode=j.mode||this.mode||null,this.signal=j.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&ce)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(ce)}x.prototype.clone=function(){return new x(this,{body:this._bodyInit})};function J(S){var j=new FormData;return S.trim().split("&").forEach(function(ce){if(ce){var le=ce.split("="),re=le.shift().replace(/\+/g," "),ne=le.join("=").replace(/\+/g," ");j.append(decodeURIComponent(re),decodeURIComponent(ne))}}),j}function z(S){var j=new P,ce=S.replace(/\r?\n[\t ]+/g," ");return ce.split(/\r?\n/).forEach(function(le){var re=le.split(":"),ne=re.shift().trim();if(ne){var ae=re.join(":").trim();j.append(ne,ae)}}),j}T.call(x.prototype);function ee(S,j){j||(j={}),this.type="default",this.status=j.status===void 0?200:j.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in j?j.statusText:"OK",this.headers=new P(j.headers),this.url=j.url||"",this._initBody(S)}T.call(ee.prototype),ee.prototype.clone=function(){return new ee(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new P(this.headers),url:this.url})},ee.error=function(){var S=new ee(null,{status:0,statusText:""});return S.type="error",S};var de=[301,302,303,307,308];ee.redirect=function(S,j){if(de.indexOf(j)===-1)throw new RangeError("Invalid status code");return new ee(null,{status:j,headers:{location:S}})},c.DOMException=o.DOMException;try{new c.DOMException}catch{c.DOMException=function(j,ce){this.message=j,this.name=ce;var le=Error(j);this.stack=le.stack},c.DOMException.prototype=Object.create(Error.prototype),c.DOMException.prototype.constructor=c.DOMException}function me(S,j){return new Promise(function(ce,le){var re=new x(S,j);if(re.signal&&re.signal.aborted)return le(new c.DOMException("Aborted","AbortError"));var ne=new XMLHttpRequest;function ae(){ne.abort()}ne.onload=function(){var ie={status:ne.status,statusText:ne.statusText,headers:z(ne.getAllResponseHeaders()||"")};ie.url="responseURL"in ne?ne.responseURL:ie.headers.get("X-Request-URL");var De="response"in ne?ne.response:ne.responseText;ce(new ee(De,ie))},ne.onerror=function(){le(new TypeError("Network request failed"))},ne.ontimeout=function(){le(new TypeError("Network request failed"))},ne.onabort=function(){le(new c.DOMException("Aborted","AbortError"))},ne.open(re.method,re.url,!0),re.credentials==="include"?ne.withCredentials=!0:re.credentials==="omit"&&(ne.withCredentials=!1),"responseType"in ne&&l.blob&&(ne.responseType="blob"),re.headers.forEach(function(ie,De){ne.setRequestHeader(De,ie)}),re.signal&&(re.signal.addEventListener("abort",ae),ne.onreadystatechange=function(){ne.readyState===4&&re.signal.removeEventListener("abort",ae)}),ne.send(typeof re._bodyInit>"u"?null:re._bodyInit)})}return me.polyfill=!0,o.fetch||(o.fetch=me,o.Headers=P,o.Request=x,o.Response=ee),c.Headers=P,c.Request=x,c.Response=ee,c.fetch=me,Object.defineProperty(c,"__esModule",{value:!0}),c})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(dh,dh.exports);var mg=fw(dh.exports);const wg={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"},vg=10;class qi{constructor(e){if(this.url=e,this.events=new yr.exports.EventEmitter,this.isAvailable=!1,this.registering=!1,!Sp(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,r){this.isAvailable||await this.register();try{const n=Mo(e),o=await(await mg(this.url,Object.assign(Object.assign({},wg),{body:n}))).json();this.onPayload({data:o})}catch(n){this.onError(e.id,n)}}async register(e=this.url){if(!Sp(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,i)=>{this.events.once("register_error",o=>{this.resetMaxListeners(),i(o)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return i(new Error("HTTP connection is missing or invalid"));n()})})}this.url=e,this.registering=!0;try{const r=Mo({id:1,jsonrpc:"2.0",method:"test",params:[]});await mg(e,Object.assign(Object.assign({},wg),{body:r})),this.onOpen()}catch(r){const n=this.parseError(r);throw this.events.emit("register_error",n),this.onClose(),n}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const r=typeof e.data=="string"?Vu(e.data):e.data;this.events.emit("payload",r)}onError(e,r){const n=this.parseError(r),i=n.message||n.toString(),o=tc(e,i);this.events.emit("payload",o)}parseError(e,r=this.url){return vp(e,r,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>vg&&this.events.setMaxListeners(vg)}}const yg="error",u7="wss://relay.walletconnect.com",h7="wc",f7="universal_provider",bg=`${h7}@${2}:${f7}:`,d7="https://rpc.walletconnect.com/v1",fi={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var Wo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ph={exports:{}};/**
|
|
73
73
|
* @license
|
|
74
74
|
* Lodash <https://lodash.com/>
|
|
75
75
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
76
76
|
* Released under MIT license <https://lodash.com/license>
|
|
77
77
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
78
78
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
79
|
-
*/(function(t,e){(function(){var r,n="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",l="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",d=500,v="__lodash_placeholder__",E=1,_=2,S=4,P=1,L=2,k=1,q=2,T=4,M=8,A=16,R=32,C=64,f=128,x=256,J=512,z=30,ee="...",de=800,me=16,D=1,U=2,ae=3,le=1/0,re=9007199254740991,ne=17976931348623157e292,oe=0/0,ie=4294967295,Se=ie-1,ge=ie>>>1,Ne=[["ary",f],["bind",k],["bindKey",q],["curry",M],["curryRight",A],["flip",J],["partial",R],["partialRight",C],["rearg",x]],be="[object Arguments]",Ae="[object Array]",X="[object AsyncFunction]",Y="[object Boolean]",W="[object Date]",w="[object DOMException]",F="[object Error]",we="[object Function]",ve="[object GeneratorFunction]",Pe="[object Map]",tt="[object Number]",ot="[object Null]",qe="[object Object]",At="[object Promise]",$t="[object Proxy]",Ye="[object RegExp]",je="[object Set]",Me="[object String]",ze="[object Symbol]",et="[object Undefined]",Te="[object WeakMap]",Ve="[object WeakSet]",b="[object ArrayBuffer]",p="[object DataView]",m="[object Float32Array]",$="[object Float64Array]",B="[object Int8Array]",G="[object Int16Array]",Q="[object Int32Array]",xe="[object Uint8Array]",Oe="[object Uint8ClampedArray]",it="[object Uint16Array]",ut="[object Uint32Array]",ct=/\b__p \+= '';/g,Rr=/\b(__p \+=) '' \+/g,Wn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pi=/&(?:amp|lt|gt|quot|#39);/g,es=/[&<>"']/g,kt=RegExp(pi.source),Mt=RegExp(es.source),Ht=/<%-([\s\S]+?)%>/g,zt=/<%([\s\S]+?)%>/g,Ut=/<%=([\s\S]+?)%>/g,Lt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,er=/^\w*$/,tr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Wt=/[\\^$.*+?()[\]{}|]/g,rr=RegExp(Wt.source),qt=/^\s+/,Zt=/\s/,Vt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Pt=/\{\n\/\* \[wrapped with (.+)\] \*/,nr=/,? & /,ir=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,If=/[()=,{}\[\]\/\s]/,Sf=/\\(\\)?/g,Df=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,cn=/\w*$/,Of=/^[-+]0x[0-9a-f]+$/i,Af=/^0b[01]+$/i,$f=/^\[object .+?Constructor\]$/,Pf=/^0o[0-7]+$/i,Tf=/^(?:0|[1-9]\d*)$/,qn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,zs=/($^)/,Rf=/['\n\r\u2028\u2029\\]/g,Ws="\\ud800-\\udfff",Nf="\\u0300-\\u036f",Mf="\\ufe20-\\ufe2f",qs="\\u20d0-\\u20ff",jc=Nf+Mf+qs,Uc="\\u2700-\\u27bf",yn="a-z\\xdf-\\xf6\\xf8-\\xff",Lf="\\xac\\xb1\\xd7\\xf7",jf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Uf="\\u2000-\\u206f",Ff=" \\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",Fc="A-Z\\xc0-\\xd6\\xd8-\\xde",Bc="\\ufe0e\\ufe0f",ts=Lf+jf+Uf+Ff,ca="['\u2019]",rs="["+Ws+"]",la="["+ts+"]",ns="["+jc+"]",kc="\\d+",Bf="["+Uc+"]",Hc="["+yn+"]",zc="[^"+Ws+ts+kc+Uc+yn+Fc+"]",Vs="\\ud83c[\\udffb-\\udfff]",kf="(?:"+ns+"|"+Vs+")",Wc="[^"+Ws+"]",Ks="(?:\\ud83c[\\udde6-\\uddff]){2}",gi="[\\ud800-\\udbff][\\udc00-\\udfff]",Yr="["+Fc+"]",qc="\\u200d",Vc="(?:"+Hc+"|"+zc+")",Rn="(?:"+Yr+"|"+zc+")",Kc="(?:"+ca+"(?:d|ll|m|re|s|t|ve))?",Gc="(?:"+ca+"(?:D|LL|M|RE|S|T|VE))?",Zc=kf+"?",Yc="["+Bc+"]?",Hf="(?:"+qc+"(?:"+[Wc,Ks,gi].join("|")+")"+Yc+Zc+")*",Vn="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Jc="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Xc=Yc+Zc+Hf,Gs="(?:"+[Bf,Ks,gi].join("|")+")"+Xc,zf="(?:"+[Wc+ns+"?",ns,Ks,gi,rs].join("|")+")",ua=RegExp(ca,"g"),Wf=RegExp(ns,"g"),Zs=RegExp(Vs+"(?="+Vs+")|"+zf+Xc,"g"),Qc=RegExp([Yr+"?"+Hc+"+"+Kc+"(?="+[la,Yr,"$"].join("|")+")",Rn+"+"+Gc+"(?="+[la,Yr+Vc,"$"].join("|")+")",Yr+"?"+Vc+"+"+Kc,Yr+"+"+Gc,Jc,Vn,kc,Gs].join("|"),"g"),el=RegExp("["+qc+Ws+jc+Bc+"]"),is=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,tl=["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"],qf=-1,Ct={};Ct[m]=Ct[$]=Ct[B]=Ct[G]=Ct[Q]=Ct[xe]=Ct[Oe]=Ct[it]=Ct[ut]=!0,Ct[be]=Ct[Ae]=Ct[b]=Ct[Y]=Ct[p]=Ct[W]=Ct[F]=Ct[we]=Ct[Pe]=Ct[tt]=Ct[qe]=Ct[Ye]=Ct[je]=Ct[Me]=Ct[Te]=!1;var xt={};xt[be]=xt[Ae]=xt[b]=xt[p]=xt[Y]=xt[W]=xt[m]=xt[$]=xt[B]=xt[G]=xt[Q]=xt[Pe]=xt[tt]=xt[qe]=xt[Ye]=xt[je]=xt[Me]=xt[ze]=xt[xe]=xt[Oe]=xt[it]=xt[ut]=!0,xt[F]=xt[we]=xt[Te]=!1;var N={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},V={"&":"&","<":"<",">":">",'"':""","'":"'"},fe={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},It=parseFloat,Je=parseInt,Tt=typeof Mo=="object"&&Mo&&Mo.Object===Object&&Mo,sr=typeof self=="object"&&self&&self.Object===Object&&self,gt=Tt||sr||Function("return this")(),St=e&&!e.nodeType&&e,Yt=St&&!0&&t&&!t.nodeType&&t,Hr=Yt&&Yt.exports===St,or=Hr&&Tt.process,Rt=function(){try{var K=Yt&&Yt.require&&Yt.require("util").types;return K||or&&or.binding&&or.binding("util")}catch{}}(),Nr=Rt&&Rt.isArrayBuffer,bn=Rt&&Rt.isDate,ln=Rt&&Rt.isMap,Nn=Rt&&Rt.isRegExp,ha=Rt&&Rt.isSet,ss=Rt&&Rt.isTypedArray;function mr(K,se,te){switch(te.length){case 0:return K.call(se);case 1:return K.call(se,te[0]);case 2:return K.call(se,te[0],te[1]);case 3:return K.call(se,te[0],te[1],te[2])}return K.apply(se,te)}function vD(K,se,te,Ie){for(var Ke=-1,vt=K==null?0:K.length;++Ke<vt;){var hr=K[Ke];se(Ie,hr,te(hr),K)}return Ie}function un(K,se){for(var te=-1,Ie=K==null?0:K.length;++te<Ie&&se(K[te],te,K)!==!1;);return K}function yD(K,se){for(var te=K==null?0:K.length;te--&&se(K[te],te,K)!==!1;);return K}function Y3(K,se){for(var te=-1,Ie=K==null?0:K.length;++te<Ie;)if(!se(K[te],te,K))return!1;return!0}function mi(K,se){for(var te=-1,Ie=K==null?0:K.length,Ke=0,vt=[];++te<Ie;){var hr=K[te];se(hr,te,K)&&(vt[Ke++]=hr)}return vt}function rl(K,se){var te=K==null?0:K.length;return!!te&&Ys(K,se,0)>-1}function Vf(K,se,te){for(var Ie=-1,Ke=K==null?0:K.length;++Ie<Ke;)if(te(se,K[Ie]))return!0;return!1}function jt(K,se){for(var te=-1,Ie=K==null?0:K.length,Ke=Array(Ie);++te<Ie;)Ke[te]=se(K[te],te,K);return Ke}function wi(K,se){for(var te=-1,Ie=se.length,Ke=K.length;++te<Ie;)K[Ke+te]=se[te];return K}function Kf(K,se,te,Ie){var Ke=-1,vt=K==null?0:K.length;for(Ie&&vt&&(te=K[++Ke]);++Ke<vt;)te=se(te,K[Ke],Ke,K);return te}function bD(K,se,te,Ie){var Ke=K==null?0:K.length;for(Ie&&Ke&&(te=K[--Ke]);Ke--;)te=se(te,K[Ke],Ke,K);return te}function Gf(K,se){for(var te=-1,Ie=K==null?0:K.length;++te<Ie;)if(se(K[te],te,K))return!0;return!1}var _D=Zf("length");function ED(K){return K.split("")}function xD(K){return K.match(ir)||[]}function J3(K,se,te){var Ie;return te(K,function(Ke,vt,hr){if(se(Ke,vt,hr))return Ie=vt,!1}),Ie}function nl(K,se,te,Ie){for(var Ke=K.length,vt=te+(Ie?1:-1);Ie?vt--:++vt<Ke;)if(se(K[vt],vt,K))return vt;return-1}function Ys(K,se,te){return se===se?MD(K,se,te):nl(K,X3,te)}function CD(K,se,te,Ie){for(var Ke=te-1,vt=K.length;++Ke<vt;)if(Ie(K[Ke],se))return Ke;return-1}function X3(K){return K!==K}function Q3(K,se){var te=K==null?0:K.length;return te?Jf(K,se)/te:oe}function Zf(K){return function(se){return se==null?r:se[K]}}function Yf(K){return function(se){return K==null?r:K[se]}}function e2(K,se,te,Ie,Ke){return Ke(K,function(vt,hr,Dt){te=Ie?(Ie=!1,vt):se(te,vt,hr,Dt)}),te}function ID(K,se){var te=K.length;for(K.sort(se);te--;)K[te]=K[te].value;return K}function Jf(K,se){for(var te,Ie=-1,Ke=K.length;++Ie<Ke;){var vt=se(K[Ie]);vt!==r&&(te=te===r?vt:te+vt)}return te}function Xf(K,se){for(var te=-1,Ie=Array(K);++te<K;)Ie[te]=se(te);return Ie}function SD(K,se){return jt(se,function(te){return[te,K[te]]})}function t2(K){return K&&K.slice(0,s2(K)+1).replace(qt,"")}function Jr(K){return function(se){return K(se)}}function Qf(K,se){return jt(se,function(te){return K[te]})}function fa(K,se){return K.has(se)}function r2(K,se){for(var te=-1,Ie=K.length;++te<Ie&&Ys(se,K[te],0)>-1;);return te}function n2(K,se){for(var te=K.length;te--&&Ys(se,K[te],0)>-1;);return te}function DD(K,se){for(var te=K.length,Ie=0;te--;)K[te]===se&&++Ie;return Ie}var OD=Yf(N),AD=Yf(V);function $D(K){return"\\"+Ce[K]}function PD(K,se){return K==null?r:K[se]}function Js(K){return el.test(K)}function TD(K){return is.test(K)}function RD(K){for(var se,te=[];!(se=K.next()).done;)te.push(se.value);return te}function e0(K){var se=-1,te=Array(K.size);return K.forEach(function(Ie,Ke){te[++se]=[Ke,Ie]}),te}function i2(K,se){return function(te){return K(se(te))}}function vi(K,se){for(var te=-1,Ie=K.length,Ke=0,vt=[];++te<Ie;){var hr=K[te];(hr===se||hr===v)&&(K[te]=v,vt[Ke++]=te)}return vt}function il(K){var se=-1,te=Array(K.size);return K.forEach(function(Ie){te[++se]=Ie}),te}function ND(K){var se=-1,te=Array(K.size);return K.forEach(function(Ie){te[++se]=[Ie,Ie]}),te}function MD(K,se,te){for(var Ie=te-1,Ke=K.length;++Ie<Ke;)if(K[Ie]===se)return Ie;return-1}function LD(K,se,te){for(var Ie=te+1;Ie--;)if(K[Ie]===se)return Ie;return Ie}function Xs(K){return Js(K)?UD(K):_D(K)}function _n(K){return Js(K)?FD(K):ED(K)}function s2(K){for(var se=K.length;se--&&Zt.test(K.charAt(se)););return se}var jD=Yf(fe);function UD(K){for(var se=Zs.lastIndex=0;Zs.test(K);)++se;return se}function FD(K){return K.match(Zs)||[]}function BD(K){return K.match(Qc)||[]}var kD=function K(se){se=se==null?gt:Qs.defaults(gt.Object(),se,Qs.pick(gt,tl));var te=se.Array,Ie=se.Date,Ke=se.Error,vt=se.Function,hr=se.Math,Dt=se.Object,t0=se.RegExp,HD=se.String,hn=se.TypeError,sl=te.prototype,zD=vt.prototype,eo=Dt.prototype,ol=se["__core-js_shared__"],al=zD.toString,bt=eo.hasOwnProperty,WD=0,o2=function(){var s=/[^.]+$/.exec(ol&&ol.keys&&ol.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),cl=eo.toString,qD=al.call(Dt),VD=gt._,KD=t0("^"+al.call(bt).replace(Wt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ll=Hr?se.Buffer:r,yi=se.Symbol,ul=se.Uint8Array,a2=ll?ll.allocUnsafe:r,hl=i2(Dt.getPrototypeOf,Dt),c2=Dt.create,l2=eo.propertyIsEnumerable,fl=sl.splice,u2=yi?yi.isConcatSpreadable:r,da=yi?yi.iterator:r,os=yi?yi.toStringTag:r,dl=function(){try{var s=hs(Dt,"defineProperty");return s({},"",{}),s}catch{}}(),GD=se.clearTimeout!==gt.clearTimeout&&se.clearTimeout,ZD=Ie&&Ie.now!==gt.Date.now&&Ie.now,YD=se.setTimeout!==gt.setTimeout&&se.setTimeout,pl=hr.ceil,gl=hr.floor,r0=Dt.getOwnPropertySymbols,JD=ll?ll.isBuffer:r,h2=se.isFinite,XD=sl.join,QD=i2(Dt.keys,Dt),fr=hr.max,Cr=hr.min,eO=Ie.now,tO=se.parseInt,f2=hr.random,rO=sl.reverse,n0=hs(se,"DataView"),pa=hs(se,"Map"),i0=hs(se,"Promise"),to=hs(se,"Set"),ga=hs(se,"WeakMap"),ma=hs(Dt,"create"),ml=ga&&new ga,ro={},nO=fs(n0),iO=fs(pa),sO=fs(i0),oO=fs(to),aO=fs(ga),wl=yi?yi.prototype:r,wa=wl?wl.valueOf:r,d2=wl?wl.toString:r;function I(s){if(Kt(s)&&!Xe(s)&&!(s instanceof dt)){if(s instanceof fn)return s;if(bt.call(s,"__wrapped__"))return pm(s)}return new fn(s)}var no=function(){function s(){}return function(a){if(!Ft(a))return{};if(c2)return c2(a);s.prototype=a;var u=new s;return s.prototype=r,u}}();function vl(){}function fn(s,a){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=r}I.templateSettings={escape:Ht,evaluate:zt,interpolate:Ut,variable:"",imports:{_:I}},I.prototype=vl.prototype,I.prototype.constructor=I,fn.prototype=no(vl.prototype),fn.prototype.constructor=fn;function dt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ie,this.__views__=[]}function cO(){var s=new dt(this.__wrapped__);return s.__actions__=zr(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=zr(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=zr(this.__views__),s}function lO(){if(this.__filtered__){var s=new dt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function uO(){var s=this.__wrapped__.value(),a=this.__dir__,u=Xe(s),g=a<0,y=u?s.length:0,O=EA(0,y,this.__views__),j=O.start,H=O.end,Z=H-j,ue=g?H:j-1,he=this.__iteratees__,pe=he.length,_e=0,De=Cr(Z,this.__takeCount__);if(!u||!g&&y==Z&&De==Z)return j2(s,this.__actions__);var Fe=[];e:for(;Z--&&_e<De;){ue+=a;for(var st=-1,Be=s[ue];++st<pe;){var ht=he[st],mt=ht.iteratee,en=ht.type,jr=mt(Be);if(en==U)Be=jr;else if(!jr){if(en==D)continue e;break e}}Fe[_e++]=Be}return Fe}dt.prototype=no(vl.prototype),dt.prototype.constructor=dt;function as(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var g=s[a];this.set(g[0],g[1])}}function hO(){this.__data__=ma?ma(null):{},this.size=0}function fO(s){var a=this.has(s)&&delete this.__data__[s];return this.size-=a?1:0,a}function dO(s){var a=this.__data__;if(ma){var u=a[s];return u===h?r:u}return bt.call(a,s)?a[s]:r}function pO(s){var a=this.__data__;return ma?a[s]!==r:bt.call(a,s)}function gO(s,a){var u=this.__data__;return this.size+=this.has(s)?0:1,u[s]=ma&&a===r?h:a,this}as.prototype.clear=hO,as.prototype.delete=fO,as.prototype.get=dO,as.prototype.has=pO,as.prototype.set=gO;function Kn(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var g=s[a];this.set(g[0],g[1])}}function mO(){this.__data__=[],this.size=0}function wO(s){var a=this.__data__,u=yl(a,s);if(u<0)return!1;var g=a.length-1;return u==g?a.pop():fl.call(a,u,1),--this.size,!0}function vO(s){var a=this.__data__,u=yl(a,s);return u<0?r:a[u][1]}function yO(s){return yl(this.__data__,s)>-1}function bO(s,a){var u=this.__data__,g=yl(u,s);return g<0?(++this.size,u.push([s,a])):u[g][1]=a,this}Kn.prototype.clear=mO,Kn.prototype.delete=wO,Kn.prototype.get=vO,Kn.prototype.has=yO,Kn.prototype.set=bO;function Gn(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var g=s[a];this.set(g[0],g[1])}}function _O(){this.size=0,this.__data__={hash:new as,map:new(pa||Kn),string:new as}}function EO(s){var a=Pl(this,s).delete(s);return this.size-=a?1:0,a}function xO(s){return Pl(this,s).get(s)}function CO(s){return Pl(this,s).has(s)}function IO(s,a){var u=Pl(this,s),g=u.size;return u.set(s,a),this.size+=u.size==g?0:1,this}Gn.prototype.clear=_O,Gn.prototype.delete=EO,Gn.prototype.get=xO,Gn.prototype.has=CO,Gn.prototype.set=IO;function cs(s){var a=-1,u=s==null?0:s.length;for(this.__data__=new Gn;++a<u;)this.add(s[a])}function SO(s){return this.__data__.set(s,h),this}function DO(s){return this.__data__.has(s)}cs.prototype.add=cs.prototype.push=SO,cs.prototype.has=DO;function En(s){var a=this.__data__=new Kn(s);this.size=a.size}function OO(){this.__data__=new Kn,this.size=0}function AO(s){var a=this.__data__,u=a.delete(s);return this.size=a.size,u}function $O(s){return this.__data__.get(s)}function PO(s){return this.__data__.has(s)}function TO(s,a){var u=this.__data__;if(u instanceof Kn){var g=u.__data__;if(!pa||g.length<i-1)return g.push([s,a]),this.size=++u.size,this;u=this.__data__=new Gn(g)}return u.set(s,a),this.size=u.size,this}En.prototype.clear=OO,En.prototype.delete=AO,En.prototype.get=$O,En.prototype.has=PO,En.prototype.set=TO;function p2(s,a){var u=Xe(s),g=!u&&ds(s),y=!u&&!g&&Ci(s),O=!u&&!g&&!y&&ao(s),j=u||g||y||O,H=j?Xf(s.length,HD):[],Z=H.length;for(var ue in s)(a||bt.call(s,ue))&&!(j&&(ue=="length"||y&&(ue=="offset"||ue=="parent")||O&&(ue=="buffer"||ue=="byteLength"||ue=="byteOffset")||Xn(ue,Z)))&&H.push(ue);return H}function g2(s){var a=s.length;return a?s[g0(0,a-1)]:r}function RO(s,a){return Tl(zr(s),ls(a,0,s.length))}function NO(s){return Tl(zr(s))}function s0(s,a,u){(u!==r&&!xn(s[a],u)||u===r&&!(a in s))&&Zn(s,a,u)}function va(s,a,u){var g=s[a];(!(bt.call(s,a)&&xn(g,u))||u===r&&!(a in s))&&Zn(s,a,u)}function yl(s,a){for(var u=s.length;u--;)if(xn(s[u][0],a))return u;return-1}function MO(s,a,u,g){return bi(s,function(y,O,j){a(g,y,u(y),j)}),g}function m2(s,a){return s&&Ln(a,wr(a),s)}function LO(s,a){return s&&Ln(a,qr(a),s)}function Zn(s,a,u){a=="__proto__"&&dl?dl(s,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):s[a]=u}function o0(s,a){for(var u=-1,g=a.length,y=te(g),O=s==null;++u<g;)y[u]=O?r:B0(s,a[u]);return y}function ls(s,a,u){return s===s&&(u!==r&&(s=s<=u?s:u),a!==r&&(s=s>=a?s:a)),s}function dn(s,a,u,g,y,O){var j,H=a&E,Z=a&_,ue=a&S;if(u&&(j=y?u(s,g,y,O):u(s)),j!==r)return j;if(!Ft(s))return s;var he=Xe(s);if(he){if(j=CA(s),!H)return zr(s,j)}else{var pe=Ir(s),_e=pe==we||pe==ve;if(Ci(s))return B2(s,H);if(pe==qe||pe==be||_e&&!y){if(j=Z||_e?{}:sm(s),!H)return Z?dA(s,LO(j,s)):fA(s,m2(j,s))}else{if(!xt[pe])return y?s:{};j=IA(s,pe,H)}}O||(O=new En);var De=O.get(s);if(De)return De;O.set(s,j),Nm(s)?s.forEach(function(Be){j.add(dn(Be,a,u,Be,s,O))}):Tm(s)&&s.forEach(function(Be,ht){j.set(ht,dn(Be,a,u,ht,s,O))});var Fe=ue?Z?S0:I0:Z?qr:wr,st=he?r:Fe(s);return un(st||s,function(Be,ht){st&&(ht=Be,Be=s[ht]),va(j,ht,dn(Be,a,u,ht,s,O))}),j}function jO(s){var a=wr(s);return function(u){return w2(u,s,a)}}function w2(s,a,u){var g=u.length;if(s==null)return!g;for(s=Dt(s);g--;){var y=u[g],O=a[y],j=s[y];if(j===r&&!(y in s)||!O(j))return!1}return!0}function v2(s,a,u){if(typeof s!="function")throw new hn(c);return Ia(function(){s.apply(r,u)},a)}function ya(s,a,u,g){var y=-1,O=rl,j=!0,H=s.length,Z=[],ue=a.length;if(!H)return Z;u&&(a=jt(a,Jr(u))),g?(O=Vf,j=!1):a.length>=i&&(O=fa,j=!1,a=new cs(a));e:for(;++y<H;){var he=s[y],pe=u==null?he:u(he);if(he=g||he!==0?he:0,j&&pe===pe){for(var _e=ue;_e--;)if(a[_e]===pe)continue e;Z.push(he)}else O(a,pe,g)||Z.push(he)}return Z}var bi=q2(Mn),y2=q2(c0,!0);function UO(s,a){var u=!0;return bi(s,function(g,y,O){return u=!!a(g,y,O),u}),u}function bl(s,a,u){for(var g=-1,y=s.length;++g<y;){var O=s[g],j=a(O);if(j!=null&&(H===r?j===j&&!Qr(j):u(j,H)))var H=j,Z=O}return Z}function FO(s,a,u,g){var y=s.length;for(u=rt(u),u<0&&(u=-u>y?0:y+u),g=g===r||g>y?y:rt(g),g<0&&(g+=y),g=u>g?0:Lm(g);u<g;)s[u++]=a;return s}function b2(s,a){var u=[];return bi(s,function(g,y,O){a(g,y,O)&&u.push(g)}),u}function _r(s,a,u,g,y){var O=-1,j=s.length;for(u||(u=DA),y||(y=[]);++O<j;){var H=s[O];a>0&&u(H)?a>1?_r(H,a-1,u,g,y):wi(y,H):g||(y[y.length]=H)}return y}var a0=V2(),_2=V2(!0);function Mn(s,a){return s&&a0(s,a,wr)}function c0(s,a){return s&&_2(s,a,wr)}function _l(s,a){return mi(a,function(u){return Qn(s[u])})}function us(s,a){a=Ei(a,s);for(var u=0,g=a.length;s!=null&&u<g;)s=s[jn(a[u++])];return u&&u==g?s:r}function E2(s,a,u){var g=a(s);return Xe(s)?g:wi(g,u(s))}function Mr(s){return s==null?s===r?et:ot:os&&os in Dt(s)?_A(s):NA(s)}function l0(s,a){return s>a}function BO(s,a){return s!=null&&bt.call(s,a)}function kO(s,a){return s!=null&&a in Dt(s)}function HO(s,a,u){return s>=Cr(a,u)&&s<fr(a,u)}function u0(s,a,u){for(var g=u?Vf:rl,y=s[0].length,O=s.length,j=O,H=te(O),Z=1/0,ue=[];j--;){var he=s[j];j&&a&&(he=jt(he,Jr(a))),Z=Cr(he.length,Z),H[j]=!u&&(a||y>=120&&he.length>=120)?new cs(j&&he):r}he=s[0];var pe=-1,_e=H[0];e:for(;++pe<y&&ue.length<Z;){var De=he[pe],Fe=a?a(De):De;if(De=u||De!==0?De:0,!(_e?fa(_e,Fe):g(ue,Fe,u))){for(j=O;--j;){var st=H[j];if(!(st?fa(st,Fe):g(s[j],Fe,u)))continue e}_e&&_e.push(Fe),ue.push(De)}}return ue}function zO(s,a,u,g){return Mn(s,function(y,O,j){a(g,u(y),O,j)}),g}function ba(s,a,u){a=Ei(a,s),s=lm(s,a);var g=s==null?s:s[jn(gn(a))];return g==null?r:mr(g,s,u)}function x2(s){return Kt(s)&&Mr(s)==be}function WO(s){return Kt(s)&&Mr(s)==b}function qO(s){return Kt(s)&&Mr(s)==W}function _a(s,a,u,g,y){return s===a?!0:s==null||a==null||!Kt(s)&&!Kt(a)?s!==s&&a!==a:VO(s,a,u,g,_a,y)}function VO(s,a,u,g,y,O){var j=Xe(s),H=Xe(a),Z=j?Ae:Ir(s),ue=H?Ae:Ir(a);Z=Z==be?qe:Z,ue=ue==be?qe:ue;var he=Z==qe,pe=ue==qe,_e=Z==ue;if(_e&&Ci(s)){if(!Ci(a))return!1;j=!0,he=!1}if(_e&&!he)return O||(O=new En),j||ao(s)?rm(s,a,u,g,y,O):yA(s,a,Z,u,g,y,O);if(!(u&P)){var De=he&&bt.call(s,"__wrapped__"),Fe=pe&&bt.call(a,"__wrapped__");if(De||Fe){var st=De?s.value():s,Be=Fe?a.value():a;return O||(O=new En),y(st,Be,u,g,O)}}return _e?(O||(O=new En),bA(s,a,u,g,y,O)):!1}function KO(s){return Kt(s)&&Ir(s)==Pe}function h0(s,a,u,g){var y=u.length,O=y,j=!g;if(s==null)return!O;for(s=Dt(s);y--;){var H=u[y];if(j&&H[2]?H[1]!==s[H[0]]:!(H[0]in s))return!1}for(;++y<O;){H=u[y];var Z=H[0],ue=s[Z],he=H[1];if(j&&H[2]){if(ue===r&&!(Z in s))return!1}else{var pe=new En;if(g)var _e=g(ue,he,Z,s,a,pe);if(!(_e===r?_a(he,ue,P|L,g,pe):_e))return!1}}return!0}function C2(s){if(!Ft(s)||AA(s))return!1;var a=Qn(s)?KD:$f;return a.test(fs(s))}function GO(s){return Kt(s)&&Mr(s)==Ye}function ZO(s){return Kt(s)&&Ir(s)==je}function YO(s){return Kt(s)&&Ul(s.length)&&!!Ct[Mr(s)]}function I2(s){return typeof s=="function"?s:s==null?Vr:typeof s=="object"?Xe(s)?O2(s[0],s[1]):D2(s):Km(s)}function f0(s){if(!Ca(s))return QD(s);var a=[];for(var u in Dt(s))bt.call(s,u)&&u!="constructor"&&a.push(u);return a}function JO(s){if(!Ft(s))return RA(s);var a=Ca(s),u=[];for(var g in s)g=="constructor"&&(a||!bt.call(s,g))||u.push(g);return u}function d0(s,a){return s<a}function S2(s,a){var u=-1,g=Wr(s)?te(s.length):[];return bi(s,function(y,O,j){g[++u]=a(y,O,j)}),g}function D2(s){var a=O0(s);return a.length==1&&a[0][2]?am(a[0][0],a[0][1]):function(u){return u===s||h0(u,s,a)}}function O2(s,a){return $0(s)&&om(a)?am(jn(s),a):function(u){var g=B0(u,s);return g===r&&g===a?k0(u,s):_a(a,g,P|L)}}function El(s,a,u,g,y){s!==a&&a0(a,function(O,j){if(y||(y=new En),Ft(O))XO(s,a,j,u,El,g,y);else{var H=g?g(T0(s,j),O,j+"",s,a,y):r;H===r&&(H=O),s0(s,j,H)}},qr)}function XO(s,a,u,g,y,O,j){var H=T0(s,u),Z=T0(a,u),ue=j.get(Z);if(ue){s0(s,u,ue);return}var he=O?O(H,Z,u+"",s,a,j):r,pe=he===r;if(pe){var _e=Xe(Z),De=!_e&&Ci(Z),Fe=!_e&&!De&&ao(Z);he=Z,_e||De||Fe?Xe(H)?he=H:Jt(H)?he=zr(H):De?(pe=!1,he=B2(Z,!0)):Fe?(pe=!1,he=k2(Z,!0)):he=[]:Sa(Z)||ds(Z)?(he=H,ds(H)?he=jm(H):(!Ft(H)||Qn(H))&&(he=sm(Z))):pe=!1}pe&&(j.set(Z,he),y(he,Z,g,O,j),j.delete(Z)),s0(s,u,he)}function A2(s,a){var u=s.length;if(u)return a+=a<0?u:0,Xn(a,u)?s[a]:r}function $2(s,a,u){a.length?a=jt(a,function(O){return Xe(O)?function(j){return us(j,O.length===1?O[0]:O)}:O}):a=[Vr];var g=-1;a=jt(a,Jr(Ue()));var y=S2(s,function(O,j,H){var Z=jt(a,function(ue){return ue(O)});return{criteria:Z,index:++g,value:O}});return ID(y,function(O,j){return hA(O,j,u)})}function QO(s,a){return P2(s,a,function(u,g){return k0(s,g)})}function P2(s,a,u){for(var g=-1,y=a.length,O={};++g<y;){var j=a[g],H=us(s,j);u(H,j)&&Ea(O,Ei(j,s),H)}return O}function eA(s){return function(a){return us(a,s)}}function p0(s,a,u,g){var y=g?CD:Ys,O=-1,j=a.length,H=s;for(s===a&&(a=zr(a)),u&&(H=jt(s,Jr(u)));++O<j;)for(var Z=0,ue=a[O],he=u?u(ue):ue;(Z=y(H,he,Z,g))>-1;)H!==s&&fl.call(H,Z,1),fl.call(s,Z,1);return s}function T2(s,a){for(var u=s?a.length:0,g=u-1;u--;){var y=a[u];if(u==g||y!==O){var O=y;Xn(y)?fl.call(s,y,1):v0(s,y)}}return s}function g0(s,a){return s+gl(f2()*(a-s+1))}function tA(s,a,u,g){for(var y=-1,O=fr(pl((a-s)/(u||1)),0),j=te(O);O--;)j[g?O:++y]=s,s+=u;return j}function m0(s,a){var u="";if(!s||a<1||a>re)return u;do a%2&&(u+=s),a=gl(a/2),a&&(s+=s);while(a);return u}function at(s,a){return R0(cm(s,a,Vr),s+"")}function rA(s){return g2(co(s))}function nA(s,a){var u=co(s);return Tl(u,ls(a,0,u.length))}function Ea(s,a,u,g){if(!Ft(s))return s;a=Ei(a,s);for(var y=-1,O=a.length,j=O-1,H=s;H!=null&&++y<O;){var Z=jn(a[y]),ue=u;if(Z==="__proto__"||Z==="constructor"||Z==="prototype")return s;if(y!=j){var he=H[Z];ue=g?g(he,Z,H):r,ue===r&&(ue=Ft(he)?he:Xn(a[y+1])?[]:{})}va(H,Z,ue),H=H[Z]}return s}var R2=ml?function(s,a){return ml.set(s,a),s}:Vr,iA=dl?function(s,a){return dl(s,"toString",{configurable:!0,enumerable:!1,value:z0(a),writable:!0})}:Vr;function sA(s){return Tl(co(s))}function pn(s,a,u){var g=-1,y=s.length;a<0&&(a=-a>y?0:y+a),u=u>y?y:u,u<0&&(u+=y),y=a>u?0:u-a>>>0,a>>>=0;for(var O=te(y);++g<y;)O[g]=s[g+a];return O}function oA(s,a){var u;return bi(s,function(g,y,O){return u=a(g,y,O),!u}),!!u}function xl(s,a,u){var g=0,y=s==null?g:s.length;if(typeof a=="number"&&a===a&&y<=ge){for(;g<y;){var O=g+y>>>1,j=s[O];j!==null&&!Qr(j)&&(u?j<=a:j<a)?g=O+1:y=O}return y}return w0(s,a,Vr,u)}function w0(s,a,u,g){var y=0,O=s==null?0:s.length;if(O===0)return 0;a=u(a);for(var j=a!==a,H=a===null,Z=Qr(a),ue=a===r;y<O;){var he=gl((y+O)/2),pe=u(s[he]),_e=pe!==r,De=pe===null,Fe=pe===pe,st=Qr(pe);if(j)var Be=g||Fe;else ue?Be=Fe&&(g||_e):H?Be=Fe&&_e&&(g||!De):Z?Be=Fe&&_e&&!De&&(g||!st):De||st?Be=!1:Be=g?pe<=a:pe<a;Be?y=he+1:O=he}return Cr(O,Se)}function N2(s,a){for(var u=-1,g=s.length,y=0,O=[];++u<g;){var j=s[u],H=a?a(j):j;if(!u||!xn(H,Z)){var Z=H;O[y++]=j===0?0:j}}return O}function M2(s){return typeof s=="number"?s:Qr(s)?oe:+s}function Xr(s){if(typeof s=="string")return s;if(Xe(s))return jt(s,Xr)+"";if(Qr(s))return d2?d2.call(s):"";var a=s+"";return a=="0"&&1/s==-le?"-0":a}function _i(s,a,u){var g=-1,y=rl,O=s.length,j=!0,H=[],Z=H;if(u)j=!1,y=Vf;else if(O>=i){var ue=a?null:wA(s);if(ue)return il(ue);j=!1,y=fa,Z=new cs}else Z=a?[]:H;e:for(;++g<O;){var he=s[g],pe=a?a(he):he;if(he=u||he!==0?he:0,j&&pe===pe){for(var _e=Z.length;_e--;)if(Z[_e]===pe)continue e;a&&Z.push(pe),H.push(he)}else y(Z,pe,u)||(Z!==H&&Z.push(pe),H.push(he))}return H}function v0(s,a){return a=Ei(a,s),s=lm(s,a),s==null||delete s[jn(gn(a))]}function L2(s,a,u,g){return Ea(s,a,u(us(s,a)),g)}function Cl(s,a,u,g){for(var y=s.length,O=g?y:-1;(g?O--:++O<y)&&a(s[O],O,s););return u?pn(s,g?0:O,g?O+1:y):pn(s,g?O+1:0,g?y:O)}function j2(s,a){var u=s;return u instanceof dt&&(u=u.value()),Kf(a,function(g,y){return y.func.apply(y.thisArg,wi([g],y.args))},u)}function y0(s,a,u){var g=s.length;if(g<2)return g?_i(s[0]):[];for(var y=-1,O=te(g);++y<g;)for(var j=s[y],H=-1;++H<g;)H!=y&&(O[y]=ya(O[y]||j,s[H],a,u));return _i(_r(O,1),a,u)}function U2(s,a,u){for(var g=-1,y=s.length,O=a.length,j={};++g<y;){var H=g<O?a[g]:r;u(j,s[g],H)}return j}function b0(s){return Jt(s)?s:[]}function _0(s){return typeof s=="function"?s:Vr}function Ei(s,a){return Xe(s)?s:$0(s,a)?[s]:dm(yt(s))}var aA=at;function xi(s,a,u){var g=s.length;return u=u===r?g:u,!a&&u>=g?s:pn(s,a,u)}var F2=GD||function(s){return gt.clearTimeout(s)};function B2(s,a){if(a)return s.slice();var u=s.length,g=a2?a2(u):new s.constructor(u);return s.copy(g),g}function E0(s){var a=new s.constructor(s.byteLength);return new ul(a).set(new ul(s)),a}function cA(s,a){var u=a?E0(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.byteLength)}function lA(s){var a=new s.constructor(s.source,cn.exec(s));return a.lastIndex=s.lastIndex,a}function uA(s){return wa?Dt(wa.call(s)):{}}function k2(s,a){var u=a?E0(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.length)}function H2(s,a){if(s!==a){var u=s!==r,g=s===null,y=s===s,O=Qr(s),j=a!==r,H=a===null,Z=a===a,ue=Qr(a);if(!H&&!ue&&!O&&s>a||O&&j&&Z&&!H&&!ue||g&&j&&Z||!u&&Z||!y)return 1;if(!g&&!O&&!ue&&s<a||ue&&u&&y&&!g&&!O||H&&u&&y||!j&&y||!Z)return-1}return 0}function hA(s,a,u){for(var g=-1,y=s.criteria,O=a.criteria,j=y.length,H=u.length;++g<j;){var Z=H2(y[g],O[g]);if(Z){if(g>=H)return Z;var ue=u[g];return Z*(ue=="desc"?-1:1)}}return s.index-a.index}function z2(s,a,u,g){for(var y=-1,O=s.length,j=u.length,H=-1,Z=a.length,ue=fr(O-j,0),he=te(Z+ue),pe=!g;++H<Z;)he[H]=a[H];for(;++y<j;)(pe||y<O)&&(he[u[y]]=s[y]);for(;ue--;)he[H++]=s[y++];return he}function W2(s,a,u,g){for(var y=-1,O=s.length,j=-1,H=u.length,Z=-1,ue=a.length,he=fr(O-H,0),pe=te(he+ue),_e=!g;++y<he;)pe[y]=s[y];for(var De=y;++Z<ue;)pe[De+Z]=a[Z];for(;++j<H;)(_e||y<O)&&(pe[De+u[j]]=s[y++]);return pe}function zr(s,a){var u=-1,g=s.length;for(a||(a=te(g));++u<g;)a[u]=s[u];return a}function Ln(s,a,u,g){var y=!u;u||(u={});for(var O=-1,j=a.length;++O<j;){var H=a[O],Z=g?g(u[H],s[H],H,u,s):r;Z===r&&(Z=s[H]),y?Zn(u,H,Z):va(u,H,Z)}return u}function fA(s,a){return Ln(s,A0(s),a)}function dA(s,a){return Ln(s,nm(s),a)}function Il(s,a){return function(u,g){var y=Xe(u)?vD:MO,O=a?a():{};return y(u,s,Ue(g,2),O)}}function io(s){return at(function(a,u){var g=-1,y=u.length,O=y>1?u[y-1]:r,j=y>2?u[2]:r;for(O=s.length>3&&typeof O=="function"?(y--,O):r,j&&Lr(u[0],u[1],j)&&(O=y<3?r:O,y=1),a=Dt(a);++g<y;){var H=u[g];H&&s(a,H,g,O)}return a})}function q2(s,a){return function(u,g){if(u==null)return u;if(!Wr(u))return s(u,g);for(var y=u.length,O=a?y:-1,j=Dt(u);(a?O--:++O<y)&&g(j[O],O,j)!==!1;);return u}}function V2(s){return function(a,u,g){for(var y=-1,O=Dt(a),j=g(a),H=j.length;H--;){var Z=j[s?H:++y];if(u(O[Z],Z,O)===!1)break}return a}}function pA(s,a,u){var g=a&k,y=xa(s);function O(){var j=this&&this!==gt&&this instanceof O?y:s;return j.apply(g?u:this,arguments)}return O}function K2(s){return function(a){a=yt(a);var u=Js(a)?_n(a):r,g=u?u[0]:a.charAt(0),y=u?xi(u,1).join(""):a.slice(1);return g[s]()+y}}function so(s){return function(a){return Kf(qm(Wm(a).replace(ua,"")),s,"")}}function xa(s){return function(){var a=arguments;switch(a.length){case 0:return new s;case 1:return new s(a[0]);case 2:return new s(a[0],a[1]);case 3:return new s(a[0],a[1],a[2]);case 4:return new s(a[0],a[1],a[2],a[3]);case 5:return new s(a[0],a[1],a[2],a[3],a[4]);case 6:return new s(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new s(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var u=no(s.prototype),g=s.apply(u,a);return Ft(g)?g:u}}function gA(s,a,u){var g=xa(s);function y(){for(var O=arguments.length,j=te(O),H=O,Z=oo(y);H--;)j[H]=arguments[H];var ue=O<3&&j[0]!==Z&&j[O-1]!==Z?[]:vi(j,Z);if(O-=ue.length,O<u)return X2(s,a,Sl,y.placeholder,r,j,ue,r,r,u-O);var he=this&&this!==gt&&this instanceof y?g:s;return mr(he,this,j)}return y}function G2(s){return function(a,u,g){var y=Dt(a);if(!Wr(a)){var O=Ue(u,3);a=wr(a),u=function(H){return O(y[H],H,y)}}var j=s(a,u,g);return j>-1?y[O?a[j]:j]:r}}function Z2(s){return Jn(function(a){var u=a.length,g=u,y=fn.prototype.thru;for(s&&a.reverse();g--;){var O=a[g];if(typeof O!="function")throw new hn(c);if(y&&!j&&$l(O)=="wrapper")var j=new fn([],!0)}for(g=j?g:u;++g<u;){O=a[g];var H=$l(O),Z=H=="wrapper"?D0(O):r;Z&&P0(Z[0])&&Z[1]==(f|M|R|x)&&!Z[4].length&&Z[9]==1?j=j[$l(Z[0])].apply(j,Z[3]):j=O.length==1&&P0(O)?j[H]():j.thru(O)}return function(){var ue=arguments,he=ue[0];if(j&&ue.length==1&&Xe(he))return j.plant(he).value();for(var pe=0,_e=u?a[pe].apply(this,ue):he;++pe<u;)_e=a[pe].call(this,_e);return _e}})}function Sl(s,a,u,g,y,O,j,H,Z,ue){var he=a&f,pe=a&k,_e=a&q,De=a&(M|A),Fe=a&J,st=_e?r:xa(s);function Be(){for(var ht=arguments.length,mt=te(ht),en=ht;en--;)mt[en]=arguments[en];if(De)var jr=oo(Be),tn=DD(mt,jr);if(g&&(mt=z2(mt,g,y,De)),O&&(mt=W2(mt,O,j,De)),ht-=tn,De&&ht<ue){var Xt=vi(mt,jr);return X2(s,a,Sl,Be.placeholder,u,mt,Xt,H,Z,ue-ht)}var Cn=pe?u:this,ti=_e?Cn[s]:s;return ht=mt.length,H?mt=MA(mt,H):Fe&&ht>1&&mt.reverse(),he&&Z<ht&&(mt.length=Z),this&&this!==gt&&this instanceof Be&&(ti=st||xa(ti)),ti.apply(Cn,mt)}return Be}function Y2(s,a){return function(u,g){return zO(u,s,a(g),{})}}function Dl(s,a){return function(u,g){var y;if(u===r&&g===r)return a;if(u!==r&&(y=u),g!==r){if(y===r)return g;typeof u=="string"||typeof g=="string"?(u=Xr(u),g=Xr(g)):(u=M2(u),g=M2(g)),y=s(u,g)}return y}}function x0(s){return Jn(function(a){return a=jt(a,Jr(Ue())),at(function(u){var g=this;return s(a,function(y){return mr(y,g,u)})})})}function Ol(s,a){a=a===r?" ":Xr(a);var u=a.length;if(u<2)return u?m0(a,s):a;var g=m0(a,pl(s/Xs(a)));return Js(a)?xi(_n(g),0,s).join(""):g.slice(0,s)}function mA(s,a,u,g){var y=a&k,O=xa(s);function j(){for(var H=-1,Z=arguments.length,ue=-1,he=g.length,pe=te(he+Z),_e=this&&this!==gt&&this instanceof j?O:s;++ue<he;)pe[ue]=g[ue];for(;Z--;)pe[ue++]=arguments[++H];return mr(_e,y?u:this,pe)}return j}function J2(s){return function(a,u,g){return g&&typeof g!="number"&&Lr(a,u,g)&&(u=g=r),a=ei(a),u===r?(u=a,a=0):u=ei(u),g=g===r?a<u?1:-1:ei(g),tA(a,u,g,s)}}function Al(s){return function(a,u){return typeof a=="string"&&typeof u=="string"||(a=mn(a),u=mn(u)),s(a,u)}}function X2(s,a,u,g,y,O,j,H,Z,ue){var he=a&M,pe=he?j:r,_e=he?r:j,De=he?O:r,Fe=he?r:O;a|=he?R:C,a&=~(he?C:R),a&T||(a&=~(k|q));var st=[s,a,y,De,pe,Fe,_e,H,Z,ue],Be=u.apply(r,st);return P0(s)&&um(Be,st),Be.placeholder=g,hm(Be,s,a)}function C0(s){var a=hr[s];return function(u,g){if(u=mn(u),g=g==null?0:Cr(rt(g),292),g&&h2(u)){var y=(yt(u)+"e").split("e"),O=a(y[0]+"e"+(+y[1]+g));return y=(yt(O)+"e").split("e"),+(y[0]+"e"+(+y[1]-g))}return a(u)}}var wA=to&&1/il(new to([,-0]))[1]==le?function(s){return new to(s)}:V0;function Q2(s){return function(a){var u=Ir(a);return u==Pe?e0(a):u==je?ND(a):SD(a,s(a))}}function Yn(s,a,u,g,y,O,j,H){var Z=a&q;if(!Z&&typeof s!="function")throw new hn(c);var ue=g?g.length:0;if(ue||(a&=~(R|C),g=y=r),j=j===r?j:fr(rt(j),0),H=H===r?H:rt(H),ue-=y?y.length:0,a&C){var he=g,pe=y;g=y=r}var _e=Z?r:D0(s),De=[s,a,u,g,y,he,pe,O,j,H];if(_e&&TA(De,_e),s=De[0],a=De[1],u=De[2],g=De[3],y=De[4],H=De[9]=De[9]===r?Z?0:s.length:fr(De[9]-ue,0),!H&&a&(M|A)&&(a&=~(M|A)),!a||a==k)var Fe=pA(s,a,u);else a==M||a==A?Fe=gA(s,a,H):(a==R||a==(k|R))&&!y.length?Fe=mA(s,a,u,g):Fe=Sl.apply(r,De);var st=_e?R2:um;return hm(st(Fe,De),s,a)}function em(s,a,u,g){return s===r||xn(s,eo[u])&&!bt.call(g,u)?a:s}function tm(s,a,u,g,y,O){return Ft(s)&&Ft(a)&&(O.set(a,s),El(s,a,r,tm,O),O.delete(a)),s}function vA(s){return Sa(s)?r:s}function rm(s,a,u,g,y,O){var j=u&P,H=s.length,Z=a.length;if(H!=Z&&!(j&&Z>H))return!1;var ue=O.get(s),he=O.get(a);if(ue&&he)return ue==a&&he==s;var pe=-1,_e=!0,De=u&L?new cs:r;for(O.set(s,a),O.set(a,s);++pe<H;){var Fe=s[pe],st=a[pe];if(g)var Be=j?g(st,Fe,pe,a,s,O):g(Fe,st,pe,s,a,O);if(Be!==r){if(Be)continue;_e=!1;break}if(De){if(!Gf(a,function(ht,mt){if(!fa(De,mt)&&(Fe===ht||y(Fe,ht,u,g,O)))return De.push(mt)})){_e=!1;break}}else if(!(Fe===st||y(Fe,st,u,g,O))){_e=!1;break}}return O.delete(s),O.delete(a),_e}function yA(s,a,u,g,y,O,j){switch(u){case p:if(s.byteLength!=a.byteLength||s.byteOffset!=a.byteOffset)return!1;s=s.buffer,a=a.buffer;case b:return!(s.byteLength!=a.byteLength||!O(new ul(s),new ul(a)));case Y:case W:case tt:return xn(+s,+a);case F:return s.name==a.name&&s.message==a.message;case Ye:case Me:return s==a+"";case Pe:var H=e0;case je:var Z=g&P;if(H||(H=il),s.size!=a.size&&!Z)return!1;var ue=j.get(s);if(ue)return ue==a;g|=L,j.set(s,a);var he=rm(H(s),H(a),g,y,O,j);return j.delete(s),he;case ze:if(wa)return wa.call(s)==wa.call(a)}return!1}function bA(s,a,u,g,y,O){var j=u&P,H=I0(s),Z=H.length,ue=I0(a),he=ue.length;if(Z!=he&&!j)return!1;for(var pe=Z;pe--;){var _e=H[pe];if(!(j?_e in a:bt.call(a,_e)))return!1}var De=O.get(s),Fe=O.get(a);if(De&&Fe)return De==a&&Fe==s;var st=!0;O.set(s,a),O.set(a,s);for(var Be=j;++pe<Z;){_e=H[pe];var ht=s[_e],mt=a[_e];if(g)var en=j?g(mt,ht,_e,a,s,O):g(ht,mt,_e,s,a,O);if(!(en===r?ht===mt||y(ht,mt,u,g,O):en)){st=!1;break}Be||(Be=_e=="constructor")}if(st&&!Be){var jr=s.constructor,tn=a.constructor;jr!=tn&&"constructor"in s&&"constructor"in a&&!(typeof jr=="function"&&jr instanceof jr&&typeof tn=="function"&&tn instanceof tn)&&(st=!1)}return O.delete(s),O.delete(a),st}function Jn(s){return R0(cm(s,r,wm),s+"")}function I0(s){return E2(s,wr,A0)}function S0(s){return E2(s,qr,nm)}var D0=ml?function(s){return ml.get(s)}:V0;function $l(s){for(var a=s.name+"",u=ro[a],g=bt.call(ro,a)?u.length:0;g--;){var y=u[g],O=y.func;if(O==null||O==s)return y.name}return a}function oo(s){var a=bt.call(I,"placeholder")?I:s;return a.placeholder}function Ue(){var s=I.iteratee||W0;return s=s===W0?I2:s,arguments.length?s(arguments[0],arguments[1]):s}function Pl(s,a){var u=s.__data__;return OA(a)?u[typeof a=="string"?"string":"hash"]:u.map}function O0(s){for(var a=wr(s),u=a.length;u--;){var g=a[u],y=s[g];a[u]=[g,y,om(y)]}return a}function hs(s,a){var u=PD(s,a);return C2(u)?u:r}function _A(s){var a=bt.call(s,os),u=s[os];try{s[os]=r;var g=!0}catch{}var y=cl.call(s);return g&&(a?s[os]=u:delete s[os]),y}var A0=r0?function(s){return s==null?[]:(s=Dt(s),mi(r0(s),function(a){return l2.call(s,a)}))}:K0,nm=r0?function(s){for(var a=[];s;)wi(a,A0(s)),s=hl(s);return a}:K0,Ir=Mr;(n0&&Ir(new n0(new ArrayBuffer(1)))!=p||pa&&Ir(new pa)!=Pe||i0&&Ir(i0.resolve())!=At||to&&Ir(new to)!=je||ga&&Ir(new ga)!=Te)&&(Ir=function(s){var a=Mr(s),u=a==qe?s.constructor:r,g=u?fs(u):"";if(g)switch(g){case nO:return p;case iO:return Pe;case sO:return At;case oO:return je;case aO:return Te}return a});function EA(s,a,u){for(var g=-1,y=u.length;++g<y;){var O=u[g],j=O.size;switch(O.type){case"drop":s+=j;break;case"dropRight":a-=j;break;case"take":a=Cr(a,s+j);break;case"takeRight":s=fr(s,a-j);break}}return{start:s,end:a}}function xA(s){var a=s.match(Pt);return a?a[1].split(nr):[]}function im(s,a,u){a=Ei(a,s);for(var g=-1,y=a.length,O=!1;++g<y;){var j=jn(a[g]);if(!(O=s!=null&&u(s,j)))break;s=s[j]}return O||++g!=y?O:(y=s==null?0:s.length,!!y&&Ul(y)&&Xn(j,y)&&(Xe(s)||ds(s)))}function CA(s){var a=s.length,u=new s.constructor(a);return a&&typeof s[0]=="string"&&bt.call(s,"index")&&(u.index=s.index,u.input=s.input),u}function sm(s){return typeof s.constructor=="function"&&!Ca(s)?no(hl(s)):{}}function IA(s,a,u){var g=s.constructor;switch(a){case b:return E0(s);case Y:case W:return new g(+s);case p:return cA(s,u);case m:case $:case B:case G:case Q:case xe:case Oe:case it:case ut:return k2(s,u);case Pe:return new g;case tt:case Me:return new g(s);case Ye:return lA(s);case je:return new g;case ze:return uA(s)}}function SA(s,a){var u=a.length;if(!u)return s;var g=u-1;return a[g]=(u>1?"& ":"")+a[g],a=a.join(u>2?", ":" "),s.replace(Vt,`{
|
|
79
|
+
*/(function(t,e){(function(){var r,n="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",l="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",d=500,v="__lodash_placeholder__",E=1,_=2,O=4,P=1,U=2,H=1,G=2,N=4,L=8,$=16,T=32,I=64,f=128,x=256,J=512,z=30,ee="...",de=800,me=16,S=1,j=2,ce=3,le=1/0,re=9007199254740991,ne=17976931348623157e292,ae=0/0,ie=4294967295,De=ie-1,ge=ie>>>1,Fe=[["ary",f],["bind",H],["bindKey",G],["curry",L],["curryRight",$],["flip",J],["partial",T],["partialRight",I],["rearg",x]],ye="[object Arguments]",Le="[object Array]",X="[object AsyncFunction]",Y="[object Boolean]",W="[object Date]",w="[object DOMException]",F="[object Error]",we="[object Function]",ve="[object GeneratorFunction]",Me="[object Map]",nt="[object Number]",at="[object Null]",Ge="[object Object]",At="[object Promise]",$t="[object Proxy]",Je="[object RegExp]",He="[object Set]",Be="[object String]",Ke="[object Symbol]",rt="[object Undefined]",Ue="[object WeakMap]",Ze="[object WeakSet]",b="[object ArrayBuffer]",p="[object DataView]",m="[object Float32Array]",A="[object Float64Array]",B="[object Int8Array]",K="[object Int16Array]",Q="[object Int32Array]",Ee="[object Uint8Array]",Te="[object Uint8ClampedArray]",st="[object Uint16Array]",ht="[object Uint32Array]",lt=/\b__p \+= '';/g,Mr=/\b(__p \+=) '' \+/g,Yn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ci=/&(?:amp|lt|gt|quot|#39);/g,cs=/[&<>"']/g,Ht=RegExp(Ci.source),Lt=RegExp(cs.source),zt=/<%-([\s\S]+?)%>/g,Wt=/<%([\s\S]+?)%>/g,Ft=/<%=([\s\S]+?)%>/g,Mt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nr=/^\w*$/,ir=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qt=/[\\^$.*+?()[\]{}|]/g,sr=RegExp(qt.source),Vt=/^\s+/,Yt=/\s/,Kt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Pt=/\{\n\/\* \[wrapped with (.+)\] \*/,or=/,? & /,ar=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Uf=/[()=,{}\[\]\/\s]/,jf=/\\(\\)?/g,Ff=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,hn=/\w*$/,Bf=/^[-+]0x[0-9a-f]+$/i,kf=/^0b[01]+$/i,Hf=/^\[object .+?Constructor\]$/,zf=/^0o[0-7]+$/i,Wf=/^(?:0|[1-9]\d*)$/,Jn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xs=/($^)/,qf=/['\n\r\u2028\u2029\\]/g,Qs="\\ud800-\\udfff",Vf="\\u0300-\\u036f",Kf="\\ufe20-\\ufe2f",eo="\\u20d0-\\u20ff",Gc=Vf+Kf+eo,Zc="\\u2700-\\u27bf",En="a-z\\xdf-\\xf6\\xf8-\\xff",Gf="\\xac\\xb1\\xd7\\xf7",Zf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Yf="\\u2000-\\u206f",Jf=" \\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",Yc="A-Z\\xc0-\\xd6\\xd8-\\xde",Jc="\\ufe0e\\ufe0f",ls=Gf+Zf+Yf+Jf,ma="['\u2019]",us="["+Qs+"]",wa="["+ls+"]",hs="["+Gc+"]",Xc="\\d+",Xf="["+Zc+"]",Qc="["+En+"]",el="[^"+Qs+ls+Xc+Zc+En+Yc+"]",to="\\ud83c[\\udffb-\\udfff]",Qf="(?:"+hs+"|"+to+")",tl="[^"+Qs+"]",ro="(?:\\ud83c[\\udde6-\\uddff]){2}",Ii="[\\ud800-\\udbff][\\udc00-\\udfff]",Xr="["+Yc+"]",rl="\\u200d",nl="(?:"+Qc+"|"+el+")",Un="(?:"+Xr+"|"+el+")",il="(?:"+ma+"(?:d|ll|m|re|s|t|ve))?",sl="(?:"+ma+"(?:D|LL|M|RE|S|T|VE))?",ol=Qf+"?",al="["+Jc+"]?",e0="(?:"+rl+"(?:"+[tl,ro,Ii].join("|")+")"+al+ol+")*",Xn="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",cl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ll=al+ol+e0,no="(?:"+[Xf,ro,Ii].join("|")+")"+ll,t0="(?:"+[tl+hs+"?",hs,ro,Ii,us].join("|")+")",va=RegExp(ma,"g"),r0=RegExp(hs,"g"),io=RegExp(to+"(?="+to+")|"+t0+ll,"g"),ul=RegExp([Xr+"?"+Qc+"+"+il+"(?="+[wa,Xr,"$"].join("|")+")",Un+"+"+sl+"(?="+[wa,Xr+nl,"$"].join("|")+")",Xr+"?"+nl+"+"+il,Xr+"+"+sl,cl,Xn,Xc,no].join("|"),"g"),hl=RegExp("["+rl+Qs+Gc+Jc+"]"),fs=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,fl=["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"],n0=-1,Ct={};Ct[m]=Ct[A]=Ct[B]=Ct[K]=Ct[Q]=Ct[Ee]=Ct[Te]=Ct[st]=Ct[ht]=!0,Ct[ye]=Ct[Le]=Ct[b]=Ct[Y]=Ct[p]=Ct[W]=Ct[F]=Ct[we]=Ct[Me]=Ct[nt]=Ct[Ge]=Ct[Je]=Ct[He]=Ct[Be]=Ct[Ue]=!1;var xt={};xt[ye]=xt[Le]=xt[b]=xt[p]=xt[Y]=xt[W]=xt[m]=xt[A]=xt[B]=xt[K]=xt[Q]=xt[Me]=xt[nt]=xt[Ge]=xt[Je]=xt[He]=xt[Be]=xt[Ke]=xt[Ee]=xt[Te]=xt[st]=xt[ht]=!0,xt[F]=xt[we]=xt[Ue]=!1;var R={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},q={"&":"&","<":"<",">":">",'"':""","'":"'"},fe={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},It=parseFloat,Xe=parseInt,Tt=typeof Wo=="object"&&Wo&&Wo.Object===Object&&Wo,cr=typeof self=="object"&&self&&self.Object===Object&&self,mt=Tt||cr||Function("return this")(),St=e&&!e.nodeType&&e,Jt=St&&!0&&t&&!t.nodeType&&t,Wr=Jt&&Jt.exports===St,lr=Wr&&Tt.process,Rt=function(){try{var V=Jt&&Jt.require&&Jt.require("util").types;return V||lr&&lr.binding&&lr.binding("util")}catch{}}(),Ur=Rt&&Rt.isArrayBuffer,xn=Rt&&Rt.isDate,fn=Rt&&Rt.isMap,jn=Rt&&Rt.isRegExp,ya=Rt&&Rt.isSet,ds=Rt&&Rt.isTypedArray;function wr(V,se,te){switch(te.length){case 0:return V.call(se);case 1:return V.call(se,te[0]);case 2:return V.call(se,te[0],te[1]);case 3:return V.call(se,te[0],te[1],te[2])}return V.apply(se,te)}function tD(V,se,te,Se){for(var Ye=-1,vt=V==null?0:V.length;++Ye<vt;){var hr=V[Ye];se(Se,hr,te(hr),V)}return Se}function dn(V,se){for(var te=-1,Se=V==null?0:V.length;++te<Se&&se(V[te],te,V)!==!1;);return V}function rD(V,se){for(var te=V==null?0:V.length;te--&&se(V[te],te,V)!==!1;);return V}function dm(V,se){for(var te=-1,Se=V==null?0:V.length;++te<Se;)if(!se(V[te],te,V))return!1;return!0}function Si(V,se){for(var te=-1,Se=V==null?0:V.length,Ye=0,vt=[];++te<Se;){var hr=V[te];se(hr,te,V)&&(vt[Ye++]=hr)}return vt}function dl(V,se){var te=V==null?0:V.length;return!!te&&so(V,se,0)>-1}function i0(V,se,te){for(var Se=-1,Ye=V==null?0:V.length;++Se<Ye;)if(te(se,V[Se]))return!0;return!1}function Ut(V,se){for(var te=-1,Se=V==null?0:V.length,Ye=Array(Se);++te<Se;)Ye[te]=se(V[te],te,V);return Ye}function Oi(V,se){for(var te=-1,Se=se.length,Ye=V.length;++te<Se;)V[Ye+te]=se[te];return V}function s0(V,se,te,Se){var Ye=-1,vt=V==null?0:V.length;for(Se&&vt&&(te=V[++Ye]);++Ye<vt;)te=se(te,V[Ye],Ye,V);return te}function nD(V,se,te,Se){var Ye=V==null?0:V.length;for(Se&&Ye&&(te=V[--Ye]);Ye--;)te=se(te,V[Ye],Ye,V);return te}function o0(V,se){for(var te=-1,Se=V==null?0:V.length;++te<Se;)if(se(V[te],te,V))return!0;return!1}var iD=a0("length");function sD(V){return V.split("")}function oD(V){return V.match(ar)||[]}function pm(V,se,te){var Se;return te(V,function(Ye,vt,hr){if(se(Ye,vt,hr))return Se=vt,!1}),Se}function pl(V,se,te,Se){for(var Ye=V.length,vt=te+(Se?1:-1);Se?vt--:++vt<Ye;)if(se(V[vt],vt,V))return vt;return-1}function so(V,se,te){return se===se?vD(V,se,te):pl(V,gm,te)}function aD(V,se,te,Se){for(var Ye=te-1,vt=V.length;++Ye<vt;)if(Se(V[Ye],se))return Ye;return-1}function gm(V){return V!==V}function mm(V,se){var te=V==null?0:V.length;return te?l0(V,se)/te:ae}function a0(V){return function(se){return se==null?r:se[V]}}function c0(V){return function(se){return V==null?r:V[se]}}function wm(V,se,te,Se,Ye){return Ye(V,function(vt,hr,Ot){te=Se?(Se=!1,vt):se(te,vt,hr,Ot)}),te}function cD(V,se){var te=V.length;for(V.sort(se);te--;)V[te]=V[te].value;return V}function l0(V,se){for(var te,Se=-1,Ye=V.length;++Se<Ye;){var vt=se(V[Se]);vt!==r&&(te=te===r?vt:te+vt)}return te}function u0(V,se){for(var te=-1,Se=Array(V);++te<V;)Se[te]=se(te);return Se}function lD(V,se){return Ut(se,function(te){return[te,V[te]]})}function vm(V){return V&&V.slice(0,Em(V)+1).replace(Vt,"")}function Qr(V){return function(se){return V(se)}}function h0(V,se){return Ut(se,function(te){return V[te]})}function ba(V,se){return V.has(se)}function ym(V,se){for(var te=-1,Se=V.length;++te<Se&&so(se,V[te],0)>-1;);return te}function bm(V,se){for(var te=V.length;te--&&so(se,V[te],0)>-1;);return te}function uD(V,se){for(var te=V.length,Se=0;te--;)V[te]===se&&++Se;return Se}var hD=c0(R),fD=c0(q);function dD(V){return"\\"+Ce[V]}function pD(V,se){return V==null?r:V[se]}function oo(V){return hl.test(V)}function gD(V){return fs.test(V)}function mD(V){for(var se,te=[];!(se=V.next()).done;)te.push(se.value);return te}function f0(V){var se=-1,te=Array(V.size);return V.forEach(function(Se,Ye){te[++se]=[Ye,Se]}),te}function _m(V,se){return function(te){return V(se(te))}}function Di(V,se){for(var te=-1,Se=V.length,Ye=0,vt=[];++te<Se;){var hr=V[te];(hr===se||hr===v)&&(V[te]=v,vt[Ye++]=te)}return vt}function gl(V){var se=-1,te=Array(V.size);return V.forEach(function(Se){te[++se]=Se}),te}function wD(V){var se=-1,te=Array(V.size);return V.forEach(function(Se){te[++se]=[Se,Se]}),te}function vD(V,se,te){for(var Se=te-1,Ye=V.length;++Se<Ye;)if(V[Se]===se)return Se;return-1}function yD(V,se,te){for(var Se=te+1;Se--;)if(V[Se]===se)return Se;return Se}function ao(V){return oo(V)?_D(V):iD(V)}function Cn(V){return oo(V)?ED(V):sD(V)}function Em(V){for(var se=V.length;se--&&Yt.test(V.charAt(se)););return se}var bD=c0(fe);function _D(V){for(var se=io.lastIndex=0;io.test(V);)++se;return se}function ED(V){return V.match(io)||[]}function xD(V){return V.match(ul)||[]}var CD=function V(se){se=se==null?mt:co.defaults(mt.Object(),se,co.pick(mt,fl));var te=se.Array,Se=se.Date,Ye=se.Error,vt=se.Function,hr=se.Math,Ot=se.Object,d0=se.RegExp,ID=se.String,pn=se.TypeError,ml=te.prototype,SD=vt.prototype,lo=Ot.prototype,wl=se["__core-js_shared__"],vl=SD.toString,bt=lo.hasOwnProperty,OD=0,xm=function(){var s=/[^.]+$/.exec(wl&&wl.keys&&wl.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),yl=lo.toString,DD=vl.call(Ot),AD=mt._,$D=d0("^"+vl.call(bt).replace(qt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bl=Wr?se.Buffer:r,Ai=se.Symbol,_l=se.Uint8Array,Cm=bl?bl.allocUnsafe:r,El=_m(Ot.getPrototypeOf,Ot),Im=Ot.create,Sm=lo.propertyIsEnumerable,xl=ml.splice,Om=Ai?Ai.isConcatSpreadable:r,_a=Ai?Ai.iterator:r,ps=Ai?Ai.toStringTag:r,Cl=function(){try{var s=ys(Ot,"defineProperty");return s({},"",{}),s}catch{}}(),PD=se.clearTimeout!==mt.clearTimeout&&se.clearTimeout,TD=Se&&Se.now!==mt.Date.now&&Se.now,RD=se.setTimeout!==mt.setTimeout&&se.setTimeout,Il=hr.ceil,Sl=hr.floor,p0=Ot.getOwnPropertySymbols,ND=bl?bl.isBuffer:r,Dm=se.isFinite,LD=ml.join,MD=_m(Ot.keys,Ot),fr=hr.max,Sr=hr.min,UD=Se.now,jD=se.parseInt,Am=hr.random,FD=ml.reverse,g0=ys(se,"DataView"),Ea=ys(se,"Map"),m0=ys(se,"Promise"),uo=ys(se,"Set"),xa=ys(se,"WeakMap"),Ca=ys(Ot,"create"),Ol=xa&&new xa,ho={},BD=bs(g0),kD=bs(Ea),HD=bs(m0),zD=bs(uo),WD=bs(xa),Dl=Ai?Ai.prototype:r,Ia=Dl?Dl.valueOf:r,$m=Dl?Dl.toString:r;function C(s){if(Gt(s)&&!Qe(s)&&!(s instanceof dt)){if(s instanceof gn)return s;if(bt.call(s,"__wrapped__"))return P2(s)}return new gn(s)}var fo=function(){function s(){}return function(a){if(!Bt(a))return{};if(Im)return Im(a);s.prototype=a;var u=new s;return s.prototype=r,u}}();function Al(){}function gn(s,a){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=r}C.templateSettings={escape:zt,evaluate:Wt,interpolate:Ft,variable:"",imports:{_:C}},C.prototype=Al.prototype,C.prototype.constructor=C,gn.prototype=fo(Al.prototype),gn.prototype.constructor=gn;function dt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ie,this.__views__=[]}function qD(){var s=new dt(this.__wrapped__);return s.__actions__=qr(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=qr(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=qr(this.__views__),s}function VD(){if(this.__filtered__){var s=new dt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function KD(){var s=this.__wrapped__.value(),a=this.__dir__,u=Qe(s),g=a<0,y=u?s.length:0,D=s$(0,y,this.__views__),M=D.start,k=D.end,Z=k-M,ue=g?k:M-1,he=this.__iteratees__,pe=he.length,be=0,Pe=Sr(Z,this.__takeCount__);if(!u||!g&&y==Z&&Pe==Z)return e2(s,this.__actions__);var We=[];e:for(;Z--&&be<Pe;){ue+=a;for(var ot=-1,qe=s[ue];++ot<pe;){var ft=he[ot],wt=ft.iteratee,rn=ft.type,Br=wt(qe);if(rn==j)qe=Br;else if(!Br){if(rn==S)continue e;break e}}We[be++]=qe}return We}dt.prototype=fo(Al.prototype),dt.prototype.constructor=dt;function gs(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var g=s[a];this.set(g[0],g[1])}}function GD(){this.__data__=Ca?Ca(null):{},this.size=0}function ZD(s){var a=this.has(s)&&delete this.__data__[s];return this.size-=a?1:0,a}function YD(s){var a=this.__data__;if(Ca){var u=a[s];return u===h?r:u}return bt.call(a,s)?a[s]:r}function JD(s){var a=this.__data__;return Ca?a[s]!==r:bt.call(a,s)}function XD(s,a){var u=this.__data__;return this.size+=this.has(s)?0:1,u[s]=Ca&&a===r?h:a,this}gs.prototype.clear=GD,gs.prototype.delete=ZD,gs.prototype.get=YD,gs.prototype.has=JD,gs.prototype.set=XD;function Qn(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var g=s[a];this.set(g[0],g[1])}}function QD(){this.__data__=[],this.size=0}function eA(s){var a=this.__data__,u=$l(a,s);if(u<0)return!1;var g=a.length-1;return u==g?a.pop():xl.call(a,u,1),--this.size,!0}function tA(s){var a=this.__data__,u=$l(a,s);return u<0?r:a[u][1]}function rA(s){return $l(this.__data__,s)>-1}function nA(s,a){var u=this.__data__,g=$l(u,s);return g<0?(++this.size,u.push([s,a])):u[g][1]=a,this}Qn.prototype.clear=QD,Qn.prototype.delete=eA,Qn.prototype.get=tA,Qn.prototype.has=rA,Qn.prototype.set=nA;function ei(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var g=s[a];this.set(g[0],g[1])}}function iA(){this.size=0,this.__data__={hash:new gs,map:new(Ea||Qn),string:new gs}}function sA(s){var a=Hl(this,s).delete(s);return this.size-=a?1:0,a}function oA(s){return Hl(this,s).get(s)}function aA(s){return Hl(this,s).has(s)}function cA(s,a){var u=Hl(this,s),g=u.size;return u.set(s,a),this.size+=u.size==g?0:1,this}ei.prototype.clear=iA,ei.prototype.delete=sA,ei.prototype.get=oA,ei.prototype.has=aA,ei.prototype.set=cA;function ms(s){var a=-1,u=s==null?0:s.length;for(this.__data__=new ei;++a<u;)this.add(s[a])}function lA(s){return this.__data__.set(s,h),this}function uA(s){return this.__data__.has(s)}ms.prototype.add=ms.prototype.push=lA,ms.prototype.has=uA;function In(s){var a=this.__data__=new Qn(s);this.size=a.size}function hA(){this.__data__=new Qn,this.size=0}function fA(s){var a=this.__data__,u=a.delete(s);return this.size=a.size,u}function dA(s){return this.__data__.get(s)}function pA(s){return this.__data__.has(s)}function gA(s,a){var u=this.__data__;if(u instanceof Qn){var g=u.__data__;if(!Ea||g.length<i-1)return g.push([s,a]),this.size=++u.size,this;u=this.__data__=new ei(g)}return u.set(s,a),this.size=u.size,this}In.prototype.clear=hA,In.prototype.delete=fA,In.prototype.get=dA,In.prototype.has=pA,In.prototype.set=gA;function Pm(s,a){var u=Qe(s),g=!u&&_s(s),y=!u&&!g&&Ni(s),D=!u&&!g&&!y&&wo(s),M=u||g||y||D,k=M?u0(s.length,ID):[],Z=k.length;for(var ue in s)(a||bt.call(s,ue))&&!(M&&(ue=="length"||y&&(ue=="offset"||ue=="parent")||D&&(ue=="buffer"||ue=="byteLength"||ue=="byteOffset")||ii(ue,Z)))&&k.push(ue);return k}function Tm(s){var a=s.length;return a?s[O0(0,a-1)]:r}function mA(s,a){return zl(qr(s),ws(a,0,s.length))}function wA(s){return zl(qr(s))}function w0(s,a,u){(u!==r&&!Sn(s[a],u)||u===r&&!(a in s))&&ti(s,a,u)}function Sa(s,a,u){var g=s[a];(!(bt.call(s,a)&&Sn(g,u))||u===r&&!(a in s))&&ti(s,a,u)}function $l(s,a){for(var u=s.length;u--;)if(Sn(s[u][0],a))return u;return-1}function vA(s,a,u,g){return $i(s,function(y,D,M){a(g,y,u(y),M)}),g}function Rm(s,a){return s&&Bn(a,vr(a),s)}function yA(s,a){return s&&Bn(a,Kr(a),s)}function ti(s,a,u){a=="__proto__"&&Cl?Cl(s,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):s[a]=u}function v0(s,a){for(var u=-1,g=a.length,y=te(g),D=s==null;++u<g;)y[u]=D?r:X0(s,a[u]);return y}function ws(s,a,u){return s===s&&(u!==r&&(s=s<=u?s:u),a!==r&&(s=s>=a?s:a)),s}function mn(s,a,u,g,y,D){var M,k=a&E,Z=a&_,ue=a&O;if(u&&(M=y?u(s,g,y,D):u(s)),M!==r)return M;if(!Bt(s))return s;var he=Qe(s);if(he){if(M=a$(s),!k)return qr(s,M)}else{var pe=Or(s),be=pe==we||pe==ve;if(Ni(s))return n2(s,k);if(pe==Ge||pe==ye||be&&!y){if(M=Z||be?{}:E2(s),!k)return Z?YA(s,yA(M,s)):ZA(s,Rm(M,s))}else{if(!xt[pe])return y?s:{};M=c$(s,pe,k)}}D||(D=new In);var Pe=D.get(s);if(Pe)return Pe;D.set(s,M),J2(s)?s.forEach(function(qe){M.add(mn(qe,a,u,qe,s,D))}):Z2(s)&&s.forEach(function(qe,ft){M.set(ft,mn(qe,a,u,ft,s,D))});var We=ue?Z?j0:U0:Z?Kr:vr,ot=he?r:We(s);return dn(ot||s,function(qe,ft){ot&&(ft=qe,qe=s[ft]),Sa(M,ft,mn(qe,a,u,ft,s,D))}),M}function bA(s){var a=vr(s);return function(u){return Nm(u,s,a)}}function Nm(s,a,u){var g=u.length;if(s==null)return!g;for(s=Ot(s);g--;){var y=u[g],D=a[y],M=s[y];if(M===r&&!(y in s)||!D(M))return!1}return!0}function Lm(s,a,u){if(typeof s!="function")throw new pn(c);return Ra(function(){s.apply(r,u)},a)}function Oa(s,a,u,g){var y=-1,D=dl,M=!0,k=s.length,Z=[],ue=a.length;if(!k)return Z;u&&(a=Ut(a,Qr(u))),g?(D=i0,M=!1):a.length>=i&&(D=ba,M=!1,a=new ms(a));e:for(;++y<k;){var he=s[y],pe=u==null?he:u(he);if(he=g||he!==0?he:0,M&&pe===pe){for(var be=ue;be--;)if(a[be]===pe)continue e;Z.push(he)}else D(a,pe,g)||Z.push(he)}return Z}var $i=c2(Fn),Mm=c2(b0,!0);function _A(s,a){var u=!0;return $i(s,function(g,y,D){return u=!!a(g,y,D),u}),u}function Pl(s,a,u){for(var g=-1,y=s.length;++g<y;){var D=s[g],M=a(D);if(M!=null&&(k===r?M===M&&!tn(M):u(M,k)))var k=M,Z=D}return Z}function EA(s,a,u,g){var y=s.length;for(u=it(u),u<0&&(u=-u>y?0:y+u),g=g===r||g>y?y:it(g),g<0&&(g+=y),g=u>g?0:Q2(g);u<g;)s[u++]=a;return s}function Um(s,a){var u=[];return $i(s,function(g,y,D){a(g,y,D)&&u.push(g)}),u}function xr(s,a,u,g,y){var D=-1,M=s.length;for(u||(u=u$),y||(y=[]);++D<M;){var k=s[D];a>0&&u(k)?a>1?xr(k,a-1,u,g,y):Oi(y,k):g||(y[y.length]=k)}return y}var y0=l2(),jm=l2(!0);function Fn(s,a){return s&&y0(s,a,vr)}function b0(s,a){return s&&jm(s,a,vr)}function Tl(s,a){return Si(a,function(u){return si(s[u])})}function vs(s,a){a=Ti(a,s);for(var u=0,g=a.length;s!=null&&u<g;)s=s[kn(a[u++])];return u&&u==g?s:r}function Fm(s,a,u){var g=a(s);return Qe(s)?g:Oi(g,u(s))}function jr(s){return s==null?s===r?rt:at:ps&&ps in Ot(s)?i$(s):w$(s)}function _0(s,a){return s>a}function xA(s,a){return s!=null&&bt.call(s,a)}function CA(s,a){return s!=null&&a in Ot(s)}function IA(s,a,u){return s>=Sr(a,u)&&s<fr(a,u)}function E0(s,a,u){for(var g=u?i0:dl,y=s[0].length,D=s.length,M=D,k=te(D),Z=1/0,ue=[];M--;){var he=s[M];M&&a&&(he=Ut(he,Qr(a))),Z=Sr(he.length,Z),k[M]=!u&&(a||y>=120&&he.length>=120)?new ms(M&&he):r}he=s[0];var pe=-1,be=k[0];e:for(;++pe<y&&ue.length<Z;){var Pe=he[pe],We=a?a(Pe):Pe;if(Pe=u||Pe!==0?Pe:0,!(be?ba(be,We):g(ue,We,u))){for(M=D;--M;){var ot=k[M];if(!(ot?ba(ot,We):g(s[M],We,u)))continue e}be&&be.push(We),ue.push(Pe)}}return ue}function SA(s,a,u,g){return Fn(s,function(y,D,M){a(g,u(y),D,M)}),g}function Da(s,a,u){a=Ti(a,s),s=S2(s,a);var g=s==null?s:s[kn(vn(a))];return g==null?r:wr(g,s,u)}function Bm(s){return Gt(s)&&jr(s)==ye}function OA(s){return Gt(s)&&jr(s)==b}function DA(s){return Gt(s)&&jr(s)==W}function Aa(s,a,u,g,y){return s===a?!0:s==null||a==null||!Gt(s)&&!Gt(a)?s!==s&&a!==a:AA(s,a,u,g,Aa,y)}function AA(s,a,u,g,y,D){var M=Qe(s),k=Qe(a),Z=M?Le:Or(s),ue=k?Le:Or(a);Z=Z==ye?Ge:Z,ue=ue==ye?Ge:ue;var he=Z==Ge,pe=ue==Ge,be=Z==ue;if(be&&Ni(s)){if(!Ni(a))return!1;M=!0,he=!1}if(be&&!he)return D||(D=new In),M||wo(s)?y2(s,a,u,g,y,D):r$(s,a,Z,u,g,y,D);if(!(u&P)){var Pe=he&&bt.call(s,"__wrapped__"),We=pe&&bt.call(a,"__wrapped__");if(Pe||We){var ot=Pe?s.value():s,qe=We?a.value():a;return D||(D=new In),y(ot,qe,u,g,D)}}return be?(D||(D=new In),n$(s,a,u,g,y,D)):!1}function $A(s){return Gt(s)&&Or(s)==Me}function x0(s,a,u,g){var y=u.length,D=y,M=!g;if(s==null)return!D;for(s=Ot(s);y--;){var k=u[y];if(M&&k[2]?k[1]!==s[k[0]]:!(k[0]in s))return!1}for(;++y<D;){k=u[y];var Z=k[0],ue=s[Z],he=k[1];if(M&&k[2]){if(ue===r&&!(Z in s))return!1}else{var pe=new In;if(g)var be=g(ue,he,Z,s,a,pe);if(!(be===r?Aa(he,ue,P|U,g,pe):be))return!1}}return!0}function km(s){if(!Bt(s)||f$(s))return!1;var a=si(s)?$D:Hf;return a.test(bs(s))}function PA(s){return Gt(s)&&jr(s)==Je}function TA(s){return Gt(s)&&Or(s)==He}function RA(s){return Gt(s)&&Zl(s.length)&&!!Ct[jr(s)]}function Hm(s){return typeof s=="function"?s:s==null?Gr:typeof s=="object"?Qe(s)?qm(s[0],s[1]):Wm(s):uw(s)}function C0(s){if(!Ta(s))return MD(s);var a=[];for(var u in Ot(s))bt.call(s,u)&&u!="constructor"&&a.push(u);return a}function NA(s){if(!Bt(s))return m$(s);var a=Ta(s),u=[];for(var g in s)g=="constructor"&&(a||!bt.call(s,g))||u.push(g);return u}function I0(s,a){return s<a}function zm(s,a){var u=-1,g=Vr(s)?te(s.length):[];return $i(s,function(y,D,M){g[++u]=a(y,D,M)}),g}function Wm(s){var a=B0(s);return a.length==1&&a[0][2]?C2(a[0][0],a[0][1]):function(u){return u===s||x0(u,s,a)}}function qm(s,a){return H0(s)&&x2(a)?C2(kn(s),a):function(u){var g=X0(u,s);return g===r&&g===a?Q0(u,s):Aa(a,g,P|U)}}function Rl(s,a,u,g,y){s!==a&&y0(a,function(D,M){if(y||(y=new In),Bt(D))LA(s,a,M,u,Rl,g,y);else{var k=g?g(W0(s,M),D,M+"",s,a,y):r;k===r&&(k=D),w0(s,M,k)}},Kr)}function LA(s,a,u,g,y,D,M){var k=W0(s,u),Z=W0(a,u),ue=M.get(Z);if(ue){w0(s,u,ue);return}var he=D?D(k,Z,u+"",s,a,M):r,pe=he===r;if(pe){var be=Qe(Z),Pe=!be&&Ni(Z),We=!be&&!Pe&&wo(Z);he=Z,be||Pe||We?Qe(k)?he=k:Xt(k)?he=qr(k):Pe?(pe=!1,he=n2(Z,!0)):We?(pe=!1,he=i2(Z,!0)):he=[]:Na(Z)||_s(Z)?(he=k,_s(k)?he=ew(k):(!Bt(k)||si(k))&&(he=E2(Z))):pe=!1}pe&&(M.set(Z,he),y(he,Z,g,D,M),M.delete(Z)),w0(s,u,he)}function Vm(s,a){var u=s.length;if(u)return a+=a<0?u:0,ii(a,u)?s[a]:r}function Km(s,a,u){a.length?a=Ut(a,function(D){return Qe(D)?function(M){return vs(M,D.length===1?D[0]:D)}:D}):a=[Gr];var g=-1;a=Ut(a,Qr(ze()));var y=zm(s,function(D,M,k){var Z=Ut(a,function(ue){return ue(D)});return{criteria:Z,index:++g,value:D}});return cD(y,function(D,M){return GA(D,M,u)})}function MA(s,a){return Gm(s,a,function(u,g){return Q0(s,g)})}function Gm(s,a,u){for(var g=-1,y=a.length,D={};++g<y;){var M=a[g],k=vs(s,M);u(k,M)&&$a(D,Ti(M,s),k)}return D}function UA(s){return function(a){return vs(a,s)}}function S0(s,a,u,g){var y=g?aD:so,D=-1,M=a.length,k=s;for(s===a&&(a=qr(a)),u&&(k=Ut(s,Qr(u)));++D<M;)for(var Z=0,ue=a[D],he=u?u(ue):ue;(Z=y(k,he,Z,g))>-1;)k!==s&&xl.call(k,Z,1),xl.call(s,Z,1);return s}function Zm(s,a){for(var u=s?a.length:0,g=u-1;u--;){var y=a[u];if(u==g||y!==D){var D=y;ii(y)?xl.call(s,y,1):$0(s,y)}}return s}function O0(s,a){return s+Sl(Am()*(a-s+1))}function jA(s,a,u,g){for(var y=-1,D=fr(Il((a-s)/(u||1)),0),M=te(D);D--;)M[g?D:++y]=s,s+=u;return M}function D0(s,a){var u="";if(!s||a<1||a>re)return u;do a%2&&(u+=s),a=Sl(a/2),a&&(s+=s);while(a);return u}function ct(s,a){return q0(I2(s,a,Gr),s+"")}function FA(s){return Tm(vo(s))}function BA(s,a){var u=vo(s);return zl(u,ws(a,0,u.length))}function $a(s,a,u,g){if(!Bt(s))return s;a=Ti(a,s);for(var y=-1,D=a.length,M=D-1,k=s;k!=null&&++y<D;){var Z=kn(a[y]),ue=u;if(Z==="__proto__"||Z==="constructor"||Z==="prototype")return s;if(y!=M){var he=k[Z];ue=g?g(he,Z,k):r,ue===r&&(ue=Bt(he)?he:ii(a[y+1])?[]:{})}Sa(k,Z,ue),k=k[Z]}return s}var Ym=Ol?function(s,a){return Ol.set(s,a),s}:Gr,kA=Cl?function(s,a){return Cl(s,"toString",{configurable:!0,enumerable:!1,value:td(a),writable:!0})}:Gr;function HA(s){return zl(vo(s))}function wn(s,a,u){var g=-1,y=s.length;a<0&&(a=-a>y?0:y+a),u=u>y?y:u,u<0&&(u+=y),y=a>u?0:u-a>>>0,a>>>=0;for(var D=te(y);++g<y;)D[g]=s[g+a];return D}function zA(s,a){var u;return $i(s,function(g,y,D){return u=a(g,y,D),!u}),!!u}function Nl(s,a,u){var g=0,y=s==null?g:s.length;if(typeof a=="number"&&a===a&&y<=ge){for(;g<y;){var D=g+y>>>1,M=s[D];M!==null&&!tn(M)&&(u?M<=a:M<a)?g=D+1:y=D}return y}return A0(s,a,Gr,u)}function A0(s,a,u,g){var y=0,D=s==null?0:s.length;if(D===0)return 0;a=u(a);for(var M=a!==a,k=a===null,Z=tn(a),ue=a===r;y<D;){var he=Sl((y+D)/2),pe=u(s[he]),be=pe!==r,Pe=pe===null,We=pe===pe,ot=tn(pe);if(M)var qe=g||We;else ue?qe=We&&(g||be):k?qe=We&&be&&(g||!Pe):Z?qe=We&&be&&!Pe&&(g||!ot):Pe||ot?qe=!1:qe=g?pe<=a:pe<a;qe?y=he+1:D=he}return Sr(D,De)}function Jm(s,a){for(var u=-1,g=s.length,y=0,D=[];++u<g;){var M=s[u],k=a?a(M):M;if(!u||!Sn(k,Z)){var Z=k;D[y++]=M===0?0:M}}return D}function Xm(s){return typeof s=="number"?s:tn(s)?ae:+s}function en(s){if(typeof s=="string")return s;if(Qe(s))return Ut(s,en)+"";if(tn(s))return $m?$m.call(s):"";var a=s+"";return a=="0"&&1/s==-le?"-0":a}function Pi(s,a,u){var g=-1,y=dl,D=s.length,M=!0,k=[],Z=k;if(u)M=!1,y=i0;else if(D>=i){var ue=a?null:e$(s);if(ue)return gl(ue);M=!1,y=ba,Z=new ms}else Z=a?[]:k;e:for(;++g<D;){var he=s[g],pe=a?a(he):he;if(he=u||he!==0?he:0,M&&pe===pe){for(var be=Z.length;be--;)if(Z[be]===pe)continue e;a&&Z.push(pe),k.push(he)}else y(Z,pe,u)||(Z!==k&&Z.push(pe),k.push(he))}return k}function $0(s,a){return a=Ti(a,s),s=S2(s,a),s==null||delete s[kn(vn(a))]}function Qm(s,a,u,g){return $a(s,a,u(vs(s,a)),g)}function Ll(s,a,u,g){for(var y=s.length,D=g?y:-1;(g?D--:++D<y)&&a(s[D],D,s););return u?wn(s,g?0:D,g?D+1:y):wn(s,g?D+1:0,g?y:D)}function e2(s,a){var u=s;return u instanceof dt&&(u=u.value()),s0(a,function(g,y){return y.func.apply(y.thisArg,Oi([g],y.args))},u)}function P0(s,a,u){var g=s.length;if(g<2)return g?Pi(s[0]):[];for(var y=-1,D=te(g);++y<g;)for(var M=s[y],k=-1;++k<g;)k!=y&&(D[y]=Oa(D[y]||M,s[k],a,u));return Pi(xr(D,1),a,u)}function t2(s,a,u){for(var g=-1,y=s.length,D=a.length,M={};++g<y;){var k=g<D?a[g]:r;u(M,s[g],k)}return M}function T0(s){return Xt(s)?s:[]}function R0(s){return typeof s=="function"?s:Gr}function Ti(s,a){return Qe(s)?s:H0(s,a)?[s]:$2(yt(s))}var WA=ct;function Ri(s,a,u){var g=s.length;return u=u===r?g:u,!a&&u>=g?s:wn(s,a,u)}var r2=PD||function(s){return mt.clearTimeout(s)};function n2(s,a){if(a)return s.slice();var u=s.length,g=Cm?Cm(u):new s.constructor(u);return s.copy(g),g}function N0(s){var a=new s.constructor(s.byteLength);return new _l(a).set(new _l(s)),a}function qA(s,a){var u=a?N0(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.byteLength)}function VA(s){var a=new s.constructor(s.source,hn.exec(s));return a.lastIndex=s.lastIndex,a}function KA(s){return Ia?Ot(Ia.call(s)):{}}function i2(s,a){var u=a?N0(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.length)}function s2(s,a){if(s!==a){var u=s!==r,g=s===null,y=s===s,D=tn(s),M=a!==r,k=a===null,Z=a===a,ue=tn(a);if(!k&&!ue&&!D&&s>a||D&&M&&Z&&!k&&!ue||g&&M&&Z||!u&&Z||!y)return 1;if(!g&&!D&&!ue&&s<a||ue&&u&&y&&!g&&!D||k&&u&&y||!M&&y||!Z)return-1}return 0}function GA(s,a,u){for(var g=-1,y=s.criteria,D=a.criteria,M=y.length,k=u.length;++g<M;){var Z=s2(y[g],D[g]);if(Z){if(g>=k)return Z;var ue=u[g];return Z*(ue=="desc"?-1:1)}}return s.index-a.index}function o2(s,a,u,g){for(var y=-1,D=s.length,M=u.length,k=-1,Z=a.length,ue=fr(D-M,0),he=te(Z+ue),pe=!g;++k<Z;)he[k]=a[k];for(;++y<M;)(pe||y<D)&&(he[u[y]]=s[y]);for(;ue--;)he[k++]=s[y++];return he}function a2(s,a,u,g){for(var y=-1,D=s.length,M=-1,k=u.length,Z=-1,ue=a.length,he=fr(D-k,0),pe=te(he+ue),be=!g;++y<he;)pe[y]=s[y];for(var Pe=y;++Z<ue;)pe[Pe+Z]=a[Z];for(;++M<k;)(be||y<D)&&(pe[Pe+u[M]]=s[y++]);return pe}function qr(s,a){var u=-1,g=s.length;for(a||(a=te(g));++u<g;)a[u]=s[u];return a}function Bn(s,a,u,g){var y=!u;u||(u={});for(var D=-1,M=a.length;++D<M;){var k=a[D],Z=g?g(u[k],s[k],k,u,s):r;Z===r&&(Z=s[k]),y?ti(u,k,Z):Sa(u,k,Z)}return u}function ZA(s,a){return Bn(s,k0(s),a)}function YA(s,a){return Bn(s,b2(s),a)}function Ml(s,a){return function(u,g){var y=Qe(u)?tD:vA,D=a?a():{};return y(u,s,ze(g,2),D)}}function po(s){return ct(function(a,u){var g=-1,y=u.length,D=y>1?u[y-1]:r,M=y>2?u[2]:r;for(D=s.length>3&&typeof D=="function"?(y--,D):r,M&&Fr(u[0],u[1],M)&&(D=y<3?r:D,y=1),a=Ot(a);++g<y;){var k=u[g];k&&s(a,k,g,D)}return a})}function c2(s,a){return function(u,g){if(u==null)return u;if(!Vr(u))return s(u,g);for(var y=u.length,D=a?y:-1,M=Ot(u);(a?D--:++D<y)&&g(M[D],D,M)!==!1;);return u}}function l2(s){return function(a,u,g){for(var y=-1,D=Ot(a),M=g(a),k=M.length;k--;){var Z=M[s?k:++y];if(u(D[Z],Z,D)===!1)break}return a}}function JA(s,a,u){var g=a&H,y=Pa(s);function D(){var M=this&&this!==mt&&this instanceof D?y:s;return M.apply(g?u:this,arguments)}return D}function u2(s){return function(a){a=yt(a);var u=oo(a)?Cn(a):r,g=u?u[0]:a.charAt(0),y=u?Ri(u,1).join(""):a.slice(1);return g[s]()+y}}function go(s){return function(a){return s0(cw(aw(a).replace(va,"")),s,"")}}function Pa(s){return function(){var a=arguments;switch(a.length){case 0:return new s;case 1:return new s(a[0]);case 2:return new s(a[0],a[1]);case 3:return new s(a[0],a[1],a[2]);case 4:return new s(a[0],a[1],a[2],a[3]);case 5:return new s(a[0],a[1],a[2],a[3],a[4]);case 6:return new s(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new s(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var u=fo(s.prototype),g=s.apply(u,a);return Bt(g)?g:u}}function XA(s,a,u){var g=Pa(s);function y(){for(var D=arguments.length,M=te(D),k=D,Z=mo(y);k--;)M[k]=arguments[k];var ue=D<3&&M[0]!==Z&&M[D-1]!==Z?[]:Di(M,Z);if(D-=ue.length,D<u)return g2(s,a,Ul,y.placeholder,r,M,ue,r,r,u-D);var he=this&&this!==mt&&this instanceof y?g:s;return wr(he,this,M)}return y}function h2(s){return function(a,u,g){var y=Ot(a);if(!Vr(a)){var D=ze(u,3);a=vr(a),u=function(k){return D(y[k],k,y)}}var M=s(a,u,g);return M>-1?y[D?a[M]:M]:r}}function f2(s){return ni(function(a){var u=a.length,g=u,y=gn.prototype.thru;for(s&&a.reverse();g--;){var D=a[g];if(typeof D!="function")throw new pn(c);if(y&&!M&&kl(D)=="wrapper")var M=new gn([],!0)}for(g=M?g:u;++g<u;){D=a[g];var k=kl(D),Z=k=="wrapper"?F0(D):r;Z&&z0(Z[0])&&Z[1]==(f|L|T|x)&&!Z[4].length&&Z[9]==1?M=M[kl(Z[0])].apply(M,Z[3]):M=D.length==1&&z0(D)?M[k]():M.thru(D)}return function(){var ue=arguments,he=ue[0];if(M&&ue.length==1&&Qe(he))return M.plant(he).value();for(var pe=0,be=u?a[pe].apply(this,ue):he;++pe<u;)be=a[pe].call(this,be);return be}})}function Ul(s,a,u,g,y,D,M,k,Z,ue){var he=a&f,pe=a&H,be=a&G,Pe=a&(L|$),We=a&J,ot=be?r:Pa(s);function qe(){for(var ft=arguments.length,wt=te(ft),rn=ft;rn--;)wt[rn]=arguments[rn];if(Pe)var Br=mo(qe),nn=uD(wt,Br);if(g&&(wt=o2(wt,g,y,Pe)),D&&(wt=a2(wt,D,M,Pe)),ft-=nn,Pe&&ft<ue){var Qt=Di(wt,Br);return g2(s,a,Ul,qe.placeholder,u,wt,Qt,k,Z,ue-ft)}var On=pe?u:this,ai=be?On[s]:s;return ft=wt.length,k?wt=v$(wt,k):We&&ft>1&&wt.reverse(),he&&Z<ft&&(wt.length=Z),this&&this!==mt&&this instanceof qe&&(ai=ot||Pa(ai)),ai.apply(On,wt)}return qe}function d2(s,a){return function(u,g){return SA(u,s,a(g),{})}}function jl(s,a){return function(u,g){var y;if(u===r&&g===r)return a;if(u!==r&&(y=u),g!==r){if(y===r)return g;typeof u=="string"||typeof g=="string"?(u=en(u),g=en(g)):(u=Xm(u),g=Xm(g)),y=s(u,g)}return y}}function L0(s){return ni(function(a){return a=Ut(a,Qr(ze())),ct(function(u){var g=this;return s(a,function(y){return wr(y,g,u)})})})}function Fl(s,a){a=a===r?" ":en(a);var u=a.length;if(u<2)return u?D0(a,s):a;var g=D0(a,Il(s/ao(a)));return oo(a)?Ri(Cn(g),0,s).join(""):g.slice(0,s)}function QA(s,a,u,g){var y=a&H,D=Pa(s);function M(){for(var k=-1,Z=arguments.length,ue=-1,he=g.length,pe=te(he+Z),be=this&&this!==mt&&this instanceof M?D:s;++ue<he;)pe[ue]=g[ue];for(;Z--;)pe[ue++]=arguments[++k];return wr(be,y?u:this,pe)}return M}function p2(s){return function(a,u,g){return g&&typeof g!="number"&&Fr(a,u,g)&&(u=g=r),a=oi(a),u===r?(u=a,a=0):u=oi(u),g=g===r?a<u?1:-1:oi(g),jA(a,u,g,s)}}function Bl(s){return function(a,u){return typeof a=="string"&&typeof u=="string"||(a=yn(a),u=yn(u)),s(a,u)}}function g2(s,a,u,g,y,D,M,k,Z,ue){var he=a&L,pe=he?M:r,be=he?r:M,Pe=he?D:r,We=he?r:D;a|=he?T:I,a&=~(he?I:T),a&N||(a&=~(H|G));var ot=[s,a,y,Pe,pe,We,be,k,Z,ue],qe=u.apply(r,ot);return z0(s)&&O2(qe,ot),qe.placeholder=g,D2(qe,s,a)}function M0(s){var a=hr[s];return function(u,g){if(u=yn(u),g=g==null?0:Sr(it(g),292),g&&Dm(u)){var y=(yt(u)+"e").split("e"),D=a(y[0]+"e"+(+y[1]+g));return y=(yt(D)+"e").split("e"),+(y[0]+"e"+(+y[1]-g))}return a(u)}}var e$=uo&&1/gl(new uo([,-0]))[1]==le?function(s){return new uo(s)}:id;function m2(s){return function(a){var u=Or(a);return u==Me?f0(a):u==He?wD(a):lD(a,s(a))}}function ri(s,a,u,g,y,D,M,k){var Z=a&G;if(!Z&&typeof s!="function")throw new pn(c);var ue=g?g.length:0;if(ue||(a&=~(T|I),g=y=r),M=M===r?M:fr(it(M),0),k=k===r?k:it(k),ue-=y?y.length:0,a&I){var he=g,pe=y;g=y=r}var be=Z?r:F0(s),Pe=[s,a,u,g,y,he,pe,D,M,k];if(be&&g$(Pe,be),s=Pe[0],a=Pe[1],u=Pe[2],g=Pe[3],y=Pe[4],k=Pe[9]=Pe[9]===r?Z?0:s.length:fr(Pe[9]-ue,0),!k&&a&(L|$)&&(a&=~(L|$)),!a||a==H)var We=JA(s,a,u);else a==L||a==$?We=XA(s,a,k):(a==T||a==(H|T))&&!y.length?We=QA(s,a,u,g):We=Ul.apply(r,Pe);var ot=be?Ym:O2;return D2(ot(We,Pe),s,a)}function w2(s,a,u,g){return s===r||Sn(s,lo[u])&&!bt.call(g,u)?a:s}function v2(s,a,u,g,y,D){return Bt(s)&&Bt(a)&&(D.set(a,s),Rl(s,a,r,v2,D),D.delete(a)),s}function t$(s){return Na(s)?r:s}function y2(s,a,u,g,y,D){var M=u&P,k=s.length,Z=a.length;if(k!=Z&&!(M&&Z>k))return!1;var ue=D.get(s),he=D.get(a);if(ue&&he)return ue==a&&he==s;var pe=-1,be=!0,Pe=u&U?new ms:r;for(D.set(s,a),D.set(a,s);++pe<k;){var We=s[pe],ot=a[pe];if(g)var qe=M?g(ot,We,pe,a,s,D):g(We,ot,pe,s,a,D);if(qe!==r){if(qe)continue;be=!1;break}if(Pe){if(!o0(a,function(ft,wt){if(!ba(Pe,wt)&&(We===ft||y(We,ft,u,g,D)))return Pe.push(wt)})){be=!1;break}}else if(!(We===ot||y(We,ot,u,g,D))){be=!1;break}}return D.delete(s),D.delete(a),be}function r$(s,a,u,g,y,D,M){switch(u){case p:if(s.byteLength!=a.byteLength||s.byteOffset!=a.byteOffset)return!1;s=s.buffer,a=a.buffer;case b:return!(s.byteLength!=a.byteLength||!D(new _l(s),new _l(a)));case Y:case W:case nt:return Sn(+s,+a);case F:return s.name==a.name&&s.message==a.message;case Je:case Be:return s==a+"";case Me:var k=f0;case He:var Z=g&P;if(k||(k=gl),s.size!=a.size&&!Z)return!1;var ue=M.get(s);if(ue)return ue==a;g|=U,M.set(s,a);var he=y2(k(s),k(a),g,y,D,M);return M.delete(s),he;case Ke:if(Ia)return Ia.call(s)==Ia.call(a)}return!1}function n$(s,a,u,g,y,D){var M=u&P,k=U0(s),Z=k.length,ue=U0(a),he=ue.length;if(Z!=he&&!M)return!1;for(var pe=Z;pe--;){var be=k[pe];if(!(M?be in a:bt.call(a,be)))return!1}var Pe=D.get(s),We=D.get(a);if(Pe&&We)return Pe==a&&We==s;var ot=!0;D.set(s,a),D.set(a,s);for(var qe=M;++pe<Z;){be=k[pe];var ft=s[be],wt=a[be];if(g)var rn=M?g(wt,ft,be,a,s,D):g(ft,wt,be,s,a,D);if(!(rn===r?ft===wt||y(ft,wt,u,g,D):rn)){ot=!1;break}qe||(qe=be=="constructor")}if(ot&&!qe){var Br=s.constructor,nn=a.constructor;Br!=nn&&"constructor"in s&&"constructor"in a&&!(typeof Br=="function"&&Br instanceof Br&&typeof nn=="function"&&nn instanceof nn)&&(ot=!1)}return D.delete(s),D.delete(a),ot}function ni(s){return q0(I2(s,r,N2),s+"")}function U0(s){return Fm(s,vr,k0)}function j0(s){return Fm(s,Kr,b2)}var F0=Ol?function(s){return Ol.get(s)}:id;function kl(s){for(var a=s.name+"",u=ho[a],g=bt.call(ho,a)?u.length:0;g--;){var y=u[g],D=y.func;if(D==null||D==s)return y.name}return a}function mo(s){var a=bt.call(C,"placeholder")?C:s;return a.placeholder}function ze(){var s=C.iteratee||rd;return s=s===rd?Hm:s,arguments.length?s(arguments[0],arguments[1]):s}function Hl(s,a){var u=s.__data__;return h$(a)?u[typeof a=="string"?"string":"hash"]:u.map}function B0(s){for(var a=vr(s),u=a.length;u--;){var g=a[u],y=s[g];a[u]=[g,y,x2(y)]}return a}function ys(s,a){var u=pD(s,a);return km(u)?u:r}function i$(s){var a=bt.call(s,ps),u=s[ps];try{s[ps]=r;var g=!0}catch{}var y=yl.call(s);return g&&(a?s[ps]=u:delete s[ps]),y}var k0=p0?function(s){return s==null?[]:(s=Ot(s),Si(p0(s),function(a){return Sm.call(s,a)}))}:sd,b2=p0?function(s){for(var a=[];s;)Oi(a,k0(s)),s=El(s);return a}:sd,Or=jr;(g0&&Or(new g0(new ArrayBuffer(1)))!=p||Ea&&Or(new Ea)!=Me||m0&&Or(m0.resolve())!=At||uo&&Or(new uo)!=He||xa&&Or(new xa)!=Ue)&&(Or=function(s){var a=jr(s),u=a==Ge?s.constructor:r,g=u?bs(u):"";if(g)switch(g){case BD:return p;case kD:return Me;case HD:return At;case zD:return He;case WD:return Ue}return a});function s$(s,a,u){for(var g=-1,y=u.length;++g<y;){var D=u[g],M=D.size;switch(D.type){case"drop":s+=M;break;case"dropRight":a-=M;break;case"take":a=Sr(a,s+M);break;case"takeRight":s=fr(s,a-M);break}}return{start:s,end:a}}function o$(s){var a=s.match(Pt);return a?a[1].split(or):[]}function _2(s,a,u){a=Ti(a,s);for(var g=-1,y=a.length,D=!1;++g<y;){var M=kn(a[g]);if(!(D=s!=null&&u(s,M)))break;s=s[M]}return D||++g!=y?D:(y=s==null?0:s.length,!!y&&Zl(y)&&ii(M,y)&&(Qe(s)||_s(s)))}function a$(s){var a=s.length,u=new s.constructor(a);return a&&typeof s[0]=="string"&&bt.call(s,"index")&&(u.index=s.index,u.input=s.input),u}function E2(s){return typeof s.constructor=="function"&&!Ta(s)?fo(El(s)):{}}function c$(s,a,u){var g=s.constructor;switch(a){case b:return N0(s);case Y:case W:return new g(+s);case p:return qA(s,u);case m:case A:case B:case K:case Q:case Ee:case Te:case st:case ht:return i2(s,u);case Me:return new g;case nt:case Be:return new g(s);case Je:return VA(s);case He:return new g;case Ke:return KA(s)}}function l$(s,a){var u=a.length;if(!u)return s;var g=u-1;return a[g]=(u>1?"& ":"")+a[g],a=a.join(u>2?", ":" "),s.replace(Kt,`{
|
|
80
80
|
/* [wrapped with `+a+`] */
|
|
81
|
-
`)}function DA(s){return Xe(s)||ds(s)||!!(u2&&s&&s[u2])}function Xn(s,a){var u=typeof s;return a=a??re,!!a&&(u=="number"||u!="symbol"&&Tf.test(s))&&s>-1&&s%1==0&&s<a}function Lr(s,a,u){if(!Ft(u))return!1;var g=typeof a;return(g=="number"?Wr(u)&&Xn(a,u.length):g=="string"&&a in u)?xn(u[a],s):!1}function $0(s,a){if(Xe(s))return!1;var u=typeof s;return u=="number"||u=="symbol"||u=="boolean"||s==null||Qr(s)?!0:er.test(s)||!Lt.test(s)||a!=null&&s in Dt(a)}function OA(s){var a=typeof s;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?s!=="__proto__":s===null}function P0(s){var a=$l(s),u=I[a];if(typeof u!="function"||!(a in dt.prototype))return!1;if(s===u)return!0;var g=D0(u);return!!g&&s===g[0]}function AA(s){return!!o2&&o2 in s}var $A=ol?Qn:G0;function Ca(s){var a=s&&s.constructor,u=typeof a=="function"&&a.prototype||eo;return s===u}function om(s){return s===s&&!Ft(s)}function am(s,a){return function(u){return u==null?!1:u[s]===a&&(a!==r||s in Dt(u))}}function PA(s){var a=Ll(s,function(g){return u.size===d&&u.clear(),g}),u=a.cache;return a}function TA(s,a){var u=s[1],g=a[1],y=u|g,O=y<(k|q|f),j=g==f&&u==M||g==f&&u==x&&s[7].length<=a[8]||g==(f|x)&&a[7].length<=a[8]&&u==M;if(!(O||j))return s;g&k&&(s[2]=a[2],y|=u&k?0:T);var H=a[3];if(H){var Z=s[3];s[3]=Z?z2(Z,H,a[4]):H,s[4]=Z?vi(s[3],v):a[4]}return H=a[5],H&&(Z=s[5],s[5]=Z?W2(Z,H,a[6]):H,s[6]=Z?vi(s[5],v):a[6]),H=a[7],H&&(s[7]=H),g&f&&(s[8]=s[8]==null?a[8]:Cr(s[8],a[8])),s[9]==null&&(s[9]=a[9]),s[0]=a[0],s[1]=y,s}function RA(s){var a=[];if(s!=null)for(var u in Dt(s))a.push(u);return a}function NA(s){return cl.call(s)}function cm(s,a,u){return a=fr(a===r?s.length-1:a,0),function(){for(var g=arguments,y=-1,O=fr(g.length-a,0),j=te(O);++y<O;)j[y]=g[a+y];y=-1;for(var H=te(a+1);++y<a;)H[y]=g[y];return H[a]=u(j),mr(s,this,H)}}function lm(s,a){return a.length<2?s:us(s,pn(a,0,-1))}function MA(s,a){for(var u=s.length,g=Cr(a.length,u),y=zr(s);g--;){var O=a[g];s[g]=Xn(O,u)?y[O]:r}return s}function T0(s,a){if(!(a==="constructor"&&typeof s[a]=="function")&&a!="__proto__")return s[a]}var um=fm(R2),Ia=YD||function(s,a){return gt.setTimeout(s,a)},R0=fm(iA);function hm(s,a,u){var g=a+"";return R0(s,SA(g,LA(xA(g),u)))}function fm(s){var a=0,u=0;return function(){var g=eO(),y=me-(g-u);if(u=g,y>0){if(++a>=de)return arguments[0]}else a=0;return s.apply(r,arguments)}}function Tl(s,a){var u=-1,g=s.length,y=g-1;for(a=a===r?g:a;++u<a;){var O=g0(u,y),j=s[O];s[O]=s[u],s[u]=j}return s.length=a,s}var dm=PA(function(s){var a=[];return s.charCodeAt(0)===46&&a.push(""),s.replace(tr,function(u,g,y,O){a.push(y?O.replace(Sf,"$1"):g||u)}),a});function jn(s){if(typeof s=="string"||Qr(s))return s;var a=s+"";return a=="0"&&1/s==-le?"-0":a}function fs(s){if(s!=null){try{return al.call(s)}catch{}try{return s+""}catch{}}return""}function LA(s,a){return un(Ne,function(u){var g="_."+u[0];a&u[1]&&!rl(s,g)&&s.push(g)}),s.sort()}function pm(s){if(s instanceof dt)return s.clone();var a=new fn(s.__wrapped__,s.__chain__);return a.__actions__=zr(s.__actions__),a.__index__=s.__index__,a.__values__=s.__values__,a}function jA(s,a,u){(u?Lr(s,a,u):a===r)?a=1:a=fr(rt(a),0);var g=s==null?0:s.length;if(!g||a<1)return[];for(var y=0,O=0,j=te(pl(g/a));y<g;)j[O++]=pn(s,y,y+=a);return j}function UA(s){for(var a=-1,u=s==null?0:s.length,g=0,y=[];++a<u;){var O=s[a];O&&(y[g++]=O)}return y}function FA(){var s=arguments.length;if(!s)return[];for(var a=te(s-1),u=arguments[0],g=s;g--;)a[g-1]=arguments[g];return wi(Xe(u)?zr(u):[u],_r(a,1))}var BA=at(function(s,a){return Jt(s)?ya(s,_r(a,1,Jt,!0)):[]}),kA=at(function(s,a){var u=gn(a);return Jt(u)&&(u=r),Jt(s)?ya(s,_r(a,1,Jt,!0),Ue(u,2)):[]}),HA=at(function(s,a){var u=gn(a);return Jt(u)&&(u=r),Jt(s)?ya(s,_r(a,1,Jt,!0),r,u):[]});function zA(s,a,u){var g=s==null?0:s.length;return g?(a=u||a===r?1:rt(a),pn(s,a<0?0:a,g)):[]}function WA(s,a,u){var g=s==null?0:s.length;return g?(a=u||a===r?1:rt(a),a=g-a,pn(s,0,a<0?0:a)):[]}function qA(s,a){return s&&s.length?Cl(s,Ue(a,3),!0,!0):[]}function VA(s,a){return s&&s.length?Cl(s,Ue(a,3),!0):[]}function KA(s,a,u,g){var y=s==null?0:s.length;return y?(u&&typeof u!="number"&&Lr(s,a,u)&&(u=0,g=y),FO(s,a,u,g)):[]}function gm(s,a,u){var g=s==null?0:s.length;if(!g)return-1;var y=u==null?0:rt(u);return y<0&&(y=fr(g+y,0)),nl(s,Ue(a,3),y)}function mm(s,a,u){var g=s==null?0:s.length;if(!g)return-1;var y=g-1;return u!==r&&(y=rt(u),y=u<0?fr(g+y,0):Cr(y,g-1)),nl(s,Ue(a,3),y,!0)}function wm(s){var a=s==null?0:s.length;return a?_r(s,1):[]}function GA(s){var a=s==null?0:s.length;return a?_r(s,le):[]}function ZA(s,a){var u=s==null?0:s.length;return u?(a=a===r?1:rt(a),_r(s,a)):[]}function YA(s){for(var a=-1,u=s==null?0:s.length,g={};++a<u;){var y=s[a];g[y[0]]=y[1]}return g}function vm(s){return s&&s.length?s[0]:r}function JA(s,a,u){var g=s==null?0:s.length;if(!g)return-1;var y=u==null?0:rt(u);return y<0&&(y=fr(g+y,0)),Ys(s,a,y)}function XA(s){var a=s==null?0:s.length;return a?pn(s,0,-1):[]}var QA=at(function(s){var a=jt(s,b0);return a.length&&a[0]===s[0]?u0(a):[]}),e$=at(function(s){var a=gn(s),u=jt(s,b0);return a===gn(u)?a=r:u.pop(),u.length&&u[0]===s[0]?u0(u,Ue(a,2)):[]}),t$=at(function(s){var a=gn(s),u=jt(s,b0);return a=typeof a=="function"?a:r,a&&u.pop(),u.length&&u[0]===s[0]?u0(u,r,a):[]});function r$(s,a){return s==null?"":XD.call(s,a)}function gn(s){var a=s==null?0:s.length;return a?s[a-1]:r}function n$(s,a,u){var g=s==null?0:s.length;if(!g)return-1;var y=g;return u!==r&&(y=rt(u),y=y<0?fr(g+y,0):Cr(y,g-1)),a===a?LD(s,a,y):nl(s,X3,y,!0)}function i$(s,a){return s&&s.length?A2(s,rt(a)):r}var s$=at(ym);function ym(s,a){return s&&s.length&&a&&a.length?p0(s,a):s}function o$(s,a,u){return s&&s.length&&a&&a.length?p0(s,a,Ue(u,2)):s}function a$(s,a,u){return s&&s.length&&a&&a.length?p0(s,a,r,u):s}var c$=Jn(function(s,a){var u=s==null?0:s.length,g=o0(s,a);return T2(s,jt(a,function(y){return Xn(y,u)?+y:y}).sort(H2)),g});function l$(s,a){var u=[];if(!(s&&s.length))return u;var g=-1,y=[],O=s.length;for(a=Ue(a,3);++g<O;){var j=s[g];a(j,g,s)&&(u.push(j),y.push(g))}return T2(s,y),u}function N0(s){return s==null?s:rO.call(s)}function u$(s,a,u){var g=s==null?0:s.length;return g?(u&&typeof u!="number"&&Lr(s,a,u)?(a=0,u=g):(a=a==null?0:rt(a),u=u===r?g:rt(u)),pn(s,a,u)):[]}function h$(s,a){return xl(s,a)}function f$(s,a,u){return w0(s,a,Ue(u,2))}function d$(s,a){var u=s==null?0:s.length;if(u){var g=xl(s,a);if(g<u&&xn(s[g],a))return g}return-1}function p$(s,a){return xl(s,a,!0)}function g$(s,a,u){return w0(s,a,Ue(u,2),!0)}function m$(s,a){var u=s==null?0:s.length;if(u){var g=xl(s,a,!0)-1;if(xn(s[g],a))return g}return-1}function w$(s){return s&&s.length?N2(s):[]}function v$(s,a){return s&&s.length?N2(s,Ue(a,2)):[]}function y$(s){var a=s==null?0:s.length;return a?pn(s,1,a):[]}function b$(s,a,u){return s&&s.length?(a=u||a===r?1:rt(a),pn(s,0,a<0?0:a)):[]}function _$(s,a,u){var g=s==null?0:s.length;return g?(a=u||a===r?1:rt(a),a=g-a,pn(s,a<0?0:a,g)):[]}function E$(s,a){return s&&s.length?Cl(s,Ue(a,3),!1,!0):[]}function x$(s,a){return s&&s.length?Cl(s,Ue(a,3)):[]}var C$=at(function(s){return _i(_r(s,1,Jt,!0))}),I$=at(function(s){var a=gn(s);return Jt(a)&&(a=r),_i(_r(s,1,Jt,!0),Ue(a,2))}),S$=at(function(s){var a=gn(s);return a=typeof a=="function"?a:r,_i(_r(s,1,Jt,!0),r,a)});function D$(s){return s&&s.length?_i(s):[]}function O$(s,a){return s&&s.length?_i(s,Ue(a,2)):[]}function A$(s,a){return a=typeof a=="function"?a:r,s&&s.length?_i(s,r,a):[]}function M0(s){if(!(s&&s.length))return[];var a=0;return s=mi(s,function(u){if(Jt(u))return a=fr(u.length,a),!0}),Xf(a,function(u){return jt(s,Zf(u))})}function bm(s,a){if(!(s&&s.length))return[];var u=M0(s);return a==null?u:jt(u,function(g){return mr(a,r,g)})}var $$=at(function(s,a){return Jt(s)?ya(s,a):[]}),P$=at(function(s){return y0(mi(s,Jt))}),T$=at(function(s){var a=gn(s);return Jt(a)&&(a=r),y0(mi(s,Jt),Ue(a,2))}),R$=at(function(s){var a=gn(s);return a=typeof a=="function"?a:r,y0(mi(s,Jt),r,a)}),N$=at(M0);function M$(s,a){return U2(s||[],a||[],va)}function L$(s,a){return U2(s||[],a||[],Ea)}var j$=at(function(s){var a=s.length,u=a>1?s[a-1]:r;return u=typeof u=="function"?(s.pop(),u):r,bm(s,u)});function _m(s){var a=I(s);return a.__chain__=!0,a}function U$(s,a){return a(s),s}function Rl(s,a){return a(s)}var F$=Jn(function(s){var a=s.length,u=a?s[0]:0,g=this.__wrapped__,y=function(O){return o0(O,s)};return a>1||this.__actions__.length||!(g instanceof dt)||!Xn(u)?this.thru(y):(g=g.slice(u,+u+(a?1:0)),g.__actions__.push({func:Rl,args:[y],thisArg:r}),new fn(g,this.__chain__).thru(function(O){return a&&!O.length&&O.push(r),O}))});function B$(){return _m(this)}function k$(){return new fn(this.value(),this.__chain__)}function H$(){this.__values__===r&&(this.__values__=Mm(this.value()));var s=this.__index__>=this.__values__.length,a=s?r:this.__values__[this.__index__++];return{done:s,value:a}}function z$(){return this}function W$(s){for(var a,u=this;u instanceof vl;){var g=pm(u);g.__index__=0,g.__values__=r,a?y.__wrapped__=g:a=g;var y=g;u=u.__wrapped__}return y.__wrapped__=s,a}function q$(){var s=this.__wrapped__;if(s instanceof dt){var a=s;return this.__actions__.length&&(a=new dt(this)),a=a.reverse(),a.__actions__.push({func:Rl,args:[N0],thisArg:r}),new fn(a,this.__chain__)}return this.thru(N0)}function V$(){return j2(this.__wrapped__,this.__actions__)}var K$=Il(function(s,a,u){bt.call(s,u)?++s[u]:Zn(s,u,1)});function G$(s,a,u){var g=Xe(s)?Y3:UO;return u&&Lr(s,a,u)&&(a=r),g(s,Ue(a,3))}function Z$(s,a){var u=Xe(s)?mi:b2;return u(s,Ue(a,3))}var Y$=G2(gm),J$=G2(mm);function X$(s,a){return _r(Nl(s,a),1)}function Q$(s,a){return _r(Nl(s,a),le)}function eP(s,a,u){return u=u===r?1:rt(u),_r(Nl(s,a),u)}function Em(s,a){var u=Xe(s)?un:bi;return u(s,Ue(a,3))}function xm(s,a){var u=Xe(s)?yD:y2;return u(s,Ue(a,3))}var tP=Il(function(s,a,u){bt.call(s,u)?s[u].push(a):Zn(s,u,[a])});function rP(s,a,u,g){s=Wr(s)?s:co(s),u=u&&!g?rt(u):0;var y=s.length;return u<0&&(u=fr(y+u,0)),Fl(s)?u<=y&&s.indexOf(a,u)>-1:!!y&&Ys(s,a,u)>-1}var nP=at(function(s,a,u){var g=-1,y=typeof a=="function",O=Wr(s)?te(s.length):[];return bi(s,function(j){O[++g]=y?mr(a,j,u):ba(j,a,u)}),O}),iP=Il(function(s,a,u){Zn(s,u,a)});function Nl(s,a){var u=Xe(s)?jt:S2;return u(s,Ue(a,3))}function sP(s,a,u,g){return s==null?[]:(Xe(a)||(a=a==null?[]:[a]),u=g?r:u,Xe(u)||(u=u==null?[]:[u]),$2(s,a,u))}var oP=Il(function(s,a,u){s[u?0:1].push(a)},function(){return[[],[]]});function aP(s,a,u){var g=Xe(s)?Kf:e2,y=arguments.length<3;return g(s,Ue(a,4),u,y,bi)}function cP(s,a,u){var g=Xe(s)?bD:e2,y=arguments.length<3;return g(s,Ue(a,4),u,y,y2)}function lP(s,a){var u=Xe(s)?mi:b2;return u(s,jl(Ue(a,3)))}function uP(s){var a=Xe(s)?g2:rA;return a(s)}function hP(s,a,u){(u?Lr(s,a,u):a===r)?a=1:a=rt(a);var g=Xe(s)?RO:nA;return g(s,a)}function fP(s){var a=Xe(s)?NO:sA;return a(s)}function dP(s){if(s==null)return 0;if(Wr(s))return Fl(s)?Xs(s):s.length;var a=Ir(s);return a==Pe||a==je?s.size:f0(s).length}function pP(s,a,u){var g=Xe(s)?Gf:oA;return u&&Lr(s,a,u)&&(a=r),g(s,Ue(a,3))}var gP=at(function(s,a){if(s==null)return[];var u=a.length;return u>1&&Lr(s,a[0],a[1])?a=[]:u>2&&Lr(a[0],a[1],a[2])&&(a=[a[0]]),$2(s,_r(a,1),[])}),Ml=ZD||function(){return gt.Date.now()};function mP(s,a){if(typeof a!="function")throw new hn(c);return s=rt(s),function(){if(--s<1)return a.apply(this,arguments)}}function Cm(s,a,u){return a=u?r:a,a=s&&a==null?s.length:a,Yn(s,f,r,r,r,r,a)}function Im(s,a){var u;if(typeof a!="function")throw new hn(c);return s=rt(s),function(){return--s>0&&(u=a.apply(this,arguments)),s<=1&&(a=r),u}}var L0=at(function(s,a,u){var g=k;if(u.length){var y=vi(u,oo(L0));g|=R}return Yn(s,g,a,u,y)}),Sm=at(function(s,a,u){var g=k|q;if(u.length){var y=vi(u,oo(Sm));g|=R}return Yn(a,g,s,u,y)});function Dm(s,a,u){a=u?r:a;var g=Yn(s,M,r,r,r,r,r,a);return g.placeholder=Dm.placeholder,g}function Om(s,a,u){a=u?r:a;var g=Yn(s,A,r,r,r,r,r,a);return g.placeholder=Om.placeholder,g}function Am(s,a,u){var g,y,O,j,H,Z,ue=0,he=!1,pe=!1,_e=!0;if(typeof s!="function")throw new hn(c);a=mn(a)||0,Ft(u)&&(he=!!u.leading,pe="maxWait"in u,O=pe?fr(mn(u.maxWait)||0,a):O,_e="trailing"in u?!!u.trailing:_e);function De(Xt){var Cn=g,ti=y;return g=y=r,ue=Xt,j=s.apply(ti,Cn),j}function Fe(Xt){return ue=Xt,H=Ia(ht,a),he?De(Xt):j}function st(Xt){var Cn=Xt-Z,ti=Xt-ue,Gm=a-Cn;return pe?Cr(Gm,O-ti):Gm}function Be(Xt){var Cn=Xt-Z,ti=Xt-ue;return Z===r||Cn>=a||Cn<0||pe&&ti>=O}function ht(){var Xt=Ml();if(Be(Xt))return mt(Xt);H=Ia(ht,st(Xt))}function mt(Xt){return H=r,_e&&g?De(Xt):(g=y=r,j)}function en(){H!==r&&F2(H),ue=0,g=Z=y=H=r}function jr(){return H===r?j:mt(Ml())}function tn(){var Xt=Ml(),Cn=Be(Xt);if(g=arguments,y=this,Z=Xt,Cn){if(H===r)return Fe(Z);if(pe)return F2(H),H=Ia(ht,a),De(Z)}return H===r&&(H=Ia(ht,a)),j}return tn.cancel=en,tn.flush=jr,tn}var wP=at(function(s,a){return v2(s,1,a)}),vP=at(function(s,a,u){return v2(s,mn(a)||0,u)});function yP(s){return Yn(s,J)}function Ll(s,a){if(typeof s!="function"||a!=null&&typeof a!="function")throw new hn(c);var u=function(){var g=arguments,y=a?a.apply(this,g):g[0],O=u.cache;if(O.has(y))return O.get(y);var j=s.apply(this,g);return u.cache=O.set(y,j)||O,j};return u.cache=new(Ll.Cache||Gn),u}Ll.Cache=Gn;function jl(s){if(typeof s!="function")throw new hn(c);return function(){var a=arguments;switch(a.length){case 0:return!s.call(this);case 1:return!s.call(this,a[0]);case 2:return!s.call(this,a[0],a[1]);case 3:return!s.call(this,a[0],a[1],a[2])}return!s.apply(this,a)}}function bP(s){return Im(2,s)}var _P=aA(function(s,a){a=a.length==1&&Xe(a[0])?jt(a[0],Jr(Ue())):jt(_r(a,1),Jr(Ue()));var u=a.length;return at(function(g){for(var y=-1,O=Cr(g.length,u);++y<O;)g[y]=a[y].call(this,g[y]);return mr(s,this,g)})}),j0=at(function(s,a){var u=vi(a,oo(j0));return Yn(s,R,r,a,u)}),$m=at(function(s,a){var u=vi(a,oo($m));return Yn(s,C,r,a,u)}),EP=Jn(function(s,a){return Yn(s,x,r,r,r,a)});function xP(s,a){if(typeof s!="function")throw new hn(c);return a=a===r?a:rt(a),at(s,a)}function CP(s,a){if(typeof s!="function")throw new hn(c);return a=a==null?0:fr(rt(a),0),at(function(u){var g=u[a],y=xi(u,0,a);return g&&wi(y,g),mr(s,this,y)})}function IP(s,a,u){var g=!0,y=!0;if(typeof s!="function")throw new hn(c);return Ft(u)&&(g="leading"in u?!!u.leading:g,y="trailing"in u?!!u.trailing:y),Am(s,a,{leading:g,maxWait:a,trailing:y})}function SP(s){return Cm(s,1)}function DP(s,a){return j0(_0(a),s)}function OP(){if(!arguments.length)return[];var s=arguments[0];return Xe(s)?s:[s]}function AP(s){return dn(s,S)}function $P(s,a){return a=typeof a=="function"?a:r,dn(s,S,a)}function PP(s){return dn(s,E|S)}function TP(s,a){return a=typeof a=="function"?a:r,dn(s,E|S,a)}function RP(s,a){return a==null||w2(s,a,wr(a))}function xn(s,a){return s===a||s!==s&&a!==a}var NP=Al(l0),MP=Al(function(s,a){return s>=a}),ds=x2(function(){return arguments}())?x2:function(s){return Kt(s)&&bt.call(s,"callee")&&!l2.call(s,"callee")},Xe=te.isArray,LP=Nr?Jr(Nr):WO;function Wr(s){return s!=null&&Ul(s.length)&&!Qn(s)}function Jt(s){return Kt(s)&&Wr(s)}function jP(s){return s===!0||s===!1||Kt(s)&&Mr(s)==Y}var Ci=JD||G0,UP=bn?Jr(bn):qO;function FP(s){return Kt(s)&&s.nodeType===1&&!Sa(s)}function BP(s){if(s==null)return!0;if(Wr(s)&&(Xe(s)||typeof s=="string"||typeof s.splice=="function"||Ci(s)||ao(s)||ds(s)))return!s.length;var a=Ir(s);if(a==Pe||a==je)return!s.size;if(Ca(s))return!f0(s).length;for(var u in s)if(bt.call(s,u))return!1;return!0}function kP(s,a){return _a(s,a)}function HP(s,a,u){u=typeof u=="function"?u:r;var g=u?u(s,a):r;return g===r?_a(s,a,r,u):!!g}function U0(s){if(!Kt(s))return!1;var a=Mr(s);return a==F||a==w||typeof s.message=="string"&&typeof s.name=="string"&&!Sa(s)}function zP(s){return typeof s=="number"&&h2(s)}function Qn(s){if(!Ft(s))return!1;var a=Mr(s);return a==we||a==ve||a==X||a==$t}function Pm(s){return typeof s=="number"&&s==rt(s)}function Ul(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=re}function Ft(s){var a=typeof s;return s!=null&&(a=="object"||a=="function")}function Kt(s){return s!=null&&typeof s=="object"}var Tm=ln?Jr(ln):KO;function WP(s,a){return s===a||h0(s,a,O0(a))}function qP(s,a,u){return u=typeof u=="function"?u:r,h0(s,a,O0(a),u)}function VP(s){return Rm(s)&&s!=+s}function KP(s){if($A(s))throw new Ke(o);return C2(s)}function GP(s){return s===null}function ZP(s){return s==null}function Rm(s){return typeof s=="number"||Kt(s)&&Mr(s)==tt}function Sa(s){if(!Kt(s)||Mr(s)!=qe)return!1;var a=hl(s);if(a===null)return!0;var u=bt.call(a,"constructor")&&a.constructor;return typeof u=="function"&&u instanceof u&&al.call(u)==qD}var F0=Nn?Jr(Nn):GO;function YP(s){return Pm(s)&&s>=-re&&s<=re}var Nm=ha?Jr(ha):ZO;function Fl(s){return typeof s=="string"||!Xe(s)&&Kt(s)&&Mr(s)==Me}function Qr(s){return typeof s=="symbol"||Kt(s)&&Mr(s)==ze}var ao=ss?Jr(ss):YO;function JP(s){return s===r}function XP(s){return Kt(s)&&Ir(s)==Te}function QP(s){return Kt(s)&&Mr(s)==Ve}var eT=Al(d0),tT=Al(function(s,a){return s<=a});function Mm(s){if(!s)return[];if(Wr(s))return Fl(s)?_n(s):zr(s);if(da&&s[da])return RD(s[da]());var a=Ir(s),u=a==Pe?e0:a==je?il:co;return u(s)}function ei(s){if(!s)return s===0?s:0;if(s=mn(s),s===le||s===-le){var a=s<0?-1:1;return a*ne}return s===s?s:0}function rt(s){var a=ei(s),u=a%1;return a===a?u?a-u:a:0}function Lm(s){return s?ls(rt(s),0,ie):0}function mn(s){if(typeof s=="number")return s;if(Qr(s))return oe;if(Ft(s)){var a=typeof s.valueOf=="function"?s.valueOf():s;s=Ft(a)?a+"":a}if(typeof s!="string")return s===0?s:+s;s=t2(s);var u=Af.test(s);return u||Pf.test(s)?Je(s.slice(2),u?2:8):Of.test(s)?oe:+s}function jm(s){return Ln(s,qr(s))}function rT(s){return s?ls(rt(s),-re,re):s===0?s:0}function yt(s){return s==null?"":Xr(s)}var nT=io(function(s,a){if(Ca(a)||Wr(a)){Ln(a,wr(a),s);return}for(var u in a)bt.call(a,u)&&va(s,u,a[u])}),Um=io(function(s,a){Ln(a,qr(a),s)}),Bl=io(function(s,a,u,g){Ln(a,qr(a),s,g)}),iT=io(function(s,a,u,g){Ln(a,wr(a),s,g)}),sT=Jn(o0);function oT(s,a){var u=no(s);return a==null?u:m2(u,a)}var aT=at(function(s,a){s=Dt(s);var u=-1,g=a.length,y=g>2?a[2]:r;for(y&&Lr(a[0],a[1],y)&&(g=1);++u<g;)for(var O=a[u],j=qr(O),H=-1,Z=j.length;++H<Z;){var ue=j[H],he=s[ue];(he===r||xn(he,eo[ue])&&!bt.call(s,ue))&&(s[ue]=O[ue])}return s}),cT=at(function(s){return s.push(r,tm),mr(Fm,r,s)});function lT(s,a){return J3(s,Ue(a,3),Mn)}function uT(s,a){return J3(s,Ue(a,3),c0)}function hT(s,a){return s==null?s:a0(s,Ue(a,3),qr)}function fT(s,a){return s==null?s:_2(s,Ue(a,3),qr)}function dT(s,a){return s&&Mn(s,Ue(a,3))}function pT(s,a){return s&&c0(s,Ue(a,3))}function gT(s){return s==null?[]:_l(s,wr(s))}function mT(s){return s==null?[]:_l(s,qr(s))}function B0(s,a,u){var g=s==null?r:us(s,a);return g===r?u:g}function wT(s,a){return s!=null&&im(s,a,BO)}function k0(s,a){return s!=null&&im(s,a,kO)}var vT=Y2(function(s,a,u){a!=null&&typeof a.toString!="function"&&(a=cl.call(a)),s[a]=u},z0(Vr)),yT=Y2(function(s,a,u){a!=null&&typeof a.toString!="function"&&(a=cl.call(a)),bt.call(s,a)?s[a].push(u):s[a]=[u]},Ue),bT=at(ba);function wr(s){return Wr(s)?p2(s):f0(s)}function qr(s){return Wr(s)?p2(s,!0):JO(s)}function _T(s,a){var u={};return a=Ue(a,3),Mn(s,function(g,y,O){Zn(u,a(g,y,O),g)}),u}function ET(s,a){var u={};return a=Ue(a,3),Mn(s,function(g,y,O){Zn(u,y,a(g,y,O))}),u}var xT=io(function(s,a,u){El(s,a,u)}),Fm=io(function(s,a,u,g){El(s,a,u,g)}),CT=Jn(function(s,a){var u={};if(s==null)return u;var g=!1;a=jt(a,function(O){return O=Ei(O,s),g||(g=O.length>1),O}),Ln(s,S0(s),u),g&&(u=dn(u,E|_|S,vA));for(var y=a.length;y--;)v0(u,a[y]);return u});function IT(s,a){return Bm(s,jl(Ue(a)))}var ST=Jn(function(s,a){return s==null?{}:QO(s,a)});function Bm(s,a){if(s==null)return{};var u=jt(S0(s),function(g){return[g]});return a=Ue(a),P2(s,u,function(g,y){return a(g,y[0])})}function DT(s,a,u){a=Ei(a,s);var g=-1,y=a.length;for(y||(y=1,s=r);++g<y;){var O=s==null?r:s[jn(a[g])];O===r&&(g=y,O=u),s=Qn(O)?O.call(s):O}return s}function OT(s,a,u){return s==null?s:Ea(s,a,u)}function AT(s,a,u,g){return g=typeof g=="function"?g:r,s==null?s:Ea(s,a,u,g)}var km=Q2(wr),Hm=Q2(qr);function $T(s,a,u){var g=Xe(s),y=g||Ci(s)||ao(s);if(a=Ue(a,4),u==null){var O=s&&s.constructor;y?u=g?new O:[]:Ft(s)?u=Qn(O)?no(hl(s)):{}:u={}}return(y?un:Mn)(s,function(j,H,Z){return a(u,j,H,Z)}),u}function PT(s,a){return s==null?!0:v0(s,a)}function TT(s,a,u){return s==null?s:L2(s,a,_0(u))}function RT(s,a,u,g){return g=typeof g=="function"?g:r,s==null?s:L2(s,a,_0(u),g)}function co(s){return s==null?[]:Qf(s,wr(s))}function NT(s){return s==null?[]:Qf(s,qr(s))}function MT(s,a,u){return u===r&&(u=a,a=r),u!==r&&(u=mn(u),u=u===u?u:0),a!==r&&(a=mn(a),a=a===a?a:0),ls(mn(s),a,u)}function LT(s,a,u){return a=ei(a),u===r?(u=a,a=0):u=ei(u),s=mn(s),HO(s,a,u)}function jT(s,a,u){if(u&&typeof u!="boolean"&&Lr(s,a,u)&&(a=u=r),u===r&&(typeof a=="boolean"?(u=a,a=r):typeof s=="boolean"&&(u=s,s=r)),s===r&&a===r?(s=0,a=1):(s=ei(s),a===r?(a=s,s=0):a=ei(a)),s>a){var g=s;s=a,a=g}if(u||s%1||a%1){var y=f2();return Cr(s+y*(a-s+It("1e-"+((y+"").length-1))),a)}return g0(s,a)}var UT=so(function(s,a,u){return a=a.toLowerCase(),s+(u?zm(a):a)});function zm(s){return H0(yt(s).toLowerCase())}function Wm(s){return s=yt(s),s&&s.replace(qn,OD).replace(Wf,"")}function FT(s,a,u){s=yt(s),a=Xr(a);var g=s.length;u=u===r?g:ls(rt(u),0,g);var y=u;return u-=a.length,u>=0&&s.slice(u,y)==a}function BT(s){return s=yt(s),s&&Mt.test(s)?s.replace(es,AD):s}function kT(s){return s=yt(s),s&&rr.test(s)?s.replace(Wt,"\\$&"):s}var HT=so(function(s,a,u){return s+(u?"-":"")+a.toLowerCase()}),zT=so(function(s,a,u){return s+(u?" ":"")+a.toLowerCase()}),WT=K2("toLowerCase");function qT(s,a,u){s=yt(s),a=rt(a);var g=a?Xs(s):0;if(!a||g>=a)return s;var y=(a-g)/2;return Ol(gl(y),u)+s+Ol(pl(y),u)}function VT(s,a,u){s=yt(s),a=rt(a);var g=a?Xs(s):0;return a&&g<a?s+Ol(a-g,u):s}function KT(s,a,u){s=yt(s),a=rt(a);var g=a?Xs(s):0;return a&&g<a?Ol(a-g,u)+s:s}function GT(s,a,u){return u||a==null?a=0:a&&(a=+a),tO(yt(s).replace(qt,""),a||0)}function ZT(s,a,u){return(u?Lr(s,a,u):a===r)?a=1:a=rt(a),m0(yt(s),a)}function YT(){var s=arguments,a=yt(s[0]);return s.length<3?a:a.replace(s[1],s[2])}var JT=so(function(s,a,u){return s+(u?"_":"")+a.toLowerCase()});function XT(s,a,u){return u&&typeof u!="number"&&Lr(s,a,u)&&(a=u=r),u=u===r?ie:u>>>0,u?(s=yt(s),s&&(typeof a=="string"||a!=null&&!F0(a))&&(a=Xr(a),!a&&Js(s))?xi(_n(s),0,u):s.split(a,u)):[]}var QT=so(function(s,a,u){return s+(u?" ":"")+H0(a)});function eR(s,a,u){return s=yt(s),u=u==null?0:ls(rt(u),0,s.length),a=Xr(a),s.slice(u,u+a.length)==a}function tR(s,a,u){var g=I.templateSettings;u&&Lr(s,a,u)&&(a=r),s=yt(s),a=Bl({},a,g,em);var y=Bl({},a.imports,g.imports,em),O=wr(y),j=Qf(y,O),H,Z,ue=0,he=a.interpolate||zs,pe="__p += '",_e=t0((a.escape||zs).source+"|"+he.source+"|"+(he===Ut?Df:zs).source+"|"+(a.evaluate||zs).source+"|$","g"),De="//# sourceURL="+(bt.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++qf+"]")+`
|
|
82
|
-
`;s.replace(
|
|
83
|
-
__e(`+
|
|
84
|
-
'`),
|
|
85
|
-
`+
|
|
86
|
-
__p += '`),
|
|
87
|
-
((__t = (`+
|
|
88
|
-
'`),ue=
|
|
89
|
-
`;var
|
|
81
|
+
`)}function u$(s){return Qe(s)||_s(s)||!!(Om&&s&&s[Om])}function ii(s,a){var u=typeof s;return a=a??re,!!a&&(u=="number"||u!="symbol"&&Wf.test(s))&&s>-1&&s%1==0&&s<a}function Fr(s,a,u){if(!Bt(u))return!1;var g=typeof a;return(g=="number"?Vr(u)&&ii(a,u.length):g=="string"&&a in u)?Sn(u[a],s):!1}function H0(s,a){if(Qe(s))return!1;var u=typeof s;return u=="number"||u=="symbol"||u=="boolean"||s==null||tn(s)?!0:nr.test(s)||!Mt.test(s)||a!=null&&s in Ot(a)}function h$(s){var a=typeof s;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?s!=="__proto__":s===null}function z0(s){var a=kl(s),u=C[a];if(typeof u!="function"||!(a in dt.prototype))return!1;if(s===u)return!0;var g=F0(u);return!!g&&s===g[0]}function f$(s){return!!xm&&xm in s}var d$=wl?si:od;function Ta(s){var a=s&&s.constructor,u=typeof a=="function"&&a.prototype||lo;return s===u}function x2(s){return s===s&&!Bt(s)}function C2(s,a){return function(u){return u==null?!1:u[s]===a&&(a!==r||s in Ot(u))}}function p$(s){var a=Kl(s,function(g){return u.size===d&&u.clear(),g}),u=a.cache;return a}function g$(s,a){var u=s[1],g=a[1],y=u|g,D=y<(H|G|f),M=g==f&&u==L||g==f&&u==x&&s[7].length<=a[8]||g==(f|x)&&a[7].length<=a[8]&&u==L;if(!(D||M))return s;g&H&&(s[2]=a[2],y|=u&H?0:N);var k=a[3];if(k){var Z=s[3];s[3]=Z?o2(Z,k,a[4]):k,s[4]=Z?Di(s[3],v):a[4]}return k=a[5],k&&(Z=s[5],s[5]=Z?a2(Z,k,a[6]):k,s[6]=Z?Di(s[5],v):a[6]),k=a[7],k&&(s[7]=k),g&f&&(s[8]=s[8]==null?a[8]:Sr(s[8],a[8])),s[9]==null&&(s[9]=a[9]),s[0]=a[0],s[1]=y,s}function m$(s){var a=[];if(s!=null)for(var u in Ot(s))a.push(u);return a}function w$(s){return yl.call(s)}function I2(s,a,u){return a=fr(a===r?s.length-1:a,0),function(){for(var g=arguments,y=-1,D=fr(g.length-a,0),M=te(D);++y<D;)M[y]=g[a+y];y=-1;for(var k=te(a+1);++y<a;)k[y]=g[y];return k[a]=u(M),wr(s,this,k)}}function S2(s,a){return a.length<2?s:vs(s,wn(a,0,-1))}function v$(s,a){for(var u=s.length,g=Sr(a.length,u),y=qr(s);g--;){var D=a[g];s[g]=ii(D,u)?y[D]:r}return s}function W0(s,a){if(!(a==="constructor"&&typeof s[a]=="function")&&a!="__proto__")return s[a]}var O2=A2(Ym),Ra=RD||function(s,a){return mt.setTimeout(s,a)},q0=A2(kA);function D2(s,a,u){var g=a+"";return q0(s,l$(g,y$(o$(g),u)))}function A2(s){var a=0,u=0;return function(){var g=UD(),y=me-(g-u);if(u=g,y>0){if(++a>=de)return arguments[0]}else a=0;return s.apply(r,arguments)}}function zl(s,a){var u=-1,g=s.length,y=g-1;for(a=a===r?g:a;++u<a;){var D=O0(u,y),M=s[D];s[D]=s[u],s[u]=M}return s.length=a,s}var $2=p$(function(s){var a=[];return s.charCodeAt(0)===46&&a.push(""),s.replace(ir,function(u,g,y,D){a.push(y?D.replace(jf,"$1"):g||u)}),a});function kn(s){if(typeof s=="string"||tn(s))return s;var a=s+"";return a=="0"&&1/s==-le?"-0":a}function bs(s){if(s!=null){try{return vl.call(s)}catch{}try{return s+""}catch{}}return""}function y$(s,a){return dn(Fe,function(u){var g="_."+u[0];a&u[1]&&!dl(s,g)&&s.push(g)}),s.sort()}function P2(s){if(s instanceof dt)return s.clone();var a=new gn(s.__wrapped__,s.__chain__);return a.__actions__=qr(s.__actions__),a.__index__=s.__index__,a.__values__=s.__values__,a}function b$(s,a,u){(u?Fr(s,a,u):a===r)?a=1:a=fr(it(a),0);var g=s==null?0:s.length;if(!g||a<1)return[];for(var y=0,D=0,M=te(Il(g/a));y<g;)M[D++]=wn(s,y,y+=a);return M}function _$(s){for(var a=-1,u=s==null?0:s.length,g=0,y=[];++a<u;){var D=s[a];D&&(y[g++]=D)}return y}function E$(){var s=arguments.length;if(!s)return[];for(var a=te(s-1),u=arguments[0],g=s;g--;)a[g-1]=arguments[g];return Oi(Qe(u)?qr(u):[u],xr(a,1))}var x$=ct(function(s,a){return Xt(s)?Oa(s,xr(a,1,Xt,!0)):[]}),C$=ct(function(s,a){var u=vn(a);return Xt(u)&&(u=r),Xt(s)?Oa(s,xr(a,1,Xt,!0),ze(u,2)):[]}),I$=ct(function(s,a){var u=vn(a);return Xt(u)&&(u=r),Xt(s)?Oa(s,xr(a,1,Xt,!0),r,u):[]});function S$(s,a,u){var g=s==null?0:s.length;return g?(a=u||a===r?1:it(a),wn(s,a<0?0:a,g)):[]}function O$(s,a,u){var g=s==null?0:s.length;return g?(a=u||a===r?1:it(a),a=g-a,wn(s,0,a<0?0:a)):[]}function D$(s,a){return s&&s.length?Ll(s,ze(a,3),!0,!0):[]}function A$(s,a){return s&&s.length?Ll(s,ze(a,3),!0):[]}function $$(s,a,u,g){var y=s==null?0:s.length;return y?(u&&typeof u!="number"&&Fr(s,a,u)&&(u=0,g=y),EA(s,a,u,g)):[]}function T2(s,a,u){var g=s==null?0:s.length;if(!g)return-1;var y=u==null?0:it(u);return y<0&&(y=fr(g+y,0)),pl(s,ze(a,3),y)}function R2(s,a,u){var g=s==null?0:s.length;if(!g)return-1;var y=g-1;return u!==r&&(y=it(u),y=u<0?fr(g+y,0):Sr(y,g-1)),pl(s,ze(a,3),y,!0)}function N2(s){var a=s==null?0:s.length;return a?xr(s,1):[]}function P$(s){var a=s==null?0:s.length;return a?xr(s,le):[]}function T$(s,a){var u=s==null?0:s.length;return u?(a=a===r?1:it(a),xr(s,a)):[]}function R$(s){for(var a=-1,u=s==null?0:s.length,g={};++a<u;){var y=s[a];g[y[0]]=y[1]}return g}function L2(s){return s&&s.length?s[0]:r}function N$(s,a,u){var g=s==null?0:s.length;if(!g)return-1;var y=u==null?0:it(u);return y<0&&(y=fr(g+y,0)),so(s,a,y)}function L$(s){var a=s==null?0:s.length;return a?wn(s,0,-1):[]}var M$=ct(function(s){var a=Ut(s,T0);return a.length&&a[0]===s[0]?E0(a):[]}),U$=ct(function(s){var a=vn(s),u=Ut(s,T0);return a===vn(u)?a=r:u.pop(),u.length&&u[0]===s[0]?E0(u,ze(a,2)):[]}),j$=ct(function(s){var a=vn(s),u=Ut(s,T0);return a=typeof a=="function"?a:r,a&&u.pop(),u.length&&u[0]===s[0]?E0(u,r,a):[]});function F$(s,a){return s==null?"":LD.call(s,a)}function vn(s){var a=s==null?0:s.length;return a?s[a-1]:r}function B$(s,a,u){var g=s==null?0:s.length;if(!g)return-1;var y=g;return u!==r&&(y=it(u),y=y<0?fr(g+y,0):Sr(y,g-1)),a===a?yD(s,a,y):pl(s,gm,y,!0)}function k$(s,a){return s&&s.length?Vm(s,it(a)):r}var H$=ct(M2);function M2(s,a){return s&&s.length&&a&&a.length?S0(s,a):s}function z$(s,a,u){return s&&s.length&&a&&a.length?S0(s,a,ze(u,2)):s}function W$(s,a,u){return s&&s.length&&a&&a.length?S0(s,a,r,u):s}var q$=ni(function(s,a){var u=s==null?0:s.length,g=v0(s,a);return Zm(s,Ut(a,function(y){return ii(y,u)?+y:y}).sort(s2)),g});function V$(s,a){var u=[];if(!(s&&s.length))return u;var g=-1,y=[],D=s.length;for(a=ze(a,3);++g<D;){var M=s[g];a(M,g,s)&&(u.push(M),y.push(g))}return Zm(s,y),u}function V0(s){return s==null?s:FD.call(s)}function K$(s,a,u){var g=s==null?0:s.length;return g?(u&&typeof u!="number"&&Fr(s,a,u)?(a=0,u=g):(a=a==null?0:it(a),u=u===r?g:it(u)),wn(s,a,u)):[]}function G$(s,a){return Nl(s,a)}function Z$(s,a,u){return A0(s,a,ze(u,2))}function Y$(s,a){var u=s==null?0:s.length;if(u){var g=Nl(s,a);if(g<u&&Sn(s[g],a))return g}return-1}function J$(s,a){return Nl(s,a,!0)}function X$(s,a,u){return A0(s,a,ze(u,2),!0)}function Q$(s,a){var u=s==null?0:s.length;if(u){var g=Nl(s,a,!0)-1;if(Sn(s[g],a))return g}return-1}function eP(s){return s&&s.length?Jm(s):[]}function tP(s,a){return s&&s.length?Jm(s,ze(a,2)):[]}function rP(s){var a=s==null?0:s.length;return a?wn(s,1,a):[]}function nP(s,a,u){return s&&s.length?(a=u||a===r?1:it(a),wn(s,0,a<0?0:a)):[]}function iP(s,a,u){var g=s==null?0:s.length;return g?(a=u||a===r?1:it(a),a=g-a,wn(s,a<0?0:a,g)):[]}function sP(s,a){return s&&s.length?Ll(s,ze(a,3),!1,!0):[]}function oP(s,a){return s&&s.length?Ll(s,ze(a,3)):[]}var aP=ct(function(s){return Pi(xr(s,1,Xt,!0))}),cP=ct(function(s){var a=vn(s);return Xt(a)&&(a=r),Pi(xr(s,1,Xt,!0),ze(a,2))}),lP=ct(function(s){var a=vn(s);return a=typeof a=="function"?a:r,Pi(xr(s,1,Xt,!0),r,a)});function uP(s){return s&&s.length?Pi(s):[]}function hP(s,a){return s&&s.length?Pi(s,ze(a,2)):[]}function fP(s,a){return a=typeof a=="function"?a:r,s&&s.length?Pi(s,r,a):[]}function K0(s){if(!(s&&s.length))return[];var a=0;return s=Si(s,function(u){if(Xt(u))return a=fr(u.length,a),!0}),u0(a,function(u){return Ut(s,a0(u))})}function U2(s,a){if(!(s&&s.length))return[];var u=K0(s);return a==null?u:Ut(u,function(g){return wr(a,r,g)})}var dP=ct(function(s,a){return Xt(s)?Oa(s,a):[]}),pP=ct(function(s){return P0(Si(s,Xt))}),gP=ct(function(s){var a=vn(s);return Xt(a)&&(a=r),P0(Si(s,Xt),ze(a,2))}),mP=ct(function(s){var a=vn(s);return a=typeof a=="function"?a:r,P0(Si(s,Xt),r,a)}),wP=ct(K0);function vP(s,a){return t2(s||[],a||[],Sa)}function yP(s,a){return t2(s||[],a||[],$a)}var bP=ct(function(s){var a=s.length,u=a>1?s[a-1]:r;return u=typeof u=="function"?(s.pop(),u):r,U2(s,u)});function j2(s){var a=C(s);return a.__chain__=!0,a}function _P(s,a){return a(s),s}function Wl(s,a){return a(s)}var EP=ni(function(s){var a=s.length,u=a?s[0]:0,g=this.__wrapped__,y=function(D){return v0(D,s)};return a>1||this.__actions__.length||!(g instanceof dt)||!ii(u)?this.thru(y):(g=g.slice(u,+u+(a?1:0)),g.__actions__.push({func:Wl,args:[y],thisArg:r}),new gn(g,this.__chain__).thru(function(D){return a&&!D.length&&D.push(r),D}))});function xP(){return j2(this)}function CP(){return new gn(this.value(),this.__chain__)}function IP(){this.__values__===r&&(this.__values__=X2(this.value()));var s=this.__index__>=this.__values__.length,a=s?r:this.__values__[this.__index__++];return{done:s,value:a}}function SP(){return this}function OP(s){for(var a,u=this;u instanceof Al;){var g=P2(u);g.__index__=0,g.__values__=r,a?y.__wrapped__=g:a=g;var y=g;u=u.__wrapped__}return y.__wrapped__=s,a}function DP(){var s=this.__wrapped__;if(s instanceof dt){var a=s;return this.__actions__.length&&(a=new dt(this)),a=a.reverse(),a.__actions__.push({func:Wl,args:[V0],thisArg:r}),new gn(a,this.__chain__)}return this.thru(V0)}function AP(){return e2(this.__wrapped__,this.__actions__)}var $P=Ml(function(s,a,u){bt.call(s,u)?++s[u]:ti(s,u,1)});function PP(s,a,u){var g=Qe(s)?dm:_A;return u&&Fr(s,a,u)&&(a=r),g(s,ze(a,3))}function TP(s,a){var u=Qe(s)?Si:Um;return u(s,ze(a,3))}var RP=h2(T2),NP=h2(R2);function LP(s,a){return xr(ql(s,a),1)}function MP(s,a){return xr(ql(s,a),le)}function UP(s,a,u){return u=u===r?1:it(u),xr(ql(s,a),u)}function F2(s,a){var u=Qe(s)?dn:$i;return u(s,ze(a,3))}function B2(s,a){var u=Qe(s)?rD:Mm;return u(s,ze(a,3))}var jP=Ml(function(s,a,u){bt.call(s,u)?s[u].push(a):ti(s,u,[a])});function FP(s,a,u,g){s=Vr(s)?s:vo(s),u=u&&!g?it(u):0;var y=s.length;return u<0&&(u=fr(y+u,0)),Yl(s)?u<=y&&s.indexOf(a,u)>-1:!!y&&so(s,a,u)>-1}var BP=ct(function(s,a,u){var g=-1,y=typeof a=="function",D=Vr(s)?te(s.length):[];return $i(s,function(M){D[++g]=y?wr(a,M,u):Da(M,a,u)}),D}),kP=Ml(function(s,a,u){ti(s,u,a)});function ql(s,a){var u=Qe(s)?Ut:zm;return u(s,ze(a,3))}function HP(s,a,u,g){return s==null?[]:(Qe(a)||(a=a==null?[]:[a]),u=g?r:u,Qe(u)||(u=u==null?[]:[u]),Km(s,a,u))}var zP=Ml(function(s,a,u){s[u?0:1].push(a)},function(){return[[],[]]});function WP(s,a,u){var g=Qe(s)?s0:wm,y=arguments.length<3;return g(s,ze(a,4),u,y,$i)}function qP(s,a,u){var g=Qe(s)?nD:wm,y=arguments.length<3;return g(s,ze(a,4),u,y,Mm)}function VP(s,a){var u=Qe(s)?Si:Um;return u(s,Gl(ze(a,3)))}function KP(s){var a=Qe(s)?Tm:FA;return a(s)}function GP(s,a,u){(u?Fr(s,a,u):a===r)?a=1:a=it(a);var g=Qe(s)?mA:BA;return g(s,a)}function ZP(s){var a=Qe(s)?wA:HA;return a(s)}function YP(s){if(s==null)return 0;if(Vr(s))return Yl(s)?ao(s):s.length;var a=Or(s);return a==Me||a==He?s.size:C0(s).length}function JP(s,a,u){var g=Qe(s)?o0:zA;return u&&Fr(s,a,u)&&(a=r),g(s,ze(a,3))}var XP=ct(function(s,a){if(s==null)return[];var u=a.length;return u>1&&Fr(s,a[0],a[1])?a=[]:u>2&&Fr(a[0],a[1],a[2])&&(a=[a[0]]),Km(s,xr(a,1),[])}),Vl=TD||function(){return mt.Date.now()};function QP(s,a){if(typeof a!="function")throw new pn(c);return s=it(s),function(){if(--s<1)return a.apply(this,arguments)}}function k2(s,a,u){return a=u?r:a,a=s&&a==null?s.length:a,ri(s,f,r,r,r,r,a)}function H2(s,a){var u;if(typeof a!="function")throw new pn(c);return s=it(s),function(){return--s>0&&(u=a.apply(this,arguments)),s<=1&&(a=r),u}}var G0=ct(function(s,a,u){var g=H;if(u.length){var y=Di(u,mo(G0));g|=T}return ri(s,g,a,u,y)}),z2=ct(function(s,a,u){var g=H|G;if(u.length){var y=Di(u,mo(z2));g|=T}return ri(a,g,s,u,y)});function W2(s,a,u){a=u?r:a;var g=ri(s,L,r,r,r,r,r,a);return g.placeholder=W2.placeholder,g}function q2(s,a,u){a=u?r:a;var g=ri(s,$,r,r,r,r,r,a);return g.placeholder=q2.placeholder,g}function V2(s,a,u){var g,y,D,M,k,Z,ue=0,he=!1,pe=!1,be=!0;if(typeof s!="function")throw new pn(c);a=yn(a)||0,Bt(u)&&(he=!!u.leading,pe="maxWait"in u,D=pe?fr(yn(u.maxWait)||0,a):D,be="trailing"in u?!!u.trailing:be);function Pe(Qt){var On=g,ai=y;return g=y=r,ue=Qt,M=s.apply(ai,On),M}function We(Qt){return ue=Qt,k=Ra(ft,a),he?Pe(Qt):M}function ot(Qt){var On=Qt-Z,ai=Qt-ue,hw=a-On;return pe?Sr(hw,D-ai):hw}function qe(Qt){var On=Qt-Z,ai=Qt-ue;return Z===r||On>=a||On<0||pe&&ai>=D}function ft(){var Qt=Vl();if(qe(Qt))return wt(Qt);k=Ra(ft,ot(Qt))}function wt(Qt){return k=r,be&&g?Pe(Qt):(g=y=r,M)}function rn(){k!==r&&r2(k),ue=0,g=Z=y=k=r}function Br(){return k===r?M:wt(Vl())}function nn(){var Qt=Vl(),On=qe(Qt);if(g=arguments,y=this,Z=Qt,On){if(k===r)return We(Z);if(pe)return r2(k),k=Ra(ft,a),Pe(Z)}return k===r&&(k=Ra(ft,a)),M}return nn.cancel=rn,nn.flush=Br,nn}var eT=ct(function(s,a){return Lm(s,1,a)}),tT=ct(function(s,a,u){return Lm(s,yn(a)||0,u)});function rT(s){return ri(s,J)}function Kl(s,a){if(typeof s!="function"||a!=null&&typeof a!="function")throw new pn(c);var u=function(){var g=arguments,y=a?a.apply(this,g):g[0],D=u.cache;if(D.has(y))return D.get(y);var M=s.apply(this,g);return u.cache=D.set(y,M)||D,M};return u.cache=new(Kl.Cache||ei),u}Kl.Cache=ei;function Gl(s){if(typeof s!="function")throw new pn(c);return function(){var a=arguments;switch(a.length){case 0:return!s.call(this);case 1:return!s.call(this,a[0]);case 2:return!s.call(this,a[0],a[1]);case 3:return!s.call(this,a[0],a[1],a[2])}return!s.apply(this,a)}}function nT(s){return H2(2,s)}var iT=WA(function(s,a){a=a.length==1&&Qe(a[0])?Ut(a[0],Qr(ze())):Ut(xr(a,1),Qr(ze()));var u=a.length;return ct(function(g){for(var y=-1,D=Sr(g.length,u);++y<D;)g[y]=a[y].call(this,g[y]);return wr(s,this,g)})}),Z0=ct(function(s,a){var u=Di(a,mo(Z0));return ri(s,T,r,a,u)}),K2=ct(function(s,a){var u=Di(a,mo(K2));return ri(s,I,r,a,u)}),sT=ni(function(s,a){return ri(s,x,r,r,r,a)});function oT(s,a){if(typeof s!="function")throw new pn(c);return a=a===r?a:it(a),ct(s,a)}function aT(s,a){if(typeof s!="function")throw new pn(c);return a=a==null?0:fr(it(a),0),ct(function(u){var g=u[a],y=Ri(u,0,a);return g&&Oi(y,g),wr(s,this,y)})}function cT(s,a,u){var g=!0,y=!0;if(typeof s!="function")throw new pn(c);return Bt(u)&&(g="leading"in u?!!u.leading:g,y="trailing"in u?!!u.trailing:y),V2(s,a,{leading:g,maxWait:a,trailing:y})}function lT(s){return k2(s,1)}function uT(s,a){return Z0(R0(a),s)}function hT(){if(!arguments.length)return[];var s=arguments[0];return Qe(s)?s:[s]}function fT(s){return mn(s,O)}function dT(s,a){return a=typeof a=="function"?a:r,mn(s,O,a)}function pT(s){return mn(s,E|O)}function gT(s,a){return a=typeof a=="function"?a:r,mn(s,E|O,a)}function mT(s,a){return a==null||Nm(s,a,vr(a))}function Sn(s,a){return s===a||s!==s&&a!==a}var wT=Bl(_0),vT=Bl(function(s,a){return s>=a}),_s=Bm(function(){return arguments}())?Bm:function(s){return Gt(s)&&bt.call(s,"callee")&&!Sm.call(s,"callee")},Qe=te.isArray,yT=Ur?Qr(Ur):OA;function Vr(s){return s!=null&&Zl(s.length)&&!si(s)}function Xt(s){return Gt(s)&&Vr(s)}function bT(s){return s===!0||s===!1||Gt(s)&&jr(s)==Y}var Ni=ND||od,_T=xn?Qr(xn):DA;function ET(s){return Gt(s)&&s.nodeType===1&&!Na(s)}function xT(s){if(s==null)return!0;if(Vr(s)&&(Qe(s)||typeof s=="string"||typeof s.splice=="function"||Ni(s)||wo(s)||_s(s)))return!s.length;var a=Or(s);if(a==Me||a==He)return!s.size;if(Ta(s))return!C0(s).length;for(var u in s)if(bt.call(s,u))return!1;return!0}function CT(s,a){return Aa(s,a)}function IT(s,a,u){u=typeof u=="function"?u:r;var g=u?u(s,a):r;return g===r?Aa(s,a,r,u):!!g}function Y0(s){if(!Gt(s))return!1;var a=jr(s);return a==F||a==w||typeof s.message=="string"&&typeof s.name=="string"&&!Na(s)}function ST(s){return typeof s=="number"&&Dm(s)}function si(s){if(!Bt(s))return!1;var a=jr(s);return a==we||a==ve||a==X||a==$t}function G2(s){return typeof s=="number"&&s==it(s)}function Zl(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=re}function Bt(s){var a=typeof s;return s!=null&&(a=="object"||a=="function")}function Gt(s){return s!=null&&typeof s=="object"}var Z2=fn?Qr(fn):$A;function OT(s,a){return s===a||x0(s,a,B0(a))}function DT(s,a,u){return u=typeof u=="function"?u:r,x0(s,a,B0(a),u)}function AT(s){return Y2(s)&&s!=+s}function $T(s){if(d$(s))throw new Ye(o);return km(s)}function PT(s){return s===null}function TT(s){return s==null}function Y2(s){return typeof s=="number"||Gt(s)&&jr(s)==nt}function Na(s){if(!Gt(s)||jr(s)!=Ge)return!1;var a=El(s);if(a===null)return!0;var u=bt.call(a,"constructor")&&a.constructor;return typeof u=="function"&&u instanceof u&&vl.call(u)==DD}var J0=jn?Qr(jn):PA;function RT(s){return G2(s)&&s>=-re&&s<=re}var J2=ya?Qr(ya):TA;function Yl(s){return typeof s=="string"||!Qe(s)&&Gt(s)&&jr(s)==Be}function tn(s){return typeof s=="symbol"||Gt(s)&&jr(s)==Ke}var wo=ds?Qr(ds):RA;function NT(s){return s===r}function LT(s){return Gt(s)&&Or(s)==Ue}function MT(s){return Gt(s)&&jr(s)==Ze}var UT=Bl(I0),jT=Bl(function(s,a){return s<=a});function X2(s){if(!s)return[];if(Vr(s))return Yl(s)?Cn(s):qr(s);if(_a&&s[_a])return mD(s[_a]());var a=Or(s),u=a==Me?f0:a==He?gl:vo;return u(s)}function oi(s){if(!s)return s===0?s:0;if(s=yn(s),s===le||s===-le){var a=s<0?-1:1;return a*ne}return s===s?s:0}function it(s){var a=oi(s),u=a%1;return a===a?u?a-u:a:0}function Q2(s){return s?ws(it(s),0,ie):0}function yn(s){if(typeof s=="number")return s;if(tn(s))return ae;if(Bt(s)){var a=typeof s.valueOf=="function"?s.valueOf():s;s=Bt(a)?a+"":a}if(typeof s!="string")return s===0?s:+s;s=vm(s);var u=kf.test(s);return u||zf.test(s)?Xe(s.slice(2),u?2:8):Bf.test(s)?ae:+s}function ew(s){return Bn(s,Kr(s))}function FT(s){return s?ws(it(s),-re,re):s===0?s:0}function yt(s){return s==null?"":en(s)}var BT=po(function(s,a){if(Ta(a)||Vr(a)){Bn(a,vr(a),s);return}for(var u in a)bt.call(a,u)&&Sa(s,u,a[u])}),tw=po(function(s,a){Bn(a,Kr(a),s)}),Jl=po(function(s,a,u,g){Bn(a,Kr(a),s,g)}),kT=po(function(s,a,u,g){Bn(a,vr(a),s,g)}),HT=ni(v0);function zT(s,a){var u=fo(s);return a==null?u:Rm(u,a)}var WT=ct(function(s,a){s=Ot(s);var u=-1,g=a.length,y=g>2?a[2]:r;for(y&&Fr(a[0],a[1],y)&&(g=1);++u<g;)for(var D=a[u],M=Kr(D),k=-1,Z=M.length;++k<Z;){var ue=M[k],he=s[ue];(he===r||Sn(he,lo[ue])&&!bt.call(s,ue))&&(s[ue]=D[ue])}return s}),qT=ct(function(s){return s.push(r,v2),wr(rw,r,s)});function VT(s,a){return pm(s,ze(a,3),Fn)}function KT(s,a){return pm(s,ze(a,3),b0)}function GT(s,a){return s==null?s:y0(s,ze(a,3),Kr)}function ZT(s,a){return s==null?s:jm(s,ze(a,3),Kr)}function YT(s,a){return s&&Fn(s,ze(a,3))}function JT(s,a){return s&&b0(s,ze(a,3))}function XT(s){return s==null?[]:Tl(s,vr(s))}function QT(s){return s==null?[]:Tl(s,Kr(s))}function X0(s,a,u){var g=s==null?r:vs(s,a);return g===r?u:g}function eR(s,a){return s!=null&&_2(s,a,xA)}function Q0(s,a){return s!=null&&_2(s,a,CA)}var tR=d2(function(s,a,u){a!=null&&typeof a.toString!="function"&&(a=yl.call(a)),s[a]=u},td(Gr)),rR=d2(function(s,a,u){a!=null&&typeof a.toString!="function"&&(a=yl.call(a)),bt.call(s,a)?s[a].push(u):s[a]=[u]},ze),nR=ct(Da);function vr(s){return Vr(s)?Pm(s):C0(s)}function Kr(s){return Vr(s)?Pm(s,!0):NA(s)}function iR(s,a){var u={};return a=ze(a,3),Fn(s,function(g,y,D){ti(u,a(g,y,D),g)}),u}function sR(s,a){var u={};return a=ze(a,3),Fn(s,function(g,y,D){ti(u,y,a(g,y,D))}),u}var oR=po(function(s,a,u){Rl(s,a,u)}),rw=po(function(s,a,u,g){Rl(s,a,u,g)}),aR=ni(function(s,a){var u={};if(s==null)return u;var g=!1;a=Ut(a,function(D){return D=Ti(D,s),g||(g=D.length>1),D}),Bn(s,j0(s),u),g&&(u=mn(u,E|_|O,t$));for(var y=a.length;y--;)$0(u,a[y]);return u});function cR(s,a){return nw(s,Gl(ze(a)))}var lR=ni(function(s,a){return s==null?{}:MA(s,a)});function nw(s,a){if(s==null)return{};var u=Ut(j0(s),function(g){return[g]});return a=ze(a),Gm(s,u,function(g,y){return a(g,y[0])})}function uR(s,a,u){a=Ti(a,s);var g=-1,y=a.length;for(y||(y=1,s=r);++g<y;){var D=s==null?r:s[kn(a[g])];D===r&&(g=y,D=u),s=si(D)?D.call(s):D}return s}function hR(s,a,u){return s==null?s:$a(s,a,u)}function fR(s,a,u,g){return g=typeof g=="function"?g:r,s==null?s:$a(s,a,u,g)}var iw=m2(vr),sw=m2(Kr);function dR(s,a,u){var g=Qe(s),y=g||Ni(s)||wo(s);if(a=ze(a,4),u==null){var D=s&&s.constructor;y?u=g?new D:[]:Bt(s)?u=si(D)?fo(El(s)):{}:u={}}return(y?dn:Fn)(s,function(M,k,Z){return a(u,M,k,Z)}),u}function pR(s,a){return s==null?!0:$0(s,a)}function gR(s,a,u){return s==null?s:Qm(s,a,R0(u))}function mR(s,a,u,g){return g=typeof g=="function"?g:r,s==null?s:Qm(s,a,R0(u),g)}function vo(s){return s==null?[]:h0(s,vr(s))}function wR(s){return s==null?[]:h0(s,Kr(s))}function vR(s,a,u){return u===r&&(u=a,a=r),u!==r&&(u=yn(u),u=u===u?u:0),a!==r&&(a=yn(a),a=a===a?a:0),ws(yn(s),a,u)}function yR(s,a,u){return a=oi(a),u===r?(u=a,a=0):u=oi(u),s=yn(s),IA(s,a,u)}function bR(s,a,u){if(u&&typeof u!="boolean"&&Fr(s,a,u)&&(a=u=r),u===r&&(typeof a=="boolean"?(u=a,a=r):typeof s=="boolean"&&(u=s,s=r)),s===r&&a===r?(s=0,a=1):(s=oi(s),a===r?(a=s,s=0):a=oi(a)),s>a){var g=s;s=a,a=g}if(u||s%1||a%1){var y=Am();return Sr(s+y*(a-s+It("1e-"+((y+"").length-1))),a)}return O0(s,a)}var _R=go(function(s,a,u){return a=a.toLowerCase(),s+(u?ow(a):a)});function ow(s){return ed(yt(s).toLowerCase())}function aw(s){return s=yt(s),s&&s.replace(Jn,hD).replace(r0,"")}function ER(s,a,u){s=yt(s),a=en(a);var g=s.length;u=u===r?g:ws(it(u),0,g);var y=u;return u-=a.length,u>=0&&s.slice(u,y)==a}function xR(s){return s=yt(s),s&&Lt.test(s)?s.replace(cs,fD):s}function CR(s){return s=yt(s),s&&sr.test(s)?s.replace(qt,"\\$&"):s}var IR=go(function(s,a,u){return s+(u?"-":"")+a.toLowerCase()}),SR=go(function(s,a,u){return s+(u?" ":"")+a.toLowerCase()}),OR=u2("toLowerCase");function DR(s,a,u){s=yt(s),a=it(a);var g=a?ao(s):0;if(!a||g>=a)return s;var y=(a-g)/2;return Fl(Sl(y),u)+s+Fl(Il(y),u)}function AR(s,a,u){s=yt(s),a=it(a);var g=a?ao(s):0;return a&&g<a?s+Fl(a-g,u):s}function $R(s,a,u){s=yt(s),a=it(a);var g=a?ao(s):0;return a&&g<a?Fl(a-g,u)+s:s}function PR(s,a,u){return u||a==null?a=0:a&&(a=+a),jD(yt(s).replace(Vt,""),a||0)}function TR(s,a,u){return(u?Fr(s,a,u):a===r)?a=1:a=it(a),D0(yt(s),a)}function RR(){var s=arguments,a=yt(s[0]);return s.length<3?a:a.replace(s[1],s[2])}var NR=go(function(s,a,u){return s+(u?"_":"")+a.toLowerCase()});function LR(s,a,u){return u&&typeof u!="number"&&Fr(s,a,u)&&(a=u=r),u=u===r?ie:u>>>0,u?(s=yt(s),s&&(typeof a=="string"||a!=null&&!J0(a))&&(a=en(a),!a&&oo(s))?Ri(Cn(s),0,u):s.split(a,u)):[]}var MR=go(function(s,a,u){return s+(u?" ":"")+ed(a)});function UR(s,a,u){return s=yt(s),u=u==null?0:ws(it(u),0,s.length),a=en(a),s.slice(u,u+a.length)==a}function jR(s,a,u){var g=C.templateSettings;u&&Fr(s,a,u)&&(a=r),s=yt(s),a=Jl({},a,g,w2);var y=Jl({},a.imports,g.imports,w2),D=vr(y),M=h0(y,D),k,Z,ue=0,he=a.interpolate||Xs,pe="__p += '",be=d0((a.escape||Xs).source+"|"+he.source+"|"+(he===Ft?Ff:Xs).source+"|"+(a.evaluate||Xs).source+"|$","g"),Pe="//# sourceURL="+(bt.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++n0+"]")+`
|
|
82
|
+
`;s.replace(be,function(qe,ft,wt,rn,Br,nn){return wt||(wt=rn),pe+=s.slice(ue,nn).replace(qf,dD),ft&&(k=!0,pe+=`' +
|
|
83
|
+
__e(`+ft+`) +
|
|
84
|
+
'`),Br&&(Z=!0,pe+=`';
|
|
85
|
+
`+Br+`;
|
|
86
|
+
__p += '`),wt&&(pe+=`' +
|
|
87
|
+
((__t = (`+wt+`)) == null ? '' : __t) +
|
|
88
|
+
'`),ue=nn+qe.length,qe}),pe+=`';
|
|
89
|
+
`;var We=bt.call(a,"variable")&&a.variable;if(!We)pe=`with (obj) {
|
|
90
90
|
`+pe+`
|
|
91
91
|
}
|
|
92
|
-
`;else if(
|
|
93
|
-
`+(
|
|
94
|
-
`)+"var __t, __p = ''"+(
|
|
92
|
+
`;else if(Uf.test(We))throw new Ye(l);pe=(Z?pe.replace(lt,""):pe).replace(Mr,"$1").replace(Yn,"$1;"),pe="function("+(We||"obj")+`) {
|
|
93
|
+
`+(We?"":`obj || (obj = {});
|
|
94
|
+
`)+"var __t, __p = ''"+(k?", __e = _.escape":"")+(Z?`, __j = Array.prototype.join;
|
|
95
95
|
function print() { __p += __j.call(arguments, '') }
|
|
96
96
|
`:`;
|
|
97
97
|
`)+pe+`return __p
|
|
98
|
-
}`;var st=Vm(function(){return vt(O,De+"return "+pe).apply(r,j)});if(st.source=pe,U0(st))throw st;return st}function rR(s){return yt(s).toLowerCase()}function nR(s){return yt(s).toUpperCase()}function iR(s,a,u){if(s=yt(s),s&&(u||a===r))return t2(s);if(!s||!(a=Xr(a)))return s;var g=_n(s),y=_n(a),O=r2(g,y),j=n2(g,y)+1;return xi(g,O,j).join("")}function sR(s,a,u){if(s=yt(s),s&&(u||a===r))return s.slice(0,s2(s)+1);if(!s||!(a=Xr(a)))return s;var g=_n(s),y=n2(g,_n(a))+1;return xi(g,0,y).join("")}function oR(s,a,u){if(s=yt(s),s&&(u||a===r))return s.replace(qt,"");if(!s||!(a=Xr(a)))return s;var g=_n(s),y=r2(g,_n(a));return xi(g,y).join("")}function aR(s,a){var u=z,g=ee;if(Ft(a)){var y="separator"in a?a.separator:y;u="length"in a?rt(a.length):u,g="omission"in a?Xr(a.omission):g}s=yt(s);var O=s.length;if(Js(s)){var j=_n(s);O=j.length}if(u>=O)return s;var H=u-Xs(g);if(H<1)return g;var Z=j?xi(j,0,H).join(""):s.slice(0,H);if(y===r)return Z+g;if(j&&(H+=Z.length-H),F0(y)){if(s.slice(H).search(y)){var ue,he=Z;for(y.global||(y=t0(y.source,yt(cn.exec(y))+"g")),y.lastIndex=0;ue=y.exec(he);)var pe=ue.index;Z=Z.slice(0,pe===r?H:pe)}}else if(s.indexOf(Xr(y),H)!=H){var _e=Z.lastIndexOf(y);_e>-1&&(Z=Z.slice(0,_e))}return Z+g}function cR(s){return s=yt(s),s&&kt.test(s)?s.replace(pi,jD):s}var lR=so(function(s,a,u){return s+(u?" ":"")+a.toUpperCase()}),H0=K2("toUpperCase");function qm(s,a,u){return s=yt(s),a=u?r:a,a===r?TD(s)?BD(s):xD(s):s.match(a)||[]}var Vm=at(function(s,a){try{return mr(s,r,a)}catch(u){return U0(u)?u:new Ke(u)}}),uR=Jn(function(s,a){return un(a,function(u){u=jn(u),Zn(s,u,L0(s[u],s))}),s});function hR(s){var a=s==null?0:s.length,u=Ue();return s=a?jt(s,function(g){if(typeof g[1]!="function")throw new hn(c);return[u(g[0]),g[1]]}):[],at(function(g){for(var y=-1;++y<a;){var O=s[y];if(mr(O[0],this,g))return mr(O[1],this,g)}})}function fR(s){return jO(dn(s,E))}function z0(s){return function(){return s}}function dR(s,a){return s==null||s!==s?a:s}var pR=Z2(),gR=Z2(!0);function Vr(s){return s}function W0(s){return I2(typeof s=="function"?s:dn(s,E))}function mR(s){return D2(dn(s,E))}function wR(s,a){return O2(s,dn(a,E))}var vR=at(function(s,a){return function(u){return ba(u,s,a)}}),yR=at(function(s,a){return function(u){return ba(s,u,a)}});function q0(s,a,u){var g=wr(a),y=_l(a,g);u==null&&!(Ft(a)&&(y.length||!g.length))&&(u=a,a=s,s=this,y=_l(a,wr(a)));var O=!(Ft(u)&&"chain"in u)||!!u.chain,j=Qn(s);return un(y,function(H){var Z=a[H];s[H]=Z,j&&(s.prototype[H]=function(){var ue=this.__chain__;if(O||ue){var he=s(this.__wrapped__),pe=he.__actions__=zr(this.__actions__);return pe.push({func:Z,args:arguments,thisArg:s}),he.__chain__=ue,he}return Z.apply(s,wi([this.value()],arguments))})}),s}function bR(){return gt._===this&&(gt._=VD),this}function V0(){}function _R(s){return s=rt(s),at(function(a){return A2(a,s)})}var ER=x0(jt),xR=x0(Y3),CR=x0(Gf);function Km(s){return $0(s)?Zf(jn(s)):eA(s)}function IR(s){return function(a){return s==null?r:us(s,a)}}var SR=J2(),DR=J2(!0);function K0(){return[]}function G0(){return!1}function OR(){return{}}function AR(){return""}function $R(){return!0}function PR(s,a){if(s=rt(s),s<1||s>re)return[];var u=ie,g=Cr(s,ie);a=Ue(a),s-=ie;for(var y=Xf(g,a);++u<s;)a(u);return y}function TR(s){return Xe(s)?jt(s,jn):Qr(s)?[s]:zr(dm(yt(s)))}function RR(s){var a=++WD;return yt(s)+a}var NR=Dl(function(s,a){return s+a},0),MR=C0("ceil"),LR=Dl(function(s,a){return s/a},1),jR=C0("floor");function UR(s){return s&&s.length?bl(s,Vr,l0):r}function FR(s,a){return s&&s.length?bl(s,Ue(a,2),l0):r}function BR(s){return Q3(s,Vr)}function kR(s,a){return Q3(s,Ue(a,2))}function HR(s){return s&&s.length?bl(s,Vr,d0):r}function zR(s,a){return s&&s.length?bl(s,Ue(a,2),d0):r}var WR=Dl(function(s,a){return s*a},1),qR=C0("round"),VR=Dl(function(s,a){return s-a},0);function KR(s){return s&&s.length?Jf(s,Vr):0}function GR(s,a){return s&&s.length?Jf(s,Ue(a,2)):0}return I.after=mP,I.ary=Cm,I.assign=nT,I.assignIn=Um,I.assignInWith=Bl,I.assignWith=iT,I.at=sT,I.before=Im,I.bind=L0,I.bindAll=uR,I.bindKey=Sm,I.castArray=OP,I.chain=_m,I.chunk=jA,I.compact=UA,I.concat=FA,I.cond=hR,I.conforms=fR,I.constant=z0,I.countBy=K$,I.create=oT,I.curry=Dm,I.curryRight=Om,I.debounce=Am,I.defaults=aT,I.defaultsDeep=cT,I.defer=wP,I.delay=vP,I.difference=BA,I.differenceBy=kA,I.differenceWith=HA,I.drop=zA,I.dropRight=WA,I.dropRightWhile=qA,I.dropWhile=VA,I.fill=KA,I.filter=Z$,I.flatMap=X$,I.flatMapDeep=Q$,I.flatMapDepth=eP,I.flatten=wm,I.flattenDeep=GA,I.flattenDepth=ZA,I.flip=yP,I.flow=pR,I.flowRight=gR,I.fromPairs=YA,I.functions=gT,I.functionsIn=mT,I.groupBy=tP,I.initial=XA,I.intersection=QA,I.intersectionBy=e$,I.intersectionWith=t$,I.invert=vT,I.invertBy=yT,I.invokeMap=nP,I.iteratee=W0,I.keyBy=iP,I.keys=wr,I.keysIn=qr,I.map=Nl,I.mapKeys=_T,I.mapValues=ET,I.matches=mR,I.matchesProperty=wR,I.memoize=Ll,I.merge=xT,I.mergeWith=Fm,I.method=vR,I.methodOf=yR,I.mixin=q0,I.negate=jl,I.nthArg=_R,I.omit=CT,I.omitBy=IT,I.once=bP,I.orderBy=sP,I.over=ER,I.overArgs=_P,I.overEvery=xR,I.overSome=CR,I.partial=j0,I.partialRight=$m,I.partition=oP,I.pick=ST,I.pickBy=Bm,I.property=Km,I.propertyOf=IR,I.pull=s$,I.pullAll=ym,I.pullAllBy=o$,I.pullAllWith=a$,I.pullAt=c$,I.range=SR,I.rangeRight=DR,I.rearg=EP,I.reject=lP,I.remove=l$,I.rest=xP,I.reverse=N0,I.sampleSize=hP,I.set=OT,I.setWith=AT,I.shuffle=fP,I.slice=u$,I.sortBy=gP,I.sortedUniq=w$,I.sortedUniqBy=v$,I.split=XT,I.spread=CP,I.tail=y$,I.take=b$,I.takeRight=_$,I.takeRightWhile=E$,I.takeWhile=x$,I.tap=U$,I.throttle=IP,I.thru=Rl,I.toArray=Mm,I.toPairs=km,I.toPairsIn=Hm,I.toPath=TR,I.toPlainObject=jm,I.transform=$T,I.unary=SP,I.union=C$,I.unionBy=I$,I.unionWith=S$,I.uniq=D$,I.uniqBy=O$,I.uniqWith=A$,I.unset=PT,I.unzip=M0,I.unzipWith=bm,I.update=TT,I.updateWith=RT,I.values=co,I.valuesIn=NT,I.without=$$,I.words=qm,I.wrap=DP,I.xor=P$,I.xorBy=T$,I.xorWith=R$,I.zip=N$,I.zipObject=M$,I.zipObjectDeep=L$,I.zipWith=j$,I.entries=km,I.entriesIn=Hm,I.extend=Um,I.extendWith=Bl,q0(I,I),I.add=NR,I.attempt=Vm,I.camelCase=UT,I.capitalize=zm,I.ceil=MR,I.clamp=MT,I.clone=AP,I.cloneDeep=PP,I.cloneDeepWith=TP,I.cloneWith=$P,I.conformsTo=RP,I.deburr=Wm,I.defaultTo=dR,I.divide=LR,I.endsWith=FT,I.eq=xn,I.escape=BT,I.escapeRegExp=kT,I.every=G$,I.find=Y$,I.findIndex=gm,I.findKey=lT,I.findLast=J$,I.findLastIndex=mm,I.findLastKey=uT,I.floor=jR,I.forEach=Em,I.forEachRight=xm,I.forIn=hT,I.forInRight=fT,I.forOwn=dT,I.forOwnRight=pT,I.get=B0,I.gt=NP,I.gte=MP,I.has=wT,I.hasIn=k0,I.head=vm,I.identity=Vr,I.includes=rP,I.indexOf=JA,I.inRange=LT,I.invoke=bT,I.isArguments=ds,I.isArray=Xe,I.isArrayBuffer=LP,I.isArrayLike=Wr,I.isArrayLikeObject=Jt,I.isBoolean=jP,I.isBuffer=Ci,I.isDate=UP,I.isElement=FP,I.isEmpty=BP,I.isEqual=kP,I.isEqualWith=HP,I.isError=U0,I.isFinite=zP,I.isFunction=Qn,I.isInteger=Pm,I.isLength=Ul,I.isMap=Tm,I.isMatch=WP,I.isMatchWith=qP,I.isNaN=VP,I.isNative=KP,I.isNil=ZP,I.isNull=GP,I.isNumber=Rm,I.isObject=Ft,I.isObjectLike=Kt,I.isPlainObject=Sa,I.isRegExp=F0,I.isSafeInteger=YP,I.isSet=Nm,I.isString=Fl,I.isSymbol=Qr,I.isTypedArray=ao,I.isUndefined=JP,I.isWeakMap=XP,I.isWeakSet=QP,I.join=r$,I.kebabCase=HT,I.last=gn,I.lastIndexOf=n$,I.lowerCase=zT,I.lowerFirst=WT,I.lt=eT,I.lte=tT,I.max=UR,I.maxBy=FR,I.mean=BR,I.meanBy=kR,I.min=HR,I.minBy=zR,I.stubArray=K0,I.stubFalse=G0,I.stubObject=OR,I.stubString=AR,I.stubTrue=$R,I.multiply=WR,I.nth=i$,I.noConflict=bR,I.noop=V0,I.now=Ml,I.pad=qT,I.padEnd=VT,I.padStart=KT,I.parseInt=GT,I.random=jT,I.reduce=aP,I.reduceRight=cP,I.repeat=ZT,I.replace=YT,I.result=DT,I.round=qR,I.runInContext=K,I.sample=uP,I.size=dP,I.snakeCase=JT,I.some=pP,I.sortedIndex=h$,I.sortedIndexBy=f$,I.sortedIndexOf=d$,I.sortedLastIndex=p$,I.sortedLastIndexBy=g$,I.sortedLastIndexOf=m$,I.startCase=QT,I.startsWith=eR,I.subtract=VR,I.sum=KR,I.sumBy=GR,I.template=tR,I.times=PR,I.toFinite=ei,I.toInteger=rt,I.toLength=Lm,I.toLower=rR,I.toNumber=mn,I.toSafeInteger=rT,I.toString=yt,I.toUpper=nR,I.trim=iR,I.trimEnd=sR,I.trimStart=oR,I.truncate=aR,I.unescape=cR,I.uniqueId=RR,I.upperCase=lR,I.upperFirst=H0,I.each=Em,I.eachRight=xm,I.first=vm,q0(I,function(){var s={};return Mn(I,function(a,u){bt.call(I.prototype,u)||(s[u]=a)}),s}(),{chain:!1}),I.VERSION=n,un(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){I[s].placeholder=I}),un(["drop","take"],function(s,a){dt.prototype[s]=function(u){u=u===r?1:fr(rt(u),0);var g=this.__filtered__&&!a?new dt(this):this.clone();return g.__filtered__?g.__takeCount__=Cr(u,g.__takeCount__):g.__views__.push({size:Cr(u,ie),type:s+(g.__dir__<0?"Right":"")}),g},dt.prototype[s+"Right"]=function(u){return this.reverse()[s](u).reverse()}}),un(["filter","map","takeWhile"],function(s,a){var u=a+1,g=u==D||u==ae;dt.prototype[s]=function(y){var O=this.clone();return O.__iteratees__.push({iteratee:Ue(y,3),type:u}),O.__filtered__=O.__filtered__||g,O}}),un(["head","last"],function(s,a){var u="take"+(a?"Right":"");dt.prototype[s]=function(){return this[u](1).value()[0]}}),un(["initial","tail"],function(s,a){var u="drop"+(a?"":"Right");dt.prototype[s]=function(){return this.__filtered__?new dt(this):this[u](1)}}),dt.prototype.compact=function(){return this.filter(Vr)},dt.prototype.find=function(s){return this.filter(s).head()},dt.prototype.findLast=function(s){return this.reverse().find(s)},dt.prototype.invokeMap=at(function(s,a){return typeof s=="function"?new dt(this):this.map(function(u){return ba(u,s,a)})}),dt.prototype.reject=function(s){return this.filter(jl(Ue(s)))},dt.prototype.slice=function(s,a){s=rt(s);var u=this;return u.__filtered__&&(s>0||a<0)?new dt(u):(s<0?u=u.takeRight(-s):s&&(u=u.drop(s)),a!==r&&(a=rt(a),u=a<0?u.dropRight(-a):u.take(a-s)),u)},dt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},dt.prototype.toArray=function(){return this.take(ie)},Mn(dt.prototype,function(s,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),g=/^(?:head|last)$/.test(a),y=I[g?"take"+(a=="last"?"Right":""):a],O=g||/^find/.test(a);y&&(I.prototype[a]=function(){var j=this.__wrapped__,H=g?[1]:arguments,Z=j instanceof dt,ue=H[0],he=Z||Xe(j),pe=function(ht){var mt=y.apply(I,wi([ht],H));return g&&_e?mt[0]:mt};he&&u&&typeof ue=="function"&&ue.length!=1&&(Z=he=!1);var _e=this.__chain__,De=!!this.__actions__.length,Fe=O&&!_e,st=Z&&!De;if(!O&&he){j=st?j:new dt(this);var Be=s.apply(j,H);return Be.__actions__.push({func:Rl,args:[pe],thisArg:r}),new fn(Be,_e)}return Fe&&st?s.apply(this,H):(Be=this.thru(pe),Fe?g?Be.value()[0]:Be.value():Be)})}),un(["pop","push","shift","sort","splice","unshift"],function(s){var a=sl[s],u=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",g=/^(?:pop|shift)$/.test(s);I.prototype[s]=function(){var y=arguments;if(g&&!this.__chain__){var O=this.value();return a.apply(Xe(O)?O:[],y)}return this[u](function(j){return a.apply(Xe(j)?j:[],y)})}}),Mn(dt.prototype,function(s,a){var u=I[a];if(u){var g=u.name+"";bt.call(ro,g)||(ro[g]=[]),ro[g].push({name:a,func:u})}}),ro[Sl(r,q).name]=[{name:"wrapper",func:r}],dt.prototype.clone=cO,dt.prototype.reverse=lO,dt.prototype.value=uO,I.prototype.at=F$,I.prototype.chain=B$,I.prototype.commit=k$,I.prototype.next=H$,I.prototype.plant=W$,I.prototype.reverse=q$,I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=V$,I.prototype.first=I.prototype.head,da&&(I.prototype[da]=z$),I},Qs=kD();Yt?((Yt.exports=Qs)._=Qs,St._=Qs):gt._=Qs}).call(Mo)})(ih,ih.exports);var XE=Object.defineProperty,QE=Object.defineProperties,e7=Object.getOwnPropertyDescriptors,cg=Object.getOwnPropertySymbols,t7=Object.prototype.hasOwnProperty,r7=Object.prototype.propertyIsEnumerable,lg=(t,e,r)=>e in t?XE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ja=(t,e)=>{for(var r in e||(e={}))t7.call(e,r)&&lg(t,r,e[r]);if(cg)for(var r of cg(e))r7.call(e,r)&&lg(t,r,e[r]);return t},n7=(t,e)=>QE(t,e7(e));function sn(t,e,r){let n;const i=sh(t);return e.rpcMap&&(n=e.rpcMap[i]),n||(n=`${JE}?chainId=eip155:${i}&projectId=${r}`),n}function sh(t){return t.includes("eip155")?Number(t.split(":")[1]):Number(t)}function i7(t,e){if(!e.includes(t))throw new Error(`Chain '${t}' not approved. Please use one of the following: ${e.toString()}`)}function s7(t){return t.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function o7(t,e){const r=Object.keys(e.namespaces).filter(i=>i.includes(t));if(!r.length)return[];const n=[];return r.forEach(i=>{const o=e.namespaces[i].accounts;n.push(...o)}),n}function a7(t,e={}){const r=ug(t),n=ug(e);return ih.exports.merge(r,n)}function ug(t){var e,r,n,i;const o={};if(!bs(t))return o;for(const[c,l]of Object.entries(t)){const h=E1(c)?[c]:l.chains,d=l.methods||[],v=l.events||[],E=l.rpcMap||{},_=ka(c);o[_]=n7(Ja(Ja({},o[_]),l),{chains:wu(h,(e=o[_])==null?void 0:e.chains),methods:wu(d,(r=o[_])==null?void 0:r.methods),events:wu(v,(n=o[_])==null?void 0:n.events),rpcMap:Ja(Ja({},E),(i=o[_])==null?void 0:i.rpcMap)})}return o}const ji=(t,e)=>{const r=n=>{n.request!==e.request||n.topic!==e.topic||(t.events.removeListener("session_request_sent",r),c7(e,t.core.storage))};t.on("session_request_sent",r)};async function c7(t,e){try{const r=await e.getItem("WALLETCONNECT_DEEPLINK_CHOICE");if(!r)return;const n=typeof r=="string"?JSON.parse(r):r,i=n?.href;if(typeof i!="string")return;i.endsWith("/")&&i.slice(0,-1);const o=`${i}/wc?requestId=${t.id}&sessionTopic=${t.topic}`,c=g1();c===Pi.browser?window.open(o,"_self","noreferrer noopener"):c===Pi.reactNative&&await require("react-native").Linking.openURL(o)}catch(r){console.error(r)}}class l7{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=e.events,this.client=e.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?(ji(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(this.chainId=e,!this.httpProviders[e]){const n=r||sn(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||sn(e,this.namespace);return typeof n>"u"?void 0:new ii(new Li(n))}}class u7{constructor(e){this.name="eip155",this.namespace=e.namespace,this.client=e.client,this.events=e.events,this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){var r;switch(e.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return this.handleSwitchChain(e.request.params?(r=e.request.params[0])==null?void 0:r.chainId:"0x0"),null;case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?(ji(this.client,e),await this.client.request(e)):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,r){const n=sh(e);if(!this.httpProviders[n]){const i=r||sn(`${this.name}:${n}`,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${n}`);this.setHttpProvider(n,i)}this.chainId=n,this.events.emit(oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${n}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,r){const n=r||sn(`${this.name}:${e}`,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new ii(new Li(n))}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=sh(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}handleSwitchChain(e){const r=parseInt(e,16),n=`${this.name}:${r}`;i7(n,this.namespace.chains),this.setDefaultChain(`${r}`)}}class h7{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=e.events,this.client=e.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?(ji(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(!this.httpProviders[e]){const n=r||sn(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||sn(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new ii(new Li(n))}}class f7{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=e.events,this.client=e.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?(ji(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(this.chainId=e,!this.httpProviders[e]){const n=r||sn(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||sn(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new ii(new Li(n))}}class d7{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=e.events,this.client=e.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?(ji(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(this.chainId=e,!this.httpProviders[e]){const n=r||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{const n=this.getCardanoRPCUrl(r);e[r]=this.createHttpProvider(r,n)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}getCardanoRPCUrl(e){const r=this.namespace.rpcMap;if(r)return r[e]}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||this.getCardanoRPCUrl(e);return typeof n>"u"?void 0:new ii(new Li(n))}}class p7{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=e.events,this.client=e.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?(ji(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(!this.httpProviders[e]){const n=r||sn(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||sn(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new ii(new Li(n))}}class g7{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=e.events,this.client=e.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?(ji(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(!this.httpProviders[e]){const n=r||sn(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||sn(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new ii(new Li(n))}}var m7=Object.defineProperty,w7=Object.defineProperties,v7=Object.getOwnPropertyDescriptors,hg=Object.getOwnPropertySymbols,y7=Object.prototype.hasOwnProperty,b7=Object.prototype.propertyIsEnumerable,fg=(t,e,r)=>e in t?m7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Xa=(t,e)=>{for(var r in e||(e={}))y7.call(e,r)&&fg(t,r,e[r]);if(hg)for(var r of hg(e))b7.call(e,r)&&fg(t,r,e[r]);return t},oh=(t,e)=>w7(t,v7(e));class ah{constructor(e){this.events=new vr.exports,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.providerOpts=e,this.logger=typeof e?.logger<"u"&&typeof e?.logger!="string"?e.logger:pt.pino(pt.getDefaultLoggerOptions({level:e?.logger||og}))}static async init(e){const r=new ah(e);return await r.initialize(),r}async request(e,r){const[n,i]=this.validateChain(r);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:Xa({},e),chainId:`${n}:${i}`,topic:this.session.topic})}sendAsync(e,r,n){this.request(e,n).then(i=>r(null,i)).catch(i=>r(i,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:Gt("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}removeListener(e,r){this.events.removeListener(e,r)}off(e,r){this.events.off(e,r)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let r=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(r>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:i}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await i().then(o=>{this.session=o}).catch(o=>{if(o.message!==eg)throw o;r++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,r){try{const[n,i]=this.validateChain(e);this.getProvider(n).setDefaultChain(i,r)}catch(n){if(!/Please call connect/.test(n.message))throw n}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const r=this.client.pairing.getAll();if(Un(r)){for(const n of r)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${r.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces")||{},this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await rh.init({logger:this.providerOpts.logger||og,relayUrl:this.providerOpts.relayUrl||GE,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");[...new Set(Object.keys(this.session.namespaces).map(e=>ka(e)))].forEach(e=>{if(!this.session)return;const r=o7(e,this.session),n=s7(r),i=a7(this.namespaces,this.optionalNamespaces),o=oh(Xa({},i[e]),{accounts:r,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new u7({client:this.client,namespace:o,events:this.events});break;case"solana":this.rpcProviders[e]=new h7({client:this.client,namespace:o,events:this.events});break;case"cosmos":this.rpcProviders[e]=new f7({client:this.client,namespace:o,events:this.events});break;case"polkadot":this.rpcProviders[e]=new l7({client:this.client,namespace:o,events:this.events});break;case"cip34":this.rpcProviders[e]=new d7({client:this.client,namespace:o,events:this.events});break;case"elrond":this.rpcProviders[e]=new p7({client:this.client,namespace:o,events:this.events});break;case"multiversx":this.rpcProviders[e]=new g7({client:this.client,namespace:o,events:this.events});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",e=>{this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{const{params:r}=e,{event:n}=r;n.name==="accountsChanged"?this.events.emit("accountsChanged",n.data):n.name==="chainChanged"?this.onChainChanged(r.chainId):this.events.emit(n.name,n.data),this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:r})=>{var n;const{namespaces:i}=r,o=(n=this.client)==null?void 0:n.session.get(e);this.session=oh(Xa({},o),{namespaces:i}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:r})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",oh(Xa({},Gt("USER_DISCONNECTED")),{data:e.topic}))}),this.on(oi.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var r;this.getProvider(e).updateNamespace((r=this.session)==null?void 0:r.namespaces[e])})}setNamespaces(e){const{namespaces:r,optionalNamespaces:n,sessionProperties:i}=e;if(!r||!Object.keys(r).length)throw new Error("Namespaces must be not empty");this.namespaces=r,this.optionalNamespaces=n,this.sessionProperties=i,this.persist("namespaces",r),this.persist("optionalNamespaces",n)}validateChain(e){const[r,n]=e?.split(":")||["",""];if(r&&!Object.keys(this.namespaces).map(c=>ka(c)).includes(r))throw new Error(`Namespace '${r}' is not configured. Please call connect() first with namespace config.`);if(r&&n)return[r,n];const i=ka(Object.keys(this.namespaces)[0]),o=this.rpcProviders[i].getDefaultChain();return[i,o]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,r=!1){var n;const[i,o]=this.validateChain(e);r||this.getProvider(i).setDefaultChain(o),((n=this.namespaces[i])!=null?n:this.namespaces[`${i}:${o}`]).defaultChain=o,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",o)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,await this.cleanupPendingPairings({deletePairings:!0})}persist(e,r){this.client.core.storage.setItem(`${ag}/${e}`,r)}async getFromStore(e){return await this.client.core.storage.getItem(`${ag}/${e}`)}}const _7=ah,E7="wc",x7="ethereum_provider",C7=`${E7}@${2}:${x7}:`,I7="https://rpc.walletconnect.com/v1/",Qa=["eth_sendTransaction","personal_sign"],S7=["eth_accounts","eth_requestAccounts","eth_call","eth_getBalance","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],ec=["chainChanged","accountsChanged"],D7=["message","disconnect","connect"];var O7=Object.defineProperty,A7=Object.defineProperties,$7=Object.getOwnPropertyDescriptors,dg=Object.getOwnPropertySymbols,P7=Object.prototype.hasOwnProperty,T7=Object.prototype.propertyIsEnumerable,pg=(t,e,r)=>e in t?O7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ch=(t,e)=>{for(var r in e||(e={}))P7.call(e,r)&&pg(t,r,e[r]);if(dg)for(var r of dg(e))T7.call(e,r)&&pg(t,r,e[r]);return t},gg=(t,e)=>A7(t,$7(e));function lh(t){return Number(t[0].split(":")[1])}function uh(t){return`0x${t.toString(16)}`}function R7(t){const{chains:e,optionalChains:r,methods:n,optionalMethods:i,events:o,optionalEvents:c,rpcMap:l}=t;if(!Un(e))throw new Error("Invalid chains");const h=e,d=n||Qa,v=o||ec,E={[lh(h)]:l[lh(h)]},_={chains:h,methods:d,events:v,rpcMap:E},S=o?.filter(q=>!ec.includes(q)),P=n?.filter(q=>!Qa.includes(q));if(!r&&!c&&!i&&!(S!=null&&S.length)&&!(P!=null&&P.length))return{required:_};const L=S?.length&&P?.length||!r,k={chains:[...new Set(L?h.concat(r||[]):r)],methods:[...new Set(d.concat(i||[]))],events:[...new Set(v.concat(c||[]))],rpcMap:l};return{required:_,optional:k}}class tc{constructor(){this.events=new vr.exports.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=C7,this.on=(e,r)=>(this.events.on(e,r),this),this.once=(e,r)=>(this.events.once(e,r),this),this.removeListener=(e,r)=>(this.events.removeListener(e,r),this),this.off=(e,r)=>(this.events.off(e,r),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const r=new tc;return await r.initialize(e),r}async request(e){return await this.signer.request(e,this.formatChainId(this.chainId))}sendAsync(e,r){this.signer.sendAsync(e,r,this.formatChainId(this.chainId))}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:r,optional:n}=R7(this.rpc);try{const i=await new Promise(async(c,l)=>{var h;this.rpc.showQrModal&&((h=this.modal)==null||h.subscribeModal(d=>{!d.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),l(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(gg(ch({namespaces:{[this.namespace]:r}},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:e?.pairingTopic})).then(d=>{c(d)}).catch(d=>{l(new Error(d.message))})});if(!i)return;this.setChainIds(this.rpc.chains);const o=m5(i.namespaces,[this.namespace]);this.setAccounts(o),this.events.emit("connect",{chainId:uh(this.chainId)})}catch(i){throw this.signer.logger.error(i),i}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",e=>{const{params:r}=e,{event:n}=r;n.name==="accountsChanged"?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):n.name==="chainChanged"?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{const r=parseInt(e);this.chainId=r,this.events.emit("chainChanged",uh(this.chainId)),this.persist()}),this.signer.on("session_update",e=>{this.events.emit("session_update",e)}),this.signer.on("session_delete",e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",gg(ch({},Gt("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var r,n;this.rpc.showQrModal&&((r=this.modal)==null||r.closeModal(),(n=this.modal)==null||n.openModal({uri:e})),this.events.emit("display_uri",e)})}setHttpProvider(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return typeof e=="string"?e.startsWith(`${this.namespace}:`):!1}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const r=e.filter(n=>this.isCompatibleChainId(n)).map(n=>this.parseChainId(n));r.length&&(this.chainId=r[0],this.events.emit("chainChanged",uh(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const r=this.parseChainId(e);this.chainId=r,this.setHttpProvider(r)}}parseAccountId(e){const[r,n,i]=e.split(":");return{chainId:`${r}:${n}`,address:i}}setAccounts(e){this.accounts=e.filter(r=>this.parseChainId(this.parseAccountId(r).chainId)===this.chainId).map(r=>this.parseAccountId(r).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var r,n;return{chains:((r=e.chains)==null?void 0:r.map(i=>this.formatChainId(i)))||[`${this.namespace}:1`],optionalChains:e.optionalChains?e.optionalChains.map(i=>this.formatChainId(i)):void 0,methods:e?.methods||Qa,events:e?.events||ec,optionalMethods:e?.optionalMethods||[],optionalEvents:e?.optionalEvents||[],rpcMap:e?.rpcMap||this.buildRpcMap(e.chains.concat(e.optionalChains||[]),e.projectId),showQrModal:Boolean(e?.showQrModal),qrModalOptions:(n=e?.qrModalOptions)!=null?n:void 0,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,r){const n={};return e.forEach(i=>{n[i]=this.getRpcUrl(i,r)}),n}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=lh(this.rpc.chains),this.signer=await _7.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal)try{const{Web3Modal:r}=await Promise.resolve().then(function(){return sx});this.modal=new r(ch({walletConnectVersion:2,projectId:this.rpc.projectId,standaloneChains:this.rpc.chains},this.rpc.qrModalOptions))}catch{throw new Error("To use QR modal, please install @web3modal/standalone package")}}loadConnectOpts(e){if(!e)return;const{chains:r,optionalChains:n,rpcMap:i}=e;r&&Un(r)&&(this.rpc.chains=r.map(o=>this.formatChainId(o)),r.forEach(o=>{this.rpc.rpcMap[o]=i?.[o]||this.getRpcUrl(o)})),n&&Un(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=n?.map(o=>this.formatChainId(o)),n.forEach(o=>{this.rpc.rpcMap[o]=i?.[o]||this.getRpcUrl(o)}))}getRpcUrl(e,r){var n;return((n=this.rpc.rpcMap)==null?void 0:n[e])||`${I7}?chainId=eip155:${e}&projectId=${r||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`);this.setChainIds(e?[this.formatChainId(e)]:this.session.namespaces[this.namespace].accounts),this.setAccounts(this.session.namespaces[this.namespace].accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return typeof e=="string"||e instanceof String?[this.parseAccount(e)]:e.map(r=>this.parseAccount(r))}}const N7=tc,M7=Symbol(),mg=Object.getPrototypeOf,hh=new WeakMap,L7=t=>t&&(hh.has(t)?hh.get(t):mg(t)===Object.prototype||mg(t)===Array.prototype),j7=t=>L7(t)&&t[M7]||null,wg=(t,e=!0)=>{hh.set(t,e)},fh=t=>typeof t=="object"&&t!==null,Ui=new WeakMap,rc=new WeakSet,U7=(t=Object.is,e=(d,v)=>new Proxy(d,v),r=d=>fh(d)&&!rc.has(d)&&(Array.isArray(d)||!(Symbol.iterator in d))&&!(d instanceof WeakMap)&&!(d instanceof WeakSet)&&!(d instanceof Error)&&!(d instanceof Number)&&!(d instanceof Date)&&!(d instanceof String)&&!(d instanceof RegExp)&&!(d instanceof ArrayBuffer),n=d=>{switch(d.status){case"fulfilled":return d.value;case"rejected":throw d.reason;default:throw d}},i=new WeakMap,o=(d,v,E=n)=>{const _=i.get(d);if(_?.[0]===v)return _[1];const S=Array.isArray(d)?[]:Object.create(Object.getPrototypeOf(d));return wg(S,!0),i.set(d,[v,S]),Reflect.ownKeys(d).forEach(P=>{if(Object.getOwnPropertyDescriptor(S,P))return;const L=Reflect.get(d,P),k={value:L,enumerable:!0,configurable:!0};if(rc.has(L))wg(L,!1);else if(L instanceof Promise)delete k.value,k.get=()=>E(L);else if(Ui.has(L)){const[q,T]=Ui.get(L);k.value=o(q,T(),E)}Object.defineProperty(S,P,k)}),S},c=new WeakMap,l=[1,1],h=d=>{if(!fh(d))throw new Error("object required");const v=c.get(d);if(v)return v;let E=l[0];const _=new Set,S=(J,z=++l[0])=>{E!==z&&(E=z,_.forEach(ee=>ee(J,z)))};let P=l[1];const L=(J=++l[1])=>(P!==J&&!_.size&&(P=J,q.forEach(([z])=>{const ee=z[1](J);ee>E&&(E=ee)})),E),k=J=>(z,ee)=>{const de=[...z];de[1]=[J,...de[1]],S(de,ee)},q=new Map,T=(J,z)=>{if(void 0!=="production"&&q.has(J))throw new Error("prop listener already exists");if(_.size){const ee=z[3](k(J));q.set(J,[z,ee])}else q.set(J,[z])},M=J=>{var z;const ee=q.get(J);ee&&(q.delete(J),(z=ee[1])==null||z.call(ee))},A=J=>(_.add(J),_.size===1&&q.forEach(([ee,de],me)=>{if(void 0!=="production"&&de)throw new Error("remove already exists");const D=ee[3](k(me));q.set(me,[ee,D])}),()=>{_.delete(J),_.size===0&&q.forEach(([ee,de],me)=>{de&&(de(),q.set(me,[ee]))})}),R=Array.isArray(d)?[]:Object.create(Object.getPrototypeOf(d)),f=e(R,{deleteProperty(J,z){const ee=Reflect.get(J,z);M(z);const de=Reflect.deleteProperty(J,z);return de&&S(["delete",[z],ee]),de},set(J,z,ee,de){const me=Reflect.has(J,z),D=Reflect.get(J,z,de);if(me&&(t(D,ee)||c.has(ee)&&t(D,c.get(ee))))return!0;M(z),fh(ee)&&(ee=j7(ee)||ee);let U=ee;if(ee instanceof Promise)ee.then(ae=>{ee.status="fulfilled",ee.value=ae,S(["resolve",[z],ae])}).catch(ae=>{ee.status="rejected",ee.reason=ae,S(["reject",[z],ae])});else{!Ui.has(ee)&&r(ee)&&(U=h(ee));const ae=!rc.has(U)&&Ui.get(U);ae&&T(z,ae)}return Reflect.set(J,z,U,de),S(["set",[z],ee,D]),!0}});c.set(d,f);const x=[R,L,o,A];return Ui.set(f,x),Reflect.ownKeys(d).forEach(J=>{const z=Object.getOwnPropertyDescriptor(d,J);"value"in z&&(f[J]=d[J],delete z.value,delete z.writable),Object.defineProperty(R,J,z)}),f})=>[h,Ui,rc,t,e,r,n,i,o,c,l],[F7]=U7();function ai(t={}){return F7(t)}function Fi(t,e,r){const n=Ui.get(t);void 0!=="production"&&!n&&console.warn("Please use proxy object");let i;const o=[],c=n[3];let l=!1;const d=c(v=>{if(o.push(v),r){e(o.splice(0));return}i||(i=Promise.resolve().then(()=>{i=void 0,l&&e(o.splice(0))}))});return l=!0,()=>{l=!1,d()}}var vg={},nc={};nc.byteLength=H7,nc.toByteArray=W7,nc.fromByteArray=K7;for(var An=[],on=[],B7=typeof Uint8Array<"u"?Uint8Array:Array,dh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Es=0,k7=dh.length;Es<k7;++Es)An[Es]=dh[Es],on[dh.charCodeAt(Es)]=Es;on["-".charCodeAt(0)]=62,on["_".charCodeAt(0)]=63;function yg(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function H7(t){var e=yg(t),r=e[0],n=e[1];return(r+n)*3/4-n}function z7(t,e,r){return(e+r)*3/4-r}function W7(t){var e,r=yg(t),n=r[0],i=r[1],o=new B7(z7(t,n,i)),c=0,l=i>0?n-4:n,h;for(h=0;h<l;h+=4)e=on[t.charCodeAt(h)]<<18|on[t.charCodeAt(h+1)]<<12|on[t.charCodeAt(h+2)]<<6|on[t.charCodeAt(h+3)],o[c++]=e>>16&255,o[c++]=e>>8&255,o[c++]=e&255;return i===2&&(e=on[t.charCodeAt(h)]<<2|on[t.charCodeAt(h+1)]>>4,o[c++]=e&255),i===1&&(e=on[t.charCodeAt(h)]<<10|on[t.charCodeAt(h+1)]<<4|on[t.charCodeAt(h+2)]>>2,o[c++]=e>>8&255,o[c++]=e&255),o}function q7(t){return An[t>>18&63]+An[t>>12&63]+An[t>>6&63]+An[t&63]}function V7(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(q7(n));return i.join("")}function K7(t){for(var e,r=t.length,n=r%3,i=[],o=16383,c=0,l=r-n;c<l;c+=o)i.push(V7(t,c,c+o>l?l:c+o));return n===1?(e=t[r-1],i.push(An[e>>2]+An[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(An[e>>10]+An[e>>4&63]+An[e<<2&63]+"=")),i.join("")}var ph={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ph.read=function(t,e,r,n,i){var o,c,l=i*8-n-1,h=(1<<l)-1,d=h>>1,v=-7,E=r?i-1:0,_=r?-1:1,S=t[e+E];for(E+=_,o=S&(1<<-v)-1,S>>=-v,v+=l;v>0;o=o*256+t[e+E],E+=_,v-=8);for(c=o&(1<<-v)-1,o>>=-v,v+=n;v>0;c=c*256+t[e+E],E+=_,v-=8);if(o===0)o=1-d;else{if(o===h)return c?NaN:(S?-1:1)*(1/0);c=c+Math.pow(2,n),o=o-d}return(S?-1:1)*c*Math.pow(2,o-n)},ph.write=function(t,e,r,n,i,o){var c,l,h,d=o*8-i-1,v=(1<<d)-1,E=v>>1,_=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=n?0:o-1,P=n?1:-1,L=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,c=v):(c=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-c))<1&&(c--,h*=2),c+E>=1?e+=_/h:e+=_*Math.pow(2,1-E),e*h>=2&&(c++,h/=2),c+E>=v?(l=0,c=v):c+E>=1?(l=(e*h-1)*Math.pow(2,i),c=c+E):(l=e*Math.pow(2,E-1)*Math.pow(2,i),c=0));i>=8;t[r+S]=l&255,S+=P,l/=256,i-=8);for(c=c<<i|l,d+=i;d>0;t[r+S]=c&255,S+=P,c/=256,d-=8);t[r+S-P]|=L*128};/*!
|
|
98
|
+
}`;var ot=lw(function(){return vt(D,Pe+"return "+pe).apply(r,M)});if(ot.source=pe,Y0(ot))throw ot;return ot}function FR(s){return yt(s).toLowerCase()}function BR(s){return yt(s).toUpperCase()}function kR(s,a,u){if(s=yt(s),s&&(u||a===r))return vm(s);if(!s||!(a=en(a)))return s;var g=Cn(s),y=Cn(a),D=ym(g,y),M=bm(g,y)+1;return Ri(g,D,M).join("")}function HR(s,a,u){if(s=yt(s),s&&(u||a===r))return s.slice(0,Em(s)+1);if(!s||!(a=en(a)))return s;var g=Cn(s),y=bm(g,Cn(a))+1;return Ri(g,0,y).join("")}function zR(s,a,u){if(s=yt(s),s&&(u||a===r))return s.replace(Vt,"");if(!s||!(a=en(a)))return s;var g=Cn(s),y=ym(g,Cn(a));return Ri(g,y).join("")}function WR(s,a){var u=z,g=ee;if(Bt(a)){var y="separator"in a?a.separator:y;u="length"in a?it(a.length):u,g="omission"in a?en(a.omission):g}s=yt(s);var D=s.length;if(oo(s)){var M=Cn(s);D=M.length}if(u>=D)return s;var k=u-ao(g);if(k<1)return g;var Z=M?Ri(M,0,k).join(""):s.slice(0,k);if(y===r)return Z+g;if(M&&(k+=Z.length-k),J0(y)){if(s.slice(k).search(y)){var ue,he=Z;for(y.global||(y=d0(y.source,yt(hn.exec(y))+"g")),y.lastIndex=0;ue=y.exec(he);)var pe=ue.index;Z=Z.slice(0,pe===r?k:pe)}}else if(s.indexOf(en(y),k)!=k){var be=Z.lastIndexOf(y);be>-1&&(Z=Z.slice(0,be))}return Z+g}function qR(s){return s=yt(s),s&&Ht.test(s)?s.replace(Ci,bD):s}var VR=go(function(s,a,u){return s+(u?" ":"")+a.toUpperCase()}),ed=u2("toUpperCase");function cw(s,a,u){return s=yt(s),a=u?r:a,a===r?gD(s)?xD(s):oD(s):s.match(a)||[]}var lw=ct(function(s,a){try{return wr(s,r,a)}catch(u){return Y0(u)?u:new Ye(u)}}),KR=ni(function(s,a){return dn(a,function(u){u=kn(u),ti(s,u,G0(s[u],s))}),s});function GR(s){var a=s==null?0:s.length,u=ze();return s=a?Ut(s,function(g){if(typeof g[1]!="function")throw new pn(c);return[u(g[0]),g[1]]}):[],ct(function(g){for(var y=-1;++y<a;){var D=s[y];if(wr(D[0],this,g))return wr(D[1],this,g)}})}function ZR(s){return bA(mn(s,E))}function td(s){return function(){return s}}function YR(s,a){return s==null||s!==s?a:s}var JR=f2(),XR=f2(!0);function Gr(s){return s}function rd(s){return Hm(typeof s=="function"?s:mn(s,E))}function QR(s){return Wm(mn(s,E))}function eN(s,a){return qm(s,mn(a,E))}var tN=ct(function(s,a){return function(u){return Da(u,s,a)}}),rN=ct(function(s,a){return function(u){return Da(s,u,a)}});function nd(s,a,u){var g=vr(a),y=Tl(a,g);u==null&&!(Bt(a)&&(y.length||!g.length))&&(u=a,a=s,s=this,y=Tl(a,vr(a)));var D=!(Bt(u)&&"chain"in u)||!!u.chain,M=si(s);return dn(y,function(k){var Z=a[k];s[k]=Z,M&&(s.prototype[k]=function(){var ue=this.__chain__;if(D||ue){var he=s(this.__wrapped__),pe=he.__actions__=qr(this.__actions__);return pe.push({func:Z,args:arguments,thisArg:s}),he.__chain__=ue,he}return Z.apply(s,Oi([this.value()],arguments))})}),s}function nN(){return mt._===this&&(mt._=AD),this}function id(){}function iN(s){return s=it(s),ct(function(a){return Vm(a,s)})}var sN=L0(Ut),oN=L0(dm),aN=L0(o0);function uw(s){return H0(s)?a0(kn(s)):UA(s)}function cN(s){return function(a){return s==null?r:vs(s,a)}}var lN=p2(),uN=p2(!0);function sd(){return[]}function od(){return!1}function hN(){return{}}function fN(){return""}function dN(){return!0}function pN(s,a){if(s=it(s),s<1||s>re)return[];var u=ie,g=Sr(s,ie);a=ze(a),s-=ie;for(var y=u0(g,a);++u<s;)a(u);return y}function gN(s){return Qe(s)?Ut(s,kn):tn(s)?[s]:qr($2(yt(s)))}function mN(s){var a=++OD;return yt(s)+a}var wN=jl(function(s,a){return s+a},0),vN=M0("ceil"),yN=jl(function(s,a){return s/a},1),bN=M0("floor");function _N(s){return s&&s.length?Pl(s,Gr,_0):r}function EN(s,a){return s&&s.length?Pl(s,ze(a,2),_0):r}function xN(s){return mm(s,Gr)}function CN(s,a){return mm(s,ze(a,2))}function IN(s){return s&&s.length?Pl(s,Gr,I0):r}function SN(s,a){return s&&s.length?Pl(s,ze(a,2),I0):r}var ON=jl(function(s,a){return s*a},1),DN=M0("round"),AN=jl(function(s,a){return s-a},0);function $N(s){return s&&s.length?l0(s,Gr):0}function PN(s,a){return s&&s.length?l0(s,ze(a,2)):0}return C.after=QP,C.ary=k2,C.assign=BT,C.assignIn=tw,C.assignInWith=Jl,C.assignWith=kT,C.at=HT,C.before=H2,C.bind=G0,C.bindAll=KR,C.bindKey=z2,C.castArray=hT,C.chain=j2,C.chunk=b$,C.compact=_$,C.concat=E$,C.cond=GR,C.conforms=ZR,C.constant=td,C.countBy=$P,C.create=zT,C.curry=W2,C.curryRight=q2,C.debounce=V2,C.defaults=WT,C.defaultsDeep=qT,C.defer=eT,C.delay=tT,C.difference=x$,C.differenceBy=C$,C.differenceWith=I$,C.drop=S$,C.dropRight=O$,C.dropRightWhile=D$,C.dropWhile=A$,C.fill=$$,C.filter=TP,C.flatMap=LP,C.flatMapDeep=MP,C.flatMapDepth=UP,C.flatten=N2,C.flattenDeep=P$,C.flattenDepth=T$,C.flip=rT,C.flow=JR,C.flowRight=XR,C.fromPairs=R$,C.functions=XT,C.functionsIn=QT,C.groupBy=jP,C.initial=L$,C.intersection=M$,C.intersectionBy=U$,C.intersectionWith=j$,C.invert=tR,C.invertBy=rR,C.invokeMap=BP,C.iteratee=rd,C.keyBy=kP,C.keys=vr,C.keysIn=Kr,C.map=ql,C.mapKeys=iR,C.mapValues=sR,C.matches=QR,C.matchesProperty=eN,C.memoize=Kl,C.merge=oR,C.mergeWith=rw,C.method=tN,C.methodOf=rN,C.mixin=nd,C.negate=Gl,C.nthArg=iN,C.omit=aR,C.omitBy=cR,C.once=nT,C.orderBy=HP,C.over=sN,C.overArgs=iT,C.overEvery=oN,C.overSome=aN,C.partial=Z0,C.partialRight=K2,C.partition=zP,C.pick=lR,C.pickBy=nw,C.property=uw,C.propertyOf=cN,C.pull=H$,C.pullAll=M2,C.pullAllBy=z$,C.pullAllWith=W$,C.pullAt=q$,C.range=lN,C.rangeRight=uN,C.rearg=sT,C.reject=VP,C.remove=V$,C.rest=oT,C.reverse=V0,C.sampleSize=GP,C.set=hR,C.setWith=fR,C.shuffle=ZP,C.slice=K$,C.sortBy=XP,C.sortedUniq=eP,C.sortedUniqBy=tP,C.split=LR,C.spread=aT,C.tail=rP,C.take=nP,C.takeRight=iP,C.takeRightWhile=sP,C.takeWhile=oP,C.tap=_P,C.throttle=cT,C.thru=Wl,C.toArray=X2,C.toPairs=iw,C.toPairsIn=sw,C.toPath=gN,C.toPlainObject=ew,C.transform=dR,C.unary=lT,C.union=aP,C.unionBy=cP,C.unionWith=lP,C.uniq=uP,C.uniqBy=hP,C.uniqWith=fP,C.unset=pR,C.unzip=K0,C.unzipWith=U2,C.update=gR,C.updateWith=mR,C.values=vo,C.valuesIn=wR,C.without=dP,C.words=cw,C.wrap=uT,C.xor=pP,C.xorBy=gP,C.xorWith=mP,C.zip=wP,C.zipObject=vP,C.zipObjectDeep=yP,C.zipWith=bP,C.entries=iw,C.entriesIn=sw,C.extend=tw,C.extendWith=Jl,nd(C,C),C.add=wN,C.attempt=lw,C.camelCase=_R,C.capitalize=ow,C.ceil=vN,C.clamp=vR,C.clone=fT,C.cloneDeep=pT,C.cloneDeepWith=gT,C.cloneWith=dT,C.conformsTo=mT,C.deburr=aw,C.defaultTo=YR,C.divide=yN,C.endsWith=ER,C.eq=Sn,C.escape=xR,C.escapeRegExp=CR,C.every=PP,C.find=RP,C.findIndex=T2,C.findKey=VT,C.findLast=NP,C.findLastIndex=R2,C.findLastKey=KT,C.floor=bN,C.forEach=F2,C.forEachRight=B2,C.forIn=GT,C.forInRight=ZT,C.forOwn=YT,C.forOwnRight=JT,C.get=X0,C.gt=wT,C.gte=vT,C.has=eR,C.hasIn=Q0,C.head=L2,C.identity=Gr,C.includes=FP,C.indexOf=N$,C.inRange=yR,C.invoke=nR,C.isArguments=_s,C.isArray=Qe,C.isArrayBuffer=yT,C.isArrayLike=Vr,C.isArrayLikeObject=Xt,C.isBoolean=bT,C.isBuffer=Ni,C.isDate=_T,C.isElement=ET,C.isEmpty=xT,C.isEqual=CT,C.isEqualWith=IT,C.isError=Y0,C.isFinite=ST,C.isFunction=si,C.isInteger=G2,C.isLength=Zl,C.isMap=Z2,C.isMatch=OT,C.isMatchWith=DT,C.isNaN=AT,C.isNative=$T,C.isNil=TT,C.isNull=PT,C.isNumber=Y2,C.isObject=Bt,C.isObjectLike=Gt,C.isPlainObject=Na,C.isRegExp=J0,C.isSafeInteger=RT,C.isSet=J2,C.isString=Yl,C.isSymbol=tn,C.isTypedArray=wo,C.isUndefined=NT,C.isWeakMap=LT,C.isWeakSet=MT,C.join=F$,C.kebabCase=IR,C.last=vn,C.lastIndexOf=B$,C.lowerCase=SR,C.lowerFirst=OR,C.lt=UT,C.lte=jT,C.max=_N,C.maxBy=EN,C.mean=xN,C.meanBy=CN,C.min=IN,C.minBy=SN,C.stubArray=sd,C.stubFalse=od,C.stubObject=hN,C.stubString=fN,C.stubTrue=dN,C.multiply=ON,C.nth=k$,C.noConflict=nN,C.noop=id,C.now=Vl,C.pad=DR,C.padEnd=AR,C.padStart=$R,C.parseInt=PR,C.random=bR,C.reduce=WP,C.reduceRight=qP,C.repeat=TR,C.replace=RR,C.result=uR,C.round=DN,C.runInContext=V,C.sample=KP,C.size=YP,C.snakeCase=NR,C.some=JP,C.sortedIndex=G$,C.sortedIndexBy=Z$,C.sortedIndexOf=Y$,C.sortedLastIndex=J$,C.sortedLastIndexBy=X$,C.sortedLastIndexOf=Q$,C.startCase=MR,C.startsWith=UR,C.subtract=AN,C.sum=$N,C.sumBy=PN,C.template=jR,C.times=pN,C.toFinite=oi,C.toInteger=it,C.toLength=Q2,C.toLower=FR,C.toNumber=yn,C.toSafeInteger=FT,C.toString=yt,C.toUpper=BR,C.trim=kR,C.trimEnd=HR,C.trimStart=zR,C.truncate=WR,C.unescape=qR,C.uniqueId=mN,C.upperCase=VR,C.upperFirst=ed,C.each=F2,C.eachRight=B2,C.first=L2,nd(C,function(){var s={};return Fn(C,function(a,u){bt.call(C.prototype,u)||(s[u]=a)}),s}(),{chain:!1}),C.VERSION=n,dn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){C[s].placeholder=C}),dn(["drop","take"],function(s,a){dt.prototype[s]=function(u){u=u===r?1:fr(it(u),0);var g=this.__filtered__&&!a?new dt(this):this.clone();return g.__filtered__?g.__takeCount__=Sr(u,g.__takeCount__):g.__views__.push({size:Sr(u,ie),type:s+(g.__dir__<0?"Right":"")}),g},dt.prototype[s+"Right"]=function(u){return this.reverse()[s](u).reverse()}}),dn(["filter","map","takeWhile"],function(s,a){var u=a+1,g=u==S||u==ce;dt.prototype[s]=function(y){var D=this.clone();return D.__iteratees__.push({iteratee:ze(y,3),type:u}),D.__filtered__=D.__filtered__||g,D}}),dn(["head","last"],function(s,a){var u="take"+(a?"Right":"");dt.prototype[s]=function(){return this[u](1).value()[0]}}),dn(["initial","tail"],function(s,a){var u="drop"+(a?"":"Right");dt.prototype[s]=function(){return this.__filtered__?new dt(this):this[u](1)}}),dt.prototype.compact=function(){return this.filter(Gr)},dt.prototype.find=function(s){return this.filter(s).head()},dt.prototype.findLast=function(s){return this.reverse().find(s)},dt.prototype.invokeMap=ct(function(s,a){return typeof s=="function"?new dt(this):this.map(function(u){return Da(u,s,a)})}),dt.prototype.reject=function(s){return this.filter(Gl(ze(s)))},dt.prototype.slice=function(s,a){s=it(s);var u=this;return u.__filtered__&&(s>0||a<0)?new dt(u):(s<0?u=u.takeRight(-s):s&&(u=u.drop(s)),a!==r&&(a=it(a),u=a<0?u.dropRight(-a):u.take(a-s)),u)},dt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},dt.prototype.toArray=function(){return this.take(ie)},Fn(dt.prototype,function(s,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),g=/^(?:head|last)$/.test(a),y=C[g?"take"+(a=="last"?"Right":""):a],D=g||/^find/.test(a);y&&(C.prototype[a]=function(){var M=this.__wrapped__,k=g?[1]:arguments,Z=M instanceof dt,ue=k[0],he=Z||Qe(M),pe=function(ft){var wt=y.apply(C,Oi([ft],k));return g&&be?wt[0]:wt};he&&u&&typeof ue=="function"&&ue.length!=1&&(Z=he=!1);var be=this.__chain__,Pe=!!this.__actions__.length,We=D&&!be,ot=Z&&!Pe;if(!D&&he){M=ot?M:new dt(this);var qe=s.apply(M,k);return qe.__actions__.push({func:Wl,args:[pe],thisArg:r}),new gn(qe,be)}return We&&ot?s.apply(this,k):(qe=this.thru(pe),We?g?qe.value()[0]:qe.value():qe)})}),dn(["pop","push","shift","sort","splice","unshift"],function(s){var a=ml[s],u=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",g=/^(?:pop|shift)$/.test(s);C.prototype[s]=function(){var y=arguments;if(g&&!this.__chain__){var D=this.value();return a.apply(Qe(D)?D:[],y)}return this[u](function(M){return a.apply(Qe(M)?M:[],y)})}}),Fn(dt.prototype,function(s,a){var u=C[a];if(u){var g=u.name+"";bt.call(ho,g)||(ho[g]=[]),ho[g].push({name:a,func:u})}}),ho[Ul(r,G).name]=[{name:"wrapper",func:r}],dt.prototype.clone=qD,dt.prototype.reverse=VD,dt.prototype.value=KD,C.prototype.at=EP,C.prototype.chain=xP,C.prototype.commit=CP,C.prototype.next=IP,C.prototype.plant=OP,C.prototype.reverse=DP,C.prototype.toJSON=C.prototype.valueOf=C.prototype.value=AP,C.prototype.first=C.prototype.head,_a&&(C.prototype[_a]=SP),C},co=CD();Jt?((Jt.exports=co)._=co,St._=co):mt._=co}).call(Wo)})(ph,ph.exports);var p7=Object.defineProperty,g7=Object.defineProperties,m7=Object.getOwnPropertyDescriptors,_g=Object.getOwnPropertySymbols,w7=Object.prototype.hasOwnProperty,v7=Object.prototype.propertyIsEnumerable,Eg=(t,e,r)=>e in t?p7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,oc=(t,e)=>{for(var r in e||(e={}))w7.call(e,r)&&Eg(t,r,e[r]);if(_g)for(var r of _g(e))v7.call(e,r)&&Eg(t,r,e[r]);return t},y7=(t,e)=>g7(t,m7(e));function an(t,e,r){let n;const i=gh(t);return e.rpcMap&&(n=e.rpcMap[i]),n||(n=`${d7}?chainId=eip155:${i}&projectId=${r}`),n}function gh(t){return t.includes("eip155")?Number(t.split(":")[1]):Number(t)}function b7(t,e){if(!e.includes(t))throw new Error(`Chain '${t}' not approved. Please use one of the following: ${e.toString()}`)}function _7(t){return t.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function E7(t,e){const r=Object.keys(e.namespaces).filter(i=>i.includes(t));if(!r.length)return[];const n=[];return r.forEach(i=>{const o=e.namespaces[i].accounts;n.push(...o)}),n}function x7(t,e={}){const r=xg(t),n=xg(e);return ph.exports.merge(r,n)}function xg(t){var e,r,n,i;const o={};if(!As(t))return o;for(const[c,l]of Object.entries(t)){const h=N1(c)?[c]:l.chains,d=l.methods||[],v=l.events||[],E=l.rpcMap||{},_=Za(c);o[_]=y7(oc(oc({},o[_]),l),{chains:Du(h,(e=o[_])==null?void 0:e.chains),methods:Du(d,(r=o[_])==null?void 0:r.methods),events:Du(v,(n=o[_])==null?void 0:n.events),rpcMap:oc(oc({},E),(i=o[_])==null?void 0:i.rpcMap)})}return o}const Vi=(t,e)=>{const r=n=>{n.request!==e.request||n.topic!==e.topic||(t.events.removeListener("session_request_sent",r),C7(e,t.core.storage))};t.on("session_request_sent",r)};async function C7(t,e){try{const r=await e.getItem("WALLETCONNECT_DEEPLINK_CHOICE");if(!r)return;const n=typeof r=="string"?JSON.parse(r):r;let i=n?.href;if(typeof i!="string")return;i.endsWith("/")&&(i=i.slice(0,-1));const o=`${i}/wc?requestId=${t.id}&sessionTopic=${t.topic}`,c=O1();c===Bi.browser?window.open(o,"_self","noreferrer noopener"):c===Bi.reactNative&&typeof(global==null?void 0:global.Linking)<"u"&&await global.Linking.openURL(o)}catch(r){console.error(r)}}class I7{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=e.events,this.client=e.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?(Vi(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(this.chainId=e,!this.httpProviders[e]){const n=r||an(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(fi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||an(e,this.namespace);return typeof n>"u"?void 0:new ui(new qi(n))}}class S7{constructor(e){this.name="eip155",this.namespace=e.namespace,this.client=e.client,this.events=e.events,this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){var r;switch(e.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return this.handleSwitchChain(e.request.params?(r=e.request.params[0])==null?void 0:r.chainId:"0x0"),null;case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?(Vi(this.client,e),await this.client.request(e)):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,r){const n=gh(e);if(!this.httpProviders[n]){const i=r||an(`${this.name}:${n}`,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${n}`);this.setHttpProvider(n,i)}this.chainId=n,this.events.emit(fi.DEFAULT_CHAIN_CHANGED,`${this.name}:${n}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,r){const n=r||an(`${this.name}:${e}`,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new ui(new qi(n))}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=gh(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}handleSwitchChain(e){const r=parseInt(e,16),n=`${this.name}:${r}`;b7(n,this.namespace.chains),this.setDefaultChain(`${r}`)}}class O7{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=e.events,this.client=e.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?(Vi(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(!this.httpProviders[e]){const n=r||an(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(fi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||an(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new ui(new qi(n))}}class D7{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=e.events,this.client=e.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?(Vi(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(this.chainId=e,!this.httpProviders[e]){const n=r||an(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(fi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||an(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new ui(new qi(n))}}class A7{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=e.events,this.client=e.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?(Vi(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(this.chainId=e,!this.httpProviders[e]){const n=r||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(fi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{const n=this.getCardanoRPCUrl(r);e[r]=this.createHttpProvider(r,n)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}getCardanoRPCUrl(e){const r=this.namespace.rpcMap;if(r)return r[e]}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||this.getCardanoRPCUrl(e);return typeof n>"u"?void 0:new ui(new qi(n))}}class $7{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=e.events,this.client=e.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?(Vi(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(!this.httpProviders[e]){const n=r||an(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(fi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||an(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new ui(new qi(n))}}class P7{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=e.events,this.client=e.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?(Vi(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(!this.httpProviders[e]){const n=r||an(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(fi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||an(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new ui(new qi(n))}}var T7=Object.defineProperty,R7=Object.defineProperties,N7=Object.getOwnPropertyDescriptors,Cg=Object.getOwnPropertySymbols,L7=Object.prototype.hasOwnProperty,M7=Object.prototype.propertyIsEnumerable,Ig=(t,e,r)=>e in t?T7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ac=(t,e)=>{for(var r in e||(e={}))L7.call(e,r)&&Ig(t,r,e[r]);if(Cg)for(var r of Cg(e))M7.call(e,r)&&Ig(t,r,e[r]);return t},mh=(t,e)=>R7(t,N7(e));class wh{constructor(e){this.events=new yr.exports,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.providerOpts=e,this.logger=typeof e?.logger<"u"&&typeof e?.logger!="string"?e.logger:pt.pino(pt.getDefaultLoggerOptions({level:e?.logger||yg}))}static async init(e){const r=new wh(e);return await r.initialize(),r}async request(e,r){const[n,i]=this.validateChain(r);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:ac({},e),chainId:`${n}:${i}`,topic:this.session.topic})}sendAsync(e,r,n){this.request(e,n).then(i=>r(null,i)).catch(i=>r(i,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:Zt("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}removeListener(e,r){this.events.removeListener(e,r)}off(e,r){this.events.off(e,r)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let r=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(r>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:i}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await i().then(o=>{this.session=o}).catch(o=>{if(o.message!==dg)throw o;r++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,r){try{const[n,i]=this.validateChain(e);this.getProvider(n).setDefaultChain(i,r)}catch(n){if(!/Please call connect/.test(n.message))throw n}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const r=this.client.pairing.getAll();if(Hn(r)){for(const n of r)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${r.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces")||{},this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await fh.init({logger:this.providerOpts.logger||yg,relayUrl:this.providerOpts.relayUrl||u7,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");[...new Set(Object.keys(this.session.namespaces).map(e=>Za(e)))].forEach(e=>{if(!this.session)return;const r=E7(e,this.session),n=_7(r),i=x7(this.namespaces,this.optionalNamespaces),o=mh(ac({},i[e]),{accounts:r,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new S7({client:this.client,namespace:o,events:this.events});break;case"solana":this.rpcProviders[e]=new O7({client:this.client,namespace:o,events:this.events});break;case"cosmos":this.rpcProviders[e]=new D7({client:this.client,namespace:o,events:this.events});break;case"polkadot":this.rpcProviders[e]=new I7({client:this.client,namespace:o,events:this.events});break;case"cip34":this.rpcProviders[e]=new A7({client:this.client,namespace:o,events:this.events});break;case"elrond":this.rpcProviders[e]=new $7({client:this.client,namespace:o,events:this.events});break;case"multiversx":this.rpcProviders[e]=new P7({client:this.client,namespace:o,events:this.events});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",e=>{this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{const{params:r}=e,{event:n}=r;n.name==="accountsChanged"?this.events.emit("accountsChanged",n.data):n.name==="chainChanged"?this.onChainChanged(r.chainId):this.events.emit(n.name,n.data),this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:r})=>{var n;const{namespaces:i}=r,o=(n=this.client)==null?void 0:n.session.get(e);this.session=mh(ac({},o),{namespaces:i}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:r})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",mh(ac({},Zt("USER_DISCONNECTED")),{data:e.topic}))}),this.on(fi.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var r;this.getProvider(e).updateNamespace((r=this.session)==null?void 0:r.namespaces[e])})}setNamespaces(e){const{namespaces:r,optionalNamespaces:n,sessionProperties:i}=e;if(!r||!Object.keys(r).length)throw new Error("Namespaces must be not empty");this.namespaces=r,this.optionalNamespaces=n,this.sessionProperties=i,this.persist("namespaces",r),this.persist("optionalNamespaces",n)}validateChain(e){const[r,n]=e?.split(":")||["",""];if(r&&!Object.keys(this.namespaces).map(c=>Za(c)).includes(r))throw new Error(`Namespace '${r}' is not configured. Please call connect() first with namespace config.`);if(r&&n)return[r,n];const i=Za(Object.keys(this.namespaces)[0]),o=this.rpcProviders[i].getDefaultChain();return[i,o]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,r=!1){var n;const[i,o]=this.validateChain(e);r||this.getProvider(i).setDefaultChain(o),((n=this.namespaces[i])!=null?n:this.namespaces[`${i}:${o}`]).defaultChain=o,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",o)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,await this.cleanupPendingPairings({deletePairings:!0})}persist(e,r){this.client.core.storage.setItem(`${bg}/${e}`,r)}async getFromStore(e){return await this.client.core.storage.getItem(`${bg}/${e}`)}}const U7=wh,j7="wc",F7="ethereum_provider",B7=`${j7}@${2}:${F7}:`,k7="https://rpc.walletconnect.com/v1/",cc=["eth_sendTransaction","personal_sign"],H7=["eth_accounts","eth_requestAccounts","eth_call","eth_getBalance","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],lc=["chainChanged","accountsChanged"],z7=["message","disconnect","connect"];var W7=Object.defineProperty,q7=Object.defineProperties,V7=Object.getOwnPropertyDescriptors,Sg=Object.getOwnPropertySymbols,K7=Object.prototype.hasOwnProperty,G7=Object.prototype.propertyIsEnumerable,Og=(t,e,r)=>e in t?W7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,vh=(t,e)=>{for(var r in e||(e={}))K7.call(e,r)&&Og(t,r,e[r]);if(Sg)for(var r of Sg(e))G7.call(e,r)&&Og(t,r,e[r]);return t},Dg=(t,e)=>q7(t,V7(e));function yh(t){return Number(t[0].split(":")[1])}function bh(t){return`0x${t.toString(16)}`}function Z7(t){const{chains:e,optionalChains:r,methods:n,optionalMethods:i,events:o,optionalEvents:c,rpcMap:l}=t;if(!Hn(e))throw new Error("Invalid chains");const h=e,d=n||cc,v=o||lc,E={[yh(h)]:l[yh(h)]},_={chains:h,methods:d,events:v,rpcMap:E},O=o?.filter(G=>!lc.includes(G)),P=n?.filter(G=>!cc.includes(G));if(!r&&!c&&!i&&!(O!=null&&O.length)&&!(P!=null&&P.length))return{required:_};const U=O?.length&&P?.length||!r,H={chains:[...new Set(U?h.concat(r||[]):r)],methods:[...new Set(d.concat(i||[]))],events:[...new Set(v.concat(c||[]))],rpcMap:l};return{required:_,optional:H}}class uc{constructor(){this.events=new yr.exports.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=B7,this.on=(e,r)=>(this.events.on(e,r),this),this.once=(e,r)=>(this.events.once(e,r),this),this.removeListener=(e,r)=>(this.events.removeListener(e,r),this),this.off=(e,r)=>(this.events.off(e,r),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const r=new uc;return await r.initialize(e),r}async request(e){return await this.signer.request(e,this.formatChainId(this.chainId))}sendAsync(e,r){this.signer.sendAsync(e,r,this.formatChainId(this.chainId))}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:r,optional:n}=Z7(this.rpc);try{const i=await new Promise(async(c,l)=>{var h;this.rpc.showQrModal&&((h=this.modal)==null||h.subscribeModal(d=>{!d.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),l(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(Dg(vh({namespaces:{[this.namespace]:r}},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:e?.pairingTopic})).then(d=>{c(d)}).catch(d=>{l(new Error(d.message))})});if(!i)return;this.setChainIds(this.rpc.chains);const o=R5(i.namespaces,[this.namespace]);this.setAccounts(o),this.events.emit("connect",{chainId:bh(this.chainId)})}catch(i){throw this.signer.logger.error(i),i}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",e=>{const{params:r}=e,{event:n}=r;n.name==="accountsChanged"?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):n.name==="chainChanged"?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{const r=parseInt(e);this.chainId=r,this.events.emit("chainChanged",bh(this.chainId)),this.persist()}),this.signer.on("session_update",e=>{this.events.emit("session_update",e)}),this.signer.on("session_delete",e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",Dg(vh({},Zt("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var r,n;this.rpc.showQrModal&&((r=this.modal)==null||r.closeModal(),(n=this.modal)==null||n.openModal({uri:e})),this.events.emit("display_uri",e)})}setHttpProvider(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return typeof e=="string"?e.startsWith(`${this.namespace}:`):!1}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const r=e.filter(n=>this.isCompatibleChainId(n)).map(n=>this.parseChainId(n));r.length&&(this.chainId=r[0],this.events.emit("chainChanged",bh(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const r=this.parseChainId(e);this.chainId=r,this.setHttpProvider(r)}}parseAccountId(e){const[r,n,i]=e.split(":");return{chainId:`${r}:${n}`,address:i}}setAccounts(e){this.accounts=e.filter(r=>this.parseChainId(this.parseAccountId(r).chainId)===this.chainId).map(r=>this.parseAccountId(r).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var r,n;return{chains:((r=e.chains)==null?void 0:r.map(i=>this.formatChainId(i)))||[`${this.namespace}:1`],optionalChains:e.optionalChains?e.optionalChains.map(i=>this.formatChainId(i)):void 0,methods:e?.methods||cc,events:e?.events||lc,optionalMethods:e?.optionalMethods||[],optionalEvents:e?.optionalEvents||[],rpcMap:e?.rpcMap||this.buildRpcMap(e.chains.concat(e.optionalChains||[]),e.projectId),showQrModal:Boolean(e?.showQrModal),qrModalOptions:(n=e?.qrModalOptions)!=null?n:void 0,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,r){const n={};return e.forEach(i=>{n[i]=this.getRpcUrl(i,r)}),n}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=yh(this.rpc.chains),this.signer=await U7.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal)try{const{Web3Modal:r}=await Promise.resolve().then(function(){return Sx});this.modal=new r(vh({walletConnectVersion:2,projectId:this.rpc.projectId,standaloneChains:this.rpc.chains},this.rpc.qrModalOptions))}catch{throw new Error("To use QR modal, please install @web3modal/standalone package")}}loadConnectOpts(e){if(!e)return;const{chains:r,optionalChains:n,rpcMap:i}=e;r&&Hn(r)&&(this.rpc.chains=r.map(o=>this.formatChainId(o)),r.forEach(o=>{this.rpc.rpcMap[o]=i?.[o]||this.getRpcUrl(o)})),n&&Hn(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=n?.map(o=>this.formatChainId(o)),n.forEach(o=>{this.rpc.rpcMap[o]=i?.[o]||this.getRpcUrl(o)}))}getRpcUrl(e,r){var n;return((n=this.rpc.rpcMap)==null?void 0:n[e])||`${k7}?chainId=eip155:${e}&projectId=${r||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`);this.setChainIds(e?[this.formatChainId(e)]:this.session.namespaces[this.namespace].accounts),this.setAccounts(this.session.namespaces[this.namespace].accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return typeof e=="string"||e instanceof String?[this.parseAccount(e)]:e.map(r=>this.parseAccount(r))}}const Y7=uc,J7=Symbol(),Ag=Object.getPrototypeOf,_h=new WeakMap,X7=t=>t&&(_h.has(t)?_h.get(t):Ag(t)===Object.prototype||Ag(t)===Array.prototype),Q7=t=>X7(t)&&t[J7]||null,$g=(t,e=!0)=>{_h.set(t,e)},Eh=t=>typeof t=="object"&&t!==null,di=new WeakMap,hc=new WeakSet,ex=(t=Object.is,e=(d,v)=>new Proxy(d,v),r=d=>Eh(d)&&!hc.has(d)&&(Array.isArray(d)||!(Symbol.iterator in d))&&!(d instanceof WeakMap)&&!(d instanceof WeakSet)&&!(d instanceof Error)&&!(d instanceof Number)&&!(d instanceof Date)&&!(d instanceof String)&&!(d instanceof RegExp)&&!(d instanceof ArrayBuffer),n=d=>{switch(d.status){case"fulfilled":return d.value;case"rejected":throw d.reason;default:throw d}},i=new WeakMap,o=(d,v,E=n)=>{const _=i.get(d);if(_?.[0]===v)return _[1];const O=Array.isArray(d)?[]:Object.create(Object.getPrototypeOf(d));return $g(O,!0),i.set(d,[v,O]),Reflect.ownKeys(d).forEach(P=>{if(Object.getOwnPropertyDescriptor(O,P))return;const U=Reflect.get(d,P),H={value:U,enumerable:!0,configurable:!0};if(hc.has(U))$g(U,!1);else if(U instanceof Promise)delete H.value,H.get=()=>E(U);else if(di.has(U)){const[G,N]=di.get(U);H.value=o(G,N(),E)}Object.defineProperty(O,P,H)}),O},c=new WeakMap,l=[1,1],h=d=>{if(!Eh(d))throw new Error("object required");const v=c.get(d);if(v)return v;let E=l[0];const _=new Set,O=(J,z=++l[0])=>{E!==z&&(E=z,_.forEach(ee=>ee(J,z)))};let P=l[1];const U=(J=++l[1])=>(P!==J&&!_.size&&(P=J,G.forEach(([z])=>{const ee=z[1](J);ee>E&&(E=ee)})),E),H=J=>(z,ee)=>{const de=[...z];de[1]=[J,...de[1]],O(de,ee)},G=new Map,N=(J,z)=>{if(void 0!=="production"&&G.has(J))throw new Error("prop listener already exists");if(_.size){const ee=z[3](H(J));G.set(J,[z,ee])}else G.set(J,[z])},L=J=>{var z;const ee=G.get(J);ee&&(G.delete(J),(z=ee[1])==null||z.call(ee))},$=J=>(_.add(J),_.size===1&&G.forEach(([ee,de],me)=>{if(void 0!=="production"&&de)throw new Error("remove already exists");const S=ee[3](H(me));G.set(me,[ee,S])}),()=>{_.delete(J),_.size===0&&G.forEach(([ee,de],me)=>{de&&(de(),G.set(me,[ee]))})}),T=Array.isArray(d)?[]:Object.create(Object.getPrototypeOf(d)),f=e(T,{deleteProperty(J,z){const ee=Reflect.get(J,z);L(z);const de=Reflect.deleteProperty(J,z);return de&&O(["delete",[z],ee]),de},set(J,z,ee,de){const me=Reflect.has(J,z),S=Reflect.get(J,z,de);if(me&&(t(S,ee)||c.has(ee)&&t(S,c.get(ee))))return!0;L(z),Eh(ee)&&(ee=Q7(ee)||ee);let j=ee;if(ee instanceof Promise)ee.then(ce=>{ee.status="fulfilled",ee.value=ce,O(["resolve",[z],ce])}).catch(ce=>{ee.status="rejected",ee.reason=ce,O(["reject",[z],ce])});else{!di.has(ee)&&r(ee)&&(j=h(ee));const ce=!hc.has(j)&&di.get(j);ce&&N(z,ce)}return Reflect.set(J,z,j,de),O(["set",[z],ee,S]),!0}});c.set(d,f);const x=[T,U,o,$];return di.set(f,x),Reflect.ownKeys(d).forEach(J=>{const z=Object.getOwnPropertyDescriptor(d,J);"value"in z&&(f[J]=d[J],delete z.value,delete z.writable),Object.defineProperty(T,J,z)}),f})=>[h,di,hc,t,e,r,n,i,o,c,l],[tx]=ex();function Tn(t={}){return tx(t)}function Vn(t,e,r){const n=di.get(t);void 0!=="production"&&!n&&console.warn("Please use proxy object");let i;const o=[],c=n[3];let l=!1;const d=c(v=>{if(o.push(v),r){e(o.splice(0));return}i||(i=Promise.resolve().then(()=>{i=void 0,l&&e(o.splice(0))}))});return l=!0,()=>{l=!1,d()}}function rx(t,e){const r=di.get(t);void 0!=="production"&&!r&&console.warn("Please use proxy object");const[n,i,o]=r;return o(n,i(),e)}var Pg={},fc={};fc.byteLength=sx,fc.toByteArray=ax,fc.fromByteArray=ux;for(var Rn=[],cn=[],nx=typeof Uint8Array<"u"?Uint8Array:Array,xh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ps=0,ix=xh.length;Ps<ix;++Ps)Rn[Ps]=xh[Ps],cn[xh.charCodeAt(Ps)]=Ps;cn["-".charCodeAt(0)]=62,cn["_".charCodeAt(0)]=63;function Tg(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function sx(t){var e=Tg(t),r=e[0],n=e[1];return(r+n)*3/4-n}function ox(t,e,r){return(e+r)*3/4-r}function ax(t){var e,r=Tg(t),n=r[0],i=r[1],o=new nx(ox(t,n,i)),c=0,l=i>0?n-4:n,h;for(h=0;h<l;h+=4)e=cn[t.charCodeAt(h)]<<18|cn[t.charCodeAt(h+1)]<<12|cn[t.charCodeAt(h+2)]<<6|cn[t.charCodeAt(h+3)],o[c++]=e>>16&255,o[c++]=e>>8&255,o[c++]=e&255;return i===2&&(e=cn[t.charCodeAt(h)]<<2|cn[t.charCodeAt(h+1)]>>4,o[c++]=e&255),i===1&&(e=cn[t.charCodeAt(h)]<<10|cn[t.charCodeAt(h+1)]<<4|cn[t.charCodeAt(h+2)]>>2,o[c++]=e>>8&255,o[c++]=e&255),o}function cx(t){return Rn[t>>18&63]+Rn[t>>12&63]+Rn[t>>6&63]+Rn[t&63]}function lx(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(cx(n));return i.join("")}function ux(t){for(var e,r=t.length,n=r%3,i=[],o=16383,c=0,l=r-n;c<l;c+=o)i.push(lx(t,c,c+o>l?l:c+o));return n===1?(e=t[r-1],i.push(Rn[e>>2]+Rn[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(Rn[e>>10]+Rn[e>>4&63]+Rn[e<<2&63]+"=")),i.join("")}var Ch={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ch.read=function(t,e,r,n,i){var o,c,l=i*8-n-1,h=(1<<l)-1,d=h>>1,v=-7,E=r?i-1:0,_=r?-1:1,O=t[e+E];for(E+=_,o=O&(1<<-v)-1,O>>=-v,v+=l;v>0;o=o*256+t[e+E],E+=_,v-=8);for(c=o&(1<<-v)-1,o>>=-v,v+=n;v>0;c=c*256+t[e+E],E+=_,v-=8);if(o===0)o=1-d;else{if(o===h)return c?NaN:(O?-1:1)*(1/0);c=c+Math.pow(2,n),o=o-d}return(O?-1:1)*c*Math.pow(2,o-n)},Ch.write=function(t,e,r,n,i,o){var c,l,h,d=o*8-i-1,v=(1<<d)-1,E=v>>1,_=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,O=n?0:o-1,P=n?1:-1,U=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,c=v):(c=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-c))<1&&(c--,h*=2),c+E>=1?e+=_/h:e+=_*Math.pow(2,1-E),e*h>=2&&(c++,h/=2),c+E>=v?(l=0,c=v):c+E>=1?(l=(e*h-1)*Math.pow(2,i),c=c+E):(l=e*Math.pow(2,E-1)*Math.pow(2,i),c=0));i>=8;t[r+O]=l&255,O+=P,l/=256,i-=8);for(c=c<<i|l,d+=i;d>0;t[r+O]=c&255,O+=P,c/=256,d-=8);t[r+O-P]|=U*128};/*!
|
|
99
99
|
* The buffer module from node.js, for the browser.
|
|
100
100
|
*
|
|
101
101
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
102
102
|
* @license MIT
|
|
103
|
-
*/(function(t){const e=nc,r=ph,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=T,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i,l.TYPED_ARRAY_SUPPORT=o(),!l.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{const b=new Uint8Array(1),p={foo:function(){return 42}};return Object.setPrototypeOf(p,Uint8Array.prototype),Object.setPrototypeOf(b,p),b.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function c(b){if(b>i)throw new RangeError('The value "'+b+'" is invalid for option "size"');const p=new Uint8Array(b);return Object.setPrototypeOf(p,l.prototype),p}function l(b,p,m){if(typeof b=="number"){if(typeof p=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return E(b)}return h(b,p,m)}l.poolSize=8192;function h(b,p,m){if(typeof b=="string")return _(b,p);if(ArrayBuffer.isView(b))return P(b);if(b==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b);if(Me(b,ArrayBuffer)||b&&Me(b.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Me(b,SharedArrayBuffer)||b&&Me(b.buffer,SharedArrayBuffer)))return L(b,p,m);if(typeof b=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const $=b.valueOf&&b.valueOf();if($!=null&&$!==b)return l.from($,p,m);const B=k(b);if(B)return B;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof b[Symbol.toPrimitive]=="function")return l.from(b[Symbol.toPrimitive]("string"),p,m);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b)}l.from=function(b,p,m){return h(b,p,m)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array);function d(b){if(typeof b!="number")throw new TypeError('"size" argument must be of type number');if(b<0)throw new RangeError('The value "'+b+'" is invalid for option "size"')}function v(b,p,m){return d(b),b<=0?c(b):p!==void 0?typeof m=="string"?c(b).fill(p,m):c(b).fill(p):c(b)}l.alloc=function(b,p,m){return v(b,p,m)};function E(b){return d(b),c(b<0?0:q(b)|0)}l.allocUnsafe=function(b){return E(b)},l.allocUnsafeSlow=function(b){return E(b)};function _(b,p){if((typeof p!="string"||p==="")&&(p="utf8"),!l.isEncoding(p))throw new TypeError("Unknown encoding: "+p);const m=M(b,p)|0;let $=c(m);const B=$.write(b,p);return B!==m&&($=$.slice(0,B)),$}function S(b){const p=b.length<0?0:q(b.length)|0,m=c(p);for(let $=0;$<p;$+=1)m[$]=b[$]&255;return m}function P(b){if(Me(b,Uint8Array)){const p=new Uint8Array(b);return L(p.buffer,p.byteOffset,p.byteLength)}return S(b)}function L(b,p,m){if(p<0||b.byteLength<p)throw new RangeError('"offset" is outside of buffer bounds');if(b.byteLength<p+(m||0))throw new RangeError('"length" is outside of buffer bounds');let $;return p===void 0&&m===void 0?$=new Uint8Array(b):m===void 0?$=new Uint8Array(b,p):$=new Uint8Array(b,p,m),Object.setPrototypeOf($,l.prototype),$}function k(b){if(l.isBuffer(b)){const p=q(b.length)|0,m=c(p);return m.length===0||b.copy(m,0,0,p),m}if(b.length!==void 0)return typeof b.length!="number"||ze(b.length)?c(0):S(b);if(b.type==="Buffer"&&Array.isArray(b.data))return S(b.data)}function q(b){if(b>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return b|0}function T(b){return+b!=b&&(b=0),l.alloc(+b)}l.isBuffer=function(p){return p!=null&&p._isBuffer===!0&&p!==l.prototype},l.compare=function(p,m){if(Me(p,Uint8Array)&&(p=l.from(p,p.offset,p.byteLength)),Me(m,Uint8Array)&&(m=l.from(m,m.offset,m.byteLength)),!l.isBuffer(p)||!l.isBuffer(m))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(p===m)return 0;let $=p.length,B=m.length;for(let G=0,Q=Math.min($,B);G<Q;++G)if(p[G]!==m[G]){$=p[G],B=m[G];break}return $<B?-1:B<$?1:0},l.isEncoding=function(p){switch(String(p).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(p,m){if(!Array.isArray(p))throw new TypeError('"list" argument must be an Array of Buffers');if(p.length===0)return l.alloc(0);let $;if(m===void 0)for(m=0,$=0;$<p.length;++$)m+=p[$].length;const B=l.allocUnsafe(m);let G=0;for($=0;$<p.length;++$){let Q=p[$];if(Me(Q,Uint8Array))G+Q.length>B.length?(l.isBuffer(Q)||(Q=l.from(Q)),Q.copy(B,G)):Uint8Array.prototype.set.call(B,Q,G);else if(l.isBuffer(Q))Q.copy(B,G);else throw new TypeError('"list" argument must be an Array of Buffers');G+=Q.length}return B};function M(b,p){if(l.isBuffer(b))return b.length;if(ArrayBuffer.isView(b)||Me(b,ArrayBuffer))return b.byteLength;if(typeof b!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof b);const m=b.length,$=arguments.length>2&&arguments[2]===!0;if(!$&&m===0)return 0;let B=!1;for(;;)switch(p){case"ascii":case"latin1":case"binary":return m;case"utf8":case"utf-8":return qe(b).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m*2;case"hex":return m>>>1;case"base64":return Ye(b).length;default:if(B)return $?-1:qe(b).length;p=(""+p).toLowerCase(),B=!0}}l.byteLength=M;function A(b,p,m){let $=!1;if((p===void 0||p<0)&&(p=0),p>this.length||((m===void 0||m>this.length)&&(m=this.length),m<=0)||(m>>>=0,p>>>=0,m<=p))return"";for(b||(b="utf8");;)switch(b){case"hex":return ne(this,p,m);case"utf8":case"utf-8":return D(this,p,m);case"ascii":return le(this,p,m);case"latin1":case"binary":return re(this,p,m);case"base64":return me(this,p,m);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe(this,p,m);default:if($)throw new TypeError("Unknown encoding: "+b);b=(b+"").toLowerCase(),$=!0}}l.prototype._isBuffer=!0;function R(b,p,m){const $=b[p];b[p]=b[m],b[m]=$}l.prototype.swap16=function(){const p=this.length;if(p%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let m=0;m<p;m+=2)R(this,m,m+1);return this},l.prototype.swap32=function(){const p=this.length;if(p%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let m=0;m<p;m+=4)R(this,m,m+3),R(this,m+1,m+2);return this},l.prototype.swap64=function(){const p=this.length;if(p%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let m=0;m<p;m+=8)R(this,m,m+7),R(this,m+1,m+6),R(this,m+2,m+5),R(this,m+3,m+4);return this},l.prototype.toString=function(){const p=this.length;return p===0?"":arguments.length===0?D(this,0,p):A.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(p){if(!l.isBuffer(p))throw new TypeError("Argument must be a Buffer");return this===p?!0:l.compare(this,p)===0},l.prototype.inspect=function(){let p="";const m=t.INSPECT_MAX_BYTES;return p=this.toString("hex",0,m).replace(/(.{2})/g,"$1 ").trim(),this.length>m&&(p+=" ... "),"<Buffer "+p+">"},n&&(l.prototype[n]=l.prototype.inspect),l.prototype.compare=function(p,m,$,B,G){if(Me(p,Uint8Array)&&(p=l.from(p,p.offset,p.byteLength)),!l.isBuffer(p))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof p);if(m===void 0&&(m=0),$===void 0&&($=p?p.length:0),B===void 0&&(B=0),G===void 0&&(G=this.length),m<0||$>p.length||B<0||G>this.length)throw new RangeError("out of range index");if(B>=G&&m>=$)return 0;if(B>=G)return-1;if(m>=$)return 1;if(m>>>=0,$>>>=0,B>>>=0,G>>>=0,this===p)return 0;let Q=G-B,xe=$-m;const Oe=Math.min(Q,xe),it=this.slice(B,G),ut=p.slice(m,$);for(let ct=0;ct<Oe;++ct)if(it[ct]!==ut[ct]){Q=it[ct],xe=ut[ct];break}return Q<xe?-1:xe<Q?1:0};function C(b,p,m,$,B){if(b.length===0)return-1;if(typeof m=="string"?($=m,m=0):m>2147483647?m=2147483647:m<-2147483648&&(m=-2147483648),m=+m,ze(m)&&(m=B?0:b.length-1),m<0&&(m=b.length+m),m>=b.length){if(B)return-1;m=b.length-1}else if(m<0)if(B)m=0;else return-1;if(typeof p=="string"&&(p=l.from(p,$)),l.isBuffer(p))return p.length===0?-1:f(b,p,m,$,B);if(typeof p=="number")return p=p&255,typeof Uint8Array.prototype.indexOf=="function"?B?Uint8Array.prototype.indexOf.call(b,p,m):Uint8Array.prototype.lastIndexOf.call(b,p,m):f(b,[p],m,$,B);throw new TypeError("val must be string, number or Buffer")}function f(b,p,m,$,B){let G=1,Q=b.length,xe=p.length;if($!==void 0&&($=String($).toLowerCase(),$==="ucs2"||$==="ucs-2"||$==="utf16le"||$==="utf-16le")){if(b.length<2||p.length<2)return-1;G=2,Q/=2,xe/=2,m/=2}function Oe(ut,ct){return G===1?ut[ct]:ut.readUInt16BE(ct*G)}let it;if(B){let ut=-1;for(it=m;it<Q;it++)if(Oe(b,it)===Oe(p,ut===-1?0:it-ut)){if(ut===-1&&(ut=it),it-ut+1===xe)return ut*G}else ut!==-1&&(it-=it-ut),ut=-1}else for(m+xe>Q&&(m=Q-xe),it=m;it>=0;it--){let ut=!0;for(let ct=0;ct<xe;ct++)if(Oe(b,it+ct)!==Oe(p,ct)){ut=!1;break}if(ut)return it}return-1}l.prototype.includes=function(p,m,$){return this.indexOf(p,m,$)!==-1},l.prototype.indexOf=function(p,m,$){return C(this,p,m,$,!0)},l.prototype.lastIndexOf=function(p,m,$){return C(this,p,m,$,!1)};function x(b,p,m,$){m=Number(m)||0;const B=b.length-m;$?($=Number($),$>B&&($=B)):$=B;const G=p.length;$>G/2&&($=G/2);let Q;for(Q=0;Q<$;++Q){const xe=parseInt(p.substr(Q*2,2),16);if(ze(xe))return Q;b[m+Q]=xe}return Q}function J(b,p,m,$){return je(qe(p,b.length-m),b,m,$)}function z(b,p,m,$){return je(At(p),b,m,$)}function ee(b,p,m,$){return je(Ye(p),b,m,$)}function de(b,p,m,$){return je($t(p,b.length-m),b,m,$)}l.prototype.write=function(p,m,$,B){if(m===void 0)B="utf8",$=this.length,m=0;else if($===void 0&&typeof m=="string")B=m,$=this.length,m=0;else if(isFinite(m))m=m>>>0,isFinite($)?($=$>>>0,B===void 0&&(B="utf8")):(B=$,$=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const G=this.length-m;if(($===void 0||$>G)&&($=G),p.length>0&&($<0||m<0)||m>this.length)throw new RangeError("Attempt to write outside buffer bounds");B||(B="utf8");let Q=!1;for(;;)switch(B){case"hex":return x(this,p,m,$);case"utf8":case"utf-8":return J(this,p,m,$);case"ascii":case"latin1":case"binary":return z(this,p,m,$);case"base64":return ee(this,p,m,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return de(this,p,m,$);default:if(Q)throw new TypeError("Unknown encoding: "+B);B=(""+B).toLowerCase(),Q=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function me(b,p,m){return p===0&&m===b.length?e.fromByteArray(b):e.fromByteArray(b.slice(p,m))}function D(b,p,m){m=Math.min(b.length,m);const $=[];let B=p;for(;B<m;){const G=b[B];let Q=null,xe=G>239?4:G>223?3:G>191?2:1;if(B+xe<=m){let Oe,it,ut,ct;switch(xe){case 1:G<128&&(Q=G);break;case 2:Oe=b[B+1],(Oe&192)===128&&(ct=(G&31)<<6|Oe&63,ct>127&&(Q=ct));break;case 3:Oe=b[B+1],it=b[B+2],(Oe&192)===128&&(it&192)===128&&(ct=(G&15)<<12|(Oe&63)<<6|it&63,ct>2047&&(ct<55296||ct>57343)&&(Q=ct));break;case 4:Oe=b[B+1],it=b[B+2],ut=b[B+3],(Oe&192)===128&&(it&192)===128&&(ut&192)===128&&(ct=(G&15)<<18|(Oe&63)<<12|(it&63)<<6|ut&63,ct>65535&&ct<1114112&&(Q=ct))}}Q===null?(Q=65533,xe=1):Q>65535&&(Q-=65536,$.push(Q>>>10&1023|55296),Q=56320|Q&1023),$.push(Q),B+=xe}return ae($)}const U=4096;function ae(b){const p=b.length;if(p<=U)return String.fromCharCode.apply(String,b);let m="",$=0;for(;$<p;)m+=String.fromCharCode.apply(String,b.slice($,$+=U));return m}function le(b,p,m){let $="";m=Math.min(b.length,m);for(let B=p;B<m;++B)$+=String.fromCharCode(b[B]&127);return $}function re(b,p,m){let $="";m=Math.min(b.length,m);for(let B=p;B<m;++B)$+=String.fromCharCode(b[B]);return $}function ne(b,p,m){const $=b.length;(!p||p<0)&&(p=0),(!m||m<0||m>$)&&(m=$);let B="";for(let G=p;G<m;++G)B+=et[b[G]];return B}function oe(b,p,m){const $=b.slice(p,m);let B="";for(let G=0;G<$.length-1;G+=2)B+=String.fromCharCode($[G]+$[G+1]*256);return B}l.prototype.slice=function(p,m){const $=this.length;p=~~p,m=m===void 0?$:~~m,p<0?(p+=$,p<0&&(p=0)):p>$&&(p=$),m<0?(m+=$,m<0&&(m=0)):m>$&&(m=$),m<p&&(m=p);const B=this.subarray(p,m);return Object.setPrototypeOf(B,l.prototype),B};function ie(b,p,m){if(b%1!==0||b<0)throw new RangeError("offset is not uint");if(b+p>m)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(p,m,$){p=p>>>0,m=m>>>0,$||ie(p,m,this.length);let B=this[p],G=1,Q=0;for(;++Q<m&&(G*=256);)B+=this[p+Q]*G;return B},l.prototype.readUintBE=l.prototype.readUIntBE=function(p,m,$){p=p>>>0,m=m>>>0,$||ie(p,m,this.length);let B=this[p+--m],G=1;for(;m>0&&(G*=256);)B+=this[p+--m]*G;return B},l.prototype.readUint8=l.prototype.readUInt8=function(p,m){return p=p>>>0,m||ie(p,1,this.length),this[p]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(p,m){return p=p>>>0,m||ie(p,2,this.length),this[p]|this[p+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(p,m){return p=p>>>0,m||ie(p,2,this.length),this[p]<<8|this[p+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(p,m){return p=p>>>0,m||ie(p,4,this.length),(this[p]|this[p+1]<<8|this[p+2]<<16)+this[p+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(p,m){return p=p>>>0,m||ie(p,4,this.length),this[p]*16777216+(this[p+1]<<16|this[p+2]<<8|this[p+3])},l.prototype.readBigUInt64LE=Te(function(p){p=p>>>0,ve(p,"offset");const m=this[p],$=this[p+7];(m===void 0||$===void 0)&&Pe(p,this.length-8);const B=m+this[++p]*2**8+this[++p]*2**16+this[++p]*2**24,G=this[++p]+this[++p]*2**8+this[++p]*2**16+$*2**24;return BigInt(B)+(BigInt(G)<<BigInt(32))}),l.prototype.readBigUInt64BE=Te(function(p){p=p>>>0,ve(p,"offset");const m=this[p],$=this[p+7];(m===void 0||$===void 0)&&Pe(p,this.length-8);const B=m*2**24+this[++p]*2**16+this[++p]*2**8+this[++p],G=this[++p]*2**24+this[++p]*2**16+this[++p]*2**8+$;return(BigInt(B)<<BigInt(32))+BigInt(G)}),l.prototype.readIntLE=function(p,m,$){p=p>>>0,m=m>>>0,$||ie(p,m,this.length);let B=this[p],G=1,Q=0;for(;++Q<m&&(G*=256);)B+=this[p+Q]*G;return G*=128,B>=G&&(B-=Math.pow(2,8*m)),B},l.prototype.readIntBE=function(p,m,$){p=p>>>0,m=m>>>0,$||ie(p,m,this.length);let B=m,G=1,Q=this[p+--B];for(;B>0&&(G*=256);)Q+=this[p+--B]*G;return G*=128,Q>=G&&(Q-=Math.pow(2,8*m)),Q},l.prototype.readInt8=function(p,m){return p=p>>>0,m||ie(p,1,this.length),this[p]&128?(255-this[p]+1)*-1:this[p]},l.prototype.readInt16LE=function(p,m){p=p>>>0,m||ie(p,2,this.length);const $=this[p]|this[p+1]<<8;return $&32768?$|4294901760:$},l.prototype.readInt16BE=function(p,m){p=p>>>0,m||ie(p,2,this.length);const $=this[p+1]|this[p]<<8;return $&32768?$|4294901760:$},l.prototype.readInt32LE=function(p,m){return p=p>>>0,m||ie(p,4,this.length),this[p]|this[p+1]<<8|this[p+2]<<16|this[p+3]<<24},l.prototype.readInt32BE=function(p,m){return p=p>>>0,m||ie(p,4,this.length),this[p]<<24|this[p+1]<<16|this[p+2]<<8|this[p+3]},l.prototype.readBigInt64LE=Te(function(p){p=p>>>0,ve(p,"offset");const m=this[p],$=this[p+7];(m===void 0||$===void 0)&&Pe(p,this.length-8);const B=this[p+4]+this[p+5]*2**8+this[p+6]*2**16+($<<24);return(BigInt(B)<<BigInt(32))+BigInt(m+this[++p]*2**8+this[++p]*2**16+this[++p]*2**24)}),l.prototype.readBigInt64BE=Te(function(p){p=p>>>0,ve(p,"offset");const m=this[p],$=this[p+7];(m===void 0||$===void 0)&&Pe(p,this.length-8);const B=(m<<24)+this[++p]*2**16+this[++p]*2**8+this[++p];return(BigInt(B)<<BigInt(32))+BigInt(this[++p]*2**24+this[++p]*2**16+this[++p]*2**8+$)}),l.prototype.readFloatLE=function(p,m){return p=p>>>0,m||ie(p,4,this.length),r.read(this,p,!0,23,4)},l.prototype.readFloatBE=function(p,m){return p=p>>>0,m||ie(p,4,this.length),r.read(this,p,!1,23,4)},l.prototype.readDoubleLE=function(p,m){return p=p>>>0,m||ie(p,8,this.length),r.read(this,p,!0,52,8)},l.prototype.readDoubleBE=function(p,m){return p=p>>>0,m||ie(p,8,this.length),r.read(this,p,!1,52,8)};function Se(b,p,m,$,B,G){if(!l.isBuffer(b))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>B||p<G)throw new RangeError('"value" argument is out of bounds');if(m+$>b.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(p,m,$,B){if(p=+p,m=m>>>0,$=$>>>0,!B){const xe=Math.pow(2,8*$)-1;Se(this,p,m,$,xe,0)}let G=1,Q=0;for(this[m]=p&255;++Q<$&&(G*=256);)this[m+Q]=p/G&255;return m+$},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(p,m,$,B){if(p=+p,m=m>>>0,$=$>>>0,!B){const xe=Math.pow(2,8*$)-1;Se(this,p,m,$,xe,0)}let G=$-1,Q=1;for(this[m+G]=p&255;--G>=0&&(Q*=256);)this[m+G]=p/Q&255;return m+$},l.prototype.writeUint8=l.prototype.writeUInt8=function(p,m,$){return p=+p,m=m>>>0,$||Se(this,p,m,1,255,0),this[m]=p&255,m+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(p,m,$){return p=+p,m=m>>>0,$||Se(this,p,m,2,65535,0),this[m]=p&255,this[m+1]=p>>>8,m+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(p,m,$){return p=+p,m=m>>>0,$||Se(this,p,m,2,65535,0),this[m]=p>>>8,this[m+1]=p&255,m+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(p,m,$){return p=+p,m=m>>>0,$||Se(this,p,m,4,4294967295,0),this[m+3]=p>>>24,this[m+2]=p>>>16,this[m+1]=p>>>8,this[m]=p&255,m+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(p,m,$){return p=+p,m=m>>>0,$||Se(this,p,m,4,4294967295,0),this[m]=p>>>24,this[m+1]=p>>>16,this[m+2]=p>>>8,this[m+3]=p&255,m+4};function ge(b,p,m,$,B){we(p,$,B,b,m,7);let G=Number(p&BigInt(4294967295));b[m++]=G,G=G>>8,b[m++]=G,G=G>>8,b[m++]=G,G=G>>8,b[m++]=G;let Q=Number(p>>BigInt(32)&BigInt(4294967295));return b[m++]=Q,Q=Q>>8,b[m++]=Q,Q=Q>>8,b[m++]=Q,Q=Q>>8,b[m++]=Q,m}function Ne(b,p,m,$,B){we(p,$,B,b,m,7);let G=Number(p&BigInt(4294967295));b[m+7]=G,G=G>>8,b[m+6]=G,G=G>>8,b[m+5]=G,G=G>>8,b[m+4]=G;let Q=Number(p>>BigInt(32)&BigInt(4294967295));return b[m+3]=Q,Q=Q>>8,b[m+2]=Q,Q=Q>>8,b[m+1]=Q,Q=Q>>8,b[m]=Q,m+8}l.prototype.writeBigUInt64LE=Te(function(p,m=0){return ge(this,p,m,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=Te(function(p,m=0){return Ne(this,p,m,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(p,m,$,B){if(p=+p,m=m>>>0,!B){const Oe=Math.pow(2,8*$-1);Se(this,p,m,$,Oe-1,-Oe)}let G=0,Q=1,xe=0;for(this[m]=p&255;++G<$&&(Q*=256);)p<0&&xe===0&&this[m+G-1]!==0&&(xe=1),this[m+G]=(p/Q>>0)-xe&255;return m+$},l.prototype.writeIntBE=function(p,m,$,B){if(p=+p,m=m>>>0,!B){const Oe=Math.pow(2,8*$-1);Se(this,p,m,$,Oe-1,-Oe)}let G=$-1,Q=1,xe=0;for(this[m+G]=p&255;--G>=0&&(Q*=256);)p<0&&xe===0&&this[m+G+1]!==0&&(xe=1),this[m+G]=(p/Q>>0)-xe&255;return m+$},l.prototype.writeInt8=function(p,m,$){return p=+p,m=m>>>0,$||Se(this,p,m,1,127,-128),p<0&&(p=255+p+1),this[m]=p&255,m+1},l.prototype.writeInt16LE=function(p,m,$){return p=+p,m=m>>>0,$||Se(this,p,m,2,32767,-32768),this[m]=p&255,this[m+1]=p>>>8,m+2},l.prototype.writeInt16BE=function(p,m,$){return p=+p,m=m>>>0,$||Se(this,p,m,2,32767,-32768),this[m]=p>>>8,this[m+1]=p&255,m+2},l.prototype.writeInt32LE=function(p,m,$){return p=+p,m=m>>>0,$||Se(this,p,m,4,2147483647,-2147483648),this[m]=p&255,this[m+1]=p>>>8,this[m+2]=p>>>16,this[m+3]=p>>>24,m+4},l.prototype.writeInt32BE=function(p,m,$){return p=+p,m=m>>>0,$||Se(this,p,m,4,2147483647,-2147483648),p<0&&(p=4294967295+p+1),this[m]=p>>>24,this[m+1]=p>>>16,this[m+2]=p>>>8,this[m+3]=p&255,m+4},l.prototype.writeBigInt64LE=Te(function(p,m=0){return ge(this,p,m,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=Te(function(p,m=0){return Ne(this,p,m,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function be(b,p,m,$,B,G){if(m+$>b.length)throw new RangeError("Index out of range");if(m<0)throw new RangeError("Index out of range")}function Ae(b,p,m,$,B){return p=+p,m=m>>>0,B||be(b,p,m,4),r.write(b,p,m,$,23,4),m+4}l.prototype.writeFloatLE=function(p,m,$){return Ae(this,p,m,!0,$)},l.prototype.writeFloatBE=function(p,m,$){return Ae(this,p,m,!1,$)};function X(b,p,m,$,B){return p=+p,m=m>>>0,B||be(b,p,m,8),r.write(b,p,m,$,52,8),m+8}l.prototype.writeDoubleLE=function(p,m,$){return X(this,p,m,!0,$)},l.prototype.writeDoubleBE=function(p,m,$){return X(this,p,m,!1,$)},l.prototype.copy=function(p,m,$,B){if(!l.isBuffer(p))throw new TypeError("argument should be a Buffer");if($||($=0),!B&&B!==0&&(B=this.length),m>=p.length&&(m=p.length),m||(m=0),B>0&&B<$&&(B=$),B===$||p.length===0||this.length===0)return 0;if(m<0)throw new RangeError("targetStart out of bounds");if($<0||$>=this.length)throw new RangeError("Index out of range");if(B<0)throw new RangeError("sourceEnd out of bounds");B>this.length&&(B=this.length),p.length-m<B-$&&(B=p.length-m+$);const G=B-$;return this===p&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(m,$,B):Uint8Array.prototype.set.call(p,this.subarray($,B),m),G},l.prototype.fill=function(p,m,$,B){if(typeof p=="string"){if(typeof m=="string"?(B=m,m=0,$=this.length):typeof $=="string"&&(B=$,$=this.length),B!==void 0&&typeof B!="string")throw new TypeError("encoding must be a string");if(typeof B=="string"&&!l.isEncoding(B))throw new TypeError("Unknown encoding: "+B);if(p.length===1){const Q=p.charCodeAt(0);(B==="utf8"&&Q<128||B==="latin1")&&(p=Q)}}else typeof p=="number"?p=p&255:typeof p=="boolean"&&(p=Number(p));if(m<0||this.length<m||this.length<$)throw new RangeError("Out of range index");if($<=m)return this;m=m>>>0,$=$===void 0?this.length:$>>>0,p||(p=0);let G;if(typeof p=="number")for(G=m;G<$;++G)this[G]=p;else{const Q=l.isBuffer(p)?p:l.from(p,B),xe=Q.length;if(xe===0)throw new TypeError('The value "'+p+'" is invalid for argument "value"');for(G=0;G<$-m;++G)this[G+m]=Q[G%xe]}return this};const Y={};function W(b,p,m){Y[b]=class extends m{constructor(){super(),Object.defineProperty(this,"message",{value:p.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${b}]`,this.stack,delete this.name}get code(){return b}set code(B){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:B,writable:!0})}toString(){return`${this.name} [${b}]: ${this.message}`}}}W("ERR_BUFFER_OUT_OF_BOUNDS",function(b){return b?`${b} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),W("ERR_INVALID_ARG_TYPE",function(b,p){return`The "${b}" argument must be of type number. Received type ${typeof p}`},TypeError),W("ERR_OUT_OF_RANGE",function(b,p,m){let $=`The value of "${b}" is out of range.`,B=m;return Number.isInteger(m)&&Math.abs(m)>2**32?B=w(String(m)):typeof m=="bigint"&&(B=String(m),(m>BigInt(2)**BigInt(32)||m<-(BigInt(2)**BigInt(32)))&&(B=w(B)),B+="n"),$+=` It must be ${p}. Received ${B}`,$},RangeError);function w(b){let p="",m=b.length;const $=b[0]==="-"?1:0;for(;m>=$+4;m-=3)p=`_${b.slice(m-3,m)}${p}`;return`${b.slice(0,m)}${p}`}function F(b,p,m){ve(p,"offset"),(b[p]===void 0||b[p+m]===void 0)&&Pe(p,b.length-(m+1))}function we(b,p,m,$,B,G){if(b>m||b<p){const Q=typeof p=="bigint"?"n":"";let xe;throw G>3?p===0||p===BigInt(0)?xe=`>= 0${Q} and < 2${Q} ** ${(G+1)*8}${Q}`:xe=`>= -(2${Q} ** ${(G+1)*8-1}${Q}) and < 2 ** ${(G+1)*8-1}${Q}`:xe=`>= ${p}${Q} and <= ${m}${Q}`,new Y.ERR_OUT_OF_RANGE("value",xe,b)}F($,B,G)}function ve(b,p){if(typeof b!="number")throw new Y.ERR_INVALID_ARG_TYPE(p,"number",b)}function Pe(b,p,m){throw Math.floor(b)!==b?(ve(b,m),new Y.ERR_OUT_OF_RANGE(m||"offset","an integer",b)):p<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(m||"offset",`>= ${m?1:0} and <= ${p}`,b)}const tt=/[^+/0-9A-Za-z-_]/g;function ot(b){if(b=b.split("=")[0],b=b.trim().replace(tt,""),b.length<2)return"";for(;b.length%4!==0;)b=b+"=";return b}function qe(b,p){p=p||1/0;let m;const $=b.length;let B=null;const G=[];for(let Q=0;Q<$;++Q){if(m=b.charCodeAt(Q),m>55295&&m<57344){if(!B){if(m>56319){(p-=3)>-1&&G.push(239,191,189);continue}else if(Q+1===$){(p-=3)>-1&&G.push(239,191,189);continue}B=m;continue}if(m<56320){(p-=3)>-1&&G.push(239,191,189),B=m;continue}m=(B-55296<<10|m-56320)+65536}else B&&(p-=3)>-1&&G.push(239,191,189);if(B=null,m<128){if((p-=1)<0)break;G.push(m)}else if(m<2048){if((p-=2)<0)break;G.push(m>>6|192,m&63|128)}else if(m<65536){if((p-=3)<0)break;G.push(m>>12|224,m>>6&63|128,m&63|128)}else if(m<1114112){if((p-=4)<0)break;G.push(m>>18|240,m>>12&63|128,m>>6&63|128,m&63|128)}else throw new Error("Invalid code point")}return G}function At(b){const p=[];for(let m=0;m<b.length;++m)p.push(b.charCodeAt(m)&255);return p}function $t(b,p){let m,$,B;const G=[];for(let Q=0;Q<b.length&&!((p-=2)<0);++Q)m=b.charCodeAt(Q),$=m>>8,B=m%256,G.push(B),G.push($);return G}function Ye(b){return e.toByteArray(ot(b))}function je(b,p,m,$){let B;for(B=0;B<$&&!(B+m>=p.length||B>=b.length);++B)p[B+m]=b[B];return B}function Me(b,p){return b instanceof p||b!=null&&b.constructor!=null&&b.constructor.name!=null&&b.constructor.name===p.name}function ze(b){return b!==b}const et=function(){const b="0123456789abcdef",p=new Array(256);for(let m=0;m<16;++m){const $=m*16;for(let B=0;B<16;++B)p[$+B]=b[m]+b[B]}return p}();function Te(b){return typeof BigInt>"u"?Ve:b}function Ve(){throw new Error("BigInt not supported")}})(vg);let gh;const Nt={ethereumClient:void 0,setEthereumClient(t){gh=t},client(){if(gh)return gh;throw new Error("ClientCtrl has no client set")}},Bt=ai({address:void 0,profileName:void 0,profileAvatar:void 0,profileLoading:!1,balanceLoading:!1,balance:void 0,isConnected:!1}),Et={state:Bt,subscribe(t){return Fi(Bt,()=>t(Bt))},getAccount(){const t=Nt.client().getAccount();Bt.address=t.address,Bt.isConnected=t.isConnected},async fetchProfile(t,e){try{Bt.profileLoading=!0;const r=e??Bt.address,{id:n}=Nt.client().getDefaultChain();if(r&&n===1){const[i,o]=await Promise.all([Nt.client().fetchEnsName({address:r,chainId:1}),Nt.client().fetchEnsAvatar({address:r,chainId:1})]);o&&await t(o),Bt.profileName=i,Bt.profileAvatar=o}}finally{Bt.profileLoading=!1}},async fetchBalance(t){try{Bt.balanceLoading=!0;const e=t??Bt.address;if(e){const r=await Nt.client().fetchBalance({address:e});Bt.balance={amount:r.formatted,symbol:r.symbol}}}finally{Bt.balanceLoading=!1}},setAddress(t){Bt.address=t},setIsConnected(t){Bt.isConnected=t},resetBalance(){Bt.balance=void 0},resetAccount(){Bt.address=void 0,Bt.isConnected=!1,Bt.profileName=void 0,Bt.profileAvatar=void 0,Bt.balance=void 0}},nt={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",W3M_VERSION:"W3M_VERSION",isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return nt.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isEmptyObject(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.getOwnPropertyNames(t).length===0&&Object.getOwnPropertySymbols(t).length===0},isHttpUrl(t){return t.startsWith("http://")||t.startsWith("https://")},formatNativeUrl(t,e,r){if(nt.isHttpUrl(t))return this.formatUniversalUrl(t,e,r);let n=t;n.includes("://")||(n=t.replaceAll("/","").replaceAll(":",""),n=`${n}://`),this.setWalletConnectDeepLink(n,r);const i=encodeURIComponent(e);return`${n}wc?uri=${i}`},formatUniversalUrl(t,e,r){if(!nt.isHttpUrl(t))return this.formatNativeUrl(t,e,r);let n=t;t.endsWith("/")&&(n=t.slice(0,-1)),this.setWalletConnectDeepLink(n,r);const i=encodeURIComponent(e);return`${n}/wc?uri=${i}`},async wait(t){return new Promise(e=>{setTimeout(e,t)})},openHref(t,e){window.open(t,e,"noreferrer noopener")},setWalletConnectDeepLink(t,e){localStorage.setItem(nt.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:e}))},setWalletConnectAndroidDeepLink(t){const[e]=t.split("?");localStorage.setItem(nt.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:"Android"}))},removeWalletConnectDeepLink(){localStorage.removeItem(nt.WALLETCONNECT_DEEPLINK_CHOICE)},isNull(t){return t===null},setWeb3ModalVersionInStorage(){typeof localStorage<"u"&&localStorage.setItem(nt.W3M_VERSION,"2.2.2")}},Pr=ai({selectedChain:void 0,chains:void 0,standaloneChains:void 0,standaloneUri:void 0,isStandalone:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1,walletConnectVersion:1}),$e={state:Pr,subscribe(t){return Fi(Pr,()=>t(Pr))},setChains(t){Pr.chains=t},setStandaloneChains(t){Pr.standaloneChains=t},setStandaloneUri(t){Pr.standaloneUri=t},getSelectedChain(){const t=Nt.client().getNetwork().chain;return t&&(Pr.selectedChain=t),Pr.selectedChain},setSelectedChain(t){Pr.selectedChain=t},setIsStandalone(t){Pr.isStandalone=t},setIsCustomDesktop(t){Pr.isCustomDesktop=t},setIsCustomMobile(t){Pr.isCustomMobile=t},setIsDataLoaded(t){Pr.isDataLoaded=t},setIsUiLoaded(t){Pr.isUiLoaded=t},setWalletConnectVersion(t){Pr.walletConnectVersion=t}},ic=ai({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chainImages:void 0,tokenImages:void 0,standaloneChains:void 0,enableStandaloneMode:!1,enableNetworkView:!1,enableAccountView:!0,enableExplorer:!0,defaultChain:void 0,explorerAllowList:void 0,explorerDenyList:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),ar={state:ic,subscribe(t){return Fi(ic,()=>t(ic))},setConfig(t){var e,r,n,i;if($e.setStandaloneChains(t.standaloneChains),$e.setIsStandalone(!!((e=t.standaloneChains)!=null&&e.length)||!!t.enableStandaloneMode),$e.setIsCustomMobile(!!((r=t.mobileWallets)!=null&&r.length)),$e.setIsCustomDesktop(!!((n=t.desktopWallets)!=null&&n.length)),$e.setWalletConnectVersion((i=t.walletConnectVersion)!=null?i:1),!$e.state.isStandalone){const o=Nt.client().getDefaultChain();$e.setSelectedChain(o),$e.setChains(Nt.client().chains)}t.defaultChain&&$e.setSelectedChain(t.defaultChain),nt.setWeb3ModalVersionInStorage(),Object.assign(ic,t)}},bg="https://explorer-api.walletconnect.com";function G7(t){const e=Object.fromEntries(Object.entries(t).filter(([r,n])=>typeof n<"u"&&n!==null&&n!=="").map(([r,n])=>[r,n.toString()]));return new URLSearchParams(e).toString()}const sc={async fetchWallets(t,e){const r=G7(e),n=`${bg}/v3/wallets?projectId=${t}&${r}`;return(await fetch(n)).json()},formatImageUrl(t,e){return`${bg}/v3/logo/lg/${e}?projectId=${t}`}},Bi=ai({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},previewWallets:[],recomendedWallets:[]});function oc(){const{projectId:t}=ar.state;if(!t)throw new Error("projectId is required to work with explorer api");return t}const cr={state:Bi,async getPreviewWallets(t){const{listings:e}=await sc.fetchWallets(oc(),t);return Bi.previewWallets=Object.values(e),Bi.previewWallets},async getRecomendedWallets(){const{listings:t}=await sc.fetchWallets(oc(),{page:1,entries:6});Bi.recomendedWallets=Object.values(t)},async getPaginatedWallets(t){const{page:e,search:r}=t,{listings:n,total:i}=await sc.fetchWallets(oc(),t),o=Object.values(n),c=r?"search":"wallets";return Bi[c]={listings:[...Bi[c].listings,...o],total:i,page:e??1},{listings:o,total:i}},getImageUrl(t){return sc.formatImageUrl(oc(),t)},resetSearch(){Bi.search={listings:[],total:0,page:1}}},Gr=ai({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),lt={state:Gr,subscribe(t){return Fi(Gr,()=>t(Gr))},push(t,e){t!==Gr.view&&(Gr.view=t,e&&(Gr.data=e),Gr.history.push(t))},replace(t){Gr.view=t,Gr.history=[t]},goBack(){if(Gr.history.length>1){Gr.history.pop();const[t]=Gr.history.slice(-1);Gr.view=t}}},xs=ai({open:!1}),lr={state:xs,subscribe(t){return Fi(xs,()=>t(xs))},async open(t){return new Promise(e=>{const{isStandalone:r,isUiLoaded:n,isDataLoaded:i}=$e.state,{isConnected:o}=Et.state,{enableNetworkView:c}=ar.state;if(r?($e.setStandaloneUri(t?.uri),$e.setStandaloneChains(t?.standaloneChains),lt.replace("ConnectWallet")):t!=null&&t.route?lt.replace(t.route):o?lt.replace("Account"):c?lt.replace("SelectNetwork"):lt.replace("ConnectWallet"),n&&i)xs.open=!0,e();else{const l=setInterval(()=>{$e.state.isUiLoaded&&$e.state.isDataLoaded&&(clearInterval(l),xs.open=!0,e())},200)}})},close(){xs.open=!1}};var Z7=Object.defineProperty,_g=Object.getOwnPropertySymbols,Y7=Object.prototype.hasOwnProperty,J7=Object.prototype.propertyIsEnumerable,Eg=(t,e,r)=>e in t?Z7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,X7=(t,e)=>{for(var r in e||(e={}))Y7.call(e,r)&&Eg(t,r,e[r]);if(_g)for(var r of _g(e))J7.call(e,r)&&Eg(t,r,e[r]);return t};function Q7(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const Lo=ai({themeMode:Q7()?"dark":"light"}),Hn={state:Lo,subscribe(t){return Fi(Lo,()=>t(Lo))},setThemeConfig(t){const{themeMode:e,themeVariables:r}=t;e&&(Lo.themeMode=e),r&&(Lo.themeVariables=X7({},r))}},ki=ai({open:!1,message:"",variant:"success"}),xr={state:ki,subscribe(t){return Fi(ki,()=>t(ki))},openToast(t,e){ki.open=!0,ki.message=t,ki.variant=e},closeToast(){ki.open=!1}};typeof window<"u"&&(window.Buffer||(window.Buffer=vg.Buffer),window.global||(window.global=window),window.process||(window.process={env:{}}));var ex=Object.defineProperty,xg=Object.getOwnPropertySymbols,tx=Object.prototype.hasOwnProperty,rx=Object.prototype.propertyIsEnumerable,Cg=(t,e,r)=>e in t?ex(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,nx=(t,e)=>{for(var r in e||(e={}))tx.call(e,r)&&Cg(t,r,e[r]);if(xg)for(var r of xg(e))rx.call(e,r)&&Cg(t,r,e[r]);return t};class ix{constructor(e){this.openModal=lr.open,this.closeModal=lr.close,this.subscribeModal=lr.subscribe,this.setTheme=Hn.setThemeConfig,Hn.setThemeConfig(e),ar.setConfig(nx({enableStandaloneMode:!0},e)),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(function(){return wD});const e=document.createElement("w3m-modal");document.body.insertAdjacentElement("beforeend",e),$e.setIsUiLoaded(!0)}}}var sx=Object.freeze({__proto__:null,Web3Modal:ix});/**
|
|
103
|
+
*/(function(t){const e=fc,r=Ch,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=N,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i,l.TYPED_ARRAY_SUPPORT=o(),!l.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{const b=new Uint8Array(1),p={foo:function(){return 42}};return Object.setPrototypeOf(p,Uint8Array.prototype),Object.setPrototypeOf(b,p),b.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function c(b){if(b>i)throw new RangeError('The value "'+b+'" is invalid for option "size"');const p=new Uint8Array(b);return Object.setPrototypeOf(p,l.prototype),p}function l(b,p,m){if(typeof b=="number"){if(typeof p=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return E(b)}return h(b,p,m)}l.poolSize=8192;function h(b,p,m){if(typeof b=="string")return _(b,p);if(ArrayBuffer.isView(b))return P(b);if(b==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b);if(Be(b,ArrayBuffer)||b&&Be(b.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Be(b,SharedArrayBuffer)||b&&Be(b.buffer,SharedArrayBuffer)))return U(b,p,m);if(typeof b=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const A=b.valueOf&&b.valueOf();if(A!=null&&A!==b)return l.from(A,p,m);const B=H(b);if(B)return B;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof b[Symbol.toPrimitive]=="function")return l.from(b[Symbol.toPrimitive]("string"),p,m);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b)}l.from=function(b,p,m){return h(b,p,m)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array);function d(b){if(typeof b!="number")throw new TypeError('"size" argument must be of type number');if(b<0)throw new RangeError('The value "'+b+'" is invalid for option "size"')}function v(b,p,m){return d(b),b<=0?c(b):p!==void 0?typeof m=="string"?c(b).fill(p,m):c(b).fill(p):c(b)}l.alloc=function(b,p,m){return v(b,p,m)};function E(b){return d(b),c(b<0?0:G(b)|0)}l.allocUnsafe=function(b){return E(b)},l.allocUnsafeSlow=function(b){return E(b)};function _(b,p){if((typeof p!="string"||p==="")&&(p="utf8"),!l.isEncoding(p))throw new TypeError("Unknown encoding: "+p);const m=L(b,p)|0;let A=c(m);const B=A.write(b,p);return B!==m&&(A=A.slice(0,B)),A}function O(b){const p=b.length<0?0:G(b.length)|0,m=c(p);for(let A=0;A<p;A+=1)m[A]=b[A]&255;return m}function P(b){if(Be(b,Uint8Array)){const p=new Uint8Array(b);return U(p.buffer,p.byteOffset,p.byteLength)}return O(b)}function U(b,p,m){if(p<0||b.byteLength<p)throw new RangeError('"offset" is outside of buffer bounds');if(b.byteLength<p+(m||0))throw new RangeError('"length" is outside of buffer bounds');let A;return p===void 0&&m===void 0?A=new Uint8Array(b):m===void 0?A=new Uint8Array(b,p):A=new Uint8Array(b,p,m),Object.setPrototypeOf(A,l.prototype),A}function H(b){if(l.isBuffer(b)){const p=G(b.length)|0,m=c(p);return m.length===0||b.copy(m,0,0,p),m}if(b.length!==void 0)return typeof b.length!="number"||Ke(b.length)?c(0):O(b);if(b.type==="Buffer"&&Array.isArray(b.data))return O(b.data)}function G(b){if(b>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return b|0}function N(b){return+b!=b&&(b=0),l.alloc(+b)}l.isBuffer=function(p){return p!=null&&p._isBuffer===!0&&p!==l.prototype},l.compare=function(p,m){if(Be(p,Uint8Array)&&(p=l.from(p,p.offset,p.byteLength)),Be(m,Uint8Array)&&(m=l.from(m,m.offset,m.byteLength)),!l.isBuffer(p)||!l.isBuffer(m))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(p===m)return 0;let A=p.length,B=m.length;for(let K=0,Q=Math.min(A,B);K<Q;++K)if(p[K]!==m[K]){A=p[K],B=m[K];break}return A<B?-1:B<A?1:0},l.isEncoding=function(p){switch(String(p).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(p,m){if(!Array.isArray(p))throw new TypeError('"list" argument must be an Array of Buffers');if(p.length===0)return l.alloc(0);let A;if(m===void 0)for(m=0,A=0;A<p.length;++A)m+=p[A].length;const B=l.allocUnsafe(m);let K=0;for(A=0;A<p.length;++A){let Q=p[A];if(Be(Q,Uint8Array))K+Q.length>B.length?(l.isBuffer(Q)||(Q=l.from(Q)),Q.copy(B,K)):Uint8Array.prototype.set.call(B,Q,K);else if(l.isBuffer(Q))Q.copy(B,K);else throw new TypeError('"list" argument must be an Array of Buffers');K+=Q.length}return B};function L(b,p){if(l.isBuffer(b))return b.length;if(ArrayBuffer.isView(b)||Be(b,ArrayBuffer))return b.byteLength;if(typeof b!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof b);const m=b.length,A=arguments.length>2&&arguments[2]===!0;if(!A&&m===0)return 0;let B=!1;for(;;)switch(p){case"ascii":case"latin1":case"binary":return m;case"utf8":case"utf-8":return Ge(b).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m*2;case"hex":return m>>>1;case"base64":return Je(b).length;default:if(B)return A?-1:Ge(b).length;p=(""+p).toLowerCase(),B=!0}}l.byteLength=L;function $(b,p,m){let A=!1;if((p===void 0||p<0)&&(p=0),p>this.length||((m===void 0||m>this.length)&&(m=this.length),m<=0)||(m>>>=0,p>>>=0,m<=p))return"";for(b||(b="utf8");;)switch(b){case"hex":return ne(this,p,m);case"utf8":case"utf-8":return S(this,p,m);case"ascii":return le(this,p,m);case"latin1":case"binary":return re(this,p,m);case"base64":return me(this,p,m);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae(this,p,m);default:if(A)throw new TypeError("Unknown encoding: "+b);b=(b+"").toLowerCase(),A=!0}}l.prototype._isBuffer=!0;function T(b,p,m){const A=b[p];b[p]=b[m],b[m]=A}l.prototype.swap16=function(){const p=this.length;if(p%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let m=0;m<p;m+=2)T(this,m,m+1);return this},l.prototype.swap32=function(){const p=this.length;if(p%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let m=0;m<p;m+=4)T(this,m,m+3),T(this,m+1,m+2);return this},l.prototype.swap64=function(){const p=this.length;if(p%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let m=0;m<p;m+=8)T(this,m,m+7),T(this,m+1,m+6),T(this,m+2,m+5),T(this,m+3,m+4);return this},l.prototype.toString=function(){const p=this.length;return p===0?"":arguments.length===0?S(this,0,p):$.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(p){if(!l.isBuffer(p))throw new TypeError("Argument must be a Buffer");return this===p?!0:l.compare(this,p)===0},l.prototype.inspect=function(){let p="";const m=t.INSPECT_MAX_BYTES;return p=this.toString("hex",0,m).replace(/(.{2})/g,"$1 ").trim(),this.length>m&&(p+=" ... "),"<Buffer "+p+">"},n&&(l.prototype[n]=l.prototype.inspect),l.prototype.compare=function(p,m,A,B,K){if(Be(p,Uint8Array)&&(p=l.from(p,p.offset,p.byteLength)),!l.isBuffer(p))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof p);if(m===void 0&&(m=0),A===void 0&&(A=p?p.length:0),B===void 0&&(B=0),K===void 0&&(K=this.length),m<0||A>p.length||B<0||K>this.length)throw new RangeError("out of range index");if(B>=K&&m>=A)return 0;if(B>=K)return-1;if(m>=A)return 1;if(m>>>=0,A>>>=0,B>>>=0,K>>>=0,this===p)return 0;let Q=K-B,Ee=A-m;const Te=Math.min(Q,Ee),st=this.slice(B,K),ht=p.slice(m,A);for(let lt=0;lt<Te;++lt)if(st[lt]!==ht[lt]){Q=st[lt],Ee=ht[lt];break}return Q<Ee?-1:Ee<Q?1:0};function I(b,p,m,A,B){if(b.length===0)return-1;if(typeof m=="string"?(A=m,m=0):m>2147483647?m=2147483647:m<-2147483648&&(m=-2147483648),m=+m,Ke(m)&&(m=B?0:b.length-1),m<0&&(m=b.length+m),m>=b.length){if(B)return-1;m=b.length-1}else if(m<0)if(B)m=0;else return-1;if(typeof p=="string"&&(p=l.from(p,A)),l.isBuffer(p))return p.length===0?-1:f(b,p,m,A,B);if(typeof p=="number")return p=p&255,typeof Uint8Array.prototype.indexOf=="function"?B?Uint8Array.prototype.indexOf.call(b,p,m):Uint8Array.prototype.lastIndexOf.call(b,p,m):f(b,[p],m,A,B);throw new TypeError("val must be string, number or Buffer")}function f(b,p,m,A,B){let K=1,Q=b.length,Ee=p.length;if(A!==void 0&&(A=String(A).toLowerCase(),A==="ucs2"||A==="ucs-2"||A==="utf16le"||A==="utf-16le")){if(b.length<2||p.length<2)return-1;K=2,Q/=2,Ee/=2,m/=2}function Te(ht,lt){return K===1?ht[lt]:ht.readUInt16BE(lt*K)}let st;if(B){let ht=-1;for(st=m;st<Q;st++)if(Te(b,st)===Te(p,ht===-1?0:st-ht)){if(ht===-1&&(ht=st),st-ht+1===Ee)return ht*K}else ht!==-1&&(st-=st-ht),ht=-1}else for(m+Ee>Q&&(m=Q-Ee),st=m;st>=0;st--){let ht=!0;for(let lt=0;lt<Ee;lt++)if(Te(b,st+lt)!==Te(p,lt)){ht=!1;break}if(ht)return st}return-1}l.prototype.includes=function(p,m,A){return this.indexOf(p,m,A)!==-1},l.prototype.indexOf=function(p,m,A){return I(this,p,m,A,!0)},l.prototype.lastIndexOf=function(p,m,A){return I(this,p,m,A,!1)};function x(b,p,m,A){m=Number(m)||0;const B=b.length-m;A?(A=Number(A),A>B&&(A=B)):A=B;const K=p.length;A>K/2&&(A=K/2);let Q;for(Q=0;Q<A;++Q){const Ee=parseInt(p.substr(Q*2,2),16);if(Ke(Ee))return Q;b[m+Q]=Ee}return Q}function J(b,p,m,A){return He(Ge(p,b.length-m),b,m,A)}function z(b,p,m,A){return He(At(p),b,m,A)}function ee(b,p,m,A){return He(Je(p),b,m,A)}function de(b,p,m,A){return He($t(p,b.length-m),b,m,A)}l.prototype.write=function(p,m,A,B){if(m===void 0)B="utf8",A=this.length,m=0;else if(A===void 0&&typeof m=="string")B=m,A=this.length,m=0;else if(isFinite(m))m=m>>>0,isFinite(A)?(A=A>>>0,B===void 0&&(B="utf8")):(B=A,A=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const K=this.length-m;if((A===void 0||A>K)&&(A=K),p.length>0&&(A<0||m<0)||m>this.length)throw new RangeError("Attempt to write outside buffer bounds");B||(B="utf8");let Q=!1;for(;;)switch(B){case"hex":return x(this,p,m,A);case"utf8":case"utf-8":return J(this,p,m,A);case"ascii":case"latin1":case"binary":return z(this,p,m,A);case"base64":return ee(this,p,m,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return de(this,p,m,A);default:if(Q)throw new TypeError("Unknown encoding: "+B);B=(""+B).toLowerCase(),Q=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function me(b,p,m){return p===0&&m===b.length?e.fromByteArray(b):e.fromByteArray(b.slice(p,m))}function S(b,p,m){m=Math.min(b.length,m);const A=[];let B=p;for(;B<m;){const K=b[B];let Q=null,Ee=K>239?4:K>223?3:K>191?2:1;if(B+Ee<=m){let Te,st,ht,lt;switch(Ee){case 1:K<128&&(Q=K);break;case 2:Te=b[B+1],(Te&192)===128&&(lt=(K&31)<<6|Te&63,lt>127&&(Q=lt));break;case 3:Te=b[B+1],st=b[B+2],(Te&192)===128&&(st&192)===128&&(lt=(K&15)<<12|(Te&63)<<6|st&63,lt>2047&&(lt<55296||lt>57343)&&(Q=lt));break;case 4:Te=b[B+1],st=b[B+2],ht=b[B+3],(Te&192)===128&&(st&192)===128&&(ht&192)===128&&(lt=(K&15)<<18|(Te&63)<<12|(st&63)<<6|ht&63,lt>65535&<<1114112&&(Q=lt))}}Q===null?(Q=65533,Ee=1):Q>65535&&(Q-=65536,A.push(Q>>>10&1023|55296),Q=56320|Q&1023),A.push(Q),B+=Ee}return ce(A)}const j=4096;function ce(b){const p=b.length;if(p<=j)return String.fromCharCode.apply(String,b);let m="",A=0;for(;A<p;)m+=String.fromCharCode.apply(String,b.slice(A,A+=j));return m}function le(b,p,m){let A="";m=Math.min(b.length,m);for(let B=p;B<m;++B)A+=String.fromCharCode(b[B]&127);return A}function re(b,p,m){let A="";m=Math.min(b.length,m);for(let B=p;B<m;++B)A+=String.fromCharCode(b[B]);return A}function ne(b,p,m){const A=b.length;(!p||p<0)&&(p=0),(!m||m<0||m>A)&&(m=A);let B="";for(let K=p;K<m;++K)B+=rt[b[K]];return B}function ae(b,p,m){const A=b.slice(p,m);let B="";for(let K=0;K<A.length-1;K+=2)B+=String.fromCharCode(A[K]+A[K+1]*256);return B}l.prototype.slice=function(p,m){const A=this.length;p=~~p,m=m===void 0?A:~~m,p<0?(p+=A,p<0&&(p=0)):p>A&&(p=A),m<0?(m+=A,m<0&&(m=0)):m>A&&(m=A),m<p&&(m=p);const B=this.subarray(p,m);return Object.setPrototypeOf(B,l.prototype),B};function ie(b,p,m){if(b%1!==0||b<0)throw new RangeError("offset is not uint");if(b+p>m)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(p,m,A){p=p>>>0,m=m>>>0,A||ie(p,m,this.length);let B=this[p],K=1,Q=0;for(;++Q<m&&(K*=256);)B+=this[p+Q]*K;return B},l.prototype.readUintBE=l.prototype.readUIntBE=function(p,m,A){p=p>>>0,m=m>>>0,A||ie(p,m,this.length);let B=this[p+--m],K=1;for(;m>0&&(K*=256);)B+=this[p+--m]*K;return B},l.prototype.readUint8=l.prototype.readUInt8=function(p,m){return p=p>>>0,m||ie(p,1,this.length),this[p]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(p,m){return p=p>>>0,m||ie(p,2,this.length),this[p]|this[p+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(p,m){return p=p>>>0,m||ie(p,2,this.length),this[p]<<8|this[p+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(p,m){return p=p>>>0,m||ie(p,4,this.length),(this[p]|this[p+1]<<8|this[p+2]<<16)+this[p+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(p,m){return p=p>>>0,m||ie(p,4,this.length),this[p]*16777216+(this[p+1]<<16|this[p+2]<<8|this[p+3])},l.prototype.readBigUInt64LE=Ue(function(p){p=p>>>0,ve(p,"offset");const m=this[p],A=this[p+7];(m===void 0||A===void 0)&&Me(p,this.length-8);const B=m+this[++p]*2**8+this[++p]*2**16+this[++p]*2**24,K=this[++p]+this[++p]*2**8+this[++p]*2**16+A*2**24;return BigInt(B)+(BigInt(K)<<BigInt(32))}),l.prototype.readBigUInt64BE=Ue(function(p){p=p>>>0,ve(p,"offset");const m=this[p],A=this[p+7];(m===void 0||A===void 0)&&Me(p,this.length-8);const B=m*2**24+this[++p]*2**16+this[++p]*2**8+this[++p],K=this[++p]*2**24+this[++p]*2**16+this[++p]*2**8+A;return(BigInt(B)<<BigInt(32))+BigInt(K)}),l.prototype.readIntLE=function(p,m,A){p=p>>>0,m=m>>>0,A||ie(p,m,this.length);let B=this[p],K=1,Q=0;for(;++Q<m&&(K*=256);)B+=this[p+Q]*K;return K*=128,B>=K&&(B-=Math.pow(2,8*m)),B},l.prototype.readIntBE=function(p,m,A){p=p>>>0,m=m>>>0,A||ie(p,m,this.length);let B=m,K=1,Q=this[p+--B];for(;B>0&&(K*=256);)Q+=this[p+--B]*K;return K*=128,Q>=K&&(Q-=Math.pow(2,8*m)),Q},l.prototype.readInt8=function(p,m){return p=p>>>0,m||ie(p,1,this.length),this[p]&128?(255-this[p]+1)*-1:this[p]},l.prototype.readInt16LE=function(p,m){p=p>>>0,m||ie(p,2,this.length);const A=this[p]|this[p+1]<<8;return A&32768?A|4294901760:A},l.prototype.readInt16BE=function(p,m){p=p>>>0,m||ie(p,2,this.length);const A=this[p+1]|this[p]<<8;return A&32768?A|4294901760:A},l.prototype.readInt32LE=function(p,m){return p=p>>>0,m||ie(p,4,this.length),this[p]|this[p+1]<<8|this[p+2]<<16|this[p+3]<<24},l.prototype.readInt32BE=function(p,m){return p=p>>>0,m||ie(p,4,this.length),this[p]<<24|this[p+1]<<16|this[p+2]<<8|this[p+3]},l.prototype.readBigInt64LE=Ue(function(p){p=p>>>0,ve(p,"offset");const m=this[p],A=this[p+7];(m===void 0||A===void 0)&&Me(p,this.length-8);const B=this[p+4]+this[p+5]*2**8+this[p+6]*2**16+(A<<24);return(BigInt(B)<<BigInt(32))+BigInt(m+this[++p]*2**8+this[++p]*2**16+this[++p]*2**24)}),l.prototype.readBigInt64BE=Ue(function(p){p=p>>>0,ve(p,"offset");const m=this[p],A=this[p+7];(m===void 0||A===void 0)&&Me(p,this.length-8);const B=(m<<24)+this[++p]*2**16+this[++p]*2**8+this[++p];return(BigInt(B)<<BigInt(32))+BigInt(this[++p]*2**24+this[++p]*2**16+this[++p]*2**8+A)}),l.prototype.readFloatLE=function(p,m){return p=p>>>0,m||ie(p,4,this.length),r.read(this,p,!0,23,4)},l.prototype.readFloatBE=function(p,m){return p=p>>>0,m||ie(p,4,this.length),r.read(this,p,!1,23,4)},l.prototype.readDoubleLE=function(p,m){return p=p>>>0,m||ie(p,8,this.length),r.read(this,p,!0,52,8)},l.prototype.readDoubleBE=function(p,m){return p=p>>>0,m||ie(p,8,this.length),r.read(this,p,!1,52,8)};function De(b,p,m,A,B,K){if(!l.isBuffer(b))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>B||p<K)throw new RangeError('"value" argument is out of bounds');if(m+A>b.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(p,m,A,B){if(p=+p,m=m>>>0,A=A>>>0,!B){const Ee=Math.pow(2,8*A)-1;De(this,p,m,A,Ee,0)}let K=1,Q=0;for(this[m]=p&255;++Q<A&&(K*=256);)this[m+Q]=p/K&255;return m+A},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(p,m,A,B){if(p=+p,m=m>>>0,A=A>>>0,!B){const Ee=Math.pow(2,8*A)-1;De(this,p,m,A,Ee,0)}let K=A-1,Q=1;for(this[m+K]=p&255;--K>=0&&(Q*=256);)this[m+K]=p/Q&255;return m+A},l.prototype.writeUint8=l.prototype.writeUInt8=function(p,m,A){return p=+p,m=m>>>0,A||De(this,p,m,1,255,0),this[m]=p&255,m+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(p,m,A){return p=+p,m=m>>>0,A||De(this,p,m,2,65535,0),this[m]=p&255,this[m+1]=p>>>8,m+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(p,m,A){return p=+p,m=m>>>0,A||De(this,p,m,2,65535,0),this[m]=p>>>8,this[m+1]=p&255,m+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(p,m,A){return p=+p,m=m>>>0,A||De(this,p,m,4,4294967295,0),this[m+3]=p>>>24,this[m+2]=p>>>16,this[m+1]=p>>>8,this[m]=p&255,m+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(p,m,A){return p=+p,m=m>>>0,A||De(this,p,m,4,4294967295,0),this[m]=p>>>24,this[m+1]=p>>>16,this[m+2]=p>>>8,this[m+3]=p&255,m+4};function ge(b,p,m,A,B){we(p,A,B,b,m,7);let K=Number(p&BigInt(4294967295));b[m++]=K,K=K>>8,b[m++]=K,K=K>>8,b[m++]=K,K=K>>8,b[m++]=K;let Q=Number(p>>BigInt(32)&BigInt(4294967295));return b[m++]=Q,Q=Q>>8,b[m++]=Q,Q=Q>>8,b[m++]=Q,Q=Q>>8,b[m++]=Q,m}function Fe(b,p,m,A,B){we(p,A,B,b,m,7);let K=Number(p&BigInt(4294967295));b[m+7]=K,K=K>>8,b[m+6]=K,K=K>>8,b[m+5]=K,K=K>>8,b[m+4]=K;let Q=Number(p>>BigInt(32)&BigInt(4294967295));return b[m+3]=Q,Q=Q>>8,b[m+2]=Q,Q=Q>>8,b[m+1]=Q,Q=Q>>8,b[m]=Q,m+8}l.prototype.writeBigUInt64LE=Ue(function(p,m=0){return ge(this,p,m,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=Ue(function(p,m=0){return Fe(this,p,m,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(p,m,A,B){if(p=+p,m=m>>>0,!B){const Te=Math.pow(2,8*A-1);De(this,p,m,A,Te-1,-Te)}let K=0,Q=1,Ee=0;for(this[m]=p&255;++K<A&&(Q*=256);)p<0&&Ee===0&&this[m+K-1]!==0&&(Ee=1),this[m+K]=(p/Q>>0)-Ee&255;return m+A},l.prototype.writeIntBE=function(p,m,A,B){if(p=+p,m=m>>>0,!B){const Te=Math.pow(2,8*A-1);De(this,p,m,A,Te-1,-Te)}let K=A-1,Q=1,Ee=0;for(this[m+K]=p&255;--K>=0&&(Q*=256);)p<0&&Ee===0&&this[m+K+1]!==0&&(Ee=1),this[m+K]=(p/Q>>0)-Ee&255;return m+A},l.prototype.writeInt8=function(p,m,A){return p=+p,m=m>>>0,A||De(this,p,m,1,127,-128),p<0&&(p=255+p+1),this[m]=p&255,m+1},l.prototype.writeInt16LE=function(p,m,A){return p=+p,m=m>>>0,A||De(this,p,m,2,32767,-32768),this[m]=p&255,this[m+1]=p>>>8,m+2},l.prototype.writeInt16BE=function(p,m,A){return p=+p,m=m>>>0,A||De(this,p,m,2,32767,-32768),this[m]=p>>>8,this[m+1]=p&255,m+2},l.prototype.writeInt32LE=function(p,m,A){return p=+p,m=m>>>0,A||De(this,p,m,4,2147483647,-2147483648),this[m]=p&255,this[m+1]=p>>>8,this[m+2]=p>>>16,this[m+3]=p>>>24,m+4},l.prototype.writeInt32BE=function(p,m,A){return p=+p,m=m>>>0,A||De(this,p,m,4,2147483647,-2147483648),p<0&&(p=4294967295+p+1),this[m]=p>>>24,this[m+1]=p>>>16,this[m+2]=p>>>8,this[m+3]=p&255,m+4},l.prototype.writeBigInt64LE=Ue(function(p,m=0){return ge(this,p,m,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=Ue(function(p,m=0){return Fe(this,p,m,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ye(b,p,m,A,B,K){if(m+A>b.length)throw new RangeError("Index out of range");if(m<0)throw new RangeError("Index out of range")}function Le(b,p,m,A,B){return p=+p,m=m>>>0,B||ye(b,p,m,4),r.write(b,p,m,A,23,4),m+4}l.prototype.writeFloatLE=function(p,m,A){return Le(this,p,m,!0,A)},l.prototype.writeFloatBE=function(p,m,A){return Le(this,p,m,!1,A)};function X(b,p,m,A,B){return p=+p,m=m>>>0,B||ye(b,p,m,8),r.write(b,p,m,A,52,8),m+8}l.prototype.writeDoubleLE=function(p,m,A){return X(this,p,m,!0,A)},l.prototype.writeDoubleBE=function(p,m,A){return X(this,p,m,!1,A)},l.prototype.copy=function(p,m,A,B){if(!l.isBuffer(p))throw new TypeError("argument should be a Buffer");if(A||(A=0),!B&&B!==0&&(B=this.length),m>=p.length&&(m=p.length),m||(m=0),B>0&&B<A&&(B=A),B===A||p.length===0||this.length===0)return 0;if(m<0)throw new RangeError("targetStart out of bounds");if(A<0||A>=this.length)throw new RangeError("Index out of range");if(B<0)throw new RangeError("sourceEnd out of bounds");B>this.length&&(B=this.length),p.length-m<B-A&&(B=p.length-m+A);const K=B-A;return this===p&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(m,A,B):Uint8Array.prototype.set.call(p,this.subarray(A,B),m),K},l.prototype.fill=function(p,m,A,B){if(typeof p=="string"){if(typeof m=="string"?(B=m,m=0,A=this.length):typeof A=="string"&&(B=A,A=this.length),B!==void 0&&typeof B!="string")throw new TypeError("encoding must be a string");if(typeof B=="string"&&!l.isEncoding(B))throw new TypeError("Unknown encoding: "+B);if(p.length===1){const Q=p.charCodeAt(0);(B==="utf8"&&Q<128||B==="latin1")&&(p=Q)}}else typeof p=="number"?p=p&255:typeof p=="boolean"&&(p=Number(p));if(m<0||this.length<m||this.length<A)throw new RangeError("Out of range index");if(A<=m)return this;m=m>>>0,A=A===void 0?this.length:A>>>0,p||(p=0);let K;if(typeof p=="number")for(K=m;K<A;++K)this[K]=p;else{const Q=l.isBuffer(p)?p:l.from(p,B),Ee=Q.length;if(Ee===0)throw new TypeError('The value "'+p+'" is invalid for argument "value"');for(K=0;K<A-m;++K)this[K+m]=Q[K%Ee]}return this};const Y={};function W(b,p,m){Y[b]=class extends m{constructor(){super(),Object.defineProperty(this,"message",{value:p.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${b}]`,this.stack,delete this.name}get code(){return b}set code(B){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:B,writable:!0})}toString(){return`${this.name} [${b}]: ${this.message}`}}}W("ERR_BUFFER_OUT_OF_BOUNDS",function(b){return b?`${b} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),W("ERR_INVALID_ARG_TYPE",function(b,p){return`The "${b}" argument must be of type number. Received type ${typeof p}`},TypeError),W("ERR_OUT_OF_RANGE",function(b,p,m){let A=`The value of "${b}" is out of range.`,B=m;return Number.isInteger(m)&&Math.abs(m)>2**32?B=w(String(m)):typeof m=="bigint"&&(B=String(m),(m>BigInt(2)**BigInt(32)||m<-(BigInt(2)**BigInt(32)))&&(B=w(B)),B+="n"),A+=` It must be ${p}. Received ${B}`,A},RangeError);function w(b){let p="",m=b.length;const A=b[0]==="-"?1:0;for(;m>=A+4;m-=3)p=`_${b.slice(m-3,m)}${p}`;return`${b.slice(0,m)}${p}`}function F(b,p,m){ve(p,"offset"),(b[p]===void 0||b[p+m]===void 0)&&Me(p,b.length-(m+1))}function we(b,p,m,A,B,K){if(b>m||b<p){const Q=typeof p=="bigint"?"n":"";let Ee;throw K>3?p===0||p===BigInt(0)?Ee=`>= 0${Q} and < 2${Q} ** ${(K+1)*8}${Q}`:Ee=`>= -(2${Q} ** ${(K+1)*8-1}${Q}) and < 2 ** ${(K+1)*8-1}${Q}`:Ee=`>= ${p}${Q} and <= ${m}${Q}`,new Y.ERR_OUT_OF_RANGE("value",Ee,b)}F(A,B,K)}function ve(b,p){if(typeof b!="number")throw new Y.ERR_INVALID_ARG_TYPE(p,"number",b)}function Me(b,p,m){throw Math.floor(b)!==b?(ve(b,m),new Y.ERR_OUT_OF_RANGE(m||"offset","an integer",b)):p<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(m||"offset",`>= ${m?1:0} and <= ${p}`,b)}const nt=/[^+/0-9A-Za-z-_]/g;function at(b){if(b=b.split("=")[0],b=b.trim().replace(nt,""),b.length<2)return"";for(;b.length%4!==0;)b=b+"=";return b}function Ge(b,p){p=p||1/0;let m;const A=b.length;let B=null;const K=[];for(let Q=0;Q<A;++Q){if(m=b.charCodeAt(Q),m>55295&&m<57344){if(!B){if(m>56319){(p-=3)>-1&&K.push(239,191,189);continue}else if(Q+1===A){(p-=3)>-1&&K.push(239,191,189);continue}B=m;continue}if(m<56320){(p-=3)>-1&&K.push(239,191,189),B=m;continue}m=(B-55296<<10|m-56320)+65536}else B&&(p-=3)>-1&&K.push(239,191,189);if(B=null,m<128){if((p-=1)<0)break;K.push(m)}else if(m<2048){if((p-=2)<0)break;K.push(m>>6|192,m&63|128)}else if(m<65536){if((p-=3)<0)break;K.push(m>>12|224,m>>6&63|128,m&63|128)}else if(m<1114112){if((p-=4)<0)break;K.push(m>>18|240,m>>12&63|128,m>>6&63|128,m&63|128)}else throw new Error("Invalid code point")}return K}function At(b){const p=[];for(let m=0;m<b.length;++m)p.push(b.charCodeAt(m)&255);return p}function $t(b,p){let m,A,B;const K=[];for(let Q=0;Q<b.length&&!((p-=2)<0);++Q)m=b.charCodeAt(Q),A=m>>8,B=m%256,K.push(B),K.push(A);return K}function Je(b){return e.toByteArray(at(b))}function He(b,p,m,A){let B;for(B=0;B<A&&!(B+m>=p.length||B>=b.length);++B)p[B+m]=b[B];return B}function Be(b,p){return b instanceof p||b!=null&&b.constructor!=null&&b.constructor.name!=null&&b.constructor.name===p.name}function Ke(b){return b!==b}const rt=function(){const b="0123456789abcdef",p=new Array(256);for(let m=0;m<16;++m){const A=m*16;for(let B=0;B<16;++B)p[A+B]=b[m]+b[B]}return p}();function Ue(b){return typeof BigInt>"u"?Ze:b}function Ze(){throw new Error("BigInt not supported")}})(Pg);let Ih;const Nt={ethereumClient:void 0,setEthereumClient(t){Ih=t},client(){if(Ih)return Ih;throw new Error("ClientCtrl has no client set")}},gr=Tn({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),tt={state:gr,subscribe(t){return Vn(gr,()=>t(gr))},push(t,e){t!==gr.view&&(gr.view=t,e&&(gr.data=e),gr.history.push(t))},reset(t){gr.view=t,gr.history=[t]},replace(t){gr.history.length>1&&(gr.history[gr.history.length-1]=t,gr.view=t)},goBack(){if(gr.history.length>1){gr.history.pop();const[t]=gr.history.slice(-1);gr.view=t}},setData(t){gr.data=t}},Ie={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",W3M_VERSION:"W3M_VERSION",W3M_PREFER_INJECTED_URL_FLAG:"w3mPreferInjected",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return Ie.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const t=navigator.userAgent.toLowerCase();return Ie.isMobile()&&(t.includes("iphone")||t.includes("ipad"))},isHttpUrl(t){return t.startsWith("http://")||t.startsWith("https://")},isArray(t){return Array.isArray(t)&&t.length>0},formatNativeUrl(t,e,r){if(Ie.isHttpUrl(t))return this.formatUniversalUrl(t,e,r);let n=t;n.includes("://")||(n=t.replaceAll("/","").replaceAll(":",""),n=`${n}://`),this.setWalletConnectDeepLink(n,r);const i=encodeURIComponent(e);return`${n}wc?uri=${i}`},formatUniversalUrl(t,e,r){if(!Ie.isHttpUrl(t))return this.formatNativeUrl(t,e,r);let n=t;t.endsWith("/")&&(n=t.slice(0,-1)),this.setWalletConnectDeepLink(n,r);const i=encodeURIComponent(e);return`${n}/wc?uri=${i}`},async wait(t){return new Promise(e=>{setTimeout(e,t)})},openHref(t,e){window.open(t,e,"noreferrer noopener")},setWalletConnectDeepLink(t,e){localStorage.setItem(Ie.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:e}))},setWalletConnectAndroidDeepLink(t){const[e]=t.split("?");localStorage.setItem(Ie.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:"Android"}))},removeWalletConnectDeepLink(){localStorage.removeItem(Ie.WALLETCONNECT_DEEPLINK_CHOICE)},setWeb3ModalVersionInStorage(){typeof localStorage<"u"&&localStorage.setItem(Ie.W3M_VERSION,"2.4.1")},getWalletRouterData(){var t;const e=(t=tt.state.data)==null?void 0:t.Wallet;if(!e)throw new Error('Missing "Wallet" view data');return e},getSwitchNetworkRouterData(){var t;const e=(t=tt.state.data)==null?void 0:t.SwitchNetwork;if(!e)throw new Error('Missing "SwitchNetwork" view data');return e},isPreferInjectedFlag(){return typeof location<"u"?new URLSearchParams(location.search).has(Ie.W3M_PREFER_INJECTED_URL_FLAG):!1}},hx=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),Ir=Tn({enabled:hx,userSessionId:"",events:[],connectedWalletId:void 0}),pi={state:Ir,subscribe(t){return Vn(Ir.events,()=>t(rx(Ir.events[Ir.events.length-1])))},initialize(){Ir.enabled&&typeof crypto<"u"&&(Ir.userSessionId=crypto.randomUUID())},setConnectedWalletId(t){Ir.connectedWalletId=t},click(t){if(Ir.enabled){const e={type:"CLICK",name:t.name,userSessionId:Ir.userSessionId,timestamp:Date.now(),data:t};Ir.events.push(e)}},track(t){if(Ir.enabled){const e={type:"TRACK",name:t.name,userSessionId:Ir.userSessionId,timestamp:Date.now(),data:t};Ir.events.push(e)}},view(t){if(Ir.enabled){const e={type:"VIEW",name:t.name,userSessionId:Ir.userSessionId,timestamp:Date.now(),data:t};Ir.events.push(e)}}},Er=Tn({selectedChain:void 0,chains:void 0,standaloneChains:void 0,standaloneUri:void 0,isStandalone:!1,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1,isPreferInjected:!1,walletConnectVersion:1}),Ae={state:Er,subscribe(t){return Vn(Er,()=>t(Er))},setChains(t){Er.chains=t},setStandaloneChains(t){Er.standaloneChains=t},setStandaloneUri(t){Er.standaloneUri=t},getSelectedChain(){const t=Nt.client().getNetwork().chain;return t&&(Er.selectedChain=t),Er.selectedChain},setSelectedChain(t){Er.selectedChain=t},setIsStandalone(t){Er.isStandalone=t},setIsCustomDesktop(t){Er.isCustomDesktop=t},setIsCustomMobile(t){Er.isCustomMobile=t},setIsDataLoaded(t){Er.isDataLoaded=t},setIsUiLoaded(t){Er.isUiLoaded=t},setWalletConnectVersion(t){Er.walletConnectVersion=t},setIsPreferInjected(t){Er.isPreferInjected=t},setIsAuth(t){Er.isAuth=t}},dc=Tn({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chainImages:void 0,tokenImages:void 0,tokenContracts:void 0,standaloneChains:void 0,enableStandaloneMode:!1,enableAuthMode:!1,enableNetworkView:!1,enableAccountView:!0,enableExplorer:!0,defaultChain:void 0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),jt={state:dc,subscribe(t){return Vn(dc,()=>t(dc))},setConfig(t){var e,r,n,i;pi.initialize(),Ae.setStandaloneChains(t.standaloneChains),Ae.setIsStandalone(!!((e=t.standaloneChains)!=null&&e.length)||!!t.enableStandaloneMode),Ae.setIsAuth(!!t.enableAuthMode),Ae.setIsCustomMobile(!!((r=t.mobileWallets)!=null&&r.length)),Ae.setIsCustomDesktop(!!((n=t.desktopWallets)!=null&&n.length)),Ae.setWalletConnectVersion((i=t.walletConnectVersion)!=null?i:1),Ae.state.isStandalone||(Ae.setChains(Nt.client().chains),Ae.setIsPreferInjected(Nt.client().isInjectedProviderInstalled()&&Ie.isPreferInjectedFlag())),t.defaultChain&&Ae.setSelectedChain(t.defaultChain),Ie.setWeb3ModalVersionInStorage(),Object.assign(dc,t)}},kt=Tn({address:void 0,profileName:void 0,profileAvatar:void 0,profileLoading:!1,balanceLoading:!1,balance:void 0,isConnected:!1}),Et={state:kt,subscribe(t){return Vn(kt,()=>t(kt))},getAccount(){const t=Nt.client().getAccount();kt.address=t.address,kt.isConnected=t.isConnected},async fetchProfile(t,e){var r;try{kt.profileLoading=!0;const n=e??kt.address,i=(r=Ae.state.chains)==null?void 0:r.find(o=>o.id===1);if(n&&i){const o=await Nt.client().fetchEnsName({address:n,chainId:1});if(o){const c=await Nt.client().fetchEnsAvatar({name:o,chainId:1});c&&await t(c),kt.profileAvatar=c}kt.profileName=o}}finally{kt.profileLoading=!1}},async fetchBalance(t){try{const{chain:e}=Nt.client().getNetwork(),{tokenContracts:r}=jt.state;let n;e&&r&&(n=r[e.id]),kt.balanceLoading=!0;const i=t??kt.address;if(i){const o=await Nt.client().fetchBalance({address:i,token:n});kt.balance={amount:o.formatted,symbol:o.symbol}}}finally{kt.balanceLoading=!1}},setAddress(t){kt.address=t},setIsConnected(t){kt.isConnected=t},resetBalance(){kt.balance=void 0},resetAccount(){kt.address=void 0,kt.isConnected=!1,kt.profileName=void 0,kt.profileAvatar=void 0,kt.balance=void 0}},Sh="https://explorer-api.walletconnect.com";async function pc(t,e){const r=new URL(t,Sh);return r.searchParams.append("projectId",jt.state.projectId),Object.entries(e).forEach(([n,i])=>{i&&r.searchParams.append(n,String(i))}),(await fetch(r)).json()}const gi={async getDesktopListings(t){return pc("/w3m/v1/getDesktopListings",t)},async getMobileListings(t){return pc("/w3m/v1/getMobileListings",t)},async getInjectedListings(t){return pc("/w3m/v1/getInjectedListings",t)},async getAllListings(t){return pc("/w3m/v1/getAllListings",t)},getWalletImageUrl(t){return`${Sh}/w3m/v1/getWalletImage/${t}?projectId=${jt.state.projectId}`},getAssetImageUrl(t){return`${Sh}/w3m/v1/getAssetImage/${t}?projectId=${jt.state.projectId}`}};var fx=Object.defineProperty,Rg=Object.getOwnPropertySymbols,dx=Object.prototype.hasOwnProperty,px=Object.prototype.propertyIsEnumerable,Ng=(t,e,r)=>e in t?fx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,gx=(t,e)=>{for(var r in e||(e={}))dx.call(e,r)&&Ng(t,r,e[r]);if(Rg)for(var r of Rg(e))px.call(e,r)&&Ng(t,r,e[r]);return t};const Lg=Ie.isMobile(),ln=Tn({wallets:{listings:[],total:0,page:1},injectedWallets:[],search:{listings:[],total:0,page:1},recomendedWallets:[]}),rr={state:ln,async getRecomendedWallets(){const{explorerRecommendedWalletIds:t,explorerExcludedWalletIds:e}=jt.state;if(t==="NONE"||e==="ALL"&&!t)return ln.recomendedWallets;if(Ie.isArray(t)){const r={recommendedIds:t.join(",")},{listings:n}=await gi.getAllListings(r),i=Object.values(n);i.sort((o,c)=>{const l=t.indexOf(o.id),h=t.indexOf(c.id);return l-h}),ln.recomendedWallets=i}else{const{standaloneChains:r,walletConnectVersion:n,isAuth:i}=Ae.state,o=r?.join(","),c=Ie.isArray(e),l={page:1,sdks:i?"auth_v1":void 0,entries:Ie.RECOMMENDED_WALLET_AMOUNT,chains:o,version:n,excludedIds:c?e.join(","):void 0},{listings:h}=Lg?await gi.getMobileListings(l):await gi.getDesktopListings(l);ln.recomendedWallets=Object.values(h)}return ln.recomendedWallets},async getWallets(t){const e=gx({},t),{explorerRecommendedWalletIds:r,explorerExcludedWalletIds:n}=jt.state,{recomendedWallets:i}=ln;if(n==="ALL")return ln.wallets;e.search||(i.length?e.excludedIds=i.map(E=>E.id).join(","):Ie.isArray(r)&&(e.excludedIds=r.join(","))),Ie.isArray(n)&&(e.excludedIds=[e.excludedIds,n].filter(Boolean).join(",")),Ae.state.isAuth&&(e.sdks="auth_v1");const{page:o,search:c}=t,{listings:l,total:h}=Lg?await gi.getMobileListings(e):await gi.getDesktopListings(e),d=Object.values(l),v=c?"search":"wallets";return ln[v]={listings:[...ln[v].listings,...d],total:h,page:o??1},{listings:d,total:h}},async getInjectedWallets(){const{listings:t}=await gi.getInjectedListings({}),e=Object.values(t);return ln.injectedWallets=e,ln.injectedWallets},getWalletImageUrl(t){return gi.getWalletImageUrl(t)},getAssetImageUrl(t){return gi.getAssetImageUrl(t)},resetSearch(){ln.search={listings:[],total:0,page:1}}},qo=Tn({pairingUri:"",pairingError:!1}),ur={state:qo,subscribe(t){return Vn(qo,()=>t(qo))},setPairingUri(t){qo.pairingUri=t},setPairingError(t){qo.pairingError=t}},Ts=Tn({open:!1}),Rr={state:Ts,subscribe(t){return Vn(Ts,()=>t(Ts))},async open(t){return new Promise(e=>{const{isStandalone:r,isUiLoaded:n,isDataLoaded:i,isPreferInjected:o,selectedChain:c}=Ae.state,{pairingUri:l}=ur.state,{isConnected:h}=Et.state,{enableNetworkView:d}=jt.state;if(r)Ae.setStandaloneUri(t?.uri),Ae.setStandaloneChains(t?.standaloneChains),tt.reset("ConnectWallet");else if(t!=null&&t.route)tt.reset(t.route);else if(h)tt.reset("Account");else if(d)tt.reset("SelectNetwork");else if(o){Nt.client().connectConnector("injected",c?.id).catch(v=>console.error(v)),e();return}else tt.reset("ConnectWallet");if(n&&i&&(r||l||h))Ts.open=!0,e();else{const v=setInterval(()=>{const E=Ae.state,_=ur.state;E.isUiLoaded&&E.isDataLoaded&&(E.isStandalone||_.pairingUri||h)&&(clearInterval(v),Ts.open=!0,e())},200)}})},close(){Ts.open=!1}};var mx=Object.defineProperty,Mg=Object.getOwnPropertySymbols,wx=Object.prototype.hasOwnProperty,vx=Object.prototype.propertyIsEnumerable,Ug=(t,e,r)=>e in t?mx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,yx=(t,e)=>{for(var r in e||(e={}))wx.call(e,r)&&Ug(t,r,e[r]);if(Mg)for(var r of Mg(e))vx.call(e,r)&&Ug(t,r,e[r]);return t};function bx(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const Vo=Tn({themeMode:bx()?"dark":"light"}),Nn={state:Vo,subscribe(t){return Vn(Vo,()=>t(Vo))},setThemeConfig(t){const{themeMode:e,themeVariables:r}=t;e&&(Vo.themeMode=e),r&&(Vo.themeVariables=yx({},r))}},Ki=Tn({open:!1,message:"",variant:"success"}),zr={state:Ki,subscribe(t){return Vn(Ki,()=>t(Ki))},openToast(t,e){Ki.open=!0,Ki.message=t,Ki.variant=e},closeToast(){Ki.open=!1}};typeof window<"u"&&(window.Buffer||(window.Buffer=Pg.Buffer),window.global||(window.global=window),window.process||(window.process={env:{}}));var _x=Object.defineProperty,jg=Object.getOwnPropertySymbols,Ex=Object.prototype.hasOwnProperty,xx=Object.prototype.propertyIsEnumerable,Fg=(t,e,r)=>e in t?_x(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Cx=(t,e)=>{for(var r in e||(e={}))Ex.call(e,r)&&Fg(t,r,e[r]);if(jg)for(var r of jg(e))xx.call(e,r)&&Fg(t,r,e[r]);return t};class Ix{constructor(e){this.openModal=Rr.open,this.closeModal=Rr.close,this.subscribeModal=Rr.subscribe,this.setTheme=Nn.setThemeConfig,Nn.setThemeConfig(e),jt.setConfig(Cx({enableStandaloneMode:!0},e)),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(function(){return eD});const e=document.createElement("w3m-modal");document.body.insertAdjacentElement("beforeend",e),Ae.setIsUiLoaded(!0)}}}var Sx=Object.freeze({__proto__:null,Web3Modal:Ix});/**
|
|
104
104
|
* @license
|
|
105
105
|
* Copyright 2019 Google LLC
|
|
106
106
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
107
|
-
*/const
|
|
107
|
+
*/const gc=window,Oh=gc.ShadowRoot&&(gc.ShadyCSS===void 0||gc.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Dh=Symbol(),Bg=new WeakMap;class kg{constructor(e,r,n){if(this._$cssResult$=!0,n!==Dh)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o;const r=this.t;if(Oh&&e===void 0){const n=r!==void 0&&r.length===1;n&&(e=Bg.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Bg.set(r,e))}return e}toString(){return this.cssText}}const Ox=t=>new kg(typeof t=="string"?t:t+"",void 0,Dh),Ve=(t,...e)=>{const r=t.length===1?t[0]:e.reduce((n,i,o)=>n+(c=>{if(c._$cssResult$===!0)return c.cssText;if(typeof c=="number")return c;throw Error("Value passed to 'css' function must be a 'css' function result: "+c+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1],t[0]);return new kg(r,t,Dh)},Dx=(t,e)=>{Oh?t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):e.forEach(r=>{const n=document.createElement("style"),i=gc.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)})},Hg=Oh?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(const n of e.cssRules)r+=n.cssText;return Ox(r)})(t):t;/**
|
|
108
108
|
* @license
|
|
109
109
|
* Copyright 2017 Google LLC
|
|
110
110
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
111
|
-
*/var
|
|
111
|
+
*/var Ah;const mc=window,zg=mc.trustedTypes,Ax=zg?zg.emptyScript:"",Wg=mc.reactiveElementPolyfillSupport,$h={toAttribute(t,e){switch(e){case Boolean:t=t?Ax:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},qg=(t,e)=>e!==t&&(e==e||t==t),Ph={attribute:!0,type:String,converter:$h,reflect:!1,hasChanged:qg};class Rs extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var r;this.finalize(),((r=this.h)!==null&&r!==void 0?r:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((r,n)=>{const i=this._$Ep(n,r);i!==void 0&&(this._$Ev.set(i,n),e.push(i))}),e}static createProperty(e,r=Ph){if(r.state&&(r.attribute=!1),this.finalize(),this.elementProperties.set(e,r),!r.noAccessor&&!this.prototype.hasOwnProperty(e)){const n=typeof e=="symbol"?Symbol():"__"+e,i=this.getPropertyDescriptor(e,n,r);i!==void 0&&Object.defineProperty(this.prototype,e,i)}}static getPropertyDescriptor(e,r,n){return{get(){return this[r]},set(i){const o=this[e];this[r]=i,this.requestUpdate(e,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Ph}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const r=this.properties,n=[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)];for(const i of n)this.createProperty(i,r[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const r=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const i of n)r.unshift(Hg(i))}else e!==void 0&&r.push(Hg(e));return r}static _$Ep(e,r){const n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(r=>r(this))}addController(e){var r,n;((r=this._$ES)!==null&&r!==void 0?r:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((n=e.hostConnected)===null||n===void 0||n.call(e))}removeController(e){var r;(r=this._$ES)===null||r===void 0||r.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,r)=>{this.hasOwnProperty(r)&&(this._$Ei.set(r,this[r]),delete this[r])})}createRenderRoot(){var e;const r=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return Dx(r,this.constructor.elementStyles),r}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(r=>{var n;return(n=r.hostConnected)===null||n===void 0?void 0:n.call(r)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(r=>{var n;return(n=r.hostDisconnected)===null||n===void 0?void 0:n.call(r)})}attributeChangedCallback(e,r,n){this._$AK(e,n)}_$EO(e,r,n=Ph){var i;const o=this.constructor._$Ep(e,n);if(o!==void 0&&n.reflect===!0){const c=(((i=n.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?n.converter:$h).toAttribute(r,n.type);this._$El=e,c==null?this.removeAttribute(o):this.setAttribute(o,c),this._$El=null}}_$AK(e,r){var n;const i=this.constructor,o=i._$Ev.get(e);if(o!==void 0&&this._$El!==o){const c=i.getPropertyOptions(o),l=typeof c.converter=="function"?{fromAttribute:c.converter}:((n=c.converter)===null||n===void 0?void 0:n.fromAttribute)!==void 0?c.converter:$h;this._$El=o,this[o]=l.fromAttribute(r,c.type),this._$El=null}}requestUpdate(e,r,n){let i=!0;e!==void 0&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||qg)(this[e],r)?(this._$AL.has(e)||this._$AL.set(e,r),n.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,n))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(r){Promise.reject(r)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,o)=>this[o]=i),this._$Ei=void 0);let r=!1;const n=this._$AL;try{r=this.shouldUpdate(n),r?(this.willUpdate(n),(e=this._$ES)===null||e===void 0||e.forEach(i=>{var o;return(o=i.hostUpdate)===null||o===void 0?void 0:o.call(i)}),this.update(n)):this._$Ek()}catch(i){throw r=!1,this._$Ek(),i}r&&this._$AE(n)}willUpdate(e){}_$AE(e){var r;(r=this._$ES)===null||r===void 0||r.forEach(n=>{var i;return(i=n.hostUpdated)===null||i===void 0?void 0:i.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((r,n)=>this._$EO(n,this[n],r)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}Rs.finalized=!0,Rs.elementProperties=new Map,Rs.elementStyles=[],Rs.shadowRootOptions={mode:"open"},Wg?.({ReactiveElement:Rs}),((Ah=mc.reactiveElementVersions)!==null&&Ah!==void 0?Ah:mc.reactiveElementVersions=[]).push("1.6.1");/**
|
|
112
112
|
* @license
|
|
113
113
|
* Copyright 2017 Google LLC
|
|
114
114
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
115
|
-
*/var
|
|
116
|
-
\f\r](?:([^\\s"'>=/]+)([
|
|
117
|
-
\f\r]
|
|
118
|
-
\f\r]*(?:[^
|
|
119
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Lg=/'/g,jg=/"/g,Ug=/^(?:script|style|textarea|title)$/i,Fg=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),ce=Fg(1),ft=Fg(2),zi=Symbol.for("lit-noChange"),ur=Symbol.for("lit-nothing"),Bg=new WeakMap,Ds=Ss.createTreeWalker(Ss,129,null,!1),hx=(t,e)=>{const r=t.length-1,n=[];let i,o=e===2?"<svg>":"",c=Fo;for(let h=0;h<r;h++){const d=t[h];let v,E,_=-1,S=0;for(;S<d.length&&(c.lastIndex=S,E=c.exec(d),E!==null);)S=c.lastIndex,c===Fo?E[1]==="!--"?c=Ng:E[1]!==void 0?c=Mg:E[2]!==void 0?(Ug.test(E[2])&&(i=RegExp("</"+E[2],"g")),c=Hi):E[3]!==void 0&&(c=Hi):c===Hi?E[0]===">"?(c=i??Fo,_=-1):E[1]===void 0?_=-2:(_=c.lastIndex-E[2].length,v=E[1],c=E[3]===void 0?Hi:E[3]==='"'?jg:Lg):c===jg||c===Lg?c=Hi:c===Ng||c===Mg?c=Fo:(c=Hi,i=void 0);const P=c===Hi&&t[h+1].startsWith("/>")?" ":"";o+=c===Fo?d+lx:_>=0?(n.push(v),d.slice(0,_)+"$lit$"+d.slice(_)+ci+P):d+ci+(_===-2?(n.push(void 0),h):P)}const l=o+(t[r]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Pg!==void 0?Pg.createHTML(l):l,n]};class Bo{constructor({strings:e,_$litType$:r},n){let i;this.parts=[];let o=0,c=0;const l=e.length-1,h=this.parts,[d,v]=hx(e,r);if(this.el=Bo.createElement(d,n),Ds.currentNode=this.el.content,r===2){const E=this.el.content,_=E.firstChild;_.remove(),E.append(..._.childNodes)}for(;(i=Ds.nextNode())!==null&&h.length<l;){if(i.nodeType===1){if(i.hasAttributes()){const E=[];for(const _ of i.getAttributeNames())if(_.endsWith("$lit$")||_.startsWith(ci)){const S=v[c++];if(E.push(_),S!==void 0){const P=i.getAttribute(S.toLowerCase()+"$lit$").split(ci),L=/([.?@])?(.*)/.exec(S);h.push({type:1,index:o,name:L[2],strings:P,ctor:L[1]==="."?dx:L[1]==="?"?gx:L[1]==="@"?mx:uc})}else h.push({type:6,index:o})}for(const _ of E)i.removeAttribute(_)}if(Ug.test(i.tagName)){const E=i.textContent.split(ci),_=E.length-1;if(_>0){i.textContent=Is?Is.emptyScript:"";for(let S=0;S<_;S++)i.append(E[S],jo()),Ds.nextNode(),h.push({type:2,index:++o});i.append(E[_],jo())}}}else if(i.nodeType===8)if(i.data===Tg)h.push({type:2,index:o});else{let E=-1;for(;(E=i.data.indexOf(ci,E+1))!==-1;)h.push({type:7,index:o}),E+=ci.length-1}o++}}static createElement(e,r){const n=Ss.createElement("template");return n.innerHTML=e,n}}function Os(t,e,r=t,n){var i,o,c,l;if(e===zi)return e;let h=n!==void 0?(i=r._$Co)===null||i===void 0?void 0:i[n]:r._$Cl;const d=Uo(e)?void 0:e._$litDirective$;return h?.constructor!==d&&((o=h?._$AO)===null||o===void 0||o.call(h,!1),d===void 0?h=void 0:(h=new d(t),h._$AT(t,r,n)),n!==void 0?((c=(l=r)._$Co)!==null&&c!==void 0?c:l._$Co=[])[n]=h:r._$Cl=h),h!==void 0&&(e=Os(t,h._$AS(t,e.values),h,n)),e}class fx{constructor(e,r){this.u=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(e){var r;const{el:{content:n},parts:i}=this._$AD,o=((r=e?.creationScope)!==null&&r!==void 0?r:Ss).importNode(n,!0);Ds.currentNode=o;let c=Ds.nextNode(),l=0,h=0,d=i[0];for(;d!==void 0;){if(l===d.index){let v;d.type===2?v=new ko(c,c.nextSibling,this,e):d.type===1?v=new d.ctor(c,d.name,d.strings,this,e):d.type===6&&(v=new wx(c,this,e)),this.u.push(v),d=i[++h]}l!==d?.index&&(c=Ds.nextNode(),l++)}return o}p(e){let r=0;for(const n of this.u)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,r),r+=n.strings.length-2):n._$AI(e[r])),r++}}class ko{constructor(e,r,n,i){var o;this.type=2,this._$AH=ur,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=n,this.options=i,this._$Cm=(o=i?.isConnected)===null||o===void 0||o}get _$AU(){var e,r;return(r=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&r!==void 0?r:this._$Cm}get parentNode(){let e=this._$AA.parentNode;const r=this._$AM;return r!==void 0&&e.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=Os(this,e,r),Uo(e)?e===ur||e==null||e===""?(this._$AH!==ur&&this._$AR(),this._$AH=ur):e!==this._$AH&&e!==zi&&this.g(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):ux(e)?this.k(e):this.g(e)}O(e,r=this._$AB){return this._$AA.parentNode.insertBefore(e,r)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}g(e){this._$AH!==ur&&Uo(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ss.createTextNode(e)),this._$AH=e}$(e){var r;const{values:n,_$litType$:i}=e,o=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=Bo.createElement(i.h,this.options)),i);if(((r=this._$AH)===null||r===void 0?void 0:r._$AD)===o)this._$AH.p(n);else{const c=new fx(o,this),l=c.v(this.options);c.p(n),this.T(l),this._$AH=c}}_$AC(e){let r=Bg.get(e.strings);return r===void 0&&Bg.set(e.strings,r=new Bo(e)),r}k(e){Rg(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let n,i=0;for(const o of e)i===r.length?r.push(n=new ko(this.O(jo()),this.O(jo()),this,this.options)):n=r[i],n._$AI(o),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(e=this._$AA.nextSibling,r){var n;for((n=this._$AP)===null||n===void 0||n.call(this,!1,!0,r);e&&e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){var r;this._$AM===void 0&&(this._$Cm=e,(r=this._$AP)===null||r===void 0||r.call(this,e))}}class uc{constructor(e,r,n,i,o){this.type=1,this._$AH=ur,this._$AN=void 0,this.element=e,this.name=r,this._$AM=i,this.options=o,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=ur}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,r=this,n,i){const o=this.strings;let c=!1;if(o===void 0)e=Os(this,e,r,0),c=!Uo(e)||e!==this._$AH&&e!==zi,c&&(this._$AH=e);else{const l=e;let h,d;for(e=o[0],h=0;h<o.length-1;h++)d=Os(this,l[n+h],r,h),d===zi&&(d=this._$AH[h]),c||(c=!Uo(d)||d!==this._$AH[h]),d===ur?e=ur:e!==ur&&(e+=(d??"")+o[h+1]),this._$AH[h]=d}c&&!i&&this.j(e)}j(e){e===ur?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class dx extends uc{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===ur?void 0:e}}const px=Is?Is.emptyScript:"";class gx extends uc{constructor(){super(...arguments),this.type=4}j(e){e&&e!==ur?this.element.setAttribute(this.name,px):this.element.removeAttribute(this.name)}}class mx extends uc{constructor(e,r,n,i,o){super(e,r,n,i,o),this.type=5}_$AI(e,r=this){var n;if((e=(n=Os(this,e,r,0))!==null&&n!==void 0?n:ur)===zi)return;const i=this._$AH,o=e===ur&&i!==ur||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,c=e!==ur&&(i===ur||o);o&&this.element.removeEventListener(this.name,this,i),c&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var r,n;typeof this._$AH=="function"?this._$AH.call((n=(r=this.options)===null||r===void 0?void 0:r.host)!==null&&n!==void 0?n:this.element,e):this._$AH.handleEvent(e)}}class wx{constructor(e,r,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Os(this,e)}}const kg=lc.litHtmlPolyfillSupport;kg?.(Bo,ko),((_h=lc.litHtmlVersions)!==null&&_h!==void 0?_h:lc.litHtmlVersions=[]).push("2.6.1");const vx=(t,e,r)=>{var n,i;const o=(n=r?.renderBefore)!==null&&n!==void 0?n:e;let c=o._$litPart$;if(c===void 0){const l=(i=r?.renderBefore)!==null&&i!==void 0?i:null;o._$litPart$=c=new ko(e.insertBefore(jo(),l),l,void 0,r??{})}return c._$AI(t),c};/**
|
|
115
|
+
*/var Th;const wc=window,Ns=wc.trustedTypes,Vg=Ns?Ns.createPolicy("lit-html",{createHTML:t=>t}):void 0,Rh="$lit$",mi=`lit$${(Math.random()+"").slice(9)}$`,Kg="?"+mi,$x=`<${Kg}>`,Gi=document,Ko=()=>Gi.createComment(""),Go=t=>t===null||typeof t!="object"&&typeof t!="function",Gg=Array.isArray,Px=t=>Gg(t)||typeof t?.[Symbol.iterator]=="function",Nh=`[
|
|
116
|
+
\f\r]`,Zo=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Zg=/-->/g,Yg=/>/g,Zi=RegExp(`>|${Nh}(?:([^\\s"'>=/]+)(${Nh}*=${Nh}*(?:[^
|
|
117
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Jg=/'/g,Xg=/"/g,Qg=/^(?:script|style|textarea|title)$/i,e3=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),oe=e3(1),ut=e3(2),Yi=Symbol.for("lit-noChange"),mr=Symbol.for("lit-nothing"),t3=new WeakMap,Ji=Gi.createTreeWalker(Gi,129,null,!1),Tx=(t,e)=>{const r=t.length-1,n=[];let i,o=e===2?"<svg>":"",c=Zo;for(let h=0;h<r;h++){const d=t[h];let v,E,_=-1,O=0;for(;O<d.length&&(c.lastIndex=O,E=c.exec(d),E!==null);)O=c.lastIndex,c===Zo?E[1]==="!--"?c=Zg:E[1]!==void 0?c=Yg:E[2]!==void 0?(Qg.test(E[2])&&(i=RegExp("</"+E[2],"g")),c=Zi):E[3]!==void 0&&(c=Zi):c===Zi?E[0]===">"?(c=i??Zo,_=-1):E[1]===void 0?_=-2:(_=c.lastIndex-E[2].length,v=E[1],c=E[3]===void 0?Zi:E[3]==='"'?Xg:Jg):c===Xg||c===Jg?c=Zi:c===Zg||c===Yg?c=Zo:(c=Zi,i=void 0);const P=c===Zi&&t[h+1].startsWith("/>")?" ":"";o+=c===Zo?d+$x:_>=0?(n.push(v),d.slice(0,_)+Rh+d.slice(_)+mi+P):d+mi+(_===-2?(n.push(void 0),h):P)}const l=o+(t[r]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Vg!==void 0?Vg.createHTML(l):l,n]};class Yo{constructor({strings:e,_$litType$:r},n){let i;this.parts=[];let o=0,c=0;const l=e.length-1,h=this.parts,[d,v]=Tx(e,r);if(this.el=Yo.createElement(d,n),Ji.currentNode=this.el.content,r===2){const E=this.el.content,_=E.firstChild;_.remove(),E.append(..._.childNodes)}for(;(i=Ji.nextNode())!==null&&h.length<l;){if(i.nodeType===1){if(i.hasAttributes()){const E=[];for(const _ of i.getAttributeNames())if(_.endsWith(Rh)||_.startsWith(mi)){const O=v[c++];if(E.push(_),O!==void 0){const P=i.getAttribute(O.toLowerCase()+Rh).split(mi),U=/([.?@])?(.*)/.exec(O);h.push({type:1,index:o,name:U[2],strings:P,ctor:U[1]==="."?Nx:U[1]==="?"?Mx:U[1]==="@"?Ux:vc})}else h.push({type:6,index:o})}for(const _ of E)i.removeAttribute(_)}if(Qg.test(i.tagName)){const E=i.textContent.split(mi),_=E.length-1;if(_>0){i.textContent=Ns?Ns.emptyScript:"";for(let O=0;O<_;O++)i.append(E[O],Ko()),Ji.nextNode(),h.push({type:2,index:++o});i.append(E[_],Ko())}}}else if(i.nodeType===8)if(i.data===Kg)h.push({type:2,index:o});else{let E=-1;for(;(E=i.data.indexOf(mi,E+1))!==-1;)h.push({type:7,index:o}),E+=mi.length-1}o++}}static createElement(e,r){const n=Gi.createElement("template");return n.innerHTML=e,n}}function Ls(t,e,r=t,n){var i,o,c,l;if(e===Yi)return e;let h=n!==void 0?(i=r._$Co)===null||i===void 0?void 0:i[n]:r._$Cl;const d=Go(e)?void 0:e._$litDirective$;return h?.constructor!==d&&((o=h?._$AO)===null||o===void 0||o.call(h,!1),d===void 0?h=void 0:(h=new d(t),h._$AT(t,r,n)),n!==void 0?((c=(l=r)._$Co)!==null&&c!==void 0?c:l._$Co=[])[n]=h:r._$Cl=h),h!==void 0&&(e=Ls(t,h._$AS(t,e.values),h,n)),e}class Rx{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var r;const{el:{content:n},parts:i}=this._$AD,o=((r=e?.creationScope)!==null&&r!==void 0?r:Gi).importNode(n,!0);Ji.currentNode=o;let c=Ji.nextNode(),l=0,h=0,d=i[0];for(;d!==void 0;){if(l===d.index){let v;d.type===2?v=new Jo(c,c.nextSibling,this,e):d.type===1?v=new d.ctor(c,d.name,d.strings,this,e):d.type===6&&(v=new jx(c,this,e)),this._$AV.push(v),d=i[++h]}l!==d?.index&&(c=Ji.nextNode(),l++)}return Ji.currentNode=Gi,o}v(e){let r=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,r),r+=n.strings.length-2):n._$AI(e[r])),r++}}class Jo{constructor(e,r,n,i){var o;this.type=2,this._$AH=mr,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=n,this.options=i,this._$Cp=(o=i?.isConnected)===null||o===void 0||o}get _$AU(){var e,r;return(r=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&r!==void 0?r:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=Ls(this,e,r),Go(e)?e===mr||e==null||e===""?(this._$AH!==mr&&this._$AR(),this._$AH=mr):e!==this._$AH&&e!==Yi&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Px(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==mr&&Go(this._$AH)?this._$AA.nextSibling.data=e:this.$(Gi.createTextNode(e)),this._$AH=e}g(e){var r;const{values:n,_$litType$:i}=e,o=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=Yo.createElement(i.h,this.options)),i);if(((r=this._$AH)===null||r===void 0?void 0:r._$AD)===o)this._$AH.v(n);else{const c=new Rx(o,this),l=c.u(this.options);c.v(n),this.$(l),this._$AH=c}}_$AC(e){let r=t3.get(e.strings);return r===void 0&&t3.set(e.strings,r=new Yo(e)),r}T(e){Gg(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let n,i=0;for(const o of e)i===r.length?r.push(n=new Jo(this.k(Ko()),this.k(Ko()),this,this.options)):n=r[i],n._$AI(o),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(e=this._$AA.nextSibling,r){var n;for((n=this._$AP)===null||n===void 0||n.call(this,!1,!0,r);e&&e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){var r;this._$AM===void 0&&(this._$Cp=e,(r=this._$AP)===null||r===void 0||r.call(this,e))}}class vc{constructor(e,r,n,i,o){this.type=1,this._$AH=mr,this._$AN=void 0,this.element=e,this.name=r,this._$AM=i,this.options=o,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=mr}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,r=this,n,i){const o=this.strings;let c=!1;if(o===void 0)e=Ls(this,e,r,0),c=!Go(e)||e!==this._$AH&&e!==Yi,c&&(this._$AH=e);else{const l=e;let h,d;for(e=o[0],h=0;h<o.length-1;h++)d=Ls(this,l[n+h],r,h),d===Yi&&(d=this._$AH[h]),c||(c=!Go(d)||d!==this._$AH[h]),d===mr?e=mr:e!==mr&&(e+=(d??"")+o[h+1]),this._$AH[h]=d}c&&!i&&this.j(e)}j(e){e===mr?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Nx extends vc{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===mr?void 0:e}}const Lx=Ns?Ns.emptyScript:"";class Mx extends vc{constructor(){super(...arguments),this.type=4}j(e){e&&e!==mr?this.element.setAttribute(this.name,Lx):this.element.removeAttribute(this.name)}}class Ux extends vc{constructor(e,r,n,i,o){super(e,r,n,i,o),this.type=5}_$AI(e,r=this){var n;if((e=(n=Ls(this,e,r,0))!==null&&n!==void 0?n:mr)===Yi)return;const i=this._$AH,o=e===mr&&i!==mr||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,c=e!==mr&&(i===mr||o);o&&this.element.removeEventListener(this.name,this,i),c&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var r,n;typeof this._$AH=="function"?this._$AH.call((n=(r=this.options)===null||r===void 0?void 0:r.host)!==null&&n!==void 0?n:this.element,e):this._$AH.handleEvent(e)}}class jx{constructor(e,r,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Ls(this,e)}}const r3=wc.litHtmlPolyfillSupport;r3?.(Yo,Jo),((Th=wc.litHtmlVersions)!==null&&Th!==void 0?Th:wc.litHtmlVersions=[]).push("2.7.4");const Fx=(t,e,r)=>{var n,i;const o=(n=r?.renderBefore)!==null&&n!==void 0?n:e;let c=o._$litPart$;if(c===void 0){const l=(i=r?.renderBefore)!==null&&i!==void 0?i:null;o._$litPart$=c=new Jo(e.insertBefore(Ko(),l),l,void 0,r??{})}return c._$AI(t),c};/**
|
|
120
118
|
* @license
|
|
121
119
|
* Copyright 2017 Google LLC
|
|
122
120
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
123
|
-
*/var
|
|
121
|
+
*/var Lh,Mh;class $e extends Rs{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,r;const n=super.createRenderRoot();return(e=(r=this.renderOptions).renderBefore)!==null&&e!==void 0||(r.renderBefore=n.firstChild),n}update(e){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Fx(r,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return Yi}}$e.finalized=!0,$e._$litElement$=!0,(Lh=globalThis.litElementHydrateSupport)===null||Lh===void 0||Lh.call(globalThis,{LitElement:$e});const n3=globalThis.litElementPolyfillSupport;n3?.({LitElement:$e}),((Mh=globalThis.litElementVersions)!==null&&Mh!==void 0?Mh:globalThis.litElementVersions=[]).push("3.3.2");/**
|
|
124
122
|
* @license
|
|
125
123
|
* Copyright 2017 Google LLC
|
|
126
124
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
127
|
-
*/const
|
|
125
|
+
*/const Re=t=>e=>typeof e=="function"?((r,n)=>(customElements.define(r,n),n))(t,e):((r,n)=>{const{kind:i,elements:o}=n;return{kind:i,elements:o,finisher(c){customElements.define(r,c)}}})(t,e);/**
|
|
128
126
|
* @license
|
|
129
127
|
* Copyright 2017 Google LLC
|
|
130
128
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
131
|
-
*/const
|
|
129
|
+
*/const Bx=(t,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(r){r.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(r){r.createProperty(e.key,t)}};function Oe(t){return(e,r)=>r!==void 0?((n,i,o)=>{i.constructor.createProperty(o,n)})(t,e,r):Bx(t,e)}/**
|
|
132
130
|
* @license
|
|
133
131
|
* Copyright 2017 Google LLC
|
|
134
132
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
135
|
-
*/function
|
|
133
|
+
*/function gt(t){return Oe({...t,state:!0})}/**
|
|
136
134
|
* @license
|
|
137
135
|
* Copyright 2021 Google LLC
|
|
138
136
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
139
|
-
*/var
|
|
137
|
+
*/var Uh;((Uh=window.HTMLSlotElement)===null||Uh===void 0?void 0:Uh.prototype.assignedElements)!=null;/**
|
|
140
138
|
* @license
|
|
141
139
|
* Copyright 2017 Google LLC
|
|
142
140
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
143
|
-
*/const
|
|
141
|
+
*/const kx={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Hx=t=>(...e)=>({_$litDirective$:t,values:e});class zx{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,n){this._$Ct=e,this._$AM=r,this._$Ci=n}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}}/**
|
|
144
142
|
* @license
|
|
145
143
|
* Copyright 2018 Google LLC
|
|
146
144
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
147
|
-
*/const Br=_x(class extends Ex{constructor(t){var e;if(super(t),t.type!==bx.ATTRIBUTE||t.name!=="class"||((e=t.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var r,n;if(this.nt===void 0){this.nt=new Set,t.strings!==void 0&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in e)e[o]&&!(!((r=this.st)===null||r===void 0)&&r.has(o))&&this.nt.add(o);return this.render(e)}const i=t.element.classList;this.nt.forEach(o=>{o in e||(i.remove(o),this.nt.delete(o))});for(const o in e){const c=!!e[o];c===this.nt.has(o)||!((n=this.st)===null||n===void 0)&&n.has(o)||(c?(i.add(o),this.nt.add(o)):(i.remove(o),this.nt.delete(o)))}return zi}});function xx(t,e){t.indexOf(e)===-1&&t.push(e)}const zg=(t,e,r)=>Math.min(Math.max(r,t),e),an={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},Ho=t=>typeof t=="number",As=t=>Array.isArray(t)&&!Ho(t[0]),Cx=(t,e,r)=>{const n=e-t;return((r-t)%n+n)%n+t};function Ix(t,e){return As(t)?t[Cx(0,t.length,e)]:t}const Wg=(t,e,r)=>-r*t+r*e+t,qg=()=>{},$n=t=>t,Ih=(t,e,r)=>e-t===0?1:(r-t)/(e-t);function Vg(t,e){const r=t[t.length-1];for(let n=1;n<=e;n++){const i=Ih(0,e,n);t.push(Wg(r,1,i))}}function Sx(t){const e=[0];return Vg(e,t-1),e}function Dx(t,e=Sx(t.length),r=$n){const n=t.length,i=n-e.length;return i>0&&Vg(e,i),o=>{let c=0;for(;c<n-2&&!(o<e[c+1]);c++);let l=zg(0,1,Ih(e[c],e[c+1],o));return l=Ix(r,c)(l),Wg(t[c],t[c+1],l)}}const Kg=t=>Array.isArray(t)&&Ho(t[0]),Sh=t=>typeof t=="object"&&Boolean(t.createAnimation),Wi=t=>typeof t=="function",Gg=t=>typeof t=="string",$s={ms:t=>t*1e3,s:t=>t/1e3};function Ox(t,e){return e?t*(1e3/e):0}const Zg=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,Ax=1e-7,$x=12;function Px(t,e,r,n,i){let o,c,l=0;do c=e+(r-e)/2,o=Zg(c,n,i)-t,o>0?r=c:e=c;while(Math.abs(o)>Ax&&++l<$x);return c}function zo(t,e,r,n){if(t===e&&r===n)return $n;const i=o=>Px(o,0,1,t,r);return o=>o===0||o===1?o:Zg(i(o),e,n)}const Tx=(t,e="end")=>r=>{r=e==="end"?Math.min(r,.999):Math.max(r,.001);const n=r*t,i=e==="end"?Math.floor(n):Math.ceil(n);return zg(0,1,i/t)},Yg={ease:zo(.25,.1,.25,1),"ease-in":zo(.42,0,1,1),"ease-in-out":zo(.42,0,.58,1),"ease-out":zo(0,0,.58,1)},Rx=/\((.*?)\)/;function Jg(t){if(Wi(t))return t;if(Kg(t))return zo(...t);if(Yg[t])return Yg[t];if(t.startsWith("steps")){const e=Rx.exec(t);if(e){const r=e[1].split(",");return Tx(parseFloat(r[0]),r[1].trim())}}return $n}class Xg{constructor(e,r=[0,1],{easing:n,duration:i=an.duration,delay:o=an.delay,endDelay:c=an.endDelay,repeat:l=an.repeat,offset:h,direction:d="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=$n,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((E,_)=>{this.resolve=E,this.reject=_}),n=n||an.easing,Sh(n)){const E=n.createAnimation(r);n=E.easing,r=E.keyframes||r,i=E.duration||i}this.repeat=l,this.easing=As(n)?$n:Jg(n),this.updateDuration(i);const v=Dx(r,h,As(n)?n.map(Jg):$n);this.tick=E=>{var _;o=o;let S=0;this.pauseTime!==void 0?S=this.pauseTime:S=(E-this.startTime)*this.rate,this.t=S,S/=1e3,S=Math.max(S-o,0),this.playState==="finished"&&this.pauseTime===void 0&&(S=this.totalDuration);const P=S/this.duration;let L=Math.floor(P),k=P%1;!k&&P>=1&&(k=1),k===1&&L--;const q=L%2;(d==="reverse"||d==="alternate"&&q||d==="alternate-reverse"&&!q)&&(k=1-k);const T=S>=this.totalDuration?1:Math.min(k,1),M=v(this.easing(T));e(M),this.pauseTime===void 0&&(this.playState==="finished"||S>=this.totalDuration+c)?(this.playState="finished",(_=this.resolve)===null||_===void 0||_.call(this,M)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const e=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(e=this.reject)===null||e===void 0||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){this.pauseTime!==void 0||this.rate===0?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}var Dh=function(){};process.env.NODE_ENV!=="production"&&(Dh=function(t,e){if(!t)throw new Error(e)});class Nx{setAnimation(e){this.animation=e,e?.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const Oh=new WeakMap;function Qg(t){return Oh.has(t)||Oh.set(t,{transforms:[],values:new Map}),Oh.get(t)}function Mx(t,e){return t.has(e)||t.set(e,new Nx),t.get(e)}const Lx=["","X","Y","Z"],jx=["translate","scale","rotate","skew"],hc={x:"translateX",y:"translateY",z:"translateZ"},e3={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},Ux={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:e3,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:$n},skew:e3},Ps=new Map,Ah=t=>`--motion-${t}`,fc=["x","y","z"];jx.forEach(t=>{Lx.forEach(e=>{fc.push(t+e),Ps.set(Ah(t+e),Ux[t])})});const Fx=(t,e)=>fc.indexOf(t)-fc.indexOf(e),Bx=new Set(fc),t3=t=>Bx.has(t),kx=(t,e)=>{hc[e]&&(e=hc[e]);const{transforms:r}=Qg(t);xx(r,e),t.style.transform=Hx(r)},Hx=t=>t.sort(Fx).reduce(zx,"").trim(),zx=(t,e)=>`${t} ${e}(var(${Ah(e)}))`,$h=t=>t.startsWith("--"),r3=new Set;function Wx(t){if(!r3.has(t)){r3.add(t);try{const{syntax:e,initialValue:r}=Ps.has(t)?Ps.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:r})}catch{}}}const Ph=(t,e)=>document.createElement("div").animate(t,e),n3={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Ph({opacity:[1]})}catch{return!1}return!0},finished:()=>Boolean(Ph({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{Ph({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},Th={},Ts={};for(const t in n3)Ts[t]=()=>(Th[t]===void 0&&(Th[t]=n3[t]()),Th[t]);const qx=.015,Vx=(t,e)=>{let r="";const n=Math.round(e/qx);for(let i=0;i<n;i++)r+=t(Ih(0,n-1,i))+", ";return r.substring(0,r.length-2)},i3=(t,e)=>Wi(t)?Ts.linearEasing()?`linear(${Vx(t,e)})`:an.easing:Kg(t)?Kx(t):t,Kx=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`;function Gx(t,e){for(let r=0;r<t.length;r++)t[r]===null&&(t[r]=r?t[r-1]:e());return t}const Zx=t=>Array.isArray(t)?t:[t];function dc(t){return hc[t]&&(t=hc[t]),t3(t)?Ah(t):t}const pc={get:(t,e)=>{e=dc(e);let r=$h(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!r&&r!==0){const n=Ps.get(e);n&&(r=n.initialValue)}return r},set:(t,e,r)=>{e=dc(e),$h(e)?t.style.setProperty(e,r):t.style[e]=r}};function s3(t,e=!0){if(!(!t||t.playState==="finished"))try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch{}}function o3(t,e){var r;let n=e?.toDefaultUnit||$n;const i=t[t.length-1];if(Gg(i)){const o=((r=i.match(/(-?[\d.]+)([a-z%]*)/))===null||r===void 0?void 0:r[2])||"";o&&(n=c=>c+o)}return n}function Yx(){return window.__MOTION_DEV_TOOLS_RECORD}function Jx(t,e,r,n={},i){const o=Yx(),c=n.record!==!1&&o;let l,{duration:h=an.duration,delay:d=an.delay,endDelay:v=an.endDelay,repeat:E=an.repeat,easing:_=an.easing,persist:S=!1,direction:P,offset:L,allowWebkitAcceleration:k=!1}=n;const q=Qg(t),T=t3(e);let M=Ts.waapi();T&&kx(t,e);const A=dc(e),R=Mx(q.values,A),C=Ps.get(A);return s3(R.animation,!(Sh(_)&&R.generator)&&n.record!==!1),()=>{const f=()=>{var z,ee;return(ee=(z=pc.get(t,A))!==null&&z!==void 0?z:C?.initialValue)!==null&&ee!==void 0?ee:0};let x=Gx(Zx(r),f);const J=o3(x,C);if(Sh(_)){const z=_.createAnimation(x,e!=="opacity",f,A,R);_=z.easing,x=z.keyframes||x,h=z.duration||h}if($h(A)&&(Ts.cssRegisterProperty()?Wx(A):M=!1),T&&!Ts.linearEasing()&&(Wi(_)||As(_)&&_.some(Wi))&&(M=!1),M){C&&(x=x.map(de=>Ho(de)?C.toDefaultUnit(de):de)),x.length===1&&(!Ts.partialKeyframes()||c)&&x.unshift(f());const z={delay:$s.ms(d),duration:$s.ms(h),endDelay:$s.ms(v),easing:As(_)?void 0:i3(_,h),direction:P,iterations:E+1,fill:"both"};l=t.animate({[A]:x,offset:L,easing:As(_)?_.map(de=>i3(de,h)):void 0},z),l.finished||(l.finished=new Promise((de,me)=>{l.onfinish=de,l.oncancel=me}));const ee=x[x.length-1];l.finished.then(()=>{S||(pc.set(t,A,ee),l.cancel())}).catch(qg),k||(l.playbackRate=1.000001)}else if(i&&T)x=x.map(z=>typeof z=="string"?parseFloat(z):z),x.length===1&&x.unshift(parseFloat(f())),l=new i(z=>{pc.set(t,A,J?J(z):z)},x,Object.assign(Object.assign({},n),{duration:h,easing:_}));else{const z=x[x.length-1];pc.set(t,A,C&&Ho(z)?C.toDefaultUnit(z):z)}return c&&o(t,e,x,{duration:h,delay:d,easing:_,repeat:E,offset:L},"motion-one"),R.setAnimation(l),l}}const Xx=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function a3(t,e){var r;return typeof t=="string"?e?((r=e[t])!==null&&r!==void 0||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}const Qx=t=>t(),c3=(t,e,r=an.duration)=>new Proxy({animations:t.map(Qx).filter(Boolean),duration:r,options:e},t9),e9=t=>t.animations[0],t9={get:(t,e)=>{const r=e9(t);switch(e){case"duration":return t.duration;case"currentTime":return $s.s(r?.[e]||0);case"playbackRate":case"playState":return r?.[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(r9)).catch(qg)),t.finished;case"stop":return()=>{t.animations.forEach(n=>s3(n))};case"forEachNative":return n=>{t.animations.forEach(i=>n(i,t))};default:return typeof r?.[e]>"u"?void 0:()=>t.animations.forEach(n=>n[e]())}},set:(t,e,r)=>{switch(e){case"currentTime":r=$s.ms(r);case"currentTime":case"playbackRate":for(let n=0;n<t.animations.length;n++)t.animations[n][e]=r;return!0}return!1}},r9=t=>t.finished;function n9(t,e,r){return Wi(t)?t(e,r):t}function i9(t){return function(r,n,i={}){r=a3(r);const o=r.length;Dh(Boolean(o),"No valid element provided."),Dh(Boolean(n),"No keyframes defined.");const c=[];for(let l=0;l<o;l++){const h=r[l];for(const d in n){const v=Xx(i,d);v.delay=n9(v.delay,l,o);const E=Jx(h,d,n[d],v,t);c.push(E)}}return c3(c,i,i.duration)}}const s9=i9(Xg);function o9(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}const a9=5;function l3(t,e,r){const n=Math.max(e-a9,0);return Ox(r-t(n),e-n)}const Rs={stiffness:100,damping:10,mass:1},c9=(t=Rs.stiffness,e=Rs.damping,r=Rs.mass)=>e/(2*Math.sqrt(t*r));function l9(t,e,r){return t<e&&r>=e||t>e&&r<=e}const u9=({stiffness:t=Rs.stiffness,damping:e=Rs.damping,mass:r=Rs.mass,from:n=0,to:i=1,velocity:o=0,restSpeed:c=2,restDistance:l=.5}={})=>{o=o?$s.s(o):0;const h={done:!1,hasReachedTarget:!1,current:n,target:i},d=i-n,v=Math.sqrt(t/r)/1e3,E=c9(t,e,r);let _;if(E<1){const S=v*Math.sqrt(1-E*E);_=P=>i-Math.exp(-E*v*P)*((-o+E*v*d)/S*Math.sin(S*P)+d*Math.cos(S*P))}else _=S=>i-Math.exp(-v*S)*(d+(-o+v*d)*S);return S=>{h.current=_(S);const P=S===0?o:l3(_,S,h.current),L=Math.abs(P)<=c,k=Math.abs(i-h.current)<=l;return h.done=L&&k,h.hasReachedTarget=l9(n,i,h.current),h}},Rh=10,h9=1e4;function f9(t,e=$n){let r,n=Rh,i=t(0);const o=[e(i.current)];for(;!i.done&&n<h9;)i=t(n),o.push(e(i.done?i.target:i.current)),r===void 0&&i.hasReachedTarget&&(r=n),n+=Rh;const c=n-Rh;return o.length===1&&o.push(i.current),{keyframes:o,duration:c/1e3,overshootDuration:(r??c)/1e3}}function u3(t){return Ho(t)&&!isNaN(t)}function Nh(t){return Gg(t)?parseFloat(t):t}function d9(t){const e=new WeakMap;return(r={})=>{const n=new Map,i=(c=0,l=100,h=0,d=!1)=>{const v=`${c}-${l}-${h}-${d}`;return n.has(v)||n.set(v,t(Object.assign({from:c,to:l,velocity:h,restSpeed:d?.05:2,restDistance:d?.01:.5},r))),n.get(v)},o=(c,l)=>(e.has(c)||e.set(c,f9(c,l)),e.get(c));return{createAnimation:(c,l=!0,h,d,v)=>{let E,_,S,P=0,L=$n;const k=c.length;if(l){L=o3(c,d?Ps.get(dc(d)):void 0);const q=c[k-1];if(S=Nh(q),k>1&&c[0]!==null)_=Nh(c[0]);else{const T=v?.generator;if(T){const{animation:M,generatorStartTime:A}=v,R=M?.startTime||A||0,C=M?.currentTime||performance.now()-R,f=T(C).current;_=f,P=l3(x=>T(x).current,C,f)}else h&&(_=Nh(h()))}}if(u3(_)&&u3(S)){const q=i(_,S,P,d?.includes("scale"));E=Object.assign(Object.assign({},o(q,L)),{easing:"linear"}),v&&(v.generator=q,v.generatorStartTime=performance.now())}return E||(E={easing:"ease",duration:o(i(0,100)).overshootDuration}),E}}}}const gc=d9(u9),p9={any:0,all:1};function g9(t,e,{root:r,margin:n,amount:i="any"}={}){if(typeof IntersectionObserver>"u")return()=>{};const o=a3(t),c=new WeakMap,l=d=>{d.forEach(v=>{const E=c.get(v.target);if(v.isIntersecting!==Boolean(E))if(v.isIntersecting){const _=e(v);Wi(_)?c.set(v.target,_):h.unobserve(v.target)}else E&&(E(v),c.delete(v.target))})},h=new IntersectionObserver(l,{root:r,rootMargin:n,threshold:typeof i=="number"?i:p9[i]});return o.forEach(d=>h.observe(d)),()=>h.disconnect()}function Mh(t,e,r){t.dispatchEvent(new CustomEvent(e,{detail:{originalEvent:r}}))}function h3(t,e,r){t.dispatchEvent(new CustomEvent(e,{detail:{originalEntry:r}}))}const m9={isActive:t=>Boolean(t.inView),subscribe:(t,{enable:e,disable:r},{inViewOptions:n={}})=>{const{once:i}=n,o=o9(n,["once"]);return g9(t,c=>{if(e(),h3(t,"viewenter",c),!i)return l=>{r(),h3(t,"viewleave",l)}},o)}},f3=(t,e,r)=>n=>{n.pointerType&&n.pointerType!=="mouse"||(r(),Mh(t,e,n))};[...Object.keys({inView:m9,hover:{isActive:t=>Boolean(t.hover),subscribe:(t,{enable:e,disable:r})=>{const n=f3(t,"hoverstart",e),i=f3(t,"hoverend",r);return t.addEventListener("pointerenter",n),t.addEventListener("pointerleave",i),()=>{t.removeEventListener("pointerenter",n),t.removeEventListener("pointerleave",i)}}},press:{isActive:t=>Boolean(t.press),subscribe:(t,{enable:e,disable:r})=>{const n=o=>{r(),Mh(t,"pressend",o),window.removeEventListener("pointerup",n)},i=o=>{e(),Mh(t,"pressstart",o),window.addEventListener("pointerup",n)};return t.addEventListener("pointerdown",i),()=>{t.removeEventListener("pointerdown",i),window.removeEventListener("pointerup",n)}}}})];function w9(t,e={}){return c3([()=>{const r=new Xg(t,[0,1],e);return r.finished.catch(()=>{}),r}],e,e.duration)}function li(t,e,r){return(Wi(t)?w9:s9)(t,e,r)}/**
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
|
|
151
|
-
*/const kr=t=>t??ur;var Wo={},v9=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},d3={},Zr={};let Lh;const y9=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Zr.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17},Zr.getSymbolTotalCodewords=function(e){return y9[e]},Zr.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e},Zr.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');Lh=e},Zr.isKanjiModeEnabled=function(){return typeof Lh<"u"},Zr.toSJIS=function(e){return Lh(e)};var mc={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+r)}}t.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},t.from=function(n,i){if(t.isValid(n))return n;try{return e(n)}catch{return i}}})(mc);function p3(){this.buffer=[],this.length=0}p3.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let r=0;r<e;r++)this.putBit((t>>>e-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const 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 b9=p3;function qo(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}qo.prototype.set=function(t,e,r,n){const i=t*this.size+e;this.data[i]=r,n&&(this.reservedBit[i]=!0)},qo.prototype.get=function(t,e){return this.data[t*this.size+e]},qo.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r},qo.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var _9=qo,g3={};(function(t){const e=Zr.getSymbolSize;t.getRowColCoords=function(n){if(n===1)return[];const i=Math.floor(n/7)+2,o=e(n),c=o===145?26:Math.ceil((o-13)/(2*i-2))*2,l=[o-7];for(let h=1;h<i-1;h++)l[h]=l[h-1]-c;return l.push(6),l.reverse()},t.getPositions=function(n){const i=[],o=t.getRowColCoords(n),c=o.length;for(let l=0;l<c;l++)for(let h=0;h<c;h++)l===0&&h===0||l===0&&h===c-1||l===c-1&&h===0||i.push([o[l],o[h]]);return i}})(g3);var m3={};const E9=Zr.getSymbolSize,w3=7;m3.getPositions=function(e){const r=E9(e);return[[0,0],[r-w3,0],[0,r-w3]]};var v3={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(i){return i!=null&&i!==""&&!isNaN(i)&&i>=0&&i<=7},t.from=function(i){return t.isValid(i)?parseInt(i,10):void 0},t.getPenaltyN1=function(i){const o=i.size;let c=0,l=0,h=0,d=null,v=null;for(let E=0;E<o;E++){l=h=0,d=v=null;for(let _=0;_<o;_++){let S=i.get(E,_);S===d?l++:(l>=5&&(c+=e.N1+(l-5)),d=S,l=1),S=i.get(_,E),S===v?h++:(h>=5&&(c+=e.N1+(h-5)),v=S,h=1)}l>=5&&(c+=e.N1+(l-5)),h>=5&&(c+=e.N1+(h-5))}return c},t.getPenaltyN2=function(i){const o=i.size;let c=0;for(let l=0;l<o-1;l++)for(let h=0;h<o-1;h++){const d=i.get(l,h)+i.get(l,h+1)+i.get(l+1,h)+i.get(l+1,h+1);(d===4||d===0)&&c++}return c*e.N2},t.getPenaltyN3=function(i){const o=i.size;let c=0,l=0,h=0;for(let d=0;d<o;d++){l=h=0;for(let v=0;v<o;v++)l=l<<1&2047|i.get(d,v),v>=10&&(l===1488||l===93)&&c++,h=h<<1&2047|i.get(v,d),v>=10&&(h===1488||h===93)&&c++}return c*e.N3},t.getPenaltyN4=function(i){let o=0;const c=i.data.length;for(let h=0;h<c;h++)o+=i.data[h];return Math.abs(Math.ceil(o*100/c/5)-10)*e.N4};function r(n,i,o){switch(n){case t.Patterns.PATTERN000:return(i+o)%2===0;case t.Patterns.PATTERN001:return i%2===0;case t.Patterns.PATTERN010:return o%3===0;case t.Patterns.PATTERN011:return(i+o)%3===0;case t.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(o/3))%2===0;case t.Patterns.PATTERN101:return i*o%2+i*o%3===0;case t.Patterns.PATTERN110:return(i*o%2+i*o%3)%2===0;case t.Patterns.PATTERN111:return(i*o%3+(i+o)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}t.applyMask=function(i,o){const c=o.size;for(let l=0;l<c;l++)for(let h=0;h<c;h++)o.isReserved(h,l)||o.xor(h,l,r(i,h,l))},t.getBestMask=function(i,o){const c=Object.keys(t.Patterns).length;let l=0,h=1/0;for(let d=0;d<c;d++){o(d),t.applyMask(d,i);const v=t.getPenaltyN1(i)+t.getPenaltyN2(i)+t.getPenaltyN3(i)+t.getPenaltyN4(i);t.applyMask(d,i),v<h&&(h=v,l=d)}return l}})(v3);var wc={};const ui=mc,vc=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],yc=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];wc.getBlocksCount=function(e,r){switch(r){case ui.L:return vc[(e-1)*4+0];case ui.M:return vc[(e-1)*4+1];case ui.Q:return vc[(e-1)*4+2];case ui.H:return vc[(e-1)*4+3];default:return}},wc.getTotalCodewordsCount=function(e,r){switch(r){case ui.L:return yc[(e-1)*4+0];case ui.M:return yc[(e-1)*4+1];case ui.Q:return yc[(e-1)*4+2];case ui.H:return yc[(e-1)*4+3];default:return}};var y3={},bc={};const Vo=new Uint8Array(512),_c=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)Vo[r]=e,_c[e]=r,e<<=1,e&256&&(e^=285);for(let r=255;r<512;r++)Vo[r]=Vo[r-255]})(),bc.log=function(e){if(e<1)throw new Error("log("+e+")");return _c[e]},bc.exp=function(e){return Vo[e]},bc.mul=function(e,r){return e===0||r===0?0:Vo[_c[e]+_c[r]]},function(t){const e=bc;t.mul=function(n,i){const o=new Uint8Array(n.length+i.length-1);for(let c=0;c<n.length;c++)for(let l=0;l<i.length;l++)o[c+l]^=e.mul(n[c],i[l]);return o},t.mod=function(n,i){let o=new Uint8Array(n);for(;o.length-i.length>=0;){const c=o[0];for(let h=0;h<i.length;h++)o[h]^=e.mul(i[h],c);let l=0;for(;l<o.length&&o[l]===0;)l++;o=o.slice(l)}return o},t.generateECPolynomial=function(n){let i=new Uint8Array([1]);for(let o=0;o<n;o++)i=t.mul(i,new Uint8Array([1,e.exp(o)]));return i}}(y3);const b3=y3;function jh(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}jh.prototype.initialize=function(e){this.degree=e,this.genPoly=b3.generateECPolynomial(this.degree)},jh.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(e.length+this.degree);r.set(e);const n=b3.mod(r,this.genPoly),i=this.degree-n.length;if(i>0){const o=new Uint8Array(this.degree);return o.set(n,i),o}return n};var x9=jh,_3={},hi={},Uh={};Uh.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Pn={};const E3="[0-9]+",C9="[A-Z $%*+\\-./:]+";let Ko="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Ko=Ko.replace(/u/g,"\\u");const I9="(?:(?![A-Z0-9 $%*+\\-./:]|"+Ko+`)(?:.|[\r
|
|
152
|
-
]))+`;Pn.KANJI=new RegExp(Ko,"g"),Pn.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Pn.BYTE=new RegExp(I9,"g"),Pn.NUMERIC=new RegExp(E3,"g"),Pn.ALPHANUMERIC=new RegExp(C9,"g");const S9=new RegExp("^"+Ko+"$"),D9=new RegExp("^"+E3+"$"),O9=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Pn.testKanji=function(e){return S9.test(e)},Pn.testNumeric=function(e){return D9.test(e)},Pn.testAlphanumeric=function(e){return O9.test(e)},function(t){const e=Uh,r=Pn;t.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(o,c){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!e.isValid(c))throw new Error("Invalid version: "+c);return c>=1&&c<10?o.ccBits[0]:c<27?o.ccBits[1]:o.ccBits[2]},t.getBestModeForData=function(o){return r.testNumeric(o)?t.NUMERIC:r.testAlphanumeric(o)?t.ALPHANUMERIC:r.testKanji(o)?t.KANJI:t.BYTE},t.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},t.isValid=function(o){return o&&o.bit&&o.ccBits};function n(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+i)}}t.from=function(o,c){if(t.isValid(o))return o;try{return n(o)}catch{return c}}}(hi),function(t){const e=Zr,r=wc,n=mc,i=hi,o=Uh,c=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,l=e.getBCHDigit(c);function h(_,S,P){for(let L=1;L<=40;L++)if(S<=t.getCapacity(L,P,_))return L}function d(_,S){return i.getCharCountIndicator(_,S)+4}function v(_,S){let P=0;return _.forEach(function(L){const k=d(L.mode,S);P+=k+L.getBitsLength()}),P}function E(_,S){for(let P=1;P<=40;P++)if(v(_,P)<=t.getCapacity(P,S,i.MIXED))return P}t.from=function(S,P){return o.isValid(S)?parseInt(S,10):P},t.getCapacity=function(S,P,L){if(!o.isValid(S))throw new Error("Invalid QR Code version");typeof L>"u"&&(L=i.BYTE);const k=e.getSymbolTotalCodewords(S),q=r.getTotalCodewordsCount(S,P),T=(k-q)*8;if(L===i.MIXED)return T;const M=T-d(L,S);switch(L){case i.NUMERIC:return Math.floor(M/10*3);case i.ALPHANUMERIC:return Math.floor(M/11*2);case i.KANJI:return Math.floor(M/13);case i.BYTE:default:return Math.floor(M/8)}},t.getBestVersionForData=function(S,P){let L;const k=n.from(P,n.M);if(Array.isArray(S)){if(S.length>1)return E(S,k);if(S.length===0)return 1;L=S[0]}else L=S;return h(L.mode,L.getLength(),k)},t.getEncodedBits=function(S){if(!o.isValid(S)||S<7)throw new Error("Invalid QR Code version");let P=S<<12;for(;e.getBCHDigit(P)-l>=0;)P^=c<<e.getBCHDigit(P)-l;return S<<12|P}}(_3);var x3={};const Fh=Zr,C3=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,A9=1<<14|1<<12|1<<10|1<<4|1<<1,I3=Fh.getBCHDigit(C3);x3.getEncodedBits=function(e,r){const n=e.bit<<3|r;let i=n<<10;for(;Fh.getBCHDigit(i)-I3>=0;)i^=C3<<Fh.getBCHDigit(i)-I3;return(n<<10|i)^A9};var S3={};const $9=hi;function Ns(t){this.mode=$9.NUMERIC,this.data=t.toString()}Ns.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},Ns.prototype.getLength=function(){return this.data.length},Ns.prototype.getBitsLength=function(){return Ns.getBitsLength(this.data.length)},Ns.prototype.write=function(e){let r,n,i;for(r=0;r+3<=this.data.length;r+=3)n=this.data.substr(r,3),i=parseInt(n,10),e.put(i,10);const o=this.data.length-r;o>0&&(n=this.data.substr(r),i=parseInt(n,10),e.put(i,o*3+1))};var P9=Ns;const T9=hi,Bh=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Ms(t){this.mode=T9.ALPHANUMERIC,this.data=t}Ms.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)},Ms.prototype.getLength=function(){return this.data.length},Ms.prototype.getBitsLength=function(){return Ms.getBitsLength(this.data.length)},Ms.prototype.write=function(e){let r;for(r=0;r+2<=this.data.length;r+=2){let n=Bh.indexOf(this.data[r])*45;n+=Bh.indexOf(this.data[r+1]),e.put(n,11)}this.data.length%2&&e.put(Bh.indexOf(this.data[r]),6)};var R9=Ms,N9=function(e){for(var r=[],n=e.length,i=0;i<n;i++){var o=e.charCodeAt(i);if(o>=55296&&o<=56319&&n>i+1){var c=e.charCodeAt(i+1);c>=56320&&c<=57343&&(o=(o-55296)*1024+c-56320+65536,i+=1)}if(o<128){r.push(o);continue}if(o<2048){r.push(o>>6|192),r.push(o&63|128);continue}if(o<55296||o>=57344&&o<65536){r.push(o>>12|224),r.push(o>>6&63|128),r.push(o&63|128);continue}if(o>=65536&&o<=1114111){r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128);continue}r.push(239,191,189)}return new Uint8Array(r).buffer};const M9=N9,L9=hi;function Ls(t){this.mode=L9.BYTE,typeof t=="string"&&(t=M9(t)),this.data=new Uint8Array(t)}Ls.getBitsLength=function(e){return e*8},Ls.prototype.getLength=function(){return this.data.length},Ls.prototype.getBitsLength=function(){return Ls.getBitsLength(this.data.length)},Ls.prototype.write=function(t){for(let e=0,r=this.data.length;e<r;e++)t.put(this.data[e],8)};var j9=Ls;const U9=hi,F9=Zr;function js(t){this.mode=U9.KANJI,this.data=t}js.getBitsLength=function(e){return e*13},js.prototype.getLength=function(){return this.data.length},js.prototype.getBitsLength=function(){return js.getBitsLength(this.data.length)},js.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let r=F9.toSJIS(this.data[e]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
|
|
153
|
-
Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),t.put(r,13)}};var B9=js,D3={exports:{}};(function(t){var e={single_source_shortest_paths:function(r,n,i){var o={},c={};c[n]=0;var l=e.PriorityQueue.make();l.push(n,0);for(var h,d,v,E,_,S,P,L,k;!l.empty();){h=l.pop(),d=h.value,E=h.cost,_=r[d]||{};for(v in _)_.hasOwnProperty(v)&&(S=_[v],P=E+S,L=c[v],k=typeof c[v]>"u",(k||L>P)&&(c[v]=P,l.push(v,P),o[v]=d))}if(typeof i<"u"&&typeof c[i]>"u"){var q=["Could not find a path from ",n," to ",i,"."].join("");throw new Error(q)}return o},extract_shortest_path_from_predecessor_list:function(r,n){for(var i=[],o=n;o;)i.push(o),r[o],o=r[o];return i.reverse(),i},find_path:function(r,n,i){var o=e.single_source_shortest_paths(r,n,i);return e.extract_shortest_path_from_predecessor_list(o,i)},PriorityQueue:{make:function(r){var n=e.PriorityQueue,i={},o;r=r||{};for(o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);return i.queue=[],i.sorter=r.sorter||n.default_sorter,i},default_sorter:function(r,n){return r.cost-n.cost},push:function(r,n){var i={value:r,cost:n};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(D3),function(t){const e=hi,r=P9,n=R9,i=j9,o=B9,c=Pn,l=Zr,h=D3.exports;function d(q){return unescape(encodeURIComponent(q)).length}function v(q,T,M){const A=[];let R;for(;(R=q.exec(M))!==null;)A.push({data:R[0],index:R.index,mode:T,length:R[0].length});return A}function E(q){const T=v(c.NUMERIC,e.NUMERIC,q),M=v(c.ALPHANUMERIC,e.ALPHANUMERIC,q);let A,R;return l.isKanjiModeEnabled()?(A=v(c.BYTE,e.BYTE,q),R=v(c.KANJI,e.KANJI,q)):(A=v(c.BYTE_KANJI,e.BYTE,q),R=[]),T.concat(M,A,R).sort(function(f,x){return f.index-x.index}).map(function(f){return{data:f.data,mode:f.mode,length:f.length}})}function _(q,T){switch(T){case e.NUMERIC:return r.getBitsLength(q);case e.ALPHANUMERIC:return n.getBitsLength(q);case e.KANJI:return o.getBitsLength(q);case e.BYTE:return i.getBitsLength(q)}}function S(q){return q.reduce(function(T,M){const A=T.length-1>=0?T[T.length-1]:null;return A&&A.mode===M.mode?(T[T.length-1].data+=M.data,T):(T.push(M),T)},[])}function P(q){const T=[];for(let M=0;M<q.length;M++){const A=q[M];switch(A.mode){case e.NUMERIC:T.push([A,{data:A.data,mode:e.ALPHANUMERIC,length:A.length},{data:A.data,mode:e.BYTE,length:A.length}]);break;case e.ALPHANUMERIC:T.push([A,{data:A.data,mode:e.BYTE,length:A.length}]);break;case e.KANJI:T.push([A,{data:A.data,mode:e.BYTE,length:d(A.data)}]);break;case e.BYTE:T.push([{data:A.data,mode:e.BYTE,length:d(A.data)}])}}return T}function L(q,T){const M={},A={start:{}};let R=["start"];for(let C=0;C<q.length;C++){const f=q[C],x=[];for(let J=0;J<f.length;J++){const z=f[J],ee=""+C+J;x.push(ee),M[ee]={node:z,lastCount:0},A[ee]={};for(let de=0;de<R.length;de++){const me=R[de];M[me]&&M[me].node.mode===z.mode?(A[me][ee]=_(M[me].lastCount+z.length,z.mode)-_(M[me].lastCount,z.mode),M[me].lastCount+=z.length):(M[me]&&(M[me].lastCount=z.length),A[me][ee]=_(z.length,z.mode)+4+e.getCharCountIndicator(z.mode,T))}}R=x}for(let C=0;C<R.length;C++)A[R[C]].end=0;return{map:A,table:M}}function k(q,T){let M;const A=e.getBestModeForData(q);if(M=e.from(T,A),M!==e.BYTE&&M.bit<A.bit)throw new Error('"'+q+'" cannot be encoded with mode '+e.toString(M)+`.
|
|
154
|
-
Suggested mode is: `+e.toString(A));switch(M===e.KANJI&&!l.isKanjiModeEnabled()&&(M=e.BYTE),M){case e.NUMERIC:return new r(q);case e.ALPHANUMERIC:return new n(q);case e.KANJI:return new o(q);case e.BYTE:return new i(q)}}t.fromArray=function(T){return T.reduce(function(M,A){return typeof A=="string"?M.push(k(A,null)):A.data&&M.push(k(A.data,A.mode)),M},[])},t.fromString=function(T,M){const A=E(T,l.isKanjiModeEnabled()),R=P(A),C=L(R,M),f=h.find_path(C.map,"start","end"),x=[];for(let J=1;J<f.length-1;J++)x.push(C.table[f[J]].node);return t.fromArray(S(x))},t.rawSplit=function(T){return t.fromArray(E(T,l.isKanjiModeEnabled()))}}(S3);const Ec=Zr,kh=mc,k9=b9,H9=_9,z9=g3,W9=m3,Hh=v3,zh=wc,q9=x9,xc=_3,V9=x3,K9=hi,Wh=S3;function G9(t,e){const r=t.size,n=W9.getPositions(e);for(let i=0;i<n.length;i++){const o=n[i][0],c=n[i][1];for(let l=-1;l<=7;l++)if(!(o+l<=-1||r<=o+l))for(let h=-1;h<=7;h++)c+h<=-1||r<=c+h||(l>=0&&l<=6&&(h===0||h===6)||h>=0&&h<=6&&(l===0||l===6)||l>=2&&l<=4&&h>=2&&h<=4?t.set(o+l,c+h,!0,!0):t.set(o+l,c+h,!1,!0))}}function Z9(t){const e=t.size;for(let r=8;r<e-8;r++){const n=r%2===0;t.set(r,6,n,!0),t.set(6,r,n,!0)}}function Y9(t,e){const r=z9.getPositions(e);for(let n=0;n<r.length;n++){const i=r[n][0],o=r[n][1];for(let c=-2;c<=2;c++)for(let l=-2;l<=2;l++)c===-2||c===2||l===-2||l===2||c===0&&l===0?t.set(i+c,o+l,!0,!0):t.set(i+c,o+l,!1,!0)}}function J9(t,e){const r=t.size,n=xc.getEncodedBits(e);let i,o,c;for(let l=0;l<18;l++)i=Math.floor(l/3),o=l%3+r-8-3,c=(n>>l&1)===1,t.set(i,o,c,!0),t.set(o,i,c,!0)}function qh(t,e,r){const n=t.size,i=V9.getEncodedBits(e,r);let o,c;for(o=0;o<15;o++)c=(i>>o&1)===1,o<6?t.set(o,8,c,!0):o<8?t.set(o+1,8,c,!0):t.set(n-15+o,8,c,!0),o<8?t.set(8,n-o-1,c,!0):o<9?t.set(8,15-o-1+1,c,!0):t.set(8,15-o-1,c,!0);t.set(n-8,8,1,!0)}function X9(t,e){const r=t.size;let n=-1,i=r-1,o=7,c=0;for(let l=r-1;l>0;l-=2)for(l===6&&l--;;){for(let h=0;h<2;h++)if(!t.isReserved(i,l-h)){let d=!1;c<e.length&&(d=(e[c]>>>o&1)===1),t.set(i,l-h,d),o--,o===-1&&(c++,o=7)}if(i+=n,i<0||r<=i){i-=n,n=-n;break}}}function Q9(t,e,r){const n=new k9;r.forEach(function(h){n.put(h.mode.bit,4),n.put(h.getLength(),K9.getCharCountIndicator(h.mode,t)),h.write(n)});const i=Ec.getSymbolTotalCodewords(t),o=zh.getTotalCodewordsCount(t,e),c=(i-o)*8;for(n.getLengthInBits()+4<=c&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);const l=(c-n.getLengthInBits())/8;for(let h=0;h<l;h++)n.put(h%2?17:236,8);return eC(n,t,e)}function eC(t,e,r){const n=Ec.getSymbolTotalCodewords(e),i=zh.getTotalCodewordsCount(e,r),o=n-i,c=zh.getBlocksCount(e,r),l=n%c,h=c-l,d=Math.floor(n/c),v=Math.floor(o/c),E=v+1,_=d-v,S=new q9(_);let P=0;const L=new Array(c),k=new Array(c);let q=0;const T=new Uint8Array(t.buffer);for(let f=0;f<c;f++){const x=f<h?v:E;L[f]=T.slice(P,P+x),k[f]=S.encode(L[f]),P+=x,q=Math.max(q,x)}const M=new Uint8Array(n);let A=0,R,C;for(R=0;R<q;R++)for(C=0;C<c;C++)R<L[C].length&&(M[A++]=L[C][R]);for(R=0;R<_;R++)for(C=0;C<c;C++)M[A++]=k[C][R];return M}function tC(t,e,r,n){let i;if(Array.isArray(t))i=Wh.fromArray(t);else if(typeof t=="string"){let d=e;if(!d){const v=Wh.rawSplit(t);d=xc.getBestVersionForData(v,r)}i=Wh.fromString(t,d||40)}else throw new Error("Invalid data");const o=xc.getBestVersionForData(i,r);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=o;else if(e<o)throw new Error(`
|
|
145
|
+
*/const Nr=Hx(class extends zx{constructor(t){var e;if(super(t),t.type!==kx.ATTRIBUTE||t.name!=="class"||((e=t.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var r,n;if(this.it===void 0){this.it=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in e)e[o]&&!(!((r=this.nt)===null||r===void 0)&&r.has(o))&&this.it.add(o);return this.render(e)}const i=t.element.classList;this.it.forEach(o=>{o in e||(i.remove(o),this.it.delete(o))});for(const o in e){const c=!!e[o];c===this.it.has(o)||!((n=this.nt)===null||n===void 0)&&n.has(o)||(c?(i.add(o),this.it.add(o)):(i.remove(o),this.it.delete(o)))}return Yi}});function Wx(t,e){t.indexOf(e)===-1&&t.push(e)}const i3=(t,e,r)=>Math.min(Math.max(r,t),e),un={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},yc=t=>typeof t=="number",Ms=t=>Array.isArray(t)&&!yc(t[0]),qx=(t,e,r)=>{const n=e-t;return((r-t)%n+n)%n+t};function Vx(t,e){return Ms(t)?t[qx(0,t.length,e)]:t}const s3=(t,e,r)=>-r*t+r*e+t,o3=()=>{},wi=t=>t,jh=(t,e,r)=>e-t===0?1:(r-t)/(e-t);function a3(t,e){const r=t[t.length-1];for(let n=1;n<=e;n++){const i=jh(0,e,n);t.push(s3(r,1,i))}}function Kx(t){const e=[0];return a3(e,t-1),e}function Gx(t,e=Kx(t.length),r=wi){const n=t.length,i=n-e.length;return i>0&&a3(e,i),o=>{let c=0;for(;c<n-2&&!(o<e[c+1]);c++);let l=i3(0,1,jh(e[c],e[c+1],o));return l=Vx(r,c)(l),s3(t[c],t[c+1],l)}}const c3=t=>Array.isArray(t)&&yc(t[0]),Fh=t=>typeof t=="object"&&Boolean(t.createAnimation),Xi=t=>typeof t=="function",Zx=t=>typeof t=="string",Xo={ms:t=>t*1e3,s:t=>t/1e3},l3=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,Yx=1e-7,Jx=12;function Xx(t,e,r,n,i){let o,c,l=0;do c=e+(r-e)/2,o=l3(c,n,i)-t,o>0?r=c:e=c;while(Math.abs(o)>Yx&&++l<Jx);return c}function Qo(t,e,r,n){if(t===e&&r===n)return wi;const i=o=>Xx(o,0,1,t,r);return o=>o===0||o===1?o:l3(i(o),e,n)}const Qx=(t,e="end")=>r=>{r=e==="end"?Math.min(r,.999):Math.max(r,.001);const n=r*t,i=e==="end"?Math.floor(n):Math.ceil(n);return i3(0,1,i/t)},u3={ease:Qo(.25,.1,.25,1),"ease-in":Qo(.42,0,1,1),"ease-in-out":Qo(.42,0,.58,1),"ease-out":Qo(0,0,.58,1)},e9=/\((.*?)\)/;function h3(t){if(Xi(t))return t;if(c3(t))return Qo(...t);if(u3[t])return u3[t];if(t.startsWith("steps")){const e=e9.exec(t);if(e){const r=e[1].split(",");return Qx(parseFloat(r[0]),r[1].trim())}}return wi}class f3{constructor(e,r=[0,1],{easing:n,duration:i=un.duration,delay:o=un.delay,endDelay:c=un.endDelay,repeat:l=un.repeat,offset:h,direction:d="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=wi,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((E,_)=>{this.resolve=E,this.reject=_}),n=n||un.easing,Fh(n)){const E=n.createAnimation(r);n=E.easing,r=E.keyframes||r,i=E.duration||i}this.repeat=l,this.easing=Ms(n)?wi:h3(n),this.updateDuration(i);const v=Gx(r,h,Ms(n)?n.map(h3):wi);this.tick=E=>{var _;o=o;let O=0;this.pauseTime!==void 0?O=this.pauseTime:O=(E-this.startTime)*this.rate,this.t=O,O/=1e3,O=Math.max(O-o,0),this.playState==="finished"&&this.pauseTime===void 0&&(O=this.totalDuration);const P=O/this.duration;let U=Math.floor(P),H=P%1;!H&&P>=1&&(H=1),H===1&&U--;const G=U%2;(d==="reverse"||d==="alternate"&&G||d==="alternate-reverse"&&!G)&&(H=1-H);const N=O>=this.totalDuration?1:Math.min(H,1),L=v(this.easing(N));e(L),this.pauseTime===void 0&&(this.playState==="finished"||O>=this.totalDuration+c)?(this.playState="finished",(_=this.resolve)===null||_===void 0||_.call(this,L)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const e=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(e=this.reject)===null||e===void 0||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){this.pauseTime!==void 0||this.rate===0?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}var Bh=function(){};process.env.NODE_ENV!=="production"&&(Bh=function(t,e){if(!t)throw new Error(e)});class t9{setAnimation(e){this.animation=e,e?.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const kh=new WeakMap;function d3(t){return kh.has(t)||kh.set(t,{transforms:[],values:new Map}),kh.get(t)}function r9(t,e){return t.has(e)||t.set(e,new t9),t.get(e)}const n9=["","X","Y","Z"],i9=["translate","scale","rotate","skew"],bc={x:"translateX",y:"translateY",z:"translateZ"},p3={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},s9={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:p3,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:wi},skew:p3},ea=new Map,Hh=t=>`--motion-${t}`,_c=["x","y","z"];i9.forEach(t=>{n9.forEach(e=>{_c.push(t+e),ea.set(Hh(t+e),s9[t])})});const o9=(t,e)=>_c.indexOf(t)-_c.indexOf(e),a9=new Set(_c),g3=t=>a9.has(t),c9=(t,e)=>{bc[e]&&(e=bc[e]);const{transforms:r}=d3(t);Wx(r,e),t.style.transform=l9(r)},l9=t=>t.sort(o9).reduce(u9,"").trim(),u9=(t,e)=>`${t} ${e}(var(${Hh(e)}))`,zh=t=>t.startsWith("--"),m3=new Set;function h9(t){if(!m3.has(t)){m3.add(t);try{const{syntax:e,initialValue:r}=ea.has(t)?ea.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:r})}catch{}}}const Wh=(t,e)=>document.createElement("div").animate(t,e),w3={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Wh({opacity:[1]})}catch{return!1}return!0},finished:()=>Boolean(Wh({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{Wh({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},qh={},Us={};for(const t in w3)Us[t]=()=>(qh[t]===void 0&&(qh[t]=w3[t]()),qh[t]);const f9=.015,d9=(t,e)=>{let r="";const n=Math.round(e/f9);for(let i=0;i<n;i++)r+=t(jh(0,n-1,i))+", ";return r.substring(0,r.length-2)},v3=(t,e)=>Xi(t)?Us.linearEasing()?`linear(${d9(t,e)})`:un.easing:c3(t)?p9(t):t,p9=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`;function g9(t,e){for(let r=0;r<t.length;r++)t[r]===null&&(t[r]=r?t[r-1]:e());return t}const m9=t=>Array.isArray(t)?t:[t];function Vh(t){return bc[t]&&(t=bc[t]),g3(t)?Hh(t):t}const Ec={get:(t,e)=>{e=Vh(e);let r=zh(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!r&&r!==0){const n=ea.get(e);n&&(r=n.initialValue)}return r},set:(t,e,r)=>{e=Vh(e),zh(e)?t.style.setProperty(e,r):t.style[e]=r}};function y3(t,e=!0){if(!(!t||t.playState==="finished"))try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch{}}function w9(t,e){var r;let n=e?.toDefaultUnit||wi;const i=t[t.length-1];if(Zx(i)){const o=((r=i.match(/(-?[\d.]+)([a-z%]*)/))===null||r===void 0?void 0:r[2])||"";o&&(n=c=>c+o)}return n}function v9(){return window.__MOTION_DEV_TOOLS_RECORD}function y9(t,e,r,n={},i){const o=v9(),c=n.record!==!1&&o;let l,{duration:h=un.duration,delay:d=un.delay,endDelay:v=un.endDelay,repeat:E=un.repeat,easing:_=un.easing,persist:O=!1,direction:P,offset:U,allowWebkitAcceleration:H=!1}=n;const G=d3(t),N=g3(e);let L=Us.waapi();N&&c9(t,e);const $=Vh(e),T=r9(G.values,$),I=ea.get($);return y3(T.animation,!(Fh(_)&&T.generator)&&n.record!==!1),()=>{const f=()=>{var z,ee;return(ee=(z=Ec.get(t,$))!==null&&z!==void 0?z:I?.initialValue)!==null&&ee!==void 0?ee:0};let x=g9(m9(r),f);const J=w9(x,I);if(Fh(_)){const z=_.createAnimation(x,e!=="opacity",f,$,T);_=z.easing,x=z.keyframes||x,h=z.duration||h}if(zh($)&&(Us.cssRegisterProperty()?h9($):L=!1),N&&!Us.linearEasing()&&(Xi(_)||Ms(_)&&_.some(Xi))&&(L=!1),L){I&&(x=x.map(de=>yc(de)?I.toDefaultUnit(de):de)),x.length===1&&(!Us.partialKeyframes()||c)&&x.unshift(f());const z={delay:Xo.ms(d),duration:Xo.ms(h),endDelay:Xo.ms(v),easing:Ms(_)?void 0:v3(_,h),direction:P,iterations:E+1,fill:"both"};l=t.animate({[$]:x,offset:U,easing:Ms(_)?_.map(de=>v3(de,h)):void 0},z),l.finished||(l.finished=new Promise((de,me)=>{l.onfinish=de,l.oncancel=me}));const ee=x[x.length-1];l.finished.then(()=>{O||(Ec.set(t,$,ee),l.cancel())}).catch(o3),H||(l.playbackRate=1.000001)}else if(i&&N)x=x.map(z=>typeof z=="string"?parseFloat(z):z),x.length===1&&x.unshift(parseFloat(f())),l=new i(z=>{Ec.set(t,$,J?J(z):z)},x,Object.assign(Object.assign({},n),{duration:h,easing:_}));else{const z=x[x.length-1];Ec.set(t,$,I&&yc(z)?I.toDefaultUnit(z):z)}return c&&o(t,e,x,{duration:h,delay:d,easing:_,repeat:E,offset:U},"motion-one"),T.setAnimation(l),l}}const b9=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function b3(t,e){var r;return typeof t=="string"?e?((r=e[t])!==null&&r!==void 0||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}const _9=t=>t(),_3=(t,e,r=un.duration)=>new Proxy({animations:t.map(_9).filter(Boolean),duration:r,options:e},x9),E9=t=>t.animations[0],x9={get:(t,e)=>{const r=E9(t);switch(e){case"duration":return t.duration;case"currentTime":return Xo.s(r?.[e]||0);case"playbackRate":case"playState":return r?.[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(C9)).catch(o3)),t.finished;case"stop":return()=>{t.animations.forEach(n=>y3(n))};case"forEachNative":return n=>{t.animations.forEach(i=>n(i,t))};default:return typeof r?.[e]>"u"?void 0:()=>t.animations.forEach(n=>n[e]())}},set:(t,e,r)=>{switch(e){case"currentTime":r=Xo.ms(r);case"currentTime":case"playbackRate":for(let n=0;n<t.animations.length;n++)t.animations[n][e]=r;return!0}return!1}},C9=t=>t.finished;function I9(t,e,r){return Xi(t)?t(e,r):t}function S9(t){return function(r,n,i={}){r=b3(r);const o=r.length;Bh(Boolean(o),"No valid element provided."),Bh(Boolean(n),"No keyframes defined.");const c=[];for(let l=0;l<o;l++){const h=r[l];for(const d in n){const v=b9(i,d);v.delay=I9(v.delay,l,o);const E=y9(h,d,n[d],v,t);c.push(E)}}return _3(c,i,i.duration)}}const O9=S9(f3);function D9(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}const A9={any:0,all:1};function $9(t,e,{root:r,margin:n,amount:i="any"}={}){if(typeof IntersectionObserver>"u")return()=>{};const o=b3(t),c=new WeakMap,l=d=>{d.forEach(v=>{const E=c.get(v.target);if(v.isIntersecting!==Boolean(E))if(v.isIntersecting){const _=e(v);Xi(_)?c.set(v.target,_):h.unobserve(v.target)}else E&&(E(v),c.delete(v.target))})},h=new IntersectionObserver(l,{root:r,rootMargin:n,threshold:typeof i=="number"?i:A9[i]});return o.forEach(d=>h.observe(d)),()=>h.disconnect()}function Kh(t,e,r){t.dispatchEvent(new CustomEvent(e,{detail:{originalEvent:r}}))}function E3(t,e,r){t.dispatchEvent(new CustomEvent(e,{detail:{originalEntry:r}}))}const P9={isActive:t=>Boolean(t.inView),subscribe:(t,{enable:e,disable:r},{inViewOptions:n={}})=>{const{once:i}=n,o=D9(n,["once"]);return $9(t,c=>{if(e(),E3(t,"viewenter",c),!i)return l=>{r(),E3(t,"viewleave",l)}},o)}},x3=(t,e,r)=>n=>{n.pointerType&&n.pointerType!=="mouse"||(r(),Kh(t,e,n))};[...Object.keys({inView:P9,hover:{isActive:t=>Boolean(t.hover),subscribe:(t,{enable:e,disable:r})=>{const n=x3(t,"hoverstart",e),i=x3(t,"hoverend",r);return t.addEventListener("pointerenter",n),t.addEventListener("pointerleave",i),()=>{t.removeEventListener("pointerenter",n),t.removeEventListener("pointerleave",i)}}},press:{isActive:t=>Boolean(t.press),subscribe:(t,{enable:e,disable:r})=>{const n=o=>{r(),Kh(t,"pressend",o),window.removeEventListener("pointerup",n)},i=o=>{e(),Kh(t,"pressstart",o),window.addEventListener("pointerup",n)};return t.addEventListener("pointerdown",i),()=>{t.removeEventListener("pointerdown",i),window.removeEventListener("pointerup",n)}}}})];function T9(t,e={}){return _3([()=>{const r=new f3(t,[0,1],e);return r.finished.catch(()=>{}),r}],e,e.duration)}function Qi(t,e,r){return(Xi(t)?T9:O9)(t,e,r)}var ta={},R9=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},C3={},Yr={};let Gh;const N9=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Yr.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17},Yr.getSymbolTotalCodewords=function(e){return N9[e]},Yr.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e},Yr.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');Gh=e},Yr.isKanjiModeEnabled=function(){return typeof Gh<"u"},Yr.toSJIS=function(e){return Gh(e)};var xc={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+r)}}t.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},t.from=function(n,i){if(t.isValid(n))return n;try{return e(n)}catch{return i}}})(xc);function I3(){this.buffer=[],this.length=0}I3.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let r=0;r<e;r++)this.putBit((t>>>e-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const 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 L9=I3;function ra(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}ra.prototype.set=function(t,e,r,n){const i=t*this.size+e;this.data[i]=r,n&&(this.reservedBit[i]=!0)},ra.prototype.get=function(t,e){return this.data[t*this.size+e]},ra.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r},ra.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var M9=ra,S3={};(function(t){const e=Yr.getSymbolSize;t.getRowColCoords=function(n){if(n===1)return[];const i=Math.floor(n/7)+2,o=e(n),c=o===145?26:Math.ceil((o-13)/(2*i-2))*2,l=[o-7];for(let h=1;h<i-1;h++)l[h]=l[h-1]-c;return l.push(6),l.reverse()},t.getPositions=function(n){const i=[],o=t.getRowColCoords(n),c=o.length;for(let l=0;l<c;l++)for(let h=0;h<c;h++)l===0&&h===0||l===0&&h===c-1||l===c-1&&h===0||i.push([o[l],o[h]]);return i}})(S3);var O3={};const U9=Yr.getSymbolSize,D3=7;O3.getPositions=function(e){const r=U9(e);return[[0,0],[r-D3,0],[0,r-D3]]};var A3={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(i){return i!=null&&i!==""&&!isNaN(i)&&i>=0&&i<=7},t.from=function(i){return t.isValid(i)?parseInt(i,10):void 0},t.getPenaltyN1=function(i){const o=i.size;let c=0,l=0,h=0,d=null,v=null;for(let E=0;E<o;E++){l=h=0,d=v=null;for(let _=0;_<o;_++){let O=i.get(E,_);O===d?l++:(l>=5&&(c+=e.N1+(l-5)),d=O,l=1),O=i.get(_,E),O===v?h++:(h>=5&&(c+=e.N1+(h-5)),v=O,h=1)}l>=5&&(c+=e.N1+(l-5)),h>=5&&(c+=e.N1+(h-5))}return c},t.getPenaltyN2=function(i){const o=i.size;let c=0;for(let l=0;l<o-1;l++)for(let h=0;h<o-1;h++){const d=i.get(l,h)+i.get(l,h+1)+i.get(l+1,h)+i.get(l+1,h+1);(d===4||d===0)&&c++}return c*e.N2},t.getPenaltyN3=function(i){const o=i.size;let c=0,l=0,h=0;for(let d=0;d<o;d++){l=h=0;for(let v=0;v<o;v++)l=l<<1&2047|i.get(d,v),v>=10&&(l===1488||l===93)&&c++,h=h<<1&2047|i.get(v,d),v>=10&&(h===1488||h===93)&&c++}return c*e.N3},t.getPenaltyN4=function(i){let o=0;const c=i.data.length;for(let h=0;h<c;h++)o+=i.data[h];return Math.abs(Math.ceil(o*100/c/5)-10)*e.N4};function r(n,i,o){switch(n){case t.Patterns.PATTERN000:return(i+o)%2===0;case t.Patterns.PATTERN001:return i%2===0;case t.Patterns.PATTERN010:return o%3===0;case t.Patterns.PATTERN011:return(i+o)%3===0;case t.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(o/3))%2===0;case t.Patterns.PATTERN101:return i*o%2+i*o%3===0;case t.Patterns.PATTERN110:return(i*o%2+i*o%3)%2===0;case t.Patterns.PATTERN111:return(i*o%3+(i+o)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}t.applyMask=function(i,o){const c=o.size;for(let l=0;l<c;l++)for(let h=0;h<c;h++)o.isReserved(h,l)||o.xor(h,l,r(i,h,l))},t.getBestMask=function(i,o){const c=Object.keys(t.Patterns).length;let l=0,h=1/0;for(let d=0;d<c;d++){o(d),t.applyMask(d,i);const v=t.getPenaltyN1(i)+t.getPenaltyN2(i)+t.getPenaltyN3(i)+t.getPenaltyN4(i);t.applyMask(d,i),v<h&&(h=v,l=d)}return l}})(A3);var Cc={};const vi=xc,Ic=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Sc=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Cc.getBlocksCount=function(e,r){switch(r){case vi.L:return Ic[(e-1)*4+0];case vi.M:return Ic[(e-1)*4+1];case vi.Q:return Ic[(e-1)*4+2];case vi.H:return Ic[(e-1)*4+3];default:return}},Cc.getTotalCodewordsCount=function(e,r){switch(r){case vi.L:return Sc[(e-1)*4+0];case vi.M:return Sc[(e-1)*4+1];case vi.Q:return Sc[(e-1)*4+2];case vi.H:return Sc[(e-1)*4+3];default:return}};var $3={},Oc={};const na=new Uint8Array(512),Dc=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)na[r]=e,Dc[e]=r,e<<=1,e&256&&(e^=285);for(let r=255;r<512;r++)na[r]=na[r-255]})(),Oc.log=function(e){if(e<1)throw new Error("log("+e+")");return Dc[e]},Oc.exp=function(e){return na[e]},Oc.mul=function(e,r){return e===0||r===0?0:na[Dc[e]+Dc[r]]},function(t){const e=Oc;t.mul=function(n,i){const o=new Uint8Array(n.length+i.length-1);for(let c=0;c<n.length;c++)for(let l=0;l<i.length;l++)o[c+l]^=e.mul(n[c],i[l]);return o},t.mod=function(n,i){let o=new Uint8Array(n);for(;o.length-i.length>=0;){const c=o[0];for(let h=0;h<i.length;h++)o[h]^=e.mul(i[h],c);let l=0;for(;l<o.length&&o[l]===0;)l++;o=o.slice(l)}return o},t.generateECPolynomial=function(n){let i=new Uint8Array([1]);for(let o=0;o<n;o++)i=t.mul(i,new Uint8Array([1,e.exp(o)]));return i}}($3);const P3=$3;function Zh(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}Zh.prototype.initialize=function(e){this.degree=e,this.genPoly=P3.generateECPolynomial(this.degree)},Zh.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(e.length+this.degree);r.set(e);const n=P3.mod(r,this.genPoly),i=this.degree-n.length;if(i>0){const o=new Uint8Array(this.degree);return o.set(n,i),o}return n};var j9=Zh,T3={},yi={},Yh={};Yh.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Ln={};const R3="[0-9]+",F9="[A-Z $%*+\\-./:]+";let ia="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";ia=ia.replace(/u/g,"\\u");const B9="(?:(?![A-Z0-9 $%*+\\-./:]|"+ia+`)(?:.|[\r
|
|
146
|
+
]))+`;Ln.KANJI=new RegExp(ia,"g"),Ln.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Ln.BYTE=new RegExp(B9,"g"),Ln.NUMERIC=new RegExp(R3,"g"),Ln.ALPHANUMERIC=new RegExp(F9,"g");const k9=new RegExp("^"+ia+"$"),H9=new RegExp("^"+R3+"$"),z9=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Ln.testKanji=function(e){return k9.test(e)},Ln.testNumeric=function(e){return H9.test(e)},Ln.testAlphanumeric=function(e){return z9.test(e)},function(t){const e=Yh,r=Ln;t.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(o,c){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!e.isValid(c))throw new Error("Invalid version: "+c);return c>=1&&c<10?o.ccBits[0]:c<27?o.ccBits[1]:o.ccBits[2]},t.getBestModeForData=function(o){return r.testNumeric(o)?t.NUMERIC:r.testAlphanumeric(o)?t.ALPHANUMERIC:r.testKanji(o)?t.KANJI:t.BYTE},t.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},t.isValid=function(o){return o&&o.bit&&o.ccBits};function n(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+i)}}t.from=function(o,c){if(t.isValid(o))return o;try{return n(o)}catch{return c}}}(yi),function(t){const e=Yr,r=Cc,n=xc,i=yi,o=Yh,c=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,l=e.getBCHDigit(c);function h(_,O,P){for(let U=1;U<=40;U++)if(O<=t.getCapacity(U,P,_))return U}function d(_,O){return i.getCharCountIndicator(_,O)+4}function v(_,O){let P=0;return _.forEach(function(U){const H=d(U.mode,O);P+=H+U.getBitsLength()}),P}function E(_,O){for(let P=1;P<=40;P++)if(v(_,P)<=t.getCapacity(P,O,i.MIXED))return P}t.from=function(O,P){return o.isValid(O)?parseInt(O,10):P},t.getCapacity=function(O,P,U){if(!o.isValid(O))throw new Error("Invalid QR Code version");typeof U>"u"&&(U=i.BYTE);const H=e.getSymbolTotalCodewords(O),G=r.getTotalCodewordsCount(O,P),N=(H-G)*8;if(U===i.MIXED)return N;const L=N-d(U,O);switch(U){case i.NUMERIC:return Math.floor(L/10*3);case i.ALPHANUMERIC:return Math.floor(L/11*2);case i.KANJI:return Math.floor(L/13);case i.BYTE:default:return Math.floor(L/8)}},t.getBestVersionForData=function(O,P){let U;const H=n.from(P,n.M);if(Array.isArray(O)){if(O.length>1)return E(O,H);if(O.length===0)return 1;U=O[0]}else U=O;return h(U.mode,U.getLength(),H)},t.getEncodedBits=function(O){if(!o.isValid(O)||O<7)throw new Error("Invalid QR Code version");let P=O<<12;for(;e.getBCHDigit(P)-l>=0;)P^=c<<e.getBCHDigit(P)-l;return O<<12|P}}(T3);var N3={};const Jh=Yr,L3=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,W9=1<<14|1<<12|1<<10|1<<4|1<<1,M3=Jh.getBCHDigit(L3);N3.getEncodedBits=function(e,r){const n=e.bit<<3|r;let i=n<<10;for(;Jh.getBCHDigit(i)-M3>=0;)i^=L3<<Jh.getBCHDigit(i)-M3;return(n<<10|i)^W9};var U3={};const q9=yi;function js(t){this.mode=q9.NUMERIC,this.data=t.toString()}js.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},js.prototype.getLength=function(){return this.data.length},js.prototype.getBitsLength=function(){return js.getBitsLength(this.data.length)},js.prototype.write=function(e){let r,n,i;for(r=0;r+3<=this.data.length;r+=3)n=this.data.substr(r,3),i=parseInt(n,10),e.put(i,10);const o=this.data.length-r;o>0&&(n=this.data.substr(r),i=parseInt(n,10),e.put(i,o*3+1))};var V9=js;const K9=yi,Xh=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Fs(t){this.mode=K9.ALPHANUMERIC,this.data=t}Fs.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)},Fs.prototype.getLength=function(){return this.data.length},Fs.prototype.getBitsLength=function(){return Fs.getBitsLength(this.data.length)},Fs.prototype.write=function(e){let r;for(r=0;r+2<=this.data.length;r+=2){let n=Xh.indexOf(this.data[r])*45;n+=Xh.indexOf(this.data[r+1]),e.put(n,11)}this.data.length%2&&e.put(Xh.indexOf(this.data[r]),6)};var G9=Fs,Z9=function(e){for(var r=[],n=e.length,i=0;i<n;i++){var o=e.charCodeAt(i);if(o>=55296&&o<=56319&&n>i+1){var c=e.charCodeAt(i+1);c>=56320&&c<=57343&&(o=(o-55296)*1024+c-56320+65536,i+=1)}if(o<128){r.push(o);continue}if(o<2048){r.push(o>>6|192),r.push(o&63|128);continue}if(o<55296||o>=57344&&o<65536){r.push(o>>12|224),r.push(o>>6&63|128),r.push(o&63|128);continue}if(o>=65536&&o<=1114111){r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128);continue}r.push(239,191,189)}return new Uint8Array(r).buffer};const Y9=Z9,J9=yi;function Bs(t){this.mode=J9.BYTE,typeof t=="string"&&(t=Y9(t)),this.data=new Uint8Array(t)}Bs.getBitsLength=function(e){return e*8},Bs.prototype.getLength=function(){return this.data.length},Bs.prototype.getBitsLength=function(){return Bs.getBitsLength(this.data.length)},Bs.prototype.write=function(t){for(let e=0,r=this.data.length;e<r;e++)t.put(this.data[e],8)};var X9=Bs;const Q9=yi,eC=Yr;function ks(t){this.mode=Q9.KANJI,this.data=t}ks.getBitsLength=function(e){return e*13},ks.prototype.getLength=function(){return this.data.length},ks.prototype.getBitsLength=function(){return ks.getBitsLength(this.data.length)},ks.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let r=eC.toSJIS(this.data[e]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
|
|
147
|
+
Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),t.put(r,13)}};var tC=ks,j3={exports:{}};(function(t){var e={single_source_shortest_paths:function(r,n,i){var o={},c={};c[n]=0;var l=e.PriorityQueue.make();l.push(n,0);for(var h,d,v,E,_,O,P,U,H;!l.empty();){h=l.pop(),d=h.value,E=h.cost,_=r[d]||{};for(v in _)_.hasOwnProperty(v)&&(O=_[v],P=E+O,U=c[v],H=typeof c[v]>"u",(H||U>P)&&(c[v]=P,l.push(v,P),o[v]=d))}if(typeof i<"u"&&typeof c[i]>"u"){var G=["Could not find a path from ",n," to ",i,"."].join("");throw new Error(G)}return o},extract_shortest_path_from_predecessor_list:function(r,n){for(var i=[],o=n;o;)i.push(o),r[o],o=r[o];return i.reverse(),i},find_path:function(r,n,i){var o=e.single_source_shortest_paths(r,n,i);return e.extract_shortest_path_from_predecessor_list(o,i)},PriorityQueue:{make:function(r){var n=e.PriorityQueue,i={},o;r=r||{};for(o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);return i.queue=[],i.sorter=r.sorter||n.default_sorter,i},default_sorter:function(r,n){return r.cost-n.cost},push:function(r,n){var i={value:r,cost:n};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(j3),function(t){const e=yi,r=V9,n=G9,i=X9,o=tC,c=Ln,l=Yr,h=j3.exports;function d(G){return unescape(encodeURIComponent(G)).length}function v(G,N,L){const $=[];let T;for(;(T=G.exec(L))!==null;)$.push({data:T[0],index:T.index,mode:N,length:T[0].length});return $}function E(G){const N=v(c.NUMERIC,e.NUMERIC,G),L=v(c.ALPHANUMERIC,e.ALPHANUMERIC,G);let $,T;return l.isKanjiModeEnabled()?($=v(c.BYTE,e.BYTE,G),T=v(c.KANJI,e.KANJI,G)):($=v(c.BYTE_KANJI,e.BYTE,G),T=[]),N.concat(L,$,T).sort(function(f,x){return f.index-x.index}).map(function(f){return{data:f.data,mode:f.mode,length:f.length}})}function _(G,N){switch(N){case e.NUMERIC:return r.getBitsLength(G);case e.ALPHANUMERIC:return n.getBitsLength(G);case e.KANJI:return o.getBitsLength(G);case e.BYTE:return i.getBitsLength(G)}}function O(G){return G.reduce(function(N,L){const $=N.length-1>=0?N[N.length-1]:null;return $&&$.mode===L.mode?(N[N.length-1].data+=L.data,N):(N.push(L),N)},[])}function P(G){const N=[];for(let L=0;L<G.length;L++){const $=G[L];switch($.mode){case e.NUMERIC:N.push([$,{data:$.data,mode:e.ALPHANUMERIC,length:$.length},{data:$.data,mode:e.BYTE,length:$.length}]);break;case e.ALPHANUMERIC:N.push([$,{data:$.data,mode:e.BYTE,length:$.length}]);break;case e.KANJI:N.push([$,{data:$.data,mode:e.BYTE,length:d($.data)}]);break;case e.BYTE:N.push([{data:$.data,mode:e.BYTE,length:d($.data)}])}}return N}function U(G,N){const L={},$={start:{}};let T=["start"];for(let I=0;I<G.length;I++){const f=G[I],x=[];for(let J=0;J<f.length;J++){const z=f[J],ee=""+I+J;x.push(ee),L[ee]={node:z,lastCount:0},$[ee]={};for(let de=0;de<T.length;de++){const me=T[de];L[me]&&L[me].node.mode===z.mode?($[me][ee]=_(L[me].lastCount+z.length,z.mode)-_(L[me].lastCount,z.mode),L[me].lastCount+=z.length):(L[me]&&(L[me].lastCount=z.length),$[me][ee]=_(z.length,z.mode)+4+e.getCharCountIndicator(z.mode,N))}}T=x}for(let I=0;I<T.length;I++)$[T[I]].end=0;return{map:$,table:L}}function H(G,N){let L;const $=e.getBestModeForData(G);if(L=e.from(N,$),L!==e.BYTE&&L.bit<$.bit)throw new Error('"'+G+'" cannot be encoded with mode '+e.toString(L)+`.
|
|
148
|
+
Suggested mode is: `+e.toString($));switch(L===e.KANJI&&!l.isKanjiModeEnabled()&&(L=e.BYTE),L){case e.NUMERIC:return new r(G);case e.ALPHANUMERIC:return new n(G);case e.KANJI:return new o(G);case e.BYTE:return new i(G)}}t.fromArray=function(N){return N.reduce(function(L,$){return typeof $=="string"?L.push(H($,null)):$.data&&L.push(H($.data,$.mode)),L},[])},t.fromString=function(N,L){const $=E(N,l.isKanjiModeEnabled()),T=P($),I=U(T,L),f=h.find_path(I.map,"start","end"),x=[];for(let J=1;J<f.length-1;J++)x.push(I.table[f[J]].node);return t.fromArray(O(x))},t.rawSplit=function(N){return t.fromArray(E(N,l.isKanjiModeEnabled()))}}(U3);const Ac=Yr,Qh=xc,rC=L9,nC=M9,iC=S3,sC=O3,ef=A3,tf=Cc,oC=j9,$c=T3,aC=N3,cC=yi,rf=U3;function lC(t,e){const r=t.size,n=sC.getPositions(e);for(let i=0;i<n.length;i++){const o=n[i][0],c=n[i][1];for(let l=-1;l<=7;l++)if(!(o+l<=-1||r<=o+l))for(let h=-1;h<=7;h++)c+h<=-1||r<=c+h||(l>=0&&l<=6&&(h===0||h===6)||h>=0&&h<=6&&(l===0||l===6)||l>=2&&l<=4&&h>=2&&h<=4?t.set(o+l,c+h,!0,!0):t.set(o+l,c+h,!1,!0))}}function uC(t){const e=t.size;for(let r=8;r<e-8;r++){const n=r%2===0;t.set(r,6,n,!0),t.set(6,r,n,!0)}}function hC(t,e){const r=iC.getPositions(e);for(let n=0;n<r.length;n++){const i=r[n][0],o=r[n][1];for(let c=-2;c<=2;c++)for(let l=-2;l<=2;l++)c===-2||c===2||l===-2||l===2||c===0&&l===0?t.set(i+c,o+l,!0,!0):t.set(i+c,o+l,!1,!0)}}function fC(t,e){const r=t.size,n=$c.getEncodedBits(e);let i,o,c;for(let l=0;l<18;l++)i=Math.floor(l/3),o=l%3+r-8-3,c=(n>>l&1)===1,t.set(i,o,c,!0),t.set(o,i,c,!0)}function nf(t,e,r){const n=t.size,i=aC.getEncodedBits(e,r);let o,c;for(o=0;o<15;o++)c=(i>>o&1)===1,o<6?t.set(o,8,c,!0):o<8?t.set(o+1,8,c,!0):t.set(n-15+o,8,c,!0),o<8?t.set(8,n-o-1,c,!0):o<9?t.set(8,15-o-1+1,c,!0):t.set(8,15-o-1,c,!0);t.set(n-8,8,1,!0)}function dC(t,e){const r=t.size;let n=-1,i=r-1,o=7,c=0;for(let l=r-1;l>0;l-=2)for(l===6&&l--;;){for(let h=0;h<2;h++)if(!t.isReserved(i,l-h)){let d=!1;c<e.length&&(d=(e[c]>>>o&1)===1),t.set(i,l-h,d),o--,o===-1&&(c++,o=7)}if(i+=n,i<0||r<=i){i-=n,n=-n;break}}}function pC(t,e,r){const n=new rC;r.forEach(function(h){n.put(h.mode.bit,4),n.put(h.getLength(),cC.getCharCountIndicator(h.mode,t)),h.write(n)});const i=Ac.getSymbolTotalCodewords(t),o=tf.getTotalCodewordsCount(t,e),c=(i-o)*8;for(n.getLengthInBits()+4<=c&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);const l=(c-n.getLengthInBits())/8;for(let h=0;h<l;h++)n.put(h%2?17:236,8);return gC(n,t,e)}function gC(t,e,r){const n=Ac.getSymbolTotalCodewords(e),i=tf.getTotalCodewordsCount(e,r),o=n-i,c=tf.getBlocksCount(e,r),l=n%c,h=c-l,d=Math.floor(n/c),v=Math.floor(o/c),E=v+1,_=d-v,O=new oC(_);let P=0;const U=new Array(c),H=new Array(c);let G=0;const N=new Uint8Array(t.buffer);for(let f=0;f<c;f++){const x=f<h?v:E;U[f]=N.slice(P,P+x),H[f]=O.encode(U[f]),P+=x,G=Math.max(G,x)}const L=new Uint8Array(n);let $=0,T,I;for(T=0;T<G;T++)for(I=0;I<c;I++)T<U[I].length&&(L[$++]=U[I][T]);for(T=0;T<_;T++)for(I=0;I<c;I++)L[$++]=H[I][T];return L}function mC(t,e,r,n){let i;if(Array.isArray(t))i=rf.fromArray(t);else if(typeof t=="string"){let d=e;if(!d){const v=rf.rawSplit(t);d=$c.getBestVersionForData(v,r)}i=rf.fromString(t,d||40)}else throw new Error("Invalid data");const o=$c.getBestVersionForData(i,r);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=o;else if(e<o)throw new Error(`
|
|
155
149
|
The chosen QR Code version cannot contain this amount of data.
|
|
156
150
|
Minimum version required to store current data is: `+o+`.
|
|
157
|
-
`);const c=
|
|
158
|
-
`;return typeof n=="function"&&n(null,_),_};const iC=v9,Gh=d3,P3=O3,sC=A3;function Zh(t,e,r,n,i){const o=[].slice.call(arguments,1),c=o.length,l=typeof o[c-1]=="function";if(!l&&!iC())throw new Error("Callback required as last argument");if(l){if(c<2)throw new Error("Too few arguments provided");c===2?(i=r,r=e,e=n=void 0):c===3&&(e.getContext&&typeof i>"u"?(i=n,n=void 0):(i=n,n=r,r=e,e=void 0))}else{if(c<1)throw new Error("Too few arguments provided");return c===1?(r=e,e=n=void 0):c===2&&!e.getContext&&(n=r,r=e,e=void 0),new Promise(function(h,d){try{const v=Gh.create(r,n);h(t(v,e,n))}catch(v){d(v)}})}try{const h=Gh.create(r,n);i(null,t(h,e,n))}catch(h){i(h)}}Wo.create=Gh.create,Wo.toCanvas=Zh.bind(null,P3.render),Wo.toDataURL=Zh.bind(null,P3.renderToDataURL),Wo.toString=Zh.bind(null,function(t,e,r){return sC.render(t,r)});var oC=Object.defineProperty,T3=Object.getOwnPropertySymbols,aC=Object.prototype.hasOwnProperty,cC=Object.prototype.propertyIsEnumerable,R3=(t,e,r)=>e in t?oC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Cc=(t,e)=>{for(var r in e||(e={}))aC.call(e,r)&&R3(t,r,e[r]);if(T3)for(var r of T3(e))cC.call(e,r)&&R3(t,r,e[r]);return t};function lC(){var t;const e=(t=Hn.state.themeMode)!=null?t:"dark",r={light:{foreground:{1:"rgb(20,20,20)",2:"rgb(121,134,134)",3:"rgb(158,169,169)"},background:{1:"rgb(255,255,255)",2:"rgb(241,243,243)",3:"rgb(228,231,231)"},overlay:"rgba(0,0,0,0.1)"},dark:{foreground:{1:"rgb(228,231,231)",2:"rgb(148,158,158)",3:"rgb(110,119,119)"},background:{1:"rgb(20,20,20)",2:"rgb(39,42,42)",3:"rgb(59,64,64)"},overlay:"rgba(255,255,255,0.1)"}}[e];return{"--w3m-color-fg-1":r.foreground[1],"--w3m-color-fg-2":r.foreground[2],"--w3m-color-fg-3":r.foreground[3],"--w3m-color-bg-1":r.background[1],"--w3m-color-bg-2":r.background[2],"--w3m-color-bg-3":r.background[3],"--w3m-color-overlay":r.overlay}}function uC(){return{"--w3m-accent-color":"#3396FF","--w3m-accent-fill-color":"#FFFFFF","--w3m-z-index":"89","--w3m-background-color":"#3396FF","--w3m-background-border-radius":"8px","--w3m-container-border-radius":"30px","--w3m-wallet-icon-border-radius":"15px","--w3m-input-border-radius":"28px","--w3m-button-border-radius":"10px","--w3m-notification-border-radius":"36px","--w3m-secondary-button-border-radius":"28px","--w3m-icon-button-border-radius":"50%","--w3m-button-hover-highlight-border-radius":"10px","--w3m-text-big-bold-size":"20px","--w3m-text-big-bold-weight":"600","--w3m-text-big-bold-line-height":"24px","--w3m-text-big-bold-letter-spacing":"-0.03em","--w3m-text-big-bold-text-transform":"none","--w3m-text-xsmall-bold-size":"10px","--w3m-text-xsmall-bold-weight":"700","--w3m-text-xsmall-bold-line-height":"12px","--w3m-text-xsmall-bold-letter-spacing":"0.02em","--w3m-text-xsmall-bold-text-transform":"uppercase","--w3m-text-xsmall-regular-size":"12px","--w3m-text-xsmall-regular-weight":"600","--w3m-text-xsmall-regular-line-height":"14px","--w3m-text-xsmall-regular-letter-spacing":"-0.03em","--w3m-text-xsmall-regular-text-transform":"none","--w3m-text-small-thin-size":"14px","--w3m-text-small-thin-weight":"500","--w3m-text-small-thin-line-height":"16px","--w3m-text-small-thin-letter-spacing":"-0.03em","--w3m-text-small-thin-text-transform":"none","--w3m-text-small-regular-size":"14px","--w3m-text-small-regular-weight":"600","--w3m-text-small-regular-line-height":"16px","--w3m-text-small-regular-letter-spacing":"-0.03em","--w3m-text-small-regular-text-transform":"none","--w3m-text-medium-regular-size":"16px","--w3m-text-medium-regular-weight":"600","--w3m-text-medium-regular-line-height":"20px","--w3m-text-medium-regular-letter-spacing":"-0.03em","--w3m-text-medium-regular-text-transform":"none","--w3m-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--w3m-success-color":"rgb(38,181,98)","--w3m-error-color":"rgb(242, 90, 103)"}}function hC(){const{themeVariables:t}=Hn.state;return{"--w3m-background-image-url":t!=null&&t["--w3m-background-image-url"]?`url(${t["--w3m-background-image-url"]})`:"none"}}const He={setTheme(){const t=document.querySelector(":root"),{themeVariables:e}=Hn.state;if(t){const r=Cc(Cc(Cc(Cc({},lC()),uC()),e),hC());Object.entries(r).forEach(([n,i])=>t.style.setProperty(n,i))}},globalCss:Ge`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent}button::after{content:'';position:absolute;inset:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button w3m-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--w3m-accent-fill-color);background:var(--w3m-accent-color)}`},fC=Ge`button{display:flex;border-radius:var(--w3m-button-hover-highlight-border-radius);flex-direction:column;transition:background-color .2s ease;justify-content:center;padding:5px;width:100px}button:hover{background-color:var(--w3m-color-overlay)}button>div{display:flex;justify-content:center;align-items:center;width:32px;height:32px;box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);background-color:var(--w3m-accent-color);border-radius:var(--w3m-icon-button-border-radius);margin-bottom:4px}button path{fill:var(--w3m-accent-fill-color)}`;var dC=Object.defineProperty,pC=Object.getOwnPropertyDescriptor,Ic=(t,e,r,n)=>{for(var i=n>1?void 0:n?pC(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&dC(e,r,i),i};let Us=class extends Re{constructor(){super(...arguments),this.icon=void 0,this.label="",this.onClick=()=>null}render(){return ce`<button @click="${this.onClick}"><div>${this.icon}</div><w3m-text variant="xsmall-regular" color="accent">${this.label}</w3m-text></button>`}};Us.styles=[He.globalCss,fC],Ic([We()],Us.prototype,"icon",2),Ic([We()],Us.prototype,"label",2),Ic([We()],Us.prototype,"onClick",2),Us=Ic([ke("w3m-box-button")],Us);const gC=Ge`button{border-radius:var(--w3m-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--w3m-accent-color)}button path{fill:var(--w3m-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--w3m-color-overlay)}button:disabled::after{background-color:transparent}.w3m-icon-left svg{margin-right:5px}.w3m-icon-right svg{margin-left:5px}button:hover::after{background-color:var(--w3m-color-overlay)}button:disabled{background-color:var(--w3m-color-bg-3)}`;var mC=Object.defineProperty,wC=Object.getOwnPropertyDescriptor,Go=(t,e,r,n)=>{for(var i=n>1?void 0:n?wC(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&mC(e,r,i),i};let qi=class extends Re{constructor(){super(...arguments),this.disabled=!1,this.iconLeft=void 0,this.iconRight=void 0,this.onClick=()=>null}render(){const t={"w3m-icon-left":this.iconLeft!==void 0,"w3m-icon-right":this.iconRight!==void 0};return ce`<button class="${Br(t)}" ?disabled="${this.disabled}" @click="${this.onClick}">${this.iconLeft}<w3m-text variant="small-regular" color="inverse"><slot></slot></w3m-text>${this.iconRight}</button>`}};qi.styles=[He.globalCss,gC],Go([We()],qi.prototype,"disabled",2),Go([We()],qi.prototype,"iconLeft",2),Go([We()],qi.prototype,"iconRight",2),Go([We()],qi.prototype,"onClick",2),qi=Go([ke("w3m-button")],qi);const vC=Ge`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--w3m-button-border-radius);color:var(--w3m-accent-fill-color);background-color:var(--w3m-accent-color)}button::after{content:'';inset:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--w3m-color-overlay)}button:hover::after{background-color:var(--w3m-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--w3m-color-bg-3);color:var(--w3m-color-fg-3)}.w3m-secondary{color:var(--w3m-accent-color);background-color:transparent}.w3m-secondary::after{display:none}`;var yC=Object.defineProperty,bC=Object.getOwnPropertyDescriptor,Yh=(t,e,r,n)=>{for(var i=n>1?void 0:n?bC(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&yC(e,r,i),i};let Zo=class extends Re{constructor(){super(...arguments),this.disabled=!1,this.variant="primary"}render(){const t={"w3m-secondary":this.variant==="secondary"};return ce`<button ?disabled="${this.disabled}" class="${Br(t)}"><slot></slot></button>`}};Zo.styles=[He.globalCss,vC],Yh([We()],Zo.prototype,"disabled",2),Yh([We()],Zo.prototype,"variant",2),Zo=Yh([ke("w3m-button-big")],Zo);const Ze={CROSS_ICON:ft`<svg width="12" height="12" viewBox="0 0 12 12"><path d="M9.94 11A.75.75 0 1 0 11 9.94L7.414 6.353a.5.5 0 0 1 0-.708L11 2.061A.75.75 0 1 0 9.94 1L6.353 4.586a.5.5 0 0 1-.708 0L2.061 1A.75.75 0 0 0 1 2.06l3.586 3.586a.5.5 0 0 1 0 .708L1 9.939A.75.75 0 1 0 2.06 11l3.586-3.586a.5.5 0 0 1 .708 0L9.939 11Z" fill="#fff"/></svg>`,WALLET_CONNECT_LOGO:ft`<svg width="178" height="29" viewBox="0 0 178 29" id="w3m-wc-logo"><path d="M10.683 7.926c5.284-5.17 13.85-5.17 19.134 0l.636.623a.652.652 0 0 1 0 .936l-2.176 2.129a.343.343 0 0 1-.478 0l-.875-.857c-3.686-3.607-9.662-3.607-13.348 0l-.937.918a.343.343 0 0 1-.479 0l-2.175-2.13a.652.652 0 0 1 0-.936l.698-.683Zm23.633 4.403 1.935 1.895a.652.652 0 0 1 0 .936l-8.73 8.543a.687.687 0 0 1-.956 0L20.37 17.64a.172.172 0 0 0-.239 0l-6.195 6.063a.687.687 0 0 1-.957 0l-8.73-8.543a.652.652 0 0 1 0-.936l1.936-1.895a.687.687 0 0 1 .957 0l6.196 6.064a.172.172 0 0 0 .239 0l6.195-6.064a.687.687 0 0 1 .957 0l6.196 6.064a.172.172 0 0 0 .24 0l6.195-6.064a.687.687 0 0 1 .956 0ZM48.093 20.948l2.338-9.355c.139-.515.258-1.07.416-1.942.12.872.258 1.427.357 1.942l2.022 9.355h4.181l3.528-13.874h-3.21l-1.943 8.523a24.825 24.825 0 0 0-.456 2.457c-.158-.931-.317-1.625-.495-2.438l-1.883-8.542h-4.201l-2.042 8.542a41.204 41.204 0 0 0-.475 2.438 41.208 41.208 0 0 0-.476-2.438l-1.903-8.542h-3.349l3.508 13.874h4.083ZM63.33 21.304c1.585 0 2.596-.654 3.11-1.605-.059.297-.078.595-.078.892v.357h2.655V15.22c0-2.735-1.248-4.32-4.3-4.32-2.636 0-4.36 1.466-4.52 3.487h2.914c.1-.891.734-1.426 1.705-1.426.911 0 1.407.515 1.407 1.11 0 .435-.258.693-1.03.792l-1.388.159c-2.061.257-3.825 1.01-3.825 3.19 0 1.982 1.645 3.092 3.35 3.092Zm.891-2.041c-.773 0-1.348-.436-1.348-1.19 0-.733.655-1.09 1.645-1.268l.674-.119c.575-.118.892-.218 1.09-.396v.912c0 1.228-.892 2.06-2.06 2.06ZM70.398 7.074v13.874h2.874V7.074h-2.874ZM74.934 7.074v13.874h2.874V7.074h-2.874ZM84.08 21.304c2.735 0 4.5-1.546 4.697-3.567h-2.893c-.139.892-.892 1.387-1.804 1.387-1.228 0-2.12-.99-2.14-2.358h6.897v-.555c0-3.21-1.764-5.312-4.816-5.312-2.933 0-4.994 2.062-4.994 5.173 0 3.37 2.12 5.232 5.053 5.232Zm-2.16-6.421c.119-1.11.932-1.922 2.081-1.922 1.11 0 1.883.772 1.903 1.922H81.92ZM94.92 21.146c.633 0 1.248-.1 1.525-.179v-2.18c-.218.04-.475.06-.693.06-1.05 0-1.427-.595-1.427-1.566v-3.805h2.338v-2.24h-2.338V7.788H91.47v3.448H89.37v2.24h2.1v4.201c0 2.3 1.15 3.469 3.45 3.469ZM104.62 21.304c3.924 0 6.302-2.299 6.599-5.608h-3.111c-.238 1.803-1.506 3.032-3.369 3.032-2.2 0-3.746-1.784-3.746-4.796 0-2.953 1.605-4.638 3.805-4.638 1.883 0 2.953 1.15 3.171 2.834h3.191c-.317-3.448-2.854-5.41-6.342-5.41-3.984 0-7.036 2.695-7.036 7.214 0 4.677 2.676 7.372 6.838 7.372ZM117.449 21.304c2.993 0 5.114-1.882 5.114-5.172 0-3.23-2.121-5.233-5.114-5.233-2.972 0-5.093 2.002-5.093 5.233 0 3.29 2.101 5.172 5.093 5.172Zm0-2.22c-1.327 0-2.18-1.09-2.18-2.952 0-1.903.892-2.973 2.18-2.973 1.308 0 2.2 1.07 2.2 2.973 0 1.862-.872 2.953-2.2 2.953ZM126.569 20.948v-5.689c0-1.208.753-2.1 1.823-2.1 1.011 0 1.606.773 1.606 2.06v5.729h2.873v-6.144c0-2.339-1.229-3.905-3.428-3.905-1.526 0-2.458.734-2.953 1.606a5.31 5.31 0 0 0 .079-.892v-.377h-2.874v9.712h2.874ZM137.464 20.948v-5.689c0-1.208.753-2.1 1.823-2.1 1.011 0 1.606.773 1.606 2.06v5.729h2.873v-6.144c0-2.339-1.228-3.905-3.428-3.905-1.526 0-2.458.734-2.953 1.606a5.31 5.31 0 0 0 .079-.892v-.377h-2.874v9.712h2.874ZM149.949 21.304c2.735 0 4.499-1.546 4.697-3.567h-2.893c-.139.892-.892 1.387-1.804 1.387-1.228 0-2.12-.99-2.14-2.358h6.897v-.555c0-3.21-1.764-5.312-4.816-5.312-2.933 0-4.994 2.062-4.994 5.173 0 3.37 2.12 5.232 5.053 5.232Zm-2.16-6.421c.119-1.11.932-1.922 2.081-1.922 1.11 0 1.883.772 1.903 1.922h-3.984ZM160.876 21.304c3.013 0 4.658-1.645 4.975-4.201h-2.874c-.099 1.07-.713 1.982-2.001 1.982-1.309 0-2.2-1.21-2.2-2.993 0-1.942 1.03-2.933 2.259-2.933 1.209 0 1.803.872 1.883 1.882h2.873c-.218-2.358-1.823-4.142-4.776-4.142-2.874 0-5.153 1.903-5.153 5.193 0 3.25 1.923 5.212 5.014 5.212ZM172.067 21.146c.634 0 1.248-.1 1.526-.179v-2.18c-.218.04-.476.06-.694.06-1.05 0-1.427-.595-1.427-1.566v-3.805h2.339v-2.24h-2.339V7.788h-2.854v3.448h-2.1v2.24h2.1v4.201c0 2.3 1.15 3.469 3.449 3.469Z" fill="#fff"/></svg>`,WALLET_CONNECT_ICON:ft`<svg width="28" height="20" viewBox="0 0 28 20"><g clip-path="url(#a)"><path d="M7.386 6.482c3.653-3.576 9.575-3.576 13.228 0l.44.43a.451.451 0 0 1 0 .648L19.55 9.033a.237.237 0 0 1-.33 0l-.606-.592c-2.548-2.496-6.68-2.496-9.228 0l-.648.634a.237.237 0 0 1-.33 0L6.902 7.602a.451.451 0 0 1 0-.647l.483-.473Zm16.338 3.046 1.339 1.31a.451.451 0 0 1 0 .648l-6.035 5.909a.475.475 0 0 1-.662 0L14.083 13.2a.119.119 0 0 0-.166 0l-4.283 4.194a.475.475 0 0 1-.662 0l-6.035-5.91a.451.451 0 0 1 0-.647l1.338-1.31a.475.475 0 0 1 .662 0l4.283 4.194c.046.044.12.044.166 0l4.283-4.194a.475.475 0 0 1 .662 0l4.283 4.194c.046.044.12.044.166 0l4.283-4.194a.475.475 0 0 1 .662 0Z" fill="#000000"/></g><defs><clipPath id="a"><path fill="#ffffff" d="M0 0h28v20H0z"/></clipPath></defs></svg>`,WALLET_CONNECT_ICON_COLORED:ft`<svg width="96" height="96" fill="none"><path fill="#fff" d="M25.322 33.597c12.525-12.263 32.83-12.263 45.355 0l1.507 1.476a1.547 1.547 0 0 1 0 2.22l-5.156 5.048a.814.814 0 0 1-1.134 0l-2.074-2.03c-8.737-8.555-22.903-8.555-31.64 0l-2.222 2.175a.814.814 0 0 1-1.134 0l-5.156-5.049a1.547 1.547 0 0 1 0-2.22l1.654-1.62Zm56.019 10.44 4.589 4.494a1.547 1.547 0 0 1 0 2.22l-20.693 20.26a1.628 1.628 0 0 1-2.267 0L48.283 56.632a.407.407 0 0 0-.567 0L33.03 71.012a1.628 1.628 0 0 1-2.268 0L10.07 50.75a1.547 1.547 0 0 1 0-2.22l4.59-4.494a1.628 1.628 0 0 1 2.267 0l14.687 14.38c.156.153.41.153.567 0l14.685-14.38a1.628 1.628 0 0 1 2.268 0l14.687 14.38c.156.153.41.153.567 0l14.686-14.38a1.628 1.628 0 0 1 2.268 0Z"/><path stroke="#000" d="M25.672 33.954c12.33-12.072 32.325-12.072 44.655 0l1.508 1.476a1.047 1.047 0 0 1 0 1.506l-5.157 5.048a.314.314 0 0 1-.434 0l-2.074-2.03c-8.932-8.746-23.409-8.746-32.34 0l-2.222 2.174a.314.314 0 0 1-.434 0l-5.157-5.048a1.047 1.047 0 0 1 0-1.506l1.655-1.62Zm55.319 10.44 4.59 4.494a1.047 1.047 0 0 1 0 1.506l-20.694 20.26a1.128 1.128 0 0 1-1.568 0l-14.686-14.38a.907.907 0 0 0-1.267 0L32.68 70.655a1.128 1.128 0 0 1-1.568 0L10.42 50.394a1.047 1.047 0 0 1 0-1.506l4.59-4.493a1.128 1.128 0 0 1 1.567 0l14.687 14.379a.907.907 0 0 0 1.266 0l-.35-.357.35.357 14.686-14.38a1.128 1.128 0 0 1 1.568 0l14.687 14.38a.907.907 0 0 0 1.267 0l14.686-14.38a1.128 1.128 0 0 1 1.568 0Z"/></svg>`,BACK_ICON:ft`<svg width="10" height="18" viewBox="0 0 10 18"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.735.179a.75.75 0 0 1 .087 1.057L2.92 8.192a1.25 1.25 0 0 0 0 1.617l5.902 6.956a.75.75 0 1 1-1.144.97L1.776 10.78a2.75 2.75 0 0 1 0-3.559L7.678.265A.75.75 0 0 1 8.735.18Z" fill="#fff"/></svg>`,COPY_ICON:ft`<svg width="24" height="24" fill="none"><path fill="#fff" fill-rule="evenodd" d="M7.01 7.01c.03-1.545.138-2.5.535-3.28A5 5 0 0 1 9.73 1.545C10.8 1 12.2 1 15 1c2.8 0 4.2 0 5.27.545a5 5 0 0 1 2.185 2.185C23 4.8 23 6.2 23 9c0 2.8 0 4.2-.545 5.27a5 5 0 0 1-2.185 2.185c-.78.397-1.735.505-3.28.534l-.001.01c-.03 1.54-.138 2.493-.534 3.27a5 5 0 0 1-2.185 2.186C13.2 23 11.8 23 9 23c-2.8 0-4.2 0-5.27-.545a5 5 0 0 1-2.185-2.185C1 19.2 1 17.8 1 15c0-2.8 0-4.2.545-5.27A5 5 0 0 1 3.73 7.545C4.508 7.149 5.46 7.04 7 7.01h.01ZM15 15.5c-1.425 0-2.403-.001-3.162-.063-.74-.06-1.139-.172-1.427-.319a3.5 3.5 0 0 1-1.53-1.529c-.146-.288-.257-.686-.318-1.427C8.501 11.403 8.5 10.425 8.5 9c0-1.425.001-2.403.063-3.162.06-.74.172-1.139.318-1.427a3.5 3.5 0 0 1 1.53-1.53c.288-.146.686-.257 1.427-.318.759-.062 1.737-.063 3.162-.063 1.425 0 2.403.001 3.162.063.74.06 1.139.172 1.427.318a3.5 3.5 0 0 1 1.53 1.53c.146.288.257.686.318 1.427.062.759.063 1.737.063 3.162 0 1.425-.001 2.403-.063 3.162-.06.74-.172 1.139-.319 1.427a3.5 3.5 0 0 1-1.529 1.53c-.288.146-.686.257-1.427.318-.759.062-1.737.063-3.162.063ZM7 8.511c-.444.009-.825.025-1.162.052-.74.06-1.139.172-1.427.318a3.5 3.5 0 0 0-1.53 1.53c-.146.288-.257.686-.318 1.427-.062.759-.063 1.737-.063 3.162 0 1.425.001 2.403.063 3.162.06.74.172 1.139.318 1.427a3.5 3.5 0 0 0 1.53 1.53c.288.146.686.257 1.427.318.759.062 1.737.063 3.162.063 1.425 0 2.403-.001 3.162-.063.74-.06 1.139-.172 1.427-.319a3.5 3.5 0 0 0 1.53-1.53c.146-.287.257-.685.318-1.426.027-.337.043-.718.052-1.162H15c-2.8 0-4.2 0-5.27-.545a5 5 0 0 1-2.185-2.185C7 13.2 7 11.8 7 9v-.489Z" clip-rule="evenodd"/></svg>`,RETRY_ICON:ft`<svg width="15" height="16" viewBox="0 0 15 16"><path d="M6.464 2.03A.75.75 0 0 0 5.403.97L2.08 4.293a1 1 0 0 0 0 1.414L5.403 9.03a.75.75 0 0 0 1.06-1.06L4.672 6.177a.25.25 0 0 1 .177-.427h2.085a4 4 0 1 1-3.93 4.746c-.077-.407-.405-.746-.82-.746-.414 0-.755.338-.7.748a5.501 5.501 0 1 0 5.45-6.248H4.848a.25.25 0 0 1-.177-.427L6.464 2.03Z" fill="#fff"/></svg>`,DESKTOP_ICON:ft`<svg width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 5.98c0-1.85 0-2.775.394-3.466a3 3 0 0 1 1.12-1.12C2.204 1 3.13 1 4.98 1h6.04c1.85 0 2.775 0 3.466.394a3 3 0 0 1 1.12 1.12C16 3.204 16 4.13 16 5.98v1.04c0 1.85 0 2.775-.394 3.466a3 3 0 0 1-1.12 1.12C13.796 12 12.87 12 11.02 12H4.98c-1.85 0-2.775 0-3.466-.394a3 3 0 0 1-1.12-1.12C0 9.796 0 8.87 0 7.02V5.98ZM4.98 2.5h6.04c.953 0 1.568.001 2.034.043.446.04.608.108.69.154a1.5 1.5 0 0 1 .559.56c.046.08.114.243.154.69.042.465.043 1.08.043 2.033v1.04c0 .952-.001 1.568-.043 2.034-.04.446-.108.608-.154.69a1.499 1.499 0 0 1-.56.559c-.08.046-.243.114-.69.154-.466.042-1.08.043-2.033.043H4.98c-.952 0-1.568-.001-2.034-.043-.446-.04-.608-.108-.69-.154a1.5 1.5 0 0 1-.559-.56c-.046-.08-.114-.243-.154-.69-.042-.465-.043-1.08-.043-2.033V5.98c0-.952.001-1.568.043-2.034.04-.446.108-.608.154-.69a1.5 1.5 0 0 1 .56-.559c.08-.046.243-.114.69-.154.465-.042 1.08-.043 2.033-.043Z" fill="#fff"/><path d="M4 14.25a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Z" fill="#fff"/></svg>`,MOBILE_ICON:ft`<svg width="16" height="16" viewBox="0 0 16 16"><path d="M6.75 5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3 4.98c0-1.85 0-2.775.394-3.466a3 3 0 0 1 1.12-1.12C5.204 0 6.136 0 8 0s2.795 0 3.486.394a3 3 0 0 1 1.12 1.12C13 2.204 13 3.13 13 4.98v6.04c0 1.85 0 2.775-.394 3.466a3 3 0 0 1-1.12 1.12C10.796 16 9.864 16 8 16s-2.795 0-3.486-.394a3 3 0 0 1-1.12-1.12C3 13.796 3 12.87 3 11.02V4.98Zm8.5 0v6.04c0 .953-.001 1.568-.043 2.034-.04.446-.108.608-.154.69a1.499 1.499 0 0 1-.56.559c-.08.045-.242.113-.693.154-.47.042-1.091.043-2.05.043-.959 0-1.58-.001-2.05-.043-.45-.04-.613-.109-.693-.154a1.5 1.5 0 0 1-.56-.56c-.046-.08-.114-.243-.154-.69-.042-.466-.043-1.08-.043-2.033V4.98c0-.952.001-1.568.043-2.034.04-.446.108-.608.154-.69a1.5 1.5 0 0 1 .56-.559c.08-.045.243-.113.693-.154C6.42 1.501 7.041 1.5 8 1.5c.959 0 1.58.001 2.05.043.45.04.613.109.693.154a1.5 1.5 0 0 1 .56.56c.046.08.114.243.154.69.042.465.043 1.08.043 2.033Z" fill="#fff"/></svg>`,ARROW_DOWN_ICON:ft`<svg width="14" height="14" viewBox="0 0 14 14"><path d="M2.28 7.47a.75.75 0 0 0-1.06 1.06l5.25 5.25a.75.75 0 0 0 1.06 0l5.25-5.25a.75.75 0 0 0-1.06-1.06l-3.544 3.543a.25.25 0 0 1-.426-.177V.75a.75.75 0 0 0-1.5 0v10.086a.25.25 0 0 1-.427.176L2.28 7.47Z" fill="#fff"/></svg>`,ARROW_UP_RIGHT_ICON:ft`<svg width="15" height="14" fill="none"><path d="M4.5 1.75A.75.75 0 0 1 5.25 1H12a1.5 1.5 0 0 1 1.5 1.5v6.75a.75.75 0 0 1-1.5 0V4.164a.25.25 0 0 0-.427-.176L4.061 11.5A.75.75 0 0 1 3 10.44l7.513-7.513a.25.25 0 0 0-.177-.427H5.25a.75.75 0 0 1-.75-.75Z" fill="#fff"/></svg>`,ARROW_RIGHT_ICON:ft`<svg width="6" height="14" viewBox="0 0 6 14"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.181 1.099a.75.75 0 0 1 1.024.279l2.433 4.258a2.75 2.75 0 0 1 0 2.729l-2.433 4.257a.75.75 0 1 1-1.303-.744L4.335 7.62a1.25 1.25 0 0 0 0-1.24L1.902 2.122a.75.75 0 0 1 .28-1.023Z" fill="#fff"/></svg>`,QRCODE_ICON:ft`<svg width="25" height="24" viewBox="0 0 25 24"><path d="M23.748 9a.748.748 0 0 0 .748-.752c-.018-2.596-.128-4.07-.784-5.22a6 6 0 0 0-2.24-2.24c-1.15-.656-2.624-.766-5.22-.784a.748.748 0 0 0-.752.748c0 .414.335.749.748.752 1.015.007 1.82.028 2.494.088.995.09 1.561.256 1.988.5.7.398 1.28.978 1.679 1.678.243.427.41.993.498 1.988.061.675.082 1.479.09 2.493a.753.753 0 0 0 .75.749ZM3.527.788C4.677.132 6.152.022 8.747.004A.748.748 0 0 1 9.5.752a.753.753 0 0 1-.749.752c-1.014.007-1.818.028-2.493.088-.995.09-1.561.256-1.988.5-.7.398-1.28.978-1.679 1.678-.243.427-.41.993-.499 1.988-.06.675-.081 1.479-.088 2.493A.753.753 0 0 1 1.252 9a.748.748 0 0 1-.748-.752c.018-2.596.128-4.07.784-5.22a6 6 0 0 1 2.24-2.24ZM1.252 15a.748.748 0 0 0-.748.752c.018 2.596.128 4.07.784 5.22a6 6 0 0 0 2.24 2.24c1.15.656 2.624.766 5.22.784a.748.748 0 0 0 .752-.748.753.753 0 0 0-.749-.752c-1.014-.007-1.818-.028-2.493-.089-.995-.089-1.561-.255-1.988-.498a4.5 4.5 0 0 1-1.679-1.68c-.243-.426-.41-.992-.499-1.987-.06-.675-.081-1.479-.088-2.493A.753.753 0 0 0 1.252 15ZM22.996 15.749a.753.753 0 0 1 .752-.749c.415 0 .751.338.748.752-.018 2.596-.128 4.07-.784 5.22a6 6 0 0 1-2.24 2.24c-1.15.656-2.624.766-5.22.784a.748.748 0 0 1-.752-.748c0-.414.335-.749.748-.752 1.015-.007 1.82-.028 2.494-.089.995-.089 1.561-.255 1.988-.498a4.5 4.5 0 0 0 1.679-1.68c.243-.426.41-.992.498-1.987.061-.675.082-1.479.09-2.493Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7 4a2.5 2.5 0 0 0-2.5 2.5v2A2.5 2.5 0 0 0 7 11h2a2.5 2.5 0 0 0 2.5-2.5v-2A2.5 2.5 0 0 0 9 4H7Zm2 1.5H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1ZM13.5 6.5A2.5 2.5 0 0 1 16 4h2a2.5 2.5 0 0 1 2.5 2.5v2A2.5 2.5 0 0 1 18 11h-2a2.5 2.5 0 0 1-2.5-2.5v-2Zm2.5-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1ZM7 13a2.5 2.5 0 0 0-2.5 2.5v2A2.5 2.5 0 0 0 7 20h2a2.5 2.5 0 0 0 2.5-2.5v-2A2.5 2.5 0 0 0 9 13H7Zm2 1.5H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1Z" fill="#fff"/><path d="M13.5 15.5c0-.465 0-.697.038-.89a2 2 0 0 1 1.572-1.572C15.303 13 15.535 13 16 13v2.5h-2.5ZM18 13c.465 0 .697 0 .89.038a2 2 0 0 1 1.572 1.572c.038.193.038.425.038.89H18V13ZM18 17.5h2.5c0 .465 0 .697-.038.89a2 2 0 0 1-1.572 1.572C18.697 20 18.465 20 18 20v-2.5ZM13.5 17.5H16V20c-.465 0-.697 0-.89-.038a2 2 0 0 1-1.572-1.572c-.038-.193-.038-.425-.038-.89Z" fill="#fff"/></svg>`,SCAN_ICON:ft`<svg width="16" height="16" fill="none"><path fill="#fff" d="M10 15.216c0 .422.347.763.768.74 1.202-.064 2.025-.222 2.71-.613a5.001 5.001 0 0 0 1.865-1.866c.39-.684.549-1.507.613-2.709a.735.735 0 0 0-.74-.768.768.768 0 0 0-.76.732c-.009.157-.02.306-.032.447-.073.812-.206 1.244-.384 1.555-.31.545-.761.996-1.306 1.306-.311.178-.743.311-1.555.384-.141.013-.29.023-.447.032a.768.768 0 0 0-.732.76ZM10 .784c0 .407.325.737.732.76.157.009.306.02.447.032.812.073 1.244.206 1.555.384a3.5 3.5 0 0 1 1.306 1.306c.178.311.311.743.384 1.555.013.142.023.29.032.447a.768.768 0 0 0 .76.732.734.734 0 0 0 .74-.768c-.064-1.202-.222-2.025-.613-2.71A5 5 0 0 0 13.477.658c-.684-.39-1.507-.549-2.709-.613a.735.735 0 0 0-.768.74ZM5.232.044A.735.735 0 0 1 6 .784a.768.768 0 0 1-.732.76c-.157.009-.305.02-.447.032-.812.073-1.244.206-1.555.384A3.5 3.5 0 0 0 1.96 3.266c-.178.311-.311.743-.384 1.555-.013.142-.023.29-.032.447A.768.768 0 0 1 .784 6a.735.735 0 0 1-.74-.768c.064-1.202.222-2.025.613-2.71A5 5 0 0 1 2.523.658C3.207.267 4.03.108 5.233.044ZM5.268 14.456a.768.768 0 0 1 .732.76.734.734 0 0 1-.768.74c-1.202-.064-2.025-.222-2.71-.613a5 5 0 0 1-1.865-1.866c-.39-.684-.549-1.507-.613-2.709A.735.735 0 0 1 .784 10c.407 0 .737.325.76.732.009.157.02.306.032.447.073.812.206 1.244.384 1.555a3.5 3.5 0 0 0 1.306 1.306c.311.178.743.311 1.555.384.142.013.29.023.447.032Z"/></svg>`,CHECKMARK_ICON:ft`<svg width="13" height="12" viewBox="0 0 13 12"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.155.132a.75.75 0 0 1 .232 1.035L5.821 11.535a1 1 0 0 1-1.626.09L.665 7.21a.75.75 0 1 1 1.17-.937L4.71 9.867a.25.25 0 0 0 .406-.023L11.12.364a.75.75 0 0 1 1.035-.232Z" fill="#fff"/></svg>`,HELP_ETH_IMG:ft`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#j)"><rect width="60" height="60" rx="30" fill="#987DE8"/><path fill-rule="evenodd" clip-rule="evenodd" d="m15.48 28.367 11.966-19.3c1.174-1.892 3.927-1.892 5.1 0l11.97 19.306a6 6 0 0 1 .9 3.142v.028a6 6 0 0 1-1.154 3.56L33.227 50.208c-1.599 2.188-4.864 2.188-6.461 0L15.733 35.095a6 6 0 0 1-1.154-3.538v-.029a6 6 0 0 1 .9-3.161Z" fill="#fff"/><path d="M30.84 10.112a.992.992 0 0 0-.844-.464V24.5l12.598 5.53c.081-.466-.001-.963-.27-1.398L30.84 10.112Z" fill="#643CDD"/><path d="M29.996 9.648a.991.991 0 0 0-.845.465l-11.489 18.53a1.991 1.991 0 0 0-.264 1.387l12.598-5.53V9.648Z" fill="#BDADEB"/><path d="M29.996 50.544a.994.994 0 0 0 .808-.41l11.235-15.38c.307-.434-.193-.988-.658-.72L31.49 39.71a2.998 2.998 0 0 1-1.494.398v10.437Z" fill="#643CDD"/><path d="M17.966 34.762 29.19 50.134c.2.274.503.41.807.41V40.108a2.998 2.998 0 0 1-1.493-.398l-9.884-5.676c-.468-.27-.971.292-.653.728Z" fill="#BDADEB"/><path d="M42.594 30.03 29.996 24.5v13.138a3 3 0 0 0 1.495-.399l10.149-5.83c.525-.31.856-.823.954-1.38Z" fill="#401AB3"/><path d="M29.996 37.638V24.462l-12.598 5.566c.098.564.437 1.083.974 1.392l10.13 5.82c.462.265.978.398 1.494.398Z" fill="#7C5AE2"/></g><rect class="help-img-highlight" x=".5" y=".5" width="59" height="59" rx="29.5"/><defs><clipPath id="j"><rect width="60" height="60" rx="30" fill="#fff"/></clipPath></defs></svg>`,HELP_PAINTING_IMG:ft`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#k)"><rect width="60" height="60" rx="3" fill="#C653C6"/><path d="M52.094 47.344c0-4.246-1.436-9.557-5.885-12.4a2.876 2.876 0 0 0-1.615-3.891v-.819a4.037 4.037 0 0 0-1.34-3.007 4.75 4.75 0 0 0-2.41-6.252v-5.506c0-6.248-5.065-11.313-11.313-11.313-6.247 0-11.312 5.065-11.312 11.313v2.152a3.343 3.343 0 0 0-1.18 5.045 4.738 4.738 0 0 0-1.633 3.584 4.73 4.73 0 0 0 .956 2.858 5.218 5.218 0 0 0-2.358 6.815c-3.06 4.129-6.098 8.298-6.098 15.64 0 2.668.364 4.856.731 6.385.184.765.368 1.366.509 1.78a12.721 12.721 0 0 0 .225.611l.015.037.005.011.001.004v.002h.001l.92-.393-.92.394.26.606h38.26l.291-.49-.86-.51.86.51v-.001l.002-.002.002-.005.01-.017.035-.06.127-.225c.108-.195.26-.477.441-.835.363-.714.845-1.732 1.328-2.953.959-2.427 1.945-5.725 1.945-9.068Z" fill="#E87DE8" stroke="#fff" stroke-width="2"/><path fill-rule="evenodd" clip-rule="evenodd" d="M26.5 29.5c-3-.5-5.5-3-5.503-7l.002-7c0-.466 0-.698.026-.893a3 3 0 0 1 2.582-2.582c.195-.026.428-.026.893-.026 2 0 2.5-2.5 2.5-2.5s0 2.5 2.5 2.5c1.398 0 2.097 0 2.648.229a3 3 0 0 1 1.624 1.623c.228.552.228 1.25.228 2.649v6c0 4-3 7-6.5 7 1.35.23 4 0 6.5-2v9.53C34 38.5 31.495 40 28 40s-6-1.5-6-2.97L24 34l2.5 1.5v-6ZM26 47h4.5c2.5 0 3 4 3 5.5h-3l-1-1.5H26v-4Zm-6.25 5.5H24V57h-8c0-1 1-4.5 3.75-4.5Z" fill="#fff"/></g><rect class="help-img-highlight" x=".5" y=".5" width="59" height="59" rx="2.5"/><defs><clipPath id="k"><rect width="60" height="60" rx="3" fill="#fff"/></clipPath></defs></svg>`,HELP_CHART_IMG:ft`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#l)"><path d="M0 25.01C0 15.76 0 11.133 1.97 7.678a15 15 0 0 1 5.598-5.597C11.023.11 15.648.11 24.9.11h10.2c9.251 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.597C60 11.133 60 15.758 60 25.01v10.2c0 9.252 0 13.877-1.97 17.332a15 15 0 0 1-5.598 5.598c-3.455 1.97-8.08 1.97-17.332 1.97H24.9c-9.251 0-13.877 0-17.332-1.97a14.999 14.999 0 0 1-5.597-5.598C0 49.087 0 44.462 0 35.21v-10.2Z" fill="#1DC956"/><path d="M.5 25.01c0-4.635 0-8.078.244-10.795.244-2.71.726-4.65 1.66-6.289a14.5 14.5 0 0 1 5.412-5.41c1.639-.936 3.579-1.418 6.289-1.661C16.822.61 20.265.61 24.9.61h10.2c4.635 0 8.078 0 10.795.245 2.71.243 4.65.725 6.29 1.66a14.5 14.5 0 0 1 5.41 5.411c.935 1.64 1.417 3.579 1.66 6.29.244 2.717.245 6.16.245 10.794v10.2c0 4.635 0 8.078-.244 10.795-.244 2.71-.726 4.65-1.66 6.29a14.5 14.5 0 0 1-5.412 5.41c-1.639.936-3.579 1.418-6.289 1.661-2.717.244-6.16.244-10.795.244H24.9c-4.635 0-8.078 0-10.795-.244-2.71-.243-4.65-.725-6.29-1.66a14.5 14.5 0 0 1-5.41-5.412C1.47 50.655.988 48.716.745 46.005.5 43.288.5 39.845.5 35.21v-10.2Z" stroke="#fff" stroke-opacity=".1"/><path d="M16.109 60c-3.833-.179-6.41-.645-8.541-1.86a15 15 0 0 1-5.598-5.598C.553 50.057.155 46.967.043 41.985l4.146-1.382a4 4 0 0 0 2.48-2.39l4.654-12.409a2 2 0 0 1 2.505-1.195l2.526.842a2 2 0 0 0 2.422-1.003l2.968-5.938c.81-1.62 3.185-1.415 3.705.32l3.774 12.581a2 2 0 0 0 3.025 1.09l3.342-2.228c.27-.18.49-.422.646-.706l5.297-9.712a2 2 0 0 1 1.428-1.016l4.134-.689a2 2 0 0 1 1.61.437l3.892 3.243a2 2 0 0 0 2.694-.122l4.633-4.632C60 19.28 60 21.88 60 25.01v10.2c0 9.252 0 13.877-1.97 17.332a14.998 14.998 0 0 1-5.598 5.598c-2.131 1.215-4.708 1.681-8.54 1.86H16.108Z" fill="#2BEE6C"/><path d="M.072 43.03a112.37 112.37 0 0 1-.048-2.093l3.85-1.283a3 3 0 0 0 1.86-1.793l4.653-12.408a3 3 0 0 1 3.758-1.793l2.526.842a1 1 0 0 0 1.21-.501l2.97-5.938c1.214-2.43 4.775-2.123 5.556.48l3.774 12.58a1 1 0 0 0 1.513.545l3.341-2.227a1 1 0 0 0 .323-.353l5.298-9.712a3 3 0 0 1 2.14-1.523l4.135-.69a3 3 0 0 1 2.414.655l3.892 3.244a1 1 0 0 0 1.347-.061l5.28-5.28c.046.845.077 1.752.097 2.732l-3.962 3.962a3 3 0 0 1-4.042.183l-3.893-3.243a1 1 0 0 0-.804-.218l-4.135.689a1 1 0 0 0-.714.507l-5.297 9.712c-.233.427-.565.79-.97 1.06l-3.34 2.228a3 3 0 0 1-4.538-1.635l-3.775-12.58c-.26-.868-1.447-.97-1.852-.16l-2.969 5.937a3 3 0 0 1-3.632 1.505l-2.526-.842a1 1 0 0 0-1.252.597L7.606 38.564a5 5 0 0 1-3.1 2.988L.072 43.029Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M49.5 19a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z" fill="#2BEE6C"/><path d="M47.5 19a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z" fill="#fff"/><path d="M45 .283v59.654c-.63.042-1.294.074-2 .098V.185c.706.025 1.37.056 2 .098Z" fill="#fff"/><path class="help-img-highlight" d="M.5 25.01c0-4.635 0-8.078.244-10.795.244-2.71.726-4.65 1.66-6.289a14.5 14.5 0 0 1 5.412-5.41c1.639-.936 3.579-1.418 6.289-1.661C16.822.61 20.265.61 24.9.61h10.2c4.635 0 8.078 0 10.795.245 2.71.243 4.65.725 6.29 1.66a14.5 14.5 0 0 1 5.41 5.411c.935 1.64 1.417 3.579 1.66 6.29.244 2.717.245 6.16.245 10.794v10.2c0 4.635 0 8.078-.244 10.795-.244 2.71-.726 4.65-1.66 6.29a14.5 14.5 0 0 1-5.412 5.41c-1.639.936-3.579 1.418-6.289 1.661-2.717.244-6.16.244-10.795.244H24.9c-4.635 0-8.078 0-10.795-.244-2.71-.243-4.65-.725-6.29-1.66a14.5 14.5 0 0 1-5.41-5.412C1.47 50.655.988 48.716.745 46.005.5 43.288.5 39.845.5 35.21v-10.2Z"/></g><defs><clipPath id="l"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`,HELP_KEY_IMG:ft`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#m)"><path fill="#EB8B47" d="M0 24.9c0-9.252 0-13.878 1.97-17.332A15 15 0 0 1 7.569 1.97C11.023 0 15.648 0 24.9 0h10.2c9.251 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.598C60 11.022 60 15.648 60 24.899v10.2c0 9.252 0 13.878-1.97 17.332a15.001 15.001 0 0 1-5.598 5.598c-3.455 1.97-8.08 1.97-17.332 1.97H24.9c-9.251 0-13.877 0-17.332-1.97a15 15 0 0 1-5.597-5.598C0 48.977 0 44.351 0 35.1V24.9Z"/><path class="help-img-highlight" d="M.5 24.9c0-4.635 0-8.078.244-10.795.244-2.71.726-4.65 1.66-6.29a14.5 14.5 0 0 1 5.412-5.41C9.455 1.468 11.395.986 14.105.743 16.822.5 20.265.5 24.9.5h10.2c4.635 0 8.078 0 10.795.244 2.71.243 4.65.725 6.29 1.66a14.5 14.5 0 0 1 5.41 5.411c.935 1.64 1.417 3.58 1.66 6.29.244 2.717.245 6.16.245 10.794v10.2c0 4.635 0 8.078-.244 10.796-.244 2.71-.726 4.65-1.66 6.289a14.5 14.5 0 0 1-5.412 5.41c-1.639.936-3.579 1.418-6.289 1.661-2.717.244-6.16.244-10.795.244H24.9c-4.635 0-8.078 0-10.795-.244-2.71-.243-4.65-.725-6.29-1.66a14.5 14.5 0 0 1-5.41-5.411c-.935-1.64-1.417-3.58-1.66-6.29C.5 43.178.5 39.734.5 35.1V24.9Z"/><path fill="#FF974C" stroke="#fff" stroke-width="2" d="M39.192 29.192c5.077-5.077 5.077-13.308 0-18.385-5.076-5.077-13.308-5.077-18.384 0-5.077 5.077-5.077 13.308 0 18.385l1.287 1.291c1.137 1.142 1.706 1.712 2.097 2.387.267.462.472.957.608 1.473.2.755.2 1.56.2 3.171V48.75c0 1.077 0 1.615.134 2.119a4 4 0 0 0 .407.984c.262.45.643.831 1.404 1.592l.294.295c.654.654.982.981 1.365 1.086.26.07.533.07.792 0 .383-.105.71-.432 1.365-1.086l3.478-3.479c.655-.654.982-.981 1.087-1.365a1.5 1.5 0 0 0 0-.791c-.105-.384-.432-.711-1.087-1.365l-.478-.479c-.655-.654-.982-.981-1.087-1.365a1.5 1.5 0 0 1 0-.791c.105-.384.432-.711 1.087-1.365l.478-.479c.655-.654.982-.981 1.087-1.365a1.5 1.5 0 0 0 0-.791c-.105-.384-.432-.711-1.087-1.365l-.492-.493c-.65-.65-.974-.974-1.08-1.355a1.5 1.5 0 0 1-.003-.788c.102-.382.425-.71 1.069-1.364l5.46-5.547Z"/><circle cx="30" cy="17" r="4" fill="#EB8B47" stroke="#fff" stroke-width="2"/></g><defs><clipPath id="m"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`,HELP_USER_IMG:ft`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#n)"><rect width="60" height="60" fill="#00ACE6" rx="30"/><path fill="#1AC6FF" stroke="#fff" stroke-width="2" d="M59 73c0 16.016-12.984 29-29 29S1 89.016 1 73c0-16.017 11-29 29-29s29 12.983 29 29ZM18.69 19.902a11 11 0 0 1 9.281-8.692 14.842 14.842 0 0 1 4.058 0 11 11 0 0 1 9.28 8.692c.178.866.322 1.75.44 2.625.132.977.132 1.968 0 2.945a39.467 39.467 0 0 1-.44 2.625 11 11 0 0 1-9.28 8.692 14.862 14.862 0 0 1-4.058 0 11 11 0 0 1-9.28-8.692 39.467 39.467 0 0 1-.44-2.625 11.004 11.004 0 0 1 0-2.945c.118-.876.262-1.759.44-2.625Z"/><circle cx="24.5" cy="23.5" r="1.5" fill="#fff"/><circle cx="35.5" cy="23.5" r="1.5" fill="#fff"/><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m31 20-3 8h4"/></g><rect class="help-img-highlight" width="59" height="59" x=".5" y=".5" rx="29.5"/><defs><clipPath id="n"><rect width="60" height="60" fill="#fff" rx="30"/></clipPath></defs></svg>`,HELP_LOCK_IMG:ft`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><rect width="60" height="60" fill="#C653C6" rx="3"/><path fill="#fff" d="M20.034 15.216C20 15.607 20 16.07 20 17v2.808c0 1.13 0 1.696-.2 2.11a1.78 1.78 0 0 1-.584.714c-.366.28-1.051.42-2.423.7a7.076 7.076 0 0 0-1.597.511 9.001 9.001 0 0 0-4.353 4.353C10 30.005 10 32.336 10 37c0 4.663 0 6.995.843 8.804a9.001 9.001 0 0 0 4.353 4.353C17.005 51 19.336 51 24 51h12c4.663 0 6.995 0 8.804-.843a9.001 9.001 0 0 0 4.353-4.353C50 43.995 50 41.664 50 37c0-4.663 0-6.995-.843-8.804a9.001 9.001 0 0 0-4.353-4.353 7.076 7.076 0 0 0-1.597-.511c-1.372-.28-2.057-.42-2.423-.7a1.78 1.78 0 0 1-.583-.715C40 21.505 40 20.94 40 19.809V17c0-.929 0-1.393-.034-1.784a9 9 0 0 0-8.182-8.182C31.393 7 30.93 7 30 7s-1.393 0-1.784.034a9 9 0 0 0-8.182 8.182Z"/><path fill="#E87DE8" d="M22 17c0-.929 0-1.393.044-1.784a7 7 0 0 1 6.172-6.172C28.606 9 29.071 9 30 9s1.393 0 1.784.044a7 7 0 0 1 6.172 6.172c.044.39.044.855.044 1.784v4.5a1.5 1.5 0 0 1-3 0V17c0-.93 0-1.394-.077-1.78a4 4 0 0 0-3.143-3.143C31.394 12 30.93 12 30 12s-1.394 0-1.78.077a4 4 0 0 0-3.143 3.143C25 15.606 25 16.07 25 17v4.5a1.5 1.5 0 0 1-3 0V17Z"/><path fill="#E87DE8" fill-rule="evenodd" d="M12 36.62c0-4.317 0-6.476.92-8.088a7 7 0 0 1 2.612-2.612c1.612-.92 3.77-.92 8.088-.92h6.855c.469 0 .703 0 .906.017 2.73.222 4.364 2.438 4.619 4.983.27-2.698 2.111-5 5.015-5A6.985 6.985 0 0 1 48 31.985v5.395c0 4.317 0 6.476-.92 8.088a7 7 0 0 1-2.612 2.612c-1.612.92-3.77.92-8.088.92h-5.855c-.469 0-.703 0-.906-.017-2.73-.222-4.364-2.438-4.619-4.983-.258 2.583-1.943 4.818-4.714 4.99-.155.01-.335.01-.694.01-.55 0-.825 0-1.057-.015a7 7 0 0 1-6.52-6.52C12 42.233 12 41.958 12 41.408V36.62Zm21.24-.273a4 4 0 1 0-6.478 0c.985 1.36 1.479 2.039 1.564 2.229.178.398.176.818.174 1.247V42.5a1.5 1.5 0 0 0 3 0v-2.677c-.002-.429-.004-.85.174-1.247.085-.19.579-.87 1.565-2.229Z" clip-rule="evenodd"/><rect class="help-img-highlight" width="59" height="59" x=".5" y=".5" rx="2.5"/></svg>`,HELP_COMPAS_IMG:ft`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><rect width="60" height="60" fill="#1DC956" rx="30"/><circle cx="30" cy="29.999" r="3" fill="#fff"/><path fill="#2BEE6C" stroke="#fff" stroke-width="2" d="m45.316 17.9-.88-.425.88.424a7.9 7.9 0 0 1 .026-.053c.093-.192.21-.432.26-.687l-.819-.162.819.162a2 2 0 0 0-.239-1.405c-.132-.224-.32-.412-.472-.562a8.415 8.415 0 0 1-.042-.042l-.042-.042c-.15-.151-.338-.34-.562-.472l-.508.862.508-.862a2 2 0 0 0-1.405-.239c-.255.05-.495.167-.687.26l-.053.026-15.05 7.246-.108.052c-1.131.545-1.843.887-2.456 1.374a6.994 6.994 0 0 0-1.13 1.13c-.487.613-.83 1.325-1.375 2.457l-.051.108-7.247 15.05-.025.053c-.094.192-.21.431-.26.686a2 2 0 0 0 .239 1.406l.855-.505-.856.505c.133.224.321.411.473.562l.042.042.041.042c.15.151.338.34.563.472a2 2 0 0 0 1.405.239l-.195-.981.195.98c.255-.05.494-.166.686-.26l.054-.025-.419-.87.419.87 15.05-7.247.107-.051c1.132-.545 1.844-.888 2.457-1.374a7.002 7.002 0 0 0 1.13-1.13c.487-.614.83-1.325 1.374-2.457l.052-.108 7.246-15.05Z"/><path fill="#1DC956" d="m33.376 32.723-2.669-3.43-14.85 14.849.206.205a1 1 0 0 0 1.141.194l15.105-7.273a3 3 0 0 0 1.067-4.545Z"/><path fill="#86F999" d="m26.624 27.276 2.669 3.43 14.85-14.849-.206-.205a1 1 0 0 0-1.141-.194L27.69 22.731a3 3 0 0 0-1.067 4.545Z"/><circle cx="30" cy="30" r="3" fill="#fff" transform="rotate(45 30 30)"/><rect class="help-img-highlight" width="59" height="59" x=".5" y=".5" rx="29.5"/></svg>`,HELP_NOUN_IMG:ft`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><rect width="60" height="60" fill="#794CFF" rx="3"/><path fill="#987DE8" stroke="#fff" stroke-width="2" d="M33 22.5v-1H16v5H8.5V36H13v-5h3v7.5h17V31h1v7.5h17v-17H34v5h-1v-4Z"/><path fill="#fff" d="M37.5 25h10v10h-10z"/><path fill="#4019B2" d="M42.5 25h5v10h-5z"/><path fill="#fff" d="M19.5 25h10v10h-10z"/><path fill="#4019B2" d="M24.5 25h5v10h-5z"/><path fill="#fff" d="M12 30.5h4V37h-4v-6.5Z"/><rect class="help-img-highlight" width="59" height="59" x=".5" y=".5" rx="2.5"/></svg>`,HELP_DAO_IMG:ft`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#o)"><path fill="#EB8B47" d="M0 24.9c0-9.252 0-13.878 1.97-17.332A15 15 0 0 1 7.569 1.97C11.023 0 15.648 0 24.9 0h10.2c9.251 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.598C60 11.022 60 15.648 60 24.899v10.2c0 9.252 0 13.878-1.97 17.332a15.001 15.001 0 0 1-5.598 5.598c-3.455 1.97-8.08 1.97-17.332 1.97H24.9c-9.251 0-13.877 0-17.332-1.97a15 15 0 0 1-5.597-5.598C0 48.977 0 44.351 0 35.1V24.9Z"/><path class="help-img-highlight" d="M.5 24.9c0-4.635 0-8.078.244-10.795.244-2.71.726-4.65 1.66-6.29a14.5 14.5 0 0 1 5.412-5.41C9.455 1.468 11.395.986 14.105.743 16.822.5 20.265.5 24.9.5h10.2c4.635 0 8.078 0 10.795.244 2.71.243 4.65.725 6.29 1.66a14.5 14.5 0 0 1 5.41 5.411c.935 1.64 1.417 3.58 1.66 6.29.244 2.717.245 6.16.245 10.794v10.2c0 4.635 0 8.078-.244 10.796-.244 2.71-.726 4.65-1.66 6.289a14.5 14.5 0 0 1-5.412 5.41c-1.639.936-3.579 1.418-6.289 1.661-2.717.244-6.16.244-10.795.244H24.9c-4.635 0-8.078 0-10.795-.244-2.71-.243-4.65-.725-6.29-1.66a14.5 14.5 0 0 1-5.41-5.411c-.935-1.64-1.417-3.58-1.66-6.29C.5 43.178.5 39.734.5 35.1V24.9Z"/><path fill="#FF974C" stroke="#fff" stroke-width="2" d="M19 52c5.523 0 10-4.477 10-10s-4.477-10-10-10S9 36.477 9 42s4.477 10 10 10Z"/><path fill="#fff" fill-rule="evenodd" d="M42.844 8.326a1 1 0 0 0-1.687 0L28.978 27.463A1 1 0 0 0 29.822 29h24.357a1 1 0 0 0 .843-1.537L42.844 8.326Z" clip-rule="evenodd"/><path fill="#FF974C" fill-rule="evenodd" d="M42.335 11.646c.324.115.571.504 1.066 1.28l7.332 11.523c.562.883.843 1.325.792 1.69a1 1 0 0 1-.342.623c-.28.238-.803.238-1.85.238H34.667c-1.047 0-1.57 0-1.85-.238a1 1 0 0 1-.342-.623c-.051-.365.23-.806.792-1.69l7.332-11.523c.495-.776.742-1.165 1.066-1.28a1 1 0 0 1 .67 0ZM35 27a7 7 0 0 0 7-7 7 7 0 0 0 7 7H35Z" clip-rule="evenodd"/><path fill="#FF974C" stroke="#fff" stroke-width="2" d="M10.106 9.357c-.109.32-.107.682-.106.975V25.668c-.001.293-.003.654.106.975a2 2 0 0 0 1.251 1.25c.32.11.682.108.975.107H19c5.523 0 10-4.477 10-10S24.523 8 19 8h-6.668c-.293-.001-.654-.003-.975.106a2 2 0 0 0-1.25 1.251Z"/><circle cx="19" cy="18" r="4" fill="#EB8B47" stroke="#fff" stroke-width="2"/><circle cx="19" cy="41.999" r="4" fill="#EB8B47" stroke="#fff" stroke-width="2"/></g><defs><clipPath id="o"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`,SEARCH_ICON:ft`<svg width="20" height="21"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.432 13.992c-.354-.353-.91-.382-1.35-.146a5.5 5.5 0 1 1 2.265-2.265c-.237.441-.208.997.145 1.35l3.296 3.296a.75.75 0 1 1-1.06 1.061l-3.296-3.296Zm.06-5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z" fill="#949E9E"/></svg>`,HELP_ICON:ft`<svg width="11" height="17" viewBox="0 0 11 17"><path fill="#fff" d="M5.22 2.97c-1.07 0-2.25.843-2.25 2.25a.75.75 0 0 1-1.5 0c0-2.393 2.019-3.75 3.75-3.75 1.73 0 3.75 1.357 3.75 3.75 0 1.64-1.038 2.466-1.785 3.057-.802.635-1.215.984-1.215 1.693a.75.75 0 1 1-1.5 0c0-1.466.985-2.24 1.681-2.788l.103-.081C7.007 6.504 7.47 6.08 7.47 5.22c0-1.407-1.181-2.25-2.25-2.25ZM5.22 14.97a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z"/></svg>`,WALLET_ICON:ft`<svg width="15" height="14" fill="none" viewBox="0 0 15 14"><path fill="#fff" fill-rule="evenodd" d="M.64 9.2v-3h.001c.009-1.857.07-2.886.525-3.682a4 4 0 0 1 1.492-1.493C3.58.5 4.813.5 7.28.5h3.735c.58 0 .871 0 1.114.04A3 3 0 0 1 14.6 3.011c.04.243.04.533.04 1.114 0 .58 0 .871-.04 1.114a3 3 0 0 1-2.471 2.47c-.243.041-.533.041-1.114.041h-.777c.178.307.302.648.362 1.011.04.243.04.533.04 1.114 0 .58 0 .871-.04 1.114a3 3 0 0 1-2.471 2.47c-.243.041-.533.041-1.114.041H4.507A3.867 3.867 0 0 1 .64 9.633V9.2ZM7.28 2h3.735c.64 0 .779.005.87.02a1.5 1.5 0 0 1 1.235 1.236c.015.09.02.229.02.869s-.005.779-.02.87a1.5 1.5 0 0 1-1.236 1.235c-.09.015-.229.02-.869.02H4.023c-.697 0-1.345.21-1.883.572V6.25h.001c.004-.791.015-1.383.059-1.867.056-.629.157-.926.269-1.122a2.5 2.5 0 0 1 .932-.933c.197-.111.494-.212 1.123-.268C5.173 2 6.019 2 7.28 2Zm-.265 5.75H4.023c-1.04 0-1.883.843-1.883 1.883A2.367 2.367 0 0 0 4.507 12h2.508c.64 0 .779-.005.87-.02a1.5 1.5 0 0 0 1.235-1.236c.015-.09.02-.229.02-.869s-.005-.779-.02-.87A1.5 1.5 0 0 0 7.884 7.77c-.09-.015-.228-.02-.869-.02Z" clip-rule="evenodd"/></svg>`,NETWORK_PLACEHOLDER:ft`<svg width="28" height="28" fill="none" viewBox="0 0 28 28"><mask id="p" width="26" height="28" x="1" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#D9D9D9" d="M12 1.172a4 4 0 0 1 4 0l8.124 4.69a4 4 0 0 1 2 3.465v9.381a4 4 0 0 1-2 3.464L16 26.862a4 4 0 0 1-4 0l-8.124-4.69a4 4 0 0 1-2-3.464V9.327a4 4 0 0 1 2-3.464L12 1.173Z"/></mask><g mask="url(#p)"><path id="network-placeholder-fill" fill="#fff" d="M0 0h28v28H0z"/><path id="network-placeholder-dash" stroke="#000" stroke-dasharray="2 2" d="m8.953 2.931 2.032-1.173.25.433 1.015-.586c.269-.155.553-.271.844-.35l-.13-.483a4.003 4.003 0 0 1 2.071 0l-.13.483c.293.079.576.195.845.35l1.016.586.25-.433 2.03 1.173-.25.433 2.032 1.173.25-.433 2.03 1.172-.25.433 1.016.587c.269.155.512.342.725.556l.354-.354a4.003 4.003 0 0 1 1.035 1.794l-.483.129c.078.292.12.596.12.906v1.172h.5v2.346h-.5v2.345h.5v2.345h-.5v1.173c0 .31-.042.614-.12.906l.483.13a4.003 4.003 0 0 1-1.035 1.793l-.354-.354a3.498 3.498 0 0 1-.725.556l-1.015.586.25.434-2.031 1.172-.25-.433-2.031 1.173.25.433-2.031 1.172-.25-.433-1.016.587a3.494 3.494 0 0 1-.844.35l.13.482a4.003 4.003 0 0 1-2.071 0l.13-.483a3.496 3.496 0 0 1-.845-.35l-1.015-.586-.25.433-2.032-1.172.25-.433-2.03-1.173-.25.433L4.89 22.76l.25-.434-1.015-.586a3.498 3.498 0 0 1-.725-.556l-.354.354a4.003 4.003 0 0 1-1.035-1.794l.483-.13a3.497 3.497 0 0 1-.12-.905v-1.173h-.5V15.19h.5v-2.345h-.5v-2.346h.5V9.327c0-.31.042-.614.12-.906l-.483-.13a4.003 4.003 0 0 1 1.035-1.793l.354.354c.213-.214.456-.401.725-.556l1.015-.587-.25-.433 2.031-1.172.25.433 2.031-1.173-.25-.433Z"/><path fill="#798686" stroke="#fff" d="M14.243 13.563 14 13.428l-.243.135-6.388 3.549-.024.013c-.432.24-.79.44-1.053.622-.266.184-.516.405-.636.722a1.5 1.5 0 0 0 0 1.062c.12.317.37.538.636.722.263.183.62.382 1.053.622l.024.013 3.164 1.758.088.049c1.164.646 1.857 1.032 2.607 1.162.51.09 1.033.09 1.544 0 .75-.13 1.443-.516 2.606-1.162l.09-.05 3.163-1.757.024-.013c.432-.24.79-.44 1.053-.622.266-.184.516-.405.636-.722l-.468-.177.468.177a1.5 1.5 0 0 0 0-1.062l-.468.177.468-.177c-.12-.317-.37-.538-.636-.722-.263-.183-.62-.382-1.053-.622l-.024-.013-6.388-3.55Z"/><path fill="#9EA9A9" stroke="#fff" d="M14.243 8.563 14 8.428l-.243.135-6.388 3.549-.024.013c-.432.24-.79.44-1.053.622-.266.184-.516.405-.636.722a1.5 1.5 0 0 0 0 1.062c.12.316.37.537.636.722.263.183.62.382 1.053.622l.024.013 3.164 1.758.088.049c1.164.646 1.857 1.032 2.607 1.162.51.09 1.033.09 1.544 0 .75-.13 1.443-.516 2.606-1.162l.09-.05 3.163-1.757.024-.013c.432-.24.79-.44 1.053-.622.266-.184.516-.405.636-.722l-.468-.177.468.177a1.5 1.5 0 0 0 0-1.062l-.468.177.468-.177c-.12-.316-.37-.537-.636-.722-.263-.183-.62-.382-1.053-.622l-.024-.013-6.388-3.55Z"/><path fill="#C9CFCF" stroke="#fff" d="m22.344 9.53-.468-.176.468.177a1.5 1.5 0 0 0 0-1.062l-.468.177.468-.177c-.12-.317-.37-.537-.636-.722-.263-.183-.62-.382-1.053-.622l-.024-.013-3.163-1.758-.09-.05c-1.163-.645-1.856-1.03-2.606-1.161a4.5 4.5 0 0 0-1.544 0c-.75.13-1.443.516-2.607 1.162l-.088.05-3.164 1.757-.024.013c-.432.24-.79.44-1.053.622-.266.185-.516.405-.636.722a1.5 1.5 0 0 0 0 1.062c.12.317.37.537.636.722.263.183.62.382 1.053.622l.024.013 3.164 1.758.088.049c1.164.646 1.857 1.032 2.607 1.162.51.09 1.033.09 1.544 0 .75-.13 1.443-.516 2.606-1.162l.09-.05 3.163-1.757.024-.013c.432-.24.79-.44 1.053-.622.266-.184.516-.405.636-.722Z"/></g></svg>`,WALLET_PLACEHOLDER:ft`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#q)"><path id="wallet-placeholder-fill" fill="#fff" d="M0 24.9c0-9.251 0-13.877 1.97-17.332a15 15 0 0 1 5.598-5.597C11.023 0 15.648 0 24.9 0h10.2c9.252 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.598C60 11.023 60 15.648 60 24.9v10.2c0 9.252 0 13.877-1.97 17.332a15.001 15.001 0 0 1-5.598 5.597C48.977 60 44.352 60 35.1 60H24.9c-9.251 0-13.877 0-17.332-1.97a15 15 0 0 1-5.597-5.598C0 48.977 0 44.352 0 35.1V24.9Z"/><path id="wallet-placeholder-dash" stroke="#000" stroke-dasharray="4 4" stroke-width="1.5" d="M.04 41.708a231.598 231.598 0 0 1-.039-4.403l.75-.001L.75 35.1v-2.55H0v-5.1h.75V24.9l.001-2.204h-.75c.003-1.617.011-3.077.039-4.404l.75.016c.034-1.65.099-3.08.218-4.343l-.746-.07c.158-1.678.412-3.083.82-4.316l.713.236c.224-.679.497-1.296.827-1.875a14.25 14.25 0 0 1 1.05-1.585L3.076 5.9A15 15 0 0 1 5.9 3.076l.455.596a14.25 14.25 0 0 1 1.585-1.05c.579-.33 1.196-.603 1.875-.827l-.236-.712C10.812.674 12.217.42 13.895.262l.07.746C15.23.89 16.66.824 18.308.79l-.016-.75C19.62.012 21.08.004 22.695.001l.001.75L24.9.75h2.55V0h5.1v.75h2.55l2.204.001v-.75c1.617.003 3.077.011 4.404.039l-.016.75c1.65.034 3.08.099 4.343.218l.07-.746c1.678.158 3.083.412 4.316.82l-.236.713c.679.224 1.296.497 1.875.827a14.24 14.24 0 0 1 1.585 1.05l.455-.596A14.999 14.999 0 0 1 56.924 5.9l-.596.455c.384.502.735 1.032 1.05 1.585.33.579.602 1.196.827 1.875l.712-.236c.409 1.233.663 2.638.822 4.316l-.747.07c.119 1.264.184 2.694.218 4.343l.75-.016c.028 1.327.036 2.787.039 4.403l-.75.001.001 2.204v2.55H60v5.1h-.75v2.55l-.001 2.204h.75a231.431 231.431 0 0 1-.039 4.404l-.75-.016c-.034 1.65-.099 3.08-.218 4.343l.747.07c-.159 1.678-.413 3.083-.822 4.316l-.712-.236a10.255 10.255 0 0 1-.827 1.875 14.242 14.242 0 0 1-1.05 1.585l.596.455a14.997 14.997 0 0 1-2.824 2.824l-.455-.596c-.502.384-1.032.735-1.585 1.05-.579.33-1.196.602-1.875.827l.236.712c-1.233.409-2.638.663-4.316.822l-.07-.747c-1.264.119-2.694.184-4.343.218l.016.75c-1.327.028-2.787.036-4.403.039l-.001-.75-2.204.001h-2.55V60h-5.1v-.75H24.9l-2.204-.001v.75a231.431 231.431 0 0 1-4.404-.039l.016-.75c-1.65-.034-3.08-.099-4.343-.218l-.07.747c-1.678-.159-3.083-.413-4.316-.822l.236-.712a10.258 10.258 0 0 1-1.875-.827 14.252 14.252 0 0 1-1.585-1.05l-.455.596A14.999 14.999 0 0 1 3.076 54.1l.596-.455a14.24 14.24 0 0 1-1.05-1.585 10.259 10.259 0 0 1-.827-1.875l-.712.236C.674 49.188.42 47.783.262 46.105l.746-.07C.89 44.77.824 43.34.79 41.692l-.75.016Z"/><path fill="#fff" fill-rule="evenodd" d="M35.643 32.145c-.297-.743-.445-1.114-.401-1.275a.42.42 0 0 1 .182-.27c.134-.1.463-.1 1.123-.1.742 0 1.499.046 2.236-.05a6 6 0 0 0 5.166-5.166c.051-.39.051-.855.051-1.784 0-.928 0-1.393-.051-1.783a6 6 0 0 0-5.166-5.165c-.39-.052-.854-.052-1.783-.052h-7.72c-4.934 0-7.401 0-9.244 1.051a8 8 0 0 0-2.985 2.986C16.057 22.28 16.003 24.58 16 29 15.998 31.075 16 33.15 16 35.224A7.778 7.778 0 0 0 23.778 43H28.5c1.394 0 2.09 0 2.67-.116a6 6 0 0 0 4.715-4.714c.115-.58.115-1.301.115-2.744 0-1.31 0-1.964-.114-2.49a4.998 4.998 0 0 0-.243-.792Z" clip-rule="evenodd"/><path fill="#9EA9A9" fill-rule="evenodd" d="M37 18h-7.72c-2.494 0-4.266.002-5.647.126-1.361.122-2.197.354-2.854.728a6.5 6.5 0 0 0-2.425 2.426c-.375.657-.607 1.492-.729 2.853-.11 1.233-.123 2.777-.125 4.867 0 .7 0 1.05.097 1.181.096.13.182.181.343.2.163.02.518-.18 1.229-.581a6.195 6.195 0 0 1 3.053-.8H37c.977 0 1.32-.003 1.587-.038a4.5 4.5 0 0 0 3.874-3.874c.036-.268.039-.611.039-1.588 0-.976-.003-1.319-.038-1.587a4.5 4.5 0 0 0-3.875-3.874C38.32 18.004 37.977 18 37 18Zm-7.364 12.5h-7.414a4.722 4.722 0 0 0-4.722 4.723 6.278 6.278 0 0 0 6.278 6.278H28.5c1.466 0 1.98-.008 2.378-.087a4.5 4.5 0 0 0 3.535-3.536c.08-.397.087-.933.087-2.451 0-1.391-.009-1.843-.08-2.17a3.5 3.5 0 0 0-2.676-2.676c-.328-.072-.762-.08-2.108-.08Z" clip-rule="evenodd"/></g><defs><clipPath id="q"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`,TOKEN_PLACEHOLDER:ft`<svg width="60" height="60" viewBox="0 0 60 60" fill="none"><rect id="token-placeholder-fill" width="58" height="58" x="1" y="1" fill="#fff" rx="29"/><path fill="#3B4040" stroke="#fff" stroke-width="2" d="M32 10a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v5.566c0 .357.192.685.495.875a16.001 16.001 0 0 1 4.256 3.894c.667.88.33 2.113-.627 2.665l-2.494 1.44c-.956.552-2.166.204-2.913-.609a9.12 9.12 0 1 0 .064 12.267c.739-.82 1.945-1.181 2.907-.64l2.509 1.415c.962.542 1.312 1.77.654 2.658a16 16 0 0 1-4.356 4.028c-.303.19-.495.518-.495.875V50a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-2.992c0-.602-.528-1.065-1.13-1.032-.579.032-1.16.032-1.74 0-.602-.032-1.13.43-1.13 1.032V50a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-5.566c0-.357-.192-.685-.495-.875a16 16 0 0 1 0-27.118c.303-.19.495-.517.495-.875V10a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2.992c0 .601.528 1.064 1.13 1.032.58-.032 1.161-.032 1.74 0 .602.033 1.13-.43 1.13-1.032V10Z"/><rect id="token-placeholder-dash" width="58" height="58" x="1" y="1" stroke="#000" stroke-dasharray="6 6" stroke-width="2" rx="29"/></svg>`,ACCOUNT_COPY:ft`<svg width="14" height="14" fill="none" viewBox="0 0 14 14"><path fill="#fff" fill-rule="evenodd" d="M4.003 4.005c.012-1.225.074-1.936.391-2.491a3 3 0 0 1 1.12-1.12C6.204 0 7.136 0 9 0s2.795 0 3.486.394a3 3 0 0 1 1.12 1.12C14 2.204 14 3.136 14 5s0 2.795-.394 3.486a3 3 0 0 1-1.12 1.12c-.555.317-1.266.379-2.491.391l.002.003c-.012 1.222-.075 1.932-.391 2.486a3 3 0 0 1-1.12 1.12C7.796 14 6.864 14 5 14s-2.795 0-3.486-.394a3 3 0 0 1-1.12-1.12C0 11.796 0 10.864 0 9s0-2.795.394-3.486a3 3 0 0 1 1.12-1.12c.554-.316 1.264-.379 2.486-.391l.003.002ZM9 8.5c-.959 0-1.58-.001-2.05-.043-.45-.04-.613-.109-.693-.154a1.5 1.5 0 0 1-.56-.56c-.045-.08-.113-.243-.154-.693C5.501 6.58 5.5 5.959 5.5 5c0-.959.001-1.58.043-2.05.04-.45.109-.613.154-.693a1.5 1.5 0 0 1 .56-.56c.08-.045.243-.113.693-.154C7.42 1.501 8.041 1.5 9 1.5c.959 0 1.58.001 2.05.043.45.04.613.109.693.154a1.5 1.5 0 0 1 .56.56c.045.08.113.243.154.693.042.47.043 1.091.043 2.05 0 .959-.001 1.58-.043 2.05-.04.45-.109.613-.154.693a1.5 1.5 0 0 1-.56.56c-.08.045-.242.113-.693.154-.47.042-1.091.043-2.05.043ZM4 5.503a13.77 13.77 0 0 0-1.05.04c-.45.04-.613.109-.693.154a1.5 1.5 0 0 0-.56.56c-.045.08-.113.243-.154.693C1.501 7.42 1.5 8.041 1.5 9c0 .959.001 1.58.043 2.05.04.45.109.613.154.693a1.5 1.5 0 0 0 .56.56c.08.045.243.113.693.154.47.042 1.091.043 2.05.043.959 0 1.58-.001 2.05-.043.45-.04.613-.109.693-.154a1.5 1.5 0 0 0 .56-.56c.045-.08.113-.242.154-.693.025-.283.035-.619.04-1.05-1.534-.003-2.358-.037-2.983-.394a3 3 0 0 1-1.12-1.12c-.357-.625-.39-1.449-.394-2.983Z" clip-rule="evenodd"/></svg>`,ACCOUNT_DISCONNECT:ft`<svg width="16" height="14" fill="none" viewBox="0 0 16 14"><path fill="#fff" d="M9.677 1.5h-2.61c-1.261 0-2.107.001-2.757.06-.629.056-.926.157-1.122.268a2.5 2.5 0 0 0-.933.933c-.112.196-.212.493-.269 1.122-.058.65-.06 1.496-.06 2.757v.72c0 1.26.002 2.107.06 2.756.057.63.157.927.27 1.123a2.5 2.5 0 0 0 .932.933c.196.111.493.212 1.122.268.65.059 1.496.06 2.757.06h2.61a.75.75 0 1 1 0 1.5h-2.61c-2.467 0-3.7 0-4.622-.525a4 4 0 0 1-1.493-1.493C.427 11.06.427 9.827.427 7.36v-.72c0-2.467 0-3.7.525-4.622A4 4 0 0 1 2.445.525C3.366 0 4.6 0 7.067 0h2.61a.75.75 0 1 1 0 1.5Z"/><path fill="#fff" d="M10.896 11.03a.75.75 0 0 1 0-1.06l1.793-1.793a.25.25 0 0 0-.176-.427H8.177a.75.75 0 0 1 0-1.5h4.336a.25.25 0 0 0 .176-.427L10.896 4.03a.75.75 0 0 1 1.061-1.06l3.323 3.323a1 1 0 0 1 0 1.414l-3.323 3.323a.75.75 0 0 1-1.06 0Z"/></svg>`},_C=Ge`.w3m-custom-placeholder{inset:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--w3m-background-border-radius) * .9)}.w3m-custom-placeholder{background-color:var(--w3m-background-color);background-image:var(--w3m-background-image-url);background-position:center;background-size:cover}.w3m-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.w3m-toolbar img,.w3m-toolbar svg{height:28px;object-position:left center;object-fit:contain}#w3m-wc-logo path{fill:var(--w3m-accent-fill-color)}.w3m-action-btn{width:28px;height:28px;border-radius:var(--w3m-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;transition:background-color,.2s ease;background-color:var(--w3m-color-bg-1);box-shadow:0 0 0 1px var(--w3m-color-overlay)}.w3m-action-btn:hover{background-color:var(--w3m-color-bg-2)}.w3m-action-btn svg{display:block;object-position:center}.w3m-action-btn path{fill:var(--w3m-color-fg-1)}.w3m-actions{display:flex}.w3m-actions button:first-child{margin-right:16px}.w3m-help-active button:first-child{background-color:var(--w3m-color-fg-1)}.w3m-help-active button:first-child path{fill:var(--w3m-color-bg-1)}`;var EC=Object.defineProperty,xC=Object.getOwnPropertyDescriptor,N3=(t,e,r,n)=>{for(var i=n>1?void 0:n?xC(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&EC(e,r,i),i};let Sc=class extends Re{constructor(){super(),this.isHelp=!1,this.unsubscribeRouter=void 0,this.unsubscribeRouter=lt.subscribe(t=>{this.isHelp=t.view==="Help"})}disconnectedCallback(){var t;(t=this.unsubscribeRouter)==null||t.call(this)}onHelp(){lt.push("Help")}logoTemplate(){var t;const e=(t=Hn.state.themeVariables)==null?void 0:t["--w3m-logo-image-url"];return e?ce`<img src="${e}">`:Ze.WALLET_CONNECT_LOGO}render(){const t={"w3m-actions":!0,"w3m-help-active":this.isHelp};return ce`<div class="w3m-custom-placeholder"></div><div class="w3m-toolbar">${this.logoTemplate()}<div class="${Br(t)}"><button class="w3m-action-btn" @click="${this.onHelp}">${Ze.HELP_ICON}</button> <button class="w3m-action-btn" @click="${lr.close}">${Ze.CROSS_ICON}</button></div></div>`}};Sc.styles=[He.globalCss,_C],N3([wt()],Sc.prototype,"isHelp",2),Sc=N3([ke("w3m-modal-backcard")],Sc);const CC=Ge`main{padding:20px;padding-top:0;width:100%}`;var IC=Object.defineProperty,SC=Object.getOwnPropertyDescriptor,DC=(t,e,r,n)=>{for(var i=n>1?void 0:n?SC(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&IC(e,r,i),i};let Jh=class extends Re{render(){return ce`<main><slot></slot></main>`}};Jh.styles=[He.globalCss,CC],Jh=DC([ke("w3m-modal-content")],Jh);const OC=Ge`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--w3m-color-bg-2)}`;var AC=Object.defineProperty,$C=Object.getOwnPropertyDescriptor,PC=(t,e,r,n)=>{for(var i=n>1?void 0:n?$C(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&AC(e,r,i),i};let Xh=class extends Re{render(){return ce`<footer><slot></slot></footer>`}};Xh.styles=[He.globalCss,OC],Xh=PC([ke("w3m-modal-footer")],Xh);const TC=Ge`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.w3m-border{border-bottom:1px solid var(--w3m-color-bg-2);margin-bottom:20px}header button{padding:15px 20px;transition:opacity .2s ease}@media(hover:hover){header button:hover{opacity:.5}}.w3m-back-btn{position:absolute;left:0}.w3m-action-btn{position:absolute;right:0}path{fill:var(--w3m-accent-color)}`;var RC=Object.defineProperty,NC=Object.getOwnPropertyDescriptor,Yo=(t,e,r,n)=>{for(var i=n>1?void 0:n?NC(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&RC(e,r,i),i};let Vi=class extends Re{constructor(){super(...arguments),this.title="",this.onAction=void 0,this.actionIcon=void 0,this.border=!1}backBtnTemplate(){return ce`<button class="w3m-back-btn" @click="${lt.goBack}">${Ze.BACK_ICON}</button>`}actionBtnTemplate(){return ce`<button class="w3m-action-btn" @click="${this.onAction}">${this.actionIcon}</button>`}render(){const t={"w3m-border":this.border},e=lt.state.history.length>1,r=this.title?ce`<w3m-text variant="big-bold">${this.title}</w3m-text>`:ce`<slot></slot>`;return ce`<header class="${Br(t)}">${e?this.backBtnTemplate():null} ${r} ${this.onAction?this.actionBtnTemplate():null}</header>`}};Vi.styles=[He.globalCss,TC],Yo([We()],Vi.prototype,"title",2),Yo([We()],Vi.prototype,"onAction",2),Yo([We()],Vi.prototype,"actionIcon",2),Yo([We()],Vi.prototype,"border",2),Vi=Yo([ke("w3m-modal-header")],Vi);const MC={1:"692ed6ba-e569-459a-556a-776476829e00",42161:"600a9a04-c1b9-42ca-6785-9b4b6ff85200",43114:"30c46e53-e989-45fb-4549-be3bd4eb3b00",56:"93564157-2e8e-4ce7-81df-b264dbee9b00",250:"06b26297-fe0c-4733-5d6b-ffa5498aac00",10:"ab9c186a-c52f-464b-2906-ca59d760a400",137:"41d04d42-da3b-4453-8506-668cc0727900",100:"02b53f6a-e3d4-479e-1cb4-21178987d100",9001:"f926ff41-260d-4028-635e-91913fc28e00",324:"b310f07f-4ef7-49f3-7073-2a0a39685800",314:"5a73b3dd-af74-424e-cae0-0de859ee9400",4689:"34e68754-e536-40da-c153-6ef2e7188a00",1088:"3897a66d-40b9-4833-162f-a2c90531c900",1284:"161038da-44ae-4ec7-1208-0ea569454b00",1285:"f1d73bb6-5450-4e18-38f7-fb6484264a00"};var Fs=(t=>(t.metaMask="metaMask",t.trust="trust",t.phantom="phantom",t.brave="brave",t.spotEthWallet="spotEthWallet",t.exodus="exodus",t.tokenPocket="tokenPocket",t.frame="frame",t.tally="tally",t.coinbaseWallet="coinbaseWallet",t.core="core",t.bitkeep="bitkeep",t.mathWallet="mathWallet",t.opera="opera",t.tokenary="tokenary",t["1inch"]="1inch",t.kuCoinWallet="kuCoinWallet",t.ledger="ledger",t))(Fs||{});const Ki={injectedPreset:{metaMask:{name:"MetaMask",icon:"619537c0-2ff3-4c78-9ed8-a05e7567f300",url:"https://metamask.io",isMobile:!0,isInjected:!0},trust:{name:"Trust",icon:"0528ee7e-16d1-4089-21e3-bbfb41933100",url:"https://trustwallet.com",isMobile:!0,isInjected:!0},spotEthWallet:{name:"Spot",icon:"1bf33a89-b049-4a1c-d1f6-4dd7419ee400",url:"https://www.spot-wallet.com",isMobile:!0,isInjected:!0},phantom:{name:"Phantom",icon:"62471a22-33cb-4e65-5b54-c3d9ea24b900",url:"https://phantom.app",isInjected:!0},core:{name:"Core",icon:"35f9c46e-cc57-4aa7-315d-e6ccb2a1d600",url:"https://core.app",isMobile:!0,isInjected:!0},bitkeep:{name:"BitKeep",icon:"3f7075d0-4ab7-4db5-404d-3e4c05e6fe00",url:"https://bitkeep.com",isMobile:!0,isInjected:!0},tokenPocket:{name:"TokenPocket",icon:"f3119826-4ef5-4d31-4789-d4ae5c18e400",url:"https://www.tokenpocket.pro",isMobile:!0,isInjected:!0},mathWallet:{name:"MathWallet",icon:"26a8f588-3231-4411-60ce-5bb6b805a700",url:"https://mathwallet.org",isMobile:!0,isInjected:!0},exodus:{name:"Exodus",icon:"4c16cad4-cac9-4643-6726-c696efaf5200",url:"https://www.exodus.com",isMobile:!0,isDesktop:!0,isInjected:!0},kuCoinWallet:{name:"KuCoin Wallet",icon:"1e47340b-8fd7-4ad6-17e7-b2bd651fae00",url:"https://kuwallet.com",isMobile:!0,isInjected:!0},ledger:{name:"Ledger",icon:"a7f416de-aa03-4c5e-3280-ab49269aef00",url:"https://www.ledger.com",isDesktop:!0},brave:{name:"Brave",icon:"125e828e-9936-4451-a8f2-949c119b7400",url:"https://brave.com/wallet",isInjected:!0},frame:{name:"Frame",icon:"cd492418-ea85-4ef1-aeed-1c9e20b58900",url:"https://frame.sh",isInjected:!0},tally:{name:"Tally",icon:"98d2620c-9fc8-4a1c-31bc-78d59d00a300",url:"https://tallyho.org",isInjected:!0},coinbaseWallet:{name:"Coinbase",icon:"f8068a7f-83d7-4190-1f94-78154a12c600",url:"https://www.coinbase.com/wallet",isInjected:!0},opera:{name:"Opera",icon:"877fa1a4-304d-4d45-ca8e-f76d1a556f00",url:"https://www.opera.com/crypto",isInjected:!0},tokenary:{name:"Tokenary",icon:"5e481041-dc3c-4a81-373a-76bbde91b800",url:"https://tokenary.io",isDesktop:!0,isInjected:!0},["1inch"]:{name:"1inch Wallet",icon:"dce1ee99-403f-44a9-9f94-20de30616500",url:"https://1inch.io/wallet",isMobile:!0}},getInjectedId(t){if(t.toUpperCase()!=="INJECTED"&&t.length)return t;const{ethereum:e,spotEthWallet:r,coinbaseWalletExtension:n}=window;return e?e.isTrust||e.isTrustWallet?"trust":e.isPhantom?"phantom":e.isBraveWallet?"brave":r?"spotEthWallet":e.isExodus?"exodus":e.isTokenPocket?"tokenPocket":e.isFrame?"frame":e.isTally?"tally":n?"coinbaseWallet":e.isAvalanche?"core":e.isBitKeep?"bitkeep":e.isMathWallet?"mathWallet":e.isOpera?"opera":e.isTokenary?"tokenary":e.isOneInchIOSWallet||e.isOneInchAndroidWallet?"1inch":e.isKuCoinWallet?"kuCoinWallet":e.isMetaMask?"metaMask":"injected":"metaMask"},getInjectedName(t){var e,r;if(t.length&&t.toUpperCase()!=="INJECTED")return t;const n=Ki.getInjectedId("");return(r=(e=Ki.injectedPreset[n])==null?void 0:e.name)!=null?r:"Injected"}},LC={ETH:{icon:"692ed6ba-e569-459a-556a-776476829e00"},WETH:{icon:"692ed6ba-e569-459a-556a-776476829e00"},AVAX:{icon:"30c46e53-e989-45fb-4549-be3bd4eb3b00"},FTM:{icon:"06b26297-fe0c-4733-5d6b-ffa5498aac00"},BNB:{icon:"93564157-2e8e-4ce7-81df-b264dbee9b00"},MATIC:{icon:"41d04d42-da3b-4453-8506-668cc0727900"},OP:{icon:"ab9c186a-c52f-464b-2906-ca59d760a400"},xDAI:{icon:"02b53f6a-e3d4-479e-1cb4-21178987d100"},EVMOS:{icon:"f926ff41-260d-4028-635e-91913fc28e00"},METIS:{icon:"3897a66d-40b9-4833-162f-a2c90531c900"},IOTX:{icon:"34e68754-e536-40da-c153-6ef2e7188a00"}};var jC=Object.defineProperty,M3=Object.getOwnPropertySymbols,UC=Object.prototype.hasOwnProperty,FC=Object.prototype.propertyIsEnumerable,L3=(t,e,r)=>e in t?jC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,BC=(t,e)=>{for(var r in e||(e={}))UC.call(e,r)&&L3(t,r,e[r]);if(M3)for(var r of M3(e))FC.call(e,r)&&L3(t,r,e[r]);return t};const ye={MOBILE_BREAKPOINT:600,W3M_RECENT_WALLET:"W3M_RECENT_WALLET",EXPLORER_WALLET_URL:"https://explorer.walletconnect.com/?type=wallet",rejectStandaloneButtonComponent(){const{isStandalone:t}=$e.state;if(t)throw new Error("Web3Modal button components are not available in standalone mode.")},getShadowRootElement(t,e){const r=t.renderRoot.querySelector(e);if(!r)throw new Error(`${e} not found`);return r},getWalletId(t){return Ki.getInjectedId(t)},getWalletIcon(t){var e,r;const n=(e=Ki.injectedPreset[t])==null?void 0:e.icon,{projectId:i,walletImages:o}=ar.state;return(r=o?.[t])!=null?r:i&&n?cr.getImageUrl(n):""},getWalletName(t,e=!1){const r=Ki.getInjectedName(t);return e?r.split(" ")[0]:r},getChainIcon(t){var e;const r=MC[t],{projectId:n,chainImages:i}=ar.state;return(e=i?.[t])!=null?e:n&&r?cr.getImageUrl(r):""},getTokenIcon(t){var e,r;const n=(e=LC[t])==null?void 0:e.icon,{projectId:i,tokenImages:o}=ar.state;return(r=o?.[t])!=null?r:i&&n?cr.getImageUrl(n):""},isMobileAnimation(){return window.innerWidth<=ye.MOBILE_BREAKPOINT},async preloadImage(t){const e=new Promise((r,n)=>{const i=new Image;i.onload=r,i.onerror=n,i.src=t});return Promise.race([e,nt.wait(3e3)])},getErrorMessage(t){return t instanceof Error?t.message:"Unknown Error"},debounce(t,e=500){let r;return(...n)=>{function i(){t(...n)}r&&clearTimeout(r),r=setTimeout(i,e)}},async handleMobileLinking(t){nt.removeWalletConnectDeepLink();const{standaloneUri:e,selectedChain:r}=$e.state,{links:n,name:i}=t;function o(c){let l="";n!=null&&n.universal?l=nt.formatUniversalUrl(n.universal,c,i):n!=null&&n.native&&(l=nt.formatNativeUrl(n.native,c,i)),nt.openHref(l,"_self")}e?(ye.setRecentWallet(t),o(e)):(await Nt.client().connectWalletConnect(c=>{o(c)},r?.id),ye.setRecentWallet(t),lr.close())},async handleAndroidLinking(){nt.removeWalletConnectDeepLink();const{standaloneUri:t,selectedChain:e}=$e.state;t?nt.openHref(t,"_self"):(await Nt.client().connectWalletConnect(r=>{nt.setWalletConnectAndroidDeepLink(r),nt.openHref(r,"_self")},e?.id),lr.close())},async handleUriCopy(){const{standaloneUri:t}=$e.state;if(t)await navigator.clipboard.writeText(t);else{const e=Nt.client().walletConnectUri;await navigator.clipboard.writeText(e)}xr.openToast("Link copied","success")},async handleConnectorConnection(t,e){try{const{selectedChain:r}=$e.state;await Nt.client().connectConnector(t,r?.id),lr.close()}catch(r){console.error(r),e?e():xr.openToast(ye.getErrorMessage(r),"error")}},getCustomWallets(){var t;const{desktopWallets:e,mobileWallets:r}=ar.state;return(t=nt.isMobile()?r:e)!=null?t:[]},getCustomImageUrls(){const{chainImages:t,walletImages:e}=ar.state,r=Object.values(t??{}),n=Object.values(e??{});return Object.values([...r,...n])},getConnectorImageUrls(){return Nt.client().getConnectors().map(({id:t})=>Ki.getInjectedId(t)).map(t=>ye.getWalletIcon(t))},truncate(t,e=8){return t.length<=e?t:`${t.substring(0,4)}...${t.substring(t.length-4)}`},generateAvatarColors(t){var e;const r=(e=t.match(/.{1,7}/g))==null?void 0:e.splice(0,5),n=[];r?.forEach(o=>{let c=0;for(let h=0;h<o.length;h+=1)c=o.charCodeAt(h)+((c<<5)-c),c=c&c;const l=[0,0,0];for(let h=0;h<3;h+=1){const d=c>>h*8&255;l[h]=d}n.push(`rgb(${l[0]}, ${l[1]}, ${l[2]})`)});const i=document.querySelector(":root");if(i){const o={"--w3m-color-av-1":n[0],"--w3m-color-av-2":n[1],"--w3m-color-av-3":n[2],"--w3m-color-av-4":n[3],"--w3m-color-av-5":n[4]};Object.entries(o).forEach(([c,l])=>i.style.setProperty(c,l))}},setRecentWallet(t){const{walletConnectVersion:e}=$e.state;localStorage.setItem(ye.W3M_RECENT_WALLET,JSON.stringify({[e]:t}))},getRecentWallet(){const t=localStorage.getItem(ye.W3M_RECENT_WALLET);if(t){const{walletConnectVersion:e}=$e.state,r=JSON.parse(t);if(r[e])return r[e]}},getExtensionWallets(){const t=[];for(const[e,r]of Object.entries(Ki.injectedPreset))r!=null&&r.isInjected&&!r.isDesktop&&t.push(BC({id:e},r));return t},caseSafeIncludes(t,e){return t.toUpperCase().includes(e.toUpperCase())},openWalletExplorerUrl(){nt.openHref(ye.EXPLORER_WALLET_URL,"_blank")}},kC=Ge`.w3m-router{overflow:hidden;will-change:transform}.w3m-content{display:flex;flex-direction:column}`;var HC=Object.defineProperty,zC=Object.getOwnPropertyDescriptor,Qh=(t,e,r,n)=>{for(var i=n>1?void 0:n?zC(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&HC(e,r,i),i};let Jo=class extends Re{constructor(){super(),this.view=lt.state.view,this.prevView=lt.state.view,this.unsubscribe=void 0,this.oldHeight="0px",this.resizeObserver=void 0,this.unsubscribe=lt.subscribe(t=>{this.view!==t.view&&this.onChangeRoute()})}firstUpdated(){this.resizeObserver=new ResizeObserver(([t])=>{const e=`${t.contentRect.height}px`;this.oldHeight!=="0px"&&(li(this.routerEl,{height:[this.oldHeight,e]},{duration:.2}),li(this.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.03})),this.oldHeight=e}),this.resizeObserver.observe(this.contentEl)}disconnectedCallback(){var t,e;(t=this.unsubscribe)==null||t.call(this),(e=this.resizeObserver)==null||e.disconnect()}get routerEl(){return ye.getShadowRootElement(this,".w3m-router")}get contentEl(){return ye.getShadowRootElement(this,".w3m-content")}viewTemplate(){switch(this.view){case"ConnectWallet":return ce`<w3m-connect-wallet-view></w3m-connect-wallet-view>`;case"SelectNetwork":return ce`<w3m-select-network-view></w3m-select-network-view>`;case"InjectedConnector":return ce`<w3m-injected-connector-view></w3m-injected-connector-view>`;case"InstallConnector":return ce`<w3m-install-connector-view></w3m-install-connector-view>`;case"GetWallet":return ce`<w3m-get-wallet-view></w3m-get-wallet-view>`;case"DesktopConnector":return ce`<w3m-desktop-connector-view></w3m-desktop-connector-view>`;case"WalletExplorer":return ce`<w3m-wallet-explorer-view></w3m-wallet-explorer-view>`;case"Qrcode":return ce`<w3m-qrcode-view></w3m-qrcode-view>`;case"Help":return ce`<w3m-help-view></w3m-help-view>`;case"Account":return ce`<w3m-account-view></w3m-account-view>`;case"SwitchNetwork":return ce`<w3m-switch-network-view></w3m-switch-network-view>`;case"Connectors":return ce`<w3m-connectors-view></w3m-connectors-view>`;default:return ce`<div>Not Found</div>`}}async onChangeRoute(){await li(this.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15}).finished,this.view=lt.state.view}render(){return ce`<div class="w3m-router"><div class="w3m-content">${this.viewTemplate()}</div></div>`}};Jo.styles=[He.globalCss,kC],Qh([wt()],Jo.prototype,"view",2),Qh([wt()],Jo.prototype,"prevView",2),Jo=Qh([ke("w3m-modal-router")],Jo);const WC=Ge`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:10px 15px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--w3m-notification-border-radius);border:1px solid var(--w3m-color-overlay);background-color:var(--w3m-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--w3m-color-bg-3)}}.w3m-success path{fill:var(--w3m-accent-color)}.w3m-error path{fill:var(--w3m-error-color)}`;var qC=Object.defineProperty,VC=Object.getOwnPropertyDescriptor,j3=(t,e,r,n)=>{for(var i=n>1?void 0:n?VC(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&qC(e,r,i),i};let Dc=class extends Re{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=xr.subscribe(t=>{t.open?(this.open=!0,this.timeout=setTimeout(()=>xr.closeToast(),2200)):(this.open=!1,clearTimeout(this.timeout))})}disconnectedCallback(){var t;(t=this.unsubscribe)==null||t.call(this),clearTimeout(this.timeout),xr.closeToast()}render(){const{message:t,variant:e}=xr.state,r={"w3m-success":e==="success","w3m-error":e==="error"};return this.open?ce`<div class="${Br(r)}">${e==="success"?Ze.CHECKMARK_ICON:null} ${e==="error"?Ze.CROSS_ICON:null}<w3m-text variant="small-regular">${t}</w3m-text></div>`:null}};Dc.styles=[He.globalCss,WC],j3([wt()],Dc.prototype,"open",2),Dc=j3([ke("w3m-modal-toast")],Dc);const KC=Ge`button{padding:5px;border-radius:var(--w3m-button-hover-highlight-border-radius);transition:all .2s ease;display:flex;flex-direction:column;align-items:center;justify-content:center;width:80px;height:90px}w3m-network-image{width:54px;height:59px}w3m-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;margin-top:5px}button:hover{background-color:var(--w3m-color-overlay)}`;var GC=Object.defineProperty,ZC=Object.getOwnPropertyDescriptor,Oc=(t,e,r,n)=>{for(var i=n>1?void 0:n?ZC(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&GC(e,r,i),i};let Bs=class extends Re{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.chainId=""}render(){return ce`<button @click="${this.onClick}"><w3m-network-image chainId="${this.chainId}"></w3m-network-image><w3m-text variant="xsmall-regular">${this.name}</w3m-text></button>`}};Bs.styles=[He.globalCss,KC],Oc([We()],Bs.prototype,"onClick",2),Oc([We()],Bs.prototype,"name",2),Oc([We()],Bs.prototype,"chainId",2),Bs=Oc([ke("w3m-network-button")],Bs);const YC=Ge`div{width:inherit;height:inherit}.polygon-stroke{stroke:var(--w3m-color-overlay)}svg{width:100%;height:100%;margin:0}#network-placeholder-fill{fill:var(--w3m-color-bg-3)}#network-placeholder-dash{stroke:var(--w3m-color-overlay)}`;var JC=Object.defineProperty,XC=Object.getOwnPropertyDescriptor,U3=(t,e,r,n)=>{for(var i=n>1?void 0:n?XC(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&JC(e,r,i),i};let Ac=class extends Re{constructor(){super(...arguments),this.chainId=""}render(){const t=ye.getChainIcon(this.chainId);return t?ce`<div><svg width="54" height="59" viewBox="0 0 54 59" fill="none"><defs><clipPath id="polygon"><path d="M17.033 4.964c3.852-2.262 5.778-3.393 7.84-3.77a11.807 11.807 0 0 1 4.254 0c2.062.377 3.988 1.508 7.84 3.77l6.066 3.562c3.852 2.263 5.777 3.394 7.13 5.022a12.268 12.268 0 0 1 2.127 3.747c.71 2.006.71 4.268.71 8.793v7.124c0 4.525 0 6.787-.71 8.793a12.268 12.268 0 0 1-2.126 3.747c-1.354 1.628-3.28 2.76-7.131 5.022l-6.066 3.562c-3.852 2.262-5.778 3.393-7.84 3.771a11.814 11.814 0 0 1-4.254 0c-2.062-.378-3.988-1.509-7.84-3.77l-6.066-3.563c-3.852-2.263-5.778-3.394-7.13-5.022a12.268 12.268 0 0 1-2.127-3.747C1 40 1 37.737 1 33.212v-7.124c0-4.525 0-6.787.71-8.793a12.268 12.268 0 0 1 2.127-3.747c1.352-1.628 3.278-2.76 7.13-5.022l6.066-3.562Z"/></clipPath></defs><image clip-path="url(#polygon)" href="${t}" width="58" height="59" x="-2" y="0"/><path class="polygon-stroke" d="M17.22 5.295c3.877-2.277 5.737-3.363 7.72-3.726a11.44 11.44 0 0 1 4.12 0c1.983.363 3.844 1.45 7.72 3.726l6.065 3.562c3.876 2.276 5.731 3.372 7.032 4.938a11.896 11.896 0 0 1 2.06 3.63c.683 1.928.688 4.11.688 8.663v7.124c0 4.553-.005 6.735-.688 8.664a11.896 11.896 0 0 1-2.06 3.63c-1.3 1.565-3.156 2.66-7.032 4.937l-6.065 3.563c-3.877 2.276-5.737 3.362-7.72 3.725a11.46 11.46 0 0 1-4.12 0c-1.983-.363-3.844-1.449-7.72-3.726l-6.065-3.562c-3.876-2.276-5.731-3.372-7.032-4.938a11.885 11.885 0 0 1-2.06-3.63c-.682-1.928-.688-4.11-.688-8.663v-7.124c0-4.553.006-6.735.688-8.664a11.885 11.885 0 0 1 2.06-3.63c1.3-1.565 3.156-2.66 7.032-4.937l6.065-3.562Z" stroke="#fff"/></svg></div>`:ce`${Ze.NETWORK_PLACEHOLDER}`}};Ac.styles=[He.globalCss,YC],U3([We()],Ac.prototype,"chainId",2),Ac=U3([ke("w3m-network-image")],Ac);const QC=.1,F3=2.5,zn=7;function ef(t,e,r){return t===e?!1:(t-e<0?e-t:t-e)<=r+QC}function eI(t,e){const r=Array.prototype.slice.call(Wo.create(t,{errorCorrectionLevel:e}).modules.data,0),n=Math.sqrt(r.length);return r.reduce((i,o,c)=>(c%n===0?i.push([o]):i[i.length-1].push(o))&&i,[])}const tI={generate(t,e,r,n){const i=n==="light"?"#141414":"#fff",o=n==="light"?"#fff":"#141414",c=[],l=eI(t,"Q"),h=e/l.length,d=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];d.forEach(({x:L,y:k})=>{const q=(l.length-zn)*h*L,T=(l.length-zn)*h*k,M=.32;for(let A=0;A<d.length;A+=1){const R=h*(zn-A*2);c.push(ft`<rect fill="${A%2===0?i:o}" height="${R}" rx="${R*M}" ry="${R*M}" width="${R}" x="${q+h*A}" y="${T+h*A}">`)}});const v=Math.floor((r+25)/h),E=l.length/2-v/2,_=l.length/2+v/2-1,S=[];l.forEach((L,k)=>{L.forEach((q,T)=>{if(l[k][T]&&!(k<zn&&T<zn||k>l.length-(zn+1)&&T<zn||k<zn&&T>l.length-(zn+1))&&!(k>E&&k<_&&T>E&&T<_)){const M=k*h+h/2,A=T*h+h/2;S.push([M,A])}})});const P={};return S.forEach(([L,k])=>{P[L]?P[L].push(k):P[L]=[k]}),Object.entries(P).map(([L,k])=>{const q=k.filter(T=>k.every(M=>!ef(T,M,h)));return[Number(L),q]}).forEach(([L,k])=>{k.forEach(q=>{c.push(ft`<circle cx="${L}" cy="${q}" fill="${i}" r="${h/F3}">`)})}),Object.entries(P).filter(([L,k])=>k.length>1).map(([L,k])=>{const q=k.filter(T=>k.some(M=>ef(T,M,h)));return[Number(L),q]}).map(([L,k])=>{k.sort((T,M)=>T<M?-1:1);const q=[];for(const T of k){const M=q.find(A=>A.some(R=>ef(T,R,h)));M?M.push(T):q.push([T])}return[L,q.map(T=>[T[0],T[T.length-1]])]}).forEach(([L,k])=>{k.forEach(([q,T])=>{c.push(ft`<line x1="${L}" x2="${L}" y1="${q}" y2="${T}" stroke="${i}" stroke-width="${h/(F3/2)}" stroke-linecap="round">`)})}),c}},rI=Ge`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;width:100%;aspect-ratio:1/1;animation:fadeIn ease .2s}svg:first-child,w3m-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}w3m-wallet-image{transform:translateY(-50%) translateX(-50%)}w3m-wallet-image{width:25%;height:25%;border-radius:15px}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--w3m-accent-color)}svg:first-child path:last-child{stroke:var(--w3m-color-overlay)}`;var nI=Object.defineProperty,iI=Object.getOwnPropertyDescriptor,Xo=(t,e,r,n)=>{for(var i=n>1?void 0:n?iI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&nI(e,r,i),i};let Gi=class extends Re{constructor(){super(...arguments),this.uri="",this.size=0,this.logoSrc="",this.walletId=""}svgTemplate(){var t;const e=(t=Hn.state.themeMode)!=null?t:"light";return ft`<svg height="${this.size}" width="${this.size}">${tI.generate(this.uri,this.size,this.size/4,e)}</svg>`}render(){return ce`<div>${this.walletId||this.logoSrc?ce`<w3m-wallet-image walletId="${kr(this.walletId)}" src="${kr(this.logoSrc)}"></w3m-wallet-image>`:Ze.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}</div>`}};Gi.styles=[He.globalCss,rI],Xo([We()],Gi.prototype,"uri",2),Xo([We({type:Number})],Gi.prototype,"size",2),Xo([We()],Gi.prototype,"logoSrc",2),Xo([We()],Gi.prototype,"walletId",2),Gi=Xo([ke("w3m-qrcode")],Gi);const sI=Ge`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--w3m-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:transparent;position:absolute;background-color:var(--w3m-color-bg-3);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay)}input::placeholder{color:transparent}svg{margin-right:4px}.w3m-placeholder{top:0;left:50%;transform:translateX(-50%);transition:.2s all ease;pointer-events:none;display:flex;align-items:center;justify-content:center;height:100%;width:fit-content;position:relative}input:focus-within+.w3m-placeholder,input:not(:placeholder-shown)+.w3m-placeholder{transform:translateX(10px);left:0}w3m-text{opacity:1;transition:.2s opacity ease}input:focus-within+.w3m-placeholder w3m-text,input:not(:placeholder-shown)+.w3m-placeholder w3m-text{opacity:0}input:focus-within,input:not(:placeholder-shown){color:var(--w3m-color-fg-1)}input:focus-within{box-shadow:inset 0 0 0 1px var(--w3m-accent-color)}path{fill:var(--w3m-color-fg-2)}`;var oI=Object.defineProperty,aI=Object.getOwnPropertyDescriptor,B3=(t,e,r,n)=>{for(var i=n>1?void 0:n?aI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&oI(e,r,i),i};let $c=class extends Re{constructor(){super(...arguments),this.onChange=()=>null}render(){const t=nt.isMobile()?"Search mobile wallets":"Search desktop wallets";return ce`<input type="text" @input="${this.onChange}" placeholder="${t}"><div class="w3m-placeholder">${Ze.SEARCH_ICON}<w3m-text color="secondary" variant="small-thin">${t}</w3m-text></div>`}};$c.styles=[He.globalCss,sI],B3([We()],$c.prototype,"onChange",2),$c=B3([ke("w3m-search-input")],$c);const cI=Ge`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--w3m-accent-color)}`;var lI=Object.defineProperty,uI=Object.getOwnPropertyDescriptor,hI=(t,e,r,n)=>{for(var i=n>1?void 0:n?uI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&lI(e,r,i),i};let tf=class extends Re{render(){return ce`<svg viewBox="0 0 50 50" width="24" height="24"><circle cx="25" cy="25" r="20" fill="none" stroke-width="4" stroke="#fff"/></svg>`}};tf.styles=[He.globalCss,cI],tf=hI([ke("w3m-spinner")],tf);const fI=Ge`span{font-style:normal;font-family:var(--w3m-font-family);font-feature-settings:'tnum' on,'lnum' on,'case' on}.w3m-xsmall-bold{font-family:var(--w3m-text-xsmall-bold-font-family);font-weight:var(--w3m-text-xsmall-bold-weight);font-size:var(--w3m-text-xsmall-bold-size);line-height:var(--w3m-text-xsmall-bold-line-height);letter-spacing:var(--w3m-text-xsmall-bold-letter-spacing);text-transform:var(--w3m-text-xsmall-bold-text-transform)}.w3m-xsmall-regular{font-family:var(--w3m-text-xsmall-regular-font-family);font-weight:var(--w3m-text-xsmall-regular-weight);font-size:var(--w3m-text-xsmall-regular-size);line-height:var(--w3m-text-xsmall-regular-line-height);letter-spacing:var(--w3m-text-xsmall-regular-letter-spacing);text-transform:var(--w3m-text-xsmall-regular-text-transform)}.w3m-small-thin{font-family:var(--w3m-text-small-thin-font-family);font-weight:var(--w3m-text-small-thin-weight);font-size:var(--w3m-text-small-thin-size);line-height:var(--w3m-text-small-thin-line-height);letter-spacing:var(--w3m-text-small-thin-letter-spacing);text-transform:var(--w3m-text-small-thin-text-transform)}.w3m-small-regular{font-family:var(--w3m-text-small-regular-font-family);font-weight:var(--w3m-text-small-regular-weight);font-size:var(--w3m-text-small-regular-size);line-height:var(--w3m-text-small-regular-line-height);letter-spacing:var(--w3m-text-small-regular-letter-spacing);text-transform:var(--w3m-text-small-regular-text-transform)}.w3m-medium-regular{font-family:var(--w3m-text-medium-regular-font-family);font-weight:var(--w3m-text-medium-regular-weight);font-size:var(--w3m-text-medium-regular-size);line-height:var(--w3m-text-medium-regular-line-height);letter-spacing:var(--w3m-text-medium-regular-letter-spacing);text-transform:var(--w3m-text-medium-regular-text-transform)}.w3m-big-bold{font-family:var(--w3m-text-big-bold-font-family);font-weight:var(--w3m-text-big-bold-weight);font-size:var(--w3m-text-big-bold-size);line-height:var(--w3m-text-big-bold-line-height);letter-spacing:var(--w3m-text-big-bold-letter-spacing);text-transform:var(--w3m-text-big-bold-text-transform)}:host(*){color:var(--w3m-color-fg-1)}.w3m-color-primary{color:var(--w3m-color-fg-1)}.w3m-color-secondary{color:var(--w3m-color-fg-2)}.w3m-color-tertiary{color:var(--w3m-color-fg-3)}.w3m-color-inverse{color:var(--w3m-accent-fill-color)}.w3m-color-accnt{color:var(--w3m-accent-color)}.w3m-color-error{color:var(--w3m-error-color)}`;var dI=Object.defineProperty,pI=Object.getOwnPropertyDescriptor,rf=(t,e,r,n)=>{for(var i=n>1?void 0:n?pI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&dI(e,r,i),i};let Qo=class extends Re{constructor(){super(...arguments),this.variant="medium-regular",this.color="primary"}render(){const t={"w3m-big-bold":this.variant==="big-bold","w3m-medium-regular":this.variant==="medium-regular","w3m-small-regular":this.variant==="small-regular","w3m-small-thin":this.variant==="small-thin","w3m-xsmall-regular":this.variant==="xsmall-regular","w3m-xsmall-bold":this.variant==="xsmall-bold","w3m-color-primary":this.color==="primary","w3m-color-secondary":this.color==="secondary","w3m-color-tertiary":this.color==="tertiary","w3m-color-inverse":this.color==="inverse","w3m-color-accnt":this.color==="accent","w3m-color-error":this.color==="error"};return ce`<span><slot class="${Br(t)}"></slot></span>`}};Qo.styles=[He.globalCss,fI],rf([We()],Qo.prototype,"variant",2),rf([We()],Qo.prototype,"color",2),Qo=rf([ke("w3m-text")],Qo);const gI=Ge`div{overflow:hidden;position:relative;border-radius:50%}div::after{content:'';position:absolute;inset:0;border-radius:50%;border:1px solid var(--w3m-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}svg{width:100%;height:100%}#token-placeholder-fill{fill:var(--w3m-color-bg-3)}#token-placeholder-dash{stroke:var(--w3m-color-overlay)}`;var mI=Object.defineProperty,wI=Object.getOwnPropertyDescriptor,k3=(t,e,r,n)=>{for(var i=n>1?void 0:n?wI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&mI(e,r,i),i};let Pc=class extends Re{constructor(){super(...arguments),this.symbol=void 0}render(){var t;const e=ye.getTokenIcon((t=this.symbol)!=null?t:"");return e?ce`<div><img src="${e}" alt="${this.id}"></div>`:Ze.TOKEN_PLACEHOLDER}};Pc.styles=[He.globalCss,gI],k3([We()],Pc.prototype,"symbol",2),Pc=k3([ke("w3m-token-image")],Pc);const vI=Ge`button{transition:all .2s ease;width:100%;height:100%;border-radius:var(--w3m-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:hover{background-color:var(--w3m-color-overlay)}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}w3m-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}w3m-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--w3m-wallet-icon-border-radius);margin-bottom:5px}.w3m-sublabel{margin-top:2px}`;var yI=Object.defineProperty,bI=Object.getOwnPropertyDescriptor,fi=(t,e,r,n)=>{for(var i=n>1?void 0:n?bI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&yI(e,r,i),i};let Tn=class extends Re{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.walletId="",this.label=void 0,this.src=void 0,this.installed=!1,this.recent=!1}sublabelTemplate(){return this.recent?ce`<w3m-text class="w3m-sublabel" variant="xsmall-bold" color="tertiary">RECENT</w3m-text>`:this.installed?ce`<w3m-text class="w3m-sublabel" variant="xsmall-bold" color="tertiary">INSTALLED</w3m-text>`:null}render(){var t;return ce`<button @click="${this.onClick}"><div><w3m-wallet-image walletId="${this.walletId}" .src="${this.src}"></w3m-wallet-image><w3m-text variant="xsmall-regular">${(t=this.label)!=null?t:ye.getWalletName(this.name,!0)}</w3m-text>${this.sublabelTemplate()}</div></button>`}};Tn.styles=[He.globalCss,vI],fi([We()],Tn.prototype,"onClick",2),fi([We()],Tn.prototype,"name",2),fi([We()],Tn.prototype,"walletId",2),fi([We()],Tn.prototype,"label",2),fi([We()],Tn.prototype,"src",2),fi([We()],Tn.prototype,"installed",2),fi([We()],Tn.prototype,"recent",2),Tn=fi([ke("w3m-wallet-button")],Tn);const _I=Ge`div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;inset:0;border-radius:inherit;border:1px solid var(--w3m-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--w3m-color-bg-3)}#wallet-placeholder-dash{stroke:var(--w3m-color-overlay)}`;var EI=Object.defineProperty,xI=Object.getOwnPropertyDescriptor,nf=(t,e,r,n)=>{for(var i=n>1?void 0:n?xI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&EI(e,r,i),i};let ea=class extends Re{constructor(){super(...arguments),this.walletId=void 0,this.src=void 0}render(){var t;const e=ye.getWalletId((t=this.walletId)!=null?t:""),r=this.src?this.src:ye.getWalletIcon(e);return ce`${r.length?ce`<div><img src="${r}" alt="${this.id}"></div>`:Ze.WALLET_PLACEHOLDER}`}};ea.styles=[He.globalCss,_I],nf([We()],ea.prototype,"walletId",2),nf([We()],ea.prototype,"src",2),ea=nf([ke("w3m-wallet-image")],ea);var CI=Object.defineProperty,II=Object.getOwnPropertyDescriptor,SI=(t,e,r,n)=>{for(var i=n>1?void 0:n?II(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&CI(e,r,i),i};let H3=class extends Re{constructor(){super(),this.unwatchAccount=void 0,Et.getAccount(),this.fetchProfile(),this.fetchBalance(),this.unwatchAccount=Nt.client().watchAccount(t=>{if(Et.state.isConnected&&!t.isConnected)lr.close();else{const{address:e}=Et.state;t.address!==e&&(this.fetchProfile(t.address),this.fetchBalance(t.address)),Et.setAddress(t.address)}Et.setIsConnected(t.isConnected)})}disconnectedCallback(){var t;(t=this.unwatchAccount)==null||t.call(this)}async fetchProfile(t){var e;const r=(e=$e.state.chains)==null?void 0:e.find(n=>n.id===1);if(ar.state.enableAccountView&&r)try{await Et.fetchProfile(ye.preloadImage,t)}catch(n){console.error(n),xr.openToast(ye.getErrorMessage(n),"error")}}async fetchBalance(t){if(ar.state.enableAccountView)try{await Et.fetchBalance(t)}catch(e){console.error(e),xr.openToast(ye.getErrorMessage(e),"error")}}};H3=SI([ke("w3m-account-context")],H3);var DI=Object.defineProperty,OI=Object.getOwnPropertyDescriptor,z3=(t,e,r,n)=>{for(var i=n>1?void 0:n?OI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&DI(e,r,i),i};let sf=class extends Re{constructor(){super(),this.preload=!0,this.preloadData()}async loadImages(t){try{t!=null&&t.length&&await Promise.all(t.map(async e=>ye.preloadImage(e)))}catch{console.info("Unsuccessful attempt at preloading some images",t)}}async preloadListings(){var t;if(ar.state.enableExplorer){const{standaloneChains:e,chains:r,walletConnectVersion:n}=$e.state,i=e?.join(",");await Promise.all([cr.getPreviewWallets({page:1,entries:10,chains:i,device:nt.isMobile()?"mobile":"desktop",version:n}),cr.getRecomendedWallets()]),$e.setIsDataLoaded(!0);const{previewWallets:o,recomendedWallets:c}=cr.state,l=(t=r?.map(d=>ye.getChainIcon(d.id)))!=null?t:[],h=[...o,...c].map(d=>d.image_url.lg);await this.loadImages([...l,...h])}else $e.setIsDataLoaded(!0)}async preloadCustomImages(){const t=ye.getCustomImageUrls();await this.loadImages(t)}async preloadConnectorImages(){if(!$e.state.isStandalone){const t=ye.getConnectorImageUrls();await this.loadImages(t)}}async preloadData(){try{this.preload&&(this.preload=!1,await Promise.all([this.preloadListings(),this.preloadCustomImages(),this.preloadConnectorImages()]))}catch(t){console.error(t),xr.openToast("Failed preloading","error")}}};z3([wt()],sf.prototype,"preload",2),sf=z3([ke("w3m-explorer-context")],sf);var AI=Object.defineProperty,$I=Object.getOwnPropertyDescriptor,W3=(t,e,r,n)=>{for(var i=n>1?void 0:n?$I(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&AI(e,r,i),i};let of=class extends Re{constructor(){super(),this.activeChainId=void 0,this.unwatchNetwork=void 0;const t=$e.getSelectedChain();this.activeChainId=t?.id,this.unwatchNetwork=Nt.client().watchNetwork(e=>{const r=e.chain;r&&this.activeChainId!==r.id&&($e.setSelectedChain(r),this.activeChainId=r.id,Et.resetBalance(),this.fetchBalance())})}disconnectedCallback(){var t;(t=this.unwatchNetwork)==null||t.call(this)}async fetchBalance(){if(ar.state.enableAccountView)try{await Et.fetchBalance()}catch(t){console.error(t),xr.openToast(ye.getErrorMessage(t),"error")}}};W3([wt()],of.prototype,"activeChainId",2),of=W3([ke("w3m-network-context")],of);var PI=Object.defineProperty,TI=Object.getOwnPropertyDescriptor,RI=(t,e,r,n)=>{for(var i=n>1?void 0:n?TI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&PI(e,r,i),i};let q3=class extends Re{constructor(){super(),this.unsubscribeTheme=void 0,He.setTheme(),this.unsubscribeTheme=Hn.subscribe(He.setTheme),this.preloadThemeImages()}disconnectedCallback(){var t;(t=this.unsubscribeTheme)==null||t.call(this)}async preloadThemeImages(){try{const{themeVariables:t}=Hn.state,e=[t?.["--w3m-background-image-url"],t?.["--w3m-logo-image-url"]].filter(Boolean);e.length&&await Promise.all(e.map(async r=>ye.preloadImage(r)))}catch{console.info("Unsuccessful attempt at preloading some images")}}};q3=RI([ke("w3m-theme-context")],q3);const NI=Ge`:host{all:initial}div{display:flex;align-items:center;background-color:var(--w3m-color-overlay);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);border-radius:var(--w3m-button-border-radius);padding:4px 4px 4px 8px}div button{border-radius:var(--w3m-secondary-button-border-radius);padding:4px 8px;padding-left:4px;height:auto;margin-left:10px;color:var(--w3m-accent-fill-color);background-color:var(--w3m-accent-color)}.w3m-no-avatar{padding-left:8px}button::after{content:'';inset:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--w3m-color-overlay)}button:hover::after{background-color:var(--w3m-color-overlay)}w3m-avatar{margin-right:6px}w3m-button-big w3m-avatar{margin-left:-5px}`;var MI=Object.defineProperty,LI=Object.getOwnPropertyDescriptor,af=(t,e,r,n)=>{for(var i=n>1?void 0:n?LI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&MI(e,r,i),i};let ks=class extends Re{constructor(){super(),this.balance="hide",this.avatar="show",ye.rejectStandaloneButtonComponent()}onOpen(){const{isStandalone:t}=$e.state;t||lr.open({route:"Account"})}accountTemplate(){const t=this.avatar==="show";return ce`${t?ce`<w3m-avatar></w3m-avatar>`:null}<w3m-address-text></w3m-address-text>`}render(){const t=this.balance==="show",e={"w3m-no-avatar":this.avatar==="hide"};return t?ce`<div><w3m-balance></w3m-balance><button @click="${this.onOpen}" class="${Br(e)}">${this.accountTemplate()}</button></div>`:ce`<w3m-button-big @click="${this.onOpen}">${this.accountTemplate()}</w3m-button-big>`}};ks.styles=[He.globalCss,NI],af([We()],ks.prototype,"balance",2),af([We()],ks.prototype,"avatar",2),ks=af([ke("w3m-account-button")],ks);const jI=Ge`button{display:flex;border-radius:var(--w3m-button-hover-highlight-border-radius);flex-direction:column;transition:background-color .2s ease;justify-content:center;padding:5px;width:100px}button:hover{background-color:var(--w3m-color-overlay)}button:disabled{pointer-events:none}w3m-network-image{width:32px;height:32px}w3m-text{margin-top:4px}`;var UI=Object.defineProperty,FI=Object.getOwnPropertyDescriptor,cf=(t,e,r,n)=>{for(var i=n>1?void 0:n?FI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&UI(e,r,i),i};let ta=class extends Re{constructor(){super(),this.chainId="",this.label="",this.unsubscribeNetwork=void 0;const{selectedChain:t}=$e.state;this.chainId=t?.id.toString(),this.label=t?.name,this.unsubscribeNetwork=$e.subscribe(({selectedChain:e})=>{this.chainId=e?.id.toString(),this.label=e?.name})}disconnectedCallback(){var t;(t=this.unsubscribeNetwork)==null||t.call(this)}onClick(){lt.push("SelectNetwork")}render(){const{chains:t,selectedChain:e}=$e.state,r=t?.map(o=>o.id),n=e&&r?.includes(e.id),i=t&&t.length<=1&&n;return ce`<button @click="${this.onClick}" ?disabled="${i}"><w3m-network-image chainId="${kr(this.chainId)}"></w3m-network-image><w3m-text variant="xsmall-regular" color="accent">${this.label}</w3m-text></button>`}};ta.styles=[He.globalCss,jI],cf([wt()],ta.prototype,"chainId",2),cf([wt()],ta.prototype,"label",2),ta=cf([ke("w3m-account-network-button")],ta);const BI=Ge`@keyframes slide{0%{background-position:0 0}100%{background-position:200px 0}}w3m-text{padding:1px 0}.w3m-loading{background:linear-gradient(270deg,var(--w3m-color-fg-1) 36.33%,var(--w3m-color-fg-3) 42.07%,var(--w3m-color-fg-1) 83.3%);background-size:200px 100%;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation-name:slide;animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:linear}`;var kI=Object.defineProperty,HI=Object.getOwnPropertyDescriptor,ra=(t,e,r,n)=>{for(var i=n>1?void 0:n?HI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&kI(e,r,i),i};let Zi=class extends Re{constructor(){super(),this.address=void 0,this.name=void 0,this.loading=!0,this.variant="button",this.unsubscribeAccount=void 0,this.address=Et.state.address,this.name=Et.state.profileName,this.loading=!!Et.state.profileLoading,this.unsubscribeAccount=Et.subscribe(({address:t,profileName:e,profileLoading:r})=>{this.address=t,this.name=e,this.loading=!!r})}disconnectedCallback(){var t;(t=this.unsubscribeAccount)==null||t.call(this)}render(){var t;const e=this.variant==="button",r={"w3m-loading":this.loading};return ce`<w3m-text class="${Br(r)}" variant="${e?"medium-regular":"big-bold"}" color="${e?"inverse":"primary"}">${this.name?this.name:ye.truncate((t=this.address)!=null?t:"")}</w3m-text>`}};Zi.styles=[He.globalCss,BI],ra([wt()],Zi.prototype,"address",2),ra([wt()],Zi.prototype,"name",2),ra([wt()],Zi.prototype,"loading",2),ra([We()],Zi.prototype,"variant",2),Zi=ra([ke("w3m-address-text")],Zi);const Tr={allowedExplorerListings(t){const{explorerAllowList:e,explorerDenyList:r}=ar.state;let n=[...t];return e&&(n=n.filter(i=>e.includes(i.id))),r&&(n=n.filter(i=>!r.includes(i.id))),n},walletsWithInjected(t){let e=[...t??[]];if(window.ethereum){const r=ye.getWalletName("");e=e.filter(({name:n})=>!ye.caseSafeIncludes(n,r))}return e},connectorWallets(){const{isStandalone:t}=$e.state;if(t)return[];let e=Nt.client().getConnectors();return!window.ethereum&&nt.isMobile()&&(e=e.filter(({id:r})=>r!=="injected"&&r!==Fs.metaMask)),e},walletTemplatesWithRecent(t,e){let r=[...t];if(e){const n=ye.getRecentWallet();r=r.filter(i=>!i.values.includes(n?.name)),r.splice(1,0,e)}return r},deduplicateExplorerListingsFromConnectors(t){const{isStandalone:e}=$e.state;if(e)return t;const r=Nt.client().getConnectors().map(({name:n})=>n.toUpperCase());return t.filter(({name:n})=>!r.includes(n.toUpperCase()))}},zI=Ge`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 10),0,0)}}.w3m-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px}.w3m-slider::after,.w3m-slider::before{content:'';height:100%;width:50px;z-index:2;position:absolute;background:linear-gradient(to right,var(--w3m-color-bg-1) 0,transparent 100%);top:0}.w3m-slider::before{left:0}.w3m-slider::after{right:0;transform:rotateZ(180deg)}.w3m-track{display:flex;width:calc(70px * 20);animation:scroll 20s linear infinite}.w3m-action{padding:30px 0 10px 0;display:flex;justify-content:center;align-items:center;flex-direction:column}.w3m-action w3m-button-big:last-child{margin-top:10px}w3m-wallet-image{width:60px;height:60px;margin:0 5px;box-shadow:0 2px 4px -2px rgba(0,0,0,.12),0 4px 4px -2px rgba(0,0,0,.08);border-radius:15px}w3m-button-big{margin:0 5px}`;var WI=Object.defineProperty,qI=Object.getOwnPropertyDescriptor,VI=(t,e,r,n)=>{for(var i=n>1?void 0:n?qI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&WI(e,r,i),i};let lf=class extends Re{onGoToQrcode(){lt.push("Qrcode")}onGoToConnectors(){lt.push("Connectors")}onGoToGetWallet(){lt.push("GetWallet")}getConnectors(){let t=Tr.connectorWallets();return window.ethereum||(t=t.filter(({id:e})=>e!=="injected"&&e!==Fs.metaMask)),t}render(){const{previewWallets:t}=cr.state,e=t.length,r=[...t,...t],n=this.getConnectors().length>0;return ce`<w3m-modal-header title="Connect your wallet" .onAction="${this.onGoToQrcode}" .actionIcon="${Ze.QRCODE_ICON}"></w3m-modal-header><w3m-modal-content>${e?ce`<div class="w3m-slider"><div class="w3m-track">${r.map(({image_url:i})=>ce`<w3m-wallet-image src="${i.lg}"></w3m-wallet-image>`)}</div></div>`:null}<div class="w3m-action"><div><w3m-button-big @click="${ye.handleAndroidLinking}"><w3m-text variant="medium-normal" color="inverse">${n?"WalletConnect":"Select Wallet"}</w3m-text></w3m-button-big>${n?ce`<w3m-button-big @click="${this.onGoToConnectors}"><w3m-text variant="medium-normal" color="inverse">Other</w3m-text></w3m-button-big>`:null}</div><w3m-button-big variant="secondary" @click="${this.onGoToGetWallet}"><w3m-text variant="medium-regular" color="accent">I don’t have a wallet</w3m-text></w3m-button-big></div></w3m-modal-content>`}};lf.styles=[He.globalCss,zI],lf=VI([ke("w3m-android-wallet-selection")],lf);const KI=Ge`@keyframes slide{0%{transform:translateX(-50px)}100%{transform:translateX(200px)}}.w3m-placeholder,img{border-radius:50%;box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);display:block;position:relative;overflow:hidden!important;background-color:var(--w3m-color-av-1);background-image:radial-gradient(at 66% 77%,var(--w3m-color-av-2) 0,transparent 50%),radial-gradient(at 29% 97%,var(--w3m-color-av-3) 0,transparent 50%),radial-gradient(at 99% 86%,var(--w3m-color-av-4) 0,transparent 50%),radial-gradient(at 29% 88%,var(--w3m-color-av-5) 0,transparent 50%);transform:translateZ(0)}.w3m-loader{width:50px;height:100%;background:linear-gradient(270deg,transparent 0,rgba(255,255,255,.4) 30%,transparent 100%);animation-name:slide;animation-duration:1.5s;transform:translateX(-50px);animation-iteration-count:infinite;animation-timing-function:linear;animation-delay:.55s}.w3m-small{width:24px;height:24px}.w3m-medium{width:60px;height:60px}`;var GI=Object.defineProperty,ZI=Object.getOwnPropertyDescriptor,na=(t,e,r,n)=>{for(var i=n>1?void 0:n?ZI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&GI(e,r,i),i};let Yi=class extends Re{constructor(){super(),this.address=void 0,this.avatar=void 0,this.loading=!0,this.size="small",this.unsubscribeAccount=void 0,this.address=Et.state.address,this.avatar=Et.state.profileAvatar,this.loading=!!Et.state.profileLoading,this.unsubscribeAccount=Et.subscribe(({address:t,profileAvatar:e,profileLoading:r})=>{this.address=t,this.avatar=e,this.loading=!!r})}disconnectedCallback(){var t;(t=this.unsubscribeAccount)==null||t.call(this)}render(){const t={"w3m-placeholder":!0,"w3m-small":this.size==="small","w3m-medium":this.size==="medium"};return this.avatar?ce`<img class="${Br(t)}" src="${this.avatar}">`:this.address?(ye.generateAvatarColors(this.address),ce`<div class="${Br(t)}">${this.loading?ce`<div class="w3m-loader"></div>`:null}</div>`):null}};Yi.styles=[He.globalCss,KI],na([wt()],Yi.prototype,"address",2),na([wt()],Yi.prototype,"avatar",2),na([wt()],Yi.prototype,"loading",2),na([We()],Yi.prototype,"size",2),Yi=na([ke("w3m-avatar")],Yi);const YI=Ge`div{display:flex;align-items:center}w3m-token-image{width:28px;height:28px;margin-right:6px}`;var JI=Object.defineProperty,XI=Object.getOwnPropertyDescriptor,uf=(t,e,r,n)=>{for(var i=n>1?void 0:n?XI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&JI(e,r,i),i};let ia=class extends Re{constructor(){var t,e;super(),this.symbol=void 0,this.amount=void 0,this.unsubscribeAccount=void 0,this.symbol=(t=Et.state.balance)==null?void 0:t.symbol,this.amount=(e=Et.state.balance)==null?void 0:e.amount,this.unsubscribeAccount=Et.subscribe(({balance:r})=>{this.symbol=r?.symbol,this.amount=r?.amount})}disconnectedCallback(){var t;(t=this.unsubscribeAccount)==null||t.call(this)}render(){let t="_._";return this.amount==="0.0"?t=0:typeof this.amount=="string"&&this.amount.length>6?t=parseFloat(this.amount).toFixed(3):typeof this.amount=="string"&&(t=parseFloat(this.amount)),ce`<div><w3m-token-image symbol="${kr(this.symbol)}"></w3m-token-image><w3m-text variant="medium-regular" color="primary">${t} ${this.symbol}</w3m-text></div>`}};ia.styles=[He.globalCss,YI],uf([wt()],ia.prototype,"symbol",2),uf([wt()],ia.prototype,"amount",2),ia=uf([ke("w3m-balance")],ia);const QI=Ge`:host{all:initial}svg{width:28px;height:20px;margin:-1px 3px 0 -5px}svg path{fill:var(--w3m-accent-fill-color)}button:disabled svg path{fill:var(--w3m-color-fg-3)}w3m-spinner{margin:0 10px 0 0}`;var eS=Object.defineProperty,tS=Object.getOwnPropertyDescriptor,Tc=(t,e,r,n)=>{for(var i=n>1?void 0:n?tS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&eS(e,r,i),i};let Ji=class extends Re{constructor(){super(),this.loading=!1,this.label="Connect Wallet",this.icon="show",this.modalUnsub=void 0,ye.rejectStandaloneButtonComponent(),this.modalUnsub=lr.subscribe(t=>{t.open&&(this.loading=!0),t.open||(this.loading=!1)})}disconnectedCallback(){var t;(t=this.modalUnsub)==null||t.call(this)}iconTemplate(){return this.icon==="show"?Ze.WALLET_CONNECT_ICON:null}onClick(){Et.state.isConnected?this.onDisconnect():this.onConnect()}onConnect(){this.loading=!0;const{enableNetworkView:t}=ar.state,{chains:e,selectedChain:r}=$e.state,n=e?.length&&e.length>1;t||n&&!r?lr.open({route:"SelectNetwork"}):lr.open({route:"ConnectWallet"})}onDisconnect(){Nt.client().disconnect(),Et.resetAccount()}render(){return ce`<w3m-button-big .disabled="${this.loading}" @click="${this.onClick}">${this.loading?ce`<w3m-spinner></w3m-spinner><w3m-text variant="medium-regular" color="accent">Connecting...</w3m-text>`:ce`${this.iconTemplate()}<w3m-text variant="medium-regular" color="inverse">${this.label}</w3m-text>`}</w3m-button-big>`}};Ji.styles=[He.globalCss,QI],Tc([wt()],Ji.prototype,"loading",2),Tc([We()],Ji.prototype,"label",2),Tc([We()],Ji.prototype,"icon",2),Ji=Tc([ke("w3m-connect-button")],Ji);var rS=Object.defineProperty,nS=Object.getOwnPropertyDescriptor,Hs=(t,e,r,n)=>{for(var i=n>1?void 0:n?nS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&rS(e,r,i),i};let di=class extends Re{constructor(){super(),this.isConnected=!1,this.label="Connect Wallet",this.icon="show",this.avatar="show",this.balance="hide",this.unsubscribeAccount=void 0,ye.rejectStandaloneButtonComponent(),this.isConnected=Et.state.isConnected,this.unsubscribeAccount=Et.subscribe(({isConnected:t})=>{this.isConnected=t})}disconnectedCallback(){var t;(t=this.unsubscribeAccount)==null||t.call(this)}render(){const{enableAccountView:t}=ar.state,e=kr(this.balance),r=kr(this.label),n=kr(this.icon),i=kr(this.avatar);return this.isConnected&&t?ce`<w3m-account-button balance="${e}" avatar="${i}"></w3m-account-button>`:ce`<w3m-connect-button label="${this.isConnected?"Disconnect":r}" icon="${n}"></w3m-connect-button>`}};Hs([wt()],di.prototype,"isConnected",2),Hs([We()],di.prototype,"label",2),Hs([We()],di.prototype,"icon",2),Hs([We()],di.prototype,"avatar",2),Hs([We()],di.prototype,"balance",2),di=Hs([ke("w3m-core-button")],di);const iS=Ge`.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.w3m-desktop-title,.w3m-mobile-title{display:flex;align-items:center}.w3m-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.w3m-desktop-title{margin-bottom:10px;padding:0 10px}.w3m-subtitle{display:flex;align-items:center}.w3m-subtitle:last-child path{fill:var(--w3m-color-fg-3)}.w3m-desktop-title svg,.w3m-mobile-title svg{margin-right:6px}.w3m-desktop-title path,.w3m-mobile-title path{fill:var(--w3m-accent-color)}`;var sS=Object.defineProperty,oS=Object.getOwnPropertyDescriptor,aS=(t,e,r,n)=>{for(var i=n>1?void 0:n?oS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&sS(e,r,i),i};let hf=class extends Re{onDesktopWallet(t){lt.push("DesktopConnector",{DesktopConnector:t})}onInjectedWallet(){lt.push("InjectedConnector")}onInstallConnector(){lt.push("InstallConnector",{InstallConnector:{id:"metaMask",name:"MetaMask",isMobile:!0,url:"https://metamask.io"}})}async onConnectorWallet(t){window.ethereum?t==="injected"||t===Fs.metaMask?this.onInjectedWallet():await ye.handleConnectorConnection(t):this.onInstallConnector()}desktopWalletsTemplate(){const{desktopWallets:t}=ar.state;return t?.map(({id:e,name:r,links:{universal:n,native:i}})=>ce`<w3m-wallet-button walletId="${e}" name="${r}" .onClick="${()=>this.onDesktopWallet({name:r,walletId:e,universal:n,native:i})}"></w3m-wallet-button>`)}previewWalletsTemplate(){let t=Tr.allowedExplorerListings(cr.state.previewWallets);return t=Tr.deduplicateExplorerListingsFromConnectors(t),t.map(({name:e,desktop:{universal:r,native:n},homepage:i,image_url:o,id:c})=>ce`<w3m-wallet-button src="${o.lg}" name="${e}" .onClick="${()=>this.onDesktopWallet({walletId:c,name:e,native:n,universal:r||i,icon:o.lg})}"></w3m-wallet-button>`)}connectorWalletsTemplate(){return Tr.connectorWallets().map(({id:t,name:e,ready:r})=>ce`<w3m-wallet-button .installed="${["injected","metaMask"].includes(t)&&r}" name="${e}" walletId="${t}" .onClick="${async()=>this.onConnectorWallet(t)}"></w3m-wallet-button>`)}recentWalletTemplate(){const t=ye.getRecentWallet();if(!t)return;const{id:e,name:r,links:n,image:i}=t;return ce`<w3m-wallet-button .recent="${!0}" name="${r}" walletId="${kr(e)}" src="${kr(i)}" .onClick="${()=>this.onDesktopWallet({name:r,walletId:e,universal:n?.universal,native:n?.native,icon:i})}"></w3m-wallet-button>`}render(){const{standaloneUri:t}=$e.state,e=this.desktopWalletsTemplate(),r=this.previewWalletsTemplate(),n=this.connectorWalletsTemplate(),i=this.recentWalletTemplate(),o=[...e??[],...r],c=[...n,...o],l=Tr.walletTemplatesWithRecent(c,i),h=Tr.walletTemplatesWithRecent(o,i),d=t?h:l,v=d.length>4;let E=[];v?E=d.slice(0,3):E=d;const _=!!E.length;return ce`<w3m-modal-header border="${!0}" title="Connect your wallet" .onAction="${ye.handleUriCopy}" .actionIcon="${Ze.COPY_ICON}"></w3m-modal-header><w3m-modal-content><div class="w3m-mobile-title"><div class="w3m-subtitle">${Ze.MOBILE_ICON}<w3m-text variant="small-regular" color="accent">Mobile</w3m-text></div><div class="w3m-subtitle">${Ze.SCAN_ICON}<w3m-text variant="small-regular" color="secondary">Scan with your wallet</w3m-text></div></div><w3m-walletconnect-qr></w3m-walletconnect-qr></w3m-modal-content>${_?ce`<w3m-modal-footer><div class="w3m-desktop-title">${Ze.DESKTOP_ICON}<w3m-text variant="small-regular" color="accent">Desktop</w3m-text></div><div class="w3m-grid">${E} ${v?ce`<w3m-view-all-wallets-button></w3m-view-all-wallets-button>`:null}</div></w3m-modal-footer>`:null}`}};hf.styles=[He.globalCss,iS],hf=aS([ke("w3m-desktop-wallet-selection")],hf);const cS=Ge`div{background-color:var(--w3m-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--w3m-color-bg-3);text-align:center}a{color:var(--w3m-accent-color);text-decoration:none;transition:opacity .2s ease-in-out}a:hover{opacity:.8}`;var lS=Object.defineProperty,uS=Object.getOwnPropertyDescriptor,hS=(t,e,r,n)=>{for(var i=n>1?void 0:n?uS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&lS(e,r,i),i};let ff=class extends Re{render(){const{termsOfServiceUrl:t,privacyPolicyUrl:e}=ar.state;return t??e?ce`<div><w3m-text variant="small-regular" color="secondary">By connecting your wallet to this app, you agree to the app's<br>${t?ce`<a href="${t}" target="_blank" rel="noopener noreferrer">Terms of Service</a>`:null} ${t&&e?"and":null} ${e?ce`<a href="${e}" target="_blank" rel="noopener noreferrer">Privacy Policy</a>`:null}</w3m-text></div>`:null}};ff.styles=[He.globalCss,cS],ff=hS([ke("w3m-legal-notice")],ff);const fS=Ge`.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;var dS=Object.defineProperty,pS=Object.getOwnPropertyDescriptor,gS=(t,e,r,n)=>{for(var i=n>1?void 0:n?pS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&dS(e,r,i),i};let df=class extends Re{onGoToQrcode(){lt.push("Qrcode")}async onConnectorWallet(t){await ye.handleConnectorConnection(t)}mobileWalletsTemplate(){const{mobileWallets:t}=ar.state,e=Tr.walletsWithInjected(t);if(e.length)return e.map(({id:r,name:n,links:{universal:i,native:o}})=>ce`<w3m-wallet-button name="${n}" walletId="${r}" .onClick="${async()=>ye.handleMobileLinking({links:{native:o,universal:i},name:n,id:r})}"></w3m-wallet-button>`)}previewWalletsTemplate(){const{previewWallets:t}=cr.state;let e=Tr.walletsWithInjected(t);return e=Tr.allowedExplorerListings(e),e=Tr.deduplicateExplorerListingsFromConnectors(e),e.map(({image_url:r,name:n,mobile:{native:i,universal:o},id:c})=>ce`<w3m-wallet-button name="${n}" src="${r.lg}" .onClick="${async()=>ye.handleMobileLinking({links:{native:i,universal:o},name:n,id:c,image:r.lg})}"></w3m-wallet-button>`)}connectorWalletsTemplate(){let t=Tr.connectorWallets();return window.ethereum||(t=t.filter(({id:e})=>e!=="injected"&&e!==Fs.metaMask)),t.map(({name:e,id:r,ready:n})=>ce`<w3m-wallet-button .installed="${["injected","metaMask"].includes(r)&&n}" name="${e}" walletId="${r}" .onClick="${async()=>this.onConnectorWallet(r)}"></w3m-wallet-button>`)}recentWalletTemplate(){const t=ye.getRecentWallet();if(!t)return;const{id:e,name:r,links:n,image:i}=t;return ce`<w3m-wallet-button .recent="${!0}" name="${r}" walletId="${kr(e)}" src="${kr(i)}" .onClick="${async()=>ye.handleMobileLinking({name:r,id:e,links:n,image:i})}"></w3m-wallet-button>`}render(){const{standaloneUri:t}=$e.state,e=this.connectorWalletsTemplate(),r=this.mobileWalletsTemplate(),n=this.previewWalletsTemplate(),i=this.recentWalletTemplate(),o=r??n,c=[...e,...o],l=Tr.walletTemplatesWithRecent(c,i),h=Tr.walletTemplatesWithRecent(o,i),d=t?h:l,v=d.length>8;let E=[];v?E=d.slice(0,7):E=d;const _=E.slice(0,4),S=E.slice(4,8),P=!!E.length;return ce`<w3m-modal-header title="Connect your wallet" .onAction="${this.onGoToQrcode}" .actionIcon="${Ze.QRCODE_ICON}"></w3m-modal-header>${P?ce`<w3m-modal-content><div class="w3m-grid">${_} ${S.length?ce`${S} ${v?ce`<w3m-view-all-wallets-button></w3m-view-all-wallets-button>`:null}`:null}</div></w3m-modal-content>`:null}`}};df.styles=[He.globalCss,fS],df=gS([ke("w3m-mobile-wallet-selection")],df);const mS=Ge`:host{all:initial}.w3m-overlay{inset:0;position:fixed;z-index:var(--w3m-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;background-color:rgba(0,0,0,.3);opacity:0;pointer-events:none}@media(max-height:720px) and (orientation:landscape){.w3m-overlay{overflow:scroll;align-items:flex-start}}.w3m-open{pointer-events:auto}.w3m-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--w3m-background-border-radius) var(--w3m-background-border-radius) var(--w3m-container-border-radius) var(--w3m-container-border-radius);border:1px solid var(--w3m-color-overlay);overflow:hidden}.w3m-card{width:100%;position:relative;border-radius:var(--w3m-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--w3m-color-overlay);background-color:var(--w3m-color-bg-1);color:var(--w3m-color-fg-1)}@media(max-width:600px){.w3m-container{max-width:440px;border-radius:var(--w3m-background-border-radius) var(--w3m-background-border-radius) 0 0}.w3m-card{border-radius:var(--w3m-container-border-radius) var(--w3m-container-border-radius) 0 0}.w3m-overlay{align-items:flex-end}}@media(max-width:440px){.w3m-container{border:0}}`;var wS=Object.defineProperty,vS=Object.getOwnPropertyDescriptor,V3=(t,e,r,n)=>{for(var i=n>1?void 0:n?vS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&wS(e,r,i),i};let sa=class extends Re{constructor(){super(),this.open=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=lr.subscribe(t=>{t.open?this.onOpenModalEvent():this.onCloseModalEvent()})}disconnectedCallback(){var t;(t=this.unsubscribeModal)==null||t.call(this)}get overlayEl(){return ye.getShadowRootElement(this,".w3m-overlay")}get containerEl(){return ye.getShadowRootElement(this,".w3m-container")}toggleBodyScroll(t){document.querySelector("body")&&(t?document.getElementById("w3m-styles")?.remove():document.head.insertAdjacentHTML("beforeend",'<style id="w3m-styles">html,body{touch-action:none;overflow:hidden;overscroll-behavior:contain;}</style>'))}onCloseModal(t){t.target===t.currentTarget&&lr.close()}async onOpenModalEvent(){this.toggleBodyScroll(!1);const t=.2;await li(this.containerEl,{y:0},{duration:0}).finished,li(this.overlayEl,{opacity:[0,1]},{duration:.2,delay:t}),li(this.containerEl,ye.isMobileAnimation()?{y:["50vh",0]}:{scale:[.98,1]},{scale:{easing:gc({velocity:.4})},y:{easing:gc({mass:.5})},delay:t}),this.addKeyboardEvents(),this.open=!0}async onCloseModalEvent(){this.toggleBodyScroll(!0),this.removeKeyboardEvents(),await Promise.all([li(this.containerEl,ye.isMobileAnimation()?{y:[0,"50vh"]}:{scale:[1,.98]},{scale:{easing:gc({velocity:0})},y:{easing:gc({mass:.5})}}).finished,li(this.overlayEl,{opacity:[1,0]},{duration:.2}).finished]),this.open=!1}addKeyboardEvents(){this.abortController=new AbortController,window.addEventListener("keydown",t=>{var e;t.key==="Escape"?lr.close():t.key==="Tab"&&((e=t.target)!=null&&e.tagName.includes("W3M-")||this.containerEl.focus())},this.abortController),this.containerEl.focus()}removeKeyboardEvents(){var t;(t=this.abortController)==null||t.abort(),this.abortController=void 0}managedModalContextTemplate(){const{isStandalone:t}=$e.state;return t?null:ce`<w3m-account-context></w3m-account-context><w3m-network-context></w3m-network-context>`}render(){const t={"w3m-overlay":!0,"w3m-open":this.open};return ce`<w3m-explorer-context></w3m-explorer-context><w3m-theme-context></w3m-theme-context>${this.managedModalContextTemplate()}<div id="w3m-modal" class="${Br(t)}" @click="${this.onCloseModal}" role="alertdialog" aria-modal="true"><div class="w3m-container" tabindex="0">${this.open?ce`<w3m-modal-backcard></w3m-modal-backcard><div class="w3m-card"><w3m-modal-router></w3m-modal-router><w3m-modal-toast></w3m-modal-toast></div>`:null}</div></div>`}};sa.styles=[He.globalCss,mS],V3([wt()],sa.prototype,"open",2),sa=V3([ke("w3m-modal")],sa);const yS=Ge`:host{all:initial}w3m-network-image{margin-left:-6px;margin-right:6px;width:28px;height:28px}`;var bS=Object.defineProperty,_S=Object.getOwnPropertyDescriptor,Rc=(t,e,r,n)=>{for(var i=n>1?void 0:n?_S(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&bS(e,r,i),i};let Xi=class extends Re{constructor(){super(),this.chainId="",this.label="",this.wrongNetwork=!1,this.unsubscribeNetwork=void 0,ye.rejectStandaloneButtonComponent();const{selectedChain:t}=$e.state;this.onSetChainData(t),this.unsubscribeNetwork=$e.subscribe(({selectedChain:e})=>{this.onSetChainData(e)})}disconnectedCallback(){var t;(t=this.unsubscribeNetwork)==null||t.call(this)}onSetChainData(t){if(t){const{chains:e}=$e.state,r=e?.map(n=>n.id);this.chainId=t.id.toString(),this.wrongNetwork=!(r!=null&&r.includes(t.id)),this.label=this.wrongNetwork?"Wrong Network":t.name}}onClick(){lr.open({route:"SelectNetwork"})}render(){var t;const{chains:e}=$e.state,r=e&&e.length>1;return ce`<w3m-button-big @click="${this.onClick}" ?disabled="${!r}"><w3m-network-image chainId="${kr(this.chainId)}"></w3m-network-image><w3m-text variant="medium-regular" color="inverse">${(t=this.label)!=null&&t.length?this.label:"Select Network"}</w3m-text></w3m-button-big>`}};Xi.styles=[He.globalCss,yS],Rc([wt()],Xi.prototype,"chainId",2),Rc([wt()],Xi.prototype,"label",2),Rc([wt()],Xi.prototype,"wrongNetwork",2),Xi=Rc([ke("w3m-network-switch")],Xi);const ES=Ge`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--w3m-button-hover-highlight-border-radius);transition:background-color .2s ease;height:100%;justify-content:flex-start}.w3m-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--w3m-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--w3m-color-bg-2);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay)}button:hover{background-color:var(--w3m-color-overlay)}.w3m-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--w3m-wallet-icon-border-radius)/ 2);border:1px solid var(--w3m-color-overlay)}.w3m-icons svg{width:21px;height:21px}.w3m-icons img:nth-child(1),.w3m-icons img:nth-child(2),.w3m-icons svg:nth-child(1),.w3m-icons svg:nth-child(2){margin-bottom:4px}w3m-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--w3m-color-bg-3)}#wallet-placeholder-dash{stroke:var(--w3m-color-overlay)}`;var xS=Object.defineProperty,CS=Object.getOwnPropertyDescriptor,IS=(t,e,r,n)=>{for(var i=n>1?void 0:n?CS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&xS(e,r,i),i};let pf=class extends Re{onClick(){lt.push("WalletExplorer")}render(){const{previewWallets:t}=cr.state,e=ye.getCustomWallets(),r=[...t,...e].reverse().slice(0,4);return ce`<button @click="${this.onClick}"><div class="w3m-icons">${r.map(n=>{var i;const o=(i=n.image_url)==null?void 0:i.lg;if(o)return ce`<img src="${o}">`;const c=ye.getWalletId(n.id),l=ye.getWalletIcon(c);return l?ce`<img src="${l}">`:Ze.WALLET_PLACEHOLDER})}</div><w3m-text variant="xsmall-regular">View All</w3m-text></button>`}};pf.styles=[He.globalCss,ES],pf=IS([ke("w3m-view-all-wallets-button")],pf);const SS=Ge`.w3m-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var DS=Object.defineProperty,OS=Object.getOwnPropertyDescriptor,K3=(t,e,r,n)=>{for(var i=n>1?void 0:n?OS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&DS(e,r,i),i};let Nc=class extends Re{constructor(){super(),this.uri="",this.createConnectionAndWait()}get overlayEl(){return ye.getShadowRootElement(this,".w3m-qr-container")}async createConnectionAndWait(t=0){var e;nt.removeWalletConnectDeepLink();try{const{standaloneUri:r}=$e.state;r?setTimeout(()=>this.uri=r,0):(await Nt.client().connectWalletConnect(n=>this.uri=n,(e=$e.state.selectedChain)==null?void 0:e.id),lr.close())}catch(r){console.error(r),xr.openToast("Connection request declined","error"),t<2&&this.createConnectionAndWait(t+1)}}render(){return ce`<div class="w3m-qr-container">${this.uri?ce`<w3m-qrcode size="${this.overlayEl.offsetWidth}" uri="${this.uri}"></w3m-qrcode>`:ce`<w3m-spinner></w3m-spinner>`}</div>`}};Nc.styles=[He.globalCss,SS],K3([wt()],Nc.prototype,"uri",2),Nc=K3([ke("w3m-walletconnect-qr")],Nc);const AS=Ge`.w3m-profile{display:flex;justify-content:space-between;align-items:flex-start;padding-top:20px}.w3m-connection-badge{background-color:var(--w3m-color-bg-2);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);padding:6px 10px 6px 26px;position:relative;border-radius:28px}.w3m-connection-badge::before{content:'';position:absolute;width:10px;height:10px;left:10px;background-color:var(--w3m-success-color);border-radius:50%;top:50%;margin-top:-5px;box-shadow:0 1px 4px 1px var(--w3m-success-color),inset 0 0 0 1px var(--w3m-color-overlay)}.w3m-footer{display:flex;justify-content:space-between}w3m-address-text{margin-top:10px;display:block}.w3m-balance{border-top:1px solid var(--w3m-color-bg-2);padding:11px 20px}`;var $S=Object.defineProperty,PS=Object.getOwnPropertyDescriptor,TS=(t,e,r,n)=>{for(var i=n>1?void 0:n?PS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&$S(e,r,i),i};let gf=class extends Re{onDisconnect(){lr.close(),Nt.client().disconnect(),Et.resetAccount()}async onCopyAddress(){var t;await navigator.clipboard.writeText((t=Et.state.address)!=null?t:""),xr.openToast("Address copied","success")}render(){return ce`<w3m-modal-content><div class="w3m-profile"><div class="w3m-info"><w3m-avatar size="medium"></w3m-avatar><w3m-address-text variant="modal"></w3m-address-text></div><div class="w3m-connection-badge"><w3m-text variant="small-regular" color="secondary">Connected</w3m-text></div></div></w3m-modal-content><div class="w3m-balance"><w3m-balance></w3m-balance></div><w3m-modal-footer><div class="w3m-footer"><w3m-account-network-button></w3m-account-network-button><w3m-box-button label="Copy Address" .onClick="${this.onCopyAddress}" .icon="${Ze.ACCOUNT_COPY}"></w3m-box-button><w3m-box-button label="Disconnect" .onClick="${this.onDisconnect}" .icon="${Ze.ACCOUNT_DISCONNECT}"></w3m-box-button></div></w3m-modal-footer>`}};gf.styles=[He.globalCss,AS],gf=TS([ke("w3m-account-view")],gf);var RS=Object.defineProperty,NS=Object.getOwnPropertyDescriptor,MS=(t,e,r,n)=>{for(var i=n>1?void 0:n?NS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&RS(e,r,i),i};let mf=class extends Re{viewTemplate(){return nt.isAndroid()?ce`<w3m-android-wallet-selection></w3m-android-wallet-selection>`:nt.isMobile()?ce`<w3m-mobile-wallet-selection></w3m-mobile-wallet-selection>`:ce`<w3m-desktop-wallet-selection></w3m-desktop-wallet-selection>`}render(){return ce`${this.viewTemplate()}<w3m-legal-notice></w3m-legal-notice>`}};mf.styles=[He.globalCss],mf=MS([ke("w3m-connect-wallet-view")],mf);const LS=Ge`.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}`;var jS=Object.defineProperty,US=Object.getOwnPropertyDescriptor,FS=(t,e,r,n)=>{for(var i=n>1?void 0:n?US(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&jS(e,r,i),i};let wf=class extends Re{async onConnectorWallet(t){await ye.handleConnectorConnection(t)}connectorWalletsTemplate(){let t=Tr.connectorWallets();return window.ethereum||(t=t.filter(({id:e})=>e!=="injected"&&e!==Fs.metaMask)),t.map(({name:e,id:r,ready:n})=>ce`<w3m-wallet-button .installed="${["injected","metaMask"].includes(r)&&n}" name="${e}" walletId="${r}" .onClick="${async()=>this.onConnectorWallet(r)}"></w3m-wallet-button>`)}render(){const t=this.connectorWalletsTemplate();return ce`<w3m-modal-header title="Other wallets"></w3m-modal-header><w3m-modal-content><div class="w3m-grid">${t}</div></w3m-modal-content>`}};wf.styles=[He.globalCss,LS],wf=FS([ke("w3m-connectors-view")],wf);const BS=Ge`.w3m-wrapper{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:1/1;flex-direction:column}.w3m-connecting-title{display:flex;align-items:center;justify-content:center;margin-bottom:16px}w3m-spinner{margin-right:10px}w3m-wallet-image{border-radius:var(--w3m-wallet-icon-border-radius);width:25%;aspect-ratio:1/1;margin-bottom:20px}.w3m-install-actions{display:flex}.w3m-install-actions w3m-button{margin:0 5px;opacity:1}`;var kS=Object.defineProperty,HS=Object.getOwnPropertyDescriptor,G3=(t,e,r,n)=>{for(var i=n>1?void 0:n?HS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&kS(e,r,i),i};let Mc=class extends Re{constructor(){super(),this.uri="",this.createConnectionAndWait()}getRouterData(){var t;const e=(t=lt.state.data)==null?void 0:t.DesktopConnector;if(!e)throw new Error("Missing router data");return e}onFormatAndRedirect(t){const{native:e,universal:r,name:n}=this.getRouterData();if(e){const i=nt.formatNativeUrl(e,t,n);nt.openHref(i,"_self")}else if(r){const i=nt.formatUniversalUrl(r,t,n);nt.openHref(i,"_blank")}}async createConnectionAndWait(t=0){var e;nt.removeWalletConnectDeepLink();const{standaloneUri:r}=$e.state,{name:n,walletId:i,native:o,universal:c,icon:l}=this.getRouterData(),h={name:n,id:i,links:{native:o,universal:c},image:l};if(r)ye.setRecentWallet(h),this.onFormatAndRedirect(r);else try{await Nt.client().connectWalletConnect(d=>{this.uri=d,this.onFormatAndRedirect(d)},(e=$e.state.selectedChain)==null?void 0:e.id),ye.setRecentWallet(h),lr.close()}catch{xr.openToast("Connection request declined","error"),t<2&&this.createConnectionAndWait(t+1)}}onConnectWithMobile(){lt.push("Qrcode")}onGoToWallet(){const{universal:t,name:e}=this.getRouterData();if(t){const r=nt.formatUniversalUrl(t,this.uri,e);nt.openHref(r,"_blank")}}render(){const{name:t,icon:e,universal:r,walletId:n}=this.getRouterData(),i=ye.getWalletName(t);return ce`<w3m-modal-header title="${i}"></w3m-modal-header><w3m-modal-content><div class="w3m-wrapper">${e?ce`<w3m-wallet-image src="${e}" size="lg"></w3m-wallet-image>`:ce`<w3m-wallet-image size="lg" walletid="${kr(n)}"></w3m-wallet-image>`}<div class="w3m-connecting-title"><w3m-spinner></w3m-spinner><w3m-text variant="big-bold" color="secondary">${`Continue in ${i}...`}</w3m-text></div><div class="w3m-install-actions"><w3m-button .onClick="${async()=>this.createConnectionAndWait()}" .iconRight="${Ze.RETRY_ICON}">Retry</w3m-button>${r?ce`<w3m-button .onClick="${this.onGoToWallet.bind(this)}" .iconLeft="${Ze.ARROW_UP_RIGHT_ICON}">Go to Wallet</w3m-button>`:ce`<w3m-button .onClick="${this.onConnectWithMobile}" .iconLeft="${Ze.MOBILE_ICON}">Connect with Mobile</w3m-button>`}</div></div></w3m-modal-content>`}};Mc.styles=[He.globalCss,BS],G3([wt()],Mc.prototype,"uri",2),Mc=G3([ke("w3m-desktop-connector-view")],Mc);const zS=Ge`.w3m-info-text{margin:5px 0 15px;max-width:320px;text-align:center}.w3m-wallet-item{margin:0 -20px 0 0;padding-right:20px;display:flex;align-items:center;border-bottom:1px solid var(--w3m-color-bg-2)}.w3m-wallet-item:last-child{margin-bottom:-20px;border-bottom:0}.w3m-wallet-content{margin-left:20px;height:60px;display:flex;flex:1;align-items:center;justify-content:space-between}.w3m-footer-actions{display:flex;flex-direction:column;align-items:center;padding:20px 0;border-top:1px solid var(--w3m-color-bg-2)}w3m-wallet-image{display:block;width:40px;height:40px;border-radius:10px}`;var WS=Object.defineProperty,qS=Object.getOwnPropertyDescriptor,VS=(t,e,r,n)=>{for(var i=n>1?void 0:n?qS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&WS(e,r,i),i};let vf=class extends Re{onGet(t){nt.openHref(t,"_blank")}render(){const{recomendedWallets:t}=cr.state,e=ye.getCustomWallets().slice(0,6),r=t.length,n=e.length;return ce`<w3m-modal-header title="Get a wallet"></w3m-modal-header><w3m-modal-content>${r?t.map(({name:i,image_url:o,homepage:c})=>ce`<div class="w3m-wallet-item"><w3m-wallet-image src="${o.lg}"></w3m-wallet-image><div class="w3m-wallet-content"><w3m-text variant="medium-regular">${i}</w3m-text><w3m-button .iconRight="${Ze.ARROW_RIGHT_ICON}" .onClick="${()=>this.onGet(c)}">Get</w3m-button></div></div>`):null} ${n?e.map(({name:i,id:o,links:c})=>ce`<div class="w3m-wallet-item"><w3m-wallet-image walletId="${o}"></w3m-wallet-image><div class="w3m-wallet-content"><w3m-text variant="medium-regular">${i}</w3m-text><w3m-button .iconRight="${Ze.ARROW_RIGHT_ICON}" .onClick="${()=>this.onGet(c.universal)}">Get</w3m-button></div></div>`):null}</w3m-modal-content><div class="w3m-footer-actions"><w3m-text variant="medium-regular">Not what you're looking for?</w3m-text><w3m-text variant="small-thin" color="secondary" class="w3m-info-text">With hundreds of wallets out there, there's something for everyone</w3m-text><w3m-button .onClick="${ye.openWalletExplorerUrl}" .iconRight="${Ze.ARROW_UP_RIGHT_ICON}">Explore Wallets</w3m-button></div>`}};vf.styles=[He.globalCss,zS],vf=VS([ke("w3m-get-wallet-view")],vf);const KS=Ge`.w3m-footer-actions{display:flex;justify-content:center}.w3m-footer-actions w3m-button{margin:0 5px}.w3m-info-container{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-bottom:20px}.w3m-info-container:last-child{margin-bottom:0}.w3m-info-text{margin-top:5px;text-align:center}.w3m-images svg{margin:0 2px 5px;width:55px;height:55px}.help-img-highlight{stroke:var(--w3m-color-overlay)}`;var GS=Object.defineProperty,ZS=Object.getOwnPropertyDescriptor,YS=(t,e,r,n)=>{for(var i=n>1?void 0:n?ZS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&GS(e,r,i),i};let yf=class extends Re{constructor(){super(...arguments),this.learnUrl="https://ethereum.org/en/wallets/"}onGet(){ar.state.enableExplorer?lt.push("GetWallet"):ye.openWalletExplorerUrl()}onLearnMore(){nt.openHref(this.learnUrl,"_blank")}render(){return ce`<w3m-modal-header title="What is a wallet?"></w3m-modal-header><w3m-modal-content><div class="w3m-info-container"><div class="w3m-images">${Ze.HELP_CHART_IMG} ${Ze.HELP_PAINTING_IMG} ${Ze.HELP_ETH_IMG}</div><w3m-text variant="medium-regular">A home for your digital assets</w3m-text><w3m-text variant="small-thin" color="secondary" class="w3m-info-text">A wallet lets you store, send and receive digital assets like cryptocurrencies and NFTs.</w3m-text></div><div class="w3m-info-container"><div class="w3m-images">${Ze.HELP_KEY_IMG} ${Ze.HELP_USER_IMG} ${Ze.HELP_LOCK_IMG}</div><w3m-text variant="medium-regular">One login for all of web3</w3m-text><w3m-text variant="small-thin" color="secondary" class="w3m-info-text">Log in to any app by connecting your wallet. Say goodbye to countless passwords!</w3m-text></div><div class="w3m-info-container"><div class="w3m-images">${Ze.HELP_COMPAS_IMG} ${Ze.HELP_NOUN_IMG} ${Ze.HELP_DAO_IMG}</div><w3m-text variant="medium-regular">Your gateway to a new web</w3m-text><w3m-text variant="small-thin" color="secondary" class="w3m-info-text">With your wallet, you can explore and interact with DeFi, NFTs, DAOs, and much more.</w3m-text></div><div class="w3m-footer-actions"><w3m-button .onClick="${this.onGet.bind(this)}" .iconLeft="${Ze.WALLET_ICON}">Get a Wallet</w3m-button><w3m-button .onClick="${this.onLearnMore.bind(this)}" .iconRight="${Ze.ARROW_UP_RIGHT_ICON}">Learn More</w3m-button></div></w3m-modal-content>`}};yf.styles=[He.globalCss,KS],yf=YS([ke("w3m-help-view")],yf);const JS=Ge`.w3m-injected-wrapper{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:1/1;flex-direction:column}.w3m-connecting-title{display:flex;align-items:center;justify-content:center;margin-bottom:20px}w3m-spinner{margin-right:10px}w3m-wallet-image{border-radius:var(--w3m-wallet-icon-border-radius);width:25%;aspect-ratio:1/1;margin-bottom:20px}w3m-button{opacity:0}.w3m-injected-error w3m-button{opacity:1}`;var XS=Object.defineProperty,QS=Object.getOwnPropertyDescriptor,bf=(t,e,r,n)=>{for(var i=n>1?void 0:n?QS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&XS(e,r,i),i};let oa=class extends Re{constructor(){super(),this.connecting=!0,this.error=!1,this.connector=Nt.client().getConnectorById("injected"),this.onConnect()}async onConnect(){const{ready:t}=this.connector;t&&(this.error=!1,this.connecting=!0,await ye.handleConnectorConnection("injected",()=>{this.error=!0,this.connecting=!1}))}render(){const t=ye.getWalletName(this.connector.name),e=ye.getWalletId(this.connector.id),r={"w3m-injected-wrapper":!0,"w3m-injected-error":this.error};return ce`<w3m-modal-header title="${t}"></w3m-modal-header><w3m-modal-content><div class="${Br(r)}"><w3m-wallet-image walletId="${e}" size="lg"></w3m-wallet-image><div class="w3m-connecting-title">${this.connecting?ce`<w3m-spinner></w3m-spinner>`:null}<w3m-text variant="big-bold" color="${this.error?"error":"secondary"}">${this.error?"Connection declined":`Continue in ${t}...`}</w3m-text></div><w3m-button .onClick="${this.onConnect.bind(this)}" .disabled="${!this.error}" .iconRight="${Ze.RETRY_ICON}">Try Again</w3m-button></div></w3m-modal-content>`}};oa.styles=[He.globalCss,JS],bf([wt()],oa.prototype,"connecting",2),bf([wt()],oa.prototype,"error",2),oa=bf([ke("w3m-injected-connector-view")],oa);const eD=Ge`.w3m-injected-wrapper{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:1/1;flex-direction:column}.w3m-connecting-title{display:flex;align-items:center;justify-content:center;margin-bottom:16px}.w3m-install-title{display:flex;align-items:center;justify-content:center;flex-direction:column}.w3m-install-title w3m-text:last-child{margin-top:10px;max-width:240px}.w3m-install-actions{display:flex;margin-top:15px;align-items:center;flex-direction:column}@media(max-width:355px){.w3m-install-actions{flex-direction:column;align-items:center}}w3m-wallet-image{border-radius:15px;width:25%;aspect-ratio:1/1;margin-bottom:20px}w3m-button{opacity:0}.w3m-install-actions w3m-button{margin:5px;opacity:1}.w3m-info-text{text-align:center}`;var tD=Object.defineProperty,rD=Object.getOwnPropertyDescriptor,nD=(t,e,r,n)=>{for(var i=n>1?void 0:n?rD(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&tD(e,r,i),i};let _f=class extends Re{getRouterData(){var t;const e=(t=lt.state.data)==null?void 0:t.InstallConnector;if(!e)throw new Error("Missing router data");return e}onInstall(){const{url:t}=this.getRouterData();nt.openHref(t,"_blank")}onMobile(){const{name:t}=this.getRouterData();lt.push("ConnectWallet"),xr.openToast(`Scan the code with ${t}`,"success")}render(){const{name:t,id:e,isMobile:r}=this.getRouterData();return ce`<w3m-modal-header title="${t}"></w3m-modal-header><w3m-modal-content><div class="w3m-injected-wrapper"><w3m-wallet-image walletId="${e}" size="lg"></w3m-wallet-image><div class="w3m-install-title"><w3m-text variant="big-bold">Install ${t}</w3m-text><w3m-text color="secondary" variant="small-thin" class="w3m-info-text">To connect ${t}, install the browser extension.</w3m-text></div><div class="w3m-install-actions"><w3m-button .onClick="${this.onInstall.bind(this)}" .iconLeft="${Ze.ARROW_DOWN_ICON}">Install Extension</w3m-button>${r?ce`<w3m-button .onClick="${this.onMobile.bind(this)}" .iconLeft="${Ze.MOBILE_ICON}">${t} Mobile</w3m-button>`:null}</div></div></w3m-modal-content>`}};_f.styles=[He.globalCss,eD],_f=nD([ke("w3m-install-connector-view")],_f);var iD=Object.defineProperty,sD=Object.getOwnPropertyDescriptor,oD=(t,e,r,n)=>{for(var i=n>1?void 0:n?sD(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&iD(e,r,i),i};let Ef=class extends Re{render(){return ce`<w3m-modal-header title="Scan the code" .onAction="${ye.handleUriCopy}" .actionIcon="${Ze.COPY_ICON}"></w3m-modal-header><w3m-modal-content><w3m-walletconnect-qr></w3m-walletconnect-qr></w3m-modal-content>`}};Ef.styles=[He.globalCss],Ef=oD([ke("w3m-qrcode-view")],Ef);const aD=Ge`.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);margin:-5px -10px;justify-content:space-between}`;var cD=Object.defineProperty,lD=Object.getOwnPropertyDescriptor,uD=(t,e,r,n)=>{for(var i=n>1?void 0:n?lD(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&cD(e,r,i),i};let xf=class extends Re{async onSelectChain(t){try{const{selectedChain:e,walletConnectVersion:r}=$e.state,{isConnected:n}=Et.state;n?e?.id===t.id?lt.replace("Account"):r===2?(await Nt.client().switchNetwork({chainId:t.id}),lt.replace("Account")):lt.push("SwitchNetwork",{SwitchNetwork:t}):(lt.push("ConnectWallet"),$e.setSelectedChain(t))}catch(e){console.error(e),xr.openToast(ye.getErrorMessage(e),"error")}}render(){const{chains:t}=$e.state;return ce`<w3m-modal-header title="Select network"></w3m-modal-header><w3m-modal-content><div class="w3m-grid">${t?.map(e=>ce`<w3m-network-button name="${e.name}" chainId="${e.id}" .onClick="${async()=>this.onSelectChain(e)}">${e.name}</w3m-network-button>`)}</div></w3m-modal-content>`}};xf.styles=[He.globalCss,aD],xf=uD([ke("w3m-select-network-view")],xf);const hD=Ge`.w3m-wrapper{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:1/1;flex-direction:column}.w3m-connecting-title{display:flex;align-items:center;justify-content:center;margin-bottom:16px}w3m-spinner{margin-right:10px}w3m-network-image{width:96px;height:96px;margin-bottom:20px}w3m-button{opacity:0}.w3m-error w3m-button{opacity:1}`;var fD=Object.defineProperty,dD=Object.getOwnPropertyDescriptor,Z3=(t,e,r,n)=>{for(var i=n>1?void 0:n?dD(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&fD(e,r,i),i};let Lc=class extends Re{constructor(){super(),this.error=!1,this.onSwitchNetwork()}getRouterData(){var t;const e=(t=lt.state.data)==null?void 0:t.SwitchNetwork;if(!e)throw new Error("Missing router data");return e}async onSwitchNetwork(){try{this.error=!1;const t=this.getRouterData();await Nt.client().switchNetwork({chainId:t.id}),$e.setSelectedChain(t),lt.replace("Account")}catch{this.error=!0}}render(){const{id:t,name:e}=this.getRouterData(),r={"w3m-wrapper":!0,"w3m-error":this.error};return ce`<w3m-modal-header title="${`Connect to ${e}`}"></w3m-modal-header><w3m-modal-content><div class="${Br(r)}"><w3m-network-image chainId="${t}"></w3m-network-image><div class="w3m-connecting-title">${this.error?null:ce`<w3m-spinner></w3m-spinner>`}<w3m-text variant="big-bold" color="${this.error?"error":"secondary"}">${this.error?"Connection declined":"Approve in your wallet"}</w3m-text></div><w3m-button .onClick="${this.onSwitchNetwork.bind(this)}" .disabled="${!this.error}" .iconRight="${Ze.RETRY_ICON}">Try Again</w3m-button></div></w3m-modal-content>`}};Lc.styles=[He.globalCss,hD],Z3([wt()],Lc.prototype,"error",2),Lc=Z3([ke("w3m-switch-network-view")],Lc);const pD=Ge`w3m-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}w3m-modal-content::after,w3m-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}w3m-modal-content::before{box-shadow:0 -1px 0 0 var(--w3m-color-bg-1);background:linear-gradient(var(--w3m-color-bg-1),rgba(255,255,255,0))}w3m-modal-content::after{box-shadow:0 1px 0 0 var(--w3m-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--w3m-color-bg-1));top:calc(100% - 20px)}w3m-modal-content::-webkit-scrollbar{display:none}.w3m-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.w3m-empty,.w3m-loading{display:flex}.w3m-loading .w3m-placeholder-block{height:100%}.w3m-end-reached .w3m-placeholder-block{height:0;opacity:0}.w3m-empty .w3m-placeholder-block{opacity:1;height:100%}w3m-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;var gD=Object.defineProperty,mD=Object.getOwnPropertyDescriptor,aa=(t,e,r,n)=>{for(var i=n>1?void 0:n?mD(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&gD(e,r,i),i};const Cf=40;let Qi=class extends Re{constructor(){super(...arguments),this.loading=!cr.state.wallets.listings.length,this.firstFetch=!cr.state.wallets.listings.length,this.search="",this.endReached=!1,this.intersectionObserver=void 0,this.searchDebounce=ye.debounce(t=>{t.length>=3?(this.firstFetch=!0,this.endReached=!1,this.search=t,cr.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),cr.resetSearch())})}firstUpdated(){this.createPaginationObserver()}disconnectedCallback(){var t;(t=this.intersectionObserver)==null||t.disconnect()}get placeholderEl(){return ye.getShadowRootElement(this,".w3m-placeholder-block")}createPaginationObserver(){this.intersectionObserver=new IntersectionObserver(([t])=>{t.isIntersecting&&!(this.search&&this.firstFetch)&&this.fetchWallets()}),this.intersectionObserver.observe(this.placeholderEl)}isLastPage(){const{wallets:t,search:e}=cr.state,{listings:r,total:n}=this.search?e:t;return n<=Cf||r.length>=n}async fetchWallets(){var t;const{wallets:e,search:r}=cr.state,n=ye.getExtensionWallets(),{listings:i,total:o,page:c}=this.search?r:e;if(!this.endReached&&(this.firstFetch||o>Cf&&i.length<o))try{this.loading=!0;const l=(t=$e.state.standaloneChains)==null?void 0:t.join(","),{listings:h}=await cr.getPaginatedWallets({page:this.firstFetch?1:c+1,entries:Cf,device:nt.isMobile()?"mobile":"desktop",search:this.search,version:$e.state.walletConnectVersion,chains:l}),d=h.map(({image_url:E})=>E.lg),v=n.map(({id:E})=>ye.getWalletIcon(E));await Promise.all([...d.map(async E=>ye.preloadImage(E)),...v.map(async E=>ye.preloadImage(E)),nt.wait(300)]),this.endReached=this.isLastPage()}catch(l){console.error(l),xr.openToast(ye.getErrorMessage(l),"error")}finally{this.loading=!1,this.firstFetch=!1}}onConnectCustom({name:t,id:e,links:r}){nt.isMobile()?ye.handleMobileLinking({links:r,name:t,id:e}):lt.push("DesktopConnector",{DesktopConnector:{name:t,walletId:e,universal:r.universal,native:r.native}})}onConnectListing(t){if(nt.isMobile()){const{id:e,image_url:r}=t,{native:n,universal:i}=t.mobile;ye.handleMobileLinking({links:{native:n,universal:i},name:t.name,id:e,image:r.lg})}else lt.push("DesktopConnector",{DesktopConnector:{name:t.name,icon:t.image_url.lg,universal:t.desktop.universal||t.homepage,native:t.desktop.native}})}onConnectExtension(t){ye.getWalletId("")===t.id?lt.push("InjectedConnector"):lt.push("InstallConnector",{InstallConnector:t})}onSearchChange(t){const{value:e}=t.target;this.searchDebounce(e)}render(){const{wallets:t,search:e}=cr.state,{isStandalone:r}=$e.state;let{listings:n}=this.search?e:t;n=Tr.allowedExplorerListings(n);const i=this.loading&&!n.length,o=this.search.length>=3;let c=!r&&!nt.isMobile()?ye.getExtensionWallets():[],l=ye.getCustomWallets();o&&(c=c.filter(({name:E})=>ye.caseSafeIncludes(E,this.search)),l=l.filter(({name:E})=>ye.caseSafeIncludes(E,this.search)));const h=!this.loading&&!n.length&&!c.length,d=Math.max(c.length,n.length),v={"w3m-loading":i,"w3m-end-reached":this.endReached||!this.loading,"w3m-empty":h};return ce`<w3m-modal-header><w3m-search-input .onChange="${this.onSearchChange.bind(this)}"></w3m-search-input></w3m-modal-header><w3m-modal-content class="${Br(v)}"><div class="w3m-grid">${i?null:[...Array(d)].map((E,_)=>ce`${l[_]?ce`<w3m-wallet-button name="${l[_].name}" walletId="${l[_].id}" .onClick="${()=>this.onConnectCustom(l[_])}"></w3m-wallet-button>`:null} ${c[_]?ce`<w3m-wallet-button name="${c[_].name}" walletId="${c[_].id}" .onClick="${()=>this.onConnectExtension(c[_])}"></w3m-wallet-button>`:null} ${n[_]?ce`<w3m-wallet-button src="${n[_].image_url.lg}" name="${n[_].name}" walletId="${n[_].id}" .onClick="${()=>this.onConnectListing(n[_])}"></w3m-wallet-button>`:null}`)}</div><div class="w3m-placeholder-block">${h?ce`<w3m-text variant="big-bold" color="secondary">No results found</w3m-text>`:null} ${!h&&this.loading?ce`<w3m-spinner></w3m-spinner>`:null}</div></w3m-modal-content>`}};Qi.styles=[He.globalCss,pD],aa([wt()],Qi.prototype,"loading",2),aa([wt()],Qi.prototype,"firstFetch",2),aa([wt()],Qi.prototype,"search",2),aa([wt()],Qi.prototype,"endReached",2),Qi=aa([ke("w3m-wallet-explorer-view")],Qi);var wD=Object.freeze({__proto__:null,get W3mAccountButton(){return ks},get W3mConnectButton(){return Ji},get W3mCoreButton(){return di},get W3mModal(){return sa},get W3mNetworkSwitch(){return Xi}});wn.EthereumProvider=N7,wn.OPTIONAL_EVENTS=D7,wn.OPTIONAL_METHODS=S7,wn.REQUIRED_EVENTS=ec,wn.REQUIRED_METHODS=Qa,wn.default=tc,Object.defineProperty(wn,"__esModule",{value:!0})});
|
|
151
|
+
`);const c=pC(e,r,i),l=Ac.getSymbolSize(e),h=new nC(l);return lC(h,e),uC(h),hC(h,e),nf(h,r,0),e>=7&&fC(h,e),dC(h,c),isNaN(n)&&(n=ef.getBestMask(h,nf.bind(null,h,r))),ef.applyMask(n,h),nf(h,r,n),{modules:h,version:e,errorCorrectionLevel:r,maskPattern:n,segments:i}}C3.create=function(e,r){if(typeof e>"u"||e==="")throw new Error("No input text");let n=Qh.M,i,o;return typeof r<"u"&&(n=Qh.from(r.errorCorrectionLevel,Qh.M),i=$c.from(r.version),o=ef.from(r.maskPattern),r.toSJISFunc&&Ac.setToSJISFunction(r.toSJISFunc)),mC(e,i,n,o)};var F3={},sf={};(function(t){function e(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let n=r.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+r);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(o){return[o,o]}))),n.length===6&&n.push("F","F");const i=parseInt(n.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+n.slice(0,6).join("")}}t.getOptions=function(n){n||(n={}),n.color||(n.color={});const i=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,o=n.width&&n.width>=21?n.width:void 0,c=n.scale||4;return{width:o,scale:o?4:c,margin:i,color:{dark:e(n.color.dark||"#000000ff"),light:e(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},t.getScale=function(n,i){return i.width&&i.width>=n+i.margin*2?i.width/(n+i.margin*2):i.scale},t.getImageWidth=function(n,i){const o=t.getScale(n,i);return Math.floor((n+i.margin*2)*o)},t.qrToImageData=function(n,i,o){const c=i.modules.size,l=i.modules.data,h=t.getScale(c,o),d=Math.floor((c+o.margin*2)*h),v=o.margin*h,E=[o.color.light,o.color.dark];for(let _=0;_<d;_++)for(let O=0;O<d;O++){let P=(_*d+O)*4,U=o.color.light;if(_>=v&&O>=v&&_<d-v&&O<d-v){const H=Math.floor((_-v)/h),G=Math.floor((O-v)/h);U=E[l[H*c+G]?1:0]}n[P++]=U.r,n[P++]=U.g,n[P++]=U.b,n[P]=U.a}}})(sf),function(t){const e=sf;function r(i,o,c){i.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=c,o.width=c,o.style.height=c+"px",o.style.width=c+"px"}function n(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(o,c,l){let h=l,d=c;typeof h>"u"&&(!c||!c.getContext)&&(h=c,c=void 0),c||(d=n()),h=e.getOptions(h);const v=e.getImageWidth(o.modules.size,h),E=d.getContext("2d"),_=E.createImageData(v,v);return e.qrToImageData(_.data,o,h),r(E,d,v),E.putImageData(_,0,0),d},t.renderToDataURL=function(o,c,l){let h=l;typeof h>"u"&&(!c||!c.getContext)&&(h=c,c=void 0),h||(h={});const d=t.render(o,c,h),v=h.type||"image/png",E=h.rendererOpts||{};return d.toDataURL(v,E.quality)}}(F3);var B3={};const wC=sf;function k3(t,e){const r=t.a/255,n=e+'="'+t.hex+'"';return r<1?n+" "+e+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function of(t,e,r){let n=t+e;return typeof r<"u"&&(n+=" "+r),n}function vC(t,e,r){let n="",i=0,o=!1,c=0;for(let l=0;l<t.length;l++){const h=Math.floor(l%e),d=Math.floor(l/e);!h&&!o&&(o=!0),t[l]?(c++,l>0&&h>0&&t[l-1]||(n+=o?of("M",h+r,.5+d+r):of("m",i,0),i=0,o=!1),h+1<e&&t[l+1]||(n+=of("h",c),c=0)):i++}return n}B3.render=function(e,r,n){const i=wC.getOptions(r),o=e.modules.size,c=e.modules.data,l=o+i.margin*2,h=i.color.light.a?"<path "+k3(i.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",d="<path "+k3(i.color.dark,"stroke")+' d="'+vC(c,o,i.margin)+'"/>',v='viewBox="0 0 '+l+" "+l+'"',_='<svg xmlns="http://www.w3.org/2000/svg" '+(i.width?'width="'+i.width+'" height="'+i.width+'" ':"")+v+' shape-rendering="crispEdges">'+h+d+`</svg>
|
|
152
|
+
`;return typeof n=="function"&&n(null,_),_};const yC=R9,af=C3,H3=F3,bC=B3;function cf(t,e,r,n,i){const o=[].slice.call(arguments,1),c=o.length,l=typeof o[c-1]=="function";if(!l&&!yC())throw new Error("Callback required as last argument");if(l){if(c<2)throw new Error("Too few arguments provided");c===2?(i=r,r=e,e=n=void 0):c===3&&(e.getContext&&typeof i>"u"?(i=n,n=void 0):(i=n,n=r,r=e,e=void 0))}else{if(c<1)throw new Error("Too few arguments provided");return c===1?(r=e,e=n=void 0):c===2&&!e.getContext&&(n=r,r=e,e=void 0),new Promise(function(h,d){try{const v=af.create(r,n);h(t(v,e,n))}catch(v){d(v)}})}try{const h=af.create(r,n);i(null,t(h,e,n))}catch(h){i(h)}}ta.create=af.create,ta.toCanvas=cf.bind(null,H3.render),ta.toDataURL=cf.bind(null,H3.renderToDataURL),ta.toString=cf.bind(null,function(t,e,r){return bC.render(t,r)});var _C=Object.defineProperty,z3=Object.getOwnPropertySymbols,EC=Object.prototype.hasOwnProperty,xC=Object.prototype.propertyIsEnumerable,W3=(t,e,r)=>e in t?_C(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Pc=(t,e)=>{for(var r in e||(e={}))EC.call(e,r)&&W3(t,r,e[r]);if(z3)for(var r of z3(e))xC.call(e,r)&&W3(t,r,e[r]);return t};function CC(){var t;const e=(t=Nn.state.themeMode)!=null?t:"dark",r={light:{foreground:{1:"rgb(20,20,20)",2:"rgb(121,134,134)",3:"rgb(158,169,169)"},background:{1:"rgb(255,255,255)",2:"rgb(241,243,243)",3:"rgb(228,231,231)"},overlay:"rgba(0,0,0,0.1)"},dark:{foreground:{1:"rgb(228,231,231)",2:"rgb(148,158,158)",3:"rgb(110,119,119)"},background:{1:"rgb(20,20,20)",2:"rgb(39,42,42)",3:"rgb(59,64,64)"},overlay:"rgba(255,255,255,0.1)"}}[e];return{"--w3m-color-fg-1":r.foreground[1],"--w3m-color-fg-2":r.foreground[2],"--w3m-color-fg-3":r.foreground[3],"--w3m-color-bg-1":r.background[1],"--w3m-color-bg-2":r.background[2],"--w3m-color-bg-3":r.background[3],"--w3m-color-overlay":r.overlay}}function q3(){return{"--w3m-accent-color":"#3396FF","--w3m-accent-fill-color":"#FFFFFF","--w3m-z-index":"89","--w3m-background-color":"#3396FF","--w3m-background-border-radius":"8px","--w3m-container-border-radius":"30px","--w3m-wallet-icon-border-radius":"15px","--w3m-wallet-icon-large-border-radius":"30px","--w3m-wallet-icon-small-border-radius":"7px","--w3m-input-border-radius":"28px","--w3m-button-border-radius":"10px","--w3m-notification-border-radius":"36px","--w3m-secondary-button-border-radius":"28px","--w3m-icon-button-border-radius":"50%","--w3m-button-hover-highlight-border-radius":"10px","--w3m-text-big-bold-size":"20px","--w3m-text-big-bold-weight":"600","--w3m-text-big-bold-line-height":"24px","--w3m-text-big-bold-letter-spacing":"-0.03em","--w3m-text-big-bold-text-transform":"none","--w3m-text-xsmall-bold-size":"10px","--w3m-text-xsmall-bold-weight":"700","--w3m-text-xsmall-bold-line-height":"12px","--w3m-text-xsmall-bold-letter-spacing":"0.02em","--w3m-text-xsmall-bold-text-transform":"uppercase","--w3m-text-xsmall-regular-size":"12px","--w3m-text-xsmall-regular-weight":"600","--w3m-text-xsmall-regular-line-height":"14px","--w3m-text-xsmall-regular-letter-spacing":"-0.03em","--w3m-text-xsmall-regular-text-transform":"none","--w3m-text-small-thin-size":"14px","--w3m-text-small-thin-weight":"500","--w3m-text-small-thin-line-height":"16px","--w3m-text-small-thin-letter-spacing":"-0.03em","--w3m-text-small-thin-text-transform":"none","--w3m-text-small-regular-size":"14px","--w3m-text-small-regular-weight":"600","--w3m-text-small-regular-line-height":"16px","--w3m-text-small-regular-letter-spacing":"-0.03em","--w3m-text-small-regular-text-transform":"none","--w3m-text-medium-regular-size":"16px","--w3m-text-medium-regular-weight":"600","--w3m-text-medium-regular-line-height":"20px","--w3m-text-medium-regular-letter-spacing":"-0.03em","--w3m-text-medium-regular-text-transform":"none","--w3m-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--w3m-success-color":"rgb(38,181,98)","--w3m-error-color":"rgb(242, 90, 103)"}}function IC(){const{themeVariables:t}=Nn.state;return{"--w3m-background-image-url":t!=null&&t["--w3m-background-image-url"]?`url(${t["--w3m-background-image-url"]})`:"none"}}const je={getPreset(t){return q3()[t]},setTheme(){const t=document.querySelector(":root"),{themeVariables:e}=Nn.state;if(t){const r=Pc(Pc(Pc(Pc({},CC()),q3()),e),IC());Object.entries(r).forEach(([n,i])=>t.style.setProperty(n,i))}},globalCss:Ve`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button w3m-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--w3m-accent-fill-color);background:var(--w3m-accent-color)}`},SC=Ve`button{display:flex;border-radius:var(--w3m-button-hover-highlight-border-radius);flex-direction:column;justify-content:center;padding:5px;width:100px}button:active{background-color:var(--w3m-color-overlay)}@media(hover:hover){button:hover{background-color:var(--w3m-color-overlay)}}button>div{display:flex;justify-content:center;align-items:center;width:32px;height:32px;box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);background-color:var(--w3m-accent-color);border-radius:var(--w3m-icon-button-border-radius);margin-bottom:4px}button path{fill:var(--w3m-accent-fill-color)}`;var OC=Object.defineProperty,DC=Object.getOwnPropertyDescriptor,Tc=(t,e,r,n)=>{for(var i=n>1?void 0:n?DC(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&OC(e,r,i),i};let Hs=class extends $e{constructor(){super(...arguments),this.icon=void 0,this.label="",this.onClick=()=>null}render(){return oe`<button @click="${this.onClick}"><div>${this.icon}</div><w3m-text variant="xsmall-regular" color="accent">${this.label}</w3m-text></button>`}};Hs.styles=[je.globalCss,SC],Tc([Oe()],Hs.prototype,"icon",2),Tc([Oe()],Hs.prototype,"label",2),Tc([Oe()],Hs.prototype,"onClick",2),Hs=Tc([Re("w3m-box-button")],Hs);const AC=Ve`button{border-radius:var(--w3m-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--w3m-accent-color)}button path{fill:var(--w3m-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--w3m-color-overlay)}button:disabled::after{background-color:transparent}.w3m-icon-left svg{margin-right:5px}.w3m-icon-right svg{margin-left:5px}button:active::after{background-color:var(--w3m-color-overlay)}.w3m-ghost,.w3m-ghost:active::after,.w3m-outline{background-color:transparent}.w3m-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--w3m-color-overlay)}.w3m-ghost:hover::after{background-color:transparent}.w3m-ghost:hover{opacity:.5}}button:disabled{background-color:var(--w3m-color-bg-3);pointer-events:none}.w3m-ghost::after{border-color:transparent}.w3m-ghost path{fill:var(--w3m-color-fg-2)}.w3m-outline path{fill:var(--w3m-accent-color)}.w3m-outline:disabled{background-color:transparent;opacity:.5}`;var $C=Object.defineProperty,PC=Object.getOwnPropertyDescriptor,zs=(t,e,r,n)=>{for(var i=n>1?void 0:n?PC(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&$C(e,r,i),i};let bi=class extends $e{constructor(){super(...arguments),this.disabled=!1,this.iconLeft=void 0,this.iconRight=void 0,this.onClick=()=>null,this.variant="default"}render(){const t={"w3m-icon-left":this.iconLeft!==void 0,"w3m-icon-right":this.iconRight!==void 0,"w3m-ghost":this.variant==="ghost","w3m-outline":this.variant==="outline"};let e="inverse";return this.variant==="ghost"&&(e="secondary"),this.variant==="outline"&&(e="accent"),oe`<button class="${Nr(t)}" ?disabled="${this.disabled}" @click="${this.onClick}">${this.iconLeft}<w3m-text variant="small-regular" color="${e}"><slot></slot></w3m-text>${this.iconRight}</button>`}};bi.styles=[je.globalCss,AC],zs([Oe()],bi.prototype,"disabled",2),zs([Oe()],bi.prototype,"iconLeft",2),zs([Oe()],bi.prototype,"iconRight",2),zs([Oe()],bi.prototype,"onClick",2),zs([Oe()],bi.prototype,"variant",2),bi=zs([Re("w3m-button")],bi);const TC=Ve`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--w3m-button-border-radius);color:var(--w3m-accent-fill-color);background-color:var(--w3m-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--w3m-color-overlay)}button:active::after{background-color:var(--w3m-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--w3m-color-bg-3);color:var(--w3m-color-fg-3)}.w3m-secondary{color:var(--w3m-accent-color);background-color:transparent}.w3m-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--w3m-color-overlay)}}`;var RC=Object.defineProperty,NC=Object.getOwnPropertyDescriptor,lf=(t,e,r,n)=>{for(var i=n>1?void 0:n?NC(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&RC(e,r,i),i};let sa=class extends $e{constructor(){super(...arguments),this.disabled=!1,this.variant="primary"}render(){const t={"w3m-secondary":this.variant==="secondary"};return oe`<button ?disabled="${this.disabled}" class="${Nr(t)}"><slot></slot></button>`}};sa.styles=[je.globalCss,TC],lf([Oe()],sa.prototype,"disabled",2),lf([Oe()],sa.prototype,"variant",2),sa=lf([Re("w3m-button-big")],sa);const LC=Ve`:host{background-color:var(--w3m-color-bg-2);border-top:1px solid var(--w3m-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}`;var MC=Object.defineProperty,UC=Object.getOwnPropertyDescriptor,jC=(t,e,r,n)=>{for(var i=n>1?void 0:n?UC(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&MC(e,r,i),i};let uf=class extends $e{render(){return oe`<div><slot></slot></div>`}};uf.styles=[je.globalCss,LC],uf=jC([Re("w3m-info-footer")],uf);const Ne={CROSS_ICON:ut`<svg width="12" height="12" viewBox="0 0 12 12"><path d="M9.94 11A.75.75 0 1 0 11 9.94L7.414 6.353a.5.5 0 0 1 0-.708L11 2.061A.75.75 0 1 0 9.94 1L6.353 4.586a.5.5 0 0 1-.708 0L2.061 1A.75.75 0 0 0 1 2.06l3.586 3.586a.5.5 0 0 1 0 .708L1 9.939A.75.75 0 1 0 2.06 11l3.586-3.586a.5.5 0 0 1 .708 0L9.939 11Z" fill="#fff"/></svg>`,WALLET_CONNECT_LOGO:ut`<svg width="178" height="29" viewBox="0 0 178 29" id="w3m-wc-logo"><path d="M10.683 7.926c5.284-5.17 13.85-5.17 19.134 0l.636.623a.652.652 0 0 1 0 .936l-2.176 2.129a.343.343 0 0 1-.478 0l-.875-.857c-3.686-3.607-9.662-3.607-13.348 0l-.937.918a.343.343 0 0 1-.479 0l-2.175-2.13a.652.652 0 0 1 0-.936l.698-.683Zm23.633 4.403 1.935 1.895a.652.652 0 0 1 0 .936l-8.73 8.543a.687.687 0 0 1-.956 0L20.37 17.64a.172.172 0 0 0-.239 0l-6.195 6.063a.687.687 0 0 1-.957 0l-8.73-8.543a.652.652 0 0 1 0-.936l1.936-1.895a.687.687 0 0 1 .957 0l6.196 6.064a.172.172 0 0 0 .239 0l6.195-6.064a.687.687 0 0 1 .957 0l6.196 6.064a.172.172 0 0 0 .24 0l6.195-6.064a.687.687 0 0 1 .956 0ZM48.093 20.948l2.338-9.355c.139-.515.258-1.07.416-1.942.12.872.258 1.427.357 1.942l2.022 9.355h4.181l3.528-13.874h-3.21l-1.943 8.523a24.825 24.825 0 0 0-.456 2.457c-.158-.931-.317-1.625-.495-2.438l-1.883-8.542h-4.201l-2.042 8.542a41.204 41.204 0 0 0-.475 2.438 41.208 41.208 0 0 0-.476-2.438l-1.903-8.542h-3.349l3.508 13.874h4.083ZM63.33 21.304c1.585 0 2.596-.654 3.11-1.605-.059.297-.078.595-.078.892v.357h2.655V15.22c0-2.735-1.248-4.32-4.3-4.32-2.636 0-4.36 1.466-4.52 3.487h2.914c.1-.891.734-1.426 1.705-1.426.911 0 1.407.515 1.407 1.11 0 .435-.258.693-1.03.792l-1.388.159c-2.061.257-3.825 1.01-3.825 3.19 0 1.982 1.645 3.092 3.35 3.092Zm.891-2.041c-.773 0-1.348-.436-1.348-1.19 0-.733.655-1.09 1.645-1.268l.674-.119c.575-.118.892-.218 1.09-.396v.912c0 1.228-.892 2.06-2.06 2.06ZM70.398 7.074v13.874h2.874V7.074h-2.874ZM74.934 7.074v13.874h2.874V7.074h-2.874ZM84.08 21.304c2.735 0 4.5-1.546 4.697-3.567h-2.893c-.139.892-.892 1.387-1.804 1.387-1.228 0-2.12-.99-2.14-2.358h6.897v-.555c0-3.21-1.764-5.312-4.816-5.312-2.933 0-4.994 2.062-4.994 5.173 0 3.37 2.12 5.232 5.053 5.232Zm-2.16-6.421c.119-1.11.932-1.922 2.081-1.922 1.11 0 1.883.772 1.903 1.922H81.92ZM94.92 21.146c.633 0 1.248-.1 1.525-.179v-2.18c-.218.04-.475.06-.693.06-1.05 0-1.427-.595-1.427-1.566v-3.805h2.338v-2.24h-2.338V7.788H91.47v3.448H89.37v2.24h2.1v4.201c0 2.3 1.15 3.469 3.45 3.469ZM104.62 21.304c3.924 0 6.302-2.299 6.599-5.608h-3.111c-.238 1.803-1.506 3.032-3.369 3.032-2.2 0-3.746-1.784-3.746-4.796 0-2.953 1.605-4.638 3.805-4.638 1.883 0 2.953 1.15 3.171 2.834h3.191c-.317-3.448-2.854-5.41-6.342-5.41-3.984 0-7.036 2.695-7.036 7.214 0 4.677 2.676 7.372 6.838 7.372ZM117.449 21.304c2.993 0 5.114-1.882 5.114-5.172 0-3.23-2.121-5.233-5.114-5.233-2.972 0-5.093 2.002-5.093 5.233 0 3.29 2.101 5.172 5.093 5.172Zm0-2.22c-1.327 0-2.18-1.09-2.18-2.952 0-1.903.892-2.973 2.18-2.973 1.308 0 2.2 1.07 2.2 2.973 0 1.862-.872 2.953-2.2 2.953ZM126.569 20.948v-5.689c0-1.208.753-2.1 1.823-2.1 1.011 0 1.606.773 1.606 2.06v5.729h2.873v-6.144c0-2.339-1.229-3.905-3.428-3.905-1.526 0-2.458.734-2.953 1.606a5.31 5.31 0 0 0 .079-.892v-.377h-2.874v9.712h2.874ZM137.464 20.948v-5.689c0-1.208.753-2.1 1.823-2.1 1.011 0 1.606.773 1.606 2.06v5.729h2.873v-6.144c0-2.339-1.228-3.905-3.428-3.905-1.526 0-2.458.734-2.953 1.606a5.31 5.31 0 0 0 .079-.892v-.377h-2.874v9.712h2.874ZM149.949 21.304c2.735 0 4.499-1.546 4.697-3.567h-2.893c-.139.892-.892 1.387-1.804 1.387-1.228 0-2.12-.99-2.14-2.358h6.897v-.555c0-3.21-1.764-5.312-4.816-5.312-2.933 0-4.994 2.062-4.994 5.173 0 3.37 2.12 5.232 5.053 5.232Zm-2.16-6.421c.119-1.11.932-1.922 2.081-1.922 1.11 0 1.883.772 1.903 1.922h-3.984ZM160.876 21.304c3.013 0 4.658-1.645 4.975-4.201h-2.874c-.099 1.07-.713 1.982-2.001 1.982-1.309 0-2.2-1.21-2.2-2.993 0-1.942 1.03-2.933 2.259-2.933 1.209 0 1.803.872 1.883 1.882h2.873c-.218-2.358-1.823-4.142-4.776-4.142-2.874 0-5.153 1.903-5.153 5.193 0 3.25 1.923 5.212 5.014 5.212ZM172.067 21.146c.634 0 1.248-.1 1.526-.179v-2.18c-.218.04-.476.06-.694.06-1.05 0-1.427-.595-1.427-1.566v-3.805h2.339v-2.24h-2.339V7.788h-2.854v3.448h-2.1v2.24h2.1v4.201c0 2.3 1.15 3.469 3.449 3.469Z" fill="#fff"/></svg>`,WALLET_CONNECT_ICON:ut`<svg width="28" height="20" viewBox="0 0 28 20"><g clip-path="url(#a)"><path d="M7.386 6.482c3.653-3.576 9.575-3.576 13.228 0l.44.43a.451.451 0 0 1 0 .648L19.55 9.033a.237.237 0 0 1-.33 0l-.606-.592c-2.548-2.496-6.68-2.496-9.228 0l-.648.634a.237.237 0 0 1-.33 0L6.902 7.602a.451.451 0 0 1 0-.647l.483-.473Zm16.338 3.046 1.339 1.31a.451.451 0 0 1 0 .648l-6.035 5.909a.475.475 0 0 1-.662 0L14.083 13.2a.119.119 0 0 0-.166 0l-4.283 4.194a.475.475 0 0 1-.662 0l-6.035-5.91a.451.451 0 0 1 0-.647l1.338-1.31a.475.475 0 0 1 .662 0l4.283 4.194c.046.044.12.044.166 0l4.283-4.194a.475.475 0 0 1 .662 0l4.283 4.194c.046.044.12.044.166 0l4.283-4.194a.475.475 0 0 1 .662 0Z" fill="#000000"/></g><defs><clipPath id="a"><path fill="#ffffff" d="M0 0h28v20H0z"/></clipPath></defs></svg>`,WALLET_CONNECT_ICON_COLORED:ut`<svg width="96" height="96" fill="none"><path fill="#fff" d="M25.322 33.597c12.525-12.263 32.83-12.263 45.355 0l1.507 1.476a1.547 1.547 0 0 1 0 2.22l-5.156 5.048a.814.814 0 0 1-1.134 0l-2.074-2.03c-8.737-8.555-22.903-8.555-31.64 0l-2.222 2.175a.814.814 0 0 1-1.134 0l-5.156-5.049a1.547 1.547 0 0 1 0-2.22l1.654-1.62Zm56.019 10.44 4.589 4.494a1.547 1.547 0 0 1 0 2.22l-20.693 20.26a1.628 1.628 0 0 1-2.267 0L48.283 56.632a.407.407 0 0 0-.567 0L33.03 71.012a1.628 1.628 0 0 1-2.268 0L10.07 50.75a1.547 1.547 0 0 1 0-2.22l4.59-4.494a1.628 1.628 0 0 1 2.267 0l14.687 14.38c.156.153.41.153.567 0l14.685-14.38a1.628 1.628 0 0 1 2.268 0l14.687 14.38c.156.153.41.153.567 0l14.686-14.38a1.628 1.628 0 0 1 2.268 0Z"/><path stroke="#000" d="M25.672 33.954c12.33-12.072 32.325-12.072 44.655 0l1.508 1.476a1.047 1.047 0 0 1 0 1.506l-5.157 5.048a.314.314 0 0 1-.434 0l-2.074-2.03c-8.932-8.746-23.409-8.746-32.34 0l-2.222 2.174a.314.314 0 0 1-.434 0l-5.157-5.048a1.047 1.047 0 0 1 0-1.506l1.655-1.62Zm55.319 10.44 4.59 4.494a1.047 1.047 0 0 1 0 1.506l-20.694 20.26a1.128 1.128 0 0 1-1.568 0l-14.686-14.38a.907.907 0 0 0-1.267 0L32.68 70.655a1.128 1.128 0 0 1-1.568 0L10.42 50.394a1.047 1.047 0 0 1 0-1.506l4.59-4.493a1.128 1.128 0 0 1 1.567 0l14.687 14.379a.907.907 0 0 0 1.266 0l-.35-.357.35.357 14.686-14.38a1.128 1.128 0 0 1 1.568 0l14.687 14.38a.907.907 0 0 0 1.267 0l14.686-14.38a1.128 1.128 0 0 1 1.568 0Z"/></svg>`,BACK_ICON:ut`<svg width="10" height="18" viewBox="0 0 10 18"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.735.179a.75.75 0 0 1 .087 1.057L2.92 8.192a1.25 1.25 0 0 0 0 1.617l5.902 6.956a.75.75 0 1 1-1.144.97L1.776 10.78a2.75 2.75 0 0 1 0-3.559L7.678.265A.75.75 0 0 1 8.735.18Z" fill="#fff"/></svg>`,COPY_ICON:ut`<svg width="24" height="24" fill="none"><path fill="#fff" fill-rule="evenodd" d="M7.01 7.01c.03-1.545.138-2.5.535-3.28A5 5 0 0 1 9.73 1.545C10.8 1 12.2 1 15 1c2.8 0 4.2 0 5.27.545a5 5 0 0 1 2.185 2.185C23 4.8 23 6.2 23 9c0 2.8 0 4.2-.545 5.27a5 5 0 0 1-2.185 2.185c-.78.397-1.735.505-3.28.534l-.001.01c-.03 1.54-.138 2.493-.534 3.27a5 5 0 0 1-2.185 2.186C13.2 23 11.8 23 9 23c-2.8 0-4.2 0-5.27-.545a5 5 0 0 1-2.185-2.185C1 19.2 1 17.8 1 15c0-2.8 0-4.2.545-5.27A5 5 0 0 1 3.73 7.545C4.508 7.149 5.46 7.04 7 7.01h.01ZM15 15.5c-1.425 0-2.403-.001-3.162-.063-.74-.06-1.139-.172-1.427-.319a3.5 3.5 0 0 1-1.53-1.529c-.146-.288-.257-.686-.318-1.427C8.501 11.403 8.5 10.425 8.5 9c0-1.425.001-2.403.063-3.162.06-.74.172-1.139.318-1.427a3.5 3.5 0 0 1 1.53-1.53c.288-.146.686-.257 1.427-.318.759-.062 1.737-.063 3.162-.063 1.425 0 2.403.001 3.162.063.74.06 1.139.172 1.427.318a3.5 3.5 0 0 1 1.53 1.53c.146.288.257.686.318 1.427.062.759.063 1.737.063 3.162 0 1.425-.001 2.403-.063 3.162-.06.74-.172 1.139-.319 1.427a3.5 3.5 0 0 1-1.529 1.53c-.288.146-.686.257-1.427.318-.759.062-1.737.063-3.162.063ZM7 8.511c-.444.009-.825.025-1.162.052-.74.06-1.139.172-1.427.318a3.5 3.5 0 0 0-1.53 1.53c-.146.288-.257.686-.318 1.427-.062.759-.063 1.737-.063 3.162 0 1.425.001 2.403.063 3.162.06.74.172 1.139.318 1.427a3.5 3.5 0 0 0 1.53 1.53c.288.146.686.257 1.427.318.759.062 1.737.063 3.162.063 1.425 0 2.403-.001 3.162-.063.74-.06 1.139-.172 1.427-.319a3.5 3.5 0 0 0 1.53-1.53c.146-.287.257-.685.318-1.426.027-.337.043-.718.052-1.162H15c-2.8 0-4.2 0-5.27-.545a5 5 0 0 1-2.185-2.185C7 13.2 7 11.8 7 9v-.489Z" clip-rule="evenodd"/></svg>`,RETRY_ICON:ut`<svg width="15" height="16" viewBox="0 0 15 16"><path d="M6.464 2.03A.75.75 0 0 0 5.403.97L2.08 4.293a1 1 0 0 0 0 1.414L5.403 9.03a.75.75 0 0 0 1.06-1.06L4.672 6.177a.25.25 0 0 1 .177-.427h2.085a4 4 0 1 1-3.93 4.746c-.077-.407-.405-.746-.82-.746-.414 0-.755.338-.7.748a5.501 5.501 0 1 0 5.45-6.248H4.848a.25.25 0 0 1-.177-.427L6.464 2.03Z" fill="#fff"/></svg>`,DESKTOP_ICON:ut`<svg width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 5.98c0-1.85 0-2.775.394-3.466a3 3 0 0 1 1.12-1.12C2.204 1 3.13 1 4.98 1h6.04c1.85 0 2.775 0 3.466.394a3 3 0 0 1 1.12 1.12C16 3.204 16 4.13 16 5.98v1.04c0 1.85 0 2.775-.394 3.466a3 3 0 0 1-1.12 1.12C13.796 12 12.87 12 11.02 12H4.98c-1.85 0-2.775 0-3.466-.394a3 3 0 0 1-1.12-1.12C0 9.796 0 8.87 0 7.02V5.98ZM4.98 2.5h6.04c.953 0 1.568.001 2.034.043.446.04.608.108.69.154a1.5 1.5 0 0 1 .559.56c.046.08.114.243.154.69.042.465.043 1.08.043 2.033v1.04c0 .952-.001 1.568-.043 2.034-.04.446-.108.608-.154.69a1.499 1.499 0 0 1-.56.559c-.08.046-.243.114-.69.154-.466.042-1.08.043-2.033.043H4.98c-.952 0-1.568-.001-2.034-.043-.446-.04-.608-.108-.69-.154a1.5 1.5 0 0 1-.559-.56c-.046-.08-.114-.243-.154-.69-.042-.465-.043-1.08-.043-2.033V5.98c0-.952.001-1.568.043-2.034.04-.446.108-.608.154-.69a1.5 1.5 0 0 1 .56-.559c.08-.046.243-.114.69-.154.465-.042 1.08-.043 2.033-.043Z" fill="#fff"/><path d="M4 14.25a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Z" fill="#fff"/></svg>`,MOBILE_ICON:ut`<svg width="16" height="16" viewBox="0 0 16 16"><path d="M6.75 5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3 4.98c0-1.85 0-2.775.394-3.466a3 3 0 0 1 1.12-1.12C5.204 0 6.136 0 8 0s2.795 0 3.486.394a3 3 0 0 1 1.12 1.12C13 2.204 13 3.13 13 4.98v6.04c0 1.85 0 2.775-.394 3.466a3 3 0 0 1-1.12 1.12C10.796 16 9.864 16 8 16s-2.795 0-3.486-.394a3 3 0 0 1-1.12-1.12C3 13.796 3 12.87 3 11.02V4.98Zm8.5 0v6.04c0 .953-.001 1.568-.043 2.034-.04.446-.108.608-.154.69a1.499 1.499 0 0 1-.56.559c-.08.045-.242.113-.693.154-.47.042-1.091.043-2.05.043-.959 0-1.58-.001-2.05-.043-.45-.04-.613-.109-.693-.154a1.5 1.5 0 0 1-.56-.56c-.046-.08-.114-.243-.154-.69-.042-.466-.043-1.08-.043-2.033V4.98c0-.952.001-1.568.043-2.034.04-.446.108-.608.154-.69a1.5 1.5 0 0 1 .56-.559c.08-.045.243-.113.693-.154C6.42 1.501 7.041 1.5 8 1.5c.959 0 1.58.001 2.05.043.45.04.613.109.693.154a1.5 1.5 0 0 1 .56.56c.046.08.114.243.154.69.042.465.043 1.08.043 2.033Z" fill="#fff"/></svg>`,ARROW_DOWN_ICON:ut`<svg width="14" height="14" viewBox="0 0 14 14"><path d="M2.28 7.47a.75.75 0 0 0-1.06 1.06l5.25 5.25a.75.75 0 0 0 1.06 0l5.25-5.25a.75.75 0 0 0-1.06-1.06l-3.544 3.543a.25.25 0 0 1-.426-.177V.75a.75.75 0 0 0-1.5 0v10.086a.25.25 0 0 1-.427.176L2.28 7.47Z" fill="#fff"/></svg>`,ARROW_UP_RIGHT_ICON:ut`<svg width="15" height="14" fill="none"><path d="M4.5 1.75A.75.75 0 0 1 5.25 1H12a1.5 1.5 0 0 1 1.5 1.5v6.75a.75.75 0 0 1-1.5 0V4.164a.25.25 0 0 0-.427-.176L4.061 11.5A.75.75 0 0 1 3 10.44l7.513-7.513a.25.25 0 0 0-.177-.427H5.25a.75.75 0 0 1-.75-.75Z" fill="#fff"/></svg>`,ARROW_RIGHT_ICON:ut`<svg width="6" height="14" viewBox="0 0 6 14"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.181 1.099a.75.75 0 0 1 1.024.279l2.433 4.258a2.75 2.75 0 0 1 0 2.729l-2.433 4.257a.75.75 0 1 1-1.303-.744L4.335 7.62a1.25 1.25 0 0 0 0-1.24L1.902 2.122a.75.75 0 0 1 .28-1.023Z" fill="#fff"/></svg>`,QRCODE_ICON:ut`<svg width="25" height="24" viewBox="0 0 25 24"><path d="M23.748 9a.748.748 0 0 0 .748-.752c-.018-2.596-.128-4.07-.784-5.22a6 6 0 0 0-2.24-2.24c-1.15-.656-2.624-.766-5.22-.784a.748.748 0 0 0-.752.748c0 .414.335.749.748.752 1.015.007 1.82.028 2.494.088.995.09 1.561.256 1.988.5.7.398 1.28.978 1.679 1.678.243.427.41.993.498 1.988.061.675.082 1.479.09 2.493a.753.753 0 0 0 .75.749ZM3.527.788C4.677.132 6.152.022 8.747.004A.748.748 0 0 1 9.5.752a.753.753 0 0 1-.749.752c-1.014.007-1.818.028-2.493.088-.995.09-1.561.256-1.988.5-.7.398-1.28.978-1.679 1.678-.243.427-.41.993-.499 1.988-.06.675-.081 1.479-.088 2.493A.753.753 0 0 1 1.252 9a.748.748 0 0 1-.748-.752c.018-2.596.128-4.07.784-5.22a6 6 0 0 1 2.24-2.24ZM1.252 15a.748.748 0 0 0-.748.752c.018 2.596.128 4.07.784 5.22a6 6 0 0 0 2.24 2.24c1.15.656 2.624.766 5.22.784a.748.748 0 0 0 .752-.748.753.753 0 0 0-.749-.752c-1.014-.007-1.818-.028-2.493-.089-.995-.089-1.561-.255-1.988-.498a4.5 4.5 0 0 1-1.679-1.68c-.243-.426-.41-.992-.499-1.987-.06-.675-.081-1.479-.088-2.493A.753.753 0 0 0 1.252 15ZM22.996 15.749a.753.753 0 0 1 .752-.749c.415 0 .751.338.748.752-.018 2.596-.128 4.07-.784 5.22a6 6 0 0 1-2.24 2.24c-1.15.656-2.624.766-5.22.784a.748.748 0 0 1-.752-.748c0-.414.335-.749.748-.752 1.015-.007 1.82-.028 2.494-.089.995-.089 1.561-.255 1.988-.498a4.5 4.5 0 0 0 1.679-1.68c.243-.426.41-.992.498-1.987.061-.675.082-1.479.09-2.493Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7 4a2.5 2.5 0 0 0-2.5 2.5v2A2.5 2.5 0 0 0 7 11h2a2.5 2.5 0 0 0 2.5-2.5v-2A2.5 2.5 0 0 0 9 4H7Zm2 1.5H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1ZM13.5 6.5A2.5 2.5 0 0 1 16 4h2a2.5 2.5 0 0 1 2.5 2.5v2A2.5 2.5 0 0 1 18 11h-2a2.5 2.5 0 0 1-2.5-2.5v-2Zm2.5-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1ZM7 13a2.5 2.5 0 0 0-2.5 2.5v2A2.5 2.5 0 0 0 7 20h2a2.5 2.5 0 0 0 2.5-2.5v-2A2.5 2.5 0 0 0 9 13H7Zm2 1.5H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1Z" fill="#fff"/><path d="M13.5 15.5c0-.465 0-.697.038-.89a2 2 0 0 1 1.572-1.572C15.303 13 15.535 13 16 13v2.5h-2.5ZM18 13c.465 0 .697 0 .89.038a2 2 0 0 1 1.572 1.572c.038.193.038.425.038.89H18V13ZM18 17.5h2.5c0 .465 0 .697-.038.89a2 2 0 0 1-1.572 1.572C18.697 20 18.465 20 18 20v-2.5ZM13.5 17.5H16V20c-.465 0-.697 0-.89-.038a2 2 0 0 1-1.572-1.572c-.038-.193-.038-.425-.038-.89Z" fill="#fff"/></svg>`,SCAN_ICON:ut`<svg width="16" height="16" fill="none"><path fill="#fff" d="M10 15.216c0 .422.347.763.768.74 1.202-.064 2.025-.222 2.71-.613a5.001 5.001 0 0 0 1.865-1.866c.39-.684.549-1.507.613-2.709a.735.735 0 0 0-.74-.768.768.768 0 0 0-.76.732c-.009.157-.02.306-.032.447-.073.812-.206 1.244-.384 1.555-.31.545-.761.996-1.306 1.306-.311.178-.743.311-1.555.384-.141.013-.29.023-.447.032a.768.768 0 0 0-.732.76ZM10 .784c0 .407.325.737.732.76.157.009.306.02.447.032.812.073 1.244.206 1.555.384a3.5 3.5 0 0 1 1.306 1.306c.178.311.311.743.384 1.555.013.142.023.29.032.447a.768.768 0 0 0 .76.732.734.734 0 0 0 .74-.768c-.064-1.202-.222-2.025-.613-2.71A5 5 0 0 0 13.477.658c-.684-.39-1.507-.549-2.709-.613a.735.735 0 0 0-.768.74ZM5.232.044A.735.735 0 0 1 6 .784a.768.768 0 0 1-.732.76c-.157.009-.305.02-.447.032-.812.073-1.244.206-1.555.384A3.5 3.5 0 0 0 1.96 3.266c-.178.311-.311.743-.384 1.555-.013.142-.023.29-.032.447A.768.768 0 0 1 .784 6a.735.735 0 0 1-.74-.768c.064-1.202.222-2.025.613-2.71A5 5 0 0 1 2.523.658C3.207.267 4.03.108 5.233.044ZM5.268 14.456a.768.768 0 0 1 .732.76.734.734 0 0 1-.768.74c-1.202-.064-2.025-.222-2.71-.613a5 5 0 0 1-1.865-1.866c-.39-.684-.549-1.507-.613-2.709A.735.735 0 0 1 .784 10c.407 0 .737.325.76.732.009.157.02.306.032.447.073.812.206 1.244.384 1.555a3.5 3.5 0 0 0 1.306 1.306c.311.178.743.311 1.555.384.142.013.29.023.447.032Z"/></svg>`,CHECKMARK_ICON:ut`<svg width="13" height="12" viewBox="0 0 13 12"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.155.132a.75.75 0 0 1 .232 1.035L5.821 11.535a1 1 0 0 1-1.626.09L.665 7.21a.75.75 0 1 1 1.17-.937L4.71 9.867a.25.25 0 0 0 .406-.023L11.12.364a.75.75 0 0 1 1.035-.232Z" fill="#fff"/></svg>`,HELP_ETH_IMG:ut`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#j)"><rect width="60" height="60" rx="30" fill="#987DE8"/><path fill-rule="evenodd" clip-rule="evenodd" d="m15.48 28.367 11.966-19.3c1.174-1.892 3.927-1.892 5.1 0l11.97 19.306a6 6 0 0 1 .9 3.142v.028a6 6 0 0 1-1.154 3.56L33.227 50.208c-1.599 2.188-4.864 2.188-6.461 0L15.733 35.095a6 6 0 0 1-1.154-3.538v-.029a6 6 0 0 1 .9-3.161Z" fill="#fff"/><path d="M30.84 10.112a.992.992 0 0 0-.844-.464V24.5l12.598 5.53c.081-.466-.001-.963-.27-1.398L30.84 10.112Z" fill="#643CDD"/><path d="M29.996 9.648a.991.991 0 0 0-.845.465l-11.489 18.53a1.991 1.991 0 0 0-.264 1.387l12.598-5.53V9.648Z" fill="#BDADEB"/><path d="M29.996 50.544a.994.994 0 0 0 .808-.41l11.235-15.38c.307-.434-.193-.988-.658-.72L31.49 39.71a2.998 2.998 0 0 1-1.494.398v10.437Z" fill="#643CDD"/><path d="M17.966 34.762 29.19 50.134c.2.274.503.41.807.41V40.108a2.998 2.998 0 0 1-1.493-.398l-9.884-5.676c-.468-.27-.971.292-.653.728Z" fill="#BDADEB"/><path d="M42.594 30.03 29.996 24.5v13.138a3 3 0 0 0 1.495-.399l10.149-5.83c.525-.31.856-.823.954-1.38Z" fill="#401AB3"/><path d="M29.996 37.638V24.462l-12.598 5.566c.098.564.437 1.083.974 1.392l10.13 5.82c.462.265.978.398 1.494.398Z" fill="#7C5AE2"/></g><rect class="help-img-highlight" x=".5" y=".5" width="59" height="59" rx="29.5"/><defs><clipPath id="j"><rect width="60" height="60" rx="30" fill="#fff"/></clipPath></defs></svg>`,HELP_PAINTING_IMG:ut`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#k)"><rect width="60" height="60" rx="3" fill="#C653C6"/><path d="M52.094 47.344c0-4.246-1.436-9.557-5.885-12.4a2.876 2.876 0 0 0-1.615-3.891v-.819a4.037 4.037 0 0 0-1.34-3.007 4.75 4.75 0 0 0-2.41-6.252v-5.506c0-6.248-5.065-11.313-11.313-11.313-6.247 0-11.312 5.065-11.312 11.313v2.152a3.343 3.343 0 0 0-1.18 5.045 4.738 4.738 0 0 0-1.633 3.584 4.73 4.73 0 0 0 .956 2.858 5.218 5.218 0 0 0-2.358 6.815c-3.06 4.129-6.098 8.298-6.098 15.64 0 2.668.364 4.856.731 6.385.184.765.368 1.366.509 1.78a12.721 12.721 0 0 0 .225.611l.015.037.005.011.001.004v.002h.001l.92-.393-.92.394.26.606h38.26l.291-.49-.86-.51.86.51v-.001l.002-.002.002-.005.01-.017.035-.06.127-.225c.108-.195.26-.477.441-.835.363-.714.845-1.732 1.328-2.953.959-2.427 1.945-5.725 1.945-9.068Z" fill="#E87DE8" stroke="#fff" stroke-width="2"/><path fill-rule="evenodd" clip-rule="evenodd" d="M26.5 29.5c-3-.5-5.5-3-5.503-7l.002-7c0-.466 0-.698.026-.893a3 3 0 0 1 2.582-2.582c.195-.026.428-.026.893-.026 2 0 2.5-2.5 2.5-2.5s0 2.5 2.5 2.5c1.398 0 2.097 0 2.648.229a3 3 0 0 1 1.624 1.623c.228.552.228 1.25.228 2.649v6c0 4-3 7-6.5 7 1.35.23 4 0 6.5-2v9.53C34 38.5 31.495 40 28 40s-6-1.5-6-2.97L24 34l2.5 1.5v-6ZM26 47h4.5c2.5 0 3 4 3 5.5h-3l-1-1.5H26v-4Zm-6.25 5.5H24V57h-8c0-1 1-4.5 3.75-4.5Z" fill="#fff"/></g><rect class="help-img-highlight" x=".5" y=".5" width="59" height="59" rx="2.5"/><defs><clipPath id="k"><rect width="60" height="60" rx="3" fill="#fff"/></clipPath></defs></svg>`,HELP_CHART_IMG:ut`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#l)"><path d="M0 25.01C0 15.76 0 11.133 1.97 7.678a15 15 0 0 1 5.598-5.597C11.023.11 15.648.11 24.9.11h10.2c9.251 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.597C60 11.133 60 15.758 60 25.01v10.2c0 9.252 0 13.877-1.97 17.332a15 15 0 0 1-5.598 5.598c-3.455 1.97-8.08 1.97-17.332 1.97H24.9c-9.251 0-13.877 0-17.332-1.97a14.999 14.999 0 0 1-5.597-5.598C0 49.087 0 44.462 0 35.21v-10.2Z" fill="#1DC956"/><path d="M.5 25.01c0-4.635 0-8.078.244-10.795.244-2.71.726-4.65 1.66-6.289a14.5 14.5 0 0 1 5.412-5.41c1.639-.936 3.579-1.418 6.289-1.661C16.822.61 20.265.61 24.9.61h10.2c4.635 0 8.078 0 10.795.245 2.71.243 4.65.725 6.29 1.66a14.5 14.5 0 0 1 5.41 5.411c.935 1.64 1.417 3.579 1.66 6.29.244 2.717.245 6.16.245 10.794v10.2c0 4.635 0 8.078-.244 10.795-.244 2.71-.726 4.65-1.66 6.29a14.5 14.5 0 0 1-5.412 5.41c-1.639.936-3.579 1.418-6.289 1.661-2.717.244-6.16.244-10.795.244H24.9c-4.635 0-8.078 0-10.795-.244-2.71-.243-4.65-.725-6.29-1.66a14.5 14.5 0 0 1-5.41-5.412C1.47 50.655.988 48.716.745 46.005.5 43.288.5 39.845.5 35.21v-10.2Z" stroke="#fff" stroke-opacity=".1"/><path d="M16.109 60c-3.833-.179-6.41-.645-8.541-1.86a15 15 0 0 1-5.598-5.598C.553 50.057.155 46.967.043 41.985l4.146-1.382a4 4 0 0 0 2.48-2.39l4.654-12.409a2 2 0 0 1 2.505-1.195l2.526.842a2 2 0 0 0 2.422-1.003l2.968-5.938c.81-1.62 3.185-1.415 3.705.32l3.774 12.581a2 2 0 0 0 3.025 1.09l3.342-2.228c.27-.18.49-.422.646-.706l5.297-9.712a2 2 0 0 1 1.428-1.016l4.134-.689a2 2 0 0 1 1.61.437l3.892 3.243a2 2 0 0 0 2.694-.122l4.633-4.632C60 19.28 60 21.88 60 25.01v10.2c0 9.252 0 13.877-1.97 17.332a14.998 14.998 0 0 1-5.598 5.598c-2.131 1.215-4.708 1.681-8.54 1.86H16.108Z" fill="#2BEE6C"/><path d="M.072 43.03a112.37 112.37 0 0 1-.048-2.093l3.85-1.283a3 3 0 0 0 1.86-1.793l4.653-12.408a3 3 0 0 1 3.758-1.793l2.526.842a1 1 0 0 0 1.21-.501l2.97-5.938c1.214-2.43 4.775-2.123 5.556.48l3.774 12.58a1 1 0 0 0 1.513.545l3.341-2.227a1 1 0 0 0 .323-.353l5.298-9.712a3 3 0 0 1 2.14-1.523l4.135-.69a3 3 0 0 1 2.414.655l3.892 3.244a1 1 0 0 0 1.347-.061l5.28-5.28c.046.845.077 1.752.097 2.732l-3.962 3.962a3 3 0 0 1-4.042.183l-3.893-3.243a1 1 0 0 0-.804-.218l-4.135.689a1 1 0 0 0-.714.507l-5.297 9.712c-.233.427-.565.79-.97 1.06l-3.34 2.228a3 3 0 0 1-4.538-1.635l-3.775-12.58c-.26-.868-1.447-.97-1.852-.16l-2.969 5.937a3 3 0 0 1-3.632 1.505l-2.526-.842a1 1 0 0 0-1.252.597L7.606 38.564a5 5 0 0 1-3.1 2.988L.072 43.029Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M49.5 19a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z" fill="#2BEE6C"/><path d="M47.5 19a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z" fill="#fff"/><path d="M45 .283v59.654c-.63.042-1.294.074-2 .098V.185c.706.025 1.37.056 2 .098Z" fill="#fff"/><path class="help-img-highlight" d="M.5 25.01c0-4.635 0-8.078.244-10.795.244-2.71.726-4.65 1.66-6.289a14.5 14.5 0 0 1 5.412-5.41c1.639-.936 3.579-1.418 6.289-1.661C16.822.61 20.265.61 24.9.61h10.2c4.635 0 8.078 0 10.795.245 2.71.243 4.65.725 6.29 1.66a14.5 14.5 0 0 1 5.41 5.411c.935 1.64 1.417 3.579 1.66 6.29.244 2.717.245 6.16.245 10.794v10.2c0 4.635 0 8.078-.244 10.795-.244 2.71-.726 4.65-1.66 6.29a14.5 14.5 0 0 1-5.412 5.41c-1.639.936-3.579 1.418-6.289 1.661-2.717.244-6.16.244-10.795.244H24.9c-4.635 0-8.078 0-10.795-.244-2.71-.243-4.65-.725-6.29-1.66a14.5 14.5 0 0 1-5.41-5.412C1.47 50.655.988 48.716.745 46.005.5 43.288.5 39.845.5 35.21v-10.2Z"/></g><defs><clipPath id="l"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`,HELP_KEY_IMG:ut`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#m)"><path fill="#EB8B47" d="M0 24.9c0-9.252 0-13.878 1.97-17.332A15 15 0 0 1 7.569 1.97C11.023 0 15.648 0 24.9 0h10.2c9.251 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.598C60 11.022 60 15.648 60 24.899v10.2c0 9.252 0 13.878-1.97 17.332a15.001 15.001 0 0 1-5.598 5.598c-3.455 1.97-8.08 1.97-17.332 1.97H24.9c-9.251 0-13.877 0-17.332-1.97a15 15 0 0 1-5.597-5.598C0 48.977 0 44.351 0 35.1V24.9Z"/><path class="help-img-highlight" d="M.5 24.9c0-4.635 0-8.078.244-10.795.244-2.71.726-4.65 1.66-6.29a14.5 14.5 0 0 1 5.412-5.41C9.455 1.468 11.395.986 14.105.743 16.822.5 20.265.5 24.9.5h10.2c4.635 0 8.078 0 10.795.244 2.71.243 4.65.725 6.29 1.66a14.5 14.5 0 0 1 5.41 5.411c.935 1.64 1.417 3.58 1.66 6.29.244 2.717.245 6.16.245 10.794v10.2c0 4.635 0 8.078-.244 10.796-.244 2.71-.726 4.65-1.66 6.289a14.5 14.5 0 0 1-5.412 5.41c-1.639.936-3.579 1.418-6.289 1.661-2.717.244-6.16.244-10.795.244H24.9c-4.635 0-8.078 0-10.795-.244-2.71-.243-4.65-.725-6.29-1.66a14.5 14.5 0 0 1-5.41-5.411c-.935-1.64-1.417-3.58-1.66-6.29C.5 43.178.5 39.734.5 35.1V24.9Z"/><path fill="#FF974C" stroke="#fff" stroke-width="2" d="M39.192 29.192c5.077-5.077 5.077-13.308 0-18.385-5.076-5.077-13.308-5.077-18.384 0-5.077 5.077-5.077 13.308 0 18.385l1.287 1.291c1.137 1.142 1.706 1.712 2.097 2.387.267.462.472.957.608 1.473.2.755.2 1.56.2 3.171V48.75c0 1.077 0 1.615.134 2.119a4 4 0 0 0 .407.984c.262.45.643.831 1.404 1.592l.294.295c.654.654.982.981 1.365 1.086.26.07.533.07.792 0 .383-.105.71-.432 1.365-1.086l3.478-3.479c.655-.654.982-.981 1.087-1.365a1.5 1.5 0 0 0 0-.791c-.105-.384-.432-.711-1.087-1.365l-.478-.479c-.655-.654-.982-.981-1.087-1.365a1.5 1.5 0 0 1 0-.791c.105-.384.432-.711 1.087-1.365l.478-.479c.655-.654.982-.981 1.087-1.365a1.5 1.5 0 0 0 0-.791c-.105-.384-.432-.711-1.087-1.365l-.492-.493c-.65-.65-.974-.974-1.08-1.355a1.5 1.5 0 0 1-.003-.788c.102-.382.425-.71 1.069-1.364l5.46-5.547Z"/><circle cx="30" cy="17" r="4" fill="#EB8B47" stroke="#fff" stroke-width="2"/></g><defs><clipPath id="m"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`,HELP_USER_IMG:ut`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#n)"><rect width="60" height="60" fill="#00ACE6" rx="30"/><path fill="#1AC6FF" stroke="#fff" stroke-width="2" d="M59 73c0 16.016-12.984 29-29 29S1 89.016 1 73c0-16.017 11-29 29-29s29 12.983 29 29ZM18.69 19.902a11 11 0 0 1 9.281-8.692 14.842 14.842 0 0 1 4.058 0 11 11 0 0 1 9.28 8.692c.178.866.322 1.75.44 2.625.132.977.132 1.968 0 2.945a39.467 39.467 0 0 1-.44 2.625 11 11 0 0 1-9.28 8.692 14.862 14.862 0 0 1-4.058 0 11 11 0 0 1-9.28-8.692 39.467 39.467 0 0 1-.44-2.625 11.004 11.004 0 0 1 0-2.945c.118-.876.262-1.759.44-2.625Z"/><circle cx="24.5" cy="23.5" r="1.5" fill="#fff"/><circle cx="35.5" cy="23.5" r="1.5" fill="#fff"/><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m31 20-3 8h4"/></g><rect class="help-img-highlight" width="59" height="59" x=".5" y=".5" rx="29.5"/><defs><clipPath id="n"><rect width="60" height="60" fill="#fff" rx="30"/></clipPath></defs></svg>`,HELP_LOCK_IMG:ut`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><rect width="60" height="60" fill="#C653C6" rx="3"/><path fill="#fff" d="M20.034 15.216C20 15.607 20 16.07 20 17v2.808c0 1.13 0 1.696-.2 2.11a1.78 1.78 0 0 1-.584.714c-.366.28-1.051.42-2.423.7a7.076 7.076 0 0 0-1.597.511 9.001 9.001 0 0 0-4.353 4.353C10 30.005 10 32.336 10 37c0 4.663 0 6.995.843 8.804a9.001 9.001 0 0 0 4.353 4.353C17.005 51 19.336 51 24 51h12c4.663 0 6.995 0 8.804-.843a9.001 9.001 0 0 0 4.353-4.353C50 43.995 50 41.664 50 37c0-4.663 0-6.995-.843-8.804a9.001 9.001 0 0 0-4.353-4.353 7.076 7.076 0 0 0-1.597-.511c-1.372-.28-2.057-.42-2.423-.7a1.78 1.78 0 0 1-.583-.715C40 21.505 40 20.94 40 19.809V17c0-.929 0-1.393-.034-1.784a9 9 0 0 0-8.182-8.182C31.393 7 30.93 7 30 7s-1.393 0-1.784.034a9 9 0 0 0-8.182 8.182Z"/><path fill="#E87DE8" d="M22 17c0-.929 0-1.393.044-1.784a7 7 0 0 1 6.172-6.172C28.606 9 29.071 9 30 9s1.393 0 1.784.044a7 7 0 0 1 6.172 6.172c.044.39.044.855.044 1.784v4.5a1.5 1.5 0 0 1-3 0V17c0-.93 0-1.394-.077-1.78a4 4 0 0 0-3.143-3.143C31.394 12 30.93 12 30 12s-1.394 0-1.78.077a4 4 0 0 0-3.143 3.143C25 15.606 25 16.07 25 17v4.5a1.5 1.5 0 0 1-3 0V17Z"/><path fill="#E87DE8" fill-rule="evenodd" d="M12 36.62c0-4.317 0-6.476.92-8.088a7 7 0 0 1 2.612-2.612c1.612-.92 3.77-.92 8.088-.92h6.855c.469 0 .703 0 .906.017 2.73.222 4.364 2.438 4.619 4.983.27-2.698 2.111-5 5.015-5A6.985 6.985 0 0 1 48 31.985v5.395c0 4.317 0 6.476-.92 8.088a7 7 0 0 1-2.612 2.612c-1.612.92-3.77.92-8.088.92h-5.855c-.469 0-.703 0-.906-.017-2.73-.222-4.364-2.438-4.619-4.983-.258 2.583-1.943 4.818-4.714 4.99-.155.01-.335.01-.694.01-.55 0-.825 0-1.057-.015a7 7 0 0 1-6.52-6.52C12 42.233 12 41.958 12 41.408V36.62Zm21.24-.273a4 4 0 1 0-6.478 0c.985 1.36 1.479 2.039 1.564 2.229.178.398.176.818.174 1.247V42.5a1.5 1.5 0 0 0 3 0v-2.677c-.002-.429-.004-.85.174-1.247.085-.19.579-.87 1.565-2.229Z" clip-rule="evenodd"/><rect class="help-img-highlight" width="59" height="59" x=".5" y=".5" rx="2.5"/></svg>`,HELP_COMPAS_IMG:ut`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><rect width="60" height="60" fill="#1DC956" rx="30"/><circle cx="30" cy="29.999" r="3" fill="#fff"/><path fill="#2BEE6C" stroke="#fff" stroke-width="2" d="m45.316 17.9-.88-.425.88.424a7.9 7.9 0 0 1 .026-.053c.093-.192.21-.432.26-.687l-.819-.162.819.162a2 2 0 0 0-.239-1.405c-.132-.224-.32-.412-.472-.562a8.415 8.415 0 0 1-.042-.042l-.042-.042c-.15-.151-.338-.34-.562-.472l-.508.862.508-.862a2 2 0 0 0-1.405-.239c-.255.05-.495.167-.687.26l-.053.026-15.05 7.246-.108.052c-1.131.545-1.843.887-2.456 1.374a6.994 6.994 0 0 0-1.13 1.13c-.487.613-.83 1.325-1.375 2.457l-.051.108-7.247 15.05-.025.053c-.094.192-.21.431-.26.686a2 2 0 0 0 .239 1.406l.855-.505-.856.505c.133.224.321.411.473.562l.042.042.041.042c.15.151.338.34.563.472a2 2 0 0 0 1.405.239l-.195-.981.195.98c.255-.05.494-.166.686-.26l.054-.025-.419-.87.419.87 15.05-7.247.107-.051c1.132-.545 1.844-.888 2.457-1.374a7.002 7.002 0 0 0 1.13-1.13c.487-.614.83-1.325 1.374-2.457l.052-.108 7.246-15.05Z"/><path fill="#1DC956" d="m33.376 32.723-2.669-3.43-14.85 14.849.206.205a1 1 0 0 0 1.141.194l15.105-7.273a3 3 0 0 0 1.067-4.545Z"/><path fill="#86F999" d="m26.624 27.276 2.669 3.43 14.85-14.849-.206-.205a1 1 0 0 0-1.141-.194L27.69 22.731a3 3 0 0 0-1.067 4.545Z"/><circle cx="30" cy="30" r="3" fill="#fff" transform="rotate(45 30 30)"/><rect class="help-img-highlight" width="59" height="59" x=".5" y=".5" rx="29.5"/></svg>`,HELP_NOUN_IMG:ut`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><rect width="60" height="60" fill="#794CFF" rx="3"/><path fill="#987DE8" stroke="#fff" stroke-width="2" d="M33 22.5v-1H16v5H8.5V36H13v-5h3v7.5h17V31h1v7.5h17v-17H34v5h-1v-4Z"/><path fill="#fff" d="M37.5 25h10v10h-10z"/><path fill="#4019B2" d="M42.5 25h5v10h-5z"/><path fill="#fff" d="M19.5 25h10v10h-10z"/><path fill="#4019B2" d="M24.5 25h5v10h-5z"/><path fill="#fff" d="M12 30.5h4V37h-4v-6.5Z"/><rect class="help-img-highlight" width="59" height="59" x=".5" y=".5" rx="2.5"/></svg>`,HELP_DAO_IMG:ut`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#o)"><path fill="#EB8B47" d="M0 24.9c0-9.252 0-13.878 1.97-17.332A15 15 0 0 1 7.569 1.97C11.023 0 15.648 0 24.9 0h10.2c9.251 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.598C60 11.022 60 15.648 60 24.899v10.2c0 9.252 0 13.878-1.97 17.332a15.001 15.001 0 0 1-5.598 5.598c-3.455 1.97-8.08 1.97-17.332 1.97H24.9c-9.251 0-13.877 0-17.332-1.97a15 15 0 0 1-5.597-5.598C0 48.977 0 44.351 0 35.1V24.9Z"/><path class="help-img-highlight" d="M.5 24.9c0-4.635 0-8.078.244-10.795.244-2.71.726-4.65 1.66-6.29a14.5 14.5 0 0 1 5.412-5.41C9.455 1.468 11.395.986 14.105.743 16.822.5 20.265.5 24.9.5h10.2c4.635 0 8.078 0 10.795.244 2.71.243 4.65.725 6.29 1.66a14.5 14.5 0 0 1 5.41 5.411c.935 1.64 1.417 3.58 1.66 6.29.244 2.717.245 6.16.245 10.794v10.2c0 4.635 0 8.078-.244 10.796-.244 2.71-.726 4.65-1.66 6.289a14.5 14.5 0 0 1-5.412 5.41c-1.639.936-3.579 1.418-6.289 1.661-2.717.244-6.16.244-10.795.244H24.9c-4.635 0-8.078 0-10.795-.244-2.71-.243-4.65-.725-6.29-1.66a14.5 14.5 0 0 1-5.41-5.411c-.935-1.64-1.417-3.58-1.66-6.29C.5 43.178.5 39.734.5 35.1V24.9Z"/><path fill="#FF974C" stroke="#fff" stroke-width="2" d="M19 52c5.523 0 10-4.477 10-10s-4.477-10-10-10S9 36.477 9 42s4.477 10 10 10Z"/><path fill="#fff" fill-rule="evenodd" d="M42.844 8.326a1 1 0 0 0-1.687 0L28.978 27.463A1 1 0 0 0 29.822 29h24.357a1 1 0 0 0 .843-1.537L42.844 8.326Z" clip-rule="evenodd"/><path fill="#FF974C" fill-rule="evenodd" d="M42.335 11.646c.324.115.571.504 1.066 1.28l7.332 11.523c.562.883.843 1.325.792 1.69a1 1 0 0 1-.342.623c-.28.238-.803.238-1.85.238H34.667c-1.047 0-1.57 0-1.85-.238a1 1 0 0 1-.342-.623c-.051-.365.23-.806.792-1.69l7.332-11.523c.495-.776.742-1.165 1.066-1.28a1 1 0 0 1 .67 0ZM35 27a7 7 0 0 0 7-7 7 7 0 0 0 7 7H35Z" clip-rule="evenodd"/><path fill="#FF974C" stroke="#fff" stroke-width="2" d="M10.106 9.357c-.109.32-.107.682-.106.975V25.668c-.001.293-.003.654.106.975a2 2 0 0 0 1.251 1.25c.32.11.682.108.975.107H19c5.523 0 10-4.477 10-10S24.523 8 19 8h-6.668c-.293-.001-.654-.003-.975.106a2 2 0 0 0-1.25 1.251Z"/><circle cx="19" cy="18" r="4" fill="#EB8B47" stroke="#fff" stroke-width="2"/><circle cx="19" cy="41.999" r="4" fill="#EB8B47" stroke="#fff" stroke-width="2"/></g><defs><clipPath id="o"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`,SEARCH_ICON:ut`<svg width="20" height="21"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.432 13.992c-.354-.353-.91-.382-1.35-.146a5.5 5.5 0 1 1 2.265-2.265c-.237.441-.208.997.145 1.35l3.296 3.296a.75.75 0 1 1-1.06 1.061l-3.296-3.296Zm.06-5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z" fill="#949E9E"/></svg>`,HELP_ICON:ut`<svg width="11" height="17" viewBox="0 0 11 17"><path fill="#fff" d="M5.22 2.97c-1.07 0-2.25.843-2.25 2.25a.75.75 0 0 1-1.5 0c0-2.393 2.019-3.75 3.75-3.75 1.73 0 3.75 1.357 3.75 3.75 0 1.64-1.038 2.466-1.785 3.057-.802.635-1.215.984-1.215 1.693a.75.75 0 1 1-1.5 0c0-1.466.985-2.24 1.681-2.788l.103-.081C7.007 6.504 7.47 6.08 7.47 5.22c0-1.407-1.181-2.25-2.25-2.25ZM5.22 14.97a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z"/></svg>`,WALLET_ICON:ut`<svg width="15" height="14" fill="none" viewBox="0 0 15 14"><path fill="#fff" fill-rule="evenodd" d="M.64 9.2v-3h.001c.009-1.857.07-2.886.525-3.682a4 4 0 0 1 1.492-1.493C3.58.5 4.813.5 7.28.5h3.735c.58 0 .871 0 1.114.04A3 3 0 0 1 14.6 3.011c.04.243.04.533.04 1.114 0 .58 0 .871-.04 1.114a3 3 0 0 1-2.471 2.47c-.243.041-.533.041-1.114.041h-.777c.178.307.302.648.362 1.011.04.243.04.533.04 1.114 0 .58 0 .871-.04 1.114a3 3 0 0 1-2.471 2.47c-.243.041-.533.041-1.114.041H4.507A3.867 3.867 0 0 1 .64 9.633V9.2ZM7.28 2h3.735c.64 0 .779.005.87.02a1.5 1.5 0 0 1 1.235 1.236c.015.09.02.229.02.869s-.005.779-.02.87a1.5 1.5 0 0 1-1.236 1.235c-.09.015-.229.02-.869.02H4.023c-.697 0-1.345.21-1.883.572V6.25h.001c.004-.791.015-1.383.059-1.867.056-.629.157-.926.269-1.122a2.5 2.5 0 0 1 .932-.933c.197-.111.494-.212 1.123-.268C5.173 2 6.019 2 7.28 2Zm-.265 5.75H4.023c-1.04 0-1.883.843-1.883 1.883A2.367 2.367 0 0 0 4.507 12h2.508c.64 0 .779-.005.87-.02a1.5 1.5 0 0 0 1.235-1.236c.015-.09.02-.229.02-.869s-.005-.779-.02-.87A1.5 1.5 0 0 0 7.884 7.77c-.09-.015-.228-.02-.869-.02Z" clip-rule="evenodd"/></svg>`,NETWORK_PLACEHOLDER:ut`<svg width="28" height="28" fill="none" viewBox="0 0 28 28"><mask id="p" width="26" height="28" x="1" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#D9D9D9" d="M12 1.172a4 4 0 0 1 4 0l8.124 4.69a4 4 0 0 1 2 3.465v9.381a4 4 0 0 1-2 3.464L16 26.862a4 4 0 0 1-4 0l-8.124-4.69a4 4 0 0 1-2-3.464V9.327a4 4 0 0 1 2-3.464L12 1.173Z"/></mask><g mask="url(#p)"><path id="network-placeholder-fill" fill="#fff" d="M0 0h28v28H0z"/><path id="network-placeholder-dash" stroke="#000" stroke-dasharray="2 2" d="m8.953 2.931 2.032-1.173.25.433 1.015-.586c.269-.155.553-.271.844-.35l-.13-.483a4.003 4.003 0 0 1 2.071 0l-.13.483c.293.079.576.195.845.35l1.016.586.25-.433 2.03 1.173-.25.433 2.032 1.173.25-.433 2.03 1.172-.25.433 1.016.587c.269.155.512.342.725.556l.354-.354a4.003 4.003 0 0 1 1.035 1.794l-.483.129c.078.292.12.596.12.906v1.172h.5v2.346h-.5v2.345h.5v2.345h-.5v1.173c0 .31-.042.614-.12.906l.483.13a4.003 4.003 0 0 1-1.035 1.793l-.354-.354a3.498 3.498 0 0 1-.725.556l-1.015.586.25.434-2.031 1.172-.25-.433-2.031 1.173.25.433-2.031 1.172-.25-.433-1.016.587a3.494 3.494 0 0 1-.844.35l.13.482a4.003 4.003 0 0 1-2.071 0l.13-.483a3.496 3.496 0 0 1-.845-.35l-1.015-.586-.25.433-2.032-1.172.25-.433-2.03-1.173-.25.433L4.89 22.76l.25-.434-1.015-.586a3.498 3.498 0 0 1-.725-.556l-.354.354a4.003 4.003 0 0 1-1.035-1.794l.483-.13a3.497 3.497 0 0 1-.12-.905v-1.173h-.5V15.19h.5v-2.345h-.5v-2.346h.5V9.327c0-.31.042-.614.12-.906l-.483-.13a4.003 4.003 0 0 1 1.035-1.793l.354.354c.213-.214.456-.401.725-.556l1.015-.587-.25-.433 2.031-1.172.25.433 2.031-1.173-.25-.433Z"/><path fill="#798686" stroke="#fff" d="M14.243 13.563 14 13.428l-.243.135-6.388 3.549-.024.013c-.432.24-.79.44-1.053.622-.266.184-.516.405-.636.722a1.5 1.5 0 0 0 0 1.062c.12.317.37.538.636.722.263.183.62.382 1.053.622l.024.013 3.164 1.758.088.049c1.164.646 1.857 1.032 2.607 1.162.51.09 1.033.09 1.544 0 .75-.13 1.443-.516 2.606-1.162l.09-.05 3.163-1.757.024-.013c.432-.24.79-.44 1.053-.622.266-.184.516-.405.636-.722l-.468-.177.468.177a1.5 1.5 0 0 0 0-1.062l-.468.177.468-.177c-.12-.317-.37-.538-.636-.722-.263-.183-.62-.382-1.053-.622l-.024-.013-6.388-3.55Z"/><path fill="#9EA9A9" stroke="#fff" d="M14.243 8.563 14 8.428l-.243.135-6.388 3.549-.024.013c-.432.24-.79.44-1.053.622-.266.184-.516.405-.636.722a1.5 1.5 0 0 0 0 1.062c.12.316.37.537.636.722.263.183.62.382 1.053.622l.024.013 3.164 1.758.088.049c1.164.646 1.857 1.032 2.607 1.162.51.09 1.033.09 1.544 0 .75-.13 1.443-.516 2.606-1.162l.09-.05 3.163-1.757.024-.013c.432-.24.79-.44 1.053-.622.266-.184.516-.405.636-.722l-.468-.177.468.177a1.5 1.5 0 0 0 0-1.062l-.468.177.468-.177c-.12-.316-.37-.537-.636-.722-.263-.183-.62-.382-1.053-.622l-.024-.013-6.388-3.55Z"/><path fill="#C9CFCF" stroke="#fff" d="m22.344 9.53-.468-.176.468.177a1.5 1.5 0 0 0 0-1.062l-.468.177.468-.177c-.12-.317-.37-.537-.636-.722-.263-.183-.62-.382-1.053-.622l-.024-.013-3.163-1.758-.09-.05c-1.163-.645-1.856-1.03-2.606-1.161a4.5 4.5 0 0 0-1.544 0c-.75.13-1.443.516-2.607 1.162l-.088.05-3.164 1.757-.024.013c-.432.24-.79.44-1.053.622-.266.185-.516.405-.636.722a1.5 1.5 0 0 0 0 1.062c.12.317.37.537.636.722.263.183.62.382 1.053.622l.024.013 3.164 1.758.088.049c1.164.646 1.857 1.032 2.607 1.162.51.09 1.033.09 1.544 0 .75-.13 1.443-.516 2.606-1.162l.09-.05 3.163-1.757.024-.013c.432-.24.79-.44 1.053-.622.266-.184.516-.405.636-.722Z"/></g></svg>`,WALLET_PLACEHOLDER:ut`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#q)"><path id="wallet-placeholder-fill" fill="#fff" d="M0 24.9c0-9.251 0-13.877 1.97-17.332a15 15 0 0 1 5.598-5.597C11.023 0 15.648 0 24.9 0h10.2c9.252 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.598C60 11.023 60 15.648 60 24.9v10.2c0 9.252 0 13.877-1.97 17.332a15.001 15.001 0 0 1-5.598 5.597C48.977 60 44.352 60 35.1 60H24.9c-9.251 0-13.877 0-17.332-1.97a15 15 0 0 1-5.597-5.598C0 48.977 0 44.352 0 35.1V24.9Z"/><path id="wallet-placeholder-dash" stroke="#000" stroke-dasharray="4 4" stroke-width="1.5" d="M.04 41.708a231.598 231.598 0 0 1-.039-4.403l.75-.001L.75 35.1v-2.55H0v-5.1h.75V24.9l.001-2.204h-.75c.003-1.617.011-3.077.039-4.404l.75.016c.034-1.65.099-3.08.218-4.343l-.746-.07c.158-1.678.412-3.083.82-4.316l.713.236c.224-.679.497-1.296.827-1.875a14.25 14.25 0 0 1 1.05-1.585L3.076 5.9A15 15 0 0 1 5.9 3.076l.455.596a14.25 14.25 0 0 1 1.585-1.05c.579-.33 1.196-.603 1.875-.827l-.236-.712C10.812.674 12.217.42 13.895.262l.07.746C15.23.89 16.66.824 18.308.79l-.016-.75C19.62.012 21.08.004 22.695.001l.001.75L24.9.75h2.55V0h5.1v.75h2.55l2.204.001v-.75c1.617.003 3.077.011 4.404.039l-.016.75c1.65.034 3.08.099 4.343.218l.07-.746c1.678.158 3.083.412 4.316.82l-.236.713c.679.224 1.296.497 1.875.827a14.24 14.24 0 0 1 1.585 1.05l.455-.596A14.999 14.999 0 0 1 56.924 5.9l-.596.455c.384.502.735 1.032 1.05 1.585.33.579.602 1.196.827 1.875l.712-.236c.409 1.233.663 2.638.822 4.316l-.747.07c.119 1.264.184 2.694.218 4.343l.75-.016c.028 1.327.036 2.787.039 4.403l-.75.001.001 2.204v2.55H60v5.1h-.75v2.55l-.001 2.204h.75a231.431 231.431 0 0 1-.039 4.404l-.75-.016c-.034 1.65-.099 3.08-.218 4.343l.747.07c-.159 1.678-.413 3.083-.822 4.316l-.712-.236a10.255 10.255 0 0 1-.827 1.875 14.242 14.242 0 0 1-1.05 1.585l.596.455a14.997 14.997 0 0 1-2.824 2.824l-.455-.596c-.502.384-1.032.735-1.585 1.05-.579.33-1.196.602-1.875.827l.236.712c-1.233.409-2.638.663-4.316.822l-.07-.747c-1.264.119-2.694.184-4.343.218l.016.75c-1.327.028-2.787.036-4.403.039l-.001-.75-2.204.001h-2.55V60h-5.1v-.75H24.9l-2.204-.001v.75a231.431 231.431 0 0 1-4.404-.039l.016-.75c-1.65-.034-3.08-.099-4.343-.218l-.07.747c-1.678-.159-3.083-.413-4.316-.822l.236-.712a10.258 10.258 0 0 1-1.875-.827 14.252 14.252 0 0 1-1.585-1.05l-.455.596A14.999 14.999 0 0 1 3.076 54.1l.596-.455a14.24 14.24 0 0 1-1.05-1.585 10.259 10.259 0 0 1-.827-1.875l-.712.236C.674 49.188.42 47.783.262 46.105l.746-.07C.89 44.77.824 43.34.79 41.692l-.75.016Z"/><path fill="#fff" fill-rule="evenodd" d="M35.643 32.145c-.297-.743-.445-1.114-.401-1.275a.42.42 0 0 1 .182-.27c.134-.1.463-.1 1.123-.1.742 0 1.499.046 2.236-.05a6 6 0 0 0 5.166-5.166c.051-.39.051-.855.051-1.784 0-.928 0-1.393-.051-1.783a6 6 0 0 0-5.166-5.165c-.39-.052-.854-.052-1.783-.052h-7.72c-4.934 0-7.401 0-9.244 1.051a8 8 0 0 0-2.985 2.986C16.057 22.28 16.003 24.58 16 29 15.998 31.075 16 33.15 16 35.224A7.778 7.778 0 0 0 23.778 43H28.5c1.394 0 2.09 0 2.67-.116a6 6 0 0 0 4.715-4.714c.115-.58.115-1.301.115-2.744 0-1.31 0-1.964-.114-2.49a4.998 4.998 0 0 0-.243-.792Z" clip-rule="evenodd"/><path fill="#9EA9A9" fill-rule="evenodd" d="M37 18h-7.72c-2.494 0-4.266.002-5.647.126-1.361.122-2.197.354-2.854.728a6.5 6.5 0 0 0-2.425 2.426c-.375.657-.607 1.492-.729 2.853-.11 1.233-.123 2.777-.125 4.867 0 .7 0 1.05.097 1.181.096.13.182.181.343.2.163.02.518-.18 1.229-.581a6.195 6.195 0 0 1 3.053-.8H37c.977 0 1.32-.003 1.587-.038a4.5 4.5 0 0 0 3.874-3.874c.036-.268.039-.611.039-1.588 0-.976-.003-1.319-.038-1.587a4.5 4.5 0 0 0-3.875-3.874C38.32 18.004 37.977 18 37 18Zm-7.364 12.5h-7.414a4.722 4.722 0 0 0-4.722 4.723 6.278 6.278 0 0 0 6.278 6.278H28.5c1.466 0 1.98-.008 2.378-.087a4.5 4.5 0 0 0 3.535-3.536c.08-.397.087-.933.087-2.451 0-1.391-.009-1.843-.08-2.17a3.5 3.5 0 0 0-2.676-2.676c-.328-.072-.762-.08-2.108-.08Z" clip-rule="evenodd"/></g><defs><clipPath id="q"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`,TOKEN_PLACEHOLDER:ut`<svg width="60" height="60" viewBox="0 0 60 60" fill="none"><rect id="token-placeholder-fill" width="58" height="58" x="1" y="1" fill="#fff" rx="29"/><path fill="#3B4040" stroke="#fff" stroke-width="2" d="M32 10a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v5.566c0 .357.192.685.495.875a16.001 16.001 0 0 1 4.256 3.894c.667.88.33 2.113-.627 2.665l-2.494 1.44c-.956.552-2.166.204-2.913-.609a9.12 9.12 0 1 0 .064 12.267c.739-.82 1.945-1.181 2.907-.64l2.509 1.415c.962.542 1.312 1.77.654 2.658a16 16 0 0 1-4.356 4.028c-.303.19-.495.518-.495.875V50a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-2.992c0-.602-.528-1.065-1.13-1.032-.579.032-1.16.032-1.74 0-.602-.032-1.13.43-1.13 1.032V50a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-5.566c0-.357-.192-.685-.495-.875a16 16 0 0 1 0-27.118c.303-.19.495-.517.495-.875V10a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2.992c0 .601.528 1.064 1.13 1.032.58-.032 1.161-.032 1.74 0 .602.033 1.13-.43 1.13-1.032V10Z"/><rect id="token-placeholder-dash" width="58" height="58" x="1" y="1" stroke="#000" stroke-dasharray="6 6" stroke-width="2" rx="29"/></svg>`,ACCOUNT_COPY:ut`<svg width="14" height="14" fill="none" viewBox="0 0 14 14"><path fill="#fff" fill-rule="evenodd" d="M4.003 4.005c.012-1.225.074-1.936.391-2.491a3 3 0 0 1 1.12-1.12C6.204 0 7.136 0 9 0s2.795 0 3.486.394a3 3 0 0 1 1.12 1.12C14 2.204 14 3.136 14 5s0 2.795-.394 3.486a3 3 0 0 1-1.12 1.12c-.555.317-1.266.379-2.491.391l.002.003c-.012 1.222-.075 1.932-.391 2.486a3 3 0 0 1-1.12 1.12C7.796 14 6.864 14 5 14s-2.795 0-3.486-.394a3 3 0 0 1-1.12-1.12C0 11.796 0 10.864 0 9s0-2.795.394-3.486a3 3 0 0 1 1.12-1.12c.554-.316 1.264-.379 2.486-.391l.003.002ZM9 8.5c-.959 0-1.58-.001-2.05-.043-.45-.04-.613-.109-.693-.154a1.5 1.5 0 0 1-.56-.56c-.045-.08-.113-.243-.154-.693C5.501 6.58 5.5 5.959 5.5 5c0-.959.001-1.58.043-2.05.04-.45.109-.613.154-.693a1.5 1.5 0 0 1 .56-.56c.08-.045.243-.113.693-.154C7.42 1.501 8.041 1.5 9 1.5c.959 0 1.58.001 2.05.043.45.04.613.109.693.154a1.5 1.5 0 0 1 .56.56c.045.08.113.243.154.693.042.47.043 1.091.043 2.05 0 .959-.001 1.58-.043 2.05-.04.45-.109.613-.154.693a1.5 1.5 0 0 1-.56.56c-.08.045-.242.113-.693.154-.47.042-1.091.043-2.05.043ZM4 5.503a13.77 13.77 0 0 0-1.05.04c-.45.04-.613.109-.693.154a1.5 1.5 0 0 0-.56.56c-.045.08-.113.243-.154.693C1.501 7.42 1.5 8.041 1.5 9c0 .959.001 1.58.043 2.05.04.45.109.613.154.693a1.5 1.5 0 0 0 .56.56c.08.045.243.113.693.154.47.042 1.091.043 2.05.043.959 0 1.58-.001 2.05-.043.45-.04.613-.109.693-.154a1.5 1.5 0 0 0 .56-.56c.045-.08.113-.242.154-.693.025-.283.035-.619.04-1.05-1.534-.003-2.358-.037-2.983-.394a3 3 0 0 1-1.12-1.12c-.357-.625-.39-1.449-.394-2.983Z" clip-rule="evenodd"/></svg>`,ACCOUNT_DISCONNECT:ut`<svg width="16" height="14" fill="none" viewBox="0 0 16 14"><path fill="#fff" d="M9.677 1.5h-2.61c-1.261 0-2.107.001-2.757.06-.629.056-.926.157-1.122.268a2.5 2.5 0 0 0-.933.933c-.112.196-.212.493-.269 1.122-.058.65-.06 1.496-.06 2.757v.72c0 1.26.002 2.107.06 2.756.057.63.157.927.27 1.123a2.5 2.5 0 0 0 .932.933c.196.111.493.212 1.122.268.65.059 1.496.06 2.757.06h2.61a.75.75 0 1 1 0 1.5h-2.61c-2.467 0-3.7 0-4.622-.525a4 4 0 0 1-1.493-1.493C.427 11.06.427 9.827.427 7.36v-.72c0-2.467 0-3.7.525-4.622A4 4 0 0 1 2.445.525C3.366 0 4.6 0 7.067 0h2.61a.75.75 0 1 1 0 1.5Z"/><path fill="#fff" d="M10.896 11.03a.75.75 0 0 1 0-1.06l1.793-1.793a.25.25 0 0 0-.176-.427H8.177a.75.75 0 0 1 0-1.5h4.336a.25.25 0 0 0 .176-.427L10.896 4.03a.75.75 0 0 1 1.061-1.06l3.323 3.323a1 1 0 0 1 0 1.414l-3.323 3.323a.75.75 0 0 1-1.06 0Z"/></svg>`,GLOBE_ICON:ut`<svg width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="#fff" fill-rule="evenodd" d="M15.5 8a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0Zm-2.113.75c.301 0 .535.264.47.558a6.01 6.01 0 0 1-2.867 3.896c-.203.116-.42-.103-.334-.32.409-1.018.691-2.274.797-3.657a.512.512 0 0 1 .507-.477h1.427Zm.47-2.058c.065.294-.169.558-.47.558H11.96a.512.512 0 0 1-.507-.477c-.106-1.383-.389-2.638-.797-3.656-.087-.217.13-.437.333-.32a6.01 6.01 0 0 1 2.868 3.895Zm-4.402.558c.286 0 .515-.24.49-.525-.121-1.361-.429-2.534-.83-3.393-.279-.6-.549-.93-.753-1.112a.535.535 0 0 0-.724 0c-.204.182-.474.513-.754 1.112-.4.859-.708 2.032-.828 3.393a.486.486 0 0 0 .49.525h2.909Zm-5.415 0c.267 0 .486-.21.507-.477.106-1.383.389-2.638.797-3.656.087-.217-.13-.437-.333-.32a6.01 6.01 0 0 0-2.868 3.895c-.065.294.169.558.47.558H4.04ZM2.143 9.308c-.065-.294.169-.558.47-.558H4.04c.267 0 .486.21.507.477.106 1.383.389 2.639.797 3.657.087.217-.13.436-.333.32a6.01 6.01 0 0 1-2.868-3.896Zm3.913-.033a.486.486 0 0 1 .49-.525h2.909c.286 0 .515.24.49.525-.121 1.361-.428 2.535-.83 3.394-.279.6-.549.93-.753 1.112a.535.535 0 0 1-.724 0c-.204-.182-.474-.513-.754-1.112-.4-.859-.708-2.033-.828-3.394Z" clip-rule="evenodd"/></svg>`},FC=Ve`.w3m-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--w3m-background-border-radius) * .9);background-color:var(--w3m-background-color);background-image:var(--w3m-background-image-url);background-position:center;background-size:cover}.w3m-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.w3m-toolbar img,.w3m-toolbar svg{height:28px;object-position:left center;object-fit:contain}#w3m-wc-logo path{fill:var(--w3m-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--w3m-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--w3m-color-bg-1);box-shadow:0 0 0 1px var(--w3m-color-overlay)}button:active{background-color:var(--w3m-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--w3m-color-fg-1)}.w3m-toolbar div{display:flex}.w3m-toolbar div button:first-child{margin-right:16px}.w3m-help-active button:first-child{background-color:var(--w3m-color-fg-1)}.w3m-help-active button:first-child path{fill:var(--w3m-color-bg-1)}@media(hover:hover){button:hover{background-color:var(--w3m-color-bg-2)}}`;var BC=Object.defineProperty,kC=Object.getOwnPropertyDescriptor,V3=(t,e,r,n)=>{for(var i=n>1?void 0:n?kC(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&BC(e,r,i),i};let Rc=class extends $e{constructor(){super(),this.isHelp=!1,this.unsubscribeRouter=void 0,this.unsubscribeRouter=tt.subscribe(t=>{this.isHelp=t.view==="Help"})}disconnectedCallback(){var t;(t=this.unsubscribeRouter)==null||t.call(this)}onHelp(){tt.push("Help")}logoTemplate(){var t;const e=(t=Nn.state.themeVariables)==null?void 0:t["--w3m-logo-image-url"];return e?oe`<img src="${e}">`:Ne.WALLET_CONNECT_LOGO}render(){const t={"w3m-help-active":this.isHelp};return oe`<div class="w3m-toolbar-placeholder"></div><div class="w3m-toolbar">${this.logoTemplate()}<div class="${Nr(t)}"><button @click="${this.onHelp}">${Ne.HELP_ICON}</button> <button @click="${Rr.close}">${Ne.CROSS_ICON}</button></div></div>`}};Rc.styles=[je.globalCss,FC],V3([gt()],Rc.prototype,"isHelp",2),Rc=V3([Re("w3m-modal-backcard")],Rc);const HC=Ve`main{padding:20px;padding-top:0;width:100%}`;var zC=Object.defineProperty,WC=Object.getOwnPropertyDescriptor,qC=(t,e,r,n)=>{for(var i=n>1?void 0:n?WC(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&zC(e,r,i),i};let hf=class extends $e{render(){return oe`<main><slot></slot></main>`}};hf.styles=[je.globalCss,HC],hf=qC([Re("w3m-modal-content")],hf);const VC=Ve`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--w3m-color-bg-2)}`;var KC=Object.defineProperty,GC=Object.getOwnPropertyDescriptor,ZC=(t,e,r,n)=>{for(var i=n>1?void 0:n?GC(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&KC(e,r,i),i};let ff=class extends $e{render(){return oe`<footer><slot></slot></footer>`}};ff.styles=[je.globalCss,VC],ff=ZC([Re("w3m-modal-footer")],ff);const YC=Ve`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.w3m-border{border-bottom:1px solid var(--w3m-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.w3m-back-btn{position:absolute;left:0}.w3m-action-btn{position:absolute;right:0}path{fill:var(--w3m-accent-color)}`;var JC=Object.defineProperty,XC=Object.getOwnPropertyDescriptor,oa=(t,e,r,n)=>{for(var i=n>1?void 0:n?XC(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&JC(e,r,i),i};let es=class extends $e{constructor(){super(...arguments),this.title="",this.onAction=void 0,this.actionIcon=void 0,this.border=!1}backBtnTemplate(){return oe`<button class="w3m-back-btn" @click="${tt.goBack}">${Ne.BACK_ICON}</button>`}actionBtnTemplate(){return oe`<button class="w3m-action-btn" @click="${this.onAction}">${this.actionIcon}</button>`}render(){const t={"w3m-border":this.border},e=tt.state.history.length>1,r=this.title?oe`<w3m-text variant="big-bold">${this.title}</w3m-text>`:oe`<slot></slot>`;return oe`<header class="${Nr(t)}">${e?this.backBtnTemplate():null} ${r} ${this.onAction?this.actionBtnTemplate():null}</header>`}};es.styles=[je.globalCss,YC],oa([Oe()],es.prototype,"title",2),oa([Oe()],es.prototype,"onAction",2),oa([Oe()],es.prototype,"actionIcon",2),oa([Oe()],es.prototype,"border",2),es=oa([Re("w3m-modal-header")],es);const QC={1:"692ed6ba-e569-459a-556a-776476829e00",42161:"600a9a04-c1b9-42ca-6785-9b4b6ff85200",43114:"30c46e53-e989-45fb-4549-be3bd4eb3b00",56:"93564157-2e8e-4ce7-81df-b264dbee9b00",250:"06b26297-fe0c-4733-5d6b-ffa5498aac00",10:"ab9c186a-c52f-464b-2906-ca59d760a400",137:"41d04d42-da3b-4453-8506-668cc0727900",100:"02b53f6a-e3d4-479e-1cb4-21178987d100",9001:"f926ff41-260d-4028-635e-91913fc28e00",324:"b310f07f-4ef7-49f3-7073-2a0a39685800",314:"5a73b3dd-af74-424e-cae0-0de859ee9400",4689:"34e68754-e536-40da-c153-6ef2e7188a00",1088:"3897a66d-40b9-4833-162f-a2c90531c900",1284:"161038da-44ae-4ec7-1208-0ea569454b00",1285:"f1d73bb6-5450-4e18-38f7-fb6484264a00"},eI={ETH:{icon:"692ed6ba-e569-459a-556a-776476829e00"},WETH:{icon:"692ed6ba-e569-459a-556a-776476829e00"},AVAX:{icon:"30c46e53-e989-45fb-4549-be3bd4eb3b00"},FTM:{icon:"06b26297-fe0c-4733-5d6b-ffa5498aac00"},BNB:{icon:"93564157-2e8e-4ce7-81df-b264dbee9b00"},MATIC:{icon:"41d04d42-da3b-4453-8506-668cc0727900"},OP:{icon:"ab9c186a-c52f-464b-2906-ca59d760a400"},xDAI:{icon:"02b53f6a-e3d4-479e-1cb4-21178987d100"},EVMOS:{icon:"f926ff41-260d-4028-635e-91913fc28e00"},METIS:{icon:"3897a66d-40b9-4833-162f-a2c90531c900"},IOTX:{icon:"34e68754-e536-40da-c153-6ef2e7188a00"}},Jr={externalWallets(){const{isStandalone:t}=Ae.state;if(t)return[];let e=Nt.client().getConnectors();return e=e.filter(r=>r.id!=="injected"),e},manualWallets(){var t,e;const{mobileWallets:r,desktopWallets:n}=jt.state,i=(t=Jr.recentWallet())==null?void 0:t.id,o=Ie.isMobile()?r:n,c=o?.filter(l=>i!==l.id);return(e=Ie.isMobile()?c?.map(({id:l,name:h,links:d})=>({id:l,name:h,mobile:d,links:d})):c?.map(({id:l,name:h,links:d})=>({id:l,name:h,desktop:d,links:d})))!=null?e:[]},installedInjectedWallets(){const{isStandalone:t}=Ae.state;if(t)return[];if(!Nt.client().isInjectedProviderInstalled())return[];const{namespace:e}=Nt.client(),{injectedWallets:r}=rr.state;let n=r.filter(({injected:i})=>!!i.some(o=>Nt.client().safeCheckInjectedProvider(o.injected_id)&&o.namespace===e));return n.length>1&&(n=n.filter(({injected:i})=>!!i.map(({injected_id:o})=>o).every(o=>o!=="isMetaMask"))),n.length?n:[{name:"Browser",id:"browser",image_id:void 0}]},injectedWallets(){const{isStandalone:t}=Ae.state,{explorerExcludedWalletIds:e,explorerRecommendedWalletIds:r}=jt.state,n=Ie.isMobile();if(t||e==="ALL"||n)return[];const{namespace:i}=Nt.client(),{injectedWallets:o}=rr.state;return o.filter(({id:c,injected:l})=>{const h=Ie.isArray(e)?e:[],d=Ie.isArray(r)?r:[];return!!l.some(v=>v.namespace===i&&!h.includes(c)&&!d.includes(c))})},recentWallet(){return xe.getRecentWallet()},recomendedWallets(t=!1){var e;const r=Jr.installedInjectedWallets().map(({id:c})=>c),n=t||(e=Jr.recentWallet())==null?void 0:e.id,i=[...r,n],{recomendedWallets:o}=rr.state;return o.filter(c=>!i.includes(c.id))}},xe={MOBILE_BREAKPOINT:600,W3M_RECENT_WALLET_DATA:"W3M_RECENT_WALLET_DATA",EXPLORER_WALLET_URL:"https://explorer.walletconnect.com/?type=wallet",rejectStandaloneButtonComponent(){const{isStandalone:t}=Ae.state;if(t)throw new Error("Web3Modal button components are not available in standalone mode.")},getShadowRootElement(t,e){const r=t.renderRoot.querySelector(e);if(!r)throw new Error(`${e} not found`);return r},getWalletIcon({id:t,image_id:e}){const{walletImages:r}=jt.state;return r!=null&&r[t]?r[t]:e?rr.getWalletImageUrl(e):""},getWalletName(t,e=!1){return e?t.split(" ")[0]:t},getChainIcon(t){var e;const r=QC[t],{projectId:n,chainImages:i}=jt.state;return(e=i?.[t])!=null?e:n&&r?rr.getAssetImageUrl(r):""},getTokenIcon(t){var e,r;const n=(e=eI[t])==null?void 0:e.icon,{projectId:i,tokenImages:o}=jt.state;return(r=o?.[t])!=null?r:i&&n?rr.getAssetImageUrl(n):""},isMobileAnimation(){return window.innerWidth<=xe.MOBILE_BREAKPOINT},async preloadImage(t){const e=new Promise((r,n)=>{const i=new Image;i.onload=r,i.onerror=n,i.src=t});return Promise.race([e,Ie.wait(3e3)])},getErrorMessage(t){return t instanceof Error?t.message:"Unknown Error"},debounce(t,e=500){let r;return(...n)=>{function i(){t(...n)}r&&clearTimeout(r),r=setTimeout(i,e)}},handleMobileLinking(t){const{standaloneUri:e}=Ae.state,{pairingUri:r}=ur.state,{mobile:n,name:i}=t,o=n?.native,c=n?.universal;xe.setRecentWallet(t);function l(h){let d="";o?d=Ie.formatUniversalUrl(o,h,i):c&&(d=Ie.formatNativeUrl(c,h,i)),Ie.openHref(d,"_self")}l(e||r)},handleAndroidLinking(){const{standaloneUri:t}=Ae.state,{pairingUri:e}=ur.state;t?(Ie.setWalletConnectAndroidDeepLink(t),Ie.openHref(t,"_self")):(Ie.setWalletConnectAndroidDeepLink(e),Ie.openHref(e,"_self"))},async handleUriCopy(){const{standaloneUri:t}=Ae.state,{pairingUri:e}=ur.state;t?await navigator.clipboard.writeText(t):await navigator.clipboard.writeText(e),zr.openToast("Link copied","success")},async handleConnectorConnection(t,e){try{const{selectedChain:r}=Ae.state;await Nt.client().connectConnector(t,r?.id),Rr.close()}catch(r){console.error(r),e?e():zr.openToast(xe.getErrorMessage(r),"error")}},getCustomImageUrls(){const{chainImages:t,walletImages:e}=jt.state,r=Object.values(t??{}),n=Object.values(e??{});return Object.values([...r,...n])},truncate(t,e=8){return t.length<=e?t:`${t.substring(0,4)}...${t.substring(t.length-4)}`},generateAvatarColors(t){var e;const r=(e=t.match(/.{1,7}/g))==null?void 0:e.splice(0,5),n=[];r?.forEach(o=>{let c=0;for(let h=0;h<o.length;h+=1)c=o.charCodeAt(h)+((c<<5)-c),c=c&c;const l=[0,0,0];for(let h=0;h<3;h+=1){const d=c>>h*8&255;l[h]=d}n.push(`rgb(${l[0]}, ${l[1]}, ${l[2]})`)});const i=document.querySelector(":root");if(i){const o={"--w3m-color-av-1":n[0],"--w3m-color-av-2":n[1],"--w3m-color-av-3":n[2],"--w3m-color-av-4":n[3],"--w3m-color-av-5":n[4]};Object.entries(o).forEach(([c,l])=>i.style.setProperty(c,l))}},setRecentWallet(t){const{walletConnectVersion:e}=Ae.state;localStorage.setItem(xe.W3M_RECENT_WALLET_DATA,JSON.stringify({[e]:t}))},getRecentWallet(){const t=localStorage.getItem(xe.W3M_RECENT_WALLET_DATA);if(t){const{walletConnectVersion:e}=Ae.state,r=JSON.parse(t);if(r[e])return r[e]}},caseSafeIncludes(t,e){return t.toUpperCase().includes(e.toUpperCase())},openWalletExplorerUrl(){Ie.openHref(xe.EXPLORER_WALLET_URL,"_blank")},getCachedRouterWalletPlatforms(){const{id:t,desktop:e,mobile:r,injected:n}=Ie.getWalletRouterData(),i=Jr.installedInjectedWallets(),o=!!(n!=null&&n.length),c=i.some(v=>v.id===t),l=!!(e!=null&&e.native),h=!!(e!=null&&e.universal),d=!!(r!=null&&r.native)||!!(r!=null&&r.universal);return{isInjectedInstalled:c,isInjected:o,isDesktop:l,isMobile:d,isWeb:h}},goToConnectingView(t){tt.setData({Wallet:t});const e=Ie.isMobile(),{isDesktop:r,isWeb:n,isMobile:i,isInjectedInstalled:o}=xe.getCachedRouterWalletPlatforms();e?o?tt.push("InjectedConnecting"):i?tt.push("MobileConnecting"):n?tt.push("WebConnecting"):tt.push("InstallWallet"):o?tt.push("InjectedConnecting"):r?tt.push("DesktopConnecting"):n?tt.push("WebConnecting"):i?tt.push("MobileQrcodeConnecting"):tt.push("InstallWallet")}},tI=Ve`.w3m-router{overflow:hidden;will-change:transform}.w3m-content{display:flex;flex-direction:column}`;var rI=Object.defineProperty,nI=Object.getOwnPropertyDescriptor,df=(t,e,r,n)=>{for(var i=n>1?void 0:n?nI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&rI(e,r,i),i};let aa=class extends $e{constructor(){super(),this.view=tt.state.view,this.prevView=tt.state.view,this.unsubscribe=void 0,this.oldHeight="0px",this.resizeObserver=void 0,this.unsubscribe=tt.subscribe(t=>{this.view!==t.view&&this.onChangeRoute()})}firstUpdated(){this.resizeObserver=new ResizeObserver(([t])=>{const e=`${t.contentRect.height}px`;this.oldHeight!=="0px"&&Qi(this.routerEl,{height:[this.oldHeight,e]},{duration:.2}),this.oldHeight=e}),this.resizeObserver.observe(this.contentEl)}disconnectedCallback(){var t,e;(t=this.unsubscribe)==null||t.call(this),(e=this.resizeObserver)==null||e.disconnect()}get routerEl(){return xe.getShadowRootElement(this,".w3m-router")}get contentEl(){return xe.getShadowRootElement(this,".w3m-content")}viewTemplate(){switch(this.view){case"ConnectWallet":return oe`<w3m-connect-wallet-view></w3m-connect-wallet-view>`;case"SelectNetwork":return oe`<w3m-select-network-view></w3m-select-network-view>`;case"InjectedConnecting":return oe`<w3m-injected-connecting-view></w3m-injected-connecting-view>`;case"DesktopConnecting":return oe`<w3m-desktop-connecting-view></w3m-desktop-connecting-view>`;case"MobileConnecting":return oe`<w3m-mobile-connecting-view></w3m-mobile-connecting-view>`;case"WebConnecting":return oe`<w3m-web-connecting-view></w3m-web-connecting-view>`;case"MobileQrcodeConnecting":return oe`<w3m-mobile-qr-connecting-view></w3m-mobile-qr-connecting-view>`;case"GetWallet":return oe`<w3m-get-wallet-view></w3m-get-wallet-view>`;case"WalletExplorer":return oe`<w3m-wallet-explorer-view></w3m-wallet-explorer-view>`;case"Qrcode":return oe`<w3m-qrcode-view></w3m-qrcode-view>`;case"Help":return oe`<w3m-help-view></w3m-help-view>`;case"Account":return oe`<w3m-account-view></w3m-account-view>`;case"SwitchNetwork":return oe`<w3m-switch-network-view></w3m-switch-network-view>`;case"InstallWallet":return oe`<w3m-install-wallet-view></w3m-install-wallet-view>`;default:return oe`<div>Not Found</div>`}}async onChangeRoute(){await Qi(this.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15,delay:.1}).finished,this.view=tt.state.view,Qi(this.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.05})}render(){return oe`<div class="w3m-router"><div class="w3m-content">${this.viewTemplate()}</div></div>`}};aa.styles=[je.globalCss,tI],df([gt()],aa.prototype,"view",2),df([gt()],aa.prototype,"prevView",2),aa=df([Re("w3m-modal-router")],aa);const iI=Ve`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--w3m-notification-border-radius);border:1px solid var(--w3m-color-overlay);background-color:var(--w3m-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--w3m-color-bg-3)}}.w3m-success path{fill:var(--w3m-accent-color)}.w3m-error path{fill:var(--w3m-error-color)}`;var sI=Object.defineProperty,oI=Object.getOwnPropertyDescriptor,K3=(t,e,r,n)=>{for(var i=n>1?void 0:n?oI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&sI(e,r,i),i};let Nc=class extends $e{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=zr.subscribe(t=>{t.open?(this.open=!0,this.timeout=setTimeout(()=>zr.closeToast(),2200)):(this.open=!1,clearTimeout(this.timeout))})}disconnectedCallback(){var t;(t=this.unsubscribe)==null||t.call(this),clearTimeout(this.timeout),zr.closeToast()}render(){const{message:t,variant:e}=zr.state,r={"w3m-success":e==="success","w3m-error":e==="error"};return this.open?oe`<div class="${Nr(r)}">${e==="success"?Ne.CHECKMARK_ICON:null} ${e==="error"?Ne.CROSS_ICON:null}<w3m-text variant="small-regular">${t}</w3m-text></div>`:null}};Nc.styles=[je.globalCss,iI],K3([gt()],Nc.prototype,"open",2),Nc=K3([Re("w3m-modal-toast")],Nc);const aI=Ve`button{padding:5px;border-radius:var(--w3m-button-hover-highlight-border-radius);display:flex;flex-direction:column;align-items:center;justify-content:center;width:80px;height:90px;position:relative}w3m-network-image{width:54px;height:59px}w3m-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;margin-top:5px}button:active{background-color:var(--w3m-color-overlay)}.w3m-unsupported{opacity:.3}@media(hover:hover){button:hover{background-color:var(--w3m-color-overlay)}}`;var cI=Object.defineProperty,lI=Object.getOwnPropertyDescriptor,ca=(t,e,r,n)=>{for(var i=n>1?void 0:n?lI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&cI(e,r,i),i};let ts=class extends $e{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.chainId="",this.unsupported=!1}render(){const t={"w3m-unsupported":this.unsupported};return oe`<button @click="${this.onClick}" class="${Nr(t)}"><w3m-network-image chainId="${this.chainId}"></w3m-network-image><w3m-text variant="xsmall-regular">${this.name}</w3m-text></button>`}};ts.styles=[je.globalCss,aI],ca([Oe()],ts.prototype,"onClick",2),ca([Oe()],ts.prototype,"name",2),ca([Oe()],ts.prototype,"chainId",2),ca([Oe()],ts.prototype,"unsupported",2),ts=ca([Re("w3m-network-button")],ts);const uI=Ve`@keyframes loading{to{stroke-dashoffset:0}}:host{width:inherit;height:inherit;position:relative}path{stroke:var(--w3m-color-overlay)}svg{width:100%;height:100%;margin:0}#network-placeholder-fill{fill:var(--w3m-color-bg-3)}#network-placeholder-dash{stroke:var(--w3m-color-overlay)}image{clip-path:path('M17.033 4.964c3.852-2.262 5.778-3.393 7.84-3.77a11.807 11.807 0 0 1 4.254 0c2.062.377 3.988 1.508 7.84 3.77l6.066 3.562c3.852 2.263 5.777 3.394 7.13 5.022a12.268 12.268 0 0 1 2.127 3.747c.71 2.006.71 4.268.71 8.793v7.124c0 4.525 0 6.787-.71 8.793a12.268 12.268 0 0 1-2.126 3.747c-1.354 1.628-3.28 2.76-7.131 5.022l-6.066 3.562c-3.852 2.262-5.778 3.393-7.84 3.771a11.814 11.814 0 0 1-4.254 0c-2.062-.378-3.988-1.509-7.84-3.77l-6.066-3.563c-3.852-2.263-5.778-3.394-7.13-5.022a12.268 12.268 0 0 1-2.127-3.747C1 40 1 37.737 1 33.212v-7.124c0-4.525 0-6.787.71-8.793a12.268 12.268 0 0 1 2.127-3.747c1.352-1.628 3.278-2.76 7.13-5.022l6.066-3.562Z')}`;var hI=Object.defineProperty,fI=Object.getOwnPropertyDescriptor,G3=(t,e,r,n)=>{for(var i=n>1?void 0:n?fI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&hI(e,r,i),i};let Lc=class extends $e{constructor(){super(...arguments),this.chainId=""}render(){const t=xe.getChainIcon(this.chainId);return t?oe`<svg width="54" height="59" viewBox="0 0 54 59" fill="none"><image href="${t}"/><image href="${t}" width="54" height="59"/><path d="M17.22 5.295c3.877-2.277 5.737-3.363 7.72-3.726a11.44 11.44 0 0 1 4.12 0c1.983.363 3.844 1.45 7.72 3.726l6.065 3.562c3.876 2.276 5.731 3.372 7.032 4.938a11.896 11.896 0 0 1 2.06 3.63c.683 1.928.688 4.11.688 8.663v7.124c0 4.553-.005 6.735-.688 8.664a11.896 11.896 0 0 1-2.06 3.63c-1.3 1.565-3.156 2.66-7.032 4.937l-6.065 3.563c-3.877 2.276-5.737 3.362-7.72 3.725a11.46 11.46 0 0 1-4.12 0c-1.983-.363-3.844-1.449-7.72-3.726l-6.065-3.562c-3.876-2.276-5.731-3.372-7.032-4.938a11.885 11.885 0 0 1-2.06-3.63c-.682-1.928-.688-4.11-.688-8.663v-7.124c0-4.553.006-6.735.688-8.664a11.885 11.885 0 0 1 2.06-3.63c1.3-1.565 3.156-2.66 7.032-4.937l6.065-3.562Z"/></svg>`:oe`${Ne.NETWORK_PLACEHOLDER}`}};Lc.styles=[je.globalCss,uI],G3([Oe()],Lc.prototype,"chainId",2),Lc=G3([Re("w3m-network-image")],Lc);const dI=.1,Z3=2.5,Kn=7;function pf(t,e,r){return t===e?!1:(t-e<0?e-t:t-e)<=r+dI}function pI(t,e){const r=Array.prototype.slice.call(ta.create(t,{errorCorrectionLevel:e}).modules.data,0),n=Math.sqrt(r.length);return r.reduce((i,o,c)=>(c%n===0?i.push([o]):i[i.length-1].push(o))&&i,[])}const gI={generate(t,e,r,n){const i=n==="light"?"#141414":"#fff",o=n==="light"?"#fff":"#141414",c=[],l=pI(t,"Q"),h=e/l.length,d=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];d.forEach(({x:U,y:H})=>{const G=(l.length-Kn)*h*U,N=(l.length-Kn)*h*H,L=.32;for(let $=0;$<d.length;$+=1){const T=h*(Kn-$*2);c.push(ut`<rect fill="${$%2===0?i:o}" height="${T}" rx="${T*L}" ry="${T*L}" width="${T}" x="${G+h*$}" y="${N+h*$}">`)}});const v=Math.floor((r+25)/h),E=l.length/2-v/2,_=l.length/2+v/2-1,O=[];l.forEach((U,H)=>{U.forEach((G,N)=>{if(l[H][N]&&!(H<Kn&&N<Kn||H>l.length-(Kn+1)&&N<Kn||H<Kn&&N>l.length-(Kn+1))&&!(H>E&&H<_&&N>E&&N<_)){const L=H*h+h/2,$=N*h+h/2;O.push([L,$])}})});const P={};return O.forEach(([U,H])=>{P[U]?P[U].push(H):P[U]=[H]}),Object.entries(P).map(([U,H])=>{const G=H.filter(N=>H.every(L=>!pf(N,L,h)));return[Number(U),G]}).forEach(([U,H])=>{H.forEach(G=>{c.push(ut`<circle cx="${U}" cy="${G}" fill="${i}" r="${h/Z3}">`)})}),Object.entries(P).filter(([U,H])=>H.length>1).map(([U,H])=>{const G=H.filter(N=>H.some(L=>pf(N,L,h)));return[Number(U),G]}).map(([U,H])=>{H.sort((N,L)=>N<L?-1:1);const G=[];for(const N of H){const L=G.find($=>$.some(T=>pf(N,T,h)));L?L.push(N):G.push([N])}return[U,G.map(N=>[N[0],N[N.length-1]])]}).forEach(([U,H])=>{H.forEach(([G,N])=>{c.push(ut`<line x1="${U}" x2="${U}" y1="${G}" y2="${N}" stroke="${i}" stroke-width="${h/(Z3/2)}" stroke-linecap="round">`)})}),c}},mI=Ve`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;width:100%;aspect-ratio:1/1;animation:fadeIn ease .2s}svg:first-child,w3m-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}w3m-wallet-image{transform:translateY(-50%) translateX(-50%)}w3m-wallet-image{width:25%;height:25%;border-radius:var(--w3m-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--w3m-accent-color)}svg:first-child path:last-child{stroke:var(--w3m-color-overlay)}`;var wI=Object.defineProperty,vI=Object.getOwnPropertyDescriptor,Ws=(t,e,r,n)=>{for(var i=n>1?void 0:n?vI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&wI(e,r,i),i};let Gn=class extends $e{constructor(){super(...arguments),this.uri="",this.size=0,this.imageId=void 0,this.walletId=void 0,this.imageUrl=void 0}svgTemplate(){var t;const e=(t=Nn.state.themeMode)!=null?t:"light";return ut`<svg height="${this.size}" width="${this.size}">${gI.generate(this.uri,this.size,this.size/4,e)}</svg>`}render(){return oe`<div>${this.walletId||this.imageUrl?oe`<w3m-wallet-image walletId="${this.walletId}" imageId="${this.imageId}" imageUrl="${this.imageUrl}"></w3m-wallet-image>`:Ne.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}<w3m-theme-context></w3m-theme-context></div>`}};Gn.styles=[je.globalCss,mI],Ws([Oe()],Gn.prototype,"uri",2),Ws([Oe({type:Number})],Gn.prototype,"size",2),Ws([Oe()],Gn.prototype,"imageId",2),Ws([Oe()],Gn.prototype,"walletId",2),Ws([Oe()],Gn.prototype,"imageUrl",2),Gn=Ws([Re("w3m-qrcode")],Gn);const yI=Ve`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--w3m-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:transparent;position:absolute;background-color:var(--w3m-color-bg-3);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay)}input::placeholder{color:transparent}svg{margin:2px 4px 0 0}div{top:0;left:calc(50% - 12px);transform:translateX(-50%);transition:.2s all ease;pointer-events:none;display:flex;align-items:center;justify-content:center;height:calc(100% - 2px);width:fit-content;position:relative}input:focus-within+div,input:not(:placeholder-shown)+div{transform:translateX(10px);left:0}w3m-text{opacity:1;transition:.2s opacity ease}input:focus-within+div w3m-text,input:not(:placeholder-shown)+div w3m-text{opacity:0}input:focus-within,input:not(:placeholder-shown){color:var(--w3m-color-fg-1)}input:focus-within{box-shadow:inset 0 0 0 1px var(--w3m-accent-color)}path{fill:var(--w3m-color-fg-2)}`;var bI=Object.defineProperty,_I=Object.getOwnPropertyDescriptor,Y3=(t,e,r,n)=>{for(var i=n>1?void 0:n?_I(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&bI(e,r,i),i};let Mc=class extends $e{constructor(){super(...arguments),this.onChange=()=>null}render(){const t="Search wallets";return oe`<input type="text" @input="${this.onChange}" placeholder="${t}"><div>${Ne.SEARCH_ICON}<w3m-text color="secondary" variant="small-thin">${t}</w3m-text></div>`}};Mc.styles=[je.globalCss,yI],Y3([Oe()],Mc.prototype,"onChange",2),Mc=Y3([Re("w3m-search-input")],Mc);const EI=Ve`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--w3m-accent-color)}`;var xI=Object.defineProperty,CI=Object.getOwnPropertyDescriptor,II=(t,e,r,n)=>{for(var i=n>1?void 0:n?CI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&xI(e,r,i),i};let gf=class extends $e{render(){return oe`<svg viewBox="0 0 50 50" width="24" height="24"><circle cx="25" cy="25" r="20" fill="none" stroke-width="4" stroke="#fff"/></svg>`}};gf.styles=[je.globalCss,EI],gf=II([Re("w3m-spinner")],gf);const SI=Ve`span{font-style:normal;font-family:var(--w3m-font-family);font-feature-settings:'tnum' on,'lnum' on,'case' on}.w3m-xsmall-bold{font-family:var(--w3m-text-xsmall-bold-font-family);font-weight:var(--w3m-text-xsmall-bold-weight);font-size:var(--w3m-text-xsmall-bold-size);line-height:var(--w3m-text-xsmall-bold-line-height);letter-spacing:var(--w3m-text-xsmall-bold-letter-spacing);text-transform:var(--w3m-text-xsmall-bold-text-transform)}.w3m-xsmall-regular{font-family:var(--w3m-text-xsmall-regular-font-family);font-weight:var(--w3m-text-xsmall-regular-weight);font-size:var(--w3m-text-xsmall-regular-size);line-height:var(--w3m-text-xsmall-regular-line-height);letter-spacing:var(--w3m-text-xsmall-regular-letter-spacing);text-transform:var(--w3m-text-xsmall-regular-text-transform)}.w3m-small-thin{font-family:var(--w3m-text-small-thin-font-family);font-weight:var(--w3m-text-small-thin-weight);font-size:var(--w3m-text-small-thin-size);line-height:var(--w3m-text-small-thin-line-height);letter-spacing:var(--w3m-text-small-thin-letter-spacing);text-transform:var(--w3m-text-small-thin-text-transform)}.w3m-small-regular{font-family:var(--w3m-text-small-regular-font-family);font-weight:var(--w3m-text-small-regular-weight);font-size:var(--w3m-text-small-regular-size);line-height:var(--w3m-text-small-regular-line-height);letter-spacing:var(--w3m-text-small-regular-letter-spacing);text-transform:var(--w3m-text-small-regular-text-transform)}.w3m-medium-regular{font-family:var(--w3m-text-medium-regular-font-family);font-weight:var(--w3m-text-medium-regular-weight);font-size:var(--w3m-text-medium-regular-size);line-height:var(--w3m-text-medium-regular-line-height);letter-spacing:var(--w3m-text-medium-regular-letter-spacing);text-transform:var(--w3m-text-medium-regular-text-transform)}.w3m-big-bold{font-family:var(--w3m-text-big-bold-font-family);font-weight:var(--w3m-text-big-bold-weight);font-size:var(--w3m-text-big-bold-size);line-height:var(--w3m-text-big-bold-line-height);letter-spacing:var(--w3m-text-big-bold-letter-spacing);text-transform:var(--w3m-text-big-bold-text-transform)}:host(*){color:var(--w3m-color-fg-1)}.w3m-color-primary{color:var(--w3m-color-fg-1)}.w3m-color-secondary{color:var(--w3m-color-fg-2)}.w3m-color-tertiary{color:var(--w3m-color-fg-3)}.w3m-color-inverse{color:var(--w3m-accent-fill-color)}.w3m-color-accnt{color:var(--w3m-accent-color)}.w3m-color-error{color:var(--w3m-error-color)}`;var OI=Object.defineProperty,DI=Object.getOwnPropertyDescriptor,mf=(t,e,r,n)=>{for(var i=n>1?void 0:n?DI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&OI(e,r,i),i};let la=class extends $e{constructor(){super(...arguments),this.variant="medium-regular",this.color="primary"}render(){const t={"w3m-big-bold":this.variant==="big-bold","w3m-medium-regular":this.variant==="medium-regular","w3m-small-regular":this.variant==="small-regular","w3m-small-thin":this.variant==="small-thin","w3m-xsmall-regular":this.variant==="xsmall-regular","w3m-xsmall-bold":this.variant==="xsmall-bold","w3m-color-primary":this.color==="primary","w3m-color-secondary":this.color==="secondary","w3m-color-tertiary":this.color==="tertiary","w3m-color-inverse":this.color==="inverse","w3m-color-accnt":this.color==="accent","w3m-color-error":this.color==="error"};return oe`<span><slot class="${Nr(t)}"></slot></span>`}};la.styles=[je.globalCss,SI],mf([Oe()],la.prototype,"variant",2),mf([Oe()],la.prototype,"color",2),la=mf([Re("w3m-text")],la);const AI=Ve`div{overflow:hidden;position:relative;border-radius:50%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:50%;border:1px solid var(--w3m-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}svg{width:100%;height:100%}#token-placeholder-fill{fill:var(--w3m-color-bg-3)}#token-placeholder-dash{stroke:var(--w3m-color-overlay)}`;var $I=Object.defineProperty,PI=Object.getOwnPropertyDescriptor,J3=(t,e,r,n)=>{for(var i=n>1?void 0:n?PI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&$I(e,r,i),i};let Uc=class extends $e{constructor(){super(...arguments),this.symbol=void 0}render(){var t;const e=xe.getTokenIcon((t=this.symbol)!=null?t:"");return e?oe`<div><img src="${e}" alt="${this.id}"></div>`:Ne.TOKEN_PLACEHOLDER}};Uc.styles=[je.globalCss,AI],J3([Oe()],Uc.prototype,"symbol",2),Uc=J3([Re("w3m-token-image")],Uc);const TI=Ve`button{width:100%;height:100%;border-radius:var(--w3m-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--w3m-color-overlay)}@media(hover:hover){button:hover{background-color:var(--w3m-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}w3m-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}w3m-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--w3m-wallet-icon-border-radius);margin-bottom:5px}.w3m-sublabel{margin-top:2px}`;var RI=Object.defineProperty,NI=Object.getOwnPropertyDescriptor,_i=(t,e,r,n)=>{for(var i=n>1?void 0:n?NI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&RI(e,r,i),i};let Mn=class extends $e{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.walletId="",this.label=void 0,this.imageId=void 0,this.installed=!1,this.recent=!1}sublabelTemplate(){return this.recent?oe`<w3m-text class="w3m-sublabel" variant="xsmall-bold" color="tertiary">RECENT</w3m-text>`:this.installed?oe`<w3m-text class="w3m-sublabel" variant="xsmall-bold" color="tertiary">INSTALLED</w3m-text>`:null}handleClick(){pi.click({name:"WALLET_BUTTON",walletId:this.walletId}),this.onClick()}render(){var t;return oe`<button @click="${this.handleClick.bind(this)}"><div><w3m-wallet-image walletId="${this.walletId}" imageId="${this.imageId}"></w3m-wallet-image><w3m-text variant="xsmall-regular">${(t=this.label)!=null?t:xe.getWalletName(this.name,!0)}</w3m-text>${this.sublabelTemplate()}</div></button>`}};Mn.styles=[je.globalCss,TI],_i([Oe()],Mn.prototype,"onClick",2),_i([Oe()],Mn.prototype,"name",2),_i([Oe()],Mn.prototype,"walletId",2),_i([Oe()],Mn.prototype,"label",2),_i([Oe()],Mn.prototype,"imageId",2),_i([Oe()],Mn.prototype,"installed",2),_i([Oe()],Mn.prototype,"recent",2),Mn=_i([Re("w3m-wallet-button")],Mn);const LI=Ve`:host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--w3m-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--w3m-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--w3m-color-bg-3)}#wallet-placeholder-dash{stroke:var(--w3m-color-overlay)}`;var MI=Object.defineProperty,UI=Object.getOwnPropertyDescriptor,jc=(t,e,r,n)=>{for(var i=n>1?void 0:n?UI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&MI(e,r,i),i};let qs=class extends $e{constructor(){super(...arguments),this.walletId="",this.imageId=void 0,this.imageUrl=void 0}render(){var t;const e=(t=this.imageUrl)!=null&&t.length?this.imageUrl:xe.getWalletIcon({id:this.walletId,image_id:this.imageId});return oe`${e.length?oe`<div><img src="${e}" alt="${this.id}"></div>`:Ne.WALLET_PLACEHOLDER}`}};qs.styles=[je.globalCss,LI],jc([Oe()],qs.prototype,"walletId",2),jc([Oe()],qs.prototype,"imageId",2),jc([Oe()],qs.prototype,"imageUrl",2),qs=jc([Re("w3m-wallet-image")],qs);var jI=Object.defineProperty,FI=Object.getOwnPropertyDescriptor,BI=(t,e,r,n)=>{for(var i=n>1?void 0:n?FI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&jI(e,r,i),i};let X3=class extends $e{constructor(){super(),this.unwatchAccount=void 0,Et.getAccount(),this.fetchProfile(),this.fetchBalance(),this.unwatchAccount=Nt.client().watchAccount(t=>{const{address:e,isConnected:r}=Et.state;t.isConnected&&t.address!==e&&(this.fetchProfile(t.address),this.fetchBalance(t.address),Et.setAddress(t.address)),t.isConnected||Et.resetAccount(),r!==t.isConnected&&Rr.close(),!r&&t.isConnected?pi.track({name:"ACCOUNT_CONNECTED"}):r&&!t.isConnected&&pi.track({name:"ACCOUNT_DISCONNECTED"}),Et.setIsConnected(t.isConnected)})}disconnectedCallback(){var t;(t=this.unwatchAccount)==null||t.call(this)}async fetchProfile(t){var e;const r=(e=Ae.state.chains)==null?void 0:e.find(n=>n.id===1);if(jt.state.enableAccountView&&r)try{await Et.fetchProfile(xe.preloadImage,t)}catch(n){console.error(n),zr.openToast(xe.getErrorMessage(n),"error")}}async fetchBalance(t){if(jt.state.enableAccountView)try{await Et.fetchBalance(t)}catch(e){console.error(e),zr.openToast(xe.getErrorMessage(e),"error")}}};X3=BI([Re("w3m-account-context")],X3);var kI=Object.defineProperty,HI=Object.getOwnPropertyDescriptor,Q3=(t,e,r,n)=>{for(var i=n>1?void 0:n?HI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&kI(e,r,i),i};let wf=class extends $e{constructor(){super(),this.preload=!0,this.preloadData()}async loadImages(t){try{t!=null&&t.length&&await Promise.all(t.map(async e=>xe.preloadImage(e)))}catch{console.info("Unsuccessful attempt at preloading some images",t)}}async preloadListings(){var t;if(jt.state.enableExplorer){const{chains:e}=Ae.state;await Promise.all([rr.getRecomendedWallets(),rr.getInjectedWallets()]),Ae.setIsDataLoaded(!0);const{recomendedWallets:r}=rr.state,n=Jr.installedInjectedWallets(),i=(t=e?.map(l=>xe.getChainIcon(l.id)))!=null?t:[],o=r.map(l=>xe.getWalletIcon(l)),c=n.map(l=>xe.getWalletIcon(l));await this.loadImages([...i,...o,...c])}else Ae.setIsDataLoaded(!0)}async preloadCustomImages(){const t=xe.getCustomImageUrls();await this.loadImages(t)}async preloadData(){try{this.preload&&(this.preload=!1,await Promise.all([this.preloadListings(),this.preloadCustomImages()]))}catch(t){console.error(t),zr.openToast("Failed preloading","error")}}};Q3([gt()],wf.prototype,"preload",2),wf=Q3([Re("w3m-explorer-context")],wf);var zI=Object.defineProperty,WI=Object.getOwnPropertyDescriptor,em=(t,e,r,n)=>{for(var i=n>1?void 0:n?WI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&zI(e,r,i),i};let vf=class extends $e{constructor(){super(),this.activeChainId=void 0,this.unwatchNetwork=void 0;const t=Ae.getSelectedChain();this.activeChainId=t?.id,this.unwatchNetwork=Nt.client().watchNetwork(e=>{const r=e.chain;r&&this.activeChainId!==r.id&&(Ae.setSelectedChain(r),this.activeChainId=r.id,Et.resetBalance(),this.fetchBalance())})}disconnectedCallback(){var t;(t=this.unwatchNetwork)==null||t.call(this)}async fetchBalance(){if(jt.state.enableAccountView)try{await Et.fetchBalance()}catch(t){console.error(t),zr.openToast(xe.getErrorMessage(t),"error")}}};em([gt()],vf.prototype,"activeChainId",2),vf=em([Re("w3m-network-context")],vf);var qI=Object.defineProperty,VI=Object.getOwnPropertyDescriptor,KI=(t,e,r,n)=>{for(var i=n>1?void 0:n?VI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&qI(e,r,i),i};let tm=class extends $e{constructor(){super(),this.unsubscribeTheme=void 0,je.setTheme(),this.unsubscribeTheme=Nn.subscribe(je.setTheme),this.preloadThemeImages()}disconnectedCallback(){var t;(t=this.unsubscribeTheme)==null||t.call(this)}async preloadThemeImages(){try{const{themeVariables:t}=Nn.state,e=[t?.["--w3m-background-image-url"],t?.["--w3m-logo-image-url"]].filter(Boolean);e.length&&await Promise.all(e.map(async r=>xe.preloadImage(r)))}catch{console.info("Unsuccessful attempt at preloading some images")}}};tm=KI([Re("w3m-theme-context")],tm);var GI=Object.defineProperty,ZI=Object.getOwnPropertyDescriptor,YI=(t,e,r,n)=>{for(var i=n>1?void 0:n?ZI(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&GI(e,r,i),i};const JI=18e4,rm=1e3;var nm;let im=class extends $e{constructor(){super(),this.unwatchOptions=void 0,this.unwatchAccount=void 0,this.timeout=void 0,this.isGenerated=!1,this.selectedChainId=(nm=Ae.state.selectedChain)==null?void 0:nm.id,this.isAccountConnected=Et.state.isConnected,this.lastRetry=Date.now(),this.unwatchOptions=Ae.subscribe(t=>{var e,r;((e=t.selectedChain)==null?void 0:e.id)!==this.selectedChainId&&(this.selectedChainId=(r=t.selectedChain)==null?void 0:r.id,this.connectAndWait())}),this.unwatchAccount=Et.subscribe(t=>{(this.isAccountConnected!==t.isConnected||!this.isGenerated)&&(this.isAccountConnected=t.isConnected,setTimeout(this.connectAndWait.bind(this),0))}),document.addEventListener("visibilitychange",this.onVisibilityChange.bind(this))}disconnectedCallback(){var t,e;(t=this.unwatchOptions)==null||t.call(this),(e=this.unwatchAccount)==null||e.call(this),document.removeEventListener("visibilitychange",this.onVisibilityChange)}async connectAndWait(){if(clearTimeout(this.timeout),!this.isAccountConnected){this.isGenerated=!0,this.timeout=setTimeout(this.connectAndWait.bind(this),JI);try{const{standaloneUri:t,selectedChain:e}=Ae.state;t?ur.setPairingUri(t):await Nt.client().connectWalletConnect(r=>ur.setPairingUri(r),e?.id)}catch(t){console.error(t),ur.setPairingError(!0),zr.openToast("Connection request declined","error"),Date.now()-this.lastRetry>=rm&&(this.lastRetry=Date.now(),this.connectAndWait())}}}onVisibilityChange(){!document.hidden&&Ie.isMobile()&&setTimeout(this.connectAndWait.bind(this),rm)}};im=YI([Re("w3m-wc-connection-context")],im);const XI=Ve`:host{all:initial}div{display:flex;align-items:center;background-color:var(--w3m-color-overlay);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);border-radius:var(--w3m-button-border-radius);padding:4px 4px 4px 8px}div button{border-radius:var(--w3m-secondary-button-border-radius);padding:4px 8px;padding-left:4px;height:auto;margin-left:10px;color:var(--w3m-accent-fill-color);background-color:var(--w3m-accent-color)}.w3m-no-avatar{padding-left:8px}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--w3m-color-overlay)}button:hover::after{background-color:var(--w3m-color-overlay)}w3m-avatar{margin-right:6px}w3m-button-big w3m-avatar{margin-left:-5px}`;var QI=Object.defineProperty,eS=Object.getOwnPropertyDescriptor,yf=(t,e,r,n)=>{for(var i=n>1?void 0:n?eS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&QI(e,r,i),i};let Vs=class extends $e{constructor(){super(),this.balance="hide",this.avatar="show",xe.rejectStandaloneButtonComponent()}onOpen(){const{isStandalone:t}=Ae.state;t||(pi.click({name:"ACCOUNT_BUTTON"}),Rr.open({route:"Account"}))}accountTemplate(){const t=this.avatar==="show";return oe`${t?oe`<w3m-avatar></w3m-avatar>`:null}<w3m-address-text></w3m-address-text>`}render(){const t=this.balance==="show",e={"w3m-no-avatar":this.avatar==="hide"};return t?oe`<div><w3m-balance></w3m-balance><button @click="${this.onOpen}" class="${Nr(e)}">${this.accountTemplate()}</button></div>`:oe`<w3m-button-big @click="${this.onOpen}">${this.accountTemplate()}</w3m-button-big>`}};Vs.styles=[je.globalCss,XI],yf([Oe()],Vs.prototype,"balance",2),yf([Oe()],Vs.prototype,"avatar",2),Vs=yf([Re("w3m-account-button")],Vs);const tS=Ve`button{display:flex;border-radius:var(--w3m-button-hover-highlight-border-radius);flex-direction:column;justify-content:center;padding:5px;width:100px}button:active{background-color:var(--w3m-color-overlay)}@media(hover:hover){button:hover{background-color:var(--w3m-color-overlay)}}button:disabled{pointer-events:none}w3m-network-image{width:32px;height:32px}w3m-text{margin-top:4px}`;var rS=Object.defineProperty,nS=Object.getOwnPropertyDescriptor,bf=(t,e,r,n)=>{for(var i=n>1?void 0:n?nS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&rS(e,r,i),i};let ua=class extends $e{constructor(){super(),this.chainId=0,this.label="",this.unsubscribeNetwork=void 0;const{selectedChain:t}=Ae.state;this.chainId=t?.id,this.label=t?.name,this.unsubscribeNetwork=Ae.subscribe(({selectedChain:e})=>{this.chainId=e?.id,this.label=e?.name})}disconnectedCallback(){var t;(t=this.unsubscribeNetwork)==null||t.call(this)}onClick(){tt.push("SelectNetwork")}render(){const{chains:t,selectedChain:e}=Ae.state,r=t?.map(o=>o.id),n=e&&r?.includes(e.id),i=t&&t.length<=1&&n;return oe`<button @click="${this.onClick}" ?disabled="${i}"><w3m-network-image chainId="${this.chainId}"></w3m-network-image><w3m-text variant="xsmall-regular" color="accent">${this.label}</w3m-text></button>`}};ua.styles=[je.globalCss,tS],bf([gt()],ua.prototype,"chainId",2),bf([gt()],ua.prototype,"label",2),ua=bf([Re("w3m-account-network-button")],ua);const iS=Ve`@keyframes slide{0%{background-position:0 0}100%{background-position:200px 0}}w3m-text{padding:1px 0}.w3m-loading{background:linear-gradient(270deg,var(--w3m-color-fg-1) 36.33%,var(--w3m-color-fg-3) 42.07%,var(--w3m-color-fg-1) 83.3%);background-size:200px 100%;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation-name:slide;animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:linear}`;var sS=Object.defineProperty,oS=Object.getOwnPropertyDescriptor,ha=(t,e,r,n)=>{for(var i=n>1?void 0:n?oS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&sS(e,r,i),i};let rs=class extends $e{constructor(){super(),this.address=void 0,this.name=void 0,this.loading=!0,this.variant="button",this.unsubscribeAccount=void 0,this.address=Et.state.address,this.name=Et.state.profileName,this.loading=!!Et.state.profileLoading,this.unsubscribeAccount=Et.subscribe(({address:t,profileName:e,profileLoading:r})=>{this.address=t,this.name=e,this.loading=!!r})}disconnectedCallback(){var t;(t=this.unsubscribeAccount)==null||t.call(this)}render(){var t;const e=this.variant==="button",r={"w3m-loading":this.loading};return oe`<w3m-text class="${Nr(r)}" variant="${e?"medium-regular":"big-bold"}" color="${e?"inverse":"primary"}">${this.name?this.name:xe.truncate((t=this.address)!=null?t:"")}</w3m-text>`}};rs.styles=[je.globalCss,iS],ha([gt()],rs.prototype,"address",2),ha([gt()],rs.prototype,"name",2),ha([gt()],rs.prototype,"loading",2),ha([Oe()],rs.prototype,"variant",2),rs=ha([Re("w3m-address-text")],rs);const Lr={onConnecting(t){xe.goToConnectingView(t)},onExternal(t){xe.handleConnectorConnection(t)},manualWalletsTemplate(){return Jr.manualWallets().map(t=>oe`<w3m-wallet-button walletId="${t.id}" name="${t.name}" .onClick="${()=>this.onConnecting(t)}"></w3m-wallet-button>`)},recomendedWalletsTemplate(t=!1){return Jr.recomendedWallets(t).map(e=>oe`<w3m-wallet-button walletId="${e.id}" imageId="${e.image_id}" name="${e.name}" .onClick="${()=>this.onConnecting(e)}"></w3m-wallet-button>`)},externalWalletsTemplate(){return Jr.externalWallets().map(t=>oe`<w3m-wallet-button name="${t.name}" walletId="${t.id}" .onClick="${()=>this.onExternal(t.id)}"></w3m-wallet-button>`)},recentWalletTemplate(){const t=Jr.recentWallet();if(t)return oe`<w3m-wallet-button name="${t.name}" walletId="${t.id}" imageId="${t.image_id}" .recent="${!0}" .onClick="${()=>this.onConnecting(t)}"></w3m-wallet-button>`},installedInjectedWalletsTemplate(){return Jr.installedInjectedWallets().map(t=>oe`<w3m-wallet-button .installed="${!0}" name="${t.name}" walletId="${t.id}" imageId="${t.image_id}" .onClick="${()=>this.onConnecting(t)}"></w3m-wallet-button>`)},injectedWalletsTemplate(){return Jr.injectedWallets().map(t=>oe`<w3m-wallet-button name="${t.name}" walletId="${t.id}" imageId="${t.image_id}" .onClick="${()=>this.onConnecting(t)}"></w3m-wallet-button>`)}},aS=Ve`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.w3m-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.w3m-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.w3m-track svg{margin:0 5px}w3m-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--w3m-wallet-icon-border-radius)}.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.w3m-title{display:flex;align-items:center;margin-bottom:10px}.w3m-title svg{margin-right:6px}.w3m-title path{fill:var(--w3m-accent-color)}w3m-modal-footer .w3m-title{padding:0 10px}w3m-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--w3m-color-bg-1))}w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-info-footer w3m-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--w3m-color-bg-3)}#wallet-placeholder-dash{stroke:var(--w3m-color-overlay)}`;var cS=Object.defineProperty,lS=Object.getOwnPropertyDescriptor,uS=(t,e,r,n)=>{for(var i=n>1?void 0:n?lS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&cS(e,r,i),i};let _f=class extends $e{onGoToQrcode(){tt.push("Qrcode")}onGetWallet(){tt.push("GetWallet")}render(){const{recomendedWallets:t}=rr.state,e=[...t,...t],r=Lr.externalWalletsTemplate(),n=Lr.installedInjectedWalletsTemplate(),i=[...n,...r].length>0,o=Ie.RECOMMENDED_WALLET_AMOUNT*2;return oe`<w3m-modal-header title="Connect your wallet" .onAction="${this.onGoToQrcode}" .actionIcon="${Ne.QRCODE_ICON}"></w3m-modal-header><w3m-modal-content><div class="w3m-title">${Ne.MOBILE_ICON}<w3m-text variant="small-regular" color="accent">WalletConnect</w3m-text></div><div class="w3m-slider"><div class="w3m-track">${[...Array(o)].map((c,l)=>{const h=e[l%e.length];return h?oe`<w3m-wallet-image walletId="${h.id}" imageId="${h.image_id}"></w3m-wallet-image>`:Ne.WALLET_PLACEHOLDER})}</div><w3m-button-big @click="${xe.handleAndroidLinking}"><w3m-text variant="medium-regular" color="inverse">Select Wallet</w3m-text></w3m-button-big></div></w3m-modal-content>${i?oe`<w3m-modal-footer><div class="w3m-title">${Ne.WALLET_ICON}<w3m-text variant="small-regular" color="accent">Other</w3m-text></div><div class="w3m-grid">${n} ${r}</div></w3m-modal-footer>`:null}<w3m-info-footer><w3m-text color="secondary" variant="small-thin">${`Choose WalletConnect to see supported apps on your device${i?", or select from other options":""}`}</w3m-text><w3m-button variant="outline" .iconRight="${Ne.ARROW_UP_RIGHT_ICON}" .onClick="${()=>this.onGetWallet()}">I don't have a wallet</w3m-button></w3m-info-footer>`}};_f.styles=[je.globalCss,aS],_f=uS([Re("w3m-android-wallet-selection")],_f);const hS=Ve`@keyframes slide{0%{transform:translateX(-50px)}100%{transform:translateX(200px)}}.w3m-placeholder,img{border-radius:50%;box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);display:block;position:relative;overflow:hidden!important;background-color:var(--w3m-color-av-1);background-image:radial-gradient(at 66% 77%,var(--w3m-color-av-2) 0,transparent 50%),radial-gradient(at 29% 97%,var(--w3m-color-av-3) 0,transparent 50%),radial-gradient(at 99% 86%,var(--w3m-color-av-4) 0,transparent 50%),radial-gradient(at 29% 88%,var(--w3m-color-av-5) 0,transparent 50%);transform:translateZ(0)}.w3m-loader{width:50px;height:100%;background:linear-gradient(270deg,transparent 0,rgba(255,255,255,.4) 30%,transparent 100%);animation-name:slide;animation-duration:1.5s;transform:translateX(-50px);animation-iteration-count:infinite;animation-timing-function:linear;animation-delay:.55s}.w3m-small{width:24px;height:24px}.w3m-medium{width:60px;height:60px}`;var fS=Object.defineProperty,dS=Object.getOwnPropertyDescriptor,fa=(t,e,r,n)=>{for(var i=n>1?void 0:n?dS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&fS(e,r,i),i};let ns=class extends $e{constructor(){super(),this.address=void 0,this.avatar=void 0,this.loading=!0,this.size="small",this.unsubscribeAccount=void 0,this.address=Et.state.address,this.avatar=Et.state.profileAvatar,this.loading=!!Et.state.profileLoading,this.unsubscribeAccount=Et.subscribe(({address:t,profileAvatar:e,profileLoading:r})=>{this.address=t,this.avatar=e,this.loading=!!r})}disconnectedCallback(){var t;(t=this.unsubscribeAccount)==null||t.call(this)}render(){const t={"w3m-placeholder":!0,"w3m-small":this.size==="small","w3m-medium":this.size==="medium"};return this.avatar?oe`<img class="${Nr(t)}" src="${this.avatar}">`:this.address?(xe.generateAvatarColors(this.address),oe`<div class="${Nr(t)}">${this.loading?oe`<div class="w3m-loader"></div>`:null}</div>`):null}};ns.styles=[je.globalCss,hS],fa([gt()],ns.prototype,"address",2),fa([gt()],ns.prototype,"avatar",2),fa([gt()],ns.prototype,"loading",2),fa([Oe()],ns.prototype,"size",2),ns=fa([Re("w3m-avatar")],ns);const pS=Ve`div{display:flex;align-items:center}w3m-token-image{width:28px;height:28px;margin-right:6px}`;var gS=Object.defineProperty,mS=Object.getOwnPropertyDescriptor,Ef=(t,e,r,n)=>{for(var i=n>1?void 0:n?mS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&gS(e,r,i),i};let da=class extends $e{constructor(){var t,e;super(),this.symbol=void 0,this.amount=void 0,this.unsubscribeAccount=void 0,this.symbol=(t=Et.state.balance)==null?void 0:t.symbol,this.amount=(e=Et.state.balance)==null?void 0:e.amount,this.unsubscribeAccount=Et.subscribe(({balance:r})=>{this.symbol=r?.symbol,this.amount=r?.amount})}disconnectedCallback(){var t;(t=this.unsubscribeAccount)==null||t.call(this)}render(){let t="_._";return this.amount==="0.0"?t=0:typeof this.amount=="string"&&this.amount.length>6?t=parseFloat(this.amount).toFixed(3):typeof this.amount=="string"&&(t=parseFloat(this.amount)),oe`<div><w3m-token-image symbol="${this.symbol}"></w3m-token-image><w3m-text variant="medium-regular" color="primary">${t} ${this.symbol}</w3m-text></div>`}};da.styles=[je.globalCss,pS],Ef([gt()],da.prototype,"symbol",2),Ef([gt()],da.prototype,"amount",2),da=Ef([Re("w3m-balance")],da);const wS=Ve`:host{all:initial}svg{width:28px;height:20px;margin:-1px 3px 0 -5px}svg path{fill:var(--w3m-accent-fill-color)}button:disabled svg path{fill:var(--w3m-color-fg-3)}w3m-spinner{margin:0 10px 0 0}`;var vS=Object.defineProperty,yS=Object.getOwnPropertyDescriptor,Fc=(t,e,r,n)=>{for(var i=n>1?void 0:n?yS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&vS(e,r,i),i};let is=class extends $e{constructor(){super(),this.loading=!1,this.label="Connect Wallet",this.icon="show",this.modalUnsub=void 0,xe.rejectStandaloneButtonComponent(),this.modalUnsub=Rr.subscribe(t=>{t.open&&(this.loading=!0),t.open||(this.loading=!1)})}disconnectedCallback(){var t;(t=this.modalUnsub)==null||t.call(this)}iconTemplate(){return this.icon==="show"?Ne.WALLET_CONNECT_ICON:null}onClick(){Et.state.isConnected?this.onDisconnect():this.onConnect()}async onConnect(){this.loading=!0,pi.click({name:"CONNECT_BUTTON"}),await Rr.open(),Rr.state.open||(this.loading=!1)}async onDisconnect(){pi.click({name:"DISCONNECT_BUTTON"}),await Nt.client().disconnect()}render(){return oe`<w3m-button-big .disabled="${this.loading}" @click="${this.onClick}">${this.loading?oe`<w3m-spinner></w3m-spinner><w3m-text variant="medium-regular" color="accent">Connecting...</w3m-text>`:oe`${this.iconTemplate()}<w3m-text variant="medium-regular" color="inverse">${this.label}</w3m-text>`}</w3m-button-big>`}};is.styles=[je.globalCss,wS],Fc([gt()],is.prototype,"loading",2),Fc([Oe()],is.prototype,"label",2),Fc([Oe()],is.prototype,"icon",2),is=Fc([Re("w3m-connect-button")],is);const bS=Ve`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--w3m-accent-color);animation:loading 1s linear infinite}w3m-wallet-image{border-radius:var(--w3m-wallet-icon-large-border-radius);width:90px;height:90px}w3m-text{margin-bottom:40px}.w3m-error svg{stroke:var(--w3m-error-color)}.w3m-error use{display:none}.w3m-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.w3m-stale svg,.w3m-stale use{display:none}`;var _S=Object.defineProperty,ES=Object.getOwnPropertyDescriptor,Ks=(t,e,r,n)=>{for(var i=n>1?void 0:n?ES(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&_S(e,r,i),i};let Ei=class extends $e{constructor(){super(...arguments),this.walletId=void 0,this.imageId=void 0,this.isError=!1,this.isStale=!1,this.label=""}svgLoaderTemplate(){var t,e;const r=(e=(t=Nn.state.themeVariables)==null?void 0:t["--w3m-wallet-icon-large-border-radius"])!=null?e:je.getPreset("--w3m-wallet-icon-large-border-radius");let n=0;r.includes("%")?n=88/100*parseInt(r,10):n=parseInt(r,10),n*=1.17;const i=317-n*1.57,o=425-n*1.8;return oe`<svg viewBox="0 0 110 110" width="110" height="110"><rect id="w3m-loader" x="2" y="2" width="106" height="106" rx="${n}"/><use xlink:href="#w3m-loader" stroke-dasharray="106 ${i}" stroke-dashoffset="${o}"></use></svg>`}render(){const t={"w3m-error":this.isError,"w3m-stale":this.isStale};return oe`<div class="${Nr(t)}">${this.svgLoaderTemplate()}<w3m-wallet-image walletId="${this.walletId}" imageId="${this.imageId}"></w3m-wallet-image></div><w3m-text variant="medium-regular" color="${this.isError?"error":"primary"}">${this.isError?"Connection declined":this.label}</w3m-text>`}};Ei.styles=[je.globalCss,bS],Ks([Oe()],Ei.prototype,"walletId",2),Ks([Oe()],Ei.prototype,"imageId",2),Ks([Oe()],Ei.prototype,"isError",2),Ks([Oe()],Ei.prototype,"isStale",2),Ks([Oe()],Ei.prototype,"label",2),Ei=Ks([Re("w3m-connector-waiting")],Ei);var xS=Object.defineProperty,CS=Object.getOwnPropertyDescriptor,Gs=(t,e,r,n)=>{for(var i=n>1?void 0:n?CS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&xS(e,r,i),i};let xi=class extends $e{constructor(){super(),this.isConnected=!1,this.label="Connect Wallet",this.icon="show",this.avatar="show",this.balance="hide",this.unsubscribeAccount=void 0,xe.rejectStandaloneButtonComponent(),this.isConnected=Et.state.isConnected,this.unsubscribeAccount=Et.subscribe(({isConnected:t})=>{this.isConnected=t})}disconnectedCallback(){var t;(t=this.unsubscribeAccount)==null||t.call(this)}render(){const{enableAccountView:t}=jt.state,e=this.balance,r=this.label,n=this.icon,i=this.avatar;return this.isConnected&&t?oe`<w3m-account-button balance="${e}" avatar="${i}"></w3m-account-button>`:oe`<w3m-connect-button label="${this.isConnected?"Disconnect":r}" icon="${n}"></w3m-connect-button>`}};Gs([gt()],xi.prototype,"isConnected",2),Gs([Oe()],xi.prototype,"label",2),Gs([Oe()],xi.prototype,"icon",2),Gs([Oe()],xi.prototype,"avatar",2),Gs([Oe()],xi.prototype,"balance",2),xi=Gs([Re("w3m-core-button")],xi);const IS=Ve`.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.w3m-desktop-title,.w3m-mobile-title{display:flex;align-items:center}.w3m-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.w3m-desktop-title{margin-bottom:10px;padding:0 10px}.w3m-subtitle{display:flex;align-items:center}.w3m-subtitle:last-child path{fill:var(--w3m-color-fg-3)}.w3m-desktop-title svg,.w3m-mobile-title svg{margin-right:6px}.w3m-desktop-title path,.w3m-mobile-title path{fill:var(--w3m-accent-color)}`;var SS=Object.defineProperty,OS=Object.getOwnPropertyDescriptor,DS=(t,e,r,n)=>{for(var i=n>1?void 0:n?OS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&SS(e,r,i),i};let xf=class extends $e{render(){const{isStandalone:t}=Ae.state,{explorerExcludedWalletIds:e,enableExplorer:r}=jt.state,n=e!=="ALL"&&r,i=Lr.manualWalletsTemplate(),o=Lr.recomendedWalletsTemplate(),c=Lr.externalWalletsTemplate(),l=Lr.recentWalletTemplate(),h=Lr.installedInjectedWalletsTemplate();let d=[l,...i,...o];t||(d=[...h,l,...c,...i,...o]),d=d.filter(Boolean);const v=d.length>4||n;let E=[];v?E=d.slice(0,3):E=d;const _=!!E.length;return oe`<w3m-modal-header .border="${!0}" title="Connect your wallet" .onAction="${xe.handleUriCopy}" .actionIcon="${Ne.COPY_ICON}"></w3m-modal-header><w3m-modal-content><div class="w3m-mobile-title"><div class="w3m-subtitle">${Ne.MOBILE_ICON}<w3m-text variant="small-regular" color="accent">Mobile</w3m-text></div><div class="w3m-subtitle">${Ne.SCAN_ICON}<w3m-text variant="small-regular" color="secondary">Scan with your wallet</w3m-text></div></div><w3m-walletconnect-qr></w3m-walletconnect-qr></w3m-modal-content>${_?oe`<w3m-modal-footer><div class="w3m-desktop-title">${Ne.DESKTOP_ICON}<w3m-text variant="small-regular" color="accent">Desktop</w3m-text></div><div class="w3m-grid">${E} ${v?oe`<w3m-view-all-wallets-button></w3m-view-all-wallets-button>`:null}</div></w3m-modal-footer>`:null}`}};xf.styles=[je.globalCss,IS],xf=DS([Re("w3m-desktop-wallet-selection")],xf);const AS=Ve`div{background-color:var(--w3m-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--w3m-color-bg-3);text-align:center}a{color:var(--w3m-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}`;var $S=Object.defineProperty,PS=Object.getOwnPropertyDescriptor,TS=(t,e,r,n)=>{for(var i=n>1?void 0:n?PS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&$S(e,r,i),i};let Cf=class extends $e{render(){const{termsOfServiceUrl:t,privacyPolicyUrl:e}=jt.state;return t??e?oe`<div><w3m-text variant="small-regular" color="secondary">By connecting your wallet to this app, you agree to the app's ${t?oe`<a href="${t}" target="_blank" rel="noopener noreferrer">Terms of Service</a>`:null} ${t&&e?"and":null} ${e?oe`<a href="${e}" target="_blank" rel="noopener noreferrer">Privacy Policy</a>`:null}</w3m-text></div>`:null}};Cf.styles=[je.globalCss,AS],Cf=TS([Re("w3m-legal-notice")],Cf);const RS=Ve`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;var NS=Object.defineProperty,LS=Object.getOwnPropertyDescriptor,MS=(t,e,r,n)=>{for(var i=n>1?void 0:n?LS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&NS(e,r,i),i};let If=class extends $e{onQrcode(){tt.push("Qrcode")}render(){const{isStandalone:t}=Ae.state,{explorerExcludedWalletIds:e,enableExplorer:r}=jt.state,n=e!=="ALL"&&r,i=Lr.manualWalletsTemplate(),o=Lr.recomendedWalletsTemplate(),c=Lr.externalWalletsTemplate(),l=Lr.recentWalletTemplate(),h=Lr.installedInjectedWalletsTemplate();let d=[l,...i,...o];t||(d=[...h,l,...c,...i,...o]),d=d.filter(Boolean);const v=d.length>8||n;let E=[];v?E=d.slice(0,7):E=d;const _=!!E.length;return oe`<w3m-modal-header title="Connect your wallet" .onAction="${this.onQrcode}" .actionIcon="${Ne.QRCODE_ICON}"></w3m-modal-header>${_?oe`<w3m-modal-content><div>${E} ${v?oe`<w3m-view-all-wallets-button></w3m-view-all-wallets-button>`:null}</div></w3m-modal-content>`:null}`}};If.styles=[je.globalCss,RS],If=MS([Re("w3m-mobile-wallet-selection")],If);const US=Ve`:host{all:initial}.w3m-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--w3m-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;background-color:rgba(0,0,0,.3);opacity:0;pointer-events:none}@media(max-height:720px) and (orientation:landscape){.w3m-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.w3m-active{pointer-events:auto}.w3m-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--w3m-background-border-radius) var(--w3m-background-border-radius) var(--w3m-container-border-radius) var(--w3m-container-border-radius);border:1px solid var(--w3m-color-overlay);overflow:hidden}.w3m-card{width:100%;position:relative;border-radius:var(--w3m-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--w3m-color-overlay);background-color:var(--w3m-color-bg-1);color:var(--w3m-color-fg-1)}@media(max-width:600px){.w3m-container{max-width:440px;border-radius:var(--w3m-background-border-radius) var(--w3m-background-border-radius) 0 0}.w3m-card{border-radius:var(--w3m-container-border-radius) var(--w3m-container-border-radius) 0 0}.w3m-overlay{align-items:flex-end}}@media(max-width:440px){.w3m-container{border:0}}`;var jS=Object.defineProperty,FS=Object.getOwnPropertyDescriptor,Sf=(t,e,r,n)=>{for(var i=n>1?void 0:n?FS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&jS(e,r,i),i};let Zs=class extends $e{constructor(){super(),this.open=!1,this.active=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=Rr.subscribe(t=>{t.open?this.onOpenModalEvent():this.onCloseModalEvent()})}disconnectedCallback(){var t;(t=this.unsubscribeModal)==null||t.call(this)}get overlayEl(){return xe.getShadowRootElement(this,".w3m-overlay")}get containerEl(){return xe.getShadowRootElement(this,".w3m-container")}toggleBodyScroll(t){document.querySelector("body")&&(t?document.getElementById("w3m-styles")?.remove():document.head.insertAdjacentHTML("beforeend",'<style id="w3m-styles">html,body{touch-action:none;overflow:hidden;overscroll-behavior:contain;}</style>'))}onCloseModal(t){t.target===t.currentTarget&&Rr.close()}onOpenModalEvent(){this.toggleBodyScroll(!1),this.addKeyboardEvents(),this.open=!0,setTimeout(async()=>{const t=xe.isMobileAnimation()?{y:["50vh","0vh"]}:{scale:[.98,1]},e=.1,r=.2;await Promise.all([Qi(this.overlayEl,{opacity:[0,1]},{delay:e,duration:r}).finished,Qi(this.containerEl,t,{delay:e,duration:r}).finished]),this.active=!0},0)}async onCloseModalEvent(){this.toggleBodyScroll(!0),this.removeKeyboardEvents();const t=xe.isMobileAnimation()?{y:["0vh","50vh"]}:{scale:[1,.98]},e=.2;await Promise.all([Qi(this.overlayEl,{opacity:[1,0]},{duration:e}).finished,Qi(this.containerEl,t,{duration:e}).finished]),this.containerEl.removeAttribute("style"),this.active=!1,this.open=!1}addKeyboardEvents(){this.abortController=new AbortController,window.addEventListener("keydown",t=>{var e;t.key==="Escape"?Rr.close():t.key==="Tab"&&((e=t.target)!=null&&e.tagName.includes("W3M-")||this.containerEl.focus())},this.abortController),this.containerEl.focus()}removeKeyboardEvents(){var t;(t=this.abortController)==null||t.abort(),this.abortController=void 0}managedModalContextTemplate(){const{isStandalone:t}=Ae.state;return t?null:oe`<w3m-wc-connection-context></w3m-wc-connection-context><w3m-account-context></w3m-account-context><w3m-network-context></w3m-network-context>`}render(){const t={"w3m-overlay":!0,"w3m-active":this.active};return oe`<w3m-explorer-context></w3m-explorer-context><w3m-theme-context></w3m-theme-context>${this.managedModalContextTemplate()}<div id="w3m-modal" class="${Nr(t)}" @click="${this.onCloseModal}" role="alertdialog" aria-modal="true"><div class="w3m-container" tabindex="0">${this.open?oe`<w3m-modal-backcard></w3m-modal-backcard><div class="w3m-card"><w3m-modal-router></w3m-modal-router><w3m-modal-toast></w3m-modal-toast></div>`:null}</div></div>`}};Zs.styles=[je.globalCss,US],Sf([gt()],Zs.prototype,"open",2),Sf([gt()],Zs.prototype,"active",2),Zs=Sf([Re("w3m-modal")],Zs);const BS=Ve`:host{all:initial}w3m-network-image{margin-left:-6px;margin-right:6px;width:28px;height:28px}`;var kS=Object.defineProperty,HS=Object.getOwnPropertyDescriptor,Bc=(t,e,r,n)=>{for(var i=n>1?void 0:n?HS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&kS(e,r,i),i};let ss=class extends $e{constructor(){super(),this.chainId="",this.label="",this.wrongNetwork=!1,this.unsubscribeNetwork=void 0,xe.rejectStandaloneButtonComponent();const{selectedChain:t}=Ae.state;this.onSetChainData(t),this.unsubscribeNetwork=Ae.subscribe(({selectedChain:e})=>{this.onSetChainData(e)})}disconnectedCallback(){var t;(t=this.unsubscribeNetwork)==null||t.call(this)}onSetChainData(t){if(t){const{chains:e}=Ae.state,r=e?.map(n=>n.id);this.chainId=t.id.toString(),this.wrongNetwork=!(r!=null&&r.includes(t.id)),this.label=this.wrongNetwork?"Wrong Network":t.name}}onClick(){pi.click({name:"NETWORK_BUTTON"}),Rr.open({route:"SelectNetwork"})}render(){var t;const{chains:e}=Ae.state,r=e&&e.length>1;return oe`<w3m-button-big @click="${this.onClick}" ?disabled="${!r}"><w3m-network-image chainId="${this.chainId}"></w3m-network-image><w3m-text variant="medium-regular" color="inverse">${(t=this.label)!=null&&t.length?this.label:"Select Network"}</w3m-text></w3m-button-big>`}};ss.styles=[je.globalCss,BS],Bc([gt()],ss.prototype,"chainId",2),Bc([gt()],ss.prototype,"label",2),Bc([gt()],ss.prototype,"wrongNetwork",2),ss=Bc([Re("w3m-network-switch")],ss);const zS=Ve`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:1px;top:0;left:0}use{stroke:var(--w3m-accent-color);animation:loading 1s linear infinite}w3m-network-image{width:92px;height:92px}w3m-text{margin-bottom:40px}.w3m-error svg{stroke:var(--w3m-error-color)}.w3m-error use{display:none}.w3m-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}`;var WS=Object.defineProperty,qS=Object.getOwnPropertyDescriptor,kc=(t,e,r,n)=>{for(var i=n>1?void 0:n?qS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&WS(e,r,i),i};let Ys=class extends $e{constructor(){super(...arguments),this.chainId=void 0,this.isError=!1,this.label=""}svgLoaderTemplate(){return oe`<svg width="54" height="59" viewBox="0 0 54 59" fill="none" class="w3m-loader"><path id="w3m-loader-path" d="M17.22 5.295c3.877-2.277 5.737-3.363 7.72-3.726a11.44 11.44 0 0 1 4.12 0c1.983.363 3.844 1.45 7.72 3.726l6.065 3.562c3.876 2.276 5.731 3.372 7.032 4.938a11.896 11.896 0 0 1 2.06 3.63c.683 1.928.688 4.11.688 8.663v7.124c0 4.553-.005 6.735-.688 8.664a11.896 11.896 0 0 1-2.06 3.63c-1.3 1.565-3.156 2.66-7.032 4.937l-6.065 3.563c-3.877 2.276-5.737 3.362-7.72 3.725a11.46 11.46 0 0 1-4.12 0c-1.983-.363-3.844-1.449-7.72-3.726l-6.065-3.562c-3.876-2.276-5.731-3.372-7.032-4.938a11.885 11.885 0 0 1-2.06-3.63c-.682-1.928-.688-4.11-.688-8.663v-7.124c0-4.553.006-6.735.688-8.664a11.885 11.885 0 0 1 2.06-3.63c1.3-1.565 3.156-2.66 7.032-4.937l6.065-3.562Z"/><use xlink:href="#w3m-loader-path" stroke-dasharray="54 118" stroke-dashoffset="172"></use></svg>`}render(){const t={"w3m-error":this.isError};return oe`<div class="${Nr(t)}">${this.svgLoaderTemplate()}<w3m-network-image chainId="${this.chainId}"></w3m-network-image></div><w3m-text variant="medium-regular" color="${this.isError?"error":"primary"}">${this.isError?"Switch declined":this.label}</w3m-text>`}};Ys.styles=[je.globalCss,zS],kc([Oe()],Ys.prototype,"chainId",2),kc([Oe()],Ys.prototype,"isError",2),kc([Oe()],Ys.prototype,"label",2),Ys=kc([Re("w3m-network-waiting")],Ys);const VS=Ve`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}w3m-button{margin:0 5px}`;var KS=Object.defineProperty,GS=Object.getOwnPropertyDescriptor,os=(t,e,r,n)=>{for(var i=n>1?void 0:n?GS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&KS(e,r,i),i};let Zn=class extends $e{constructor(){super(...arguments),this.isMobile=!1,this.isInjected=!1,this.isInjectedInstalled=!1,this.isDesktop=!1,this.isWeb=!1,this.isRetry=!1}onMobile(){Ie.isMobile()?tt.replace("MobileConnecting"):tt.replace("MobileQrcodeConnecting")}onInjected(){this.isInjectedInstalled?tt.replace("InjectedConnecting"):tt.replace("InstallWallet")}onDesktop(){tt.replace("DesktopConnecting")}onWeb(){tt.replace("WebConnecting")}render(){const{isStandalone:t}=Ae.state;return oe`<div>${this.isRetry?oe`<slot></slot>`:null} ${this.isMobile?oe`<w3m-button .onClick="${this.onMobile}" .iconLeft="${Ne.MOBILE_ICON}" variant="outline">Mobile</w3m-button>`:null} ${this.isInjected&&!t?oe`<w3m-button .onClick="${this.onInjected}" .iconLeft="${Ne.WALLET_ICON}" variant="outline">Browser</w3m-button>`:null} ${this.isDesktop?oe`<w3m-button .onClick="${this.onDesktop}" .iconLeft="${Ne.DESKTOP_ICON}" variant="outline">Desktop</w3m-button>`:null} ${this.isWeb?oe`<w3m-button .onClick="${this.onWeb}" .iconLeft="${Ne.GLOBE_ICON}" variant="outline">Web</w3m-button>`:null}</div>`}};Zn.styles=[je.globalCss,VS],os([Oe()],Zn.prototype,"isMobile",2),os([Oe()],Zn.prototype,"isInjected",2),os([Oe()],Zn.prototype,"isInjectedInstalled",2),os([Oe()],Zn.prototype,"isDesktop",2),os([Oe()],Zn.prototype,"isWeb",2),os([Oe()],Zn.prototype,"isRetry",2),Zn=os([Re("w3m-platform-selection")],Zn);const ZS=Ve`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--w3m-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.w3m-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--w3m-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--w3m-color-bg-2);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay)}button:active{background-color:var(--w3m-color-overlay)}@media(hover:hover){button:hover{background-color:var(--w3m-color-overlay)}}.w3m-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--w3m-wallet-icon-border-radius)/ 2);border:1px solid var(--w3m-color-overlay)}.w3m-icons svg{width:21px;height:21px}.w3m-icons img:nth-child(1),.w3m-icons img:nth-child(2),.w3m-icons svg:nth-child(1),.w3m-icons svg:nth-child(2){margin-bottom:4px}w3m-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--w3m-color-bg-3)}#wallet-placeholder-dash{stroke:var(--w3m-color-overlay)}`;var YS=Object.defineProperty,JS=Object.getOwnPropertyDescriptor,XS=(t,e,r,n)=>{for(var i=n>1?void 0:n?JS(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&YS(e,r,i),i};let Of=class extends $e{onClick(){tt.push("WalletExplorer")}render(){const{recomendedWallets:t}=rr.state,e=Jr.manualWallets(),r=[...t,...e].reverse().slice(0,4);return oe`<button @click="${this.onClick}"><div class="w3m-icons">${r.map(n=>{const i=xe.getWalletIcon(n);if(i)return oe`<img src="${i}">`;const o=xe.getWalletIcon({id:n.id});return o?oe`<img src="${o}">`:Ne.WALLET_PLACEHOLDER})} ${[...Array(4-r.length)].map(()=>Ne.WALLET_PLACEHOLDER)}</div><w3m-text variant="xsmall-regular">View All</w3m-text></button>`}};Of.styles=[je.globalCss,ZS],Of=XS([Re("w3m-view-all-wallets-button")],Of);const QS=Ve`.w3m-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var eO=Object.defineProperty,tO=Object.getOwnPropertyDescriptor,Hc=(t,e,r,n)=>{for(var i=n>1?void 0:n?tO(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&eO(e,r,i),i};let Js=class extends $e{constructor(){super(),this.walletId="",this.imageId="",this.uri="",this.unwatchWcConnection=void 0,setTimeout(()=>{const{pairingUri:t}=ur.state,{standaloneUri:e}=Ae.state;this.uri=e??t},0),this.unwatchWcConnection=ur.subscribe(t=>{t.pairingUri&&(this.uri=t.pairingUri)})}disconnectedCallback(){var t;(t=this.unwatchWcConnection)==null||t.call(this)}get overlayEl(){return xe.getShadowRootElement(this,".w3m-qr-container")}render(){return oe`<div class="w3m-qr-container">${this.uri?oe`<w3m-qrcode size="${this.overlayEl.offsetWidth}" uri="${this.uri}" walletId="${this.walletId}" imageId="${this.imageId}"></w3m-qrcode>`:oe`<w3m-spinner></w3m-spinner>`}</div>`}};Js.styles=[je.globalCss,QS],Hc([Oe()],Js.prototype,"walletId",2),Hc([Oe()],Js.prototype,"imageId",2),Hc([gt()],Js.prototype,"uri",2),Js=Hc([Re("w3m-walletconnect-qr")],Js);const rO=Ve`.w3m-profile{display:flex;justify-content:space-between;align-items:flex-start;padding-top:20px}.w3m-connection-badge{background-color:var(--w3m-color-bg-2);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);padding:6px 10px 6px 26px;position:relative;border-radius:28px}.w3m-connection-badge::before{content:'';position:absolute;width:10px;height:10px;left:10px;background-color:var(--w3m-success-color);border-radius:50%;top:50%;margin-top:-5px;box-shadow:0 1px 4px 1px var(--w3m-success-color),inset 0 0 0 1px var(--w3m-color-overlay)}.w3m-footer{display:flex;justify-content:space-between}w3m-address-text{margin-top:10px;display:block}.w3m-balance{border-top:1px solid var(--w3m-color-bg-2);padding:11px 20px}`;var nO=Object.defineProperty,iO=Object.getOwnPropertyDescriptor,sO=(t,e,r,n)=>{for(var i=n>1?void 0:n?iO(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&nO(e,r,i),i};let Df=class extends $e{async onDisconnect(){await Nt.client().disconnect()}async onCopyAddress(){var t;await navigator.clipboard.writeText((t=Et.state.address)!=null?t:""),zr.openToast("Address copied","success")}render(){return oe`<w3m-modal-content><div class="w3m-profile"><div class="w3m-info"><w3m-avatar size="medium"></w3m-avatar><w3m-address-text variant="modal"></w3m-address-text></div><div class="w3m-connection-badge"><w3m-text variant="small-regular" color="secondary">Connected</w3m-text></div></div></w3m-modal-content><div class="w3m-balance"><w3m-balance></w3m-balance></div><w3m-modal-footer><div class="w3m-footer"><w3m-account-network-button></w3m-account-network-button><w3m-box-button label="Copy Address" .onClick="${this.onCopyAddress}" .icon="${Ne.ACCOUNT_COPY}"></w3m-box-button><w3m-box-button label="Disconnect" .onClick="${this.onDisconnect}" .icon="${Ne.ACCOUNT_DISCONNECT}"></w3m-box-button></div></w3m-modal-footer>`}};Df.styles=[je.globalCss,rO],Df=sO([Re("w3m-account-view")],Df);var oO=Object.defineProperty,aO=Object.getOwnPropertyDescriptor,cO=(t,e,r,n)=>{for(var i=n>1?void 0:n?aO(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&oO(e,r,i),i};let Af=class extends $e{viewTemplate(){return Ie.isAndroid()?oe`<w3m-android-wallet-selection></w3m-android-wallet-selection>`:Ie.isMobile()?oe`<w3m-mobile-wallet-selection></w3m-mobile-wallet-selection>`:oe`<w3m-desktop-wallet-selection></w3m-desktop-wallet-selection>`}render(){return oe`${this.viewTemplate()}<w3m-legal-notice></w3m-legal-notice>`}};Af.styles=[je.globalCss],Af=cO([Re("w3m-connect-wallet-view")],Af);const lO=Ve`w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-text{text-align:center}`;var uO=Object.defineProperty,hO=Object.getOwnPropertyDescriptor,sm=(t,e,r,n)=>{for(var i=n>1?void 0:n?hO(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&uO(e,r,i),i};let zc=class extends $e{constructor(){super(),this.isError=!1,this.unwatchConnection=void 0,this.openDesktopApp(),this.unwatchConnection=ur.subscribe(t=>{this.isError=t.pairingError})}disconnectedCallback(){var t;(t=this.unwatchConnection)==null||t.call(this)}onFormatAndRedirect(t){const{desktop:e,name:r}=Ie.getWalletRouterData(),n=e?.native;if(n){const i=Ie.formatNativeUrl(n,t,r);Ie.openHref(i,"_self")}}openDesktopApp(){ur.setPairingError(!1);const{standaloneUri:t}=Ae.state,{pairingUri:e}=ur.state,r=Ie.getWalletRouterData();xe.setRecentWallet(r),t?this.onFormatAndRedirect(t):this.onFormatAndRedirect(e)}render(){const{name:t,id:e,image_id:r}=Ie.getWalletRouterData(),{isMobile:n,isInjected:i,isWeb:o}=xe.getCachedRouterWalletPlatforms();return oe`<w3m-modal-header title="${t}" .onAction="${xe.handleUriCopy}" .actionIcon="${Ne.COPY_ICON}"></w3m-modal-header><w3m-modal-content><w3m-connector-waiting walletId="${e}" imageId="${r}" label="${`Continue in ${t}...`}" .isError="${this.isError}"></w3m-connector-waiting></w3m-modal-content><w3m-info-footer><w3m-text color="secondary" variant="small-thin">${`Connection can continue loading if ${t} is not installed on your device`}</w3m-text><w3m-platform-selection .isMobile="${n}" .isInjected="${i}" .isWeb="${o}" .isRetry="${!0}"><w3m-button .onClick="${this.openDesktopApp.bind(this)}" .iconRight="${Ne.RETRY_ICON}">Retry</w3m-button></w3m-platform-selection></w3m-info-footer>`}};zc.styles=[je.globalCss,lO],sm([gt()],zc.prototype,"isError",2),zc=sm([Re("w3m-desktop-connecting-view")],zc);const fO=Ve`.w3m-info-text{margin:5px 0 15px;max-width:320px;text-align:center}.w3m-wallet-item{margin:0 -20px 0 0;padding-right:20px;display:flex;align-items:center;border-bottom:1px solid var(--w3m-color-bg-2)}.w3m-wallet-item:last-child{margin-bottom:-20px;border-bottom:0}.w3m-wallet-content{margin-left:20px;height:60px;display:flex;flex:1;align-items:center;justify-content:space-between}.w3m-footer-actions{display:flex;flex-direction:column;align-items:center;padding:20px 0;border-top:1px solid var(--w3m-color-bg-2)}w3m-wallet-image{display:block;width:40px;height:40px;border-radius:10px}`;var dO=Object.defineProperty,pO=Object.getOwnPropertyDescriptor,gO=(t,e,r,n)=>{for(var i=n>1?void 0:n?pO(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&dO(e,r,i),i};let $f=class extends $e{onGet(t){Ie.openHref(t,"_blank")}render(){const t=rr.state.recomendedWallets.slice(0,5),e=Jr.manualWallets().slice(0,5),r=t.length,n=e.length;return oe`<w3m-modal-header title="Get a wallet"></w3m-modal-header><w3m-modal-content>${r?t.map(i=>oe`<div class="w3m-wallet-item"><w3m-wallet-image walletId="${i.id}" imageId="${i.image_id}"></w3m-wallet-image><div class="w3m-wallet-content"><w3m-text variant="medium-regular">${i.name}</w3m-text><w3m-button .iconRight="${Ne.ARROW_RIGHT_ICON}" .onClick="${()=>this.onGet(i.homepage)}">Get</w3m-button></div></div>`):null} ${n?e.map(i=>oe`<div class="w3m-wallet-item"><w3m-wallet-image walletId="${i.id}"></w3m-wallet-image><div class="w3m-wallet-content"><w3m-text variant="medium-regular">${i.name}</w3m-text><w3m-button .iconRight="${Ne.ARROW_RIGHT_ICON}" .onClick="${()=>this.onGet(i.links.universal)}">Get</w3m-button></div></div>`):null}</w3m-modal-content><div class="w3m-footer-actions"><w3m-text variant="medium-regular">Not what you're looking for?</w3m-text><w3m-text variant="small-thin" color="secondary" class="w3m-info-text">With hundreds of wallets out there, there's something for everyone</w3m-text><w3m-button .onClick="${xe.openWalletExplorerUrl}" .iconRight="${Ne.ARROW_UP_RIGHT_ICON}">Explore Wallets</w3m-button></div>`}};$f.styles=[je.globalCss,fO],$f=gO([Re("w3m-get-wallet-view")],$f);const mO=Ve`.w3m-footer-actions{display:flex;justify-content:center}.w3m-footer-actions w3m-button{margin:0 5px}.w3m-info-container{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-bottom:20px}.w3m-info-container:last-child{margin-bottom:0}.w3m-info-text{margin-top:5px;text-align:center}.w3m-images svg{margin:0 2px 5px;width:55px;height:55px}.help-img-highlight{stroke:var(--w3m-color-overlay)}`;var wO=Object.defineProperty,vO=Object.getOwnPropertyDescriptor,yO=(t,e,r,n)=>{for(var i=n>1?void 0:n?vO(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&wO(e,r,i),i};let Pf=class extends $e{constructor(){super(...arguments),this.learnUrl="https://ethereum.org/en/wallets/"}onGet(){jt.state.enableExplorer?tt.push("GetWallet"):xe.openWalletExplorerUrl()}onLearnMore(){Ie.openHref(this.learnUrl,"_blank")}render(){return oe`<w3m-modal-header title="What is a wallet?"></w3m-modal-header><w3m-modal-content><div class="w3m-info-container"><div class="w3m-images">${Ne.HELP_CHART_IMG} ${Ne.HELP_PAINTING_IMG} ${Ne.HELP_ETH_IMG}</div><w3m-text variant="medium-regular">A home for your digital assets</w3m-text><w3m-text variant="small-thin" color="secondary" class="w3m-info-text">A wallet lets you store, send and receive digital assets like cryptocurrencies and NFTs.</w3m-text></div><div class="w3m-info-container"><div class="w3m-images">${Ne.HELP_KEY_IMG} ${Ne.HELP_USER_IMG} ${Ne.HELP_LOCK_IMG}</div><w3m-text variant="medium-regular">One login for all of web3</w3m-text><w3m-text variant="small-thin" color="secondary" class="w3m-info-text">Log in to any app by connecting your wallet. Say goodbye to countless passwords!</w3m-text></div><div class="w3m-info-container"><div class="w3m-images">${Ne.HELP_COMPAS_IMG} ${Ne.HELP_NOUN_IMG} ${Ne.HELP_DAO_IMG}</div><w3m-text variant="medium-regular">Your gateway to a new web</w3m-text><w3m-text variant="small-thin" color="secondary" class="w3m-info-text">With your wallet, you can explore and interact with DeFi, NFTs, DAOs, and much more.</w3m-text></div><div class="w3m-footer-actions"><w3m-button .onClick="${this.onGet.bind(this)}" .iconLeft="${Ne.WALLET_ICON}">Get a Wallet</w3m-button><w3m-button .onClick="${this.onLearnMore.bind(this)}" .iconRight="${Ne.ARROW_UP_RIGHT_ICON}">Learn More</w3m-button></div></w3m-modal-content>`}};Pf.styles=[je.globalCss,mO],Pf=yO([Re("w3m-help-view")],Pf);const bO=Ve`w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-text{text-align:center}`;var _O=Object.defineProperty,EO=Object.getOwnPropertyDescriptor,om=(t,e,r,n)=>{for(var i=n>1?void 0:n?EO(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&_O(e,r,i),i};let Wc=class extends $e{constructor(){super(),this.isError=!1,this.connector=Nt.client().getConnectorById("injected"),this.openInjectedApp()}async openInjectedApp(){const{ready:t}=this.connector;t&&(this.isError=!1,await xe.handleConnectorConnection("injected",()=>{this.isError=!0}))}render(){const{name:t,id:e,image_id:r}=Ie.getWalletRouterData(),{isMobile:n,isDesktop:i,isWeb:o}=xe.getCachedRouterWalletPlatforms();return oe`<w3m-modal-header title="${t}"></w3m-modal-header><w3m-modal-content><w3m-connector-waiting walletId="${e}" imageId="${r}" label="${`Continue in ${t}...`}" .isError="${this.isError}"></w3m-connector-waiting></w3m-modal-content><w3m-info-footer><w3m-text color="secondary" variant="small-thin">Connection can be declined if multiple wallets are installed or previous request is still active</w3m-text><w3m-platform-selection .isMobile="${n}" .isDesktop="${i}" .isWeb="${o}" .isRetry="${!0}"><w3m-button .onClick="${this.openInjectedApp.bind(this)}" .disabled="${!this.isError}" .iconRight="${Ne.RETRY_ICON}">Retry</w3m-button></w3m-platform-selection></w3m-info-footer>`}};Wc.styles=[je.globalCss,bO],om([gt()],Wc.prototype,"isError",2),Wc=om([Re("w3m-injected-connecting-view")],Wc);const xO=Ve`w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-text{text-align:center}w3m-button{margin-top:15px}`;var CO=Object.defineProperty,IO=Object.getOwnPropertyDescriptor,SO=(t,e,r,n)=>{for(var i=n>1?void 0:n?IO(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&CO(e,r,i),i};let Tf=class extends $e{onInstall(t){t&&Ie.openHref(t,"_blank")}render(){const{name:t,id:e,image_id:r,homepage:n}=Ie.getWalletRouterData();return oe`<w3m-modal-header title="${t}"></w3m-modal-header><w3m-modal-content><w3m-connector-waiting walletId="${e}" imageId="${r}" label="Not Detected" .isStale="${!0}"></w3m-connector-waiting></w3m-modal-content><w3m-info-footer><w3m-text color="secondary" variant="small-thin">${`Download ${t} to continue. If multiple browser extensions are installed, disable non ${t} ones and try again`}</w3m-text><w3m-button .onClick="${()=>this.onInstall(n)}" .iconLeft="${Ne.ARROW_DOWN_ICON}">Download</w3m-button></w3m-info-footer>`}};Tf.styles=[je.globalCss,xO],Tf=SO([Re("w3m-install-wallet-view")],Tf);const OO=Ve`w3m-wallet-image{border-radius:var(--w3m-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}w3m-info-footer{display:flex;width:100%}.w3m-app-store{justify-content:space-between}.w3m-app-store w3m-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--w3m-wallet-icon-small-border-radius)}.w3m-app-store div{display:flex;align-items:center}.w3m-app-store w3m-button{margin-right:-10px}.w3m-note{flex-direction:column;align-items:center;padding:5px 0}.w3m-note w3m-text{text-align:center}w3m-platform-selection div{display:flex}w3m-platform-selection w3m-button:nth-child(2){margin-left:10px}`;var DO=Object.defineProperty,AO=Object.getOwnPropertyDescriptor,am=(t,e,r,n)=>{for(var i=n>1?void 0:n?AO(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&DO(e,r,i),i};let qc=class extends $e{constructor(){super(),this.isError=!1,this.unwatchConnection=void 0,this.openMobileApp(),this.unwatchConnection=ur.subscribe(t=>{this.isError=t.pairingError})}disconnectedCallback(){var t;(t=this.unwatchConnection)==null||t.call(this)}onFormatAndRedirect(t,e=!1){const{mobile:r,name:n}=Ie.getWalletRouterData(),i=r?.native,o=r?.universal;if(i&&!e){const c=Ie.formatNativeUrl(i,t,n);Ie.openHref(c,"_self")}else if(o){const c=Ie.formatUniversalUrl(o,t,n);Ie.openHref(c,"_self")}}openMobileApp(t=!1){ur.setPairingError(!1);const{standaloneUri:e}=Ae.state,{pairingUri:r}=ur.state,n=Ie.getWalletRouterData();xe.setRecentWallet(n),e?this.onFormatAndRedirect(e,t):this.onFormatAndRedirect(r,t)}onGoToAppStore(t){t&&Ie.openHref(t,"_blank")}render(){const{name:t,id:e,image_id:r,app:n,mobile:i}=Ie.getWalletRouterData(),{isWeb:o}=xe.getCachedRouterWalletPlatforms(),c=n?.ios,l=i?.universal;return oe`<w3m-modal-header title="${t}"></w3m-modal-header><w3m-modal-content><w3m-connector-waiting walletId="${e}" imageId="${r}" label="Tap 'Open' to continue…" .isError="${this.isError}"></w3m-connector-waiting></w3m-modal-content><w3m-info-footer class="w3m-note"><w3m-text color="secondary" variant="small-thin">You can reload the website to try again ${l?` or open ${t} using a "Backup" instead`:""}</w3m-text><w3m-platform-selection .isWeb="${o}" .isRetry="${!0}"><div><w3m-button .onClick="${()=>this.openMobileApp(!1)}" .iconRight="${Ne.RETRY_ICON}">Retry</w3m-button>${l?oe`<w3m-button variant="outline" .onClick="${()=>this.openMobileApp(!0)}" .iconRight="${Ne.ARROW_UP_RIGHT_ICON}">Backup</w3m-button>`:null}</div></w3m-platform-selection></w3m-info-footer><w3m-info-footer class="w3m-app-store"><div><w3m-wallet-image walletId="${e}" imageId="${r}"></w3m-wallet-image><w3m-text>${`Get ${t}`}</w3m-text></div><w3m-button .iconRight="${Ne.ARROW_RIGHT_ICON}" .onClick="${()=>this.onGoToAppStore(c)}" variant="ghost">App Store</w3m-button></w3m-info-footer>`}};qc.styles=[je.globalCss,OO],am([gt()],qc.prototype,"isError",2),qc=am([Re("w3m-mobile-connecting-view")],qc);const $O=Ve`w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-text{text-align:center}`;var PO=Object.defineProperty,TO=Object.getOwnPropertyDescriptor,RO=(t,e,r,n)=>{for(var i=n>1?void 0:n?TO(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&PO(e,r,i),i};let Rf=class extends $e{render(){const{name:t,id:e,image_id:r}=Ie.getWalletRouterData(),{isInjected:n,isDesktop:i,isWeb:o}=xe.getCachedRouterWalletPlatforms();return oe`<w3m-modal-header title="${t}" .onAction="${xe.handleUriCopy}" .actionIcon="${Ne.COPY_ICON}"></w3m-modal-header><w3m-modal-content><w3m-walletconnect-qr walletId="${e}" imageId="${r}"></w3m-walletconnect-qr></w3m-modal-content><w3m-info-footer><w3m-text color="secondary" variant="small-thin">${`Scan this qrcode with your phone's camera or inside ${t} app`}</w3m-text><w3m-platform-selection .isDesktop="${i}" .isInjected="${n}" .isWeb="${o}"></w3m-platform-selection></w3m-info-footer>`}};Rf.styles=[je.globalCss,$O],Rf=RO([Re("w3m-mobile-qr-connecting-view")],Rf);var NO=Object.defineProperty,LO=Object.getOwnPropertyDescriptor,MO=(t,e,r,n)=>{for(var i=n>1?void 0:n?LO(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&NO(e,r,i),i};let Nf=class extends $e{render(){return oe`<w3m-modal-header title="Scan the code" .onAction="${xe.handleUriCopy}" .actionIcon="${Ne.COPY_ICON}"></w3m-modal-header><w3m-modal-content><w3m-walletconnect-qr></w3m-walletconnect-qr></w3m-modal-content>`}};Nf.styles=[je.globalCss],Nf=MO([Re("w3m-qrcode-view")],Nf);const UO=Ve`div{display:grid;grid-template-columns:repeat(4,80px);margin:-5px -10px;justify-content:space-between}w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-info-footer w3m-text{text-align:center}`;var cm=Object.defineProperty,jO=Object.defineProperties,FO=Object.getOwnPropertyDescriptor,BO=Object.getOwnPropertyDescriptors,lm=Object.getOwnPropertySymbols,kO=Object.prototype.hasOwnProperty,HO=Object.prototype.propertyIsEnumerable,um=(t,e,r)=>e in t?cm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,zO=(t,e)=>{for(var r in e||(e={}))kO.call(e,r)&&um(t,r,e[r]);if(lm)for(var r of lm(e))HO.call(e,r)&&um(t,r,e[r]);return t},WO=(t,e)=>jO(t,BO(e)),Lf=(t,e,r,n)=>{for(var i=n>1?void 0:n?FO(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&cm(e,r,i),i};let pa=class extends $e{constructor(){super(),this.connectedChains="ALL",this.isUnsupportedChains=!1,this.getConnectedChainIds()}async getConnectedChainIds(){this.connectedChains=await Nt.client().getConnectedChainIds()}async onSelectChain(t){try{const{selectedChain:e,walletConnectVersion:r,isPreferInjected:n}=Ae.state,{isConnected:i}=Et.state;i?e?.id===t.id?tt.reset("Account"):r===2?(await Nt.client().switchNetwork({chainId:t.id}),tt.reset("Account")):tt.push("SwitchNetwork",{SwitchNetwork:t}):n?(Ae.setSelectedChain(t),Rr.close()):(Ae.setSelectedChain(t),tt.push("ConnectWallet"))}catch(e){console.error(e),zr.openToast(xe.getErrorMessage(e),"error")}}isUnsuportedChainId(t){return typeof this.connectedChains=="string"&&this.connectedChains!=="ALL"?(this.isUnsupportedChains=!0,!0):Array.isArray(this.connectedChains)&&!this.connectedChains.includes(String(t))?(this.isUnsupportedChains=!0,!0):!1}render(){const{chains:t}=Ae.state,e=t?.map(n=>WO(zO({},n),{unsupported:this.isUnsuportedChainId(n.id)})),r=e?.sort((n,i)=>Number(n.unsupported)-Number(i.unsupported));return oe`<w3m-modal-header title="Select network"></w3m-modal-header><w3m-modal-content><div>${r?.map(n=>oe`<w3m-network-button name="${n.name}" chainId="${n.id}" .unsupported="${n.unsupported}" .onClick="${async()=>this.onSelectChain(n)}">${n.name}</w3m-network-button>`)}</div></w3m-modal-content>${this.isUnsupportedChains?oe`<w3m-info-footer><w3m-text color="secondary" variant="small-thin">Your connected wallet may not support some of the networks available for this dapp</w3m-text></w3m-info-footer>`:null}`}};pa.styles=[je.globalCss,UO],Lf([gt()],pa.prototype,"connectedChains",2),Lf([gt()],pa.prototype,"isUnsupportedChains",2),pa=Lf([Re("w3m-select-network-view")],pa);const qO=Ve`w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-text{text-align:center}w3m-button{margin-top:15px}`;var VO=Object.defineProperty,KO=Object.getOwnPropertyDescriptor,hm=(t,e,r,n)=>{for(var i=n>1?void 0:n?KO(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&VO(e,r,i),i};let Vc=class extends $e{constructor(){super(),this.isError=!1,this.onSwitchNetwork()}async onSwitchNetwork(){try{this.isError=!1;const t=Ie.getSwitchNetworkRouterData();await Nt.client().switchNetwork({chainId:t.id}),Ae.setSelectedChain(t),tt.reset("Account")}catch{this.isError=!0}}render(){const{id:t,name:e}=Ie.getSwitchNetworkRouterData();return oe`<w3m-modal-header title="${`Connect to ${e}`}"></w3m-modal-header><w3m-modal-content><w3m-network-waiting chainId="${t}" label="Approve in your wallet" .isError="${this.isError}"></w3m-network-waiting></w3m-modal-content><w3m-info-footer><w3m-text color="secondary" variant="small-thin">Switch can be declined if chain is not supported by a wallet or previous request is still active</w3m-text><w3m-button .onClick="${this.onSwitchNetwork.bind(this)}" .disabled="${!this.isError}" .iconRight="${Ne.RETRY_ICON}">Try Again</w3m-button></w3m-info-footer>`}};Vc.styles=[je.globalCss,qO],hm([gt()],Vc.prototype,"isError",2),Vc=hm([Re("w3m-switch-network-view")],Vc);const GO=Ve`w3m-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}w3m-modal-content::after,w3m-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}w3m-modal-content::before{box-shadow:0 -1px 0 0 var(--w3m-color-bg-1);background:linear-gradient(var(--w3m-color-bg-1),rgba(255,255,255,0))}w3m-modal-content::after{box-shadow:0 1px 0 0 var(--w3m-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--w3m-color-bg-1));top:calc(100% - 20px)}w3m-modal-content::-webkit-scrollbar{display:none}.w3m-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.w3m-empty,.w3m-loading{display:flex}.w3m-loading .w3m-placeholder-block{height:100%}.w3m-end-reached .w3m-placeholder-block{height:0;opacity:0}.w3m-empty .w3m-placeholder-block{opacity:1;height:100%}w3m-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;var ZO=Object.defineProperty,YO=Object.getOwnPropertyDescriptor,ga=(t,e,r,n)=>{for(var i=n>1?void 0:n?YO(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&ZO(e,r,i),i};const Mf=40;let as=class extends $e{constructor(){super(...arguments),this.loading=!rr.state.wallets.listings.length,this.firstFetch=!rr.state.wallets.listings.length,this.search="",this.endReached=!1,this.intersectionObserver=void 0,this.searchDebounce=xe.debounce(t=>{t.length>=3?(this.firstFetch=!0,this.endReached=!1,this.search=t,rr.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),rr.resetSearch())})}firstUpdated(){this.createPaginationObserver()}disconnectedCallback(){var t;(t=this.intersectionObserver)==null||t.disconnect()}get placeholderEl(){return xe.getShadowRootElement(this,".w3m-placeholder-block")}createPaginationObserver(){this.intersectionObserver=new IntersectionObserver(([t])=>{t.isIntersecting&&!(this.search&&this.firstFetch)&&this.fetchWallets()}),this.intersectionObserver.observe(this.placeholderEl)}isLastPage(){const{wallets:t,search:e}=rr.state,{listings:r,total:n}=this.search?e:t;return n<=Mf||r.length>=n}async fetchWallets(){var t;const{wallets:e,search:r,injectedWallets:n}=rr.state,{listings:i,total:o,page:c}=this.search?r:e;if(!this.endReached&&(this.firstFetch||o>Mf&&i.length<o))try{this.loading=!0;const l=(t=Ae.state.standaloneChains)==null?void 0:t.join(","),{listings:h}=await rr.getWallets({page:this.firstFetch?1:c+1,entries:Mf,search:this.search,version:Ae.state.walletConnectVersion,chains:l}),d=h.map(E=>xe.getWalletIcon(E)),v=n.map(E=>xe.getWalletIcon(E));await Promise.all([...d.map(async E=>xe.preloadImage(E)),...v.map(async E=>xe.preloadImage(E)),Ie.wait(300)]),this.endReached=this.isLastPage()}catch(l){console.error(l),zr.openToast(xe.getErrorMessage(l),"error")}finally{this.loading=!1,this.firstFetch=!1}}onConnect(t){Ie.isAndroid()?xe.handleMobileLinking(t):xe.goToConnectingView(t)}onSearchChange(t){const{value:e}=t.target;this.searchDebounce(e)}render(){const{wallets:t,search:e}=rr.state,{listings:r}=this.search?e:t,n=this.loading&&!r.length,i=this.search.length>=3;let o=Lr.injectedWalletsTemplate(),c=Lr.manualWalletsTemplate(),l=Lr.recomendedWalletsTemplate(!0);i&&(o=o.filter(({values:E})=>xe.caseSafeIncludes(E[0],this.search)),c=c.filter(({values:E})=>xe.caseSafeIncludes(E[0],this.search)),l=l.filter(({values:E})=>xe.caseSafeIncludes(E[0],this.search)));const h=!this.loading&&!r.length&&!o.length&&!l.length,d=Math.max(o.length,r.length),v={"w3m-loading":n,"w3m-end-reached":this.endReached||!this.loading,"w3m-empty":h};return oe`<w3m-modal-header><w3m-search-input .onChange="${this.onSearchChange.bind(this)}"></w3m-search-input></w3m-modal-header><w3m-modal-content class="${Nr(v)}"><div class="w3m-grid">${n?null:l} ${n?null:[...Array(d)].map((E,_)=>oe`${c[_]} ${o[_]} ${r[_]?oe`<w3m-wallet-button imageId="${r[_].image_id}" name="${r[_].name}" walletId="${r[_].id}" .onClick="${()=>this.onConnect(r[_])}"></w3m-wallet-button>`:null}`)}</div><div class="w3m-placeholder-block">${h?oe`<w3m-text variant="big-bold" color="secondary">No results found</w3m-text>`:null} ${!h&&this.loading?oe`<w3m-spinner></w3m-spinner>`:null}</div></w3m-modal-content>`}};as.styles=[je.globalCss,GO],ga([gt()],as.prototype,"loading",2),ga([gt()],as.prototype,"firstFetch",2),ga([gt()],as.prototype,"search",2),ga([gt()],as.prototype,"endReached",2),as=ga([Re("w3m-wallet-explorer-view")],as);const JO=Ve`w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-text{text-align:center}`;var XO=Object.defineProperty,QO=Object.getOwnPropertyDescriptor,fm=(t,e,r,n)=>{for(var i=n>1?void 0:n?QO(e,r):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(n?c(e,r,i):c(i))||i);return n&&i&&XO(e,r,i),i};let Kc=class extends $e{constructor(){super(),this.isError=!1,this.unwatchConnection=void 0,this.openWebWallet(),this.unwatchConnection=ur.subscribe(t=>{this.isError=t.pairingError})}disconnectedCallback(){var t;(t=this.unwatchConnection)==null||t.call(this)}onFormatAndRedirect(t){const{desktop:e,name:r}=Ie.getWalletRouterData(),n=e?.universal;if(n){const i=Ie.formatUniversalUrl(n,t,r);Ie.openHref(i,"_blank")}}openWebWallet(){ur.setPairingError(!1);const{standaloneUri:t}=Ae.state,{pairingUri:e}=ur.state,r=Ie.getWalletRouterData();xe.setRecentWallet(r),t?this.onFormatAndRedirect(t):this.onFormatAndRedirect(e)}render(){const{name:t,id:e,image_id:r}=Ie.getWalletRouterData(),{isMobile:n,isInjected:i,isDesktop:o}=xe.getCachedRouterWalletPlatforms(),c=Ie.isMobile();return oe`<w3m-modal-header title="${t}" .onAction="${xe.handleUriCopy}" .actionIcon="${Ne.COPY_ICON}"></w3m-modal-header><w3m-modal-content><w3m-connector-waiting walletId="${e}" imageId="${r}" label="${`Continue in ${t}...`}" .isError="${this.isError}"></w3m-connector-waiting></w3m-modal-content><w3m-info-footer><w3m-text color="secondary" variant="small-thin">${`${t} web app has opened in a new tab. Go there, accept the connection, and come back`}</w3m-text><w3m-platform-selection .isMobile="${n}" .isInjected="${c?!1:i}" .isDesktop="${c?!1:o}" .isRetry="${!0}"><w3m-button .onClick="${this.openWebWallet.bind(this)}" .iconRight="${Ne.RETRY_ICON}">Retry</w3m-button></w3m-platform-selection></w3m-info-footer>`}};Kc.styles=[je.globalCss,JO],fm([gt()],Kc.prototype,"isError",2),Kc=fm([Re("w3m-web-connecting-view")],Kc);var eD=Object.freeze({__proto__:null,get W3mAccountButton(){return Vs},get W3mConnectButton(){return is},get W3mCoreButton(){return xi},get W3mModal(){return Zs},get W3mNetworkSwitch(){return ss},get W3mQrCode(){return Gn}});bn.EthereumProvider=Y7,bn.OPTIONAL_EVENTS=z7,bn.OPTIONAL_METHODS=H7,bn.REQUIRED_EVENTS=lc,bn.REQUIRED_METHODS=cc,bn.default=uc,Object.defineProperty(bn,"__esModule",{value:!0})});
|
|
159
153
|
//# sourceMappingURL=index.umd.js.map
|