@wormhole-foundation/wormhole-connect 0.3.0-beta.0-development → 0.3.0-beta.1-development
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/assets/{aptos-pA6KZbBw.js → aptos--cRgJxLv.js} +1 -1
- package/dist/assets/ccip-nIi_p4zM.js +1 -0
- package/dist/assets/{cosmos-f5FpVoIT.js → cosmos-RixGz7q4.js} +1 -1
- package/dist/assets/{evm-Wgv0qkFH.js → evm-5aZ11sr9.js} +4 -4
- package/dist/assets/{index-asOtxns8.js → index-37oU2-By.js} +1 -1
- package/dist/assets/{index-hhU5j-34.js → index-LeHe4Gjj.js} +1 -1
- package/dist/assets/index-XtkoMMyw.js +7 -0
- package/dist/assets/index-bti7uInf.js +3 -0
- package/dist/assets/{index.es-0VUWq9QB.js → index.es--jOuZ4lh.js} +1 -1
- package/dist/assets/index.es-00radgcV.js +20 -0
- package/dist/assets/{index.es-4E5PqK_f.js → index.es-Pqf6uo9-.js} +3 -3
- package/dist/assets/libsodium-wrappers-XgohdhTj.js +1 -0
- package/dist/assets/{sei-M2rZ9ku5.js → sei-J78VkMVQ.js} +1 -1
- package/dist/assets/solana-3ev6kIv7.js +7 -0
- package/dist/assets/{solanaEmbed.esm-1Awe9a4x.js → solanaEmbed.esm-bag_3ej_.js} +1 -1
- package/dist/assets/{sui-7olk-qLk.js → sui-4vLtme4F.js} +1 -1
- package/dist/{assets/main-wVJAa1zx.js → main.js} +6 -6
- package/lib/{aptos-SE9xL6YR.mjs → aptos-AEDvNZW0.mjs} +1 -1
- package/lib/{aptos-HrKTgRXj.js → aptos-E_bmP-uH.js} +1 -1
- package/lib/{ccip-LevZMjhC.mjs → ccip-DgqxzCnp.mjs} +3 -3
- package/lib/{ccip-7BoLGyzE.js → ccip-x_5dfOyY.js} +1 -1
- package/lib/{cosmos-bi1xqrBB.mjs → cosmos-iL7Lphnv.mjs} +3 -3
- package/lib/{cosmos-RRozAQR1.js → cosmos-rBSbdATY.js} +1 -1
- package/lib/{evm-DpTGe1xN.js → evm-U8W0wnAS.js} +3 -3
- package/lib/{evm-hEWYh88n.mjs → evm-u33uO5mU.mjs} +4 -4
- package/lib/{index-fNBspXvL.mjs → index-HeJJ4ioY.mjs} +68 -68
- package/lib/{index-z6KdZ90O.mjs → index-IOv_IOHh.mjs} +1 -1
- package/lib/{index-gMv8O7x8.js → index-KI5CF8KC.js} +1 -1
- package/lib/{index-k3HwxTc6.js → index-Kg2IYkKj.js} +1 -1
- package/lib/{index-ff22c93m.js → index-PeRFKzot.js} +1 -1
- package/lib/{index-GybMpL7C.mjs → index-SGYq0qf1.mjs} +76 -74
- package/lib/{index-mo8HavDi.mjs → index-ej1vfGal.mjs} +2 -2
- package/lib/{index-QFolrIvD.js → index-jKol2sI7.js} +5 -5
- package/lib/index-nGC6YonD.js +3 -0
- package/lib/{index-z37Kqbxx.mjs → index-wrVsD6xr.mjs} +3 -3
- package/lib/{index.es-674v5fkD.js → index.es-4MsJTigr.js} +1 -1
- package/lib/{index.es-eijvlXbt.mjs → index.es-5no8HiJc.mjs} +4 -4
- package/lib/{index.es-LLujoQUP.js → index.es-60zy5kS0.js} +2 -2
- package/lib/{index.es-OZG9h1DE.mjs → index.es-FiIhT_0D.mjs} +1 -1
- package/lib/{index.es-5GouFA6T.mjs → index.es-YhzlyIL4.mjs} +2 -2
- package/lib/{index.es-i-lckTCE.js → index.es-vu-DHGhE.js} +1 -1
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/lib/{libsodium-wrappers-5vjrjBSO.js → libsodium-wrappers-GC2qwMrd.js} +1 -1
- package/lib/{libsodium-wrappers-5Q5SB8Ev.mjs → libsodium-wrappers-ziNSE4zr.mjs} +1 -1
- package/lib/{sei-vPR2n1Y7.mjs → sei-Xk3hWtbl.mjs} +2 -2
- package/lib/{sei-NOgRpGt3.js → sei-zCfp2In3.js} +1 -1
- package/lib/{solana-Hqom8lV9.mjs → solana-3u6kb1G_.mjs} +3 -3
- package/lib/{solana-94sTiU-X.js → solana-lpXIOlL5.js} +1 -1
- package/lib/{solanaEmbed.esm-glCRh6tR.mjs → solanaEmbed.esm-93QbCbVq.mjs} +2 -2
- package/lib/{solanaEmbed.esm-tZxVLSLJ.js → solanaEmbed.esm-e2SOktqM.js} +1 -1
- package/lib/{sui-82tI9UDL.mjs → sui-BylAbrsX.mjs} +1 -1
- package/lib/{sui-lIzqq8QP.js → sui-O_R5r4YX.js} +1 -1
- package/package.json +1 -1
- package/dist/assets/ccip-u26S4Hov.js +0 -1
- package/dist/assets/index--x31VXme.js +0 -3
- package/dist/assets/index-3iD33HDP.js +0 -7
- package/dist/assets/index.es-DkxB7tN9.js +0 -20
- package/dist/assets/libsodium-wrappers-1pBdIONR.js +0 -1
- package/dist/assets/solana-6MSMmp1N.js +0 -7
- package/lib/index-TETuoXKR.js +0 -3
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{aT as Yr,D as kr,d as V,p as Xr}from"../main.js";var At={},Qe={},R={},wr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(u,l){var _=u>>>16&65535,D=u&65535,w=l>>>16&65535,y=l&65535;return D*y+(_*y+D*w<<16>>>0)|0}e.mul=Math.imul||t;function r(u,l){return u+l|0}e.add=r;function i(u,l){return u-l|0}e.sub=i;function a(u,l){return u<<l|u>>>32-l}e.rotl=a;function s(u,l){return u<<32-l|u>>>l}e.rotr=s;function b(u){return typeof u=="number"&&isFinite(u)&&Math.floor(u)===u}e.isInteger=Number.isInteger||b,e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(u){return e.isInteger(u)&&u>=-e.MAX_SAFE_INTEGER&&u<=e.MAX_SAFE_INTEGER}})(wr);Object.defineProperty(R,"__esModule",{value:!0});var vr=wr;function Jr(e,t){return t===void 0&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16}R.readInt16BE=Jr;function Qr(e,t){return t===void 0&&(t=0),(e[t+0]<<8|e[t+1])>>>0}R.readUint16BE=Qr;function Zr(e,t){return t===void 0&&(t=0),(e[t+1]<<8|e[t])<<16>>16}R.readInt16LE=Zr;function en(e,t){return t===void 0&&(t=0),(e[t+1]<<8|e[t])>>>0}R.readUint16LE=en;function yr(e,t,r){return t===void 0&&(t=new Uint8Array(2)),r===void 0&&(r=0),t[r+0]=e>>>8,t[r+1]=e>>>0,t}R.writeUint16BE=yr;R.writeInt16BE=yr;function gr(e,t,r){return t===void 0&&(t=new Uint8Array(2)),r===void 0&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t}R.writeUint16LE=gr;R.writeInt16LE=gr;function Et(e,t){return t===void 0&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}R.readInt32BE=Et;function wt(e,t){return t===void 0&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}R.readUint32BE=wt;function vt(e,t){return t===void 0&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}R.readInt32LE=vt;function yt(e,t){return t===void 0&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}R.readUint32LE=yt;function ke(e,t,r){return t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0),t[r+0]=e>>>24,t[r+1]=e>>>16,t[r+2]=e>>>8,t[r+3]=e>>>0,t}R.writeUint32BE=ke;R.writeInt32BE=ke;function Xe(e,t,r){return t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,t}R.writeUint32LE=Xe;R.writeInt32LE=Xe;function tn(e,t){t===void 0&&(t=0);var r=Et(e,t),i=Et(e,t+4);return r*4294967296+i-(i>>31)*4294967296}R.readInt64BE=tn;function rn(e,t){t===void 0&&(t=0);var r=wt(e,t),i=wt(e,t+4);return r*4294967296+i}R.readUint64BE=rn;function nn(e,t){t===void 0&&(t=0);var r=vt(e,t),i=vt(e,t+4);return i*4294967296+r-(r>>31)*4294967296}R.readInt64LE=nn;function an(e,t){t===void 0&&(t=0);var r=yt(e,t),i=yt(e,t+4);return i*4294967296+r}R.readUint64LE=an;function pr(e,t,r){return t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0),ke(e/4294967296>>>0,t,r),ke(e>>>0,t,r+4),t}R.writeUint64BE=pr;R.writeInt64BE=pr;function mr(e,t,r){return t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0),Xe(e>>>0,t,r),Xe(e/4294967296>>>0,t,r+4),t}R.writeUint64LE=mr;R.writeInt64LE=mr;function on(e,t,r){if(r===void 0&&(r=0),e%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var i=0,a=1,s=e/8+r-1;s>=r;s--)i+=t[s]*a,a*=256;return i}R.readUintBE=on;function un(e,t,r){if(r===void 0&&(r=0),e%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var i=0,a=1,s=r;s<r+e/8;s++)i+=t[s]*a,a*=256;return i}R.readUintLE=un;function sn(e,t,r,i){if(r===void 0&&(r=new Uint8Array(e/8)),i===void 0&&(i=0),e%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!vr.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var a=1,s=e/8+i-1;s>=i;s--)r[s]=t/a&255,a*=256;return r}R.writeUintBE=sn;function cn(e,t,r,i){if(r===void 0&&(r=new Uint8Array(e/8)),i===void 0&&(i=0),e%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!vr.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var a=1,s=i;s<i+e/8;s++)r[s]=t/a&255,a*=256;return r}R.writeUintLE=cn;function fn(e,t){t===void 0&&(t=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getFloat32(t)}R.readFloat32BE=fn;function hn(e,t){t===void 0&&(t=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getFloat32(t,!0)}R.readFloat32LE=hn;function ln(e,t){t===void 0&&(t=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getFloat64(t)}R.readFloat64BE=ln;function dn(e,t){t===void 0&&(t=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getFloat64(t,!0)}R.readFloat64LE=dn;function Dn(e,t,r){t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0);var i=new DataView(t.buffer,t.byteOffset,t.byteLength);return i.setFloat32(r,e),t}R.writeFloat32BE=Dn;function bn(e,t,r){t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0);var i=new DataView(t.buffer,t.byteOffset,t.byteLength);return i.setFloat32(r,e,!0),t}R.writeFloat32LE=bn;function _n(e,t,r){t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0);var i=new DataView(t.buffer,t.byteOffset,t.byteLength);return i.setFloat64(r,e),t}R.writeFloat64BE=_n;function En(e,t,r){t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0);var i=new DataView(t.buffer,t.byteOffset,t.byteLength);return i.setFloat64(r,e,!0),t}R.writeFloat64LE=En;var pe={};Object.defineProperty(pe,"__esModule",{value:!0});function wn(e){for(var t=0;t<e.length;t++)e[t]=0;return e}pe.wipe=wn;Object.defineProperty(Qe,"__esModule",{value:!0});var _e=R,gt=pe,vn=20;function yn(e,t,r){for(var i=1634760805,a=857760878,s=2036477234,b=1797285236,u=r[3]<<24|r[2]<<16|r[1]<<8|r[0],l=r[7]<<24|r[6]<<16|r[5]<<8|r[4],_=r[11]<<24|r[10]<<16|r[9]<<8|r[8],D=r[15]<<24|r[14]<<16|r[13]<<8|r[12],w=r[19]<<24|r[18]<<16|r[17]<<8|r[16],y=r[23]<<24|r[22]<<16|r[21]<<8|r[20],v=r[27]<<24|r[26]<<16|r[25]<<8|r[24],g=r[31]<<24|r[30]<<16|r[29]<<8|r[28],S=t[3]<<24|t[2]<<16|t[1]<<8|t[0],p=t[7]<<24|t[6]<<16|t[5]<<8|t[4],A=t[11]<<24|t[10]<<16|t[9]<<8|t[8],d=t[15]<<24|t[14]<<16|t[13]<<8|t[12],E=i,c=a,h=s,f=b,n=u,o=l,m=_,C=D,N=w,M=y,j=v,P=g,I=S,F=p,O=A,T=d,Y=0;Y<vn;Y+=2)E=E+n|0,I^=E,I=I>>>16|I<<16,N=N+I|0,n^=N,n=n>>>20|n<<12,c=c+o|0,F^=c,F=F>>>16|F<<16,M=M+F|0,o^=M,o=o>>>20|o<<12,h=h+m|0,O^=h,O=O>>>16|O<<16,j=j+O|0,m^=j,m=m>>>20|m<<12,f=f+C|0,T^=f,T=T>>>16|T<<16,P=P+T|0,C^=P,C=C>>>20|C<<12,h=h+m|0,O^=h,O=O>>>24|O<<8,j=j+O|0,m^=j,m=m>>>25|m<<7,f=f+C|0,T^=f,T=T>>>24|T<<8,P=P+T|0,C^=P,C=C>>>25|C<<7,c=c+o|0,F^=c,F=F>>>24|F<<8,M=M+F|0,o^=M,o=o>>>25|o<<7,E=E+n|0,I^=E,I=I>>>24|I<<8,N=N+I|0,n^=N,n=n>>>25|n<<7,E=E+o|0,T^=E,T=T>>>16|T<<16,j=j+T|0,o^=j,o=o>>>20|o<<12,c=c+m|0,I^=c,I=I>>>16|I<<16,P=P+I|0,m^=P,m=m>>>20|m<<12,h=h+C|0,F^=h,F=F>>>16|F<<16,N=N+F|0,C^=N,C=C>>>20|C<<12,f=f+n|0,O^=f,O=O>>>16|O<<16,M=M+O|0,n^=M,n=n>>>20|n<<12,h=h+C|0,F^=h,F=F>>>24|F<<8,N=N+F|0,C^=N,C=C>>>25|C<<7,f=f+n|0,O^=f,O=O>>>24|O<<8,M=M+O|0,n^=M,n=n>>>25|n<<7,c=c+m|0,I^=c,I=I>>>24|I<<8,P=P+I|0,m^=P,m=m>>>25|m<<7,E=E+o|0,T^=E,T=T>>>24|T<<8,j=j+T|0,o^=j,o=o>>>25|o<<7;_e.writeUint32LE(E+i|0,e,0),_e.writeUint32LE(c+a|0,e,4),_e.writeUint32LE(h+s|0,e,8),_e.writeUint32LE(f+b|0,e,12),_e.writeUint32LE(n+u|0,e,16),_e.writeUint32LE(o+l|0,e,20),_e.writeUint32LE(m+_|0,e,24),_e.writeUint32LE(C+D|0,e,28),_e.writeUint32LE(N+w|0,e,32),_e.writeUint32LE(M+y|0,e,36),_e.writeUint32LE(j+v|0,e,40),_e.writeUint32LE(P+g|0,e,44),_e.writeUint32LE(I+S|0,e,48),_e.writeUint32LE(F+p|0,e,52),_e.writeUint32LE(O+A|0,e,56),_e.writeUint32LE(T+d|0,e,60)}function Sr(e,t,r,i,a){if(a===void 0&&(a=0),e.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(i.length<r.length)throw new Error("ChaCha: destination is shorter than source");var s,b;if(a===0){if(t.length!==8&&t.length!==12)throw new Error("ChaCha nonce must be 8 or 12 bytes");s=new Uint8Array(16),b=s.length-t.length,s.set(t,b)}else{if(t.length!==16)throw new Error("ChaCha nonce with counter must be 16 bytes");s=t,b=a}for(var u=new Uint8Array(64),l=0;l<r.length;l+=64){yn(u,s,e);for(var _=l;_<l+64&&_<r.length;_++)i[_]=r[_]^u[_-l];pn(s,0,b)}return gt.wipe(u),a===0&>.wipe(s),i}Qe.streamXOR=Sr;function gn(e,t,r,i){return i===void 0&&(i=0),gt.wipe(r),Sr(e,t,r,r,i)}Qe.stream=gn;function pn(e,t,r){for(var i=1;r--;)i=i+(e[t]&255)|0,e[t]=i&255,i>>>=8,t++;if(i>0)throw new Error("ChaCha: counter overflow")}var Or={},Oe={};Object.defineProperty(Oe,"__esModule",{value:!0});function mn(e,t,r){return~(e-1)&t|e-1&r}Oe.select=mn;function Sn(e,t){return(e|0)-(t|0)-1>>>31&1}Oe.lessOrEqual=Sn;function Cr(e,t){if(e.length!==t.length)return 0;for(var r=0,i=0;i<e.length;i++)r|=e[i]^t[i];return 1&r-1>>>8}Oe.compare=Cr;function On(e,t){return e.length===0||t.length===0?!1:Cr(e,t)!==0}Oe.equal=On;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Oe,r=pe;e.DIGEST_LENGTH=16;var i=function(){function b(u){this.digestLength=e.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 l=u[0]|u[1]<<8;this._r[0]=l&8191;var _=u[2]|u[3]<<8;this._r[1]=(l>>>13|_<<3)&8191;var D=u[4]|u[5]<<8;this._r[2]=(_>>>10|D<<6)&7939;var w=u[6]|u[7]<<8;this._r[3]=(D>>>7|w<<9)&8191;var y=u[8]|u[9]<<8;this._r[4]=(w>>>4|y<<12)&255,this._r[5]=y>>>1&8190;var v=u[10]|u[11]<<8;this._r[6]=(y>>>14|v<<2)&8191;var g=u[12]|u[13]<<8;this._r[7]=(v>>>11|g<<5)&8065;var S=u[14]|u[15]<<8;this._r[8]=(g>>>8|S<<8)&8191,this._r[9]=S>>>5&127,this._pad[0]=u[16]|u[17]<<8,this._pad[1]=u[18]|u[19]<<8,this._pad[2]=u[20]|u[21]<<8,this._pad[3]=u[22]|u[23]<<8,this._pad[4]=u[24]|u[25]<<8,this._pad[5]=u[26]|u[27]<<8,this._pad[6]=u[28]|u[29]<<8,this._pad[7]=u[30]|u[31]<<8}return b.prototype._blocks=function(u,l,_){for(var D=this._fin?0:2048,w=this._h[0],y=this._h[1],v=this._h[2],g=this._h[3],S=this._h[4],p=this._h[5],A=this._h[6],d=this._h[7],E=this._h[8],c=this._h[9],h=this._r[0],f=this._r[1],n=this._r[2],o=this._r[3],m=this._r[4],C=this._r[5],N=this._r[6],M=this._r[7],j=this._r[8],P=this._r[9];_>=16;){var I=u[l+0]|u[l+1]<<8;w+=I&8191;var F=u[l+2]|u[l+3]<<8;y+=(I>>>13|F<<3)&8191;var O=u[l+4]|u[l+5]<<8;v+=(F>>>10|O<<6)&8191;var T=u[l+6]|u[l+7]<<8;g+=(O>>>7|T<<9)&8191;var Y=u[l+8]|u[l+9]<<8;S+=(T>>>4|Y<<12)&8191,p+=Y>>>1&8191;var Q=u[l+10]|u[l+11]<<8;A+=(Y>>>14|Q<<2)&8191;var J=u[l+12]|u[l+13]<<8;d+=(Q>>>11|J<<5)&8191;var X=u[l+14]|u[l+15]<<8;E+=(J>>>8|X<<8)&8191,c+=X>>>5|D;var U=0,L=U;L+=w*h,L+=y*(5*P),L+=v*(5*j),L+=g*(5*M),L+=S*(5*N),U=L>>>13,L&=8191,L+=p*(5*C),L+=A*(5*m),L+=d*(5*o),L+=E*(5*n),L+=c*(5*f),U+=L>>>13,L&=8191;var B=U;B+=w*f,B+=y*h,B+=v*(5*P),B+=g*(5*j),B+=S*(5*M),U=B>>>13,B&=8191,B+=p*(5*N),B+=A*(5*C),B+=d*(5*m),B+=E*(5*o),B+=c*(5*n),U+=B>>>13,B&=8191;var x=U;x+=w*n,x+=y*f,x+=v*h,x+=g*(5*P),x+=S*(5*j),U=x>>>13,x&=8191,x+=p*(5*M),x+=A*(5*N),x+=d*(5*C),x+=E*(5*m),x+=c*(5*o),U+=x>>>13,x&=8191;var $=U;$+=w*o,$+=y*n,$+=v*f,$+=g*h,$+=S*(5*P),U=$>>>13,$&=8191,$+=p*(5*j),$+=A*(5*M),$+=d*(5*N),$+=E*(5*C),$+=c*(5*m),U+=$>>>13,$&=8191;var H=U;H+=w*m,H+=y*o,H+=v*n,H+=g*f,H+=S*h,U=H>>>13,H&=8191,H+=p*(5*P),H+=A*(5*j),H+=d*(5*M),H+=E*(5*N),H+=c*(5*C),U+=H>>>13,H&=8191;var K=U;K+=w*C,K+=y*m,K+=v*o,K+=g*n,K+=S*f,U=K>>>13,K&=8191,K+=p*h,K+=A*(5*P),K+=d*(5*j),K+=E*(5*M),K+=c*(5*N),U+=K>>>13,K&=8191;var W=U;W+=w*N,W+=y*C,W+=v*m,W+=g*o,W+=S*n,U=W>>>13,W&=8191,W+=p*f,W+=A*h,W+=d*(5*P),W+=E*(5*j),W+=c*(5*M),U+=W>>>13,W&=8191;var G=U;G+=w*M,G+=y*N,G+=v*C,G+=g*m,G+=S*o,U=G>>>13,G&=8191,G+=p*n,G+=A*f,G+=d*h,G+=E*(5*P),G+=c*(5*j),U+=G>>>13,G&=8191;var z=U;z+=w*j,z+=y*M,z+=v*N,z+=g*C,z+=S*m,U=z>>>13,z&=8191,z+=p*o,z+=A*n,z+=d*f,z+=E*h,z+=c*(5*P),U+=z>>>13,z&=8191;var k=U;k+=w*P,k+=y*j,k+=v*M,k+=g*N,k+=S*C,U=k>>>13,k&=8191,k+=p*m,k+=A*o,k+=d*n,k+=E*f,k+=c*h,U+=k>>>13,k&=8191,U=(U<<2)+U|0,U=U+L|0,L=U&8191,U=U>>>13,B+=U,w=L,y=B,v=x,g=$,S=H,p=K,A=W,d=G,E=z,c=k,l+=16,_-=16}this._h[0]=w,this._h[1]=y,this._h[2]=v,this._h[3]=g,this._h[4]=S,this._h[5]=p,this._h[6]=A,this._h[7]=d,this._h[8]=E,this._h[9]=c},b.prototype.finish=function(u,l){l===void 0&&(l=0);var _=new Uint16Array(10),D,w,y,v;if(this._leftover){for(v=this._leftover,this._buffer[v++]=1;v<16;v++)this._buffer[v]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(D=this._h[1]>>>13,this._h[1]&=8191,v=2;v<10;v++)this._h[v]+=D,D=this._h[v]>>>13,this._h[v]&=8191;for(this._h[0]+=D*5,D=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=D,D=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=D,_[0]=this._h[0]+5,D=_[0]>>>13,_[0]&=8191,v=1;v<10;v++)_[v]=this._h[v]+D,D=_[v]>>>13,_[v]&=8191;for(_[9]-=8192,w=(D^1)-1,v=0;v<10;v++)_[v]&=w;for(w=~w,v=0;v<10;v++)this._h[v]=this._h[v]&w|_[v];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,y=this._h[0]+this._pad[0],this._h[0]=y&65535,v=1;v<8;v++)y=(this._h[v]+this._pad[v]|0)+(y>>>16)|0,this._h[v]=y&65535;return u[l+0]=this._h[0]>>>0,u[l+1]=this._h[0]>>>8,u[l+2]=this._h[1]>>>0,u[l+3]=this._h[1]>>>8,u[l+4]=this._h[2]>>>0,u[l+5]=this._h[2]>>>8,u[l+6]=this._h[3]>>>0,u[l+7]=this._h[3]>>>8,u[l+8]=this._h[4]>>>0,u[l+9]=this._h[4]>>>8,u[l+10]=this._h[5]>>>0,u[l+11]=this._h[5]>>>8,u[l+12]=this._h[6]>>>0,u[l+13]=this._h[6]>>>8,u[l+14]=this._h[7]>>>0,u[l+15]=this._h[7]>>>8,this._finished=!0,this},b.prototype.update=function(u){var l=0,_=u.length,D;if(this._leftover){D=16-this._leftover,D>_&&(D=_);for(var w=0;w<D;w++)this._buffer[this._leftover+w]=u[l+w];if(_-=D,l+=D,this._leftover+=D,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(_>=16&&(D=_-_%16,this._blocks(u,l,D),l+=D,_-=D),_){for(var w=0;w<_;w++)this._buffer[this._leftover+w]=u[l+w];this._leftover+=_}return this},b.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var u=new Uint8Array(16);return this.finish(u),u},b.prototype.clean=function(){return r.wipe(this._buffer),r.wipe(this._r),r.wipe(this._h),r.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},b}();e.Poly1305=i;function a(b,u){var l=new i(b);l.update(u);var _=l.digest();return l.clean(),_}e.oneTimeAuth=a;function s(b,u){return b.length!==e.DIGEST_LENGTH||u.length!==e.DIGEST_LENGTH?!1:t.equal(b,u)}e.equal=s})(Or);(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Qe,r=Or,i=pe,a=R,s=Oe;e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var b=new Uint8Array(16),u=function(){function l(_){if(this.nonceLength=e.NONCE_LENGTH,this.tagLength=e.TAG_LENGTH,_.length!==e.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(_)}return l.prototype.seal=function(_,D,w,y){if(_.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var v=new Uint8Array(16);v.set(_,v.length-_.length);var g=new Uint8Array(32);t.stream(this._key,v,g,4);var S=D.length+this.tagLength,p;if(y){if(y.length!==S)throw new Error("ChaCha20Poly1305: incorrect destination length");p=y}else p=new Uint8Array(S);return t.streamXOR(this._key,v,D,p,4),this._authenticate(p.subarray(p.length-this.tagLength,p.length),g,p.subarray(0,p.length-this.tagLength),w),i.wipe(v),p},l.prototype.open=function(_,D,w,y){if(_.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(D.length<this.tagLength)return null;var v=new Uint8Array(16);v.set(_,v.length-_.length);var g=new Uint8Array(32);t.stream(this._key,v,g,4);var S=new Uint8Array(this.tagLength);if(this._authenticate(S,g,D.subarray(0,D.length-this.tagLength),w),!s.equal(S,D.subarray(D.length-this.tagLength,D.length)))return null;var p=D.length-this.tagLength,A;if(y){if(y.length!==p)throw new Error("ChaCha20Poly1305: incorrect destination length");A=y}else A=new Uint8Array(p);return t.streamXOR(this._key,v,D.subarray(0,D.length-this.tagLength),A,4),i.wipe(v),A},l.prototype.clean=function(){return i.wipe(this._key),this},l.prototype._authenticate=function(_,D,w,y){var v=new r.Poly1305(D);y&&(v.update(y),y.length%16>0&&v.update(b.subarray(y.length%16))),v.update(w),w.length%16>0&&v.update(b.subarray(w.length%16));var g=new Uint8Array(8);y&&a.writeUint64LE(y.length,g),v.update(g),a.writeUint64LE(w.length,g),v.update(g);for(var S=v.digest(),p=0;p<S.length;p++)_[p]=S[p];v.clean(),i.wipe(S),i.wipe(g)},l}();e.ChaCha20Poly1305=u})(At);var Ur={},We={},Nt={};Object.defineProperty(Nt,"__esModule",{value:!0});function Cn(e){return typeof e.saveState<"u"&&typeof e.restoreState<"u"&&typeof e.cleanSavedState<"u"}Nt.isSerializableHash=Cn;Object.defineProperty(We,"__esModule",{value:!0});var me=Nt,Un=Oe,An=pe,Ar=function(){function e(t,r){this._finished=!1,this._inner=new t,this._outer=new t,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var i=new Uint8Array(this.blockSize);r.length>this.blockSize?this._inner.update(r).finish(i).clean():i.set(r);for(var a=0;a<i.length;a++)i[a]^=54;this._inner.update(i);for(var a=0;a<i.length;a++)i[a]^=106;this._outer.update(i),me.isSerializableHash(this._inner)&&me.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),An.wipe(i)}return e.prototype.reset=function(){if(!me.isSerializableHash(this._inner)||!me.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},e.prototype.clean=function(){me.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),me.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(t){return this._inner.update(t),this},e.prototype.finish=function(t){return this._finished?(this._outer.finish(t),this):(this._inner.finish(t),this._outer.update(t.subarray(0,this.digestLength)).finish(t),this._finished=!0,this)},e.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},e.prototype.saveState=function(){if(!me.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(t){if(!me.isSerializableHash(this._inner)||!me.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(t),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(t){if(!me.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(t)},e}();We.HMAC=Ar;function Nn(e,t,r){var i=new Ar(e,t);i.update(r);var a=i.digest();return i.clean(),a}We.hmac=Nn;We.equal=Un.equal;Object.defineProperty(Ur,"__esModule",{value:!0});var $t=We,Ht=pe,Tn=function(){function e(t,r,i,a){i===void 0&&(i=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=t,this._info=a;var s=$t.hmac(this._hash,i,r);this._hmac=new $t.HMAC(t,s),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var t=this._counter[0];if(t===0)throw new Error("hkdf: cannot expand more");this._hmac.reset(),t>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},e.prototype.expand=function(t){for(var r=new Uint8Array(t),i=0;i<r.length;i++)this._bufpos===this._buffer.length&&this._fillBuffer(),r[i]=this._buffer[this._bufpos++];return r},e.prototype.clean=function(){this._hmac.clean(),Ht.wipe(this._buffer),Ht.wipe(this._counter),this._bufpos=0},e}(),In=Ur.HKDF=Tn,Ze={},et={},tt={};Object.defineProperty(tt,"__esModule",{value:!0});tt.BrowserRandomSource=void 0;const Kt=65536;class Fn{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const t=typeof self<"u"?self.crypto||self.msCrypto:null;t&&t.getRandomValues!==void 0&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const r=new Uint8Array(t);for(let i=0;i<r.length;i+=Kt)this._crypto.getRandomValues(r.subarray(i,i+Math.min(r.length-i,Kt)));return r}}tt.BrowserRandomSource=Fn;var rt={};Object.defineProperty(rt,"__esModule",{value:!0});rt.NodeRandomSource=void 0;const Mn=pe;class Pn{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof Yr<"u"){const t=kr();t&&t.randomBytes&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let r=this._crypto.randomBytes(t);if(r.length!==t)throw new Error("NodeRandomSource: got fewer bytes than requested");const i=new Uint8Array(t);for(let a=0;a<i.length;a++)i[a]=r[a];return(0,Mn.wipe)(r),i}}rt.NodeRandomSource=Pn;Object.defineProperty(et,"__esModule",{value:!0});et.SystemRandomSource=void 0;const Rn=tt,jn=rt;class Ln{constructor(){if(this.isAvailable=!1,this.name="",this._source=new Rn.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new jn.NodeRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Node";return}}randomBytes(t){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(t)}}et.SystemRandomSource=Ln;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;const t=et,r=R,i=pe;e.defaultRandomSource=new t.SystemRandomSource;function a(_,D=e.defaultRandomSource){return D.randomBytes(_)}e.randomBytes=a;function s(_=e.defaultRandomSource){const D=a(4,_),w=(0,r.readUint32LE)(D);return(0,i.wipe)(D),w}e.randomUint32=s;const b="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function u(_,D=b,w=e.defaultRandomSource){if(D.length<2)throw new Error("randomString charset is too short");if(D.length>256)throw new Error("randomString charset is too long");let y="";const v=D.length,g=256-256%v;for(;_>0;){const S=a(Math.ceil(_*256/g),w);for(let p=0;p<S.length&&_>0;p++){const A=S[p];A<g&&(y+=D.charAt(A%v),_--)}(0,i.wipe)(S)}return y}e.randomString=u;function l(_,D=b,w=e.defaultRandomSource){const y=Math.ceil(_/(Math.log(D.length)/Math.LN2));return u(y,D,w)}e.randomStringForEntropy=l})(Ze);var nt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=R,r=pe;e.DIGEST_LENGTH=32,e.BLOCK_SIZE=64;var i=function(){function u(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.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 u.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},u.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},u.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._temp),this.reset()},u.prototype.update=function(l,_){if(_===void 0&&(_=l.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var D=0;if(this._bytesHashed+=_,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&_>0;)this._buffer[this._bufferLength++]=l[D++],_--;this._bufferLength===this.blockSize&&(s(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(_>=this.blockSize&&(D=s(this._temp,this._state,l,D,_),_%=this.blockSize);_>0;)this._buffer[this._bufferLength++]=l[D++],_--;return this},u.prototype.finish=function(l){if(!this._finished){var _=this._bytesHashed,D=this._bufferLength,w=_/536870912|0,y=_<<3,v=_%64<56?64:128;this._buffer[D]=128;for(var g=D+1;g<v-8;g++)this._buffer[g]=0;t.writeUint32BE(w,this._buffer,v-8),t.writeUint32BE(y,this._buffer,v-4),s(this._temp,this._state,this._buffer,0,v),this._finished=!0}for(var g=0;g<this.digestLength/4;g++)t.writeUint32BE(this._state[g],l,g*4);return this},u.prototype.digest=function(){var l=new Uint8Array(this.digestLength);return this.finish(l),l},u.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}},u.prototype.restoreState=function(l){return this._state.set(l.state),this._bufferLength=l.bufferLength,l.buffer&&this._buffer.set(l.buffer),this._bytesHashed=l.bytesHashed,this._finished=!1,this},u.prototype.cleanSavedState=function(l){r.wipe(l.state),l.buffer&&r.wipe(l.buffer),l.bufferLength=0,l.bytesHashed=0},u}();e.SHA256=i;var a=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 s(u,l,_,D,w){for(;w>=64;){for(var y=l[0],v=l[1],g=l[2],S=l[3],p=l[4],A=l[5],d=l[6],E=l[7],c=0;c<16;c++){var h=D+c*4;u[c]=t.readUint32BE(_,h)}for(var c=16;c<64;c++){var f=u[c-2],n=(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10;f=u[c-15];var o=(f>>>7|f<<25)^(f>>>18|f<<14)^f>>>3;u[c]=(n+u[c-7]|0)+(o+u[c-16]|0)}for(var c=0;c<64;c++){var n=(((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&A^~p&d)|0)+(E+(a[c]+u[c]|0)|0)|0,o=((y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10))+(y&v^y&g^v&g)|0;E=d,d=A,A=p,p=S+n|0,S=g,g=v,v=y,y=n+o|0}l[0]+=y,l[1]+=v,l[2]+=g,l[3]+=S,l[4]+=p,l[5]+=A,l[6]+=d,l[7]+=E,D+=64,w-=64}return D}function b(u){var l=new i;l.update(u);var _=l.digest();return l.clean(),_}e.hash=b})(nt);var Tt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;const t=Ze,r=pe;e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;function i(c){const h=new Float64Array(16);if(c)for(let f=0;f<c.length;f++)h[f]=c[f];return h}const a=new Uint8Array(32);a[0]=9;const s=i([56129,1]);function b(c){let h=1;for(let f=0;f<16;f++){let n=c[f]+h+65535;h=Math.floor(n/65536),c[f]=n-h*65536}c[0]+=h-1+37*(h-1)}function u(c,h,f){const n=~(f-1);for(let o=0;o<16;o++){const m=n&(c[o]^h[o]);c[o]^=m,h[o]^=m}}function l(c,h){const f=i(),n=i();for(let o=0;o<16;o++)n[o]=h[o];b(n),b(n),b(n);for(let o=0;o<2;o++){f[0]=n[0]-65517;for(let C=1;C<15;C++)f[C]=n[C]-65535-(f[C-1]>>16&1),f[C-1]&=65535;f[15]=n[15]-32767-(f[14]>>16&1);const m=f[15]>>16&1;f[14]&=65535,u(n,f,1-m)}for(let o=0;o<16;o++)c[2*o]=n[o]&255,c[2*o+1]=n[o]>>8}function _(c,h){for(let f=0;f<16;f++)c[f]=h[2*f]+(h[2*f+1]<<8);c[15]&=32767}function D(c,h,f){for(let n=0;n<16;n++)c[n]=h[n]+f[n]}function w(c,h,f){for(let n=0;n<16;n++)c[n]=h[n]-f[n]}function y(c,h,f){let n,o,m=0,C=0,N=0,M=0,j=0,P=0,I=0,F=0,O=0,T=0,Y=0,Q=0,J=0,X=0,U=0,L=0,B=0,x=0,$=0,H=0,K=0,W=0,G=0,z=0,k=0,Ce=0,Me=0,Be=0,Ye=0,ct=0,xt=0,ee=f[0],te=f[1],re=f[2],ne=f[3],ie=f[4],ae=f[5],oe=f[6],ue=f[7],se=f[8],ce=f[9],fe=f[10],he=f[11],le=f[12],de=f[13],De=f[14],be=f[15];n=h[0],m+=n*ee,C+=n*te,N+=n*re,M+=n*ne,j+=n*ie,P+=n*ae,I+=n*oe,F+=n*ue,O+=n*se,T+=n*ce,Y+=n*fe,Q+=n*he,J+=n*le,X+=n*de,U+=n*De,L+=n*be,n=h[1],C+=n*ee,N+=n*te,M+=n*re,j+=n*ne,P+=n*ie,I+=n*ae,F+=n*oe,O+=n*ue,T+=n*se,Y+=n*ce,Q+=n*fe,J+=n*he,X+=n*le,U+=n*de,L+=n*De,B+=n*be,n=h[2],N+=n*ee,M+=n*te,j+=n*re,P+=n*ne,I+=n*ie,F+=n*ae,O+=n*oe,T+=n*ue,Y+=n*se,Q+=n*ce,J+=n*fe,X+=n*he,U+=n*le,L+=n*de,B+=n*De,x+=n*be,n=h[3],M+=n*ee,j+=n*te,P+=n*re,I+=n*ne,F+=n*ie,O+=n*ae,T+=n*oe,Y+=n*ue,Q+=n*se,J+=n*ce,X+=n*fe,U+=n*he,L+=n*le,B+=n*de,x+=n*De,$+=n*be,n=h[4],j+=n*ee,P+=n*te,I+=n*re,F+=n*ne,O+=n*ie,T+=n*ae,Y+=n*oe,Q+=n*ue,J+=n*se,X+=n*ce,U+=n*fe,L+=n*he,B+=n*le,x+=n*de,$+=n*De,H+=n*be,n=h[5],P+=n*ee,I+=n*te,F+=n*re,O+=n*ne,T+=n*ie,Y+=n*ae,Q+=n*oe,J+=n*ue,X+=n*se,U+=n*ce,L+=n*fe,B+=n*he,x+=n*le,$+=n*de,H+=n*De,K+=n*be,n=h[6],I+=n*ee,F+=n*te,O+=n*re,T+=n*ne,Y+=n*ie,Q+=n*ae,J+=n*oe,X+=n*ue,U+=n*se,L+=n*ce,B+=n*fe,x+=n*he,$+=n*le,H+=n*de,K+=n*De,W+=n*be,n=h[7],F+=n*ee,O+=n*te,T+=n*re,Y+=n*ne,Q+=n*ie,J+=n*ae,X+=n*oe,U+=n*ue,L+=n*se,B+=n*ce,x+=n*fe,$+=n*he,H+=n*le,K+=n*de,W+=n*De,G+=n*be,n=h[8],O+=n*ee,T+=n*te,Y+=n*re,Q+=n*ne,J+=n*ie,X+=n*ae,U+=n*oe,L+=n*ue,B+=n*se,x+=n*ce,$+=n*fe,H+=n*he,K+=n*le,W+=n*de,G+=n*De,z+=n*be,n=h[9],T+=n*ee,Y+=n*te,Q+=n*re,J+=n*ne,X+=n*ie,U+=n*ae,L+=n*oe,B+=n*ue,x+=n*se,$+=n*ce,H+=n*fe,K+=n*he,W+=n*le,G+=n*de,z+=n*De,k+=n*be,n=h[10],Y+=n*ee,Q+=n*te,J+=n*re,X+=n*ne,U+=n*ie,L+=n*ae,B+=n*oe,x+=n*ue,$+=n*se,H+=n*ce,K+=n*fe,W+=n*he,G+=n*le,z+=n*de,k+=n*De,Ce+=n*be,n=h[11],Q+=n*ee,J+=n*te,X+=n*re,U+=n*ne,L+=n*ie,B+=n*ae,x+=n*oe,$+=n*ue,H+=n*se,K+=n*ce,W+=n*fe,G+=n*he,z+=n*le,k+=n*de,Ce+=n*De,Me+=n*be,n=h[12],J+=n*ee,X+=n*te,U+=n*re,L+=n*ne,B+=n*ie,x+=n*ae,$+=n*oe,H+=n*ue,K+=n*se,W+=n*ce,G+=n*fe,z+=n*he,k+=n*le,Ce+=n*de,Me+=n*De,Be+=n*be,n=h[13],X+=n*ee,U+=n*te,L+=n*re,B+=n*ne,x+=n*ie,$+=n*ae,H+=n*oe,K+=n*ue,W+=n*se,G+=n*ce,z+=n*fe,k+=n*he,Ce+=n*le,Me+=n*de,Be+=n*De,Ye+=n*be,n=h[14],U+=n*ee,L+=n*te,B+=n*re,x+=n*ne,$+=n*ie,H+=n*ae,K+=n*oe,W+=n*ue,G+=n*se,z+=n*ce,k+=n*fe,Ce+=n*he,Me+=n*le,Be+=n*de,Ye+=n*De,ct+=n*be,n=h[15],L+=n*ee,B+=n*te,x+=n*re,$+=n*ne,H+=n*ie,K+=n*ae,W+=n*oe,G+=n*ue,z+=n*se,k+=n*ce,Ce+=n*fe,Me+=n*he,Be+=n*le,Ye+=n*de,ct+=n*De,xt+=n*be,m+=38*B,C+=38*x,N+=38*$,M+=38*H,j+=38*K,P+=38*W,I+=38*G,F+=38*z,O+=38*k,T+=38*Ce,Y+=38*Me,Q+=38*Be,J+=38*Ye,X+=38*ct,U+=38*xt,o=1,n=m+o+65535,o=Math.floor(n/65536),m=n-o*65536,n=C+o+65535,o=Math.floor(n/65536),C=n-o*65536,n=N+o+65535,o=Math.floor(n/65536),N=n-o*65536,n=M+o+65535,o=Math.floor(n/65536),M=n-o*65536,n=j+o+65535,o=Math.floor(n/65536),j=n-o*65536,n=P+o+65535,o=Math.floor(n/65536),P=n-o*65536,n=I+o+65535,o=Math.floor(n/65536),I=n-o*65536,n=F+o+65535,o=Math.floor(n/65536),F=n-o*65536,n=O+o+65535,o=Math.floor(n/65536),O=n-o*65536,n=T+o+65535,o=Math.floor(n/65536),T=n-o*65536,n=Y+o+65535,o=Math.floor(n/65536),Y=n-o*65536,n=Q+o+65535,o=Math.floor(n/65536),Q=n-o*65536,n=J+o+65535,o=Math.floor(n/65536),J=n-o*65536,n=X+o+65535,o=Math.floor(n/65536),X=n-o*65536,n=U+o+65535,o=Math.floor(n/65536),U=n-o*65536,n=L+o+65535,o=Math.floor(n/65536),L=n-o*65536,m+=o-1+37*(o-1),o=1,n=m+o+65535,o=Math.floor(n/65536),m=n-o*65536,n=C+o+65535,o=Math.floor(n/65536),C=n-o*65536,n=N+o+65535,o=Math.floor(n/65536),N=n-o*65536,n=M+o+65535,o=Math.floor(n/65536),M=n-o*65536,n=j+o+65535,o=Math.floor(n/65536),j=n-o*65536,n=P+o+65535,o=Math.floor(n/65536),P=n-o*65536,n=I+o+65535,o=Math.floor(n/65536),I=n-o*65536,n=F+o+65535,o=Math.floor(n/65536),F=n-o*65536,n=O+o+65535,o=Math.floor(n/65536),O=n-o*65536,n=T+o+65535,o=Math.floor(n/65536),T=n-o*65536,n=Y+o+65535,o=Math.floor(n/65536),Y=n-o*65536,n=Q+o+65535,o=Math.floor(n/65536),Q=n-o*65536,n=J+o+65535,o=Math.floor(n/65536),J=n-o*65536,n=X+o+65535,o=Math.floor(n/65536),X=n-o*65536,n=U+o+65535,o=Math.floor(n/65536),U=n-o*65536,n=L+o+65535,o=Math.floor(n/65536),L=n-o*65536,m+=o-1+37*(o-1),c[0]=m,c[1]=C,c[2]=N,c[3]=M,c[4]=j,c[5]=P,c[6]=I,c[7]=F,c[8]=O,c[9]=T,c[10]=Y,c[11]=Q,c[12]=J,c[13]=X,c[14]=U,c[15]=L}function v(c,h){y(c,h,h)}function g(c,h){const f=i();for(let n=0;n<16;n++)f[n]=h[n];for(let n=253;n>=0;n--)v(f,f),n!==2&&n!==4&&y(f,f,h);for(let n=0;n<16;n++)c[n]=f[n]}function S(c,h){const f=new Uint8Array(32),n=new Float64Array(80),o=i(),m=i(),C=i(),N=i(),M=i(),j=i();for(let O=0;O<31;O++)f[O]=c[O];f[31]=c[31]&127|64,f[0]&=248,_(n,h);for(let O=0;O<16;O++)m[O]=n[O];o[0]=N[0]=1;for(let O=254;O>=0;--O){const T=f[O>>>3]>>>(O&7)&1;u(o,m,T),u(C,N,T),D(M,o,C),w(o,o,C),D(C,m,N),w(m,m,N),v(N,M),v(j,o),y(o,C,o),y(C,m,M),D(M,o,C),w(o,o,C),v(m,o),w(C,N,j),y(o,C,s),D(o,o,N),y(C,C,o),y(o,N,j),y(N,m,n),v(m,M),u(o,m,T),u(C,N,T)}for(let O=0;O<16;O++)n[O+16]=o[O],n[O+32]=C[O],n[O+48]=m[O],n[O+64]=N[O];const P=n.subarray(32),I=n.subarray(16);g(P,P),y(I,I,P);const F=new Uint8Array(32);return l(F,I),F}e.scalarMult=S;function p(c){return S(c,a)}e.scalarMultBase=p;function A(c){if(c.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);const h=new Uint8Array(c);return{publicKey:p(h),secretKey:h}}e.generateKeyPairFromSeed=A;function d(c){const h=(0,t.randomBytes)(32,c),f=A(h);return(0,r.wipe)(h),f}e.generateKeyPair=d;function E(c,h,f=!1){if(c.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(h.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const n=S(c,h);if(f){let o=0;for(let m=0;m<n.length;m++)o|=n[m];if(o===0)throw new Error("X25519: invalid shared key")}return n}e.sharedKey=E})(Tt);function It(e){return globalThis.Buffer!=null?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function Nr(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?It(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function Wt(e,t){t||(t=e.reduce((a,s)=>a+s.length,0));const r=Nr(t);let i=0;for(const a of e)r.set(a,i),i+=a.length;return It(r)}function Bn(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),i=0;i<r.length;i++)r[i]=255;for(var a=0;a<e.length;a++){var s=e.charAt(a),b=s.charCodeAt(0);if(r[b]!==255)throw new TypeError(s+" is ambiguous");r[b]=a}var u=e.length,l=e.charAt(0),_=Math.log(u)/Math.log(256),D=Math.log(256)/Math.log(u);function w(g){if(g instanceof Uint8Array||(ArrayBuffer.isView(g)?g=new Uint8Array(g.buffer,g.byteOffset,g.byteLength):Array.isArray(g)&&(g=Uint8Array.from(g))),!(g instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(g.length===0)return"";for(var S=0,p=0,A=0,d=g.length;A!==d&&g[A]===0;)A++,S++;for(var E=(d-A)*D+1>>>0,c=new Uint8Array(E);A!==d;){for(var h=g[A],f=0,n=E-1;(h!==0||f<p)&&n!==-1;n--,f++)h+=256*c[n]>>>0,c[n]=h%u>>>0,h=h/u>>>0;if(h!==0)throw new Error("Non-zero carry");p=f,A++}for(var o=E-p;o!==E&&c[o]===0;)o++;for(var m=l.repeat(S);o<E;++o)m+=e.charAt(c[o]);return m}function y(g){if(typeof g!="string")throw new TypeError("Expected String");if(g.length===0)return new Uint8Array;var S=0;if(g[S]!==" "){for(var p=0,A=0;g[S]===l;)p++,S++;for(var d=(g.length-S)*_+1>>>0,E=new Uint8Array(d);g[S];){var c=r[g.charCodeAt(S)];if(c===255)return;for(var h=0,f=d-1;(c!==0||h<A)&&f!==-1;f--,h++)c+=u*E[f]>>>0,E[f]=c%256>>>0,c=c/256>>>0;if(c!==0)throw new Error("Non-zero carry");A=h,S++}if(g[S]!==" "){for(var n=d-A;n!==d&&E[n]===0;)n++;for(var o=new Uint8Array(p+(d-n)),m=p;n!==d;)o[m++]=E[n++];return o}}}function v(g){var S=y(g);if(S)return S;throw new Error(`Non-${t} character`)}return{encode:w,decodeUnsafe:y,decode:v}}var xn=Bn,$n=xn;const Hn=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},Kn=e=>new TextEncoder().encode(e),Wn=e=>new TextDecoder().decode(e);class Vn{constructor(t,r,i){this.name=t,this.prefix=r,this.baseEncode=i}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class Gn{constructor(t,r,i){if(this.name=t,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=i}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return Tr(this,t)}}class qn{constructor(t){this.decoders=t}or(t){return Tr(this,t)}decode(t){const r=t[0],i=this.decoders[r];if(i)return i.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Tr=(e,t)=>new qn({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class zn{constructor(t,r,i,a){this.name=t,this.prefix=r,this.baseEncode=i,this.baseDecode=a,this.encoder=new Vn(t,r,i),this.decoder=new Gn(t,r,a)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const it=({name:e,prefix:t,encode:r,decode:i})=>new zn(e,t,r,i),Ve=({prefix:e,name:t,alphabet:r})=>{const{encode:i,decode:a}=$n(r,t);return it({prefix:e,name:t,encode:i,decode:s=>Hn(a(s))})},Yn=(e,t,r,i)=>{const a={};for(let D=0;D<t.length;++D)a[t[D]]=D;let s=e.length;for(;e[s-1]==="=";)--s;const b=new Uint8Array(s*r/8|0);let u=0,l=0,_=0;for(let D=0;D<s;++D){const w=a[e[D]];if(w===void 0)throw new SyntaxError(`Non-${i} character`);l=l<<r|w,u+=r,u>=8&&(u-=8,b[_++]=255&l>>u)}if(u>=r||255&l<<8-u)throw new SyntaxError("Unexpected end of data");return b},kn=(e,t,r)=>{const i=t[t.length-1]==="=",a=(1<<r)-1;let s="",b=0,u=0;for(let l=0;l<e.length;++l)for(u=u<<8|e[l],b+=8;b>r;)b-=r,s+=t[a&u>>b];if(b&&(s+=t[a&u<<r-b]),i)for(;s.length*r&7;)s+="=";return s},Z=({name:e,prefix:t,bitsPerChar:r,alphabet:i})=>it({prefix:t,name:e,encode(a){return kn(a,i,r)},decode(a){return Yn(a,i,r,e)}}),Xn=it({prefix:"\0",name:"identity",encode:e=>Wn(e),decode:e=>Kn(e)}),Jn=Object.freeze(Object.defineProperty({__proto__:null,identity:Xn},Symbol.toStringTag,{value:"Module"})),Qn=Z({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),Zn=Object.freeze(Object.defineProperty({__proto__:null,base2:Qn},Symbol.toStringTag,{value:"Module"})),ei=Z({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),ti=Object.freeze(Object.defineProperty({__proto__:null,base8:ei},Symbol.toStringTag,{value:"Module"})),ri=Ve({prefix:"9",name:"base10",alphabet:"0123456789"}),ni=Object.freeze(Object.defineProperty({__proto__:null,base10:ri},Symbol.toStringTag,{value:"Module"})),ii=Z({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),ai=Z({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),oi=Object.freeze(Object.defineProperty({__proto__:null,base16:ii,base16upper:ai},Symbol.toStringTag,{value:"Module"})),ui=Z({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),si=Z({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),ci=Z({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),fi=Z({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),hi=Z({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),li=Z({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),di=Z({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Di=Z({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),bi=Z({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),_i=Object.freeze(Object.defineProperty({__proto__:null,base32:ui,base32hex:hi,base32hexpad:di,base32hexpadupper:Di,base32hexupper:li,base32pad:ci,base32padupper:fi,base32upper:si,base32z:bi},Symbol.toStringTag,{value:"Module"})),Ei=Ve({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),wi=Ve({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),vi=Object.freeze(Object.defineProperty({__proto__:null,base36:Ei,base36upper:wi},Symbol.toStringTag,{value:"Module"})),yi=Ve({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),gi=Ve({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),pi=Object.freeze(Object.defineProperty({__proto__:null,base58btc:yi,base58flickr:gi},Symbol.toStringTag,{value:"Module"})),mi=Z({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Si=Z({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Oi=Z({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Ci=Z({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),Ui=Object.freeze(Object.defineProperty({__proto__:null,base64:mi,base64pad:Si,base64url:Oi,base64urlpad:Ci},Symbol.toStringTag,{value:"Module"})),Ir=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Ai=Ir.reduce((e,t,r)=>(e[r]=t,e),[]),Ni=Ir.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);function Ti(e){return e.reduce((t,r)=>(t+=Ai[r],t),"")}function Ii(e){const t=[];for(const r of e){const i=Ni[r.codePointAt(0)];if(i===void 0)throw new Error(`Non-base256emoji character: ${r}`);t.push(i)}return new Uint8Array(t)}const Fi=it({prefix:"🚀",name:"base256emoji",encode:Ti,decode:Ii}),Mi=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:Fi},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const Vt={...Jn,...Zn,...ti,...ni,...oi,..._i,...vi,...pi,...Ui,...Mi};function Fr(e,t,r,i){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:i}}}const Gt=Fr("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),ft=Fr("ascii","a",e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},e=>{e=e.substring(1);const t=Nr(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}),Mr={utf8:Gt,"utf-8":Gt,hex:Vt.base16,latin1:ft,ascii:ft,binary:ft,...Vt};function ye(e,t="utf8"){const r=Mr[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?It(globalThis.Buffer.from(e,"utf-8")):r.decoder.decode(`${r.prefix}${e}`)}function ge(e,t="utf8"){const r=Mr[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8"):r.encoder.encode(e).substring(1)}var qt=function(e,t,r){if(r||arguments.length===2)for(var i=0,a=t.length,s;i<a;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return e.concat(s||Array.prototype.slice.call(t))},Pi=function(){function e(t,r,i){this.name=t,this.version=r,this.os=i,this.type="browser"}return e}(),Ri=function(){function e(t){this.version=t,this.type="node",this.name="node",this.os=V.process.platform}return e}(),ji=function(){function e(t,r,i,a){this.name=t,this.version=r,this.os=i,this.bot=a,this.type="bot-device"}return e}(),Li=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),Bi=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),xi=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,$i=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,zt=3,Hi=[["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",xi]],Yt=[["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 Ki(e){return e?kt(e):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new Bi:typeof navigator<"u"?kt(navigator.userAgent):Gi()}function Wi(e){return e!==""&&Hi.reduce(function(t,r){var i=r[0],a=r[1];if(t)return t;var s=a.exec(e);return!!s&&[i,s]},!1)}function kt(e){var t=Wi(e);if(!t)return null;var r=t[0],i=t[1];if(r==="searchbot")return new Li;var a=i[1]&&i[1].split(".").join("_").split("_").slice(0,3);a?a.length<zt&&(a=qt(qt([],a,!0),qi(zt-a.length),!0)):a=[];var s=a.join("."),b=Vi(e),u=$i.exec(e);return u&&u[1]?new ji(r,s,b,u[1]):new Pi(r,s,b)}function Vi(e){for(var t=0,r=Yt.length;t<r;t++){var i=Yt[t],a=i[0],s=i[1],b=s.exec(e);if(b)return a}return null}function Gi(){var e=typeof V.process<"u"&&V.process.version;return e?new Ri(V.process.version.slice(1)):null}function qi(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}var Te={};/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */var pt=function(e,t){return pt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},pt(e,t)};function zi(e,t){pt(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var mt=function(){return mt=Object.assign||function(t){for(var r,i=1,a=arguments.length;i<a;i++){r=arguments[i];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},mt.apply(this,arguments)};function Yi(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(r[i[a]]=e[i[a]]);return r}function ki(e,t,r,i){var a=arguments.length,s=a<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,i);else for(var u=e.length-1;u>=0;u--)(b=e[u])&&(s=(a<3?b(s):a>3?b(t,r,s):b(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}function Xi(e,t){return function(r,i){t(r,i,e)}}function Ji(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Qi(e,t,r,i){function a(s){return s instanceof r?s:new r(function(b){b(s)})}return new(r||(r=Promise))(function(s,b){function u(D){try{_(i.next(D))}catch(w){b(w)}}function l(D){try{_(i.throw(D))}catch(w){b(w)}}function _(D){D.done?s(D.value):a(D.value).then(u,l)}_((i=i.apply(e,t||[])).next())})}function Zi(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,b;return b={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(b[Symbol.iterator]=function(){return this}),b;function u(_){return function(D){return l([_,D])}}function l(_){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,a&&(s=_[0]&2?a.return:_[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,_[1])).done)return s;switch(a=0,s&&(_=[_[0]&2,s.value]),_[0]){case 0:case 1:s=_;break;case 4:return r.label++,{value:_[1],done:!1};case 5:r.label++,a=_[1],_=[0];continue;case 7:_=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(_[0]===6||_[0]===2)){r=0;continue}if(_[0]===3&&(!s||_[1]>s[0]&&_[1]<s[3])){r.label=_[1];break}if(_[0]===6&&r.label<s[1]){r.label=s[1],s=_;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(_);break}s[2]&&r.ops.pop(),r.trys.pop();continue}_=t.call(e,r)}catch(D){_=[6,D],a=0}finally{i=s=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}}function ea(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]}function ta(e,t){for(var r in e)r!=="default"&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function St(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Pr(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var i=r.call(e),a,s=[],b;try{for(;(t===void 0||t-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(u){b={error:u}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(b)throw b.error}}return s}function ra(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Pr(arguments[t]));return e}function na(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var i=Array(e),a=0,t=0;t<r;t++)for(var s=arguments[t],b=0,u=s.length;b<u;b++,a++)i[a]=s[b];return i}function He(e){return this instanceof He?(this.v=e,this):new He(e)}function ia(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=r.apply(e,t||[]),a,s=[];return a={},b("next"),b("throw"),b("return"),a[Symbol.asyncIterator]=function(){return this},a;function b(y){i[y]&&(a[y]=function(v){return new Promise(function(g,S){s.push([y,v,g,S])>1||u(y,v)})})}function u(y,v){try{l(i[y](v))}catch(g){w(s[0][3],g)}}function l(y){y.value instanceof He?Promise.resolve(y.value.v).then(_,D):w(s[0][2],y)}function _(y){u("next",y)}function D(y){u("throw",y)}function w(y,v){y(v),s.shift(),s.length&&u(s[0][0],s[0][1])}}function aa(e){var t,r;return t={},i("next"),i("throw",function(a){throw a}),i("return"),t[Symbol.iterator]=function(){return this},t;function i(a,s){t[a]=e[a]?function(b){return(r=!r)?{value:He(e[a](b)),done:a==="return"}:s?s(b):b}:s}}function oa(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof St=="function"?St(e):e[Symbol.iterator](),r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r);function i(s){r[s]=e[s]&&function(b){return new Promise(function(u,l){b=e[s](b),a(u,l,b.done,b.value)})}}function a(s,b,u,l){Promise.resolve(l).then(function(_){s({value:_,done:u})},b)}}function ua(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function sa(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function ca(e){return e&&e.__esModule?e:{default:e}}function fa(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function ha(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}const la=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return mt},__asyncDelegator:aa,__asyncGenerator:ia,__asyncValues:oa,__await:He,__awaiter:Qi,__classPrivateFieldGet:fa,__classPrivateFieldSet:ha,__createBinding:ea,__decorate:ki,__exportStar:ta,__extends:zi,__generator:Zi,__importDefault:ca,__importStar:sa,__makeTemplateObject:ua,__metadata:Ji,__param:Xi,__read:Pr,__rest:Yi,__spread:ra,__spreadArrays:na,__values:St},Symbol.toStringTag,{value:"Module"})),at=Xr(la);var ht={},xe={},Xt;function da(){if(Xt)return xe;Xt=1,Object.defineProperty(xe,"__esModule",{value:!0}),xe.delay=void 0;function e(t){return new Promise(r=>{setTimeout(()=>{r(!0)},t)})}return xe.delay=e,xe}var Ue={},lt={},Ae={},Jt;function Da(){return Jt||(Jt=1,Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.ONE_THOUSAND=Ae.ONE_HUNDRED=void 0,Ae.ONE_HUNDRED=100,Ae.ONE_THOUSAND=1e3),Ae}var dt={},Qt;function ba(){return Qt||(Qt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_YEAR=e.FOUR_WEEKS=e.THREE_WEEKS=e.TWO_WEEKS=e.ONE_WEEK=e.THIRTY_DAYS=e.SEVEN_DAYS=e.FIVE_DAYS=e.THREE_DAYS=e.ONE_DAY=e.TWENTY_FOUR_HOURS=e.TWELVE_HOURS=e.SIX_HOURS=e.THREE_HOURS=e.ONE_HOUR=e.SIXTY_MINUTES=e.THIRTY_MINUTES=e.TEN_MINUTES=e.FIVE_MINUTES=e.ONE_MINUTE=e.SIXTY_SECONDS=e.THIRTY_SECONDS=e.TEN_SECONDS=e.FIVE_SECONDS=e.ONE_SECOND=void 0,e.ONE_SECOND=1,e.FIVE_SECONDS=5,e.TEN_SECONDS=10,e.THIRTY_SECONDS=30,e.SIXTY_SECONDS=60,e.ONE_MINUTE=e.SIXTY_SECONDS,e.FIVE_MINUTES=e.ONE_MINUTE*5,e.TEN_MINUTES=e.ONE_MINUTE*10,e.THIRTY_MINUTES=e.ONE_MINUTE*30,e.SIXTY_MINUTES=e.ONE_MINUTE*60,e.ONE_HOUR=e.SIXTY_MINUTES,e.THREE_HOURS=e.ONE_HOUR*3,e.SIX_HOURS=e.ONE_HOUR*6,e.TWELVE_HOURS=e.ONE_HOUR*12,e.TWENTY_FOUR_HOURS=e.ONE_HOUR*24,e.ONE_DAY=e.TWENTY_FOUR_HOURS,e.THREE_DAYS=e.ONE_DAY*3,e.FIVE_DAYS=e.ONE_DAY*5,e.SEVEN_DAYS=e.ONE_DAY*7,e.THIRTY_DAYS=e.ONE_DAY*30,e.ONE_WEEK=e.SEVEN_DAYS,e.TWO_WEEKS=e.ONE_WEEK*2,e.THREE_WEEKS=e.ONE_WEEK*3,e.FOUR_WEEKS=e.ONE_WEEK*4,e.ONE_YEAR=e.ONE_DAY*365}(dt)),dt}var Zt;function Rr(){return Zt||(Zt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=at;t.__exportStar(Da(),e),t.__exportStar(ba(),e)}(lt)),lt}var er;function _a(){if(er)return Ue;er=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.fromMiliseconds=Ue.toMiliseconds=void 0;const e=Rr();function t(i){return i*e.ONE_THOUSAND}Ue.toMiliseconds=t;function r(i){return Math.floor(i/e.ONE_THOUSAND)}return Ue.fromMiliseconds=r,Ue}var tr;function Ea(){return tr||(tr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=at;t.__exportStar(da(),e),t.__exportStar(_a(),e)}(ht)),ht}var Pe={},rr;function wa(){if(rr)return Pe;rr=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.Watch=void 0;class e{constructor(){this.timestamps=new Map}start(r){if(this.timestamps.has(r))throw new Error(`Watch already started for label: ${r}`);this.timestamps.set(r,{started:Date.now()})}stop(r){const i=this.get(r);if(typeof i.elapsed<"u")throw new Error(`Watch already stopped for label: ${r}`);const a=Date.now()-i.started;this.timestamps.set(r,{started:i.started,elapsed:a})}get(r){const i=this.timestamps.get(r);if(typeof i>"u")throw new Error(`No timestamp found for label: ${r}`);return i}elapsed(r){const i=this.get(r);return i.elapsed||Date.now()-i.started}}return Pe.Watch=e,Pe.default=e,Pe}var Dt={},$e={},nr;function va(){if(nr)return $e;nr=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.IWatch=void 0;class e{}return $e.IWatch=e,$e}var ir;function ya(){return ir||(ir=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),at.__exportStar(va(),e)}(Dt)),Dt}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=at;t.__exportStar(Ea(),e),t.__exportStar(wa(),e),t.__exportStar(ya(),e),t.__exportStar(Rr(),e)})(Te);var q={};Object.defineProperty(q,"__esModule",{value:!0});q.getLocalStorage=q.getLocalStorageOrThrow=q.getCrypto=q.getCryptoOrThrow=jr=q.getLocation=q.getLocationOrThrow=Mt=q.getNavigator=q.getNavigatorOrThrow=Ft=q.getDocument=q.getDocumentOrThrow=q.getFromWindowOrThrow=q.getFromWindow=void 0;function Fe(e){let t;return typeof window<"u"&&typeof window[e]<"u"&&(t=window[e]),t}q.getFromWindow=Fe;function je(e){const t=Fe(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}q.getFromWindowOrThrow=je;function ga(){return je("document")}q.getDocumentOrThrow=ga;function pa(){return Fe("document")}var Ft=q.getDocument=pa;function ma(){return je("navigator")}q.getNavigatorOrThrow=ma;function Sa(){return Fe("navigator")}var Mt=q.getNavigator=Sa;function Oa(){return je("location")}q.getLocationOrThrow=Oa;function Ca(){return Fe("location")}var jr=q.getLocation=Ca;function Ua(){return je("crypto")}q.getCryptoOrThrow=Ua;function Aa(){return Fe("crypto")}q.getCrypto=Aa;function Na(){return je("localStorage")}q.getLocalStorageOrThrow=Na;function Ta(){return Fe("localStorage")}q.getLocalStorage=Ta;var Pt={};Object.defineProperty(Pt,"__esModule",{value:!0});var Lr=Pt.getWindowMetadata=void 0;const ar=q;function Ia(){let e,t;try{e=ar.getDocumentOrThrow(),t=ar.getLocationOrThrow()}catch{return null}function r(){const w=e.getElementsByTagName("link"),y=[];for(let v=0;v<w.length;v++){const g=w[v],S=g.getAttribute("rel");if(S&&S.toLowerCase().indexOf("icon")>-1){const p=g.getAttribute("href");if(p)if(p.toLowerCase().indexOf("https:")===-1&&p.toLowerCase().indexOf("http:")===-1&&p.indexOf("//")!==0){let A=t.protocol+"//"+t.host;if(p.indexOf("/")===0)A+=p;else{const d=t.pathname.split("/");d.pop();const E=d.join("/");A+=E+"/"+p}y.push(A)}else if(p.indexOf("//")===0){const A=t.protocol+p;y.push(A)}else y.push(p)}}return y}function i(...w){const y=e.getElementsByTagName("meta");for(let v=0;v<y.length;v++){const g=y[v],S=["itemprop","property","name"].map(p=>g.getAttribute(p)).filter(p=>p?w.includes(p):!1);if(S.length&&S){const p=g.getAttribute("content");if(p)return p}}return""}function a(){let w=i("name","og:site_name","og:title","twitter:title");return w||(w=e.title),w}function s(){return i("description","og:description","twitter:description","keywords")}const b=a(),u=s(),l=t.origin,_=r();return{description:u,url:l,icons:_,name:b}}Lr=Pt.getWindowMetadata=Ia;var Ke={},Fa=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Br="%[a-f0-9]{2}",or=new RegExp("("+Br+")|([^%]+?)","gi"),ur=new RegExp("("+Br+")+","gi");function Ot(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),i=e.slice(t);return Array.prototype.concat.call([],Ot(r),Ot(i))}function Ma(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(or)||[],r=1;r<t.length;r++)e=Ot(t,r).join(""),t=e.match(or)||[];return e}}function Pa(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=ur.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var i=Ma(r[0]);i!==r[0]&&(t[r[0]]=i)}r=ur.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),s=0;s<a.length;s++){var b=a[s];e=e.replace(new RegExp(b,"g"),t[b])}return e}var Ra=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return Pa(e)}},ja=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},La=function(e,t){for(var r={},i=Object.keys(e),a=Array.isArray(t),s=0;s<i.length;s++){var b=i[s],u=e[b];(a?t.indexOf(b)!==-1:t(b,u,e))&&(r[b]=u)}return r};(function(e){const t=Fa,r=Ra,i=ja,a=La,s=d=>d==null,b=Symbol("encodeFragmentIdentifier");function u(d){switch(d.arrayFormat){case"index":return E=>(c,h)=>{const f=c.length;return h===void 0||d.skipNull&&h===null||d.skipEmptyString&&h===""?c:h===null?[...c,[D(E,d),"[",f,"]"].join("")]:[...c,[D(E,d),"[",D(f,d),"]=",D(h,d)].join("")]};case"bracket":return E=>(c,h)=>h===void 0||d.skipNull&&h===null||d.skipEmptyString&&h===""?c:h===null?[...c,[D(E,d),"[]"].join("")]:[...c,[D(E,d),"[]=",D(h,d)].join("")];case"colon-list-separator":return E=>(c,h)=>h===void 0||d.skipNull&&h===null||d.skipEmptyString&&h===""?c:h===null?[...c,[D(E,d),":list="].join("")]:[...c,[D(E,d),":list=",D(h,d)].join("")];case"comma":case"separator":case"bracket-separator":{const E=d.arrayFormat==="bracket-separator"?"[]=":"=";return c=>(h,f)=>f===void 0||d.skipNull&&f===null||d.skipEmptyString&&f===""?h:(f=f===null?"":f,h.length===0?[[D(c,d),E,D(f,d)].join("")]:[[h,D(f,d)].join(d.arrayFormatSeparator)])}default:return E=>(c,h)=>h===void 0||d.skipNull&&h===null||d.skipEmptyString&&h===""?c:h===null?[...c,D(E,d)]:[...c,[D(E,d),"=",D(h,d)].join("")]}}function l(d){let E;switch(d.arrayFormat){case"index":return(c,h,f)=>{if(E=/\[(\d*)\]$/.exec(c),c=c.replace(/\[\d*\]$/,""),!E){f[c]=h;return}f[c]===void 0&&(f[c]={}),f[c][E[1]]=h};case"bracket":return(c,h,f)=>{if(E=/(\[\])$/.exec(c),c=c.replace(/\[\]$/,""),!E){f[c]=h;return}if(f[c]===void 0){f[c]=[h];return}f[c]=[].concat(f[c],h)};case"colon-list-separator":return(c,h,f)=>{if(E=/(:list)$/.exec(c),c=c.replace(/:list$/,""),!E){f[c]=h;return}if(f[c]===void 0){f[c]=[h];return}f[c]=[].concat(f[c],h)};case"comma":case"separator":return(c,h,f)=>{const n=typeof h=="string"&&h.includes(d.arrayFormatSeparator),o=typeof h=="string"&&!n&&w(h,d).includes(d.arrayFormatSeparator);h=o?w(h,d):h;const m=n||o?h.split(d.arrayFormatSeparator).map(C=>w(C,d)):h===null?h:w(h,d);f[c]=m};case"bracket-separator":return(c,h,f)=>{const n=/(\[\])$/.test(c);if(c=c.replace(/\[\]$/,""),!n){f[c]=h&&w(h,d);return}const o=h===null?[]:h.split(d.arrayFormatSeparator).map(m=>w(m,d));if(f[c]===void 0){f[c]=o;return}f[c]=[].concat(f[c],o)};default:return(c,h,f)=>{if(f[c]===void 0){f[c]=h;return}f[c]=[].concat(f[c],h)}}}function _(d){if(typeof d!="string"||d.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function D(d,E){return E.encode?E.strict?t(d):encodeURIComponent(d):d}function w(d,E){return E.decode?r(d):d}function y(d){return Array.isArray(d)?d.sort():typeof d=="object"?y(Object.keys(d)).sort((E,c)=>Number(E)-Number(c)).map(E=>d[E]):d}function v(d){const E=d.indexOf("#");return E!==-1&&(d=d.slice(0,E)),d}function g(d){let E="";const c=d.indexOf("#");return c!==-1&&(E=d.slice(c)),E}function S(d){d=v(d);const E=d.indexOf("?");return E===-1?"":d.slice(E+1)}function p(d,E){return E.parseNumbers&&!Number.isNaN(Number(d))&&typeof d=="string"&&d.trim()!==""?d=Number(d):E.parseBooleans&&d!==null&&(d.toLowerCase()==="true"||d.toLowerCase()==="false")&&(d=d.toLowerCase()==="true"),d}function A(d,E){E=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},E),_(E.arrayFormatSeparator);const c=l(E),h=Object.create(null);if(typeof d!="string"||(d=d.trim().replace(/^[?#&]/,""),!d))return h;for(const f of d.split("&")){if(f==="")continue;let[n,o]=i(E.decode?f.replace(/\+/g," "):f,"=");o=o===void 0?null:["comma","separator","bracket-separator"].includes(E.arrayFormat)?o:w(o,E),c(w(n,E),o,h)}for(const f of Object.keys(h)){const n=h[f];if(typeof n=="object"&&n!==null)for(const o of Object.keys(n))n[o]=p(n[o],E);else h[f]=p(n,E)}return E.sort===!1?h:(E.sort===!0?Object.keys(h).sort():Object.keys(h).sort(E.sort)).reduce((f,n)=>{const o=h[n];return o&&typeof o=="object"&&!Array.isArray(o)?f[n]=y(o):f[n]=o,f},Object.create(null))}e.extract=S,e.parse=A,e.stringify=(d,E)=>{if(!d)return"";E=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},E),_(E.arrayFormatSeparator);const c=o=>E.skipNull&&s(d[o])||E.skipEmptyString&&d[o]==="",h=u(E),f={};for(const o of Object.keys(d))c(o)||(f[o]=d[o]);const n=Object.keys(f);return E.sort!==!1&&n.sort(E.sort),n.map(o=>{const m=d[o];return m===void 0?"":m===null?D(o,E):Array.isArray(m)?m.length===0&&E.arrayFormat==="bracket-separator"?D(o,E)+"[]":m.reduce(h(o),[]).join("&"):D(o,E)+"="+D(m,E)}).filter(o=>o.length>0).join("&")},e.parseUrl=(d,E)=>{E=Object.assign({decode:!0},E);const[c,h]=i(d,"#");return Object.assign({url:c.split("?")[0]||"",query:A(S(d),E)},E&&E.parseFragmentIdentifier&&h?{fragmentIdentifier:w(h,E)}:{})},e.stringifyUrl=(d,E)=>{E=Object.assign({encode:!0,strict:!0,[b]:!0},E);const c=v(d.url).split("?")[0]||"",h=e.extract(d.url),f=e.parse(h,{sort:!1}),n=Object.assign(f,d.query);let o=e.stringify(n,E);o&&(o=`?${o}`);let m=g(d.url);return d.fragmentIdentifier&&(m=`#${E[b]?D(d.fragmentIdentifier,E):d.fragmentIdentifier}`),`${c}${o}${m}`},e.pick=(d,E,c)=>{c=Object.assign({parseFragmentIdentifier:!0,[b]:!1},c);const{url:h,query:f,fragmentIdentifier:n}=e.parseUrl(d,c);return e.stringifyUrl({url:h,query:a(f,E),fragmentIdentifier:n},c)},e.exclude=(d,E,c)=>{const h=Array.isArray(E)?f=>!E.includes(f):(f,n)=>!E(f,n);return e.pick(d,h,c)}})(Ke);const Ba={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"}},xr=":";function jo(e){const[t,r]=e.split(xr);return{namespace:t,reference:r}}function Lo(e){const[t,r,i]=e.split(xr);return{namespace:t,reference:r,address:i}}function Bo(e,t=[]){const r=[];return Object.keys(e).forEach(i=>{if(t.length&&!t.includes(i))return;const a=e[i];r.push(...a.accounts)}),r}function $r(e,t){return e.includes(":")?[e]:t.chains||[]}const Hr="base10",Ee="base16",Ct="base64pad",Rt="utf8",Kr=0,Ge=1,xa=0,sr=1,Ut=12,jt=32;function xo(){const e=Tt.generateKeyPair();return{privateKey:ge(e.secretKey,Ee),publicKey:ge(e.publicKey,Ee)}}function $o(){const e=Ze.randomBytes(jt);return ge(e,Ee)}function Ho(e,t){const r=Tt.sharedKey(ye(e,Ee),ye(t,Ee),!0),i=new In(nt.SHA256,r).expand(jt);return ge(i,Ee)}function Ko(e){const t=nt.hash(ye(e,Ee));return ge(t,Ee)}function Wo(e){const t=nt.hash(ye(e,Rt));return ge(t,Ee)}function $a(e){return ye(`${e}`,Hr)}function ot(e){return Number(ge(e,Hr))}function Vo(e){const t=$a(typeof e.type<"u"?e.type:Kr);if(ot(t)===Ge&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof e.senderPublicKey<"u"?ye(e.senderPublicKey,Ee):void 0,i=typeof e.iv<"u"?ye(e.iv,Ee):Ze.randomBytes(Ut),a=new At.ChaCha20Poly1305(ye(e.symKey,Ee)).seal(i,ye(e.message,Rt));return Ha({type:t,sealed:a,iv:i,senderPublicKey:r})}function Go(e){const t=new At.ChaCha20Poly1305(ye(e.symKey,Ee)),{sealed:r,iv:i}=Wr(e.encoded),a=t.open(i,r);if(a===null)throw new Error("Failed to decrypt");return ge(a,Rt)}function Ha(e){if(ot(e.type)===Ge){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return ge(Wt([e.type,e.senderPublicKey,e.iv,e.sealed]),Ct)}return ge(Wt([e.type,e.iv,e.sealed]),Ct)}function Wr(e){const t=ye(e,Ct),r=t.slice(xa,sr),i=sr;if(ot(r)===Ge){const u=i+jt,l=u+Ut,_=t.slice(i,u),D=t.slice(u,l),w=t.slice(l);return{type:r,sealed:w,iv:D,senderPublicKey:_}}const a=i+Ut,s=t.slice(i,a),b=t.slice(a);return{type:r,sealed:b,iv:s}}function qo(e,t){const r=Wr(e);return Ka({type:ot(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?ge(r.senderPublicKey,Ee):void 0,receiverPublicKey:t==null?void 0:t.receiverPublicKey})}function Ka(e){const t=(e==null?void 0:e.type)||Kr;if(t===Ge){if(typeof(e==null?void 0:e.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(e==null?void 0:e.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e==null?void 0:e.senderPublicKey,receiverPublicKey:e==null?void 0:e.receiverPublicKey}}function zo(e){return e.type===Ge&&typeof e.senderPublicKey=="string"&&typeof e.receiverPublicKey=="string"}var Wa=Object.defineProperty,cr=Object.getOwnPropertySymbols,Va=Object.prototype.hasOwnProperty,Ga=Object.prototype.propertyIsEnumerable,fr=(e,t,r)=>t in e?Wa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hr=(e,t)=>{for(var r in t||(t={}))Va.call(t,r)&&fr(e,r,t[r]);if(cr)for(var r of cr(t))Ga.call(t,r)&&fr(e,r,t[r]);return e};const qa="ReactNative",we={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},za="js";function Vr(){return typeof V.process<"u"&&typeof V.process.versions<"u"&&typeof V.process.versions.node<"u"}function qe(){return!Ft()&&!!Mt()&&navigator.product===qa}function ut(){return!Vr()&&!!Mt()&&!!Ft()}function ze(){return qe()?we.reactNative:Vr()?we.node:ut()?we.browser:we.unknown}function Yo(){var e;try{return qe()&&typeof V.global<"u"&&typeof(V.global==null?void 0:V.global.Application)<"u"?(e=V.global.Application)==null?void 0:e.applicationId:void 0}catch{return}}function Ya(e,t){let r=Ke.parse(e);return r=hr(hr({},r),t),e=Ke.stringify(r),e}function ko(){return Lr()||{name:"",description:"",url:"",icons:[""]}}function ka(){if(ze()===we.reactNative&&typeof V.global<"u"&&typeof(V.global==null?void 0:V.global.Platform)<"u"){const{OS:r,Version:i}=V.global.Platform;return[r,i].join("-")}const e=Ki();if(e===null)return"unknown";const t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return e.type==="browser"?[t,e.name,e.version].join("-"):[t,e.version].join("-")}function Xa(){var e;const t=ze();return t===we.browser?[t,((e=jr())==null?void 0:e.host)||"unknown"].join(":"):t}function Ja(e,t,r){const i=ka(),a=Xa();return[[e,t].join("-"),[za,r].join("-"),i,a].join("/")}function Xo({protocol:e,version:t,relayUrl:r,sdkVersion:i,auth:a,projectId:s,useOnCloseEvent:b,bundleId:u}){const l=r.split("?"),_=Ja(e,t,i),D={auth:a,ua:_,projectId:s,useOnCloseEvent:b||void 0,origin:u||void 0},w=Ya(l[1]||"",D);return l[0]+"?"+w}function Ne(e,t){return e.filter(r=>t.includes(r)).length===e.length}function Jo(e){return Object.fromEntries(e.entries())}function Qo(e){return new Map(Object.entries(e))}function Zo(e=Te.FIVE_MINUTES,t){const r=Te.toMiliseconds(e||Te.FIVE_MINUTES);let i,a,s;return{resolve:b=>{s&&i&&(clearTimeout(s),i(b))},reject:b=>{s&&a&&(clearTimeout(s),a(b))},done:()=>new Promise((b,u)=>{s=setTimeout(()=>{u(new Error(t))},r),i=b,a=u})}}function eu(e,t,r){return new Promise(async(i,a)=>{const s=setTimeout(()=>a(new Error(r)),t);try{const b=await e;i(b)}catch(b){a(b)}clearTimeout(s)})}function Gr(e,t){if(typeof t=="string"&&t.startsWith(`${e}:`))return t;if(e.toLowerCase()==="topic"){if(typeof t!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}else if(e.toLowerCase()==="id"){if(typeof t!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function tu(e){return Gr("topic",e)}function ru(e){return Gr("id",e)}function nu(e){const[t,r]=e.split(":"),i={id:void 0,topic:void 0};if(t==="topic"&&typeof r=="string")i.topic=r;else if(t==="id"&&Number.isInteger(Number(r)))i.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${r}`);return i}function iu(e,t){return Te.fromMiliseconds((t||Date.now())+Te.toMiliseconds(e))}function au(e){return Date.now()>=Te.toMiliseconds(e)}function ou(e,t){return`${e}${t?`:${t}`:""}`}function bt(e=[],t=[]){return[...new Set([...e,...t])]}async function uu({id:e,topic:t,wcDeepLink:r}){try{if(!r)return;const i=typeof r=="string"?JSON.parse(r):r;let a=i==null?void 0:i.href;if(typeof a!="string")return;a.endsWith("/")&&(a=a.slice(0,-1));const s=`${a}/wc?requestId=${e}&sessionTopic=${t}`,b=ze();b===we.browser?s.startsWith("https://")?window.open(s,"_blank","noreferrer noopener"):window.open(s,"_self","noreferrer noopener"):b===we.reactNative&&typeof(V.global==null?void 0:V.global.Linking)<"u"&&await V.global.Linking.openURL(s)}catch(i){console.error(i)}}async function su(e,t){try{return await e.getItem(t)||(ut()?localStorage.getItem(t):void 0)}catch(r){console.error(r)}}const Qa="irn";function cu(e){return(e==null?void 0:e.relay)||{protocol:Qa}}function fu(e){const t=Ba[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var Za=Object.defineProperty,lr=Object.getOwnPropertySymbols,eo=Object.prototype.hasOwnProperty,to=Object.prototype.propertyIsEnumerable,dr=(e,t,r)=>t in e?Za(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ro=(e,t)=>{for(var r in t||(t={}))eo.call(t,r)&&dr(e,r,t[r]);if(lr)for(var r of lr(t))to.call(t,r)&&dr(e,r,t[r]);return e};function no(e,t="-"){const r={},i="relay"+t;return Object.keys(e).forEach(a=>{if(a.startsWith(i)){const s=a.replace(i,""),b=e[a];r[s]=b}}),r}function hu(e){e=e.includes("wc://")?e.replace("wc://",""):e,e=e.includes("wc:")?e.replace("wc:",""):e;const t=e.indexOf(":"),r=e.indexOf("?")!==-1?e.indexOf("?"):void 0,i=e.substring(0,t),a=e.substring(t+1,r).split("@"),s=typeof r<"u"?e.substring(r):"",b=Ke.parse(s);return{protocol:i,topic:io(a[0]),version:parseInt(a[1],10),symKey:b.symKey,relay:no(b)}}function io(e){return e.startsWith("//")?e.substring(2):e}function ao(e,t="-"){const r="relay",i={};return Object.keys(e).forEach(a=>{const s=r+t+a;e[a]&&(i[s]=e[a])}),i}function lu(e){return`${e.protocol}:${e.topic}@${e.version}?`+Ke.stringify(ro({symKey:e.symKey},ao(e.relay)))}var oo=Object.defineProperty,uo=Object.defineProperties,so=Object.getOwnPropertyDescriptors,Dr=Object.getOwnPropertySymbols,co=Object.prototype.hasOwnProperty,fo=Object.prototype.propertyIsEnumerable,br=(e,t,r)=>t in e?oo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ho=(e,t)=>{for(var r in t||(t={}))co.call(t,r)&&br(e,r,t[r]);if(Dr)for(var r of Dr(t))fo.call(t,r)&&br(e,r,t[r]);return e},lo=(e,t)=>uo(e,so(t));function Le(e){const t=[];return e.forEach(r=>{const[i,a]=r.split(":");t.push(`${i}:${a}`)}),t}function Do(e){const t=[];return Object.values(e).forEach(r=>{t.push(...Le(r.accounts))}),t}function bo(e,t){const r=[];return Object.values(e).forEach(i=>{Le(i.accounts).includes(t)&&r.push(...i.methods)}),r}function _o(e,t){const r=[];return Object.values(e).forEach(i=>{Le(i.accounts).includes(t)&&r.push(...i.events)}),r}function du(e,t){const r=Co(e,t);if(r)throw new Error(r.message);const i={};for(const[a,s]of Object.entries(e))i[a]={methods:s.methods,events:s.events,chains:s.accounts.map(b=>`${b.split(":")[0]}:${b.split(":")[1]}`)};return i}function qr(e){return e.includes(":")}function Eo(e){return qr(e)?e.split(":")[0]:e}function Du(e){var t,r,i;const a={};if(!Lt(e))return a;for(const[s,b]of Object.entries(e)){const u=qr(s)?[s]:b.chains,l=b.methods||[],_=b.events||[],D=Eo(s);a[D]=lo(ho({},a[D]),{chains:bt(u,(t=a[D])==null?void 0:t.chains),methods:bt(l,(r=a[D])==null?void 0:r.methods),events:bt(_,(i=a[D])==null?void 0:i.events)})}return a}const wo={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}},vo={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 Se(e,t){const{message:r,code:i}=vo[e];return{message:t?`${r} ${t}`:r,code:i}}function Re(e,t){const{message:r,code:i}=wo[e];return{message:t?`${r} ${t}`:r,code:i}}function st(e,t){return Array.isArray(e)?typeof t<"u"&&e.length?e.every(t):!0:!1}function Lt(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function Ie(e){return typeof e>"u"}function ve(e,t){return t&&Ie(e)?!0:typeof e=="string"&&!!e.trim().length}function Bt(e,t){return t&&Ie(e)?!0:typeof e=="number"&&!isNaN(e)}function bu(e,t){const{requiredNamespaces:r}=t,i=Object.keys(e.namespaces),a=Object.keys(r);let s=!0;return Ne(a,i)?(i.forEach(b=>{const{accounts:u,methods:l,events:_}=e.namespaces[b],D=Le(u),w=r[b];(!Ne($r(b,w),D)||!Ne(w.methods,l)||!Ne(w.events,_))&&(s=!1)}),s):!1}function Je(e){return ve(e,!1)&&e.includes(":")?e.split(":").length===2:!1}function yo(e){if(ve(e,!1)&&e.includes(":")){const t=e.split(":");if(t.length===3){const r=t[0]+":"+t[1];return!!t[2]&&Je(r)}}return!1}function _u(e){if(ve(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}function Eu(e){var t;return(t=e==null?void 0:e.proposer)==null?void 0:t.publicKey}function wu(e){return e==null?void 0:e.topic}function vu(e,t){let r=null;return ve(e==null?void 0:e.publicKey,!1)||(r=Se("MISSING_OR_INVALID",`${t} controller public key should be a string`)),r}function _r(e){let t=!0;return st(e)?e.length&&(t=e.every(r=>ve(r,!1))):t=!1,t}function go(e,t,r){let i=null;return st(t)&&t.length?t.forEach(a=>{i||Je(a)||(i=Re("UNSUPPORTED_CHAINS",`${r}, chain ${a} should be a string and conform to "namespace:chainId" format`))}):Je(e)||(i=Re("UNSUPPORTED_CHAINS",`${r}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),i}function po(e,t,r){let i=null;return Object.entries(e).forEach(([a,s])=>{if(i)return;const b=go(a,$r(a,s),`${t} ${r}`);b&&(i=b)}),i}function mo(e,t){let r=null;return st(e)?e.forEach(i=>{r||yo(i)||(r=Re("UNSUPPORTED_ACCOUNTS",`${t}, account ${i} should be a string and conform to "namespace:chainId:address" format`))}):r=Re("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function So(e,t){let r=null;return Object.values(e).forEach(i=>{if(r)return;const a=mo(i==null?void 0:i.accounts,`${t} namespace`);a&&(r=a)}),r}function Oo(e,t){let r=null;return _r(e==null?void 0:e.methods)?_r(e==null?void 0:e.events)||(r=Re("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):r=Re("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),r}function zr(e,t){let r=null;return Object.values(e).forEach(i=>{if(r)return;const a=Oo(i,`${t}, namespace`);a&&(r=a)}),r}function yu(e,t,r){let i=null;if(e&&Lt(e)){const a=zr(e,t);a&&(i=a);const s=po(e,t,r);s&&(i=s)}else i=Se("MISSING_OR_INVALID",`${t}, ${r} should be an object with data`);return i}function Co(e,t){let r=null;if(e&&Lt(e)){const i=zr(e,t);i&&(r=i);const a=So(e,t);a&&(r=a)}else r=Se("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return r}function Uo(e){return ve(e.protocol,!0)}function gu(e,t){let r=!1;return t&&!e?r=!0:e&&st(e)&&e.length&&e.forEach(i=>{r=Uo(i)}),r}function pu(e){return typeof e=="number"}function mu(e){return typeof e<"u"&&typeof e!==null}function Su(e){return!(!e||typeof e!="object"||!e.code||!Bt(e.code,!1)||!e.message||!ve(e.message,!1))}function Ou(e){return!(Ie(e)||!ve(e.method,!1))}function Cu(e){return!(Ie(e)||Ie(e.result)&&Ie(e.error)||!Bt(e.id,!1)||!ve(e.jsonrpc,!1))}function Uu(e){return!(Ie(e)||!ve(e.name,!1))}function Au(e,t){return!(!Je(t)||!Do(e).includes(t))}function Nu(e,t,r){return ve(r,!1)?bo(e,t).includes(r):!1}function Tu(e,t,r){return ve(r,!1)?_o(e,t).includes(r):!1}function Iu(e,t,r){let i=null;const a=Ao(e),s=No(t),b=Object.keys(a),u=Object.keys(s),l=Er(Object.keys(e)),_=Er(Object.keys(t)),D=l.filter(w=>!_.includes(w));return D.length&&(i=Se("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.
|
|
15
|
+
Required: ${D.toString()}
|
|
16
|
+
Received: ${Object.keys(t).toString()}`)),Ne(b,u)||(i=Se("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces.
|
|
17
|
+
Required: ${b.toString()}
|
|
18
|
+
Approved: ${u.toString()}`)),Object.keys(t).forEach(w=>{if(!w.includes(":")||i)return;const y=Le(t[w].accounts);y.includes(w)||(i=Se("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${w}
|
|
19
|
+
Required: ${w}
|
|
20
|
+
Approved: ${y.toString()}`))}),b.forEach(w=>{i||(Ne(a[w].methods,s[w].methods)?Ne(a[w].events,s[w].events)||(i=Se("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${w}`)):i=Se("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${w}`))}),i}function Ao(e){const t={};return Object.keys(e).forEach(r=>{var i;r.includes(":")?t[r]=e[r]:(i=e[r].chains)==null||i.forEach(a=>{t[a]={methods:e[r].methods,events:e[r].events}})}),t}function Er(e){return[...new Set(e.map(t=>t.includes(":")?t.split(":")[0]:t))]}function No(e){const t={};return Object.keys(e).forEach(r=>{if(r.includes(":"))t[r]=e[r];else{const i=Le(e[r].accounts);i==null||i.forEach(a=>{t[a]={accounts:e[r].accounts.filter(s=>s.includes(`${a}:`)),methods:e[r].methods,events:e[r].events}})}}),t}function Fu(e,t){return Bt(e,!1)&&e<=t.max&&e>=t.min}function Mu(){const e=ze();return new Promise(t=>{switch(e){case we.browser:t(To());break;case we.reactNative:t(Io());break;case we.node:t(Fo());break;default:t(!0)}})}function To(){return ut()&&(navigator==null?void 0:navigator.onLine)}async function Io(){if(qe()&&typeof V.global<"u"&&V.global!=null&&V.global.NetInfo){const e=await(V.global==null?void 0:V.global.NetInfo.fetch());return e==null?void 0:e.isConnected}return!0}function Fo(){return!0}function Pu(e){switch(ze()){case we.browser:Mo(e);break;case we.reactNative:Po(e);break}}function Mo(e){!qe()&&ut()&&(window.addEventListener("online",()=>e(!0)),window.addEventListener("offline",()=>e(!1)))}function Po(e){var t;qe()&&typeof V.global<"u"&&V.global!=null&&V.global.NetInfo&&((t=V.global)==null||t.NetInfo.addEventListener(r=>e(r==null?void 0:r.isConnected)))}const _t={};class Ru{static get(t){return _t[t]}static set(t,r){_t[t]=r}static delete(t){delete _t[t]}}export{ot as $,Ka as A,Lt as B,hu as C,Zo as D,ou as E,Go as F,au as G,qo as H,lu as I,Yo as J,Ko as K,mu as L,wu as M,Se as N,_u as O,ve as P,nu as Q,tu as R,bt as S,ru as T,Re as U,Eu as V,qe as W,Xo as X,ut as Y,Vr as Z,Ge as _,Bo as a,Jo as a0,Qo as a1,Wo as a2,cu as a3,fu as a4,ko as a5,du as a6,su as a7,uu as a8,bu as a9,Ru as aa,gu as ab,yu as ac,Co as ad,Iu as ae,Su as af,Uo as ag,vu as ah,Au as ai,Ou as aj,Nu as ak,Fu as al,Cu as am,Uu as an,Tu as ao,pu as ap,R as b,Te as c,Wt as d,Eo as e,ye as f,Ie as g,xo as h,$o as i,Ho as j,st as k,Wr as l,Mu as m,Pu as n,qr as o,Ee as p,zo as q,Ze as r,Du as s,ge as t,eu as u,jo as v,pe as w,Vo as x,iu as y,Lo as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{q as Jv,g as Qv,F as eu,d as Mo,aZ as Vv,_ as Kv}from"./main-wVJAa1zx.js";import{U as Xi,k as Or,e as Ir,B as Zv,o as ru,S as Qi,v as Yv,a as Xv}from"./index.es-DkxB7tN9.js";import{i as Bo,f as tg,p as eg,c as Lo,a as rg,o as ng,Q as ig,J as Ie}from"./index.es-0VUWq9QB.js";var ts={exports:{}};(function(b,s){var i=typeof self<"u"?self:Jv,f=function(){function P(){this.fetch=!1,this.DOMException=i.DOMException}return P.prototype=i,new P}();(function(P){(function(O){var L={searchParams:"URLSearchParams"in P,iterable:"Symbol"in P&&"iterator"in Symbol,blob:"FileReader"in P&&"Blob"in P&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in P,arrayBuffer:"ArrayBuffer"in P};function ot(v){return v&&DataView.prototype.isPrototypeOf(v)}if(L.arrayBuffer)var it=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],lt=ArrayBuffer.isView||function(v){return v&&it.indexOf(Object.prototype.toString.call(v))>-1};function nt(v){if(typeof v!="string"&&(v=String(v)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(v))throw new TypeError("Invalid character in header field name");return v.toLowerCase()}function pt(v){return typeof v!="string"&&(v=String(v)),v}function ut(v){var E={next:function(){var R=v.shift();return{done:R===void 0,value:R}}};return L.iterable&&(E[Symbol.iterator]=function(){return E}),E}function G(v){this.map={},v instanceof G?v.forEach(function(E,R){this.append(R,E)},this):Array.isArray(v)?v.forEach(function(E){this.append(E[0],E[1])},this):v&&Object.getOwnPropertyNames(v).forEach(function(E){this.append(E,v[E])},this)}G.prototype.append=function(v,E){v=nt(v),E=pt(E);var R=this.map[v];this.map[v]=R?R+", "+E:E},G.prototype.delete=function(v){delete this.map[nt(v)]},G.prototype.get=function(v){return v=nt(v),this.has(v)?this.map[v]:null},G.prototype.has=function(v){return this.map.hasOwnProperty(nt(v))},G.prototype.set=function(v,E){this.map[nt(v)]=pt(E)},G.prototype.forEach=function(v,E){for(var R in this.map)this.map.hasOwnProperty(R)&&v.call(E,this.map[R],R,this)},G.prototype.keys=function(){var v=[];return this.forEach(function(E,R){v.push(R)}),ut(v)},G.prototype.values=function(){var v=[];return this.forEach(function(E){v.push(E)}),ut(v)},G.prototype.entries=function(){var v=[];return this.forEach(function(E,R){v.push([R,E])}),ut(v)},L.iterable&&(G.prototype[Symbol.iterator]=G.prototype.entries);function pe(v){if(v.bodyUsed)return Promise.reject(new TypeError("Already read"));v.bodyUsed=!0}function _t(v){return new Promise(function(E,R){v.onload=function(){E(v.result)},v.onerror=function(){R(v.error)}})}function Xt(v){var E=new FileReader,R=_t(E);return E.readAsArrayBuffer(v),R}function jr(v){var E=new FileReader,R=_t(E);return E.readAsText(v),R}function $t(v){for(var E=new Uint8Array(v),R=new Array(E.length),K=0;K<E.length;K++)R[K]=String.fromCharCode(E[K]);return R.join("")}function te(v){if(v.slice)return v.slice(0);var E=new Uint8Array(v.byteLength);return E.set(new Uint8Array(v)),E.buffer}function It(){return this.bodyUsed=!1,this._initBody=function(v){this._bodyInit=v,v?typeof v=="string"?this._bodyText=v:L.blob&&Blob.prototype.isPrototypeOf(v)?this._bodyBlob=v:L.formData&&FormData.prototype.isPrototypeOf(v)?this._bodyFormData=v:L.searchParams&&URLSearchParams.prototype.isPrototypeOf(v)?this._bodyText=v.toString():L.arrayBuffer&&L.blob&&ot(v)?(this._bodyArrayBuffer=te(v.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):L.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(v)||lt(v))?this._bodyArrayBuffer=te(v):this._bodyText=v=Object.prototype.toString.call(v):this._bodyText="",this.headers.get("content-type")||(typeof v=="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(v)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},L.blob&&(this.blob=function(){var v=pe(this);if(v)return v;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?pe(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(Xt)}),this.text=function(){var v=pe(this);if(v)return v;if(this._bodyBlob)return jr(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve($t(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(Xe)}),this.json=function(){return this.text().then(JSON.parse)},this}var de=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Ut(v){var E=v.toUpperCase();return de.indexOf(E)>-1?E:v}function At(v,E){E=E||{};var R=E.body;if(v instanceof At){if(v.bodyUsed)throw new TypeError("Already read");this.url=v.url,this.credentials=v.credentials,E.headers||(this.headers=new G(v.headers)),this.method=v.method,this.mode=v.mode,this.signal=v.signal,!R&&v._bodyInit!=null&&(R=v._bodyInit,v.bodyUsed=!0)}else this.url=String(v);if(this.credentials=E.credentials||this.credentials||"same-origin",(E.headers||!this.headers)&&(this.headers=new G(E.headers)),this.method=Ut(E.method||this.method||"GET"),this.mode=E.mode||this.mode||null,this.signal=E.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&R)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(R)}At.prototype.clone=function(){return new At(this,{body:this._bodyInit})};function Xe(v){var E=new FormData;return v.trim().split("&").forEach(function(R){if(R){var K=R.split("="),J=K.shift().replace(/\+/g," "),U=K.join("=").replace(/\+/g," ");E.append(decodeURIComponent(J),decodeURIComponent(U))}}),E}function In(v){var E=new G,R=v.replace(/\r?\n[\t ]+/g," ");return R.split(/\r?\n/).forEach(function(K){var J=K.split(":"),U=J.shift().trim();if(U){var ee=J.join(":").trim();E.append(U,ee)}}),E}It.call(At.prototype);function Rt(v,E){E||(E={}),this.type="default",this.status=E.status===void 0?200:E.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in E?E.statusText:"OK",this.headers=new G(E.headers),this.url=E.url||"",this._initBody(v)}It.call(Rt.prototype),Rt.prototype.clone=function(){return new Rt(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new G(this.headers),url:this.url})},Rt.error=function(){var v=new Rt(null,{status:0,statusText:""});return v.type="error",v};var An=[301,302,303,307,308];Rt.redirect=function(v,E){if(An.indexOf(E)===-1)throw new RangeError("Invalid status code");return new Rt(null,{status:E,headers:{location:v}})},O.DOMException=P.DOMException;try{new O.DOMException}catch{O.DOMException=function(E,R){this.message=E,this.name=R;var K=Error(E);this.stack=K.stack},O.DOMException.prototype=Object.create(Error.prototype),O.DOMException.prototype.constructor=O.DOMException}function tr(v,E){return new Promise(function(R,K){var J=new At(v,E);if(J.signal&&J.signal.aborted)return K(new O.DOMException("Aborted","AbortError"));var U=new XMLHttpRequest;function ee(){U.abort()}U.onload=function(){var dt={status:U.status,statusText:U.statusText,headers:In(U.getAllResponseHeaders()||"")};dt.url="responseURL"in U?U.responseURL:dt.headers.get("X-Request-URL");var er="response"in U?U.response:U.responseText;R(new Rt(er,dt))},U.onerror=function(){K(new TypeError("Network request failed"))},U.ontimeout=function(){K(new TypeError("Network request failed"))},U.onabort=function(){K(new O.DOMException("Aborted","AbortError"))},U.open(J.method,J.url,!0),J.credentials==="include"?U.withCredentials=!0:J.credentials==="omit"&&(U.withCredentials=!1),"responseType"in U&&L.blob&&(U.responseType="blob"),J.headers.forEach(function(dt,er){U.setRequestHeader(er,dt)}),J.signal&&(J.signal.addEventListener("abort",ee),U.onreadystatechange=function(){U.readyState===4&&J.signal.removeEventListener("abort",ee)}),U.send(typeof J._bodyInit>"u"?null:J._bodyInit)})}return tr.polyfill=!0,P.fetch||(P.fetch=tr,P.Headers=G,P.Request=At,P.Response=Rt),O.Headers=G,O.Request=At,O.Response=Rt,O.fetch=tr,Object.defineProperty(O,"__esModule",{value:!0}),O})({})})(f),f.fetch.ponyfill=!0,delete f.fetch.polyfill;var g=f;s=g.fetch,s.default=g.fetch,s.fetch=g.fetch,s.Headers=g.Headers,s.Request=g.Request,s.Response=g.Response,b.exports=s})(ts,ts.exports);var sg=ts.exports;const No=Qv(sg),ag=b=>JSON.stringify(b,(s,i)=>typeof i=="bigint"?i.toString()+"n":i),og=b=>{const s=/([\[:])?(\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,i=b.replace(s,'$1"$2n"$3');return JSON.parse(i,(f,g)=>typeof g=="string"&&g.match(/^\d+n$/)?BigInt(g.substring(0,g.length-1)):g)};function ug(b){if(typeof b!="string")throw new Error(`Cannot safe json parse value of type ${typeof b}`);try{return og(b)}catch{return b}}function Fo(b){return typeof b=="string"?b:ag(b)||""}const cg={Accept:"application/json","Content-Type":"application/json"},hg="POST",Uo={headers:cg,method:hg},zo=10;class Ae{constructor(s,i=!1){if(this.url=s,this.disableProviderPing=i,this.events=new eu.EventEmitter,this.isAvailable=!1,this.registering=!1,!Bo(s))throw new Error(`Provided URL is not compatible with HTTP connection: ${s}`);this.url=s,this.disableProviderPing=i}get connected(){return this.isAvailable}get connecting(){return this.registering}on(s,i){this.events.on(s,i)}once(s,i){this.events.once(s,i)}off(s,i){this.events.off(s,i)}removeListener(s,i){this.events.removeListener(s,i)}async open(s=this.url){await this.register(s)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(s,i){this.isAvailable||await this.register();try{const f=Fo(s),P=await(await No(this.url,Object.assign(Object.assign({},Uo),{body:f}))).json();this.onPayload({data:P})}catch(f){this.onError(s.id,f)}}async register(s=this.url){if(!Bo(s))throw new Error(`Provided URL is not compatible with HTTP connection: ${s}`);if(this.registering){const i=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=i||this.events.listenerCount("open")>=i)&&this.events.setMaxListeners(i+1),new Promise((f,g)=>{this.events.once("register_error",P=>{this.resetMaxListeners(),g(P)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return g(new Error("HTTP connection is missing or invalid"));f()})})}this.url=s,this.registering=!0;try{if(!this.disableProviderPing){const i=Fo({id:1,jsonrpc:"2.0",method:"test",params:[]});await No(s,Object.assign(Object.assign({},Uo),{body:i}))}this.onOpen()}catch(i){const f=this.parseError(i);throw this.events.emit("register_error",f),this.onClose(),f}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(s){if(typeof s.data>"u")return;const i=typeof s.data=="string"?ug(s.data):s.data;this.events.emit("payload",i)}onError(s,i){const f=this.parseError(i),g=f.message||f.toString(),P=tg(s,g);this.events.emit("payload",P)}parseError(s,i=this.url){return eg(s,i,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>zo&&this.events.setMaxListeners(zo)}}const Wo="error",fg="wss://relay.walletconnect.com",lg="wc",pg="universal_provider",Go=`${lg}@2:${pg}:`,dg="https://rpc.walletconnect.com/v1/",le={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var Cr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Mo.global<"u"?Mo.global:typeof self<"u"?self:{},es={exports:{}};/**
|
|
1
|
+
import{q as Jv,g as Qv,F as eu,d as Mo,aZ as Vv,_ as Kv}from"../main.js";import{U as Xi,k as Or,e as Ir,B as Zv,o as ru,S as Qi,v as Yv,a as Xv}from"./index.es-00radgcV.js";import{i as Bo,f as tg,p as eg,c as Lo,a as rg,o as ng,Q as ig,J as Ie}from"./index.es--jOuZ4lh.js";var ts={exports:{}};(function(b,s){var i=typeof self<"u"?self:Jv,f=function(){function P(){this.fetch=!1,this.DOMException=i.DOMException}return P.prototype=i,new P}();(function(P){(function(O){var L={searchParams:"URLSearchParams"in P,iterable:"Symbol"in P&&"iterator"in Symbol,blob:"FileReader"in P&&"Blob"in P&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in P,arrayBuffer:"ArrayBuffer"in P};function ot(v){return v&&DataView.prototype.isPrototypeOf(v)}if(L.arrayBuffer)var it=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],lt=ArrayBuffer.isView||function(v){return v&&it.indexOf(Object.prototype.toString.call(v))>-1};function nt(v){if(typeof v!="string"&&(v=String(v)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(v))throw new TypeError("Invalid character in header field name");return v.toLowerCase()}function pt(v){return typeof v!="string"&&(v=String(v)),v}function ut(v){var E={next:function(){var R=v.shift();return{done:R===void 0,value:R}}};return L.iterable&&(E[Symbol.iterator]=function(){return E}),E}function G(v){this.map={},v instanceof G?v.forEach(function(E,R){this.append(R,E)},this):Array.isArray(v)?v.forEach(function(E){this.append(E[0],E[1])},this):v&&Object.getOwnPropertyNames(v).forEach(function(E){this.append(E,v[E])},this)}G.prototype.append=function(v,E){v=nt(v),E=pt(E);var R=this.map[v];this.map[v]=R?R+", "+E:E},G.prototype.delete=function(v){delete this.map[nt(v)]},G.prototype.get=function(v){return v=nt(v),this.has(v)?this.map[v]:null},G.prototype.has=function(v){return this.map.hasOwnProperty(nt(v))},G.prototype.set=function(v,E){this.map[nt(v)]=pt(E)},G.prototype.forEach=function(v,E){for(var R in this.map)this.map.hasOwnProperty(R)&&v.call(E,this.map[R],R,this)},G.prototype.keys=function(){var v=[];return this.forEach(function(E,R){v.push(R)}),ut(v)},G.prototype.values=function(){var v=[];return this.forEach(function(E){v.push(E)}),ut(v)},G.prototype.entries=function(){var v=[];return this.forEach(function(E,R){v.push([R,E])}),ut(v)},L.iterable&&(G.prototype[Symbol.iterator]=G.prototype.entries);function pe(v){if(v.bodyUsed)return Promise.reject(new TypeError("Already read"));v.bodyUsed=!0}function _t(v){return new Promise(function(E,R){v.onload=function(){E(v.result)},v.onerror=function(){R(v.error)}})}function Xt(v){var E=new FileReader,R=_t(E);return E.readAsArrayBuffer(v),R}function jr(v){var E=new FileReader,R=_t(E);return E.readAsText(v),R}function $t(v){for(var E=new Uint8Array(v),R=new Array(E.length),K=0;K<E.length;K++)R[K]=String.fromCharCode(E[K]);return R.join("")}function te(v){if(v.slice)return v.slice(0);var E=new Uint8Array(v.byteLength);return E.set(new Uint8Array(v)),E.buffer}function It(){return this.bodyUsed=!1,this._initBody=function(v){this._bodyInit=v,v?typeof v=="string"?this._bodyText=v:L.blob&&Blob.prototype.isPrototypeOf(v)?this._bodyBlob=v:L.formData&&FormData.prototype.isPrototypeOf(v)?this._bodyFormData=v:L.searchParams&&URLSearchParams.prototype.isPrototypeOf(v)?this._bodyText=v.toString():L.arrayBuffer&&L.blob&&ot(v)?(this._bodyArrayBuffer=te(v.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):L.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(v)||lt(v))?this._bodyArrayBuffer=te(v):this._bodyText=v=Object.prototype.toString.call(v):this._bodyText="",this.headers.get("content-type")||(typeof v=="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(v)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},L.blob&&(this.blob=function(){var v=pe(this);if(v)return v;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?pe(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(Xt)}),this.text=function(){var v=pe(this);if(v)return v;if(this._bodyBlob)return jr(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve($t(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(Xe)}),this.json=function(){return this.text().then(JSON.parse)},this}var de=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Ut(v){var E=v.toUpperCase();return de.indexOf(E)>-1?E:v}function At(v,E){E=E||{};var R=E.body;if(v instanceof At){if(v.bodyUsed)throw new TypeError("Already read");this.url=v.url,this.credentials=v.credentials,E.headers||(this.headers=new G(v.headers)),this.method=v.method,this.mode=v.mode,this.signal=v.signal,!R&&v._bodyInit!=null&&(R=v._bodyInit,v.bodyUsed=!0)}else this.url=String(v);if(this.credentials=E.credentials||this.credentials||"same-origin",(E.headers||!this.headers)&&(this.headers=new G(E.headers)),this.method=Ut(E.method||this.method||"GET"),this.mode=E.mode||this.mode||null,this.signal=E.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&R)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(R)}At.prototype.clone=function(){return new At(this,{body:this._bodyInit})};function Xe(v){var E=new FormData;return v.trim().split("&").forEach(function(R){if(R){var K=R.split("="),J=K.shift().replace(/\+/g," "),U=K.join("=").replace(/\+/g," ");E.append(decodeURIComponent(J),decodeURIComponent(U))}}),E}function In(v){var E=new G,R=v.replace(/\r?\n[\t ]+/g," ");return R.split(/\r?\n/).forEach(function(K){var J=K.split(":"),U=J.shift().trim();if(U){var ee=J.join(":").trim();E.append(U,ee)}}),E}It.call(At.prototype);function Rt(v,E){E||(E={}),this.type="default",this.status=E.status===void 0?200:E.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in E?E.statusText:"OK",this.headers=new G(E.headers),this.url=E.url||"",this._initBody(v)}It.call(Rt.prototype),Rt.prototype.clone=function(){return new Rt(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new G(this.headers),url:this.url})},Rt.error=function(){var v=new Rt(null,{status:0,statusText:""});return v.type="error",v};var An=[301,302,303,307,308];Rt.redirect=function(v,E){if(An.indexOf(E)===-1)throw new RangeError("Invalid status code");return new Rt(null,{status:E,headers:{location:v}})},O.DOMException=P.DOMException;try{new O.DOMException}catch{O.DOMException=function(E,R){this.message=E,this.name=R;var K=Error(E);this.stack=K.stack},O.DOMException.prototype=Object.create(Error.prototype),O.DOMException.prototype.constructor=O.DOMException}function tr(v,E){return new Promise(function(R,K){var J=new At(v,E);if(J.signal&&J.signal.aborted)return K(new O.DOMException("Aborted","AbortError"));var U=new XMLHttpRequest;function ee(){U.abort()}U.onload=function(){var dt={status:U.status,statusText:U.statusText,headers:In(U.getAllResponseHeaders()||"")};dt.url="responseURL"in U?U.responseURL:dt.headers.get("X-Request-URL");var er="response"in U?U.response:U.responseText;R(new Rt(er,dt))},U.onerror=function(){K(new TypeError("Network request failed"))},U.ontimeout=function(){K(new TypeError("Network request failed"))},U.onabort=function(){K(new O.DOMException("Aborted","AbortError"))},U.open(J.method,J.url,!0),J.credentials==="include"?U.withCredentials=!0:J.credentials==="omit"&&(U.withCredentials=!1),"responseType"in U&&L.blob&&(U.responseType="blob"),J.headers.forEach(function(dt,er){U.setRequestHeader(er,dt)}),J.signal&&(J.signal.addEventListener("abort",ee),U.onreadystatechange=function(){U.readyState===4&&J.signal.removeEventListener("abort",ee)}),U.send(typeof J._bodyInit>"u"?null:J._bodyInit)})}return tr.polyfill=!0,P.fetch||(P.fetch=tr,P.Headers=G,P.Request=At,P.Response=Rt),O.Headers=G,O.Request=At,O.Response=Rt,O.fetch=tr,Object.defineProperty(O,"__esModule",{value:!0}),O})({})})(f),f.fetch.ponyfill=!0,delete f.fetch.polyfill;var g=f;s=g.fetch,s.default=g.fetch,s.fetch=g.fetch,s.Headers=g.Headers,s.Request=g.Request,s.Response=g.Response,b.exports=s})(ts,ts.exports);var sg=ts.exports;const No=Qv(sg),ag=b=>JSON.stringify(b,(s,i)=>typeof i=="bigint"?i.toString()+"n":i),og=b=>{const s=/([\[:])?(\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,i=b.replace(s,'$1"$2n"$3');return JSON.parse(i,(f,g)=>typeof g=="string"&&g.match(/^\d+n$/)?BigInt(g.substring(0,g.length-1)):g)};function ug(b){if(typeof b!="string")throw new Error(`Cannot safe json parse value of type ${typeof b}`);try{return og(b)}catch{return b}}function Fo(b){return typeof b=="string"?b:ag(b)||""}const cg={Accept:"application/json","Content-Type":"application/json"},hg="POST",Uo={headers:cg,method:hg},zo=10;class Ae{constructor(s,i=!1){if(this.url=s,this.disableProviderPing=i,this.events=new eu.EventEmitter,this.isAvailable=!1,this.registering=!1,!Bo(s))throw new Error(`Provided URL is not compatible with HTTP connection: ${s}`);this.url=s,this.disableProviderPing=i}get connected(){return this.isAvailable}get connecting(){return this.registering}on(s,i){this.events.on(s,i)}once(s,i){this.events.once(s,i)}off(s,i){this.events.off(s,i)}removeListener(s,i){this.events.removeListener(s,i)}async open(s=this.url){await this.register(s)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(s,i){this.isAvailable||await this.register();try{const f=Fo(s),P=await(await No(this.url,Object.assign(Object.assign({},Uo),{body:f}))).json();this.onPayload({data:P})}catch(f){this.onError(s.id,f)}}async register(s=this.url){if(!Bo(s))throw new Error(`Provided URL is not compatible with HTTP connection: ${s}`);if(this.registering){const i=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=i||this.events.listenerCount("open")>=i)&&this.events.setMaxListeners(i+1),new Promise((f,g)=>{this.events.once("register_error",P=>{this.resetMaxListeners(),g(P)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return g(new Error("HTTP connection is missing or invalid"));f()})})}this.url=s,this.registering=!0;try{if(!this.disableProviderPing){const i=Fo({id:1,jsonrpc:"2.0",method:"test",params:[]});await No(s,Object.assign(Object.assign({},Uo),{body:i}))}this.onOpen()}catch(i){const f=this.parseError(i);throw this.events.emit("register_error",f),this.onClose(),f}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(s){if(typeof s.data>"u")return;const i=typeof s.data=="string"?ug(s.data):s.data;this.events.emit("payload",i)}onError(s,i){const f=this.parseError(i),g=f.message||f.toString(),P=tg(s,g);this.events.emit("payload",P)}parseError(s,i=this.url){return eg(s,i,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>zo&&this.events.setMaxListeners(zo)}}const Wo="error",fg="wss://relay.walletconnect.com",lg="wc",pg="universal_provider",Go=`${lg}@2:${pg}:`,dg="https://rpc.walletconnect.com/v1/",le={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var Cr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Mo.global<"u"?Mo.global:typeof self<"u"?self:{},es={exports:{}};/**
|
|
2
2
|
* @license
|
|
3
3
|
* Lodash <https://lodash.com/>
|
|
4
4
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
@@ -24,10 +24,10 @@ __p += '`),B&&(w+=`' +
|
|
|
24
24
|
function print() { __p += __j.call(arguments, '') }
|
|
25
25
|
`:`;
|
|
26
26
|
`)+w+`return __p
|
|
27
|
-
}`;var H=Ho(function(){return N(u,A+"return "+w).apply(i,c)});if(H.source=w,ki(H))throw H;return H}function tv(t){return F(t).toLowerCase()}function ev(t){return F(t).toUpperCase()}function rv(t,e,r){if(t=F(t),t&&(r||e===i))return Us(t);if(!t||!(e=xt(e)))return t;var n=Gt(t),a=Gt(e),u=zs(n,a),c=Ws(n,a)+1;return Pe(n,u,c).join("")}function nv(t,e,r){if(t=F(t),t&&(r||e===i))return t.slice(0,Js(t)+1);if(!t||!(e=xt(e)))return t;var n=Gt(t),a=Ws(n,Gt(e))+1;return Pe(n,0,a).join("")}function iv(t,e,r){if(t=F(t),t&&(r||e===i))return t.replace(kn,"");if(!t||!(e=xt(e)))return t;var n=Gt(t),a=zs(n,Gt(e));return Pe(n,a).join("")}function sv(t,e){var r=In,n=Rt;if(X(e)){var a="separator"in e?e.separator:a;r="length"in e?$(e.length):r,n="omission"in e?xt(e.omission):n}t=F(t);var u=t.length;if(Ne(t)){var c=Gt(t);u=c.length}if(r>=u)return t;var h=r-Fe(n);if(h<1)return n;var p=c?Pe(c,0,h).join(""):t.slice(0,h);if(a===i)return p+n;if(c&&(h+=p.length-h),Mi(a)){if(t.slice(h).search(a)){var m,y=p;for(a.global||(a=ti(a.source,F(fs.exec(a))+"g")),a.lastIndex=0;m=a.exec(y);)var w=m.index;p=p.slice(0,w===i?h:w)}}else if(t.indexOf(xt(a),h)!=h){var C=p.lastIndexOf(a);C>-1&&(p=p.slice(0,C))}return p+n}function av(t){return t=F(t),t&&gu.test(t)?t.replace(us,Rc):t}var ov=Ve(function(t,e,r){return t+(r?" ":"")+e.toUpperCase()}),Ni=Ha("toUpperCase");function Ro(t,e,r){return t=F(t),e=r?i:e,e===i?xc(t)?kc(t):wc(t):t.match(e)||[]}var Ho=q(function(t,e){try{return Ot(t,i,e)}catch(r){return ki(r)?r:new D(r)}}),uv=oe(function(t,e){return qt(e,function(r){r=Yt(r),se(t,r,Hi(t[r],t))}),t});function cv(t){var e=t==null?0:t.length,r=j();return t=e?Z(t,function(n){if(typeof n[1]!="function")throw new kt(O);return[r(n[0]),n[1]]}):[],q(function(n){for(var a=-1;++a<e;){var u=t[a];if(Ot(u[0],this,n))return Ot(u[1],this,n)}})}function hv(t){return Rh(Bt(t,nt))}function Fi(t){return function(){return t}}function fv(t,e){return t==null||t!==t?e:t}var lv=ka(),pv=ka(!0);function Ct(t){return t}function Ui(t){return pa(typeof t=="function"?t:Bt(t,nt))}function dv(t){return va(Bt(t,nt))}function vv(t,e){return ga(t,Bt(e,nt))}var gv=q(function(t,e){return function(r){return _r(r,t,e)}}),_v=q(function(t,e){return function(r){return _r(t,r,e)}});function zi(t,e,r){var n=ct(e),a=en(e,n);r==null&&!(X(e)&&(a.length||!n.length))&&(r=e,e=t,t=this,a=en(e,ct(e)));var u=!(X(r)&&"chain"in r)||!!r.chain,c=ce(t);return qt(a,function(h){var p=e[h];t[h]=p,c&&(t.prototype[h]=function(){var m=this.__chain__;if(u||m){var y=t(this.__wrapped__),w=y.__actions__=bt(this.__actions__);return w.push({func:p,args:arguments,thisArg:t}),y.__chain__=m,y}return p.apply(t,ge([this.value()],arguments))})}),t}function mv(){return ht._===this&&(ht._=Uc),this}function Wi(){}function yv(t){return t=$(t),q(function(e){return _a(e,t)})}var wv=Pi(Z),bv=Pi(Ms),Pv=Pi(Jn);function qo(t){return xi(t)?Qn(Yt(t)):Zh(t)}function Ev(t){return function(e){return t==null?i:Te(t,e)}}var Cv=Ba(),Iv=Ba(!0);function Gi(){return[]}function Ji(){return!1}function Av(){return{}}function Ov(){return""}function jv(){return!0}function xv(t,e){if(t=$(t),t<1||t>J)return[];var r=dt,n=vt(t,dt);e=j(e),t-=dt;for(var a=Zn(n,e);++r<t;)e(r);return a}function Sv(t){return T(t)?Z(t,Yt):St(t)?[t]:bt(eo(F(t)))}function Dv(t){var e=++Nc;return F(t)+e}var Tv=un(function(t,e){return t+e},0),$v=Ei("ceil"),Rv=un(function(t,e){return t/e},1),Hv=Ei("floor");function qv(t){return t&&t.length?tn(t,Ct,ui):i}function kv(t,e){return t&&t.length?tn(t,j(e,2),ui):i}function Mv(t){return Ns(t,Ct)}function Bv(t,e){return Ns(t,j(e,2))}function Lv(t){return t&&t.length?tn(t,Ct,li):i}function Nv(t,e){return t&&t.length?tn(t,j(e,2),li):i}var Fv=un(function(t,e){return t*e},1),Uv=Ei("round"),zv=un(function(t,e){return t-e},0);function Wv(t){return t&&t.length?Kn(t,Ct):0}function Gv(t,e){return t&&t.length?Kn(t,j(e,2)):0}return o.after=dp,o.ary=lo,o.assign=ed,o.assignIn=Oo,o.assignInWith=bn,o.assignWith=rd,o.at=nd,o.before=po,o.bind=Hi,o.bindAll=uv,o.bindKey=vo,o.castArray=Ap,o.chain=co,o.chunk=Hf,o.compact=qf,o.concat=kf,o.cond=cv,o.conforms=hv,o.constant=Fi,o.countBy=Wl,o.create=id,o.curry=go,o.curryRight=_o,o.debounce=mo,o.defaults=sd,o.defaultsDeep=ad,o.defer=vp,o.delay=gp,o.difference=Mf,o.differenceBy=Bf,o.differenceWith=Lf,o.drop=Nf,o.dropRight=Ff,o.dropRightWhile=Uf,o.dropWhile=zf,o.fill=Wf,o.filter=Jl,o.flatMap=Kl,o.flatMapDeep=Zl,o.flatMapDepth=Yl,o.flatten=so,o.flattenDeep=Gf,o.flattenDepth=Jf,o.flip=_p,o.flow=lv,o.flowRight=pv,o.fromPairs=Qf,o.functions=pd,o.functionsIn=dd,o.groupBy=Xl,o.initial=Kf,o.intersection=Zf,o.intersectionBy=Yf,o.intersectionWith=Xf,o.invert=gd,o.invertBy=_d,o.invokeMap=ep,o.iteratee=Ui,o.keyBy=rp,o.keys=ct,o.keysIn=Et,o.map=vn,o.mapKeys=yd,o.mapValues=wd,o.matches=dv,o.matchesProperty=vv,o.memoize=_n,o.merge=bd,o.mergeWith=jo,o.method=gv,o.methodOf=_v,o.mixin=zi,o.negate=mn,o.nthArg=yv,o.omit=Pd,o.omitBy=Ed,o.once=mp,o.orderBy=np,o.over=wv,o.overArgs=yp,o.overEvery=bv,o.overSome=Pv,o.partial=qi,o.partialRight=yo,o.partition=ip,o.pick=Cd,o.pickBy=xo,o.property=qo,o.propertyOf=Ev,o.pull=nl,o.pullAll=oo,o.pullAllBy=il,o.pullAllWith=sl,o.pullAt=al,o.range=Cv,o.rangeRight=Iv,o.rearg=wp,o.reject=op,o.remove=ol,o.rest=bp,o.reverse=$i,o.sampleSize=cp,o.set=Ad,o.setWith=Od,o.shuffle=hp,o.slice=ul,o.sortBy=pp,o.sortedUniq=vl,o.sortedUniqBy=gl,o.split=Kd,o.spread=Pp,o.tail=_l,o.take=ml,o.takeRight=yl,o.takeRightWhile=wl,o.takeWhile=bl,o.tap=ql,o.throttle=Ep,o.thru=dn,o.toArray=Co,o.toPairs=So,o.toPairsIn=Do,o.toPath=Sv,o.toPlainObject=Ao,o.transform=jd,o.unary=Cp,o.union=Pl,o.unionBy=El,o.unionWith=Cl,o.uniq=Il,o.uniqBy=Al,o.uniqWith=Ol,o.unset=xd,o.unzip=Ri,o.unzipWith=uo,o.update=Sd,o.updateWith=Dd,o.values=Ye,o.valuesIn=Td,o.without=jl,o.words=Ro,o.wrap=Ip,o.xor=xl,o.xorBy=Sl,o.xorWith=Dl,o.zip=Tl,o.zipObject=$l,o.zipObjectDeep=Rl,o.zipWith=Hl,o.entries=So,o.entriesIn=Do,o.extend=Oo,o.extendWith=bn,zi(o,o),o.add=Tv,o.attempt=Ho,o.camelCase=qd,o.capitalize=To,o.ceil=$v,o.clamp=$d,o.clone=Op,o.cloneDeep=xp,o.cloneDeepWith=Sp,o.cloneWith=jp,o.conformsTo=Dp,o.deburr=$o,o.defaultTo=fv,o.divide=Rv,o.endsWith=kd,o.eq=Qt,o.escape=Md,o.escapeRegExp=Bd,o.every=Gl,o.find=Ql,o.findIndex=no,o.findKey=od,o.findLast=Vl,o.findLastIndex=io,o.findLastKey=ud,o.floor=Hv,o.forEach=ho,o.forEachRight=fo,o.forIn=cd,o.forInRight=hd,o.forOwn=fd,o.forOwnRight=ld,o.get=Bi,o.gt=Tp,o.gte=$p,o.has=vd,o.hasIn=Li,o.head=ao,o.identity=Ct,o.includes=tp,o.indexOf=Vf,o.inRange=Rd,o.invoke=md,o.isArguments=He,o.isArray=T,o.isArrayBuffer=Rp,o.isArrayLike=Pt,o.isArrayLikeObject=et,o.isBoolean=Hp,o.isBuffer=Ee,o.isDate=qp,o.isElement=kp,o.isEmpty=Mp,o.isEqual=Bp,o.isEqualWith=Lp,o.isError=ki,o.isFinite=Np,o.isFunction=ce,o.isInteger=wo,o.isLength=yn,o.isMap=bo,o.isMatch=Fp,o.isMatchWith=Up,o.isNaN=zp,o.isNative=Wp,o.isNil=Jp,o.isNull=Gp,o.isNumber=Po,o.isObject=X,o.isObjectLike=tt,o.isPlainObject=Er,o.isRegExp=Mi,o.isSafeInteger=Qp,o.isSet=Eo,o.isString=wn,o.isSymbol=St,o.isTypedArray=Ze,o.isUndefined=Vp,o.isWeakMap=Kp,o.isWeakSet=Zp,o.join=tl,o.kebabCase=Ld,o.last=Nt,o.lastIndexOf=el,o.lowerCase=Nd,o.lowerFirst=Fd,o.lt=Yp,o.lte=Xp,o.max=qv,o.maxBy=kv,o.mean=Mv,o.meanBy=Bv,o.min=Lv,o.minBy=Nv,o.stubArray=Gi,o.stubFalse=Ji,o.stubObject=Av,o.stubString=Ov,o.stubTrue=jv,o.multiply=Fv,o.nth=rl,o.noConflict=mv,o.noop=Wi,o.now=gn,o.pad=Ud,o.padEnd=zd,o.padStart=Wd,o.parseInt=Gd,o.random=Hd,o.reduce=sp,o.reduceRight=ap,o.repeat=Jd,o.replace=Qd,o.result=Id,o.round=Uv,o.runInContext=l,o.sample=up,o.size=fp,o.snakeCase=Vd,o.some=lp,o.sortedIndex=cl,o.sortedIndexBy=hl,o.sortedIndexOf=fl,o.sortedLastIndex=ll,o.sortedLastIndexBy=pl,o.sortedLastIndexOf=dl,o.startCase=Zd,o.startsWith=Yd,o.subtract=zv,o.sum=Wv,o.sumBy=Gv,o.template=Xd,o.times=xv,o.toFinite=he,o.toInteger=$,o.toLength=Io,o.toLower=tv,o.toNumber=Ft,o.toSafeInteger=td,o.toString=F,o.toUpper=ev,o.trim=rv,o.trimEnd=nv,o.trimStart=iv,o.truncate=sv,o.unescape=av,o.uniqueId=Dv,o.upperCase=ov,o.upperFirst=Ni,o.each=ho,o.eachRight=fo,o.first=ao,zi(o,function(){var t={};return Kt(o,function(e,r){z.call(o.prototype,r)||(t[r]=e)}),t}(),{chain:!1}),o.VERSION=f,qt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){o[t].placeholder=o}),qt(["drop","take"],function(t,e){M.prototype[t]=function(r){r=r===i?1:at($(r),0);var n=this.__filtered__&&!e?new M(this):this.clone();return n.__filtered__?n.__takeCount__=vt(r,n.__takeCount__):n.__views__.push({size:vt(r,dt),type:t+(n.__dir__<0?"Right":"")}),n},M.prototype[t+"Right"]=function(r){return this.reverse()[t](r).reverse()}}),qt(["filter","map","takeWhile"],function(t,e){var r=e+1,n=r==v||r==R;M.prototype[t]=function(a){var u=this.clone();return u.__iteratees__.push({iteratee:j(a,3),type:r}),u.__filtered__=u.__filtered__||n,u}}),qt(["head","last"],function(t,e){var r="take"+(e?"Right":"");M.prototype[t]=function(){return this[r](1).value()[0]}}),qt(["initial","tail"],function(t,e){var r="drop"+(e?"":"Right");M.prototype[t]=function(){return this.__filtered__?new M(this):this[r](1)}}),M.prototype.compact=function(){return this.filter(Ct)},M.prototype.find=function(t){return this.filter(t).head()},M.prototype.findLast=function(t){return this.reverse().find(t)},M.prototype.invokeMap=q(function(t,e){return typeof t=="function"?new M(this):this.map(function(r){return _r(r,t,e)})}),M.prototype.reject=function(t){return this.filter(mn(j(t)))},M.prototype.slice=function(t,e){t=$(t);var r=this;return r.__filtered__&&(t>0||e<0)?new M(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==i&&(e=$(e),r=e<0?r.dropRight(-e):r.take(e-t)),r)},M.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},M.prototype.toArray=function(){return this.take(dt)},Kt(M.prototype,function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),a=o[n?"take"+(e=="last"?"Right":""):e],u=n||/^find/.test(e);a&&(o.prototype[e]=function(){var c=this.__wrapped__,h=n?[1]:arguments,p=c instanceof M,m=h[0],y=p||T(c),w=function(k){var B=a.apply(o,ge([k],h));return n&&C?B[0]:B};y&&r&&typeof m=="function"&&m.length!=1&&(p=y=!1);var C=this.__chain__,A=!!this.__actions__.length,x=u&&!C,H=p&&!A;if(!u&&y){c=H?c:new M(this);var S=t.apply(c,h);return S.__actions__.push({func:dn,args:[w],thisArg:i}),new Mt(S,C)}return x&&H?t.apply(this,h):(S=this.thru(w),x?n?S.value()[0]:S.value():S)})}),qt(["pop","push","shift","sort","splice","unshift"],function(t){var e=Br[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);o.prototype[t]=function(){var a=arguments;if(n&&!this.__chain__){var u=this.value();return e.apply(T(u)?u:[],a)}return this[r](function(c){return e.apply(T(c)?c:[],a)})}}),Kt(M.prototype,function(t,e){var r=o[e];if(r){var n=r.name+"";z.call(Ge,n)||(Ge[n]=[]),Ge[n].push({name:e,func:r})}}),Ge[on(i,Xt).name]=[{name:"wrapper",func:i}],M.prototype.clone=sh,M.prototype.reverse=ah,M.prototype.value=oh,o.prototype.at=kl,o.prototype.chain=Ml,o.prototype.commit=Bl,o.prototype.next=Ll,o.prototype.plant=Fl,o.prototype.reverse=Ul,o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=zl,o.prototype.first=o.prototype.head,hr&&(o.prototype[hr]=Nl),o},Ue=Mc();Oe?((Oe.exports=Ue)._=Ue,Un._=Ue):ht._=Ue}).call(Cr)})(es,es.exports);var vg=Object.defineProperty,gg=Object.defineProperties,_g=Object.getOwnPropertyDescriptors,Jo=Object.getOwnPropertySymbols,mg=Object.prototype.hasOwnProperty,yg=Object.prototype.propertyIsEnumerable,Qo=(b,s,i)=>s in b?vg(b,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):b[s]=i,Pn=(b,s)=>{for(var i in s||(s={}))mg.call(s,i)&&Qo(b,i,s[i]);if(Jo)for(var i of Jo(s))yg.call(s,i)&&Qo(b,i,s[i]);return b},wg=(b,s)=>gg(b,_g(s));function Ce(b,s,i){var f;const g=Yv(b);return((f=s.rpcMap)==null?void 0:f[g.reference])||`${dg}?chainId=${g.namespace}:${g.reference}&projectId=${i}`}function qe(b){return b.includes(":")?b.split(":")[1]:b}function nu(b){return b.map(s=>`${s.split(":")[0]}:${s.split(":")[1]}`)}function bg(b,s){const i=Object.keys(s.namespaces).filter(g=>g.includes(b));if(!i.length)return[];const f=[];return i.forEach(g=>{const P=s.namespaces[g].accounts;f.push(...P)}),f}function Pg(b={},s={}){const i=Vo(b),f=Vo(s);return es.exports.merge(i,f)}function Vo(b){var s,i,f,g;const P={};if(!Zv(b))return P;for(const[O,L]of Object.entries(b)){const ot=ru(O)?[O]:L.chains,it=L.methods||[],lt=L.events||[],nt=L.rpcMap||{},pt=Ir(O);P[pt]=wg(Pn(Pn({},P[pt]),L),{chains:Qi(ot,(s=P[pt])==null?void 0:s.chains),methods:Qi(it,(i=P[pt])==null?void 0:i.methods),events:Qi(lt,(f=P[pt])==null?void 0:f.events),rpcMap:Pn(Pn({},nt),(g=P[pt])==null?void 0:g.rpcMap)})}return P}function Eg(b){return b.includes(":")?b.split(":")[2]:b}function Cg(b){const s={};for(const[i,f]of Object.entries(b)){const g=f.methods||[],P=f.events||[],O=f.accounts||[],L=ru(i)?[i]:f.chains?f.chains:nu(f.accounts);s[i]={chains:L,methods:g,events:P,accounts:O}}return s}function Vi(b){return typeof b=="number"?b:b.includes("0x")?parseInt(b,16):b.includes(":")?Number(b.split(":")[1]):Number(b)}const iu={},Y=b=>iu[b],Ki=(b,s)=>{iu[b]=s};class Ig{constructor(s){this.name="polkadot",this.namespace=s.namespace,this.events=Y("events"),this.client=Y("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(s){this.namespace=Object.assign(this.namespace,s)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const s=this.namespace.chains[0];if(!s)throw new Error("ChainId not found");return s.split(":")[1]}request(s){return this.namespace.methods.includes(s.request.method)?this.client.request(s):this.getHttpProvider().request(s.request)}setDefaultChain(s,i){this.httpProviders[s]||this.setHttpProvider(s,i),this.chainId=s,this.events.emit(le.DEFAULT_CHAIN_CHANGED,`${this.name}:${s}`)}getAccounts(){const s=this.namespace.accounts;return s?s.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2])||[]:[]}createHttpProviders(){const s={};return this.namespace.chains.forEach(i=>{var f;const g=qe(i);s[g]=this.createHttpProvider(g,(f=this.namespace.rpcMap)==null?void 0:f[i])}),s}getHttpProvider(){const s=`${this.name}:${this.chainId}`,i=this.httpProviders[s];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${s} not found`);return i}setHttpProvider(s,i){const f=this.createHttpProvider(s,i);f&&(this.httpProviders[s]=f)}createHttpProvider(s,i){const f=i||Ce(s,this.namespace,this.client.core.projectId);if(!f)throw new Error(`No RPC url provided for chainId: ${s}`);return new Ie(new Ae(f,Y("disableProviderPing")))}}class Ag{constructor(s){this.name="eip155",this.namespace=s.namespace,this.events=Y("events"),this.client=Y("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(s){switch(s.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(s);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(s.request.method)?await this.client.request(s):this.getHttpProvider().request(s.request)}updateNamespace(s){this.namespace=Object.assign(this.namespace,s)}setDefaultChain(s,i){this.httpProviders[s]||this.setHttpProvider(parseInt(s),i),this.chainId=parseInt(s),this.events.emit(le.DEFAULT_CHAIN_CHANGED,`${this.name}:${s}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const s=this.namespace.chains[0];if(!s)throw new Error("ChainId not found");return s.split(":")[1]}createHttpProvider(s,i){const f=i||Ce(`${this.name}:${s}`,this.namespace,this.client.core.projectId);if(!f)throw new Error(`No RPC url provided for chainId: ${s}`);return new Ie(new Ae(f,Y("disableProviderPing")))}setHttpProvider(s,i){const f=this.createHttpProvider(s,i);f&&(this.httpProviders[s]=f)}createHttpProviders(){const s={};return this.namespace.chains.forEach(i=>{var f;const g=parseInt(qe(i));s[g]=this.createHttpProvider(g,(f=this.namespace.rpcMap)==null?void 0:f[i])}),s}getAccounts(){const s=this.namespace.accounts;return s?[...new Set(s.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}getHttpProvider(){const s=this.chainId,i=this.httpProviders[s];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${s} not found`);return i}async handleSwitchChain(s){var i,f;let g=s.request.params?(i=s.request.params[0])==null?void 0:i.chainId:"0x0";g=g.startsWith("0x")?g:`0x${g}`;const P=parseInt(g,16);if(this.isChainApproved(P))this.setDefaultChain(`${P}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:s.topic,request:{method:s.request.method,params:[{chainId:g}]},chainId:(f=this.namespace.chains)==null?void 0:f[0]}),this.setDefaultChain(`${P}`);else throw new Error(`Failed to switch to chain 'eip155:${P}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(s){return this.namespace.chains.includes(`${this.name}:${s}`)}}class Og{constructor(s){this.name="solana",this.namespace=s.namespace,this.events=Y("events"),this.client=Y("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(s){this.namespace=Object.assign(this.namespace,s)}requestAccounts(){return this.getAccounts()}request(s){return this.namespace.methods.includes(s.request.method)?this.client.request(s):this.getHttpProvider().request(s.request)}setDefaultChain(s,i){this.httpProviders[s]||this.setHttpProvider(s,i),this.chainId=s,this.events.emit(le.DEFAULT_CHAIN_CHANGED,`${this.name}:${s}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const s=this.namespace.chains[0];if(!s)throw new Error("ChainId not found");return s.split(":")[1]}getAccounts(){const s=this.namespace.accounts;return s?[...new Set(s.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const s={};return this.namespace.chains.forEach(i=>{var f;const g=qe(i);s[g]=this.createHttpProvider(g,(f=this.namespace.rpcMap)==null?void 0:f[i])}),s}getHttpProvider(){const s=`${this.name}:${this.chainId}`,i=this.httpProviders[s];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${s} not found`);return i}setHttpProvider(s,i){const f=this.createHttpProvider(s,i);f&&(this.httpProviders[s]=f)}createHttpProvider(s,i){const f=i||Ce(s,this.namespace,this.client.core.projectId);if(!f)throw new Error(`No RPC url provided for chainId: ${s}`);return new Ie(new Ae(f,Y("disableProviderPing")))}}class jg{constructor(s){this.name="cosmos",this.namespace=s.namespace,this.events=Y("events"),this.client=Y("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(s){this.namespace=Object.assign(this.namespace,s)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const s=this.namespace.chains[0];if(!s)throw new Error("ChainId not found");return s.split(":")[1]}request(s){return this.namespace.methods.includes(s.request.method)?this.client.request(s):this.getHttpProvider().request(s.request)}setDefaultChain(s,i){this.httpProviders[s]||this.setHttpProvider(s,i),this.chainId=s,this.events.emit(le.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const s=this.namespace.accounts;return s?[...new Set(s.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const s={};return this.namespace.chains.forEach(i=>{var f;const g=qe(i);s[g]=this.createHttpProvider(g,(f=this.namespace.rpcMap)==null?void 0:f[i])}),s}getHttpProvider(){const s=`${this.name}:${this.chainId}`,i=this.httpProviders[s];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${s} not found`);return i}setHttpProvider(s,i){const f=this.createHttpProvider(s,i);f&&(this.httpProviders[s]=f)}createHttpProvider(s,i){const f=i||Ce(s,this.namespace,this.client.core.projectId);if(!f)throw new Error(`No RPC url provided for chainId: ${s}`);return new Ie(new Ae(f,Y("disableProviderPing")))}}class xg{constructor(s){this.name="cip34",this.namespace=s.namespace,this.events=Y("events"),this.client=Y("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(s){this.namespace=Object.assign(this.namespace,s)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const s=this.namespace.chains[0];if(!s)throw new Error("ChainId not found");return s.split(":")[1]}request(s){return this.namespace.methods.includes(s.request.method)?this.client.request(s):this.getHttpProvider().request(s.request)}setDefaultChain(s,i){this.httpProviders[s]||this.setHttpProvider(s,i),this.chainId=s,this.events.emit(le.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const s=this.namespace.accounts;return s?[...new Set(s.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const s={};return this.namespace.chains.forEach(i=>{const f=this.getCardanoRPCUrl(i),g=qe(i);s[g]=this.createHttpProvider(g,f)}),s}getHttpProvider(){const s=`${this.name}:${this.chainId}`,i=this.httpProviders[s];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${s} not found`);return i}getCardanoRPCUrl(s){const i=this.namespace.rpcMap;if(i)return i[s]}setHttpProvider(s,i){const f=this.createHttpProvider(s,i);f&&(this.httpProviders[s]=f)}createHttpProvider(s,i){const f=i||this.getCardanoRPCUrl(s);if(!f)throw new Error(`No RPC url provided for chainId: ${s}`);return new Ie(new Ae(f,Y("disableProviderPing")))}}class Sg{constructor(s){this.name="elrond",this.namespace=s.namespace,this.events=Y("events"),this.client=Y("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(s){this.namespace=Object.assign(this.namespace,s)}requestAccounts(){return this.getAccounts()}request(s){return this.namespace.methods.includes(s.request.method)?this.client.request(s):this.getHttpProvider().request(s.request)}setDefaultChain(s,i){this.httpProviders[s]||this.setHttpProvider(s,i),this.chainId=s,this.events.emit(le.DEFAULT_CHAIN_CHANGED,`${this.name}:${s}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const s=this.namespace.chains[0];if(!s)throw new Error("ChainId not found");return s.split(":")[1]}getAccounts(){const s=this.namespace.accounts;return s?[...new Set(s.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const s={};return this.namespace.chains.forEach(i=>{var f;const g=qe(i);s[g]=this.createHttpProvider(g,(f=this.namespace.rpcMap)==null?void 0:f[i])}),s}getHttpProvider(){const s=`${this.name}:${this.chainId}`,i=this.httpProviders[s];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${s} not found`);return i}setHttpProvider(s,i){const f=this.createHttpProvider(s,i);f&&(this.httpProviders[s]=f)}createHttpProvider(s,i){const f=i||Ce(s,this.namespace,this.client.core.projectId);if(!f)throw new Error(`No RPC url provided for chainId: ${s}`);return new Ie(new Ae(f,Y("disableProviderPing")))}}class Dg{constructor(s){this.name="multiversx",this.namespace=s.namespace,this.events=Y("events"),this.client=Y("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(s){this.namespace=Object.assign(this.namespace,s)}requestAccounts(){return this.getAccounts()}request(s){return this.namespace.methods.includes(s.request.method)?this.client.request(s):this.getHttpProvider().request(s.request)}setDefaultChain(s,i){this.httpProviders[s]||this.setHttpProvider(s,i),this.chainId=s,this.events.emit(le.DEFAULT_CHAIN_CHANGED,`${this.name}:${s}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const s=this.namespace.chains[0];if(!s)throw new Error("ChainId not found");return s.split(":")[1]}getAccounts(){const s=this.namespace.accounts;return s?[...new Set(s.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const s={};return this.namespace.chains.forEach(i=>{var f;const g=qe(i);s[g]=this.createHttpProvider(g,(f=this.namespace.rpcMap)==null?void 0:f[i])}),s}getHttpProvider(){const s=`${this.name}:${this.chainId}`,i=this.httpProviders[s];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${s} not found`);return i}setHttpProvider(s,i){const f=this.createHttpProvider(s,i);f&&(this.httpProviders[s]=f)}createHttpProvider(s,i){const f=i||Ce(s,this.namespace,this.client.core.projectId);if(!f)throw new Error(`No RPC url provided for chainId: ${s}`);return new Ie(new Ae(f,Y("disableProviderPing")))}}class Tg{constructor(s){this.name="near",this.namespace=s.namespace,this.events=Y("events"),this.client=Y("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(s){this.namespace=Object.assign(this.namespace,s)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const s=this.namespace.chains[0];if(!s)throw new Error("ChainId not found");return s.split(":")[1]}request(s){return this.namespace.methods.includes(s.request.method)?this.client.request(s):this.getHttpProvider().request(s.request)}setDefaultChain(s,i){if(this.chainId=s,!this.httpProviders[s]){const f=i||Ce(`${this.name}:${s}`,this.namespace);if(!f)throw new Error(`No RPC url provided for chainId: ${s}`);this.setHttpProvider(s,f)}this.events.emit(le.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const s=this.namespace.accounts;return s?s.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2])||[]:[]}createHttpProviders(){const s={};return this.namespace.chains.forEach(i=>{var f;s[i]=this.createHttpProvider(i,(f=this.namespace.rpcMap)==null?void 0:f[i])}),s}getHttpProvider(){const s=`${this.name}:${this.chainId}`,i=this.httpProviders[s];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${s} not found`);return i}setHttpProvider(s,i){const f=this.createHttpProvider(s,i);f&&(this.httpProviders[s]=f)}createHttpProvider(s,i){const f=i||Ce(s,this.namespace);return typeof f>"u"?void 0:new Ie(new Ae(f,Y("disableProviderPing")))}}var $g=Object.defineProperty,Rg=Object.defineProperties,Hg=Object.getOwnPropertyDescriptors,Ko=Object.getOwnPropertySymbols,qg=Object.prototype.hasOwnProperty,kg=Object.prototype.propertyIsEnumerable,Zo=(b,s,i)=>s in b?$g(b,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):b[s]=i,En=(b,s)=>{for(var i in s||(s={}))qg.call(s,i)&&Zo(b,i,s[i]);if(Ko)for(var i of Ko(s))kg.call(s,i)&&Zo(b,i,s[i]);return b},Zi=(b,s)=>Rg(b,Hg(s));class is{constructor(s){this.events=new Vv,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=s,this.logger=typeof(s==null?void 0:s.logger)<"u"&&typeof(s==null?void 0:s.logger)!="string"?s.logger:Lo.pino(Lo.getDefaultLoggerOptions({level:(s==null?void 0:s.logger)||Wo})),this.disableProviderPing=(s==null?void 0:s.disableProviderPing)||!1}static async init(s){const i=new is(s);return await i.initialize(),i}async request(s,i){const[f,g]=this.validateChain(i);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(f).request({request:En({},s),chainId:`${f}:${g}`,topic:this.session.topic})}sendAsync(s,i,f){const g=new Date().getTime();this.request(s,f).then(P=>i(null,rg(g,P))).catch(P=>i(P,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 s;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(s=this.session)==null?void 0:s.topic,reason:Xi("USER_DISCONNECTED")}),await this.cleanup()}async connect(s){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(s),await this.cleanupPendingPairings(),!s.skipPairing)return await this.pair(s.pairingTopic)}on(s,i){this.events.on(s,i)}once(s,i){this.events.once(s,i)}removeListener(s,i){this.events.removeListener(s,i)}off(s,i){this.events.off(s,i)}get isWalletConnect(){return!0}async pair(s){this.shouldAbortPairingAttempt=!1;let i=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(i>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:f,approval:g}=await this.client.connect({pairingTopic:s,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});f&&(this.uri=f,this.events.emit("display_uri",f)),await g().then(P=>{this.session=P,this.namespaces||(this.namespaces=Cg(P.namespaces),this.persist("namespaces",this.namespaces))}).catch(P=>{if(P.message!==ng)throw P;i++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(s,i){try{if(!this.session)return;const[f,g]=this.validateChain(s);this.getProvider(f).setDefaultChain(g,i)}catch(f){if(!/Please call connect/.test(f.message))throw f}}async cleanupPendingPairings(s={}){this.logger.info("Cleaning up inactive pairings...");const i=this.client.pairing.getAll();if(Or(i)){for(const f of i)s.deletePairings?this.client.core.expirer.set(f.topic,0):await this.client.core.relayer.subscriber.unsubscribe(f.topic);this.logger.info(`Inactive pairings cleared: ${i.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 s=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[s]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await ig.init({logger:this.providerOpts.logger||Wo,relayUrl:this.providerOpts.relayUrl||fg,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,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()");const s=[...new Set(Object.keys(this.session.namespaces).map(i=>Ir(i)))];Ki("client",this.client),Ki("events",this.events),Ki("disableProviderPing",this.disableProviderPing),s.forEach(i=>{if(!this.session)return;const f=bg(i,this.session),g=nu(f),P=Pg(this.namespaces,this.optionalNamespaces),O=Zi(En({},P[i]),{accounts:f,chains:g});switch(i){case"eip155":this.rpcProviders[i]=new Ag({namespace:O});break;case"solana":this.rpcProviders[i]=new Og({namespace:O});break;case"cosmos":this.rpcProviders[i]=new jg({namespace:O});break;case"polkadot":this.rpcProviders[i]=new Ig({namespace:O});break;case"cip34":this.rpcProviders[i]=new xg({namespace:O});break;case"elrond":this.rpcProviders[i]=new Sg({namespace:O});break;case"multiversx":this.rpcProviders[i]=new Dg({namespace:O});break;case"near":this.rpcProviders[i]=new Tg({namespace:O});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",s=>{this.events.emit("session_ping",s)}),this.client.on("session_event",s=>{const{params:i}=s,{event:f}=i;if(f.name==="accountsChanged"){const g=f.data;g&&Or(g)&&this.events.emit("accountsChanged",g.map(Eg))}else if(f.name==="chainChanged"){const g=i.chainId,P=i.event.data,O=Ir(g),L=Vi(g)!==Vi(P)?`${O}:${Vi(P)}`:g;this.onChainChanged(L)}else this.events.emit(f.name,f.data);this.events.emit("session_event",s)}),this.client.on("session_update",({topic:s,params:i})=>{var f;const{namespaces:g}=i,P=(f=this.client)==null?void 0:f.session.get(s);this.session=Zi(En({},P),{namespaces:g}),this.onSessionUpdate(),this.events.emit("session_update",{topic:s,params:i})}),this.client.on("session_delete",async s=>{await this.cleanup(),this.events.emit("session_delete",s),this.events.emit("disconnect",Zi(En({},Xi("USER_DISCONNECTED")),{data:s.topic}))}),this.on(le.DEFAULT_CHAIN_CHANGED,s=>{this.onChainChanged(s,!0)})}getProvider(s){if(!this.rpcProviders[s])throw new Error(`Provider not found: ${s}`);return this.rpcProviders[s]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(s=>{var i;this.getProvider(s).updateNamespace((i=this.session)==null?void 0:i.namespaces[s])})}setNamespaces(s){const{namespaces:i,optionalNamespaces:f,sessionProperties:g}=s;i&&Object.keys(i).length&&(this.namespaces=i),f&&Object.keys(f).length&&(this.optionalNamespaces=f),this.sessionProperties=g,this.persist("namespaces",i),this.persist("optionalNamespaces",f)}validateChain(s){const[i,f]=(s==null?void 0:s.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[i,f];if(i&&!Object.keys(this.namespaces||{}).map(O=>Ir(O)).includes(i))throw new Error(`Namespace '${i}' is not configured. Please call connect() first with namespace config.`);if(i&&f)return[i,f];const g=Ir(Object.keys(this.namespaces)[0]),P=this.rpcProviders[g].getDefaultChain();return[g,P]}async requestAccounts(){const[s]=this.validateChain();return await this.getProvider(s).requestAccounts()}onChainChanged(s,i=!1){var f;if(!this.namespaces)return;const[g,P]=this.validateChain(s);i||this.getProvider(g).setDefaultChain(P),((f=this.namespaces[g])!=null?f:this.namespaces[`${g}:${P}`]).defaultChain=P,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",P)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(s,i){this.client.core.storage.setItem(`${Go}/${s}`,i)}async getFromStore(s){return await this.client.core.storage.getItem(`${Go}/${s}`)}}const Mg=is,Bg="wc",Lg="ethereum_provider",Ng=`${Bg}@2:${Lg}:`,Fg="https://rpc.walletconnect.com/v1/",rs=["eth_sendTransaction","personal_sign"],Ug=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],ns=["chainChanged","accountsChanged"],zg=["chainChanged","accountsChanged","message","disconnect","connect"];var Wg=Object.defineProperty,Gg=Object.defineProperties,Jg=Object.getOwnPropertyDescriptors,Yo=Object.getOwnPropertySymbols,Qg=Object.prototype.hasOwnProperty,Vg=Object.prototype.propertyIsEnumerable,Xo=(b,s,i)=>s in b?Wg(b,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):b[s]=i,Ar=(b,s)=>{for(var i in s||(s={}))Qg.call(s,i)&&Xo(b,i,s[i]);if(Yo)for(var i of Yo(s))Vg.call(s,i)&&Xo(b,i,s[i]);return b},tu=(b,s)=>Gg(b,Jg(s));function Cn(b){return Number(b[0].split(":")[1])}function Yi(b){return`0x${b.toString(16)}`}function Kg(b){const{chains:s,optionalChains:i,methods:f,optionalMethods:g,events:P,optionalEvents:O,rpcMap:L}=b;if(!Or(s))throw new Error("Invalid chains");const ot={chains:s,methods:f||rs,events:P||ns,rpcMap:Ar({},s.length?{[Cn(s)]:L[Cn(s)]}:{})},it=P==null?void 0:P.filter(ut=>!ns.includes(ut)),lt=f==null?void 0:f.filter(ut=>!rs.includes(ut));if(!i&&!O&&!g&&!(it!=null&&it.length)&&!(lt!=null&<.length))return{required:s.length?ot:void 0};const nt=(it==null?void 0:it.length)&&(lt==null?void 0:lt.length)||!i,pt={chains:[...new Set(nt?ot.chains.concat(i||[]):i)],methods:[...new Set(ot.methods.concat(g!=null&&g.length?g:Ug))],events:[...new Set(ot.events.concat(O!=null&&O.length?O:zg))],rpcMap:L};return{required:s.length?ot:void 0,optional:i.length?pt:void 0}}class ss{constructor(){this.events=new eu.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=Ng,this.on=(s,i)=>(this.events.on(s,i),this),this.once=(s,i)=>(this.events.once(s,i),this),this.removeListener=(s,i)=>(this.events.removeListener(s,i),this),this.off=(s,i)=>(this.events.off(s,i),this),this.parseAccount=s=>this.isCompatibleChainId(s)?this.parseAccountId(s).address:s,this.signer={},this.rpc={}}static async init(s){const i=new ss;return await i.initialize(s),i}async request(s){return await this.signer.request(s,this.formatChainId(this.chainId))}sendAsync(s,i){this.signer.sendAsync(s,i,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(s){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(s);const{required:i,optional:f}=Kg(this.rpc);try{const g=await new Promise(async(O,L)=>{var ot;this.rpc.showQrModal&&((ot=this.modal)==null||ot.subscribeModal(it=>{!it.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),L(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(tu(Ar({namespaces:Ar({},i&&{[this.namespace]:i})},f&&{optionalNamespaces:{[this.namespace]:f}}),{pairingTopic:s==null?void 0:s.pairingTopic})).then(it=>{O(it)}).catch(it=>{L(new Error(it.message))})});if(!g)return;const P=Xv(g.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:P),this.setAccounts(P),this.events.emit("connect",{chainId:Yi(this.chainId)})}catch(g){throw this.signer.logger.error(g),g}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",s=>{const{params:i}=s,{event:f}=i;f.name==="accountsChanged"?(this.accounts=this.parseAccounts(f.data),this.events.emit("accountsChanged",this.accounts)):f.name==="chainChanged"?this.setChainId(this.formatChainId(f.data)):this.events.emit(f.name,f.data),this.events.emit("session_event",s)}),this.signer.on("chainChanged",s=>{const i=parseInt(s);this.chainId=i,this.events.emit("chainChanged",Yi(this.chainId)),this.persist()}),this.signer.on("session_update",s=>{this.events.emit("session_update",s)}),this.signer.on("session_delete",s=>{this.reset(),this.events.emit("session_delete",s),this.events.emit("disconnect",tu(Ar({},Xi("USER_DISCONNECTED")),{data:s.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",s=>{var i,f;this.rpc.showQrModal&&((i=this.modal)==null||i.closeModal(),(f=this.modal)==null||f.openModal({uri:s})),this.events.emit("display_uri",s)})}switchEthereumChain(s){this.request({method:"wallet_switchEthereumChain",params:[{chainId:s.toString(16)}]})}isCompatibleChainId(s){return typeof s=="string"?s.startsWith(`${this.namespace}:`):!1}formatChainId(s){return`${this.namespace}:${s}`}parseChainId(s){return Number(s.split(":")[1])}setChainIds(s){const i=s.filter(f=>this.isCompatibleChainId(f)).map(f=>this.parseChainId(f));i.length&&(this.chainId=i[0],this.events.emit("chainChanged",Yi(this.chainId)),this.persist())}setChainId(s){if(this.isCompatibleChainId(s)){const i=this.parseChainId(s);this.chainId=i,this.switchEthereumChain(i)}}parseAccountId(s){const[i,f,g]=s.split(":");return{chainId:`${i}:${f}`,address:g}}setAccounts(s){this.accounts=s.filter(i=>this.parseChainId(this.parseAccountId(i).chainId)===this.chainId).map(i=>this.parseAccountId(i).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(s){var i,f;const g=(i=s==null?void 0:s.chains)!=null?i:[],P=(f=s==null?void 0:s.optionalChains)!=null?f:[],O=g.concat(P);if(!O.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const L=g.length?(s==null?void 0:s.methods)||rs:[],ot=g.length?(s==null?void 0:s.events)||ns:[],it=(s==null?void 0:s.optionalMethods)||[],lt=(s==null?void 0:s.optionalEvents)||[],nt=(s==null?void 0:s.rpcMap)||this.buildRpcMap(O,s.projectId),pt=(s==null?void 0:s.qrModalOptions)||void 0;return{chains:g==null?void 0:g.map(ut=>this.formatChainId(ut)),optionalChains:P.map(ut=>this.formatChainId(ut)),methods:L,events:ot,optionalMethods:it,optionalEvents:lt,rpcMap:nt,showQrModal:!!(s!=null&&s.showQrModal),qrModalOptions:pt,projectId:s.projectId,metadata:s.metadata}}buildRpcMap(s,i){const f={};return s.forEach(g=>{f[g]=this.getRpcUrl(g,i)}),f}async initialize(s){if(this.rpc=this.getRpcConfig(s),this.chainId=this.rpc.chains.length?Cn(this.rpc.chains):Cn(this.rpc.optionalChains),this.signer=await Mg.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:s.disableProviderPing,relayUrl:s.relayUrl,storageOptions:s.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let i;try{const{WalletConnectModal:f}=await Kv(()=>import("./index-3iD33HDP.js").then(g=>g.i),__vite__mapDeps([0,1,2]));i=f}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(i)try{this.modal=new i(Ar({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(f){throw this.signer.logger.error(f),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(s){if(!s)return;const{chains:i,optionalChains:f,rpcMap:g}=s;i&&Or(i)&&(this.rpc.chains=i.map(P=>this.formatChainId(P)),i.forEach(P=>{this.rpc.rpcMap[P]=(g==null?void 0:g[P])||this.getRpcUrl(P)})),f&&Or(f)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=f==null?void 0:f.map(P=>this.formatChainId(P)),f.forEach(P=>{this.rpc.rpcMap[P]=(g==null?void 0:g[P])||this.getRpcUrl(P)}))}getRpcUrl(s,i){var f;return((f=this.rpc.rpcMap)==null?void 0:f[s])||`${Fg}?chainId=eip155:${s}&projectId=${i||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const s=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),i=this.session.namespaces[`${this.namespace}:${s}`]?this.session.namespaces[`${this.namespace}:${s}`]:this.session.namespaces[this.namespace];this.setChainIds(s?[this.formatChainId(s)]:i==null?void 0:i.accounts),this.setAccounts(i==null?void 0:i.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(s){return typeof s=="string"||s instanceof String?[this.parseAccount(s)]:s.map(i=>this.parseAccount(i))}}const t0=ss;export{t0 as EthereumProvider,zg as OPTIONAL_EVENTS,Ug as OPTIONAL_METHODS,ns as REQUIRED_EVENTS,rs as REQUIRED_METHODS,ss as default};
|
|
27
|
+
}`;var H=Ho(function(){return N(u,A+"return "+w).apply(i,c)});if(H.source=w,ki(H))throw H;return H}function tv(t){return F(t).toLowerCase()}function ev(t){return F(t).toUpperCase()}function rv(t,e,r){if(t=F(t),t&&(r||e===i))return Us(t);if(!t||!(e=xt(e)))return t;var n=Gt(t),a=Gt(e),u=zs(n,a),c=Ws(n,a)+1;return Pe(n,u,c).join("")}function nv(t,e,r){if(t=F(t),t&&(r||e===i))return t.slice(0,Js(t)+1);if(!t||!(e=xt(e)))return t;var n=Gt(t),a=Ws(n,Gt(e))+1;return Pe(n,0,a).join("")}function iv(t,e,r){if(t=F(t),t&&(r||e===i))return t.replace(kn,"");if(!t||!(e=xt(e)))return t;var n=Gt(t),a=zs(n,Gt(e));return Pe(n,a).join("")}function sv(t,e){var r=In,n=Rt;if(X(e)){var a="separator"in e?e.separator:a;r="length"in e?$(e.length):r,n="omission"in e?xt(e.omission):n}t=F(t);var u=t.length;if(Ne(t)){var c=Gt(t);u=c.length}if(r>=u)return t;var h=r-Fe(n);if(h<1)return n;var p=c?Pe(c,0,h).join(""):t.slice(0,h);if(a===i)return p+n;if(c&&(h+=p.length-h),Mi(a)){if(t.slice(h).search(a)){var m,y=p;for(a.global||(a=ti(a.source,F(fs.exec(a))+"g")),a.lastIndex=0;m=a.exec(y);)var w=m.index;p=p.slice(0,w===i?h:w)}}else if(t.indexOf(xt(a),h)!=h){var C=p.lastIndexOf(a);C>-1&&(p=p.slice(0,C))}return p+n}function av(t){return t=F(t),t&&gu.test(t)?t.replace(us,Rc):t}var ov=Ve(function(t,e,r){return t+(r?" ":"")+e.toUpperCase()}),Ni=Ha("toUpperCase");function Ro(t,e,r){return t=F(t),e=r?i:e,e===i?xc(t)?kc(t):wc(t):t.match(e)||[]}var Ho=q(function(t,e){try{return Ot(t,i,e)}catch(r){return ki(r)?r:new D(r)}}),uv=oe(function(t,e){return qt(e,function(r){r=Yt(r),se(t,r,Hi(t[r],t))}),t});function cv(t){var e=t==null?0:t.length,r=j();return t=e?Z(t,function(n){if(typeof n[1]!="function")throw new kt(O);return[r(n[0]),n[1]]}):[],q(function(n){for(var a=-1;++a<e;){var u=t[a];if(Ot(u[0],this,n))return Ot(u[1],this,n)}})}function hv(t){return Rh(Bt(t,nt))}function Fi(t){return function(){return t}}function fv(t,e){return t==null||t!==t?e:t}var lv=ka(),pv=ka(!0);function Ct(t){return t}function Ui(t){return pa(typeof t=="function"?t:Bt(t,nt))}function dv(t){return va(Bt(t,nt))}function vv(t,e){return ga(t,Bt(e,nt))}var gv=q(function(t,e){return function(r){return _r(r,t,e)}}),_v=q(function(t,e){return function(r){return _r(t,r,e)}});function zi(t,e,r){var n=ct(e),a=en(e,n);r==null&&!(X(e)&&(a.length||!n.length))&&(r=e,e=t,t=this,a=en(e,ct(e)));var u=!(X(r)&&"chain"in r)||!!r.chain,c=ce(t);return qt(a,function(h){var p=e[h];t[h]=p,c&&(t.prototype[h]=function(){var m=this.__chain__;if(u||m){var y=t(this.__wrapped__),w=y.__actions__=bt(this.__actions__);return w.push({func:p,args:arguments,thisArg:t}),y.__chain__=m,y}return p.apply(t,ge([this.value()],arguments))})}),t}function mv(){return ht._===this&&(ht._=Uc),this}function Wi(){}function yv(t){return t=$(t),q(function(e){return _a(e,t)})}var wv=Pi(Z),bv=Pi(Ms),Pv=Pi(Jn);function qo(t){return xi(t)?Qn(Yt(t)):Zh(t)}function Ev(t){return function(e){return t==null?i:Te(t,e)}}var Cv=Ba(),Iv=Ba(!0);function Gi(){return[]}function Ji(){return!1}function Av(){return{}}function Ov(){return""}function jv(){return!0}function xv(t,e){if(t=$(t),t<1||t>J)return[];var r=dt,n=vt(t,dt);e=j(e),t-=dt;for(var a=Zn(n,e);++r<t;)e(r);return a}function Sv(t){return T(t)?Z(t,Yt):St(t)?[t]:bt(eo(F(t)))}function Dv(t){var e=++Nc;return F(t)+e}var Tv=un(function(t,e){return t+e},0),$v=Ei("ceil"),Rv=un(function(t,e){return t/e},1),Hv=Ei("floor");function qv(t){return t&&t.length?tn(t,Ct,ui):i}function kv(t,e){return t&&t.length?tn(t,j(e,2),ui):i}function Mv(t){return Ns(t,Ct)}function Bv(t,e){return Ns(t,j(e,2))}function Lv(t){return t&&t.length?tn(t,Ct,li):i}function Nv(t,e){return t&&t.length?tn(t,j(e,2),li):i}var Fv=un(function(t,e){return t*e},1),Uv=Ei("round"),zv=un(function(t,e){return t-e},0);function Wv(t){return t&&t.length?Kn(t,Ct):0}function Gv(t,e){return t&&t.length?Kn(t,j(e,2)):0}return o.after=dp,o.ary=lo,o.assign=ed,o.assignIn=Oo,o.assignInWith=bn,o.assignWith=rd,o.at=nd,o.before=po,o.bind=Hi,o.bindAll=uv,o.bindKey=vo,o.castArray=Ap,o.chain=co,o.chunk=Hf,o.compact=qf,o.concat=kf,o.cond=cv,o.conforms=hv,o.constant=Fi,o.countBy=Wl,o.create=id,o.curry=go,o.curryRight=_o,o.debounce=mo,o.defaults=sd,o.defaultsDeep=ad,o.defer=vp,o.delay=gp,o.difference=Mf,o.differenceBy=Bf,o.differenceWith=Lf,o.drop=Nf,o.dropRight=Ff,o.dropRightWhile=Uf,o.dropWhile=zf,o.fill=Wf,o.filter=Jl,o.flatMap=Kl,o.flatMapDeep=Zl,o.flatMapDepth=Yl,o.flatten=so,o.flattenDeep=Gf,o.flattenDepth=Jf,o.flip=_p,o.flow=lv,o.flowRight=pv,o.fromPairs=Qf,o.functions=pd,o.functionsIn=dd,o.groupBy=Xl,o.initial=Kf,o.intersection=Zf,o.intersectionBy=Yf,o.intersectionWith=Xf,o.invert=gd,o.invertBy=_d,o.invokeMap=ep,o.iteratee=Ui,o.keyBy=rp,o.keys=ct,o.keysIn=Et,o.map=vn,o.mapKeys=yd,o.mapValues=wd,o.matches=dv,o.matchesProperty=vv,o.memoize=_n,o.merge=bd,o.mergeWith=jo,o.method=gv,o.methodOf=_v,o.mixin=zi,o.negate=mn,o.nthArg=yv,o.omit=Pd,o.omitBy=Ed,o.once=mp,o.orderBy=np,o.over=wv,o.overArgs=yp,o.overEvery=bv,o.overSome=Pv,o.partial=qi,o.partialRight=yo,o.partition=ip,o.pick=Cd,o.pickBy=xo,o.property=qo,o.propertyOf=Ev,o.pull=nl,o.pullAll=oo,o.pullAllBy=il,o.pullAllWith=sl,o.pullAt=al,o.range=Cv,o.rangeRight=Iv,o.rearg=wp,o.reject=op,o.remove=ol,o.rest=bp,o.reverse=$i,o.sampleSize=cp,o.set=Ad,o.setWith=Od,o.shuffle=hp,o.slice=ul,o.sortBy=pp,o.sortedUniq=vl,o.sortedUniqBy=gl,o.split=Kd,o.spread=Pp,o.tail=_l,o.take=ml,o.takeRight=yl,o.takeRightWhile=wl,o.takeWhile=bl,o.tap=ql,o.throttle=Ep,o.thru=dn,o.toArray=Co,o.toPairs=So,o.toPairsIn=Do,o.toPath=Sv,o.toPlainObject=Ao,o.transform=jd,o.unary=Cp,o.union=Pl,o.unionBy=El,o.unionWith=Cl,o.uniq=Il,o.uniqBy=Al,o.uniqWith=Ol,o.unset=xd,o.unzip=Ri,o.unzipWith=uo,o.update=Sd,o.updateWith=Dd,o.values=Ye,o.valuesIn=Td,o.without=jl,o.words=Ro,o.wrap=Ip,o.xor=xl,o.xorBy=Sl,o.xorWith=Dl,o.zip=Tl,o.zipObject=$l,o.zipObjectDeep=Rl,o.zipWith=Hl,o.entries=So,o.entriesIn=Do,o.extend=Oo,o.extendWith=bn,zi(o,o),o.add=Tv,o.attempt=Ho,o.camelCase=qd,o.capitalize=To,o.ceil=$v,o.clamp=$d,o.clone=Op,o.cloneDeep=xp,o.cloneDeepWith=Sp,o.cloneWith=jp,o.conformsTo=Dp,o.deburr=$o,o.defaultTo=fv,o.divide=Rv,o.endsWith=kd,o.eq=Qt,o.escape=Md,o.escapeRegExp=Bd,o.every=Gl,o.find=Ql,o.findIndex=no,o.findKey=od,o.findLast=Vl,o.findLastIndex=io,o.findLastKey=ud,o.floor=Hv,o.forEach=ho,o.forEachRight=fo,o.forIn=cd,o.forInRight=hd,o.forOwn=fd,o.forOwnRight=ld,o.get=Bi,o.gt=Tp,o.gte=$p,o.has=vd,o.hasIn=Li,o.head=ao,o.identity=Ct,o.includes=tp,o.indexOf=Vf,o.inRange=Rd,o.invoke=md,o.isArguments=He,o.isArray=T,o.isArrayBuffer=Rp,o.isArrayLike=Pt,o.isArrayLikeObject=et,o.isBoolean=Hp,o.isBuffer=Ee,o.isDate=qp,o.isElement=kp,o.isEmpty=Mp,o.isEqual=Bp,o.isEqualWith=Lp,o.isError=ki,o.isFinite=Np,o.isFunction=ce,o.isInteger=wo,o.isLength=yn,o.isMap=bo,o.isMatch=Fp,o.isMatchWith=Up,o.isNaN=zp,o.isNative=Wp,o.isNil=Jp,o.isNull=Gp,o.isNumber=Po,o.isObject=X,o.isObjectLike=tt,o.isPlainObject=Er,o.isRegExp=Mi,o.isSafeInteger=Qp,o.isSet=Eo,o.isString=wn,o.isSymbol=St,o.isTypedArray=Ze,o.isUndefined=Vp,o.isWeakMap=Kp,o.isWeakSet=Zp,o.join=tl,o.kebabCase=Ld,o.last=Nt,o.lastIndexOf=el,o.lowerCase=Nd,o.lowerFirst=Fd,o.lt=Yp,o.lte=Xp,o.max=qv,o.maxBy=kv,o.mean=Mv,o.meanBy=Bv,o.min=Lv,o.minBy=Nv,o.stubArray=Gi,o.stubFalse=Ji,o.stubObject=Av,o.stubString=Ov,o.stubTrue=jv,o.multiply=Fv,o.nth=rl,o.noConflict=mv,o.noop=Wi,o.now=gn,o.pad=Ud,o.padEnd=zd,o.padStart=Wd,o.parseInt=Gd,o.random=Hd,o.reduce=sp,o.reduceRight=ap,o.repeat=Jd,o.replace=Qd,o.result=Id,o.round=Uv,o.runInContext=l,o.sample=up,o.size=fp,o.snakeCase=Vd,o.some=lp,o.sortedIndex=cl,o.sortedIndexBy=hl,o.sortedIndexOf=fl,o.sortedLastIndex=ll,o.sortedLastIndexBy=pl,o.sortedLastIndexOf=dl,o.startCase=Zd,o.startsWith=Yd,o.subtract=zv,o.sum=Wv,o.sumBy=Gv,o.template=Xd,o.times=xv,o.toFinite=he,o.toInteger=$,o.toLength=Io,o.toLower=tv,o.toNumber=Ft,o.toSafeInteger=td,o.toString=F,o.toUpper=ev,o.trim=rv,o.trimEnd=nv,o.trimStart=iv,o.truncate=sv,o.unescape=av,o.uniqueId=Dv,o.upperCase=ov,o.upperFirst=Ni,o.each=ho,o.eachRight=fo,o.first=ao,zi(o,function(){var t={};return Kt(o,function(e,r){z.call(o.prototype,r)||(t[r]=e)}),t}(),{chain:!1}),o.VERSION=f,qt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){o[t].placeholder=o}),qt(["drop","take"],function(t,e){M.prototype[t]=function(r){r=r===i?1:at($(r),0);var n=this.__filtered__&&!e?new M(this):this.clone();return n.__filtered__?n.__takeCount__=vt(r,n.__takeCount__):n.__views__.push({size:vt(r,dt),type:t+(n.__dir__<0?"Right":"")}),n},M.prototype[t+"Right"]=function(r){return this.reverse()[t](r).reverse()}}),qt(["filter","map","takeWhile"],function(t,e){var r=e+1,n=r==v||r==R;M.prototype[t]=function(a){var u=this.clone();return u.__iteratees__.push({iteratee:j(a,3),type:r}),u.__filtered__=u.__filtered__||n,u}}),qt(["head","last"],function(t,e){var r="take"+(e?"Right":"");M.prototype[t]=function(){return this[r](1).value()[0]}}),qt(["initial","tail"],function(t,e){var r="drop"+(e?"":"Right");M.prototype[t]=function(){return this.__filtered__?new M(this):this[r](1)}}),M.prototype.compact=function(){return this.filter(Ct)},M.prototype.find=function(t){return this.filter(t).head()},M.prototype.findLast=function(t){return this.reverse().find(t)},M.prototype.invokeMap=q(function(t,e){return typeof t=="function"?new M(this):this.map(function(r){return _r(r,t,e)})}),M.prototype.reject=function(t){return this.filter(mn(j(t)))},M.prototype.slice=function(t,e){t=$(t);var r=this;return r.__filtered__&&(t>0||e<0)?new M(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==i&&(e=$(e),r=e<0?r.dropRight(-e):r.take(e-t)),r)},M.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},M.prototype.toArray=function(){return this.take(dt)},Kt(M.prototype,function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),a=o[n?"take"+(e=="last"?"Right":""):e],u=n||/^find/.test(e);a&&(o.prototype[e]=function(){var c=this.__wrapped__,h=n?[1]:arguments,p=c instanceof M,m=h[0],y=p||T(c),w=function(k){var B=a.apply(o,ge([k],h));return n&&C?B[0]:B};y&&r&&typeof m=="function"&&m.length!=1&&(p=y=!1);var C=this.__chain__,A=!!this.__actions__.length,x=u&&!C,H=p&&!A;if(!u&&y){c=H?c:new M(this);var S=t.apply(c,h);return S.__actions__.push({func:dn,args:[w],thisArg:i}),new Mt(S,C)}return x&&H?t.apply(this,h):(S=this.thru(w),x?n?S.value()[0]:S.value():S)})}),qt(["pop","push","shift","sort","splice","unshift"],function(t){var e=Br[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);o.prototype[t]=function(){var a=arguments;if(n&&!this.__chain__){var u=this.value();return e.apply(T(u)?u:[],a)}return this[r](function(c){return e.apply(T(c)?c:[],a)})}}),Kt(M.prototype,function(t,e){var r=o[e];if(r){var n=r.name+"";z.call(Ge,n)||(Ge[n]=[]),Ge[n].push({name:e,func:r})}}),Ge[on(i,Xt).name]=[{name:"wrapper",func:i}],M.prototype.clone=sh,M.prototype.reverse=ah,M.prototype.value=oh,o.prototype.at=kl,o.prototype.chain=Ml,o.prototype.commit=Bl,o.prototype.next=Ll,o.prototype.plant=Fl,o.prototype.reverse=Ul,o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=zl,o.prototype.first=o.prototype.head,hr&&(o.prototype[hr]=Nl),o},Ue=Mc();Oe?((Oe.exports=Ue)._=Ue,Un._=Ue):ht._=Ue}).call(Cr)})(es,es.exports);var vg=Object.defineProperty,gg=Object.defineProperties,_g=Object.getOwnPropertyDescriptors,Jo=Object.getOwnPropertySymbols,mg=Object.prototype.hasOwnProperty,yg=Object.prototype.propertyIsEnumerable,Qo=(b,s,i)=>s in b?vg(b,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):b[s]=i,Pn=(b,s)=>{for(var i in s||(s={}))mg.call(s,i)&&Qo(b,i,s[i]);if(Jo)for(var i of Jo(s))yg.call(s,i)&&Qo(b,i,s[i]);return b},wg=(b,s)=>gg(b,_g(s));function Ce(b,s,i){var f;const g=Yv(b);return((f=s.rpcMap)==null?void 0:f[g.reference])||`${dg}?chainId=${g.namespace}:${g.reference}&projectId=${i}`}function qe(b){return b.includes(":")?b.split(":")[1]:b}function nu(b){return b.map(s=>`${s.split(":")[0]}:${s.split(":")[1]}`)}function bg(b,s){const i=Object.keys(s.namespaces).filter(g=>g.includes(b));if(!i.length)return[];const f=[];return i.forEach(g=>{const P=s.namespaces[g].accounts;f.push(...P)}),f}function Pg(b={},s={}){const i=Vo(b),f=Vo(s);return es.exports.merge(i,f)}function Vo(b){var s,i,f,g;const P={};if(!Zv(b))return P;for(const[O,L]of Object.entries(b)){const ot=ru(O)?[O]:L.chains,it=L.methods||[],lt=L.events||[],nt=L.rpcMap||{},pt=Ir(O);P[pt]=wg(Pn(Pn({},P[pt]),L),{chains:Qi(ot,(s=P[pt])==null?void 0:s.chains),methods:Qi(it,(i=P[pt])==null?void 0:i.methods),events:Qi(lt,(f=P[pt])==null?void 0:f.events),rpcMap:Pn(Pn({},nt),(g=P[pt])==null?void 0:g.rpcMap)})}return P}function Eg(b){return b.includes(":")?b.split(":")[2]:b}function Cg(b){const s={};for(const[i,f]of Object.entries(b)){const g=f.methods||[],P=f.events||[],O=f.accounts||[],L=ru(i)?[i]:f.chains?f.chains:nu(f.accounts);s[i]={chains:L,methods:g,events:P,accounts:O}}return s}function Vi(b){return typeof b=="number"?b:b.includes("0x")?parseInt(b,16):b.includes(":")?Number(b.split(":")[1]):Number(b)}const iu={},Y=b=>iu[b],Ki=(b,s)=>{iu[b]=s};class Ig{constructor(s){this.name="polkadot",this.namespace=s.namespace,this.events=Y("events"),this.client=Y("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(s){this.namespace=Object.assign(this.namespace,s)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const s=this.namespace.chains[0];if(!s)throw new Error("ChainId not found");return s.split(":")[1]}request(s){return this.namespace.methods.includes(s.request.method)?this.client.request(s):this.getHttpProvider().request(s.request)}setDefaultChain(s,i){this.httpProviders[s]||this.setHttpProvider(s,i),this.chainId=s,this.events.emit(le.DEFAULT_CHAIN_CHANGED,`${this.name}:${s}`)}getAccounts(){const s=this.namespace.accounts;return s?s.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2])||[]:[]}createHttpProviders(){const s={};return this.namespace.chains.forEach(i=>{var f;const g=qe(i);s[g]=this.createHttpProvider(g,(f=this.namespace.rpcMap)==null?void 0:f[i])}),s}getHttpProvider(){const s=`${this.name}:${this.chainId}`,i=this.httpProviders[s];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${s} not found`);return i}setHttpProvider(s,i){const f=this.createHttpProvider(s,i);f&&(this.httpProviders[s]=f)}createHttpProvider(s,i){const f=i||Ce(s,this.namespace,this.client.core.projectId);if(!f)throw new Error(`No RPC url provided for chainId: ${s}`);return new Ie(new Ae(f,Y("disableProviderPing")))}}class Ag{constructor(s){this.name="eip155",this.namespace=s.namespace,this.events=Y("events"),this.client=Y("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(s){switch(s.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(s);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(s.request.method)?await this.client.request(s):this.getHttpProvider().request(s.request)}updateNamespace(s){this.namespace=Object.assign(this.namespace,s)}setDefaultChain(s,i){this.httpProviders[s]||this.setHttpProvider(parseInt(s),i),this.chainId=parseInt(s),this.events.emit(le.DEFAULT_CHAIN_CHANGED,`${this.name}:${s}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const s=this.namespace.chains[0];if(!s)throw new Error("ChainId not found");return s.split(":")[1]}createHttpProvider(s,i){const f=i||Ce(`${this.name}:${s}`,this.namespace,this.client.core.projectId);if(!f)throw new Error(`No RPC url provided for chainId: ${s}`);return new Ie(new Ae(f,Y("disableProviderPing")))}setHttpProvider(s,i){const f=this.createHttpProvider(s,i);f&&(this.httpProviders[s]=f)}createHttpProviders(){const s={};return this.namespace.chains.forEach(i=>{var f;const g=parseInt(qe(i));s[g]=this.createHttpProvider(g,(f=this.namespace.rpcMap)==null?void 0:f[i])}),s}getAccounts(){const s=this.namespace.accounts;return s?[...new Set(s.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}getHttpProvider(){const s=this.chainId,i=this.httpProviders[s];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${s} not found`);return i}async handleSwitchChain(s){var i,f;let g=s.request.params?(i=s.request.params[0])==null?void 0:i.chainId:"0x0";g=g.startsWith("0x")?g:`0x${g}`;const P=parseInt(g,16);if(this.isChainApproved(P))this.setDefaultChain(`${P}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:s.topic,request:{method:s.request.method,params:[{chainId:g}]},chainId:(f=this.namespace.chains)==null?void 0:f[0]}),this.setDefaultChain(`${P}`);else throw new Error(`Failed to switch to chain 'eip155:${P}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(s){return this.namespace.chains.includes(`${this.name}:${s}`)}}class Og{constructor(s){this.name="solana",this.namespace=s.namespace,this.events=Y("events"),this.client=Y("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(s){this.namespace=Object.assign(this.namespace,s)}requestAccounts(){return this.getAccounts()}request(s){return this.namespace.methods.includes(s.request.method)?this.client.request(s):this.getHttpProvider().request(s.request)}setDefaultChain(s,i){this.httpProviders[s]||this.setHttpProvider(s,i),this.chainId=s,this.events.emit(le.DEFAULT_CHAIN_CHANGED,`${this.name}:${s}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const s=this.namespace.chains[0];if(!s)throw new Error("ChainId not found");return s.split(":")[1]}getAccounts(){const s=this.namespace.accounts;return s?[...new Set(s.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const s={};return this.namespace.chains.forEach(i=>{var f;const g=qe(i);s[g]=this.createHttpProvider(g,(f=this.namespace.rpcMap)==null?void 0:f[i])}),s}getHttpProvider(){const s=`${this.name}:${this.chainId}`,i=this.httpProviders[s];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${s} not found`);return i}setHttpProvider(s,i){const f=this.createHttpProvider(s,i);f&&(this.httpProviders[s]=f)}createHttpProvider(s,i){const f=i||Ce(s,this.namespace,this.client.core.projectId);if(!f)throw new Error(`No RPC url provided for chainId: ${s}`);return new Ie(new Ae(f,Y("disableProviderPing")))}}class jg{constructor(s){this.name="cosmos",this.namespace=s.namespace,this.events=Y("events"),this.client=Y("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(s){this.namespace=Object.assign(this.namespace,s)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const s=this.namespace.chains[0];if(!s)throw new Error("ChainId not found");return s.split(":")[1]}request(s){return this.namespace.methods.includes(s.request.method)?this.client.request(s):this.getHttpProvider().request(s.request)}setDefaultChain(s,i){this.httpProviders[s]||this.setHttpProvider(s,i),this.chainId=s,this.events.emit(le.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const s=this.namespace.accounts;return s?[...new Set(s.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const s={};return this.namespace.chains.forEach(i=>{var f;const g=qe(i);s[g]=this.createHttpProvider(g,(f=this.namespace.rpcMap)==null?void 0:f[i])}),s}getHttpProvider(){const s=`${this.name}:${this.chainId}`,i=this.httpProviders[s];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${s} not found`);return i}setHttpProvider(s,i){const f=this.createHttpProvider(s,i);f&&(this.httpProviders[s]=f)}createHttpProvider(s,i){const f=i||Ce(s,this.namespace,this.client.core.projectId);if(!f)throw new Error(`No RPC url provided for chainId: ${s}`);return new Ie(new Ae(f,Y("disableProviderPing")))}}class xg{constructor(s){this.name="cip34",this.namespace=s.namespace,this.events=Y("events"),this.client=Y("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(s){this.namespace=Object.assign(this.namespace,s)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const s=this.namespace.chains[0];if(!s)throw new Error("ChainId not found");return s.split(":")[1]}request(s){return this.namespace.methods.includes(s.request.method)?this.client.request(s):this.getHttpProvider().request(s.request)}setDefaultChain(s,i){this.httpProviders[s]||this.setHttpProvider(s,i),this.chainId=s,this.events.emit(le.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const s=this.namespace.accounts;return s?[...new Set(s.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const s={};return this.namespace.chains.forEach(i=>{const f=this.getCardanoRPCUrl(i),g=qe(i);s[g]=this.createHttpProvider(g,f)}),s}getHttpProvider(){const s=`${this.name}:${this.chainId}`,i=this.httpProviders[s];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${s} not found`);return i}getCardanoRPCUrl(s){const i=this.namespace.rpcMap;if(i)return i[s]}setHttpProvider(s,i){const f=this.createHttpProvider(s,i);f&&(this.httpProviders[s]=f)}createHttpProvider(s,i){const f=i||this.getCardanoRPCUrl(s);if(!f)throw new Error(`No RPC url provided for chainId: ${s}`);return new Ie(new Ae(f,Y("disableProviderPing")))}}class Sg{constructor(s){this.name="elrond",this.namespace=s.namespace,this.events=Y("events"),this.client=Y("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(s){this.namespace=Object.assign(this.namespace,s)}requestAccounts(){return this.getAccounts()}request(s){return this.namespace.methods.includes(s.request.method)?this.client.request(s):this.getHttpProvider().request(s.request)}setDefaultChain(s,i){this.httpProviders[s]||this.setHttpProvider(s,i),this.chainId=s,this.events.emit(le.DEFAULT_CHAIN_CHANGED,`${this.name}:${s}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const s=this.namespace.chains[0];if(!s)throw new Error("ChainId not found");return s.split(":")[1]}getAccounts(){const s=this.namespace.accounts;return s?[...new Set(s.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const s={};return this.namespace.chains.forEach(i=>{var f;const g=qe(i);s[g]=this.createHttpProvider(g,(f=this.namespace.rpcMap)==null?void 0:f[i])}),s}getHttpProvider(){const s=`${this.name}:${this.chainId}`,i=this.httpProviders[s];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${s} not found`);return i}setHttpProvider(s,i){const f=this.createHttpProvider(s,i);f&&(this.httpProviders[s]=f)}createHttpProvider(s,i){const f=i||Ce(s,this.namespace,this.client.core.projectId);if(!f)throw new Error(`No RPC url provided for chainId: ${s}`);return new Ie(new Ae(f,Y("disableProviderPing")))}}class Dg{constructor(s){this.name="multiversx",this.namespace=s.namespace,this.events=Y("events"),this.client=Y("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(s){this.namespace=Object.assign(this.namespace,s)}requestAccounts(){return this.getAccounts()}request(s){return this.namespace.methods.includes(s.request.method)?this.client.request(s):this.getHttpProvider().request(s.request)}setDefaultChain(s,i){this.httpProviders[s]||this.setHttpProvider(s,i),this.chainId=s,this.events.emit(le.DEFAULT_CHAIN_CHANGED,`${this.name}:${s}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const s=this.namespace.chains[0];if(!s)throw new Error("ChainId not found");return s.split(":")[1]}getAccounts(){const s=this.namespace.accounts;return s?[...new Set(s.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const s={};return this.namespace.chains.forEach(i=>{var f;const g=qe(i);s[g]=this.createHttpProvider(g,(f=this.namespace.rpcMap)==null?void 0:f[i])}),s}getHttpProvider(){const s=`${this.name}:${this.chainId}`,i=this.httpProviders[s];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${s} not found`);return i}setHttpProvider(s,i){const f=this.createHttpProvider(s,i);f&&(this.httpProviders[s]=f)}createHttpProvider(s,i){const f=i||Ce(s,this.namespace,this.client.core.projectId);if(!f)throw new Error(`No RPC url provided for chainId: ${s}`);return new Ie(new Ae(f,Y("disableProviderPing")))}}class Tg{constructor(s){this.name="near",this.namespace=s.namespace,this.events=Y("events"),this.client=Y("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(s){this.namespace=Object.assign(this.namespace,s)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const s=this.namespace.chains[0];if(!s)throw new Error("ChainId not found");return s.split(":")[1]}request(s){return this.namespace.methods.includes(s.request.method)?this.client.request(s):this.getHttpProvider().request(s.request)}setDefaultChain(s,i){if(this.chainId=s,!this.httpProviders[s]){const f=i||Ce(`${this.name}:${s}`,this.namespace);if(!f)throw new Error(`No RPC url provided for chainId: ${s}`);this.setHttpProvider(s,f)}this.events.emit(le.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const s=this.namespace.accounts;return s?s.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2])||[]:[]}createHttpProviders(){const s={};return this.namespace.chains.forEach(i=>{var f;s[i]=this.createHttpProvider(i,(f=this.namespace.rpcMap)==null?void 0:f[i])}),s}getHttpProvider(){const s=`${this.name}:${this.chainId}`,i=this.httpProviders[s];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${s} not found`);return i}setHttpProvider(s,i){const f=this.createHttpProvider(s,i);f&&(this.httpProviders[s]=f)}createHttpProvider(s,i){const f=i||Ce(s,this.namespace);return typeof f>"u"?void 0:new Ie(new Ae(f,Y("disableProviderPing")))}}var $g=Object.defineProperty,Rg=Object.defineProperties,Hg=Object.getOwnPropertyDescriptors,Ko=Object.getOwnPropertySymbols,qg=Object.prototype.hasOwnProperty,kg=Object.prototype.propertyIsEnumerable,Zo=(b,s,i)=>s in b?$g(b,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):b[s]=i,En=(b,s)=>{for(var i in s||(s={}))qg.call(s,i)&&Zo(b,i,s[i]);if(Ko)for(var i of Ko(s))kg.call(s,i)&&Zo(b,i,s[i]);return b},Zi=(b,s)=>Rg(b,Hg(s));class is{constructor(s){this.events=new Vv,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=s,this.logger=typeof(s==null?void 0:s.logger)<"u"&&typeof(s==null?void 0:s.logger)!="string"?s.logger:Lo.pino(Lo.getDefaultLoggerOptions({level:(s==null?void 0:s.logger)||Wo})),this.disableProviderPing=(s==null?void 0:s.disableProviderPing)||!1}static async init(s){const i=new is(s);return await i.initialize(),i}async request(s,i){const[f,g]=this.validateChain(i);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(f).request({request:En({},s),chainId:`${f}:${g}`,topic:this.session.topic})}sendAsync(s,i,f){const g=new Date().getTime();this.request(s,f).then(P=>i(null,rg(g,P))).catch(P=>i(P,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 s;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(s=this.session)==null?void 0:s.topic,reason:Xi("USER_DISCONNECTED")}),await this.cleanup()}async connect(s){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(s),await this.cleanupPendingPairings(),!s.skipPairing)return await this.pair(s.pairingTopic)}on(s,i){this.events.on(s,i)}once(s,i){this.events.once(s,i)}removeListener(s,i){this.events.removeListener(s,i)}off(s,i){this.events.off(s,i)}get isWalletConnect(){return!0}async pair(s){this.shouldAbortPairingAttempt=!1;let i=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(i>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:f,approval:g}=await this.client.connect({pairingTopic:s,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});f&&(this.uri=f,this.events.emit("display_uri",f)),await g().then(P=>{this.session=P,this.namespaces||(this.namespaces=Cg(P.namespaces),this.persist("namespaces",this.namespaces))}).catch(P=>{if(P.message!==ng)throw P;i++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(s,i){try{if(!this.session)return;const[f,g]=this.validateChain(s);this.getProvider(f).setDefaultChain(g,i)}catch(f){if(!/Please call connect/.test(f.message))throw f}}async cleanupPendingPairings(s={}){this.logger.info("Cleaning up inactive pairings...");const i=this.client.pairing.getAll();if(Or(i)){for(const f of i)s.deletePairings?this.client.core.expirer.set(f.topic,0):await this.client.core.relayer.subscriber.unsubscribe(f.topic);this.logger.info(`Inactive pairings cleared: ${i.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 s=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[s]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await ig.init({logger:this.providerOpts.logger||Wo,relayUrl:this.providerOpts.relayUrl||fg,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,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()");const s=[...new Set(Object.keys(this.session.namespaces).map(i=>Ir(i)))];Ki("client",this.client),Ki("events",this.events),Ki("disableProviderPing",this.disableProviderPing),s.forEach(i=>{if(!this.session)return;const f=bg(i,this.session),g=nu(f),P=Pg(this.namespaces,this.optionalNamespaces),O=Zi(En({},P[i]),{accounts:f,chains:g});switch(i){case"eip155":this.rpcProviders[i]=new Ag({namespace:O});break;case"solana":this.rpcProviders[i]=new Og({namespace:O});break;case"cosmos":this.rpcProviders[i]=new jg({namespace:O});break;case"polkadot":this.rpcProviders[i]=new Ig({namespace:O});break;case"cip34":this.rpcProviders[i]=new xg({namespace:O});break;case"elrond":this.rpcProviders[i]=new Sg({namespace:O});break;case"multiversx":this.rpcProviders[i]=new Dg({namespace:O});break;case"near":this.rpcProviders[i]=new Tg({namespace:O});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",s=>{this.events.emit("session_ping",s)}),this.client.on("session_event",s=>{const{params:i}=s,{event:f}=i;if(f.name==="accountsChanged"){const g=f.data;g&&Or(g)&&this.events.emit("accountsChanged",g.map(Eg))}else if(f.name==="chainChanged"){const g=i.chainId,P=i.event.data,O=Ir(g),L=Vi(g)!==Vi(P)?`${O}:${Vi(P)}`:g;this.onChainChanged(L)}else this.events.emit(f.name,f.data);this.events.emit("session_event",s)}),this.client.on("session_update",({topic:s,params:i})=>{var f;const{namespaces:g}=i,P=(f=this.client)==null?void 0:f.session.get(s);this.session=Zi(En({},P),{namespaces:g}),this.onSessionUpdate(),this.events.emit("session_update",{topic:s,params:i})}),this.client.on("session_delete",async s=>{await this.cleanup(),this.events.emit("session_delete",s),this.events.emit("disconnect",Zi(En({},Xi("USER_DISCONNECTED")),{data:s.topic}))}),this.on(le.DEFAULT_CHAIN_CHANGED,s=>{this.onChainChanged(s,!0)})}getProvider(s){if(!this.rpcProviders[s])throw new Error(`Provider not found: ${s}`);return this.rpcProviders[s]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(s=>{var i;this.getProvider(s).updateNamespace((i=this.session)==null?void 0:i.namespaces[s])})}setNamespaces(s){const{namespaces:i,optionalNamespaces:f,sessionProperties:g}=s;i&&Object.keys(i).length&&(this.namespaces=i),f&&Object.keys(f).length&&(this.optionalNamespaces=f),this.sessionProperties=g,this.persist("namespaces",i),this.persist("optionalNamespaces",f)}validateChain(s){const[i,f]=(s==null?void 0:s.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[i,f];if(i&&!Object.keys(this.namespaces||{}).map(O=>Ir(O)).includes(i))throw new Error(`Namespace '${i}' is not configured. Please call connect() first with namespace config.`);if(i&&f)return[i,f];const g=Ir(Object.keys(this.namespaces)[0]),P=this.rpcProviders[g].getDefaultChain();return[g,P]}async requestAccounts(){const[s]=this.validateChain();return await this.getProvider(s).requestAccounts()}onChainChanged(s,i=!1){var f;if(!this.namespaces)return;const[g,P]=this.validateChain(s);i||this.getProvider(g).setDefaultChain(P),((f=this.namespaces[g])!=null?f:this.namespaces[`${g}:${P}`]).defaultChain=P,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",P)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(s,i){this.client.core.storage.setItem(`${Go}/${s}`,i)}async getFromStore(s){return await this.client.core.storage.getItem(`${Go}/${s}`)}}const Mg=is,Bg="wc",Lg="ethereum_provider",Ng=`${Bg}@2:${Lg}:`,Fg="https://rpc.walletconnect.com/v1/",rs=["eth_sendTransaction","personal_sign"],Ug=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],ns=["chainChanged","accountsChanged"],zg=["chainChanged","accountsChanged","message","disconnect","connect"];var Wg=Object.defineProperty,Gg=Object.defineProperties,Jg=Object.getOwnPropertyDescriptors,Yo=Object.getOwnPropertySymbols,Qg=Object.prototype.hasOwnProperty,Vg=Object.prototype.propertyIsEnumerable,Xo=(b,s,i)=>s in b?Wg(b,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):b[s]=i,Ar=(b,s)=>{for(var i in s||(s={}))Qg.call(s,i)&&Xo(b,i,s[i]);if(Yo)for(var i of Yo(s))Vg.call(s,i)&&Xo(b,i,s[i]);return b},tu=(b,s)=>Gg(b,Jg(s));function Cn(b){return Number(b[0].split(":")[1])}function Yi(b){return`0x${b.toString(16)}`}function Kg(b){const{chains:s,optionalChains:i,methods:f,optionalMethods:g,events:P,optionalEvents:O,rpcMap:L}=b;if(!Or(s))throw new Error("Invalid chains");const ot={chains:s,methods:f||rs,events:P||ns,rpcMap:Ar({},s.length?{[Cn(s)]:L[Cn(s)]}:{})},it=P==null?void 0:P.filter(ut=>!ns.includes(ut)),lt=f==null?void 0:f.filter(ut=>!rs.includes(ut));if(!i&&!O&&!g&&!(it!=null&&it.length)&&!(lt!=null&<.length))return{required:s.length?ot:void 0};const nt=(it==null?void 0:it.length)&&(lt==null?void 0:lt.length)||!i,pt={chains:[...new Set(nt?ot.chains.concat(i||[]):i)],methods:[...new Set(ot.methods.concat(g!=null&&g.length?g:Ug))],events:[...new Set(ot.events.concat(O!=null&&O.length?O:zg))],rpcMap:L};return{required:s.length?ot:void 0,optional:i.length?pt:void 0}}class ss{constructor(){this.events=new eu.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=Ng,this.on=(s,i)=>(this.events.on(s,i),this),this.once=(s,i)=>(this.events.once(s,i),this),this.removeListener=(s,i)=>(this.events.removeListener(s,i),this),this.off=(s,i)=>(this.events.off(s,i),this),this.parseAccount=s=>this.isCompatibleChainId(s)?this.parseAccountId(s).address:s,this.signer={},this.rpc={}}static async init(s){const i=new ss;return await i.initialize(s),i}async request(s){return await this.signer.request(s,this.formatChainId(this.chainId))}sendAsync(s,i){this.signer.sendAsync(s,i,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(s){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(s);const{required:i,optional:f}=Kg(this.rpc);try{const g=await new Promise(async(O,L)=>{var ot;this.rpc.showQrModal&&((ot=this.modal)==null||ot.subscribeModal(it=>{!it.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),L(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(tu(Ar({namespaces:Ar({},i&&{[this.namespace]:i})},f&&{optionalNamespaces:{[this.namespace]:f}}),{pairingTopic:s==null?void 0:s.pairingTopic})).then(it=>{O(it)}).catch(it=>{L(new Error(it.message))})});if(!g)return;const P=Xv(g.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:P),this.setAccounts(P),this.events.emit("connect",{chainId:Yi(this.chainId)})}catch(g){throw this.signer.logger.error(g),g}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",s=>{const{params:i}=s,{event:f}=i;f.name==="accountsChanged"?(this.accounts=this.parseAccounts(f.data),this.events.emit("accountsChanged",this.accounts)):f.name==="chainChanged"?this.setChainId(this.formatChainId(f.data)):this.events.emit(f.name,f.data),this.events.emit("session_event",s)}),this.signer.on("chainChanged",s=>{const i=parseInt(s);this.chainId=i,this.events.emit("chainChanged",Yi(this.chainId)),this.persist()}),this.signer.on("session_update",s=>{this.events.emit("session_update",s)}),this.signer.on("session_delete",s=>{this.reset(),this.events.emit("session_delete",s),this.events.emit("disconnect",tu(Ar({},Xi("USER_DISCONNECTED")),{data:s.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",s=>{var i,f;this.rpc.showQrModal&&((i=this.modal)==null||i.closeModal(),(f=this.modal)==null||f.openModal({uri:s})),this.events.emit("display_uri",s)})}switchEthereumChain(s){this.request({method:"wallet_switchEthereumChain",params:[{chainId:s.toString(16)}]})}isCompatibleChainId(s){return typeof s=="string"?s.startsWith(`${this.namespace}:`):!1}formatChainId(s){return`${this.namespace}:${s}`}parseChainId(s){return Number(s.split(":")[1])}setChainIds(s){const i=s.filter(f=>this.isCompatibleChainId(f)).map(f=>this.parseChainId(f));i.length&&(this.chainId=i[0],this.events.emit("chainChanged",Yi(this.chainId)),this.persist())}setChainId(s){if(this.isCompatibleChainId(s)){const i=this.parseChainId(s);this.chainId=i,this.switchEthereumChain(i)}}parseAccountId(s){const[i,f,g]=s.split(":");return{chainId:`${i}:${f}`,address:g}}setAccounts(s){this.accounts=s.filter(i=>this.parseChainId(this.parseAccountId(i).chainId)===this.chainId).map(i=>this.parseAccountId(i).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(s){var i,f;const g=(i=s==null?void 0:s.chains)!=null?i:[],P=(f=s==null?void 0:s.optionalChains)!=null?f:[],O=g.concat(P);if(!O.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const L=g.length?(s==null?void 0:s.methods)||rs:[],ot=g.length?(s==null?void 0:s.events)||ns:[],it=(s==null?void 0:s.optionalMethods)||[],lt=(s==null?void 0:s.optionalEvents)||[],nt=(s==null?void 0:s.rpcMap)||this.buildRpcMap(O,s.projectId),pt=(s==null?void 0:s.qrModalOptions)||void 0;return{chains:g==null?void 0:g.map(ut=>this.formatChainId(ut)),optionalChains:P.map(ut=>this.formatChainId(ut)),methods:L,events:ot,optionalMethods:it,optionalEvents:lt,rpcMap:nt,showQrModal:!!(s!=null&&s.showQrModal),qrModalOptions:pt,projectId:s.projectId,metadata:s.metadata}}buildRpcMap(s,i){const f={};return s.forEach(g=>{f[g]=this.getRpcUrl(g,i)}),f}async initialize(s){if(this.rpc=this.getRpcConfig(s),this.chainId=this.rpc.chains.length?Cn(this.rpc.chains):Cn(this.rpc.optionalChains),this.signer=await Mg.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:s.disableProviderPing,relayUrl:s.relayUrl,storageOptions:s.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let i;try{const{WalletConnectModal:f}=await Kv(()=>import("./index-XtkoMMyw.js").then(g=>g.i),__vite__mapDeps([0,1,2]));i=f}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(i)try{this.modal=new i(Ar({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(f){throw this.signer.logger.error(f),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(s){if(!s)return;const{chains:i,optionalChains:f,rpcMap:g}=s;i&&Or(i)&&(this.rpc.chains=i.map(P=>this.formatChainId(P)),i.forEach(P=>{this.rpc.rpcMap[P]=(g==null?void 0:g[P])||this.getRpcUrl(P)})),f&&Or(f)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=f==null?void 0:f.map(P=>this.formatChainId(P)),f.forEach(P=>{this.rpc.rpcMap[P]=(g==null?void 0:g[P])||this.getRpcUrl(P)}))}getRpcUrl(s,i){var f;return((f=this.rpc.rpcMap)==null?void 0:f[s])||`${Fg}?chainId=eip155:${s}&projectId=${i||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const s=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),i=this.session.namespaces[`${this.namespace}:${s}`]?this.session.namespaces[`${this.namespace}:${s}`]:this.session.namespaces[this.namespace];this.setChainIds(s?[this.formatChainId(s)]:i==null?void 0:i.accounts),this.setAccounts(i==null?void 0:i.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(s){return typeof s=="string"||s instanceof String?[this.parseAccount(s)]:s.map(i=>this.parseAccount(i))}}const t0=ss;export{t0 as EthereumProvider,zg as OPTIONAL_EVENTS,Ug as OPTIONAL_METHODS,ns as REQUIRED_EVENTS,rs as REQUIRED_METHODS,ss as default};
|
|
28
28
|
function __vite__mapDeps(indexes) {
|
|
29
29
|
if (!__vite__mapDeps.viteFileDeps) {
|
|
30
|
-
__vite__mapDeps.viteFileDeps = ["assets/index-
|
|
30
|
+
__vite__mapDeps.viteFileDeps = ["assets/index-XtkoMMyw.js","main.js","main-O88ZzK88.css"]
|
|
31
31
|
}
|
|
32
32
|
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
33
33
|
}
|