@walletconnect/ethereum-provider 2.6.2-rc-45c7f946 → 2.6.2-rc-4a445a

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(mr,pn){typeof exports=="object"&&typeof module<"u"?pn(exports):typeof define=="function"&&define.amd?define(["exports"],pn):(mr=typeof globalThis<"u"?globalThis:mr||self,pn(mr["@walletconnect/ethereum-provider"]={}))})(this,function(mr){"use strict";var pn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hm(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function xi(t){var e=t.default;if(typeof e=="function"){var n=function(){return e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var yn={exports:{}},us=typeof Reflect=="object"?Reflect:null,qf=us&&typeof us.apply=="function"?us.apply:function(e,n,r){return Function.prototype.apply.call(e,n,r)},Ia;us&&typeof us.ownKeys=="function"?Ia=us.ownKeys:Object.getOwnPropertySymbols?Ia=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Ia=function(e){return Object.getOwnPropertyNames(e)};function zm(t){console&&console.warn&&console.warn(t)}var Vf=Number.isNaN||function(e){return e!==e};function _t(){_t.init.call(this)}yn.exports=_t,yn.exports.once=Km,_t.EventEmitter=_t,_t.prototype._events=void 0,_t.prototype._eventsCount=0,_t.prototype._maxListeners=void 0;var Kf=10;function Sa(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 Kf},set:function(t){if(typeof t!="number"||t<0||Vf(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");Kf=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||Vf(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 Gf(t){return t._maxListeners===void 0?_t.defaultMaxListeners:t._maxListeners}_t.prototype.getMaxListeners=function(){return Gf(this)},_t.prototype.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);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(n.length>0&&(c=n[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")qf(h,this,n);else for(var d=h.length,v=Qf(h,d),r=0;r<d;++r)qf(v[r],this,n);return!0};function Zf(t,e,n,r){var i,o,c;if(Sa(n),o=t._events,o===void 0?(o=t._events=Object.create(null),t._eventsCount=0):(o.newListener!==void 0&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),c=o[e]),c===void 0)c=o[e]=n,++t._eventsCount;else if(typeof c=="function"?c=o[e]=r?[n,c]:[c,n]:r?c.unshift(n):c.push(n),i=Gf(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,zm(l)}return t}_t.prototype.addListener=function(e,n){return Zf(this,e,n,!1)},_t.prototype.on=_t.prototype.addListener,_t.prototype.prependListener=function(e,n){return Zf(this,e,n,!0)};function Wm(){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 Yf(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=Wm.bind(r);return i.listener=n,r.wrapFn=i,i}_t.prototype.once=function(e,n){return Sa(n),this.on(e,Yf(this,e,n)),this},_t.prototype.prependOnceListener=function(e,n){return Sa(n),this.prependListener(e,Yf(this,e,n)),this},_t.prototype.removeListener=function(e,n){var r,i,o,c,l;if(Sa(n),i=this._events,i===void 0)return this;if(r=i[e],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||n));else if(typeof r!="function"){for(o=-1,c=r.length-1;c>=0;c--)if(r[c]===n||r[c].listener===n){l=r[c].listener,o=c;break}if(o<0)return this;o===0?r.shift():qm(r,o),r.length===1&&(i[e]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",e,l||n)}return this},_t.prototype.off=_t.prototype.removeListener,_t.prototype.removeAllListeners=function(e){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[e]),this;if(arguments.length===0){var o=Object.keys(r),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(n=r[e],typeof n=="function")this.removeListener(e,n);else if(n!==void 0)for(i=n.length-1;i>=0;i--)this.removeListener(e,n[i]);return this};function Jf(t,e,n){var r=t._events;if(r===void 0)return[];var i=r[e];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?Vm(i):Qf(i,i.length)}_t.prototype.listeners=function(e){return Jf(this,e,!0)},_t.prototype.rawListeners=function(e){return Jf(this,e,!1)},_t.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):Xf.call(t,e)},_t.prototype.listenerCount=Xf;function Xf(t){var e=this._events;if(e!==void 0){var n=e[t];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}_t.prototype.eventNames=function(){return this._eventsCount>0?Ia(this._events):[]};function Qf(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function qm(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function Vm(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}function Km(t,e){return new Promise(function(n,r){function i(c){t.removeListener(e,o),r(c)}function o(){typeof t.removeListener=="function"&&t.removeListener("error",i),n([].slice.call(arguments))}ed(t,e,o,{once:!0}),e!=="error"&&Gm(t,i,{once:!0})})}function Gm(t,e,n){typeof t.on=="function"&&ed(t,"error",e,n)}function ed(t,e,n,r){if(typeof t.on=="function")r.once?t.once(e,n):t.on(e,n);else if(typeof t.addEventListener=="function")t.addEventListener(e,function i(o){r.once&&t.removeEventListener(e,i),n(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var kl={},Da={},Qe={},td={};(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 n(l,h){return l+h|0}t.add=n;function r(l,h){return l-h|0}t.sub=r;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}})(td),Object.defineProperty(Qe,"__esModule",{value:!0});var nd=td;function Zm(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16}Qe.readInt16BE=Zm;function Ym(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])>>>0}Qe.readUint16BE=Ym;function Jm(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])<<16>>16}Qe.readInt16LE=Jm;function Xm(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])>>>0}Qe.readUint16LE=Xm;function rd(t,e,n){return e===void 0&&(e=new Uint8Array(2)),n===void 0&&(n=0),e[n+0]=t>>>8,e[n+1]=t>>>0,e}Qe.writeUint16BE=rd,Qe.writeInt16BE=rd;function id(t,e,n){return e===void 0&&(e=new Uint8Array(2)),n===void 0&&(n=0),e[n+0]=t>>>0,e[n+1]=t>>>8,e}Qe.writeUint16LE=id,Qe.writeInt16LE=id;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 Oa(t,e,n){return e===void 0&&(e=new Uint8Array(4)),n===void 0&&(n=0),e[n+0]=t>>>24,e[n+1]=t>>>16,e[n+2]=t>>>8,e[n+3]=t>>>0,e}Qe.writeUint32BE=Oa,Qe.writeInt32BE=Oa;function Aa(t,e,n){return e===void 0&&(e=new Uint8Array(4)),n===void 0&&(n=0),e[n+0]=t>>>0,e[n+1]=t>>>8,e[n+2]=t>>>16,e[n+3]=t>>>24,e}Qe.writeUint32LE=Aa,Qe.writeInt32LE=Aa;function Qm(t,e){e===void 0&&(e=0);var n=Hl(t,e),r=Hl(t,e+4);return n*4294967296+r-(r>>31)*4294967296}Qe.readInt64BE=Qm;function ew(t,e){e===void 0&&(e=0);var n=zl(t,e),r=zl(t,e+4);return n*4294967296+r}Qe.readUint64BE=ew;function tw(t,e){e===void 0&&(e=0);var n=Wl(t,e),r=Wl(t,e+4);return r*4294967296+n-(n>>31)*4294967296}Qe.readInt64LE=tw;function nw(t,e){e===void 0&&(e=0);var n=ql(t,e),r=ql(t,e+4);return r*4294967296+n}Qe.readUint64LE=nw;function sd(t,e,n){return e===void 0&&(e=new Uint8Array(8)),n===void 0&&(n=0),Oa(t/4294967296>>>0,e,n),Oa(t>>>0,e,n+4),e}Qe.writeUint64BE=sd,Qe.writeInt64BE=sd;function od(t,e,n){return e===void 0&&(e=new Uint8Array(8)),n===void 0&&(n=0),Aa(t>>>0,e,n),Aa(t/4294967296>>>0,e,n+4),e}Qe.writeUint64LE=od,Qe.writeInt64LE=od;function rw(t,e,n){if(n===void 0&&(n=0),t%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(t/8>e.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,i=1,o=t/8+n-1;o>=n;o--)r+=e[o]*i,i*=256;return r}Qe.readUintBE=rw;function iw(t,e,n){if(n===void 0&&(n=0),t%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(t/8>e.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,i=1,o=n;o<n+t/8;o++)r+=e[o]*i,i*=256;return r}Qe.readUintLE=iw;function sw(t,e,n,r){if(n===void 0&&(n=new Uint8Array(t/8)),r===void 0&&(r=0),t%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!nd.isSafeInteger(e))throw new Error("writeUintBE value must be an integer");for(var i=1,o=t/8+r-1;o>=r;o--)n[o]=e/i&255,i*=256;return n}Qe.writeUintBE=sw;function ow(t,e,n,r){if(n===void 0&&(n=new Uint8Array(t/8)),r===void 0&&(r=0),t%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!nd.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var i=1,o=r;o<r+t/8;o++)n[o]=e/i&255,i*=256;return n}Qe.writeUintLE=ow;function aw(t,e){e===void 0&&(e=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.getFloat32(e)}Qe.readFloat32BE=aw;function cw(t,e){e===void 0&&(e=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.getFloat32(e,!0)}Qe.readFloat32LE=cw;function lw(t,e){e===void 0&&(e=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.getFloat64(e)}Qe.readFloat64BE=lw;function uw(t,e){e===void 0&&(e=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.getFloat64(e,!0)}Qe.readFloat64LE=uw;function hw(t,e,n){e===void 0&&(e=new Uint8Array(4)),n===void 0&&(n=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.setFloat32(n,t),e}Qe.writeFloat32BE=hw;function fw(t,e,n){e===void 0&&(e=new Uint8Array(4)),n===void 0&&(n=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.setFloat32(n,t,!0),e}Qe.writeFloat32LE=fw;function dw(t,e,n){e===void 0&&(e=new Uint8Array(8)),n===void 0&&(n=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.setFloat64(n,t),e}Qe.writeFloat64BE=dw;function pw(t,e,n){e===void 0&&(e=new Uint8Array(8)),n===void 0&&(n=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.setFloat64(n,t,!0),e}Qe.writeFloat64LE=pw;var Gn={};Object.defineProperty(Gn,"__esModule",{value:!0});function gw(t){for(var e=0;e<t.length;e++)t[e]=0;return t}Gn.wipe=gw,Object.defineProperty(Da,"__esModule",{value:!0});var xn=Qe,Vl=Gn,mw=20;function ww(t,e,n){for(var r=1634760805,i=857760878,o=2036477234,c=1797285236,l=n[3]<<24|n[2]<<16|n[1]<<8|n[0],h=n[7]<<24|n[6]<<16|n[5]<<8|n[4],d=n[11]<<24|n[10]<<16|n[9]<<8|n[8],v=n[15]<<24|n[14]<<16|n[13]<<8|n[12],E=n[19]<<24|n[18]<<16|n[17]<<8|n[16],_=n[23]<<24|n[22]<<16|n[21]<<8|n[20],S=n[27]<<24|n[26]<<16|n[25]<<8|n[24],P=n[31]<<24|n[30]<<16|n[29]<<8|n[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=r,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,ne=T,re=0;re<mw;re+=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,ne^=C,ne=ne>>>32-16|ne<<16,D=D+ne|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,ne^=C,ne=ne>>>32-8|ne<<8,D=D+ne|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,ne^=M,ne=ne>>>32-16|ne<<16,me=me+ne|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,ne^=M,ne=ne>>>32-8|ne<<8,me=me+ne|0,x^=me,x=x>>>32-7|x<<7;xn.writeUint32LE(M+r|0,t,0),xn.writeUint32LE(A+i|0,t,4),xn.writeUint32LE(R+o|0,t,8),xn.writeUint32LE(C+c|0,t,12),xn.writeUint32LE(f+l|0,t,16),xn.writeUint32LE(x+h|0,t,20),xn.writeUint32LE(J+d|0,t,24),xn.writeUint32LE(z+v|0,t,28),xn.writeUint32LE(ee+E|0,t,32),xn.writeUint32LE(de+_|0,t,36),xn.writeUint32LE(me+S|0,t,40),xn.writeUint32LE(D+P|0,t,44),xn.writeUint32LE(U+L|0,t,48),xn.writeUint32LE(ae+k|0,t,52),xn.writeUint32LE(le+q|0,t,56),xn.writeUint32LE(ne+T|0,t,60)}function ad(t,e,n,r,i){if(i===void 0&&(i=0),t.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(r.length<n.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<n.length;h+=64){ww(l,o,t);for(var d=h;d<h+64&&d<n.length;d++)r[d]=n[d]^l[d-h];yw(o,0,c)}return Vl.wipe(l),i===0&&Vl.wipe(o),r}Da.streamXOR=ad;function vw(t,e,n,r){return r===void 0&&(r=0),Vl.wipe(n),ad(t,e,n,n,r)}Da.stream=vw;function yw(t,e,n){for(var r=1;n--;)r=r+(t[e]&255)|0,t[e]=r&255,r>>>=8,e++;if(r>0)throw new Error("ChaCha: counter overflow")}var cd={},ni={};Object.defineProperty(ni,"__esModule",{value:!0});function bw(t,e,n){return~(t-1)&e|t-1&n}ni.select=bw;function _w(t,e){return(t|0)-(e|0)-1>>>31&1}ni.lessOrEqual=_w;function ld(t,e){if(t.length!==e.length)return 0;for(var n=0,r=0;r<t.length;r++)n|=t[r]^e[r];return 1&n-1>>>8}ni.compare=ld;function Ew(t,e){return t.length===0||e.length===0?!1:ld(t,e)!==0}ni.equal=Ew,function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ni,n=Gn;t.DIGEST_LENGTH=16;var r=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 ne=l[h+6]|l[h+7]<<8;P+=(le>>>7|ne<<9)&8191;var re=l[h+8]|l[h+9]<<8;L+=(ne>>>4|re<<12)&8191,k+=re>>>1&8191;var oe=l[h+10]|l[h+11]<<8;q+=(re>>>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 n.wipe(this._buffer),n.wipe(this._r),n.wipe(this._h),n.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},c}();t.Poly1305=r;function i(c,l){var h=new r(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=Da,n=cd,r=Gn,i=Qe,o=ni;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),r.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),r.wipe(S),q},h.prototype.clean=function(){return r.wipe(this._key),this},h.prototype._authenticate=function(d,v,E,_){var S=new n.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(),r.wipe(L),r.wipe(P)},h}();t.ChaCha20Poly1305=l}(kl);var ud={},ao={},Kl={};Object.defineProperty(Kl,"__esModule",{value:!0});function xw(t){return typeof t.saveState<"u"&&typeof t.restoreState<"u"&&typeof t.cleanSavedState<"u"}Kl.isSerializableHash=xw,Object.defineProperty(ao,"__esModule",{value:!0});var Cr=Kl,Cw=ni,Iw=Gn,hd=function(){function t(e,n){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var r=new Uint8Array(this.blockSize);n.length>this.blockSize?this._inner.update(n).finish(r).clean():r.set(n);for(var i=0;i<r.length;i++)r[i]^=54;this._inner.update(r);for(var i=0;i<r.length;i++)r[i]^=106;this._outer.update(r),Cr.isSerializableHash(this._inner)&&Cr.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),Iw.wipe(r)}return t.prototype.reset=function(){if(!Cr.isSerializableHash(this._inner)||!Cr.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(){Cr.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),Cr.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(!Cr.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(!Cr.isSerializableHash(this._inner)||!Cr.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(!Cr.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},t}();ao.HMAC=hd;function Sw(t,e,n){var r=new hd(t,e);r.update(n);var i=r.digest();return r.clean(),i}ao.hmac=Sw,ao.equal=Cw.equal,Object.defineProperty(ud,"__esModule",{value:!0});var fd=ao,dd=Gn,Dw=function(){function t(e,n,r,i){r===void 0&&(r=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=i;var o=fd.hmac(this._hash,r,n);this._hmac=new fd.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 n=new Uint8Array(e),r=0;r<n.length;r++)this._bufpos===this._buffer.length&&this._fillBuffer(),n[r]=this._buffer[this._bufpos++];return n},t.prototype.clean=function(){this._hmac.clean(),dd.wipe(this._buffer),dd.wipe(this._counter),this._bufpos=0},t}(),Ow=ud.HKDF=Dw,hs={},$a={},Pa={};Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.BrowserRandomSource=void 0;const pd=65536;class Aw{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 n=new Uint8Array(e);for(let r=0;r<n.length;r+=pd)this._crypto.getRandomValues(n.subarray(r,r+Math.min(n.length-r,pd)));return n}}Pa.BrowserRandomSource=Aw;function $w(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 Ta={},Pw={},Tw=Object.freeze({__proto__:null,default:Pw}),Rw=xi(Tw);Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.NodeRandomSource=void 0;const Nw=Gn;class Mw{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof $w<"u"){const e=Rw;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 n=this._crypto.randomBytes(e);if(n.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const r=new Uint8Array(e);for(let i=0;i<r.length;i++)r[i]=n[i];return(0,Nw.wipe)(n),r}}Ta.NodeRandomSource=Mw,Object.defineProperty($a,"__esModule",{value:!0}),$a.SystemRandomSource=void 0;const Lw=Pa,jw=Ta;class Uw{constructor(){if(this.isAvailable=!1,this.name="",this._source=new Lw.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new jw.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)}}$a.SystemRandomSource=Uw,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const e=$a,n=Qe,r=Gn;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,n.readUint32LE)(v);return(0,r.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,r.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}(hs);var Ra={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Qe,n=Gn;t.DIGEST_LENGTH=32,t.BLOCK_SIZE=64;var r=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(){n.wipe(this._buffer),n.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){n.wipe(h.state),h.buffer&&n.wipe(h.buffer),h.bufferLength=0,h.bytesHashed=0},l}();t.SHA256=r;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 r;h.update(l);var d=h.digest();return h.clean(),d}t.hash=c})(Ra);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=hs,n=Gn;t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=32,t.SHARED_KEY_LENGTH=32;function r(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=r([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=r(),f=r();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,ne=0,re=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],Le=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*Le,ee+=f*Me,de+=f*ze,me+=f*et,D+=f*Te,U+=f*Ve,ae+=f*b,le+=f*p,ne+=f*m,re+=f*$,oe+=f*B,ie+=f*G,Se+=f*Q,ge+=f*xe,Ne+=f*Oe,f=R[1],z+=f*Ye,ee+=f*Le,de+=f*Me,me+=f*ze,D+=f*et,U+=f*Te,ae+=f*Ve,le+=f*b,ne+=f*p,re+=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*Le,me+=f*Me,D+=f*ze,U+=f*et,ae+=f*Te,le+=f*Ve,ne+=f*b,re+=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*Le,D+=f*Me,U+=f*ze,ae+=f*et,le+=f*Te,ne+=f*Ve,re+=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*Le,U+=f*Me,ae+=f*ze,le+=f*et,ne+=f*Te,re+=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*Le,ae+=f*Me,le+=f*ze,ne+=f*et,re+=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*Le,le+=f*Me,ne+=f*ze,re+=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*Le,ne+=f*Me,re+=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,ne+=f*Le,re+=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],ne+=f*Ye,re+=f*Le,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],re+=f*Ye,oe+=f*Le,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*Le,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*Le,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*Le,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*Le,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*Le,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,ne+=38*Pe,re+=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=ne+x+65535,x=Math.floor(f/65536),ne=f-x*65536,f=re+x+65535,x=Math.floor(f/65536),re=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=ne+x+65535,x=Math.floor(f/65536),ne=f-x*65536,f=re+x+65535,x=Math.floor(f/65536),re=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]=ne,A[10]=re,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=r();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=r(),J=r(),z=r(),ee=r(),de=r(),me=r();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 ne=C[le>>>3]>>>(le&7)&1;l(x,J,ne),l(z,ee,ne),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,ne),l(z,ee,ne)}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,n.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 gd(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(t):new Uint8Array(t)}function Zl(t,e){e||(e=t.reduce((i,o)=>i+o.length,0));const n=gd(e);let r=0;for(const i of t)n.set(i,r),r+=i.length;return n}function Fw(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),c=o.charCodeAt(0);if(n[c]!==255)throw new TypeError(o+" is ambiguous");n[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=n[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 Bw=Fw,kw=Bw;const md=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")},Hw=t=>new TextEncoder().encode(t),zw=t=>new TextDecoder().decode(t);class Ww{constructor(e,n,r){this.name=e,this.prefix=n,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class qw{constructor(e,n,r){if(this.name=e,this.prefix=n,n.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=r}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 wd(this,e)}}class Vw{constructor(e){this.decoders=e}or(e){return wd(this,e)}decode(e){const n=e[0],r=this.decoders[n];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const wd=(t,e)=>new Vw({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class Kw{constructor(e,n,r,i){this.name=e,this.prefix=n,this.baseEncode=r,this.baseDecode=i,this.encoder=new Ww(e,n,r),this.decoder=new qw(e,n,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Na=({name:t,prefix:e,encode:n,decode:r})=>new Kw(t,e,n,r),co=({prefix:t,name:e,alphabet:n})=>{const{encode:r,decode:i}=kw(n,e);return Na({prefix:t,name:e,encode:r,decode:o=>md(i(o))})},Gw=(t,e,n,r)=>{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*n/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-${r} character`);h=h<<n|E,l+=n,l>=8&&(l-=8,c[d++]=255&h>>l)}if(l>=n||255&h<<8-l)throw new SyntaxError("Unexpected end of data");return c},Zw=(t,e,n)=>{const r=e[e.length-1]==="=",i=(1<<n)-1;let o="",c=0,l=0;for(let h=0;h<t.length;++h)for(l=l<<8|t[h],c+=8;c>n;)c-=n,o+=e[i&l>>c];if(c&&(o+=e[i&l<<n-c]),r)for(;o.length*n&7;)o+="=";return o},bn=({name:t,prefix:e,bitsPerChar:n,alphabet:r})=>Na({prefix:e,name:t,encode(i){return Zw(i,r,n)},decode(i){return Gw(i,r,n,t)}}),Yw=Na({prefix:"\0",name:"identity",encode:t=>zw(t),decode:t=>Hw(t)});var Jw=Object.freeze({__proto__:null,identity:Yw});const Xw=bn({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Qw=Object.freeze({__proto__:null,base2:Xw});const ev=bn({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var tv=Object.freeze({__proto__:null,base8:ev});const nv=co({prefix:"9",name:"base10",alphabet:"0123456789"});var rv=Object.freeze({__proto__:null,base10:nv});const iv=bn({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),sv=bn({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var ov=Object.freeze({__proto__:null,base16:iv,base16upper:sv});const av=bn({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),cv=bn({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),lv=bn({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),uv=bn({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),hv=bn({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),fv=bn({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),dv=bn({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),pv=bn({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),gv=bn({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var mv=Object.freeze({__proto__:null,base32:av,base32upper:cv,base32pad:lv,base32padupper:uv,base32hex:hv,base32hexupper:fv,base32hexpad:dv,base32hexpadupper:pv,base32z:gv});const wv=co({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),vv=co({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var yv=Object.freeze({__proto__:null,base36:wv,base36upper:vv});const bv=co({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),_v=co({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Ev=Object.freeze({__proto__:null,base58btc:bv,base58flickr:_v});const xv=bn({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Cv=bn({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Iv=bn({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Sv=bn({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Dv=Object.freeze({__proto__:null,base64:xv,base64pad:Cv,base64url:Iv,base64urlpad:Sv});const vd=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}"),Ov=vd.reduce((t,e,n)=>(t[n]=e,t),[]),Av=vd.reduce((t,e,n)=>(t[e.codePointAt(0)]=n,t),[]);function $v(t){return t.reduce((e,n)=>(e+=Ov[n],e),"")}function Pv(t){const e=[];for(const n of t){const r=Av[n.codePointAt(0)];if(r===void 0)throw new Error(`Non-base256emoji character: ${n}`);e.push(r)}return new Uint8Array(e)}const Tv=Na({prefix:"\u{1F680}",name:"base256emoji",encode:$v,decode:Pv});var Rv=Object.freeze({__proto__:null,base256emoji:Tv}),Nv=bd,yd=128,Mv=127,Lv=~Mv,jv=Math.pow(2,31);function bd(t,e,n){e=e||[],n=n||0;for(var r=n;t>=jv;)e[n++]=t&255|yd,t/=128;for(;t&Lv;)e[n++]=t&255|yd,t>>>=7;return e[n]=t|0,bd.bytes=n-r+1,e}var Uv=Yl,Fv=128,_d=127;function Yl(t,r){var n=0,r=r||0,i=0,o=r,c,l=t.length;do{if(o>=l)throw Yl.bytes=0,new RangeError("Could not decode varint");c=t[o++],n+=i<28?(c&_d)<<i:(c&_d)*Math.pow(2,i),i+=7}while(c>=Fv);return Yl.bytes=o-r,n}var Bv=Math.pow(2,7),kv=Math.pow(2,14),Hv=Math.pow(2,21),zv=Math.pow(2,28),Wv=Math.pow(2,35),qv=Math.pow(2,42),Vv=Math.pow(2,49),Kv=Math.pow(2,56),Gv=Math.pow(2,63),Zv=function(t){return t<Bv?1:t<kv?2:t<Hv?3:t<zv?4:t<Wv?5:t<qv?6:t<Vv?7:t<Kv?8:t<Gv?9:10},Yv={encode:Nv,decode:Uv,encodingLength:Zv},Ed=Yv;const xd=(t,e,n=0)=>(Ed.encode(t,e,n),e),Cd=t=>Ed.encodingLength(t),Jl=(t,e)=>{const n=e.byteLength,r=Cd(t),i=r+Cd(n),o=new Uint8Array(i+n);return xd(t,o,0),xd(n,o,r),o.set(e,i),new Jv(t,n,e,o)};class Jv{constructor(e,n,r,i){this.code=e,this.size=n,this.digest=r,this.bytes=i}}const Id=({name:t,code:e,encode:n})=>new Xv(t,e,n);class Xv{constructor(e,n,r){this.name=e,this.code=n,this.encode=r}digest(e){if(e instanceof Uint8Array){const n=this.encode(e);return n instanceof Uint8Array?Jl(this.code,n):n.then(r=>Jl(this.code,r))}else throw Error("Unknown type, must be binary type")}}const Sd=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),Qv=Id({name:"sha2-256",code:18,encode:Sd("SHA-256")}),ey=Id({name:"sha2-512",code:19,encode:Sd("SHA-512")});var ty=Object.freeze({__proto__:null,sha256:Qv,sha512:ey});const Dd=0,ny="identity",Od=md;var ry=Object.freeze({__proto__:null,identity:{code:Dd,name:ny,encode:Od,digest:t=>Jl(Dd,Od(t))}});new TextEncoder,new TextDecoder;const Ad={...Jw,...Qw,...tv,...rv,...ov,...mv,...yv,...Ev,...Dv,...Rv};({...ty,...ry});function $d(t,e,n,r){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:r}}}const Pd=$d("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),Xl=$d("ascii","a",t=>{let e="a";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e},t=>{t=t.substring(1);const e=gd(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}),Td={utf8:Pd,"utf-8":Pd,hex:Ad.base16,latin1:Xl,ascii:Xl,binary:Xl,...Ad};function Fn(t,e="utf8"){const n=Td[e];if(!n)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t,"utf8"):n.decoder.decode(`${n.prefix}${t}`)}function Dn(t,e="utf8"){const n=Td[e];if(!n)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"):n.encoder.encode(t).substring(1)}var Rd=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},iy=function(){function t(e,n,r){this.name=e,this.version=n,this.os=r,this.type="browser"}return t}(),sy=function(){function t(e){this.version=e,this.type="node",this.name="node",this.os=process.platform}return t}(),oy=function(){function t(e,n,r,i){this.name=e,this.version=n,this.os=r,this.bot=i,this.type="bot-device"}return t}(),ay=function(){function t(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return t}(),cy=function(){function t(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return t}(),ly=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,uy=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Nd=3,hy=[["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",ly]],Md=[["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 fy(t){return t?Ld(t):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new cy:typeof navigator<"u"?Ld(navigator.userAgent):gy()}function dy(t){return t!==""&&hy.reduce(function(e,n){var r=n[0],i=n[1];if(e)return e;var o=i.exec(t);return!!o&&[r,o]},!1)}function Ld(t){var e=dy(t);if(!e)return null;var n=e[0],r=e[1];if(n==="searchbot")return new ay;var i=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);i?i.length<Nd&&(i=Rd(Rd([],i,!0),my(Nd-i.length),!0)):i=[];var o=i.join("."),c=py(t),l=uy.exec(t);return l&&l[1]?new oy(n,o,c,l[1]):new iy(n,o,c)}function py(t){for(var e=0,n=Md.length;e<n;e++){var r=Md[e],i=r[0],o=r[1],c=o.exec(t);if(c)return i}return null}function gy(){var t=typeof process<"u"&&process.version;return t?new sy(process.version.slice(1)):null}function my(t){for(var e=[],n=0;n<t;n++)e.push("0");return e}var ke={};/*! *****************************************************************************
1
+ (function(wr,pn){typeof exports=="object"&&typeof module<"u"?pn(exports):typeof define=="function"&&define.amd?define(["exports"],pn):(wr=typeof globalThis<"u"?globalThis:wr||self,pn(wr["@walletconnect/ethereum-provider"]={}))})(this,function(wr){"use strict";var pn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qm(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 n=function(){return e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var yn={exports:{}},ds=typeof Reflect=="object"?Reflect:null,K0=ds&&typeof ds.apply=="function"?ds.apply:function(e,n,r){return Function.prototype.apply.call(e,n,r)},Sa;ds&&typeof ds.ownKeys=="function"?Sa=ds.ownKeys:Object.getOwnPropertySymbols?Sa=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Sa=function(e){return Object.getOwnPropertyNames(e)};function Vm(t){console&&console.warn&&console.warn(t)}var G0=Number.isNaN||function(e){return e!==e};function _t(){_t.init.call(this)}yn.exports=_t,yn.exports.once=Ym,_t.EventEmitter=_t,_t.prototype._events=void 0,_t.prototype._eventsCount=0,_t.prototype._maxListeners=void 0;var Z0=10;function Da(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 Z0},set:function(t){if(typeof t!="number"||t<0||G0(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");Z0=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||G0(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 Y0(t){return t._maxListeners===void 0?_t.defaultMaxListeners:t._maxListeners}_t.prototype.getMaxListeners=function(){return Y0(this)},_t.prototype.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);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(n.length>0&&(c=n[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")K0(h,this,n);else for(var d=h.length,v=td(h,d),r=0;r<d;++r)K0(v[r],this,n);return!0};function J0(t,e,n,r){var i,o,c;if(Da(n),o=t._events,o===void 0?(o=t._events=Object.create(null),t._eventsCount=0):(o.newListener!==void 0&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),c=o[e]),c===void 0)c=o[e]=n,++t._eventsCount;else if(typeof c=="function"?c=o[e]=r?[n,c]:[c,n]:r?c.unshift(n):c.push(n),i=Y0(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,Vm(l)}return t}_t.prototype.addListener=function(e,n){return J0(this,e,n,!1)},_t.prototype.on=_t.prototype.addListener,_t.prototype.prependListener=function(e,n){return J0(this,e,n,!0)};function Km(){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 X0(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=Km.bind(r);return i.listener=n,r.wrapFn=i,i}_t.prototype.once=function(e,n){return Da(n),this.on(e,X0(this,e,n)),this},_t.prototype.prependOnceListener=function(e,n){return Da(n),this.prependListener(e,X0(this,e,n)),this},_t.prototype.removeListener=function(e,n){var r,i,o,c,l;if(Da(n),i=this._events,i===void 0)return this;if(r=i[e],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||n));else if(typeof r!="function"){for(o=-1,c=r.length-1;c>=0;c--)if(r[c]===n||r[c].listener===n){l=r[c].listener,o=c;break}if(o<0)return this;o===0?r.shift():Gm(r,o),r.length===1&&(i[e]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",e,l||n)}return this},_t.prototype.off=_t.prototype.removeListener,_t.prototype.removeAllListeners=function(e){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[e]),this;if(arguments.length===0){var o=Object.keys(r),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(n=r[e],typeof n=="function")this.removeListener(e,n);else if(n!==void 0)for(i=n.length-1;i>=0;i--)this.removeListener(e,n[i]);return this};function Q0(t,e,n){var r=t._events;if(r===void 0)return[];var i=r[e];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?Zm(i):td(i,i.length)}_t.prototype.listeners=function(e){return Q0(this,e,!0)},_t.prototype.rawListeners=function(e){return Q0(this,e,!1)},_t.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):ed.call(t,e)},_t.prototype.listenerCount=ed;function ed(t){var e=this._events;if(e!==void 0){var n=e[t];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}_t.prototype.eventNames=function(){return this._eventsCount>0?Sa(this._events):[]};function td(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function Gm(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function Zm(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}function Ym(t,e){return new Promise(function(n,r){function i(c){t.removeListener(e,o),r(c)}function o(){typeof t.removeListener=="function"&&t.removeListener("error",i),n([].slice.call(arguments))}nd(t,e,o,{once:!0}),e!=="error"&&Jm(t,i,{once:!0})})}function Jm(t,e,n){typeof t.on=="function"&&nd(t,"error",e,n)}function nd(t,e,n,r){if(typeof t.on=="function")r.once?t.once(e,n):t.on(e,n);else if(typeof t.addEventListener=="function")t.addEventListener(e,function i(o){r.once&&t.removeEventListener(e,i),n(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var kl={},Oa={},Qe={},rd={};(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 n(l,h){return l+h|0}t.add=n;function r(l,h){return l-h|0}t.sub=r;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}})(rd),Object.defineProperty(Qe,"__esModule",{value:!0});var id=rd;function Xm(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16}Qe.readInt16BE=Xm;function Qm(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])>>>0}Qe.readUint16BE=Qm;function ew(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])<<16>>16}Qe.readInt16LE=ew;function tw(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])>>>0}Qe.readUint16LE=tw;function sd(t,e,n){return e===void 0&&(e=new Uint8Array(2)),n===void 0&&(n=0),e[n+0]=t>>>8,e[n+1]=t>>>0,e}Qe.writeUint16BE=sd,Qe.writeInt16BE=sd;function od(t,e,n){return e===void 0&&(e=new Uint8Array(2)),n===void 0&&(n=0),e[n+0]=t>>>0,e[n+1]=t>>>8,e}Qe.writeUint16LE=od,Qe.writeInt16LE=od;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 Aa(t,e,n){return e===void 0&&(e=new Uint8Array(4)),n===void 0&&(n=0),e[n+0]=t>>>24,e[n+1]=t>>>16,e[n+2]=t>>>8,e[n+3]=t>>>0,e}Qe.writeUint32BE=Aa,Qe.writeInt32BE=Aa;function $a(t,e,n){return e===void 0&&(e=new Uint8Array(4)),n===void 0&&(n=0),e[n+0]=t>>>0,e[n+1]=t>>>8,e[n+2]=t>>>16,e[n+3]=t>>>24,e}Qe.writeUint32LE=$a,Qe.writeInt32LE=$a;function nw(t,e){e===void 0&&(e=0);var n=Hl(t,e),r=Hl(t,e+4);return n*4294967296+r-(r>>31)*4294967296}Qe.readInt64BE=nw;function rw(t,e){e===void 0&&(e=0);var n=zl(t,e),r=zl(t,e+4);return n*4294967296+r}Qe.readUint64BE=rw;function iw(t,e){e===void 0&&(e=0);var n=Wl(t,e),r=Wl(t,e+4);return r*4294967296+n-(n>>31)*4294967296}Qe.readInt64LE=iw;function sw(t,e){e===void 0&&(e=0);var n=ql(t,e),r=ql(t,e+4);return r*4294967296+n}Qe.readUint64LE=sw;function ad(t,e,n){return e===void 0&&(e=new Uint8Array(8)),n===void 0&&(n=0),Aa(t/4294967296>>>0,e,n),Aa(t>>>0,e,n+4),e}Qe.writeUint64BE=ad,Qe.writeInt64BE=ad;function cd(t,e,n){return e===void 0&&(e=new Uint8Array(8)),n===void 0&&(n=0),$a(t>>>0,e,n),$a(t/4294967296>>>0,e,n+4),e}Qe.writeUint64LE=cd,Qe.writeInt64LE=cd;function ow(t,e,n){if(n===void 0&&(n=0),t%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(t/8>e.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,i=1,o=t/8+n-1;o>=n;o--)r+=e[o]*i,i*=256;return r}Qe.readUintBE=ow;function aw(t,e,n){if(n===void 0&&(n=0),t%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(t/8>e.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,i=1,o=n;o<n+t/8;o++)r+=e[o]*i,i*=256;return r}Qe.readUintLE=aw;function cw(t,e,n,r){if(n===void 0&&(n=new Uint8Array(t/8)),r===void 0&&(r=0),t%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!id.isSafeInteger(e))throw new Error("writeUintBE value must be an integer");for(var i=1,o=t/8+r-1;o>=r;o--)n[o]=e/i&255,i*=256;return n}Qe.writeUintBE=cw;function lw(t,e,n,r){if(n===void 0&&(n=new Uint8Array(t/8)),r===void 0&&(r=0),t%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!id.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var i=1,o=r;o<r+t/8;o++)n[o]=e/i&255,i*=256;return n}Qe.writeUintLE=lw;function uw(t,e){e===void 0&&(e=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.getFloat32(e)}Qe.readFloat32BE=uw;function hw(t,e){e===void 0&&(e=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.getFloat32(e,!0)}Qe.readFloat32LE=hw;function fw(t,e){e===void 0&&(e=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.getFloat64(e)}Qe.readFloat64BE=fw;function dw(t,e){e===void 0&&(e=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.getFloat64(e,!0)}Qe.readFloat64LE=dw;function pw(t,e,n){e===void 0&&(e=new Uint8Array(4)),n===void 0&&(n=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.setFloat32(n,t),e}Qe.writeFloat32BE=pw;function gw(t,e,n){e===void 0&&(e=new Uint8Array(4)),n===void 0&&(n=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.setFloat32(n,t,!0),e}Qe.writeFloat32LE=gw;function mw(t,e,n){e===void 0&&(e=new Uint8Array(8)),n===void 0&&(n=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.setFloat64(n,t),e}Qe.writeFloat64BE=mw;function ww(t,e,n){e===void 0&&(e=new Uint8Array(8)),n===void 0&&(n=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.setFloat64(n,t,!0),e}Qe.writeFloat64LE=ww;var Gn={};Object.defineProperty(Gn,"__esModule",{value:!0});function vw(t){for(var e=0;e<t.length;e++)t[e]=0;return t}Gn.wipe=vw,Object.defineProperty(Oa,"__esModule",{value:!0});var xn=Qe,Vl=Gn,yw=20;function bw(t,e,n){for(var r=1634760805,i=857760878,o=2036477234,c=1797285236,l=n[3]<<24|n[2]<<16|n[1]<<8|n[0],h=n[7]<<24|n[6]<<16|n[5]<<8|n[4],d=n[11]<<24|n[10]<<16|n[9]<<8|n[8],v=n[15]<<24|n[14]<<16|n[13]<<8|n[12],E=n[19]<<24|n[18]<<16|n[17]<<8|n[16],_=n[23]<<24|n[22]<<16|n[21]<<8|n[20],S=n[27]<<24|n[26]<<16|n[25]<<8|n[24],P=n[31]<<24|n[30]<<16|n[29]<<8|n[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=r,A=i,N=o,C=c,f=l,x=h,J=d,z=v,ee=E,de=_,me=S,D=P,U=L,ae=k,le=q,ne=T,re=0;re<yw;re+=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,N=N+J|0,le^=N,le=le>>>32-16|le<<16,me=me+le|0,J^=me,J=J>>>32-12|J<<12,C=C+z|0,ne^=C,ne=ne>>>32-16|ne<<16,D=D+ne|0,z^=D,z=z>>>32-12|z<<12,N=N+J|0,le^=N,le=le>>>32-8|le<<8,me=me+le|0,J^=me,J=J>>>32-7|J<<7,C=C+z|0,ne^=C,ne=ne>>>32-8|ne<<8,D=D+ne|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,ne^=M,ne=ne>>>32-16|ne<<16,me=me+ne|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,N=N+z|0,ae^=N,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,N=N+z|0,ae^=N,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,ne^=M,ne=ne>>>32-8|ne<<8,me=me+ne|0,x^=me,x=x>>>32-7|x<<7;xn.writeUint32LE(M+r|0,t,0),xn.writeUint32LE(A+i|0,t,4),xn.writeUint32LE(N+o|0,t,8),xn.writeUint32LE(C+c|0,t,12),xn.writeUint32LE(f+l|0,t,16),xn.writeUint32LE(x+h|0,t,20),xn.writeUint32LE(J+d|0,t,24),xn.writeUint32LE(z+v|0,t,28),xn.writeUint32LE(ee+E|0,t,32),xn.writeUint32LE(de+_|0,t,36),xn.writeUint32LE(me+S|0,t,40),xn.writeUint32LE(D+P|0,t,44),xn.writeUint32LE(U+L|0,t,48),xn.writeUint32LE(ae+k|0,t,52),xn.writeUint32LE(le+q|0,t,56),xn.writeUint32LE(ne+T|0,t,60)}function ld(t,e,n,r,i){if(i===void 0&&(i=0),t.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(r.length<n.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<n.length;h+=64){bw(l,o,t);for(var d=h;d<h+64&&d<n.length;d++)r[d]=n[d]^l[d-h];Ew(o,0,c)}return Vl.wipe(l),i===0&&Vl.wipe(o),r}Oa.streamXOR=ld;function _w(t,e,n,r){return r===void 0&&(r=0),Vl.wipe(n),ld(t,e,n,n,r)}Oa.stream=_w;function Ew(t,e,n){for(var r=1;n--;)r=r+(t[e]&255)|0,t[e]=r&255,r>>>=8,e++;if(r>0)throw new Error("ChaCha: counter overflow")}var ud={},ni={};Object.defineProperty(ni,"__esModule",{value:!0});function xw(t,e,n){return~(t-1)&e|t-1&n}ni.select=xw;function Cw(t,e){return(t|0)-(e|0)-1>>>31&1}ni.lessOrEqual=Cw;function hd(t,e){if(t.length!==e.length)return 0;for(var n=0,r=0;r<t.length;r++)n|=t[r]^e[r];return 1&n-1>>>8}ni.compare=hd;function Iw(t,e){return t.length===0||e.length===0?!1:hd(t,e)!==0}ni.equal=Iw,function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ni,n=Gn;t.DIGEST_LENGTH=16;var r=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],N=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 ne=l[h+6]|l[h+7]<<8;P+=(le>>>7|ne<<9)&8191;var re=l[h+8]|l[h+9]<<8;L+=(ne>>>4|re<<12)&8191,k+=re>>>1&8191;var oe=l[h+10]|l[h+11]<<8;q+=(re>>>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,Re=ge;Re+=E*N,Re+=_*(5*D),Re+=S*(5*me),Re+=P*(5*de),Re+=L*(5*ee),ge=Re>>>13,Re&=8191,Re+=k*(5*z),Re+=q*(5*J),Re+=T*(5*x),Re+=M*(5*f),Re+=A*(5*C),ge+=Re>>>13,Re&=8191;var be=ge;be+=E*C,be+=_*N,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*N,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*N,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*N,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*N,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*N,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*N,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*N,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*N,ge+=ve>>>13,ve&=8191,ge=(ge<<2)+ge|0,ge=ge+Re|0,Re=ge&8191,ge=ge>>>13,be+=ge,E=Re,_=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 n.wipe(this._buffer),n.wipe(this._r),n.wipe(this._h),n.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},c}();t.Poly1305=r;function i(c,l){var h=new r(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}(ud),function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Oa,n=ud,r=Gn,i=Qe,o=ni;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),r.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),r.wipe(S),q},h.prototype.clean=function(){return r.wipe(this._key),this},h.prototype._authenticate=function(d,v,E,_){var S=new n.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(),r.wipe(L),r.wipe(P)},h}();t.ChaCha20Poly1305=l}(kl);var fd={},co={},Kl={};Object.defineProperty(Kl,"__esModule",{value:!0});function Sw(t){return typeof t.saveState<"u"&&typeof t.restoreState<"u"&&typeof t.cleanSavedState<"u"}Kl.isSerializableHash=Sw,Object.defineProperty(co,"__esModule",{value:!0});var Sr=Kl,Dw=ni,Ow=Gn,dd=function(){function t(e,n){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var r=new Uint8Array(this.blockSize);n.length>this.blockSize?this._inner.update(n).finish(r).clean():r.set(n);for(var i=0;i<r.length;i++)r[i]^=54;this._inner.update(r);for(var i=0;i<r.length;i++)r[i]^=106;this._outer.update(r),Sr.isSerializableHash(this._inner)&&Sr.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),Ow.wipe(r)}return t.prototype.reset=function(){if(!Sr.isSerializableHash(this._inner)||!Sr.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(){Sr.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),Sr.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(!Sr.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(!Sr.isSerializableHash(this._inner)||!Sr.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(!Sr.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},t}();co.HMAC=dd;function Aw(t,e,n){var r=new dd(t,e);r.update(n);var i=r.digest();return r.clean(),i}co.hmac=Aw,co.equal=Dw.equal,Object.defineProperty(fd,"__esModule",{value:!0});var pd=co,gd=Gn,$w=function(){function t(e,n,r,i){r===void 0&&(r=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=i;var o=pd.hmac(this._hash,r,n);this._hmac=new pd.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 n=new Uint8Array(e),r=0;r<n.length;r++)this._bufpos===this._buffer.length&&this._fillBuffer(),n[r]=this._buffer[this._bufpos++];return n},t.prototype.clean=function(){this._hmac.clean(),gd.wipe(this._buffer),gd.wipe(this._counter),this._bufpos=0},t}(),Pw=fd.HKDF=$w,ps={},Pa={},Ta={};Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.BrowserRandomSource=void 0;const md=65536;class Tw{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 n=new Uint8Array(e);for(let r=0;r<n.length;r+=md)this._crypto.getRandomValues(n.subarray(r,r+Math.min(n.length-r,md)));return n}}Ta.BrowserRandomSource=Tw;function Nw(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={},Rw={},Mw=Object.freeze({__proto__:null,default:Rw}),Lw=Ii(Mw);Object.defineProperty(Na,"__esModule",{value:!0}),Na.NodeRandomSource=void 0;const jw=Gn;class Uw{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof Nw<"u"){const e=Lw;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 n=this._crypto.randomBytes(e);if(n.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const r=new Uint8Array(e);for(let i=0;i<r.length;i++)r[i]=n[i];return(0,jw.wipe)(n),r}}Na.NodeRandomSource=Uw,Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.SystemRandomSource=void 0;const Fw=Ta,Bw=Na;class kw{constructor(){if(this.isAvailable=!1,this.name="",this._source=new Fw.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new Bw.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)}}Pa.SystemRandomSource=kw,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const e=Pa,n=Qe,r=Gn;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,n.readUint32LE)(v);return(0,r.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,r.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}(ps);var Ra={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Qe,n=Gn;t.DIGEST_LENGTH=32,t.BLOCK_SIZE=64;var r=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(){n.wipe(this._buffer),n.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){n.wipe(h.state),h.buffer&&n.wipe(h.buffer),h.bufferLength=0,h.bytesHashed=0},l}();t.SHA256=r;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 N=v+A*4;l[A]=e.readUint32BE(d,N)}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 r;h.update(l);var d=h.digest();return h.clean(),d}t.hash=c})(Ra);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=ps,n=Gn;t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=32,t.SHARED_KEY_LENGTH=32;function r(A){const N=new Float64Array(16);if(A)for(let C=0;C<A.length;C++)N[C]=A[C];return N}const i=new Uint8Array(32);i[0]=9;const o=r([56129,1]);function c(A){let N=1;for(let C=0;C<16;C++){let f=A[C]+N+65535;N=Math.floor(f/65536),A[C]=f-N*65536}A[0]+=N-1+37*(N-1)}function l(A,N,C){const f=~(C-1);for(let x=0;x<16;x++){const J=f&(A[x]^N[x]);A[x]^=J,N[x]^=J}}function h(A,N){const C=r(),f=r();for(let x=0;x<16;x++)f[x]=N[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,N){for(let C=0;C<16;C++)A[C]=N[2*C]+(N[2*C+1]<<8);A[15]&=32767}function v(A,N,C){for(let f=0;f<16;f++)A[f]=N[f]+C[f]}function E(A,N,C){for(let f=0;f<16;f++)A[f]=N[f]-C[f]}function _(A,N,C){let f,x,J=0,z=0,ee=0,de=0,me=0,D=0,U=0,ae=0,le=0,ne=0,re=0,oe=0,ie=0,Se=0,ge=0,Re=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],Le=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=N[0],J+=f*Ye,z+=f*Le,ee+=f*Me,de+=f*ze,me+=f*et,D+=f*Te,U+=f*Ve,ae+=f*b,le+=f*p,ne+=f*m,re+=f*$,oe+=f*B,ie+=f*G,Se+=f*Q,ge+=f*xe,Re+=f*Oe,f=N[1],z+=f*Ye,ee+=f*Le,de+=f*Me,me+=f*ze,D+=f*et,U+=f*Te,ae+=f*Ve,le+=f*b,ne+=f*p,re+=f*m,oe+=f*$,ie+=f*B,Se+=f*G,ge+=f*Q,Re+=f*xe,be+=f*Oe,f=N[2],ee+=f*Ye,de+=f*Le,me+=f*Me,D+=f*ze,U+=f*et,ae+=f*Te,le+=f*Ve,ne+=f*b,re+=f*p,oe+=f*m,ie+=f*$,Se+=f*B,ge+=f*G,Re+=f*Q,be+=f*xe,Ae+=f*Oe,f=N[3],de+=f*Ye,me+=f*Le,D+=f*Me,U+=f*ze,ae+=f*et,le+=f*Te,ne+=f*Ve,re+=f*b,oe+=f*p,ie+=f*m,Se+=f*$,ge+=f*B,Re+=f*G,be+=f*Q,Ae+=f*xe,X+=f*Oe,f=N[4],me+=f*Ye,D+=f*Le,U+=f*Me,ae+=f*ze,le+=f*et,ne+=f*Te,re+=f*Ve,oe+=f*b,ie+=f*p,Se+=f*m,ge+=f*$,Re+=f*B,be+=f*G,Ae+=f*Q,X+=f*xe,Y+=f*Oe,f=N[5],D+=f*Ye,U+=f*Le,ae+=f*Me,le+=f*ze,ne+=f*et,re+=f*Te,oe+=f*Ve,ie+=f*b,Se+=f*p,ge+=f*m,Re+=f*$,be+=f*B,Ae+=f*G,X+=f*Q,Y+=f*xe,W+=f*Oe,f=N[6],U+=f*Ye,ae+=f*Le,le+=f*Me,ne+=f*ze,re+=f*et,oe+=f*Te,ie+=f*Ve,Se+=f*b,ge+=f*p,Re+=f*m,be+=f*$,Ae+=f*B,X+=f*G,Y+=f*Q,W+=f*xe,w+=f*Oe,f=N[7],ae+=f*Ye,le+=f*Le,ne+=f*Me,re+=f*ze,oe+=f*et,ie+=f*Te,Se+=f*Ve,ge+=f*b,Re+=f*p,be+=f*m,Ae+=f*$,X+=f*B,Y+=f*G,W+=f*Q,w+=f*xe,F+=f*Oe,f=N[8],le+=f*Ye,ne+=f*Le,re+=f*Me,oe+=f*ze,ie+=f*et,Se+=f*Te,ge+=f*Ve,Re+=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=N[9],ne+=f*Ye,re+=f*Le,oe+=f*Me,ie+=f*ze,Se+=f*et,ge+=f*Te,Re+=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=N[10],re+=f*Ye,oe+=f*Le,ie+=f*Me,Se+=f*ze,ge+=f*et,Re+=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=N[11],oe+=f*Ye,ie+=f*Le,Se+=f*Me,ge+=f*ze,Re+=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=N[12],ie+=f*Ye,Se+=f*Le,ge+=f*Me,Re+=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=N[13],Se+=f*Ye,ge+=f*Le,Re+=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=N[14],ge+=f*Ye,Re+=f*Le,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=N[15],Re+=f*Ye,be+=f*Le,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,ne+=38*Pe,re+=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=ne+x+65535,x=Math.floor(f/65536),ne=f-x*65536,f=re+x+65535,x=Math.floor(f/65536),re=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=Re+x+65535,x=Math.floor(f/65536),Re=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=ne+x+65535,x=Math.floor(f/65536),ne=f-x*65536,f=re+x+65535,x=Math.floor(f/65536),re=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=Re+x+65535,x=Math.floor(f/65536),Re=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]=ne,A[10]=re,A[11]=oe,A[12]=ie,A[13]=Se,A[14]=ge,A[15]=Re}function S(A,N){_(A,N,N)}function P(A,N){const C=r();for(let f=0;f<16;f++)C[f]=N[f];for(let f=253;f>=0;f--)S(C,C),f!==2&&f!==4&&_(C,C,N);for(let f=0;f<16;f++)A[f]=C[f]}function L(A,N){const C=new Uint8Array(32),f=new Float64Array(80),x=r(),J=r(),z=r(),ee=r(),de=r(),me=r();for(let le=0;le<31;le++)C[le]=A[le];C[31]=A[31]&127|64,C[0]&=248,d(f,N);for(let le=0;le<16;le++)J[le]=f[le];x[0]=ee[0]=1;for(let le=254;le>=0;--le){const ne=C[le>>>3]>>>(le&7)&1;l(x,J,ne),l(z,ee,ne),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,ne),l(z,ee,ne)}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 N=new Uint8Array(A);return{publicKey:k(N),secretKey:N}}t.generateKeyPairFromSeed=q;function T(A){const N=(0,e.randomBytes)(32,A),C=q(N);return(0,n.wipe)(N),C}t.generateKeyPair=T;function M(A,N,C=!1){if(A.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(N.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const f=L(A,N);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 wd(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(t):new Uint8Array(t)}function Zl(t,e){e||(e=t.reduce((i,o)=>i+o.length,0));const n=wd(e);let r=0;for(const i of t)n.set(i,r),r+=i.length;return n}function Hw(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),c=o.charCodeAt(0);if(n[c]!==255)throw new TypeError(o+" is ambiguous");n[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 N=P[q],C=0,f=M-1;(N!==0||C<k)&&f!==-1;f--,C++)N+=256*A[f]>>>0,A[f]=N%l>>>0,N=N/l>>>0;if(N!==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=n[P.charCodeAt(L)];if(A===255)return;for(var N=0,C=T-1;(A!==0||N<q)&&C!==-1;C--,N++)A+=l*M[C]>>>0,M[C]=A%256>>>0,A=A/256>>>0;if(A!==0)throw new Error("Non-zero carry");q=N,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 zw=Hw,Ww=zw;const vd=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")},qw=t=>new TextEncoder().encode(t),Vw=t=>new TextDecoder().decode(t);class Kw{constructor(e,n,r){this.name=e,this.prefix=n,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class Gw{constructor(e,n,r){if(this.name=e,this.prefix=n,n.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=r}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 yd(this,e)}}class Zw{constructor(e){this.decoders=e}or(e){return yd(this,e)}decode(e){const n=e[0],r=this.decoders[n];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const yd=(t,e)=>new Zw({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class Yw{constructor(e,n,r,i){this.name=e,this.prefix=n,this.baseEncode=r,this.baseDecode=i,this.encoder=new Kw(e,n,r),this.decoder=new Gw(e,n,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Ma=({name:t,prefix:e,encode:n,decode:r})=>new Yw(t,e,n,r),lo=({prefix:t,name:e,alphabet:n})=>{const{encode:r,decode:i}=Ww(n,e);return Ma({prefix:t,name:e,encode:r,decode:o=>vd(i(o))})},Jw=(t,e,n,r)=>{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*n/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-${r} character`);h=h<<n|E,l+=n,l>=8&&(l-=8,c[d++]=255&h>>l)}if(l>=n||255&h<<8-l)throw new SyntaxError("Unexpected end of data");return c},Xw=(t,e,n)=>{const r=e[e.length-1]==="=",i=(1<<n)-1;let o="",c=0,l=0;for(let h=0;h<t.length;++h)for(l=l<<8|t[h],c+=8;c>n;)c-=n,o+=e[i&l>>c];if(c&&(o+=e[i&l<<n-c]),r)for(;o.length*n&7;)o+="=";return o},bn=({name:t,prefix:e,bitsPerChar:n,alphabet:r})=>Ma({prefix:e,name:t,encode(i){return Xw(i,r,n)},decode(i){return Jw(i,r,n,t)}}),Qw=Ma({prefix:"\0",name:"identity",encode:t=>Vw(t),decode:t=>qw(t)});var ev=Object.freeze({__proto__:null,identity:Qw});const tv=bn({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var nv=Object.freeze({__proto__:null,base2:tv});const rv=bn({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var iv=Object.freeze({__proto__:null,base8:rv});const sv=lo({prefix:"9",name:"base10",alphabet:"0123456789"});var ov=Object.freeze({__proto__:null,base10:sv});const av=bn({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),cv=bn({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var lv=Object.freeze({__proto__:null,base16:av,base16upper:cv});const uv=bn({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),hv=bn({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),fv=bn({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),dv=bn({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),pv=bn({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),gv=bn({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),mv=bn({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),wv=bn({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),vv=bn({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var yv=Object.freeze({__proto__:null,base32:uv,base32upper:hv,base32pad:fv,base32padupper:dv,base32hex:pv,base32hexupper:gv,base32hexpad:mv,base32hexpadupper:wv,base32z:vv});const bv=lo({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),_v=lo({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Ev=Object.freeze({__proto__:null,base36:bv,base36upper:_v});const xv=lo({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Cv=lo({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Iv=Object.freeze({__proto__:null,base58btc:xv,base58flickr:Cv});const Sv=bn({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Dv=bn({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Ov=bn({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Av=bn({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var $v=Object.freeze({__proto__:null,base64:Sv,base64pad:Dv,base64url:Ov,base64urlpad:Av});const bd=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}"),Pv=bd.reduce((t,e,n)=>(t[n]=e,t),[]),Tv=bd.reduce((t,e,n)=>(t[e.codePointAt(0)]=n,t),[]);function Nv(t){return t.reduce((e,n)=>(e+=Pv[n],e),"")}function Rv(t){const e=[];for(const n of t){const r=Tv[n.codePointAt(0)];if(r===void 0)throw new Error(`Non-base256emoji character: ${n}`);e.push(r)}return new Uint8Array(e)}const Mv=Ma({prefix:"\u{1F680}",name:"base256emoji",encode:Nv,decode:Rv});var Lv=Object.freeze({__proto__:null,base256emoji:Mv}),jv=Ed,_d=128,Uv=127,Fv=~Uv,Bv=Math.pow(2,31);function Ed(t,e,n){e=e||[],n=n||0;for(var r=n;t>=Bv;)e[n++]=t&255|_d,t/=128;for(;t&Fv;)e[n++]=t&255|_d,t>>>=7;return e[n]=t|0,Ed.bytes=n-r+1,e}var kv=Yl,Hv=128,xd=127;function Yl(t,r){var n=0,r=r||0,i=0,o=r,c,l=t.length;do{if(o>=l)throw Yl.bytes=0,new RangeError("Could not decode varint");c=t[o++],n+=i<28?(c&xd)<<i:(c&xd)*Math.pow(2,i),i+=7}while(c>=Hv);return Yl.bytes=o-r,n}var zv=Math.pow(2,7),Wv=Math.pow(2,14),qv=Math.pow(2,21),Vv=Math.pow(2,28),Kv=Math.pow(2,35),Gv=Math.pow(2,42),Zv=Math.pow(2,49),Yv=Math.pow(2,56),Jv=Math.pow(2,63),Xv=function(t){return t<zv?1:t<Wv?2:t<qv?3:t<Vv?4:t<Kv?5:t<Gv?6:t<Zv?7:t<Yv?8:t<Jv?9:10},Qv={encode:jv,decode:kv,encodingLength:Xv},Cd=Qv;const Id=(t,e,n=0)=>(Cd.encode(t,e,n),e),Sd=t=>Cd.encodingLength(t),Jl=(t,e)=>{const n=e.byteLength,r=Sd(t),i=r+Sd(n),o=new Uint8Array(i+n);return Id(t,o,0),Id(n,o,r),o.set(e,i),new ey(t,n,e,o)};class ey{constructor(e,n,r,i){this.code=e,this.size=n,this.digest=r,this.bytes=i}}const Dd=({name:t,code:e,encode:n})=>new ty(t,e,n);class ty{constructor(e,n,r){this.name=e,this.code=n,this.encode=r}digest(e){if(e instanceof Uint8Array){const n=this.encode(e);return n instanceof Uint8Array?Jl(this.code,n):n.then(r=>Jl(this.code,r))}else throw Error("Unknown type, must be binary type")}}const Od=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),ny=Dd({name:"sha2-256",code:18,encode:Od("SHA-256")}),ry=Dd({name:"sha2-512",code:19,encode:Od("SHA-512")});var iy=Object.freeze({__proto__:null,sha256:ny,sha512:ry});const Ad=0,sy="identity",$d=vd;var oy=Object.freeze({__proto__:null,identity:{code:Ad,name:sy,encode:$d,digest:t=>Jl(Ad,$d(t))}});new TextEncoder,new TextDecoder;const Pd={...ev,...nv,...iv,...ov,...lv,...yv,...Ev,...Iv,...$v,...Lv};({...iy,...oy});function Td(t,e,n,r){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:r}}}const Nd=Td("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),Xl=Td("ascii","a",t=>{let e="a";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e},t=>{t=t.substring(1);const e=wd(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}),Rd={utf8:Nd,"utf-8":Nd,hex:Pd.base16,latin1:Xl,ascii:Xl,binary:Xl,...Pd};function Fn(t,e="utf8"){const n=Rd[e];if(!n)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t,"utf8"):n.decoder.decode(`${n.prefix}${t}`)}function Dn(t,e="utf8"){const n=Rd[e];if(!n)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"):n.encoder.encode(t).substring(1)}var Md=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},ay=function(){function t(e,n,r){this.name=e,this.version=n,this.os=r,this.type="browser"}return t}(),cy=function(){function t(e){this.version=e,this.type="node",this.name="node",this.os=process.platform}return t}(),ly=function(){function t(e,n,r,i){this.name=e,this.version=n,this.os=r,this.bot=i,this.type="bot-device"}return t}(),uy=function(){function t(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return t}(),hy=function(){function t(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return t}(),fy=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,dy=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Ld=3,py=[["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",fy]],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 gy(t){return t?Ud(t):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new hy:typeof navigator<"u"?Ud(navigator.userAgent):vy()}function my(t){return t!==""&&py.reduce(function(e,n){var r=n[0],i=n[1];if(e)return e;var o=i.exec(t);return!!o&&[r,o]},!1)}function Ud(t){var e=my(t);if(!e)return null;var n=e[0],r=e[1];if(n==="searchbot")return new uy;var i=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);i?i.length<Ld&&(i=Md(Md([],i,!0),yy(Ld-i.length),!0)):i=[];var o=i.join("."),c=wy(t),l=dy.exec(t);return l&&l[1]?new ly(n,o,c,l[1]):new ay(n,o,c)}function wy(t){for(var e=0,n=jd.length;e<n;e++){var r=jd[e],i=r[0],o=r[1],c=o.exec(t);if(c)return i}return null}function vy(){var t=typeof process<"u"&&process.version;return t?new cy(process.version.slice(1)):null}function yy(t){for(var e=[],n=0;n<t;n++)e.push("0");return e}var Ue={};/*! *****************************************************************************
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 Ql=function(t,e){return Ql=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},Ql(t,e)};function wy(t,e){Ql(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var eu=function(){return eu=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},eu.apply(this,arguments)};function vy(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function yy(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(o=(i<3?c(o):i>3?c(e,n,o):c(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o}function by(t,e){return function(n,r){e(n,r,t)}}function _y(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function Ey(t,e,n,r){function i(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function l(v){try{d(r.next(v))}catch(E){c(E)}}function h(v){try{d(r.throw(v))}catch(E){c(E)}}function d(v){v.done?o(v.value):i(v.value).then(l,h)}d((r=r.apply(t,e||[])).next())})}function xy(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,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(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=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 n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){n.label=d[1];break}if(d[0]===6&&n.label<o[1]){n.label=o[1],o=d;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(d);break}o[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(t,n)}catch(v){d=[6,v],i=0}finally{r=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Cy(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}function Iy(t,e){for(var n in t)n!=="default"&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function tu(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function jd(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],c;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(l){c={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(c)throw c.error}}return o}function Sy(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(jd(arguments[e]));return t}function Dy(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],c=0,l=o.length;c<l;c++,i++)r[i]=o[c];return r}function lo(t){return this instanceof lo?(this.v=t,this):new lo(t)}function Oy(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(_){r[_]&&(i[_]=function(S){return new Promise(function(P,L){o.push([_,S,P,L])>1||l(_,S)})})}function l(_,S){try{h(r[_](S))}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(_,S){_(S),o.shift(),o.length&&l(o[0][0],o[0][1])}}function Ay(t){var e,n;return e={},r("next"),r("throw",function(i){throw i}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(i,o){e[i]=t[i]?function(c){return(n=!n)?{value:lo(t[i](c)),done:i==="return"}:o?o(c):c}:o}}function $y(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof tu=="function"?tu(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[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 Py(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function Ty(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function Ry(t){return t&&t.__esModule?t:{default:t}}function Ny(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function My(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}var Ly=Object.freeze({__proto__:null,__extends:wy,get __assign(){return eu},__rest:vy,__decorate:yy,__param:by,__metadata:_y,__awaiter:Ey,__generator:xy,__createBinding:Cy,__exportStar:Iy,__values:tu,__read:jd,__spread:Sy,__spreadArrays:Dy,__await:lo,__asyncGenerator:Oy,__asyncDelegator:Ay,__asyncValues:$y,__makeTemplateObject:Py,__importStar:Ty,__importDefault:Ry,__classPrivateFieldGet:Ny,__classPrivateFieldSet:My}),Ma=xi(Ly),nu={},uo={},Ud;function jy(){if(Ud)return uo;Ud=1,Object.defineProperty(uo,"__esModule",{value:!0}),uo.delay=void 0;function t(e){return new Promise(n=>{setTimeout(()=>{n(!0)},e)})}return uo.delay=t,uo}var Ci={},ru={},Ii={},Fd;function Uy(){return Fd||(Fd=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.ONE_THOUSAND=Ii.ONE_HUNDRED=void 0,Ii.ONE_HUNDRED=100,Ii.ONE_THOUSAND=1e3),Ii}var iu={},Bd;function Fy(){return Bd||(Bd=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}(iu)),iu}var kd;function Hd(){return kd||(kd=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Ma;e.__exportStar(Uy(),t),e.__exportStar(Fy(),t)}(ru)),ru}var zd;function By(){if(zd)return Ci;zd=1,Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.fromMiliseconds=Ci.toMiliseconds=void 0;const t=Hd();function e(r){return r*t.ONE_THOUSAND}Ci.toMiliseconds=e;function n(r){return Math.floor(r/t.ONE_THOUSAND)}return Ci.fromMiliseconds=n,Ci}var Wd;function ky(){return Wd||(Wd=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Ma;e.__exportStar(jy(),t),e.__exportStar(By(),t)}(nu)),nu}var fs={},qd;function Hy(){if(qd)return fs;qd=1,Object.defineProperty(fs,"__esModule",{value:!0}),fs.Watch=void 0;class t{constructor(){this.timestamps=new Map}start(n){if(this.timestamps.has(n))throw new Error(`Watch already started for label: ${n}`);this.timestamps.set(n,{started:Date.now()})}stop(n){const r=this.get(n);if(typeof r.elapsed<"u")throw new Error(`Watch already stopped for label: ${n}`);const i=Date.now()-r.started;this.timestamps.set(n,{started:r.started,elapsed:i})}get(n){const r=this.timestamps.get(n);if(typeof r>"u")throw new Error(`No timestamp found for label: ${n}`);return r}elapsed(n){const r=this.get(n);return r.elapsed||Date.now()-r.started}}return fs.Watch=t,fs.default=t,fs}var su={},ho={},Vd;function zy(){if(Vd)return ho;Vd=1,Object.defineProperty(ho,"__esModule",{value:!0}),ho.IWatch=void 0;class t{}return ho.IWatch=t,ho}var Kd;function Wy(){return Kd||(Kd=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Ma.__exportStar(zy(),t)}(su)),su}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Ma;e.__exportStar(ky(),t),e.__exportStar(Hy(),t),e.__exportStar(Wy(),t),e.__exportStar(Hd(),t)})(ke);var Ot={};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.getLocalStorage=Ot.getLocalStorageOrThrow=Ot.getCrypto=Ot.getCryptoOrThrow=Zd=Ot.getLocation=Ot.getLocationOrThrow=ou=Ot.getNavigator=Ot.getNavigatorOrThrow=Gd=Ot.getDocument=Ot.getDocumentOrThrow=Ot.getFromWindowOrThrow=Ot.getFromWindow=void 0;function Si(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}Ot.getFromWindow=Si;function ds(t){const e=Si(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}Ot.getFromWindowOrThrow=ds;function qy(){return ds("document")}Ot.getDocumentOrThrow=qy;function Vy(){return Si("document")}var Gd=Ot.getDocument=Vy;function Ky(){return ds("navigator")}Ot.getNavigatorOrThrow=Ky;function Gy(){return Si("navigator")}var ou=Ot.getNavigator=Gy;function Zy(){return ds("location")}Ot.getLocationOrThrow=Zy;function Yy(){return Si("location")}var Zd=Ot.getLocation=Yy;function Jy(){return ds("crypto")}Ot.getCryptoOrThrow=Jy;function Xy(){return Si("crypto")}Ot.getCrypto=Xy;function Qy(){return ds("localStorage")}Ot.getLocalStorageOrThrow=Qy;function e5(){return Si("localStorage")}Ot.getLocalStorage=e5;var au={};Object.defineProperty(au,"__esModule",{value:!0});var Yd=au.getWindowMetadata=void 0;const Jd=Ot;function t5(){let t,e;try{t=Jd.getDocumentOrThrow(),e=Jd.getLocationOrThrow()}catch{return null}function n(){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 r(...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=r("name","og:site_name","og:title","twitter:title");return E||(E=t.title),E}function o(){return r("description","og:description","twitter:description","keywords")}const c=i(),l=o(),h=e.origin,d=n();return{description:l,url:h,icons:d,name:c}}Yd=au.getWindowMetadata=t5;var fo={},n5=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),Xd="%[a-f0-9]{2}",Qd=new RegExp("("+Xd+")|([^%]+?)","gi"),e1=new RegExp("("+Xd+")+","gi");function cu(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],cu(n),cu(r))}function r5(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(Qd)||[],n=1;n<e.length;n++)t=cu(e,n).join(""),e=t.match(Qd)||[];return t}}function i5(t){for(var e={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},n=e1.exec(t);n;){try{e[n[0]]=decodeURIComponent(n[0])}catch{var r=r5(n[0]);r!==n[0]&&(e[n[0]]=r)}n=e1.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 s5=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 i5(t)}},o5=(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 n=t.indexOf(e);return n===-1?[t]:[t.slice(0,n),t.slice(n+e.length)]},a5=function(t,e){for(var n={},r=Object.keys(t),i=Array.isArray(e),o=0;o<r.length;o++){var c=r[o],l=t[c];(i?e.indexOf(c)!==-1:e(c,l,t))&&(n[c]=l)}return n};(function(t){const e=n5,n=s5,r=o5,i=a5,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?n(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]=r(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]=r(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)}})(fo);const c5={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 l5(t,e=[]){const n=[];return Object.keys(t).forEach(r=>{if(e.length&&!e.includes(r))return;const i=t[r];n.push(...i.accounts)}),n}function t1(t,e){return t.includes(":")?[t]:e.chains||[]}const n1="base10",On="base16",lu="base64pad",uu="utf8",r1=0,Di=1,u5=0,i1=1,hu=12,fu=32;function h5(){const t=Gl.generateKeyPair();return{privateKey:Dn(t.secretKey,On),publicKey:Dn(t.publicKey,On)}}function du(){const t=hs.randomBytes(fu);return Dn(t,On)}function f5(t,e){const n=Gl.sharedKey(Fn(t,On),Fn(e,On)),r=new Ow(Ra.SHA256,n).expand(fu);return Dn(r,On)}function d5(t){const e=Ra.hash(Fn(t,On));return Dn(e,On)}function La(t){const e=Ra.hash(Fn(t,uu));return Dn(e,On)}function p5(t){return Fn(`${t}`,n1)}function po(t){return Number(Dn(t,n1))}function g5(t){const e=p5(typeof t.type<"u"?t.type:r1);if(po(e)===Di&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const n=typeof t.senderPublicKey<"u"?Fn(t.senderPublicKey,On):void 0,r=typeof t.iv<"u"?Fn(t.iv,On):hs.randomBytes(hu),i=new kl.ChaCha20Poly1305(Fn(t.symKey,On)).seal(r,Fn(t.message,uu));return w5({type:e,sealed:i,iv:r,senderPublicKey:n})}function m5(t){const e=new kl.ChaCha20Poly1305(Fn(t.symKey,On)),{sealed:n,iv:r}=ja(t.encoded),i=e.open(r,n);if(i===null)throw new Error("Failed to decrypt");return Dn(i,uu)}function w5(t){if(po(t.type)===Di){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Dn(Zl([t.type,t.senderPublicKey,t.iv,t.sealed]),lu)}return Dn(Zl([t.type,t.iv,t.sealed]),lu)}function ja(t){const e=Fn(t,lu),n=e.slice(u5,i1),r=i1;if(po(n)===Di){const l=r+fu,h=l+hu,d=e.slice(r,l),v=e.slice(l,h),E=e.slice(h);return{type:n,sealed:E,iv:v,senderPublicKey:d}}const i=r+hu,o=e.slice(r,i),c=e.slice(i);return{type:n,sealed:c,iv:o}}function v5(t,e){const n=ja(t);return s1({type:po(n.type),senderPublicKey:typeof n.senderPublicKey<"u"?Dn(n.senderPublicKey,On):void 0,receiverPublicKey:e?.receiverPublicKey})}function s1(t){const e=t?.type||r1;if(e===Di){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 o1(t){return t.type===Di&&typeof t.senderPublicKey=="string"&&typeof t.receiverPublicKey=="string"}var y5=Object.defineProperty,a1=Object.getOwnPropertySymbols,b5=Object.prototype.hasOwnProperty,_5=Object.prototype.propertyIsEnumerable,c1=(t,e,n)=>e in t?y5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,l1=(t,e)=>{for(var n in e||(e={}))b5.call(e,n)&&c1(t,n,e[n]);if(a1)for(var n of a1(e))_5.call(e,n)&&c1(t,n,e[n]);return t};const E5="ReactNative",go={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},x5="js";function u1(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function C5(){return!Gd()&&!!ou()&&navigator.product===E5}function I5(){return!u1()&&!!ou()}function S5(){return C5()?go.reactNative:u1()?go.node:I5()?go.browser:go.unknown}function D5(t,e){let n=fo.parse(t);return n=l1(l1({},n),e),t=fo.stringify(n),t}function O5(){return Yd()||{name:"",description:"",url:"",icons:[""]}}function A5(){const t=fy();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 $5(){var t;const e=S5();return e===go.browser?[e,((t=Zd())==null?void 0:t.host)||"unknown"].join(":"):e}function P5(t,e,n){const r=A5(),i=$5();return[[t,e].join("-"),[x5,n].join("-"),r,i].join("/")}function T5({protocol:t,version:e,relayUrl:n,sdkVersion:r,auth:i,projectId:o,useOnCloseEvent:c}){const l=n.split("?"),h=P5(t,e,r),d={auth:i,ua:h,projectId:o,useOnCloseEvent:c||void 0},v=D5(l[1]||"",d);return l[0]+"?"+v}function Oi(t,e){return t.filter(n=>e.includes(n)).length===t.length}function h1(t){return Object.fromEntries(t.entries())}function f1(t){return new Map(Object.entries(t))}function ps(t=ke.FIVE_MINUTES,e){const n=ke.toMiliseconds(t||ke.FIVE_MINUTES);let r,i,o;return{resolve:c=>{o&&r&&(clearTimeout(o),r(c))},reject:c=>{o&&i&&(clearTimeout(o),i(c))},done:()=>new Promise((c,l)=>{o=setTimeout(()=>{l(new Error(e))},n),r=c,i=l})}}function Ua(t,e,n){return new Promise(async(r,i)=>{const o=setTimeout(()=>i(new Error(n)),e);try{const c=await t;r(c)}catch(c){i(c)}clearTimeout(o)})}function d1(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 R5(t){return d1("topic",t)}function N5(t){return d1("id",t)}function p1(t){const[e,n]=t.split(":"),r={id:void 0,topic:void 0};if(e==="topic"&&typeof n=="string")r.topic=n;else if(e==="id"&&Number.isInteger(Number(n)))r.id=Number(n);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${n}`);return r}function Ir(t,e){return ke.fromMiliseconds((e||Date.now())+ke.toMiliseconds(t))}function ri(t){return Date.now()>=ke.toMiliseconds(t)}function Qt(t,e){return`${t}${e?`:${e}`:""}`}function pu(t=[],e=[]){return[...new Set([...t,...e])]}const M5="irn";function gu(t){return t?.relay||{protocol:M5}}function Fa(t){const e=c5[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var L5=Object.defineProperty,g1=Object.getOwnPropertySymbols,j5=Object.prototype.hasOwnProperty,U5=Object.prototype.propertyIsEnumerable,m1=(t,e,n)=>e in t?L5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,F5=(t,e)=>{for(var n in e||(e={}))j5.call(e,n)&&m1(t,n,e[n]);if(g1)for(var n of g1(e))U5.call(e,n)&&m1(t,n,e[n]);return t};function B5(t,e="-"){const n={},r="relay"+e;return Object.keys(t).forEach(i=>{if(i.startsWith(r)){const o=i.replace(r,""),c=t[i];n[o]=c}}),n}function k5(t){const e=t.indexOf(":"),n=t.indexOf("?")!==-1?t.indexOf("?"):void 0,r=t.substring(0,e),i=t.substring(e+1,n).split("@"),o=typeof n<"u"?t.substring(n):"",c=fo.parse(o);return{protocol:r,topic:i[0],version:parseInt(i[1],10),symKey:c.symKey,relay:B5(c)}}function H5(t,e="-"){const n="relay",r={};return Object.keys(t).forEach(i=>{const o=n+e+i;t[i]&&(r[o]=t[i])}),r}function z5(t){return`${t.protocol}:${t.topic}@${t.version}?`+fo.stringify(F5({symKey:t.symKey},H5(t.relay)))}function gs(t){const e=[];return t.forEach(n=>{const[r,i]=n.split(":");e.push(`${r}:${i}`)}),e}function W5(t){const e=[];return Object.values(t).forEach(n=>{e.push(...gs(n.accounts))}),e}function q5(t,e){const n=[];return Object.values(t).forEach(r=>{gs(r.accounts).includes(e)&&n.push(...r.methods)}),n}function V5(t,e){const n=[];return Object.values(t).forEach(r=>{gs(r.accounts).includes(e)&&n.push(...r.events)}),n}function K5(t,e){const n=ka(t,e);if(n)throw new Error(n.message);const r={};for(const[i,o]of Object.entries(t))r[i]={methods:o.methods,events:o.events,chains:o.accounts.map(c=>`${c.split(":")[0]}:${c.split(":")[1]}`)};return r}function w1(t){return t.includes(":")}function Ba(t){return w1(t)?t.split(":")[0]:t}const G5={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}},Z5={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:n,code:r}=Z5[t];return{message:e?`${n} ${e}`:n,code:r}}function Gt(t,e){const{message:n,code:r}=G5[t];return{message:e?`${n} ${e}`:n,code:r}}function Ur(t,e){return Array.isArray(t)?typeof e<"u"&&t.length?t.every(e):!0:!1}function ms(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function An(t){return typeof t>"u"}function gn(t,e){return e&&An(t)?!0:typeof t=="string"&&Boolean(t.trim().length)}function mu(t,e){return e&&An(t)?!0:typeof t=="number"&&!isNaN(t)}function Y5(t,e){const{requiredNamespaces:n}=e,r=Object.keys(t.namespaces),i=Object.keys(n);let o=!0;return Oi(i,r)?(r.forEach(c=>{const{accounts:l,methods:h,events:d}=t.namespaces[c],v=gs(l),E=n[c];(!Oi(t1(c,E),v)||!Oi(E.methods,h)||!Oi(E.events,d))&&(o=!1)}),o):!1}function wu(t){return gn(t,!1)&&t.includes(":")?t.split(":").length===2:!1}function J5(t){if(gn(t,!1)&&t.includes(":")){const e=t.split(":");if(e.length===3){const n=e[0]+":"+e[1];return!!e[2]&&wu(n)}}return!1}function X5(t){if(gn(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}function Q5(t){var e;return(e=t?.proposer)==null?void 0:e.publicKey}function eb(t){return t?.topic}function tb(t,e){let n=null;return gn(t?.publicKey,!1)||(n=Ee("MISSING_OR_INVALID",`${e} controller public key should be a string`)),n}function v1(t){let e=!0;return Ur(t)?t.length&&(e=t.every(n=>gn(n,!1))):e=!1,e}function nb(t,e,n){let r=null;return Ur(e)?e.forEach(i=>{r||(!wu(i)||!i.includes(t))&&(r=Gt("UNSUPPORTED_CHAINS",`${n}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):r=Gt("UNSUPPORTED_CHAINS",`${n}, chains ${e} should be an array of strings conforming to "namespace:chainId" format`),r}function rb(t,e){let n=null;return Object.entries(t).forEach(([r,i])=>{if(n)return;const o=nb(r,t1(r,i),`${e} requiredNamespace`);o&&(n=o)}),n}function ib(t,e){let n=null;return Ur(t)?t.forEach(r=>{n||J5(r)||(n=Gt("UNSUPPORTED_ACCOUNTS",`${e}, account ${r} should be a string and conform to "namespace:chainId:address" format`))}):n=Gt("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),n}function sb(t,e){let n=null;return Object.values(t).forEach(r=>{if(n)return;const i=ib(r?.accounts,`${e} namespace`);i&&(n=i)}),n}function ob(t,e){let n=null;return v1(t?.methods)?v1(t?.events)||(n=Gt("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):n=Gt("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),n}function y1(t,e){let n=null;return Object.values(t).forEach(r=>{if(n)return;const i=ob(r,`${e}, namespace`);i&&(n=i)}),n}function ab(t,e,n){let r=null;if(t&&ms(t)){const i=y1(t,e);i&&(r=i);const o=rb(t,e);o&&(r=o)}else r=Ee("MISSING_OR_INVALID",`${e}, ${n} should be an object with data`);return r}function ka(t,e){let n=null;if(t&&ms(t)){const r=y1(t,e);r&&(n=r);const i=sb(t,e);i&&(n=i)}else n=Ee("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return n}function b1(t){return gn(t.protocol,!0)}function cb(t,e){let n=!1;return e&&!t?n=!0:t&&Ur(t)&&t.length&&t.forEach(r=>{n=b1(r)}),n}function lb(t){return typeof t=="number"}function Bn(t){return typeof t<"u"&&typeof t!==null}function ub(t){return!(!t||typeof t!="object"||!t.code||!mu(t.code,!1)||!t.message||!gn(t.message,!1))}function hb(t){return!(An(t)||!gn(t.method,!1))}function fb(t){return!(An(t)||An(t.result)&&An(t.error)||!mu(t.id,!1)||!gn(t.jsonrpc,!1))}function db(t){return!(An(t)||!gn(t.name,!1))}function _1(t,e){return!(!wu(e)||!W5(t).includes(e))}function pb(t,e,n){return gn(n,!1)?q5(t,e).includes(n):!1}function gb(t,e,n){return gn(n,!1)?V5(t,e).includes(n):!1}function E1(t,e,n){let r=null;const i=mb(t),o=wb(e),c=Object.keys(i),l=Object.keys(o),h=x1(Object.keys(t)),d=x1(Object.keys(e)),v=h.filter(E=>!d.includes(E));return v.length&&(r=Ee("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces.
14
+ ***************************************************************************** */var Ql=function(t,e){return Ql=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},Ql(t,e)};function by(t,e){Ql(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var eu=function(){return eu=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},eu.apply(this,arguments)};function _y(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function Ey(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(o=(i<3?c(o):i>3?c(e,n,o):c(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o}function xy(t,e){return function(n,r){e(n,r,t)}}function Cy(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function Iy(t,e,n,r){function i(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function l(v){try{d(r.next(v))}catch(E){c(E)}}function h(v){try{d(r.throw(v))}catch(E){c(E)}}function d(v){v.done?o(v.value):i(v.value).then(l,h)}d((r=r.apply(t,e||[])).next())})}function Sy(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,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(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=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 n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){n.label=d[1];break}if(d[0]===6&&n.label<o[1]){n.label=o[1],o=d;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(d);break}o[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(t,n)}catch(v){d=[6,v],i=0}finally{r=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Dy(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}function Oy(t,e){for(var n in t)n!=="default"&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function tu(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Fd(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],c;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(l){c={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(c)throw c.error}}return o}function Ay(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Fd(arguments[e]));return t}function $y(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],c=0,l=o.length;c<l;c++,i++)r[i]=o[c];return r}function uo(t){return this instanceof uo?(this.v=t,this):new uo(t)}function Py(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(_){r[_]&&(i[_]=function(S){return new Promise(function(P,L){o.push([_,S,P,L])>1||l(_,S)})})}function l(_,S){try{h(r[_](S))}catch(P){E(o[0][3],P)}}function h(_){_.value instanceof uo?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 Ty(t){var e,n;return e={},r("next"),r("throw",function(i){throw i}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(i,o){e[i]=t[i]?function(c){return(n=!n)?{value:uo(t[i](c)),done:i==="return"}:o?o(c):c}:o}}function Ny(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof tu=="function"?tu(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[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 Ry(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function My(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function Ly(t){return t&&t.__esModule?t:{default:t}}function jy(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function Uy(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}var Fy=Object.freeze({__proto__:null,__extends:by,get __assign(){return eu},__rest:_y,__decorate:Ey,__param:xy,__metadata:Cy,__awaiter:Iy,__generator:Sy,__createBinding:Dy,__exportStar:Oy,__values:tu,__read:Fd,__spread:Ay,__spreadArrays:$y,__await:uo,__asyncGenerator:Py,__asyncDelegator:Ty,__asyncValues:Ny,__makeTemplateObject:Ry,__importStar:My,__importDefault:Ly,__classPrivateFieldGet:jy,__classPrivateFieldSet:Uy}),La=Ii(Fy),nu={},ho={},Bd;function By(){if(Bd)return ho;Bd=1,Object.defineProperty(ho,"__esModule",{value:!0}),ho.delay=void 0;function t(e){return new Promise(n=>{setTimeout(()=>{n(!0)},e)})}return ho.delay=t,ho}var Si={},ru={},Di={},kd;function ky(){return kd||(kd=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 iu={},Hd;function Hy(){return Hd||(Hd=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}(iu)),iu}var zd;function Wd(){return zd||(zd=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=La;e.__exportStar(ky(),t),e.__exportStar(Hy(),t)}(ru)),ru}var qd;function zy(){if(qd)return Si;qd=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.fromMiliseconds=Si.toMiliseconds=void 0;const t=Wd();function e(r){return r*t.ONE_THOUSAND}Si.toMiliseconds=e;function n(r){return Math.floor(r/t.ONE_THOUSAND)}return Si.fromMiliseconds=n,Si}var Vd;function Wy(){return Vd||(Vd=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=La;e.__exportStar(By(),t),e.__exportStar(zy(),t)}(nu)),nu}var gs={},Kd;function qy(){if(Kd)return gs;Kd=1,Object.defineProperty(gs,"__esModule",{value:!0}),gs.Watch=void 0;class t{constructor(){this.timestamps=new Map}start(n){if(this.timestamps.has(n))throw new Error(`Watch already started for label: ${n}`);this.timestamps.set(n,{started:Date.now()})}stop(n){const r=this.get(n);if(typeof r.elapsed<"u")throw new Error(`Watch already stopped for label: ${n}`);const i=Date.now()-r.started;this.timestamps.set(n,{started:r.started,elapsed:i})}get(n){const r=this.timestamps.get(n);if(typeof r>"u")throw new Error(`No timestamp found for label: ${n}`);return r}elapsed(n){const r=this.get(n);return r.elapsed||Date.now()-r.started}}return gs.Watch=t,gs.default=t,gs}var su={},fo={},Gd;function Vy(){if(Gd)return fo;Gd=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.IWatch=void 0;class t{}return fo.IWatch=t,fo}var Zd;function Ky(){return Zd||(Zd=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),La.__exportStar(Vy(),t)}(su)),su}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=La;e.__exportStar(Wy(),t),e.__exportStar(qy(),t),e.__exportStar(Ky(),t),e.__exportStar(Wd(),t)})(Ue);var Ot={};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.getLocalStorage=Ot.getLocalStorageOrThrow=Ot.getCrypto=Ot.getCryptoOrThrow=Jd=Ot.getLocation=Ot.getLocationOrThrow=ou=Ot.getNavigator=Ot.getNavigatorOrThrow=Yd=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 ms(t){const e=Oi(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}Ot.getFromWindowOrThrow=ms;function Gy(){return ms("document")}Ot.getDocumentOrThrow=Gy;function Zy(){return Oi("document")}var Yd=Ot.getDocument=Zy;function Yy(){return ms("navigator")}Ot.getNavigatorOrThrow=Yy;function Jy(){return Oi("navigator")}var ou=Ot.getNavigator=Jy;function Xy(){return ms("location")}Ot.getLocationOrThrow=Xy;function Qy(){return Oi("location")}var Jd=Ot.getLocation=Qy;function e5(){return ms("crypto")}Ot.getCryptoOrThrow=e5;function t5(){return Oi("crypto")}Ot.getCrypto=t5;function n5(){return ms("localStorage")}Ot.getLocalStorageOrThrow=n5;function r5(){return Oi("localStorage")}Ot.getLocalStorage=r5;var au={};Object.defineProperty(au,"__esModule",{value:!0});var Xd=au.getWindowMetadata=void 0;const Qd=Ot;function i5(){let t,e;try{t=Qd.getDocumentOrThrow(),e=Qd.getLocationOrThrow()}catch{return null}function n(){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 r(...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=r("name","og:site_name","og:title","twitter:title");return E||(E=t.title),E}function o(){return r("description","og:description","twitter:description","keywords")}const c=i(),l=o(),h=e.origin,d=n();return{description:l,url:h,icons:d,name:c}}Xd=au.getWindowMetadata=i5;var po={},s5=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),e1="%[a-f0-9]{2}",t1=new RegExp("("+e1+")|([^%]+?)","gi"),n1=new RegExp("("+e1+")+","gi");function cu(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],cu(n),cu(r))}function o5(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(t1)||[],n=1;n<e.length;n++)t=cu(e,n).join(""),e=t.match(t1)||[];return t}}function a5(t){for(var e={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},n=n1.exec(t);n;){try{e[n[0]]=decodeURIComponent(n[0])}catch{var r=o5(n[0]);r!==n[0]&&(e[n[0]]=r)}n=n1.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 c5=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 a5(t)}},l5=(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 n=t.indexOf(e);return n===-1?[t]:[t.slice(0,n),t.slice(n+e.length)]},u5=function(t,e){for(var n={},r=Object.keys(t),i=Array.isArray(e),o=0;o<r.length;o++){var c=r[o],l=t[c];(i?e.indexOf(c)!==-1:e(c,l,t))&&(n[c]=l)}return n};(function(t){const e=s5,n=c5,r=l5,i=u5,o=T=>T==null,c=Symbol("encodeFragmentIdentifier");function l(T){switch(T.arrayFormat){case"index":return M=>(A,N)=>{const C=A.length;return N===void 0||T.skipNull&&N===null||T.skipEmptyString&&N===""?A:N===null?[...A,[v(M,T),"[",C,"]"].join("")]:[...A,[v(M,T),"[",v(C,T),"]=",v(N,T)].join("")]};case"bracket":return M=>(A,N)=>N===void 0||T.skipNull&&N===null||T.skipEmptyString&&N===""?A:N===null?[...A,[v(M,T),"[]"].join("")]:[...A,[v(M,T),"[]=",v(N,T)].join("")];case"colon-list-separator":return M=>(A,N)=>N===void 0||T.skipNull&&N===null||T.skipEmptyString&&N===""?A:N===null?[...A,[v(M,T),":list="].join("")]:[...A,[v(M,T),":list=",v(N,T)].join("")];case"comma":case"separator":case"bracket-separator":{const M=T.arrayFormat==="bracket-separator"?"[]=":"=";return A=>(N,C)=>C===void 0||T.skipNull&&C===null||T.skipEmptyString&&C===""?N:(C=C===null?"":C,N.length===0?[[v(A,T),M,v(C,T)].join("")]:[[N,v(C,T)].join(T.arrayFormatSeparator)])}default:return M=>(A,N)=>N===void 0||T.skipNull&&N===null||T.skipEmptyString&&N===""?A:N===null?[...A,v(M,T)]:[...A,[v(M,T),"=",v(N,T)].join("")]}}function h(T){let M;switch(T.arrayFormat){case"index":return(A,N,C)=>{if(M=/\[(\d*)\]$/.exec(A),A=A.replace(/\[\d*\]$/,""),!M){C[A]=N;return}C[A]===void 0&&(C[A]={}),C[A][M[1]]=N};case"bracket":return(A,N,C)=>{if(M=/(\[\])$/.exec(A),A=A.replace(/\[\]$/,""),!M){C[A]=N;return}if(C[A]===void 0){C[A]=[N];return}C[A]=[].concat(C[A],N)};case"colon-list-separator":return(A,N,C)=>{if(M=/(:list)$/.exec(A),A=A.replace(/:list$/,""),!M){C[A]=N;return}if(C[A]===void 0){C[A]=[N];return}C[A]=[].concat(C[A],N)};case"comma":case"separator":return(A,N,C)=>{const f=typeof N=="string"&&N.includes(T.arrayFormatSeparator),x=typeof N=="string"&&!f&&E(N,T).includes(T.arrayFormatSeparator);N=x?E(N,T):N;const J=f||x?N.split(T.arrayFormatSeparator).map(z=>E(z,T)):N===null?N:E(N,T);C[A]=J};case"bracket-separator":return(A,N,C)=>{const f=/(\[\])$/.test(A);if(A=A.replace(/\[\]$/,""),!f){C[A]=N&&E(N,T);return}const x=N===null?[]:N.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,N,C)=>{if(C[A]===void 0){C[A]=N;return}C[A]=[].concat(C[A],N)}}}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?n(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),N=Object.create(null);if(typeof T!="string"||(T=T.trim().replace(/^[?#&]/,""),!T))return N;for(const C of T.split("&")){if(C==="")continue;let[f,x]=r(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,N)}for(const C of Object.keys(N)){const f=N[C];if(typeof f=="object"&&f!==null)for(const x of Object.keys(f))f[x]=k(f[x],M);else N[C]=k(f,M)}return M.sort===!1?N:(M.sort===!0?Object.keys(N).sort():Object.keys(N).sort(M.sort)).reduce((C,f)=>{const x=N[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]==="",N=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(N(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,N]=r(T,"#");return Object.assign({url:A.split("?")[0]||"",query:q(L(T),M)},M&&M.parseFragmentIdentifier&&N?{fragmentIdentifier:E(N,M)}:{})},t.stringifyUrl=(T,M)=>{M=Object.assign({encode:!0,strict:!0,[c]:!0},M);const A=S(T.url).split("?")[0]||"",N=t.extract(T.url),C=t.parse(N,{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:N,query:C,fragmentIdentifier:f}=t.parseUrl(T,A);return t.stringifyUrl({url:N,query:i(C,M),fragmentIdentifier:f},A)},t.exclude=(T,M,A)=>{const N=Array.isArray(M)?C=>!M.includes(C):(C,f)=>!M(C,f);return t.pick(T,N,A)}})(po);const h5={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 f5(t,e=[]){const n=[];return Object.keys(t).forEach(r=>{if(e.length&&!e.includes(r))return;const i=t[r];n.push(...i.accounts)}),n}function r1(t,e){return t.includes(":")?[t]:e.chains||[]}const i1="base10",On="base16",lu="base64pad",uu="utf8",s1=0,Ai=1,d5=0,o1=1,hu=12,fu=32;function p5(){const t=Gl.generateKeyPair();return{privateKey:Dn(t.secretKey,On),publicKey:Dn(t.publicKey,On)}}function du(){const t=ps.randomBytes(fu);return Dn(t,On)}function g5(t,e){const n=Gl.sharedKey(Fn(t,On),Fn(e,On)),r=new Pw(Ra.SHA256,n).expand(fu);return Dn(r,On)}function m5(t){const e=Ra.hash(Fn(t,On));return Dn(e,On)}function $i(t){const e=Ra.hash(Fn(t,uu));return Dn(e,On)}function w5(t){return Fn(`${t}`,i1)}function go(t){return Number(Dn(t,i1))}function v5(t){const e=w5(typeof t.type<"u"?t.type:s1);if(go(e)===Ai&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const n=typeof t.senderPublicKey<"u"?Fn(t.senderPublicKey,On):void 0,r=typeof t.iv<"u"?Fn(t.iv,On):ps.randomBytes(hu),i=new kl.ChaCha20Poly1305(Fn(t.symKey,On)).seal(r,Fn(t.message,uu));return b5({type:e,sealed:i,iv:r,senderPublicKey:n})}function y5(t){const e=new kl.ChaCha20Poly1305(Fn(t.symKey,On)),{sealed:n,iv:r}=ja(t.encoded),i=e.open(r,n);if(i===null)throw new Error("Failed to decrypt");return Dn(i,uu)}function b5(t){if(go(t.type)===Ai){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Dn(Zl([t.type,t.senderPublicKey,t.iv,t.sealed]),lu)}return Dn(Zl([t.type,t.iv,t.sealed]),lu)}function ja(t){const e=Fn(t,lu),n=e.slice(d5,o1),r=o1;if(go(n)===Ai){const l=r+fu,h=l+hu,d=e.slice(r,l),v=e.slice(l,h),E=e.slice(h);return{type:n,sealed:E,iv:v,senderPublicKey:d}}const i=r+hu,o=e.slice(r,i),c=e.slice(i);return{type:n,sealed:c,iv:o}}function _5(t,e){const n=ja(t);return a1({type:go(n.type),senderPublicKey:typeof n.senderPublicKey<"u"?Dn(n.senderPublicKey,On):void 0,receiverPublicKey:e?.receiverPublicKey})}function a1(t){const e=t?.type||s1;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 c1(t){return t.type===Ai&&typeof t.senderPublicKey=="string"&&typeof t.receiverPublicKey=="string"}var E5=Object.defineProperty,l1=Object.getOwnPropertySymbols,x5=Object.prototype.hasOwnProperty,C5=Object.prototype.propertyIsEnumerable,u1=(t,e,n)=>e in t?E5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,h1=(t,e)=>{for(var n in e||(e={}))x5.call(e,n)&&u1(t,n,e[n]);if(l1)for(var n of l1(e))C5.call(e,n)&&u1(t,n,e[n]);return t};const I5="ReactNative",mo={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},S5="js";function pu(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function D5(){return!Yd()&&!!ou()&&navigator.product===I5}function gu(){return!pu()&&!!ou()}function O5(){return D5()?mo.reactNative:pu()?mo.node:gu()?mo.browser:mo.unknown}function A5(t,e){let n=po.parse(t);return n=h1(h1({},n),e),t=po.stringify(n),t}function $5(){return Xd()||{name:"",description:"",url:"",icons:[""]}}function P5(){const t=gy();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 T5(){var t;const e=O5();return e===mo.browser?[e,((t=Jd())==null?void 0:t.host)||"unknown"].join(":"):e}function N5(t,e,n){const r=P5(),i=T5();return[[t,e].join("-"),[S5,n].join("-"),r,i].join("/")}function R5({protocol:t,version:e,relayUrl:n,sdkVersion:r,auth:i,projectId:o,useOnCloseEvent:c}){const l=n.split("?"),h=N5(t,e,r),d={auth:i,ua:h,projectId:o,useOnCloseEvent:c||void 0},v=A5(l[1]||"",d);return l[0]+"?"+v}function Pi(t,e){return t.filter(n=>e.includes(n)).length===t.length}function f1(t){return Object.fromEntries(t.entries())}function d1(t){return new Map(Object.entries(t))}function ws(t=Ue.FIVE_MINUTES,e){const n=Ue.toMiliseconds(t||Ue.FIVE_MINUTES);let r,i,o;return{resolve:c=>{o&&r&&(clearTimeout(o),r(c))},reject:c=>{o&&i&&(clearTimeout(o),i(c))},done:()=>new Promise((c,l)=>{o=setTimeout(()=>{l(new Error(e))},n),r=c,i=l})}}function Ua(t,e,n){return new Promise(async(r,i)=>{const o=setTimeout(()=>i(new Error(n)),e);try{const c=await t;r(c)}catch(c){i(c)}clearTimeout(o)})}function p1(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 M5(t){return p1("topic",t)}function L5(t){return p1("id",t)}function g1(t){const[e,n]=t.split(":"),r={id:void 0,topic:void 0};if(e==="topic"&&typeof n=="string")r.topic=n;else if(e==="id"&&Number.isInteger(Number(n)))r.id=Number(n);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${n}`);return r}function vr(t,e){return Ue.fromMiliseconds((e||Date.now())+Ue.toMiliseconds(t))}function ri(t){return Date.now()>=Ue.toMiliseconds(t)}function Qt(t,e){return`${t}${e?`:${e}`:""}`}function mu(t=[],e=[]){return[...new Set([...t,...e])]}const j5="irn";function wu(t){return t?.relay||{protocol:j5}}function Fa(t){const e=h5[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var U5=Object.defineProperty,m1=Object.getOwnPropertySymbols,F5=Object.prototype.hasOwnProperty,B5=Object.prototype.propertyIsEnumerable,w1=(t,e,n)=>e in t?U5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,k5=(t,e)=>{for(var n in e||(e={}))F5.call(e,n)&&w1(t,n,e[n]);if(m1)for(var n of m1(e))B5.call(e,n)&&w1(t,n,e[n]);return t};function H5(t,e="-"){const n={},r="relay"+e;return Object.keys(t).forEach(i=>{if(i.startsWith(r)){const o=i.replace(r,""),c=t[i];n[o]=c}}),n}function z5(t){const e=t.indexOf(":"),n=t.indexOf("?")!==-1?t.indexOf("?"):void 0,r=t.substring(0,e),i=t.substring(e+1,n).split("@"),o=typeof n<"u"?t.substring(n):"",c=po.parse(o);return{protocol:r,topic:i[0],version:parseInt(i[1],10),symKey:c.symKey,relay:H5(c)}}function W5(t,e="-"){const n="relay",r={};return Object.keys(t).forEach(i=>{const o=n+e+i;t[i]&&(r[o]=t[i])}),r}function q5(t){return`${t.protocol}:${t.topic}@${t.version}?`+po.stringify(k5({symKey:t.symKey},W5(t.relay)))}function vs(t){const e=[];return t.forEach(n=>{const[r,i]=n.split(":");e.push(`${r}:${i}`)}),e}function V5(t){const e=[];return Object.values(t).forEach(n=>{e.push(...vs(n.accounts))}),e}function K5(t,e){const n=[];return Object.values(t).forEach(r=>{vs(r.accounts).includes(e)&&n.push(...r.methods)}),n}function G5(t,e){const n=[];return Object.values(t).forEach(r=>{vs(r.accounts).includes(e)&&n.push(...r.events)}),n}function Z5(t,e){const n=ka(t,e);if(n)throw new Error(n.message);const r={};for(const[i,o]of Object.entries(t))r[i]={methods:o.methods,events:o.events,chains:o.accounts.map(c=>`${c.split(":")[0]}:${c.split(":")[1]}`)};return r}function v1(t){return t.includes(":")}function Ba(t){return v1(t)?t.split(":")[0]:t}const Y5={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}},J5={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:n,code:r}=J5[t];return{message:e?`${n} ${e}`:n,code:r}}function Gt(t,e){const{message:n,code:r}=Y5[t];return{message:e?`${n} ${e}`:n,code:r}}function Ur(t,e){return Array.isArray(t)?typeof e<"u"&&t.length?t.every(e):!0:!1}function ys(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function An(t){return typeof t>"u"}function gn(t,e){return e&&An(t)?!0:typeof t=="string"&&Boolean(t.trim().length)}function vu(t,e){return e&&An(t)?!0:typeof t=="number"&&!isNaN(t)}function X5(t,e){const{requiredNamespaces:n}=e,r=Object.keys(t.namespaces),i=Object.keys(n);let o=!0;return Pi(i,r)?(r.forEach(c=>{const{accounts:l,methods:h,events:d}=t.namespaces[c],v=vs(l),E=n[c];(!Pi(r1(c,E),v)||!Pi(E.methods,h)||!Pi(E.events,d))&&(o=!1)}),o):!1}function yu(t){return gn(t,!1)&&t.includes(":")?t.split(":").length===2:!1}function Q5(t){if(gn(t,!1)&&t.includes(":")){const e=t.split(":");if(e.length===3){const n=e[0]+":"+e[1];return!!e[2]&&yu(n)}}return!1}function eb(t){if(gn(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}function tb(t){var e;return(e=t?.proposer)==null?void 0:e.publicKey}function nb(t){return t?.topic}function rb(t,e){let n=null;return gn(t?.publicKey,!1)||(n=Ee("MISSING_OR_INVALID",`${e} controller public key should be a string`)),n}function y1(t){let e=!0;return Ur(t)?t.length&&(e=t.every(n=>gn(n,!1))):e=!1,e}function ib(t,e,n){let r=null;return Ur(e)?e.forEach(i=>{r||(!yu(i)||!i.includes(t))&&(r=Gt("UNSUPPORTED_CHAINS",`${n}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):r=Gt("UNSUPPORTED_CHAINS",`${n}, chains ${e} should be an array of strings conforming to "namespace:chainId" format`),r}function sb(t,e){let n=null;return Object.entries(t).forEach(([r,i])=>{if(n)return;const o=ib(r,r1(r,i),`${e} requiredNamespace`);o&&(n=o)}),n}function ob(t,e){let n=null;return Ur(t)?t.forEach(r=>{n||Q5(r)||(n=Gt("UNSUPPORTED_ACCOUNTS",`${e}, account ${r} should be a string and conform to "namespace:chainId:address" format`))}):n=Gt("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),n}function ab(t,e){let n=null;return Object.values(t).forEach(r=>{if(n)return;const i=ob(r?.accounts,`${e} namespace`);i&&(n=i)}),n}function cb(t,e){let n=null;return y1(t?.methods)?y1(t?.events)||(n=Gt("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):n=Gt("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),n}function b1(t,e){let n=null;return Object.values(t).forEach(r=>{if(n)return;const i=cb(r,`${e}, namespace`);i&&(n=i)}),n}function lb(t,e,n){let r=null;if(t&&ys(t)){const i=b1(t,e);i&&(r=i);const o=sb(t,e);o&&(r=o)}else r=Ee("MISSING_OR_INVALID",`${e}, ${n} should be an object with data`);return r}function ka(t,e){let n=null;if(t&&ys(t)){const r=b1(t,e);r&&(n=r);const i=ab(t,e);i&&(n=i)}else n=Ee("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return n}function _1(t){return gn(t.protocol,!0)}function ub(t,e){let n=!1;return e&&!t?n=!0:t&&Ur(t)&&t.length&&t.forEach(r=>{n=_1(r)}),n}function hb(t){return typeof t=="number"}function Bn(t){return typeof t<"u"&&typeof t!==null}function fb(t){return!(!t||typeof t!="object"||!t.code||!vu(t.code,!1)||!t.message||!gn(t.message,!1))}function db(t){return!(An(t)||!gn(t.method,!1))}function pb(t){return!(An(t)||An(t.result)&&An(t.error)||!vu(t.id,!1)||!gn(t.jsonrpc,!1))}function gb(t){return!(An(t)||!gn(t.name,!1))}function E1(t,e){return!(!yu(e)||!V5(t).includes(e))}function mb(t,e,n){return gn(n,!1)?K5(t,e).includes(n):!1}function wb(t,e,n){return gn(n,!1)?G5(t,e).includes(n):!1}function x1(t,e,n){let r=null;const i=vb(t),o=yb(e),c=Object.keys(i),l=Object.keys(o),h=C1(Object.keys(t)),d=C1(Object.keys(e)),v=h.filter(E=>!d.includes(E));return v.length&&(r=Ee("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces.
15
15
  Required: ${v.toString()}
16
- Received: ${Object.keys(e).toString()}`)),Oi(c,l)||(r=Ee("NON_CONFORMING_NAMESPACES",`${n} namespaces chains don't satisfy required namespaces.
16
+ Received: ${Object.keys(e).toString()}`)),Pi(c,l)||(r=Ee("NON_CONFORMING_NAMESPACES",`${n} namespaces chains don't satisfy required namespaces.
17
17
  Required: ${c.toString()}
18
- Approved: ${l.toString()}`)),Object.keys(e).forEach(E=>{if(!E.includes(":")||r)return;const _=gs(e[E].accounts);_.includes(E)||(r=Ee("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${E}
18
+ Approved: ${l.toString()}`)),Object.keys(e).forEach(E=>{if(!E.includes(":")||r)return;const _=vs(e[E].accounts);_.includes(E)||(r=Ee("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${E}
19
19
  Required: ${E}
20
- Approved: ${_.toString()}`))}),c.forEach(E=>{r||(Oi(i[E].methods,o[E].methods)?Oi(i[E].events,o[E].events)||(r=Ee("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${E}`)):r=Ee("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${E}`))}),r}function mb(t){const e={};return Object.keys(t).forEach(n=>{var r;n.includes(":")?e[n]=t[n]:(r=t[n].chains)==null||r.forEach(i=>{e[i]={methods:t[n].methods,events:t[n].events}})}),e}function x1(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function wb(t){const e={};return Object.keys(t).forEach(n=>{if(n.includes(":"))e[n]=t[n];else{const r=gs(t[n].accounts);r?.forEach(i=>{e[i]={accounts:t[n].accounts.filter(o=>o.includes(`${i}:`)),methods:t[n].methods,events:t[n].events}})}}),e}function vb(t,e){return mu(t,!1)&&t<=e.max&&t>=e.min}var Ha={};/*! *****************************************************************************
20
+ Approved: ${_.toString()}`))}),c.forEach(E=>{r||(Pi(i[E].methods,o[E].methods)?Pi(i[E].events,o[E].events)||(r=Ee("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${E}`)):r=Ee("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${E}`))}),r}function vb(t){const e={};return Object.keys(t).forEach(n=>{var r;n.includes(":")?e[n]=t[n]:(r=t[n].chains)==null||r.forEach(i=>{e[i]={methods:t[n].methods,events:t[n].events}})}),e}function C1(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function yb(t){const e={};return Object.keys(t).forEach(n=>{if(n.includes(":"))e[n]=t[n];else{const r=vs(t[n].accounts);r?.forEach(i=>{e[i]={accounts:t[n].accounts.filter(o=>o.includes(`${i}:`)),methods:t[n].methods,events:t[n].events}})}}),e}function bb(t,e){return vu(t,!1)&&t<=e.max&&t>=e.min}var Ha={};/*! *****************************************************************************
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 vu=function(t,e){return vu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},vu(t,e)};function yb(t,e){vu(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var yu=function(){return yu=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},yu.apply(this,arguments)};function bb(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function _b(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(o=(i<3?c(o):i>3?c(e,n,o):c(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o}function Eb(t,e){return function(n,r){e(n,r,t)}}function xb(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function Cb(t,e,n,r){function i(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function l(v){try{d(r.next(v))}catch(E){c(E)}}function h(v){try{d(r.throw(v))}catch(E){c(E)}}function d(v){v.done?o(v.value):i(v.value).then(l,h)}d((r=r.apply(t,e||[])).next())})}function Ib(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,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(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=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 n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){n.label=d[1];break}if(d[0]===6&&n.label<o[1]){n.label=o[1],o=d;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(d);break}o[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(t,n)}catch(v){d=[6,v],i=0}finally{r=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Sb(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}function Db(t,e){for(var n in t)n!=="default"&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function bu(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function C1(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],c;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(l){c={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(c)throw c.error}}return o}function Ob(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(C1(arguments[e]));return t}function Ab(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],c=0,l=o.length;c<l;c++,i++)r[i]=o[c];return r}function mo(t){return this instanceof mo?(this.v=t,this):new mo(t)}function $b(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(_){r[_]&&(i[_]=function(S){return new Promise(function(P,L){o.push([_,S,P,L])>1||l(_,S)})})}function l(_,S){try{h(r[_](S))}catch(P){E(o[0][3],P)}}function h(_){_.value instanceof mo?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 Pb(t){var e,n;return e={},r("next"),r("throw",function(i){throw i}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(i,o){e[i]=t[i]?function(c){return(n=!n)?{value:mo(t[i](c)),done:i==="return"}:o?o(c):c}:o}}function Tb(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof bu=="function"?bu(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[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 Rb(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function Nb(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function Mb(t){return t&&t.__esModule?t:{default:t}}function Lb(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function jb(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}var Ub=Object.freeze({__proto__:null,__extends:yb,get __assign(){return yu},__rest:bb,__decorate:_b,__param:Eb,__metadata:xb,__awaiter:Cb,__generator:Ib,__createBinding:Sb,__exportStar:Db,__values:bu,__read:C1,__spread:Ob,__spreadArrays:Ab,__await:mo,__asyncGenerator:$b,__asyncDelegator:Pb,__asyncValues:Tb,__makeTemplateObject:Rb,__importStar:Nb,__importDefault:Mb,__classPrivateFieldGet:Lb,__classPrivateFieldSet:jb}),I1=xi(Ub),wo={};Object.defineProperty(wo,"__esModule",{value:!0});function Fb(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}}wo.safeJsonParse=Fb;function Bb(t){return typeof t=="string"?t:JSON.stringify(t,(e,n)=>typeof n>"u"?null:n)}wo.safeJsonStringify=Bb;var vo={exports:{}},S1;function kb(){return S1||(S1=1,function(){let t;function e(){}t=e,t.prototype.getItem=function(n){return this.hasOwnProperty(n)?String(this[n]):null},t.prototype.setItem=function(n,r){this[n]=String(r)},t.prototype.removeItem=function(n){delete this[n]},t.prototype.clear=function(){const n=this;Object.keys(n).forEach(function(r){n[r]=void 0,delete n[r]})},t.prototype.key=function(n){return n=n||0,Object.keys(this)[n]},t.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof pn<"u"&&pn.localStorage?vo.exports=pn.localStorage:typeof window<"u"&&window.localStorage?vo.exports=window.localStorage:vo.exports=new e}()),vo.exports}var _u={},yo={},D1;function Hb(){if(D1)return yo;D1=1,Object.defineProperty(yo,"__esModule",{value:!0}),yo.IKeyValueStorage=void 0;class t{}return yo.IKeyValueStorage=t,yo}var bo={},O1;function zb(){if(O1)return bo;O1=1,Object.defineProperty(bo,"__esModule",{value:!0}),bo.parseEntry=void 0;const t=wo;function e(n){var r;return[n[0],t.safeJsonParse((r=n[1])!==null&&r!==void 0?r:"")]}return bo.parseEntry=e,bo}var A1;function Wb(){return A1||(A1=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=I1;e.__exportStar(Hb(),t),e.__exportStar(zb(),t)}(_u)),_u}Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.KeyValueStorage=void 0;const ws=I1,$1=wo,qb=ws.__importDefault(kb()),Vb=Wb();class P1{constructor(){this.localStorage=qb.default}getKeys(){return ws.__awaiter(this,void 0,void 0,function*(){return Object.keys(this.localStorage)})}getEntries(){return ws.__awaiter(this,void 0,void 0,function*(){return Object.entries(this.localStorage).map(Vb.parseEntry)})}getItem(e){return ws.__awaiter(this,void 0,void 0,function*(){const n=this.localStorage.getItem(e);if(n!==null)return $1.safeJsonParse(n)})}setItem(e,n){return ws.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(e,$1.safeJsonStringify(n))})}removeItem(e){return ws.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(e)})}}Ha.KeyValueStorage=P1;var Kb=Ha.default=P1,_o={};/*! *****************************************************************************
33
+ ***************************************************************************** */var bu=function(t,e){return bu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},bu(t,e)};function _b(t,e){bu(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var _u=function(){return _u=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_u.apply(this,arguments)};function Eb(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function xb(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(o=(i<3?c(o):i>3?c(e,n,o):c(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o}function Cb(t,e){return function(n,r){e(n,r,t)}}function Ib(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function Sb(t,e,n,r){function i(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function l(v){try{d(r.next(v))}catch(E){c(E)}}function h(v){try{d(r.throw(v))}catch(E){c(E)}}function d(v){v.done?o(v.value):i(v.value).then(l,h)}d((r=r.apply(t,e||[])).next())})}function Db(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,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(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=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 n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){n.label=d[1];break}if(d[0]===6&&n.label<o[1]){n.label=o[1],o=d;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(d);break}o[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(t,n)}catch(v){d=[6,v],i=0}finally{r=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Ob(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}function Ab(t,e){for(var n in t)n!=="default"&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function Eu(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function I1(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],c;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(l){c={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(c)throw c.error}}return o}function $b(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(I1(arguments[e]));return t}function Pb(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],c=0,l=o.length;c<l;c++,i++)r[i]=o[c];return r}function wo(t){return this instanceof wo?(this.v=t,this):new wo(t)}function Tb(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(_){r[_]&&(i[_]=function(S){return new Promise(function(P,L){o.push([_,S,P,L])>1||l(_,S)})})}function l(_,S){try{h(r[_](S))}catch(P){E(o[0][3],P)}}function h(_){_.value instanceof wo?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 Nb(t){var e,n;return e={},r("next"),r("throw",function(i){throw i}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(i,o){e[i]=t[i]?function(c){return(n=!n)?{value:wo(t[i](c)),done:i==="return"}:o?o(c):c}:o}}function Rb(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Eu=="function"?Eu(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[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 Mb(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function Lb(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function jb(t){return t&&t.__esModule?t:{default:t}}function Ub(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function Fb(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}var Bb=Object.freeze({__proto__:null,__extends:_b,get __assign(){return _u},__rest:Eb,__decorate:xb,__param:Cb,__metadata:Ib,__awaiter:Sb,__generator:Db,__createBinding:Ob,__exportStar:Ab,__values:Eu,__read:I1,__spread:$b,__spreadArrays:Pb,__await:wo,__asyncGenerator:Tb,__asyncDelegator:Nb,__asyncValues:Rb,__makeTemplateObject:Mb,__importStar:Lb,__importDefault:jb,__classPrivateFieldGet:Ub,__classPrivateFieldSet:Fb}),S1=Ii(Bb),vo={};Object.defineProperty(vo,"__esModule",{value:!0});function kb(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}}vo.safeJsonParse=kb;function Hb(t){return typeof t=="string"?t:JSON.stringify(t,(e,n)=>typeof n>"u"?null:n)}vo.safeJsonStringify=Hb;var yo={exports:{}},D1;function zb(){return D1||(D1=1,function(){let t;function e(){}t=e,t.prototype.getItem=function(n){return this.hasOwnProperty(n)?String(this[n]):null},t.prototype.setItem=function(n,r){this[n]=String(r)},t.prototype.removeItem=function(n){delete this[n]},t.prototype.clear=function(){const n=this;Object.keys(n).forEach(function(r){n[r]=void 0,delete n[r]})},t.prototype.key=function(n){return n=n||0,Object.keys(this)[n]},t.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof pn<"u"&&pn.localStorage?yo.exports=pn.localStorage:typeof window<"u"&&window.localStorage?yo.exports=window.localStorage:yo.exports=new e}()),yo.exports}var xu={},bo={},O1;function Wb(){if(O1)return bo;O1=1,Object.defineProperty(bo,"__esModule",{value:!0}),bo.IKeyValueStorage=void 0;class t{}return bo.IKeyValueStorage=t,bo}var _o={},A1;function qb(){if(A1)return _o;A1=1,Object.defineProperty(_o,"__esModule",{value:!0}),_o.parseEntry=void 0;const t=vo;function e(n){var r;return[n[0],t.safeJsonParse((r=n[1])!==null&&r!==void 0?r:"")]}return _o.parseEntry=e,_o}var $1;function Vb(){return $1||($1=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=S1;e.__exportStar(Wb(),t),e.__exportStar(qb(),t)}(xu)),xu}Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.KeyValueStorage=void 0;const bs=S1,P1=vo,Kb=bs.__importDefault(zb()),Gb=Vb();class T1{constructor(){this.localStorage=Kb.default}getKeys(){return bs.__awaiter(this,void 0,void 0,function*(){return Object.keys(this.localStorage)})}getEntries(){return bs.__awaiter(this,void 0,void 0,function*(){return Object.entries(this.localStorage).map(Gb.parseEntry)})}getItem(e){return bs.__awaiter(this,void 0,void 0,function*(){const n=this.localStorage.getItem(e);if(n!==null)return P1.safeJsonParse(n)})}setItem(e,n){return bs.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(e,P1.safeJsonStringify(n))})}removeItem(e){return bs.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(e)})}}Ha.KeyValueStorage=T1;var Zb=Ha.default=T1,Eo={};/*! *****************************************************************************
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 Eu=function(t,e){return Eu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},Eu(t,e)};function Gb(t,e){Eu(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var xu=function(){return xu=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},xu.apply(this,arguments)};function Zb(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function Yb(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(o=(i<3?c(o):i>3?c(e,n,o):c(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o}function Jb(t,e){return function(n,r){e(n,r,t)}}function Xb(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function Qb(t,e,n,r){function i(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function l(v){try{d(r.next(v))}catch(E){c(E)}}function h(v){try{d(r.throw(v))}catch(E){c(E)}}function d(v){v.done?o(v.value):i(v.value).then(l,h)}d((r=r.apply(t,e||[])).next())})}function e6(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,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(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=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 n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){n.label=d[1];break}if(d[0]===6&&n.label<o[1]){n.label=o[1],o=d;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(d);break}o[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(t,n)}catch(v){d=[6,v],i=0}finally{r=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function t6(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}function n6(t,e){for(var n in t)n!=="default"&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function Cu(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function T1(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],c;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(l){c={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(c)throw c.error}}return o}function r6(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(T1(arguments[e]));return t}function i6(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],c=0,l=o.length;c<l;c++,i++)r[i]=o[c];return r}function Eo(t){return this instanceof Eo?(this.v=t,this):new Eo(t)}function s6(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(_){r[_]&&(i[_]=function(S){return new Promise(function(P,L){o.push([_,S,P,L])>1||l(_,S)})})}function l(_,S){try{h(r[_](S))}catch(P){E(o[0][3],P)}}function h(_){_.value instanceof Eo?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 o6(t){var e,n;return e={},r("next"),r("throw",function(i){throw i}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(i,o){e[i]=t[i]?function(c){return(n=!n)?{value:Eo(t[i](c)),done:i==="return"}:o?o(c):c}:o}}function a6(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Cu=="function"?Cu(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[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 c6(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function l6(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function u6(t){return t&&t.__esModule?t:{default:t}}function h6(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function f6(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}var d6=Object.freeze({__proto__:null,__extends:Gb,get __assign(){return xu},__rest:Zb,__decorate:Yb,__param:Jb,__metadata:Xb,__awaiter:Qb,__generator:e6,__createBinding:t6,__exportStar:n6,__values:Cu,__read:T1,__spread:r6,__spreadArrays:i6,__await:Eo,__asyncGenerator:s6,__asyncDelegator:o6,__asyncValues:a6,__makeTemplateObject:c6,__importStar:l6,__importDefault:u6,__classPrivateFieldGet:h6,__classPrivateFieldSet:f6}),za=xi(d6),xo={},Iu={},Co={};class Ai{}var p6=Object.freeze({__proto__:null,IEvents:Ai}),g6=xi(p6),R1;function m6(){if(R1)return Co;R1=1,Object.defineProperty(Co,"__esModule",{value:!0}),Co.IHeartBeat=void 0;const t=g6;class e extends t.IEvents{constructor(r){super()}}return Co.IHeartBeat=e,Co}var N1;function M1(){return N1||(N1=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),za.__exportStar(m6(),t)}(Iu)),Iu}var Su={},$i={},L1;function w6(){if(L1)return $i;L1=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.HEARTBEAT_EVENTS=$i.HEARTBEAT_INTERVAL=void 0;const t=ke;return $i.HEARTBEAT_INTERVAL=t.FIVE_SECONDS,$i.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},$i}var j1;function U1(){return j1||(j1=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),za.__exportStar(w6(),t)}(Su)),Su}var F1;function v6(){if(F1)return xo;F1=1,Object.defineProperty(xo,"__esModule",{value:!0}),xo.HeartBeat=void 0;const t=za,e=yn.exports,n=ke,r=M1(),i=U1();class o extends r.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(),n.toMiliseconds(this.interval))})}pulse(){this.events.emit(i.HEARTBEAT_EVENTS.pulse)}}return xo.HeartBeat=o,xo}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=za;e.__exportStar(v6(),t),e.__exportStar(M1(),t),e.__exportStar(U1(),t)})(_o);var mt={};/*! *****************************************************************************
46
+ ***************************************************************************** */var Cu=function(t,e){return Cu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},Cu(t,e)};function Yb(t,e){Cu(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Iu=function(){return Iu=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Iu.apply(this,arguments)};function Jb(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function Xb(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(o=(i<3?c(o):i>3?c(e,n,o):c(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o}function Qb(t,e){return function(n,r){e(n,r,t)}}function e6(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function t6(t,e,n,r){function i(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function l(v){try{d(r.next(v))}catch(E){c(E)}}function h(v){try{d(r.throw(v))}catch(E){c(E)}}function d(v){v.done?o(v.value):i(v.value).then(l,h)}d((r=r.apply(t,e||[])).next())})}function n6(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,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(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=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 n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){n.label=d[1];break}if(d[0]===6&&n.label<o[1]){n.label=o[1],o=d;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(d);break}o[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(t,n)}catch(v){d=[6,v],i=0}finally{r=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function r6(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}function i6(t,e){for(var n in t)n!=="default"&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function Su(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function N1(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],c;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(l){c={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(c)throw c.error}}return o}function s6(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(N1(arguments[e]));return t}function o6(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],c=0,l=o.length;c<l;c++,i++)r[i]=o[c];return r}function xo(t){return this instanceof xo?(this.v=t,this):new xo(t)}function a6(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(_){r[_]&&(i[_]=function(S){return new Promise(function(P,L){o.push([_,S,P,L])>1||l(_,S)})})}function l(_,S){try{h(r[_](S))}catch(P){E(o[0][3],P)}}function h(_){_.value instanceof xo?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 c6(t){var e,n;return e={},r("next"),r("throw",function(i){throw i}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(i,o){e[i]=t[i]?function(c){return(n=!n)?{value:xo(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],n;return e?e.call(t):(t=typeof Su=="function"?Su(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[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 u6(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function h6(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function f6(t){return t&&t.__esModule?t:{default:t}}function d6(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function p6(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}var g6=Object.freeze({__proto__:null,__extends:Yb,get __assign(){return Iu},__rest:Jb,__decorate:Xb,__param:Qb,__metadata:e6,__awaiter:t6,__generator:n6,__createBinding:r6,__exportStar:i6,__values:Su,__read:N1,__spread:s6,__spreadArrays:o6,__await:xo,__asyncGenerator:a6,__asyncDelegator:c6,__asyncValues:l6,__makeTemplateObject:u6,__importStar:h6,__importDefault:f6,__classPrivateFieldGet:d6,__classPrivateFieldSet:p6}),za=Ii(g6),Co={},Du={},Io={};class Ti{}var m6=Object.freeze({__proto__:null,IEvents:Ti}),w6=Ii(m6),R1;function v6(){if(R1)return Io;R1=1,Object.defineProperty(Io,"__esModule",{value:!0}),Io.IHeartBeat=void 0;const t=w6;class e extends t.IEvents{constructor(r){super()}}return Io.IHeartBeat=e,Io}var M1;function L1(){return M1||(M1=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),za.__exportStar(v6(),t)}(Du)),Du}var Ou={},Ni={},j1;function y6(){if(j1)return Ni;j1=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.HEARTBEAT_EVENTS=Ni.HEARTBEAT_INTERVAL=void 0;const t=Ue;return Ni.HEARTBEAT_INTERVAL=t.FIVE_SECONDS,Ni.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},Ni}var U1;function F1(){return U1||(U1=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),za.__exportStar(y6(),t)}(Ou)),Ou}var B1;function b6(){if(B1)return Co;B1=1,Object.defineProperty(Co,"__esModule",{value:!0}),Co.HeartBeat=void 0;const t=za,e=yn.exports,n=Ue,r=L1(),i=F1();class o extends r.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(),n.toMiliseconds(this.interval))})}pulse(){this.events.emit(i.HEARTBEAT_EVENTS.pulse)}}return Co.HeartBeat=o,Co}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=za;e.__exportStar(b6(),t),e.__exportStar(L1(),t),e.__exportStar(F1(),t)})(Eo);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 Du=function(t,e){return Du=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},Du(t,e)};function y6(t,e){Du(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Ou=function(){return Ou=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Ou.apply(this,arguments)};function b6(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function _6(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(o=(i<3?c(o):i>3?c(e,n,o):c(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o}function E6(t,e){return function(n,r){e(n,r,t)}}function x6(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function C6(t,e,n,r){function i(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function l(v){try{d(r.next(v))}catch(E){c(E)}}function h(v){try{d(r.throw(v))}catch(E){c(E)}}function d(v){v.done?o(v.value):i(v.value).then(l,h)}d((r=r.apply(t,e||[])).next())})}function I6(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,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(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=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 n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){n.label=d[1];break}if(d[0]===6&&n.label<o[1]){n.label=o[1],o=d;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(d);break}o[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(t,n)}catch(v){d=[6,v],i=0}finally{r=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function S6(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}function D6(t,e){for(var n in t)n!=="default"&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function Au(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function B1(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],c;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(l){c={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(c)throw c.error}}return o}function O6(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(B1(arguments[e]));return t}function A6(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],c=0,l=o.length;c<l;c++,i++)r[i]=o[c];return r}function Io(t){return this instanceof Io?(this.v=t,this):new Io(t)}function $6(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(_){r[_]&&(i[_]=function(S){return new Promise(function(P,L){o.push([_,S,P,L])>1||l(_,S)})})}function l(_,S){try{h(r[_](S))}catch(P){E(o[0][3],P)}}function h(_){_.value instanceof Io?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 P6(t){var e,n;return e={},r("next"),r("throw",function(i){throw i}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(i,o){e[i]=t[i]?function(c){return(n=!n)?{value:Io(t[i](c)),done:i==="return"}:o?o(c):c}:o}}function T6(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Au=="function"?Au(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[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 R6(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function N6(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function M6(t){return t&&t.__esModule?t:{default:t}}function L6(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function j6(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}var U6=Object.freeze({__proto__:null,__extends:y6,get __assign(){return Ou},__rest:b6,__decorate:_6,__param:E6,__metadata:x6,__awaiter:C6,__generator:I6,__createBinding:S6,__exportStar:D6,__values:Au,__read:B1,__spread:O6,__spreadArrays:A6,__await:Io,__asyncGenerator:$6,__asyncDelegator:P6,__asyncValues:T6,__makeTemplateObject:R6,__importStar:N6,__importDefault:M6,__classPrivateFieldGet:L6,__classPrivateFieldSet:j6}),F6=xi(U6),$u,k1;function B6(){if(k1)return $u;k1=1;function t(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}$u=e;function e(n,r,i){var o=i&&i.stringify||t,c=1;if(typeof n=="object"&&n!==null){var l=r.length+c;if(l===1)return n;var h=new Array(l);h[0]=o(n);for(var d=1;d<l;d++)h[d]=o(r[d]);return h.join(" ")}if(typeof n!="string")return n;var v=r.length;if(v===0)return n;for(var E="",_=1-c,S=-1,P=n&&n.length||0,L=0;L<P;){if(n.charCodeAt(L)===37&&L+1<P){switch(S=S>-1?S:0,n.charCodeAt(L+1)){case 100:case 102:if(_>=v||r[_]==null)break;S<L&&(E+=n.slice(S,L)),E+=Number(r[_]),S=L+2,L++;break;case 105:if(_>=v||r[_]==null)break;S<L&&(E+=n.slice(S,L)),E+=Math.floor(Number(r[_])),S=L+2,L++;break;case 79:case 111:case 106:if(_>=v||r[_]===void 0)break;S<L&&(E+=n.slice(S,L));var k=typeof r[_];if(k==="string"){E+="'"+r[_]+"'",S=L+2,L++;break}if(k==="function"){E+=r[_].name||"<anonymous>",S=L+2,L++;break}E+=o(r[_]),S=L+2,L++;break;case 115:if(_>=v)break;S<L&&(E+=n.slice(S,L)),E+=String(r[_]),S=L+2,L++;break;case 37:S<L&&(E+=n.slice(S,L)),E+="%",S=L+2,L++,_--;break}++_}++L}return S===-1?n:(S<P&&(E+=n.slice(S)),E)}return $u}var Pu,H1;function k6(){if(H1)return Pu;H1=1;const t=B6();Pu=i;const e=R().console||{},n={mapHttpRequest:P,mapHttpResponse:P,wrapRequestSerializer:L,wrapResponseSerializer:L,wrapErrorSerializer:L,req:P,res:P,err:_};function r(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=r(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:ne});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=re,f&&(D._logEvent=E());function ae(){return this.level==="silent"?1/0:this.levels.values[this.level]}function le(){return this._level}function ne(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 re(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=n,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 Pu}var Pi={},z1;function W1(){return z1||(z1=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.PINO_CUSTOM_CONTEXT_KEY=Pi.PINO_LOGGER_DEFAULTS=void 0,Pi.PINO_LOGGER_DEFAULTS={level:"info"},Pi.PINO_CUSTOM_CONTEXT_KEY="custom_context"),Pi}var $n={},q1;function H6(){if(q1)return $n;q1=1,Object.defineProperty($n,"__esModule",{value:!0}),$n.generateChildLogger=$n.formatChildLoggerContext=$n.getLoggerContext=$n.setBrowserLoggerContext=$n.getBrowserLoggerContext=$n.getDefaultLoggerOptions=void 0;const t=W1();function e(l){return Object.assign(Object.assign({},l),{level:l?.level||t.PINO_LOGGER_DEFAULTS.level})}$n.getDefaultLoggerOptions=e;function n(l,h=t.PINO_CUSTOM_CONTEXT_KEY){return l[h]||""}$n.getBrowserLoggerContext=n;function r(l,h,d=t.PINO_CUSTOM_CONTEXT_KEY){return l[d]=h,l}$n.setBrowserLoggerContext=r;function i(l,h=t.PINO_CUSTOM_CONTEXT_KEY){let d="";return typeof l.bindings>"u"?d=n(l,h):d=l.bindings().context||"",d}$n.getLoggerContext=i;function o(l,h,d=t.PINO_CUSTOM_CONTEXT_KEY){const v=i(l,d);return v.trim()?`${v}/${h}`:h}$n.formatChildLoggerContext=o;function c(l,h,d=t.PINO_CUSTOM_CONTEXT_KEY){const v=o(l,h,d),E=l.child({context:v});return r(E,v,d)}return $n.generateChildLogger=c,$n}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.pino=void 0;const e=F6,n=e.__importDefault(k6());Object.defineProperty(t,"pino",{enumerable:!0,get:function(){return n.default}}),e.__exportStar(W1(),t),e.__exportStar(H6(),t)})(mt);class z6 extends Ai{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class W6 extends Ai{constructor(e,n){super(),this.core=e,this.logger=n,this.records=new Map}}class q6{constructor(e,n){this.logger=e,this.core=n}}class V6 extends Ai{constructor(e,n){super(),this.relayer=e,this.logger=n}}class K6 extends Ai{constructor(e){super()}}class G6{constructor(e,n,r,i){this.core=e,this.logger=n,this.name=r}}class Z6 extends Ai{constructor(e,n){super(),this.relayer=e,this.logger=n}}class Y6 extends Ai{constructor(e,n){super(),this.core=e,this.logger=n}}class J6{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}class X6{constructor(e){this.client=e}}const Q6=t=>JSON.stringify(t,(e,n)=>typeof n=="bigint"?n.toString()+"n":n),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,n=t.replace(e,'$1"$2n"$3');return JSON.parse(n,(r,i)=>typeof i=="string"&&i.match(/^\d+n$/)?BigInt(i.substring(0,i.length-1)):i)};function Tu(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 So(t){return typeof t=="string"?t:Q6(t)||""}var Ru={},V1={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Qe,n=Gn;t.DIGEST_LENGTH=64,t.BLOCK_SIZE=128;var r=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(){n.wipe(this._buffer),n.wipe(this._tempHi),n.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){n.wipe(h.stateHi),n.wipe(h.stateLo),h.buffer&&n.wipe(h.buffer),h.bufferLength=0,h.bytesHashed=0},l}();t.SHA512=r;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,ne,re,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,ne=U&65535,re=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)),ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,D=T&M^~T&A,U=z&ee^~z&de,ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,D=i[Se*2],U=i[Se*2+1],ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,D=l[Se%16],U=h[Se%16],ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,ae=oe&65535|ie<<16,le=ne&65535|re<<16,D=ae,U=le,ne=U&65535,re=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)),ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,D=P&L^P&k^L&k,U=C&f^C&x^f&x,ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,F=oe&65535|ie<<16,$t=ne&65535|re<<16,D=X,U=tt,ne=U&65535,re=U>>>16,oe=D&65535,ie=D>>>16,D=ae,U=le,ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,X=oe&65535|ie<<16,tt=ne&65535|re<<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],ne=U&65535,re=U>>>16,oe=D&65535,ie=D>>>16,D=l[(ge+9)%16],U=h[(ge+9)%16],ne+=U&65535,re+=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),ne+=U&65535,re+=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),ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,l[ge]=oe&65535|ie<<16,h[ge]=ne&65535|re<<16}D=P,U=C,ne=U&65535,re=U>>>16,oe=D&65535,ie=D>>>16,D=d[0],U=v[0],ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,d[0]=P=oe&65535|ie<<16,v[0]=C=ne&65535|re<<16,D=L,U=f,ne=U&65535,re=U>>>16,oe=D&65535,ie=D>>>16,D=d[1],U=v[1],ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,d[1]=L=oe&65535|ie<<16,v[1]=f=ne&65535|re<<16,D=k,U=x,ne=U&65535,re=U>>>16,oe=D&65535,ie=D>>>16,D=d[2],U=v[2],ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,d[2]=k=oe&65535|ie<<16,v[2]=x=ne&65535|re<<16,D=q,U=J,ne=U&65535,re=U>>>16,oe=D&65535,ie=D>>>16,D=d[3],U=v[3],ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,d[3]=q=oe&65535|ie<<16,v[3]=J=ne&65535|re<<16,D=T,U=z,ne=U&65535,re=U>>>16,oe=D&65535,ie=D>>>16,D=d[4],U=v[4],ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,d[4]=T=oe&65535|ie<<16,v[4]=z=ne&65535|re<<16,D=M,U=ee,ne=U&65535,re=U>>>16,oe=D&65535,ie=D>>>16,D=d[5],U=v[5],ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,d[5]=M=oe&65535|ie<<16,v[5]=ee=ne&65535|re<<16,D=A,U=de,ne=U&65535,re=U>>>16,oe=D&65535,ie=D>>>16,D=d[6],U=v[6],ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,d[6]=A=oe&65535|ie<<16,v[6]=de=ne&65535|re<<16,D=R,U=me,ne=U&65535,re=U>>>16,oe=D&65535,ie=D>>>16,D=d[7],U=v[7],ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,d[7]=R=oe&65535|ie<<16,v[7]=me=ne&65535|re<<16,_+=128,S-=128}return _}function c(l){var h=new r;h.update(l);var d=h.digest();return h.clean(),d}t.hash=c})(V1),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=hs,n=V1,r=Gn;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,Le=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,Nn=0,Wr=0,fi=0,Yi=0,kt=W[0],Mt=W[1],Ht=W[2],zt=W[3],Ut=W[4],Lt=W[5],en=W[6],tn=W[7],Wt=W[8],nn=W[9],qt=W[10],Zt=W[11],Vt=W[12],Pt=W[13],rn=W[14],sn=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*en,$t+=w*tn,Ye+=w*Wt,Le+=w*nn,Me+=w*qt,ze+=w*Zt,et+=w*Vt,Te+=w*Pt,Ve+=w*rn,b+=w*sn,w=Y[1],ve+=w*kt,Pe+=w*Mt,tt+=w*Ht,ot+=w*zt,qe+=w*Ut,At+=w*Lt,$t+=w*en,Ye+=w*tn,Le+=w*Wt,Me+=w*nn,ze+=w*qt,et+=w*Zt,Te+=w*Vt,Ve+=w*Pt,b+=w*rn,p+=w*sn,w=Y[2],Pe+=w*kt,tt+=w*Mt,ot+=w*Ht,qe+=w*zt,At+=w*Ut,$t+=w*Lt,Ye+=w*en,Le+=w*tn,Me+=w*Wt,ze+=w*nn,et+=w*qt,Te+=w*Zt,Ve+=w*Vt,b+=w*Pt,p+=w*rn,m+=w*sn,w=Y[3],tt+=w*kt,ot+=w*Mt,qe+=w*Ht,At+=w*zt,$t+=w*Ut,Ye+=w*Lt,Le+=w*en,Me+=w*tn,ze+=w*Wt,et+=w*nn,Te+=w*qt,Ve+=w*Zt,b+=w*Vt,p+=w*Pt,m+=w*rn,$+=w*sn,w=Y[4],ot+=w*kt,qe+=w*Mt,At+=w*Ht,$t+=w*zt,Ye+=w*Ut,Le+=w*Lt,Me+=w*en,ze+=w*tn,et+=w*Wt,Te+=w*nn,Ve+=w*qt,b+=w*Zt,p+=w*Vt,m+=w*Pt,$+=w*rn,B+=w*sn,w=Y[5],qe+=w*kt,At+=w*Mt,$t+=w*Ht,Ye+=w*zt,Le+=w*Ut,Me+=w*Lt,ze+=w*en,et+=w*tn,Te+=w*Wt,Ve+=w*nn,b+=w*qt,p+=w*Zt,m+=w*Vt,$+=w*Pt,B+=w*rn,G+=w*sn,w=Y[6],At+=w*kt,$t+=w*Mt,Ye+=w*Ht,Le+=w*zt,Me+=w*Ut,ze+=w*Lt,et+=w*en,Te+=w*tn,Ve+=w*Wt,b+=w*nn,p+=w*qt,m+=w*Zt,$+=w*Vt,B+=w*Pt,G+=w*rn,Q+=w*sn,w=Y[7],$t+=w*kt,Ye+=w*Mt,Le+=w*Ht,Me+=w*zt,ze+=w*Ut,et+=w*Lt,Te+=w*en,Ve+=w*tn,b+=w*Wt,p+=w*nn,m+=w*qt,$+=w*Zt,B+=w*Vt,G+=w*Pt,Q+=w*rn,xe+=w*sn,w=Y[8],Ye+=w*kt,Le+=w*Mt,Me+=w*Ht,ze+=w*zt,et+=w*Ut,Te+=w*Lt,Ve+=w*en,b+=w*tn,p+=w*Wt,m+=w*nn,$+=w*qt,B+=w*Zt,G+=w*Vt,Q+=w*Pt,xe+=w*rn,Oe+=w*sn,w=Y[9],Le+=w*kt,Me+=w*Mt,ze+=w*Ht,et+=w*zt,Te+=w*Ut,Ve+=w*Lt,b+=w*en,p+=w*tn,m+=w*Wt,$+=w*nn,B+=w*qt,G+=w*Zt,Q+=w*Vt,xe+=w*Pt,Oe+=w*rn,it+=w*sn,w=Y[10],Me+=w*kt,ze+=w*Mt,et+=w*Ht,Te+=w*zt,Ve+=w*Ut,b+=w*Lt,p+=w*en,m+=w*tn,$+=w*Wt,B+=w*nn,G+=w*qt,Q+=w*Zt,xe+=w*Vt,Oe+=w*Pt,it+=w*rn,ut+=w*sn,w=Y[11],ze+=w*kt,et+=w*Mt,Te+=w*Ht,Ve+=w*zt,b+=w*Ut,p+=w*Lt,m+=w*en,$+=w*tn,B+=w*Wt,G+=w*nn,Q+=w*qt,xe+=w*Zt,Oe+=w*Vt,it+=w*Pt,ut+=w*rn,ct+=w*sn,w=Y[12],et+=w*kt,Te+=w*Mt,Ve+=w*Ht,b+=w*zt,p+=w*Ut,m+=w*Lt,$+=w*en,B+=w*tn,G+=w*Wt,Q+=w*nn,xe+=w*qt,Oe+=w*Zt,it+=w*Vt,ut+=w*Pt,ct+=w*rn,Nn+=w*sn,w=Y[13],Te+=w*kt,Ve+=w*Mt,b+=w*Ht,p+=w*zt,m+=w*Ut,$+=w*Lt,B+=w*en,G+=w*tn,Q+=w*Wt,xe+=w*nn,Oe+=w*qt,it+=w*Zt,ut+=w*Vt,ct+=w*Pt,Nn+=w*rn,Wr+=w*sn,w=Y[14],Ve+=w*kt,b+=w*Mt,p+=w*Ht,m+=w*zt,$+=w*Ut,B+=w*Lt,G+=w*en,Q+=w*tn,xe+=w*Wt,Oe+=w*nn,it+=w*qt,ut+=w*Zt,ct+=w*Vt,Nn+=w*Pt,Wr+=w*rn,fi+=w*sn,w=Y[15],b+=w*kt,p+=w*Mt,m+=w*Ht,$+=w*zt,B+=w*Ut,G+=w*Lt,Q+=w*en,xe+=w*tn,Oe+=w*Wt,it+=w*nn,ut+=w*qt,ct+=w*Zt,Nn+=w*Vt,Wr+=w*Pt,fi+=w*rn,Yi+=w*sn,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,Le+=38*ut,Me+=38*ct,ze+=38*Nn,et+=38*Wr,Te+=38*fi,Ve+=38*Yi,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=Le+F+65535,F=Math.floor(w/65536),Le=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=Le+F+65535,F=Math.floor(w/65536),Le=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]=Le,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,n.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,r.wipe)(Y),W}t.generateKeyPair=le;function ne(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=ne;const re=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]*re[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)*re[F],W=Y[F]>>8,Y[F]&=255;for(F=0;F<32;F++)Y[F]-=W*re[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,n.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 n.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 n.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,n.hash)(X.subarray(0,32));Y[0]&=248,Y[31]&=127,Y[31]|=64;const W=new Uint8Array(Y.subarray(0,32));return(0,r.wipe)(Y),W}t.convertSecretKeyToX25519=Ae}(Ru);const t4="EdDSA",n4="JWT",K1=".",G1="base64url",r4="utf8",i4="utf8",s4=":",o4="did",a4="key",Z1="base58btc",c4="z",l4="K36",u4=32;function Wa(t){return Dn(Fn(So(t),r4),G1)}function Y1(t){const e=Fn(l4,Z1),n=c4+Dn(Zl([e,t]),Z1);return[o4,a4,n].join(s4)}function h4(t){return Dn(t,G1)}function f4(t){return Fn([Wa(t.header),Wa(t.payload)].join(K1),i4)}function d4(t){return[Wa(t.header),Wa(t.payload),h4(t.signature)].join(K1)}function J1(t=hs.randomBytes(u4)){return Ru.generateKeyPairFromSeed(t)}async function p4(t,e,n,r,i=ke.fromMiliseconds(Date.now())){const o={alg:t4,typ:n4},c=Y1(r.publicKey),l=i+n,h={iss:c,sub:t,aud:e,iat:i,exp:l},d=f4({header:o,payload:h}),v=Ru.sign(r.secretKey,d);return d4({header:o,payload:h,signature:v})}const g4="PARSE_ERROR",m4="INVALID_REQUEST",w4="METHOD_NOT_FOUND",v4="INVALID_PARAMS",X1="INTERNAL_ERROR",Nu="SERVER_ERROR",y4=[-32700,-32600,-32601,-32602,-32603],Do={[g4]:{code:-32700,message:"Parse error"},[m4]:{code:-32600,message:"Invalid Request"},[w4]:{code:-32601,message:"Method not found"},[v4]:{code:-32602,message:"Invalid params"},[X1]:{code:-32603,message:"Internal error"},[Nu]:{code:-32e3,message:"Server error"}},Q1=Nu;function b4(t){return y4.includes(t)}function ep(t){return Object.keys(Do).includes(t)?Do[t]:Do[Q1]}function _4(t){const e=Object.values(Do).find(n=>n.code===t);return e||Do[Q1]}function tp(t,e,n){return t.message.includes("getaddrinfo ENOTFOUND")||t.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${e}`):t}var np={};/*! *****************************************************************************
59
+ ***************************************************************************** */var Au=function(t,e){return Au=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},Au(t,e)};function _6(t,e){Au(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var $u=function(){return $u=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},$u.apply(this,arguments)};function E6(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function x6(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(o=(i<3?c(o):i>3?c(e,n,o):c(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o}function C6(t,e){return function(n,r){e(n,r,t)}}function I6(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function S6(t,e,n,r){function i(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function l(v){try{d(r.next(v))}catch(E){c(E)}}function h(v){try{d(r.throw(v))}catch(E){c(E)}}function d(v){v.done?o(v.value):i(v.value).then(l,h)}d((r=r.apply(t,e||[])).next())})}function D6(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,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(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=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 n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){n.label=d[1];break}if(d[0]===6&&n.label<o[1]){n.label=o[1],o=d;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(d);break}o[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(t,n)}catch(v){d=[6,v],i=0}finally{r=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function O6(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}function A6(t,e){for(var n in t)n!=="default"&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function Pu(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function k1(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],c;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(l){c={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(c)throw c.error}}return o}function $6(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(k1(arguments[e]));return t}function P6(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],c=0,l=o.length;c<l;c++,i++)r[i]=o[c];return r}function So(t){return this instanceof So?(this.v=t,this):new So(t)}function T6(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(_){r[_]&&(i[_]=function(S){return new Promise(function(P,L){o.push([_,S,P,L])>1||l(_,S)})})}function l(_,S){try{h(r[_](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 N6(t){var e,n;return e={},r("next"),r("throw",function(i){throw i}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(i,o){e[i]=t[i]?function(c){return(n=!n)?{value:So(t[i](c)),done:i==="return"}:o?o(c):c}:o}}function R6(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Pu=="function"?Pu(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[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 M6(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function L6(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function j6(t){return t&&t.__esModule?t:{default:t}}function U6(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function F6(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}var B6=Object.freeze({__proto__:null,__extends:_6,get __assign(){return $u},__rest:E6,__decorate:x6,__param:C6,__metadata:I6,__awaiter:S6,__generator:D6,__createBinding:O6,__exportStar:A6,__values:Pu,__read:k1,__spread:$6,__spreadArrays:P6,__await:So,__asyncGenerator:T6,__asyncDelegator:N6,__asyncValues:R6,__makeTemplateObject:M6,__importStar:L6,__importDefault:j6,__classPrivateFieldGet:U6,__classPrivateFieldSet:F6}),k6=Ii(B6),Tu,H1;function H6(){if(H1)return Tu;H1=1;function t(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}Tu=e;function e(n,r,i){var o=i&&i.stringify||t,c=1;if(typeof n=="object"&&n!==null){var l=r.length+c;if(l===1)return n;var h=new Array(l);h[0]=o(n);for(var d=1;d<l;d++)h[d]=o(r[d]);return h.join(" ")}if(typeof n!="string")return n;var v=r.length;if(v===0)return n;for(var E="",_=1-c,S=-1,P=n&&n.length||0,L=0;L<P;){if(n.charCodeAt(L)===37&&L+1<P){switch(S=S>-1?S:0,n.charCodeAt(L+1)){case 100:case 102:if(_>=v||r[_]==null)break;S<L&&(E+=n.slice(S,L)),E+=Number(r[_]),S=L+2,L++;break;case 105:if(_>=v||r[_]==null)break;S<L&&(E+=n.slice(S,L)),E+=Math.floor(Number(r[_])),S=L+2,L++;break;case 79:case 111:case 106:if(_>=v||r[_]===void 0)break;S<L&&(E+=n.slice(S,L));var k=typeof r[_];if(k==="string"){E+="'"+r[_]+"'",S=L+2,L++;break}if(k==="function"){E+=r[_].name||"<anonymous>",S=L+2,L++;break}E+=o(r[_]),S=L+2,L++;break;case 115:if(_>=v)break;S<L&&(E+=n.slice(S,L)),E+=String(r[_]),S=L+2,L++;break;case 37:S<L&&(E+=n.slice(S,L)),E+="%",S=L+2,L++,_--;break}++_}++L}return S===-1?n:(S<P&&(E+=n.slice(S)),E)}return Tu}var Nu,z1;function z6(){if(z1)return Nu;z1=1;const t=H6();Nu=i;const e=N().console||{},n={mapHttpRequest:P,mapHttpResponse:P,wrapRequestSerializer:L,wrapResponseSerializer:L,wrapErrorSerializer:L,req:P,res:P,err:_};function r(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=r(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:ne});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=re,f&&(D._logEvent=E());function ae(){return this.level==="silent"?1/0:this.levels.values[this.level]}function le(){return this._level}function ne(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 re(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),Re=C.browser.serialize===!0?Object.keys(ge):z;delete oe.serializers,h([oe],Re,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=Re),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=n,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 N(){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 Ri={},W1;function q1(){return W1||(W1=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.PINO_CUSTOM_CONTEXT_KEY=Ri.PINO_LOGGER_DEFAULTS=void 0,Ri.PINO_LOGGER_DEFAULTS={level:"info"},Ri.PINO_CUSTOM_CONTEXT_KEY="custom_context"),Ri}var $n={},V1;function W6(){if(V1)return $n;V1=1,Object.defineProperty($n,"__esModule",{value:!0}),$n.generateChildLogger=$n.formatChildLoggerContext=$n.getLoggerContext=$n.setBrowserLoggerContext=$n.getBrowserLoggerContext=$n.getDefaultLoggerOptions=void 0;const t=q1();function e(l){return Object.assign(Object.assign({},l),{level:l?.level||t.PINO_LOGGER_DEFAULTS.level})}$n.getDefaultLoggerOptions=e;function n(l,h=t.PINO_CUSTOM_CONTEXT_KEY){return l[h]||""}$n.getBrowserLoggerContext=n;function r(l,h,d=t.PINO_CUSTOM_CONTEXT_KEY){return l[d]=h,l}$n.setBrowserLoggerContext=r;function i(l,h=t.PINO_CUSTOM_CONTEXT_KEY){let d="";return typeof l.bindings>"u"?d=n(l,h):d=l.bindings().context||"",d}$n.getLoggerContext=i;function o(l,h,d=t.PINO_CUSTOM_CONTEXT_KEY){const v=i(l,d);return v.trim()?`${v}/${h}`:h}$n.formatChildLoggerContext=o;function c(l,h,d=t.PINO_CUSTOM_CONTEXT_KEY){const v=o(l,h,d),E=l.child({context:v});return r(E,v,d)}return $n.generateChildLogger=c,$n}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.pino=void 0;const e=k6,n=e.__importDefault(z6());Object.defineProperty(t,"pino",{enumerable:!0,get:function(){return n.default}}),e.__exportStar(q1(),t),e.__exportStar(W6(),t)})(pt);class q6 extends Ti{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class V6 extends Ti{constructor(e,n){super(),this.core=e,this.logger=n,this.records=new Map}}class K6{constructor(e,n){this.logger=e,this.core=n}}class G6 extends Ti{constructor(e,n){super(),this.relayer=e,this.logger=n}}class Z6 extends Ti{constructor(e){super()}}class Y6{constructor(e,n,r,i){this.core=e,this.logger=n,this.name=r}}class J6 extends Ti{constructor(e,n){super(),this.relayer=e,this.logger=n}}class X6 extends Ti{constructor(e,n){super(),this.core=e,this.logger=n}}class Q6{constructor(e,n){this.projectId=e,this.logger=n}}class e4{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}class t4{constructor(e){this.client=e}}const n4=t=>JSON.stringify(t,(e,n)=>typeof n=="bigint"?n.toString()+"n":n),r4=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,n=t.replace(e,'$1"$2n"$3');return JSON.parse(n,(r,i)=>typeof i=="string"&&i.match(/^\d+n$/)?BigInt(i.substring(0,i.length-1)):i)};function Ru(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return r4(t)}catch{return t}}function Do(t){return typeof t=="string"?t:n4(t)||""}var Mu={},K1={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Qe,n=Gn;t.DIGEST_LENGTH=64,t.BLOCK_SIZE=128;var r=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(){n.wipe(this._buffer),n.wipe(this._tempHi),n.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){n.wipe(h.stateHi),n.wipe(h.stateLo),h.buffer&&n.wipe(h.buffer),h.bufferLength=0,h.bytesHashed=0},l}();t.SHA512=r;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],N=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,ne,re,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 Re=P,be=L,Ae=k,X=q,Y=T,W=M,w=A,F=N,we=C,ve=f,Pe=x,tt=J,ot=z,qe=ee,At=de,$t=me;if(D=N,U=me,ne=U&65535,re=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)),ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,D=T&M^~T&A,U=z&ee^~z&de,ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,D=i[Se*2],U=i[Se*2+1],ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,D=l[Se%16],U=h[Se%16],ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,ae=oe&65535|ie<<16,le=ne&65535|re<<16,D=ae,U=le,ne=U&65535,re=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)),ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,D=P&L^P&k^L&k,U=C&f^C&x^f&x,ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,F=oe&65535|ie<<16,$t=ne&65535|re<<16,D=X,U=tt,ne=U&65535,re=U>>>16,oe=D&65535,ie=D>>>16,D=ae,U=le,ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,X=oe&65535|ie<<16,tt=ne&65535|re<<16,L=Re,k=be,q=Ae,T=X,M=Y,A=W,N=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],ne=U&65535,re=U>>>16,oe=D&65535,ie=D>>>16,D=l[(ge+9)%16],U=h[(ge+9)%16],ne+=U&65535,re+=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),ne+=U&65535,re+=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),ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,l[ge]=oe&65535|ie<<16,h[ge]=ne&65535|re<<16}D=P,U=C,ne=U&65535,re=U>>>16,oe=D&65535,ie=D>>>16,D=d[0],U=v[0],ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,d[0]=P=oe&65535|ie<<16,v[0]=C=ne&65535|re<<16,D=L,U=f,ne=U&65535,re=U>>>16,oe=D&65535,ie=D>>>16,D=d[1],U=v[1],ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,d[1]=L=oe&65535|ie<<16,v[1]=f=ne&65535|re<<16,D=k,U=x,ne=U&65535,re=U>>>16,oe=D&65535,ie=D>>>16,D=d[2],U=v[2],ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,d[2]=k=oe&65535|ie<<16,v[2]=x=ne&65535|re<<16,D=q,U=J,ne=U&65535,re=U>>>16,oe=D&65535,ie=D>>>16,D=d[3],U=v[3],ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,d[3]=q=oe&65535|ie<<16,v[3]=J=ne&65535|re<<16,D=T,U=z,ne=U&65535,re=U>>>16,oe=D&65535,ie=D>>>16,D=d[4],U=v[4],ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,d[4]=T=oe&65535|ie<<16,v[4]=z=ne&65535|re<<16,D=M,U=ee,ne=U&65535,re=U>>>16,oe=D&65535,ie=D>>>16,D=d[5],U=v[5],ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,d[5]=M=oe&65535|ie<<16,v[5]=ee=ne&65535|re<<16,D=A,U=de,ne=U&65535,re=U>>>16,oe=D&65535,ie=D>>>16,D=d[6],U=v[6],ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,d[6]=A=oe&65535|ie<<16,v[6]=de=ne&65535|re<<16,D=N,U=me,ne=U&65535,re=U>>>16,oe=D&65535,ie=D>>>16,D=d[7],U=v[7],ne+=U&65535,re+=U>>>16,oe+=D&65535,ie+=D>>>16,re+=ne>>>16,oe+=re>>>16,ie+=oe>>>16,d[7]=N=oe&65535|ie<<16,v[7]=me=ne&65535|re<<16,_+=128,S-=128}return _}function c(l){var h=new r;h.update(l);var d=h.digest();return h.clean(),d}t.hash=c})(K1),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=ps,n=K1,r=Gn;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 N(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,Le=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,Rn=0,Wr=0,pi=0,Qi=0,kt=W[0],Mt=W[1],Ht=W[2],zt=W[3],Ut=W[4],Lt=W[5],en=W[6],tn=W[7],Wt=W[8],nn=W[9],qt=W[10],Zt=W[11],Vt=W[12],Pt=W[13],rn=W[14],sn=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*en,$t+=w*tn,Ye+=w*Wt,Le+=w*nn,Me+=w*qt,ze+=w*Zt,et+=w*Vt,Te+=w*Pt,Ve+=w*rn,b+=w*sn,w=Y[1],ve+=w*kt,Pe+=w*Mt,tt+=w*Ht,ot+=w*zt,qe+=w*Ut,At+=w*Lt,$t+=w*en,Ye+=w*tn,Le+=w*Wt,Me+=w*nn,ze+=w*qt,et+=w*Zt,Te+=w*Vt,Ve+=w*Pt,b+=w*rn,p+=w*sn,w=Y[2],Pe+=w*kt,tt+=w*Mt,ot+=w*Ht,qe+=w*zt,At+=w*Ut,$t+=w*Lt,Ye+=w*en,Le+=w*tn,Me+=w*Wt,ze+=w*nn,et+=w*qt,Te+=w*Zt,Ve+=w*Vt,b+=w*Pt,p+=w*rn,m+=w*sn,w=Y[3],tt+=w*kt,ot+=w*Mt,qe+=w*Ht,At+=w*zt,$t+=w*Ut,Ye+=w*Lt,Le+=w*en,Me+=w*tn,ze+=w*Wt,et+=w*nn,Te+=w*qt,Ve+=w*Zt,b+=w*Vt,p+=w*Pt,m+=w*rn,$+=w*sn,w=Y[4],ot+=w*kt,qe+=w*Mt,At+=w*Ht,$t+=w*zt,Ye+=w*Ut,Le+=w*Lt,Me+=w*en,ze+=w*tn,et+=w*Wt,Te+=w*nn,Ve+=w*qt,b+=w*Zt,p+=w*Vt,m+=w*Pt,$+=w*rn,B+=w*sn,w=Y[5],qe+=w*kt,At+=w*Mt,$t+=w*Ht,Ye+=w*zt,Le+=w*Ut,Me+=w*Lt,ze+=w*en,et+=w*tn,Te+=w*Wt,Ve+=w*nn,b+=w*qt,p+=w*Zt,m+=w*Vt,$+=w*Pt,B+=w*rn,G+=w*sn,w=Y[6],At+=w*kt,$t+=w*Mt,Ye+=w*Ht,Le+=w*zt,Me+=w*Ut,ze+=w*Lt,et+=w*en,Te+=w*tn,Ve+=w*Wt,b+=w*nn,p+=w*qt,m+=w*Zt,$+=w*Vt,B+=w*Pt,G+=w*rn,Q+=w*sn,w=Y[7],$t+=w*kt,Ye+=w*Mt,Le+=w*Ht,Me+=w*zt,ze+=w*Ut,et+=w*Lt,Te+=w*en,Ve+=w*tn,b+=w*Wt,p+=w*nn,m+=w*qt,$+=w*Zt,B+=w*Vt,G+=w*Pt,Q+=w*rn,xe+=w*sn,w=Y[8],Ye+=w*kt,Le+=w*Mt,Me+=w*Ht,ze+=w*zt,et+=w*Ut,Te+=w*Lt,Ve+=w*en,b+=w*tn,p+=w*Wt,m+=w*nn,$+=w*qt,B+=w*Zt,G+=w*Vt,Q+=w*Pt,xe+=w*rn,Oe+=w*sn,w=Y[9],Le+=w*kt,Me+=w*Mt,ze+=w*Ht,et+=w*zt,Te+=w*Ut,Ve+=w*Lt,b+=w*en,p+=w*tn,m+=w*Wt,$+=w*nn,B+=w*qt,G+=w*Zt,Q+=w*Vt,xe+=w*Pt,Oe+=w*rn,it+=w*sn,w=Y[10],Me+=w*kt,ze+=w*Mt,et+=w*Ht,Te+=w*zt,Ve+=w*Ut,b+=w*Lt,p+=w*en,m+=w*tn,$+=w*Wt,B+=w*nn,G+=w*qt,Q+=w*Zt,xe+=w*Vt,Oe+=w*Pt,it+=w*rn,ut+=w*sn,w=Y[11],ze+=w*kt,et+=w*Mt,Te+=w*Ht,Ve+=w*zt,b+=w*Ut,p+=w*Lt,m+=w*en,$+=w*tn,B+=w*Wt,G+=w*nn,Q+=w*qt,xe+=w*Zt,Oe+=w*Vt,it+=w*Pt,ut+=w*rn,ct+=w*sn,w=Y[12],et+=w*kt,Te+=w*Mt,Ve+=w*Ht,b+=w*zt,p+=w*Ut,m+=w*Lt,$+=w*en,B+=w*tn,G+=w*Wt,Q+=w*nn,xe+=w*qt,Oe+=w*Zt,it+=w*Vt,ut+=w*Pt,ct+=w*rn,Rn+=w*sn,w=Y[13],Te+=w*kt,Ve+=w*Mt,b+=w*Ht,p+=w*zt,m+=w*Ut,$+=w*Lt,B+=w*en,G+=w*tn,Q+=w*Wt,xe+=w*nn,Oe+=w*qt,it+=w*Zt,ut+=w*Vt,ct+=w*Pt,Rn+=w*rn,Wr+=w*sn,w=Y[14],Ve+=w*kt,b+=w*Mt,p+=w*Ht,m+=w*zt,$+=w*Ut,B+=w*Lt,G+=w*en,Q+=w*tn,xe+=w*Wt,Oe+=w*nn,it+=w*qt,ut+=w*Zt,ct+=w*Vt,Rn+=w*Pt,Wr+=w*rn,pi+=w*sn,w=Y[15],b+=w*kt,p+=w*Mt,m+=w*Ht,$+=w*zt,B+=w*Ut,G+=w*Lt,Q+=w*en,xe+=w*tn,Oe+=w*Wt,it+=w*nn,ut+=w*qt,ct+=w*Zt,Rn+=w*Vt,Wr+=w*Pt,pi+=w*rn,Qi+=w*sn,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,Le+=38*ut,Me+=38*ct,ze+=38*Rn,et+=38*Wr,Te+=38*pi,Ve+=38*Qi,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=Le+F+65535,F=Math.floor(w/65536),Le=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=Le+F+65535,F=Math.floor(w/65536),Le=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]=Le,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),N(w,X[0],X[1]),N(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]),N(we,we,we),C(ve,w,W),C(Pe,we,F),N(tt,we,F),N(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,n.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,r.wipe)(Y),W}t.generateKeyPair=le;function ne(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=ne;const re=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]*re[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)*re[F],W=Y[F]>>8,Y[F]&=255;for(F=0;F<32;F++)Y[F]-=W*re[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,n.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 n.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]),N(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 Re(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 n.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=Re;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];N(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,n.hash)(X.subarray(0,32));Y[0]&=248,Y[31]&=127,Y[31]|=64;const W=new Uint8Array(Y.subarray(0,32));return(0,r.wipe)(Y),W}t.convertSecretKeyToX25519=Ae}(Mu);const i4="EdDSA",s4="JWT",G1=".",Z1="base64url",o4="utf8",a4="utf8",c4=":",l4="did",u4="key",Y1="base58btc",h4="z",f4="K36",d4=32;function Wa(t){return Dn(Fn(Do(t),o4),Z1)}function J1(t){const e=Fn(f4,Y1),n=h4+Dn(Zl([e,t]),Y1);return[l4,u4,n].join(c4)}function p4(t){return Dn(t,Z1)}function g4(t){return Fn([Wa(t.header),Wa(t.payload)].join(G1),a4)}function m4(t){return[Wa(t.header),Wa(t.payload),p4(t.signature)].join(G1)}function X1(t=ps.randomBytes(d4)){return Mu.generateKeyPairFromSeed(t)}async function w4(t,e,n,r,i=Ue.fromMiliseconds(Date.now())){const o={alg:i4,typ:s4},c=J1(r.publicKey),l=i+n,h={iss:c,sub:t,aud:e,iat:i,exp:l},d=g4({header:o,payload:h}),v=Mu.sign(r.secretKey,d);return m4({header:o,payload:h,signature:v})}const v4="PARSE_ERROR",y4="INVALID_REQUEST",b4="METHOD_NOT_FOUND",_4="INVALID_PARAMS",Q1="INTERNAL_ERROR",Lu="SERVER_ERROR",E4=[-32700,-32600,-32601,-32602,-32603],Oo={[v4]:{code:-32700,message:"Parse error"},[y4]:{code:-32600,message:"Invalid Request"},[b4]:{code:-32601,message:"Method not found"},[_4]:{code:-32602,message:"Invalid params"},[Q1]:{code:-32603,message:"Internal error"},[Lu]:{code:-32e3,message:"Server error"}},ep=Lu;function x4(t){return E4.includes(t)}function tp(t){return Object.keys(Oo).includes(t)?Oo[t]:Oo[ep]}function C4(t){const e=Object.values(Oo).find(n=>n.code===t);return e||Oo[ep]}function np(t,e,n){return t.message.includes("getaddrinfo ENOTFOUND")||t.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${e}`):t}var rp={};/*! *****************************************************************************
60
60
  Copyright (c) Microsoft Corporation.
61
61
 
62
62
  Permission to use, copy, modify, and/or distribute this software for any
@@ -69,66 +69,66 @@
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 Mu=function(t,e){return Mu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},Mu(t,e)};function E4(t,e){Mu(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Lu=function(){return Lu=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Lu.apply(this,arguments)};function x4(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function C4(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(o=(i<3?c(o):i>3?c(e,n,o):c(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o}function I4(t,e){return function(n,r){e(n,r,t)}}function S4(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function D4(t,e,n,r){function i(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function l(v){try{d(r.next(v))}catch(E){c(E)}}function h(v){try{d(r.throw(v))}catch(E){c(E)}}function d(v){v.done?o(v.value):i(v.value).then(l,h)}d((r=r.apply(t,e||[])).next())})}function O4(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,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(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=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 n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){n.label=d[1];break}if(d[0]===6&&n.label<o[1]){n.label=o[1],o=d;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(d);break}o[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(t,n)}catch(v){d=[6,v],i=0}finally{r=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function A4(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}function $4(t,e){for(var n in t)n!=="default"&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function ju(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function rp(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],c;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(l){c={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(c)throw c.error}}return o}function P4(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(rp(arguments[e]));return t}function T4(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],c=0,l=o.length;c<l;c++,i++)r[i]=o[c];return r}function Oo(t){return this instanceof Oo?(this.v=t,this):new Oo(t)}function R4(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(_){r[_]&&(i[_]=function(S){return new Promise(function(P,L){o.push([_,S,P,L])>1||l(_,S)})})}function l(_,S){try{h(r[_](S))}catch(P){E(o[0][3],P)}}function h(_){_.value instanceof Oo?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 N4(t){var e,n;return e={},r("next"),r("throw",function(i){throw i}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(i,o){e[i]=t[i]?function(c){return(n=!n)?{value:Oo(t[i](c)),done:i==="return"}:o?o(c):c}:o}}function M4(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof ju=="function"?ju(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[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 L4(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function j4(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function U4(t){return t&&t.__esModule?t:{default:t}}function F4(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function B4(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}var k4=Object.freeze({__proto__:null,__extends:E4,get __assign(){return Lu},__rest:x4,__decorate:C4,__param:I4,__metadata:S4,__awaiter:D4,__generator:O4,__createBinding:A4,__exportStar:$4,__values:ju,__read:rp,__spread:P4,__spreadArrays:T4,__await:Oo,__asyncGenerator:R4,__asyncDelegator:N4,__asyncValues:M4,__makeTemplateObject:L4,__importStar:j4,__importDefault:U4,__classPrivateFieldGet:F4,__classPrivateFieldSet:B4}),H4=xi(k4),Fr={},ip;function z4(){if(ip)return Fr;ip=1,Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.isBrowserCryptoAvailable=Fr.getSubtleCrypto=Fr.getBrowerCrypto=void 0;function t(){return pn?.crypto||pn?.msCrypto||{}}Fr.getBrowerCrypto=t;function e(){const r=t();return r.subtle||r.webkitSubtle}Fr.getSubtleCrypto=e;function n(){return!!t()&&!!e()}return Fr.isBrowserCryptoAvailable=n,Fr}var Br={},sp;function W4(){if(sp)return Br;sp=1,Object.defineProperty(Br,"__esModule",{value:!0}),Br.isBrowser=Br.isNode=Br.isReactNative=void 0;function t(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}Br.isReactNative=t;function e(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}Br.isNode=e;function n(){return!t()&&!e()}return Br.isBrowser=n,Br}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=H4;e.__exportStar(z4(),t),e.__exportStar(W4(),t)})(np);function op(t=3){const e=Date.now()*Math.pow(10,t),n=Math.floor(Math.random()*Math.pow(10,t));return e+n}function q4(t=6){return BigInt(op(t))}function qa(t,e,n){return{id:n||op(),jsonrpc:"2.0",method:t,params:e}}function Uu(t,e){return{id:t,jsonrpc:"2.0",result:e}}function Va(t,e,n){return{id:t,jsonrpc:"2.0",error:V4(e,n)}}function V4(t,e){return typeof t>"u"?ep(X1):(typeof t=="string"&&(t=Object.assign(Object.assign({},ep(Nu)),{message:t})),typeof e<"u"&&(t.data=e),b4(t.code)&&(t=_4(t.code)),t)}class K4{}class G4 extends K4{constructor(){super()}}class Z4 extends G4{constructor(e){super()}}const Y4="^https?:",J4="^wss?:";function X4(t){const e=t.match(new RegExp(/^\w+:/,"gi"));if(!(!e||!e.length))return e[0]}function ap(t,e){const n=X4(t);return typeof n>"u"?!1:new RegExp(e).test(n)}function cp(t){return ap(t,Y4)}function lp(t){return ap(t,J4)}function Q4(t){return new RegExp("wss?://localhost(:d{2,5})?").test(t)}function up(t){return typeof t=="object"&&"id"in t&&"jsonrpc"in t&&t.jsonrpc==="2.0"}function Fu(t){return up(t)&&"method"in t}function Bu(t){return up(t)&&(kr(t)||wr(t))}function kr(t){return"result"in t}function wr(t){return"error"in t}class Ti extends Z4{constructor(e){super(e),this.events=new yn.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,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}async request(e,n){return this.requestStrict(qa(e.method,e.params||[],q4().toString()),n)}async requestStrict(e,n){return new Promise(async(r,i)=>{if(!this.connection.connected)try{await this.open()}catch(o){i(o)}this.events.on(`${e.id}`,o=>{wr(o)?i(o.error):r(o.result)});try{await this.connection.send(e,n)}catch(o){i(o)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),Bu(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 hp=10,e_=()=>typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:require("ws"),t_=()=>typeof window<"u",n_=e_();class r_{constructor(e){if(this.url=e,this.events=new yn.exports.EventEmitter,this.registering=!1,!lp(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,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}async open(e=this.url){await this.register(e)}async close(){return new Promise((e,n)=>{if(typeof this.socket>"u"){n(new Error("Connection already closed"));return}this.socket.onclose=r=>{this.onClose(r),e()},this.socket.close()})}async send(e,n){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(So(e))}catch(r){this.onError(e.id,r)}}register(e=this.url){if(!lp(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const n=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=n||this.events.listenerCount("open")>=n)&&this.events.setMaxListeners(n+1),new Promise((r,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"));r(this.socket)})})}return this.url=e,this.registering=!0,new Promise((n,r)=>{const i=np.isReactNative()?void 0:{rejectUnauthorized:!Q4(e)},o=new n_(e,[],i);t_()?o.onerror=c=>{const l=c;r(this.emitError(l.error))}:o.on("error",c=>{r(this.emitError(c))}),o.onopen=()=>{this.onOpen(o),n(o)}})}onOpen(e){e.onmessage=n=>this.onPayload(n),e.onclose=n=>this.onClose(n),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 n=typeof e.data=="string"?Tu(e.data):e.data;this.events.emit("payload",n)}onError(e,n){const r=this.parseError(n),i=r.message||r.toString(),o=Va(e,i);this.events.emit("payload",o)}parseError(e,n=this.url){return tp(e,n,"WS")}resetMaxListeners(){this.events.getMaxListeners()>hp&&this.events.setMaxListeners(hp)}emitError(e){const n=this.parseError(new Error(e?.message||`WebSocket connection failed for URL: ${this.url}`));return this.events.emit("register_error",n),n}}var ku={exports:{}};(function(t,e){var n=200,r="__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]",ne="[object Uint8Array]",re="[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[ne]=be[re]=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 pn=="object"&&pn&&pn.Object===Object&&pn,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 Le(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,Nn=Oe?Oe.toStringTag:void 0,Wr=Object.getOwnPropertySymbols,fi=xe?xe.isBuffer:void 0,Yi=ze(Object.keys,Object),kt=Jn(Y,"DataView"),Mt=Jn(Y,"Map"),Ht=Jn(Y,"Promise"),zt=Jn(Y,"Set"),Ut=Jn(Y,"WeakMap"),Lt=Jn(Object,"create"),en=Vr(kt),tn=Vr(Mt),Wt=Vr(Ht),nn=Vr(zt),qt=Vr(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 rn(){this.__data__=Lt?Lt(null):{},this.size=0}function sn(N){var V=this.has(N)&&delete this.__data__[N];return this.size-=V?1:0,V}function b0(N){var V=this.__data__;if(Lt){var fe=V[N];return fe===r?void 0:fe}return $.call(V,N)?V[N]:void 0}function _0(N){var V=this.__data__;return Lt?V[N]!==void 0:$.call(V,N)}function E0(N,V){var fe=this.__data__;return this.size+=this.has(N)?0:1,fe[N]=Lt&&V===void 0?r:V,this}Pt.prototype.clear=rn,Pt.prototype.delete=sn,Pt.prototype.get=b0,Pt.prototype.has=_0,Pt.prototype.set=E0;function ar(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 x0(){this.__data__=[],this.size=0}function C0(N){var V=this.__data__,fe=Ji(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 I0(N){var V=this.__data__,fe=Ji(V,N);return fe<0?void 0:V[fe][1]}function S0(N){return Ji(this.__data__,N)>-1}function D0(N,V){var fe=this.__data__,Ce=Ji(fe,N);return Ce<0?(++this.size,fe.push([N,V])):fe[Ce][1]=V,this}ar.prototype.clear=x0,ar.prototype.delete=C0,ar.prototype.get=I0,ar.prototype.has=S0,ar.prototype.set=D0;function qr(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 ks(){this.size=0,this.__data__={hash:new Pt,map:new(Mt||ar),string:new Pt}}function O0(N){var V=di(this,N).delete(N);return this.size-=V?1:0,V}function Hs(N){return di(this,N).get(N)}function A0(N){return di(this,N).has(N)}function $0(N,V){var fe=di(this,N),Ce=fe.size;return fe.set(N,V),this.size+=fe.size==Ce?0:1,this}qr.prototype.clear=ks,qr.prototype.delete=O0,qr.prototype.get=Hs,qr.prototype.has=A0,qr.prototype.set=$0;function zs(N){var V=-1,fe=N==null?0:N.length;for(this.__data__=new qr;++V<fe;)this.add(N[V])}function jc(N){return this.__data__.set(N,r),this}function Uc(N){return this.__data__.has(N)}zs.prototype.add=zs.prototype.push=jc,zs.prototype.has=Uc;function vr(N){var V=this.__data__=new ar(N);this.size=V.size}function P0(){this.__data__=new ar,this.size=0}function T0(N){var V=this.__data__,fe=V.delete(N);return this.size=V.size,fe}function R0(N){return this.__data__.get(N)}function N0(N){return this.__data__.has(N)}function Fc(N,V){var fe=this.__data__;if(fe instanceof ar){var Ce=fe.__data__;if(!Mt||Ce.length<n-1)return Ce.push([N,V]),this.size=++fe.size,this;fe=this.__data__=new qr(Ce)}return fe.set(N,V),this.size=fe.size,this}vr.prototype.clear=P0,vr.prototype.delete=T0,vr.prototype.get=R0,vr.prototype.has=N0,vr.prototype.set=Fc;function Bc(N,V){var fe=Vs(N),Ce=!fe&&Xc(N),It=!fe&&!Ce&&ca(N),Je=!fe&&!Ce&&!It&&tl(N),Tt=fe||Ce||It||Je,on=Tt?At(N.length,String):[],pt=on.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,pt)))&&on.push(St);return on}function Ji(N,V){for(var fe=N.length;fe--;)if(Jc(N[fe][0],V))return fe;return-1}function oa(N,V,fe){var Ce=V(N);return Vs(N)?Ce:ot(Ce,fe(N))}function Xi(N){return N==null?N===void 0?J:q:Nn&&Nn in Object(N)?qc(N):j0(N)}function aa(N){return es(N)&&Xi(N)==l}function Qi(N,V,fe,Ce,It){return N===V?!0:N==null||V==null||!es(N)&&!es(V)?N!==N&&V!==V:kc(N,V,fe,Ce,Qi,It)}function kc(N,V,fe,Ce,It,Je){var Tt=Vs(N),on=Vs(V),pt=Tt?h:Rr(N),St=on?h:Rr(V);pt=pt==l?T:pt,St=St==l?T:St;var Yt=pt==T,zn=St==T,an=pt==St;if(an&&ca(N)){if(!ca(V))return!1;Tt=!0,Yt=!1}if(an&&!Yt)return Je||(Je=new vr),Tt||tl(N)?Ws(N,V,fe,Ce,It,Je):L0(N,V,pt,fe,Ce,It,Je);if(!(fe&i)){var Rt=Yt&&$.call(N,"__wrapped__"),Mn=zn&&$.call(V,"__wrapped__");if(Rt||Mn){var yr=Rt?N.value():N,cr=Mn?V.value():V;return Je||(Je=new vr),It(yr,cr,fe,Ce,Je)}}return an?(Je||(Je=new vr),Wc(N,V,fe,Ce,It,Je)):!1}function M0(N){if(!el(N)||Zc(N))return!1;var V=Ks(N)?Q:ge;return V.test(Vr(N))}function Hc(N){return es(N)&&Qc(N.length)&&!!be[Xi(N)]}function zc(N){if(!Yc(N))return Yi(N);var V=[];for(var fe in Object(N))$.call(N,fe)&&fe!="constructor"&&V.push(fe);return V}function Ws(N,V,fe,Ce,It,Je){var Tt=fe&i,on=N.length,pt=V.length;if(on!=pt&&!(Tt&&pt>on))return!1;var St=Je.get(N);if(St&&Je.get(V))return St==V;var Yt=-1,zn=!0,an=fe&o?new zs:void 0;for(Je.set(N,V),Je.set(V,N);++Yt<on;){var Rt=N[Yt],Mn=V[Yt];if(Ce)var yr=Tt?Ce(Mn,Rt,Yt,V,N,Je):Ce(Rt,Mn,Yt,N,V,Je);if(yr!==void 0){if(yr)continue;zn=!1;break}if(an){if(!qe(V,function(cr,Nr){if(!Ye(an,Nr)&&(Rt===cr||It(Rt,cr,fe,Ce,Je)))return an.push(Nr)})){zn=!1;break}}else if(!(Rt===Mn||It(Rt,Mn,fe,Ce,Je))){zn=!1;break}}return Je.delete(N),Je.delete(V),zn}function L0(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 on=Me;case C:var pt=Ce&i;if(on||(on=et),N.size!=V.size&&!pt)return!1;var St=Tt.get(N);if(St)return St==V;Ce|=o,Tt.set(N,V);var Yt=Ws(on(N),on(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,on=qs(N),pt=on.length,St=qs(V),Yt=St.length;if(pt!=Yt&&!Tt)return!1;for(var zn=pt;zn--;){var an=on[zn];if(!(Tt?an in V:$.call(V,an)))return!1}var Rt=Je.get(N);if(Rt&&Je.get(V))return Rt==V;var Mn=!0;Je.set(N,V),Je.set(V,N);for(var yr=Tt;++zn<pt;){an=on[zn];var cr=N[an],Nr=V[an];if(Ce)var la=Tt?Ce(Nr,cr,an,V,N,Je):Ce(cr,Nr,an,N,V,Je);if(!(la===void 0?cr===Nr||It(cr,Nr,fe,Ce,Je):la)){Mn=!1;break}yr||(yr=an=="constructor")}if(Mn&&!yr){var ts=N.constructor,wn=V.constructor;ts!=wn&&"constructor"in N&&"constructor"in V&&!(typeof ts=="function"&&ts instanceof ts&&typeof wn=="function"&&wn instanceof wn)&&(Mn=!1)}return Je.delete(N),Je.delete(V),Mn}function qs(N){return oa(N,B0,Vc)}function di(N,V){var fe=N.__data__;return Gc(V)?fe[typeof V=="string"?"string":"hash"]:fe.map}function Jn(N,V){var fe=Le(N,V);return M0(fe)?fe:void 0}function qc(N){var V=$.call(N,Nn),fe=N[Nn];try{N[Nn]=void 0;var Ce=!0}catch{}var It=G.call(N);return Ce&&(V?N[Nn]=fe:delete N[Nn]),It}var Vc=Wr?function(N){return N==null?[]:(N=Object(N),tt(Wr(N),function(V){return ut.call(N,V)}))}:Ct,Rr=Xi;(kt&&Rr(new kt(new ArrayBuffer(1)))!=de||Mt&&Rr(new Mt)!=L||Ht&&Rr(Ht.resolve())!=M||zt&&Rr(new zt)!=C||Ut&&Rr(new Ut)!=z)&&(Rr=function(N){var V=Xi(N),fe=V==T?N.constructor:void 0,Ce=fe?Vr(fe):"";if(Ce)switch(Ce){case en:return de;case tn:return L;case Wt:return M;case nn: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 j0(N){return G.call(N)}function Vr(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=aa(function(){return arguments}())?aa:function(N){return es(N)&&$.call(N,"callee")&&!ut.call(N,"callee")},Vs=Array.isArray;function U0(N){return N!=null&&Qc(N.length)&&!Ks(N)}var ca=fi||xt;function F0(N,V){return Qi(N,V)}function Ks(N){if(!el(N))return!1;var V=Xi(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 es(N){return N!=null&&typeof N=="object"}var tl=Pe?$t(Pe):Hc;function B0(N){return U0(N)?Bc(N):zc(N)}function Ct(){return[]}function xt(){return!1}t.exports=F0})(ku,ku.exports);var i_=ku.exports,s_=Object.defineProperty,fp=Object.getOwnPropertySymbols,o_=Object.prototype.hasOwnProperty,a_=Object.prototype.propertyIsEnumerable,dp=(t,e,n)=>e in t?s_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Pn=(t,e)=>{for(var n in e||(e={}))o_.call(e,n)&&dp(t,n,e[n]);if(fp)for(var n of fp(e))a_.call(e,n)&&dp(t,n,e[n]);return t};function c_(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),c=o.charCodeAt(0);if(n[c]!==255)throw new TypeError(o+" is ambiguous");n[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=n[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 l_=c_,u_=l_;const pp=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")},h_=t=>new TextEncoder().encode(t),f_=t=>new TextDecoder().decode(t);class d_{constructor(e,n,r){this.name=e,this.prefix=n,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class p_{constructor(e,n,r){if(this.name=e,this.prefix=n,n.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=r}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 gp(this,e)}}class g_{constructor(e){this.decoders=e}or(e){return gp(this,e)}decode(e){const n=e[0],r=this.decoders[n];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const gp=(t,e)=>new g_(Pn(Pn({},t.decoders||{[t.prefix]:t}),e.decoders||{[e.prefix]:e}));class m_{constructor(e,n,r,i){this.name=e,this.prefix=n,this.baseEncode=r,this.baseDecode=i,this.encoder=new d_(e,n,r),this.decoder=new p_(e,n,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Ka=({name:t,prefix:e,encode:n,decode:r})=>new m_(t,e,n,r),Ao=({prefix:t,name:e,alphabet:n})=>{const{encode:r,decode:i}=u_(n,e);return Ka({prefix:t,name:e,encode:r,decode:o=>pp(i(o))})},w_=(t,e,n,r)=>{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*n/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-${r} character`);h=h<<n|E,l+=n,l>=8&&(l-=8,c[d++]=255&h>>l)}if(l>=n||255&h<<8-l)throw new SyntaxError("Unexpected end of data");return c},v_=(t,e,n)=>{const r=e[e.length-1]==="=",i=(1<<n)-1;let o="",c=0,l=0;for(let h=0;h<t.length;++h)for(l=l<<8|t[h],c+=8;c>n;)c-=n,o+=e[i&l>>c];if(c&&(o+=e[i&l<<n-c]),r)for(;o.length*n&7;)o+="=";return o},_n=({name:t,prefix:e,bitsPerChar:n,alphabet:r})=>Ka({prefix:e,name:t,encode(i){return v_(i,r,n)},decode(i){return w_(i,r,n,t)}}),y_=Ka({prefix:"\0",name:"identity",encode:t=>f_(t),decode:t=>h_(t)});var b_=Object.freeze({__proto__:null,identity:y_});const __=_n({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var E_=Object.freeze({__proto__:null,base2:__});const x_=_n({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var C_=Object.freeze({__proto__:null,base8:x_});const I_=Ao({prefix:"9",name:"base10",alphabet:"0123456789"});var S_=Object.freeze({__proto__:null,base10:I_});const D_=_n({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),O_=_n({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var A_=Object.freeze({__proto__:null,base16:D_,base16upper:O_});const $_=_n({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),P_=_n({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),T_=_n({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),R_=_n({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),N_=_n({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),M_=_n({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),L_=_n({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),j_=_n({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),U_=_n({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var F_=Object.freeze({__proto__:null,base32:$_,base32upper:P_,base32pad:T_,base32padupper:R_,base32hex:N_,base32hexupper:M_,base32hexpad:L_,base32hexpadupper:j_,base32z:U_});const B_=Ao({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),k_=Ao({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var H_=Object.freeze({__proto__:null,base36:B_,base36upper:k_});const z_=Ao({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),W_=Ao({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var q_=Object.freeze({__proto__:null,base58btc:z_,base58flickr:W_});const V_=_n({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),K_=_n({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),G_=_n({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Z_=_n({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Y_=Object.freeze({__proto__:null,base64:V_,base64pad:K_,base64url:G_,base64urlpad:Z_});const mp=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}"),J_=mp.reduce((t,e,n)=>(t[n]=e,t),[]),X_=mp.reduce((t,e,n)=>(t[e.codePointAt(0)]=n,t),[]);function Q_(t){return t.reduce((e,n)=>(e+=J_[n],e),"")}function e8(t){const e=[];for(const n of t){const r=X_[n.codePointAt(0)];if(r===void 0)throw new Error(`Non-base256emoji character: ${n}`);e.push(r)}return new Uint8Array(e)}const t8=Ka({prefix:"\u{1F680}",name:"base256emoji",encode:Q_,decode:e8});var n8=Object.freeze({__proto__:null,base256emoji:t8}),r8=vp,wp=128,i8=127,s8=~i8,o8=Math.pow(2,31);function vp(t,e,n){e=e||[],n=n||0;for(var r=n;t>=o8;)e[n++]=t&255|wp,t/=128;for(;t&s8;)e[n++]=t&255|wp,t>>>=7;return e[n]=t|0,vp.bytes=n-r+1,e}var a8=Hu,c8=128,yp=127;function Hu(t,r){var n=0,r=r||0,i=0,o=r,c,l=t.length;do{if(o>=l)throw Hu.bytes=0,new RangeError("Could not decode varint");c=t[o++],n+=i<28?(c&yp)<<i:(c&yp)*Math.pow(2,i),i+=7}while(c>=c8);return Hu.bytes=o-r,n}var l8=Math.pow(2,7),u8=Math.pow(2,14),h8=Math.pow(2,21),f8=Math.pow(2,28),d8=Math.pow(2,35),p8=Math.pow(2,42),g8=Math.pow(2,49),m8=Math.pow(2,56),w8=Math.pow(2,63),v8=function(t){return t<l8?1:t<u8?2:t<h8?3:t<f8?4:t<d8?5:t<p8?6:t<g8?7:t<m8?8:t<w8?9:10},y8={encode:r8,decode:a8,encodingLength:v8},bp=y8;const _p=(t,e,n=0)=>(bp.encode(t,e,n),e),Ep=t=>bp.encodingLength(t),zu=(t,e)=>{const n=e.byteLength,r=Ep(t),i=r+Ep(n),o=new Uint8Array(i+n);return _p(t,o,0),_p(n,o,r),o.set(e,i),new b8(t,n,e,o)};class b8{constructor(e,n,r,i){this.code=e,this.size=n,this.digest=r,this.bytes=i}}const xp=({name:t,code:e,encode:n})=>new _8(t,e,n);class _8{constructor(e,n,r){this.name=e,this.code=n,this.encode=r}digest(e){if(e instanceof Uint8Array){const n=this.encode(e);return n instanceof Uint8Array?zu(this.code,n):n.then(r=>zu(this.code,r))}else throw Error("Unknown type, must be binary type")}}const Cp=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),E8=xp({name:"sha2-256",code:18,encode:Cp("SHA-256")}),x8=xp({name:"sha2-512",code:19,encode:Cp("SHA-512")});var C8=Object.freeze({__proto__:null,sha256:E8,sha512:x8});const Ip=0,I8="identity",Sp=pp;var S8=Object.freeze({__proto__:null,identity:{code:Ip,name:I8,encode:Sp,digest:t=>zu(Ip,Sp(t))}});new TextEncoder,new TextDecoder;const Dp=Pn(Pn(Pn(Pn(Pn(Pn(Pn(Pn(Pn(Pn({},b_),E_),C_),S_),A_),F_),H_),q_),Y_),n8);Pn(Pn({},C8),S8);function D8(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(t):new Uint8Array(t)}function Op(t,e,n,r){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:r}}}const Ap=Op("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),Wu=Op("ascii","a",t=>{let e="a";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e},t=>{t=t.substring(1);const e=D8(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}),O8=Pn({utf8:Ap,"utf-8":Ap,hex:Dp.base16,latin1:Wu,ascii:Wu,binary:Wu},Dp);function A8(t,e="utf8"){const n=O8[e];if(!n)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t,"utf8"):n.decoder.decode(`${n.prefix}${t}`)}const $p="wc",$8=2,qu="core",ii=`${$p}@${2}:${qu}:`,P8={name:qu,logger:"error"},T8={database:":memory:"},R8="crypto",Pp="client_ed25519_seed",N8=ke.ONE_DAY,M8="keychain",L8="0.3",j8="messages",U8="0.3",F8=ke.SIX_HOURS,B8="publisher",Tp="irn",k8="error",Rp="wss://relay.walletconnect.com",H8="relayer",mn={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"},z8="_subscription",Ga={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},W8=ke.ONE_SECOND,q8="2.6.2-rc-45c7f946",V8="0.3",Sr={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},K8="subscription",G8="0.3",Z8=ke.FIVE_SECONDS*1e3,Y8="pairing",J8="0.3",$o={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}}},Dr={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},X8="history",Q8="0.3",eE="expirer",rr={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},tE="0.3";class nE{constructor(e,n){this.core=e,this.logger=n,this.keychain=new Map,this.name=M8,this.version=L8,this.initialized=!1,this.storagePrefix=ii,this.init=async()=>{if(!this.initialized){const r=await this.getKeyChain();typeof r<"u"&&(this.keychain=r),this.initialized=!0}},this.has=r=>(this.isInitialized(),this.keychain.has(r)),this.set=async(r,i)=>{this.isInitialized(),this.keychain.set(r,i),await this.persist()},this.get=r=>{this.isInitialized();const i=this.keychain.get(r);if(typeof i>"u"){const{message:o}=Ee("NO_MATCHING_KEY",`${this.name}: ${r}`);throw new Error(o)}return i},this.del=async r=>{this.isInitialized(),this.keychain.delete(r),await this.persist()},this.core=e,this.logger=mt.generateChildLogger(n,this.name)}get context(){return mt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,h1(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?f1(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 rE{constructor(e,n,r){this.core=e,this.logger=n,this.name=R8,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=J1(i);return Y1(o.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const i=h5();return this.setPrivateKey(i.publicKey,i.privateKey)},this.signJWT=async i=>{this.isInitialized();const o=await this.getClientSeed(),c=J1(o),l=du();return await p4(l,i,N8,c)},this.generateSharedKey=(i,o,c)=>{this.isInitialized();const l=this.getPrivateKey(i),h=f5(l,o);return this.setSymKey(h,c)},this.setSymKey=async(i,o)=>{this.isInitialized();const c=o||d5(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=s1(c),h=So(o);if(o1(l)){const _=l.senderPublicKey,S=l.receiverPublicKey;i=await this.generateSharedKey(_,S)}const d=this.getSymKey(i),{type:v,senderPublicKey:E}=l;return g5({type:v,symKey:d,message:h,senderPublicKey:E})},this.decode=async(i,o,c)=>{this.isInitialized();const l=v5(o,c);if(o1(l)){const v=l.receiverPublicKey,E=l.senderPublicKey;i=await this.generateSharedKey(v,E)}const h=this.getSymKey(i),d=m5({symKey:h,encoded:o});return Tu(d)},this.getPayloadType=i=>{const o=ja(i);return po(o.type)},this.getPayloadSenderPublicKey=i=>{const o=ja(i);return o.senderPublicKey?Dn(o.senderPublicKey,On):void 0},this.core=e,this.logger=mt.generateChildLogger(n,this.name),this.keychain=r||new nE(this.core,this.logger)}get context(){return mt.getLoggerContext(this.logger)}async setPrivateKey(e,n){return await this.keychain.set(e,n),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(Pp)}catch{e=du(),await this.keychain.set(Pp,e)}return A8(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 iE extends q6{constructor(e,n){super(e,n),this.logger=e,this.core=n,this.messages=new Map,this.name=j8,this.version=U8,this.initialized=!1,this.storagePrefix=ii,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const r=await this.getRelayerMessages();typeof r<"u"&&(this.messages=r),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(r){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(r)}finally{this.initialized=!0}}},this.set=async(r,i)=>{this.isInitialized();const o=La(i);let c=this.messages.get(r);return typeof c>"u"&&(c={}),typeof c[o]<"u"||(c[o]=i,this.messages.set(r,c),await this.persist()),o},this.get=r=>{this.isInitialized();let i=this.messages.get(r);return typeof i>"u"&&(i={}),i},this.has=(r,i)=>{this.isInitialized();const o=this.get(r),c=La(i);return typeof o[c]<"u"},this.del=async r=>{this.isInitialized(),this.messages.delete(r),await this.persist()},this.logger=mt.generateChildLogger(e,this.name),this.core=n}get context(){return mt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,h1(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?f1(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 sE extends V6{constructor(e,n){super(e,n),this.relayer=e,this.logger=n,this.events=new yn.exports.EventEmitter,this.name=B8,this.queue=new Map,this.publishTimeout=1e4,this.publish=async(r,i,o)=>{this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:r,message:i,opts:o}});try{const c=o?.ttl||F8,l=gu(o),h=o?.prompt||!1,d=o?.tag||0,v={topic:r,message:i,opts:{ttl:c,relay:l,prompt:h,tag:d}},E=La(i);this.queue.set(E,v);try{await await Ua(this.rpcPublish(r,i,c,l,h,d),this.publishTimeout),this.relayer.events.emit(mn.publish,v)}catch{this.logger.debug("Publishing Payload stalled"),this.relayer.events.emit(mn.connection_stalled);return}this.onPublish(E,v),this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:r,message:i,opts:o}})}catch(c){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(c),c}},this.on=(r,i)=>{this.events.on(r,i)},this.once=(r,i)=>{this.events.once(r,i)},this.off=(r,i)=>{this.events.off(r,i)},this.removeListener=(r,i)=>{this.events.removeListener(r,i)},this.relayer=e,this.logger=mt.generateChildLogger(n,this.name),this.registerEventListeners()}get context(){return mt.getLoggerContext(this.logger)}rpcPublish(e,n,r,i,o,c){var l,h,d,v;const E={method:Fa(i.protocol).publish,params:{topic:e,message:n,ttl:r,prompt:o,tag:c}};return An((l=E.params)==null?void 0:l.prompt)&&((h=E.params)==null||delete h.prompt),An((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,n){this.queue.delete(e)}checkQueue(){this.queue.forEach(async e=>{const{topic:n,message:r,opts:i}=e;await this.publish(n,r,i)})}registerEventListeners(){this.relayer.core.heartbeat.on(_o.HEARTBEAT_EVENTS.pulse,()=>{this.checkQueue()})}}class oE{constructor(){this.map=new Map,this.set=(e,n)=>{const r=this.get(e);this.exists(e,n)||this.map.set(e,[...r,n])},this.get=e=>this.map.get(e)||[],this.exists=(e,n)=>this.get(e).includes(n),this.delete=(e,n)=>{if(typeof n>"u"){this.map.delete(e);return}if(!this.map.has(e))return;const r=this.get(e);if(!this.exists(e,n))return;const i=r.filter(o=>o!==n);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 aE=Object.defineProperty,cE=Object.defineProperties,lE=Object.getOwnPropertyDescriptors,Np=Object.getOwnPropertySymbols,uE=Object.prototype.hasOwnProperty,hE=Object.prototype.propertyIsEnumerable,Mp=(t,e,n)=>e in t?aE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Po=(t,e)=>{for(var n in e||(e={}))uE.call(e,n)&&Mp(t,n,e[n]);if(Np)for(var n of Np(e))hE.call(e,n)&&Mp(t,n,e[n]);return t},Vu=(t,e)=>cE(t,lE(e));class fE extends Z6{constructor(e,n){super(e,n),this.relayer=e,this.logger=n,this.subscriptions=new Map,this.topicMap=new oE,this.events=new yn.exports.EventEmitter,this.name=K8,this.version=G8,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=ii,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(r,i)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:r,opts:i}});try{const o=gu(i),c={topic:r,relay:o};this.pending.set(r,c);const l=await this.rpcSubscribe(r,o);return this.onSubscribe(l,c),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:r,opts:i}}),l}catch(o){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(o),o}},this.unsubscribe=async(r,i)=>{await this.restartToComplete(),this.isInitialized(),typeof i?.id<"u"?await this.unsubscribeById(r,i.id,i):await this.unsubscribeByTopic(r,i)},this.isSubscribed=async r=>this.topics.includes(r)?!0:await new Promise((i,o)=>{const c=new ke.Watch;c.start(this.pendingSubscriptionWatchLabel);const l=setInterval(()=>{!this.pending.has(r)&&this.topics.includes(r)&&(clearInterval(l),c.stop(this.pendingSubscriptionWatchLabel),i(!0)),c.elapsed(this.pendingSubscriptionWatchLabel)>=Z8&&(clearInterval(l),c.stop(this.pendingSubscriptionWatchLabel),o(!1))},this.pollingInterval)}),this.on=(r,i)=>{this.events.on(r,i)},this.once=(r,i)=>{this.events.once(r,i)},this.off=(r,i)=>{this.events.off(r,i)},this.removeListener=(r,i)=>{this.events.removeListener(r,i)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=mt.generateChildLogger(n,this.name),this.clientId=""}get context(){return mt.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,n){let r=!1;try{r=this.getSubscription(e).topic===n}catch{}return r}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,n){const r=this.topicMap.get(e);await Promise.all(r.map(async i=>await this.unsubscribeById(e,i,n)))}async unsubscribeById(e,n,r){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:n,opts:r}});try{const i=gu(r);await this.rpcUnsubscribe(e,n,i);const o=Gt("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,n,o),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:n,opts:r}})}catch(i){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(i),i}}async rpcSubscribe(e,n){const r={method:Fa(n.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{await await Ua(this.relayer.request(r),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(mn.connection_stalled)}return La(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const n=e[0].relay,r={method:Fa(n.protocol).batchSubscribe,params:{topics:e.map(i=>i.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{return await await Ua(this.relayer.request(r),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(mn.connection_stalled)}}rpcUnsubscribe(e,n,r){const i={method:Fa(r.protocol).unsubscribe,params:{topic:e,id:n}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(e,n){this.setSubscription(e,Vu(Po({},n),{id:e})),this.pending.delete(n.topic)}onBatchSubscribe(e){e.length&&e.forEach(n=>{this.setSubscription(n.id,Po({},n)),this.pending.delete(n.topic)})}async onUnsubscribe(e,n,r){this.events.removeAllListeners(n),this.hasSubscription(n,e)&&this.deleteSubscription(n,r),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,n){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:n}),this.addSubscription(e,n))}addSubscription(e,n){this.subscriptions.set(e,Po({},n)),this.topicMap.set(n.topic,e),this.events.emit(Sr.created,n)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const n=this.subscriptions.get(e);if(!n){const{message:r}=Ee("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(r)}return n}deleteSubscription(e,n){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:n});const r=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(r.topic,e),this.events.emit(Sr.deleted,Vu(Po({},r),{reason:n}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Sr.sync)}async reset(){if(!this.cached.length)return;const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let n=0;n<e;n++){const r=this.cached.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(r)}this.events.emit(Sr.resubscribed)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:n}=Ee("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(n),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(n)}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 n=await this.rpcBatchSubscribe(e);Ur(n)&&this.onBatchSubscribe(n.map((r,i)=>Vu(Po({},e[i]),{id:r})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach(n=>{e.push(n)}),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(_o.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(mn.connect,async()=>{await this.onConnect()}),this.relayer.on(mn.disconnect,()=>{this.onDisconnect()}),this.events.on(Sr.created,async e=>{const n=Sr.created;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),await this.persist()}),this.events.on(Sr.deleted,async e=>{const n=Sr.deleted;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,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 n=setInterval(()=>{this.restartInProgress||(clearInterval(n),e())},this.pollingInterval)})}}var dE=Object.defineProperty,Lp=Object.getOwnPropertySymbols,pE=Object.prototype.hasOwnProperty,gE=Object.prototype.propertyIsEnumerable,jp=(t,e,n)=>e in t?dE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mE=(t,e)=>{for(var n in e||(e={}))pE.call(e,n)&&jp(t,n,e[n]);if(Lp)for(var n of Lp(e))gE.call(e,n)&&jp(t,n,e[n]);return t};class wE extends K6{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new yn.exports.EventEmitter,this.name=H8,this.transportExplicitlyClosed=!1,this.initialized=!1,this.reconnecting=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.request=async n=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(n)}catch(r){throw this.logger.debug("Failed to Publish Request"),this.logger.error(r),r}},this.core=e.core,this.logger=typeof e.logger<"u"&&typeof e.logger!="string"?mt.generateChildLogger(e.logger,this.name):mt.pino(mt.getDefaultLoggerOptions({level:e.logger||k8})),this.messages=new iE(this.logger,e.core),this.subscriber=new fE(this,this.logger),this.publisher=new sE(this,this.logger),this.relayUrl=e?.relayUrl||Rp,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 mt.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,n,r){this.isInitialized(),await this.publisher.publish(e,n,r),await this.recordMessageEvent({topic:e,message:n,publishedAt:Date.now()})}async subscribe(e,n){this.isInitialized();let r="";return await Promise.all([new Promise(i=>{this.subscriber.once(Sr.created,o=>{o.topic===e&&i()})}),new Promise(async i=>{r=await this.subscriber.subscribe(e,n),i()})]),r}async unsubscribe(e,n){this.isInitialized(),await this.subscriber.unsubscribe(e,n)}on(e,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}async transportClose(){this.transportExplicitlyClosed=!0,this.connected&&(await this.provider.disconnect(),this.events.emit(mn.transport_closed))}async transportOpen(e){if(!this.reconnecting){this.relayUrl=e||this.relayUrl,this.transportExplicitlyClosed=!1,this.reconnecting=!0;try{await Promise.all([new Promise(n=>{this.initialized||n(),this.subscriber.once(Sr.resubscribed,()=>{n()})}),await Promise.race([new Promise(async(n,r)=>{await Ua(this.provider.connect(),5e3,"socket stalled").catch(i=>r(i)).then(()=>n()).finally(()=>this.removeListener(mn.transport_closed,this.rejectTransportOpen))}),new Promise(n=>this.once(mn.transport_closed,this.rejectTransportOpen))])])}catch(n){this.logger.error(n);const r=n;if(!this.isConnectionStalled(r.message))throw n;this.events.emit(mn.transport_closed)}finally{this.reconnecting=!1}}}async restartTransport(e){this.transportExplicitlyClosed||(this.relayUrl=e||this.relayUrl,await this.transportClose(),await new Promise(n=>setTimeout(n,500)),await this.createProvider(),await this.transportOpen())}isConnectionStalled(e){return this.staleConnectionErrors.some(n=>e.includes(n))}rejectTransportOpen(){throw new Error("closeTransport called before connection was established")}async createProvider(){const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new Ti(new r_(T5({sdkVersion:q8,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:n,message:r}=e;await this.messages.set(n,r)}async shouldIgnoreMessageEvent(e){const{topic:n,message:r}=e;return await this.subscriber.isSubscribed(n)?this.messages.has(n,r):!0}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),Fu(e)){if(!e.method.endsWith(z8))return;const n=e.params,{topic:r,message:i,publishedAt:o}=n.data,c={topic:r,message:i,publishedAt:o};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(mE({type:"event",event:n.id},c)),this.events.emit(n.id,c),await this.acknowledgePayload(e),await this.onMessageEvent(c)}}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(mn.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const n=Uu(e.id,!0);await this.provider.connection.send(n)}registerProviderListeners(){this.provider.on(Ga.payload,e=>this.onProviderPayload(e)),this.provider.on(Ga.connect,()=>{this.events.emit(mn.connect)}),this.provider.on(Ga.disconnect,()=>{this.onProviderDisconnect()}),this.provider.on(Ga.error,e=>{this.logger.error(e),this.events.emit(mn.error,e)})}registerEventListeners(){this.events.on(mn.connection_stalled,async()=>{await this.restartTransport()})}onProviderDisconnect(){this.events.emit(mn.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||setTimeout(async()=>{await this.restartTransport()},ke.toMiliseconds(W8))}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 n=setInterval(()=>{this.connected&&(clearInterval(n),e())},this.connectionStatusPollingInterval)});await this.restartTransport()}}}var vE=Object.defineProperty,Up=Object.getOwnPropertySymbols,yE=Object.prototype.hasOwnProperty,bE=Object.prototype.propertyIsEnumerable,Fp=(t,e,n)=>e in t?vE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Bp=(t,e)=>{for(var n in e||(e={}))yE.call(e,n)&&Fp(t,n,e[n]);if(Up)for(var n of Up(e))bE.call(e,n)&&Fp(t,n,e[n]);return t};class Za extends G6{constructor(e,n,r,i=ii,o=void 0){super(e,n,r,i),this.core=e,this.logger=n,this.name=r,this.map=new Map,this.version=V8,this.cached=[],this.initialized=!1,this.storagePrefix=ii,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(c=>{this.getKey&&c!==null&&!An(c)?this.map.set(this.getKey(c),c):Q5(c)?this.map.set(c.id,c):eb(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=Bp(Bp({},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=mt.generateChildLogger(n,this.name),this.storagePrefix=i,this.getKey=o}get context(){return mt.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 n=this.map.get(e);if(!n){const{message:r}=Ee("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(r),new Error(r)}return n}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:n}=Ee("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(n),new Error(n)}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 _E{constructor(e,n){this.core=e,this.logger=n,this.name=Y8,this.version=J8,this.events=new yn.exports,this.initialized=!1,this.storagePrefix=ii,this.ignoredPayloadTypes=[Di],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:r})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...r])]},this.create=async()=>{this.isInitialized();const r=du(),i=await this.core.crypto.setSymKey(r),o=Ir(ke.FIVE_MINUTES),c={protocol:Tp},l={topic:i,expiry:o,relay:c,active:!1},h=z5({protocol:this.core.protocol,version:this.core.version,topic:i,symKey:r,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 r=>{this.isInitialized(),this.isValidPair(r);const{topic:i,symKey:o,relay:c}=k5(r.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=Ir(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),r.activatePairing&&await this.activate({topic:i}),h},this.activate=async({topic:r})=>{this.isInitialized();const i=Ir(ke.THIRTY_DAYS);await this.pairings.update(r,{active:!0,expiry:i}),this.core.expirer.set(r,i)},this.ping=async r=>{this.isInitialized(),await this.isValidPing(r);const{topic:i}=r;if(this.pairings.keys.includes(i)){const o=await this.sendRequest(i,"wc_pairingPing",{}),{done:c,resolve:l,reject:h}=ps();this.events.once(Qt("pairing_ping",o),({error:d})=>{d?h(d):l()}),await c()}},this.updateExpiry=async({topic:r,expiry:i})=>{this.isInitialized(),await this.pairings.update(r,{expiry:i})},this.updateMetadata=async({topic:r,metadata:i})=>{this.isInitialized(),await this.pairings.update(r,{peerMetadata:i})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async r=>{this.isInitialized(),await this.isValidDisconnect(r);const{topic:i}=r;this.pairings.keys.includes(i)&&(await this.sendRequest(i,"wc_pairingDelete",Gt("USER_DISCONNECTED")),await this.deletePairing(i))},this.sendRequest=async(r,i,o)=>{const c=qa(i,o),l=await this.core.crypto.encode(r,c),h=$o[i].req;return this.core.history.set(r,c),await this.core.relayer.publish(r,l,h),c.id},this.sendResult=async(r,i,o)=>{const c=Uu(r,o),l=await this.core.crypto.encode(i,c),h=await this.core.history.get(i,r),d=$o[h.request.method].res;await this.core.relayer.publish(i,l,d),await this.core.history.resolve(c)},this.sendError=async(r,i,o)=>{const c=Va(r,o),l=await this.core.crypto.encode(i,c),h=await this.core.history.get(i,r),d=$o[h.request.method]?$o[h.request.method].res:$o.unregistered_method.res;await this.core.relayer.publish(i,l,d),await this.core.history.resolve(c)},this.deletePairing=async(r,i)=>{await this.core.relayer.unsubscribe(r),await Promise.all([this.pairings.delete(r,Gt("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(r),i?Promise.resolve():this.core.expirer.del(r)])},this.cleanup=async()=>{const r=this.pairings.getAll().filter(i=>ri(i.expiry));await Promise.all(r.map(i=>this.deletePairing(i.topic)))},this.onRelayEventRequest=r=>{const{topic:i,payload:o}=r,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 r=>{const{topic:i,payload:o}=r,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(r,i)=>{const{id:o}=i;try{this.isValidPing({topic:r}),await this.sendResult(o,r,!0),this.events.emit("pairing_ping",{id:o,topic:r})}catch(c){await this.sendError(o,r,c),this.logger.error(c)}},this.onPairingPingResponse=(r,i)=>{const{id:o}=i;setTimeout(()=>{kr(i)?this.events.emit(Qt("pairing_ping",o),{}):wr(i)&&this.events.emit(Qt("pairing_ping",o),{error:i.error})},500)},this.onPairingDeleteRequest=async(r,i)=>{const{id:o}=i;try{this.isValidDisconnect({topic:r}),await this.deletePairing(r),this.events.emit("pairing_delete",{id:o,topic:r})}catch(c){await this.sendError(o,r,c),this.logger.error(c)}},this.onUnknownRpcMethodRequest=async(r,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,r,l),this.logger.error(l)}catch(l){await this.sendError(o,r,l),this.logger.error(l)}},this.onUnknownRpcMethodResponse=r=>{this.registeredMethods.includes(r)||this.logger.error(Gt("WC_METHOD_UNSUPPORTED",r))},this.isValidPair=r=>{if(!Bn(r)){const{message:i}=Ee("MISSING_OR_INVALID",`pair() params: ${r}`);throw new Error(i)}if(!X5(r.uri)){const{message:i}=Ee("MISSING_OR_INVALID",`pair() uri: ${r.uri}`);throw new Error(i)}},this.isValidPing=async r=>{if(!Bn(r)){const{message:o}=Ee("MISSING_OR_INVALID",`ping() params: ${r}`);throw new Error(o)}const{topic:i}=r;await this.isValidPairingTopic(i)},this.isValidDisconnect=async r=>{if(!Bn(r)){const{message:o}=Ee("MISSING_OR_INVALID",`disconnect() params: ${r}`);throw new Error(o)}const{topic:i}=r;await this.isValidPairingTopic(i)},this.isValidPairingTopic=async r=>{if(!gn(r,!1)){const{message:i}=Ee("MISSING_OR_INVALID",`pairing topic should be a string: ${r}`);throw new Error(i)}if(!this.pairings.keys.includes(r)){const{message:i}=Ee("NO_MATCHING_KEY",`pairing topic doesn't exist: ${r}`);throw new Error(i)}if(ri(this.pairings.get(r).expiry)){await this.deletePairing(r);const{message:i}=Ee("EXPIRED",`pairing topic: ${r}`);throw new Error(i)}},this.core=e,this.logger=mt.generateChildLogger(n,this.name),this.pairings=new Za(this.core,this.logger,this.name,this.storagePrefix)}get context(){return mt.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=Ee("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(mn.message,async e=>{const{topic:n,message:r}=e;if(this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(r)))return;const i=await this.core.crypto.decode(n,r);Fu(i)?(this.core.history.set(n,i),this.onRelayEventRequest({topic:n,payload:i})):Bu(i)&&(await this.core.history.resolve(i),this.onRelayEventResponse({topic:n,payload:i}))})}registerExpirerEvents(){this.core.expirer.on(rr.expired,async e=>{const{topic:n}=p1(e.target);n&&this.pairings.keys.includes(n)&&(await this.deletePairing(n,!0),this.events.emit("pairing_expire",{topic:n}))})}}class EE extends W6{constructor(e,n){super(e,n),this.core=e,this.logger=n,this.records=new Map,this.events=new yn.exports.EventEmitter,this.name=X8,this.version=Q8,this.cached=[],this.initialized=!1,this.storagePrefix=ii,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(r=>this.records.set(r.id,r)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(r,i,o)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:r,request:i,chainId:o}),this.records.has(i.id))return;const c={id:i.id,topic:r,request:{method:i.method,params:i.params||null},chainId:o};this.records.set(c.id,c),this.events.emit(Dr.created,c)},this.resolve=async r=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:r}),!this.records.has(r.id))return;const i=await this.getRecord(r.id);typeof i.response>"u"&&(i.response=wr(r)?{error:r.error}:{result:r.result},this.records.set(i.id,i),this.events.emit(Dr.updated,i))},this.get=async(r,i)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:r,id:i}),await this.getRecord(i)),this.delete=(r,i)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:i}),this.values.forEach(o=>{if(o.topic===r){if(typeof i<"u"&&o.id!==i)return;this.records.delete(o.id),this.events.emit(Dr.deleted,o)}})},this.exists=async(r,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===r:!1),this.on=(r,i)=>{this.events.on(r,i)},this.once=(r,i)=>{this.events.once(r,i)},this.off=(r,i)=>{this.events.off(r,i)},this.removeListener=(r,i)=>{this.events.removeListener(r,i)},this.logger=mt.generateChildLogger(n,this.name)}get context(){return mt.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(n=>{if(typeof n.response<"u")return;const r={topic:n.topic,request:qa(n.request.method,n.request.params,n.id),chainId:n.chainId};return e.push(r)}),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 n=this.records.get(e);if(!n){const{message:r}=Ee("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(r)}return n}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Dr.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:n}=Ee("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(n),new Error(n)}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(Dr.created,e=>{const n=Dr.created;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e}),this.persist()}),this.events.on(Dr.updated,e=>{const n=Dr.updated;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e}),this.persist()}),this.events.on(Dr.deleted,e=>{const n=Dr.deleted;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Ee("NOT_INITIALIZED",this.name);throw new Error(e)}}}class xE extends Y6{constructor(e,n){super(e,n),this.core=e,this.logger=n,this.expirations=new Map,this.events=new yn.exports.EventEmitter,this.name=eE,this.version=tE,this.cached=[],this.initialized=!1,this.storagePrefix=ii,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(r=>this.expirations.set(r.target,r)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=r=>{try{const i=this.formatTarget(r);return typeof this.getExpiration(i)<"u"}catch{return!1}},this.set=(r,i)=>{this.isInitialized();const o=this.formatTarget(r),c={target:o,expiry:i};this.expirations.set(o,c),this.checkExpiry(o,c),this.events.emit(rr.created,{target:o,expiration:c})},this.get=r=>{this.isInitialized();const i=this.formatTarget(r);return this.getExpiration(i)},this.del=r=>{if(this.isInitialized(),this.has(r)){const i=this.formatTarget(r),o=this.getExpiration(i);this.expirations.delete(i),this.events.emit(rr.deleted,{target:i,expiration:o})}},this.on=(r,i)=>{this.events.on(r,i)},this.once=(r,i)=>{this.events.once(r,i)},this.off=(r,i)=>{this.events.off(r,i)},this.removeListener=(r,i)=>{this.events.removeListener(r,i)},this.logger=mt.generateChildLogger(n,this.name)}get context(){return mt.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 R5(e);if(typeof e=="number")return N5(e);const{message:n}=Ee("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw new Error(n)}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(rr.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:n}=Ee("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(n),new Error(n)}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 n=this.expirations.get(e);if(!n){const{message:r}=Ee("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(r),new Error(r)}return n}checkExpiry(e,n){const{expiry:r}=n;ke.toMiliseconds(r)-Date.now()<=0&&this.expire(e,n)}expire(e,n){this.expirations.delete(e),this.events.emit(rr.expired,{target:e,expiration:n})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,n)=>this.checkExpiry(n,e))}registerEventListeners(){this.core.heartbeat.on(_o.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(rr.created,e=>{const n=rr.created;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()}),this.events.on(rr.expired,e=>{const n=rr.expired;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()}),this.events.on(rr.deleted,e=>{const n=rr.deleted;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Ee("NOT_INITIALIZED",this.name);throw new Error(e)}}}var CE=Object.defineProperty,kp=Object.getOwnPropertySymbols,IE=Object.prototype.hasOwnProperty,SE=Object.prototype.propertyIsEnumerable,Hp=(t,e,n)=>e in t?CE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zp=(t,e)=>{for(var n in e||(e={}))IE.call(e,n)&&Hp(t,n,e[n]);if(kp)for(var n of kp(e))SE.call(e,n)&&Hp(t,n,e[n]);return t};class Ku extends z6{constructor(e){super(e),this.protocol=$p,this.version=$8,this.name=qu,this.events=new yn.exports.EventEmitter,this.initialized=!1,this.on=(r,i)=>this.events.on(r,i),this.once=(r,i)=>this.events.once(r,i),this.off=(r,i)=>this.events.off(r,i),this.removeListener=(r,i)=>this.events.removeListener(r,i),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||Rp;const n=typeof e?.logger<"u"&&typeof e?.logger!="string"?e.logger:mt.pino(mt.getDefaultLoggerOptions({level:e?.logger||P8.logger}));this.logger=mt.generateChildLogger(n,this.name),this.heartbeat=new _o.HeartBeat,this.crypto=new rE(this,this.logger,e?.keychain),this.history=new EE(this,this.logger),this.expirer=new xE(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new Kb(zp(zp({},T8),e?.storageOptions)),this.relayer=new wE({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new _E(this,this.logger)}static async init(e){const n=new Ku(e);return await n.initialize(),n}get context(){return mt.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 DE=Ku,Wp="wc",qp=2,Vp="client",Gu=`${Wp}@${qp}:${Vp}:`,Zu={name:Vp,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},OE="proposal",Kp="Proposal expired",AE="session",Ya=ke.SEVEN_DAYS,$E="engine",To={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}}},Yu={min:ke.FIVE_MINUTES,max:ke.SEVEN_DAYS},PE="request";var TE=Object.defineProperty,RE=Object.defineProperties,NE=Object.getOwnPropertyDescriptors,Gp=Object.getOwnPropertySymbols,ME=Object.prototype.hasOwnProperty,LE=Object.prototype.propertyIsEnumerable,Zp=(t,e,n)=>e in t?TE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ir=(t,e)=>{for(var n in e||(e={}))ME.call(e,n)&&Zp(t,n,e[n]);if(Gp)for(var n of Gp(e))LE.call(e,n)&&Zp(t,n,e[n]);return t},Ju=(t,e)=>RE(t,NE(e));class jE extends X6{constructor(e){super(e),this.name=$E,this.events=new yn.exports,this.initialized=!1,this.ignoredPayloadTypes=[Di],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.client.core.pairing.register({methods:Object.keys(To)}),this.initialized=!0)},this.connect=async n=>{this.isInitialized();const r=Ju(ir({},n),{requiredNamespaces:n.requiredNamespaces||{},optionalNamespaces:n.optionalNamespaces||{}});await this.isValidConnect(r);const{pairingTopic:i,requiredNamespaces:o,optionalNamespaces:c,sessionProperties:l,relays:h}=r;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=ir({requiredNamespaces:o,optionalNamespaces:c,relays:h??[{protocol:Tp}],proposer:{publicKey:_,metadata:this.client.metadata}},l&&{sessionProperties:l}),{reject:P,resolve:L,done:k}=ps(ke.FIVE_MINUTES,Kp);if(this.events.once(Qt("session_connect"),async({error:M,session:A})=>{if(M)P(M);else if(A){A.self.publicKey=_;const R=Ju(ir({},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=Ir(ke.FIVE_MINUTES);return await this.setProposal(q,ir({id:q,expiry:T},S)),{uri:v,approval:k}},this.pair=async n=>(this.isInitialized(),await this.client.core.pairing.pair(n)),this.approve=async n=>{this.isInitialized(),await this.isValidApprove(n);const{id:r,relayProtocol:i,namespaces:o,sessionProperties:c}=n,l=this.client.proposal.get(r);let{pairingTopic:h,proposer:d,requiredNamespaces:v,optionalNamespaces:E}=l;h=h||"",ms(v)||(v=K5(o,"approve()"));const _=await this.client.core.crypto.generateKeyPair(),S=d.publicKey,P=await this.client.core.crypto.generateSharedKey(_,S);h&&r&&(await this.client.core.pairing.updateMetadata({topic:h,metadata:d.metadata}),await this.sendResult(r,h,{relay:{protocol:i??"irn"},responderPublicKey:_}),await this.client.proposal.delete(r,Gt("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:h}));const L=ir({relay:{protocol:i??"irn"},namespaces:o,requiredNamespaces:v,optionalNamespaces:E,pairingTopic:h,controller:{publicKey:_,metadata:this.client.metadata},expiry:Ir(Ya)},c&&{sessionProperties:c});await this.client.core.relayer.subscribe(P),await this.sendRequest(P,"wc_sessionSettle",L);const k=Ju(ir({},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,Ir(Ya)),{topic:P,acknowledged:()=>new Promise(q=>q(this.client.session.get(P)))}},this.reject=async n=>{this.isInitialized(),await this.isValidReject(n);const{id:r,reason:i}=n,{pairingTopic:o}=this.client.proposal.get(r);o&&(await this.sendError(r,o,i),await this.client.proposal.delete(r,Gt("USER_DISCONNECTED")))},this.update=async n=>{this.isInitialized(),await this.isValidUpdate(n);const{topic:r,namespaces:i}=n,o=await this.sendRequest(r,"wc_sessionUpdate",{namespaces:i}),{done:c,resolve:l,reject:h}=ps();return this.events.once(Qt("session_update",o),({error:d})=>{d?h(d):l()}),await this.client.session.update(r,{namespaces:i}),{acknowledged:c}},this.extend=async n=>{this.isInitialized(),await this.isValidExtend(n);const{topic:r}=n,i=await this.sendRequest(r,"wc_sessionExtend",{}),{done:o,resolve:c,reject:l}=ps();return this.events.once(Qt("session_extend",i),({error:h})=>{h?l(h):c()}),await this.setExpiry(r,Ir(Ya)),{acknowledged:o}},this.request=async n=>{this.isInitialized(),await this.isValidRequest(n);const{chainId:r,request:i,topic:o,expiry:c}=n,l=await this.sendRequest(o,"wc_sessionRequest",{request:i,chainId:r},c),{done:h,resolve:d,reject:v}=ps(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:r,id:l}),await h()},this.respond=async n=>{this.isInitialized(),await this.isValidRespond(n);const{topic:r,response:i}=n,{id:o}=i;kr(i)?await this.sendResult(o,r,i.result):wr(i)&&await this.sendError(o,r,i.error),this.deletePendingSessionRequest(n.response.id,{message:"fulfilled",code:0})},this.ping=async n=>{this.isInitialized(),await this.isValidPing(n);const{topic:r}=n;if(this.client.session.keys.includes(r)){const i=await this.sendRequest(r,"wc_sessionPing",{}),{done:o,resolve:c,reject:l}=ps();this.events.once(Qt("session_ping",i),({error:h})=>{h?l(h):c()}),await o()}else this.client.core.pairing.pairings.keys.includes(r)&&await this.client.core.pairing.ping({topic:r})},this.emit=async n=>{this.isInitialized(),await this.isValidEmit(n);const{topic:r,event:i,chainId:o}=n;await this.sendRequest(r,"wc_sessionEvent",{event:i,chainId:o})},this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:r}=n;this.client.session.keys.includes(r)?(await this.sendRequest(r,"wc_sessionDelete",Gt("USER_DISCONNECTED")),await this.deleteSession(r)):await this.client.core.pairing.disconnect({topic:r})},this.find=n=>(this.isInitialized(),this.client.session.getAll().filter(r=>Y5(r,n))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.deleteSession=async(n,r)=>{const{self:i}=this.client.session.get(n);await this.client.core.relayer.unsubscribe(n),await Promise.all([this.client.session.delete(n,Gt("USER_DISCONNECTED")),this.client.core.crypto.deleteKeyPair(i.publicKey),this.client.core.crypto.deleteSymKey(n),r?Promise.resolve():this.client.core.expirer.del(n)])},this.deleteProposal=async(n,r)=>{await Promise.all([this.client.proposal.delete(n,Gt("USER_DISCONNECTED")),r?Promise.resolve():this.client.core.expirer.del(n)])},this.deletePendingSessionRequest=async(n,r,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(n,r),i?Promise.resolve():this.client.core.expirer.del(n)])},this.setExpiry=async(n,r)=>{this.client.session.keys.includes(n)&&await this.client.session.update(n,{expiry:r}),this.client.core.expirer.set(n,r)},this.setProposal=async(n,r)=>{await this.client.proposal.set(n,r),this.client.core.expirer.set(n,r.expiry)},this.setPendingSessionRequest=async n=>{const r=To.wc_sessionRequest.req.ttl,{id:i,topic:o,params:c}=n;await this.client.pendingRequest.set(i,{id:i,topic:o,params:c}),r&&this.client.core.expirer.set(i,Ir(r))},this.sendRequest=async(n,r,i,o)=>{const c=qa(r,i),l=await this.client.core.crypto.encode(n,c),h=To[r].req;return o&&(h.ttl=o),this.client.core.history.set(n,c),this.client.core.relayer.publish(n,l,h),c.id},this.sendResult=async(n,r,i)=>{const o=Uu(n,i),c=await this.client.core.crypto.encode(r,o),l=await this.client.core.history.get(r,n),h=To[l.request.method].res;this.client.core.relayer.publish(r,c,h),await this.client.core.history.resolve(o)},this.sendError=async(n,r,i)=>{const o=Va(n,i),c=await this.client.core.crypto.encode(r,o),l=await this.client.core.history.get(r,n),h=To[l.request.method].res;this.client.core.relayer.publish(r,c,h),await this.client.core.history.resolve(o)},this.cleanup=async()=>{const n=[],r=[];this.client.session.getAll().forEach(i=>{ri(i.expiry)&&n.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{ri(i.expiry)&&r.push(i.id)}),await Promise.all([...n.map(i=>this.deleteSession(i)),...r.map(i=>this.deleteProposal(i))])},this.onRelayEventRequest=n=>{const{topic:r,payload:i}=n,o=i.method;switch(o){case"wc_sessionPropose":return this.onSessionProposeRequest(r,i);case"wc_sessionSettle":return this.onSessionSettleRequest(r,i);case"wc_sessionUpdate":return this.onSessionUpdateRequest(r,i);case"wc_sessionExtend":return this.onSessionExtendRequest(r,i);case"wc_sessionPing":return this.onSessionPingRequest(r,i);case"wc_sessionDelete":return this.onSessionDeleteRequest(r,i);case"wc_sessionRequest":return this.onSessionRequest(r,i);case"wc_sessionEvent":return this.onSessionEventRequest(r,i);default:return this.client.logger.info(`Unsupported request method ${o}`)}},this.onRelayEventResponse=async n=>{const{topic:r,payload:i}=n,o=(await this.client.core.history.get(r,i.id)).request.method;switch(o){case"wc_sessionPropose":return this.onSessionProposeResponse(r,i);case"wc_sessionSettle":return this.onSessionSettleResponse(r,i);case"wc_sessionUpdate":return this.onSessionUpdateResponse(r,i);case"wc_sessionExtend":return this.onSessionExtendResponse(r,i);case"wc_sessionPing":return this.onSessionPingResponse(r,i);case"wc_sessionRequest":return this.onSessionRequestResponse(r,i);default:return this.client.logger.info(`Unsupported response method ${o}`)}},this.onSessionProposeRequest=async(n,r)=>{const{params:i,id:o}=r;try{this.isValidConnect(ir({},r.params));const c=Ir(ke.FIVE_MINUTES),l=ir({id:o,pairingTopic:n,expiry:c},i);await this.setProposal(o,l),this.client.events.emit("session_proposal",{id:o,params:l})}catch(c){await this.sendError(o,n,c),this.client.logger.error(c)}},this.onSessionProposeResponse=async(n,r)=>{const{id:i}=r;if(kr(r)){const{result:o}=r;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:n})}else wr(r)&&(await this.client.proposal.delete(i,Gt("USER_DISCONNECTED")),this.events.emit(Qt("session_connect"),{error:r.error}))},this.onSessionSettleRequest=async(n,r)=>{const{id:i,params:o}=r;try{this.isValidSessionSettleRequest(o);const{relay:c,controller:l,expiry:h,namespaces:d,requiredNamespaces:v,optionalNamespaces:E,sessionProperties:_,pairingTopic:S}=r.params,P=ir({topic:n,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(r.id,n,!0),this.events.emit(Qt("session_connect"),{session:P})}catch(c){await this.sendError(i,n,c),this.client.logger.error(c)}},this.onSessionSettleResponse=async(n,r)=>{const{id:i}=r;kr(r)?(await this.client.session.update(n,{acknowledged:!0}),this.events.emit(Qt("session_approve",i),{})):wr(r)&&(await this.client.session.delete(n,Gt("USER_DISCONNECTED")),this.events.emit(Qt("session_approve",i),{error:r.error}))},this.onSessionUpdateRequest=async(n,r)=>{const{params:i,id:o}=r;try{this.isValidUpdate(ir({topic:n},i)),await this.client.session.update(n,{namespaces:i.namespaces}),await this.sendResult(o,n,!0),this.client.events.emit("session_update",{id:o,topic:n,params:i})}catch(c){await this.sendError(o,n,c),this.client.logger.error(c)}},this.onSessionUpdateResponse=(n,r)=>{const{id:i}=r;kr(r)?this.events.emit(Qt("session_update",i),{}):wr(r)&&this.events.emit(Qt("session_update",i),{error:r.error})},this.onSessionExtendRequest=async(n,r)=>{const{id:i}=r;try{this.isValidExtend({topic:n}),await this.setExpiry(n,Ir(Ya)),await this.sendResult(i,n,!0),this.client.events.emit("session_extend",{id:i,topic:n})}catch(o){await this.sendError(i,n,o),this.client.logger.error(o)}},this.onSessionExtendResponse=(n,r)=>{const{id:i}=r;kr(r)?this.events.emit(Qt("session_extend",i),{}):wr(r)&&this.events.emit(Qt("session_extend",i),{error:r.error})},this.onSessionPingRequest=async(n,r)=>{const{id:i}=r;try{this.isValidPing({topic:n}),await this.sendResult(i,n,!0),this.client.events.emit("session_ping",{id:i,topic:n})}catch(o){await this.sendError(i,n,o),this.client.logger.error(o)}},this.onSessionPingResponse=(n,r)=>{const{id:i}=r;setTimeout(()=>{kr(r)?this.events.emit(Qt("session_ping",i),{}):wr(r)&&this.events.emit(Qt("session_ping",i),{error:r.error})},500)},this.onSessionDeleteRequest=async(n,r)=>{const{id:i}=r;try{this.isValidDisconnect({topic:n,reason:r.params}),this.client.core.relayer.once(mn.publish,async()=>{await this.deleteSession(n)}),await this.sendResult(i,n,!0),this.client.events.emit("session_delete",{id:i,topic:n})}catch(o){await this.sendError(i,n,o),this.client.logger.error(o)}},this.onSessionRequest=async(n,r)=>{const{id:i,params:o}=r;try{this.isValidRequest(ir({topic:n},o)),await this.setPendingSessionRequest({id:i,topic:n,params:o}),this.client.events.emit("session_request",{id:i,topic:n,params:o})}catch(c){await this.sendError(i,n,c),this.client.logger.error(c)}},this.onSessionRequestResponse=(n,r)=>{const{id:i}=r;kr(r)?this.events.emit(Qt("session_request",i),{result:r.result}):wr(r)&&this.events.emit(Qt("session_request",i),{error:r.error})},this.onSessionEventRequest=async(n,r)=>{const{id:i,params:o}=r;try{this.isValidEmit(ir({topic:n},o)),this.client.events.emit("session_event",{id:i,topic:n,params:o})}catch(c){await this.sendError(i,n,c),this.client.logger.error(c)}},this.isValidConnect=async n=>{if(!Bn(n)){const{message:h}=Ee("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(n)}`);throw new Error(h)}const{pairingTopic:r,requiredNamespaces:i,optionalNamespaces:o,sessionProperties:c,relays:l}=n;if(An(r)||await this.isValidPairingTopic(r),!cb(l,!0)){const{message:h}=Ee("MISSING_OR_INVALID",`connect() relays: ${l}`);throw new Error(h)}!An(i)&&ms(i)!==0&&this.validateNamespaces(i,"requiredNamespaces"),!An(o)&&ms(o)!==0&&this.validateNamespaces(o,"optionalNamespaces"),An(c)||this.validateSessionProps(c,"sessionProperties")},this.validateNamespaces=(n,r)=>{const i=ab(n,"connect()",r);if(i)throw new Error(i.message)},this.isValidApprove=async n=>{if(!Bn(n))throw new Error(Ee("MISSING_OR_INVALID",`approve() params: ${n}`).message);const{id:r,namespaces:i,relayProtocol:o,sessionProperties:c}=n;await this.isValidProposalId(r);const l=this.client.proposal.get(r),h=ka(i,"approve()");if(h)throw new Error(h.message);const d=E1(l.requiredNamespaces,i,"approve()");if(d)throw new Error(d.message);if(!gn(o,!0)){const{message:v}=Ee("MISSING_OR_INVALID",`approve() relayProtocol: ${o}`);throw new Error(v)}An(c)||this.validateSessionProps(c,"sessionProperties")},this.isValidReject=async n=>{if(!Bn(n)){const{message:o}=Ee("MISSING_OR_INVALID",`reject() params: ${n}`);throw new Error(o)}const{id:r,reason:i}=n;if(await this.isValidProposalId(r),!ub(i)){const{message:o}=Ee("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(o)}},this.isValidSessionSettleRequest=n=>{if(!Bn(n)){const{message:d}=Ee("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${n}`);throw new Error(d)}const{relay:r,controller:i,namespaces:o,expiry:c}=n;if(!b1(r)){const{message:d}=Ee("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(d)}const l=tb(i,"onSessionSettleRequest()");if(l)throw new Error(l.message);const h=ka(o,"onSessionSettleRequest()");if(h)throw new Error(h.message);if(ri(c)){const{message:d}=Ee("EXPIRED","onSessionSettleRequest()");throw new Error(d)}},this.isValidUpdate=async n=>{if(!Bn(n)){const{message:h}=Ee("MISSING_OR_INVALID",`update() params: ${n}`);throw new Error(h)}const{topic:r,namespaces:i}=n;await this.isValidSessionTopic(r);const o=this.client.session.get(r),c=ka(i,"update()");if(c)throw new Error(c.message);const l=E1(o.requiredNamespaces,i,"update()");if(l)throw new Error(l.message)},this.isValidExtend=async n=>{if(!Bn(n)){const{message:i}=Ee("MISSING_OR_INVALID",`extend() params: ${n}`);throw new Error(i)}const{topic:r}=n;await this.isValidSessionTopic(r)},this.isValidRequest=async n=>{if(!Bn(n)){const{message:h}=Ee("MISSING_OR_INVALID",`request() params: ${n}`);throw new Error(h)}const{topic:r,request:i,chainId:o,expiry:c}=n;await this.isValidSessionTopic(r);const{namespaces:l}=this.client.session.get(r);if(!_1(l,o)){const{message:h}=Ee("MISSING_OR_INVALID",`request() chainId: ${o}`);throw new Error(h)}if(!hb(i)){const{message:h}=Ee("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(h)}if(!pb(l,o,i.method)){const{message:h}=Ee("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(h)}if(c&&!vb(c,Yu)){const{message:h}=Ee("MISSING_OR_INVALID",`request() expiry: ${c}. Expiry must be a number (in seconds) between ${Yu.min} and ${Yu.max}`);throw new Error(h)}},this.isValidRespond=async n=>{if(!Bn(n)){const{message:o}=Ee("MISSING_OR_INVALID",`respond() params: ${n}`);throw new Error(o)}const{topic:r,response:i}=n;if(await this.isValidSessionTopic(r),!fb(i)){const{message:o}=Ee("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(i)}`);throw new Error(o)}},this.isValidPing=async n=>{if(!Bn(n)){const{message:i}=Ee("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(i)}const{topic:r}=n;await this.isValidSessionOrPairingTopic(r)},this.isValidEmit=async n=>{if(!Bn(n)){const{message:l}=Ee("MISSING_OR_INVALID",`emit() params: ${n}`);throw new Error(l)}const{topic:r,event:i,chainId:o}=n;await this.isValidSessionTopic(r);const{namespaces:c}=this.client.session.get(r);if(!_1(c,o)){const{message:l}=Ee("MISSING_OR_INVALID",`emit() chainId: ${o}`);throw new Error(l)}if(!db(i)){const{message:l}=Ee("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(l)}if(!gb(c,o,i.name)){const{message:l}=Ee("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(l)}},this.isValidDisconnect=async n=>{if(!Bn(n)){const{message:i}=Ee("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(i)}const{topic:r}=n;await this.isValidSessionOrPairingTopic(r)},this.validateSessionProps=(n,r)=>{Object.values(n).forEach(i=>{if(!gn(i,!1)){const{message:o}=Ee("MISSING_OR_INVALID",`${r} 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(mn.message,async e=>{const{topic:n,message:r}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(r)))return;const i=await this.client.core.crypto.decode(n,r);Fu(i)?(this.client.core.history.set(n,i),this.onRelayEventRequest({topic:n,payload:i})):Bu(i)&&(await this.client.core.history.resolve(i),this.onRelayEventResponse({topic:n,payload:i}))})}registerExpirerEvents(){this.client.core.expirer.on(rr.expired,async e=>{const{topic:n,id:r}=p1(e.target);if(r&&this.client.pendingRequest.keys.includes(r))return await this.deletePendingSessionRequest(r,Ee("EXPIRED"),!0);n?this.client.session.keys.includes(n)&&(await this.deleteSession(n,!0),this.client.events.emit("session_expire",{topic:n})):r&&(await this.deleteProposal(r,!0),this.client.events.emit("proposal_expire",{id:r}))})}isValidPairingTopic(e){if(!gn(e,!1)){const{message:n}=Ee("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(n)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:n}=Ee("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(n)}if(ri(this.client.core.pairing.pairings.get(e).expiry)){const{message:n}=Ee("EXPIRED",`pairing topic: ${e}`);throw new Error(n)}}async isValidSessionTopic(e){if(!gn(e,!1)){const{message:n}=Ee("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(n)}if(!this.client.session.keys.includes(e)){const{message:n}=Ee("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(n)}if(ri(this.client.session.get(e).expiry)){await this.deleteSession(e);const{message:n}=Ee("EXPIRED",`session topic: ${e}`);throw new Error(n)}}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(gn(e,!1)){const{message:n}=Ee("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(n)}else{const{message:n}=Ee("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(n)}}async isValidProposalId(e){if(!lb(e)){const{message:n}=Ee("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(n)}if(!this.client.proposal.keys.includes(e)){const{message:n}=Ee("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(n)}if(ri(this.client.proposal.get(e).expiry)){await this.deleteProposal(e);const{message:n}=Ee("EXPIRED",`proposal id: ${e}`);throw new Error(n)}}}class UE extends Za{constructor(e,n){super(e,n,OE,Gu),this.core=e,this.logger=n}}class FE extends Za{constructor(e,n){super(e,n,AE,Gu),this.core=e,this.logger=n}}class BE extends Za{constructor(e,n){super(e,n,PE,Gu,r=>r.id),this.core=e,this.logger=n}}class Xu extends J6{constructor(e){super(e),this.protocol=Wp,this.version=qp,this.name=Zu.name,this.events=new yn.exports.EventEmitter,this.on=(r,i)=>this.events.on(r,i),this.once=(r,i)=>this.events.once(r,i),this.off=(r,i)=>this.events.off(r,i),this.removeListener=(r,i)=>this.events.removeListener(r,i),this.removeAllListeners=r=>this.events.removeAllListeners(r),this.connect=async r=>{try{return await this.engine.connect(r)}catch(i){throw this.logger.error(i.message),i}},this.pair=async r=>{try{return await this.engine.pair(r)}catch(i){throw this.logger.error(i.message),i}},this.approve=async r=>{try{return await this.engine.approve(r)}catch(i){throw this.logger.error(i.message),i}},this.reject=async r=>{try{return await this.engine.reject(r)}catch(i){throw this.logger.error(i.message),i}},this.update=async r=>{try{return await this.engine.update(r)}catch(i){throw this.logger.error(i.message),i}},this.extend=async r=>{try{return await this.engine.extend(r)}catch(i){throw this.logger.error(i.message),i}},this.request=async r=>{try{return await this.engine.request(r)}catch(i){throw this.logger.error(i.message),i}},this.respond=async r=>{try{return await this.engine.respond(r)}catch(i){throw this.logger.error(i.message),i}},this.ping=async r=>{try{return await this.engine.ping(r)}catch(i){throw this.logger.error(i.message),i}},this.emit=async r=>{try{return await this.engine.emit(r)}catch(i){throw this.logger.error(i.message),i}},this.disconnect=async r=>{try{return await this.engine.disconnect(r)}catch(i){throw this.logger.error(i.message),i}},this.find=r=>{try{return this.engine.find(r)}catch(i){throw this.logger.error(i.message),i}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(r){throw this.logger.error(r.message),r}},this.name=e?.name||Zu.name,this.metadata=e?.metadata||O5();const n=typeof e?.logger<"u"&&typeof e?.logger!="string"?e.logger:mt.pino(mt.getDefaultLoggerOptions({level:e?.logger||Zu.logger}));this.core=e?.core||new DE(e),this.logger=mt.generateChildLogger(n,this.name),this.session=new FE(this.core,this.logger),this.proposal=new UE(this.core,this.logger),this.pendingRequest=new BE(this.core,this.logger),this.engine=new jE(this)}static async init(e){const n=new Xu(e);return await n.initialize(),n}get context(){return mt.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.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}}var Qu={exports:{}};(function(t,e){var n=typeof self<"u"?self:pn,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,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("="),ne=le.shift().replace(/\+/g," "),re=le.join("=").replace(/\+/g," ");U.append(decodeURIComponent(ne),decodeURIComponent(re))}}),U}function z(D){var U=new P,ae=D.replace(/\r?\n[\t ]+/g," ");return ae.split(/\r?\n/).forEach(function(le){var ne=le.split(":"),re=ne.shift().trim();if(re){var oe=ne.join(":").trim();U.append(re,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 ne=new x(D,U);if(ne.signal&&ne.signal.aborted)return le(new c.DOMException("Aborted","AbortError"));var re=new XMLHttpRequest;function oe(){re.abort()}re.onload=function(){var ie={status:re.status,statusText:re.statusText,headers:z(re.getAllResponseHeaders()||"")};ie.url="responseURL"in re?re.responseURL:ie.headers.get("X-Request-URL");var Se="response"in re?re.response:re.responseText;ae(new ee(Se,ie))},re.onerror=function(){le(new TypeError("Network request failed"))},re.ontimeout=function(){le(new TypeError("Network request failed"))},re.onabort=function(){le(new c.DOMException("Aborted","AbortError"))},re.open(ne.method,ne.url,!0),ne.credentials==="include"?re.withCredentials=!0:ne.credentials==="omit"&&(re.withCredentials=!1),"responseType"in re&&l.blob&&(re.responseType="blob"),ne.headers.forEach(function(ie,Se){re.setRequestHeader(Se,ie)}),ne.signal&&(ne.signal.addEventListener("abort",oe),re.onreadystatechange=function(){re.readyState===4&&ne.signal.removeEventListener("abort",oe)}),re.send(typeof ne._bodyInit>"u"?null:ne._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})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;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})(Qu,Qu.exports);var Yp=Hm(Qu.exports);const Jp={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"},Xp=10;class vs{constructor(e){if(this.url=e,this.events=new yn.exports.EventEmitter,this.isAvailable=!1,this.registering=!1,!cp(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,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}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,n){this.isAvailable||await this.register();try{const r=So(e),o=await(await Yp(this.url,Object.assign(Object.assign({},Jp),{body:r}))).json();this.onPayload({data:o})}catch(r){this.onError(e.id,r)}}async register(e=this.url){if(!cp(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const n=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=n||this.events.listenerCount("open")>=n)&&this.events.setMaxListeners(n+1),new Promise((r,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"));r()})})}this.url=e,this.registering=!0;try{const n=So({id:1,jsonrpc:"2.0",method:"test",params:[]});await Yp(e,Object.assign(Object.assign({},Jp),{body:n})),this.onOpen()}catch(n){const r=this.parseError(n);throw this.events.emit("register_error",r),this.onClose(),r}}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 n=typeof e.data=="string"?Tu(e.data):e.data;this.events.emit("payload",n)}onError(e,n){const r=this.parseError(n),i=r.message||r.toString(),o=Va(e,i);this.events.emit("payload",o)}parseError(e,n=this.url){return tp(e,n,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>Xp&&this.events.setMaxListeners(Xp)}}const Qp="error",kE="wss://relay.walletconnect.com",HE="wc",zE="universal_provider",eg=`${HE}@${2}:${zE}:`,WE="https://rpc.walletconnect.com/v1",Ri={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var Ro=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},eh={exports:{}};/**
72
+ ***************************************************************************** */var ju=function(t,e){return ju=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},ju(t,e)};function I4(t,e){ju(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Uu=function(){return Uu=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Uu.apply(this,arguments)};function S4(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function D4(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(o=(i<3?c(o):i>3?c(e,n,o):c(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o}function O4(t,e){return function(n,r){e(n,r,t)}}function A4(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function $4(t,e,n,r){function i(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function l(v){try{d(r.next(v))}catch(E){c(E)}}function h(v){try{d(r.throw(v))}catch(E){c(E)}}function d(v){v.done?o(v.value):i(v.value).then(l,h)}d((r=r.apply(t,e||[])).next())})}function P4(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,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(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=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 n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){n.label=d[1];break}if(d[0]===6&&n.label<o[1]){n.label=o[1],o=d;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(d);break}o[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(t,n)}catch(v){d=[6,v],i=0}finally{r=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function T4(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}function N4(t,e){for(var n in t)n!=="default"&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function Fu(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ip(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],c;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(l){c={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(c)throw c.error}}return o}function R4(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(ip(arguments[e]));return t}function M4(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],c=0,l=o.length;c<l;c++,i++)r[i]=o[c];return r}function Ao(t){return this instanceof Ao?(this.v=t,this):new Ao(t)}function L4(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(_){r[_]&&(i[_]=function(S){return new Promise(function(P,L){o.push([_,S,P,L])>1||l(_,S)})})}function l(_,S){try{h(r[_](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 j4(t){var e,n;return e={},r("next"),r("throw",function(i){throw i}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(i,o){e[i]=t[i]?function(c){return(n=!n)?{value:Ao(t[i](c)),done:i==="return"}:o?o(c):c}:o}}function U4(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Fu=="function"?Fu(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[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 F4(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function B4(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function k4(t){return t&&t.__esModule?t:{default:t}}function H4(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function z4(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}var W4=Object.freeze({__proto__:null,__extends:I4,get __assign(){return Uu},__rest:S4,__decorate:D4,__param:O4,__metadata:A4,__awaiter:$4,__generator:P4,__createBinding:T4,__exportStar:N4,__values:Fu,__read:ip,__spread:R4,__spreadArrays:M4,__await:Ao,__asyncGenerator:L4,__asyncDelegator:j4,__asyncValues:U4,__makeTemplateObject:F4,__importStar:B4,__importDefault:k4,__classPrivateFieldGet:H4,__classPrivateFieldSet:z4}),q4=Ii(W4),Fr={},sp;function V4(){if(sp)return Fr;sp=1,Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.isBrowserCryptoAvailable=Fr.getSubtleCrypto=Fr.getBrowerCrypto=void 0;function t(){return pn?.crypto||pn?.msCrypto||{}}Fr.getBrowerCrypto=t;function e(){const r=t();return r.subtle||r.webkitSubtle}Fr.getSubtleCrypto=e;function n(){return!!t()&&!!e()}return Fr.isBrowserCryptoAvailable=n,Fr}var Br={},op;function K4(){if(op)return Br;op=1,Object.defineProperty(Br,"__esModule",{value:!0}),Br.isBrowser=Br.isNode=Br.isReactNative=void 0;function t(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}Br.isReactNative=t;function e(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}Br.isNode=e;function n(){return!t()&&!e()}return Br.isBrowser=n,Br}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=q4;e.__exportStar(V4(),t),e.__exportStar(K4(),t)})(rp);function ap(t=3){const e=Date.now()*Math.pow(10,t),n=Math.floor(Math.random()*Math.pow(10,t));return e+n}function G4(t=6){return BigInt(ap(t))}function qa(t,e,n){return{id:n||ap(),jsonrpc:"2.0",method:t,params:e}}function Bu(t,e){return{id:t,jsonrpc:"2.0",result:e}}function Va(t,e,n){return{id:t,jsonrpc:"2.0",error:Z4(e,n)}}function Z4(t,e){return typeof t>"u"?tp(Q1):(typeof t=="string"&&(t=Object.assign(Object.assign({},tp(Lu)),{message:t})),typeof e<"u"&&(t.data=e),x4(t.code)&&(t=C4(t.code)),t)}class Y4{}class J4 extends Y4{constructor(){super()}}class X4 extends J4{constructor(e){super()}}const Q4="^https?:",e_="^wss?:";function t_(t){const e=t.match(new RegExp(/^\w+:/,"gi"));if(!(!e||!e.length))return e[0]}function cp(t,e){const n=t_(t);return typeof n>"u"?!1:new RegExp(e).test(n)}function lp(t){return cp(t,Q4)}function up(t){return cp(t,e_)}function n_(t){return new RegExp("wss?://localhost(:d{2,5})?").test(t)}function hp(t){return typeof t=="object"&&"id"in t&&"jsonrpc"in t&&t.jsonrpc==="2.0"}function ku(t){return hp(t)&&"method"in t}function Hu(t){return hp(t)&&(kr(t)||yr(t))}function kr(t){return"result"in t}function yr(t){return"error"in t}class ii extends X4{constructor(e){super(e),this.events=new yn.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,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}async request(e,n){return this.requestStrict(qa(e.method,e.params||[],G4().toString()),n)}async requestStrict(e,n){return new Promise(async(r,i)=>{if(!this.connection.connected)try{await this.open()}catch(o){i(o)}this.events.on(`${e.id}`,o=>{yr(o)?i(o.error):r(o.result)});try{await this.connection.send(e,n)}catch(o){i(o)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),Hu(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 fp=10,r_=()=>typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:require("ws"),i_=()=>typeof window<"u",s_=r_();class o_{constructor(e){if(this.url=e,this.events=new yn.exports.EventEmitter,this.registering=!1,!up(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,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}async open(e=this.url){await this.register(e)}async close(){return new Promise((e,n)=>{if(typeof this.socket>"u"){n(new Error("Connection already closed"));return}this.socket.onclose=r=>{this.onClose(r),e()},this.socket.close()})}async send(e,n){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(Do(e))}catch(r){this.onError(e.id,r)}}register(e=this.url){if(!up(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const n=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=n||this.events.listenerCount("open")>=n)&&this.events.setMaxListeners(n+1),new Promise((r,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"));r(this.socket)})})}return this.url=e,this.registering=!0,new Promise((n,r)=>{const i=rp.isReactNative()?void 0:{rejectUnauthorized:!n_(e)},o=new s_(e,[],i);i_()?o.onerror=c=>{const l=c;r(this.emitError(l.error))}:o.on("error",c=>{r(this.emitError(c))}),o.onopen=()=>{this.onOpen(o),n(o)}})}onOpen(e){e.onmessage=n=>this.onPayload(n),e.onclose=n=>this.onClose(n),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 n=typeof e.data=="string"?Ru(e.data):e.data;this.events.emit("payload",n)}onError(e,n){const r=this.parseError(n),i=r.message||r.toString(),o=Va(e,i);this.events.emit("payload",o)}parseError(e,n=this.url){return np(e,n,"WS")}resetMaxListeners(){this.events.getMaxListeners()>fp&&this.events.setMaxListeners(fp)}emitError(e){const n=this.parseError(new Error(e?.message||`WebSocket connection failed for URL: ${this.url}`));return this.events.emit("register_error",n),n}}var zu={exports:{}};(function(t,e){var n=200,r="__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]",N="[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]",ne="[object Uint8Array]",re="[object Uint8ClampedArray]",oe="[object Uint16Array]",ie="[object Uint32Array]",Se=/[\\^$.*+?()[\]{}|]/g,ge=/^\[object .+?Constructor\]$/,Re=/^(?:0|[1-9]\d*)$/,be={};be[me]=be[D]=be[U]=be[ae]=be[le]=be[ne]=be[re]=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[N]=be[C]=be[f]=be[z]=!1;var Ae=typeof pn=="object"&&pn&&pn.Object===Object&&pn,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(R,V){for(var fe=-1,Ce=R==null?0:R.length,It=0,Je=[];++fe<Ce;){var Tt=R[fe];V(Tt,fe,R)&&(Je[It++]=Tt)}return Je}function ot(R,V){for(var fe=-1,Ce=V.length,It=R.length;++fe<Ce;)R[It+fe]=V[fe];return R}function qe(R,V){for(var fe=-1,Ce=R==null?0:R.length;++fe<Ce;)if(V(R[fe],fe,R))return!0;return!1}function At(R,V){for(var fe=-1,Ce=Array(R);++fe<R;)Ce[fe]=V(fe);return Ce}function $t(R){return function(V){return R(V)}}function Ye(R,V){return R.has(V)}function Le(R,V){return R?.[V]}function Me(R){var V=-1,fe=Array(R.size);return R.forEach(function(Ce,It){fe[++V]=[It,Ce]}),fe}function ze(R,V){return function(fe){return R(V(fe))}}function et(R){var V=-1,fe=Array(R.size);return R.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 R=/[^.]+$/.exec(p&&p.keys&&p.keys.IE_PROTO||"");return R?"Symbol(src)_1."+R:""}(),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,Rn=Oe?Oe.toStringTag:void 0,Wr=Object.getOwnPropertySymbols,pi=xe?xe.isBuffer:void 0,Qi=ze(Object.keys,Object),kt=Jn(Y,"DataView"),Mt=Jn(Y,"Map"),Ht=Jn(Y,"Promise"),zt=Jn(Y,"Set"),Ut=Jn(Y,"WeakMap"),Lt=Jn(Object,"create"),en=Vr(kt),tn=Vr(Mt),Wt=Vr(Ht),nn=Vr(zt),qt=Vr(Ut),Zt=Oe?Oe.prototype:void 0,Vt=Zt?Zt.valueOf:void 0;function Pt(R){var V=-1,fe=R==null?0:R.length;for(this.clear();++V<fe;){var Ce=R[V];this.set(Ce[0],Ce[1])}}function rn(){this.__data__=Lt?Lt(null):{},this.size=0}function sn(R){var V=this.has(R)&&delete this.__data__[R];return this.size-=V?1:0,V}function xf(R){var V=this.__data__;if(Lt){var fe=V[R];return fe===r?void 0:fe}return $.call(V,R)?V[R]:void 0}function Cf(R){var V=this.__data__;return Lt?V[R]!==void 0:$.call(V,R)}function If(R,V){var fe=this.__data__;return this.size+=this.has(R)?0:1,fe[R]=Lt&&V===void 0?r:V,this}Pt.prototype.clear=rn,Pt.prototype.delete=sn,Pt.prototype.get=xf,Pt.prototype.has=Cf,Pt.prototype.set=If;function cr(R){var V=-1,fe=R==null?0:R.length;for(this.clear();++V<fe;){var Ce=R[V];this.set(Ce[0],Ce[1])}}function Sf(){this.__data__=[],this.size=0}function Df(R){var V=this.__data__,fe=es(V,R);if(fe<0)return!1;var Ce=V.length-1;return fe==Ce?V.pop():ct.call(V,fe,1),--this.size,!0}function Of(R){var V=this.__data__,fe=es(V,R);return fe<0?void 0:V[fe][1]}function Af(R){return es(this.__data__,R)>-1}function $f(R,V){var fe=this.__data__,Ce=es(fe,R);return Ce<0?(++this.size,fe.push([R,V])):fe[Ce][1]=V,this}cr.prototype.clear=Sf,cr.prototype.delete=Df,cr.prototype.get=Of,cr.prototype.has=Af,cr.prototype.set=$f;function qr(R){var V=-1,fe=R==null?0:R.length;for(this.clear();++V<fe;){var Ce=R[V];this.set(Ce[0],Ce[1])}}function Hs(){this.size=0,this.__data__={hash:new Pt,map:new(Mt||cr),string:new Pt}}function Pf(R){var V=gi(this,R).delete(R);return this.size-=V?1:0,V}function zs(R){return gi(this,R).get(R)}function Tf(R){return gi(this,R).has(R)}function Nf(R,V){var fe=gi(this,R),Ce=fe.size;return fe.set(R,V),this.size+=fe.size==Ce?0:1,this}qr.prototype.clear=Hs,qr.prototype.delete=Pf,qr.prototype.get=zs,qr.prototype.has=Tf,qr.prototype.set=Nf;function Ws(R){var V=-1,fe=R==null?0:R.length;for(this.__data__=new qr;++V<fe;)this.add(R[V])}function jc(R){return this.__data__.set(R,r),this}function Uc(R){return this.__data__.has(R)}Ws.prototype.add=Ws.prototype.push=jc,Ws.prototype.has=Uc;function br(R){var V=this.__data__=new cr(R);this.size=V.size}function Rf(){this.__data__=new cr,this.size=0}function Mf(R){var V=this.__data__,fe=V.delete(R);return this.size=V.size,fe}function Lf(R){return this.__data__.get(R)}function jf(R){return this.__data__.has(R)}function Fc(R,V){var fe=this.__data__;if(fe instanceof cr){var Ce=fe.__data__;if(!Mt||Ce.length<n-1)return Ce.push([R,V]),this.size=++fe.size,this;fe=this.__data__=new qr(Ce)}return fe.set(R,V),this.size=fe.size,this}br.prototype.clear=Rf,br.prototype.delete=Mf,br.prototype.get=Lf,br.prototype.has=jf,br.prototype.set=Fc;function Bc(R,V){var fe=Ks(R),Ce=!fe&&Xc(R),It=!fe&&!Ce&&la(R),Je=!fe&&!Ce&&!It&&tl(R),Tt=fe||Ce||It||Je,on=Tt?At(R.length,String):[],gt=on.length;for(var St in R)(V||$.call(R,St))&&!(Tt&&(St=="length"||It&&(St=="offset"||St=="parent")||Je&&(St=="buffer"||St=="byteLength"||St=="byteOffset")||Kc(St,gt)))&&on.push(St);return on}function es(R,V){for(var fe=R.length;fe--;)if(Jc(R[fe][0],V))return fe;return-1}function aa(R,V,fe){var Ce=V(R);return Ks(R)?Ce:ot(Ce,fe(R))}function ts(R){return R==null?R===void 0?J:q:Rn&&Rn in Object(R)?qc(R):Bf(R)}function ca(R){return rs(R)&&ts(R)==l}function ns(R,V,fe,Ce,It){return R===V?!0:R==null||V==null||!rs(R)&&!rs(V)?R!==R&&V!==V:kc(R,V,fe,Ce,ns,It)}function kc(R,V,fe,Ce,It,Je){var Tt=Ks(R),on=Ks(V),gt=Tt?h:Nr(R),St=on?h:Nr(V);gt=gt==l?T:gt,St=St==l?T:St;var Yt=gt==T,zn=St==T,an=gt==St;if(an&&la(R)){if(!la(V))return!1;Tt=!0,Yt=!1}if(an&&!Yt)return Je||(Je=new br),Tt||tl(R)?qs(R,V,fe,Ce,It,Je):Ff(R,V,gt,fe,Ce,It,Je);if(!(fe&i)){var Nt=Yt&&$.call(R,"__wrapped__"),Mn=zn&&$.call(V,"__wrapped__");if(Nt||Mn){var _r=Nt?R.value():R,lr=Mn?V.value():V;return Je||(Je=new br),It(_r,lr,fe,Ce,Je)}}return an?(Je||(Je=new br),Wc(R,V,fe,Ce,It,Je)):!1}function Uf(R){if(!el(R)||Zc(R))return!1;var V=Gs(R)?Q:ge;return V.test(Vr(R))}function Hc(R){return rs(R)&&Qc(R.length)&&!!be[ts(R)]}function zc(R){if(!Yc(R))return Qi(R);var V=[];for(var fe in Object(R))$.call(R,fe)&&fe!="constructor"&&V.push(fe);return V}function qs(R,V,fe,Ce,It,Je){var Tt=fe&i,on=R.length,gt=V.length;if(on!=gt&&!(Tt&&gt>on))return!1;var St=Je.get(R);if(St&&Je.get(V))return St==V;var Yt=-1,zn=!0,an=fe&o?new Ws:void 0;for(Je.set(R,V),Je.set(V,R);++Yt<on;){var Nt=R[Yt],Mn=V[Yt];if(Ce)var _r=Tt?Ce(Mn,Nt,Yt,V,R,Je):Ce(Nt,Mn,Yt,R,V,Je);if(_r!==void 0){if(_r)continue;zn=!1;break}if(an){if(!qe(V,function(lr,Rr){if(!Ye(an,Rr)&&(Nt===lr||It(Nt,lr,fe,Ce,Je)))return an.push(Rr)})){zn=!1;break}}else if(!(Nt===Mn||It(Nt,Mn,fe,Ce,Je))){zn=!1;break}}return Je.delete(R),Je.delete(V),zn}function Ff(R,V,fe,Ce,It,Je,Tt){switch(fe){case de:if(R.byteLength!=V.byteLength||R.byteOffset!=V.byteOffset)return!1;R=R.buffer,V=V.buffer;case ee:return!(R.byteLength!=V.byteLength||!Je(new it(R),new it(V)));case v:case E:case k:return Jc(+R,+V);case _:return R.name==V.name&&R.message==V.message;case N:case f:return R==V+"";case L:var on=Me;case C:var gt=Ce&i;if(on||(on=et),R.size!=V.size&&!gt)return!1;var St=Tt.get(R);if(St)return St==V;Ce|=o,Tt.set(R,V);var Yt=qs(on(R),on(V),Ce,It,Je,Tt);return Tt.delete(R),Yt;case x:if(Vt)return Vt.call(R)==Vt.call(V)}return!1}function Wc(R,V,fe,Ce,It,Je){var Tt=fe&i,on=Vs(R),gt=on.length,St=Vs(V),Yt=St.length;if(gt!=Yt&&!Tt)return!1;for(var zn=gt;zn--;){var an=on[zn];if(!(Tt?an in V:$.call(V,an)))return!1}var Nt=Je.get(R);if(Nt&&Je.get(V))return Nt==V;var Mn=!0;Je.set(R,V),Je.set(V,R);for(var _r=Tt;++zn<gt;){an=on[zn];var lr=R[an],Rr=V[an];if(Ce)var ua=Tt?Ce(Rr,lr,an,V,R,Je):Ce(lr,Rr,an,R,V,Je);if(!(ua===void 0?lr===Rr||It(lr,Rr,fe,Ce,Je):ua)){Mn=!1;break}_r||(_r=an=="constructor")}if(Mn&&!_r){var is=R.constructor,wn=V.constructor;is!=wn&&"constructor"in R&&"constructor"in V&&!(typeof is=="function"&&is instanceof is&&typeof wn=="function"&&wn instanceof wn)&&(Mn=!1)}return Je.delete(R),Je.delete(V),Mn}function Vs(R){return aa(R,zf,Vc)}function gi(R,V){var fe=R.__data__;return Gc(V)?fe[typeof V=="string"?"string":"hash"]:fe.map}function Jn(R,V){var fe=Le(R,V);return Uf(fe)?fe:void 0}function qc(R){var V=$.call(R,Rn),fe=R[Rn];try{R[Rn]=void 0;var Ce=!0}catch{}var It=G.call(R);return Ce&&(V?R[Rn]=fe:delete R[Rn]),It}var Vc=Wr?function(R){return R==null?[]:(R=Object(R),tt(Wr(R),function(V){return ut.call(R,V)}))}:Ct,Nr=ts;(kt&&Nr(new kt(new ArrayBuffer(1)))!=de||Mt&&Nr(new Mt)!=L||Ht&&Nr(Ht.resolve())!=M||zt&&Nr(new zt)!=C||Ut&&Nr(new Ut)!=z)&&(Nr=function(R){var V=ts(R),fe=V==T?R.constructor:void 0,Ce=fe?Vr(fe):"";if(Ce)switch(Ce){case en:return de;case tn:return L;case Wt:return M;case nn:return C;case qt:return z}return V});function Kc(R,V){return V=V??c,!!V&&(typeof R=="number"||Re.test(R))&&R>-1&&R%1==0&&R<V}function Gc(R){var V=typeof R;return V=="string"||V=="number"||V=="symbol"||V=="boolean"?R!=="__proto__":R===null}function Zc(R){return!!B&&B in R}function Yc(R){var V=R&&R.constructor,fe=typeof V=="function"&&V.prototype||b;return R===fe}function Bf(R){return G.call(R)}function Vr(R){if(R!=null){try{return m.call(R)}catch{}try{return R+""}catch{}}return""}function Jc(R,V){return R===V||R!==R&&V!==V}var Xc=ca(function(){return arguments}())?ca:function(R){return rs(R)&&$.call(R,"callee")&&!ut.call(R,"callee")},Ks=Array.isArray;function kf(R){return R!=null&&Qc(R.length)&&!Gs(R)}var la=pi||xt;function Hf(R,V){return ns(R,V)}function Gs(R){if(!el(R))return!1;var V=ts(R);return V==S||V==P||V==d||V==A}function Qc(R){return typeof R=="number"&&R>-1&&R%1==0&&R<=c}function el(R){var V=typeof R;return R!=null&&(V=="object"||V=="function")}function rs(R){return R!=null&&typeof R=="object"}var tl=Pe?$t(Pe):Hc;function zf(R){return kf(R)?Bc(R):zc(R)}function Ct(){return[]}function xt(){return!1}t.exports=Hf})(zu,zu.exports);var a_=zu.exports,c_=Object.defineProperty,dp=Object.getOwnPropertySymbols,l_=Object.prototype.hasOwnProperty,u_=Object.prototype.propertyIsEnumerable,pp=(t,e,n)=>e in t?c_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Pn=(t,e)=>{for(var n in e||(e={}))l_.call(e,n)&&pp(t,n,e[n]);if(dp)for(var n of dp(e))u_.call(e,n)&&pp(t,n,e[n]);return t};function h_(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),c=o.charCodeAt(0);if(n[c]!==255)throw new TypeError(o+" is ambiguous");n[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 N=P[q],C=0,f=M-1;(N!==0||C<k)&&f!==-1;f--,C++)N+=256*A[f]>>>0,A[f]=N%l>>>0,N=N/l>>>0;if(N!==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=n[P.charCodeAt(L)];if(A===255)return;for(var N=0,C=T-1;(A!==0||N<q)&&C!==-1;C--,N++)A+=l*M[C]>>>0,M[C]=A%256>>>0,A=A/256>>>0;if(A!==0)throw new Error("Non-zero carry");q=N,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 f_=h_,d_=f_;const gp=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")},p_=t=>new TextEncoder().encode(t),g_=t=>new TextDecoder().decode(t);class m_{constructor(e,n,r){this.name=e,this.prefix=n,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class w_{constructor(e,n,r){if(this.name=e,this.prefix=n,n.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=r}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 mp(this,e)}}class v_{constructor(e){this.decoders=e}or(e){return mp(this,e)}decode(e){const n=e[0],r=this.decoders[n];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const mp=(t,e)=>new v_(Pn(Pn({},t.decoders||{[t.prefix]:t}),e.decoders||{[e.prefix]:e}));class y_{constructor(e,n,r,i){this.name=e,this.prefix=n,this.baseEncode=r,this.baseDecode=i,this.encoder=new m_(e,n,r),this.decoder=new w_(e,n,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Ka=({name:t,prefix:e,encode:n,decode:r})=>new y_(t,e,n,r),$o=({prefix:t,name:e,alphabet:n})=>{const{encode:r,decode:i}=d_(n,e);return Ka({prefix:t,name:e,encode:r,decode:o=>gp(i(o))})},b_=(t,e,n,r)=>{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*n/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-${r} character`);h=h<<n|E,l+=n,l>=8&&(l-=8,c[d++]=255&h>>l)}if(l>=n||255&h<<8-l)throw new SyntaxError("Unexpected end of data");return c},__=(t,e,n)=>{const r=e[e.length-1]==="=",i=(1<<n)-1;let o="",c=0,l=0;for(let h=0;h<t.length;++h)for(l=l<<8|t[h],c+=8;c>n;)c-=n,o+=e[i&l>>c];if(c&&(o+=e[i&l<<n-c]),r)for(;o.length*n&7;)o+="=";return o},_n=({name:t,prefix:e,bitsPerChar:n,alphabet:r})=>Ka({prefix:e,name:t,encode(i){return __(i,r,n)},decode(i){return b_(i,r,n,t)}}),E_=Ka({prefix:"\0",name:"identity",encode:t=>g_(t),decode:t=>p_(t)});var x_=Object.freeze({__proto__:null,identity:E_});const C_=_n({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var I_=Object.freeze({__proto__:null,base2:C_});const S_=_n({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var D_=Object.freeze({__proto__:null,base8:S_});const O_=$o({prefix:"9",name:"base10",alphabet:"0123456789"});var A_=Object.freeze({__proto__:null,base10:O_});const $_=_n({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),P_=_n({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var T_=Object.freeze({__proto__:null,base16:$_,base16upper:P_});const N_=_n({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),R_=_n({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),M_=_n({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),L_=_n({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),j_=_n({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),U_=_n({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),F_=_n({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),B_=_n({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),k_=_n({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var H_=Object.freeze({__proto__:null,base32:N_,base32upper:R_,base32pad:M_,base32padupper:L_,base32hex:j_,base32hexupper:U_,base32hexpad:F_,base32hexpadupper:B_,base32z:k_});const z_=$o({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),W_=$o({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var q_=Object.freeze({__proto__:null,base36:z_,base36upper:W_});const V_=$o({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),K_=$o({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var G_=Object.freeze({__proto__:null,base58btc:V_,base58flickr:K_});const Z_=_n({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Y_=_n({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),J_=_n({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),X_=_n({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Q_=Object.freeze({__proto__:null,base64:Z_,base64pad:Y_,base64url:J_,base64urlpad:X_});const wp=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}"),e8=wp.reduce((t,e,n)=>(t[n]=e,t),[]),t8=wp.reduce((t,e,n)=>(t[e.codePointAt(0)]=n,t),[]);function n8(t){return t.reduce((e,n)=>(e+=e8[n],e),"")}function r8(t){const e=[];for(const n of t){const r=t8[n.codePointAt(0)];if(r===void 0)throw new Error(`Non-base256emoji character: ${n}`);e.push(r)}return new Uint8Array(e)}const i8=Ka({prefix:"\u{1F680}",name:"base256emoji",encode:n8,decode:r8});var s8=Object.freeze({__proto__:null,base256emoji:i8}),o8=yp,vp=128,a8=127,c8=~a8,l8=Math.pow(2,31);function yp(t,e,n){e=e||[],n=n||0;for(var r=n;t>=l8;)e[n++]=t&255|vp,t/=128;for(;t&c8;)e[n++]=t&255|vp,t>>>=7;return e[n]=t|0,yp.bytes=n-r+1,e}var u8=Wu,h8=128,bp=127;function Wu(t,r){var n=0,r=r||0,i=0,o=r,c,l=t.length;do{if(o>=l)throw Wu.bytes=0,new RangeError("Could not decode varint");c=t[o++],n+=i<28?(c&bp)<<i:(c&bp)*Math.pow(2,i),i+=7}while(c>=h8);return Wu.bytes=o-r,n}var f8=Math.pow(2,7),d8=Math.pow(2,14),p8=Math.pow(2,21),g8=Math.pow(2,28),m8=Math.pow(2,35),w8=Math.pow(2,42),v8=Math.pow(2,49),y8=Math.pow(2,56),b8=Math.pow(2,63),_8=function(t){return t<f8?1:t<d8?2:t<p8?3:t<g8?4:t<m8?5:t<w8?6:t<v8?7:t<y8?8:t<b8?9:10},E8={encode:o8,decode:u8,encodingLength:_8},_p=E8;const Ep=(t,e,n=0)=>(_p.encode(t,e,n),e),xp=t=>_p.encodingLength(t),qu=(t,e)=>{const n=e.byteLength,r=xp(t),i=r+xp(n),o=new Uint8Array(i+n);return Ep(t,o,0),Ep(n,o,r),o.set(e,i),new x8(t,n,e,o)};class x8{constructor(e,n,r,i){this.code=e,this.size=n,this.digest=r,this.bytes=i}}const Cp=({name:t,code:e,encode:n})=>new C8(t,e,n);class C8{constructor(e,n,r){this.name=e,this.code=n,this.encode=r}digest(e){if(e instanceof Uint8Array){const n=this.encode(e);return n instanceof Uint8Array?qu(this.code,n):n.then(r=>qu(this.code,r))}else throw Error("Unknown type, must be binary type")}}const Ip=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),I8=Cp({name:"sha2-256",code:18,encode:Ip("SHA-256")}),S8=Cp({name:"sha2-512",code:19,encode:Ip("SHA-512")});var D8=Object.freeze({__proto__:null,sha256:I8,sha512:S8});const Sp=0,O8="identity",Dp=gp;var A8=Object.freeze({__proto__:null,identity:{code:Sp,name:O8,encode:Dp,digest:t=>qu(Sp,Dp(t))}});new TextEncoder,new TextDecoder;const Op=Pn(Pn(Pn(Pn(Pn(Pn(Pn(Pn(Pn(Pn({},x_),I_),D_),A_),T_),H_),q_),G_),Q_),s8);Pn(Pn({},D8),A8);function $8(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(t):new Uint8Array(t)}function Ap(t,e,n,r){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:r}}}const $p=Ap("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),Vu=Ap("ascii","a",t=>{let e="a";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e},t=>{t=t.substring(1);const e=$8(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}),P8=Pn({utf8:$p,"utf-8":$p,hex:Op.base16,latin1:Vu,ascii:Vu,binary:Vu},Op);function T8(t,e="utf8"){const n=P8[e];if(!n)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t,"utf8"):n.decoder.decode(`${n.prefix}${t}`)}const Pp="wc",N8=2,Ku="core",si=`${Pp}@${2}:${Ku}:`,R8={name:Ku,logger:"error"},M8={database:":memory:"},L8="crypto",Tp="client_ed25519_seed",j8=Ue.ONE_DAY,U8="keychain",F8="0.3",B8="messages",k8="0.3",H8=Ue.SIX_HOURS,z8="publisher",Np="irn",W8="error",Rp="wss://relay.walletconnect.com",q8="relayer",mn={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"},V8="_subscription",Ga={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},K8=Ue.ONE_SECOND,G8="2.6.2-rc-4a445a",Z8="0.3",Dr={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},Y8="subscription",J8="0.3",X8=Ue.FIVE_SECONDS*1e3,Q8="pairing",eE="0.3",Po={wc_pairingDelete:{req:{ttl:Ue.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:Ue.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:Ue.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:Ue.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:Ue.ONE_DAY,prompt:!1,tag:0},res:{ttl:Ue.ONE_DAY,prompt:!1,tag:0}}},Or={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},tE="history",nE="0.3",rE="expirer",rr={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},iE="0.3",Mp="verify-api",Lp="https://verify.walletconnect.com";class sE{constructor(e,n){this.core=e,this.logger=n,this.keychain=new Map,this.name=U8,this.version=F8,this.initialized=!1,this.storagePrefix=si,this.init=async()=>{if(!this.initialized){const r=await this.getKeyChain();typeof r<"u"&&(this.keychain=r),this.initialized=!0}},this.has=r=>(this.isInitialized(),this.keychain.has(r)),this.set=async(r,i)=>{this.isInitialized(),this.keychain.set(r,i),await this.persist()},this.get=r=>{this.isInitialized();const i=this.keychain.get(r);if(typeof i>"u"){const{message:o}=Ee("NO_MATCHING_KEY",`${this.name}: ${r}`);throw new Error(o)}return i},this.del=async r=>{this.isInitialized(),this.keychain.delete(r),await this.persist()},this.core=e,this.logger=pt.generateChildLogger(n,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,f1(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?d1(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 oE{constructor(e,n,r){this.core=e,this.logger=n,this.name=L8,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=X1(i);return J1(o.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const i=p5();return this.setPrivateKey(i.publicKey,i.privateKey)},this.signJWT=async i=>{this.isInitialized();const o=await this.getClientSeed(),c=X1(o),l=du();return await w4(l,i,j8,c)},this.generateSharedKey=(i,o,c)=>{this.isInitialized();const l=this.getPrivateKey(i),h=g5(l,o);return this.setSymKey(h,c)},this.setSymKey=async(i,o)=>{this.isInitialized();const c=o||m5(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=a1(c),h=Do(o);if(c1(l)){const _=l.senderPublicKey,S=l.receiverPublicKey;i=await this.generateSharedKey(_,S)}const d=this.getSymKey(i),{type:v,senderPublicKey:E}=l;return v5({type:v,symKey:d,message:h,senderPublicKey:E})},this.decode=async(i,o,c)=>{this.isInitialized();const l=_5(o,c);if(c1(l)){const v=l.receiverPublicKey,E=l.senderPublicKey;i=await this.generateSharedKey(v,E)}const h=this.getSymKey(i),d=y5({symKey:h,encoded:o});return Ru(d)},this.getPayloadType=i=>{const o=ja(i);return go(o.type)},this.getPayloadSenderPublicKey=i=>{const o=ja(i);return o.senderPublicKey?Dn(o.senderPublicKey,On):void 0},this.core=e,this.logger=pt.generateChildLogger(n,this.name),this.keychain=r||new sE(this.core,this.logger)}get context(){return pt.getLoggerContext(this.logger)}async setPrivateKey(e,n){return await this.keychain.set(e,n),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(Tp)}catch{e=du(),await this.keychain.set(Tp,e)}return T8(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 aE extends K6{constructor(e,n){super(e,n),this.logger=e,this.core=n,this.messages=new Map,this.name=B8,this.version=k8,this.initialized=!1,this.storagePrefix=si,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const r=await this.getRelayerMessages();typeof r<"u"&&(this.messages=r),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(r){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(r)}finally{this.initialized=!0}}},this.set=async(r,i)=>{this.isInitialized();const o=$i(i);let c=this.messages.get(r);return typeof c>"u"&&(c={}),typeof c[o]<"u"||(c[o]=i,this.messages.set(r,c),await this.persist()),o},this.get=r=>{this.isInitialized();let i=this.messages.get(r);return typeof i>"u"&&(i={}),i},this.has=(r,i)=>{this.isInitialized();const o=this.get(r),c=$i(i);return typeof o[c]<"u"},this.del=async r=>{this.isInitialized(),this.messages.delete(r),await this.persist()},this.logger=pt.generateChildLogger(e,this.name),this.core=n}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,f1(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?d1(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 cE extends G6{constructor(e,n){super(e,n),this.relayer=e,this.logger=n,this.events=new yn.exports.EventEmitter,this.name=z8,this.queue=new Map,this.publishTimeout=1e4,this.publish=async(r,i,o)=>{this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:r,message:i,opts:o}});try{const c=o?.ttl||H8,l=wu(o),h=o?.prompt||!1,d=o?.tag||0,v={topic:r,message:i,opts:{ttl:c,relay:l,prompt:h,tag:d}},E=$i(i);this.queue.set(E,v);try{await await Ua(this.rpcPublish(r,i,c,l,h,d),this.publishTimeout),this.relayer.events.emit(mn.publish,v)}catch{this.logger.debug("Publishing Payload stalled"),this.relayer.events.emit(mn.connection_stalled);return}this.onPublish(E,v),this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:r,message:i,opts:o}})}catch(c){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(c),c}},this.on=(r,i)=>{this.events.on(r,i)},this.once=(r,i)=>{this.events.once(r,i)},this.off=(r,i)=>{this.events.off(r,i)},this.removeListener=(r,i)=>{this.events.removeListener(r,i)},this.relayer=e,this.logger=pt.generateChildLogger(n,this.name),this.registerEventListeners()}get context(){return pt.getLoggerContext(this.logger)}rpcPublish(e,n,r,i,o,c){var l,h,d,v;const E={method:Fa(i.protocol).publish,params:{topic:e,message:n,ttl:r,prompt:o,tag:c}};return An((l=E.params)==null?void 0:l.prompt)&&((h=E.params)==null||delete h.prompt),An((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,n){this.queue.delete(e)}checkQueue(){this.queue.forEach(async e=>{const{topic:n,message:r,opts:i}=e;await this.publish(n,r,i)})}registerEventListeners(){this.relayer.core.heartbeat.on(Eo.HEARTBEAT_EVENTS.pulse,()=>{this.checkQueue()})}}class lE{constructor(){this.map=new Map,this.set=(e,n)=>{const r=this.get(e);this.exists(e,n)||this.map.set(e,[...r,n])},this.get=e=>this.map.get(e)||[],this.exists=(e,n)=>this.get(e).includes(n),this.delete=(e,n)=>{if(typeof n>"u"){this.map.delete(e);return}if(!this.map.has(e))return;const r=this.get(e);if(!this.exists(e,n))return;const i=r.filter(o=>o!==n);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 uE=Object.defineProperty,hE=Object.defineProperties,fE=Object.getOwnPropertyDescriptors,jp=Object.getOwnPropertySymbols,dE=Object.prototype.hasOwnProperty,pE=Object.prototype.propertyIsEnumerable,Up=(t,e,n)=>e in t?uE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,To=(t,e)=>{for(var n in e||(e={}))dE.call(e,n)&&Up(t,n,e[n]);if(jp)for(var n of jp(e))pE.call(e,n)&&Up(t,n,e[n]);return t},Gu=(t,e)=>hE(t,fE(e));class gE extends J6{constructor(e,n){super(e,n),this.relayer=e,this.logger=n,this.subscriptions=new Map,this.topicMap=new lE,this.events=new yn.exports.EventEmitter,this.name=Y8,this.version=J8,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(r,i)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:r,opts:i}});try{const o=wu(i),c={topic:r,relay:o};this.pending.set(r,c);const l=await this.rpcSubscribe(r,o);return this.onSubscribe(l,c),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:r,opts:i}}),l}catch(o){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(o),o}},this.unsubscribe=async(r,i)=>{await this.restartToComplete(),this.isInitialized(),typeof i?.id<"u"?await this.unsubscribeById(r,i.id,i):await this.unsubscribeByTopic(r,i)},this.isSubscribed=async r=>this.topics.includes(r)?!0:await new Promise((i,o)=>{const c=new Ue.Watch;c.start(this.pendingSubscriptionWatchLabel);const l=setInterval(()=>{!this.pending.has(r)&&this.topics.includes(r)&&(clearInterval(l),c.stop(this.pendingSubscriptionWatchLabel),i(!0)),c.elapsed(this.pendingSubscriptionWatchLabel)>=X8&&(clearInterval(l),c.stop(this.pendingSubscriptionWatchLabel),o(!1))},this.pollingInterval)}),this.on=(r,i)=>{this.events.on(r,i)},this.once=(r,i)=>{this.events.once(r,i)},this.off=(r,i)=>{this.events.off(r,i)},this.removeListener=(r,i)=>{this.events.removeListener(r,i)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=pt.generateChildLogger(n,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,n){let r=!1;try{r=this.getSubscription(e).topic===n}catch{}return r}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,n){const r=this.topicMap.get(e);await Promise.all(r.map(async i=>await this.unsubscribeById(e,i,n)))}async unsubscribeById(e,n,r){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:n,opts:r}});try{const i=wu(r);await this.rpcUnsubscribe(e,n,i);const o=Gt("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,n,o),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:n,opts:r}})}catch(i){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(i),i}}async rpcSubscribe(e,n){const r={method:Fa(n.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{await await Ua(this.relayer.request(r),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(mn.connection_stalled)}return $i(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const n=e[0].relay,r={method:Fa(n.protocol).batchSubscribe,params:{topics:e.map(i=>i.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{return await await Ua(this.relayer.request(r),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(mn.connection_stalled)}}rpcUnsubscribe(e,n,r){const i={method:Fa(r.protocol).unsubscribe,params:{topic:e,id:n}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(e,n){this.setSubscription(e,Gu(To({},n),{id:e})),this.pending.delete(n.topic)}onBatchSubscribe(e){e.length&&e.forEach(n=>{this.setSubscription(n.id,To({},n)),this.pending.delete(n.topic)})}async onUnsubscribe(e,n,r){this.events.removeAllListeners(n),this.hasSubscription(n,e)&&this.deleteSubscription(n,r),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,n){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:n}),this.addSubscription(e,n))}addSubscription(e,n){this.subscriptions.set(e,To({},n)),this.topicMap.set(n.topic,e),this.events.emit(Dr.created,n)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const n=this.subscriptions.get(e);if(!n){const{message:r}=Ee("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(r)}return n}deleteSubscription(e,n){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:n});const r=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(r.topic,e),this.events.emit(Dr.deleted,Gu(To({},r),{reason:n}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Dr.sync)}async reset(){if(!this.cached.length)return;const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let n=0;n<e;n++){const r=this.cached.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(r)}this.events.emit(Dr.resubscribed)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:n}=Ee("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(n),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(n)}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 n=await this.rpcBatchSubscribe(e);Ur(n)&&this.onBatchSubscribe(n.map((r,i)=>Gu(To({},e[i]),{id:r})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach(n=>{e.push(n)}),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(Eo.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(mn.connect,async()=>{await this.onConnect()}),this.relayer.on(mn.disconnect,()=>{this.onDisconnect()}),this.events.on(Dr.created,async e=>{const n=Dr.created;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),await this.persist()}),this.events.on(Dr.deleted,async e=>{const n=Dr.deleted;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,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 n=setInterval(()=>{this.restartInProgress||(clearInterval(n),e())},this.pollingInterval)})}}var mE=Object.defineProperty,Fp=Object.getOwnPropertySymbols,wE=Object.prototype.hasOwnProperty,vE=Object.prototype.propertyIsEnumerable,Bp=(t,e,n)=>e in t?mE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yE=(t,e)=>{for(var n in e||(e={}))wE.call(e,n)&&Bp(t,n,e[n]);if(Fp)for(var n of Fp(e))vE.call(e,n)&&Bp(t,n,e[n]);return t};class bE extends Z6{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new yn.exports.EventEmitter,this.name=q8,this.transportExplicitlyClosed=!1,this.initialized=!1,this.reconnecting=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.request=async n=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(n)}catch(r){throw this.logger.debug("Failed to Publish Request"),this.logger.error(r),r}},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||W8})),this.messages=new aE(this.logger,e.core),this.subscriber=new gE(this,this.logger),this.publisher=new cE(this,this.logger),this.relayUrl=e?.relayUrl||Rp,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,n,r){this.isInitialized(),await this.publisher.publish(e,n,r),await this.recordMessageEvent({topic:e,message:n,publishedAt:Date.now()})}async subscribe(e,n){this.isInitialized();let r="";return await Promise.all([new Promise(i=>{this.subscriber.once(Dr.created,o=>{o.topic===e&&i()})}),new Promise(async i=>{r=await this.subscriber.subscribe(e,n),i()})]),r}async unsubscribe(e,n){this.isInitialized(),await this.subscriber.unsubscribe(e,n)}on(e,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}async transportClose(){this.transportExplicitlyClosed=!0,this.connected&&(await this.provider.disconnect(),this.events.emit(mn.transport_closed))}async transportOpen(e){if(!this.reconnecting){this.relayUrl=e||this.relayUrl,this.transportExplicitlyClosed=!1,this.reconnecting=!0;try{await Promise.all([new Promise(n=>{this.initialized||n(),this.subscriber.once(Dr.resubscribed,()=>{n()})}),await Promise.race([new Promise(async(n,r)=>{await Ua(this.provider.connect(),5e3,"socket stalled").catch(i=>r(i)).then(()=>n()).finally(()=>this.removeListener(mn.transport_closed,this.rejectTransportOpen))}),new Promise(n=>this.once(mn.transport_closed,this.rejectTransportOpen))])])}catch(n){this.logger.error(n);const r=n;if(!this.isConnectionStalled(r.message))throw n;this.events.emit(mn.transport_closed)}finally{this.reconnecting=!1}}}async restartTransport(e){this.transportExplicitlyClosed||(this.relayUrl=e||this.relayUrl,await this.transportClose(),await new Promise(n=>setTimeout(n,500)),await this.createProvider(),await this.transportOpen())}isConnectionStalled(e){return this.staleConnectionErrors.some(n=>e.includes(n))}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 o_(R5({sdkVersion:G8,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:n,message:r}=e;await this.messages.set(n,r)}async shouldIgnoreMessageEvent(e){const{topic:n,message:r}=e;return await this.subscriber.isSubscribed(n)?this.messages.has(n,r):!0}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),ku(e)){if(!e.method.endsWith(V8))return;const n=e.params,{topic:r,message:i,publishedAt:o}=n.data,c={topic:r,message:i,publishedAt:o};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(yE({type:"event",event:n.id},c)),this.events.emit(n.id,c),await this.acknowledgePayload(e),await this.onMessageEvent(c)}}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(mn.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const n=Bu(e.id,!0);await this.provider.connection.send(n)}registerProviderListeners(){this.provider.on(Ga.payload,e=>this.onProviderPayload(e)),this.provider.on(Ga.connect,()=>{this.events.emit(mn.connect)}),this.provider.on(Ga.disconnect,()=>{this.onProviderDisconnect()}),this.provider.on(Ga.error,e=>{this.logger.error(e),this.events.emit(mn.error,e)})}registerEventListeners(){this.events.on(mn.connection_stalled,async()=>{await this.restartTransport()})}onProviderDisconnect(){this.events.emit(mn.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||setTimeout(async()=>{await this.restartTransport()},Ue.toMiliseconds(K8))}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 n=setInterval(()=>{this.connected&&(clearInterval(n),e())},this.connectionStatusPollingInterval)});await this.restartTransport()}}}var _E=Object.defineProperty,kp=Object.getOwnPropertySymbols,EE=Object.prototype.hasOwnProperty,xE=Object.prototype.propertyIsEnumerable,Hp=(t,e,n)=>e in t?_E(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zp=(t,e)=>{for(var n in e||(e={}))EE.call(e,n)&&Hp(t,n,e[n]);if(kp)for(var n of kp(e))xE.call(e,n)&&Hp(t,n,e[n]);return t};class Za extends Y6{constructor(e,n,r,i=si,o=void 0){super(e,n,r,i),this.core=e,this.logger=n,this.name=r,this.map=new Map,this.version=Z8,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&&!An(c)?this.map.set(this.getKey(c),c):tb(c)?this.map.set(c.id,c):nb(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=>a_(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=zp(zp({},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(n,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 n=this.map.get(e);if(!n){const{message:r}=Ee("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(r),new Error(r)}return n}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:n}=Ee("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(n),new Error(n)}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 CE{constructor(e,n){this.core=e,this.logger=n,this.name=Q8,this.version=eE,this.events=new yn.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:r})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...r])]},this.create=async()=>{this.isInitialized();const r=du(),i=await this.core.crypto.setSymKey(r),o=vr(Ue.FIVE_MINUTES),c={protocol:Np},l={topic:i,expiry:o,relay:c,active:!1},h=q5({protocol:this.core.protocol,version:this.core.version,topic:i,symKey:r,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 r=>{this.isInitialized(),this.isValidPair(r);const{topic:i,symKey:o,relay:c}=z5(r.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=vr(Ue.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),r.activatePairing&&await this.activate({topic:i}),h},this.activate=async({topic:r})=>{this.isInitialized();const i=vr(Ue.THIRTY_DAYS);await this.pairings.update(r,{active:!0,expiry:i}),this.core.expirer.set(r,i)},this.ping=async r=>{this.isInitialized(),await this.isValidPing(r);const{topic:i}=r;if(this.pairings.keys.includes(i)){const o=await this.sendRequest(i,"wc_pairingPing",{}),{done:c,resolve:l,reject:h}=ws();this.events.once(Qt("pairing_ping",o),({error:d})=>{d?h(d):l()}),await c()}},this.updateExpiry=async({topic:r,expiry:i})=>{this.isInitialized(),await this.pairings.update(r,{expiry:i})},this.updateMetadata=async({topic:r,metadata:i})=>{this.isInitialized(),await this.pairings.update(r,{peerMetadata:i})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async r=>{this.isInitialized(),await this.isValidDisconnect(r);const{topic:i}=r;this.pairings.keys.includes(i)&&(await this.sendRequest(i,"wc_pairingDelete",Gt("USER_DISCONNECTED")),await this.deletePairing(i))},this.sendRequest=async(r,i,o)=>{const c=qa(i,o),l=await this.core.crypto.encode(r,c),h=Po[i].req;return this.core.history.set(r,c),await this.core.relayer.publish(r,l,h),c.id},this.sendResult=async(r,i,o)=>{const c=Bu(r,o),l=await this.core.crypto.encode(i,c),h=await this.core.history.get(i,r),d=Po[h.request.method].res;await this.core.relayer.publish(i,l,d),await this.core.history.resolve(c)},this.sendError=async(r,i,o)=>{const c=Va(r,o),l=await this.core.crypto.encode(i,c),h=await this.core.history.get(i,r),d=Po[h.request.method]?Po[h.request.method].res:Po.unregistered_method.res;await this.core.relayer.publish(i,l,d),await this.core.history.resolve(c)},this.deletePairing=async(r,i)=>{await this.core.relayer.unsubscribe(r),await Promise.all([this.pairings.delete(r,Gt("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(r),i?Promise.resolve():this.core.expirer.del(r)])},this.cleanup=async()=>{const r=this.pairings.getAll().filter(i=>ri(i.expiry));await Promise.all(r.map(i=>this.deletePairing(i.topic)))},this.onRelayEventRequest=r=>{const{topic:i,payload:o}=r,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 r=>{const{topic:i,payload:o}=r,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(r,i)=>{const{id:o}=i;try{this.isValidPing({topic:r}),await this.sendResult(o,r,!0),this.events.emit("pairing_ping",{id:o,topic:r})}catch(c){await this.sendError(o,r,c),this.logger.error(c)}},this.onPairingPingResponse=(r,i)=>{const{id:o}=i;setTimeout(()=>{kr(i)?this.events.emit(Qt("pairing_ping",o),{}):yr(i)&&this.events.emit(Qt("pairing_ping",o),{error:i.error})},500)},this.onPairingDeleteRequest=async(r,i)=>{const{id:o}=i;try{this.isValidDisconnect({topic:r}),await this.deletePairing(r),this.events.emit("pairing_delete",{id:o,topic:r})}catch(c){await this.sendError(o,r,c),this.logger.error(c)}},this.onUnknownRpcMethodRequest=async(r,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,r,l),this.logger.error(l)}catch(l){await this.sendError(o,r,l),this.logger.error(l)}},this.onUnknownRpcMethodResponse=r=>{this.registeredMethods.includes(r)||this.logger.error(Gt("WC_METHOD_UNSUPPORTED",r))},this.isValidPair=r=>{if(!Bn(r)){const{message:i}=Ee("MISSING_OR_INVALID",`pair() params: ${r}`);throw new Error(i)}if(!eb(r.uri)){const{message:i}=Ee("MISSING_OR_INVALID",`pair() uri: ${r.uri}`);throw new Error(i)}},this.isValidPing=async r=>{if(!Bn(r)){const{message:o}=Ee("MISSING_OR_INVALID",`ping() params: ${r}`);throw new Error(o)}const{topic:i}=r;await this.isValidPairingTopic(i)},this.isValidDisconnect=async r=>{if(!Bn(r)){const{message:o}=Ee("MISSING_OR_INVALID",`disconnect() params: ${r}`);throw new Error(o)}const{topic:i}=r;await this.isValidPairingTopic(i)},this.isValidPairingTopic=async r=>{if(!gn(r,!1)){const{message:i}=Ee("MISSING_OR_INVALID",`pairing topic should be a string: ${r}`);throw new Error(i)}if(!this.pairings.keys.includes(r)){const{message:i}=Ee("NO_MATCHING_KEY",`pairing topic doesn't exist: ${r}`);throw new Error(i)}if(ri(this.pairings.get(r).expiry)){await this.deletePairing(r);const{message:i}=Ee("EXPIRED",`pairing topic: ${r}`);throw new Error(i)}},this.core=e,this.logger=pt.generateChildLogger(n,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(mn.message,async e=>{const{topic:n,message:r}=e;if(this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(r)))return;const i=await this.core.crypto.decode(n,r);ku(i)?(this.core.history.set(n,i),this.onRelayEventRequest({topic:n,payload:i})):Hu(i)&&(await this.core.history.resolve(i),this.onRelayEventResponse({topic:n,payload:i}))})}registerExpirerEvents(){this.core.expirer.on(rr.expired,async e=>{const{topic:n}=g1(e.target);n&&this.pairings.keys.includes(n)&&(await this.deletePairing(n,!0),this.events.emit("pairing_expire",{topic:n}))})}}class IE extends V6{constructor(e,n){super(e,n),this.core=e,this.logger=n,this.records=new Map,this.events=new yn.exports.EventEmitter,this.name=tE,this.version=nE,this.cached=[],this.initialized=!1,this.storagePrefix=si,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(r=>this.records.set(r.id,r)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(r,i,o)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:r,request:i,chainId:o}),this.records.has(i.id))return;const c={id:i.id,topic:r,request:{method:i.method,params:i.params||null},chainId:o};this.records.set(c.id,c),this.events.emit(Or.created,c)},this.resolve=async r=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:r}),!this.records.has(r.id))return;const i=await this.getRecord(r.id);typeof i.response>"u"&&(i.response=yr(r)?{error:r.error}:{result:r.result},this.records.set(i.id,i),this.events.emit(Or.updated,i))},this.get=async(r,i)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:r,id:i}),await this.getRecord(i)),this.delete=(r,i)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:i}),this.values.forEach(o=>{if(o.topic===r){if(typeof i<"u"&&o.id!==i)return;this.records.delete(o.id),this.events.emit(Or.deleted,o)}})},this.exists=async(r,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===r:!1),this.on=(r,i)=>{this.events.on(r,i)},this.once=(r,i)=>{this.events.once(r,i)},this.off=(r,i)=>{this.events.off(r,i)},this.removeListener=(r,i)=>{this.events.removeListener(r,i)},this.logger=pt.generateChildLogger(n,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(n=>{if(typeof n.response<"u")return;const r={topic:n.topic,request:qa(n.request.method,n.request.params,n.id),chainId:n.chainId};return e.push(r)}),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 n=this.records.get(e);if(!n){const{message:r}=Ee("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(r)}return n}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Or.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:n}=Ee("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(n),new Error(n)}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(Or.created,e=>{const n=Or.created;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e}),this.persist()}),this.events.on(Or.updated,e=>{const n=Or.updated;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e}),this.persist()}),this.events.on(Or.deleted,e=>{const n=Or.deleted;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Ee("NOT_INITIALIZED",this.name);throw new Error(e)}}}class SE extends X6{constructor(e,n){super(e,n),this.core=e,this.logger=n,this.expirations=new Map,this.events=new yn.exports.EventEmitter,this.name=rE,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(r=>this.expirations.set(r.target,r)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=r=>{try{const i=this.formatTarget(r);return typeof this.getExpiration(i)<"u"}catch{return!1}},this.set=(r,i)=>{this.isInitialized();const o=this.formatTarget(r),c={target:o,expiry:i};this.expirations.set(o,c),this.checkExpiry(o,c),this.events.emit(rr.created,{target:o,expiration:c})},this.get=r=>{this.isInitialized();const i=this.formatTarget(r);return this.getExpiration(i)},this.del=r=>{if(this.isInitialized(),this.has(r)){const i=this.formatTarget(r),o=this.getExpiration(i);this.expirations.delete(i),this.events.emit(rr.deleted,{target:i,expiration:o})}},this.on=(r,i)=>{this.events.on(r,i)},this.once=(r,i)=>{this.events.once(r,i)},this.off=(r,i)=>{this.events.off(r,i)},this.removeListener=(r,i)=>{this.events.removeListener(r,i)},this.logger=pt.generateChildLogger(n,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 M5(e);if(typeof e=="number")return L5(e);const{message:n}=Ee("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw new Error(n)}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(rr.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:n}=Ee("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(n),new Error(n)}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 n=this.expirations.get(e);if(!n){const{message:r}=Ee("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(r),new Error(r)}return n}checkExpiry(e,n){const{expiry:r}=n;Ue.toMiliseconds(r)-Date.now()<=0&&this.expire(e,n)}expire(e,n){this.expirations.delete(e),this.events.emit(rr.expired,{target:e,expiration:n})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,n)=>this.checkExpiry(n,e))}registerEventListeners(){this.core.heartbeat.on(Eo.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(rr.created,e=>{const n=rr.created;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()}),this.events.on(rr.expired,e=>{const n=rr.expired;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()}),this.events.on(rr.deleted,e=>{const n=rr.deleted;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Ee("NOT_INITIALIZED",this.name);throw new Error(e)}}}class DE extends Q6{constructor(e,n){super(e,n),this.projectId=e,this.logger=n,this.name=Mp,this.initialized=!1,this.init=async r=>{!gu()||!document||(this.verifyUrl=r?.verifyUrl||Lp,await this.createIframe())},this.register=async r=>{var i;this.initialized||await this.init(),this.iframe&&((i=this.iframe.contentWindow)==null||i.postMessage(r.attestationId,this.verifyUrl),this.logger.info(`postMessage sent: ${r.attestationId} ${this.verifyUrl}`))},this.resolve=async r=>{var i;if(this.isDevEnv)return"";this.logger.info(`resolving attestation: ${r.attestationId}`);const o=this.startAbortTimer(Ue.FIVE_SECONDS),c=await fetch(`${this.verifyUrl}/attestation/${r.attestationId}`,{signal:this.abortController.signal});return clearTimeout(o),((i=await c.json())==null?void 0:i.origin)||""},this.createIframe=async()=>{try{const r=this.startAbortTimer(Ue.FIVE_SECONDS);await Promise.race([new Promise((i,o)=>{const c=document.createElement("iframe");c.setAttribute("id",Mp),c.setAttribute("src",`${this.verifyUrl}/${this.projectId}`),c.style.display="none",c.addEventListener("load",()=>{this.initialized=!0,clearTimeout(r),i()}),c.addEventListener("error",l=>{o(l)}),document.body.append(c),this.iframe=c}),new Promise(i=>{this.abortController.signal.addEventListener("abort",()=>{i("iframe load timeout")})})])}catch(r){this.logger.error(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.error(r)}},this.logger=pt.generateChildLogger(n,this.name),this.verifyUrl=Lp,this.abortController=new AbortController,this.isDevEnv=pu()&&process.env.IS_VITEST}get context(){return pt.getLoggerContext(this.logger)}startAbortTimer(e){return setTimeout(()=>this.abortController.abort(),vr(e))}}var OE=Object.defineProperty,Wp=Object.getOwnPropertySymbols,AE=Object.prototype.hasOwnProperty,$E=Object.prototype.propertyIsEnumerable,qp=(t,e,n)=>e in t?OE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Vp=(t,e)=>{for(var n in e||(e={}))AE.call(e,n)&&qp(t,n,e[n]);if(Wp)for(var n of Wp(e))$E.call(e,n)&&qp(t,n,e[n]);return t};class Zu extends q6{constructor(e){super(e),this.protocol=Pp,this.version=N8,this.name=Ku,this.events=new yn.exports.EventEmitter,this.initialized=!1,this.on=(r,i)=>this.events.on(r,i),this.once=(r,i)=>this.events.once(r,i),this.off=(r,i)=>this.events.off(r,i),this.removeListener=(r,i)=>this.events.removeListener(r,i),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||Rp;const n=typeof e?.logger<"u"&&typeof e?.logger!="string"?e.logger:pt.pino(pt.getDefaultLoggerOptions({level:e?.logger||R8.logger}));this.logger=pt.generateChildLogger(n,this.name),this.heartbeat=new Eo.HeartBeat,this.crypto=new oE(this,this.logger,e?.keychain),this.history=new IE(this,this.logger),this.expirer=new SE(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new Zb(Vp(Vp({},M8),e?.storageOptions)),this.relayer=new bE({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new CE(this,this.logger),this.verify=new DE(this.projectId||"",this.logger)}static async init(e){const n=new Zu(e);return await n.initialize(),n}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 PE=Zu,Kp="wc",Gp=2,Zp="client",Yu=`${Kp}@${Gp}:${Zp}:`,Ju={name:Zp,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},TE="proposal",Yp="Proposal expired",NE="session",Ya=Ue.SEVEN_DAYS,RE="engine",No={wc_sessionPropose:{req:{ttl:Ue.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:Ue.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:Ue.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:Ue.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:Ue.ONE_DAY,prompt:!1,tag:1104},res:{ttl:Ue.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:Ue.ONE_DAY,prompt:!1,tag:1106},res:{ttl:Ue.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:Ue.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:Ue.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:Ue.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:Ue.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:Ue.ONE_DAY,prompt:!1,tag:1112},res:{ttl:Ue.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:Ue.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:Ue.THIRTY_SECONDS,prompt:!1,tag:1115}}},Xu={min:Ue.FIVE_MINUTES,max:Ue.SEVEN_DAYS},ME="request",LE=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var jE=Object.defineProperty,UE=Object.defineProperties,FE=Object.getOwnPropertyDescriptors,Jp=Object.getOwnPropertySymbols,BE=Object.prototype.hasOwnProperty,kE=Object.prototype.propertyIsEnumerable,Xp=(t,e,n)=>e in t?jE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ir=(t,e)=>{for(var n in e||(e={}))BE.call(e,n)&&Xp(t,n,e[n]);if(Jp)for(var n of Jp(e))kE.call(e,n)&&Xp(t,n,e[n]);return t},Qu=(t,e)=>UE(t,FE(e));class HE extends t4{constructor(e){super(e),this.name=RE,this.events=new yn.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 n=>{this.isInitialized();const r=Qu(ir({},n),{requiredNamespaces:n.requiredNamespaces||{},optionalNamespaces:n.optionalNamespaces||{}});await this.isValidConnect(r);const{pairingTopic:i,requiredNamespaces:o,optionalNamespaces:c,sessionProperties:l,relays:h}=r;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=ir({requiredNamespaces:o,optionalNamespaces:c,relays:h??[{protocol:Np}],proposer:{publicKey:_,metadata:this.client.metadata}},l&&{sessionProperties:l}),{reject:P,resolve:L,done:k}=ws(Ue.FIVE_MINUTES,Yp);if(this.events.once(Qt("session_connect"),async({error:M,session:A})=>{if(M)P(M);else if(A){A.self.publicKey=_;const N=Qu(ir({},A),{requiredNamespaces:A.requiredNamespaces,optionalNamespaces:A.optionalNamespaces});await this.client.session.set(A.topic,N),await this.setExpiry(A.topic,A.expiry),d&&await this.client.core.pairing.updateMetadata({topic:d,metadata:A.peer.metadata}),L(N)}}),!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=vr(Ue.FIVE_MINUTES);return await this.setProposal(q,ir({id:q,expiry:T},S)),{uri:v,approval:k}},this.pair=async n=>(this.isInitialized(),await this.client.core.pairing.pair(n)),this.approve=async n=>{this.isInitialized(),await this.isValidApprove(n);const{id:r,relayProtocol:i,namespaces:o,sessionProperties:c}=n,l=this.client.proposal.get(r);let{pairingTopic:h,proposer:d,requiredNamespaces:v,optionalNamespaces:E}=l;h=h||"",ys(v)||(v=Z5(o,"approve()"));const _=await this.client.core.crypto.generateKeyPair(),S=d.publicKey,P=await this.client.core.crypto.generateSharedKey(_,S);h&&r&&(await this.client.core.pairing.updateMetadata({topic:h,metadata:d.metadata}),await this.sendResult(r,h,{relay:{protocol:i??"irn"},responderPublicKey:_}),await this.client.proposal.delete(r,Gt("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:h}));const L=ir({relay:{protocol:i??"irn"},namespaces:o,requiredNamespaces:v,optionalNamespaces:E,pairingTopic:h,controller:{publicKey:_,metadata:this.client.metadata},expiry:vr(Ya)},c&&{sessionProperties:c});await this.client.core.relayer.subscribe(P),await this.sendRequest(P,"wc_sessionSettle",L);const k=Qu(ir({},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,vr(Ya)),{topic:P,acknowledged:()=>new Promise(q=>q(this.client.session.get(P)))}},this.reject=async n=>{this.isInitialized(),await this.isValidReject(n);const{id:r,reason:i}=n,{pairingTopic:o}=this.client.proposal.get(r);o&&(await this.sendError(r,o,i),await this.client.proposal.delete(r,Gt("USER_DISCONNECTED")))},this.update=async n=>{this.isInitialized(),await this.isValidUpdate(n);const{topic:r,namespaces:i}=n,o=await this.sendRequest(r,"wc_sessionUpdate",{namespaces:i}),{done:c,resolve:l,reject:h}=ws();return this.events.once(Qt("session_update",o),({error:d})=>{d?h(d):l()}),await this.client.session.update(r,{namespaces:i}),{acknowledged:c}},this.extend=async n=>{this.isInitialized(),await this.isValidExtend(n);const{topic:r}=n,i=await this.sendRequest(r,"wc_sessionExtend",{}),{done:o,resolve:c,reject:l}=ws();return this.events.once(Qt("session_extend",i),({error:h})=>{h?l(h):c()}),await this.setExpiry(r,vr(Ya)),{acknowledged:o}},this.request=async n=>{this.isInitialized(),await this.isValidRequest(n);const{chainId:r,request:i,topic:o,expiry:c}=n,l=await this.sendRequest(o,"wc_sessionRequest",{request:i,chainId:r},c),{done:h,resolve:d,reject:v}=ws(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:r,id:l}),await h()},this.respond=async n=>{this.isInitialized(),await this.isValidRespond(n);const{topic:r,response:i}=n,{id:o}=i;kr(i)?await this.sendResult(o,r,i.result):yr(i)&&await this.sendError(o,r,i.error),this.deletePendingSessionRequest(n.response.id,{message:"fulfilled",code:0})},this.ping=async n=>{this.isInitialized(),await this.isValidPing(n);const{topic:r}=n;if(this.client.session.keys.includes(r)){const i=await this.sendRequest(r,"wc_sessionPing",{}),{done:o,resolve:c,reject:l}=ws();this.events.once(Qt("session_ping",i),({error:h})=>{h?l(h):c()}),await o()}else this.client.core.pairing.pairings.keys.includes(r)&&await this.client.core.pairing.ping({topic:r})},this.emit=async n=>{this.isInitialized(),await this.isValidEmit(n);const{topic:r,event:i,chainId:o}=n;await this.sendRequest(r,"wc_sessionEvent",{event:i,chainId:o})},this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:r}=n;this.client.session.keys.includes(r)?(await this.sendRequest(r,"wc_sessionDelete",Gt("USER_DISCONNECTED")),await this.deleteSession(r)):await this.client.core.pairing.disconnect({topic:r})},this.find=n=>(this.isInitialized(),this.client.session.getAll().filter(r=>X5(r,n))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.deleteSession=async(n,r)=>{const{self:i}=this.client.session.get(n);await this.client.core.relayer.unsubscribe(n),await Promise.all([this.client.session.delete(n,Gt("USER_DISCONNECTED")),this.client.core.crypto.deleteKeyPair(i.publicKey),this.client.core.crypto.deleteSymKey(n),r?Promise.resolve():this.client.core.expirer.del(n)])},this.deleteProposal=async(n,r)=>{await Promise.all([this.client.proposal.delete(n,Gt("USER_DISCONNECTED")),r?Promise.resolve():this.client.core.expirer.del(n)])},this.deletePendingSessionRequest=async(n,r,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(n,r),i?Promise.resolve():this.client.core.expirer.del(n)])},this.setExpiry=async(n,r)=>{this.client.session.keys.includes(n)&&await this.client.session.update(n,{expiry:r}),this.client.core.expirer.set(n,r)},this.setProposal=async(n,r)=>{await this.client.proposal.set(n,r),this.client.core.expirer.set(n,r.expiry)},this.setPendingSessionRequest=async n=>{const r=No.wc_sessionRequest.req.ttl,{id:i,topic:o,params:c}=n;await this.client.pendingRequest.set(i,{id:i,topic:o,params:c}),r&&this.client.core.expirer.set(i,vr(r))},this.sendRequest=async(n,r,i,o)=>{const c=qa(r,i);if(gu()&&LE.includes(r)){const d=$i(JSON.stringify(c));await this.client.core.verify.register({attestationId:d})}const l=await this.client.core.crypto.encode(n,c),h=No[r].req;return o&&(h.ttl=o),this.client.core.history.set(n,c),this.client.core.relayer.publish(n,l,h),c.id},this.sendResult=async(n,r,i)=>{const o=Bu(n,i),c=await this.client.core.crypto.encode(r,o),l=await this.client.core.history.get(r,n),h=No[l.request.method].res;this.client.core.relayer.publish(r,c,h),await this.client.core.history.resolve(o)},this.sendError=async(n,r,i)=>{const o=Va(n,i),c=await this.client.core.crypto.encode(r,o),l=await this.client.core.history.get(r,n),h=No[l.request.method].res;this.client.core.relayer.publish(r,c,h),await this.client.core.history.resolve(o)},this.cleanup=async()=>{const n=[],r=[];this.client.session.getAll().forEach(i=>{ri(i.expiry)&&n.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{ri(i.expiry)&&r.push(i.id)}),await Promise.all([...n.map(i=>this.deleteSession(i)),...r.map(i=>this.deleteProposal(i))])},this.onRelayEventRequest=n=>{const{topic:r,payload:i}=n,o=i.method;switch(o){case"wc_sessionPropose":return this.onSessionProposeRequest(r,i);case"wc_sessionSettle":return this.onSessionSettleRequest(r,i);case"wc_sessionUpdate":return this.onSessionUpdateRequest(r,i);case"wc_sessionExtend":return this.onSessionExtendRequest(r,i);case"wc_sessionPing":return this.onSessionPingRequest(r,i);case"wc_sessionDelete":return this.onSessionDeleteRequest(r,i);case"wc_sessionRequest":return this.onSessionRequest(r,i);case"wc_sessionEvent":return this.onSessionEventRequest(r,i);default:return this.client.logger.info(`Unsupported request method ${o}`)}},this.onRelayEventResponse=async n=>{const{topic:r,payload:i}=n,o=(await this.client.core.history.get(r,i.id)).request.method;switch(o){case"wc_sessionPropose":return this.onSessionProposeResponse(r,i);case"wc_sessionSettle":return this.onSessionSettleResponse(r,i);case"wc_sessionUpdate":return this.onSessionUpdateResponse(r,i);case"wc_sessionExtend":return this.onSessionExtendResponse(r,i);case"wc_sessionPing":return this.onSessionPingResponse(r,i);case"wc_sessionRequest":return this.onSessionRequestResponse(r,i);default:return this.client.logger.info(`Unsupported response method ${o}`)}},this.onSessionProposeRequest=async(n,r)=>{const{params:i,id:o}=r;try{this.isValidConnect(ir({},r.params));const c=vr(Ue.FIVE_MINUTES),l=ir({id:o,pairingTopic:n,expiry:c},i);await this.setProposal(o,l);const h=$i(JSON.stringify(r)),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,n,c),this.client.logger.error(c)}},this.onSessionProposeResponse=async(n,r)=>{const{id:i}=r;if(kr(r)){const{result:o}=r;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:n})}else yr(r)&&(await this.client.proposal.delete(i,Gt("USER_DISCONNECTED")),this.events.emit(Qt("session_connect"),{error:r.error}))},this.onSessionSettleRequest=async(n,r)=>{const{id:i,params:o}=r;try{this.isValidSessionSettleRequest(o);const{relay:c,controller:l,expiry:h,namespaces:d,requiredNamespaces:v,optionalNamespaces:E,sessionProperties:_,pairingTopic:S}=r.params,P=ir({topic:n,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(r.id,n,!0),this.events.emit(Qt("session_connect"),{session:P})}catch(c){await this.sendError(i,n,c),this.client.logger.error(c)}},this.onSessionSettleResponse=async(n,r)=>{const{id:i}=r;kr(r)?(await this.client.session.update(n,{acknowledged:!0}),this.events.emit(Qt("session_approve",i),{})):yr(r)&&(await this.client.session.delete(n,Gt("USER_DISCONNECTED")),this.events.emit(Qt("session_approve",i),{error:r.error}))},this.onSessionUpdateRequest=async(n,r)=>{const{params:i,id:o}=r;try{this.isValidUpdate(ir({topic:n},i)),await this.client.session.update(n,{namespaces:i.namespaces}),await this.sendResult(o,n,!0),this.client.events.emit("session_update",{id:o,topic:n,params:i})}catch(c){await this.sendError(o,n,c),this.client.logger.error(c)}},this.onSessionUpdateResponse=(n,r)=>{const{id:i}=r;kr(r)?this.events.emit(Qt("session_update",i),{}):yr(r)&&this.events.emit(Qt("session_update",i),{error:r.error})},this.onSessionExtendRequest=async(n,r)=>{const{id:i}=r;try{this.isValidExtend({topic:n}),await this.setExpiry(n,vr(Ya)),await this.sendResult(i,n,!0),this.client.events.emit("session_extend",{id:i,topic:n})}catch(o){await this.sendError(i,n,o),this.client.logger.error(o)}},this.onSessionExtendResponse=(n,r)=>{const{id:i}=r;kr(r)?this.events.emit(Qt("session_extend",i),{}):yr(r)&&this.events.emit(Qt("session_extend",i),{error:r.error})},this.onSessionPingRequest=async(n,r)=>{const{id:i}=r;try{this.isValidPing({topic:n}),await this.sendResult(i,n,!0),this.client.events.emit("session_ping",{id:i,topic:n})}catch(o){await this.sendError(i,n,o),this.client.logger.error(o)}},this.onSessionPingResponse=(n,r)=>{const{id:i}=r;setTimeout(()=>{kr(r)?this.events.emit(Qt("session_ping",i),{}):yr(r)&&this.events.emit(Qt("session_ping",i),{error:r.error})},500)},this.onSessionDeleteRequest=async(n,r)=>{const{id:i}=r;try{this.isValidDisconnect({topic:n,reason:r.params}),await Promise.all([new Promise(o=>{this.client.core.relayer.once(mn.publish,async()=>{o(await this.deleteSession(n))})}),this.sendResult(i,n,!0)]),this.client.events.emit("session_delete",{id:i,topic:n})}catch(o){await this.sendError(i,n,o),this.client.logger.error(o)}},this.onSessionRequest=async(n,r)=>{const{id:i,params:o}=r;try{this.isValidRequest(ir({topic:n},o)),await this.setPendingSessionRequest({id:i,topic:n,params:o});const c=$i(JSON.stringify(r)),l=this.client.session.get(n),h=await this.getVerifyContext(c,l.peer.metadata);this.client.events.emit("session_request",{id:i,topic:n,params:o,context:h})}catch(c){await this.sendError(i,n,c),this.client.logger.error(c)}},this.onSessionRequestResponse=(n,r)=>{const{id:i}=r;kr(r)?this.events.emit(Qt("session_request",i),{result:r.result}):yr(r)&&this.events.emit(Qt("session_request",i),{error:r.error})},this.onSessionEventRequest=async(n,r)=>{const{id:i,params:o}=r;try{this.isValidEmit(ir({topic:n},o)),this.client.events.emit("session_event",{id:i,topic:n,params:o})}catch(c){await this.sendError(i,n,c),this.client.logger.error(c)}},this.isValidConnect=async n=>{if(!Bn(n)){const{message:h}=Ee("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(n)}`);throw new Error(h)}const{pairingTopic:r,requiredNamespaces:i,optionalNamespaces:o,sessionProperties:c,relays:l}=n;if(An(r)||await this.isValidPairingTopic(r),!ub(l,!0)){const{message:h}=Ee("MISSING_OR_INVALID",`connect() relays: ${l}`);throw new Error(h)}!An(i)&&ys(i)!==0&&this.validateNamespaces(i,"requiredNamespaces"),!An(o)&&ys(o)!==0&&this.validateNamespaces(o,"optionalNamespaces"),An(c)||this.validateSessionProps(c,"sessionProperties")},this.validateNamespaces=(n,r)=>{const i=lb(n,"connect()",r);if(i)throw new Error(i.message)},this.isValidApprove=async n=>{if(!Bn(n))throw new Error(Ee("MISSING_OR_INVALID",`approve() params: ${n}`).message);const{id:r,namespaces:i,relayProtocol:o,sessionProperties:c}=n;await this.isValidProposalId(r);const l=this.client.proposal.get(r),h=ka(i,"approve()");if(h)throw new Error(h.message);const d=x1(l.requiredNamespaces,i,"approve()");if(d)throw new Error(d.message);if(!gn(o,!0)){const{message:v}=Ee("MISSING_OR_INVALID",`approve() relayProtocol: ${o}`);throw new Error(v)}An(c)||this.validateSessionProps(c,"sessionProperties")},this.isValidReject=async n=>{if(!Bn(n)){const{message:o}=Ee("MISSING_OR_INVALID",`reject() params: ${n}`);throw new Error(o)}const{id:r,reason:i}=n;if(await this.isValidProposalId(r),!fb(i)){const{message:o}=Ee("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(o)}},this.isValidSessionSettleRequest=n=>{if(!Bn(n)){const{message:d}=Ee("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${n}`);throw new Error(d)}const{relay:r,controller:i,namespaces:o,expiry:c}=n;if(!_1(r)){const{message:d}=Ee("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(d)}const l=rb(i,"onSessionSettleRequest()");if(l)throw new Error(l.message);const h=ka(o,"onSessionSettleRequest()");if(h)throw new Error(h.message);if(ri(c)){const{message:d}=Ee("EXPIRED","onSessionSettleRequest()");throw new Error(d)}},this.isValidUpdate=async n=>{if(!Bn(n)){const{message:h}=Ee("MISSING_OR_INVALID",`update() params: ${n}`);throw new Error(h)}const{topic:r,namespaces:i}=n;await this.isValidSessionTopic(r);const o=this.client.session.get(r),c=ka(i,"update()");if(c)throw new Error(c.message);const l=x1(o.requiredNamespaces,i,"update()");if(l)throw new Error(l.message)},this.isValidExtend=async n=>{if(!Bn(n)){const{message:i}=Ee("MISSING_OR_INVALID",`extend() params: ${n}`);throw new Error(i)}const{topic:r}=n;await this.isValidSessionTopic(r)},this.isValidRequest=async n=>{if(!Bn(n)){const{message:h}=Ee("MISSING_OR_INVALID",`request() params: ${n}`);throw new Error(h)}const{topic:r,request:i,chainId:o,expiry:c}=n;await this.isValidSessionTopic(r);const{namespaces:l}=this.client.session.get(r);if(!E1(l,o)){const{message:h}=Ee("MISSING_OR_INVALID",`request() chainId: ${o}`);throw new Error(h)}if(!db(i)){const{message:h}=Ee("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(h)}if(!mb(l,o,i.method)){const{message:h}=Ee("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(h)}if(c&&!bb(c,Xu)){const{message:h}=Ee("MISSING_OR_INVALID",`request() expiry: ${c}. Expiry must be a number (in seconds) between ${Xu.min} and ${Xu.max}`);throw new Error(h)}},this.isValidRespond=async n=>{if(!Bn(n)){const{message:o}=Ee("MISSING_OR_INVALID",`respond() params: ${n}`);throw new Error(o)}const{topic:r,response:i}=n;if(await this.isValidSessionTopic(r),!pb(i)){const{message:o}=Ee("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(i)}`);throw new Error(o)}},this.isValidPing=async n=>{if(!Bn(n)){const{message:i}=Ee("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(i)}const{topic:r}=n;await this.isValidSessionOrPairingTopic(r)},this.isValidEmit=async n=>{if(!Bn(n)){const{message:l}=Ee("MISSING_OR_INVALID",`emit() params: ${n}`);throw new Error(l)}const{topic:r,event:i,chainId:o}=n;await this.isValidSessionTopic(r);const{namespaces:c}=this.client.session.get(r);if(!E1(c,o)){const{message:l}=Ee("MISSING_OR_INVALID",`emit() chainId: ${o}`);throw new Error(l)}if(!gb(i)){const{message:l}=Ee("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(l)}if(!wb(c,o,i.name)){const{message:l}=Ee("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(l)}},this.isValidDisconnect=async n=>{if(!Bn(n)){const{message:i}=Ee("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(i)}const{topic:r}=n;await this.isValidSessionOrPairingTopic(r)},this.getVerifyContext=async(n,r)=>{const i={verified:{verifyUrl:r.verifyUrl||"",validation:"UNKNOWN",origin:r.url||""}},o=await this.client.core.verify.resolve({attestationId:n,verifyUrl:r.verifyUrl});return i.verified.origin=o,i.verified.validation=o===r.url?"VALID":"INVALID",this.client.logger.info(`Verify context: ${JSON.stringify(i)}`),i},this.validateSessionProps=(n,r)=>{Object.values(n).forEach(i=>{if(!gn(i,!1)){const{message:o}=Ee("MISSING_OR_INVALID",`${r} 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(mn.message,async e=>{const{topic:n,message:r}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(r)))return;const i=await this.client.core.crypto.decode(n,r);ku(i)?(this.client.core.history.set(n,i),this.onRelayEventRequest({topic:n,payload:i})):Hu(i)&&(await this.client.core.history.resolve(i),this.onRelayEventResponse({topic:n,payload:i}))})}registerExpirerEvents(){this.client.core.expirer.on(rr.expired,async e=>{const{topic:n,id:r}=g1(e.target);if(r&&this.client.pendingRequest.keys.includes(r))return await this.deletePendingSessionRequest(r,Ee("EXPIRED"),!0);n?this.client.session.keys.includes(n)&&(await this.deleteSession(n,!0),this.client.events.emit("session_expire",{topic:n})):r&&(await this.deleteProposal(r,!0),this.client.events.emit("proposal_expire",{id:r}))})}isValidPairingTopic(e){if(!gn(e,!1)){const{message:n}=Ee("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(n)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:n}=Ee("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(n)}if(ri(this.client.core.pairing.pairings.get(e).expiry)){const{message:n}=Ee("EXPIRED",`pairing topic: ${e}`);throw new Error(n)}}async isValidSessionTopic(e){if(!gn(e,!1)){const{message:n}=Ee("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(n)}if(!this.client.session.keys.includes(e)){const{message:n}=Ee("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(n)}if(ri(this.client.session.get(e).expiry)){await this.deleteSession(e);const{message:n}=Ee("EXPIRED",`session topic: ${e}`);throw new Error(n)}}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(gn(e,!1)){const{message:n}=Ee("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(n)}else{const{message:n}=Ee("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(n)}}async isValidProposalId(e){if(!hb(e)){const{message:n}=Ee("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(n)}if(!this.client.proposal.keys.includes(e)){const{message:n}=Ee("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(n)}if(ri(this.client.proposal.get(e).expiry)){await this.deleteProposal(e);const{message:n}=Ee("EXPIRED",`proposal id: ${e}`);throw new Error(n)}}}class zE extends Za{constructor(e,n){super(e,n,TE,Yu),this.core=e,this.logger=n}}class WE extends Za{constructor(e,n){super(e,n,NE,Yu),this.core=e,this.logger=n}}class qE extends Za{constructor(e,n){super(e,n,ME,Yu,r=>r.id),this.core=e,this.logger=n}}class eh extends e4{constructor(e){super(e),this.protocol=Kp,this.version=Gp,this.name=Ju.name,this.events=new yn.exports.EventEmitter,this.on=(r,i)=>this.events.on(r,i),this.once=(r,i)=>this.events.once(r,i),this.off=(r,i)=>this.events.off(r,i),this.removeListener=(r,i)=>this.events.removeListener(r,i),this.removeAllListeners=r=>this.events.removeAllListeners(r),this.connect=async r=>{try{return await this.engine.connect(r)}catch(i){throw this.logger.error(i.message),i}},this.pair=async r=>{try{return await this.engine.pair(r)}catch(i){throw this.logger.error(i.message),i}},this.approve=async r=>{try{return await this.engine.approve(r)}catch(i){throw this.logger.error(i.message),i}},this.reject=async r=>{try{return await this.engine.reject(r)}catch(i){throw this.logger.error(i.message),i}},this.update=async r=>{try{return await this.engine.update(r)}catch(i){throw this.logger.error(i.message),i}},this.extend=async r=>{try{return await this.engine.extend(r)}catch(i){throw this.logger.error(i.message),i}},this.request=async r=>{try{return await this.engine.request(r)}catch(i){throw this.logger.error(i.message),i}},this.respond=async r=>{try{return await this.engine.respond(r)}catch(i){throw this.logger.error(i.message),i}},this.ping=async r=>{try{return await this.engine.ping(r)}catch(i){throw this.logger.error(i.message),i}},this.emit=async r=>{try{return await this.engine.emit(r)}catch(i){throw this.logger.error(i.message),i}},this.disconnect=async r=>{try{return await this.engine.disconnect(r)}catch(i){throw this.logger.error(i.message),i}},this.find=r=>{try{return this.engine.find(r)}catch(i){throw this.logger.error(i.message),i}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(r){throw this.logger.error(r.message),r}},this.name=e?.name||Ju.name,this.metadata=e?.metadata||$5();const n=typeof e?.logger<"u"&&typeof e?.logger!="string"?e.logger:pt.pino(pt.getDefaultLoggerOptions({level:e?.logger||Ju.logger}));this.core=e?.core||new PE(e),this.logger=pt.generateChildLogger(n,this.name),this.session=new WE(this.core,this.logger),this.proposal=new zE(this.core,this.logger),this.pendingRequest=new qE(this.core,this.logger),this.engine=new HE(this)}static async init(e){const n=new eh(e);return await n.initialize(),n}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 th={exports:{}};(function(t,e){var n=typeof self<"u"?self:pn,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,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 N(){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("="),ne=le.shift().replace(/\+/g," "),re=le.join("=").replace(/\+/g," ");U.append(decodeURIComponent(ne),decodeURIComponent(re))}}),U}function z(D){var U=new P,ae=D.replace(/\r?\n[\t ]+/g," ");return ae.split(/\r?\n/).forEach(function(le){var ne=le.split(":"),re=ne.shift().trim();if(re){var oe=ne.join(":").trim();U.append(re,oe)}}),U}N.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)}N.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 ne=new x(D,U);if(ne.signal&&ne.signal.aborted)return le(new c.DOMException("Aborted","AbortError"));var re=new XMLHttpRequest;function oe(){re.abort()}re.onload=function(){var ie={status:re.status,statusText:re.statusText,headers:z(re.getAllResponseHeaders()||"")};ie.url="responseURL"in re?re.responseURL:ie.headers.get("X-Request-URL");var Se="response"in re?re.response:re.responseText;ae(new ee(Se,ie))},re.onerror=function(){le(new TypeError("Network request failed"))},re.ontimeout=function(){le(new TypeError("Network request failed"))},re.onabort=function(){le(new c.DOMException("Aborted","AbortError"))},re.open(ne.method,ne.url,!0),ne.credentials==="include"?re.withCredentials=!0:ne.credentials==="omit"&&(re.withCredentials=!1),"responseType"in re&&l.blob&&(re.responseType="blob"),ne.headers.forEach(function(ie,Se){re.setRequestHeader(Se,ie)}),ne.signal&&(ne.signal.addEventListener("abort",oe),re.onreadystatechange=function(){re.readyState===4&&ne.signal.removeEventListener("abort",oe)}),re.send(typeof ne._bodyInit>"u"?null:ne._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})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;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})(th,th.exports);var Qp=qm(th.exports);const eg={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"},tg=10;class Mi{constructor(e){if(this.url=e,this.events=new yn.exports.EventEmitter,this.isAvailable=!1,this.registering=!1,!lp(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,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}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,n){this.isAvailable||await this.register();try{const r=Do(e),o=await(await Qp(this.url,Object.assign(Object.assign({},eg),{body:r}))).json();this.onPayload({data:o})}catch(r){this.onError(e.id,r)}}async register(e=this.url){if(!lp(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const n=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=n||this.events.listenerCount("open")>=n)&&this.events.setMaxListeners(n+1),new Promise((r,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"));r()})})}this.url=e,this.registering=!0;try{const n=Do({id:1,jsonrpc:"2.0",method:"test",params:[]});await Qp(e,Object.assign(Object.assign({},eg),{body:n})),this.onOpen()}catch(n){const r=this.parseError(n);throw this.events.emit("register_error",r),this.onClose(),r}}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 n=typeof e.data=="string"?Ru(e.data):e.data;this.events.emit("payload",n)}onError(e,n){const r=this.parseError(n),i=r.message||r.toString(),o=Va(e,i);this.events.emit("payload",o)}parseError(e,n=this.url){return np(e,n,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>tg&&this.events.setMaxListeners(tg)}}const ng="error",VE="wss://relay.walletconnect.com",KE="wc",GE="universal_provider",rg=`${KE}@${2}:${GE}:`,ZE="https://rpc.walletconnect.com/v1",oi={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var Ro=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},nh={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 n,r="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,ne=9007199254740991,re=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]",Le="[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,Nn=/\b(__p \+=) '' \+/g,Wr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,fi=/&(?:amp|lt|gt|quot|#39);/g,Yi=/[&<>"']/g,kt=RegExp(fi.source),Mt=RegExp(Yi.source),Ht=/<%-([\s\S]+?)%>/g,zt=/<%([\s\S]+?)%>/g,Ut=/<%=([\s\S]+?)%>/g,Lt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,en=/^\w*$/,tn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Wt=/[\\^$.*+?()[\]{}|]/g,nn=RegExp(Wt.source),qt=/^\s+/,Zt=/\s/,Vt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Pt=/\{\n\/\* \[wrapped with (.+)\] \*/,rn=/,? & /,sn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,b0=/[()=,{}\[\]\/\s]/,_0=/\\(\\)?/g,E0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ar=/\w*$/,x0=/^[-+]0x[0-9a-f]+$/i,C0=/^0b[01]+$/i,I0=/^\[object .+?Constructor\]$/,S0=/^0o[0-7]+$/i,D0=/^(?:0|[1-9]\d*)$/,qr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ks=/($^)/,O0=/['\n\r\u2028\u2029\\]/g,Hs="\\ud800-\\udfff",A0="\\u0300-\\u036f",$0="\\ufe20-\\ufe2f",zs="\\u20d0-\\u20ff",jc=A0+$0+zs,Uc="\\u2700-\\u27bf",vr="a-z\\xdf-\\xf6\\xf8-\\xff",P0="\\xac\\xb1\\xd7\\xf7",T0="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",R0="\\u2000-\\u206f",N0=" \\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",Ji=P0+T0+R0+N0,oa="['\u2019]",Xi="["+Hs+"]",aa="["+Ji+"]",Qi="["+jc+"]",kc="\\d+",M0="["+Uc+"]",Hc="["+vr+"]",zc="[^"+Hs+Ji+kc+Uc+vr+Fc+"]",Ws="\\ud83c[\\udffb-\\udfff]",L0="(?:"+Qi+"|"+Ws+")",Wc="[^"+Hs+"]",qs="(?:\\ud83c[\\udde6-\\uddff]){2}",di="[\\ud800-\\udbff][\\udc00-\\udfff]",Jn="["+Fc+"]",qc="\\u200d",Vc="(?:"+Hc+"|"+zc+")",Rr="(?:"+Jn+"|"+zc+")",Kc="(?:"+oa+"(?:d|ll|m|re|s|t|ve))?",Gc="(?:"+oa+"(?:D|LL|M|RE|S|T|VE))?",Zc=L0+"?",Yc="["+Bc+"]?",j0="(?:"+qc+"(?:"+[Wc,qs,di].join("|")+")"+Yc+Zc+")*",Vr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Jc="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Xc=Yc+Zc+j0,Vs="(?:"+[M0,qs,di].join("|")+")"+Xc,U0="(?:"+[Wc+Qi+"?",Qi,qs,di,Xi].join("|")+")",ca=RegExp(oa,"g"),F0=RegExp(Qi,"g"),Ks=RegExp(Ws+"(?="+Ws+")|"+U0+Xc,"g"),Qc=RegExp([Jn+"?"+Hc+"+"+Kc+"(?="+[aa,Jn,"$"].join("|")+")",Rr+"+"+Gc+"(?="+[aa,Jn+Vc,"$"].join("|")+")",Jn+"?"+Vc+"+"+Kc,Jn+"+"+Gc,Jc,Vr,kc,Vs].join("|"),"g"),el=RegExp("["+qc+Hs+jc+Bc+"]"),es=/[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"],B0=-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[Le]=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[Le]=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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},fe={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Ce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},It=parseFloat,Je=parseInt,Tt=typeof Ro=="object"&&Ro&&Ro.Object===Object&&Ro,on=typeof self=="object"&&self&&self.Object===Object&&self,pt=Tt||on||Function("return this")(),St=e&&!e.nodeType&&e,Yt=St&&!0&&t&&!t.nodeType&&t,zn=Yt&&Yt.exports===St,an=zn&&Tt.process,Rt=function(){try{var K=Yt&&Yt.require&&Yt.require("util").types;return K||an&&an.binding&&an.binding("util")}catch{}}(),Mn=Rt&&Rt.isArrayBuffer,yr=Rt&&Rt.isDate,cr=Rt&&Rt.isMap,Nr=Rt&&Rt.isRegExp,la=Rt&&Rt.isSet,ts=Rt&&Rt.isTypedArray;function wn(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 uD(K,se,te,Ie){for(var Ke=-1,vt=K==null?0:K.length;++Ke<vt;){var fn=K[Ke];se(Ie,fn,te(fn),K)}return Ie}function lr(K,se){for(var te=-1,Ie=K==null?0:K.length;++te<Ie&&se(K[te],te,K)!==!1;);return K}function hD(K,se){for(var te=K==null?0:K.length;te--&&se(K[te],te,K)!==!1;);return K}function z3(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 pi(K,se){for(var te=-1,Ie=K==null?0:K.length,Ke=0,vt=[];++te<Ie;){var fn=K[te];se(fn,te,K)&&(vt[Ke++]=fn)}return vt}function nl(K,se){var te=K==null?0:K.length;return!!te&&Gs(K,se,0)>-1}function k0(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 gi(K,se){for(var te=-1,Ie=se.length,Ke=K.length;++te<Ie;)K[Ke+te]=se[te];return K}function H0(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 fD(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 z0(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 dD=W0("length");function pD(K){return K.split("")}function gD(K){return K.match(sn)||[]}function W3(K,se,te){var Ie;return te(K,function(Ke,vt,fn){if(se(Ke,vt,fn))return Ie=vt,!1}),Ie}function rl(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 Gs(K,se,te){return se===se?DD(K,se,te):rl(K,q3,te)}function mD(K,se,te,Ie){for(var Ke=te-1,vt=K.length;++Ke<vt;)if(Ie(K[Ke],se))return Ke;return-1}function q3(K){return K!==K}function V3(K,se){var te=K==null?0:K.length;return te?V0(K,se)/te:oe}function W0(K){return function(se){return se==null?n:se[K]}}function q0(K){return function(se){return K==null?n:K[se]}}function K3(K,se,te,Ie,Ke){return Ke(K,function(vt,fn,Dt){te=Ie?(Ie=!1,vt):se(te,vt,fn,Dt)}),te}function wD(K,se){var te=K.length;for(K.sort(se);te--;)K[te]=K[te].value;return K}function V0(K,se){for(var te,Ie=-1,Ke=K.length;++Ie<Ke;){var vt=se(K[Ie]);vt!==n&&(te=te===n?vt:te+vt)}return te}function K0(K,se){for(var te=-1,Ie=Array(K);++te<K;)Ie[te]=se(te);return Ie}function vD(K,se){return jt(se,function(te){return[te,K[te]]})}function G3(K){return K&&K.slice(0,X3(K)+1).replace(qt,"")}function Xn(K){return function(se){return K(se)}}function G0(K,se){return jt(se,function(te){return K[te]})}function ua(K,se){return K.has(se)}function Z3(K,se){for(var te=-1,Ie=K.length;++te<Ie&&Gs(se,K[te],0)>-1;);return te}function Y3(K,se){for(var te=K.length;te--&&Gs(se,K[te],0)>-1;);return te}function yD(K,se){for(var te=K.length,Ie=0;te--;)K[te]===se&&++Ie;return Ie}var bD=q0(N),_D=q0(V);function ED(K){return"\\"+Ce[K]}function xD(K,se){return K==null?n:K[se]}function Zs(K){return el.test(K)}function CD(K){return es.test(K)}function ID(K){for(var se,te=[];!(se=K.next()).done;)te.push(se.value);return te}function Z0(K){var se=-1,te=Array(K.size);return K.forEach(function(Ie,Ke){te[++se]=[Ke,Ie]}),te}function J3(K,se){return function(te){return K(se(te))}}function mi(K,se){for(var te=-1,Ie=K.length,Ke=0,vt=[];++te<Ie;){var fn=K[te];(fn===se||fn===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 SD(K){var se=-1,te=Array(K.size);return K.forEach(function(Ie){te[++se]=[Ie,Ie]}),te}function DD(K,se,te){for(var Ie=te-1,Ke=K.length;++Ie<Ke;)if(K[Ie]===se)return Ie;return-1}function OD(K,se,te){for(var Ie=te+1;Ie--;)if(K[Ie]===se)return Ie;return Ie}function Ys(K){return Zs(K)?$D(K):dD(K)}function br(K){return Zs(K)?PD(K):pD(K)}function X3(K){for(var se=K.length;se--&&Zt.test(K.charAt(se)););return se}var AD=q0(fe);function $D(K){for(var se=Ks.lastIndex=0;Ks.test(K);)++se;return se}function PD(K){return K.match(Ks)||[]}function TD(K){return K.match(Qc)||[]}var RD=function K(se){se=se==null?pt:Js.defaults(pt.Object(),se,Js.pick(pt,tl));var te=se.Array,Ie=se.Date,Ke=se.Error,vt=se.Function,fn=se.Math,Dt=se.Object,Y0=se.RegExp,ND=se.String,ur=se.TypeError,sl=te.prototype,MD=vt.prototype,Xs=Dt.prototype,ol=se["__core-js_shared__"],al=MD.toString,bt=Xs.hasOwnProperty,LD=0,Q3=function(){var s=/[^.]+$/.exec(ol&&ol.keys&&ol.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),cl=Xs.toString,jD=al.call(Dt),UD=pt._,FD=Y0("^"+al.call(bt).replace(Wt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ll=zn?se.Buffer:n,wi=se.Symbol,ul=se.Uint8Array,e2=ll?ll.allocUnsafe:n,hl=J3(Dt.getPrototypeOf,Dt),t2=Dt.create,n2=Xs.propertyIsEnumerable,fl=sl.splice,r2=wi?wi.isConcatSpreadable:n,ha=wi?wi.iterator:n,ns=wi?wi.toStringTag:n,dl=function(){try{var s=as(Dt,"defineProperty");return s({},"",{}),s}catch{}}(),BD=se.clearTimeout!==pt.clearTimeout&&se.clearTimeout,kD=Ie&&Ie.now!==pt.Date.now&&Ie.now,HD=se.setTimeout!==pt.setTimeout&&se.setTimeout,pl=fn.ceil,gl=fn.floor,J0=Dt.getOwnPropertySymbols,zD=ll?ll.isBuffer:n,i2=se.isFinite,WD=sl.join,qD=J3(Dt.keys,Dt),dn=fn.max,In=fn.min,VD=Ie.now,KD=se.parseInt,s2=fn.random,GD=sl.reverse,X0=as(se,"DataView"),fa=as(se,"Map"),Q0=as(se,"Promise"),Qs=as(se,"Set"),da=as(se,"WeakMap"),pa=as(Dt,"create"),ml=da&&new da,eo={},ZD=cs(X0),YD=cs(fa),JD=cs(Q0),XD=cs(Qs),QD=cs(da),wl=wi?wi.prototype:n,ga=wl?wl.valueOf:n,o2=wl?wl.toString:n;function I(s){if(Kt(s)&&!Xe(s)&&!(s instanceof dt)){if(s instanceof hr)return s;if(bt.call(s,"__wrapped__"))return am(s)}return new hr(s)}var to=function(){function s(){}return function(a){if(!Ft(a))return{};if(t2)return t2(a);s.prototype=a;var u=new s;return s.prototype=n,u}}();function vl(){}function hr(s,a){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=n}I.templateSettings={escape:Ht,evaluate:zt,interpolate:Ut,variable:"",imports:{_:I}},I.prototype=vl.prototype,I.prototype.constructor=I,hr.prototype=to(vl.prototype),hr.prototype.constructor=hr;function dt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ie,this.__views__=[]}function eO(){var s=new dt(this.__wrapped__);return s.__actions__=Wn(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Wn(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Wn(this.__views__),s}function tO(){if(this.__filtered__){var s=new dt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function nO(){var s=this.__wrapped__.value(),a=this.__dir__,u=Xe(s),g=a<0,y=u?s.length:0,O=pA(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=In(Z,this.__takeCount__);if(!u||!g&&y==Z&&De==Z)return $2(s,this.__actions__);var Ue=[];e:for(;Z--&&_e<De;){ue+=a;for(var st=-1,Fe=s[ue];++st<pe;){var ht=he[st],gt=ht.iteratee,tr=ht.type,Un=gt(Fe);if(tr==U)Fe=Un;else if(!Un){if(tr==D)continue e;break e}}Ue[_e++]=Fe}return Ue}dt.prototype=to(vl.prototype),dt.prototype.constructor=dt;function rs(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 rO(){this.__data__=pa?pa(null):{},this.size=0}function iO(s){var a=this.has(s)&&delete this.__data__[s];return this.size-=a?1:0,a}function sO(s){var a=this.__data__;if(pa){var u=a[s];return u===h?n:u}return bt.call(a,s)?a[s]:n}function oO(s){var a=this.__data__;return pa?a[s]!==n:bt.call(a,s)}function aO(s,a){var u=this.__data__;return this.size+=this.has(s)?0:1,u[s]=pa&&a===n?h:a,this}rs.prototype.clear=rO,rs.prototype.delete=iO,rs.prototype.get=sO,rs.prototype.has=oO,rs.prototype.set=aO;function Kr(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 cO(){this.__data__=[],this.size=0}function lO(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 uO(s){var a=this.__data__,u=yl(a,s);return u<0?n:a[u][1]}function hO(s){return yl(this.__data__,s)>-1}function fO(s,a){var u=this.__data__,g=yl(u,s);return g<0?(++this.size,u.push([s,a])):u[g][1]=a,this}Kr.prototype.clear=cO,Kr.prototype.delete=lO,Kr.prototype.get=uO,Kr.prototype.has=hO,Kr.prototype.set=fO;function Gr(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 dO(){this.size=0,this.__data__={hash:new rs,map:new(fa||Kr),string:new rs}}function pO(s){var a=Pl(this,s).delete(s);return this.size-=a?1:0,a}function gO(s){return Pl(this,s).get(s)}function mO(s){return Pl(this,s).has(s)}function wO(s,a){var u=Pl(this,s),g=u.size;return u.set(s,a),this.size+=u.size==g?0:1,this}Gr.prototype.clear=dO,Gr.prototype.delete=pO,Gr.prototype.get=gO,Gr.prototype.has=mO,Gr.prototype.set=wO;function is(s){var a=-1,u=s==null?0:s.length;for(this.__data__=new Gr;++a<u;)this.add(s[a])}function vO(s){return this.__data__.set(s,h),this}function yO(s){return this.__data__.has(s)}is.prototype.add=is.prototype.push=vO,is.prototype.has=yO;function _r(s){var a=this.__data__=new Kr(s);this.size=a.size}function bO(){this.__data__=new Kr,this.size=0}function _O(s){var a=this.__data__,u=a.delete(s);return this.size=a.size,u}function EO(s){return this.__data__.get(s)}function xO(s){return this.__data__.has(s)}function CO(s,a){var u=this.__data__;if(u instanceof Kr){var g=u.__data__;if(!fa||g.length<i-1)return g.push([s,a]),this.size=++u.size,this;u=this.__data__=new Gr(g)}return u.set(s,a),this.size=u.size,this}_r.prototype.clear=bO,_r.prototype.delete=_O,_r.prototype.get=EO,_r.prototype.has=xO,_r.prototype.set=CO;function a2(s,a){var u=Xe(s),g=!u&&ls(s),y=!u&&!g&&Ei(s),O=!u&&!g&&!y&&so(s),j=u||g||y||O,H=j?K0(s.length,ND):[],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")||Xr(ue,Z)))&&H.push(ue);return H}function c2(s){var a=s.length;return a?s[hf(0,a-1)]:n}function IO(s,a){return Tl(Wn(s),ss(a,0,s.length))}function SO(s){return Tl(Wn(s))}function ef(s,a,u){(u!==n&&!Er(s[a],u)||u===n&&!(a in s))&&Zr(s,a,u)}function ma(s,a,u){var g=s[a];(!(bt.call(s,a)&&Er(g,u))||u===n&&!(a in s))&&Zr(s,a,u)}function yl(s,a){for(var u=s.length;u--;)if(Er(s[u][0],a))return u;return-1}function DO(s,a,u,g){return vi(s,function(y,O,j){a(g,y,u(y),j)}),g}function l2(s,a){return s&&Lr(a,vn(a),s)}function OO(s,a){return s&&Lr(a,Vn(a),s)}function Zr(s,a,u){a=="__proto__"&&dl?dl(s,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):s[a]=u}function tf(s,a){for(var u=-1,g=a.length,y=te(g),O=s==null;++u<g;)y[u]=O?n:Lf(s,a[u]);return y}function ss(s,a,u){return s===s&&(u!==n&&(s=s<=u?s:u),a!==n&&(s=s>=a?s:a)),s}function fr(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!==n)return j;if(!Ft(s))return s;var he=Xe(s);if(he){if(j=mA(s),!H)return Wn(s,j)}else{var pe=Sn(s),_e=pe==we||pe==ve;if(Ei(s))return R2(s,H);if(pe==qe||pe==be||_e&&!y){if(j=Z||_e?{}:X2(s),!H)return Z?sA(s,OO(j,s)):iA(s,l2(j,s))}else{if(!xt[pe])return y?s:{};j=wA(s,pe,H)}}O||(O=new _r);var De=O.get(s);if(De)return De;O.set(s,j),Dm(s)?s.forEach(function(Fe){j.add(fr(Fe,a,u,Fe,s,O))}):Im(s)&&s.forEach(function(Fe,ht){j.set(ht,fr(Fe,a,u,ht,s,O))});var Ue=ue?Z?Ef:_f:Z?Vn:vn,st=he?n:Ue(s);return lr(st||s,function(Fe,ht){st&&(ht=Fe,Fe=s[ht]),ma(j,ht,fr(Fe,a,u,ht,s,O))}),j}function AO(s){var a=vn(s);return function(u){return u2(u,s,a)}}function u2(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===n&&!(y in s)||!O(j))return!1}return!0}function h2(s,a,u){if(typeof s!="function")throw new ur(c);return xa(function(){s.apply(n,u)},a)}function wa(s,a,u,g){var y=-1,O=nl,j=!0,H=s.length,Z=[],ue=a.length;if(!H)return Z;u&&(a=jt(a,Xn(u))),g?(O=k0,j=!1):a.length>=i&&(O=ua,j=!1,a=new is(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 vi=U2(Mr),f2=U2(rf,!0);function $O(s,a){var u=!0;return vi(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===n?j===j&&!er(j):u(j,H)))var H=j,Z=O}return Z}function PO(s,a,u,g){var y=s.length;for(u=nt(u),u<0&&(u=-u>y?0:y+u),g=g===n||g>y?y:nt(g),g<0&&(g+=y),g=u>g?0:Am(g);u<g;)s[u++]=a;return s}function d2(s,a){var u=[];return vi(s,function(g,y,O){a(g,y,O)&&u.push(g)}),u}function En(s,a,u,g,y){var O=-1,j=s.length;for(u||(u=yA),y||(y=[]);++O<j;){var H=s[O];a>0&&u(H)?a>1?En(H,a-1,u,g,y):gi(y,H):g||(y[y.length]=H)}return y}var nf=F2(),p2=F2(!0);function Mr(s,a){return s&&nf(s,a,vn)}function rf(s,a){return s&&p2(s,a,vn)}function _l(s,a){return pi(a,function(u){return Qr(s[u])})}function os(s,a){a=bi(a,s);for(var u=0,g=a.length;s!=null&&u<g;)s=s[jr(a[u++])];return u&&u==g?s:n}function g2(s,a,u){var g=a(s);return Xe(s)?g:gi(g,u(s))}function Ln(s){return s==null?s===n?et:ot:ns&&ns in Dt(s)?dA(s):SA(s)}function sf(s,a){return s>a}function TO(s,a){return s!=null&&bt.call(s,a)}function RO(s,a){return s!=null&&a in Dt(s)}function NO(s,a,u){return s>=In(a,u)&&s<dn(a,u)}function of(s,a,u){for(var g=u?k0:nl,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,Xn(a))),Z=In(he.length,Z),H[j]=!u&&(a||y>=120&&he.length>=120)?new is(j&&he):n}he=s[0];var pe=-1,_e=H[0];e:for(;++pe<y&&ue.length<Z;){var De=he[pe],Ue=a?a(De):De;if(De=u||De!==0?De:0,!(_e?ua(_e,Ue):g(ue,Ue,u))){for(j=O;--j;){var st=H[j];if(!(st?ua(st,Ue):g(s[j],Ue,u)))continue e}_e&&_e.push(Ue),ue.push(De)}}return ue}function MO(s,a,u,g){return Mr(s,function(y,O,j){a(g,u(y),O,j)}),g}function va(s,a,u){a=bi(a,s),s=nm(s,a);var g=s==null?s:s[jr(pr(a))];return g==null?n:wn(g,s,u)}function m2(s){return Kt(s)&&Ln(s)==be}function LO(s){return Kt(s)&&Ln(s)==b}function jO(s){return Kt(s)&&Ln(s)==W}function ya(s,a,u,g,y){return s===a?!0:s==null||a==null||!Kt(s)&&!Kt(a)?s!==s&&a!==a:UO(s,a,u,g,ya,y)}function UO(s,a,u,g,y,O){var j=Xe(s),H=Xe(a),Z=j?Ae:Sn(s),ue=H?Ae:Sn(a);Z=Z==be?qe:Z,ue=ue==be?qe:ue;var he=Z==qe,pe=ue==qe,_e=Z==ue;if(_e&&Ei(s)){if(!Ei(a))return!1;j=!0,he=!1}if(_e&&!he)return O||(O=new _r),j||so(s)?Z2(s,a,u,g,y,O):hA(s,a,Z,u,g,y,O);if(!(u&P)){var De=he&&bt.call(s,"__wrapped__"),Ue=pe&&bt.call(a,"__wrapped__");if(De||Ue){var st=De?s.value():s,Fe=Ue?a.value():a;return O||(O=new _r),y(st,Fe,u,g,O)}}return _e?(O||(O=new _r),fA(s,a,u,g,y,O)):!1}function FO(s){return Kt(s)&&Sn(s)==Pe}function af(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===n&&!(Z in s))return!1}else{var pe=new _r;if(g)var _e=g(ue,he,Z,s,a,pe);if(!(_e===n?ya(he,ue,P|L,g,pe):_e))return!1}}return!0}function w2(s){if(!Ft(s)||_A(s))return!1;var a=Qr(s)?FD:I0;return a.test(cs(s))}function BO(s){return Kt(s)&&Ln(s)==Ye}function kO(s){return Kt(s)&&Sn(s)==Le}function HO(s){return Kt(s)&&Ul(s.length)&&!!Ct[Ln(s)]}function v2(s){return typeof s=="function"?s:s==null?Kn:typeof s=="object"?Xe(s)?_2(s[0],s[1]):b2(s):Bm(s)}function cf(s){if(!Ea(s))return qD(s);var a=[];for(var u in Dt(s))bt.call(s,u)&&u!="constructor"&&a.push(u);return a}function zO(s){if(!Ft(s))return IA(s);var a=Ea(s),u=[];for(var g in s)g=="constructor"&&(a||!bt.call(s,g))||u.push(g);return u}function lf(s,a){return s<a}function y2(s,a){var u=-1,g=qn(s)?te(s.length):[];return vi(s,function(y,O,j){g[++u]=a(y,O,j)}),g}function b2(s){var a=Cf(s);return a.length==1&&a[0][2]?em(a[0][0],a[0][1]):function(u){return u===s||af(u,s,a)}}function _2(s,a){return Sf(s)&&Q2(a)?em(jr(s),a):function(u){var g=Lf(u,s);return g===n&&g===a?jf(u,s):ya(a,g,P|L)}}function El(s,a,u,g,y){s!==a&&nf(a,function(O,j){if(y||(y=new _r),Ft(O))WO(s,a,j,u,El,g,y);else{var H=g?g(Of(s,j),O,j+"",s,a,y):n;H===n&&(H=O),ef(s,j,H)}},Vn)}function WO(s,a,u,g,y,O,j){var H=Of(s,u),Z=Of(a,u),ue=j.get(Z);if(ue){ef(s,u,ue);return}var he=O?O(H,Z,u+"",s,a,j):n,pe=he===n;if(pe){var _e=Xe(Z),De=!_e&&Ei(Z),Ue=!_e&&!De&&so(Z);he=Z,_e||De||Ue?Xe(H)?he=H:Jt(H)?he=Wn(H):De?(pe=!1,he=R2(Z,!0)):Ue?(pe=!1,he=N2(Z,!0)):he=[]:Ca(Z)||ls(Z)?(he=H,ls(H)?he=$m(H):(!Ft(H)||Qr(H))&&(he=X2(Z))):pe=!1}pe&&(j.set(Z,he),y(he,Z,g,O,j),j.delete(Z)),ef(s,u,he)}function E2(s,a){var u=s.length;if(u)return a+=a<0?u:0,Xr(a,u)?s[a]:n}function x2(s,a,u){a.length?a=jt(a,function(O){return Xe(O)?function(j){return os(j,O.length===1?O[0]:O)}:O}):a=[Kn];var g=-1;a=jt(a,Xn(je()));var y=y2(s,function(O,j,H){var Z=jt(a,function(ue){return ue(O)});return{criteria:Z,index:++g,value:O}});return wD(y,function(O,j){return rA(O,j,u)})}function qO(s,a){return C2(s,a,function(u,g){return jf(s,g)})}function C2(s,a,u){for(var g=-1,y=a.length,O={};++g<y;){var j=a[g],H=os(s,j);u(H,j)&&ba(O,bi(j,s),H)}return O}function VO(s){return function(a){return os(a,s)}}function uf(s,a,u,g){var y=g?mD:Gs,O=-1,j=a.length,H=s;for(s===a&&(a=Wn(a)),u&&(H=jt(s,Xn(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 I2(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;Xr(y)?fl.call(s,y,1):pf(s,y)}}return s}function hf(s,a){return s+gl(s2()*(a-s+1))}function KO(s,a,u,g){for(var y=-1,O=dn(pl((a-s)/(u||1)),0),j=te(O);O--;)j[g?O:++y]=s,s+=u;return j}function ff(s,a){var u="";if(!s||a<1||a>ne)return u;do a%2&&(u+=s),a=gl(a/2),a&&(s+=s);while(a);return u}function at(s,a){return Af(tm(s,a,Kn),s+"")}function GO(s){return c2(oo(s))}function ZO(s,a){var u=oo(s);return Tl(u,ss(a,0,u.length))}function ba(s,a,u,g){if(!Ft(s))return s;a=bi(a,s);for(var y=-1,O=a.length,j=O-1,H=s;H!=null&&++y<O;){var Z=jr(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):n,ue===n&&(ue=Ft(he)?he:Xr(a[y+1])?[]:{})}ma(H,Z,ue),H=H[Z]}return s}var S2=ml?function(s,a){return ml.set(s,a),s}:Kn,YO=dl?function(s,a){return dl(s,"toString",{configurable:!0,enumerable:!1,value:Ff(a),writable:!0})}:Kn;function JO(s){return Tl(oo(s))}function dr(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 XO(s,a){var u;return vi(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&&!er(j)&&(u?j<=a:j<a)?g=O+1:y=O}return y}return df(s,a,Kn,u)}function df(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=er(a),ue=a===n;y<O;){var he=gl((y+O)/2),pe=u(s[he]),_e=pe!==n,De=pe===null,Ue=pe===pe,st=er(pe);if(j)var Fe=g||Ue;else ue?Fe=Ue&&(g||_e):H?Fe=Ue&&_e&&(g||!De):Z?Fe=Ue&&_e&&!De&&(g||!st):De||st?Fe=!1:Fe=g?pe<=a:pe<a;Fe?y=he+1:O=he}return In(O,Se)}function D2(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||!Er(H,Z)){var Z=H;O[y++]=j===0?0:j}}return O}function O2(s){return typeof s=="number"?s:er(s)?oe:+s}function Qn(s){if(typeof s=="string")return s;if(Xe(s))return jt(s,Qn)+"";if(er(s))return o2?o2.call(s):"";var a=s+"";return a=="0"&&1/s==-le?"-0":a}function yi(s,a,u){var g=-1,y=nl,O=s.length,j=!0,H=[],Z=H;if(u)j=!1,y=k0;else if(O>=i){var ue=a?null:lA(s);if(ue)return il(ue);j=!1,y=ua,Z=new is}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 pf(s,a){return a=bi(a,s),s=nm(s,a),s==null||delete s[jr(pr(a))]}function A2(s,a,u,g){return ba(s,a,u(os(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?dr(s,g?0:O,g?O+1:y):dr(s,g?O+1:0,g?y:O)}function $2(s,a){var u=s;return u instanceof dt&&(u=u.value()),H0(a,function(g,y){return y.func.apply(y.thisArg,gi([g],y.args))},u)}function gf(s,a,u){var g=s.length;if(g<2)return g?yi(s[0]):[];for(var y=-1,O=te(g);++y<g;)for(var j=s[y],H=-1;++H<g;)H!=y&&(O[y]=wa(O[y]||j,s[H],a,u));return yi(En(O,1),a,u)}function P2(s,a,u){for(var g=-1,y=s.length,O=a.length,j={};++g<y;){var H=g<O?a[g]:n;u(j,s[g],H)}return j}function mf(s){return Jt(s)?s:[]}function wf(s){return typeof s=="function"?s:Kn}function bi(s,a){return Xe(s)?s:Sf(s,a)?[s]:om(yt(s))}var QO=at;function _i(s,a,u){var g=s.length;return u=u===n?g:u,!a&&u>=g?s:dr(s,a,u)}var T2=BD||function(s){return pt.clearTimeout(s)};function R2(s,a){if(a)return s.slice();var u=s.length,g=e2?e2(u):new s.constructor(u);return s.copy(g),g}function vf(s){var a=new s.constructor(s.byteLength);return new ul(a).set(new ul(s)),a}function eA(s,a){var u=a?vf(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.byteLength)}function tA(s){var a=new s.constructor(s.source,ar.exec(s));return a.lastIndex=s.lastIndex,a}function nA(s){return ga?Dt(ga.call(s)):{}}function N2(s,a){var u=a?vf(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.length)}function M2(s,a){if(s!==a){var u=s!==n,g=s===null,y=s===s,O=er(s),j=a!==n,H=a===null,Z=a===a,ue=er(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 rA(s,a,u){for(var g=-1,y=s.criteria,O=a.criteria,j=y.length,H=u.length;++g<j;){var Z=M2(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 L2(s,a,u,g){for(var y=-1,O=s.length,j=u.length,H=-1,Z=a.length,ue=dn(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 j2(s,a,u,g){for(var y=-1,O=s.length,j=-1,H=u.length,Z=-1,ue=a.length,he=dn(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 Wn(s,a){var u=-1,g=s.length;for(a||(a=te(g));++u<g;)a[u]=s[u];return a}function Lr(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):n;Z===n&&(Z=s[H]),y?Zr(u,H,Z):ma(u,H,Z)}return u}function iA(s,a){return Lr(s,If(s),a)}function sA(s,a){return Lr(s,Y2(s),a)}function Il(s,a){return function(u,g){var y=Xe(u)?uD:DO,O=a?a():{};return y(u,s,je(g,2),O)}}function no(s){return at(function(a,u){var g=-1,y=u.length,O=y>1?u[y-1]:n,j=y>2?u[2]:n;for(O=s.length>3&&typeof O=="function"?(y--,O):n,j&&jn(u[0],u[1],j)&&(O=y<3?n:O,y=1),a=Dt(a);++g<y;){var H=u[g];H&&s(a,H,g,O)}return a})}function U2(s,a){return function(u,g){if(u==null)return u;if(!qn(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 F2(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 oA(s,a,u){var g=a&k,y=_a(s);function O(){var j=this&&this!==pt&&this instanceof O?y:s;return j.apply(g?u:this,arguments)}return O}function B2(s){return function(a){a=yt(a);var u=Zs(a)?br(a):n,g=u?u[0]:a.charAt(0),y=u?_i(u,1).join(""):a.slice(1);return g[s]()+y}}function ro(s){return function(a){return H0(Um(jm(a).replace(ca,"")),s,"")}}function _a(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=to(s.prototype),g=s.apply(u,a);return Ft(g)?g:u}}function aA(s,a,u){var g=_a(s);function y(){for(var O=arguments.length,j=te(O),H=O,Z=io(y);H--;)j[H]=arguments[H];var ue=O<3&&j[0]!==Z&&j[O-1]!==Z?[]:mi(j,Z);if(O-=ue.length,O<u)return q2(s,a,Sl,y.placeholder,n,j,ue,n,n,u-O);var he=this&&this!==pt&&this instanceof y?g:s;return wn(he,this,j)}return y}function k2(s){return function(a,u,g){var y=Dt(a);if(!qn(a)){var O=je(u,3);a=vn(a),u=function(H){return O(y[H],H,y)}}var j=s(a,u,g);return j>-1?y[O?a[j]:j]:n}}function H2(s){return Jr(function(a){var u=a.length,g=u,y=hr.prototype.thru;for(s&&a.reverse();g--;){var O=a[g];if(typeof O!="function")throw new ur(c);if(y&&!j&&$l(O)=="wrapper")var j=new hr([],!0)}for(g=j?g:u;++g<u;){O=a[g];var H=$l(O),Z=H=="wrapper"?xf(O):n;Z&&Df(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&&Df(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),Ue=a&J,st=_e?n:_a(s);function Fe(){for(var ht=arguments.length,gt=te(ht),tr=ht;tr--;)gt[tr]=arguments[tr];if(De)var Un=io(Fe),nr=yD(gt,Un);if(g&&(gt=L2(gt,g,y,De)),O&&(gt=j2(gt,O,j,De)),ht-=nr,De&&ht<ue){var Xt=mi(gt,Un);return q2(s,a,Sl,Fe.placeholder,u,gt,Xt,H,Z,ue-ht)}var xr=pe?u:this,ti=_e?xr[s]:s;return ht=gt.length,H?gt=DA(gt,H):Ue&&ht>1&&gt.reverse(),he&&Z<ht&&(gt.length=Z),this&&this!==pt&&this instanceof Fe&&(ti=st||_a(ti)),ti.apply(xr,gt)}return Fe}function z2(s,a){return function(u,g){return MO(u,s,a(g),{})}}function Dl(s,a){return function(u,g){var y;if(u===n&&g===n)return a;if(u!==n&&(y=u),g!==n){if(y===n)return g;typeof u=="string"||typeof g=="string"?(u=Qn(u),g=Qn(g)):(u=O2(u),g=O2(g)),y=s(u,g)}return y}}function yf(s){return Jr(function(a){return a=jt(a,Xn(je())),at(function(u){var g=this;return s(a,function(y){return wn(y,g,u)})})})}function Ol(s,a){a=a===n?" ":Qn(a);var u=a.length;if(u<2)return u?ff(a,s):a;var g=ff(a,pl(s/Ys(a)));return Zs(a)?_i(br(g),0,s).join(""):g.slice(0,s)}function cA(s,a,u,g){var y=a&k,O=_a(s);function j(){for(var H=-1,Z=arguments.length,ue=-1,he=g.length,pe=te(he+Z),_e=this&&this!==pt&&this instanceof j?O:s;++ue<he;)pe[ue]=g[ue];for(;Z--;)pe[ue++]=arguments[++H];return wn(_e,y?u:this,pe)}return j}function W2(s){return function(a,u,g){return g&&typeof g!="number"&&jn(a,u,g)&&(u=g=n),a=ei(a),u===n?(u=a,a=0):u=ei(u),g=g===n?a<u?1:-1:ei(g),KO(a,u,g,s)}}function Al(s){return function(a,u){return typeof a=="string"&&typeof u=="string"||(a=gr(a),u=gr(u)),s(a,u)}}function q2(s,a,u,g,y,O,j,H,Z,ue){var he=a&M,pe=he?j:n,_e=he?n:j,De=he?O:n,Ue=he?n:O;a|=he?R:C,a&=~(he?C:R),a&T||(a&=~(k|q));var st=[s,a,y,De,pe,Ue,_e,H,Z,ue],Fe=u.apply(n,st);return Df(s)&&rm(Fe,st),Fe.placeholder=g,im(Fe,s,a)}function bf(s){var a=fn[s];return function(u,g){if(u=gr(u),g=g==null?0:In(nt(g),292),g&&i2(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 lA=Qs&&1/il(new Qs([,-0]))[1]==le?function(s){return new Qs(s)}:Hf;function V2(s){return function(a){var u=Sn(a);return u==Pe?Z0(a):u==Le?SD(a):vD(a,s(a))}}function Yr(s,a,u,g,y,O,j,H){var Z=a&q;if(!Z&&typeof s!="function")throw new ur(c);var ue=g?g.length:0;if(ue||(a&=~(R|C),g=y=n),j=j===n?j:dn(nt(j),0),H=H===n?H:nt(H),ue-=y?y.length:0,a&C){var he=g,pe=y;g=y=n}var _e=Z?n:xf(s),De=[s,a,u,g,y,he,pe,O,j,H];if(_e&&CA(De,_e),s=De[0],a=De[1],u=De[2],g=De[3],y=De[4],H=De[9]=De[9]===n?Z?0:s.length:dn(De[9]-ue,0),!H&&a&(M|A)&&(a&=~(M|A)),!a||a==k)var Ue=oA(s,a,u);else a==M||a==A?Ue=aA(s,a,H):(a==R||a==(k|R))&&!y.length?Ue=cA(s,a,u,g):Ue=Sl.apply(n,De);var st=_e?S2:rm;return im(st(Ue,De),s,a)}function K2(s,a,u,g){return s===n||Er(s,Xs[u])&&!bt.call(g,u)?a:s}function G2(s,a,u,g,y,O){return Ft(s)&&Ft(a)&&(O.set(a,s),El(s,a,n,G2,O),O.delete(a)),s}function uA(s){return Ca(s)?n:s}function Z2(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 is:n;for(O.set(s,a),O.set(a,s);++pe<H;){var Ue=s[pe],st=a[pe];if(g)var Fe=j?g(st,Ue,pe,a,s,O):g(Ue,st,pe,s,a,O);if(Fe!==n){if(Fe)continue;_e=!1;break}if(De){if(!z0(a,function(ht,gt){if(!ua(De,gt)&&(Ue===ht||y(Ue,ht,u,g,O)))return De.push(gt)})){_e=!1;break}}else if(!(Ue===st||y(Ue,st,u,g,O))){_e=!1;break}}return O.delete(s),O.delete(a),_e}function hA(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 Er(+s,+a);case F:return s.name==a.name&&s.message==a.message;case Ye:case Me:return s==a+"";case Pe:var H=Z0;case Le: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=Z2(H(s),H(a),g,y,O,j);return j.delete(s),he;case ze:if(ga)return ga.call(s)==ga.call(a)}return!1}function fA(s,a,u,g,y,O){var j=u&P,H=_f(s),Z=H.length,ue=_f(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),Ue=O.get(a);if(De&&Ue)return De==a&&Ue==s;var st=!0;O.set(s,a),O.set(a,s);for(var Fe=j;++pe<Z;){_e=H[pe];var ht=s[_e],gt=a[_e];if(g)var tr=j?g(gt,ht,_e,a,s,O):g(ht,gt,_e,s,a,O);if(!(tr===n?ht===gt||y(ht,gt,u,g,O):tr)){st=!1;break}Fe||(Fe=_e=="constructor")}if(st&&!Fe){var Un=s.constructor,nr=a.constructor;Un!=nr&&"constructor"in s&&"constructor"in a&&!(typeof Un=="function"&&Un instanceof Un&&typeof nr=="function"&&nr instanceof nr)&&(st=!1)}return O.delete(s),O.delete(a),st}function Jr(s){return Af(tm(s,n,um),s+"")}function _f(s){return g2(s,vn,If)}function Ef(s){return g2(s,Vn,Y2)}var xf=ml?function(s){return ml.get(s)}:Hf;function $l(s){for(var a=s.name+"",u=eo[a],g=bt.call(eo,a)?u.length:0;g--;){var y=u[g],O=y.func;if(O==null||O==s)return y.name}return a}function io(s){var a=bt.call(I,"placeholder")?I:s;return a.placeholder}function je(){var s=I.iteratee||Bf;return s=s===Bf?v2:s,arguments.length?s(arguments[0],arguments[1]):s}function Pl(s,a){var u=s.__data__;return bA(a)?u[typeof a=="string"?"string":"hash"]:u.map}function Cf(s){for(var a=vn(s),u=a.length;u--;){var g=a[u],y=s[g];a[u]=[g,y,Q2(y)]}return a}function as(s,a){var u=xD(s,a);return w2(u)?u:n}function dA(s){var a=bt.call(s,ns),u=s[ns];try{s[ns]=n;var g=!0}catch{}var y=cl.call(s);return g&&(a?s[ns]=u:delete s[ns]),y}var If=J0?function(s){return s==null?[]:(s=Dt(s),pi(J0(s),function(a){return n2.call(s,a)}))}:zf,Y2=J0?function(s){for(var a=[];s;)gi(a,If(s)),s=hl(s);return a}:zf,Sn=Ln;(X0&&Sn(new X0(new ArrayBuffer(1)))!=p||fa&&Sn(new fa)!=Pe||Q0&&Sn(Q0.resolve())!=At||Qs&&Sn(new Qs)!=Le||da&&Sn(new da)!=Te)&&(Sn=function(s){var a=Ln(s),u=a==qe?s.constructor:n,g=u?cs(u):"";if(g)switch(g){case ZD:return p;case YD:return Pe;case JD:return At;case XD:return Le;case QD:return Te}return a});function pA(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=In(a,s+j);break;case"takeRight":s=dn(s,a-j);break}}return{start:s,end:a}}function gA(s){var a=s.match(Pt);return a?a[1].split(rn):[]}function J2(s,a,u){a=bi(a,s);for(var g=-1,y=a.length,O=!1;++g<y;){var j=jr(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)&&Xr(j,y)&&(Xe(s)||ls(s)))}function mA(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 X2(s){return typeof s.constructor=="function"&&!Ea(s)?to(hl(s)):{}}function wA(s,a,u){var g=s.constructor;switch(a){case b:return vf(s);case Y:case W:return new g(+s);case p:return eA(s,u);case m:case $:case B:case G:case Q:case xe:case Oe:case it:case ut:return N2(s,u);case Pe:return new g;case tt:case Me:return new g(s);case Ye:return tA(s);case Le:return new g;case ze:return nA(s)}}function vA(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 n,r="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,N=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,ne=9007199254740991,re=17976931348623157e292,oe=0/0,ie=4294967295,Se=ie-1,ge=ie>>>1,Re=[["ary",f],["bind",k],["bindKey",q],["curry",M],["curryRight",A],["flip",J],["partial",N],["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]",Le="[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,Rn=/\b(__p \+=) '' \+/g,Wr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pi=/&(?:amp|lt|gt|quot|#39);/g,Qi=/[&<>"']/g,kt=RegExp(pi.source),Mt=RegExp(Qi.source),Ht=/<%-([\s\S]+?)%>/g,zt=/<%([\s\S]+?)%>/g,Ut=/<%=([\s\S]+?)%>/g,Lt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,en=/^\w*$/,tn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Wt=/[\\^$.*+?()[\]{}|]/g,nn=RegExp(Wt.source),qt=/^\s+/,Zt=/\s/,Vt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Pt=/\{\n\/\* \[wrapped with (.+)\] \*/,rn=/,? & /,sn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,xf=/[()=,{}\[\]\/\s]/,Cf=/\\(\\)?/g,If=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,cr=/\w*$/,Sf=/^[-+]0x[0-9a-f]+$/i,Df=/^0b[01]+$/i,Of=/^\[object .+?Constructor\]$/,Af=/^0o[0-7]+$/i,$f=/^(?:0|[1-9]\d*)$/,qr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Hs=/($^)/,Pf=/['\n\r\u2028\u2029\\]/g,zs="\\ud800-\\udfff",Tf="\\u0300-\\u036f",Nf="\\ufe20-\\ufe2f",Ws="\\u20d0-\\u20ff",jc=Tf+Nf+Ws,Uc="\\u2700-\\u27bf",br="a-z\\xdf-\\xf6\\xf8-\\xff",Rf="\\xac\\xb1\\xd7\\xf7",Mf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Lf="\\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",Fc="A-Z\\xc0-\\xd6\\xd8-\\xde",Bc="\\ufe0e\\ufe0f",es=Rf+Mf+Lf+jf,aa="['\u2019]",ts="["+zs+"]",ca="["+es+"]",ns="["+jc+"]",kc="\\d+",Uf="["+Uc+"]",Hc="["+br+"]",zc="[^"+zs+es+kc+Uc+br+Fc+"]",qs="\\ud83c[\\udffb-\\udfff]",Ff="(?:"+ns+"|"+qs+")",Wc="[^"+zs+"]",Vs="(?:\\ud83c[\\udde6-\\uddff]){2}",gi="[\\ud800-\\udbff][\\udc00-\\udfff]",Jn="["+Fc+"]",qc="\\u200d",Vc="(?:"+Hc+"|"+zc+")",Nr="(?:"+Jn+"|"+zc+")",Kc="(?:"+aa+"(?:d|ll|m|re|s|t|ve))?",Gc="(?:"+aa+"(?:D|LL|M|RE|S|T|VE))?",Zc=Ff+"?",Yc="["+Bc+"]?",Bf="(?:"+qc+"(?:"+[Wc,Vs,gi].join("|")+")"+Yc+Zc+")*",Vr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Jc="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Xc=Yc+Zc+Bf,Ks="(?:"+[Uf,Vs,gi].join("|")+")"+Xc,kf="(?:"+[Wc+ns+"?",ns,Vs,gi,ts].join("|")+")",la=RegExp(aa,"g"),Hf=RegExp(ns,"g"),Gs=RegExp(qs+"(?="+qs+")|"+kf+Xc,"g"),Qc=RegExp([Jn+"?"+Hc+"+"+Kc+"(?="+[ca,Jn,"$"].join("|")+")",Nr+"+"+Gc+"(?="+[ca,Jn+Vc,"$"].join("|")+")",Jn+"?"+Vc+"+"+Kc,Jn+"+"+Gc,Jc,Vr,kc,Ks].join("|"),"g"),el=RegExp("["+qc+zs+jc+Bc+"]"),rs=/[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"],zf=-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[Le]=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[Le]=xt[Me]=xt[ze]=xt[xe]=xt[Oe]=xt[it]=xt[ut]=!0,xt[F]=xt[we]=xt[Te]=!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"},V={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},fe={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Ce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},It=parseFloat,Je=parseInt,Tt=typeof Ro=="object"&&Ro&&Ro.Object===Object&&Ro,on=typeof self=="object"&&self&&self.Object===Object&&self,gt=Tt||on||Function("return this")(),St=e&&!e.nodeType&&e,Yt=St&&!0&&t&&!t.nodeType&&t,zn=Yt&&Yt.exports===St,an=zn&&Tt.process,Nt=function(){try{var K=Yt&&Yt.require&&Yt.require("util").types;return K||an&&an.binding&&an.binding("util")}catch{}}(),Mn=Nt&&Nt.isArrayBuffer,_r=Nt&&Nt.isDate,lr=Nt&&Nt.isMap,Rr=Nt&&Nt.isRegExp,ua=Nt&&Nt.isSet,is=Nt&&Nt.isTypedArray;function wn(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 mD(K,se,te,Ie){for(var Ke=-1,vt=K==null?0:K.length;++Ke<vt;){var fn=K[Ke];se(Ie,fn,te(fn),K)}return Ie}function ur(K,se){for(var te=-1,Ie=K==null?0:K.length;++te<Ie&&se(K[te],te,K)!==!1;);return K}function wD(K,se){for(var te=K==null?0:K.length;te--&&se(K[te],te,K)!==!1;);return K}function V3(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 fn=K[te];se(fn,te,K)&&(vt[Ke++]=fn)}return vt}function nl(K,se){var te=K==null?0:K.length;return!!te&&Zs(K,se,0)>-1}function Wf(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 qf(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 vD(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 Vf(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 yD=Kf("length");function bD(K){return K.split("")}function _D(K){return K.match(sn)||[]}function K3(K,se,te){var Ie;return te(K,function(Ke,vt,fn){if(se(Ke,vt,fn))return Ie=vt,!1}),Ie}function rl(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 Zs(K,se,te){return se===se?ND(K,se,te):rl(K,G3,te)}function ED(K,se,te,Ie){for(var Ke=te-1,vt=K.length;++Ke<vt;)if(Ie(K[Ke],se))return Ke;return-1}function G3(K){return K!==K}function Z3(K,se){var te=K==null?0:K.length;return te?Zf(K,se)/te:oe}function Kf(K){return function(se){return se==null?n:se[K]}}function Gf(K){return function(se){return K==null?n:K[se]}}function Y3(K,se,te,Ie,Ke){return Ke(K,function(vt,fn,Dt){te=Ie?(Ie=!1,vt):se(te,vt,fn,Dt)}),te}function xD(K,se){var te=K.length;for(K.sort(se);te--;)K[te]=K[te].value;return K}function Zf(K,se){for(var te,Ie=-1,Ke=K.length;++Ie<Ke;){var vt=se(K[Ie]);vt!==n&&(te=te===n?vt:te+vt)}return te}function Yf(K,se){for(var te=-1,Ie=Array(K);++te<K;)Ie[te]=se(te);return Ie}function CD(K,se){return jt(se,function(te){return[te,K[te]]})}function J3(K){return K&&K.slice(0,t2(K)+1).replace(qt,"")}function Xn(K){return function(se){return K(se)}}function Jf(K,se){return jt(se,function(te){return K[te]})}function ha(K,se){return K.has(se)}function X3(K,se){for(var te=-1,Ie=K.length;++te<Ie&&Zs(se,K[te],0)>-1;);return te}function Q3(K,se){for(var te=K.length;te--&&Zs(se,K[te],0)>-1;);return te}function ID(K,se){for(var te=K.length,Ie=0;te--;)K[te]===se&&++Ie;return Ie}var SD=Gf(R),DD=Gf(V);function OD(K){return"\\"+Ce[K]}function AD(K,se){return K==null?n:K[se]}function Ys(K){return el.test(K)}function $D(K){return rs.test(K)}function PD(K){for(var se,te=[];!(se=K.next()).done;)te.push(se.value);return te}function Xf(K){var se=-1,te=Array(K.size);return K.forEach(function(Ie,Ke){te[++se]=[Ke,Ie]}),te}function e2(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 fn=K[te];(fn===se||fn===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 TD(K){var se=-1,te=Array(K.size);return K.forEach(function(Ie){te[++se]=[Ie,Ie]}),te}function ND(K,se,te){for(var Ie=te-1,Ke=K.length;++Ie<Ke;)if(K[Ie]===se)return Ie;return-1}function RD(K,se,te){for(var Ie=te+1;Ie--;)if(K[Ie]===se)return Ie;return Ie}function Js(K){return Ys(K)?LD(K):yD(K)}function Er(K){return Ys(K)?jD(K):bD(K)}function t2(K){for(var se=K.length;se--&&Zt.test(K.charAt(se)););return se}var MD=Gf(fe);function LD(K){for(var se=Gs.lastIndex=0;Gs.test(K);)++se;return se}function jD(K){return K.match(Gs)||[]}function UD(K){return K.match(Qc)||[]}var FD=function K(se){se=se==null?gt:Xs.defaults(gt.Object(),se,Xs.pick(gt,tl));var te=se.Array,Ie=se.Date,Ke=se.Error,vt=se.Function,fn=se.Math,Dt=se.Object,Qf=se.RegExp,BD=se.String,hr=se.TypeError,sl=te.prototype,kD=vt.prototype,Qs=Dt.prototype,ol=se["__core-js_shared__"],al=kD.toString,bt=Qs.hasOwnProperty,HD=0,n2=function(){var s=/[^.]+$/.exec(ol&&ol.keys&&ol.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),cl=Qs.toString,zD=al.call(Dt),WD=gt._,qD=Qf("^"+al.call(bt).replace(Wt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ll=zn?se.Buffer:n,yi=se.Symbol,ul=se.Uint8Array,r2=ll?ll.allocUnsafe:n,hl=e2(Dt.getPrototypeOf,Dt),i2=Dt.create,s2=Qs.propertyIsEnumerable,fl=sl.splice,o2=yi?yi.isConcatSpreadable:n,fa=yi?yi.iterator:n,ss=yi?yi.toStringTag:n,dl=function(){try{var s=us(Dt,"defineProperty");return s({},"",{}),s}catch{}}(),VD=se.clearTimeout!==gt.clearTimeout&&se.clearTimeout,KD=Ie&&Ie.now!==gt.Date.now&&Ie.now,GD=se.setTimeout!==gt.setTimeout&&se.setTimeout,pl=fn.ceil,gl=fn.floor,e0=Dt.getOwnPropertySymbols,ZD=ll?ll.isBuffer:n,a2=se.isFinite,YD=sl.join,JD=e2(Dt.keys,Dt),dn=fn.max,In=fn.min,XD=Ie.now,QD=se.parseInt,c2=fn.random,eO=sl.reverse,t0=us(se,"DataView"),da=us(se,"Map"),n0=us(se,"Promise"),eo=us(se,"Set"),pa=us(se,"WeakMap"),ga=us(Dt,"create"),ml=pa&&new pa,to={},tO=hs(t0),nO=hs(da),rO=hs(n0),iO=hs(eo),sO=hs(pa),wl=yi?yi.prototype:n,ma=wl?wl.valueOf:n,l2=wl?wl.toString:n;function I(s){if(Kt(s)&&!Xe(s)&&!(s instanceof dt)){if(s instanceof fr)return s;if(bt.call(s,"__wrapped__"))return um(s)}return new fr(s)}var no=function(){function s(){}return function(a){if(!Ft(a))return{};if(i2)return i2(a);s.prototype=a;var u=new s;return s.prototype=n,u}}();function vl(){}function fr(s,a){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=n}I.templateSettings={escape:Ht,evaluate:zt,interpolate:Ut,variable:"",imports:{_:I}},I.prototype=vl.prototype,I.prototype.constructor=I,fr.prototype=no(vl.prototype),fr.prototype.constructor=fr;function dt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ie,this.__views__=[]}function oO(){var s=new dt(this.__wrapped__);return s.__actions__=Wn(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Wn(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Wn(this.__views__),s}function aO(){if(this.__filtered__){var s=new dt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function cO(){var s=this.__wrapped__.value(),a=this.__dir__,u=Xe(s),g=a<0,y=u?s.length:0,O=bA(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=In(Z,this.__takeCount__);if(!u||!g&&y==Z&&De==Z)return N2(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,tr=ht.type,Un=mt(Be);if(tr==U)Be=Un;else if(!Un){if(tr==D)continue e;break e}}Fe[_e++]=Be}return Fe}dt.prototype=no(vl.prototype),dt.prototype.constructor=dt;function os(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 lO(){this.__data__=ga?ga(null):{},this.size=0}function uO(s){var a=this.has(s)&&delete this.__data__[s];return this.size-=a?1:0,a}function hO(s){var a=this.__data__;if(ga){var u=a[s];return u===h?n:u}return bt.call(a,s)?a[s]:n}function fO(s){var a=this.__data__;return ga?a[s]!==n:bt.call(a,s)}function dO(s,a){var u=this.__data__;return this.size+=this.has(s)?0:1,u[s]=ga&&a===n?h:a,this}os.prototype.clear=lO,os.prototype.delete=uO,os.prototype.get=hO,os.prototype.has=fO,os.prototype.set=dO;function Kr(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 pO(){this.__data__=[],this.size=0}function gO(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 mO(s){var a=this.__data__,u=yl(a,s);return u<0?n:a[u][1]}function wO(s){return yl(this.__data__,s)>-1}function vO(s,a){var u=this.__data__,g=yl(u,s);return g<0?(++this.size,u.push([s,a])):u[g][1]=a,this}Kr.prototype.clear=pO,Kr.prototype.delete=gO,Kr.prototype.get=mO,Kr.prototype.has=wO,Kr.prototype.set=vO;function Gr(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 yO(){this.size=0,this.__data__={hash:new os,map:new(da||Kr),string:new os}}function bO(s){var a=Pl(this,s).delete(s);return this.size-=a?1:0,a}function _O(s){return Pl(this,s).get(s)}function EO(s){return Pl(this,s).has(s)}function xO(s,a){var u=Pl(this,s),g=u.size;return u.set(s,a),this.size+=u.size==g?0:1,this}Gr.prototype.clear=yO,Gr.prototype.delete=bO,Gr.prototype.get=_O,Gr.prototype.has=EO,Gr.prototype.set=xO;function as(s){var a=-1,u=s==null?0:s.length;for(this.__data__=new Gr;++a<u;)this.add(s[a])}function CO(s){return this.__data__.set(s,h),this}function IO(s){return this.__data__.has(s)}as.prototype.add=as.prototype.push=CO,as.prototype.has=IO;function xr(s){var a=this.__data__=new Kr(s);this.size=a.size}function SO(){this.__data__=new Kr,this.size=0}function DO(s){var a=this.__data__,u=a.delete(s);return this.size=a.size,u}function OO(s){return this.__data__.get(s)}function AO(s){return this.__data__.has(s)}function $O(s,a){var u=this.__data__;if(u instanceof Kr){var g=u.__data__;if(!da||g.length<i-1)return g.push([s,a]),this.size=++u.size,this;u=this.__data__=new Gr(g)}return u.set(s,a),this.size=u.size,this}xr.prototype.clear=SO,xr.prototype.delete=DO,xr.prototype.get=OO,xr.prototype.has=AO,xr.prototype.set=$O;function u2(s,a){var u=Xe(s),g=!u&&fs(s),y=!u&&!g&&Ci(s),O=!u&&!g&&!y&&oo(s),j=u||g||y||O,H=j?Yf(s.length,BD):[],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")||Xr(ue,Z)))&&H.push(ue);return H}function h2(s){var a=s.length;return a?s[d0(0,a-1)]:n}function PO(s,a){return Tl(Wn(s),cs(a,0,s.length))}function TO(s){return Tl(Wn(s))}function r0(s,a,u){(u!==n&&!Cr(s[a],u)||u===n&&!(a in s))&&Zr(s,a,u)}function wa(s,a,u){var g=s[a];(!(bt.call(s,a)&&Cr(g,u))||u===n&&!(a in s))&&Zr(s,a,u)}function yl(s,a){for(var u=s.length;u--;)if(Cr(s[u][0],a))return u;return-1}function NO(s,a,u,g){return bi(s,function(y,O,j){a(g,y,u(y),j)}),g}function f2(s,a){return s&&Lr(a,vn(a),s)}function RO(s,a){return s&&Lr(a,Vn(a),s)}function Zr(s,a,u){a=="__proto__"&&dl?dl(s,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):s[a]=u}function i0(s,a){for(var u=-1,g=a.length,y=te(g),O=s==null;++u<g;)y[u]=O?n:U0(s,a[u]);return y}function cs(s,a,u){return s===s&&(u!==n&&(s=s<=u?s:u),a!==n&&(s=s>=a?s:a)),s}function dr(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!==n)return j;if(!Ft(s))return s;var he=Xe(s);if(he){if(j=EA(s),!H)return Wn(s,j)}else{var pe=Sn(s),_e=pe==we||pe==ve;if(Ci(s))return L2(s,H);if(pe==qe||pe==be||_e&&!y){if(j=Z||_e?{}:tm(s),!H)return Z?hA(s,RO(j,s)):uA(s,f2(j,s))}else{if(!xt[pe])return y?s:{};j=xA(s,pe,H)}}O||(O=new xr);var De=O.get(s);if(De)return De;O.set(s,j),$m(s)?s.forEach(function(Be){j.add(dr(Be,a,u,Be,s,O))}):Om(s)&&s.forEach(function(Be,ht){j.set(ht,dr(Be,a,u,ht,s,O))});var Fe=ue?Z?C0:x0:Z?Vn:vn,st=he?n:Fe(s);return ur(st||s,function(Be,ht){st&&(ht=Be,Be=s[ht]),wa(j,ht,dr(Be,a,u,ht,s,O))}),j}function MO(s){var a=vn(s);return function(u){return d2(u,s,a)}}function d2(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===n&&!(y in s)||!O(j))return!1}return!0}function p2(s,a,u){if(typeof s!="function")throw new hr(c);return Ca(function(){s.apply(n,u)},a)}function va(s,a,u,g){var y=-1,O=nl,j=!0,H=s.length,Z=[],ue=a.length;if(!H)return Z;u&&(a=jt(a,Xn(u))),g?(O=Wf,j=!1):a.length>=i&&(O=ha,j=!1,a=new as(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=k2(Mr),g2=k2(o0,!0);function LO(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===n?j===j&&!er(j):u(j,H)))var H=j,Z=O}return Z}function jO(s,a,u,g){var y=s.length;for(u=nt(u),u<0&&(u=-u>y?0:y+u),g=g===n||g>y?y:nt(g),g<0&&(g+=y),g=u>g?0:Tm(g);u<g;)s[u++]=a;return s}function m2(s,a){var u=[];return bi(s,function(g,y,O){a(g,y,O)&&u.push(g)}),u}function En(s,a,u,g,y){var O=-1,j=s.length;for(u||(u=IA),y||(y=[]);++O<j;){var H=s[O];a>0&&u(H)?a>1?En(H,a-1,u,g,y):wi(y,H):g||(y[y.length]=H)}return y}var s0=H2(),w2=H2(!0);function Mr(s,a){return s&&s0(s,a,vn)}function o0(s,a){return s&&w2(s,a,vn)}function _l(s,a){return mi(a,function(u){return Qr(s[u])})}function ls(s,a){a=Ei(a,s);for(var u=0,g=a.length;s!=null&&u<g;)s=s[jr(a[u++])];return u&&u==g?s:n}function v2(s,a,u){var g=a(s);return Xe(s)?g:wi(g,u(s))}function Ln(s){return s==null?s===n?et:ot:ss&&ss in Dt(s)?yA(s):TA(s)}function a0(s,a){return s>a}function UO(s,a){return s!=null&&bt.call(s,a)}function FO(s,a){return s!=null&&a in Dt(s)}function BO(s,a,u){return s>=In(a,u)&&s<dn(a,u)}function c0(s,a,u){for(var g=u?Wf:nl,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,Xn(a))),Z=In(he.length,Z),H[j]=!u&&(a||y>=120&&he.length>=120)?new as(j&&he):n}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?ha(_e,Fe):g(ue,Fe,u))){for(j=O;--j;){var st=H[j];if(!(st?ha(st,Fe):g(s[j],Fe,u)))continue e}_e&&_e.push(Fe),ue.push(De)}}return ue}function kO(s,a,u,g){return Mr(s,function(y,O,j){a(g,u(y),O,j)}),g}function ya(s,a,u){a=Ei(a,s),s=sm(s,a);var g=s==null?s:s[jr(gr(a))];return g==null?n:wn(g,s,u)}function y2(s){return Kt(s)&&Ln(s)==be}function HO(s){return Kt(s)&&Ln(s)==b}function zO(s){return Kt(s)&&Ln(s)==W}function ba(s,a,u,g,y){return s===a?!0:s==null||a==null||!Kt(s)&&!Kt(a)?s!==s&&a!==a:WO(s,a,u,g,ba,y)}function WO(s,a,u,g,y,O){var j=Xe(s),H=Xe(a),Z=j?Ae:Sn(s),ue=H?Ae:Sn(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 xr),j||oo(s)?X2(s,a,u,g,y,O):wA(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 xr),y(st,Be,u,g,O)}}return _e?(O||(O=new xr),vA(s,a,u,g,y,O)):!1}function qO(s){return Kt(s)&&Sn(s)==Pe}function l0(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===n&&!(Z in s))return!1}else{var pe=new xr;if(g)var _e=g(ue,he,Z,s,a,pe);if(!(_e===n?ba(he,ue,P|L,g,pe):_e))return!1}}return!0}function b2(s){if(!Ft(s)||DA(s))return!1;var a=Qr(s)?qD:Of;return a.test(hs(s))}function VO(s){return Kt(s)&&Ln(s)==Ye}function KO(s){return Kt(s)&&Sn(s)==Le}function GO(s){return Kt(s)&&Ul(s.length)&&!!Ct[Ln(s)]}function _2(s){return typeof s=="function"?s:s==null?Kn:typeof s=="object"?Xe(s)?C2(s[0],s[1]):x2(s):zm(s)}function u0(s){if(!xa(s))return JD(s);var a=[];for(var u in Dt(s))bt.call(s,u)&&u!="constructor"&&a.push(u);return a}function ZO(s){if(!Ft(s))return PA(s);var a=xa(s),u=[];for(var g in s)g=="constructor"&&(a||!bt.call(s,g))||u.push(g);return u}function h0(s,a){return s<a}function E2(s,a){var u=-1,g=qn(s)?te(s.length):[];return bi(s,function(y,O,j){g[++u]=a(y,O,j)}),g}function x2(s){var a=S0(s);return a.length==1&&a[0][2]?rm(a[0][0],a[0][1]):function(u){return u===s||l0(u,s,a)}}function C2(s,a){return O0(s)&&nm(a)?rm(jr(s),a):function(u){var g=U0(u,s);return g===n&&g===a?F0(u,s):ba(a,g,P|L)}}function El(s,a,u,g,y){s!==a&&s0(a,function(O,j){if(y||(y=new xr),Ft(O))YO(s,a,j,u,El,g,y);else{var H=g?g($0(s,j),O,j+"",s,a,y):n;H===n&&(H=O),r0(s,j,H)}},Vn)}function YO(s,a,u,g,y,O,j){var H=$0(s,u),Z=$0(a,u),ue=j.get(Z);if(ue){r0(s,u,ue);return}var he=O?O(H,Z,u+"",s,a,j):n,pe=he===n;if(pe){var _e=Xe(Z),De=!_e&&Ci(Z),Fe=!_e&&!De&&oo(Z);he=Z,_e||De||Fe?Xe(H)?he=H:Jt(H)?he=Wn(H):De?(pe=!1,he=L2(Z,!0)):Fe?(pe=!1,he=j2(Z,!0)):he=[]:Ia(Z)||fs(Z)?(he=H,fs(H)?he=Nm(H):(!Ft(H)||Qr(H))&&(he=tm(Z))):pe=!1}pe&&(j.set(Z,he),y(he,Z,g,O,j),j.delete(Z)),r0(s,u,he)}function I2(s,a){var u=s.length;if(u)return a+=a<0?u:0,Xr(a,u)?s[a]:n}function S2(s,a,u){a.length?a=jt(a,function(O){return Xe(O)?function(j){return ls(j,O.length===1?O[0]:O)}:O}):a=[Kn];var g=-1;a=jt(a,Xn(je()));var y=E2(s,function(O,j,H){var Z=jt(a,function(ue){return ue(O)});return{criteria:Z,index:++g,value:O}});return xD(y,function(O,j){return lA(O,j,u)})}function JO(s,a){return D2(s,a,function(u,g){return F0(s,g)})}function D2(s,a,u){for(var g=-1,y=a.length,O={};++g<y;){var j=a[g],H=ls(s,j);u(H,j)&&_a(O,Ei(j,s),H)}return O}function XO(s){return function(a){return ls(a,s)}}function f0(s,a,u,g){var y=g?ED:Zs,O=-1,j=a.length,H=s;for(s===a&&(a=Wn(a)),u&&(H=jt(s,Xn(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 O2(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;Xr(y)?fl.call(s,y,1):m0(s,y)}}return s}function d0(s,a){return s+gl(c2()*(a-s+1))}function QO(s,a,u,g){for(var y=-1,O=dn(pl((a-s)/(u||1)),0),j=te(O);O--;)j[g?O:++y]=s,s+=u;return j}function p0(s,a){var u="";if(!s||a<1||a>ne)return u;do a%2&&(u+=s),a=gl(a/2),a&&(s+=s);while(a);return u}function at(s,a){return P0(im(s,a,Kn),s+"")}function eA(s){return h2(ao(s))}function tA(s,a){var u=ao(s);return Tl(u,cs(a,0,u.length))}function _a(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=jr(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):n,ue===n&&(ue=Ft(he)?he:Xr(a[y+1])?[]:{})}wa(H,Z,ue),H=H[Z]}return s}var A2=ml?function(s,a){return ml.set(s,a),s}:Kn,nA=dl?function(s,a){return dl(s,"toString",{configurable:!0,enumerable:!1,value:k0(a),writable:!0})}:Kn;function rA(s){return Tl(ao(s))}function pr(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 iA(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&&!er(j)&&(u?j<=a:j<a)?g=O+1:y=O}return y}return g0(s,a,Kn,u)}function g0(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=er(a),ue=a===n;y<O;){var he=gl((y+O)/2),pe=u(s[he]),_e=pe!==n,De=pe===null,Fe=pe===pe,st=er(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 In(O,Se)}function $2(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||!Cr(H,Z)){var Z=H;O[y++]=j===0?0:j}}return O}function P2(s){return typeof s=="number"?s:er(s)?oe:+s}function Qn(s){if(typeof s=="string")return s;if(Xe(s))return jt(s,Qn)+"";if(er(s))return l2?l2.call(s):"";var a=s+"";return a=="0"&&1/s==-le?"-0":a}function _i(s,a,u){var g=-1,y=nl,O=s.length,j=!0,H=[],Z=H;if(u)j=!1,y=Wf;else if(O>=i){var ue=a?null:gA(s);if(ue)return il(ue);j=!1,y=ha,Z=new as}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 m0(s,a){return a=Ei(a,s),s=sm(s,a),s==null||delete s[jr(gr(a))]}function T2(s,a,u,g){return _a(s,a,u(ls(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?pr(s,g?0:O,g?O+1:y):pr(s,g?O+1:0,g?y:O)}function N2(s,a){var u=s;return u instanceof dt&&(u=u.value()),qf(a,function(g,y){return y.func.apply(y.thisArg,wi([g],y.args))},u)}function w0(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]=va(O[y]||j,s[H],a,u));return _i(En(O,1),a,u)}function R2(s,a,u){for(var g=-1,y=s.length,O=a.length,j={};++g<y;){var H=g<O?a[g]:n;u(j,s[g],H)}return j}function v0(s){return Jt(s)?s:[]}function y0(s){return typeof s=="function"?s:Kn}function Ei(s,a){return Xe(s)?s:O0(s,a)?[s]:lm(yt(s))}var sA=at;function xi(s,a,u){var g=s.length;return u=u===n?g:u,!a&&u>=g?s:pr(s,a,u)}var M2=VD||function(s){return gt.clearTimeout(s)};function L2(s,a){if(a)return s.slice();var u=s.length,g=r2?r2(u):new s.constructor(u);return s.copy(g),g}function b0(s){var a=new s.constructor(s.byteLength);return new ul(a).set(new ul(s)),a}function oA(s,a){var u=a?b0(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.byteLength)}function aA(s){var a=new s.constructor(s.source,cr.exec(s));return a.lastIndex=s.lastIndex,a}function cA(s){return ma?Dt(ma.call(s)):{}}function j2(s,a){var u=a?b0(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.length)}function U2(s,a){if(s!==a){var u=s!==n,g=s===null,y=s===s,O=er(s),j=a!==n,H=a===null,Z=a===a,ue=er(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 lA(s,a,u){for(var g=-1,y=s.criteria,O=a.criteria,j=y.length,H=u.length;++g<j;){var Z=U2(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 F2(s,a,u,g){for(var y=-1,O=s.length,j=u.length,H=-1,Z=a.length,ue=dn(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 B2(s,a,u,g){for(var y=-1,O=s.length,j=-1,H=u.length,Z=-1,ue=a.length,he=dn(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 Wn(s,a){var u=-1,g=s.length;for(a||(a=te(g));++u<g;)a[u]=s[u];return a}function Lr(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):n;Z===n&&(Z=s[H]),y?Zr(u,H,Z):wa(u,H,Z)}return u}function uA(s,a){return Lr(s,D0(s),a)}function hA(s,a){return Lr(s,Q2(s),a)}function Il(s,a){return function(u,g){var y=Xe(u)?mD:NO,O=a?a():{};return y(u,s,je(g,2),O)}}function ro(s){return at(function(a,u){var g=-1,y=u.length,O=y>1?u[y-1]:n,j=y>2?u[2]:n;for(O=s.length>3&&typeof O=="function"?(y--,O):n,j&&jn(u[0],u[1],j)&&(O=y<3?n:O,y=1),a=Dt(a);++g<y;){var H=u[g];H&&s(a,H,g,O)}return a})}function k2(s,a){return function(u,g){if(u==null)return u;if(!qn(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 H2(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 fA(s,a,u){var g=a&k,y=Ea(s);function O(){var j=this&&this!==gt&&this instanceof O?y:s;return j.apply(g?u:this,arguments)}return O}function z2(s){return function(a){a=yt(a);var u=Ys(a)?Er(a):n,g=u?u[0]:a.charAt(0),y=u?xi(u,1).join(""):a.slice(1);return g[s]()+y}}function io(s){return function(a){return qf(km(Bm(a).replace(la,"")),s,"")}}function Ea(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 dA(s,a,u){var g=Ea(s);function y(){for(var O=arguments.length,j=te(O),H=O,Z=so(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 G2(s,a,Sl,y.placeholder,n,j,ue,n,n,u-O);var he=this&&this!==gt&&this instanceof y?g:s;return wn(he,this,j)}return y}function W2(s){return function(a,u,g){var y=Dt(a);if(!qn(a)){var O=je(u,3);a=vn(a),u=function(H){return O(y[H],H,y)}}var j=s(a,u,g);return j>-1?y[O?a[j]:j]:n}}function q2(s){return Jr(function(a){var u=a.length,g=u,y=fr.prototype.thru;for(s&&a.reverse();g--;){var O=a[g];if(typeof O!="function")throw new hr(c);if(y&&!j&&$l(O)=="wrapper")var j=new fr([],!0)}for(g=j?g:u;++g<u;){O=a[g];var H=$l(O),Z=H=="wrapper"?I0(O):n;Z&&A0(Z[0])&&Z[1]==(f|M|N|x)&&!Z[4].length&&Z[9]==1?j=j[$l(Z[0])].apply(j,Z[3]):j=O.length==1&&A0(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?n:Ea(s);function Be(){for(var ht=arguments.length,mt=te(ht),tr=ht;tr--;)mt[tr]=arguments[tr];if(De)var Un=so(Be),nr=ID(mt,Un);if(g&&(mt=F2(mt,g,y,De)),O&&(mt=B2(mt,O,j,De)),ht-=nr,De&&ht<ue){var Xt=vi(mt,Un);return G2(s,a,Sl,Be.placeholder,u,mt,Xt,H,Z,ue-ht)}var Ir=pe?u:this,ti=_e?Ir[s]:s;return ht=mt.length,H?mt=NA(mt,H):Fe&&ht>1&&mt.reverse(),he&&Z<ht&&(mt.length=Z),this&&this!==gt&&this instanceof Be&&(ti=st||Ea(ti)),ti.apply(Ir,mt)}return Be}function V2(s,a){return function(u,g){return kO(u,s,a(g),{})}}function Dl(s,a){return function(u,g){var y;if(u===n&&g===n)return a;if(u!==n&&(y=u),g!==n){if(y===n)return g;typeof u=="string"||typeof g=="string"?(u=Qn(u),g=Qn(g)):(u=P2(u),g=P2(g)),y=s(u,g)}return y}}function _0(s){return Jr(function(a){return a=jt(a,Xn(je())),at(function(u){var g=this;return s(a,function(y){return wn(y,g,u)})})})}function Ol(s,a){a=a===n?" ":Qn(a);var u=a.length;if(u<2)return u?p0(a,s):a;var g=p0(a,pl(s/Js(a)));return Ys(a)?xi(Er(g),0,s).join(""):g.slice(0,s)}function pA(s,a,u,g){var y=a&k,O=Ea(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 wn(_e,y?u:this,pe)}return j}function K2(s){return function(a,u,g){return g&&typeof g!="number"&&jn(a,u,g)&&(u=g=n),a=ei(a),u===n?(u=a,a=0):u=ei(u),g=g===n?a<u?1:-1:ei(g),QO(a,u,g,s)}}function Al(s){return function(a,u){return typeof a=="string"&&typeof u=="string"||(a=mr(a),u=mr(u)),s(a,u)}}function G2(s,a,u,g,y,O,j,H,Z,ue){var he=a&M,pe=he?j:n,_e=he?n:j,De=he?O:n,Fe=he?n:O;a|=he?N:C,a&=~(he?C:N),a&T||(a&=~(k|q));var st=[s,a,y,De,pe,Fe,_e,H,Z,ue],Be=u.apply(n,st);return A0(s)&&om(Be,st),Be.placeholder=g,am(Be,s,a)}function E0(s){var a=fn[s];return function(u,g){if(u=mr(u),g=g==null?0:In(nt(g),292),g&&a2(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 gA=eo&&1/il(new eo([,-0]))[1]==le?function(s){return new eo(s)}:W0;function Z2(s){return function(a){var u=Sn(a);return u==Pe?Xf(a):u==Le?TD(a):CD(a,s(a))}}function Yr(s,a,u,g,y,O,j,H){var Z=a&q;if(!Z&&typeof s!="function")throw new hr(c);var ue=g?g.length:0;if(ue||(a&=~(N|C),g=y=n),j=j===n?j:dn(nt(j),0),H=H===n?H:nt(H),ue-=y?y.length:0,a&C){var he=g,pe=y;g=y=n}var _e=Z?n:I0(s),De=[s,a,u,g,y,he,pe,O,j,H];if(_e&&$A(De,_e),s=De[0],a=De[1],u=De[2],g=De[3],y=De[4],H=De[9]=De[9]===n?Z?0:s.length:dn(De[9]-ue,0),!H&&a&(M|A)&&(a&=~(M|A)),!a||a==k)var Fe=fA(s,a,u);else a==M||a==A?Fe=dA(s,a,H):(a==N||a==(k|N))&&!y.length?Fe=pA(s,a,u,g):Fe=Sl.apply(n,De);var st=_e?A2:om;return am(st(Fe,De),s,a)}function Y2(s,a,u,g){return s===n||Cr(s,Qs[u])&&!bt.call(g,u)?a:s}function J2(s,a,u,g,y,O){return Ft(s)&&Ft(a)&&(O.set(a,s),El(s,a,n,J2,O),O.delete(a)),s}function mA(s){return Ia(s)?n:s}function X2(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 as:n;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!==n){if(Be)continue;_e=!1;break}if(De){if(!Vf(a,function(ht,mt){if(!ha(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 wA(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 Cr(+s,+a);case F:return s.name==a.name&&s.message==a.message;case Ye:case Me:return s==a+"";case Pe:var H=Xf;case Le: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=X2(H(s),H(a),g,y,O,j);return j.delete(s),he;case ze:if(ma)return ma.call(s)==ma.call(a)}return!1}function vA(s,a,u,g,y,O){var j=u&P,H=x0(s),Z=H.length,ue=x0(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 tr=j?g(mt,ht,_e,a,s,O):g(ht,mt,_e,s,a,O);if(!(tr===n?ht===mt||y(ht,mt,u,g,O):tr)){st=!1;break}Be||(Be=_e=="constructor")}if(st&&!Be){var Un=s.constructor,nr=a.constructor;Un!=nr&&"constructor"in s&&"constructor"in a&&!(typeof Un=="function"&&Un instanceof Un&&typeof nr=="function"&&nr instanceof nr)&&(st=!1)}return O.delete(s),O.delete(a),st}function Jr(s){return P0(im(s,n,dm),s+"")}function x0(s){return v2(s,vn,D0)}function C0(s){return v2(s,Vn,Q2)}var I0=ml?function(s){return ml.get(s)}:W0;function $l(s){for(var a=s.name+"",u=to[a],g=bt.call(to,a)?u.length:0;g--;){var y=u[g],O=y.func;if(O==null||O==s)return y.name}return a}function so(s){var a=bt.call(I,"placeholder")?I:s;return a.placeholder}function je(){var s=I.iteratee||H0;return s=s===H0?_2:s,arguments.length?s(arguments[0],arguments[1]):s}function Pl(s,a){var u=s.__data__;return SA(a)?u[typeof a=="string"?"string":"hash"]:u.map}function S0(s){for(var a=vn(s),u=a.length;u--;){var g=a[u],y=s[g];a[u]=[g,y,nm(y)]}return a}function us(s,a){var u=AD(s,a);return b2(u)?u:n}function yA(s){var a=bt.call(s,ss),u=s[ss];try{s[ss]=n;var g=!0}catch{}var y=cl.call(s);return g&&(a?s[ss]=u:delete s[ss]),y}var D0=e0?function(s){return s==null?[]:(s=Dt(s),mi(e0(s),function(a){return s2.call(s,a)}))}:q0,Q2=e0?function(s){for(var a=[];s;)wi(a,D0(s)),s=hl(s);return a}:q0,Sn=Ln;(t0&&Sn(new t0(new ArrayBuffer(1)))!=p||da&&Sn(new da)!=Pe||n0&&Sn(n0.resolve())!=At||eo&&Sn(new eo)!=Le||pa&&Sn(new pa)!=Te)&&(Sn=function(s){var a=Ln(s),u=a==qe?s.constructor:n,g=u?hs(u):"";if(g)switch(g){case tO:return p;case nO:return Pe;case rO:return At;case iO:return Le;case sO:return Te}return a});function bA(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=In(a,s+j);break;case"takeRight":s=dn(s,a-j);break}}return{start:s,end:a}}function _A(s){var a=s.match(Pt);return a?a[1].split(rn):[]}function em(s,a,u){a=Ei(a,s);for(var g=-1,y=a.length,O=!1;++g<y;){var j=jr(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)&&Xr(j,y)&&(Xe(s)||fs(s)))}function EA(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 tm(s){return typeof s.constructor=="function"&&!xa(s)?no(hl(s)):{}}function xA(s,a,u){var g=s.constructor;switch(a){case b:return b0(s);case Y:case W:return new g(+s);case p:return oA(s,u);case m:case $:case B:case G:case Q:case xe:case Oe:case it:case ut:return j2(s,u);case Pe:return new g;case tt:case Me:return new g(s);case Ye:return aA(s);case Le:return new g;case ze:return cA(s)}}function CA(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,`{
80
80
  /* [wrapped with `+a+`] */
81
- `)}function yA(s){return Xe(s)||ls(s)||!!(r2&&s&&s[r2])}function Xr(s,a){var u=typeof s;return a=a??ne,!!a&&(u=="number"||u!="symbol"&&D0.test(s))&&s>-1&&s%1==0&&s<a}function jn(s,a,u){if(!Ft(u))return!1;var g=typeof a;return(g=="number"?qn(u)&&Xr(a,u.length):g=="string"&&a in u)?Er(u[a],s):!1}function Sf(s,a){if(Xe(s))return!1;var u=typeof s;return u=="number"||u=="symbol"||u=="boolean"||s==null||er(s)?!0:en.test(s)||!Lt.test(s)||a!=null&&s in Dt(a)}function bA(s){var a=typeof s;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?s!=="__proto__":s===null}function Df(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=xf(u);return!!g&&s===g[0]}function _A(s){return!!Q3&&Q3 in s}var EA=ol?Qr:Wf;function Ea(s){var a=s&&s.constructor,u=typeof a=="function"&&a.prototype||Xs;return s===u}function Q2(s){return s===s&&!Ft(s)}function em(s,a){return function(u){return u==null?!1:u[s]===a&&(a!==n||s in Dt(u))}}function xA(s){var a=Ll(s,function(g){return u.size===d&&u.clear(),g}),u=a.cache;return a}function CA(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?L2(Z,H,a[4]):H,s[4]=Z?mi(s[3],v):a[4]}return H=a[5],H&&(Z=s[5],s[5]=Z?j2(Z,H,a[6]):H,s[6]=Z?mi(s[5],v):a[6]),H=a[7],H&&(s[7]=H),g&f&&(s[8]=s[8]==null?a[8]:In(s[8],a[8])),s[9]==null&&(s[9]=a[9]),s[0]=a[0],s[1]=y,s}function IA(s){var a=[];if(s!=null)for(var u in Dt(s))a.push(u);return a}function SA(s){return cl.call(s)}function tm(s,a,u){return a=dn(a===n?s.length-1:a,0),function(){for(var g=arguments,y=-1,O=dn(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),wn(s,this,H)}}function nm(s,a){return a.length<2?s:os(s,dr(a,0,-1))}function DA(s,a){for(var u=s.length,g=In(a.length,u),y=Wn(s);g--;){var O=a[g];s[g]=Xr(O,u)?y[O]:n}return s}function Of(s,a){if(!(a==="constructor"&&typeof s[a]=="function")&&a!="__proto__")return s[a]}var rm=sm(S2),xa=HD||function(s,a){return pt.setTimeout(s,a)},Af=sm(YO);function im(s,a,u){var g=a+"";return Af(s,vA(g,OA(gA(g),u)))}function sm(s){var a=0,u=0;return function(){var g=VD(),y=me-(g-u);if(u=g,y>0){if(++a>=de)return arguments[0]}else a=0;return s.apply(n,arguments)}}function Tl(s,a){var u=-1,g=s.length,y=g-1;for(a=a===n?g:a;++u<a;){var O=hf(u,y),j=s[O];s[O]=s[u],s[u]=j}return s.length=a,s}var om=xA(function(s){var a=[];return s.charCodeAt(0)===46&&a.push(""),s.replace(tn,function(u,g,y,O){a.push(y?O.replace(_0,"$1"):g||u)}),a});function jr(s){if(typeof s=="string"||er(s))return s;var a=s+"";return a=="0"&&1/s==-le?"-0":a}function cs(s){if(s!=null){try{return al.call(s)}catch{}try{return s+""}catch{}}return""}function OA(s,a){return lr(Ne,function(u){var g="_."+u[0];a&u[1]&&!nl(s,g)&&s.push(g)}),s.sort()}function am(s){if(s instanceof dt)return s.clone();var a=new hr(s.__wrapped__,s.__chain__);return a.__actions__=Wn(s.__actions__),a.__index__=s.__index__,a.__values__=s.__values__,a}function AA(s,a,u){(u?jn(s,a,u):a===n)?a=1:a=dn(nt(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++]=dr(s,y,y+=a);return j}function $A(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 PA(){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 gi(Xe(u)?Wn(u):[u],En(a,1))}var TA=at(function(s,a){return Jt(s)?wa(s,En(a,1,Jt,!0)):[]}),RA=at(function(s,a){var u=pr(a);return Jt(u)&&(u=n),Jt(s)?wa(s,En(a,1,Jt,!0),je(u,2)):[]}),NA=at(function(s,a){var u=pr(a);return Jt(u)&&(u=n),Jt(s)?wa(s,En(a,1,Jt,!0),n,u):[]});function MA(s,a,u){var g=s==null?0:s.length;return g?(a=u||a===n?1:nt(a),dr(s,a<0?0:a,g)):[]}function LA(s,a,u){var g=s==null?0:s.length;return g?(a=u||a===n?1:nt(a),a=g-a,dr(s,0,a<0?0:a)):[]}function jA(s,a){return s&&s.length?Cl(s,je(a,3),!0,!0):[]}function UA(s,a){return s&&s.length?Cl(s,je(a,3),!0):[]}function FA(s,a,u,g){var y=s==null?0:s.length;return y?(u&&typeof u!="number"&&jn(s,a,u)&&(u=0,g=y),PO(s,a,u,g)):[]}function cm(s,a,u){var g=s==null?0:s.length;if(!g)return-1;var y=u==null?0:nt(u);return y<0&&(y=dn(g+y,0)),rl(s,je(a,3),y)}function lm(s,a,u){var g=s==null?0:s.length;if(!g)return-1;var y=g-1;return u!==n&&(y=nt(u),y=u<0?dn(g+y,0):In(y,g-1)),rl(s,je(a,3),y,!0)}function um(s){var a=s==null?0:s.length;return a?En(s,1):[]}function BA(s){var a=s==null?0:s.length;return a?En(s,le):[]}function kA(s,a){var u=s==null?0:s.length;return u?(a=a===n?1:nt(a),En(s,a)):[]}function HA(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 hm(s){return s&&s.length?s[0]:n}function zA(s,a,u){var g=s==null?0:s.length;if(!g)return-1;var y=u==null?0:nt(u);return y<0&&(y=dn(g+y,0)),Gs(s,a,y)}function WA(s){var a=s==null?0:s.length;return a?dr(s,0,-1):[]}var qA=at(function(s){var a=jt(s,mf);return a.length&&a[0]===s[0]?of(a):[]}),VA=at(function(s){var a=pr(s),u=jt(s,mf);return a===pr(u)?a=n:u.pop(),u.length&&u[0]===s[0]?of(u,je(a,2)):[]}),KA=at(function(s){var a=pr(s),u=jt(s,mf);return a=typeof a=="function"?a:n,a&&u.pop(),u.length&&u[0]===s[0]?of(u,n,a):[]});function GA(s,a){return s==null?"":WD.call(s,a)}function pr(s){var a=s==null?0:s.length;return a?s[a-1]:n}function ZA(s,a,u){var g=s==null?0:s.length;if(!g)return-1;var y=g;return u!==n&&(y=nt(u),y=y<0?dn(g+y,0):In(y,g-1)),a===a?OD(s,a,y):rl(s,q3,y,!0)}function YA(s,a){return s&&s.length?E2(s,nt(a)):n}var JA=at(fm);function fm(s,a){return s&&s.length&&a&&a.length?uf(s,a):s}function XA(s,a,u){return s&&s.length&&a&&a.length?uf(s,a,je(u,2)):s}function QA(s,a,u){return s&&s.length&&a&&a.length?uf(s,a,n,u):s}var e$=Jr(function(s,a){var u=s==null?0:s.length,g=tf(s,a);return I2(s,jt(a,function(y){return Xr(y,u)?+y:y}).sort(M2)),g});function t$(s,a){var u=[];if(!(s&&s.length))return u;var g=-1,y=[],O=s.length;for(a=je(a,3);++g<O;){var j=s[g];a(j,g,s)&&(u.push(j),y.push(g))}return I2(s,y),u}function $f(s){return s==null?s:GD.call(s)}function n$(s,a,u){var g=s==null?0:s.length;return g?(u&&typeof u!="number"&&jn(s,a,u)?(a=0,u=g):(a=a==null?0:nt(a),u=u===n?g:nt(u)),dr(s,a,u)):[]}function r$(s,a){return xl(s,a)}function i$(s,a,u){return df(s,a,je(u,2))}function s$(s,a){var u=s==null?0:s.length;if(u){var g=xl(s,a);if(g<u&&Er(s[g],a))return g}return-1}function o$(s,a){return xl(s,a,!0)}function a$(s,a,u){return df(s,a,je(u,2),!0)}function c$(s,a){var u=s==null?0:s.length;if(u){var g=xl(s,a,!0)-1;if(Er(s[g],a))return g}return-1}function l$(s){return s&&s.length?D2(s):[]}function u$(s,a){return s&&s.length?D2(s,je(a,2)):[]}function h$(s){var a=s==null?0:s.length;return a?dr(s,1,a):[]}function f$(s,a,u){return s&&s.length?(a=u||a===n?1:nt(a),dr(s,0,a<0?0:a)):[]}function d$(s,a,u){var g=s==null?0:s.length;return g?(a=u||a===n?1:nt(a),a=g-a,dr(s,a<0?0:a,g)):[]}function p$(s,a){return s&&s.length?Cl(s,je(a,3),!1,!0):[]}function g$(s,a){return s&&s.length?Cl(s,je(a,3)):[]}var m$=at(function(s){return yi(En(s,1,Jt,!0))}),w$=at(function(s){var a=pr(s);return Jt(a)&&(a=n),yi(En(s,1,Jt,!0),je(a,2))}),v$=at(function(s){var a=pr(s);return a=typeof a=="function"?a:n,yi(En(s,1,Jt,!0),n,a)});function y$(s){return s&&s.length?yi(s):[]}function b$(s,a){return s&&s.length?yi(s,je(a,2)):[]}function _$(s,a){return a=typeof a=="function"?a:n,s&&s.length?yi(s,n,a):[]}function Pf(s){if(!(s&&s.length))return[];var a=0;return s=pi(s,function(u){if(Jt(u))return a=dn(u.length,a),!0}),K0(a,function(u){return jt(s,W0(u))})}function dm(s,a){if(!(s&&s.length))return[];var u=Pf(s);return a==null?u:jt(u,function(g){return wn(a,n,g)})}var E$=at(function(s,a){return Jt(s)?wa(s,a):[]}),x$=at(function(s){return gf(pi(s,Jt))}),C$=at(function(s){var a=pr(s);return Jt(a)&&(a=n),gf(pi(s,Jt),je(a,2))}),I$=at(function(s){var a=pr(s);return a=typeof a=="function"?a:n,gf(pi(s,Jt),n,a)}),S$=at(Pf);function D$(s,a){return P2(s||[],a||[],ma)}function O$(s,a){return P2(s||[],a||[],ba)}var A$=at(function(s){var a=s.length,u=a>1?s[a-1]:n;return u=typeof u=="function"?(s.pop(),u):n,dm(s,u)});function pm(s){var a=I(s);return a.__chain__=!0,a}function $$(s,a){return a(s),s}function Rl(s,a){return a(s)}var P$=Jr(function(s){var a=s.length,u=a?s[0]:0,g=this.__wrapped__,y=function(O){return tf(O,s)};return a>1||this.__actions__.length||!(g instanceof dt)||!Xr(u)?this.thru(y):(g=g.slice(u,+u+(a?1:0)),g.__actions__.push({func:Rl,args:[y],thisArg:n}),new hr(g,this.__chain__).thru(function(O){return a&&!O.length&&O.push(n),O}))});function T$(){return pm(this)}function R$(){return new hr(this.value(),this.__chain__)}function N$(){this.__values__===n&&(this.__values__=Om(this.value()));var s=this.__index__>=this.__values__.length,a=s?n:this.__values__[this.__index__++];return{done:s,value:a}}function M$(){return this}function L$(s){for(var a,u=this;u instanceof vl;){var g=am(u);g.__index__=0,g.__values__=n,a?y.__wrapped__=g:a=g;var y=g;u=u.__wrapped__}return y.__wrapped__=s,a}function j$(){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:[$f],thisArg:n}),new hr(a,this.__chain__)}return this.thru($f)}function U$(){return $2(this.__wrapped__,this.__actions__)}var F$=Il(function(s,a,u){bt.call(s,u)?++s[u]:Zr(s,u,1)});function B$(s,a,u){var g=Xe(s)?z3:$O;return u&&jn(s,a,u)&&(a=n),g(s,je(a,3))}function k$(s,a){var u=Xe(s)?pi:d2;return u(s,je(a,3))}var H$=k2(cm),z$=k2(lm);function W$(s,a){return En(Nl(s,a),1)}function q$(s,a){return En(Nl(s,a),le)}function V$(s,a,u){return u=u===n?1:nt(u),En(Nl(s,a),u)}function gm(s,a){var u=Xe(s)?lr:vi;return u(s,je(a,3))}function mm(s,a){var u=Xe(s)?hD:f2;return u(s,je(a,3))}var K$=Il(function(s,a,u){bt.call(s,u)?s[u].push(a):Zr(s,u,[a])});function G$(s,a,u,g){s=qn(s)?s:oo(s),u=u&&!g?nt(u):0;var y=s.length;return u<0&&(u=dn(y+u,0)),Fl(s)?u<=y&&s.indexOf(a,u)>-1:!!y&&Gs(s,a,u)>-1}var Z$=at(function(s,a,u){var g=-1,y=typeof a=="function",O=qn(s)?te(s.length):[];return vi(s,function(j){O[++g]=y?wn(a,j,u):va(j,a,u)}),O}),Y$=Il(function(s,a,u){Zr(s,u,a)});function Nl(s,a){var u=Xe(s)?jt:y2;return u(s,je(a,3))}function J$(s,a,u,g){return s==null?[]:(Xe(a)||(a=a==null?[]:[a]),u=g?n:u,Xe(u)||(u=u==null?[]:[u]),x2(s,a,u))}var X$=Il(function(s,a,u){s[u?0:1].push(a)},function(){return[[],[]]});function Q$(s,a,u){var g=Xe(s)?H0:K3,y=arguments.length<3;return g(s,je(a,4),u,y,vi)}function eP(s,a,u){var g=Xe(s)?fD:K3,y=arguments.length<3;return g(s,je(a,4),u,y,f2)}function tP(s,a){var u=Xe(s)?pi:d2;return u(s,jl(je(a,3)))}function nP(s){var a=Xe(s)?c2:GO;return a(s)}function rP(s,a,u){(u?jn(s,a,u):a===n)?a=1:a=nt(a);var g=Xe(s)?IO:ZO;return g(s,a)}function iP(s){var a=Xe(s)?SO:JO;return a(s)}function sP(s){if(s==null)return 0;if(qn(s))return Fl(s)?Ys(s):s.length;var a=Sn(s);return a==Pe||a==Le?s.size:cf(s).length}function oP(s,a,u){var g=Xe(s)?z0:XO;return u&&jn(s,a,u)&&(a=n),g(s,je(a,3))}var aP=at(function(s,a){if(s==null)return[];var u=a.length;return u>1&&jn(s,a[0],a[1])?a=[]:u>2&&jn(a[0],a[1],a[2])&&(a=[a[0]]),x2(s,En(a,1),[])}),Ml=kD||function(){return pt.Date.now()};function cP(s,a){if(typeof a!="function")throw new ur(c);return s=nt(s),function(){if(--s<1)return a.apply(this,arguments)}}function wm(s,a,u){return a=u?n:a,a=s&&a==null?s.length:a,Yr(s,f,n,n,n,n,a)}function vm(s,a){var u;if(typeof a!="function")throw new ur(c);return s=nt(s),function(){return--s>0&&(u=a.apply(this,arguments)),s<=1&&(a=n),u}}var Tf=at(function(s,a,u){var g=k;if(u.length){var y=mi(u,io(Tf));g|=R}return Yr(s,g,a,u,y)}),ym=at(function(s,a,u){var g=k|q;if(u.length){var y=mi(u,io(ym));g|=R}return Yr(a,g,s,u,y)});function bm(s,a,u){a=u?n:a;var g=Yr(s,M,n,n,n,n,n,a);return g.placeholder=bm.placeholder,g}function _m(s,a,u){a=u?n:a;var g=Yr(s,A,n,n,n,n,n,a);return g.placeholder=_m.placeholder,g}function Em(s,a,u){var g,y,O,j,H,Z,ue=0,he=!1,pe=!1,_e=!0;if(typeof s!="function")throw new ur(c);a=gr(a)||0,Ft(u)&&(he=!!u.leading,pe="maxWait"in u,O=pe?dn(gr(u.maxWait)||0,a):O,_e="trailing"in u?!!u.trailing:_e);function De(Xt){var xr=g,ti=y;return g=y=n,ue=Xt,j=s.apply(ti,xr),j}function Ue(Xt){return ue=Xt,H=xa(ht,a),he?De(Xt):j}function st(Xt){var xr=Xt-Z,ti=Xt-ue,km=a-xr;return pe?In(km,O-ti):km}function Fe(Xt){var xr=Xt-Z,ti=Xt-ue;return Z===n||xr>=a||xr<0||pe&&ti>=O}function ht(){var Xt=Ml();if(Fe(Xt))return gt(Xt);H=xa(ht,st(Xt))}function gt(Xt){return H=n,_e&&g?De(Xt):(g=y=n,j)}function tr(){H!==n&&T2(H),ue=0,g=Z=y=H=n}function Un(){return H===n?j:gt(Ml())}function nr(){var Xt=Ml(),xr=Fe(Xt);if(g=arguments,y=this,Z=Xt,xr){if(H===n)return Ue(Z);if(pe)return T2(H),H=xa(ht,a),De(Z)}return H===n&&(H=xa(ht,a)),j}return nr.cancel=tr,nr.flush=Un,nr}var lP=at(function(s,a){return h2(s,1,a)}),uP=at(function(s,a,u){return h2(s,gr(a)||0,u)});function hP(s){return Yr(s,J)}function Ll(s,a){if(typeof s!="function"||a!=null&&typeof a!="function")throw new ur(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||Gr),u}Ll.Cache=Gr;function jl(s){if(typeof s!="function")throw new ur(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 fP(s){return vm(2,s)}var dP=QO(function(s,a){a=a.length==1&&Xe(a[0])?jt(a[0],Xn(je())):jt(En(a,1),Xn(je()));var u=a.length;return at(function(g){for(var y=-1,O=In(g.length,u);++y<O;)g[y]=a[y].call(this,g[y]);return wn(s,this,g)})}),Rf=at(function(s,a){var u=mi(a,io(Rf));return Yr(s,R,n,a,u)}),xm=at(function(s,a){var u=mi(a,io(xm));return Yr(s,C,n,a,u)}),pP=Jr(function(s,a){return Yr(s,x,n,n,n,a)});function gP(s,a){if(typeof s!="function")throw new ur(c);return a=a===n?a:nt(a),at(s,a)}function mP(s,a){if(typeof s!="function")throw new ur(c);return a=a==null?0:dn(nt(a),0),at(function(u){var g=u[a],y=_i(u,0,a);return g&&gi(y,g),wn(s,this,y)})}function wP(s,a,u){var g=!0,y=!0;if(typeof s!="function")throw new ur(c);return Ft(u)&&(g="leading"in u?!!u.leading:g,y="trailing"in u?!!u.trailing:y),Em(s,a,{leading:g,maxWait:a,trailing:y})}function vP(s){return wm(s,1)}function yP(s,a){return Rf(wf(a),s)}function bP(){if(!arguments.length)return[];var s=arguments[0];return Xe(s)?s:[s]}function _P(s){return fr(s,S)}function EP(s,a){return a=typeof a=="function"?a:n,fr(s,S,a)}function xP(s){return fr(s,E|S)}function CP(s,a){return a=typeof a=="function"?a:n,fr(s,E|S,a)}function IP(s,a){return a==null||u2(s,a,vn(a))}function Er(s,a){return s===a||s!==s&&a!==a}var SP=Al(sf),DP=Al(function(s,a){return s>=a}),ls=m2(function(){return arguments}())?m2:function(s){return Kt(s)&&bt.call(s,"callee")&&!n2.call(s,"callee")},Xe=te.isArray,OP=Mn?Xn(Mn):LO;function qn(s){return s!=null&&Ul(s.length)&&!Qr(s)}function Jt(s){return Kt(s)&&qn(s)}function AP(s){return s===!0||s===!1||Kt(s)&&Ln(s)==Y}var Ei=zD||Wf,$P=yr?Xn(yr):jO;function PP(s){return Kt(s)&&s.nodeType===1&&!Ca(s)}function TP(s){if(s==null)return!0;if(qn(s)&&(Xe(s)||typeof s=="string"||typeof s.splice=="function"||Ei(s)||so(s)||ls(s)))return!s.length;var a=Sn(s);if(a==Pe||a==Le)return!s.size;if(Ea(s))return!cf(s).length;for(var u in s)if(bt.call(s,u))return!1;return!0}function RP(s,a){return ya(s,a)}function NP(s,a,u){u=typeof u=="function"?u:n;var g=u?u(s,a):n;return g===n?ya(s,a,n,u):!!g}function Nf(s){if(!Kt(s))return!1;var a=Ln(s);return a==F||a==w||typeof s.message=="string"&&typeof s.name=="string"&&!Ca(s)}function MP(s){return typeof s=="number"&&i2(s)}function Qr(s){if(!Ft(s))return!1;var a=Ln(s);return a==we||a==ve||a==X||a==$t}function Cm(s){return typeof s=="number"&&s==nt(s)}function Ul(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=ne}function Ft(s){var a=typeof s;return s!=null&&(a=="object"||a=="function")}function Kt(s){return s!=null&&typeof s=="object"}var Im=cr?Xn(cr):FO;function LP(s,a){return s===a||af(s,a,Cf(a))}function jP(s,a,u){return u=typeof u=="function"?u:n,af(s,a,Cf(a),u)}function UP(s){return Sm(s)&&s!=+s}function FP(s){if(EA(s))throw new Ke(o);return w2(s)}function BP(s){return s===null}function kP(s){return s==null}function Sm(s){return typeof s=="number"||Kt(s)&&Ln(s)==tt}function Ca(s){if(!Kt(s)||Ln(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)==jD}var Mf=Nr?Xn(Nr):BO;function HP(s){return Cm(s)&&s>=-ne&&s<=ne}var Dm=la?Xn(la):kO;function Fl(s){return typeof s=="string"||!Xe(s)&&Kt(s)&&Ln(s)==Me}function er(s){return typeof s=="symbol"||Kt(s)&&Ln(s)==ze}var so=ts?Xn(ts):HO;function zP(s){return s===n}function WP(s){return Kt(s)&&Sn(s)==Te}function qP(s){return Kt(s)&&Ln(s)==Ve}var VP=Al(lf),KP=Al(function(s,a){return s<=a});function Om(s){if(!s)return[];if(qn(s))return Fl(s)?br(s):Wn(s);if(ha&&s[ha])return ID(s[ha]());var a=Sn(s),u=a==Pe?Z0:a==Le?il:oo;return u(s)}function ei(s){if(!s)return s===0?s:0;if(s=gr(s),s===le||s===-le){var a=s<0?-1:1;return a*re}return s===s?s:0}function nt(s){var a=ei(s),u=a%1;return a===a?u?a-u:a:0}function Am(s){return s?ss(nt(s),0,ie):0}function gr(s){if(typeof s=="number")return s;if(er(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=G3(s);var u=C0.test(s);return u||S0.test(s)?Je(s.slice(2),u?2:8):x0.test(s)?oe:+s}function $m(s){return Lr(s,Vn(s))}function GP(s){return s?ss(nt(s),-ne,ne):s===0?s:0}function yt(s){return s==null?"":Qn(s)}var ZP=no(function(s,a){if(Ea(a)||qn(a)){Lr(a,vn(a),s);return}for(var u in a)bt.call(a,u)&&ma(s,u,a[u])}),Pm=no(function(s,a){Lr(a,Vn(a),s)}),Bl=no(function(s,a,u,g){Lr(a,Vn(a),s,g)}),YP=no(function(s,a,u,g){Lr(a,vn(a),s,g)}),JP=Jr(tf);function XP(s,a){var u=to(s);return a==null?u:l2(u,a)}var QP=at(function(s,a){s=Dt(s);var u=-1,g=a.length,y=g>2?a[2]:n;for(y&&jn(a[0],a[1],y)&&(g=1);++u<g;)for(var O=a[u],j=Vn(O),H=-1,Z=j.length;++H<Z;){var ue=j[H],he=s[ue];(he===n||Er(he,Xs[ue])&&!bt.call(s,ue))&&(s[ue]=O[ue])}return s}),eT=at(function(s){return s.push(n,G2),wn(Tm,n,s)});function tT(s,a){return W3(s,je(a,3),Mr)}function nT(s,a){return W3(s,je(a,3),rf)}function rT(s,a){return s==null?s:nf(s,je(a,3),Vn)}function iT(s,a){return s==null?s:p2(s,je(a,3),Vn)}function sT(s,a){return s&&Mr(s,je(a,3))}function oT(s,a){return s&&rf(s,je(a,3))}function aT(s){return s==null?[]:_l(s,vn(s))}function cT(s){return s==null?[]:_l(s,Vn(s))}function Lf(s,a,u){var g=s==null?n:os(s,a);return g===n?u:g}function lT(s,a){return s!=null&&J2(s,a,TO)}function jf(s,a){return s!=null&&J2(s,a,RO)}var uT=z2(function(s,a,u){a!=null&&typeof a.toString!="function"&&(a=cl.call(a)),s[a]=u},Ff(Kn)),hT=z2(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]},je),fT=at(va);function vn(s){return qn(s)?a2(s):cf(s)}function Vn(s){return qn(s)?a2(s,!0):zO(s)}function dT(s,a){var u={};return a=je(a,3),Mr(s,function(g,y,O){Zr(u,a(g,y,O),g)}),u}function pT(s,a){var u={};return a=je(a,3),Mr(s,function(g,y,O){Zr(u,y,a(g,y,O))}),u}var gT=no(function(s,a,u){El(s,a,u)}),Tm=no(function(s,a,u,g){El(s,a,u,g)}),mT=Jr(function(s,a){var u={};if(s==null)return u;var g=!1;a=jt(a,function(O){return O=bi(O,s),g||(g=O.length>1),O}),Lr(s,Ef(s),u),g&&(u=fr(u,E|_|S,uA));for(var y=a.length;y--;)pf(u,a[y]);return u});function wT(s,a){return Rm(s,jl(je(a)))}var vT=Jr(function(s,a){return s==null?{}:qO(s,a)});function Rm(s,a){if(s==null)return{};var u=jt(Ef(s),function(g){return[g]});return a=je(a),C2(s,u,function(g,y){return a(g,y[0])})}function yT(s,a,u){a=bi(a,s);var g=-1,y=a.length;for(y||(y=1,s=n);++g<y;){var O=s==null?n:s[jr(a[g])];O===n&&(g=y,O=u),s=Qr(O)?O.call(s):O}return s}function bT(s,a,u){return s==null?s:ba(s,a,u)}function _T(s,a,u,g){return g=typeof g=="function"?g:n,s==null?s:ba(s,a,u,g)}var Nm=V2(vn),Mm=V2(Vn);function ET(s,a,u){var g=Xe(s),y=g||Ei(s)||so(s);if(a=je(a,4),u==null){var O=s&&s.constructor;y?u=g?new O:[]:Ft(s)?u=Qr(O)?to(hl(s)):{}:u={}}return(y?lr:Mr)(s,function(j,H,Z){return a(u,j,H,Z)}),u}function xT(s,a){return s==null?!0:pf(s,a)}function CT(s,a,u){return s==null?s:A2(s,a,wf(u))}function IT(s,a,u,g){return g=typeof g=="function"?g:n,s==null?s:A2(s,a,wf(u),g)}function oo(s){return s==null?[]:G0(s,vn(s))}function ST(s){return s==null?[]:G0(s,Vn(s))}function DT(s,a,u){return u===n&&(u=a,a=n),u!==n&&(u=gr(u),u=u===u?u:0),a!==n&&(a=gr(a),a=a===a?a:0),ss(gr(s),a,u)}function OT(s,a,u){return a=ei(a),u===n?(u=a,a=0):u=ei(u),s=gr(s),NO(s,a,u)}function AT(s,a,u){if(u&&typeof u!="boolean"&&jn(s,a,u)&&(a=u=n),u===n&&(typeof a=="boolean"?(u=a,a=n):typeof s=="boolean"&&(u=s,s=n)),s===n&&a===n?(s=0,a=1):(s=ei(s),a===n?(a=s,s=0):a=ei(a)),s>a){var g=s;s=a,a=g}if(u||s%1||a%1){var y=s2();return In(s+y*(a-s+It("1e-"+((y+"").length-1))),a)}return hf(s,a)}var $T=ro(function(s,a,u){return a=a.toLowerCase(),s+(u?Lm(a):a)});function Lm(s){return Uf(yt(s).toLowerCase())}function jm(s){return s=yt(s),s&&s.replace(qr,bD).replace(F0,"")}function PT(s,a,u){s=yt(s),a=Qn(a);var g=s.length;u=u===n?g:ss(nt(u),0,g);var y=u;return u-=a.length,u>=0&&s.slice(u,y)==a}function TT(s){return s=yt(s),s&&Mt.test(s)?s.replace(Yi,_D):s}function RT(s){return s=yt(s),s&&nn.test(s)?s.replace(Wt,"\\$&"):s}var NT=ro(function(s,a,u){return s+(u?"-":"")+a.toLowerCase()}),MT=ro(function(s,a,u){return s+(u?" ":"")+a.toLowerCase()}),LT=B2("toLowerCase");function jT(s,a,u){s=yt(s),a=nt(a);var g=a?Ys(s):0;if(!a||g>=a)return s;var y=(a-g)/2;return Ol(gl(y),u)+s+Ol(pl(y),u)}function UT(s,a,u){s=yt(s),a=nt(a);var g=a?Ys(s):0;return a&&g<a?s+Ol(a-g,u):s}function FT(s,a,u){s=yt(s),a=nt(a);var g=a?Ys(s):0;return a&&g<a?Ol(a-g,u)+s:s}function BT(s,a,u){return u||a==null?a=0:a&&(a=+a),KD(yt(s).replace(qt,""),a||0)}function kT(s,a,u){return(u?jn(s,a,u):a===n)?a=1:a=nt(a),ff(yt(s),a)}function HT(){var s=arguments,a=yt(s[0]);return s.length<3?a:a.replace(s[1],s[2])}var zT=ro(function(s,a,u){return s+(u?"_":"")+a.toLowerCase()});function WT(s,a,u){return u&&typeof u!="number"&&jn(s,a,u)&&(a=u=n),u=u===n?ie:u>>>0,u?(s=yt(s),s&&(typeof a=="string"||a!=null&&!Mf(a))&&(a=Qn(a),!a&&Zs(s))?_i(br(s),0,u):s.split(a,u)):[]}var qT=ro(function(s,a,u){return s+(u?" ":"")+Uf(a)});function VT(s,a,u){return s=yt(s),u=u==null?0:ss(nt(u),0,s.length),a=Qn(a),s.slice(u,u+a.length)==a}function KT(s,a,u){var g=I.templateSettings;u&&jn(s,a,u)&&(a=n),s=yt(s),a=Bl({},a,g,K2);var y=Bl({},a.imports,g.imports,K2),O=vn(y),j=G0(y,O),H,Z,ue=0,he=a.interpolate||ks,pe="__p += '",_e=Y0((a.escape||ks).source+"|"+he.source+"|"+(he===Ut?E0:ks).source+"|"+(a.evaluate||ks).source+"|$","g"),De="//# sourceURL="+(bt.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++B0+"]")+`
82
- `;s.replace(_e,function(Fe,ht,gt,tr,Un,nr){return gt||(gt=tr),pe+=s.slice(ue,nr).replace(O0,ED),ht&&(H=!0,pe+=`' +
81
+ `)}function IA(s){return Xe(s)||fs(s)||!!(o2&&s&&s[o2])}function Xr(s,a){var u=typeof s;return a=a??ne,!!a&&(u=="number"||u!="symbol"&&$f.test(s))&&s>-1&&s%1==0&&s<a}function jn(s,a,u){if(!Ft(u))return!1;var g=typeof a;return(g=="number"?qn(u)&&Xr(a,u.length):g=="string"&&a in u)?Cr(u[a],s):!1}function O0(s,a){if(Xe(s))return!1;var u=typeof s;return u=="number"||u=="symbol"||u=="boolean"||s==null||er(s)?!0:en.test(s)||!Lt.test(s)||a!=null&&s in Dt(a)}function SA(s){var a=typeof s;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?s!=="__proto__":s===null}function A0(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=I0(u);return!!g&&s===g[0]}function DA(s){return!!n2&&n2 in s}var OA=ol?Qr:V0;function xa(s){var a=s&&s.constructor,u=typeof a=="function"&&a.prototype||Qs;return s===u}function nm(s){return s===s&&!Ft(s)}function rm(s,a){return function(u){return u==null?!1:u[s]===a&&(a!==n||s in Dt(u))}}function AA(s){var a=Ll(s,function(g){return u.size===d&&u.clear(),g}),u=a.cache;return a}function $A(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?F2(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?B2(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]:In(s[8],a[8])),s[9]==null&&(s[9]=a[9]),s[0]=a[0],s[1]=y,s}function PA(s){var a=[];if(s!=null)for(var u in Dt(s))a.push(u);return a}function TA(s){return cl.call(s)}function im(s,a,u){return a=dn(a===n?s.length-1:a,0),function(){for(var g=arguments,y=-1,O=dn(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),wn(s,this,H)}}function sm(s,a){return a.length<2?s:ls(s,pr(a,0,-1))}function NA(s,a){for(var u=s.length,g=In(a.length,u),y=Wn(s);g--;){var O=a[g];s[g]=Xr(O,u)?y[O]:n}return s}function $0(s,a){if(!(a==="constructor"&&typeof s[a]=="function")&&a!="__proto__")return s[a]}var om=cm(A2),Ca=GD||function(s,a){return gt.setTimeout(s,a)},P0=cm(nA);function am(s,a,u){var g=a+"";return P0(s,CA(g,RA(_A(g),u)))}function cm(s){var a=0,u=0;return function(){var g=XD(),y=me-(g-u);if(u=g,y>0){if(++a>=de)return arguments[0]}else a=0;return s.apply(n,arguments)}}function Tl(s,a){var u=-1,g=s.length,y=g-1;for(a=a===n?g:a;++u<a;){var O=d0(u,y),j=s[O];s[O]=s[u],s[u]=j}return s.length=a,s}var lm=AA(function(s){var a=[];return s.charCodeAt(0)===46&&a.push(""),s.replace(tn,function(u,g,y,O){a.push(y?O.replace(Cf,"$1"):g||u)}),a});function jr(s){if(typeof s=="string"||er(s))return s;var a=s+"";return a=="0"&&1/s==-le?"-0":a}function hs(s){if(s!=null){try{return al.call(s)}catch{}try{return s+""}catch{}}return""}function RA(s,a){return ur(Re,function(u){var g="_."+u[0];a&u[1]&&!nl(s,g)&&s.push(g)}),s.sort()}function um(s){if(s instanceof dt)return s.clone();var a=new fr(s.__wrapped__,s.__chain__);return a.__actions__=Wn(s.__actions__),a.__index__=s.__index__,a.__values__=s.__values__,a}function MA(s,a,u){(u?jn(s,a,u):a===n)?a=1:a=dn(nt(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++]=pr(s,y,y+=a);return j}function LA(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 jA(){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)?Wn(u):[u],En(a,1))}var UA=at(function(s,a){return Jt(s)?va(s,En(a,1,Jt,!0)):[]}),FA=at(function(s,a){var u=gr(a);return Jt(u)&&(u=n),Jt(s)?va(s,En(a,1,Jt,!0),je(u,2)):[]}),BA=at(function(s,a){var u=gr(a);return Jt(u)&&(u=n),Jt(s)?va(s,En(a,1,Jt,!0),n,u):[]});function kA(s,a,u){var g=s==null?0:s.length;return g?(a=u||a===n?1:nt(a),pr(s,a<0?0:a,g)):[]}function HA(s,a,u){var g=s==null?0:s.length;return g?(a=u||a===n?1:nt(a),a=g-a,pr(s,0,a<0?0:a)):[]}function zA(s,a){return s&&s.length?Cl(s,je(a,3),!0,!0):[]}function WA(s,a){return s&&s.length?Cl(s,je(a,3),!0):[]}function qA(s,a,u,g){var y=s==null?0:s.length;return y?(u&&typeof u!="number"&&jn(s,a,u)&&(u=0,g=y),jO(s,a,u,g)):[]}function hm(s,a,u){var g=s==null?0:s.length;if(!g)return-1;var y=u==null?0:nt(u);return y<0&&(y=dn(g+y,0)),rl(s,je(a,3),y)}function fm(s,a,u){var g=s==null?0:s.length;if(!g)return-1;var y=g-1;return u!==n&&(y=nt(u),y=u<0?dn(g+y,0):In(y,g-1)),rl(s,je(a,3),y,!0)}function dm(s){var a=s==null?0:s.length;return a?En(s,1):[]}function VA(s){var a=s==null?0:s.length;return a?En(s,le):[]}function KA(s,a){var u=s==null?0:s.length;return u?(a=a===n?1:nt(a),En(s,a)):[]}function GA(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 pm(s){return s&&s.length?s[0]:n}function ZA(s,a,u){var g=s==null?0:s.length;if(!g)return-1;var y=u==null?0:nt(u);return y<0&&(y=dn(g+y,0)),Zs(s,a,y)}function YA(s){var a=s==null?0:s.length;return a?pr(s,0,-1):[]}var JA=at(function(s){var a=jt(s,v0);return a.length&&a[0]===s[0]?c0(a):[]}),XA=at(function(s){var a=gr(s),u=jt(s,v0);return a===gr(u)?a=n:u.pop(),u.length&&u[0]===s[0]?c0(u,je(a,2)):[]}),QA=at(function(s){var a=gr(s),u=jt(s,v0);return a=typeof a=="function"?a:n,a&&u.pop(),u.length&&u[0]===s[0]?c0(u,n,a):[]});function e$(s,a){return s==null?"":YD.call(s,a)}function gr(s){var a=s==null?0:s.length;return a?s[a-1]:n}function t$(s,a,u){var g=s==null?0:s.length;if(!g)return-1;var y=g;return u!==n&&(y=nt(u),y=y<0?dn(g+y,0):In(y,g-1)),a===a?RD(s,a,y):rl(s,G3,y,!0)}function n$(s,a){return s&&s.length?I2(s,nt(a)):n}var r$=at(gm);function gm(s,a){return s&&s.length&&a&&a.length?f0(s,a):s}function i$(s,a,u){return s&&s.length&&a&&a.length?f0(s,a,je(u,2)):s}function s$(s,a,u){return s&&s.length&&a&&a.length?f0(s,a,n,u):s}var o$=Jr(function(s,a){var u=s==null?0:s.length,g=i0(s,a);return O2(s,jt(a,function(y){return Xr(y,u)?+y:y}).sort(U2)),g});function a$(s,a){var u=[];if(!(s&&s.length))return u;var g=-1,y=[],O=s.length;for(a=je(a,3);++g<O;){var j=s[g];a(j,g,s)&&(u.push(j),y.push(g))}return O2(s,y),u}function T0(s){return s==null?s:eO.call(s)}function c$(s,a,u){var g=s==null?0:s.length;return g?(u&&typeof u!="number"&&jn(s,a,u)?(a=0,u=g):(a=a==null?0:nt(a),u=u===n?g:nt(u)),pr(s,a,u)):[]}function l$(s,a){return xl(s,a)}function u$(s,a,u){return g0(s,a,je(u,2))}function h$(s,a){var u=s==null?0:s.length;if(u){var g=xl(s,a);if(g<u&&Cr(s[g],a))return g}return-1}function f$(s,a){return xl(s,a,!0)}function d$(s,a,u){return g0(s,a,je(u,2),!0)}function p$(s,a){var u=s==null?0:s.length;if(u){var g=xl(s,a,!0)-1;if(Cr(s[g],a))return g}return-1}function g$(s){return s&&s.length?$2(s):[]}function m$(s,a){return s&&s.length?$2(s,je(a,2)):[]}function w$(s){var a=s==null?0:s.length;return a?pr(s,1,a):[]}function v$(s,a,u){return s&&s.length?(a=u||a===n?1:nt(a),pr(s,0,a<0?0:a)):[]}function y$(s,a,u){var g=s==null?0:s.length;return g?(a=u||a===n?1:nt(a),a=g-a,pr(s,a<0?0:a,g)):[]}function b$(s,a){return s&&s.length?Cl(s,je(a,3),!1,!0):[]}function _$(s,a){return s&&s.length?Cl(s,je(a,3)):[]}var E$=at(function(s){return _i(En(s,1,Jt,!0))}),x$=at(function(s){var a=gr(s);return Jt(a)&&(a=n),_i(En(s,1,Jt,!0),je(a,2))}),C$=at(function(s){var a=gr(s);return a=typeof a=="function"?a:n,_i(En(s,1,Jt,!0),n,a)});function I$(s){return s&&s.length?_i(s):[]}function S$(s,a){return s&&s.length?_i(s,je(a,2)):[]}function D$(s,a){return a=typeof a=="function"?a:n,s&&s.length?_i(s,n,a):[]}function N0(s){if(!(s&&s.length))return[];var a=0;return s=mi(s,function(u){if(Jt(u))return a=dn(u.length,a),!0}),Yf(a,function(u){return jt(s,Kf(u))})}function mm(s,a){if(!(s&&s.length))return[];var u=N0(s);return a==null?u:jt(u,function(g){return wn(a,n,g)})}var O$=at(function(s,a){return Jt(s)?va(s,a):[]}),A$=at(function(s){return w0(mi(s,Jt))}),$$=at(function(s){var a=gr(s);return Jt(a)&&(a=n),w0(mi(s,Jt),je(a,2))}),P$=at(function(s){var a=gr(s);return a=typeof a=="function"?a:n,w0(mi(s,Jt),n,a)}),T$=at(N0);function N$(s,a){return R2(s||[],a||[],wa)}function R$(s,a){return R2(s||[],a||[],_a)}var M$=at(function(s){var a=s.length,u=a>1?s[a-1]:n;return u=typeof u=="function"?(s.pop(),u):n,mm(s,u)});function wm(s){var a=I(s);return a.__chain__=!0,a}function L$(s,a){return a(s),s}function Nl(s,a){return a(s)}var j$=Jr(function(s){var a=s.length,u=a?s[0]:0,g=this.__wrapped__,y=function(O){return i0(O,s)};return a>1||this.__actions__.length||!(g instanceof dt)||!Xr(u)?this.thru(y):(g=g.slice(u,+u+(a?1:0)),g.__actions__.push({func:Nl,args:[y],thisArg:n}),new fr(g,this.__chain__).thru(function(O){return a&&!O.length&&O.push(n),O}))});function U$(){return wm(this)}function F$(){return new fr(this.value(),this.__chain__)}function B$(){this.__values__===n&&(this.__values__=Pm(this.value()));var s=this.__index__>=this.__values__.length,a=s?n:this.__values__[this.__index__++];return{done:s,value:a}}function k$(){return this}function H$(s){for(var a,u=this;u instanceof vl;){var g=um(u);g.__index__=0,g.__values__=n,a?y.__wrapped__=g:a=g;var y=g;u=u.__wrapped__}return y.__wrapped__=s,a}function z$(){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:Nl,args:[T0],thisArg:n}),new fr(a,this.__chain__)}return this.thru(T0)}function W$(){return N2(this.__wrapped__,this.__actions__)}var q$=Il(function(s,a,u){bt.call(s,u)?++s[u]:Zr(s,u,1)});function V$(s,a,u){var g=Xe(s)?V3:LO;return u&&jn(s,a,u)&&(a=n),g(s,je(a,3))}function K$(s,a){var u=Xe(s)?mi:m2;return u(s,je(a,3))}var G$=W2(hm),Z$=W2(fm);function Y$(s,a){return En(Rl(s,a),1)}function J$(s,a){return En(Rl(s,a),le)}function X$(s,a,u){return u=u===n?1:nt(u),En(Rl(s,a),u)}function vm(s,a){var u=Xe(s)?ur:bi;return u(s,je(a,3))}function ym(s,a){var u=Xe(s)?wD:g2;return u(s,je(a,3))}var Q$=Il(function(s,a,u){bt.call(s,u)?s[u].push(a):Zr(s,u,[a])});function eP(s,a,u,g){s=qn(s)?s:ao(s),u=u&&!g?nt(u):0;var y=s.length;return u<0&&(u=dn(y+u,0)),Fl(s)?u<=y&&s.indexOf(a,u)>-1:!!y&&Zs(s,a,u)>-1}var tP=at(function(s,a,u){var g=-1,y=typeof a=="function",O=qn(s)?te(s.length):[];return bi(s,function(j){O[++g]=y?wn(a,j,u):ya(j,a,u)}),O}),nP=Il(function(s,a,u){Zr(s,u,a)});function Rl(s,a){var u=Xe(s)?jt:E2;return u(s,je(a,3))}function rP(s,a,u,g){return s==null?[]:(Xe(a)||(a=a==null?[]:[a]),u=g?n:u,Xe(u)||(u=u==null?[]:[u]),S2(s,a,u))}var iP=Il(function(s,a,u){s[u?0:1].push(a)},function(){return[[],[]]});function sP(s,a,u){var g=Xe(s)?qf:Y3,y=arguments.length<3;return g(s,je(a,4),u,y,bi)}function oP(s,a,u){var g=Xe(s)?vD:Y3,y=arguments.length<3;return g(s,je(a,4),u,y,g2)}function aP(s,a){var u=Xe(s)?mi:m2;return u(s,jl(je(a,3)))}function cP(s){var a=Xe(s)?h2:eA;return a(s)}function lP(s,a,u){(u?jn(s,a,u):a===n)?a=1:a=nt(a);var g=Xe(s)?PO:tA;return g(s,a)}function uP(s){var a=Xe(s)?TO:rA;return a(s)}function hP(s){if(s==null)return 0;if(qn(s))return Fl(s)?Js(s):s.length;var a=Sn(s);return a==Pe||a==Le?s.size:u0(s).length}function fP(s,a,u){var g=Xe(s)?Vf:iA;return u&&jn(s,a,u)&&(a=n),g(s,je(a,3))}var dP=at(function(s,a){if(s==null)return[];var u=a.length;return u>1&&jn(s,a[0],a[1])?a=[]:u>2&&jn(a[0],a[1],a[2])&&(a=[a[0]]),S2(s,En(a,1),[])}),Ml=KD||function(){return gt.Date.now()};function pP(s,a){if(typeof a!="function")throw new hr(c);return s=nt(s),function(){if(--s<1)return a.apply(this,arguments)}}function bm(s,a,u){return a=u?n:a,a=s&&a==null?s.length:a,Yr(s,f,n,n,n,n,a)}function _m(s,a){var u;if(typeof a!="function")throw new hr(c);return s=nt(s),function(){return--s>0&&(u=a.apply(this,arguments)),s<=1&&(a=n),u}}var R0=at(function(s,a,u){var g=k;if(u.length){var y=vi(u,so(R0));g|=N}return Yr(s,g,a,u,y)}),Em=at(function(s,a,u){var g=k|q;if(u.length){var y=vi(u,so(Em));g|=N}return Yr(a,g,s,u,y)});function xm(s,a,u){a=u?n:a;var g=Yr(s,M,n,n,n,n,n,a);return g.placeholder=xm.placeholder,g}function Cm(s,a,u){a=u?n:a;var g=Yr(s,A,n,n,n,n,n,a);return g.placeholder=Cm.placeholder,g}function Im(s,a,u){var g,y,O,j,H,Z,ue=0,he=!1,pe=!1,_e=!0;if(typeof s!="function")throw new hr(c);a=mr(a)||0,Ft(u)&&(he=!!u.leading,pe="maxWait"in u,O=pe?dn(mr(u.maxWait)||0,a):O,_e="trailing"in u?!!u.trailing:_e);function De(Xt){var Ir=g,ti=y;return g=y=n,ue=Xt,j=s.apply(ti,Ir),j}function Fe(Xt){return ue=Xt,H=Ca(ht,a),he?De(Xt):j}function st(Xt){var Ir=Xt-Z,ti=Xt-ue,Wm=a-Ir;return pe?In(Wm,O-ti):Wm}function Be(Xt){var Ir=Xt-Z,ti=Xt-ue;return Z===n||Ir>=a||Ir<0||pe&&ti>=O}function ht(){var Xt=Ml();if(Be(Xt))return mt(Xt);H=Ca(ht,st(Xt))}function mt(Xt){return H=n,_e&&g?De(Xt):(g=y=n,j)}function tr(){H!==n&&M2(H),ue=0,g=Z=y=H=n}function Un(){return H===n?j:mt(Ml())}function nr(){var Xt=Ml(),Ir=Be(Xt);if(g=arguments,y=this,Z=Xt,Ir){if(H===n)return Fe(Z);if(pe)return M2(H),H=Ca(ht,a),De(Z)}return H===n&&(H=Ca(ht,a)),j}return nr.cancel=tr,nr.flush=Un,nr}var gP=at(function(s,a){return p2(s,1,a)}),mP=at(function(s,a,u){return p2(s,mr(a)||0,u)});function wP(s){return Yr(s,J)}function Ll(s,a){if(typeof s!="function"||a!=null&&typeof a!="function")throw new hr(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||Gr),u}Ll.Cache=Gr;function jl(s){if(typeof s!="function")throw new hr(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 vP(s){return _m(2,s)}var yP=sA(function(s,a){a=a.length==1&&Xe(a[0])?jt(a[0],Xn(je())):jt(En(a,1),Xn(je()));var u=a.length;return at(function(g){for(var y=-1,O=In(g.length,u);++y<O;)g[y]=a[y].call(this,g[y]);return wn(s,this,g)})}),M0=at(function(s,a){var u=vi(a,so(M0));return Yr(s,N,n,a,u)}),Sm=at(function(s,a){var u=vi(a,so(Sm));return Yr(s,C,n,a,u)}),bP=Jr(function(s,a){return Yr(s,x,n,n,n,a)});function _P(s,a){if(typeof s!="function")throw new hr(c);return a=a===n?a:nt(a),at(s,a)}function EP(s,a){if(typeof s!="function")throw new hr(c);return a=a==null?0:dn(nt(a),0),at(function(u){var g=u[a],y=xi(u,0,a);return g&&wi(y,g),wn(s,this,y)})}function xP(s,a,u){var g=!0,y=!0;if(typeof s!="function")throw new hr(c);return Ft(u)&&(g="leading"in u?!!u.leading:g,y="trailing"in u?!!u.trailing:y),Im(s,a,{leading:g,maxWait:a,trailing:y})}function CP(s){return bm(s,1)}function IP(s,a){return M0(y0(a),s)}function SP(){if(!arguments.length)return[];var s=arguments[0];return Xe(s)?s:[s]}function DP(s){return dr(s,S)}function OP(s,a){return a=typeof a=="function"?a:n,dr(s,S,a)}function AP(s){return dr(s,E|S)}function $P(s,a){return a=typeof a=="function"?a:n,dr(s,E|S,a)}function PP(s,a){return a==null||d2(s,a,vn(a))}function Cr(s,a){return s===a||s!==s&&a!==a}var TP=Al(a0),NP=Al(function(s,a){return s>=a}),fs=y2(function(){return arguments}())?y2:function(s){return Kt(s)&&bt.call(s,"callee")&&!s2.call(s,"callee")},Xe=te.isArray,RP=Mn?Xn(Mn):HO;function qn(s){return s!=null&&Ul(s.length)&&!Qr(s)}function Jt(s){return Kt(s)&&qn(s)}function MP(s){return s===!0||s===!1||Kt(s)&&Ln(s)==Y}var Ci=ZD||V0,LP=_r?Xn(_r):zO;function jP(s){return Kt(s)&&s.nodeType===1&&!Ia(s)}function UP(s){if(s==null)return!0;if(qn(s)&&(Xe(s)||typeof s=="string"||typeof s.splice=="function"||Ci(s)||oo(s)||fs(s)))return!s.length;var a=Sn(s);if(a==Pe||a==Le)return!s.size;if(xa(s))return!u0(s).length;for(var u in s)if(bt.call(s,u))return!1;return!0}function FP(s,a){return ba(s,a)}function BP(s,a,u){u=typeof u=="function"?u:n;var g=u?u(s,a):n;return g===n?ba(s,a,n,u):!!g}function L0(s){if(!Kt(s))return!1;var a=Ln(s);return a==F||a==w||typeof s.message=="string"&&typeof s.name=="string"&&!Ia(s)}function kP(s){return typeof s=="number"&&a2(s)}function Qr(s){if(!Ft(s))return!1;var a=Ln(s);return a==we||a==ve||a==X||a==$t}function Dm(s){return typeof s=="number"&&s==nt(s)}function Ul(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=ne}function Ft(s){var a=typeof s;return s!=null&&(a=="object"||a=="function")}function Kt(s){return s!=null&&typeof s=="object"}var Om=lr?Xn(lr):qO;function HP(s,a){return s===a||l0(s,a,S0(a))}function zP(s,a,u){return u=typeof u=="function"?u:n,l0(s,a,S0(a),u)}function WP(s){return Am(s)&&s!=+s}function qP(s){if(OA(s))throw new Ke(o);return b2(s)}function VP(s){return s===null}function KP(s){return s==null}function Am(s){return typeof s=="number"||Kt(s)&&Ln(s)==tt}function Ia(s){if(!Kt(s)||Ln(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)==zD}var j0=Rr?Xn(Rr):VO;function GP(s){return Dm(s)&&s>=-ne&&s<=ne}var $m=ua?Xn(ua):KO;function Fl(s){return typeof s=="string"||!Xe(s)&&Kt(s)&&Ln(s)==Me}function er(s){return typeof s=="symbol"||Kt(s)&&Ln(s)==ze}var oo=is?Xn(is):GO;function ZP(s){return s===n}function YP(s){return Kt(s)&&Sn(s)==Te}function JP(s){return Kt(s)&&Ln(s)==Ve}var XP=Al(h0),QP=Al(function(s,a){return s<=a});function Pm(s){if(!s)return[];if(qn(s))return Fl(s)?Er(s):Wn(s);if(fa&&s[fa])return PD(s[fa]());var a=Sn(s),u=a==Pe?Xf:a==Le?il:ao;return u(s)}function ei(s){if(!s)return s===0?s:0;if(s=mr(s),s===le||s===-le){var a=s<0?-1:1;return a*re}return s===s?s:0}function nt(s){var a=ei(s),u=a%1;return a===a?u?a-u:a:0}function Tm(s){return s?cs(nt(s),0,ie):0}function mr(s){if(typeof s=="number")return s;if(er(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=J3(s);var u=Df.test(s);return u||Af.test(s)?Je(s.slice(2),u?2:8):Sf.test(s)?oe:+s}function Nm(s){return Lr(s,Vn(s))}function eT(s){return s?cs(nt(s),-ne,ne):s===0?s:0}function yt(s){return s==null?"":Qn(s)}var tT=ro(function(s,a){if(xa(a)||qn(a)){Lr(a,vn(a),s);return}for(var u in a)bt.call(a,u)&&wa(s,u,a[u])}),Rm=ro(function(s,a){Lr(a,Vn(a),s)}),Bl=ro(function(s,a,u,g){Lr(a,Vn(a),s,g)}),nT=ro(function(s,a,u,g){Lr(a,vn(a),s,g)}),rT=Jr(i0);function iT(s,a){var u=no(s);return a==null?u:f2(u,a)}var sT=at(function(s,a){s=Dt(s);var u=-1,g=a.length,y=g>2?a[2]:n;for(y&&jn(a[0],a[1],y)&&(g=1);++u<g;)for(var O=a[u],j=Vn(O),H=-1,Z=j.length;++H<Z;){var ue=j[H],he=s[ue];(he===n||Cr(he,Qs[ue])&&!bt.call(s,ue))&&(s[ue]=O[ue])}return s}),oT=at(function(s){return s.push(n,J2),wn(Mm,n,s)});function aT(s,a){return K3(s,je(a,3),Mr)}function cT(s,a){return K3(s,je(a,3),o0)}function lT(s,a){return s==null?s:s0(s,je(a,3),Vn)}function uT(s,a){return s==null?s:w2(s,je(a,3),Vn)}function hT(s,a){return s&&Mr(s,je(a,3))}function fT(s,a){return s&&o0(s,je(a,3))}function dT(s){return s==null?[]:_l(s,vn(s))}function pT(s){return s==null?[]:_l(s,Vn(s))}function U0(s,a,u){var g=s==null?n:ls(s,a);return g===n?u:g}function gT(s,a){return s!=null&&em(s,a,UO)}function F0(s,a){return s!=null&&em(s,a,FO)}var mT=V2(function(s,a,u){a!=null&&typeof a.toString!="function"&&(a=cl.call(a)),s[a]=u},k0(Kn)),wT=V2(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]},je),vT=at(ya);function vn(s){return qn(s)?u2(s):u0(s)}function Vn(s){return qn(s)?u2(s,!0):ZO(s)}function yT(s,a){var u={};return a=je(a,3),Mr(s,function(g,y,O){Zr(u,a(g,y,O),g)}),u}function bT(s,a){var u={};return a=je(a,3),Mr(s,function(g,y,O){Zr(u,y,a(g,y,O))}),u}var _T=ro(function(s,a,u){El(s,a,u)}),Mm=ro(function(s,a,u,g){El(s,a,u,g)}),ET=Jr(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}),Lr(s,C0(s),u),g&&(u=dr(u,E|_|S,mA));for(var y=a.length;y--;)m0(u,a[y]);return u});function xT(s,a){return Lm(s,jl(je(a)))}var CT=Jr(function(s,a){return s==null?{}:JO(s,a)});function Lm(s,a){if(s==null)return{};var u=jt(C0(s),function(g){return[g]});return a=je(a),D2(s,u,function(g,y){return a(g,y[0])})}function IT(s,a,u){a=Ei(a,s);var g=-1,y=a.length;for(y||(y=1,s=n);++g<y;){var O=s==null?n:s[jr(a[g])];O===n&&(g=y,O=u),s=Qr(O)?O.call(s):O}return s}function ST(s,a,u){return s==null?s:_a(s,a,u)}function DT(s,a,u,g){return g=typeof g=="function"?g:n,s==null?s:_a(s,a,u,g)}var jm=Z2(vn),Um=Z2(Vn);function OT(s,a,u){var g=Xe(s),y=g||Ci(s)||oo(s);if(a=je(a,4),u==null){var O=s&&s.constructor;y?u=g?new O:[]:Ft(s)?u=Qr(O)?no(hl(s)):{}:u={}}return(y?ur:Mr)(s,function(j,H,Z){return a(u,j,H,Z)}),u}function AT(s,a){return s==null?!0:m0(s,a)}function $T(s,a,u){return s==null?s:T2(s,a,y0(u))}function PT(s,a,u,g){return g=typeof g=="function"?g:n,s==null?s:T2(s,a,y0(u),g)}function ao(s){return s==null?[]:Jf(s,vn(s))}function TT(s){return s==null?[]:Jf(s,Vn(s))}function NT(s,a,u){return u===n&&(u=a,a=n),u!==n&&(u=mr(u),u=u===u?u:0),a!==n&&(a=mr(a),a=a===a?a:0),cs(mr(s),a,u)}function RT(s,a,u){return a=ei(a),u===n?(u=a,a=0):u=ei(u),s=mr(s),BO(s,a,u)}function MT(s,a,u){if(u&&typeof u!="boolean"&&jn(s,a,u)&&(a=u=n),u===n&&(typeof a=="boolean"?(u=a,a=n):typeof s=="boolean"&&(u=s,s=n)),s===n&&a===n?(s=0,a=1):(s=ei(s),a===n?(a=s,s=0):a=ei(a)),s>a){var g=s;s=a,a=g}if(u||s%1||a%1){var y=c2();return In(s+y*(a-s+It("1e-"+((y+"").length-1))),a)}return d0(s,a)}var LT=io(function(s,a,u){return a=a.toLowerCase(),s+(u?Fm(a):a)});function Fm(s){return B0(yt(s).toLowerCase())}function Bm(s){return s=yt(s),s&&s.replace(qr,SD).replace(Hf,"")}function jT(s,a,u){s=yt(s),a=Qn(a);var g=s.length;u=u===n?g:cs(nt(u),0,g);var y=u;return u-=a.length,u>=0&&s.slice(u,y)==a}function UT(s){return s=yt(s),s&&Mt.test(s)?s.replace(Qi,DD):s}function FT(s){return s=yt(s),s&&nn.test(s)?s.replace(Wt,"\\$&"):s}var BT=io(function(s,a,u){return s+(u?"-":"")+a.toLowerCase()}),kT=io(function(s,a,u){return s+(u?" ":"")+a.toLowerCase()}),HT=z2("toLowerCase");function zT(s,a,u){s=yt(s),a=nt(a);var g=a?Js(s):0;if(!a||g>=a)return s;var y=(a-g)/2;return Ol(gl(y),u)+s+Ol(pl(y),u)}function WT(s,a,u){s=yt(s),a=nt(a);var g=a?Js(s):0;return a&&g<a?s+Ol(a-g,u):s}function qT(s,a,u){s=yt(s),a=nt(a);var g=a?Js(s):0;return a&&g<a?Ol(a-g,u)+s:s}function VT(s,a,u){return u||a==null?a=0:a&&(a=+a),QD(yt(s).replace(qt,""),a||0)}function KT(s,a,u){return(u?jn(s,a,u):a===n)?a=1:a=nt(a),p0(yt(s),a)}function GT(){var s=arguments,a=yt(s[0]);return s.length<3?a:a.replace(s[1],s[2])}var ZT=io(function(s,a,u){return s+(u?"_":"")+a.toLowerCase()});function YT(s,a,u){return u&&typeof u!="number"&&jn(s,a,u)&&(a=u=n),u=u===n?ie:u>>>0,u?(s=yt(s),s&&(typeof a=="string"||a!=null&&!j0(a))&&(a=Qn(a),!a&&Ys(s))?xi(Er(s),0,u):s.split(a,u)):[]}var JT=io(function(s,a,u){return s+(u?" ":"")+B0(a)});function XT(s,a,u){return s=yt(s),u=u==null?0:cs(nt(u),0,s.length),a=Qn(a),s.slice(u,u+a.length)==a}function QT(s,a,u){var g=I.templateSettings;u&&jn(s,a,u)&&(a=n),s=yt(s),a=Bl({},a,g,Y2);var y=Bl({},a.imports,g.imports,Y2),O=vn(y),j=Jf(y,O),H,Z,ue=0,he=a.interpolate||Hs,pe="__p += '",_e=Qf((a.escape||Hs).source+"|"+he.source+"|"+(he===Ut?If:Hs).source+"|"+(a.evaluate||Hs).source+"|$","g"),De="//# sourceURL="+(bt.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++zf+"]")+`
82
+ `;s.replace(_e,function(Be,ht,mt,tr,Un,nr){return mt||(mt=tr),pe+=s.slice(ue,nr).replace(Pf,OD),ht&&(H=!0,pe+=`' +
83
83
  __e(`+ht+`) +
84
84
  '`),Un&&(Z=!0,pe+=`';
85
85
  `+Un+`;
86
- __p += '`),gt&&(pe+=`' +
87
- ((__t = (`+gt+`)) == null ? '' : __t) +
88
- '`),ue=nr+Fe.length,Fe}),pe+=`';
89
- `;var Ue=bt.call(a,"variable")&&a.variable;if(!Ue)pe=`with (obj) {
86
+ __p += '`),mt&&(pe+=`' +
87
+ ((__t = (`+mt+`)) == null ? '' : __t) +
88
+ '`),ue=nr+Be.length,Be}),pe+=`';
89
+ `;var Fe=bt.call(a,"variable")&&a.variable;if(!Fe)pe=`with (obj) {
90
90
  `+pe+`
91
91
  }
92
- `;else if(b0.test(Ue))throw new Ke(l);pe=(Z?pe.replace(ct,""):pe).replace(Nn,"$1").replace(Wr,"$1;"),pe="function("+(Ue||"obj")+`) {
93
- `+(Ue?"":`obj || (obj = {});
92
+ `;else if(xf.test(Fe))throw new Ke(l);pe=(Z?pe.replace(ct,""):pe).replace(Rn,"$1").replace(Wr,"$1;"),pe="function("+(Fe||"obj")+`) {
93
+ `+(Fe?"":`obj || (obj = {});
94
94
  `)+"var __t, __p = ''"+(H?", __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=Fm(function(){return vt(O,De+"return "+pe).apply(n,j)});if(st.source=pe,Nf(st))throw st;return st}function GT(s){return yt(s).toLowerCase()}function ZT(s){return yt(s).toUpperCase()}function YT(s,a,u){if(s=yt(s),s&&(u||a===n))return G3(s);if(!s||!(a=Qn(a)))return s;var g=br(s),y=br(a),O=Z3(g,y),j=Y3(g,y)+1;return _i(g,O,j).join("")}function JT(s,a,u){if(s=yt(s),s&&(u||a===n))return s.slice(0,X3(s)+1);if(!s||!(a=Qn(a)))return s;var g=br(s),y=Y3(g,br(a))+1;return _i(g,0,y).join("")}function XT(s,a,u){if(s=yt(s),s&&(u||a===n))return s.replace(qt,"");if(!s||!(a=Qn(a)))return s;var g=br(s),y=Z3(g,br(a));return _i(g,y).join("")}function QT(s,a){var u=z,g=ee;if(Ft(a)){var y="separator"in a?a.separator:y;u="length"in a?nt(a.length):u,g="omission"in a?Qn(a.omission):g}s=yt(s);var O=s.length;if(Zs(s)){var j=br(s);O=j.length}if(u>=O)return s;var H=u-Ys(g);if(H<1)return g;var Z=j?_i(j,0,H).join(""):s.slice(0,H);if(y===n)return Z+g;if(j&&(H+=Z.length-H),Mf(y)){if(s.slice(H).search(y)){var ue,he=Z;for(y.global||(y=Y0(y.source,yt(ar.exec(y))+"g")),y.lastIndex=0;ue=y.exec(he);)var pe=ue.index;Z=Z.slice(0,pe===n?H:pe)}}else if(s.indexOf(Qn(y),H)!=H){var _e=Z.lastIndexOf(y);_e>-1&&(Z=Z.slice(0,_e))}return Z+g}function eR(s){return s=yt(s),s&&kt.test(s)?s.replace(fi,AD):s}var tR=ro(function(s,a,u){return s+(u?" ":"")+a.toUpperCase()}),Uf=B2("toUpperCase");function Um(s,a,u){return s=yt(s),a=u?n:a,a===n?CD(s)?TD(s):gD(s):s.match(a)||[]}var Fm=at(function(s,a){try{return wn(s,n,a)}catch(u){return Nf(u)?u:new Ke(u)}}),nR=Jr(function(s,a){return lr(a,function(u){u=jr(u),Zr(s,u,Tf(s[u],s))}),s});function rR(s){var a=s==null?0:s.length,u=je();return s=a?jt(s,function(g){if(typeof g[1]!="function")throw new ur(c);return[u(g[0]),g[1]]}):[],at(function(g){for(var y=-1;++y<a;){var O=s[y];if(wn(O[0],this,g))return wn(O[1],this,g)}})}function iR(s){return AO(fr(s,E))}function Ff(s){return function(){return s}}function sR(s,a){return s==null||s!==s?a:s}var oR=H2(),aR=H2(!0);function Kn(s){return s}function Bf(s){return v2(typeof s=="function"?s:fr(s,E))}function cR(s){return b2(fr(s,E))}function lR(s,a){return _2(s,fr(a,E))}var uR=at(function(s,a){return function(u){return va(u,s,a)}}),hR=at(function(s,a){return function(u){return va(s,u,a)}});function kf(s,a,u){var g=vn(a),y=_l(a,g);u==null&&!(Ft(a)&&(y.length||!g.length))&&(u=a,a=s,s=this,y=_l(a,vn(a)));var O=!(Ft(u)&&"chain"in u)||!!u.chain,j=Qr(s);return lr(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__=Wn(this.__actions__);return pe.push({func:Z,args:arguments,thisArg:s}),he.__chain__=ue,he}return Z.apply(s,gi([this.value()],arguments))})}),s}function fR(){return pt._===this&&(pt._=UD),this}function Hf(){}function dR(s){return s=nt(s),at(function(a){return E2(a,s)})}var pR=yf(jt),gR=yf(z3),mR=yf(z0);function Bm(s){return Sf(s)?W0(jr(s)):VO(s)}function wR(s){return function(a){return s==null?n:os(s,a)}}var vR=W2(),yR=W2(!0);function zf(){return[]}function Wf(){return!1}function bR(){return{}}function _R(){return""}function ER(){return!0}function xR(s,a){if(s=nt(s),s<1||s>ne)return[];var u=ie,g=In(s,ie);a=je(a),s-=ie;for(var y=K0(g,a);++u<s;)a(u);return y}function CR(s){return Xe(s)?jt(s,jr):er(s)?[s]:Wn(om(yt(s)))}function IR(s){var a=++LD;return yt(s)+a}var SR=Dl(function(s,a){return s+a},0),DR=bf("ceil"),OR=Dl(function(s,a){return s/a},1),AR=bf("floor");function $R(s){return s&&s.length?bl(s,Kn,sf):n}function PR(s,a){return s&&s.length?bl(s,je(a,2),sf):n}function TR(s){return V3(s,Kn)}function RR(s,a){return V3(s,je(a,2))}function NR(s){return s&&s.length?bl(s,Kn,lf):n}function MR(s,a){return s&&s.length?bl(s,je(a,2),lf):n}var LR=Dl(function(s,a){return s*a},1),jR=bf("round"),UR=Dl(function(s,a){return s-a},0);function FR(s){return s&&s.length?V0(s,Kn):0}function BR(s,a){return s&&s.length?V0(s,je(a,2)):0}return I.after=cP,I.ary=wm,I.assign=ZP,I.assignIn=Pm,I.assignInWith=Bl,I.assignWith=YP,I.at=JP,I.before=vm,I.bind=Tf,I.bindAll=nR,I.bindKey=ym,I.castArray=bP,I.chain=pm,I.chunk=AA,I.compact=$A,I.concat=PA,I.cond=rR,I.conforms=iR,I.constant=Ff,I.countBy=F$,I.create=XP,I.curry=bm,I.curryRight=_m,I.debounce=Em,I.defaults=QP,I.defaultsDeep=eT,I.defer=lP,I.delay=uP,I.difference=TA,I.differenceBy=RA,I.differenceWith=NA,I.drop=MA,I.dropRight=LA,I.dropRightWhile=jA,I.dropWhile=UA,I.fill=FA,I.filter=k$,I.flatMap=W$,I.flatMapDeep=q$,I.flatMapDepth=V$,I.flatten=um,I.flattenDeep=BA,I.flattenDepth=kA,I.flip=hP,I.flow=oR,I.flowRight=aR,I.fromPairs=HA,I.functions=aT,I.functionsIn=cT,I.groupBy=K$,I.initial=WA,I.intersection=qA,I.intersectionBy=VA,I.intersectionWith=KA,I.invert=uT,I.invertBy=hT,I.invokeMap=Z$,I.iteratee=Bf,I.keyBy=Y$,I.keys=vn,I.keysIn=Vn,I.map=Nl,I.mapKeys=dT,I.mapValues=pT,I.matches=cR,I.matchesProperty=lR,I.memoize=Ll,I.merge=gT,I.mergeWith=Tm,I.method=uR,I.methodOf=hR,I.mixin=kf,I.negate=jl,I.nthArg=dR,I.omit=mT,I.omitBy=wT,I.once=fP,I.orderBy=J$,I.over=pR,I.overArgs=dP,I.overEvery=gR,I.overSome=mR,I.partial=Rf,I.partialRight=xm,I.partition=X$,I.pick=vT,I.pickBy=Rm,I.property=Bm,I.propertyOf=wR,I.pull=JA,I.pullAll=fm,I.pullAllBy=XA,I.pullAllWith=QA,I.pullAt=e$,I.range=vR,I.rangeRight=yR,I.rearg=pP,I.reject=tP,I.remove=t$,I.rest=gP,I.reverse=$f,I.sampleSize=rP,I.set=bT,I.setWith=_T,I.shuffle=iP,I.slice=n$,I.sortBy=aP,I.sortedUniq=l$,I.sortedUniqBy=u$,I.split=WT,I.spread=mP,I.tail=h$,I.take=f$,I.takeRight=d$,I.takeRightWhile=p$,I.takeWhile=g$,I.tap=$$,I.throttle=wP,I.thru=Rl,I.toArray=Om,I.toPairs=Nm,I.toPairsIn=Mm,I.toPath=CR,I.toPlainObject=$m,I.transform=ET,I.unary=vP,I.union=m$,I.unionBy=w$,I.unionWith=v$,I.uniq=y$,I.uniqBy=b$,I.uniqWith=_$,I.unset=xT,I.unzip=Pf,I.unzipWith=dm,I.update=CT,I.updateWith=IT,I.values=oo,I.valuesIn=ST,I.without=E$,I.words=Um,I.wrap=yP,I.xor=x$,I.xorBy=C$,I.xorWith=I$,I.zip=S$,I.zipObject=D$,I.zipObjectDeep=O$,I.zipWith=A$,I.entries=Nm,I.entriesIn=Mm,I.extend=Pm,I.extendWith=Bl,kf(I,I),I.add=SR,I.attempt=Fm,I.camelCase=$T,I.capitalize=Lm,I.ceil=DR,I.clamp=DT,I.clone=_P,I.cloneDeep=xP,I.cloneDeepWith=CP,I.cloneWith=EP,I.conformsTo=IP,I.deburr=jm,I.defaultTo=sR,I.divide=OR,I.endsWith=PT,I.eq=Er,I.escape=TT,I.escapeRegExp=RT,I.every=B$,I.find=H$,I.findIndex=cm,I.findKey=tT,I.findLast=z$,I.findLastIndex=lm,I.findLastKey=nT,I.floor=AR,I.forEach=gm,I.forEachRight=mm,I.forIn=rT,I.forInRight=iT,I.forOwn=sT,I.forOwnRight=oT,I.get=Lf,I.gt=SP,I.gte=DP,I.has=lT,I.hasIn=jf,I.head=hm,I.identity=Kn,I.includes=G$,I.indexOf=zA,I.inRange=OT,I.invoke=fT,I.isArguments=ls,I.isArray=Xe,I.isArrayBuffer=OP,I.isArrayLike=qn,I.isArrayLikeObject=Jt,I.isBoolean=AP,I.isBuffer=Ei,I.isDate=$P,I.isElement=PP,I.isEmpty=TP,I.isEqual=RP,I.isEqualWith=NP,I.isError=Nf,I.isFinite=MP,I.isFunction=Qr,I.isInteger=Cm,I.isLength=Ul,I.isMap=Im,I.isMatch=LP,I.isMatchWith=jP,I.isNaN=UP,I.isNative=FP,I.isNil=kP,I.isNull=BP,I.isNumber=Sm,I.isObject=Ft,I.isObjectLike=Kt,I.isPlainObject=Ca,I.isRegExp=Mf,I.isSafeInteger=HP,I.isSet=Dm,I.isString=Fl,I.isSymbol=er,I.isTypedArray=so,I.isUndefined=zP,I.isWeakMap=WP,I.isWeakSet=qP,I.join=GA,I.kebabCase=NT,I.last=pr,I.lastIndexOf=ZA,I.lowerCase=MT,I.lowerFirst=LT,I.lt=VP,I.lte=KP,I.max=$R,I.maxBy=PR,I.mean=TR,I.meanBy=RR,I.min=NR,I.minBy=MR,I.stubArray=zf,I.stubFalse=Wf,I.stubObject=bR,I.stubString=_R,I.stubTrue=ER,I.multiply=LR,I.nth=YA,I.noConflict=fR,I.noop=Hf,I.now=Ml,I.pad=jT,I.padEnd=UT,I.padStart=FT,I.parseInt=BT,I.random=AT,I.reduce=Q$,I.reduceRight=eP,I.repeat=kT,I.replace=HT,I.result=yT,I.round=jR,I.runInContext=K,I.sample=nP,I.size=sP,I.snakeCase=zT,I.some=oP,I.sortedIndex=r$,I.sortedIndexBy=i$,I.sortedIndexOf=s$,I.sortedLastIndex=o$,I.sortedLastIndexBy=a$,I.sortedLastIndexOf=c$,I.startCase=qT,I.startsWith=VT,I.subtract=UR,I.sum=FR,I.sumBy=BR,I.template=KT,I.times=xR,I.toFinite=ei,I.toInteger=nt,I.toLength=Am,I.toLower=GT,I.toNumber=gr,I.toSafeInteger=GP,I.toString=yt,I.toUpper=ZT,I.trim=YT,I.trimEnd=JT,I.trimStart=XT,I.truncate=QT,I.unescape=eR,I.uniqueId=IR,I.upperCase=tR,I.upperFirst=Uf,I.each=gm,I.eachRight=mm,I.first=hm,kf(I,function(){var s={};return Mr(I,function(a,u){bt.call(I.prototype,u)||(s[u]=a)}),s}(),{chain:!1}),I.VERSION=r,lr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){I[s].placeholder=I}),lr(["drop","take"],function(s,a){dt.prototype[s]=function(u){u=u===n?1:dn(nt(u),0);var g=this.__filtered__&&!a?new dt(this):this.clone();return g.__filtered__?g.__takeCount__=In(u,g.__takeCount__):g.__views__.push({size:In(u,ie),type:s+(g.__dir__<0?"Right":"")}),g},dt.prototype[s+"Right"]=function(u){return this.reverse()[s](u).reverse()}}),lr(["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:je(y,3),type:u}),O.__filtered__=O.__filtered__||g,O}}),lr(["head","last"],function(s,a){var u="take"+(a?"Right":"");dt.prototype[s]=function(){return this[u](1).value()[0]}}),lr(["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(Kn)},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 va(u,s,a)})}),dt.prototype.reject=function(s){return this.filter(jl(je(s)))},dt.prototype.slice=function(s,a){s=nt(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!==n&&(a=nt(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)},Mr(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 gt=y.apply(I,gi([ht],H));return g&&_e?gt[0]:gt};he&&u&&typeof ue=="function"&&ue.length!=1&&(Z=he=!1);var _e=this.__chain__,De=!!this.__actions__.length,Ue=O&&!_e,st=Z&&!De;if(!O&&he){j=st?j:new dt(this);var Fe=s.apply(j,H);return Fe.__actions__.push({func:Rl,args:[pe],thisArg:n}),new hr(Fe,_e)}return Ue&&st?s.apply(this,H):(Fe=this.thru(pe),Ue?g?Fe.value()[0]:Fe.value():Fe)})}),lr(["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)})}}),Mr(dt.prototype,function(s,a){var u=I[a];if(u){var g=u.name+"";bt.call(eo,g)||(eo[g]=[]),eo[g].push({name:a,func:u})}}),eo[Sl(n,q).name]=[{name:"wrapper",func:n}],dt.prototype.clone=eO,dt.prototype.reverse=tO,dt.prototype.value=nO,I.prototype.at=P$,I.prototype.chain=T$,I.prototype.commit=R$,I.prototype.next=N$,I.prototype.plant=L$,I.prototype.reverse=j$,I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=U$,I.prototype.first=I.prototype.head,ha&&(I.prototype[ha]=M$),I},Js=RD();Yt?((Yt.exports=Js)._=Js,St._=Js):pt._=Js}).call(Ro)})(eh,eh.exports);var qE=Object.defineProperty,VE=Object.defineProperties,KE=Object.getOwnPropertyDescriptors,tg=Object.getOwnPropertySymbols,GE=Object.prototype.hasOwnProperty,ZE=Object.prototype.propertyIsEnumerable,ng=(t,e,n)=>e in t?qE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ja=(t,e)=>{for(var n in e||(e={}))GE.call(e,n)&&ng(t,n,e[n]);if(tg)for(var n of tg(e))ZE.call(e,n)&&ng(t,n,e[n]);return t},YE=(t,e)=>VE(t,KE(e));function Or(t,e,n){let r;const i=th(t);return e.rpcMap&&(r=e.rpcMap[i]),r||(r=`${WE}?chainId=eip155:${i}&projectId=${n}`),r}function th(t){return t.includes("eip155")?Number(t.split(":")[1]):Number(t)}function JE(t,e){if(!e.includes(t))throw new Error(`Chain '${t}' not approved. Please use one of the following: ${e.toString()}`)}function XE(t){return t.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function QE(t,e){const n=Object.keys(e.namespaces).filter(i=>i.includes(t));if(!n.length)return[];const r=[];return n.forEach(i=>{const o=e.namespaces[i].accounts;r.push(...o)}),r}function e7(t,e={}){const n=rg(t),r=rg(e);return eh.exports.merge(n,r)}function rg(t){var e,n,r,i;const o={};if(!ms(t))return o;for(const[c,l]of Object.entries(t)){const h=w1(c)?[c]:l.chains,d=l.methods||[],v=l.events||[],E=l.rpcMap||{},_=Ba(c);o[_]=YE(Ja(Ja({},o[_]),l),{chains:pu(h,(e=o[_])==null?void 0:e.chains),methods:pu(d,(n=o[_])==null?void 0:n.methods),events:pu(v,(r=o[_])==null?void 0:r.events),rpcMap:Ja(Ja({},E),(i=o[_])==null?void 0:i.rpcMap)})}return o}const ys=(t,e)=>{const n=r=>{r.request!==e.request||r.topic!==e.topic||(t.events.removeListener("session_request_sent",n),t7(e))};t.on("session_request_sent",n)};function t7(t){if(typeof window<"u")try{const e=window.localStorage.getItem("WALLETCONNECT_DEEPLINK_CHOICE");if(e){const n=JSON.parse(e),r=n?.href;if(typeof r=="string"){r.endsWith("/")&&r.slice(0,-1);const i=`${r}/wc?requestId=${t.id}&sessionTopic=${t.topic}`;window.open(i,"_self","noreferrer noopener")}}}catch(e){console.error(e)}}class n7{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 n;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?(n=e.request.params[0])==null?void 0:n.chainId:"0x0"),null;case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?(ys(this.client,e),await this.client.request(e)):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,n){const r=th(e);if(!this.httpProviders[r]){const i=n||Or(`${this.name}:${r}`,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,i)}this.chainId=r,this.events.emit(Ri.DEFAULT_CHAIN_CHANGED,`${this.name}:${r}`)}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,n){const r=n||Or(`${this.name}:${e}`,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new Ti(new vs(r))}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{var r;const i=th(n);e[i]=this.createHttpProvider(i,(r=this.namespace.rpcMap)==null?void 0:r[n])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}handleSwitchChain(e){const n=parseInt(e,16),r=`${this.name}:${n}`;JE(r,this.namespace.chains),this.setDefaultChain(`${n}`)}}class r7{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)?(ys(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,n){if(!this.httpProviders[e]){const r=n||Or(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.chainId=e,this.events.emit(Ri.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(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{var r;e[n]=this.createHttpProvider(n,(r=this.namespace.rpcMap)==null?void 0:r[n])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProvider(e,n){const r=n||Or(e,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new Ti(new vs(r))}}class i7{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)?(ys(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,n){if(this.chainId=e,!this.httpProviders[e]){const r=n||Or(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.events.emit(Ri.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{var r;e[n]=this.createHttpProvider(n,(r=this.namespace.rpcMap)==null?void 0:r[n])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProvider(e,n){const r=n||Or(e,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new Ti(new vs(r))}}class s7{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)?(ys(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,n){if(this.chainId=e,!this.httpProviders[e]){const r=n||this.getCardanoRPCUrl(e);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.events.emit(Ri.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{const r=this.getCardanoRPCUrl(n);e[n]=this.createHttpProvider(n,r)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}getCardanoRPCUrl(e){const n=this.namespace.rpcMap;if(n)return n[e]}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProvider(e,n){const r=n||this.getCardanoRPCUrl(e);return typeof r>"u"?void 0:new Ti(new vs(r))}}class o7{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)?(ys(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,n){if(!this.httpProviders[e]){const r=n||Or(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.chainId=e,this.events.emit(Ri.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(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{var r;e[n]=this.createHttpProvider(n,(r=this.namespace.rpcMap)==null?void 0:r[n])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProvider(e,n){const r=n||Or(e,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new Ti(new vs(r))}}class a7{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)?(ys(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,n){if(!this.httpProviders[e]){const r=n||Or(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.chainId=e,this.events.emit(Ri.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(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{var r;e[n]=this.createHttpProvider(n,(r=this.namespace.rpcMap)==null?void 0:r[n])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProvider(e,n){const r=n||Or(e,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new Ti(new vs(r))}}var c7=Object.defineProperty,l7=Object.defineProperties,u7=Object.getOwnPropertyDescriptors,ig=Object.getOwnPropertySymbols,h7=Object.prototype.hasOwnProperty,f7=Object.prototype.propertyIsEnumerable,sg=(t,e,n)=>e in t?c7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xa=(t,e)=>{for(var n in e||(e={}))h7.call(e,n)&&sg(t,n,e[n]);if(ig)for(var n of ig(e))f7.call(e,n)&&sg(t,n,e[n]);return t},nh=(t,e)=>l7(t,u7(e));class rh{constructor(e){this.events=new yn.exports,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.providerOpts=e,this.logger=typeof e?.logger<"u"&&typeof e?.logger!="string"?e.logger:mt.pino(mt.getDefaultLoggerOptions({level:e?.logger||Qp}))}static async init(e){const n=new rh(e);return await n.initialize(),n}async request(e,n){const[r,i]=this.validateChain(n);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(r).request({request:Xa({},e),chainId:`${r}:${i}`,topic:this.session.topic})}sendAsync(e,n,r){this.request(e,r).then(i=>n(null,i)).catch(i=>n(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,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}removeListener(e,n){this.events.removeListener(e,n)}off(e,n){this.events.off(e,n)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let n=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(n>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:r,approval:i}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});r&&(this.uri=r,this.events.emit("display_uri",r)),await i().then(o=>{this.session=o}).catch(o=>{if(o.message!==Kp)throw o;n++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,n){try{const[r,i]=this.validateChain(e);this.getProvider(r).setDefaultChain(i,n)}catch(r){if(!/Please call connect/.test(r.message))throw r}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const n=this.client.pairing.getAll();if(Ur(n)){for(const r of n)e.deletePairings?this.client.core.expirer.set(r.topic,0):await this.client.core.relayer.subscriber.unsubscribe(r.topic);this.logger.info(`Inactive pairings cleared: ${n.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 Xu.init({logger:this.providerOpts.logger||Qp,relayUrl:this.providerOpts.relayUrl||kE,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=>Ba(e)))].forEach(e=>{if(!this.session)return;const n=QE(e,this.session),r=XE(n),i=e7(this.namespaces,this.optionalNamespaces),o=nh(Xa({},i[e]),{accounts:n,chains:r});switch(e){case"eip155":this.rpcProviders[e]=new n7({client:this.client,namespace:o,events:this.events});break;case"solana":this.rpcProviders[e]=new r7({client:this.client,namespace:o,events:this.events});break;case"cosmos":this.rpcProviders[e]=new i7({client:this.client,namespace:o,events:this.events});break;case"polkadot":break;case"cip34":this.rpcProviders[e]=new s7({client:this.client,namespace:o,events:this.events});break;case"elrond":this.rpcProviders[e]=new o7({client:this.client,namespace:o,events:this.events});break;case"multiversx":this.rpcProviders[e]=new a7({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:n}=e,{event:r}=n;r.name==="accountsChanged"?this.events.emit("accountsChanged",r.data):r.name==="chainChanged"?this.onChainChanged(n.chainId):this.events.emit(r.name,r.data),this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:n})=>{var r;const{namespaces:i}=n,o=(r=this.client)==null?void 0:r.session.get(e);this.session=nh(Xa({},o),{namespaces:i}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:n})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",nh(Xa({},Gt("USER_DISCONNECTED")),{data:e.topic}))}),this.on(Ri.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 n;this.getProvider(e).updateNamespace((n=this.session)==null?void 0:n.namespaces[e])})}setNamespaces(e){const{namespaces:n,optionalNamespaces:r,sessionProperties:i}=e;if(!n||!Object.keys(n).length)throw new Error("Namespaces must be not empty");this.namespaces=n,this.optionalNamespaces=r,this.sessionProperties=i,this.persist("namespaces",n),this.persist("optionalNamespaces",r)}validateChain(e){const[n,r]=e?.split(":")||["",""];if(n&&!Object.keys(this.namespaces).map(c=>Ba(c)).includes(n))throw new Error(`Namespace '${n}' is not configured. Please call connect() first with namespace config.`);if(n&&r)return[n,r];const i=Ba(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,n=!1){var r;const[i,o]=this.validateChain(e);n||this.getProvider(i).setDefaultChain(o),((r=this.namespaces[i])!=null?r: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,n){this.client.core.storage.setItem(`${eg}/${e}`,n)}async getFromStore(e){return await this.client.core.storage.getItem(`${eg}/${e}`)}}const d7=rh,p7="wc",g7="ethereum_provider",m7=`${p7}@${2}:${g7}:`,w7="https://rpc.walletconnect.com/v1/",Qa=["eth_sendTransaction","personal_sign"],v7=["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"],y7=["message","disconnect","connect"];var b7=Object.defineProperty,_7=Object.defineProperties,E7=Object.getOwnPropertyDescriptors,og=Object.getOwnPropertySymbols,x7=Object.prototype.hasOwnProperty,C7=Object.prototype.propertyIsEnumerable,ag=(t,e,n)=>e in t?b7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ih=(t,e)=>{for(var n in e||(e={}))x7.call(e,n)&&ag(t,n,e[n]);if(og)for(var n of og(e))C7.call(e,n)&&ag(t,n,e[n]);return t},cg=(t,e)=>_7(t,E7(e));function sh(t){return Number(t[0].split(":")[1])}function oh(t){return`0x${t.toString(16)}`}function I7(t){const{chains:e,optionalChains:n,methods:r,optionalMethods:i,events:o,optionalEvents:c,rpcMap:l}=t;if(!Ur(e))throw new Error("Invalid chains");const h=e,d=r||Qa,v=o||ec,E={[sh(h)]:l[sh(h)]},_={chains:h,methods:d,events:v,rpcMap:E},S=o?.filter(q=>!ec.includes(q)),P=r?.filter(q=>!Qa.includes(q));if(!n&&!c&&!i&&!(S!=null&&S.length)&&!(P!=null&&P.length))return{required:_};const L=S?.length&&P?.length||!n,k={chains:[...new Set(L?h.concat(n||[]):n)],methods:[...new Set(d.concat(i||[]))],events:[...new Set(v.concat(c||[]))],rpcMap:l};return{required:_,optional:k}}class tc{constructor(){this.events=new yn.exports.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=m7,this.on=(e,n)=>(this.events.on(e,n),this),this.once=(e,n)=>(this.events.once(e,n),this),this.removeListener=(e,n)=>(this.events.removeListener(e,n),this),this.off=(e,n)=>(this.events.off(e,n),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const n=new tc;return await n.initialize(e),n}async request(e){return await this.signer.request(e,this.formatChainId(this.chainId))}sendAsync(e,n){this.signer.sendAsync(e,n,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:n,optional:r}=I7(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(cg(ih({namespaces:{[this.namespace]:n}},r&&{optionalNamespaces:{[this.namespace]:r}}),{pairingTopic:e?.pairingTopic})).then(d=>{c(d)}).catch(d=>{l(new Error(d.message))})});if(!i)return;this.setChainIds(this.rpc.chains);const o=l5(i.namespaces,[this.namespace]);this.setAccounts(o),this.events.emit("connect",{chainId:oh(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:n}=e,{event:r}=n;r.name==="accountsChanged"?(this.accounts=this.parseAccounts(r.data),this.events.emit("accountsChanged",this.accounts)):r.name==="chainChanged"?this.setChainId(this.formatChainId(r.data)):this.events.emit(r.name,r.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{const n=parseInt(e);this.chainId=n,this.events.emit("chainChanged",oh(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",cg(ih({},Gt("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var n,r;this.rpc.showQrModal&&((n=this.modal)==null||n.closeModal(),(r=this.modal)==null||r.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 n=e.filter(r=>this.isCompatibleChainId(r)).map(r=>this.parseChainId(r));n.length&&(this.chainId=n[0],this.events.emit("chainChanged",oh(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const n=this.parseChainId(e);this.chainId=n,this.setHttpProvider(n)}}parseAccountId(e){const[n,r,i]=e.split(":");return{chainId:`${n}:${r}`,address:i}}setAccounts(e){this.accounts=e.filter(n=>this.parseChainId(this.parseAccountId(n).chainId)===this.chainId).map(n=>this.parseAccountId(n).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var n,r;return{chains:((n=e.chains)==null?void 0:n.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:(r=e?.qrModalOptions)!=null?r:void 0,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,n){const r={};return e.forEach(i=>{r[i]=this.getRpcUrl(i,n)}),r}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=sh(this.rpc.chains),this.signer=await d7.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal)try{const{Web3Modal:n}=await Promise.resolve().then(function(){return J7});this.modal=new n(ih({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:n,optionalChains:r,rpcMap:i}=e;n&&Ur(n)&&(this.rpc.chains=n.map(o=>this.formatChainId(o)),n.forEach(o=>{this.rpc.rpcMap[o]=i?.[o]||this.getRpcUrl(o)})),r&&Ur(r)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=r?.map(o=>this.formatChainId(o)),r.forEach(o=>{this.rpc.rpcMap[o]=i?.[o]||this.getRpcUrl(o)}))}getRpcUrl(e,n){var r;return((r=this.rpc.rpcMap)==null?void 0:r[e])||`${w7}?chainId=eip155:${e}&projectId=${n||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(n=>this.parseAccount(n))}}const S7=tc,D7=Symbol(),lg=Object.getPrototypeOf,ah=new WeakMap,O7=t=>t&&(ah.has(t)?ah.get(t):lg(t)===Object.prototype||lg(t)===Array.prototype),A7=t=>O7(t)&&t[D7]||null,ug=(t,e=!0)=>{ah.set(t,e)},ch=t=>typeof t=="object"&&t!==null,Ni=new WeakMap,nc=new WeakSet,$7=(t=Object.is,e=(d,v)=>new Proxy(d,v),n=d=>ch(d)&&!nc.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),r=d=>{switch(d.status){case"fulfilled":return d.value;case"rejected":throw d.reason;default:throw d}},i=new WeakMap,o=(d,v,E=r)=>{const _=i.get(d);if(_?.[0]===v)return _[1];const S=Array.isArray(d)?[]:Object.create(Object.getPrototypeOf(d));return ug(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(nc.has(L))ug(L,!1);else if(L instanceof Promise)delete k.value,k.get=()=>E(L);else if(Ni.has(L)){const[q,T]=Ni.get(L);k.value=o(q,T(),E)}Object.defineProperty(S,P,k)}),S},c=new WeakMap,l=[1,1],h=d=>{if(!ch(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),ch(ee)&&(ee=A7(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{!Ni.has(ee)&&n(ee)&&(U=h(ee));const ae=!nc.has(U)&&Ni.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 Ni.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,Ni,nc,t,e,n,r,i,o,c,l],[P7]=$7();function si(t={}){return P7(t)}function Mi(t,e,n){const r=Ni.get(t);void 0!=="production"&&!r&&console.warn("Please use proxy object");let i;const o=[],c=r[3];let l=!1;const d=c(v=>{if(o.push(v),n){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 hg={},rc={};rc.byteLength=N7,rc.toByteArray=L7,rc.fromByteArray=F7;for(var Ar=[],sr=[],T7=typeof Uint8Array<"u"?Uint8Array:Array,lh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bs=0,R7=lh.length;bs<R7;++bs)Ar[bs]=lh[bs],sr[lh.charCodeAt(bs)]=bs;sr["-".charCodeAt(0)]=62,sr["_".charCodeAt(0)]=63;function fg(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function N7(t){var e=fg(t),n=e[0],r=e[1];return(n+r)*3/4-r}function M7(t,e,n){return(e+n)*3/4-n}function L7(t){var e,n=fg(t),r=n[0],i=n[1],o=new T7(M7(t,r,i)),c=0,l=i>0?r-4:r,h;for(h=0;h<l;h+=4)e=sr[t.charCodeAt(h)]<<18|sr[t.charCodeAt(h+1)]<<12|sr[t.charCodeAt(h+2)]<<6|sr[t.charCodeAt(h+3)],o[c++]=e>>16&255,o[c++]=e>>8&255,o[c++]=e&255;return i===2&&(e=sr[t.charCodeAt(h)]<<2|sr[t.charCodeAt(h+1)]>>4,o[c++]=e&255),i===1&&(e=sr[t.charCodeAt(h)]<<10|sr[t.charCodeAt(h+1)]<<4|sr[t.charCodeAt(h+2)]>>2,o[c++]=e>>8&255,o[c++]=e&255),o}function j7(t){return Ar[t>>18&63]+Ar[t>>12&63]+Ar[t>>6&63]+Ar[t&63]}function U7(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(j7(r));return i.join("")}function F7(t){for(var e,n=t.length,r=n%3,i=[],o=16383,c=0,l=n-r;c<l;c+=o)i.push(U7(t,c,c+o>l?l:c+o));return r===1?(e=t[n-1],i.push(Ar[e>>2]+Ar[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(Ar[e>>10]+Ar[e>>4&63]+Ar[e<<2&63]+"=")),i.join("")}var uh={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */uh.read=function(t,e,n,r,i){var o,c,l=i*8-r-1,h=(1<<l)-1,d=h>>1,v=-7,E=n?i-1:0,_=n?-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+=r;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,r),o=o-d}return(S?-1:1)*c*Math.pow(2,o-r)},uh.write=function(t,e,n,r,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=r?0:o-1,P=r?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[n+S]=l&255,S+=P,l/=256,i-=8);for(c=c<<i|l,d+=i;d>0;t[n+S]=c&255,S+=P,c/=256,d-=8);t[n+S-P]|=L*128};/*!
98
+ }`;var st=Hm(function(){return vt(O,De+"return "+pe).apply(n,j)});if(st.source=pe,L0(st))throw st;return st}function eN(s){return yt(s).toLowerCase()}function tN(s){return yt(s).toUpperCase()}function nN(s,a,u){if(s=yt(s),s&&(u||a===n))return J3(s);if(!s||!(a=Qn(a)))return s;var g=Er(s),y=Er(a),O=X3(g,y),j=Q3(g,y)+1;return xi(g,O,j).join("")}function rN(s,a,u){if(s=yt(s),s&&(u||a===n))return s.slice(0,t2(s)+1);if(!s||!(a=Qn(a)))return s;var g=Er(s),y=Q3(g,Er(a))+1;return xi(g,0,y).join("")}function iN(s,a,u){if(s=yt(s),s&&(u||a===n))return s.replace(qt,"");if(!s||!(a=Qn(a)))return s;var g=Er(s),y=X3(g,Er(a));return xi(g,y).join("")}function sN(s,a){var u=z,g=ee;if(Ft(a)){var y="separator"in a?a.separator:y;u="length"in a?nt(a.length):u,g="omission"in a?Qn(a.omission):g}s=yt(s);var O=s.length;if(Ys(s)){var j=Er(s);O=j.length}if(u>=O)return s;var H=u-Js(g);if(H<1)return g;var Z=j?xi(j,0,H).join(""):s.slice(0,H);if(y===n)return Z+g;if(j&&(H+=Z.length-H),j0(y)){if(s.slice(H).search(y)){var ue,he=Z;for(y.global||(y=Qf(y.source,yt(cr.exec(y))+"g")),y.lastIndex=0;ue=y.exec(he);)var pe=ue.index;Z=Z.slice(0,pe===n?H:pe)}}else if(s.indexOf(Qn(y),H)!=H){var _e=Z.lastIndexOf(y);_e>-1&&(Z=Z.slice(0,_e))}return Z+g}function oN(s){return s=yt(s),s&&kt.test(s)?s.replace(pi,MD):s}var aN=io(function(s,a,u){return s+(u?" ":"")+a.toUpperCase()}),B0=z2("toUpperCase");function km(s,a,u){return s=yt(s),a=u?n:a,a===n?$D(s)?UD(s):_D(s):s.match(a)||[]}var Hm=at(function(s,a){try{return wn(s,n,a)}catch(u){return L0(u)?u:new Ke(u)}}),cN=Jr(function(s,a){return ur(a,function(u){u=jr(u),Zr(s,u,R0(s[u],s))}),s});function lN(s){var a=s==null?0:s.length,u=je();return s=a?jt(s,function(g){if(typeof g[1]!="function")throw new hr(c);return[u(g[0]),g[1]]}):[],at(function(g){for(var y=-1;++y<a;){var O=s[y];if(wn(O[0],this,g))return wn(O[1],this,g)}})}function uN(s){return MO(dr(s,E))}function k0(s){return function(){return s}}function hN(s,a){return s==null||s!==s?a:s}var fN=q2(),dN=q2(!0);function Kn(s){return s}function H0(s){return _2(typeof s=="function"?s:dr(s,E))}function pN(s){return x2(dr(s,E))}function gN(s,a){return C2(s,dr(a,E))}var mN=at(function(s,a){return function(u){return ya(u,s,a)}}),wN=at(function(s,a){return function(u){return ya(s,u,a)}});function z0(s,a,u){var g=vn(a),y=_l(a,g);u==null&&!(Ft(a)&&(y.length||!g.length))&&(u=a,a=s,s=this,y=_l(a,vn(a)));var O=!(Ft(u)&&"chain"in u)||!!u.chain,j=Qr(s);return ur(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__=Wn(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 vN(){return gt._===this&&(gt._=WD),this}function W0(){}function yN(s){return s=nt(s),at(function(a){return I2(a,s)})}var bN=_0(jt),_N=_0(V3),EN=_0(Vf);function zm(s){return O0(s)?Kf(jr(s)):XO(s)}function xN(s){return function(a){return s==null?n:ls(s,a)}}var CN=K2(),IN=K2(!0);function q0(){return[]}function V0(){return!1}function SN(){return{}}function DN(){return""}function ON(){return!0}function AN(s,a){if(s=nt(s),s<1||s>ne)return[];var u=ie,g=In(s,ie);a=je(a),s-=ie;for(var y=Yf(g,a);++u<s;)a(u);return y}function $N(s){return Xe(s)?jt(s,jr):er(s)?[s]:Wn(lm(yt(s)))}function PN(s){var a=++HD;return yt(s)+a}var TN=Dl(function(s,a){return s+a},0),NN=E0("ceil"),RN=Dl(function(s,a){return s/a},1),MN=E0("floor");function LN(s){return s&&s.length?bl(s,Kn,a0):n}function jN(s,a){return s&&s.length?bl(s,je(a,2),a0):n}function UN(s){return Z3(s,Kn)}function FN(s,a){return Z3(s,je(a,2))}function BN(s){return s&&s.length?bl(s,Kn,h0):n}function kN(s,a){return s&&s.length?bl(s,je(a,2),h0):n}var HN=Dl(function(s,a){return s*a},1),zN=E0("round"),WN=Dl(function(s,a){return s-a},0);function qN(s){return s&&s.length?Zf(s,Kn):0}function VN(s,a){return s&&s.length?Zf(s,je(a,2)):0}return I.after=pP,I.ary=bm,I.assign=tT,I.assignIn=Rm,I.assignInWith=Bl,I.assignWith=nT,I.at=rT,I.before=_m,I.bind=R0,I.bindAll=cN,I.bindKey=Em,I.castArray=SP,I.chain=wm,I.chunk=MA,I.compact=LA,I.concat=jA,I.cond=lN,I.conforms=uN,I.constant=k0,I.countBy=q$,I.create=iT,I.curry=xm,I.curryRight=Cm,I.debounce=Im,I.defaults=sT,I.defaultsDeep=oT,I.defer=gP,I.delay=mP,I.difference=UA,I.differenceBy=FA,I.differenceWith=BA,I.drop=kA,I.dropRight=HA,I.dropRightWhile=zA,I.dropWhile=WA,I.fill=qA,I.filter=K$,I.flatMap=Y$,I.flatMapDeep=J$,I.flatMapDepth=X$,I.flatten=dm,I.flattenDeep=VA,I.flattenDepth=KA,I.flip=wP,I.flow=fN,I.flowRight=dN,I.fromPairs=GA,I.functions=dT,I.functionsIn=pT,I.groupBy=Q$,I.initial=YA,I.intersection=JA,I.intersectionBy=XA,I.intersectionWith=QA,I.invert=mT,I.invertBy=wT,I.invokeMap=tP,I.iteratee=H0,I.keyBy=nP,I.keys=vn,I.keysIn=Vn,I.map=Rl,I.mapKeys=yT,I.mapValues=bT,I.matches=pN,I.matchesProperty=gN,I.memoize=Ll,I.merge=_T,I.mergeWith=Mm,I.method=mN,I.methodOf=wN,I.mixin=z0,I.negate=jl,I.nthArg=yN,I.omit=ET,I.omitBy=xT,I.once=vP,I.orderBy=rP,I.over=bN,I.overArgs=yP,I.overEvery=_N,I.overSome=EN,I.partial=M0,I.partialRight=Sm,I.partition=iP,I.pick=CT,I.pickBy=Lm,I.property=zm,I.propertyOf=xN,I.pull=r$,I.pullAll=gm,I.pullAllBy=i$,I.pullAllWith=s$,I.pullAt=o$,I.range=CN,I.rangeRight=IN,I.rearg=bP,I.reject=aP,I.remove=a$,I.rest=_P,I.reverse=T0,I.sampleSize=lP,I.set=ST,I.setWith=DT,I.shuffle=uP,I.slice=c$,I.sortBy=dP,I.sortedUniq=g$,I.sortedUniqBy=m$,I.split=YT,I.spread=EP,I.tail=w$,I.take=v$,I.takeRight=y$,I.takeRightWhile=b$,I.takeWhile=_$,I.tap=L$,I.throttle=xP,I.thru=Nl,I.toArray=Pm,I.toPairs=jm,I.toPairsIn=Um,I.toPath=$N,I.toPlainObject=Nm,I.transform=OT,I.unary=CP,I.union=E$,I.unionBy=x$,I.unionWith=C$,I.uniq=I$,I.uniqBy=S$,I.uniqWith=D$,I.unset=AT,I.unzip=N0,I.unzipWith=mm,I.update=$T,I.updateWith=PT,I.values=ao,I.valuesIn=TT,I.without=O$,I.words=km,I.wrap=IP,I.xor=A$,I.xorBy=$$,I.xorWith=P$,I.zip=T$,I.zipObject=N$,I.zipObjectDeep=R$,I.zipWith=M$,I.entries=jm,I.entriesIn=Um,I.extend=Rm,I.extendWith=Bl,z0(I,I),I.add=TN,I.attempt=Hm,I.camelCase=LT,I.capitalize=Fm,I.ceil=NN,I.clamp=NT,I.clone=DP,I.cloneDeep=AP,I.cloneDeepWith=$P,I.cloneWith=OP,I.conformsTo=PP,I.deburr=Bm,I.defaultTo=hN,I.divide=RN,I.endsWith=jT,I.eq=Cr,I.escape=UT,I.escapeRegExp=FT,I.every=V$,I.find=G$,I.findIndex=hm,I.findKey=aT,I.findLast=Z$,I.findLastIndex=fm,I.findLastKey=cT,I.floor=MN,I.forEach=vm,I.forEachRight=ym,I.forIn=lT,I.forInRight=uT,I.forOwn=hT,I.forOwnRight=fT,I.get=U0,I.gt=TP,I.gte=NP,I.has=gT,I.hasIn=F0,I.head=pm,I.identity=Kn,I.includes=eP,I.indexOf=ZA,I.inRange=RT,I.invoke=vT,I.isArguments=fs,I.isArray=Xe,I.isArrayBuffer=RP,I.isArrayLike=qn,I.isArrayLikeObject=Jt,I.isBoolean=MP,I.isBuffer=Ci,I.isDate=LP,I.isElement=jP,I.isEmpty=UP,I.isEqual=FP,I.isEqualWith=BP,I.isError=L0,I.isFinite=kP,I.isFunction=Qr,I.isInteger=Dm,I.isLength=Ul,I.isMap=Om,I.isMatch=HP,I.isMatchWith=zP,I.isNaN=WP,I.isNative=qP,I.isNil=KP,I.isNull=VP,I.isNumber=Am,I.isObject=Ft,I.isObjectLike=Kt,I.isPlainObject=Ia,I.isRegExp=j0,I.isSafeInteger=GP,I.isSet=$m,I.isString=Fl,I.isSymbol=er,I.isTypedArray=oo,I.isUndefined=ZP,I.isWeakMap=YP,I.isWeakSet=JP,I.join=e$,I.kebabCase=BT,I.last=gr,I.lastIndexOf=t$,I.lowerCase=kT,I.lowerFirst=HT,I.lt=XP,I.lte=QP,I.max=LN,I.maxBy=jN,I.mean=UN,I.meanBy=FN,I.min=BN,I.minBy=kN,I.stubArray=q0,I.stubFalse=V0,I.stubObject=SN,I.stubString=DN,I.stubTrue=ON,I.multiply=HN,I.nth=n$,I.noConflict=vN,I.noop=W0,I.now=Ml,I.pad=zT,I.padEnd=WT,I.padStart=qT,I.parseInt=VT,I.random=MT,I.reduce=sP,I.reduceRight=oP,I.repeat=KT,I.replace=GT,I.result=IT,I.round=zN,I.runInContext=K,I.sample=cP,I.size=hP,I.snakeCase=ZT,I.some=fP,I.sortedIndex=l$,I.sortedIndexBy=u$,I.sortedIndexOf=h$,I.sortedLastIndex=f$,I.sortedLastIndexBy=d$,I.sortedLastIndexOf=p$,I.startCase=JT,I.startsWith=XT,I.subtract=WN,I.sum=qN,I.sumBy=VN,I.template=QT,I.times=AN,I.toFinite=ei,I.toInteger=nt,I.toLength=Tm,I.toLower=eN,I.toNumber=mr,I.toSafeInteger=eT,I.toString=yt,I.toUpper=tN,I.trim=nN,I.trimEnd=rN,I.trimStart=iN,I.truncate=sN,I.unescape=oN,I.uniqueId=PN,I.upperCase=aN,I.upperFirst=B0,I.each=vm,I.eachRight=ym,I.first=pm,z0(I,function(){var s={};return Mr(I,function(a,u){bt.call(I.prototype,u)||(s[u]=a)}),s}(),{chain:!1}),I.VERSION=r,ur(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){I[s].placeholder=I}),ur(["drop","take"],function(s,a){dt.prototype[s]=function(u){u=u===n?1:dn(nt(u),0);var g=this.__filtered__&&!a?new dt(this):this.clone();return g.__filtered__?g.__takeCount__=In(u,g.__takeCount__):g.__views__.push({size:In(u,ie),type:s+(g.__dir__<0?"Right":"")}),g},dt.prototype[s+"Right"]=function(u){return this.reverse()[s](u).reverse()}}),ur(["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:je(y,3),type:u}),O.__filtered__=O.__filtered__||g,O}}),ur(["head","last"],function(s,a){var u="take"+(a?"Right":"");dt.prototype[s]=function(){return this[u](1).value()[0]}}),ur(["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(Kn)},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 ya(u,s,a)})}),dt.prototype.reject=function(s){return this.filter(jl(je(s)))},dt.prototype.slice=function(s,a){s=nt(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!==n&&(a=nt(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)},Mr(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:Nl,args:[pe],thisArg:n}),new fr(Be,_e)}return Fe&&st?s.apply(this,H):(Be=this.thru(pe),Fe?g?Be.value()[0]:Be.value():Be)})}),ur(["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)})}}),Mr(dt.prototype,function(s,a){var u=I[a];if(u){var g=u.name+"";bt.call(to,g)||(to[g]=[]),to[g].push({name:a,func:u})}}),to[Sl(n,q).name]=[{name:"wrapper",func:n}],dt.prototype.clone=oO,dt.prototype.reverse=aO,dt.prototype.value=cO,I.prototype.at=j$,I.prototype.chain=U$,I.prototype.commit=F$,I.prototype.next=B$,I.prototype.plant=H$,I.prototype.reverse=z$,I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=W$,I.prototype.first=I.prototype.head,fa&&(I.prototype[fa]=k$),I},Xs=FD();Yt?((Yt.exports=Xs)._=Xs,St._=Xs):gt._=Xs}).call(Ro)})(nh,nh.exports);var YE=Object.defineProperty,JE=Object.defineProperties,XE=Object.getOwnPropertyDescriptors,ig=Object.getOwnPropertySymbols,QE=Object.prototype.hasOwnProperty,e7=Object.prototype.propertyIsEnumerable,sg=(t,e,n)=>e in t?YE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ja=(t,e)=>{for(var n in e||(e={}))QE.call(e,n)&&sg(t,n,e[n]);if(ig)for(var n of ig(e))e7.call(e,n)&&sg(t,n,e[n]);return t},t7=(t,e)=>JE(t,XE(e));function sr(t,e,n){let r;const i=rh(t);return e.rpcMap&&(r=e.rpcMap[i]),r||(r=`${ZE}?chainId=eip155:${i}&projectId=${n}`),r}function rh(t){return t.includes("eip155")?Number(t.split(":")[1]):Number(t)}function n7(t,e){if(!e.includes(t))throw new Error(`Chain '${t}' not approved. Please use one of the following: ${e.toString()}`)}function r7(t){return t.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function i7(t,e){const n=Object.keys(e.namespaces).filter(i=>i.includes(t));if(!n.length)return[];const r=[];return n.forEach(i=>{const o=e.namespaces[i].accounts;r.push(...o)}),r}function s7(t,e={}){const n=og(t),r=og(e);return nh.exports.merge(n,r)}function og(t){var e,n,r,i;const o={};if(!ys(t))return o;for(const[c,l]of Object.entries(t)){const h=v1(c)?[c]:l.chains,d=l.methods||[],v=l.events||[],E=l.rpcMap||{},_=Ba(c);o[_]=t7(Ja(Ja({},o[_]),l),{chains:mu(h,(e=o[_])==null?void 0:e.chains),methods:mu(d,(n=o[_])==null?void 0:n.methods),events:mu(v,(r=o[_])==null?void 0:r.events),rpcMap:Ja(Ja({},E),(i=o[_])==null?void 0:i.rpcMap)})}return o}const Li=(t,e)=>{const n=r=>{r.request!==e.request||r.topic!==e.topic||(t.events.removeListener("session_request_sent",n),o7(e))};t.on("session_request_sent",n)};function o7(t){if(typeof window<"u")try{const e=window.localStorage.getItem("WALLETCONNECT_DEEPLINK_CHOICE");if(e){const n=JSON.parse(e),r=n?.href;if(typeof r=="string"){r.endsWith("/")&&r.slice(0,-1);const i=`${r}/wc?requestId=${t.id}&sessionTopic=${t.topic}`;window.open(i,"_self","noreferrer noopener")}}}catch(e){console.error(e)}}class a7{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)?(Li(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,n){if(this.chainId=e,!this.httpProviders[e]){const r=n||sr(`${this.name}:${e}`,this.namespace);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.events.emit(oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{var r;e[n]=this.createHttpProvider(n,(r=this.namespace.rpcMap)==null?void 0:r[n])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProvider(e,n){const r=n||sr(e,this.namespace);return typeof r>"u"?void 0:new ii(new Mi(r))}}class c7{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 n;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?(n=e.request.params[0])==null?void 0:n.chainId:"0x0"),null;case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?(Li(this.client,e),await this.client.request(e)):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,n){const r=rh(e);if(!this.httpProviders[r]){const i=n||sr(`${this.name}:${r}`,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,i)}this.chainId=r,this.events.emit(oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${r}`)}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,n){const r=n||sr(`${this.name}:${e}`,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new ii(new Mi(r))}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{var r;const i=rh(n);e[i]=this.createHttpProvider(i,(r=this.namespace.rpcMap)==null?void 0:r[n])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}handleSwitchChain(e){const n=parseInt(e,16),r=`${this.name}:${n}`;n7(r,this.namespace.chains),this.setDefaultChain(`${n}`)}}class l7{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)?(Li(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,n){if(!this.httpProviders[e]){const r=n||sr(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}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(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{var r;e[n]=this.createHttpProvider(n,(r=this.namespace.rpcMap)==null?void 0:r[n])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProvider(e,n){const r=n||sr(e,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new ii(new Mi(r))}}class u7{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)?(Li(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,n){if(this.chainId=e,!this.httpProviders[e]){const r=n||sr(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.events.emit(oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{var r;e[n]=this.createHttpProvider(n,(r=this.namespace.rpcMap)==null?void 0:r[n])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProvider(e,n){const r=n||sr(e,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new ii(new Mi(r))}}class h7{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)?(Li(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,n){if(this.chainId=e,!this.httpProviders[e]){const r=n||this.getCardanoRPCUrl(e);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.events.emit(oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{const r=this.getCardanoRPCUrl(n);e[n]=this.createHttpProvider(n,r)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}getCardanoRPCUrl(e){const n=this.namespace.rpcMap;if(n)return n[e]}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProvider(e,n){const r=n||this.getCardanoRPCUrl(e);return typeof r>"u"?void 0:new ii(new Mi(r))}}class f7{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)?(Li(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,n){if(!this.httpProviders[e]){const r=n||sr(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}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(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{var r;e[n]=this.createHttpProvider(n,(r=this.namespace.rpcMap)==null?void 0:r[n])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProvider(e,n){const r=n||sr(e,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new ii(new Mi(r))}}class d7{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)?(Li(this.client,e),this.client.request(e)):this.getHttpProvider().request(e.request)}setDefaultChain(e,n){if(!this.httpProviders[e]){const r=n||sr(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}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(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{var r;e[n]=this.createHttpProvider(n,(r=this.namespace.rpcMap)==null?void 0:r[n])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProvider(e,n){const r=n||sr(e,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new ii(new Mi(r))}}var p7=Object.defineProperty,g7=Object.defineProperties,m7=Object.getOwnPropertyDescriptors,ag=Object.getOwnPropertySymbols,w7=Object.prototype.hasOwnProperty,v7=Object.prototype.propertyIsEnumerable,cg=(t,e,n)=>e in t?p7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xa=(t,e)=>{for(var n in e||(e={}))w7.call(e,n)&&cg(t,n,e[n]);if(ag)for(var n of ag(e))v7.call(e,n)&&cg(t,n,e[n]);return t},ih=(t,e)=>g7(t,m7(e));class sh{constructor(e){this.events=new yn.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||ng}))}static async init(e){const n=new sh(e);return await n.initialize(),n}async request(e,n){const[r,i]=this.validateChain(n);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(r).request({request:Xa({},e),chainId:`${r}:${i}`,topic:this.session.topic})}sendAsync(e,n,r){this.request(e,r).then(i=>n(null,i)).catch(i=>n(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,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}removeListener(e,n){this.events.removeListener(e,n)}off(e,n){this.events.off(e,n)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let n=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(n>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:r,approval:i}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});r&&(this.uri=r,this.events.emit("display_uri",r)),await i().then(o=>{this.session=o}).catch(o=>{if(o.message!==Yp)throw o;n++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,n){try{const[r,i]=this.validateChain(e);this.getProvider(r).setDefaultChain(i,n)}catch(r){if(!/Please call connect/.test(r.message))throw r}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const n=this.client.pairing.getAll();if(Ur(n)){for(const r of n)e.deletePairings?this.client.core.expirer.set(r.topic,0):await this.client.core.relayer.subscriber.unsubscribe(r.topic);this.logger.info(`Inactive pairings cleared: ${n.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 eh.init({logger:this.providerOpts.logger||ng,relayUrl:this.providerOpts.relayUrl||VE,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=>Ba(e)))].forEach(e=>{if(!this.session)return;const n=i7(e,this.session),r=r7(n),i=s7(this.namespaces,this.optionalNamespaces),o=ih(Xa({},i[e]),{accounts:n,chains:r});switch(e){case"eip155":this.rpcProviders[e]=new c7({client:this.client,namespace:o,events:this.events});break;case"solana":this.rpcProviders[e]=new l7({client:this.client,namespace:o,events:this.events});break;case"cosmos":this.rpcProviders[e]=new u7({client:this.client,namespace:o,events:this.events});break;case"polkadot":this.rpcProviders[e]=new a7({client:this.client,namespace:o,events:this.events});break;case"cip34":this.rpcProviders[e]=new h7({client:this.client,namespace:o,events:this.events});break;case"elrond":this.rpcProviders[e]=new f7({client:this.client,namespace:o,events:this.events});break;case"multiversx":this.rpcProviders[e]=new d7({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:n}=e,{event:r}=n;r.name==="accountsChanged"?this.events.emit("accountsChanged",r.data):r.name==="chainChanged"?this.onChainChanged(n.chainId):this.events.emit(r.name,r.data),this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:n})=>{var r;const{namespaces:i}=n,o=(r=this.client)==null?void 0:r.session.get(e);this.session=ih(Xa({},o),{namespaces:i}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:n})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",ih(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 n;this.getProvider(e).updateNamespace((n=this.session)==null?void 0:n.namespaces[e])})}setNamespaces(e){const{namespaces:n,optionalNamespaces:r,sessionProperties:i}=e;if(!n||!Object.keys(n).length)throw new Error("Namespaces must be not empty");this.namespaces=n,this.optionalNamespaces=r,this.sessionProperties=i,this.persist("namespaces",n),this.persist("optionalNamespaces",r)}validateChain(e){const[n,r]=e?.split(":")||["",""];if(n&&!Object.keys(this.namespaces).map(c=>Ba(c)).includes(n))throw new Error(`Namespace '${n}' is not configured. Please call connect() first with namespace config.`);if(n&&r)return[n,r];const i=Ba(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,n=!1){var r;const[i,o]=this.validateChain(e);n||this.getProvider(i).setDefaultChain(o),((r=this.namespaces[i])!=null?r: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,n){this.client.core.storage.setItem(`${rg}/${e}`,n)}async getFromStore(e){return await this.client.core.storage.getItem(`${rg}/${e}`)}}const y7=sh,b7="wc",_7="ethereum_provider",E7=`${b7}@${2}:${_7}:`,x7="https://rpc.walletconnect.com/v1/",Qa=["eth_sendTransaction","personal_sign"],C7=["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"],I7=["message","disconnect","connect"];var S7=Object.defineProperty,D7=Object.defineProperties,O7=Object.getOwnPropertyDescriptors,lg=Object.getOwnPropertySymbols,A7=Object.prototype.hasOwnProperty,$7=Object.prototype.propertyIsEnumerable,ug=(t,e,n)=>e in t?S7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,oh=(t,e)=>{for(var n in e||(e={}))A7.call(e,n)&&ug(t,n,e[n]);if(lg)for(var n of lg(e))$7.call(e,n)&&ug(t,n,e[n]);return t},hg=(t,e)=>D7(t,O7(e));function ah(t){return Number(t[0].split(":")[1])}function ch(t){return`0x${t.toString(16)}`}function P7(t){const{chains:e,optionalChains:n,methods:r,optionalMethods:i,events:o,optionalEvents:c,rpcMap:l}=t;if(!Ur(e))throw new Error("Invalid chains");const h=e,d=r||Qa,v=o||ec,E={[ah(h)]:l[ah(h)]},_={chains:h,methods:d,events:v,rpcMap:E},S=o?.filter(q=>!ec.includes(q)),P=r?.filter(q=>!Qa.includes(q));if(!n&&!c&&!i&&!(S!=null&&S.length)&&!(P!=null&&P.length))return{required:_};const L=S?.length&&P?.length||!n,k={chains:[...new Set(L?h.concat(n||[]):n)],methods:[...new Set(d.concat(i||[]))],events:[...new Set(v.concat(c||[]))],rpcMap:l};return{required:_,optional:k}}class tc{constructor(){this.events=new yn.exports.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=E7,this.on=(e,n)=>(this.events.on(e,n),this),this.once=(e,n)=>(this.events.once(e,n),this),this.removeListener=(e,n)=>(this.events.removeListener(e,n),this),this.off=(e,n)=>(this.events.off(e,n),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const n=new tc;return await n.initialize(e),n}async request(e){return await this.signer.request(e,this.formatChainId(this.chainId))}sendAsync(e,n){this.signer.sendAsync(e,n,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:n,optional:r}=P7(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(hg(oh({namespaces:{[this.namespace]:n}},r&&{optionalNamespaces:{[this.namespace]:r}}),{pairingTopic:e?.pairingTopic})).then(d=>{c(d)}).catch(d=>{l(new Error(d.message))})});if(!i)return;this.setChainIds(this.rpc.chains);const o=f5(i.namespaces,[this.namespace]);this.setAccounts(o),this.events.emit("connect",{chainId:ch(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:n}=e,{event:r}=n;r.name==="accountsChanged"?(this.accounts=this.parseAccounts(r.data),this.events.emit("accountsChanged",this.accounts)):r.name==="chainChanged"?this.setChainId(this.formatChainId(r.data)):this.events.emit(r.name,r.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{const n=parseInt(e);this.chainId=n,this.events.emit("chainChanged",ch(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",hg(oh({},Gt("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var n,r;this.rpc.showQrModal&&((n=this.modal)==null||n.closeModal(),(r=this.modal)==null||r.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 n=e.filter(r=>this.isCompatibleChainId(r)).map(r=>this.parseChainId(r));n.length&&(this.chainId=n[0],this.events.emit("chainChanged",ch(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const n=this.parseChainId(e);this.chainId=n,this.setHttpProvider(n)}}parseAccountId(e){const[n,r,i]=e.split(":");return{chainId:`${n}:${r}`,address:i}}setAccounts(e){this.accounts=e.filter(n=>this.parseChainId(this.parseAccountId(n).chainId)===this.chainId).map(n=>this.parseAccountId(n).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var n,r;return{chains:((n=e.chains)==null?void 0:n.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:(r=e?.qrModalOptions)!=null?r:void 0,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,n){const r={};return e.forEach(i=>{r[i]=this.getRpcUrl(i,n)}),r}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=ah(this.rpc.chains),this.signer=await y7.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal)try{const{Web3Modal:n}=await Promise.resolve().then(function(){return rx});this.modal=new n(oh({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:n,optionalChains:r,rpcMap:i}=e;n&&Ur(n)&&(this.rpc.chains=n.map(o=>this.formatChainId(o)),n.forEach(o=>{this.rpc.rpcMap[o]=i?.[o]||this.getRpcUrl(o)})),r&&Ur(r)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=r?.map(o=>this.formatChainId(o)),r.forEach(o=>{this.rpc.rpcMap[o]=i?.[o]||this.getRpcUrl(o)}))}getRpcUrl(e,n){var r;return((r=this.rpc.rpcMap)==null?void 0:r[e])||`${x7}?chainId=eip155:${e}&projectId=${n||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(n=>this.parseAccount(n))}}const T7=tc,N7=Symbol(),fg=Object.getPrototypeOf,lh=new WeakMap,R7=t=>t&&(lh.has(t)?lh.get(t):fg(t)===Object.prototype||fg(t)===Array.prototype),M7=t=>R7(t)&&t[N7]||null,dg=(t,e=!0)=>{lh.set(t,e)},uh=t=>typeof t=="object"&&t!==null,ji=new WeakMap,nc=new WeakSet,L7=(t=Object.is,e=(d,v)=>new Proxy(d,v),n=d=>uh(d)&&!nc.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),r=d=>{switch(d.status){case"fulfilled":return d.value;case"rejected":throw d.reason;default:throw d}},i=new WeakMap,o=(d,v,E=r)=>{const _=i.get(d);if(_?.[0]===v)return _[1];const S=Array.isArray(d)?[]:Object.create(Object.getPrototypeOf(d));return dg(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(nc.has(L))dg(L,!1);else if(L instanceof Promise)delete k.value,k.get=()=>E(L);else if(ji.has(L)){const[q,T]=ji.get(L);k.value=o(q,T(),E)}Object.defineProperty(S,P,k)}),S},c=new WeakMap,l=[1,1],h=d=>{if(!uh(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]))})}),N=Array.isArray(d)?[]:Object.create(Object.getPrototypeOf(d)),f=e(N,{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),uh(ee)&&(ee=M7(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{!ji.has(ee)&&n(ee)&&(U=h(ee));const ae=!nc.has(U)&&ji.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=[N,L,o,A];return ji.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(N,J,z)}),f})=>[h,ji,nc,t,e,n,r,i,o,c,l],[j7]=L7();function ai(t={}){return j7(t)}function Ui(t,e,n){const r=ji.get(t);void 0!=="production"&&!r&&console.warn("Please use proxy object");let i;const o=[],c=r[3];let l=!1;const d=c(v=>{if(o.push(v),n){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 pg={},rc={};rc.byteLength=B7,rc.toByteArray=H7,rc.fromByteArray=q7;for(var Ar=[],or=[],U7=typeof Uint8Array<"u"?Uint8Array:Array,hh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_s=0,F7=hh.length;_s<F7;++_s)Ar[_s]=hh[_s],or[hh.charCodeAt(_s)]=_s;or["-".charCodeAt(0)]=62,or["_".charCodeAt(0)]=63;function gg(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function B7(t){var e=gg(t),n=e[0],r=e[1];return(n+r)*3/4-r}function k7(t,e,n){return(e+n)*3/4-n}function H7(t){var e,n=gg(t),r=n[0],i=n[1],o=new U7(k7(t,r,i)),c=0,l=i>0?r-4:r,h;for(h=0;h<l;h+=4)e=or[t.charCodeAt(h)]<<18|or[t.charCodeAt(h+1)]<<12|or[t.charCodeAt(h+2)]<<6|or[t.charCodeAt(h+3)],o[c++]=e>>16&255,o[c++]=e>>8&255,o[c++]=e&255;return i===2&&(e=or[t.charCodeAt(h)]<<2|or[t.charCodeAt(h+1)]>>4,o[c++]=e&255),i===1&&(e=or[t.charCodeAt(h)]<<10|or[t.charCodeAt(h+1)]<<4|or[t.charCodeAt(h+2)]>>2,o[c++]=e>>8&255,o[c++]=e&255),o}function z7(t){return Ar[t>>18&63]+Ar[t>>12&63]+Ar[t>>6&63]+Ar[t&63]}function W7(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(z7(r));return i.join("")}function q7(t){for(var e,n=t.length,r=n%3,i=[],o=16383,c=0,l=n-r;c<l;c+=o)i.push(W7(t,c,c+o>l?l:c+o));return r===1?(e=t[n-1],i.push(Ar[e>>2]+Ar[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(Ar[e>>10]+Ar[e>>4&63]+Ar[e<<2&63]+"=")),i.join("")}var fh={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */fh.read=function(t,e,n,r,i){var o,c,l=i*8-r-1,h=(1<<l)-1,d=h>>1,v=-7,E=n?i-1:0,_=n?-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+=r;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,r),o=o-d}return(S?-1:1)*c*Math.pow(2,o-r)},fh.write=function(t,e,n,r,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=r?0:o-1,P=r?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[n+S]=l&255,S+=P,l/=256,i-=8);for(c=c<<i|l,d+=i;d>0;t[n+S]=c&255,S+=P,c/=256,d-=8);t[n+S-P]|=L*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=rc,n=uh,r=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 re(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 ne(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+">"},r&&(l.prototype[r]=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 Le(qe(p,b.length-m),b,m,$)}function z(b,p,m,$){return Le(At(p),b,m,$)}function ee(b,p,m,$){return Le(Ye(p),b,m,$)}function de(b,p,m,$){return Le($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 ne(b,p,m){let $="";m=Math.min(b.length,m);for(let B=p;B<m;++B)$+=String.fromCharCode(b[B]);return $}function re(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),n.read(this,p,!0,23,4)},l.prototype.readFloatBE=function(p,m){return p=p>>>0,m||ie(p,4,this.length),n.read(this,p,!1,23,4)},l.prototype.readDoubleLE=function(p,m){return p=p>>>0,m||ie(p,8,this.length),n.read(this,p,!0,52,8)},l.prototype.readDoubleBE=function(p,m){return p=p>>>0,m||ie(p,8,this.length),n.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),n.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),n.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 Le(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")}})(hg);let hh;const Nt={ethereumClient:void 0,setEthereumClient(t){hh=t},client(){if(hh)return hh;throw new Error("ClientCtrl has no client set")}},Bt=si({address:void 0,profileName:void 0,profileAvatar:void 0,profileLoading:!1,balanceLoading:!1,balance:void 0,isConnected:!1}),Et={state:Bt,subscribe(t){return Mi(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 n=e??Bt.address,{id:r}=Nt.client().getDefaultChain();if(n&&r===1){const[i,o]=await Promise.all([Nt.client().fetchEnsName({address:n,chainId:1}),Nt.client().fetchEnsAvatar({address:n,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 n=await Nt.client().fetchBalance({address:e});Bt.balance={amount:n.formatted,symbol:n.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}},rt={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 rt.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,n){if(rt.isHttpUrl(t))return this.formatUniversalUrl(t,e,n);let r=t;r.includes("://")||(r=t.replaceAll("/","").replaceAll(":",""),r=`${r}://`),this.setWalletConnectDeepLink(r,n);const i=encodeURIComponent(e);return`${r}wc?uri=${i}`},formatUniversalUrl(t,e,n){if(!rt.isHttpUrl(t))return this.formatNativeUrl(t,e,n);let r=t;t.endsWith("/")&&(r=t.slice(0,-1)),this.setWalletConnectDeepLink(r,n);const i=encodeURIComponent(e);return`${r}/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(rt.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:e}))},setWalletConnectAndroidDeepLink(t){const[e]=t.split("?");localStorage.setItem(rt.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:"Android"}))},removeWalletConnectDeepLink(){localStorage.removeItem(rt.WALLETCONNECT_DEEPLINK_CHOICE)},isNull(t){return t===null},setWeb3ModalVersionInStorage(){typeof localStorage<"u"&&localStorage.setItem(rt.W3M_VERSION,"2.2.2")}},Tn=si({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:Tn,subscribe(t){return Mi(Tn,()=>t(Tn))},setChains(t){Tn.chains=t},setStandaloneChains(t){Tn.standaloneChains=t},setStandaloneUri(t){Tn.standaloneUri=t},getSelectedChain(){const t=Nt.client().getNetwork().chain;return t&&(Tn.selectedChain=t),Tn.selectedChain},setSelectedChain(t){Tn.selectedChain=t},setIsStandalone(t){Tn.isStandalone=t},setIsCustomDesktop(t){Tn.isCustomDesktop=t},setIsCustomMobile(t){Tn.isCustomMobile=t},setIsDataLoaded(t){Tn.isDataLoaded=t},setIsUiLoaded(t){Tn.isUiLoaded=t},setWalletConnectVersion(t){Tn.walletConnectVersion=t}},ic=si({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}),cn={state:ic,subscribe(t){return Mi(ic,()=>t(ic))},setConfig(t){var e,n,r,i;if($e.setStandaloneChains(t.standaloneChains),$e.setIsStandalone(!!((e=t.standaloneChains)!=null&&e.length)||!!t.enableStandaloneMode),$e.setIsCustomMobile(!!((n=t.mobileWallets)!=null&&n.length)),$e.setIsCustomDesktop(!!((r=t.desktopWallets)!=null&&r.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),rt.setWeb3ModalVersionInStorage(),Object.assign(ic,t)}},dg="https://explorer-api.walletconnect.com";function B7(t){const e=Object.fromEntries(Object.entries(t).filter(([n,r])=>typeof r<"u"&&r!==null&&r!=="").map(([n,r])=>[n,r.toString()]));return new URLSearchParams(e).toString()}const sc={async fetchWallets(t,e){const n=B7(e),r=`${dg}/v3/wallets?projectId=${t}&${n}`;return(await fetch(r)).json()},formatImageUrl(t,e){return`${dg}/v3/logo/lg/${e}?projectId=${t}`}},Li=si({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},previewWallets:[],recomendedWallets:[]});function oc(){const{projectId:t}=cn.state;if(!t)throw new Error("projectId is required to work with explorer api");return t}const ln={state:Li,async getPreviewWallets(t){const{listings:e}=await sc.fetchWallets(oc(),t);return Li.previewWallets=Object.values(e),Li.previewWallets},async getRecomendedWallets(){const{listings:t}=await sc.fetchWallets(oc(),{page:1,entries:6});Li.recomendedWallets=Object.values(t)},async getPaginatedWallets(t){const{page:e,search:n}=t,{listings:r,total:i}=await sc.fetchWallets(oc(),t),o=Object.values(r),c=n?"search":"wallets";return Li[c]={listings:[...Li[c].listings,...o],total:i,page:e??1},{listings:o,total:i}},getImageUrl(t){return sc.formatImageUrl(oc(),t)},resetSearch(){Li.search={listings:[],total:0,page:1}}},Zn=si({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),lt={state:Zn,subscribe(t){return Mi(Zn,()=>t(Zn))},push(t,e){t!==Zn.view&&(Zn.view=t,e&&(Zn.data=e),Zn.history.push(t))},replace(t){Zn.view=t,Zn.history=[t]},goBack(){if(Zn.history.length>1){Zn.history.pop();const[t]=Zn.history.slice(-1);Zn.view=t}}},_s=si({open:!1}),un={state:_s,subscribe(t){return Mi(_s,()=>t(_s))},async open(t){return new Promise(e=>{const{isStandalone:n,isUiLoaded:r,isDataLoaded:i}=$e.state,{isConnected:o}=Et.state,{enableNetworkView:c}=cn.state;if(n?($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"),r&&i)_s.open=!0,e();else{const l=setInterval(()=>{$e.state.isUiLoaded&&$e.state.isDataLoaded&&(clearInterval(l),_s.open=!0,e())},200)}})},close(){_s.open=!1}};var k7=Object.defineProperty,pg=Object.getOwnPropertySymbols,H7=Object.prototype.hasOwnProperty,z7=Object.prototype.propertyIsEnumerable,gg=(t,e,n)=>e in t?k7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,W7=(t,e)=>{for(var n in e||(e={}))H7.call(e,n)&&gg(t,n,e[n]);if(pg)for(var n of pg(e))z7.call(e,n)&&gg(t,n,e[n]);return t};function q7(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const No=si({themeMode:q7()?"dark":"light"}),Hr={state:No,subscribe(t){return Mi(No,()=>t(No))},setThemeConfig(t){const{themeMode:e,themeVariables:n}=t;e&&(No.themeMode=e),n&&(No.themeVariables=W7({},n))}},ji=si({open:!1,message:"",variant:"success"}),Cn={state:ji,subscribe(t){return Mi(ji,()=>t(ji))},openToast(t,e){ji.open=!0,ji.message=t,ji.variant=e},closeToast(){ji.open=!1}};typeof window<"u"&&(window.Buffer||(window.Buffer=hg.Buffer),window.global||(window.global=window),window.process||(window.process={env:{}}));var V7=Object.defineProperty,mg=Object.getOwnPropertySymbols,K7=Object.prototype.hasOwnProperty,G7=Object.prototype.propertyIsEnumerable,wg=(t,e,n)=>e in t?V7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Z7=(t,e)=>{for(var n in e||(e={}))K7.call(e,n)&&wg(t,n,e[n]);if(mg)for(var n of mg(e))G7.call(e,n)&&wg(t,n,e[n]);return t};class Y7{constructor(e){this.openModal=un.open,this.closeModal=un.close,this.subscribeModal=un.subscribe,this.setTheme=Hr.setThemeConfig,Hr.setThemeConfig(e),cn.setConfig(Z7({enableStandaloneMode:!0},e)),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(function(){return lD});const e=document.createElement("w3m-modal");document.body.insertAdjacentElement("beforeend",e),$e.setIsUiLoaded(!0)}}}var J7=Object.freeze({__proto__:null,Web3Modal:Y7});/**
103
+ */(function(t){const e=rc,n=fh,r=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 re(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 ne(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 N(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)N(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)N(this,m,m+3),N(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)N(this,m,m+7),N(this,m+1,m+6),N(this,m+2,m+5),N(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+">"},r&&(l.prototype[r]=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 Le(qe(p,b.length-m),b,m,$)}function z(b,p,m,$){return Le(At(p),b,m,$)}function ee(b,p,m,$){return Le(Ye(p),b,m,$)}function de(b,p,m,$){return Le($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 ne(b,p,m){let $="";m=Math.min(b.length,m);for(let B=p;B<m;++B)$+=String.fromCharCode(b[B]);return $}function re(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),n.read(this,p,!0,23,4)},l.prototype.readFloatBE=function(p,m){return p=p>>>0,m||ie(p,4,this.length),n.read(this,p,!1,23,4)},l.prototype.readDoubleLE=function(p,m){return p=p>>>0,m||ie(p,8,this.length),n.read(this,p,!0,52,8)},l.prototype.readDoubleBE=function(p,m){return p=p>>>0,m||ie(p,8,this.length),n.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 Re(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 Re(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 Re(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),n.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),n.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 Le(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")}})(pg);let dh;const Rt={ethereumClient:void 0,setEthereumClient(t){dh=t},client(){if(dh)return dh;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 Ui(Bt,()=>t(Bt))},getAccount(){const t=Rt.client().getAccount();Bt.address=t.address,Bt.isConnected=t.isConnected},async fetchProfile(t,e){try{Bt.profileLoading=!0;const n=e??Bt.address,{id:r}=Rt.client().getDefaultChain();if(n&&r===1){const[i,o]=await Promise.all([Rt.client().fetchEnsName({address:n,chainId:1}),Rt.client().fetchEnsAvatar({address:n,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 n=await Rt.client().fetchBalance({address:e});Bt.balance={amount:n.formatted,symbol:n.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}},rt={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 rt.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,n){if(rt.isHttpUrl(t))return this.formatUniversalUrl(t,e,n);let r=t;r.includes("://")||(r=t.replaceAll("/","").replaceAll(":",""),r=`${r}://`),this.setWalletConnectDeepLink(r,n);const i=encodeURIComponent(e);return`${r}wc?uri=${i}`},formatUniversalUrl(t,e,n){if(!rt.isHttpUrl(t))return this.formatNativeUrl(t,e,n);let r=t;t.endsWith("/")&&(r=t.slice(0,-1)),this.setWalletConnectDeepLink(r,n);const i=encodeURIComponent(e);return`${r}/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(rt.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:e}))},setWalletConnectAndroidDeepLink(t){const[e]=t.split("?");localStorage.setItem(rt.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:"Android"}))},removeWalletConnectDeepLink(){localStorage.removeItem(rt.WALLETCONNECT_DEEPLINK_CHOICE)},isNull(t){return t===null},setWeb3ModalVersionInStorage(){typeof localStorage<"u"&&localStorage.setItem(rt.W3M_VERSION,"2.2.2")}},Tn=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:Tn,subscribe(t){return Ui(Tn,()=>t(Tn))},setChains(t){Tn.chains=t},setStandaloneChains(t){Tn.standaloneChains=t},setStandaloneUri(t){Tn.standaloneUri=t},getSelectedChain(){const t=Rt.client().getNetwork().chain;return t&&(Tn.selectedChain=t),Tn.selectedChain},setSelectedChain(t){Tn.selectedChain=t},setIsStandalone(t){Tn.isStandalone=t},setIsCustomDesktop(t){Tn.isCustomDesktop=t},setIsCustomMobile(t){Tn.isCustomMobile=t},setIsDataLoaded(t){Tn.isDataLoaded=t},setIsUiLoaded(t){Tn.isUiLoaded=t},setWalletConnectVersion(t){Tn.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}),cn={state:ic,subscribe(t){return Ui(ic,()=>t(ic))},setConfig(t){var e,n,r,i;if($e.setStandaloneChains(t.standaloneChains),$e.setIsStandalone(!!((e=t.standaloneChains)!=null&&e.length)||!!t.enableStandaloneMode),$e.setIsCustomMobile(!!((n=t.mobileWallets)!=null&&n.length)),$e.setIsCustomDesktop(!!((r=t.desktopWallets)!=null&&r.length)),$e.setWalletConnectVersion((i=t.walletConnectVersion)!=null?i:1),!$e.state.isStandalone){const o=Rt.client().getDefaultChain();$e.setSelectedChain(o),$e.setChains(Rt.client().chains)}t.defaultChain&&$e.setSelectedChain(t.defaultChain),rt.setWeb3ModalVersionInStorage(),Object.assign(ic,t)}},mg="https://explorer-api.walletconnect.com";function V7(t){const e=Object.fromEntries(Object.entries(t).filter(([n,r])=>typeof r<"u"&&r!==null&&r!=="").map(([n,r])=>[n,r.toString()]));return new URLSearchParams(e).toString()}const sc={async fetchWallets(t,e){const n=V7(e),r=`${mg}/v3/wallets?projectId=${t}&${n}`;return(await fetch(r)).json()},formatImageUrl(t,e){return`${mg}/v3/logo/lg/${e}?projectId=${t}`}},Fi=ai({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},previewWallets:[],recomendedWallets:[]});function oc(){const{projectId:t}=cn.state;if(!t)throw new Error("projectId is required to work with explorer api");return t}const ln={state:Fi,async getPreviewWallets(t){const{listings:e}=await sc.fetchWallets(oc(),t);return Fi.previewWallets=Object.values(e),Fi.previewWallets},async getRecomendedWallets(){const{listings:t}=await sc.fetchWallets(oc(),{page:1,entries:6});Fi.recomendedWallets=Object.values(t)},async getPaginatedWallets(t){const{page:e,search:n}=t,{listings:r,total:i}=await sc.fetchWallets(oc(),t),o=Object.values(r),c=n?"search":"wallets";return Fi[c]={listings:[...Fi[c].listings,...o],total:i,page:e??1},{listings:o,total:i}},getImageUrl(t){return sc.formatImageUrl(oc(),t)},resetSearch(){Fi.search={listings:[],total:0,page:1}}},Zn=ai({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),lt={state:Zn,subscribe(t){return Ui(Zn,()=>t(Zn))},push(t,e){t!==Zn.view&&(Zn.view=t,e&&(Zn.data=e),Zn.history.push(t))},replace(t){Zn.view=t,Zn.history=[t]},goBack(){if(Zn.history.length>1){Zn.history.pop();const[t]=Zn.history.slice(-1);Zn.view=t}}},Es=ai({open:!1}),un={state:Es,subscribe(t){return Ui(Es,()=>t(Es))},async open(t){return new Promise(e=>{const{isStandalone:n,isUiLoaded:r,isDataLoaded:i}=$e.state,{isConnected:o}=Et.state,{enableNetworkView:c}=cn.state;if(n?($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"),r&&i)Es.open=!0,e();else{const l=setInterval(()=>{$e.state.isUiLoaded&&$e.state.isDataLoaded&&(clearInterval(l),Es.open=!0,e())},200)}})},close(){Es.open=!1}};var K7=Object.defineProperty,wg=Object.getOwnPropertySymbols,G7=Object.prototype.hasOwnProperty,Z7=Object.prototype.propertyIsEnumerable,vg=(t,e,n)=>e in t?K7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Y7=(t,e)=>{for(var n in e||(e={}))G7.call(e,n)&&vg(t,n,e[n]);if(wg)for(var n of wg(e))Z7.call(e,n)&&vg(t,n,e[n]);return t};function J7(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const Mo=ai({themeMode:J7()?"dark":"light"}),Hr={state:Mo,subscribe(t){return Ui(Mo,()=>t(Mo))},setThemeConfig(t){const{themeMode:e,themeVariables:n}=t;e&&(Mo.themeMode=e),n&&(Mo.themeVariables=Y7({},n))}},Bi=ai({open:!1,message:"",variant:"success"}),Cn={state:Bi,subscribe(t){return Ui(Bi,()=>t(Bi))},openToast(t,e){Bi.open=!0,Bi.message=t,Bi.variant=e},closeToast(){Bi.open=!1}};typeof window<"u"&&(window.Buffer||(window.Buffer=pg.Buffer),window.global||(window.global=window),window.process||(window.process={env:{}}));var X7=Object.defineProperty,yg=Object.getOwnPropertySymbols,Q7=Object.prototype.hasOwnProperty,ex=Object.prototype.propertyIsEnumerable,bg=(t,e,n)=>e in t?X7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,tx=(t,e)=>{for(var n in e||(e={}))Q7.call(e,n)&&bg(t,n,e[n]);if(yg)for(var n of yg(e))ex.call(e,n)&&bg(t,n,e[n]);return t};class nx{constructor(e){this.openModal=un.open,this.closeModal=un.close,this.subscribeModal=un.subscribe,this.setTheme=Hr.setThemeConfig,Hr.setThemeConfig(e),cn.setConfig(tx({enableStandaloneMode:!0},e)),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(function(){return gD});const e=document.createElement("w3m-modal");document.body.insertAdjacentElement("beforeend",e),$e.setIsUiLoaded(!0)}}}var rx=Object.freeze({__proto__:null,Web3Modal:nx});/**
104
104
  * @license
105
105
  * Copyright 2019 Google LLC
106
106
  * SPDX-License-Identifier: BSD-3-Clause
107
- */const ac=window,fh=ac.ShadowRoot&&(ac.ShadyCSS===void 0||ac.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,dh=Symbol(),vg=new WeakMap;class yg{constructor(e,n,r){if(this._$cssResult$=!0,r!==dh)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}get styleSheet(){let e=this.o;const n=this.t;if(fh&&e===void 0){const r=n!==void 0&&n.length===1;r&&(e=vg.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&vg.set(n,e))}return e}toString(){return this.cssText}}const X7=t=>new yg(typeof t=="string"?t:t+"",void 0,dh),Ge=(t,...e)=>{const n=t.length===1?t[0]:e.reduce((r,i,o)=>r+(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 yg(n,t,dh)},Q7=(t,e)=>{fh?t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet):e.forEach(n=>{const r=document.createElement("style"),i=ac.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=n.cssText,t.appendChild(r)})},bg=fh?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const r of e.cssRules)n+=r.cssText;return X7(n)})(t):t;/**
107
+ */const ac=window,ph=ac.ShadowRoot&&(ac.ShadyCSS===void 0||ac.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,gh=Symbol(),_g=new WeakMap;class Eg{constructor(e,n,r){if(this._$cssResult$=!0,r!==gh)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}get styleSheet(){let e=this.o;const n=this.t;if(ph&&e===void 0){const r=n!==void 0&&n.length===1;r&&(e=_g.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&_g.set(n,e))}return e}toString(){return this.cssText}}const ix=t=>new Eg(typeof t=="string"?t:t+"",void 0,gh),Ge=(t,...e)=>{const n=t.length===1?t[0]:e.reduce((r,i,o)=>r+(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 Eg(n,t,gh)},sx=(t,e)=>{ph?t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet):e.forEach(n=>{const r=document.createElement("style"),i=ac.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=n.cssText,t.appendChild(r)})},xg=ph?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const r of e.cssRules)n+=r.cssText;return ix(n)})(t):t;/**
108
108
  * @license
109
109
  * Copyright 2017 Google LLC
110
110
  * SPDX-License-Identifier: BSD-3-Clause
111
- */var ph;const cc=window,_g=cc.trustedTypes,ex=_g?_g.emptyScript:"",Eg=cc.reactiveElementPolyfillSupport,gh={toAttribute(t,e){switch(e){case Boolean:t=t?ex:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=t!==null;break;case Number:n=t===null?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch{n=null}}return n}},xg=(t,e)=>e!==t&&(e==e||t==t),mh={attribute:!0,type:String,converter:gh,reflect:!1,hasChanged:xg};class Es extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var n;this.finalize(),((n=this.h)!==null&&n!==void 0?n:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((n,r)=>{const i=this._$Ep(r,n);i!==void 0&&(this._$Ev.set(i,r),e.push(i))}),e}static createProperty(e,n=mh){if(n.state&&(n.attribute=!1),this.finalize(),this.elementProperties.set(e,n),!n.noAccessor&&!this.prototype.hasOwnProperty(e)){const r=typeof e=="symbol"?Symbol():"__"+e,i=this.getPropertyDescriptor(e,r,n);i!==void 0&&Object.defineProperty(this.prototype,e,i)}}static getPropertyDescriptor(e,n,r){return{get(){return this[n]},set(i){const o=this[e];this[n]=i,this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||mh}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 n=this.properties,r=[...Object.getOwnPropertyNames(n),...Object.getOwnPropertySymbols(n)];for(const i of r)this.createProperty(i,n[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const n=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const i of r)n.unshift(bg(i))}else e!==void 0&&n.push(bg(e));return n}static _$Ep(e,n){const r=n.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(n=>n(this))}addController(e){var n,r;((n=this._$ES)!==null&&n!==void 0?n:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((r=e.hostConnected)===null||r===void 0||r.call(e))}removeController(e){var n;(n=this._$ES)===null||n===void 0||n.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,n)=>{this.hasOwnProperty(n)&&(this._$Ei.set(n,this[n]),delete this[n])})}createRenderRoot(){var e;const n=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return Q7(n,this.constructor.elementStyles),n}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(n=>{var r;return(r=n.hostConnected)===null||r===void 0?void 0:r.call(n)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(n=>{var r;return(r=n.hostDisconnected)===null||r===void 0?void 0:r.call(n)})}attributeChangedCallback(e,n,r){this._$AK(e,r)}_$EO(e,n,r=mh){var i;const o=this.constructor._$Ep(e,r);if(o!==void 0&&r.reflect===!0){const c=(((i=r.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?r.converter:gh).toAttribute(n,r.type);this._$El=e,c==null?this.removeAttribute(o):this.setAttribute(o,c),this._$El=null}}_$AK(e,n){var r;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}:((r=c.converter)===null||r===void 0?void 0:r.fromAttribute)!==void 0?c.converter:gh;this._$El=o,this[o]=l.fromAttribute(n,c.type),this._$El=null}}requestUpdate(e,n,r){let i=!0;e!==void 0&&(((r=r||this.constructor.getPropertyOptions(e)).hasChanged||xg)(this[e],n)?(this._$AL.has(e)||this._$AL.set(e,n),r.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,r))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(n){Promise.reject(n)}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 n=!1;const r=this._$AL;try{n=this.shouldUpdate(r),n?(this.willUpdate(r),(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(r)):this._$Ek()}catch(i){throw n=!1,this._$Ek(),i}n&&this._$AE(r)}willUpdate(e){}_$AE(e){var n;(n=this._$ES)===null||n===void 0||n.forEach(r=>{var i;return(i=r.hostUpdated)===null||i===void 0?void 0:i.call(r)}),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((n,r)=>this._$EO(r,this[r],n)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}Es.finalized=!0,Es.elementProperties=new Map,Es.elementStyles=[],Es.shadowRootOptions={mode:"open"},Eg?.({ReactiveElement:Es}),((ph=cc.reactiveElementVersions)!==null&&ph!==void 0?ph:cc.reactiveElementVersions=[]).push("1.6.1");/**
111
+ */var mh;const cc=window,Cg=cc.trustedTypes,ox=Cg?Cg.emptyScript:"",Ig=cc.reactiveElementPolyfillSupport,wh={toAttribute(t,e){switch(e){case Boolean:t=t?ox:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=t!==null;break;case Number:n=t===null?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch{n=null}}return n}},Sg=(t,e)=>e!==t&&(e==e||t==t),vh={attribute:!0,type:String,converter:wh,reflect:!1,hasChanged:Sg};class xs extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var n;this.finalize(),((n=this.h)!==null&&n!==void 0?n:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((n,r)=>{const i=this._$Ep(r,n);i!==void 0&&(this._$Ev.set(i,r),e.push(i))}),e}static createProperty(e,n=vh){if(n.state&&(n.attribute=!1),this.finalize(),this.elementProperties.set(e,n),!n.noAccessor&&!this.prototype.hasOwnProperty(e)){const r=typeof e=="symbol"?Symbol():"__"+e,i=this.getPropertyDescriptor(e,r,n);i!==void 0&&Object.defineProperty(this.prototype,e,i)}}static getPropertyDescriptor(e,n,r){return{get(){return this[n]},set(i){const o=this[e];this[n]=i,this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||vh}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 n=this.properties,r=[...Object.getOwnPropertyNames(n),...Object.getOwnPropertySymbols(n)];for(const i of r)this.createProperty(i,n[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const n=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const i of r)n.unshift(xg(i))}else e!==void 0&&n.push(xg(e));return n}static _$Ep(e,n){const r=n.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(n=>n(this))}addController(e){var n,r;((n=this._$ES)!==null&&n!==void 0?n:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((r=e.hostConnected)===null||r===void 0||r.call(e))}removeController(e){var n;(n=this._$ES)===null||n===void 0||n.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,n)=>{this.hasOwnProperty(n)&&(this._$Ei.set(n,this[n]),delete this[n])})}createRenderRoot(){var e;const n=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return sx(n,this.constructor.elementStyles),n}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(n=>{var r;return(r=n.hostConnected)===null||r===void 0?void 0:r.call(n)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(n=>{var r;return(r=n.hostDisconnected)===null||r===void 0?void 0:r.call(n)})}attributeChangedCallback(e,n,r){this._$AK(e,r)}_$EO(e,n,r=vh){var i;const o=this.constructor._$Ep(e,r);if(o!==void 0&&r.reflect===!0){const c=(((i=r.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?r.converter:wh).toAttribute(n,r.type);this._$El=e,c==null?this.removeAttribute(o):this.setAttribute(o,c),this._$El=null}}_$AK(e,n){var r;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}:((r=c.converter)===null||r===void 0?void 0:r.fromAttribute)!==void 0?c.converter:wh;this._$El=o,this[o]=l.fromAttribute(n,c.type),this._$El=null}}requestUpdate(e,n,r){let i=!0;e!==void 0&&(((r=r||this.constructor.getPropertyOptions(e)).hasChanged||Sg)(this[e],n)?(this._$AL.has(e)||this._$AL.set(e,n),r.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,r))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(n){Promise.reject(n)}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 n=!1;const r=this._$AL;try{n=this.shouldUpdate(r),n?(this.willUpdate(r),(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(r)):this._$Ek()}catch(i){throw n=!1,this._$Ek(),i}n&&this._$AE(r)}willUpdate(e){}_$AE(e){var n;(n=this._$ES)===null||n===void 0||n.forEach(r=>{var i;return(i=r.hostUpdated)===null||i===void 0?void 0:i.call(r)}),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((n,r)=>this._$EO(r,this[r],n)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}xs.finalized=!0,xs.elementProperties=new Map,xs.elementStyles=[],xs.shadowRootOptions={mode:"open"},Ig?.({ReactiveElement:xs}),((mh=cc.reactiveElementVersions)!==null&&mh!==void 0?mh:cc.reactiveElementVersions=[]).push("1.6.1");/**
112
112
  * @license
113
113
  * Copyright 2017 Google LLC
114
114
  * SPDX-License-Identifier: BSD-3-Clause
115
- */var wh;const lc=window,xs=lc.trustedTypes,Cg=xs?xs.createPolicy("lit-html",{createHTML:t=>t}):void 0,oi=`lit$${(Math.random()+"").slice(9)}$`,Ig="?"+oi,tx=`<${Ig}>`,Cs=document,Mo=(t="")=>Cs.createComment(t),Lo=t=>t===null||typeof t!="object"&&typeof t!="function",Sg=Array.isArray,nx=t=>Sg(t)||typeof t?.[Symbol.iterator]=="function",jo=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Dg=/-->/g,Og=/>/g,Ui=RegExp(`>|[
115
+ */var yh;const lc=window,Cs=lc.trustedTypes,Dg=Cs?Cs.createPolicy("lit-html",{createHTML:t=>t}):void 0,ci=`lit$${(Math.random()+"").slice(9)}$`,Og="?"+ci,ax=`<${Og}>`,Is=document,Lo=(t="")=>Is.createComment(t),jo=t=>t===null||typeof t!="object"&&typeof t!="function",Ag=Array.isArray,cx=t=>Ag(t)||typeof t?.[Symbol.iterator]=="function",Uo=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$g=/-->/g,Pg=/>/g,ki=RegExp(`>|[
116
116
  \f\r](?:([^\\s"'>=/]+)([
117
117
  \f\r]*=[
118
118
  \f\r]*(?:[^
119
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Ag=/'/g,$g=/"/g,Pg=/^(?:script|style|textarea|title)$/i,Tg=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),ce=Tg(1),ft=Tg(2),Fi=Symbol.for("lit-noChange"),hn=Symbol.for("lit-nothing"),Rg=new WeakMap,Is=Cs.createTreeWalker(Cs,129,null,!1),rx=(t,e)=>{const n=t.length-1,r=[];let i,o=e===2?"<svg>":"",c=jo;for(let h=0;h<n;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===jo?E[1]==="!--"?c=Dg:E[1]!==void 0?c=Og:E[2]!==void 0?(Pg.test(E[2])&&(i=RegExp("</"+E[2],"g")),c=Ui):E[3]!==void 0&&(c=Ui):c===Ui?E[0]===">"?(c=i??jo,_=-1):E[1]===void 0?_=-2:(_=c.lastIndex-E[2].length,v=E[1],c=E[3]===void 0?Ui:E[3]==='"'?$g:Ag):c===$g||c===Ag?c=Ui:c===Dg||c===Og?c=jo:(c=Ui,i=void 0);const P=c===Ui&&t[h+1].startsWith("/>")?" ":"";o+=c===jo?d+tx:_>=0?(r.push(v),d.slice(0,_)+"$lit$"+d.slice(_)+oi+P):d+oi+(_===-2?(r.push(void 0),h):P)}const l=o+(t[n]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Cg!==void 0?Cg.createHTML(l):l,r]};class Uo{constructor({strings:e,_$litType$:n},r){let i;this.parts=[];let o=0,c=0;const l=e.length-1,h=this.parts,[d,v]=rx(e,n);if(this.el=Uo.createElement(d,r),Is.currentNode=this.el.content,n===2){const E=this.el.content,_=E.firstChild;_.remove(),E.append(..._.childNodes)}for(;(i=Is.nextNode())!==null&&h.length<l;){if(i.nodeType===1){if(i.hasAttributes()){const E=[];for(const _ of i.getAttributeNames())if(_.endsWith("$lit$")||_.startsWith(oi)){const S=v[c++];if(E.push(_),S!==void 0){const P=i.getAttribute(S.toLowerCase()+"$lit$").split(oi),L=/([.?@])?(.*)/.exec(S);h.push({type:1,index:o,name:L[2],strings:P,ctor:L[1]==="."?sx:L[1]==="?"?ax:L[1]==="@"?cx:uc})}else h.push({type:6,index:o})}for(const _ of E)i.removeAttribute(_)}if(Pg.test(i.tagName)){const E=i.textContent.split(oi),_=E.length-1;if(_>0){i.textContent=xs?xs.emptyScript:"";for(let S=0;S<_;S++)i.append(E[S],Mo()),Is.nextNode(),h.push({type:2,index:++o});i.append(E[_],Mo())}}}else if(i.nodeType===8)if(i.data===Ig)h.push({type:2,index:o});else{let E=-1;for(;(E=i.data.indexOf(oi,E+1))!==-1;)h.push({type:7,index:o}),E+=oi.length-1}o++}}static createElement(e,n){const r=Cs.createElement("template");return r.innerHTML=e,r}}function Ss(t,e,n=t,r){var i,o,c,l;if(e===Fi)return e;let h=r!==void 0?(i=n._$Co)===null||i===void 0?void 0:i[r]:n._$Cl;const d=Lo(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,n,r)),r!==void 0?((c=(l=n)._$Co)!==null&&c!==void 0?c:l._$Co=[])[r]=h:n._$Cl=h),h!==void 0&&(e=Ss(t,h._$AS(t,e.values),h,r)),e}class ix{constructor(e,n){this.u=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(e){var n;const{el:{content:r},parts:i}=this._$AD,o=((n=e?.creationScope)!==null&&n!==void 0?n:Cs).importNode(r,!0);Is.currentNode=o;let c=Is.nextNode(),l=0,h=0,d=i[0];for(;d!==void 0;){if(l===d.index){let v;d.type===2?v=new Fo(c,c.nextSibling,this,e):d.type===1?v=new d.ctor(c,d.name,d.strings,this,e):d.type===6&&(v=new lx(c,this,e)),this.u.push(v),d=i[++h]}l!==d?.index&&(c=Is.nextNode(),l++)}return o}p(e){let n=0;for(const r of this.u)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,n),n+=r.strings.length-2):r._$AI(e[n])),n++}}class Fo{constructor(e,n,r,i){var o;this.type=2,this._$AH=hn,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=r,this.options=i,this._$Cm=(o=i?.isConnected)===null||o===void 0||o}get _$AU(){var e,n;return(n=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&n!==void 0?n:this._$Cm}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&e.nodeType===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=Ss(this,e,n),Lo(e)?e===hn||e==null||e===""?(this._$AH!==hn&&this._$AR(),this._$AH=hn):e!==this._$AH&&e!==Fi&&this.g(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):nx(e)?this.k(e):this.g(e)}O(e,n=this._$AB){return this._$AA.parentNode.insertBefore(e,n)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}g(e){this._$AH!==hn&&Lo(this._$AH)?this._$AA.nextSibling.data=e:this.T(Cs.createTextNode(e)),this._$AH=e}$(e){var n;const{values:r,_$litType$:i}=e,o=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=Uo.createElement(i.h,this.options)),i);if(((n=this._$AH)===null||n===void 0?void 0:n._$AD)===o)this._$AH.p(r);else{const c=new ix(o,this),l=c.v(this.options);c.p(r),this.T(l),this._$AH=c}}_$AC(e){let n=Rg.get(e.strings);return n===void 0&&Rg.set(e.strings,n=new Uo(e)),n}k(e){Sg(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let r,i=0;for(const o of e)i===n.length?n.push(r=new Fo(this.O(Mo()),this.O(Mo()),this,this.options)):r=n[i],r._$AI(o),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,n){var r;for((r=this._$AP)===null||r===void 0||r.call(this,!1,!0,n);e&&e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){var n;this._$AM===void 0&&(this._$Cm=e,(n=this._$AP)===null||n===void 0||n.call(this,e))}}class uc{constructor(e,n,r,i,o){this.type=1,this._$AH=hn,this._$AN=void 0,this.element=e,this.name=n,this._$AM=i,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=hn}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,n=this,r,i){const o=this.strings;let c=!1;if(o===void 0)e=Ss(this,e,n,0),c=!Lo(e)||e!==this._$AH&&e!==Fi,c&&(this._$AH=e);else{const l=e;let h,d;for(e=o[0],h=0;h<o.length-1;h++)d=Ss(this,l[r+h],n,h),d===Fi&&(d=this._$AH[h]),c||(c=!Lo(d)||d!==this._$AH[h]),d===hn?e=hn:e!==hn&&(e+=(d??"")+o[h+1]),this._$AH[h]=d}c&&!i&&this.j(e)}j(e){e===hn?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class sx extends uc{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===hn?void 0:e}}const ox=xs?xs.emptyScript:"";class ax extends uc{constructor(){super(...arguments),this.type=4}j(e){e&&e!==hn?this.element.setAttribute(this.name,ox):this.element.removeAttribute(this.name)}}class cx extends uc{constructor(e,n,r,i,o){super(e,n,r,i,o),this.type=5}_$AI(e,n=this){var r;if((e=(r=Ss(this,e,n,0))!==null&&r!==void 0?r:hn)===Fi)return;const i=this._$AH,o=e===hn&&i!==hn||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,c=e!==hn&&(i===hn||o);o&&this.element.removeEventListener(this.name,this,i),c&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n,r;typeof this._$AH=="function"?this._$AH.call((r=(n=this.options)===null||n===void 0?void 0:n.host)!==null&&r!==void 0?r:this.element,e):this._$AH.handleEvent(e)}}class lx{constructor(e,n,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Ss(this,e)}}const Ng=lc.litHtmlPolyfillSupport;Ng?.(Uo,Fo),((wh=lc.litHtmlVersions)!==null&&wh!==void 0?wh:lc.litHtmlVersions=[]).push("2.6.1");const ux=(t,e,n)=>{var r,i;const o=(r=n?.renderBefore)!==null&&r!==void 0?r:e;let c=o._$litPart$;if(c===void 0){const l=(i=n?.renderBefore)!==null&&i!==void 0?i:null;o._$litPart$=c=new Fo(e.insertBefore(Mo(),l),l,void 0,n??{})}return c._$AI(t),c};/**
119
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Tg=/'/g,Ng=/"/g,Rg=/^(?:script|style|textarea|title)$/i,Mg=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),ce=Mg(1),ft=Mg(2),Hi=Symbol.for("lit-noChange"),hn=Symbol.for("lit-nothing"),Lg=new WeakMap,Ss=Is.createTreeWalker(Is,129,null,!1),lx=(t,e)=>{const n=t.length-1,r=[];let i,o=e===2?"<svg>":"",c=Uo;for(let h=0;h<n;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===Uo?E[1]==="!--"?c=$g:E[1]!==void 0?c=Pg:E[2]!==void 0?(Rg.test(E[2])&&(i=RegExp("</"+E[2],"g")),c=ki):E[3]!==void 0&&(c=ki):c===ki?E[0]===">"?(c=i??Uo,_=-1):E[1]===void 0?_=-2:(_=c.lastIndex-E[2].length,v=E[1],c=E[3]===void 0?ki:E[3]==='"'?Ng:Tg):c===Ng||c===Tg?c=ki:c===$g||c===Pg?c=Uo:(c=ki,i=void 0);const P=c===ki&&t[h+1].startsWith("/>")?" ":"";o+=c===Uo?d+ax:_>=0?(r.push(v),d.slice(0,_)+"$lit$"+d.slice(_)+ci+P):d+ci+(_===-2?(r.push(void 0),h):P)}const l=o+(t[n]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Dg!==void 0?Dg.createHTML(l):l,r]};class Fo{constructor({strings:e,_$litType$:n},r){let i;this.parts=[];let o=0,c=0;const l=e.length-1,h=this.parts,[d,v]=lx(e,n);if(this.el=Fo.createElement(d,r),Ss.currentNode=this.el.content,n===2){const E=this.el.content,_=E.firstChild;_.remove(),E.append(..._.childNodes)}for(;(i=Ss.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]==="."?hx:L[1]==="?"?dx:L[1]==="@"?px:uc})}else h.push({type:6,index:o})}for(const _ of E)i.removeAttribute(_)}if(Rg.test(i.tagName)){const E=i.textContent.split(ci),_=E.length-1;if(_>0){i.textContent=Cs?Cs.emptyScript:"";for(let S=0;S<_;S++)i.append(E[S],Lo()),Ss.nextNode(),h.push({type:2,index:++o});i.append(E[_],Lo())}}}else if(i.nodeType===8)if(i.data===Og)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,n){const r=Is.createElement("template");return r.innerHTML=e,r}}function Ds(t,e,n=t,r){var i,o,c,l;if(e===Hi)return e;let h=r!==void 0?(i=n._$Co)===null||i===void 0?void 0:i[r]:n._$Cl;const d=jo(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,n,r)),r!==void 0?((c=(l=n)._$Co)!==null&&c!==void 0?c:l._$Co=[])[r]=h:n._$Cl=h),h!==void 0&&(e=Ds(t,h._$AS(t,e.values),h,r)),e}class ux{constructor(e,n){this.u=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(e){var n;const{el:{content:r},parts:i}=this._$AD,o=((n=e?.creationScope)!==null&&n!==void 0?n:Is).importNode(r,!0);Ss.currentNode=o;let c=Ss.nextNode(),l=0,h=0,d=i[0];for(;d!==void 0;){if(l===d.index){let v;d.type===2?v=new Bo(c,c.nextSibling,this,e):d.type===1?v=new d.ctor(c,d.name,d.strings,this,e):d.type===6&&(v=new gx(c,this,e)),this.u.push(v),d=i[++h]}l!==d?.index&&(c=Ss.nextNode(),l++)}return o}p(e){let n=0;for(const r of this.u)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,n),n+=r.strings.length-2):r._$AI(e[n])),n++}}class Bo{constructor(e,n,r,i){var o;this.type=2,this._$AH=hn,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=r,this.options=i,this._$Cm=(o=i?.isConnected)===null||o===void 0||o}get _$AU(){var e,n;return(n=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&n!==void 0?n:this._$Cm}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&e.nodeType===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=Ds(this,e,n),jo(e)?e===hn||e==null||e===""?(this._$AH!==hn&&this._$AR(),this._$AH=hn):e!==this._$AH&&e!==Hi&&this.g(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):cx(e)?this.k(e):this.g(e)}O(e,n=this._$AB){return this._$AA.parentNode.insertBefore(e,n)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}g(e){this._$AH!==hn&&jo(this._$AH)?this._$AA.nextSibling.data=e:this.T(Is.createTextNode(e)),this._$AH=e}$(e){var n;const{values:r,_$litType$:i}=e,o=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=Fo.createElement(i.h,this.options)),i);if(((n=this._$AH)===null||n===void 0?void 0:n._$AD)===o)this._$AH.p(r);else{const c=new ux(o,this),l=c.v(this.options);c.p(r),this.T(l),this._$AH=c}}_$AC(e){let n=Lg.get(e.strings);return n===void 0&&Lg.set(e.strings,n=new Fo(e)),n}k(e){Ag(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let r,i=0;for(const o of e)i===n.length?n.push(r=new Bo(this.O(Lo()),this.O(Lo()),this,this.options)):r=n[i],r._$AI(o),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,n){var r;for((r=this._$AP)===null||r===void 0||r.call(this,!1,!0,n);e&&e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){var n;this._$AM===void 0&&(this._$Cm=e,(n=this._$AP)===null||n===void 0||n.call(this,e))}}class uc{constructor(e,n,r,i,o){this.type=1,this._$AH=hn,this._$AN=void 0,this.element=e,this.name=n,this._$AM=i,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=hn}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,n=this,r,i){const o=this.strings;let c=!1;if(o===void 0)e=Ds(this,e,n,0),c=!jo(e)||e!==this._$AH&&e!==Hi,c&&(this._$AH=e);else{const l=e;let h,d;for(e=o[0],h=0;h<o.length-1;h++)d=Ds(this,l[r+h],n,h),d===Hi&&(d=this._$AH[h]),c||(c=!jo(d)||d!==this._$AH[h]),d===hn?e=hn:e!==hn&&(e+=(d??"")+o[h+1]),this._$AH[h]=d}c&&!i&&this.j(e)}j(e){e===hn?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class hx extends uc{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===hn?void 0:e}}const fx=Cs?Cs.emptyScript:"";class dx extends uc{constructor(){super(...arguments),this.type=4}j(e){e&&e!==hn?this.element.setAttribute(this.name,fx):this.element.removeAttribute(this.name)}}class px extends uc{constructor(e,n,r,i,o){super(e,n,r,i,o),this.type=5}_$AI(e,n=this){var r;if((e=(r=Ds(this,e,n,0))!==null&&r!==void 0?r:hn)===Hi)return;const i=this._$AH,o=e===hn&&i!==hn||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,c=e!==hn&&(i===hn||o);o&&this.element.removeEventListener(this.name,this,i),c&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n,r;typeof this._$AH=="function"?this._$AH.call((r=(n=this.options)===null||n===void 0?void 0:n.host)!==null&&r!==void 0?r:this.element,e):this._$AH.handleEvent(e)}}class gx{constructor(e,n,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Ds(this,e)}}const jg=lc.litHtmlPolyfillSupport;jg?.(Fo,Bo),((yh=lc.litHtmlVersions)!==null&&yh!==void 0?yh:lc.litHtmlVersions=[]).push("2.6.1");const mx=(t,e,n)=>{var r,i;const o=(r=n?.renderBefore)!==null&&r!==void 0?r:e;let c=o._$litPart$;if(c===void 0){const l=(i=n?.renderBefore)!==null&&i!==void 0?i:null;o._$litPart$=c=new Bo(e.insertBefore(Lo(),l),l,void 0,n??{})}return c._$AI(t),c};/**
120
120
  * @license
121
121
  * Copyright 2017 Google LLC
122
122
  * SPDX-License-Identifier: BSD-3-Clause
123
- */var vh,yh;class Re extends Es{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,n;const r=super.createRenderRoot();return(e=(n=this.renderOptions).renderBefore)!==null&&e!==void 0||(n.renderBefore=r.firstChild),r}update(e){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ux(n,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 Fi}}Re.finalized=!0,Re._$litElement$=!0,(vh=globalThis.litElementHydrateSupport)===null||vh===void 0||vh.call(globalThis,{LitElement:Re});const Mg=globalThis.litElementPolyfillSupport;Mg?.({LitElement:Re}),((yh=globalThis.litElementVersions)!==null&&yh!==void 0?yh:globalThis.litElementVersions=[]).push("3.2.2");/**
123
+ */var bh,_h;class Ne extends xs{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,n;const r=super.createRenderRoot();return(e=(n=this.renderOptions).renderBefore)!==null&&e!==void 0||(n.renderBefore=r.firstChild),r}update(e){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=mx(n,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 Hi}}Ne.finalized=!0,Ne._$litElement$=!0,(bh=globalThis.litElementHydrateSupport)===null||bh===void 0||bh.call(globalThis,{LitElement:Ne});const Ug=globalThis.litElementPolyfillSupport;Ug?.({LitElement:Ne}),((_h=globalThis.litElementVersions)!==null&&_h!==void 0?_h:globalThis.litElementVersions=[]).push("3.2.2");/**
124
124
  * @license
125
125
  * Copyright 2017 Google LLC
126
126
  * SPDX-License-Identifier: BSD-3-Clause
127
- */const Be=t=>e=>typeof e=="function"?((n,r)=>(customElements.define(n,r),r))(t,e):((n,r)=>{const{kind:i,elements:o}=r;return{kind:i,elements:o,finisher(c){customElements.define(n,c)}}})(t,e);/**
127
+ */const ke=t=>e=>typeof e=="function"?((n,r)=>(customElements.define(n,r),r))(t,e):((n,r)=>{const{kind:i,elements:o}=r;return{kind:i,elements:o,finisher(c){customElements.define(n,c)}}})(t,e);/**
128
128
  * @license
129
129
  * Copyright 2017 Google LLC
130
130
  * SPDX-License-Identifier: BSD-3-Clause
131
- */const hx=(t,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(n){n.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(n){n.createProperty(e.key,t)}};function We(t){return(e,n)=>n!==void 0?((r,i,o)=>{i.constructor.createProperty(o,r)})(t,e,n):hx(t,e)}/**
131
+ */const wx=(t,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(n){n.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(n){n.createProperty(e.key,t)}};function We(t){return(e,n)=>n!==void 0?((r,i,o)=>{i.constructor.createProperty(o,r)})(t,e,n):wx(t,e)}/**
132
132
  * @license
133
133
  * Copyright 2017 Google LLC
134
134
  * SPDX-License-Identifier: BSD-3-Clause
@@ -136,24 +136,24 @@ function print() { __p += __j.call(arguments, '') }
136
136
  * @license
137
137
  * Copyright 2021 Google LLC
138
138
  * SPDX-License-Identifier: BSD-3-Clause
139
- */var bh;((bh=window.HTMLSlotElement)===null||bh===void 0?void 0:bh.prototype.assignedElements)!=null;/**
139
+ */var Eh;((Eh=window.HTMLSlotElement)===null||Eh===void 0?void 0:Eh.prototype.assignedElements)!=null;/**
140
140
  * @license
141
141
  * Copyright 2017 Google LLC
142
142
  * SPDX-License-Identifier: BSD-3-Clause
143
- */const fx={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},dx=t=>(...e)=>({_$litDirective$:t,values:e});class px{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,n,r){this._$Ct=e,this._$AM=n,this._$Ci=r}_$AS(e,n){return this.update(e,n)}update(e,n){return this.render(...n)}}/**
143
+ */const vx={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},yx=t=>(...e)=>({_$litDirective$:t,values:e});class bx{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,n,r){this._$Ct=e,this._$AM=n,this._$Ci=r}_$AS(e,n){return this.update(e,n)}update(e,n){return this.render(...n)}}/**
144
144
  * @license
145
145
  * Copyright 2018 Google LLC
146
146
  * SPDX-License-Identifier: BSD-3-Clause
147
- */const kn=dx(class extends px{constructor(t){var e;if(super(t),t.type!==fx.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 n,r;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]&&!(!((n=this.st)===null||n===void 0)&&n.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)||!((r=this.st)===null||r===void 0)&&r.has(o)||(c?(i.add(o),this.nt.add(o)):(i.remove(o),this.nt.delete(o)))}return Fi}});function gx(t,e){t.indexOf(e)===-1&&t.push(e)}const Lg=(t,e,n)=>Math.min(Math.max(n,t),e),or={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},Bo=t=>typeof t=="number",Ds=t=>Array.isArray(t)&&!Bo(t[0]),mx=(t,e,n)=>{const r=e-t;return((n-t)%r+r)%r+t};function wx(t,e){return Ds(t)?t[mx(0,t.length,e)]:t}const jg=(t,e,n)=>-n*t+n*e+t,Ug=()=>{},$r=t=>t,_h=(t,e,n)=>e-t===0?1:(n-t)/(e-t);function Fg(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=_h(0,e,r);t.push(jg(n,1,i))}}function vx(t){const e=[0];return Fg(e,t-1),e}function yx(t,e=vx(t.length),n=$r){const r=t.length,i=r-e.length;return i>0&&Fg(e,i),o=>{let c=0;for(;c<r-2&&!(o<e[c+1]);c++);let l=Lg(0,1,_h(e[c],e[c+1],o));return l=wx(n,c)(l),jg(t[c],t[c+1],l)}}const Bg=t=>Array.isArray(t)&&Bo(t[0]),Eh=t=>typeof t=="object"&&Boolean(t.createAnimation),Bi=t=>typeof t=="function",kg=t=>typeof t=="string",Os={ms:t=>t*1e3,s:t=>t/1e3};function bx(t,e){return e?t*(1e3/e):0}const Hg=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,_x=1e-7,Ex=12;function xx(t,e,n,r,i){let o,c,l=0;do c=e+(n-e)/2,o=Hg(c,r,i)-t,o>0?n=c:e=c;while(Math.abs(o)>_x&&++l<Ex);return c}function ko(t,e,n,r){if(t===e&&n===r)return $r;const i=o=>xx(o,0,1,t,n);return o=>o===0||o===1?o:Hg(i(o),e,r)}const Cx=(t,e="end")=>n=>{n=e==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*t,i=e==="end"?Math.floor(r):Math.ceil(r);return Lg(0,1,i/t)},zg={ease:ko(.25,.1,.25,1),"ease-in":ko(.42,0,1,1),"ease-in-out":ko(.42,0,.58,1),"ease-out":ko(0,0,.58,1)},Ix=/\((.*?)\)/;function Wg(t){if(Bi(t))return t;if(Bg(t))return ko(...t);if(zg[t])return zg[t];if(t.startsWith("steps")){const e=Ix.exec(t);if(e){const n=e[1].split(",");return Cx(parseFloat(n[0]),n[1].trim())}}return $r}class qg{constructor(e,n=[0,1],{easing:r,duration:i=or.duration,delay:o=or.delay,endDelay:c=or.endDelay,repeat:l=or.repeat,offset:h,direction:d="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=$r,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((E,_)=>{this.resolve=E,this.reject=_}),r=r||or.easing,Eh(r)){const E=r.createAnimation(n);r=E.easing,n=E.keyframes||n,i=E.duration||i}this.repeat=l,this.easing=Ds(r)?$r:Wg(r),this.updateDuration(i);const v=yx(n,h,Ds(r)?r.map(Wg):$r);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 xh=function(){};process.env.NODE_ENV!=="production"&&(xh=function(t,e){if(!t)throw new Error(e)});class Sx{setAnimation(e){this.animation=e,e?.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const Ch=new WeakMap;function Vg(t){return Ch.has(t)||Ch.set(t,{transforms:[],values:new Map}),Ch.get(t)}function Dx(t,e){return t.has(e)||t.set(e,new Sx),t.get(e)}const Ox=["","X","Y","Z"],Ax=["translate","scale","rotate","skew"],hc={x:"translateX",y:"translateY",z:"translateZ"},Kg={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},$x={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:Kg,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:$r},skew:Kg},As=new Map,Ih=t=>`--motion-${t}`,fc=["x","y","z"];Ax.forEach(t=>{Ox.forEach(e=>{fc.push(t+e),As.set(Ih(t+e),$x[t])})});const Px=(t,e)=>fc.indexOf(t)-fc.indexOf(e),Tx=new Set(fc),Gg=t=>Tx.has(t),Rx=(t,e)=>{hc[e]&&(e=hc[e]);const{transforms:n}=Vg(t);gx(n,e),t.style.transform=Nx(n)},Nx=t=>t.sort(Px).reduce(Mx,"").trim(),Mx=(t,e)=>`${t} ${e}(var(${Ih(e)}))`,Sh=t=>t.startsWith("--"),Zg=new Set;function Lx(t){if(!Zg.has(t)){Zg.add(t);try{const{syntax:e,initialValue:n}=As.has(t)?As.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:n})}catch{}}}const Dh=(t,e)=>document.createElement("div").animate(t,e),Yg={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Dh({opacity:[1]})}catch{return!1}return!0},finished:()=>Boolean(Dh({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{Dh({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},Oh={},$s={};for(const t in Yg)$s[t]=()=>(Oh[t]===void 0&&(Oh[t]=Yg[t]()),Oh[t]);const jx=.015,Ux=(t,e)=>{let n="";const r=Math.round(e/jx);for(let i=0;i<r;i++)n+=t(_h(0,r-1,i))+", ";return n.substring(0,n.length-2)},Jg=(t,e)=>Bi(t)?$s.linearEasing()?`linear(${Ux(t,e)})`:or.easing:Bg(t)?Fx(t):t,Fx=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`;function Bx(t,e){for(let n=0;n<t.length;n++)t[n]===null&&(t[n]=n?t[n-1]:e());return t}const kx=t=>Array.isArray(t)?t:[t];function dc(t){return hc[t]&&(t=hc[t]),Gg(t)?Ih(t):t}const pc={get:(t,e)=>{e=dc(e);let n=Sh(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&n!==0){const r=As.get(e);r&&(n=r.initialValue)}return n},set:(t,e,n)=>{e=dc(e),Sh(e)?t.style.setProperty(e,n):t.style[e]=n}};function Xg(t,e=!0){if(!(!t||t.playState==="finished"))try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch{}}function Qg(t,e){var n;let r=e?.toDefaultUnit||$r;const i=t[t.length-1];if(kg(i)){const o=((n=i.match(/(-?[\d.]+)([a-z%]*)/))===null||n===void 0?void 0:n[2])||"";o&&(r=c=>c+o)}return r}function Hx(){return window.__MOTION_DEV_TOOLS_RECORD}function zx(t,e,n,r={},i){const o=Hx(),c=r.record!==!1&&o;let l,{duration:h=or.duration,delay:d=or.delay,endDelay:v=or.endDelay,repeat:E=or.repeat,easing:_=or.easing,persist:S=!1,direction:P,offset:L,allowWebkitAcceleration:k=!1}=r;const q=Vg(t),T=Gg(e);let M=$s.waapi();T&&Rx(t,e);const A=dc(e),R=Dx(q.values,A),C=As.get(A);return Xg(R.animation,!(Eh(_)&&R.generator)&&r.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=Bx(kx(n),f);const J=Qg(x,C);if(Eh(_)){const z=_.createAnimation(x,e!=="opacity",f,A,R);_=z.easing,x=z.keyframes||x,h=z.duration||h}if(Sh(A)&&($s.cssRegisterProperty()?Lx(A):M=!1),T&&!$s.linearEasing()&&(Bi(_)||Ds(_)&&_.some(Bi))&&(M=!1),M){C&&(x=x.map(de=>Bo(de)?C.toDefaultUnit(de):de)),x.length===1&&(!$s.partialKeyframes()||c)&&x.unshift(f());const z={delay:Os.ms(d),duration:Os.ms(h),endDelay:Os.ms(v),easing:Ds(_)?void 0:Jg(_,h),direction:P,iterations:E+1,fill:"both"};l=t.animate({[A]:x,offset:L,easing:Ds(_)?_.map(de=>Jg(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(Ug),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({},r),{duration:h,easing:_}));else{const z=x[x.length-1];pc.set(t,A,C&&Bo(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 Wx=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function e3(t,e){var n;return typeof t=="string"?e?((n=e[t])!==null&&n!==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(),t3=(t,e,n=or.duration)=>new Proxy({animations:t.map(qx).filter(Boolean),duration:n,options:e},Kx),Vx=t=>t.animations[0],Kx={get:(t,e)=>{const n=Vx(t);switch(e){case"duration":return t.duration;case"currentTime":return Os.s(n?.[e]||0);case"playbackRate":case"playState":return n?.[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(Gx)).catch(Ug)),t.finished;case"stop":return()=>{t.animations.forEach(r=>Xg(r))};case"forEachNative":return r=>{t.animations.forEach(i=>r(i,t))};default:return typeof n?.[e]>"u"?void 0:()=>t.animations.forEach(r=>r[e]())}},set:(t,e,n)=>{switch(e){case"currentTime":n=Os.ms(n);case"currentTime":case"playbackRate":for(let r=0;r<t.animations.length;r++)t.animations[r][e]=n;return!0}return!1}},Gx=t=>t.finished;function Zx(t,e,n){return Bi(t)?t(e,n):t}function Yx(t){return function(n,r,i={}){n=e3(n);const o=n.length;xh(Boolean(o),"No valid element provided."),xh(Boolean(r),"No keyframes defined.");const c=[];for(let l=0;l<o;l++){const h=n[l];for(const d in r){const v=Wx(i,d);v.delay=Zx(v.delay,l,o);const E=zx(h,d,r[d],v,t);c.push(E)}}return t3(c,i,i.duration)}}const Jx=Yx(qg);function Xx(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}const Qx=5;function n3(t,e,n){const r=Math.max(e-Qx,0);return bx(n-t(r),e-r)}const Ps={stiffness:100,damping:10,mass:1},e9=(t=Ps.stiffness,e=Ps.damping,n=Ps.mass)=>e/(2*Math.sqrt(t*n));function t9(t,e,n){return t<e&&n>=e||t>e&&n<=e}const n9=({stiffness:t=Ps.stiffness,damping:e=Ps.damping,mass:n=Ps.mass,from:r=0,to:i=1,velocity:o=0,restSpeed:c=2,restDistance:l=.5}={})=>{o=o?Os.s(o):0;const h={done:!1,hasReachedTarget:!1,current:r,target:i},d=i-r,v=Math.sqrt(t/n)/1e3,E=e9(t,e,n);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:n3(_,S,h.current),L=Math.abs(P)<=c,k=Math.abs(i-h.current)<=l;return h.done=L&&k,h.hasReachedTarget=t9(r,i,h.current),h}},Ah=10,r9=1e4;function i9(t,e=$r){let n,r=Ah,i=t(0);const o=[e(i.current)];for(;!i.done&&r<r9;)i=t(r),o.push(e(i.done?i.target:i.current)),n===void 0&&i.hasReachedTarget&&(n=r),r+=Ah;const c=r-Ah;return o.length===1&&o.push(i.current),{keyframes:o,duration:c/1e3,overshootDuration:(n??c)/1e3}}function r3(t){return Bo(t)&&!isNaN(t)}function $h(t){return kg(t)?parseFloat(t):t}function s9(t){const e=new WeakMap;return(n={})=>{const r=new Map,i=(c=0,l=100,h=0,d=!1)=>{const v=`${c}-${l}-${h}-${d}`;return r.has(v)||r.set(v,t(Object.assign({from:c,to:l,velocity:h,restSpeed:d?.05:2,restDistance:d?.01:.5},n))),r.get(v)},o=(c,l)=>(e.has(c)||e.set(c,i9(c,l)),e.get(c));return{createAnimation:(c,l=!0,h,d,v)=>{let E,_,S,P=0,L=$r;const k=c.length;if(l){L=Qg(c,d?As.get(dc(d)):void 0);const q=c[k-1];if(S=$h(q),k>1&&c[0]!==null)_=$h(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=n3(x=>T(x).current,C,f)}else h&&(_=$h(h()))}}if(r3(_)&&r3(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=s9(n9),o9={any:0,all:1};function a9(t,e,{root:n,margin:r,amount:i="any"}={}){if(typeof IntersectionObserver>"u")return()=>{};const o=e3(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);Bi(_)?c.set(v.target,_):h.unobserve(v.target)}else E&&(E(v),c.delete(v.target))})},h=new IntersectionObserver(l,{root:n,rootMargin:r,threshold:typeof i=="number"?i:o9[i]});return o.forEach(d=>h.observe(d)),()=>h.disconnect()}function Ph(t,e,n){t.dispatchEvent(new CustomEvent(e,{detail:{originalEvent:n}}))}function i3(t,e,n){t.dispatchEvent(new CustomEvent(e,{detail:{originalEntry:n}}))}const c9={isActive:t=>Boolean(t.inView),subscribe:(t,{enable:e,disable:n},{inViewOptions:r={}})=>{const{once:i}=r,o=Xx(r,["once"]);return a9(t,c=>{if(e(),i3(t,"viewenter",c),!i)return l=>{n(),i3(t,"viewleave",l)}},o)}},s3=(t,e,n)=>r=>{r.pointerType&&r.pointerType!=="mouse"||(n(),Ph(t,e,r))};[...Object.keys({inView:c9,hover:{isActive:t=>Boolean(t.hover),subscribe:(t,{enable:e,disable:n})=>{const r=s3(t,"hoverstart",e),i=s3(t,"hoverend",n);return t.addEventListener("pointerenter",r),t.addEventListener("pointerleave",i),()=>{t.removeEventListener("pointerenter",r),t.removeEventListener("pointerleave",i)}}},press:{isActive:t=>Boolean(t.press),subscribe:(t,{enable:e,disable:n})=>{const r=o=>{n(),Ph(t,"pressend",o),window.removeEventListener("pointerup",r)},i=o=>{e(),Ph(t,"pressstart",o),window.addEventListener("pointerup",r)};return t.addEventListener("pointerdown",i),()=>{t.removeEventListener("pointerdown",i),window.removeEventListener("pointerup",r)}}}})];function l9(t,e={}){return t3([()=>{const n=new qg(t,[0,1],e);return n.finished.catch(()=>{}),n}],e,e.duration)}function ai(t,e,n){return(Bi(t)?l9:Jx)(t,e,n)}/**
147
+ */const kn=yx(class extends bx{constructor(t){var e;if(super(t),t.type!==vx.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 n,r;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]&&!(!((n=this.st)===null||n===void 0)&&n.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)||!((r=this.st)===null||r===void 0)&&r.has(o)||(c?(i.add(o),this.nt.add(o)):(i.remove(o),this.nt.delete(o)))}return Hi}});function _x(t,e){t.indexOf(e)===-1&&t.push(e)}const Fg=(t,e,n)=>Math.min(Math.max(n,t),e),ar={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},ko=t=>typeof t=="number",Os=t=>Array.isArray(t)&&!ko(t[0]),Ex=(t,e,n)=>{const r=e-t;return((n-t)%r+r)%r+t};function xx(t,e){return Os(t)?t[Ex(0,t.length,e)]:t}const Bg=(t,e,n)=>-n*t+n*e+t,kg=()=>{},$r=t=>t,xh=(t,e,n)=>e-t===0?1:(n-t)/(e-t);function Hg(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=xh(0,e,r);t.push(Bg(n,1,i))}}function Cx(t){const e=[0];return Hg(e,t-1),e}function Ix(t,e=Cx(t.length),n=$r){const r=t.length,i=r-e.length;return i>0&&Hg(e,i),o=>{let c=0;for(;c<r-2&&!(o<e[c+1]);c++);let l=Fg(0,1,xh(e[c],e[c+1],o));return l=xx(n,c)(l),Bg(t[c],t[c+1],l)}}const zg=t=>Array.isArray(t)&&ko(t[0]),Ch=t=>typeof t=="object"&&Boolean(t.createAnimation),zi=t=>typeof t=="function",Wg=t=>typeof t=="string",As={ms:t=>t*1e3,s:t=>t/1e3};function Sx(t,e){return e?t*(1e3/e):0}const qg=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Dx=1e-7,Ox=12;function Ax(t,e,n,r,i){let o,c,l=0;do c=e+(n-e)/2,o=qg(c,r,i)-t,o>0?n=c:e=c;while(Math.abs(o)>Dx&&++l<Ox);return c}function Ho(t,e,n,r){if(t===e&&n===r)return $r;const i=o=>Ax(o,0,1,t,n);return o=>o===0||o===1?o:qg(i(o),e,r)}const $x=(t,e="end")=>n=>{n=e==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*t,i=e==="end"?Math.floor(r):Math.ceil(r);return Fg(0,1,i/t)},Vg={ease:Ho(.25,.1,.25,1),"ease-in":Ho(.42,0,1,1),"ease-in-out":Ho(.42,0,.58,1),"ease-out":Ho(0,0,.58,1)},Px=/\((.*?)\)/;function Kg(t){if(zi(t))return t;if(zg(t))return Ho(...t);if(Vg[t])return Vg[t];if(t.startsWith("steps")){const e=Px.exec(t);if(e){const n=e[1].split(",");return $x(parseFloat(n[0]),n[1].trim())}}return $r}class Gg{constructor(e,n=[0,1],{easing:r,duration:i=ar.duration,delay:o=ar.delay,endDelay:c=ar.endDelay,repeat:l=ar.repeat,offset:h,direction:d="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=$r,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((E,_)=>{this.resolve=E,this.reject=_}),r=r||ar.easing,Ch(r)){const E=r.createAnimation(n);r=E.easing,n=E.keyframes||n,i=E.duration||i}this.repeat=l,this.easing=Os(r)?$r:Kg(r),this.updateDuration(i);const v=Ix(n,h,Os(r)?r.map(Kg):$r);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 Ih=function(){};process.env.NODE_ENV!=="production"&&(Ih=function(t,e){if(!t)throw new Error(e)});class Tx{setAnimation(e){this.animation=e,e?.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const Sh=new WeakMap;function Zg(t){return Sh.has(t)||Sh.set(t,{transforms:[],values:new Map}),Sh.get(t)}function Nx(t,e){return t.has(e)||t.set(e,new Tx),t.get(e)}const Rx=["","X","Y","Z"],Mx=["translate","scale","rotate","skew"],hc={x:"translateX",y:"translateY",z:"translateZ"},Yg={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},Lx={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:Yg,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:$r},skew:Yg},$s=new Map,Dh=t=>`--motion-${t}`,fc=["x","y","z"];Mx.forEach(t=>{Rx.forEach(e=>{fc.push(t+e),$s.set(Dh(t+e),Lx[t])})});const jx=(t,e)=>fc.indexOf(t)-fc.indexOf(e),Ux=new Set(fc),Jg=t=>Ux.has(t),Fx=(t,e)=>{hc[e]&&(e=hc[e]);const{transforms:n}=Zg(t);_x(n,e),t.style.transform=Bx(n)},Bx=t=>t.sort(jx).reduce(kx,"").trim(),kx=(t,e)=>`${t} ${e}(var(${Dh(e)}))`,Oh=t=>t.startsWith("--"),Xg=new Set;function Hx(t){if(!Xg.has(t)){Xg.add(t);try{const{syntax:e,initialValue:n}=$s.has(t)?$s.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:n})}catch{}}}const Ah=(t,e)=>document.createElement("div").animate(t,e),Qg={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Ah({opacity:[1]})}catch{return!1}return!0},finished:()=>Boolean(Ah({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{Ah({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},$h={},Ps={};for(const t in Qg)Ps[t]=()=>($h[t]===void 0&&($h[t]=Qg[t]()),$h[t]);const zx=.015,Wx=(t,e)=>{let n="";const r=Math.round(e/zx);for(let i=0;i<r;i++)n+=t(xh(0,r-1,i))+", ";return n.substring(0,n.length-2)},e3=(t,e)=>zi(t)?Ps.linearEasing()?`linear(${Wx(t,e)})`:ar.easing:zg(t)?qx(t):t,qx=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`;function Vx(t,e){for(let n=0;n<t.length;n++)t[n]===null&&(t[n]=n?t[n-1]:e());return t}const Kx=t=>Array.isArray(t)?t:[t];function dc(t){return hc[t]&&(t=hc[t]),Jg(t)?Dh(t):t}const pc={get:(t,e)=>{e=dc(e);let n=Oh(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&n!==0){const r=$s.get(e);r&&(n=r.initialValue)}return n},set:(t,e,n)=>{e=dc(e),Oh(e)?t.style.setProperty(e,n):t.style[e]=n}};function t3(t,e=!0){if(!(!t||t.playState==="finished"))try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch{}}function n3(t,e){var n;let r=e?.toDefaultUnit||$r;const i=t[t.length-1];if(Wg(i)){const o=((n=i.match(/(-?[\d.]+)([a-z%]*)/))===null||n===void 0?void 0:n[2])||"";o&&(r=c=>c+o)}return r}function Gx(){return window.__MOTION_DEV_TOOLS_RECORD}function Zx(t,e,n,r={},i){const o=Gx(),c=r.record!==!1&&o;let l,{duration:h=ar.duration,delay:d=ar.delay,endDelay:v=ar.endDelay,repeat:E=ar.repeat,easing:_=ar.easing,persist:S=!1,direction:P,offset:L,allowWebkitAcceleration:k=!1}=r;const q=Zg(t),T=Jg(e);let M=Ps.waapi();T&&Fx(t,e);const A=dc(e),N=Nx(q.values,A),C=$s.get(A);return t3(N.animation,!(Ch(_)&&N.generator)&&r.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=Vx(Kx(n),f);const J=n3(x,C);if(Ch(_)){const z=_.createAnimation(x,e!=="opacity",f,A,N);_=z.easing,x=z.keyframes||x,h=z.duration||h}if(Oh(A)&&(Ps.cssRegisterProperty()?Hx(A):M=!1),T&&!Ps.linearEasing()&&(zi(_)||Os(_)&&_.some(zi))&&(M=!1),M){C&&(x=x.map(de=>ko(de)?C.toDefaultUnit(de):de)),x.length===1&&(!Ps.partialKeyframes()||c)&&x.unshift(f());const z={delay:As.ms(d),duration:As.ms(h),endDelay:As.ms(v),easing:Os(_)?void 0:e3(_,h),direction:P,iterations:E+1,fill:"both"};l=t.animate({[A]:x,offset:L,easing:Os(_)?_.map(de=>e3(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(kg),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({},r),{duration:h,easing:_}));else{const z=x[x.length-1];pc.set(t,A,C&&ko(z)?C.toDefaultUnit(z):z)}return c&&o(t,e,x,{duration:h,delay:d,easing:_,repeat:E,offset:L},"motion-one"),N.setAnimation(l),l}}const Yx=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function r3(t,e){var n;return typeof t=="string"?e?((n=e[t])!==null&&n!==void 0||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}const Jx=t=>t(),i3=(t,e,n=ar.duration)=>new Proxy({animations:t.map(Jx).filter(Boolean),duration:n,options:e},Qx),Xx=t=>t.animations[0],Qx={get:(t,e)=>{const n=Xx(t);switch(e){case"duration":return t.duration;case"currentTime":return As.s(n?.[e]||0);case"playbackRate":case"playState":return n?.[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(e9)).catch(kg)),t.finished;case"stop":return()=>{t.animations.forEach(r=>t3(r))};case"forEachNative":return r=>{t.animations.forEach(i=>r(i,t))};default:return typeof n?.[e]>"u"?void 0:()=>t.animations.forEach(r=>r[e]())}},set:(t,e,n)=>{switch(e){case"currentTime":n=As.ms(n);case"currentTime":case"playbackRate":for(let r=0;r<t.animations.length;r++)t.animations[r][e]=n;return!0}return!1}},e9=t=>t.finished;function t9(t,e,n){return zi(t)?t(e,n):t}function n9(t){return function(n,r,i={}){n=r3(n);const o=n.length;Ih(Boolean(o),"No valid element provided."),Ih(Boolean(r),"No keyframes defined.");const c=[];for(let l=0;l<o;l++){const h=n[l];for(const d in r){const v=Yx(i,d);v.delay=t9(v.delay,l,o);const E=Zx(h,d,r[d],v,t);c.push(E)}}return i3(c,i,i.duration)}}const r9=n9(Gg);function i9(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}const s9=5;function s3(t,e,n){const r=Math.max(e-s9,0);return Sx(n-t(r),e-r)}const Ts={stiffness:100,damping:10,mass:1},o9=(t=Ts.stiffness,e=Ts.damping,n=Ts.mass)=>e/(2*Math.sqrt(t*n));function a9(t,e,n){return t<e&&n>=e||t>e&&n<=e}const c9=({stiffness:t=Ts.stiffness,damping:e=Ts.damping,mass:n=Ts.mass,from:r=0,to:i=1,velocity:o=0,restSpeed:c=2,restDistance:l=.5}={})=>{o=o?As.s(o):0;const h={done:!1,hasReachedTarget:!1,current:r,target:i},d=i-r,v=Math.sqrt(t/n)/1e3,E=o9(t,e,n);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:s3(_,S,h.current),L=Math.abs(P)<=c,k=Math.abs(i-h.current)<=l;return h.done=L&&k,h.hasReachedTarget=a9(r,i,h.current),h}},Ph=10,l9=1e4;function u9(t,e=$r){let n,r=Ph,i=t(0);const o=[e(i.current)];for(;!i.done&&r<l9;)i=t(r),o.push(e(i.done?i.target:i.current)),n===void 0&&i.hasReachedTarget&&(n=r),r+=Ph;const c=r-Ph;return o.length===1&&o.push(i.current),{keyframes:o,duration:c/1e3,overshootDuration:(n??c)/1e3}}function o3(t){return ko(t)&&!isNaN(t)}function Th(t){return Wg(t)?parseFloat(t):t}function h9(t){const e=new WeakMap;return(n={})=>{const r=new Map,i=(c=0,l=100,h=0,d=!1)=>{const v=`${c}-${l}-${h}-${d}`;return r.has(v)||r.set(v,t(Object.assign({from:c,to:l,velocity:h,restSpeed:d?.05:2,restDistance:d?.01:.5},n))),r.get(v)},o=(c,l)=>(e.has(c)||e.set(c,u9(c,l)),e.get(c));return{createAnimation:(c,l=!0,h,d,v)=>{let E,_,S,P=0,L=$r;const k=c.length;if(l){L=n3(c,d?$s.get(dc(d)):void 0);const q=c[k-1];if(S=Th(q),k>1&&c[0]!==null)_=Th(c[0]);else{const T=v?.generator;if(T){const{animation:M,generatorStartTime:A}=v,N=M?.startTime||A||0,C=M?.currentTime||performance.now()-N,f=T(C).current;_=f,P=s3(x=>T(x).current,C,f)}else h&&(_=Th(h()))}}if(o3(_)&&o3(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=h9(c9),f9={any:0,all:1};function d9(t,e,{root:n,margin:r,amount:i="any"}={}){if(typeof IntersectionObserver>"u")return()=>{};const o=r3(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);zi(_)?c.set(v.target,_):h.unobserve(v.target)}else E&&(E(v),c.delete(v.target))})},h=new IntersectionObserver(l,{root:n,rootMargin:r,threshold:typeof i=="number"?i:f9[i]});return o.forEach(d=>h.observe(d)),()=>h.disconnect()}function Nh(t,e,n){t.dispatchEvent(new CustomEvent(e,{detail:{originalEvent:n}}))}function a3(t,e,n){t.dispatchEvent(new CustomEvent(e,{detail:{originalEntry:n}}))}const p9={isActive:t=>Boolean(t.inView),subscribe:(t,{enable:e,disable:n},{inViewOptions:r={}})=>{const{once:i}=r,o=i9(r,["once"]);return d9(t,c=>{if(e(),a3(t,"viewenter",c),!i)return l=>{n(),a3(t,"viewleave",l)}},o)}},c3=(t,e,n)=>r=>{r.pointerType&&r.pointerType!=="mouse"||(n(),Nh(t,e,r))};[...Object.keys({inView:p9,hover:{isActive:t=>Boolean(t.hover),subscribe:(t,{enable:e,disable:n})=>{const r=c3(t,"hoverstart",e),i=c3(t,"hoverend",n);return t.addEventListener("pointerenter",r),t.addEventListener("pointerleave",i),()=>{t.removeEventListener("pointerenter",r),t.removeEventListener("pointerleave",i)}}},press:{isActive:t=>Boolean(t.press),subscribe:(t,{enable:e,disable:n})=>{const r=o=>{n(),Nh(t,"pressend",o),window.removeEventListener("pointerup",r)},i=o=>{e(),Nh(t,"pressstart",o),window.addEventListener("pointerup",r)};return t.addEventListener("pointerdown",i),()=>{t.removeEventListener("pointerdown",i),window.removeEventListener("pointerup",r)}}}})];function g9(t,e={}){return i3([()=>{const n=new Gg(t,[0,1],e);return n.finished.catch(()=>{}),n}],e,e.duration)}function li(t,e,n){return(zi(t)?g9:r9)(t,e,n)}/**
148
148
  * @license
149
149
  * Copyright 2018 Google LLC
150
150
  * SPDX-License-Identifier: BSD-3-Clause
151
- */const Hn=t=>t??hn;var Ho={},u9=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},o3={},Yn={};let Th;const h9=[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];Yn.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},Yn.getSymbolTotalCodewords=function(e){return h9[e]},Yn.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e},Yn.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');Th=e},Yn.isKanjiModeEnabled=function(){return typeof Th<"u"},Yn.toSJIS=function(e){return Th(e)};var mc={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.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: "+n)}}t.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},t.from=function(r,i){if(t.isValid(r))return r;try{return e(r)}catch{return i}}})(mc);function a3(){this.buffer=[],this.length=0}a3.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 n=0;n<e;n++)this.putBit((t>>>e-n-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 f9=a3;function zo(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)}zo.prototype.set=function(t,e,n,r){const i=t*this.size+e;this.data[i]=n,r&&(this.reservedBit[i]=!0)},zo.prototype.get=function(t,e){return this.data[t*this.size+e]},zo.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},zo.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var d9=zo,c3={};(function(t){const e=Yn.getSymbolSize;t.getRowColCoords=function(r){if(r===1)return[];const i=Math.floor(r/7)+2,o=e(r),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(r){const i=[],o=t.getRowColCoords(r),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}})(c3);var l3={};const p9=Yn.getSymbolSize,u3=7;l3.getPositions=function(e){const n=p9(e);return[[0,0],[n-u3,0],[0,n-u3]]};var h3={};(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 n(r,i,o){switch(r){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:"+r)}}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,n(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}})(h3);var wc={};const ci=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,n){switch(n){case ci.L:return vc[(e-1)*4+0];case ci.M:return vc[(e-1)*4+1];case ci.Q:return vc[(e-1)*4+2];case ci.H:return vc[(e-1)*4+3];default:return}},wc.getTotalCodewordsCount=function(e,n){switch(n){case ci.L:return yc[(e-1)*4+0];case ci.M:return yc[(e-1)*4+1];case ci.Q:return yc[(e-1)*4+2];case ci.H:return yc[(e-1)*4+3];default:return}};var f3={},bc={};const Wo=new Uint8Array(512),_c=new Uint8Array(256);(function(){let e=1;for(let n=0;n<255;n++)Wo[n]=e,_c[e]=n,e<<=1,e&256&&(e^=285);for(let n=255;n<512;n++)Wo[n]=Wo[n-255]})(),bc.log=function(e){if(e<1)throw new Error("log("+e+")");return _c[e]},bc.exp=function(e){return Wo[e]},bc.mul=function(e,n){return e===0||n===0?0:Wo[_c[e]+_c[n]]},function(t){const e=bc;t.mul=function(r,i){const o=new Uint8Array(r.length+i.length-1);for(let c=0;c<r.length;c++)for(let l=0;l<i.length;l++)o[c+l]^=e.mul(r[c],i[l]);return o},t.mod=function(r,i){let o=new Uint8Array(r);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(r){let i=new Uint8Array([1]);for(let o=0;o<r;o++)i=t.mul(i,new Uint8Array([1,e.exp(o)]));return i}}(f3);const d3=f3;function Rh(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}Rh.prototype.initialize=function(e){this.degree=e,this.genPoly=d3.generateECPolynomial(this.degree)},Rh.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(e.length+this.degree);n.set(e);const r=d3.mod(n,this.genPoly),i=this.degree-r.length;if(i>0){const o=new Uint8Array(this.degree);return o.set(r,i),o}return r};var g9=Rh,p3={},li={},Nh={};Nh.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Pr={};const g3="[0-9]+",m9="[A-Z $%*+\\-./:]+";let qo="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";qo=qo.replace(/u/g,"\\u");const w9="(?:(?![A-Z0-9 $%*+\\-./:]|"+qo+`)(?:.|[\r
152
- ]))+`;Pr.KANJI=new RegExp(qo,"g"),Pr.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Pr.BYTE=new RegExp(w9,"g"),Pr.NUMERIC=new RegExp(g3,"g"),Pr.ALPHANUMERIC=new RegExp(m9,"g");const v9=new RegExp("^"+qo+"$"),y9=new RegExp("^"+g3+"$"),b9=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Pr.testKanji=function(e){return v9.test(e)},Pr.testNumeric=function(e){return y9.test(e)},Pr.testAlphanumeric=function(e){return b9.test(e)},function(t){const e=Nh,n=Pr;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 n.testNumeric(o)?t.NUMERIC:n.testAlphanumeric(o)?t.ALPHANUMERIC:n.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 r(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 r(o)}catch{return c}}}(li),function(t){const e=Yn,n=wc,r=mc,i=li,o=Nh,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=n.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=r.from(P,r.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}}(p3);var m3={};const Mh=Yn,w3=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,_9=1<<14|1<<12|1<<10|1<<4|1<<1,v3=Mh.getBCHDigit(w3);m3.getEncodedBits=function(e,n){const r=e.bit<<3|n;let i=r<<10;for(;Mh.getBCHDigit(i)-v3>=0;)i^=w3<<Mh.getBCHDigit(i)-v3;return(r<<10|i)^_9};var y3={};const E9=li;function Ts(t){this.mode=E9.NUMERIC,this.data=t.toString()}Ts.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},Ts.prototype.getLength=function(){return this.data.length},Ts.prototype.getBitsLength=function(){return Ts.getBitsLength(this.data.length)},Ts.prototype.write=function(e){let n,r,i;for(n=0;n+3<=this.data.length;n+=3)r=this.data.substr(n,3),i=parseInt(r,10),e.put(i,10);const o=this.data.length-n;o>0&&(r=this.data.substr(n),i=parseInt(r,10),e.put(i,o*3+1))};var x9=Ts;const C9=li,Lh=["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 Rs(t){this.mode=C9.ALPHANUMERIC,this.data=t}Rs.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)},Rs.prototype.getLength=function(){return this.data.length},Rs.prototype.getBitsLength=function(){return Rs.getBitsLength(this.data.length)},Rs.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let r=Lh.indexOf(this.data[n])*45;r+=Lh.indexOf(this.data[n+1]),e.put(r,11)}this.data.length%2&&e.put(Lh.indexOf(this.data[n]),6)};var I9=Rs,S9=function(e){for(var n=[],r=e.length,i=0;i<r;i++){var o=e.charCodeAt(i);if(o>=55296&&o<=56319&&r>i+1){var c=e.charCodeAt(i+1);c>=56320&&c<=57343&&(o=(o-55296)*1024+c-56320+65536,i+=1)}if(o<128){n.push(o);continue}if(o<2048){n.push(o>>6|192),n.push(o&63|128);continue}if(o<55296||o>=57344&&o<65536){n.push(o>>12|224),n.push(o>>6&63|128),n.push(o&63|128);continue}if(o>=65536&&o<=1114111){n.push(o>>18|240),n.push(o>>12&63|128),n.push(o>>6&63|128),n.push(o&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer};const D9=S9,O9=li;function Ns(t){this.mode=O9.BYTE,typeof t=="string"&&(t=D9(t)),this.data=new Uint8Array(t)}Ns.getBitsLength=function(e){return e*8},Ns.prototype.getLength=function(){return this.data.length},Ns.prototype.getBitsLength=function(){return Ns.getBitsLength(this.data.length)},Ns.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)};var A9=Ns;const $9=li,P9=Yn;function Ms(t){this.mode=$9.KANJI,this.data=t}Ms.getBitsLength=function(e){return e*13},Ms.prototype.getLength=function(){return this.data.length},Ms.prototype.getBitsLength=function(){return Ms.getBitsLength(this.data.length)},Ms.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=P9.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
153
- Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),t.put(n,13)}};var T9=Ms,b3={exports:{}};(function(t){var e={single_source_shortest_paths:function(n,r,i){var o={},c={};c[r]=0;var l=e.PriorityQueue.make();l.push(r,0);for(var h,d,v,E,_,S,P,L,k;!l.empty();){h=l.pop(),d=h.value,E=h.cost,_=n[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 ",r," to ",i,"."].join("");throw new Error(q)}return o},extract_shortest_path_from_predecessor_list:function(n,r){for(var i=[],o=r;o;)i.push(o),n[o],o=n[o];return i.reverse(),i},find_path:function(n,r,i){var o=e.single_source_shortest_paths(n,r,i);return e.extract_shortest_path_from_predecessor_list(o,i)},PriorityQueue:{make:function(n){var r=e.PriorityQueue,i={},o;n=n||{};for(o in r)r.hasOwnProperty(o)&&(i[o]=r[o]);return i.queue=[],i.sorter=n.sorter||r.default_sorter,i},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var i={value:n,cost:r};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})(b3),function(t){const e=li,n=x9,r=I9,i=A9,o=T9,c=Pr,l=Yn,h=b3.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 n.getBitsLength(q);case e.ALPHANUMERIC:return r.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 n(q);case e.ALPHANUMERIC:return new r(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()))}}(y3);const Ec=Yn,jh=mc,R9=f9,N9=d9,M9=c3,L9=l3,Uh=h3,Fh=wc,j9=g9,xc=p3,U9=m3,F9=li,Bh=y3;function B9(t,e){const n=t.size,r=L9.getPositions(e);for(let i=0;i<r.length;i++){const o=r[i][0],c=r[i][1];for(let l=-1;l<=7;l++)if(!(o+l<=-1||n<=o+l))for(let h=-1;h<=7;h++)c+h<=-1||n<=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 k9(t){const e=t.size;for(let n=8;n<e-8;n++){const r=n%2===0;t.set(n,6,r,!0),t.set(6,n,r,!0)}}function H9(t,e){const n=M9.getPositions(e);for(let r=0;r<n.length;r++){const i=n[r][0],o=n[r][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 z9(t,e){const n=t.size,r=xc.getEncodedBits(e);let i,o,c;for(let l=0;l<18;l++)i=Math.floor(l/3),o=l%3+n-8-3,c=(r>>l&1)===1,t.set(i,o,c,!0),t.set(o,i,c,!0)}function kh(t,e,n){const r=t.size,i=U9.getEncodedBits(e,n);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(r-15+o,8,c,!0),o<8?t.set(8,r-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(r-8,8,1,!0)}function W9(t,e){const n=t.size;let r=-1,i=n-1,o=7,c=0;for(let l=n-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+=r,i<0||n<=i){i-=r,r=-r;break}}}function q9(t,e,n){const r=new R9;n.forEach(function(h){r.put(h.mode.bit,4),r.put(h.getLength(),F9.getCharCountIndicator(h.mode,t)),h.write(r)});const i=Ec.getSymbolTotalCodewords(t),o=Fh.getTotalCodewordsCount(t,e),c=(i-o)*8;for(r.getLengthInBits()+4<=c&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);const l=(c-r.getLengthInBits())/8;for(let h=0;h<l;h++)r.put(h%2?17:236,8);return V9(r,t,e)}function V9(t,e,n){const r=Ec.getSymbolTotalCodewords(e),i=Fh.getTotalCodewordsCount(e,n),o=r-i,c=Fh.getBlocksCount(e,n),l=r%c,h=c-l,d=Math.floor(r/c),v=Math.floor(o/c),E=v+1,_=d-v,S=new j9(_);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(r);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 K9(t,e,n,r){let i;if(Array.isArray(t))i=Bh.fromArray(t);else if(typeof t=="string"){let d=e;if(!d){const v=Bh.rawSplit(t);d=xc.getBestVersionForData(v,n)}i=Bh.fromString(t,d||40)}else throw new Error("Invalid data");const o=xc.getBestVersionForData(i,n);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(`
151
+ */const Hn=t=>t??hn;var zo={},m9=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},l3={},Yn={};let Rh;const w9=[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];Yn.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},Yn.getSymbolTotalCodewords=function(e){return w9[e]},Yn.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e},Yn.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');Rh=e},Yn.isKanjiModeEnabled=function(){return typeof Rh<"u"},Yn.toSJIS=function(e){return Rh(e)};var mc={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.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: "+n)}}t.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},t.from=function(r,i){if(t.isValid(r))return r;try{return e(r)}catch{return i}}})(mc);function u3(){this.buffer=[],this.length=0}u3.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 n=0;n<e;n++)this.putBit((t>>>e-n-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 v9=u3;function Wo(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)}Wo.prototype.set=function(t,e,n,r){const i=t*this.size+e;this.data[i]=n,r&&(this.reservedBit[i]=!0)},Wo.prototype.get=function(t,e){return this.data[t*this.size+e]},Wo.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},Wo.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var y9=Wo,h3={};(function(t){const e=Yn.getSymbolSize;t.getRowColCoords=function(r){if(r===1)return[];const i=Math.floor(r/7)+2,o=e(r),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(r){const i=[],o=t.getRowColCoords(r),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}})(h3);var f3={};const b9=Yn.getSymbolSize,d3=7;f3.getPositions=function(e){const n=b9(e);return[[0,0],[n-d3,0],[0,n-d3]]};var p3={};(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 n(r,i,o){switch(r){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:"+r)}}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,n(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}})(p3);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,n){switch(n){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,n){switch(n){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 g3={},bc={};const qo=new Uint8Array(512),_c=new Uint8Array(256);(function(){let e=1;for(let n=0;n<255;n++)qo[n]=e,_c[e]=n,e<<=1,e&256&&(e^=285);for(let n=255;n<512;n++)qo[n]=qo[n-255]})(),bc.log=function(e){if(e<1)throw new Error("log("+e+")");return _c[e]},bc.exp=function(e){return qo[e]},bc.mul=function(e,n){return e===0||n===0?0:qo[_c[e]+_c[n]]},function(t){const e=bc;t.mul=function(r,i){const o=new Uint8Array(r.length+i.length-1);for(let c=0;c<r.length;c++)for(let l=0;l<i.length;l++)o[c+l]^=e.mul(r[c],i[l]);return o},t.mod=function(r,i){let o=new Uint8Array(r);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(r){let i=new Uint8Array([1]);for(let o=0;o<r;o++)i=t.mul(i,new Uint8Array([1,e.exp(o)]));return i}}(g3);const m3=g3;function Mh(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}Mh.prototype.initialize=function(e){this.degree=e,this.genPoly=m3.generateECPolynomial(this.degree)},Mh.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(e.length+this.degree);n.set(e);const r=m3.mod(n,this.genPoly),i=this.degree-r.length;if(i>0){const o=new Uint8Array(this.degree);return o.set(r,i),o}return r};var _9=Mh,w3={},hi={},Lh={};Lh.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Pr={};const v3="[0-9]+",E9="[A-Z $%*+\\-./:]+";let Vo="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Vo=Vo.replace(/u/g,"\\u");const x9="(?:(?![A-Z0-9 $%*+\\-./:]|"+Vo+`)(?:.|[\r
152
+ ]))+`;Pr.KANJI=new RegExp(Vo,"g"),Pr.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Pr.BYTE=new RegExp(x9,"g"),Pr.NUMERIC=new RegExp(v3,"g"),Pr.ALPHANUMERIC=new RegExp(E9,"g");const C9=new RegExp("^"+Vo+"$"),I9=new RegExp("^"+v3+"$"),S9=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Pr.testKanji=function(e){return C9.test(e)},Pr.testNumeric=function(e){return I9.test(e)},Pr.testAlphanumeric=function(e){return S9.test(e)},function(t){const e=Lh,n=Pr;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 n.testNumeric(o)?t.NUMERIC:n.testAlphanumeric(o)?t.ALPHANUMERIC:n.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 r(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 r(o)}catch{return c}}}(hi),function(t){const e=Yn,n=wc,r=mc,i=hi,o=Lh,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=n.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=r.from(P,r.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}}(w3);var y3={};const jh=Yn,b3=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,D9=1<<14|1<<12|1<<10|1<<4|1<<1,_3=jh.getBCHDigit(b3);y3.getEncodedBits=function(e,n){const r=e.bit<<3|n;let i=r<<10;for(;jh.getBCHDigit(i)-_3>=0;)i^=b3<<jh.getBCHDigit(i)-_3;return(r<<10|i)^D9};var E3={};const O9=hi;function Ns(t){this.mode=O9.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 n,r,i;for(n=0;n+3<=this.data.length;n+=3)r=this.data.substr(n,3),i=parseInt(r,10),e.put(i,10);const o=this.data.length-n;o>0&&(r=this.data.substr(n),i=parseInt(r,10),e.put(i,o*3+1))};var A9=Ns;const $9=hi,Uh=["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 Rs(t){this.mode=$9.ALPHANUMERIC,this.data=t}Rs.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)},Rs.prototype.getLength=function(){return this.data.length},Rs.prototype.getBitsLength=function(){return Rs.getBitsLength(this.data.length)},Rs.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let r=Uh.indexOf(this.data[n])*45;r+=Uh.indexOf(this.data[n+1]),e.put(r,11)}this.data.length%2&&e.put(Uh.indexOf(this.data[n]),6)};var P9=Rs,T9=function(e){for(var n=[],r=e.length,i=0;i<r;i++){var o=e.charCodeAt(i);if(o>=55296&&o<=56319&&r>i+1){var c=e.charCodeAt(i+1);c>=56320&&c<=57343&&(o=(o-55296)*1024+c-56320+65536,i+=1)}if(o<128){n.push(o);continue}if(o<2048){n.push(o>>6|192),n.push(o&63|128);continue}if(o<55296||o>=57344&&o<65536){n.push(o>>12|224),n.push(o>>6&63|128),n.push(o&63|128);continue}if(o>=65536&&o<=1114111){n.push(o>>18|240),n.push(o>>12&63|128),n.push(o>>6&63|128),n.push(o&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer};const N9=T9,R9=hi;function Ms(t){this.mode=R9.BYTE,typeof t=="string"&&(t=N9(t)),this.data=new Uint8Array(t)}Ms.getBitsLength=function(e){return e*8},Ms.prototype.getLength=function(){return this.data.length},Ms.prototype.getBitsLength=function(){return Ms.getBitsLength(this.data.length)},Ms.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)};var M9=Ms;const L9=hi,j9=Yn;function Ls(t){this.mode=L9.KANJI,this.data=t}Ls.getBitsLength=function(e){return e*13},Ls.prototype.getLength=function(){return this.data.length},Ls.prototype.getBitsLength=function(){return Ls.getBitsLength(this.data.length)},Ls.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=j9.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
153
+ Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),t.put(n,13)}};var U9=Ls,x3={exports:{}};(function(t){var e={single_source_shortest_paths:function(n,r,i){var o={},c={};c[r]=0;var l=e.PriorityQueue.make();l.push(r,0);for(var h,d,v,E,_,S,P,L,k;!l.empty();){h=l.pop(),d=h.value,E=h.cost,_=n[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 ",r," to ",i,"."].join("");throw new Error(q)}return o},extract_shortest_path_from_predecessor_list:function(n,r){for(var i=[],o=r;o;)i.push(o),n[o],o=n[o];return i.reverse(),i},find_path:function(n,r,i){var o=e.single_source_shortest_paths(n,r,i);return e.extract_shortest_path_from_predecessor_list(o,i)},PriorityQueue:{make:function(n){var r=e.PriorityQueue,i={},o;n=n||{};for(o in r)r.hasOwnProperty(o)&&(i[o]=r[o]);return i.queue=[],i.sorter=n.sorter||r.default_sorter,i},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var i={value:n,cost:r};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})(x3),function(t){const e=hi,n=A9,r=P9,i=M9,o=U9,c=Pr,l=Yn,h=x3.exports;function d(q){return unescape(encodeURIComponent(q)).length}function v(q,T,M){const A=[];let N;for(;(N=q.exec(M))!==null;)A.push({data:N[0],index:N.index,mode:T,length:N[0].length});return A}function E(q){const T=v(c.NUMERIC,e.NUMERIC,q),M=v(c.ALPHANUMERIC,e.ALPHANUMERIC,q);let A,N;return l.isKanjiModeEnabled()?(A=v(c.BYTE,e.BYTE,q),N=v(c.KANJI,e.KANJI,q)):(A=v(c.BYTE_KANJI,e.BYTE,q),N=[]),T.concat(M,A,N).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 n.getBitsLength(q);case e.ALPHANUMERIC:return r.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 N=["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<N.length;de++){const me=N[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))}}N=x}for(let C=0;C<N.length;C++)A[N[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 n(q);case e.ALPHANUMERIC:return new r(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()),N=P(A),C=L(N,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()))}}(E3);const Ec=Yn,Fh=mc,F9=v9,B9=y9,k9=h3,H9=f3,Bh=p3,kh=wc,z9=_9,xc=w3,W9=y3,q9=hi,Hh=E3;function V9(t,e){const n=t.size,r=H9.getPositions(e);for(let i=0;i<r.length;i++){const o=r[i][0],c=r[i][1];for(let l=-1;l<=7;l++)if(!(o+l<=-1||n<=o+l))for(let h=-1;h<=7;h++)c+h<=-1||n<=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 K9(t){const e=t.size;for(let n=8;n<e-8;n++){const r=n%2===0;t.set(n,6,r,!0),t.set(6,n,r,!0)}}function G9(t,e){const n=k9.getPositions(e);for(let r=0;r<n.length;r++){const i=n[r][0],o=n[r][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 Z9(t,e){const n=t.size,r=xc.getEncodedBits(e);let i,o,c;for(let l=0;l<18;l++)i=Math.floor(l/3),o=l%3+n-8-3,c=(r>>l&1)===1,t.set(i,o,c,!0),t.set(o,i,c,!0)}function zh(t,e,n){const r=t.size,i=W9.getEncodedBits(e,n);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(r-15+o,8,c,!0),o<8?t.set(8,r-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(r-8,8,1,!0)}function Y9(t,e){const n=t.size;let r=-1,i=n-1,o=7,c=0;for(let l=n-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+=r,i<0||n<=i){i-=r,r=-r;break}}}function J9(t,e,n){const r=new F9;n.forEach(function(h){r.put(h.mode.bit,4),r.put(h.getLength(),q9.getCharCountIndicator(h.mode,t)),h.write(r)});const i=Ec.getSymbolTotalCodewords(t),o=kh.getTotalCodewordsCount(t,e),c=(i-o)*8;for(r.getLengthInBits()+4<=c&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);const l=(c-r.getLengthInBits())/8;for(let h=0;h<l;h++)r.put(h%2?17:236,8);return X9(r,t,e)}function X9(t,e,n){const r=Ec.getSymbolTotalCodewords(e),i=kh.getTotalCodewordsCount(e,n),o=r-i,c=kh.getBlocksCount(e,n),l=r%c,h=c-l,d=Math.floor(r/c),v=Math.floor(o/c),E=v+1,_=d-v,S=new z9(_);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(r);let A=0,N,C;for(N=0;N<q;N++)for(C=0;C<c;C++)N<L[C].length&&(M[A++]=L[C][N]);for(N=0;N<_;N++)for(C=0;C<c;C++)M[A++]=k[C][N];return M}function Q9(t,e,n,r){let i;if(Array.isArray(t))i=Hh.fromArray(t);else if(typeof t=="string"){let d=e;if(!d){const v=Hh.rawSplit(t);d=xc.getBestVersionForData(v,n)}i=Hh.fromString(t,d||40)}else throw new Error("Invalid data");const o=xc.getBestVersionForData(i,n);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
155
  The chosen QR Code version cannot contain this amount of data.
156
156
  Minimum version required to store current data is: `+o+`.
157
- `);const c=q9(e,n,i),l=Ec.getSymbolSize(e),h=new N9(l);return B9(h,e),k9(h),H9(h,e),kh(h,n,0),e>=7&&z9(h,e),W9(h,c),isNaN(r)&&(r=Uh.getBestMask(h,kh.bind(null,h,n))),Uh.applyMask(r,h),kh(h,n,r),{modules:h,version:e,errorCorrectionLevel:n,maskPattern:r,segments:i}}o3.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");let r=jh.M,i,o;return typeof n<"u"&&(r=jh.from(n.errorCorrectionLevel,jh.M),i=xc.from(n.version),o=Uh.from(n.maskPattern),n.toSJISFunc&&Ec.setToSJISFunction(n.toSJISFunc)),K9(e,i,r,o)};var _3={},Hh={};(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(o){return[o,o]}))),r.length===6&&r.push("F","F");const i=parseInt(r.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+r.slice(0,6).join("")}}t.getOptions=function(r){r||(r={}),r.color||(r.color={});const i=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,o=r.width&&r.width>=21?r.width:void 0,c=r.scale||4;return{width:o,scale:o?4:c,margin:i,color:{dark:e(r.color.dark||"#000000ff"),light:e(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},t.getScale=function(r,i){return i.width&&i.width>=r+i.margin*2?i.width/(r+i.margin*2):i.scale},t.getImageWidth=function(r,i){const o=t.getScale(r,i);return Math.floor((r+i.margin*2)*o)},t.qrToImageData=function(r,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 S=0;S<d;S++){let P=(_*d+S)*4,L=o.color.light;if(_>=v&&S>=v&&_<d-v&&S<d-v){const k=Math.floor((_-v)/h),q=Math.floor((S-v)/h);L=E[l[k*c+q]?1:0]}r[P++]=L.r,r[P++]=L.g,r[P++]=L.b,r[P]=L.a}}})(Hh),function(t){const e=Hh;function n(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 r(){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=r()),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),n(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)}}(_3);var E3={};const G9=Hh;function x3(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function zh(t,e,n){let r=t+e;return typeof n<"u"&&(r+=" "+n),r}function Z9(t,e,n){let r="",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]||(r+=o?zh("M",h+n,.5+d+n):zh("m",i,0),i=0,o=!1),h+1<e&&t[l+1]||(r+=zh("h",c),c=0)):i++}return r}E3.render=function(e,n,r){const i=G9.getOptions(n),o=e.modules.size,c=e.modules.data,l=o+i.margin*2,h=i.color.light.a?"<path "+x3(i.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",d="<path "+x3(i.color.dark,"stroke")+' d="'+Z9(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>
158
- `;return typeof r=="function"&&r(null,_),_};const Y9=u9,Wh=o3,C3=_3,J9=E3;function qh(t,e,n,r,i){const o=[].slice.call(arguments,1),c=o.length,l=typeof o[c-1]=="function";if(!l&&!Y9())throw new Error("Callback required as last argument");if(l){if(c<2)throw new Error("Too few arguments provided");c===2?(i=n,n=e,e=r=void 0):c===3&&(e.getContext&&typeof i>"u"?(i=r,r=void 0):(i=r,r=n,n=e,e=void 0))}else{if(c<1)throw new Error("Too few arguments provided");return c===1?(n=e,e=r=void 0):c===2&&!e.getContext&&(r=n,n=e,e=void 0),new Promise(function(h,d){try{const v=Wh.create(n,r);h(t(v,e,r))}catch(v){d(v)}})}try{const h=Wh.create(n,r);i(null,t(h,e,r))}catch(h){i(h)}}Ho.create=Wh.create,Ho.toCanvas=qh.bind(null,C3.render),Ho.toDataURL=qh.bind(null,C3.renderToDataURL),Ho.toString=qh.bind(null,function(t,e,n){return J9.render(t,n)});var X9=Object.defineProperty,I3=Object.getOwnPropertySymbols,Q9=Object.prototype.hasOwnProperty,eC=Object.prototype.propertyIsEnumerable,S3=(t,e,n)=>e in t?X9(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Cc=(t,e)=>{for(var n in e||(e={}))Q9.call(e,n)&&S3(t,n,e[n]);if(I3)for(var n of I3(e))eC.call(e,n)&&S3(t,n,e[n]);return t};function tC(){var t;const e=(t=Hr.state.themeMode)!=null?t:"dark",n={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":n.foreground[1],"--w3m-color-fg-2":n.foreground[2],"--w3m-color-fg-3":n.foreground[3],"--w3m-color-bg-1":n.background[1],"--w3m-color-bg-2":n.background[2],"--w3m-color-bg-3":n.background[3],"--w3m-color-overlay":n.overlay}}function nC(){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 rC(){const{themeVariables:t}=Hr.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}=Hr.state;if(t){const n=Cc(Cc(Cc(Cc({},tC()),nC()),e),rC());Object.entries(n).forEach(([r,i])=>t.style.setProperty(r,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)}`},iC=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 sC=Object.defineProperty,oC=Object.getOwnPropertyDescriptor,Ic=(t,e,n,r)=>{for(var i=r>1?void 0:r?oC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&sC(e,n,i),i};let Ls=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>`}};Ls.styles=[He.globalCss,iC],Ic([We()],Ls.prototype,"icon",2),Ic([We()],Ls.prototype,"label",2),Ic([We()],Ls.prototype,"onClick",2),Ls=Ic([Be("w3m-box-button")],Ls);const aC=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 cC=Object.defineProperty,lC=Object.getOwnPropertyDescriptor,Vo=(t,e,n,r)=>{for(var i=r>1?void 0:r?lC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&cC(e,n,i),i};let ki=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="${kn(t)}" ?disabled="${this.disabled}" @click="${this.onClick}">${this.iconLeft}<w3m-text variant="small-regular" color="inverse"><slot></slot></w3m-text>${this.iconRight}</button>`}};ki.styles=[He.globalCss,aC],Vo([We()],ki.prototype,"disabled",2),Vo([We()],ki.prototype,"iconLeft",2),Vo([We()],ki.prototype,"iconRight",2),Vo([We()],ki.prototype,"onClick",2),ki=Vo([Be("w3m-button")],ki);const uC=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 hC=Object.defineProperty,fC=Object.getOwnPropertyDescriptor,Vh=(t,e,n,r)=>{for(var i=r>1?void 0:r?fC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&hC(e,n,i),i};let Ko=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="${kn(t)}"><slot></slot></button>`}};Ko.styles=[He.globalCss,uC],Vh([We()],Ko.prototype,"disabled",2),Vh([We()],Ko.prototype,"variant",2),Ko=Vh([Be("w3m-button-big")],Ko);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>`},dC=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 pC=Object.defineProperty,gC=Object.getOwnPropertyDescriptor,D3=(t,e,n,r)=>{for(var i=r>1?void 0:r?gC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&pC(e,n,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=Hr.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="${kn(t)}"><button class="w3m-action-btn" @click="${this.onHelp}">${Ze.HELP_ICON}</button> <button class="w3m-action-btn" @click="${un.close}">${Ze.CROSS_ICON}</button></div></div>`}};Sc.styles=[He.globalCss,dC],D3([wt()],Sc.prototype,"isHelp",2),Sc=D3([Be("w3m-modal-backcard")],Sc);const mC=Ge`main{padding:20px;padding-top:0;width:100%}`;var wC=Object.defineProperty,vC=Object.getOwnPropertyDescriptor,yC=(t,e,n,r)=>{for(var i=r>1?void 0:r?vC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&wC(e,n,i),i};let Kh=class extends Re{render(){return ce`<main><slot></slot></main>`}};Kh.styles=[He.globalCss,mC],Kh=yC([Be("w3m-modal-content")],Kh);const bC=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 _C=Object.defineProperty,EC=Object.getOwnPropertyDescriptor,xC=(t,e,n,r)=>{for(var i=r>1?void 0:r?EC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&_C(e,n,i),i};let Gh=class extends Re{render(){return ce`<footer><slot></slot></footer>`}};Gh.styles=[He.globalCss,bC],Gh=xC([Be("w3m-modal-footer")],Gh);const CC=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 IC=Object.defineProperty,SC=Object.getOwnPropertyDescriptor,Go=(t,e,n,r)=>{for(var i=r>1?void 0:r?SC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&IC(e,n,i),i};let Hi=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,n=this.title?ce`<w3m-text variant="big-bold">${this.title}</w3m-text>`:ce`<slot></slot>`;return ce`<header class="${kn(t)}">${e?this.backBtnTemplate():null} ${n} ${this.onAction?this.actionBtnTemplate():null}</header>`}};Hi.styles=[He.globalCss,CC],Go([We()],Hi.prototype,"title",2),Go([We()],Hi.prototype,"onAction",2),Go([We()],Hi.prototype,"actionIcon",2),Go([We()],Hi.prototype,"border",2),Hi=Go([Be("w3m-modal-header")],Hi);const DC={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 js=(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))(js||{});const zi={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:n,coinbaseWalletExtension:r}=window;return e?e.isTrust||e.isTrustWallet?"trust":e.isPhantom?"phantom":e.isBraveWallet?"brave":n?"spotEthWallet":e.isExodus?"exodus":e.isTokenPocket?"tokenPocket":e.isFrame?"frame":e.isTally?"tally":r?"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,n;if(t.length&&t.toUpperCase()!=="INJECTED")return t;const r=zi.getInjectedId("");return(n=(e=zi.injectedPreset[r])==null?void 0:e.name)!=null?n:"Injected"}},OC={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 AC=Object.defineProperty,O3=Object.getOwnPropertySymbols,$C=Object.prototype.hasOwnProperty,PC=Object.prototype.propertyIsEnumerable,A3=(t,e,n)=>e in t?AC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,TC=(t,e)=>{for(var n in e||(e={}))$C.call(e,n)&&A3(t,n,e[n]);if(O3)for(var n of O3(e))PC.call(e,n)&&A3(t,n,e[n]);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 n=t.renderRoot.querySelector(e);if(!n)throw new Error(`${e} not found`);return n},getWalletId(t){return zi.getInjectedId(t)},getWalletIcon(t){var e,n;const r=(e=zi.injectedPreset[t])==null?void 0:e.icon,{projectId:i,walletImages:o}=cn.state;return(n=o?.[t])!=null?n:i&&r?ln.getImageUrl(r):""},getWalletName(t,e=!1){const n=zi.getInjectedName(t);return e?n.split(" ")[0]:n},getChainIcon(t){var e;const n=DC[t],{projectId:r,chainImages:i}=cn.state;return(e=i?.[t])!=null?e:r&&n?ln.getImageUrl(n):""},getTokenIcon(t){var e,n;const r=(e=OC[t])==null?void 0:e.icon,{projectId:i,tokenImages:o}=cn.state;return(n=o?.[t])!=null?n:i&&r?ln.getImageUrl(r):""},isMobileAnimation(){return window.innerWidth<=ye.MOBILE_BREAKPOINT},async preloadImage(t){const e=new Promise((n,r)=>{const i=new Image;i.onload=n,i.onerror=r,i.src=t});return Promise.race([e,rt.wait(3e3)])},getErrorMessage(t){return t instanceof Error?t.message:"Unknown Error"},debounce(t,e=500){let n;return(...r)=>{function i(){t(...r)}n&&clearTimeout(n),n=setTimeout(i,e)}},async handleMobileLinking(t){rt.removeWalletConnectDeepLink();const{standaloneUri:e,selectedChain:n}=$e.state,{links:r,name:i}=t;function o(c){let l="";r!=null&&r.universal?l=rt.formatUniversalUrl(r.universal,c,i):r!=null&&r.native&&(l=rt.formatNativeUrl(r.native,c,i)),rt.openHref(l,"_self")}e?(ye.setRecentWallet(t),o(e)):(await Nt.client().connectWalletConnect(c=>{o(c)},n?.id),ye.setRecentWallet(t),un.close())},async handleAndroidLinking(){rt.removeWalletConnectDeepLink();const{standaloneUri:t,selectedChain:e}=$e.state;t?rt.openHref(t,"_self"):(await Nt.client().connectWalletConnect(n=>{rt.setWalletConnectAndroidDeepLink(n),rt.openHref(n,"_self")},e?.id),un.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)}Cn.openToast("Link copied","success")},async handleConnectorConnection(t,e){try{const{selectedChain:n}=$e.state;await Nt.client().connectConnector(t,n?.id),un.close()}catch(n){console.error(n),e?e():Cn.openToast(ye.getErrorMessage(n),"error")}},getCustomWallets(){var t;const{desktopWallets:e,mobileWallets:n}=cn.state;return(t=rt.isMobile()?n:e)!=null?t:[]},getCustomImageUrls(){const{chainImages:t,walletImages:e}=cn.state,n=Object.values(t??{}),r=Object.values(e??{});return Object.values([...n,...r])},getConnectorImageUrls(){return Nt.client().getConnectors().map(({id:t})=>zi.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 n=(e=t.match(/.{1,7}/g))==null?void 0:e.splice(0,5),r=[];n?.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}r.push(`rgb(${l[0]}, ${l[1]}, ${l[2]})`)});const i=document.querySelector(":root");if(i){const o={"--w3m-color-av-1":r[0],"--w3m-color-av-2":r[1],"--w3m-color-av-3":r[2],"--w3m-color-av-4":r[3],"--w3m-color-av-5":r[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,n=JSON.parse(t);if(n[e])return n[e]}},getExtensionWallets(){const t=[];for(const[e,n]of Object.entries(zi.injectedPreset))n!=null&&n.isInjected&&!n.isDesktop&&t.push(TC({id:e},n));return t},caseSafeIncludes(t,e){return t.toUpperCase().includes(e.toUpperCase())},openWalletExplorerUrl(){rt.openHref(ye.EXPLORER_WALLET_URL,"_blank")}},RC=Ge`.w3m-router{overflow:hidden;will-change:transform}.w3m-content{display:flex;flex-direction:column}`;var NC=Object.defineProperty,MC=Object.getOwnPropertyDescriptor,Zh=(t,e,n,r)=>{for(var i=r>1?void 0:r?MC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&NC(e,n,i),i};let Zo=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"&&(ai(this.routerEl,{height:[this.oldHeight,e]},{duration:.2}),ai(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 ai(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>`}};Zo.styles=[He.globalCss,RC],Zh([wt()],Zo.prototype,"view",2),Zh([wt()],Zo.prototype,"prevView",2),Zo=Zh([Be("w3m-modal-router")],Zo);const LC=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 jC=Object.defineProperty,UC=Object.getOwnPropertyDescriptor,$3=(t,e,n,r)=>{for(var i=r>1?void 0:r?UC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&jC(e,n,i),i};let Dc=class extends Re{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=Cn.subscribe(t=>{t.open?(this.open=!0,this.timeout=setTimeout(()=>Cn.closeToast(),2200)):(this.open=!1,clearTimeout(this.timeout))})}disconnectedCallback(){var t;(t=this.unsubscribe)==null||t.call(this),clearTimeout(this.timeout),Cn.closeToast()}render(){const{message:t,variant:e}=Cn.state,n={"w3m-success":e==="success","w3m-error":e==="error"};return this.open?ce`<div class="${kn(n)}">${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,LC],$3([wt()],Dc.prototype,"open",2),Dc=$3([Be("w3m-modal-toast")],Dc);const FC=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 BC=Object.defineProperty,kC=Object.getOwnPropertyDescriptor,Oc=(t,e,n,r)=>{for(var i=r>1?void 0:r?kC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&BC(e,n,i),i};let Us=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>`}};Us.styles=[He.globalCss,FC],Oc([We()],Us.prototype,"onClick",2),Oc([We()],Us.prototype,"name",2),Oc([We()],Us.prototype,"chainId",2),Us=Oc([Be("w3m-network-button")],Us);const HC=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 zC=Object.defineProperty,WC=Object.getOwnPropertyDescriptor,P3=(t,e,n,r)=>{for(var i=r>1?void 0:r?WC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&zC(e,n,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,HC],P3([We()],Ac.prototype,"chainId",2),Ac=P3([Be("w3m-network-image")],Ac);const qC=.1,T3=2.5,zr=7;function Yh(t,e,n){return t===e?!1:(t-e<0?e-t:t-e)<=n+qC}function VC(t,e){const n=Array.prototype.slice.call(Ho.create(t,{errorCorrectionLevel:e}).modules.data,0),r=Math.sqrt(n.length);return n.reduce((i,o,c)=>(c%r===0?i.push([o]):i[i.length-1].push(o))&&i,[])}const KC={generate(t,e,n,r){const i=r==="light"?"#141414":"#fff",o=r==="light"?"#fff":"#141414",c=[],l=VC(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-zr)*h*L,T=(l.length-zr)*h*k,M=.32;for(let A=0;A<d.length;A+=1){const R=h*(zr-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((n+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<zr&&T<zr||k>l.length-(zr+1)&&T<zr||k<zr&&T>l.length-(zr+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=>!Yh(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/T3}">`)})}),Object.entries(P).filter(([L,k])=>k.length>1).map(([L,k])=>{const q=k.filter(T=>k.some(M=>Yh(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=>Yh(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/(T3/2)}" stroke-linecap="round">`)})}),c}},GC=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 ZC=Object.defineProperty,YC=Object.getOwnPropertyDescriptor,Yo=(t,e,n,r)=>{for(var i=r>1?void 0:r?YC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&ZC(e,n,i),i};let Wi=class extends Re{constructor(){super(...arguments),this.uri="",this.size=0,this.logoSrc="",this.walletId=""}svgTemplate(){var t;const e=(t=Hr.state.themeMode)!=null?t:"light";return ft`<svg height="${this.size}" width="${this.size}">${KC.generate(this.uri,this.size,this.size/4,e)}</svg>`}render(){return ce`<div>${this.walletId||this.logoSrc?ce`<w3m-wallet-image walletId="${Hn(this.walletId)}" src="${Hn(this.logoSrc)}"></w3m-wallet-image>`:Ze.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}</div>`}};Wi.styles=[He.globalCss,GC],Yo([We()],Wi.prototype,"uri",2),Yo([We({type:Number})],Wi.prototype,"size",2),Yo([We()],Wi.prototype,"logoSrc",2),Yo([We()],Wi.prototype,"walletId",2),Wi=Yo([Be("w3m-qrcode")],Wi);const JC=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 XC=Object.defineProperty,QC=Object.getOwnPropertyDescriptor,R3=(t,e,n,r)=>{for(var i=r>1?void 0:r?QC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&XC(e,n,i),i};let $c=class extends Re{constructor(){super(...arguments),this.onChange=()=>null}render(){const t=rt.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,JC],R3([We()],$c.prototype,"onChange",2),$c=R3([Be("w3m-search-input")],$c);const eI=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 tI=Object.defineProperty,nI=Object.getOwnPropertyDescriptor,rI=(t,e,n,r)=>{for(var i=r>1?void 0:r?nI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&tI(e,n,i),i};let Jh=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>`}};Jh.styles=[He.globalCss,eI],Jh=rI([Be("w3m-spinner")],Jh);const iI=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 sI=Object.defineProperty,oI=Object.getOwnPropertyDescriptor,Xh=(t,e,n,r)=>{for(var i=r>1?void 0:r?oI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&sI(e,n,i),i};let Jo=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="${kn(t)}"></slot></span>`}};Jo.styles=[He.globalCss,iI],Xh([We()],Jo.prototype,"variant",2),Xh([We()],Jo.prototype,"color",2),Jo=Xh([Be("w3m-text")],Jo);const aI=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 cI=Object.defineProperty,lI=Object.getOwnPropertyDescriptor,N3=(t,e,n,r)=>{for(var i=r>1?void 0:r?lI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&cI(e,n,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,aI],N3([We()],Pc.prototype,"symbol",2),Pc=N3([Be("w3m-token-image")],Pc);const uI=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 hI=Object.defineProperty,fI=Object.getOwnPropertyDescriptor,ui=(t,e,n,r)=>{for(var i=r>1?void 0:r?fI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&hI(e,n,i),i};let Tr=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>`}};Tr.styles=[He.globalCss,uI],ui([We()],Tr.prototype,"onClick",2),ui([We()],Tr.prototype,"name",2),ui([We()],Tr.prototype,"walletId",2),ui([We()],Tr.prototype,"label",2),ui([We()],Tr.prototype,"src",2),ui([We()],Tr.prototype,"installed",2),ui([We()],Tr.prototype,"recent",2),Tr=ui([Be("w3m-wallet-button")],Tr);const dI=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 pI=Object.defineProperty,gI=Object.getOwnPropertyDescriptor,Qh=(t,e,n,r)=>{for(var i=r>1?void 0:r?gI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&pI(e,n,i),i};let Xo=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:""),n=this.src?this.src:ye.getWalletIcon(e);return ce`${n.length?ce`<div><img src="${n}" alt="${this.id}"></div>`:Ze.WALLET_PLACEHOLDER}`}};Xo.styles=[He.globalCss,dI],Qh([We()],Xo.prototype,"walletId",2),Qh([We()],Xo.prototype,"src",2),Xo=Qh([Be("w3m-wallet-image")],Xo);var mI=Object.defineProperty,wI=Object.getOwnPropertyDescriptor,vI=(t,e,n,r)=>{for(var i=r>1?void 0:r?wI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&mI(e,n,i),i};let M3=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)un.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 n=(e=$e.state.chains)==null?void 0:e.find(r=>r.id===1);if(cn.state.enableAccountView&&n)try{await Et.fetchProfile(ye.preloadImage,t)}catch(r){console.error(r),Cn.openToast(ye.getErrorMessage(r),"error")}}async fetchBalance(t){if(cn.state.enableAccountView)try{await Et.fetchBalance(t)}catch(e){console.error(e),Cn.openToast(ye.getErrorMessage(e),"error")}}};M3=vI([Be("w3m-account-context")],M3);var yI=Object.defineProperty,bI=Object.getOwnPropertyDescriptor,L3=(t,e,n,r)=>{for(var i=r>1?void 0:r?bI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&yI(e,n,i),i};let e0=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(cn.state.enableExplorer){const{standaloneChains:e,chains:n,walletConnectVersion:r}=$e.state,i=e?.join(",");await Promise.all([ln.getPreviewWallets({page:1,entries:10,chains:i,device:rt.isMobile()?"mobile":"desktop",version:r}),ln.getRecomendedWallets()]),$e.setIsDataLoaded(!0);const{previewWallets:o,recomendedWallets:c}=ln.state,l=(t=n?.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),Cn.openToast("Failed preloading","error")}}};L3([wt()],e0.prototype,"preload",2),e0=L3([Be("w3m-explorer-context")],e0);var _I=Object.defineProperty,EI=Object.getOwnPropertyDescriptor,j3=(t,e,n,r)=>{for(var i=r>1?void 0:r?EI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&_I(e,n,i),i};let t0=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 n=e.chain;n&&this.activeChainId!==n.id&&($e.setSelectedChain(n),this.activeChainId=n.id,Et.resetBalance(),this.fetchBalance())})}disconnectedCallback(){var t;(t=this.unwatchNetwork)==null||t.call(this)}async fetchBalance(){if(cn.state.enableAccountView)try{await Et.fetchBalance()}catch(t){console.error(t),Cn.openToast(ye.getErrorMessage(t),"error")}}};j3([wt()],t0.prototype,"activeChainId",2),t0=j3([Be("w3m-network-context")],t0);var xI=Object.defineProperty,CI=Object.getOwnPropertyDescriptor,II=(t,e,n,r)=>{for(var i=r>1?void 0:r?CI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&xI(e,n,i),i};let U3=class extends Re{constructor(){super(),this.unsubscribeTheme=void 0,He.setTheme(),this.unsubscribeTheme=Hr.subscribe(He.setTheme),this.preloadThemeImages()}disconnectedCallback(){var t;(t=this.unsubscribeTheme)==null||t.call(this)}async preloadThemeImages(){try{const{themeVariables:t}=Hr.state,e=[t?.["--w3m-background-image-url"],t?.["--w3m-logo-image-url"]].filter(Boolean);e.length&&await Promise.all(e.map(async n=>ye.preloadImage(n)))}catch{console.info("Unsuccessful attempt at preloading some images")}}};U3=II([Be("w3m-theme-context")],U3);const SI=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 DI=Object.defineProperty,OI=Object.getOwnPropertyDescriptor,n0=(t,e,n,r)=>{for(var i=r>1?void 0:r?OI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&DI(e,n,i),i};let Fs=class extends Re{constructor(){super(),this.balance="hide",this.avatar="show",ye.rejectStandaloneButtonComponent()}onOpen(){const{isStandalone:t}=$e.state;t||un.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="${kn(e)}">${this.accountTemplate()}</button></div>`:ce`<w3m-button-big @click="${this.onOpen}">${this.accountTemplate()}</w3m-button-big>`}};Fs.styles=[He.globalCss,SI],n0([We()],Fs.prototype,"balance",2),n0([We()],Fs.prototype,"avatar",2),Fs=n0([Be("w3m-account-button")],Fs);const AI=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 $I=Object.defineProperty,PI=Object.getOwnPropertyDescriptor,r0=(t,e,n,r)=>{for(var i=r>1?void 0:r?PI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&$I(e,n,i),i};let Qo=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,n=t?.map(o=>o.id),r=e&&n?.includes(e.id),i=t&&t.length<=1&&r;return ce`<button @click="${this.onClick}" ?disabled="${i}"><w3m-network-image chainId="${Hn(this.chainId)}"></w3m-network-image><w3m-text variant="xsmall-regular" color="accent">${this.label}</w3m-text></button>`}};Qo.styles=[He.globalCss,AI],r0([wt()],Qo.prototype,"chainId",2),r0([wt()],Qo.prototype,"label",2),Qo=r0([Be("w3m-account-network-button")],Qo);const TI=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 RI=Object.defineProperty,NI=Object.getOwnPropertyDescriptor,ea=(t,e,n,r)=>{for(var i=r>1?void 0:r?NI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&RI(e,n,i),i};let qi=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:n})=>{this.address=t,this.name=e,this.loading=!!n})}disconnectedCallback(){var t;(t=this.unsubscribeAccount)==null||t.call(this)}render(){var t;const e=this.variant==="button",n={"w3m-loading":this.loading};return ce`<w3m-text class="${kn(n)}" variant="${e?"medium-regular":"big-bold"}" color="${e?"inverse":"primary"}">${this.name?this.name:ye.truncate((t=this.address)!=null?t:"")}</w3m-text>`}};qi.styles=[He.globalCss,TI],ea([wt()],qi.prototype,"address",2),ea([wt()],qi.prototype,"name",2),ea([wt()],qi.prototype,"loading",2),ea([We()],qi.prototype,"variant",2),qi=ea([Be("w3m-address-text")],qi);const Rn={allowedExplorerListings(t){const{explorerAllowList:e,explorerDenyList:n}=cn.state;let r=[...t];return e&&(r=r.filter(i=>e.includes(i.id))),n&&(r=r.filter(i=>!n.includes(i.id))),r},walletsWithInjected(t){let e=[...t??[]];if(window.ethereum){const n=ye.getWalletName("");e=e.filter(({name:r})=>!ye.caseSafeIncludes(r,n))}return e},connectorWallets(){const{isStandalone:t}=$e.state;if(t)return[];let e=Nt.client().getConnectors();return!window.ethereum&&rt.isMobile()&&(e=e.filter(({id:n})=>n!=="injected"&&n!==js.metaMask)),e},walletTemplatesWithRecent(t,e){let n=[...t];if(e){const r=ye.getRecentWallet();n=n.filter(i=>!i.values.includes(r?.name)),n.splice(1,0,e)}return n},deduplicateExplorerListingsFromConnectors(t){const{isStandalone:e}=$e.state;if(e)return t;const n=Nt.client().getConnectors().map(({name:r})=>r.toUpperCase());return t.filter(({name:r})=>!n.includes(r.toUpperCase()))}},MI=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 LI=Object.defineProperty,jI=Object.getOwnPropertyDescriptor,UI=(t,e,n,r)=>{for(var i=r>1?void 0:r?jI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&LI(e,n,i),i};let i0=class extends Re{onGoToQrcode(){lt.push("Qrcode")}onGoToConnectors(){lt.push("Connectors")}onGoToGetWallet(){lt.push("GetWallet")}getConnectors(){let t=Rn.connectorWallets();return window.ethereum||(t=t.filter(({id:e})=>e!=="injected"&&e!==js.metaMask)),t}render(){const{previewWallets:t}=ln.state,e=t.length,n=[...t,...t],r=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">${n.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">${r?"WalletConnect":"Select Wallet"}</w3m-text></w3m-button-big>${r?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>`}};i0.styles=[He.globalCss,MI],i0=UI([Be("w3m-android-wallet-selection")],i0);const FI=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 BI=Object.defineProperty,kI=Object.getOwnPropertyDescriptor,ta=(t,e,n,r)=>{for(var i=r>1?void 0:r?kI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&BI(e,n,i),i};let Vi=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:n})=>{this.address=t,this.avatar=e,this.loading=!!n})}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="${kn(t)}" src="${this.avatar}">`:this.address?(ye.generateAvatarColors(this.address),ce`<div class="${kn(t)}">${this.loading?ce`<div class="w3m-loader"></div>`:null}</div>`):null}};Vi.styles=[He.globalCss,FI],ta([wt()],Vi.prototype,"address",2),ta([wt()],Vi.prototype,"avatar",2),ta([wt()],Vi.prototype,"loading",2),ta([We()],Vi.prototype,"size",2),Vi=ta([Be("w3m-avatar")],Vi);const HI=Ge`div{display:flex;align-items:center}w3m-token-image{width:28px;height:28px;margin-right:6px}`;var zI=Object.defineProperty,WI=Object.getOwnPropertyDescriptor,s0=(t,e,n,r)=>{for(var i=r>1?void 0:r?WI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&zI(e,n,i),i};let na=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:n})=>{this.symbol=n?.symbol,this.amount=n?.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="${Hn(this.symbol)}"></w3m-token-image><w3m-text variant="medium-regular" color="primary">${t} ${this.symbol}</w3m-text></div>`}};na.styles=[He.globalCss,HI],s0([wt()],na.prototype,"symbol",2),s0([wt()],na.prototype,"amount",2),na=s0([Be("w3m-balance")],na);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 VI=Object.defineProperty,KI=Object.getOwnPropertyDescriptor,Tc=(t,e,n,r)=>{for(var i=r>1?void 0:r?KI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&VI(e,n,i),i};let Ki=class extends Re{constructor(){super(),this.loading=!1,this.label="Connect Wallet",this.icon="show",this.modalUnsub=void 0,ye.rejectStandaloneButtonComponent(),this.modalUnsub=un.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}=cn.state,{chains:e,selectedChain:n}=$e.state,r=e?.length&&e.length>1;t||r&&!n?un.open({route:"SelectNetwork"}):un.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>`}};Ki.styles=[He.globalCss,qI],Tc([wt()],Ki.prototype,"loading",2),Tc([We()],Ki.prototype,"label",2),Tc([We()],Ki.prototype,"icon",2),Ki=Tc([Be("w3m-connect-button")],Ki);var GI=Object.defineProperty,ZI=Object.getOwnPropertyDescriptor,Bs=(t,e,n,r)=>{for(var i=r>1?void 0:r?ZI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&GI(e,n,i),i};let hi=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}=cn.state,e=Hn(this.balance),n=Hn(this.label),r=Hn(this.icon),i=Hn(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":n}" icon="${r}"></w3m-connect-button>`}};Bs([wt()],hi.prototype,"isConnected",2),Bs([We()],hi.prototype,"label",2),Bs([We()],hi.prototype,"icon",2),Bs([We()],hi.prototype,"avatar",2),Bs([We()],hi.prototype,"balance",2),hi=Bs([Be("w3m-core-button")],hi);const YI=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 JI=Object.defineProperty,XI=Object.getOwnPropertyDescriptor,QI=(t,e,n,r)=>{for(var i=r>1?void 0:r?XI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&JI(e,n,i),i};let o0=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===js.metaMask?this.onInjectedWallet():await ye.handleConnectorConnection(t):this.onInstallConnector()}desktopWalletsTemplate(){const{desktopWallets:t}=cn.state;return t?.map(({id:e,name:n,links:{universal:r,native:i}})=>ce`<w3m-wallet-button walletId="${e}" name="${n}" .onClick="${()=>this.onDesktopWallet({name:n,walletId:e,universal:r,native:i})}"></w3m-wallet-button>`)}previewWalletsTemplate(){let t=Rn.allowedExplorerListings(ln.state.previewWallets);return t=Rn.deduplicateExplorerListingsFromConnectors(t),t.map(({name:e,desktop:{universal:n,native:r},homepage:i,image_url:o,id:c})=>ce`<w3m-wallet-button src="${o.lg}" name="${e}" .onClick="${()=>this.onDesktopWallet({walletId:c,name:e,native:r,universal:n||i,icon:o.lg})}"></w3m-wallet-button>`)}connectorWalletsTemplate(){return Rn.connectorWallets().map(({id:t,name:e,ready:n})=>ce`<w3m-wallet-button .installed="${["injected","metaMask"].includes(t)&&n}" name="${e}" walletId="${t}" .onClick="${async()=>this.onConnectorWallet(t)}"></w3m-wallet-button>`)}recentWalletTemplate(){const t=ye.getRecentWallet();if(!t)return;const{id:e,name:n,links:r,image:i}=t;return ce`<w3m-wallet-button .recent="${!0}" name="${n}" walletId="${Hn(e)}" src="${Hn(i)}" .onClick="${()=>this.onDesktopWallet({name:n,walletId:e,universal:r?.universal,native:r?.native,icon:i})}"></w3m-wallet-button>`}render(){const{standaloneUri:t}=$e.state,e=this.desktopWalletsTemplate(),n=this.previewWalletsTemplate(),r=this.connectorWalletsTemplate(),i=this.recentWalletTemplate(),o=[...e??[],...n],c=[...r,...o],l=Rn.walletTemplatesWithRecent(c,i),h=Rn.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}`}};o0.styles=[He.globalCss,YI],o0=QI([Be("w3m-desktop-wallet-selection")],o0);const eS=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 tS=Object.defineProperty,nS=Object.getOwnPropertyDescriptor,rS=(t,e,n,r)=>{for(var i=r>1?void 0:r?nS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&tS(e,n,i),i};let a0=class extends Re{render(){const{termsOfServiceUrl:t,privacyPolicyUrl:e}=cn.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}};a0.styles=[He.globalCss,eS],a0=rS([Be("w3m-legal-notice")],a0);const iS=Ge`.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;var sS=Object.defineProperty,oS=Object.getOwnPropertyDescriptor,aS=(t,e,n,r)=>{for(var i=r>1?void 0:r?oS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&sS(e,n,i),i};let c0=class extends Re{onGoToQrcode(){lt.push("Qrcode")}async onConnectorWallet(t){await ye.handleConnectorConnection(t)}mobileWalletsTemplate(){const{mobileWallets:t}=cn.state,e=Rn.walletsWithInjected(t);if(e.length)return e.map(({id:n,name:r,links:{universal:i,native:o}})=>ce`<w3m-wallet-button name="${r}" walletId="${n}" .onClick="${async()=>ye.handleMobileLinking({links:{native:o,universal:i},name:r,id:n})}"></w3m-wallet-button>`)}previewWalletsTemplate(){const{previewWallets:t}=ln.state;let e=Rn.walletsWithInjected(t);return e=Rn.allowedExplorerListings(e),e=Rn.deduplicateExplorerListingsFromConnectors(e),e.map(({image_url:n,name:r,mobile:{native:i,universal:o},id:c})=>ce`<w3m-wallet-button name="${r}" src="${n.lg}" .onClick="${async()=>ye.handleMobileLinking({links:{native:i,universal:o},name:r,id:c,image:n.lg})}"></w3m-wallet-button>`)}connectorWalletsTemplate(){let t=Rn.connectorWallets();return window.ethereum||(t=t.filter(({id:e})=>e!=="injected"&&e!==js.metaMask)),t.map(({name:e,id:n,ready:r})=>ce`<w3m-wallet-button .installed="${["injected","metaMask"].includes(n)&&r}" name="${e}" walletId="${n}" .onClick="${async()=>this.onConnectorWallet(n)}"></w3m-wallet-button>`)}recentWalletTemplate(){const t=ye.getRecentWallet();if(!t)return;const{id:e,name:n,links:r,image:i}=t;return ce`<w3m-wallet-button .recent="${!0}" name="${n}" walletId="${Hn(e)}" src="${Hn(i)}" .onClick="${async()=>ye.handleMobileLinking({name:n,id:e,links:r,image:i})}"></w3m-wallet-button>`}render(){const{standaloneUri:t}=$e.state,e=this.connectorWalletsTemplate(),n=this.mobileWalletsTemplate(),r=this.previewWalletsTemplate(),i=this.recentWalletTemplate(),o=n??r,c=[...e,...o],l=Rn.walletTemplatesWithRecent(c,i),h=Rn.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}`}};c0.styles=[He.globalCss,iS],c0=aS([Be("w3m-mobile-wallet-selection")],c0);const cS=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 lS=Object.defineProperty,uS=Object.getOwnPropertyDescriptor,F3=(t,e,n,r)=>{for(var i=r>1?void 0:r?uS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&lS(e,n,i),i};let ra=class extends Re{constructor(){super(),this.open=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=un.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&&un.close()}async onOpenModalEvent(){this.toggleBodyScroll(!1);const t=.2;await ai(this.containerEl,{y:0},{duration:0}).finished,ai(this.overlayEl,{opacity:[0,1]},{duration:.2,delay:t}),ai(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([ai(this.containerEl,ye.isMobileAnimation()?{y:[0,"50vh"]}:{scale:[1,.98]},{scale:{easing:gc({velocity:0})},y:{easing:gc({mass:.5})}}).finished,ai(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"?un.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="${kn(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>`}};ra.styles=[He.globalCss,cS],F3([wt()],ra.prototype,"open",2),ra=F3([Be("w3m-modal")],ra);const hS=Ge`:host{all:initial}w3m-network-image{margin-left:-6px;margin-right:6px;width:28px;height:28px}`;var fS=Object.defineProperty,dS=Object.getOwnPropertyDescriptor,Rc=(t,e,n,r)=>{for(var i=r>1?void 0:r?dS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&fS(e,n,i),i};let Gi=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,n=e?.map(r=>r.id);this.chainId=t.id.toString(),this.wrongNetwork=!(n!=null&&n.includes(t.id)),this.label=this.wrongNetwork?"Wrong Network":t.name}}onClick(){un.open({route:"SelectNetwork"})}render(){var t;const{chains:e}=$e.state,n=e&&e.length>1;return ce`<w3m-button-big @click="${this.onClick}" ?disabled="${!n}"><w3m-network-image chainId="${Hn(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>`}};Gi.styles=[He.globalCss,hS],Rc([wt()],Gi.prototype,"chainId",2),Rc([wt()],Gi.prototype,"label",2),Rc([wt()],Gi.prototype,"wrongNetwork",2),Gi=Rc([Be("w3m-network-switch")],Gi);const pS=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 gS=Object.defineProperty,mS=Object.getOwnPropertyDescriptor,wS=(t,e,n,r)=>{for(var i=r>1?void 0:r?mS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&gS(e,n,i),i};let l0=class extends Re{onClick(){lt.push("WalletExplorer")}render(){const{previewWallets:t}=ln.state,e=ye.getCustomWallets(),n=[...t,...e].reverse().slice(0,4);return ce`<button @click="${this.onClick}"><div class="w3m-icons">${n.map(r=>{var i;const o=(i=r.image_url)==null?void 0:i.lg;if(o)return ce`<img src="${o}">`;const c=ye.getWalletId(r.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>`}};l0.styles=[He.globalCss,pS],l0=wS([Be("w3m-view-all-wallets-button")],l0);const vS=Ge`.w3m-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var yS=Object.defineProperty,bS=Object.getOwnPropertyDescriptor,B3=(t,e,n,r)=>{for(var i=r>1?void 0:r?bS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&yS(e,n,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;rt.removeWalletConnectDeepLink();try{const{standaloneUri:n}=$e.state;n?setTimeout(()=>this.uri=n,0):(await Nt.client().connectWalletConnect(r=>this.uri=r,(e=$e.state.selectedChain)==null?void 0:e.id),un.close())}catch(n){console.error(n),Cn.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,vS],B3([wt()],Nc.prototype,"uri",2),Nc=B3([Be("w3m-walletconnect-qr")],Nc);const _S=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 ES=Object.defineProperty,xS=Object.getOwnPropertyDescriptor,CS=(t,e,n,r)=>{for(var i=r>1?void 0:r?xS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&ES(e,n,i),i};let u0=class extends Re{onDisconnect(){un.close(),Nt.client().disconnect(),Et.resetAccount()}async onCopyAddress(){var t;await navigator.clipboard.writeText((t=Et.state.address)!=null?t:""),Cn.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>`}};u0.styles=[He.globalCss,_S],u0=CS([Be("w3m-account-view")],u0);var IS=Object.defineProperty,SS=Object.getOwnPropertyDescriptor,DS=(t,e,n,r)=>{for(var i=r>1?void 0:r?SS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&IS(e,n,i),i};let h0=class extends Re{viewTemplate(){return rt.isAndroid()?ce`<w3m-android-wallet-selection></w3m-android-wallet-selection>`:rt.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>`}};h0.styles=[He.globalCss],h0=DS([Be("w3m-connect-wallet-view")],h0);const OS=Ge`.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}`;var AS=Object.defineProperty,$S=Object.getOwnPropertyDescriptor,PS=(t,e,n,r)=>{for(var i=r>1?void 0:r?$S(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&AS(e,n,i),i};let f0=class extends Re{async onConnectorWallet(t){await ye.handleConnectorConnection(t)}connectorWalletsTemplate(){let t=Rn.connectorWallets();return window.ethereum||(t=t.filter(({id:e})=>e!=="injected"&&e!==js.metaMask)),t.map(({name:e,id:n,ready:r})=>ce`<w3m-wallet-button .installed="${["injected","metaMask"].includes(n)&&r}" name="${e}" walletId="${n}" .onClick="${async()=>this.onConnectorWallet(n)}"></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>`}};f0.styles=[He.globalCss,OS],f0=PS([Be("w3m-connectors-view")],f0);const TS=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 RS=Object.defineProperty,NS=Object.getOwnPropertyDescriptor,k3=(t,e,n,r)=>{for(var i=r>1?void 0:r?NS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&RS(e,n,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:n,name:r}=this.getRouterData();if(e){const i=rt.formatNativeUrl(e,t,r);rt.openHref(i,"_self")}else if(n){const i=rt.formatUniversalUrl(n,t,r);rt.openHref(i,"_blank")}}async createConnectionAndWait(t=0){var e;rt.removeWalletConnectDeepLink();const{standaloneUri:n}=$e.state,{name:r,walletId:i,native:o,universal:c,icon:l}=this.getRouterData(),h={name:r,id:i,links:{native:o,universal:c},image:l};if(n)ye.setRecentWallet(h),this.onFormatAndRedirect(n);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),un.close()}catch{Cn.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 n=rt.formatUniversalUrl(t,this.uri,e);rt.openHref(n,"_blank")}}render(){const{name:t,icon:e,universal:n,walletId:r}=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="${Hn(r)}"></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>${n?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,TS],k3([wt()],Mc.prototype,"uri",2),Mc=k3([Be("w3m-desktop-connector-view")],Mc);const MS=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 LS=Object.defineProperty,jS=Object.getOwnPropertyDescriptor,US=(t,e,n,r)=>{for(var i=r>1?void 0:r?jS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&LS(e,n,i),i};let d0=class extends Re{onGet(t){rt.openHref(t,"_blank")}render(){const{recomendedWallets:t}=ln.state,e=ye.getCustomWallets().slice(0,6),n=t.length,r=e.length;return ce`<w3m-modal-header title="Get a wallet"></w3m-modal-header><w3m-modal-content>${n?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} ${r?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>`}};d0.styles=[He.globalCss,MS],d0=US([Be("w3m-get-wallet-view")],d0);const FS=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 BS=Object.defineProperty,kS=Object.getOwnPropertyDescriptor,HS=(t,e,n,r)=>{for(var i=r>1?void 0:r?kS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&BS(e,n,i),i};let p0=class extends Re{constructor(){super(...arguments),this.learnUrl="https://ethereum.org/en/wallets/"}onGet(){cn.state.enableExplorer?lt.push("GetWallet"):ye.openWalletExplorerUrl()}onLearnMore(){rt.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>`}};p0.styles=[He.globalCss,FS],p0=HS([Be("w3m-help-view")],p0);const zS=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 WS=Object.defineProperty,qS=Object.getOwnPropertyDescriptor,g0=(t,e,n,r)=>{for(var i=r>1?void 0:r?qS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&WS(e,n,i),i};let ia=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),n={"w3m-injected-wrapper":!0,"w3m-injected-error":this.error};return ce`<w3m-modal-header title="${t}"></w3m-modal-header><w3m-modal-content><div class="${kn(n)}"><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>`}};ia.styles=[He.globalCss,zS],g0([wt()],ia.prototype,"connecting",2),g0([wt()],ia.prototype,"error",2),ia=g0([Be("w3m-injected-connector-view")],ia);const VS=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 KS=Object.defineProperty,GS=Object.getOwnPropertyDescriptor,ZS=(t,e,n,r)=>{for(var i=r>1?void 0:r?GS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&KS(e,n,i),i};let m0=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();rt.openHref(t,"_blank")}onMobile(){const{name:t}=this.getRouterData();lt.push("ConnectWallet"),Cn.openToast(`Scan the code with ${t}`,"success")}render(){const{name:t,id:e,isMobile:n}=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>${n?ce`<w3m-button .onClick="${this.onMobile.bind(this)}" .iconLeft="${Ze.MOBILE_ICON}">${t} Mobile</w3m-button>`:null}</div></div></w3m-modal-content>`}};m0.styles=[He.globalCss,VS],m0=ZS([Be("w3m-install-connector-view")],m0);var YS=Object.defineProperty,JS=Object.getOwnPropertyDescriptor,XS=(t,e,n,r)=>{for(var i=r>1?void 0:r?JS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&YS(e,n,i),i};let w0=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>`}};w0.styles=[He.globalCss],w0=XS([Be("w3m-qrcode-view")],w0);const QS=Ge`.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);margin:-5px -10px;justify-content:space-between}`;var eD=Object.defineProperty,tD=Object.getOwnPropertyDescriptor,nD=(t,e,n,r)=>{for(var i=r>1?void 0:r?tD(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&eD(e,n,i),i};let v0=class extends Re{async onSelectChain(t){try{const{selectedChain:e,walletConnectVersion:n}=$e.state,{isConnected:r}=Et.state;r?e?.id===t.id?lt.replace("Account"):n===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),Cn.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>`}};v0.styles=[He.globalCss,QS],v0=nD([Be("w3m-select-network-view")],v0);const rD=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 iD=Object.defineProperty,sD=Object.getOwnPropertyDescriptor,H3=(t,e,n,r)=>{for(var i=r>1?void 0:r?sD(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&iD(e,n,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(),n={"w3m-wrapper":!0,"w3m-error":this.error};return ce`<w3m-modal-header title="${`Connect to ${e}`}"></w3m-modal-header><w3m-modal-content><div class="${kn(n)}"><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,rD],H3([wt()],Lc.prototype,"error",2),Lc=H3([Be("w3m-switch-network-view")],Lc);const oD=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 aD=Object.defineProperty,cD=Object.getOwnPropertyDescriptor,sa=(t,e,n,r)=>{for(var i=r>1?void 0:r?cD(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&aD(e,n,i),i};const y0=40;let Zi=class extends Re{constructor(){super(...arguments),this.loading=!ln.state.wallets.listings.length,this.firstFetch=!ln.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,ln.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),ln.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}=ln.state,{listings:n,total:r}=this.search?e:t;return r<=y0||n.length>=r}async fetchWallets(){var t;const{wallets:e,search:n}=ln.state,r=ye.getExtensionWallets(),{listings:i,total:o,page:c}=this.search?n:e;if(!this.endReached&&(this.firstFetch||o>y0&&i.length<o))try{this.loading=!0;const l=(t=$e.state.standaloneChains)==null?void 0:t.join(","),{listings:h}=await ln.getPaginatedWallets({page:this.firstFetch?1:c+1,entries:y0,device:rt.isMobile()?"mobile":"desktop",search:this.search,version:$e.state.walletConnectVersion,chains:l}),d=h.map(({image_url:E})=>E.lg),v=r.map(({id:E})=>ye.getWalletIcon(E));await Promise.all([...d.map(async E=>ye.preloadImage(E)),...v.map(async E=>ye.preloadImage(E)),rt.wait(300)]),this.endReached=this.isLastPage()}catch(l){console.error(l),Cn.openToast(ye.getErrorMessage(l),"error")}finally{this.loading=!1,this.firstFetch=!1}}onConnectCustom({name:t,id:e,links:n}){rt.isMobile()?ye.handleMobileLinking({links:n,name:t,id:e}):lt.push("DesktopConnector",{DesktopConnector:{name:t,walletId:e,universal:n.universal,native:n.native}})}onConnectListing(t){if(rt.isMobile()){const{id:e,image_url:n}=t,{native:r,universal:i}=t.mobile;ye.handleMobileLinking({links:{native:r,universal:i},name:t.name,id:e,image:n.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}=ln.state,{isStandalone:n}=$e.state;let{listings:r}=this.search?e:t;r=Rn.allowedExplorerListings(r);const i=this.loading&&!r.length,o=this.search.length>=3;let c=!n&&!rt.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&&!r.length&&!c.length,d=Math.max(c.length,r.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="${kn(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} ${r[_]?ce`<w3m-wallet-button src="${r[_].image_url.lg}" name="${r[_].name}" walletId="${r[_].id}" .onClick="${()=>this.onConnectListing(r[_])}"></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>`}};Zi.styles=[He.globalCss,oD],sa([wt()],Zi.prototype,"loading",2),sa([wt()],Zi.prototype,"firstFetch",2),sa([wt()],Zi.prototype,"search",2),sa([wt()],Zi.prototype,"endReached",2),Zi=sa([Be("w3m-wallet-explorer-view")],Zi);var lD=Object.freeze({__proto__:null,get W3mAccountButton(){return Fs},get W3mConnectButton(){return Ki},get W3mCoreButton(){return hi},get W3mModal(){return ra},get W3mNetworkSwitch(){return Gi}});mr.EthereumProvider=S7,mr.OPTIONAL_EVENTS=y7,mr.OPTIONAL_METHODS=v7,mr.REQUIRED_EVENTS=ec,mr.REQUIRED_METHODS=Qa,mr.default=tc,Object.defineProperty(mr,"__esModule",{value:!0})});
157
+ `);const c=J9(e,n,i),l=Ec.getSymbolSize(e),h=new B9(l);return V9(h,e),K9(h),G9(h,e),zh(h,n,0),e>=7&&Z9(h,e),Y9(h,c),isNaN(r)&&(r=Bh.getBestMask(h,zh.bind(null,h,n))),Bh.applyMask(r,h),zh(h,n,r),{modules:h,version:e,errorCorrectionLevel:n,maskPattern:r,segments:i}}l3.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");let r=Fh.M,i,o;return typeof n<"u"&&(r=Fh.from(n.errorCorrectionLevel,Fh.M),i=xc.from(n.version),o=Bh.from(n.maskPattern),n.toSJISFunc&&Ec.setToSJISFunction(n.toSJISFunc)),Q9(e,i,r,o)};var C3={},Wh={};(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(o){return[o,o]}))),r.length===6&&r.push("F","F");const i=parseInt(r.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+r.slice(0,6).join("")}}t.getOptions=function(r){r||(r={}),r.color||(r.color={});const i=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,o=r.width&&r.width>=21?r.width:void 0,c=r.scale||4;return{width:o,scale:o?4:c,margin:i,color:{dark:e(r.color.dark||"#000000ff"),light:e(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},t.getScale=function(r,i){return i.width&&i.width>=r+i.margin*2?i.width/(r+i.margin*2):i.scale},t.getImageWidth=function(r,i){const o=t.getScale(r,i);return Math.floor((r+i.margin*2)*o)},t.qrToImageData=function(r,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 S=0;S<d;S++){let P=(_*d+S)*4,L=o.color.light;if(_>=v&&S>=v&&_<d-v&&S<d-v){const k=Math.floor((_-v)/h),q=Math.floor((S-v)/h);L=E[l[k*c+q]?1:0]}r[P++]=L.r,r[P++]=L.g,r[P++]=L.b,r[P]=L.a}}})(Wh),function(t){const e=Wh;function n(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 r(){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=r()),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),n(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)}}(C3);var I3={};const eC=Wh;function S3(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function qh(t,e,n){let r=t+e;return typeof n<"u"&&(r+=" "+n),r}function tC(t,e,n){let r="",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]||(r+=o?qh("M",h+n,.5+d+n):qh("m",i,0),i=0,o=!1),h+1<e&&t[l+1]||(r+=qh("h",c),c=0)):i++}return r}I3.render=function(e,n,r){const i=eC.getOptions(n),o=e.modules.size,c=e.modules.data,l=o+i.margin*2,h=i.color.light.a?"<path "+S3(i.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",d="<path "+S3(i.color.dark,"stroke")+' d="'+tC(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>
158
+ `;return typeof r=="function"&&r(null,_),_};const nC=m9,Vh=l3,D3=C3,rC=I3;function Kh(t,e,n,r,i){const o=[].slice.call(arguments,1),c=o.length,l=typeof o[c-1]=="function";if(!l&&!nC())throw new Error("Callback required as last argument");if(l){if(c<2)throw new Error("Too few arguments provided");c===2?(i=n,n=e,e=r=void 0):c===3&&(e.getContext&&typeof i>"u"?(i=r,r=void 0):(i=r,r=n,n=e,e=void 0))}else{if(c<1)throw new Error("Too few arguments provided");return c===1?(n=e,e=r=void 0):c===2&&!e.getContext&&(r=n,n=e,e=void 0),new Promise(function(h,d){try{const v=Vh.create(n,r);h(t(v,e,r))}catch(v){d(v)}})}try{const h=Vh.create(n,r);i(null,t(h,e,r))}catch(h){i(h)}}zo.create=Vh.create,zo.toCanvas=Kh.bind(null,D3.render),zo.toDataURL=Kh.bind(null,D3.renderToDataURL),zo.toString=Kh.bind(null,function(t,e,n){return rC.render(t,n)});var iC=Object.defineProperty,O3=Object.getOwnPropertySymbols,sC=Object.prototype.hasOwnProperty,oC=Object.prototype.propertyIsEnumerable,A3=(t,e,n)=>e in t?iC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Cc=(t,e)=>{for(var n in e||(e={}))sC.call(e,n)&&A3(t,n,e[n]);if(O3)for(var n of O3(e))oC.call(e,n)&&A3(t,n,e[n]);return t};function aC(){var t;const e=(t=Hr.state.themeMode)!=null?t:"dark",n={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":n.foreground[1],"--w3m-color-fg-2":n.foreground[2],"--w3m-color-fg-3":n.foreground[3],"--w3m-color-bg-1":n.background[1],"--w3m-color-bg-2":n.background[2],"--w3m-color-bg-3":n.background[3],"--w3m-color-overlay":n.overlay}}function cC(){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 lC(){const{themeVariables:t}=Hr.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}=Hr.state;if(t){const n=Cc(Cc(Cc(Cc({},aC()),cC()),e),lC());Object.entries(n).forEach(([r,i])=>t.style.setProperty(r,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)}`},uC=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 hC=Object.defineProperty,fC=Object.getOwnPropertyDescriptor,Ic=(t,e,n,r)=>{for(var i=r>1?void 0:r?fC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&hC(e,n,i),i};let js=class extends Ne{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>`}};js.styles=[He.globalCss,uC],Ic([We()],js.prototype,"icon",2),Ic([We()],js.prototype,"label",2),Ic([We()],js.prototype,"onClick",2),js=Ic([ke("w3m-box-button")],js);const dC=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 pC=Object.defineProperty,gC=Object.getOwnPropertyDescriptor,Ko=(t,e,n,r)=>{for(var i=r>1?void 0:r?gC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&pC(e,n,i),i};let Wi=class extends Ne{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="${kn(t)}" ?disabled="${this.disabled}" @click="${this.onClick}">${this.iconLeft}<w3m-text variant="small-regular" color="inverse"><slot></slot></w3m-text>${this.iconRight}</button>`}};Wi.styles=[He.globalCss,dC],Ko([We()],Wi.prototype,"disabled",2),Ko([We()],Wi.prototype,"iconLeft",2),Ko([We()],Wi.prototype,"iconRight",2),Ko([We()],Wi.prototype,"onClick",2),Wi=Ko([ke("w3m-button")],Wi);const mC=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 wC=Object.defineProperty,vC=Object.getOwnPropertyDescriptor,Gh=(t,e,n,r)=>{for(var i=r>1?void 0:r?vC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&wC(e,n,i),i};let Go=class extends Ne{constructor(){super(...arguments),this.disabled=!1,this.variant="primary"}render(){const t={"w3m-secondary":this.variant==="secondary"};return ce`<button ?disabled="${this.disabled}" class="${kn(t)}"><slot></slot></button>`}};Go.styles=[He.globalCss,mC],Gh([We()],Go.prototype,"disabled",2),Gh([We()],Go.prototype,"variant",2),Go=Gh([ke("w3m-button-big")],Go);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>`},yC=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 bC=Object.defineProperty,_C=Object.getOwnPropertyDescriptor,$3=(t,e,n,r)=>{for(var i=r>1?void 0:r?_C(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&bC(e,n,i),i};let Sc=class extends Ne{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=Hr.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="${kn(t)}"><button class="w3m-action-btn" @click="${this.onHelp}">${Ze.HELP_ICON}</button> <button class="w3m-action-btn" @click="${un.close}">${Ze.CROSS_ICON}</button></div></div>`}};Sc.styles=[He.globalCss,yC],$3([wt()],Sc.prototype,"isHelp",2),Sc=$3([ke("w3m-modal-backcard")],Sc);const EC=Ge`main{padding:20px;padding-top:0;width:100%}`;var xC=Object.defineProperty,CC=Object.getOwnPropertyDescriptor,IC=(t,e,n,r)=>{for(var i=r>1?void 0:r?CC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&xC(e,n,i),i};let Zh=class extends Ne{render(){return ce`<main><slot></slot></main>`}};Zh.styles=[He.globalCss,EC],Zh=IC([ke("w3m-modal-content")],Zh);const SC=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 DC=Object.defineProperty,OC=Object.getOwnPropertyDescriptor,AC=(t,e,n,r)=>{for(var i=r>1?void 0:r?OC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&DC(e,n,i),i};let Yh=class extends Ne{render(){return ce`<footer><slot></slot></footer>`}};Yh.styles=[He.globalCss,SC],Yh=AC([ke("w3m-modal-footer")],Yh);const $C=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 PC=Object.defineProperty,TC=Object.getOwnPropertyDescriptor,Zo=(t,e,n,r)=>{for(var i=r>1?void 0:r?TC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&PC(e,n,i),i};let qi=class extends Ne{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,n=this.title?ce`<w3m-text variant="big-bold">${this.title}</w3m-text>`:ce`<slot></slot>`;return ce`<header class="${kn(t)}">${e?this.backBtnTemplate():null} ${n} ${this.onAction?this.actionBtnTemplate():null}</header>`}};qi.styles=[He.globalCss,$C],Zo([We()],qi.prototype,"title",2),Zo([We()],qi.prototype,"onAction",2),Zo([We()],qi.prototype,"actionIcon",2),Zo([We()],qi.prototype,"border",2),qi=Zo([ke("w3m-modal-header")],qi);const NC={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 Us=(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))(Us||{});const Vi={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:n,coinbaseWalletExtension:r}=window;return e?e.isTrust||e.isTrustWallet?"trust":e.isPhantom?"phantom":e.isBraveWallet?"brave":n?"spotEthWallet":e.isExodus?"exodus":e.isTokenPocket?"tokenPocket":e.isFrame?"frame":e.isTally?"tally":r?"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,n;if(t.length&&t.toUpperCase()!=="INJECTED")return t;const r=Vi.getInjectedId("");return(n=(e=Vi.injectedPreset[r])==null?void 0:e.name)!=null?n:"Injected"}},RC={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 MC=Object.defineProperty,P3=Object.getOwnPropertySymbols,LC=Object.prototype.hasOwnProperty,jC=Object.prototype.propertyIsEnumerable,T3=(t,e,n)=>e in t?MC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,UC=(t,e)=>{for(var n in e||(e={}))LC.call(e,n)&&T3(t,n,e[n]);if(P3)for(var n of P3(e))jC.call(e,n)&&T3(t,n,e[n]);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 n=t.renderRoot.querySelector(e);if(!n)throw new Error(`${e} not found`);return n},getWalletId(t){return Vi.getInjectedId(t)},getWalletIcon(t){var e,n;const r=(e=Vi.injectedPreset[t])==null?void 0:e.icon,{projectId:i,walletImages:o}=cn.state;return(n=o?.[t])!=null?n:i&&r?ln.getImageUrl(r):""},getWalletName(t,e=!1){const n=Vi.getInjectedName(t);return e?n.split(" ")[0]:n},getChainIcon(t){var e;const n=NC[t],{projectId:r,chainImages:i}=cn.state;return(e=i?.[t])!=null?e:r&&n?ln.getImageUrl(n):""},getTokenIcon(t){var e,n;const r=(e=RC[t])==null?void 0:e.icon,{projectId:i,tokenImages:o}=cn.state;return(n=o?.[t])!=null?n:i&&r?ln.getImageUrl(r):""},isMobileAnimation(){return window.innerWidth<=ye.MOBILE_BREAKPOINT},async preloadImage(t){const e=new Promise((n,r)=>{const i=new Image;i.onload=n,i.onerror=r,i.src=t});return Promise.race([e,rt.wait(3e3)])},getErrorMessage(t){return t instanceof Error?t.message:"Unknown Error"},debounce(t,e=500){let n;return(...r)=>{function i(){t(...r)}n&&clearTimeout(n),n=setTimeout(i,e)}},async handleMobileLinking(t){rt.removeWalletConnectDeepLink();const{standaloneUri:e,selectedChain:n}=$e.state,{links:r,name:i}=t;function o(c){let l="";r!=null&&r.universal?l=rt.formatUniversalUrl(r.universal,c,i):r!=null&&r.native&&(l=rt.formatNativeUrl(r.native,c,i)),rt.openHref(l,"_self")}e?(ye.setRecentWallet(t),o(e)):(await Rt.client().connectWalletConnect(c=>{o(c)},n?.id),ye.setRecentWallet(t),un.close())},async handleAndroidLinking(){rt.removeWalletConnectDeepLink();const{standaloneUri:t,selectedChain:e}=$e.state;t?rt.openHref(t,"_self"):(await Rt.client().connectWalletConnect(n=>{rt.setWalletConnectAndroidDeepLink(n),rt.openHref(n,"_self")},e?.id),un.close())},async handleUriCopy(){const{standaloneUri:t}=$e.state;if(t)await navigator.clipboard.writeText(t);else{const e=Rt.client().walletConnectUri;await navigator.clipboard.writeText(e)}Cn.openToast("Link copied","success")},async handleConnectorConnection(t,e){try{const{selectedChain:n}=$e.state;await Rt.client().connectConnector(t,n?.id),un.close()}catch(n){console.error(n),e?e():Cn.openToast(ye.getErrorMessage(n),"error")}},getCustomWallets(){var t;const{desktopWallets:e,mobileWallets:n}=cn.state;return(t=rt.isMobile()?n:e)!=null?t:[]},getCustomImageUrls(){const{chainImages:t,walletImages:e}=cn.state,n=Object.values(t??{}),r=Object.values(e??{});return Object.values([...n,...r])},getConnectorImageUrls(){return Rt.client().getConnectors().map(({id:t})=>Vi.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 n=(e=t.match(/.{1,7}/g))==null?void 0:e.splice(0,5),r=[];n?.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}r.push(`rgb(${l[0]}, ${l[1]}, ${l[2]})`)});const i=document.querySelector(":root");if(i){const o={"--w3m-color-av-1":r[0],"--w3m-color-av-2":r[1],"--w3m-color-av-3":r[2],"--w3m-color-av-4":r[3],"--w3m-color-av-5":r[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,n=JSON.parse(t);if(n[e])return n[e]}},getExtensionWallets(){const t=[];for(const[e,n]of Object.entries(Vi.injectedPreset))n!=null&&n.isInjected&&!n.isDesktop&&t.push(UC({id:e},n));return t},caseSafeIncludes(t,e){return t.toUpperCase().includes(e.toUpperCase())},openWalletExplorerUrl(){rt.openHref(ye.EXPLORER_WALLET_URL,"_blank")}},FC=Ge`.w3m-router{overflow:hidden;will-change:transform}.w3m-content{display:flex;flex-direction:column}`;var BC=Object.defineProperty,kC=Object.getOwnPropertyDescriptor,Jh=(t,e,n,r)=>{for(var i=r>1?void 0:r?kC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&BC(e,n,i),i};let Yo=class extends Ne{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>`}};Yo.styles=[He.globalCss,FC],Jh([wt()],Yo.prototype,"view",2),Jh([wt()],Yo.prototype,"prevView",2),Yo=Jh([ke("w3m-modal-router")],Yo);const HC=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 zC=Object.defineProperty,WC=Object.getOwnPropertyDescriptor,N3=(t,e,n,r)=>{for(var i=r>1?void 0:r?WC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&zC(e,n,i),i};let Dc=class extends Ne{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=Cn.subscribe(t=>{t.open?(this.open=!0,this.timeout=setTimeout(()=>Cn.closeToast(),2200)):(this.open=!1,clearTimeout(this.timeout))})}disconnectedCallback(){var t;(t=this.unsubscribe)==null||t.call(this),clearTimeout(this.timeout),Cn.closeToast()}render(){const{message:t,variant:e}=Cn.state,n={"w3m-success":e==="success","w3m-error":e==="error"};return this.open?ce`<div class="${kn(n)}">${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,HC],N3([wt()],Dc.prototype,"open",2),Dc=N3([ke("w3m-modal-toast")],Dc);const qC=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 VC=Object.defineProperty,KC=Object.getOwnPropertyDescriptor,Oc=(t,e,n,r)=>{for(var i=r>1?void 0:r?KC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&VC(e,n,i),i};let Fs=class extends Ne{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>`}};Fs.styles=[He.globalCss,qC],Oc([We()],Fs.prototype,"onClick",2),Oc([We()],Fs.prototype,"name",2),Oc([We()],Fs.prototype,"chainId",2),Fs=Oc([ke("w3m-network-button")],Fs);const GC=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 ZC=Object.defineProperty,YC=Object.getOwnPropertyDescriptor,R3=(t,e,n,r)=>{for(var i=r>1?void 0:r?YC(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&ZC(e,n,i),i};let Ac=class extends Ne{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,GC],R3([We()],Ac.prototype,"chainId",2),Ac=R3([ke("w3m-network-image")],Ac);const JC=.1,M3=2.5,zr=7;function Xh(t,e,n){return t===e?!1:(t-e<0?e-t:t-e)<=n+JC}function XC(t,e){const n=Array.prototype.slice.call(zo.create(t,{errorCorrectionLevel:e}).modules.data,0),r=Math.sqrt(n.length);return n.reduce((i,o,c)=>(c%r===0?i.push([o]):i[i.length-1].push(o))&&i,[])}const QC={generate(t,e,n,r){const i=r==="light"?"#141414":"#fff",o=r==="light"?"#fff":"#141414",c=[],l=XC(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-zr)*h*L,T=(l.length-zr)*h*k,M=.32;for(let A=0;A<d.length;A+=1){const N=h*(zr-A*2);c.push(ft`<rect fill="${A%2===0?i:o}" height="${N}" rx="${N*M}" ry="${N*M}" width="${N}" x="${q+h*A}" y="${T+h*A}">`)}});const v=Math.floor((n+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<zr&&T<zr||k>l.length-(zr+1)&&T<zr||k<zr&&T>l.length-(zr+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=>!Xh(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/M3}">`)})}),Object.entries(P).filter(([L,k])=>k.length>1).map(([L,k])=>{const q=k.filter(T=>k.some(M=>Xh(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(N=>Xh(T,N,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/(M3/2)}" stroke-linecap="round">`)})}),c}},eI=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 tI=Object.defineProperty,nI=Object.getOwnPropertyDescriptor,Jo=(t,e,n,r)=>{for(var i=r>1?void 0:r?nI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&tI(e,n,i),i};let Ki=class extends Ne{constructor(){super(...arguments),this.uri="",this.size=0,this.logoSrc="",this.walletId=""}svgTemplate(){var t;const e=(t=Hr.state.themeMode)!=null?t:"light";return ft`<svg height="${this.size}" width="${this.size}">${QC.generate(this.uri,this.size,this.size/4,e)}</svg>`}render(){return ce`<div>${this.walletId||this.logoSrc?ce`<w3m-wallet-image walletId="${Hn(this.walletId)}" src="${Hn(this.logoSrc)}"></w3m-wallet-image>`:Ze.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}</div>`}};Ki.styles=[He.globalCss,eI],Jo([We()],Ki.prototype,"uri",2),Jo([We({type:Number})],Ki.prototype,"size",2),Jo([We()],Ki.prototype,"logoSrc",2),Jo([We()],Ki.prototype,"walletId",2),Ki=Jo([ke("w3m-qrcode")],Ki);const rI=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 iI=Object.defineProperty,sI=Object.getOwnPropertyDescriptor,L3=(t,e,n,r)=>{for(var i=r>1?void 0:r?sI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&iI(e,n,i),i};let $c=class extends Ne{constructor(){super(...arguments),this.onChange=()=>null}render(){const t=rt.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,rI],L3([We()],$c.prototype,"onChange",2),$c=L3([ke("w3m-search-input")],$c);const oI=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 aI=Object.defineProperty,cI=Object.getOwnPropertyDescriptor,lI=(t,e,n,r)=>{for(var i=r>1?void 0:r?cI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&aI(e,n,i),i};let Qh=class extends Ne{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>`}};Qh.styles=[He.globalCss,oI],Qh=lI([ke("w3m-spinner")],Qh);const uI=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 hI=Object.defineProperty,fI=Object.getOwnPropertyDescriptor,ef=(t,e,n,r)=>{for(var i=r>1?void 0:r?fI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&hI(e,n,i),i};let Xo=class extends Ne{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="${kn(t)}"></slot></span>`}};Xo.styles=[He.globalCss,uI],ef([We()],Xo.prototype,"variant",2),ef([We()],Xo.prototype,"color",2),Xo=ef([ke("w3m-text")],Xo);const dI=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 pI=Object.defineProperty,gI=Object.getOwnPropertyDescriptor,j3=(t,e,n,r)=>{for(var i=r>1?void 0:r?gI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&pI(e,n,i),i};let Pc=class extends Ne{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,dI],j3([We()],Pc.prototype,"symbol",2),Pc=j3([ke("w3m-token-image")],Pc);const mI=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 wI=Object.defineProperty,vI=Object.getOwnPropertyDescriptor,fi=(t,e,n,r)=>{for(var i=r>1?void 0:r?vI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&wI(e,n,i),i};let Tr=class extends Ne{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>`}};Tr.styles=[He.globalCss,mI],fi([We()],Tr.prototype,"onClick",2),fi([We()],Tr.prototype,"name",2),fi([We()],Tr.prototype,"walletId",2),fi([We()],Tr.prototype,"label",2),fi([We()],Tr.prototype,"src",2),fi([We()],Tr.prototype,"installed",2),fi([We()],Tr.prototype,"recent",2),Tr=fi([ke("w3m-wallet-button")],Tr);const yI=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 bI=Object.defineProperty,_I=Object.getOwnPropertyDescriptor,tf=(t,e,n,r)=>{for(var i=r>1?void 0:r?_I(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&bI(e,n,i),i};let Qo=class extends Ne{constructor(){super(...arguments),this.walletId=void 0,this.src=void 0}render(){var t;const e=ye.getWalletId((t=this.walletId)!=null?t:""),n=this.src?this.src:ye.getWalletIcon(e);return ce`${n.length?ce`<div><img src="${n}" alt="${this.id}"></div>`:Ze.WALLET_PLACEHOLDER}`}};Qo.styles=[He.globalCss,yI],tf([We()],Qo.prototype,"walletId",2),tf([We()],Qo.prototype,"src",2),Qo=tf([ke("w3m-wallet-image")],Qo);var EI=Object.defineProperty,xI=Object.getOwnPropertyDescriptor,CI=(t,e,n,r)=>{for(var i=r>1?void 0:r?xI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&EI(e,n,i),i};let U3=class extends Ne{constructor(){super(),this.unwatchAccount=void 0,Et.getAccount(),this.fetchProfile(),this.fetchBalance(),this.unwatchAccount=Rt.client().watchAccount(t=>{if(Et.state.isConnected&&!t.isConnected)un.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 n=(e=$e.state.chains)==null?void 0:e.find(r=>r.id===1);if(cn.state.enableAccountView&&n)try{await Et.fetchProfile(ye.preloadImage,t)}catch(r){console.error(r),Cn.openToast(ye.getErrorMessage(r),"error")}}async fetchBalance(t){if(cn.state.enableAccountView)try{await Et.fetchBalance(t)}catch(e){console.error(e),Cn.openToast(ye.getErrorMessage(e),"error")}}};U3=CI([ke("w3m-account-context")],U3);var II=Object.defineProperty,SI=Object.getOwnPropertyDescriptor,F3=(t,e,n,r)=>{for(var i=r>1?void 0:r?SI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&II(e,n,i),i};let nf=class extends Ne{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(cn.state.enableExplorer){const{standaloneChains:e,chains:n,walletConnectVersion:r}=$e.state,i=e?.join(",");await Promise.all([ln.getPreviewWallets({page:1,entries:10,chains:i,device:rt.isMobile()?"mobile":"desktop",version:r}),ln.getRecomendedWallets()]),$e.setIsDataLoaded(!0);const{previewWallets:o,recomendedWallets:c}=ln.state,l=(t=n?.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),Cn.openToast("Failed preloading","error")}}};F3([wt()],nf.prototype,"preload",2),nf=F3([ke("w3m-explorer-context")],nf);var DI=Object.defineProperty,OI=Object.getOwnPropertyDescriptor,B3=(t,e,n,r)=>{for(var i=r>1?void 0:r?OI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&DI(e,n,i),i};let rf=class extends Ne{constructor(){super(),this.activeChainId=void 0,this.unwatchNetwork=void 0;const t=$e.getSelectedChain();this.activeChainId=t?.id,this.unwatchNetwork=Rt.client().watchNetwork(e=>{const n=e.chain;n&&this.activeChainId!==n.id&&($e.setSelectedChain(n),this.activeChainId=n.id,Et.resetBalance(),this.fetchBalance())})}disconnectedCallback(){var t;(t=this.unwatchNetwork)==null||t.call(this)}async fetchBalance(){if(cn.state.enableAccountView)try{await Et.fetchBalance()}catch(t){console.error(t),Cn.openToast(ye.getErrorMessage(t),"error")}}};B3([wt()],rf.prototype,"activeChainId",2),rf=B3([ke("w3m-network-context")],rf);var AI=Object.defineProperty,$I=Object.getOwnPropertyDescriptor,PI=(t,e,n,r)=>{for(var i=r>1?void 0:r?$I(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&AI(e,n,i),i};let k3=class extends Ne{constructor(){super(),this.unsubscribeTheme=void 0,He.setTheme(),this.unsubscribeTheme=Hr.subscribe(He.setTheme),this.preloadThemeImages()}disconnectedCallback(){var t;(t=this.unsubscribeTheme)==null||t.call(this)}async preloadThemeImages(){try{const{themeVariables:t}=Hr.state,e=[t?.["--w3m-background-image-url"],t?.["--w3m-logo-image-url"]].filter(Boolean);e.length&&await Promise.all(e.map(async n=>ye.preloadImage(n)))}catch{console.info("Unsuccessful attempt at preloading some images")}}};k3=PI([ke("w3m-theme-context")],k3);const TI=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 NI=Object.defineProperty,RI=Object.getOwnPropertyDescriptor,sf=(t,e,n,r)=>{for(var i=r>1?void 0:r?RI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&NI(e,n,i),i};let Bs=class extends Ne{constructor(){super(),this.balance="hide",this.avatar="show",ye.rejectStandaloneButtonComponent()}onOpen(){const{isStandalone:t}=$e.state;t||un.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="${kn(e)}">${this.accountTemplate()}</button></div>`:ce`<w3m-button-big @click="${this.onOpen}">${this.accountTemplate()}</w3m-button-big>`}};Bs.styles=[He.globalCss,TI],sf([We()],Bs.prototype,"balance",2),sf([We()],Bs.prototype,"avatar",2),Bs=sf([ke("w3m-account-button")],Bs);const MI=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 LI=Object.defineProperty,jI=Object.getOwnPropertyDescriptor,of=(t,e,n,r)=>{for(var i=r>1?void 0:r?jI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&LI(e,n,i),i};let ea=class extends Ne{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,n=t?.map(o=>o.id),r=e&&n?.includes(e.id),i=t&&t.length<=1&&r;return ce`<button @click="${this.onClick}" ?disabled="${i}"><w3m-network-image chainId="${Hn(this.chainId)}"></w3m-network-image><w3m-text variant="xsmall-regular" color="accent">${this.label}</w3m-text></button>`}};ea.styles=[He.globalCss,MI],of([wt()],ea.prototype,"chainId",2),of([wt()],ea.prototype,"label",2),ea=of([ke("w3m-account-network-button")],ea);const UI=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 FI=Object.defineProperty,BI=Object.getOwnPropertyDescriptor,ta=(t,e,n,r)=>{for(var i=r>1?void 0:r?BI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&FI(e,n,i),i};let Gi=class extends Ne{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:n})=>{this.address=t,this.name=e,this.loading=!!n})}disconnectedCallback(){var t;(t=this.unsubscribeAccount)==null||t.call(this)}render(){var t;const e=this.variant==="button",n={"w3m-loading":this.loading};return ce`<w3m-text class="${kn(n)}" variant="${e?"medium-regular":"big-bold"}" color="${e?"inverse":"primary"}">${this.name?this.name:ye.truncate((t=this.address)!=null?t:"")}</w3m-text>`}};Gi.styles=[He.globalCss,UI],ta([wt()],Gi.prototype,"address",2),ta([wt()],Gi.prototype,"name",2),ta([wt()],Gi.prototype,"loading",2),ta([We()],Gi.prototype,"variant",2),Gi=ta([ke("w3m-address-text")],Gi);const Nn={allowedExplorerListings(t){const{explorerAllowList:e,explorerDenyList:n}=cn.state;let r=[...t];return e&&(r=r.filter(i=>e.includes(i.id))),n&&(r=r.filter(i=>!n.includes(i.id))),r},walletsWithInjected(t){let e=[...t??[]];if(window.ethereum){const n=ye.getWalletName("");e=e.filter(({name:r})=>!ye.caseSafeIncludes(r,n))}return e},connectorWallets(){const{isStandalone:t}=$e.state;if(t)return[];let e=Rt.client().getConnectors();return!window.ethereum&&rt.isMobile()&&(e=e.filter(({id:n})=>n!=="injected"&&n!==Us.metaMask)),e},walletTemplatesWithRecent(t,e){let n=[...t];if(e){const r=ye.getRecentWallet();n=n.filter(i=>!i.values.includes(r?.name)),n.splice(1,0,e)}return n},deduplicateExplorerListingsFromConnectors(t){const{isStandalone:e}=$e.state;if(e)return t;const n=Rt.client().getConnectors().map(({name:r})=>r.toUpperCase());return t.filter(({name:r})=>!n.includes(r.toUpperCase()))}},kI=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 HI=Object.defineProperty,zI=Object.getOwnPropertyDescriptor,WI=(t,e,n,r)=>{for(var i=r>1?void 0:r?zI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&HI(e,n,i),i};let af=class extends Ne{onGoToQrcode(){lt.push("Qrcode")}onGoToConnectors(){lt.push("Connectors")}onGoToGetWallet(){lt.push("GetWallet")}getConnectors(){let t=Nn.connectorWallets();return window.ethereum||(t=t.filter(({id:e})=>e!=="injected"&&e!==Us.metaMask)),t}render(){const{previewWallets:t}=ln.state,e=t.length,n=[...t,...t],r=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">${n.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">${r?"WalletConnect":"Select Wallet"}</w3m-text></w3m-button-big>${r?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>`}};af.styles=[He.globalCss,kI],af=WI([ke("w3m-android-wallet-selection")],af);const qI=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 VI=Object.defineProperty,KI=Object.getOwnPropertyDescriptor,na=(t,e,n,r)=>{for(var i=r>1?void 0:r?KI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&VI(e,n,i),i};let Zi=class extends Ne{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:n})=>{this.address=t,this.avatar=e,this.loading=!!n})}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="${kn(t)}" src="${this.avatar}">`:this.address?(ye.generateAvatarColors(this.address),ce`<div class="${kn(t)}">${this.loading?ce`<div class="w3m-loader"></div>`:null}</div>`):null}};Zi.styles=[He.globalCss,qI],na([wt()],Zi.prototype,"address",2),na([wt()],Zi.prototype,"avatar",2),na([wt()],Zi.prototype,"loading",2),na([We()],Zi.prototype,"size",2),Zi=na([ke("w3m-avatar")],Zi);const GI=Ge`div{display:flex;align-items:center}w3m-token-image{width:28px;height:28px;margin-right:6px}`;var ZI=Object.defineProperty,YI=Object.getOwnPropertyDescriptor,cf=(t,e,n,r)=>{for(var i=r>1?void 0:r?YI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&ZI(e,n,i),i};let ra=class extends Ne{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:n})=>{this.symbol=n?.symbol,this.amount=n?.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="${Hn(this.symbol)}"></w3m-token-image><w3m-text variant="medium-regular" color="primary">${t} ${this.symbol}</w3m-text></div>`}};ra.styles=[He.globalCss,GI],cf([wt()],ra.prototype,"symbol",2),cf([wt()],ra.prototype,"amount",2),ra=cf([ke("w3m-balance")],ra);const JI=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 XI=Object.defineProperty,QI=Object.getOwnPropertyDescriptor,Tc=(t,e,n,r)=>{for(var i=r>1?void 0:r?QI(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&XI(e,n,i),i};let Yi=class extends Ne{constructor(){super(),this.loading=!1,this.label="Connect Wallet",this.icon="show",this.modalUnsub=void 0,ye.rejectStandaloneButtonComponent(),this.modalUnsub=un.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}=cn.state,{chains:e,selectedChain:n}=$e.state,r=e?.length&&e.length>1;t||r&&!n?un.open({route:"SelectNetwork"}):un.open({route:"ConnectWallet"})}onDisconnect(){Rt.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>`}};Yi.styles=[He.globalCss,JI],Tc([wt()],Yi.prototype,"loading",2),Tc([We()],Yi.prototype,"label",2),Tc([We()],Yi.prototype,"icon",2),Yi=Tc([ke("w3m-connect-button")],Yi);var eS=Object.defineProperty,tS=Object.getOwnPropertyDescriptor,ks=(t,e,n,r)=>{for(var i=r>1?void 0:r?tS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&eS(e,n,i),i};let di=class extends Ne{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}=cn.state,e=Hn(this.balance),n=Hn(this.label),r=Hn(this.icon),i=Hn(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":n}" icon="${r}"></w3m-connect-button>`}};ks([wt()],di.prototype,"isConnected",2),ks([We()],di.prototype,"label",2),ks([We()],di.prototype,"icon",2),ks([We()],di.prototype,"avatar",2),ks([We()],di.prototype,"balance",2),di=ks([ke("w3m-core-button")],di);const nS=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 rS=Object.defineProperty,iS=Object.getOwnPropertyDescriptor,sS=(t,e,n,r)=>{for(var i=r>1?void 0:r?iS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&rS(e,n,i),i};let lf=class extends Ne{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===Us.metaMask?this.onInjectedWallet():await ye.handleConnectorConnection(t):this.onInstallConnector()}desktopWalletsTemplate(){const{desktopWallets:t}=cn.state;return t?.map(({id:e,name:n,links:{universal:r,native:i}})=>ce`<w3m-wallet-button walletId="${e}" name="${n}" .onClick="${()=>this.onDesktopWallet({name:n,walletId:e,universal:r,native:i})}"></w3m-wallet-button>`)}previewWalletsTemplate(){let t=Nn.allowedExplorerListings(ln.state.previewWallets);return t=Nn.deduplicateExplorerListingsFromConnectors(t),t.map(({name:e,desktop:{universal:n,native:r},homepage:i,image_url:o,id:c})=>ce`<w3m-wallet-button src="${o.lg}" name="${e}" .onClick="${()=>this.onDesktopWallet({walletId:c,name:e,native:r,universal:n||i,icon:o.lg})}"></w3m-wallet-button>`)}connectorWalletsTemplate(){return Nn.connectorWallets().map(({id:t,name:e,ready:n})=>ce`<w3m-wallet-button .installed="${["injected","metaMask"].includes(t)&&n}" name="${e}" walletId="${t}" .onClick="${async()=>this.onConnectorWallet(t)}"></w3m-wallet-button>`)}recentWalletTemplate(){const t=ye.getRecentWallet();if(!t)return;const{id:e,name:n,links:r,image:i}=t;return ce`<w3m-wallet-button .recent="${!0}" name="${n}" walletId="${Hn(e)}" src="${Hn(i)}" .onClick="${()=>this.onDesktopWallet({name:n,walletId:e,universal:r?.universal,native:r?.native,icon:i})}"></w3m-wallet-button>`}render(){const{standaloneUri:t}=$e.state,e=this.desktopWalletsTemplate(),n=this.previewWalletsTemplate(),r=this.connectorWalletsTemplate(),i=this.recentWalletTemplate(),o=[...e??[],...n],c=[...r,...o],l=Nn.walletTemplatesWithRecent(c,i),h=Nn.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}`}};lf.styles=[He.globalCss,nS],lf=sS([ke("w3m-desktop-wallet-selection")],lf);const oS=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 aS=Object.defineProperty,cS=Object.getOwnPropertyDescriptor,lS=(t,e,n,r)=>{for(var i=r>1?void 0:r?cS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&aS(e,n,i),i};let uf=class extends Ne{render(){const{termsOfServiceUrl:t,privacyPolicyUrl:e}=cn.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}};uf.styles=[He.globalCss,oS],uf=lS([ke("w3m-legal-notice")],uf);const uS=Ge`.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;var hS=Object.defineProperty,fS=Object.getOwnPropertyDescriptor,dS=(t,e,n,r)=>{for(var i=r>1?void 0:r?fS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&hS(e,n,i),i};let hf=class extends Ne{onGoToQrcode(){lt.push("Qrcode")}async onConnectorWallet(t){await ye.handleConnectorConnection(t)}mobileWalletsTemplate(){const{mobileWallets:t}=cn.state,e=Nn.walletsWithInjected(t);if(e.length)return e.map(({id:n,name:r,links:{universal:i,native:o}})=>ce`<w3m-wallet-button name="${r}" walletId="${n}" .onClick="${async()=>ye.handleMobileLinking({links:{native:o,universal:i},name:r,id:n})}"></w3m-wallet-button>`)}previewWalletsTemplate(){const{previewWallets:t}=ln.state;let e=Nn.walletsWithInjected(t);return e=Nn.allowedExplorerListings(e),e=Nn.deduplicateExplorerListingsFromConnectors(e),e.map(({image_url:n,name:r,mobile:{native:i,universal:o},id:c})=>ce`<w3m-wallet-button name="${r}" src="${n.lg}" .onClick="${async()=>ye.handleMobileLinking({links:{native:i,universal:o},name:r,id:c,image:n.lg})}"></w3m-wallet-button>`)}connectorWalletsTemplate(){let t=Nn.connectorWallets();return window.ethereum||(t=t.filter(({id:e})=>e!=="injected"&&e!==Us.metaMask)),t.map(({name:e,id:n,ready:r})=>ce`<w3m-wallet-button .installed="${["injected","metaMask"].includes(n)&&r}" name="${e}" walletId="${n}" .onClick="${async()=>this.onConnectorWallet(n)}"></w3m-wallet-button>`)}recentWalletTemplate(){const t=ye.getRecentWallet();if(!t)return;const{id:e,name:n,links:r,image:i}=t;return ce`<w3m-wallet-button .recent="${!0}" name="${n}" walletId="${Hn(e)}" src="${Hn(i)}" .onClick="${async()=>ye.handleMobileLinking({name:n,id:e,links:r,image:i})}"></w3m-wallet-button>`}render(){const{standaloneUri:t}=$e.state,e=this.connectorWalletsTemplate(),n=this.mobileWalletsTemplate(),r=this.previewWalletsTemplate(),i=this.recentWalletTemplate(),o=n??r,c=[...e,...o],l=Nn.walletTemplatesWithRecent(c,i),h=Nn.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}`}};hf.styles=[He.globalCss,uS],hf=dS([ke("w3m-mobile-wallet-selection")],hf);const pS=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 gS=Object.defineProperty,mS=Object.getOwnPropertyDescriptor,H3=(t,e,n,r)=>{for(var i=r>1?void 0:r?mS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&gS(e,n,i),i};let ia=class extends Ne{constructor(){super(),this.open=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=un.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&&un.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"?un.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="${kn(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>`}};ia.styles=[He.globalCss,pS],H3([wt()],ia.prototype,"open",2),ia=H3([ke("w3m-modal")],ia);const wS=Ge`:host{all:initial}w3m-network-image{margin-left:-6px;margin-right:6px;width:28px;height:28px}`;var vS=Object.defineProperty,yS=Object.getOwnPropertyDescriptor,Nc=(t,e,n,r)=>{for(var i=r>1?void 0:r?yS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&vS(e,n,i),i};let Ji=class extends Ne{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,n=e?.map(r=>r.id);this.chainId=t.id.toString(),this.wrongNetwork=!(n!=null&&n.includes(t.id)),this.label=this.wrongNetwork?"Wrong Network":t.name}}onClick(){un.open({route:"SelectNetwork"})}render(){var t;const{chains:e}=$e.state,n=e&&e.length>1;return ce`<w3m-button-big @click="${this.onClick}" ?disabled="${!n}"><w3m-network-image chainId="${Hn(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>`}};Ji.styles=[He.globalCss,wS],Nc([wt()],Ji.prototype,"chainId",2),Nc([wt()],Ji.prototype,"label",2),Nc([wt()],Ji.prototype,"wrongNetwork",2),Ji=Nc([ke("w3m-network-switch")],Ji);const bS=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 _S=Object.defineProperty,ES=Object.getOwnPropertyDescriptor,xS=(t,e,n,r)=>{for(var i=r>1?void 0:r?ES(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&_S(e,n,i),i};let ff=class extends Ne{onClick(){lt.push("WalletExplorer")}render(){const{previewWallets:t}=ln.state,e=ye.getCustomWallets(),n=[...t,...e].reverse().slice(0,4);return ce`<button @click="${this.onClick}"><div class="w3m-icons">${n.map(r=>{var i;const o=(i=r.image_url)==null?void 0:i.lg;if(o)return ce`<img src="${o}">`;const c=ye.getWalletId(r.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>`}};ff.styles=[He.globalCss,bS],ff=xS([ke("w3m-view-all-wallets-button")],ff);const CS=Ge`.w3m-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var IS=Object.defineProperty,SS=Object.getOwnPropertyDescriptor,z3=(t,e,n,r)=>{for(var i=r>1?void 0:r?SS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&IS(e,n,i),i};let Rc=class extends Ne{constructor(){super(),this.uri="",this.createConnectionAndWait()}get overlayEl(){return ye.getShadowRootElement(this,".w3m-qr-container")}async createConnectionAndWait(t=0){var e;rt.removeWalletConnectDeepLink();try{const{standaloneUri:n}=$e.state;n?setTimeout(()=>this.uri=n,0):(await Rt.client().connectWalletConnect(r=>this.uri=r,(e=$e.state.selectedChain)==null?void 0:e.id),un.close())}catch(n){console.error(n),Cn.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>`}};Rc.styles=[He.globalCss,CS],z3([wt()],Rc.prototype,"uri",2),Rc=z3([ke("w3m-walletconnect-qr")],Rc);const DS=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 OS=Object.defineProperty,AS=Object.getOwnPropertyDescriptor,$S=(t,e,n,r)=>{for(var i=r>1?void 0:r?AS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&OS(e,n,i),i};let df=class extends Ne{onDisconnect(){un.close(),Rt.client().disconnect(),Et.resetAccount()}async onCopyAddress(){var t;await navigator.clipboard.writeText((t=Et.state.address)!=null?t:""),Cn.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>`}};df.styles=[He.globalCss,DS],df=$S([ke("w3m-account-view")],df);var PS=Object.defineProperty,TS=Object.getOwnPropertyDescriptor,NS=(t,e,n,r)=>{for(var i=r>1?void 0:r?TS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&PS(e,n,i),i};let pf=class extends Ne{viewTemplate(){return rt.isAndroid()?ce`<w3m-android-wallet-selection></w3m-android-wallet-selection>`:rt.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>`}};pf.styles=[He.globalCss],pf=NS([ke("w3m-connect-wallet-view")],pf);const RS=Ge`.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}`;var MS=Object.defineProperty,LS=Object.getOwnPropertyDescriptor,jS=(t,e,n,r)=>{for(var i=r>1?void 0:r?LS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&MS(e,n,i),i};let gf=class extends Ne{async onConnectorWallet(t){await ye.handleConnectorConnection(t)}connectorWalletsTemplate(){let t=Nn.connectorWallets();return window.ethereum||(t=t.filter(({id:e})=>e!=="injected"&&e!==Us.metaMask)),t.map(({name:e,id:n,ready:r})=>ce`<w3m-wallet-button .installed="${["injected","metaMask"].includes(n)&&r}" name="${e}" walletId="${n}" .onClick="${async()=>this.onConnectorWallet(n)}"></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>`}};gf.styles=[He.globalCss,RS],gf=jS([ke("w3m-connectors-view")],gf);const US=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 FS=Object.defineProperty,BS=Object.getOwnPropertyDescriptor,W3=(t,e,n,r)=>{for(var i=r>1?void 0:r?BS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&FS(e,n,i),i};let Mc=class extends Ne{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:n,name:r}=this.getRouterData();if(e){const i=rt.formatNativeUrl(e,t,r);rt.openHref(i,"_self")}else if(n){const i=rt.formatUniversalUrl(n,t,r);rt.openHref(i,"_blank")}}async createConnectionAndWait(t=0){var e;rt.removeWalletConnectDeepLink();const{standaloneUri:n}=$e.state,{name:r,walletId:i,native:o,universal:c,icon:l}=this.getRouterData(),h={name:r,id:i,links:{native:o,universal:c},image:l};if(n)ye.setRecentWallet(h),this.onFormatAndRedirect(n);else try{await Rt.client().connectWalletConnect(d=>{this.uri=d,this.onFormatAndRedirect(d)},(e=$e.state.selectedChain)==null?void 0:e.id),ye.setRecentWallet(h),un.close()}catch{Cn.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 n=rt.formatUniversalUrl(t,this.uri,e);rt.openHref(n,"_blank")}}render(){const{name:t,icon:e,universal:n,walletId:r}=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="${Hn(r)}"></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>${n?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,US],W3([wt()],Mc.prototype,"uri",2),Mc=W3([ke("w3m-desktop-connector-view")],Mc);const kS=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 HS=Object.defineProperty,zS=Object.getOwnPropertyDescriptor,WS=(t,e,n,r)=>{for(var i=r>1?void 0:r?zS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&HS(e,n,i),i};let mf=class extends Ne{onGet(t){rt.openHref(t,"_blank")}render(){const{recomendedWallets:t}=ln.state,e=ye.getCustomWallets().slice(0,6),n=t.length,r=e.length;return ce`<w3m-modal-header title="Get a wallet"></w3m-modal-header><w3m-modal-content>${n?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} ${r?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>`}};mf.styles=[He.globalCss,kS],mf=WS([ke("w3m-get-wallet-view")],mf);const qS=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 VS=Object.defineProperty,KS=Object.getOwnPropertyDescriptor,GS=(t,e,n,r)=>{for(var i=r>1?void 0:r?KS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&VS(e,n,i),i};let wf=class extends Ne{constructor(){super(...arguments),this.learnUrl="https://ethereum.org/en/wallets/"}onGet(){cn.state.enableExplorer?lt.push("GetWallet"):ye.openWalletExplorerUrl()}onLearnMore(){rt.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>`}};wf.styles=[He.globalCss,qS],wf=GS([ke("w3m-help-view")],wf);const ZS=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 YS=Object.defineProperty,JS=Object.getOwnPropertyDescriptor,vf=(t,e,n,r)=>{for(var i=r>1?void 0:r?JS(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&YS(e,n,i),i};let sa=class extends Ne{constructor(){super(),this.connecting=!0,this.error=!1,this.connector=Rt.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),n={"w3m-injected-wrapper":!0,"w3m-injected-error":this.error};return ce`<w3m-modal-header title="${t}"></w3m-modal-header><w3m-modal-content><div class="${kn(n)}"><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>`}};sa.styles=[He.globalCss,ZS],vf([wt()],sa.prototype,"connecting",2),vf([wt()],sa.prototype,"error",2),sa=vf([ke("w3m-injected-connector-view")],sa);const XS=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 QS=Object.defineProperty,eD=Object.getOwnPropertyDescriptor,tD=(t,e,n,r)=>{for(var i=r>1?void 0:r?eD(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&QS(e,n,i),i};let yf=class extends Ne{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();rt.openHref(t,"_blank")}onMobile(){const{name:t}=this.getRouterData();lt.push("ConnectWallet"),Cn.openToast(`Scan the code with ${t}`,"success")}render(){const{name:t,id:e,isMobile:n}=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>${n?ce`<w3m-button .onClick="${this.onMobile.bind(this)}" .iconLeft="${Ze.MOBILE_ICON}">${t} Mobile</w3m-button>`:null}</div></div></w3m-modal-content>`}};yf.styles=[He.globalCss,XS],yf=tD([ke("w3m-install-connector-view")],yf);var nD=Object.defineProperty,rD=Object.getOwnPropertyDescriptor,iD=(t,e,n,r)=>{for(var i=r>1?void 0:r?rD(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&nD(e,n,i),i};let bf=class extends Ne{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>`}};bf.styles=[He.globalCss],bf=iD([ke("w3m-qrcode-view")],bf);const sD=Ge`.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);margin:-5px -10px;justify-content:space-between}`;var oD=Object.defineProperty,aD=Object.getOwnPropertyDescriptor,cD=(t,e,n,r)=>{for(var i=r>1?void 0:r?aD(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&oD(e,n,i),i};let _f=class extends Ne{async onSelectChain(t){try{const{selectedChain:e,walletConnectVersion:n}=$e.state,{isConnected:r}=Et.state;r?e?.id===t.id?lt.replace("Account"):n===2?(await Rt.client().switchNetwork({chainId:t.id}),lt.replace("Account")):lt.push("SwitchNetwork",{SwitchNetwork:t}):(lt.push("ConnectWallet"),$e.setSelectedChain(t))}catch(e){console.error(e),Cn.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>`}};_f.styles=[He.globalCss,sD],_f=cD([ke("w3m-select-network-view")],_f);const lD=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 uD=Object.defineProperty,hD=Object.getOwnPropertyDescriptor,q3=(t,e,n,r)=>{for(var i=r>1?void 0:r?hD(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&uD(e,n,i),i};let Lc=class extends Ne{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 Rt.client().switchNetwork({chainId:t.id}),$e.setSelectedChain(t),lt.replace("Account")}catch{this.error=!0}}render(){const{id:t,name:e}=this.getRouterData(),n={"w3m-wrapper":!0,"w3m-error":this.error};return ce`<w3m-modal-header title="${`Connect to ${e}`}"></w3m-modal-header><w3m-modal-content><div class="${kn(n)}"><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,lD],q3([wt()],Lc.prototype,"error",2),Lc=q3([ke("w3m-switch-network-view")],Lc);const fD=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 dD=Object.defineProperty,pD=Object.getOwnPropertyDescriptor,oa=(t,e,n,r)=>{for(var i=r>1?void 0:r?pD(e,n):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&dD(e,n,i),i};const Ef=40;let Xi=class extends Ne{constructor(){super(...arguments),this.loading=!ln.state.wallets.listings.length,this.firstFetch=!ln.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,ln.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),ln.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}=ln.state,{listings:n,total:r}=this.search?e:t;return r<=Ef||n.length>=r}async fetchWallets(){var t;const{wallets:e,search:n}=ln.state,r=ye.getExtensionWallets(),{listings:i,total:o,page:c}=this.search?n:e;if(!this.endReached&&(this.firstFetch||o>Ef&&i.length<o))try{this.loading=!0;const l=(t=$e.state.standaloneChains)==null?void 0:t.join(","),{listings:h}=await ln.getPaginatedWallets({page:this.firstFetch?1:c+1,entries:Ef,device:rt.isMobile()?"mobile":"desktop",search:this.search,version:$e.state.walletConnectVersion,chains:l}),d=h.map(({image_url:E})=>E.lg),v=r.map(({id:E})=>ye.getWalletIcon(E));await Promise.all([...d.map(async E=>ye.preloadImage(E)),...v.map(async E=>ye.preloadImage(E)),rt.wait(300)]),this.endReached=this.isLastPage()}catch(l){console.error(l),Cn.openToast(ye.getErrorMessage(l),"error")}finally{this.loading=!1,this.firstFetch=!1}}onConnectCustom({name:t,id:e,links:n}){rt.isMobile()?ye.handleMobileLinking({links:n,name:t,id:e}):lt.push("DesktopConnector",{DesktopConnector:{name:t,walletId:e,universal:n.universal,native:n.native}})}onConnectListing(t){if(rt.isMobile()){const{id:e,image_url:n}=t,{native:r,universal:i}=t.mobile;ye.handleMobileLinking({links:{native:r,universal:i},name:t.name,id:e,image:n.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}=ln.state,{isStandalone:n}=$e.state;let{listings:r}=this.search?e:t;r=Nn.allowedExplorerListings(r);const i=this.loading&&!r.length,o=this.search.length>=3;let c=!n&&!rt.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&&!r.length&&!c.length,d=Math.max(c.length,r.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="${kn(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} ${r[_]?ce`<w3m-wallet-button src="${r[_].image_url.lg}" name="${r[_].name}" walletId="${r[_].id}" .onClick="${()=>this.onConnectListing(r[_])}"></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>`}};Xi.styles=[He.globalCss,fD],oa([wt()],Xi.prototype,"loading",2),oa([wt()],Xi.prototype,"firstFetch",2),oa([wt()],Xi.prototype,"search",2),oa([wt()],Xi.prototype,"endReached",2),Xi=oa([ke("w3m-wallet-explorer-view")],Xi);var gD=Object.freeze({__proto__:null,get W3mAccountButton(){return Bs},get W3mConnectButton(){return Yi},get W3mCoreButton(){return di},get W3mModal(){return ia},get W3mNetworkSwitch(){return Ji}});wr.EthereumProvider=T7,wr.OPTIONAL_EVENTS=I7,wr.OPTIONAL_METHODS=C7,wr.REQUIRED_EVENTS=ec,wr.REQUIRED_METHODS=Qa,wr.default=tc,Object.defineProperty(wr,"__esModule",{value:!0})});
159
159
  //# sourceMappingURL=index.umd.js.map