-
Notifications
You must be signed in to change notification settings - Fork 0
/
26.f2e65699558080ee6ad6.js
1 lines (1 loc) · 161 KB
/
26.f2e65699558080ee6ad6.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{"/1Jb":function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=void 0;const s=n("hh2p"),r=i(n("u8Fu"));t.Spinner=e=>{var t;const n=null!==(t=e.size)&&void 0!==t?t:64,i=e.color||"#000";return(0,s.h)("div",{class:"-walletlink-spinner"},(0,s.h)("style",null,r.default),(0,s.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:n,height:n}},(0,s.h)("circle",{style:{cx:50,cy:50,r:45,stroke:i}})))}},"/aAL":function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LinkDialog=void 0;const s=i(n("iuhU")),r=n("hh2p"),o=n("J5ZA"),a=i(n("bFFw")),l=n("LMR0"),c=n("/1Jb");t.LinkDialog=e=>{const[t,n]=(0,o.useState)(!e.isOpen),[i,l]=(0,o.useState)(!e.isOpen);return(0,o.useEffect)(()=>{const{isOpen:t}=e,i=[window.setTimeout(()=>{l(!t)},10)];return t?n(!1):i.push(window.setTimeout(()=>{n(!0)},360)),()=>{i.forEach(window.clearTimeout)}},[e.isOpen]),(0,r.h)("div",{class:(0,s.default)("-walletlink-link-dialog-container",e.darkMode&&"-walletlink-link-dialog-container-dark",t&&"-walletlink-link-dialog-container-hidden")},(0,r.h)("style",null,a.default),(0,r.h)("div",{class:(0,s.default)("-walletlink-link-dialog-backdrop",i&&"-walletlink-link-dialog-backdrop-hidden")}),(0,r.h)("div",{class:"-walletlink-link-dialog"},(0,r.h)("div",{class:(0,s.default)("-walletlink-link-dialog-box",i&&"-walletlink-link-dialog-box-hidden")},(0,r.h)(u,{darkMode:e.darkMode,version:e.version,sessionId:e.sessionId,sessionSecret:e.sessionSecret,walletLinkUrl:e.walletLinkUrl,isConnected:e.isConnected,isParentConnection:e.isParentConnection}),e.onCancel&&(0,r.h)(d,{onClick:e.onCancel}))))};const u=e=>{const t=window.encodeURIComponent(e.walletLinkUrl),n=`${e.walletLinkUrl}/#/link?${e.isParentConnection?"parent-id":"id"}=${e.sessionId}&secret=${e.sessionSecret}&server=${t}&v=1`;return(0,r.h)("div",{class:"-walletlink-link-dialog-box-content"},(0,r.h)("h3",null,"Scan to",(0,r.h)("br",null)," Connect"),(0,r.h)("div",{class:"-walletlink-link-dialog-box-content-qrcode"},(0,r.h)("div",{class:"-walletlink-link-dialog-box-content-qrcode-wrapper"},(0,r.h)(l.QRCode,{content:n,width:224,height:224,fgColor:"#000",bgColor:"transparent"})),(0,r.h)("input",{type:"hidden",value:n}),!e.isConnected&&(0,r.h)("div",{class:"-walletlink-link-dialog-box-content-qrcode-connecting"},(0,r.h)(c.Spinner,{size:128,color:e.darkMode?"#fff":"#000"}),(0,r.h)("p",null,"Connecting...")),(0,r.h)("p",{title:`WalletLink v${e.version}`},"Powered by WalletLink")),(0,r.h)("a",{href:`${e.walletLinkUrl}/#/wallets`,target:"_blank",rel:"noopener"},"Don\u2019t have a wallet app?"))},d=e=>(0,r.h)("button",{class:"-walletlink-link-dialog-box-cancel",onClick:e.onClick},(0,r.h)("div",{class:"-walletlink-link-dialog-box-cancel-x"}))},"0zMk":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decrypt=t.encrypt=void 0;const i=n("qCKp"),s=n("oK5k");t.encrypt=async function(e,t){if(64!=t.length)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),i=await crypto.subtle.importKey("raw",(0,s.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]);let r=new TextEncoder;const o=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},i,r.encode(e));let a=o.slice(o.byteLength-16),l=o.slice(0,o.byteLength-16),c=new Uint8Array(a),u=new Uint8Array(l),d=new Uint8Array([...n,...c,...u]);return(0,s.uint8ArrayToHex)(d)},t.decrypt=function(e,t){if(64!=t.length)throw Error("secret must be 256 bits");return new i.Observable(function(n){!async function(){const i=await crypto.subtle.importKey("raw",(0,s.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),r=(0,s.hexStringToUint8Array)(e),o=r.slice(0,12),a=r.slice(12,28),l=r.slice(28),c=new Uint8Array([...l,...a]),u={name:"AES-GCM",iv:new Uint8Array(o)};try{const e=await window.crypto.subtle.decrypt(u,i,c);let t=new TextDecoder;n.next(t.decode(e)),n.complete()}catch(d){n.error(d)}}()})}},"16RA":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkUI=void 0,t.WalletLinkUI=class{constructor(e){}setConnectDisabled(e){}}},"1vXP":function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TryExtensionLinkDialog=void 0;const s=i(n("iuhU")),r=n("hh2p"),o=n("J5ZA"),a=i(n("YQXw")),l=i(n("C4r1")),c=i(n("WCWn")),u=i(n("Clep")),d=n("LMR0"),h=n("/1Jb"),p=i(n("853V"));t.TryExtensionLinkDialog=e=>{const[t,n]=(0,o.useState)(!e.isOpen),[i,a]=(0,o.useState)(!e.isOpen);return(0,o.useEffect)(()=>{const{isOpen:t}=e,i=[window.setTimeout(()=>{a(!t)},10)];return t?n(!1):i.push(window.setTimeout(()=>{n(!0)},360)),()=>{i.forEach(window.clearTimeout)}},[e.isOpen]),(0,r.h)("div",{class:(0,s.default)("-walletlink-extension-dialog-container",t&&"-walletlink-extension-dialog-container-hidden")},(0,r.h)("style",null,p.default),(0,r.h)("div",{class:(0,s.default)("-walletlink-extension-dialog-backdrop",i&&"-walletlink-extension-dialog-backdrop-hidden")}),(0,r.h)("div",{class:"-walletlink-extension-dialog"},(0,r.h)("div",{class:(0,s.default)("-walletlink-extension-dialog-box",i&&"-walletlink-extension-dialog-box-hidden")},(0,r.h)(g,{onInstallClick:()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")}}),e.connectDisabled?null:(0,r.h)(f,{darkMode:e.darkMode,version:e.version,sessionId:e.sessionId,sessionSecret:e.sessionSecret,walletLinkUrl:e.walletLinkUrl,isConnected:e.isConnected,isParentConnection:e.isParentConnection}),e.onCancel&&(0,r.h)(m,{onClick:e.onCancel}))))};const g=e=>(0,r.h)("div",{class:"-walletlink-extension-dialog-box-top"},(0,r.h)("div",{class:"-walletlink-extension-dialog-box-top-install-region"},(0,r.h)("h2",null,"Try the Coinbase Wallet extension"),(0,r.h)("button",{onClick:e.onInstallClick},"Install")),(0,r.h)("div",{class:"-walletlink-extension-dialog-box-top-info-region"},(0,r.h)(_,{icon:l.default,text:"Connect to crypto apps with one click"}),(0,r.h)(_,{icon:c.default,text:"Your private key is stored securely"}),(0,r.h)(_,{icon:a.default,text:"Works with Ethereum, Polygon, and more"}))),f=e=>{const t=window.encodeURIComponent(e.walletLinkUrl),n=`${e.walletLinkUrl}/#/link?${e.isParentConnection?"parent-id":"id"}=${e.sessionId}&secret=${e.sessionSecret}&server=${t}&v=1`;return(0,r.h)("div",{class:"-walletlink-extension-dialog-box-bottom"},(0,r.h)("div",{class:"-walletlink-extension-dialog-box-bottom-description-region"},(0,r.h)("h2",null,"Or scan to connect"),(0,r.h)("body",{class:"-walletlink-extension-dialog-box-bottom-description"},"Open ",(0,r.h)("a",{href:"https://wallet.coinbase.com/"},"Coinbase Wallet")," on your mobile phone and scan")),(0,r.h)("div",{class:"-walletlink-extension-dialog-box-bottom-qr-region"},(0,r.h)("div",{class:"-walletlink-extension-dialog-box-bottom-qr-wrapper"},(0,r.h)(d.QRCode,{content:n,width:150,height:150,fgColor:"#000",bgColor:"transparent",image:{svg:u.default,width:34,height:34}})),(0,r.h)("input",{type:"hidden",value:n}),!e.isConnected&&(0,r.h)("div",{class:"-walletlink-extension-dialog-box-bottom-qr-connecting"},(0,r.h)(h.Spinner,{size:36,color:"#000"}),(0,r.h)("p",null,"Connecting..."))))},_=e=>(0,r.h)("div",{class:"-walletlink-extension-dialog-box-top-description"},(0,r.h)("div",{class:"-walletlink-extension-dialog-box-top-description-icon-wrapper"},(0,r.h)("img",{src:e.icon})),(0,r.h)("body",{class:"-walletlink-extension-dialog-box-top-description-text"},e.text)),m=e=>(0,r.h)("button",{class:"-walletlink-extension-dialog-box-cancel",onClick:e.onClick},(0,r.h)("div",{class:"-walletlink-extension-dialog-box-cancel-x"}))},"4Mv7":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isServerMessageFail=void 0,t.isServerMessageFail=function(e){return e&&"Fail"===e.type&&"number"==typeof e.id&&"string"==typeof e.sessionId&&"string"==typeof e.error}},"4Uva":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionManager=void 0;const i=n("V5x4"),s=n("t7TP"),r=()=>{};t.SubscriptionManager=class{constructor(e){const t=new i({provider:e,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:r}=s({blockTracker:t,provider:e});this.events=n,this.subscriptionMiddleware=r}async handleRequest(e){const t={};return await this.subscriptionMiddleware(e,t,r,r),t}destroy(){this.subscriptionMiddleware.destroy()}}},"4W9J":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkRelayAbstract=t.APP_VERSION_KEY=t.LOCAL_STORAGE_ADDRESSES_KEY=t.WALLET_USER_NAME_KEY=void 0,t.WALLET_USER_NAME_KEY="walletUsername",t.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",t.APP_VERSION_KEY="AppVersion",t.WalletLinkRelayAbstract=class{}},"5jSq":function(e,t){function n(e){this.mode=s.MODE_8BIT_BYTE,this.data=e,this.parsedData=[];for(var t=0,n=this.data.length;t<n;t++){var i=[],r=this.data.charCodeAt(t);r>65536?(i[0]=240|(1835008&r)>>>18,i[1]=128|(258048&r)>>>12,i[2]=128|(4032&r)>>>6,i[3]=128|63&r):r>2048?(i[0]=224|(61440&r)>>>12,i[1]=128|(4032&r)>>>6,i[2]=128|63&r):r>128?(i[0]=192|(1984&r)>>>6,i[1]=128|63&r):i[0]=r,this.parsedData.push(i)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function i(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}n.prototype={getLength:function(e){return this.parsedData.length},write:function(e){for(var t=0,n=this.parsedData.length;t<n;t++)e.put(this.parsedData[t],8)}},i.prototype={addData:function(e){var t=new n(e);this.dataList.push(t),this.dataCache=null},isDark:function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var s=0;s<this.moduleCount;s++)this.modules[n][s]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=i.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var i=-1;i<=7;i++)t+i<=-1||this.moduleCount<=t+i||(this.modules[e+n][t+i]=0<=n&&n<=6&&(0==i||6==i)||0<=i&&i<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=i&&i<=4)},getBestMaskPattern:function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var i=r.getLostPoint(this);(0==n||e>i)&&(e=i,t=n)}return t},createMovieClip:function(e,t,n){var i=e.createEmptyMovieClip(t,n);this.make();for(var s=0;s<this.modules.length;s++)for(var r=1*s,o=0;o<this.modules[s].length;o++){var a=1*o;this.modules[s][o]&&(i.beginFill(0,100),i.moveTo(a,r),i.lineTo(a+1,r),i.lineTo(a+1,r+1),i.lineTo(a,r+1),i.endFill())}return i},setupTimingPattern:function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},setupPositionAdjustPattern:function(){for(var e=r.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var i=e[t],s=e[n];if(null==this.modules[i][s])for(var o=-2;o<=2;o++)for(var a=-2;a<=2;a++)this.modules[i+o][s+a]=-2==o||2==o||-2==a||2==a||0==o&&0==a}},setupTypeNumber:function(e){for(var t=r.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var i=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=i}for(n=0;n<18;n++)i=!e&&1==(t>>n&1),this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=i},setupTypeInfo:function(e,t){for(var n=r.getBCHTypeInfo(this.errorCorrectLevel<<3|t),i=0;i<15;i++){var s=!e&&1==(n>>i&1);i<6?this.modules[i][8]=s:i<8?this.modules[i+1][8]=s:this.modules[this.moduleCount-15+i][8]=s}for(i=0;i<15;i++)s=!e&&1==(n>>i&1),i<8?this.modules[8][this.moduleCount-i-1]=s:i<9?this.modules[8][15-i-1+1]=s:this.modules[8][15-i-1]=s;this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var n=-1,i=this.moduleCount-1,s=7,o=0,a=this.moduleCount-1;a>0;a-=2)for(6==a&&a--;;){for(var l=0;l<2;l++)if(null==this.modules[i][a-l]){var c=!1;o<e.length&&(c=1==(e[o]>>>s&1)),r.getMask(t,i,a-l)&&(c=!c),this.modules[i][a-l]=c,-1==--s&&(o++,s=7)}if((i+=n)<0||this.moduleCount<=i){i-=n,n=-n;break}}}},i.PAD0=236,i.PAD1=17,i.createData=function(e,t,n){for(var s=c.getRSBlocks(e,t),o=new u,a=0;a<n.length;a++){var l=n[a];o.put(l.mode,4),o.put(l.getLength(),r.getLengthInBits(l.mode,e)),l.write(o)}var d=0;for(a=0;a<s.length;a++)d+=s[a].dataCount;if(o.getLengthInBits()>8*d)throw new Error("code length overflow. ("+o.getLengthInBits()+">"+8*d+")");for(o.getLengthInBits()+4<=8*d&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*d||(o.put(i.PAD0,8),o.getLengthInBits()>=8*d));)o.put(i.PAD1,8);return i.createBytes(o,s)},i.createBytes=function(e,t){for(var n=0,i=0,s=0,o=new Array(t.length),a=new Array(t.length),c=0;c<t.length;c++){var u=t[c].dataCount,d=t[c].totalCount-u;i=Math.max(i,u),s=Math.max(s,d),o[c]=new Array(u);for(var h=0;h<o[c].length;h++)o[c][h]=255&e.buffer[h+n];n+=u;var p=r.getErrorCorrectPolynomial(d),g=new l(o[c],p.getLength()-1).mod(p);for(a[c]=new Array(p.getLength()-1),h=0;h<a[c].length;h++){var f=h+g.getLength()-a[c].length;a[c][h]=f>=0?g.get(f):0}}var _=0;for(h=0;h<t.length;h++)_+=t[h].totalCount;var m=new Array(_),b=0;for(h=0;h<i;h++)for(c=0;c<t.length;c++)h<o[c].length&&(m[b++]=o[c][h]);for(h=0;h<s;h++)for(c=0;c<t.length;c++)h<a[c].length&&(m[b++]=a[c][h]);return m};for(var s={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},r={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;r.getBCHDigit(t)-r.getBCHDigit(r.G15)>=0;)t^=r.G15<<r.getBCHDigit(t)-r.getBCHDigit(r.G15);return(e<<10|t)^r.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;r.getBCHDigit(t)-r.getBCHDigit(r.G18)>=0;)t^=r.G18<<r.getBCHDigit(t)-r.getBCHDigit(r.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return r.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case 0:return(t+n)%2==0;case 1:return t%2==0;case 2:return n%3==0;case 3:return(t+n)%3==0;case 4:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case 5:return t*n%2+t*n%3==0;case 6:return(t*n%2+t*n%3)%2==0;case 7:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new l([1],0),n=0;n<e;n++)t=t.multiply(new l([1,o.gexp(n)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case s.MODE_NUMBER:return 10;case s.MODE_ALPHA_NUM:return 9;case s.MODE_8BIT_BYTE:case s.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case s.MODE_NUMBER:return 12;case s.MODE_ALPHA_NUM:return 11;case s.MODE_8BIT_BYTE:return 16;case s.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case s.MODE_NUMBER:return 14;case s.MODE_ALPHA_NUM:return 13;case s.MODE_8BIT_BYTE:return 16;case s.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),n=0,i=0;i<t;i++)for(var s=0;s<t;s++){for(var r=0,o=e.isDark(i,s),a=-1;a<=1;a++)if(!(i+a<0||t<=i+a))for(var l=-1;l<=1;l++)s+l<0||t<=s+l||0==a&&0==l||o==e.isDark(i+a,s+l)&&r++;r>5&&(n+=3+r-5)}for(i=0;i<t-1;i++)for(s=0;s<t-1;s++){var c=0;e.isDark(i,s)&&c++,e.isDark(i+1,s)&&c++,e.isDark(i,s+1)&&c++,e.isDark(i+1,s+1)&&c++,0!=c&&4!=c||(n+=3)}for(i=0;i<t;i++)for(s=0;s<t-6;s++)e.isDark(i,s)&&!e.isDark(i,s+1)&&e.isDark(i,s+2)&&e.isDark(i,s+3)&&e.isDark(i,s+4)&&!e.isDark(i,s+5)&&e.isDark(i,s+6)&&(n+=40);for(s=0;s<t;s++)for(i=0;i<t-6;i++)e.isDark(i,s)&&!e.isDark(i+1,s)&&e.isDark(i+2,s)&&e.isDark(i+3,s)&&e.isDark(i+4,s)&&!e.isDark(i+5,s)&&e.isDark(i+6,s)&&(n+=40);var u=0;for(s=0;s<t;s++)for(i=0;i<t;i++)e.isDark(i,s)&&u++;return n+Math.abs(100*u/t/t-50)/5*10}},o={glog:function(e){if(e<1)throw new Error("glog("+e+")");return o.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return o.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},a=0;a<8;a++)o.EXP_TABLE[a]=1<<a;for(a=8;a<256;a++)o.EXP_TABLE[a]=o.EXP_TABLE[a-4]^o.EXP_TABLE[a-5]^o.EXP_TABLE[a-6]^o.EXP_TABLE[a-8];for(a=0;a<255;a++)o.LOG_TABLE[o.EXP_TABLE[a]]=a;function l(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(var i=0;i<e.length-n;i++)this.num[i]=e[i+n]}function c(e,t){this.totalCount=e,this.dataCount=t}function u(){this.buffer=[],this.length=0}l.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),n=0;n<this.getLength();n++)for(var i=0;i<e.getLength();i++)t[n+i]^=o.gexp(o.glog(this.get(n))+o.glog(e.get(i)));return new l(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=o.glog(this.get(0))-o.glog(e.get(0)),n=new Array(this.getLength()),i=0;i<this.getLength();i++)n[i]=this.get(i);for(i=0;i<e.getLength();i++)n[i]^=o.gexp(o.glog(e.get(i))+t);return new l(n,0).mod(e)}},c.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],c.getRSBlocks=function(e,t){var n=c.getRsBlockTable(e,t);if(null==n)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var i=n.length/3,s=[],r=0;r<i;r++)for(var o=n[3*r+0],a=n[3*r+1],l=n[3*r+2],u=0;u<o;u++)s.push(new c(a,l));return s},c.getRsBlockTable=function(e,t){switch(t){case 1:return c.RS_BLOCK_TABLE[4*(e-1)+0];case 0:return c.RS_BLOCK_TABLE[4*(e-1)+1];case 3:return c.RS_BLOCK_TABLE[4*(e-1)+2];case 2:return c.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},u.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var d=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function h(e){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},"string"==typeof e&&(e={content:e}),e)for(var t in e)this.options[t]=e[t];if("string"!=typeof this.options.content)throw new Error("Expected 'content' as string!");if(0===this.options.content.length)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0&&this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");var n=this.options.content,s=function(e,t){for(var n=function(e){var t=encodeURI(e).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return t.length+(t.length!=e?3:0)}(e),i=1,s=0,r=0,o=d.length;r<=o;r++){var a=d[r];if(!a)throw new Error("Content too long: expected "+s+" but got "+n);switch(t){case"L":s=a[0];break;case"M":s=a[1];break;case"Q":s=a[2];break;case"H":s=a[3];break;default:throw new Error("Unknwon error correction level: "+t)}if(n<=s)break;i++}if(i>d.length)throw new Error("Content too long");return i}(n,this.options.ecl),r=function(e){switch(e){case"L":return 1;case"M":return 0;case"Q":return 3;case"H":return 2;default:throw new Error("Unknwon error correction level: "+e)}}(this.options.ecl);this.qrcode=new i(s,r),this.qrcode.addData(n),this.qrcode.make()}h.prototype.svg=function(e){var t=this.options||{},n=this.qrcode.modules;void 0===e&&(e={container:t.container||"svg"});for(var i=void 0===t.pretty||!!t.pretty,s=i?" ":"",r=i?"\r\n":"",o=t.width,a=t.height,l=n.length,c=o/(l+2*t.padding),u=a/(l+2*t.padding),d=void 0!==t.join&&!!t.join,h=void 0!==t.swap&&!!t.swap,p=void 0===t.xmlDeclaration||!!t.xmlDeclaration,g=void 0!==t.predefined&&!!t.predefined,f=g?s+'<defs><path id="qrmodule" d="M0 0 h'+u+" v"+c+' H0 z" style="fill:'+t.color+';shape-rendering:crispEdges;" /></defs>'+r:"",_=s+'<rect x="0" y="0" width="'+o+'" height="'+a+'" style="fill:'+t.background+';shape-rendering:crispEdges;"/>'+r,m="",b="",w=0;w<l;w++)for(var y=0;y<l;y++)if(n[y][w]){var k=y*c+t.padding*c,E=w*u+t.padding*u;if(h){var v=k;k=E,E=v}if(d){var M=c+k,S=u+E;k=Number.isInteger(k)?Number(k):k.toFixed(2),E=Number.isInteger(E)?Number(E):E.toFixed(2),M=Number.isInteger(M)?Number(M):M.toFixed(2),b+="M"+k+","+E+" V"+(S=Number.isInteger(S)?Number(S):S.toFixed(2))+" H"+M+" V"+E+" H"+k+" Z "}else m+=g?s+'<use x="'+k.toString()+'" y="'+E.toString()+'" href="#qrmodule" />'+r:s+'<rect x="'+k.toString()+'" y="'+E.toString()+'" width="'+c+'" height="'+u+'" style="fill:'+t.color+';shape-rendering:crispEdges;"/>'+r}d&&(m=s+'<path x="0" y="0" style="fill:'+t.color+';shape-rendering:crispEdges;" d="'+b+'" />');let x="";if(void 0!==this.options.image&&this.options.image.svg){const e=o*this.options.image.width/100,t=a*this.options.image.height/100;x+=`<svg x="${o/2-e/2}" y="${a/2-t/2}" width="${e}" height="${t}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,x+=this.options.image.svg+r,x+="</svg>"}var A="";switch(e.container){case"svg":p&&(A+='<?xml version="1.0" standalone="yes"?>'+r),A+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+o+'" height="'+a+'">'+r,A+=f+_+m,A+=x,A+="</svg>";break;case"svg-viewbox":p&&(A+='<?xml version="1.0" standalone="yes"?>'+r),A+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+o+" "+a+'">'+r,A+=f+_+m,A+=x,A+="</svg>";break;case"g":A+='<g width="'+o+'" height="'+a+'">'+r,A+=f+_+m,A+=x,A+="</g>";break;default:A+=(f+_+m+x).replace(/^\s+/,"")}return A},e.exports=h},"6RcL":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3RequestMessage=void 0;const i=n("obTc");t.Web3RequestMessage=function(e){return Object.assign({type:i.RelayMessageType.WEB3_REQUEST},e)}},"7wIv":function(e,t,n){"use strict";var i;function s(e,t,n){if(!n||typeof n.value!==i.typeOfFunction)throw new TypeError("Only methods can be decorated with @bind. <"+t+"> is not a method!");return{configurable:i.boolTrue,get:function(){var e=n.value.bind(this);return Object.defineProperty(this,t,{value:e,configurable:i.boolTrue,writable:i.boolTrue}),e}}}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.typeOfFunction="function",e.boolTrue=!0}(i||(i={})),t.bind=s,t.default=s},"853V":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='.-walletlink-css-reset .-walletlink-extension-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-walletlink-css-reset .-walletlink-extension-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.5);transition:opacity .25s}.-walletlink-css-reset .-walletlink-extension-dialog-backdrop-hidden{opacity:0}.-walletlink-css-reset .-walletlink-extension-dialog-box{display:flex;position:relative;max-width:500px;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-walletlink-css-reset .-walletlink-extension-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-walletlink-css-reset .-walletlink-extension-dialog-box-top{display:flex;flex-direction:row;background-color:#fff;border-radius:8px;overflow:hidden;min-height:300px}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-install-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center;padding:32px}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-install-region button{display:block;border-radius:8px;background-color:#1652f0;color:#fff;width:90%;min-width:fit-content;height:44px;margin-top:16px;font-size:16px;padding-left:16px;padding-right:16px;cursor:pointer;font-weight:500;text-align:center}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-info-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center;background-color:#fafbfc}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-description{display:flex;flex-direction:row;align-items:center;padding-top:14px;padding-bottom:14px;padding-left:24px;padding-right:32px}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-description-icon-wrapper{display:block;position:relative;width:40px;height:40px;flex-shrink:0;flex-grow:0;border-radius:20px;background-color:#fff;box-shadow:0px 0px 8px rgba(0,0,0,.04),0px 16px 24px rgba(0,0,0,.06)}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-description-icon-wrapper img{position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-description-text{margin-left:16px;flex-grow:1;font-size:13px;line-height:19px;color:#000;align-self:center}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom{display:flex;flex-direction:row;overflow:hidden;border-radius:8px;background-color:#fff;margin-top:8px}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-description-region{display:flex;flex-direction:column;justify-content:center;padding:32px;flex-grow:1}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-description{font-size:13px;line-height:19px;margin-top:12px;color:#aaa}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-description a{font-size:inherit;line-height:inherit;color:#1652f0;cursor:pointer}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-region{position:relative;flex-shrink:0;display:flex;flex-direction:column;justify-content:center;padding-left:24px;padding-right:24px;padding-top:16px;padding-bottom:16px}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-wrapper{position:relative;display:block;padding:8px;border-radius:8px;box-shadow:0px 4px 12px rgba(0,0,0,.1)}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-wrapper img{display:block}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background-color:rgba(255,255,255,.95)}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-connecting>p{font-size:12px;font-weight:bold;color:#000;margin-top:16px}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel{position:absolute;-webkit-appearance:none;display:flex;align-items:center;justify-content:center;top:16px;right:16px;width:24px;height:24px;border-radius:12px;background-color:#fafbfc;cursor:pointer}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x{position:relative;display:block;cursor:pointer}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x::before,.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x::after{content:"";position:absolute;display:block;top:-1px;left:-7px;width:14px;height:1px;background-color:#000;transition:background-color .2s}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x::before{transform:rotate(45deg)}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x::after{transform:rotate(135deg)}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x-a,.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x-b{background-color:#000}.-walletlink-css-reset .-walletlink-extension-dialog-container{display:block}.-walletlink-css-reset .-walletlink-extension-dialog-container-hidden{display:none}.-walletlink-css-reset .-walletlink-extension-dialog h2{display:block;text-align:left;font-size:22px;font-weight:600;line-height:28px;color:#000}'},"8YYL":function(e,t,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.Web3Method=void 0,(i=t.Web3Method||(t.Web3Method={})).requestEthereumAccounts="requestEthereumAccounts",i.signEthereumMessage="signEthereumMessage",i.signEthereumTransaction="signEthereumTransaction",i.submitEthereumTransaction="submitEthereumTransaction",i.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",i.scanQRCode="scanQRCode",i.generic="generic",i.childRequestEthereumAccounts="childRequestEthereumAccounts",i.addEthereumChain="addEthereumChain",i.switchEthereumChain="switchEthereumChain"},"976o":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RxWebSocket=t.ConnectionState=void 0;const i=n("qCKp"),s=n("kU1M");var r;!function(e){e[e.DISCONNECTED=0]="DISCONNECTED",e[e.CONNECTING=1]="CONNECTING",e[e.CONNECTED=2]="CONNECTED"}(r=t.ConnectionState||(t.ConnectionState={})),t.RxWebSocket=class{constructor(e,t=WebSocket){this.WebSocketClass=t,this.webSocket=null,this.connectionStateSubject=new i.BehaviorSubject(r.DISCONNECTED),this.incomingDataSubject=new i.Subject,this.url=e.replace(/^http/,"ws")}connect(){return this.webSocket?(0,i.throwError)(new Error("webSocket object is not null")):new i.Observable(e=>{let t;try{this.webSocket=t=new this.WebSocketClass(this.url)}catch(n){return void e.error(n)}this.connectionStateSubject.next(r.CONNECTING),t.onclose=t=>{this.clearWebSocket(),e.error(new Error(`websocket error ${t.code}: ${t.reason}`)),this.connectionStateSubject.next(r.DISCONNECTED)},t.onopen=t=>{e.next(),e.complete(),this.connectionStateSubject.next(r.CONNECTED)},t.onmessage=e=>{this.incomingDataSubject.next(e.data)}}).pipe((0,s.take)(1))}disconnect(){const{webSocket:e}=this;if(e){this.clearWebSocket(),this.connectionStateSubject.next(r.DISCONNECTED);try{e.close()}catch(t){}}}get connectionState$(){return this.connectionStateSubject.asObservable()}get incomingData$(){return this.incomingDataSubject.asObservable()}get incomingJSONData$(){return this.incomingData$.pipe((0,s.flatMap)(e=>{let t;try{t=JSON.parse(e)}catch(n){return(0,i.empty)()}return(0,i.of)(t)}))}sendData(e){const{webSocket:t}=this;if(!t)throw new Error("websocket is not connected");t.send(e)}clearWebSocket(){const{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}}},"98+w":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filterFromParam=t.FilterPolyfill=void 0;const i=n("p7SB"),s=n("oK5k"),r={jsonrpc:"2.0",id:0};function o(e){return{fromBlock:l(e.fromBlock),toBlock:l(e.toBlock),addresses:void 0===e.address?null:Array.isArray(e.address)?e.address:[e.address],topics:e.topics||[]}}function a(e){const t={fromBlock:c(e.fromBlock),toBlock:c(e.toBlock),topics:e.topics};return null!==e.addresses&&(t.address=e.addresses),t}function l(e){if(void 0===e||"latest"===e||"pending"===e)return"latest";if("earliest"===e)return(0,i.IntNumber)(0);if((0,s.isHexString)(e))return(0,s.intNumberFromHexString)(e);throw new Error(`Invalid block option: ${e}`)}function c(e){return"latest"===e?e:(0,s.hexStringFromIntNumber)(e)}function u(){return Object.assign(Object.assign({},r),{error:{code:-32e3,message:"filter not found"}})}function d(){return Object.assign(Object.assign({},r),{result:[]})}t.FilterPolyfill=class{constructor(e){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,i.IntNumber)(1),this.provider=e}async newFilter(e){const t=o(e),n=this.makeFilterId(),i=await this.setInitialCursorPosition(n,t.fromBlock);return console.log(`Installing new log filter(${n}):`,t,"initial cursor position:",i),this.logFilters.set(n,t),this.setFilterTimeout(n),(0,s.hexStringFromIntNumber)(n)}async newBlockFilter(){const e=this.makeFilterId(),t=await this.setInitialCursorPosition(e,"latest");return console.log(`Installing new block filter (${e}) with initial cursor position:`,t),this.blockFilters.add(e),this.setFilterTimeout(e),(0,s.hexStringFromIntNumber)(e)}async newPendingTransactionFilter(){const e=this.makeFilterId(),t=await this.setInitialCursorPosition(e,"latest");return console.log(`Installing new block filter (${e}) with initial cursor position:`,t),this.pendingTransactionFilters.add(e),this.setFilterTimeout(e),(0,s.hexStringFromIntNumber)(e)}uninstallFilter(e){const t=(0,s.intNumberFromHexString)(e);return console.log(`Uninstalling filter (${t})`),this.deleteFilter(t),!0}getFilterChanges(e){const t=(0,s.intNumberFromHexString)(e);return this.timeouts.has(t)&&this.setFilterTimeout(t),this.logFilters.has(t)?this.getLogFilterChanges(t):this.blockFilters.has(t)?this.getBlockFilterChanges(t):this.pendingTransactionFilters.has(t)?this.getPendingTransactionFilterChanges(t):Promise.resolve(u())}async getFilterLogs(e){const t=(0,s.intNumberFromHexString)(e),n=this.logFilters.get(t);return n?this.sendAsyncPromise(Object.assign(Object.assign({},r),{method:"eth_getLogs",params:[a(n)]})):u()}makeFilterId(){return(0,i.IntNumber)(++this.nextFilterId)}sendAsyncPromise(e){return new Promise((t,n)=>{this.provider.sendAsync(e,(e,i)=>e?n(e):Array.isArray(i)||null==i?n(new Error(`unexpected response received: ${JSON.stringify(i)}`)):void t(i))})}deleteFilter(e){console.log(`Deleting filter (${e})`),this.logFilters.delete(e),this.blockFilters.delete(e),this.pendingTransactionFilters.delete(e),this.cursors.delete(e),this.timeouts.delete(e)}async getLogFilterChanges(e){const t=this.logFilters.get(e),n=this.cursors.get(e);if(!n||!t)return u();const o=await this.getCurrentBlockHeight(),l="latest"===t.toBlock?o:t.toBlock;if(n>o)return d();if(n>t.toBlock)return d();console.log(`Fetching logs from ${n} to ${l} for filter ${e}`);const c=await this.sendAsyncPromise(Object.assign(Object.assign({},r),{method:"eth_getLogs",params:[a(Object.assign(Object.assign({},t),{fromBlock:n,toBlock:l}))]}));if(Array.isArray(c.result)){const t=c.result.map(e=>(0,s.intNumberFromHexString)(e.blockNumber||"0x0")),r=Math.max(...t);if(r&&r>n){const t=(0,i.IntNumber)(r+1);console.log(`Moving cursor position for filter (${e}) from ${n} to ${t}`),this.cursors.set(e,t)}}return c}async getBlockFilterChanges(e){const t=this.cursors.get(e);if(!t)return u();const n=await this.getCurrentBlockHeight();if(t>n)return d();console.log(`Fetching blocks from ${t} to ${n} for filter (${e})`);const o=(await Promise.all((0,s.range)(t,n+1).map(e=>this.getBlockHashByNumber((0,i.IntNumber)(e))))).filter(e=>!!e),a=(0,i.IntNumber)(t+o.length);return console.log(`Moving cursor position for filter (${e}) from ${t} to ${a}`),this.cursors.set(e,a),Object.assign(Object.assign({},r),{result:o})}async getPendingTransactionFilterChanges(e){return Promise.resolve(d())}async setInitialCursorPosition(e,t){const n=await this.getCurrentBlockHeight(),i="number"==typeof t&&t>n?t:n;return this.cursors.set(e,i),i}setFilterTimeout(e){const t=this.timeouts.get(e);t&&window.clearTimeout(t);const n=window.setTimeout(()=>{console.log(`Filter (${e}) timed out`),this.deleteFilter(e)},3e5);this.timeouts.set(e,n)}async getCurrentBlockHeight(){const{result:e}=await this.sendAsyncPromise(Object.assign(Object.assign({},r),{method:"eth_blockNumber",params:[]}));return(0,s.intNumberFromHexString)((0,s.ensureHexString)(e))}async getBlockHashByNumber(e){const t=await this.sendAsyncPromise(Object.assign(Object.assign({},r),{method:"eth_getBlockByNumber",params:[(0,s.hexStringFromIntNumber)(e),!1]}));return t.result&&"string"==typeof t.result.hash?(0,s.ensureHexString)(t.result.hash):null}},t.filterFromParam=o},ArRG:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkAnalytics=void 0,t.WalletLinkAnalytics=class{sendEvent(e,t){}}},Bq1D:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const i=n("jt4f"),s=n("RtZe"),r=i.errorCodes.rpc.internal,o={code:r,message:a(r)};function a(e,n="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(e)){const n=e.toString();if(d(i.errorValues,n))return i.errorValues[n].message;if(c(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function l(e){if(!Number.isInteger(e))return!1;const t=e.toString();return!!i.errorValues[t]||!!c(e)}function c(e){return e>=-32099&&e<=-32e3}function u(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=a,t.isValidCode=l,t.serializeError=function(e,{fallbackError:t=o,shouldIncludeStack:n=!1}={}){var i,r;if(!t||!Number.isInteger(t.code)||"string"!=typeof t.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof s.EthereumRpcError)return e.serialize();const c={};if(e&&"object"==typeof e&&!Array.isArray(e)&&d(e,"code")&&l(e.code)){const t=e;c.code=t.code,t.message&&"string"==typeof t.message?(c.message=t.message,d(t,"data")&&(c.data=t.data)):(c.message=a(c.code),c.data={originalError:u(e)})}else{c.code=t.code;const n=null===(i=e)||void 0===i?void 0:i.message;c.message=n&&"string"==typeof n?n:t.message,c.data={originalError:u(e)}}const h=null===(r=e)||void 0===r?void 0:r.stack;return n&&e&&h&&"string"==typeof h&&(c.stack=h),c}},C4r1:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1LjYzNSAyLjExN2EzLjg4OSAzLjg4OSAwIDAgMC01LjUyMSAwTDYuODkgNS4zMzVBMy44OTQgMy44OTQgMCAwIDAgNS44IDguNzM5Yy4wODMuNTA2LjI2OCAxLjAxMS41NTMgMS40NjYuMTUxLjI1My4zMzYuNDcyLjUzNy42OTFsLjYyMS42MjQgMS4xNDEtMS4xNDYtLjYyLS42MjRhMi4xMDUgMi4xMDUgMCAwIDEtLjQ4Ny0uNzQxIDIuMzQgMi4zNCAwIDAgMSAuNTAzLTIuNTFsMy4yMDYtMy4yMmEyLjI5MyAyLjI5MyAwIDAgMSAzLjIzOSAwYy44OS44OTQuODkgMi4zNDMgMCAzLjI1M2wtMS41MjcgMS41MzNjLjIzNC42NC4zMzUgMS4zMzEuMzAyIDIuMDA1bDIuMzgzLTIuMzkyYzEuNTEtMS41MzQgMS40OTMtNC4wMjgtLjAxNy01LjU2MVoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBkPSJNMTEuMjcxIDcuNzQ1YTMuMTMgMy4xMyAwIDAgMC0uNTU0LS42OWwtLjYyLS42MjQtMS4xNDIgMS4xNDYuNjIxLjYyM2MuMjE4LjIyLjM4Ni40ODkuNDg3Ljc1OC4zMzUuODI2LjE2NyAxLjgyLS41MDQgMi40OTRsLTMuMjA1IDMuMjE5YTIuMjkzIDIuMjkzIDAgMCAxLTMuMjQgMCAyLjMxNiAyLjMxNiAwIDAgMSAwLTMuMjUybDEuNTI4LTEuNTM0YTQuODE1IDQuODE1IDAgMCAxLS4yODUtMi4wMDVsLTIuMzgzIDIuMzkzYTMuOTI3IDMuOTI3IDAgMCAwIDAgNS41NDQgMy45MDkgMy45MDkgMCAwIDAgNS41MzggMGwzLjIwNS0zLjIxOWEzLjk1OCAzLjk1OCAwIDAgMCAxLjA5MS0zLjQwNCA0LjIxMSA0LjIxMSAwIDAgMC0uNTM3LTEuNDQ5WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},CiWU:function(e,t,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumChain=void 0,(i=t.EthereumChain||(t.EthereumChain={}))[i.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",i[i.OPTIMISM_MAINNET=10]="OPTIMISM_MAINNET",i[i.POLYGON_MAINNET=137]="POLYGON_MAINNET",i[i.ETHEREUM_CLASSIC_MAINNET=61]="ETHEREUM_CLASSIC_MAINNET",i[i.BSC_MAINNET=56]="BSC_MAINNET",i[i.FANTOM_MAINNET=250]="FANTOM_MAINNET",i[i.ARBITRUM_MAINNET=42161]="ARBITRUM_MAINNET",i[i.XDAI_MAINNET=100]="XDAI_MAINNET",i[i.AVALANCHE_MAINNET=43114]="AVALANCHE_MAINNET",i[i.ROPSTEN=3]="ROPSTEN",i[i.RINKEBY=4]="RINKEBY",i[i.GOERLI=5]="GOERLI",i[i.KOVAN=42]="KOVAN",i[i.OPTIMISM_KOVAN=69]="OPTIMISM_KOVAN",i[i.POLYGON_TESTNET=80001]="POLYGON_TESTNET",i[i.BSC_TESTNET=97]="BSC_TESTNET",i[i.FANTOM_TESTNET=4002]="FANTOM_TESTNET",i[i.ARBITRUM_TESTNET=421611]="ARBITRUM_TESTNET",i[i.AVALANCHE_FUJI=43113]="AVALANCHE_FUJI",function(e){e.rpcUrl=function(t){switch(t){case e.ETHEREUM_MAINNET:return"https://mainnet-infura.wallet.coinbase.com";case e.ROPSTEN:return"https://ropsten-infura.wallet.coinbase.com";case e.RINKEBY:return"https://rinkeby-infura.wallet.coinbase.com";case e.KOVAN:return"https://kovan-infura.wallet.coinbase.com";case e.GOERLI:return"https://goerli-node.wallet.coinbase.com";case e.OPTIMISM_KOVAN:return"https://optimism-node.wallet.coinbase.com";case e.OPTIMISM_MAINNET:return"https://optimism-mainnet.wallet.coinbase.com";case e.POLYGON_MAINNET:return"https://polygon-mainnet-infura.wallet.coinbase.com";case e.POLYGON_TESTNET:return"https://polygon-mumbai-infura.wallet.coinbase.com";case e.BSC_MAINNET:return"https://bsc-dataseed.binance.org";case e.BSC_TESTNET:return"https://data-seed-prebsc-1-s1.binance.org:8545";case e.FANTOM_MAINNET:return"https://rpcapi.fantom.network";case e.FANTOM_TESTNET:return"https://rpc.testnet.fantom.network";case e.ARBITRUM_MAINNET:return"https://l2-mainnet.wallet.coinbase.com?targetName=arbitrum";case e.ARBITRUM_TESTNET:return"https://rinkeby.arbitrum.io/rpc";case e.XDAI_MAINNET:return"https://rpc.xdaichain.com";case e.AVALANCHE_MAINNET:return"https://api.avax.network/ext/bc/C/rpc";case e.AVALANCHE_FUJI:return"https://api.avax-test.network/ext/bc/C/rpc";default:return}},e.fromChainId=function(t){switch(Number(t)){case e.ETHEREUM_MAINNET.valueOf():return e.ETHEREUM_MAINNET;case e.OPTIMISM_MAINNET.valueOf():return e.OPTIMISM_MAINNET;case e.POLYGON_MAINNET.valueOf():return e.POLYGON_MAINNET;case e.ETHEREUM_CLASSIC_MAINNET.valueOf():return e.ETHEREUM_CLASSIC_MAINNET;case e.BSC_MAINNET.valueOf():return e.BSC_MAINNET;case e.FANTOM_MAINNET.valueOf():return e.FANTOM_MAINNET;case e.ARBITRUM_MAINNET.valueOf():return e.ARBITRUM_MAINNET;case e.AVALANCHE_MAINNET.valueOf():return e.AVALANCHE_MAINNET;case e.XDAI_MAINNET.valueOf():return e.XDAI_MAINNET;case e.ROPSTEN.valueOf():return e.ROPSTEN;case e.RINKEBY.valueOf():return e.RINKEBY;case e.GOERLI.valueOf():return e.GOERLI;case e.KOVAN.valueOf():return e.KOVAN;case e.OPTIMISM_KOVAN.valueOf():return e.OPTIMISM_KOVAN;case e.POLYGON_TESTNET.valueOf():return e.POLYGON_TESTNET;case e.BSC_TESTNET.valueOf():return e.BSC_TESTNET;case e.FANTOM_TESTNET.valueOf():return e.FANTOM_TESTNET;case e.ARBITRUM_TESTNET.valueOf():return e.ARBITRUM_TESTNET;case e.AVALANCHE_FUJI.valueOf():return e.AVALANCHE_FUJI;default:return}}}(t.EthereumChain||(t.EthereumChain={}))},CkXD:function(e,t,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.JSONRPCMethod=void 0,(i=t.JSONRPCMethod||(t.JSONRPCMethod={})).eth_accounts="eth_accounts",i.eth_coinbase="eth_coinbase",i.net_version="net_version",i.eth_chainId="eth_chainId",i.eth_uninstallFilter="eth_uninstallFilter",i.eth_requestAccounts="eth_requestAccounts",i.eth_sign="eth_sign",i.eth_ecRecover="eth_ecRecover",i.personal_sign="personal_sign",i.personal_ecRecover="personal_ecRecover",i.eth_signTransaction="eth_signTransaction",i.eth_sendRawTransaction="eth_sendRawTransaction",i.eth_sendTransaction="eth_sendTransaction",i.eth_signTypedData_v1="eth_signTypedData_v1",i.eth_signTypedData_v2="eth_signTypedData_v2",i.eth_signTypedData_v3="eth_signTypedData_v3",i.eth_signTypedData_v4="eth_signTypedData_v4",i.eth_signTypedData="eth_signTypedData",i.walletlink_arbitrary="walletlink_arbitrary",i.wallet_addEthereumChain="wallet_addEthereumChain",i.wallet_switchEthereumChain="wallet_switchEthereumChain",i.eth_subscribe="eth_subscribe",i.eth_unsubscribe="eth_unsubscribe",i.eth_newFilter="eth_newFilter",i.eth_newBlockFilter="eth_newBlockFilter",i.eth_newPendingTransactionFilter="eth_newPendingTransactionFilter",i.eth_getFilterChanges="eth_getFilterChanges",i.eth_getFilterLogs="eth_getFilterLogs"},Clep:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="50" cy="50" r="50" fill="white"/>\n<circle cx="49.9996" cy="49.9996" r="43.6363" fill="#1B53E4"/>\n<circle cx="49.9996" cy="49.9996" r="43.6363" stroke="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M19.3379 49.9484C19.3379 66.8508 33.04 80.553 49.9425 80.553C66.8449 80.553 80.5471 66.8508 80.5471 49.9484C80.5471 33.0459 66.8449 19.3438 49.9425 19.3438C33.04 19.3438 19.3379 33.0459 19.3379 49.9484ZM44.0817 40.0799C41.8725 40.0799 40.0817 41.8708 40.0817 44.0799V55.8029C40.0817 58.012 41.8725 59.8029 44.0817 59.8029H55.8046C58.0138 59.8029 59.8046 58.012 59.8046 55.8029V44.0799C59.8046 41.8708 58.0138 40.0799 55.8046 40.0799H44.0817Z" fill="white"/>\n</svg>\n\n'},G0Bx:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkSdkUI=void 0;const i=n("Xy71"),s=n("i6jr"),r=n("Ppv8"),o=n("16RA");t.WalletLinkSdkUI=class extends o.WalletLinkUI{constructor(e){super(e),this.attached=!1,this.snackbar=new s.Snackbar({darkMode:e.darkMode}),this.linkFlow=new i.LinkFlow({darkMode:e.darkMode,version:e.version,sessionId:e.session.id,sessionSecret:e.session.secret,walletLinkUrl:e.walletLinkUrl,connected$:e.connected$,isParentConnection:!1})}attach(){if(this.attached)throw new Error("WalletLinkUI is already attached");const e=document.documentElement,t=document.createElement("div");t.className="-walletlink-css-reset",e.appendChild(t),this.linkFlow.attach(t),this.snackbar.attach(t),this.attached=!0,(0,r.injectCssReset)()}setConnectDisabled(e){this.linkFlow.setConnectDisabled(e)}switchEthereumChain(e){}requestEthereumAccounts(e){this.linkFlow.open({onCancel:e.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(e){}signEthereumTransaction(e){}submitEthereumTransaction(e){}ethereumAddressFromSignedMessage(e){}showConnecting(e){return this.snackbar.presentItem({message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]})}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}}},IBgt:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3RequestCanceledMessage=void 0;const i=n("obTc");t.Web3RequestCanceledMessage=function(e){return{type:i.RelayMessageType.WEB3_REQUEST_CANCELED,id:e}}},J5ZA:function(e,t,n){"use strict";n.r(t),n.d(t,"useState",function(){return f}),n.d(t,"useReducer",function(){return _}),n.d(t,"useEffect",function(){return m}),n.d(t,"useLayoutEffect",function(){return b}),n.d(t,"useRef",function(){return w}),n.d(t,"useImperativeHandle",function(){return y}),n.d(t,"useMemo",function(){return k}),n.d(t,"useCallback",function(){return E}),n.d(t,"useContext",function(){return v}),n.d(t,"useDebugValue",function(){return M}),n.d(t,"useErrorBoundary",function(){return S});var i,s,r,o=n("hh2p"),a=0,l=[],c=o.options.__b,u=o.options.__r,d=o.options.diffed,h=o.options.__c,p=o.options.unmount;function g(e,t){o.options.__h&&o.options.__h(s,e,a||t),a=0;var n=s.__H||(s.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function f(e){return a=1,_(R,e)}function _(e,t,n){var r=g(i++,2);return r.t=e,r.__c||(r.__=[n?n(t):R(void 0,t),function(e){var t=r.t(r.__[0],e);r.__[0]!==t&&(r.__=[t,r.__[1]],r.__c.setState({}))}],r.__c=s),r.__}function m(e,t){var n=g(i++,3);!o.options.__s&&N(n.__H,t)&&(n.__=e,n.__H=t,s.__H.__h.push(n))}function b(e,t){var n=g(i++,4);!o.options.__s&&N(n.__H,t)&&(n.__=e,n.__H=t,s.__h.push(n))}function w(e){return a=5,k(function(){return{current:e}},[])}function y(e,t,n){a=6,b(function(){"function"==typeof e?e(t()):e&&(e.current=t())},null==n?n:n.concat(e))}function k(e,t){var n=g(i++,7);return N(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function E(e,t){return a=8,k(function(){return e},t)}function v(e){var t=s.context[e.__c],n=g(i++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(s)),t.props.value):e.__}function M(e,t){o.options.useDebugValue&&o.options.useDebugValue(t?t(e):e)}function S(e){var t=g(i++,10),n=f();return t.__=e,s.componentDidCatch||(s.componentDidCatch=function(e){t.__&&t.__(e),n[1](e)}),[n[0],function(){n[1](void 0)}]}function x(){var e;for(l.sort(function(e,t){return e.__v.__b-t.__v.__b});e=l.pop();)if(e.__P)try{e.__H.__h.forEach(C),e.__H.__h.forEach(I),e.__H.__h=[]}catch(s){e.__H.__h=[],o.options.__e(s,e.__v)}}o.options.__b=function(e){s=null,c&&c(e)},o.options.__r=function(e){u&&u(e),i=0;var t=(s=e.__c).__H;t&&(t.__h.forEach(C),t.__h.forEach(I),t.__h=[])},o.options.diffed=function(e){d&&d(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==l.push(t)&&r===o.options.requestAnimationFrame||((r=o.options.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(i),A&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,100);A&&(t=requestAnimationFrame(n))})(x)),s=null},o.options.__c=function(e,t){t.some(function(e){try{e.__h.forEach(C),e.__h=e.__h.filter(function(e){return!e.__||I(e)})}catch(r){t.some(function(e){e.__h&&(e.__h=[])}),t=[],o.options.__e(r,e.__v)}}),h&&h(e,t)},o.options.unmount=function(e){p&&p(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{C(e)}catch(e){t=e}}),t&&o.options.__e(t,n.__v))};var A="function"==typeof requestAnimationFrame;function C(e){var t=s,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),s=t}function I(e){var t=s;e.__c=e.__(),s=t}function N(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function R(e,t){return"function"==typeof t?t(e):t}},KU7o:function(e,t,n){(function(t){const i=n("aYMp"),s=n("OZ/i");function r(e){return t.allocUnsafe(e).fill(0)}function o(e,t,n){const i=r(t);return e=a(e),n?e.length<t?(e.copy(i),i):e.slice(0,t):e.length<t?(e.copy(i,t-e.length),i):e.slice(-t)}function a(e){if(!t.isBuffer(e))if(Array.isArray(e))e=t.from(e);else if("string"==typeof e)e=l(e)?t.from((n=c(e)).length%2?"0"+n:n,"hex"):t.from(e);else if("number"==typeof e)e=intToBuffer(e);else if(null==e)e=t.allocUnsafe(0);else if(s.isBN(e))e=e.toArrayLike(t);else{if(!e.toArray)throw new Error("invalid type");e=t.from(e.toArray())}var n;return e}function l(e){return"string"==typeof e&&e.match(/^0x[0-9A-Fa-f]*$/)}function c(e){return"string"==typeof e&&e.startsWith("0x")?e.slice(2):e}e.exports={zeros:r,setLength:o,setLengthRight:function(e,t){return o(e,t,!0)},isHexString:l,stripHexPrefix:c,toBuffer:a,bufferToHex:function(e){return"0x"+(e=a(e)).toString("hex")},keccak:function(e,t){return e=a(e),t||(t=256),i("keccak"+t).update(e).digest()}}}).call(this,n("tjlA").Buffer)},LMR0:function(e,t,n){"use strict";(function(e){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QRCode=void 0;const s=n("hh2p"),r=n("J5ZA"),o=i(n("5jSq"));t.QRCode=t=>{const[n,i]=(0,r.useState)("");return(0,r.useEffect)(()=>{var n,s;const r=new o.default({content:t.content,background:t.bgColor||"#ffffff",color:t.fgColor||"#000000",container:"svg",ecl:"M",width:null!==(n=t.width)&&void 0!==n?n:256,height:null!==(s=t.height)&&void 0!==s?s:256,padding:0,image:t.image}),a=e.from(r.svg(),"utf8").toString("base64");i(`data:image/svg+xml;base64,${a}`)}),n?(0,s.h)("img",{src:n,alt:"QR Code"}):null}}).call(this,n("tjlA").Buffer)},MkKo:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkConnection=void 0;const i=n("qCKp"),s=n("kU1M"),r=n("ZxoF"),o=n("ZK22"),a=n("p7SB"),l=n("jOtK"),c=n("976o"),u=n("4Mv7");t.WalletLinkConnection=class{constructor(e,t,n,l,u=WebSocket){this.sessionId=e,this.sessionKey=t,this.subscriptions=new i.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,a.IntNumber)(1),this.connectedSubject=new i.BehaviorSubject(!1),this.linkedSubject=new i.BehaviorSubject(!1),this.sessionConfigSubject=new i.ReplaySubject(1);const d=new c.RxWebSocket(n+"/rpc",u);this.ws=d,this.walletLinkAnalytics=l,this.subscriptions.add(d.connectionState$.pipe((0,s.tap)(t=>this.walletLinkAnalytics.sendEvent(r.EVENTS.CONNECTED_STATE_CHANGE,{state:t,sessionIdHash:o.Session.hash(e)})),(0,s.skip)(1),(0,s.filter)(e=>e===c.ConnectionState.DISCONNECTED&&!this.destroyed),(0,s.delay)(5e3),(0,s.filter)(e=>!this.destroyed),(0,s.flatMap)(e=>d.connect()),(0,s.retry)()).subscribe()),this.subscriptions.add(d.connectionState$.pipe((0,s.skip)(2),(0,s.switchMap)(e=>(0,i.iif)(()=>e===c.ConnectionState.CONNECTED,this.authenticate().pipe((0,s.tap)(e=>this.sendIsLinked()),(0,s.tap)(e=>this.sendGetSessionConfig()),(0,s.map)(e=>!0)),(0,i.of)(!1))),(0,s.distinctUntilChanged)(),(0,s.catchError)(e=>(0,i.of)(!1))).subscribe(e=>this.connectedSubject.next(e))),this.subscriptions.add(d.connectionState$.pipe((0,s.skip)(1),(0,s.switchMap)(e=>(0,i.iif)(()=>e===c.ConnectionState.CONNECTED,(0,i.timer)(0,1e4)))).subscribe(e=>0===e?this.updateLastHeartbeat():this.heartbeat())),this.subscriptions.add(d.incomingData$.pipe((0,s.filter)(e=>"h"===e)).subscribe(e=>this.updateLastHeartbeat())),this.subscriptions.add(d.incomingJSONData$.pipe((0,s.filter)(e=>["IsLinkedOK","Linked"].includes(e.type))).subscribe(t=>{const n=t;this.walletLinkAnalytics.sendEvent(r.EVENTS.LINKED,{sessionIdHash:o.Session.hash(e),linked:n.linked,type:t.type,onlineGuests:n.onlineGuests}),this.linkedSubject.next(n.linked||n.onlineGuests>0)})),this.subscriptions.add(d.incomingJSONData$.pipe((0,s.filter)(e=>["GetSessionConfigOK","SessionConfigUpdated"].includes(e.type))).subscribe(t=>{const n=t;this.walletLinkAnalytics.sendEvent(r.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:o.Session.hash(e),metadata_keys:n&&n.metadata?Object.keys(n.metadata):void 0}),this.sessionConfigSubject.next({webhookId:n.webhookId,webhookUrl:n.webhookUrl,metadata:n.metadata})}))}connect(){if(this.destroyed)throw new Error("instance is destroyed");this.walletLinkAnalytics.sendEvent(r.EVENTS.STARTED_CONNECTING,{sessionIdHash:o.Session.hash(this.sessionId)}),this.ws.connect().subscribe()}destroy(){this.subscriptions.unsubscribe(),this.ws.disconnect(),this.walletLinkAnalytics.sendEvent(r.EVENTS.DISCONNECTED,{sessionIdHash:o.Session.hash(this.sessionId)}),this.destroyed=!0}get isDestroyed(){return this.destroyed}get connected$(){return this.connectedSubject.asObservable()}get onceConnected$(){return this.connected$.pipe((0,s.filter)(e=>e),(0,s.take)(1),(0,s.map)(()=>{}))}get linked$(){return this.linkedSubject.asObservable()}get onceLinked$(){return this.linked$.pipe((0,s.filter)(e=>e),(0,s.take)(1),(0,s.map)(()=>{}))}get sessionConfig$(){return this.sessionConfigSubject.asObservable()}get incomingEvent$(){return this.ws.incomingJSONData$.pipe((0,s.filter)(e=>"Event"===e.type&&"string"==typeof e.sessionId&&"string"==typeof e.eventId&&"string"==typeof e.event&&"string"==typeof e.data),(0,s.map)(e=>e))}setSessionMetadata(e,t){const n=(0,l.ClientMessageSetSessionConfig)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId,metadata:{[e]:t}});return this.onceConnected$.pipe((0,s.flatMap)(e=>this.makeRequest(n)),(0,s.map)(e=>{if((0,u.isServerMessageFail)(e))throw new Error(e.error||"failed to set session metadata")}))}publishEvent(e,t,n=!1){const i=(0,l.ClientMessagePublishEvent)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId,event:e,data:t,callWebhook:n});return this.onceLinked$.pipe((0,s.flatMap)(e=>this.makeRequest(i)),(0,s.map)(e=>{if((0,u.isServerMessageFail)(e))throw new Error(e.error||"failed to publish event");return e.eventId}))}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>2e4)this.ws.disconnect();else try{this.ws.sendData("h")}catch(e){}}makeRequest(e,t=6e4){const n=e.id;try{this.sendData(e)}catch(r){return(0,i.throwError)(r)}return this.ws.incomingJSONData$.pipe((0,s.timeoutWith)(t,(0,i.throwError)(new Error(`request ${n} timed out`))),(0,s.filter)(e=>e.id===n),(0,s.take)(1))}authenticate(){const e=(0,l.ClientMessageHostSession)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId,sessionKey:this.sessionKey});return this.makeRequest(e).pipe((0,s.map)(e=>{if((0,u.isServerMessageFail)(e))throw new Error(e.error||"failed to authentcate")}))}sendIsLinked(){const e=(0,l.ClientMessageIsLinked)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}sendGetSessionConfig(){const e=(0,l.ClientMessageGetSessionConfig)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}}},OoBR:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWeb3ResponseMessage=t.Web3ResponseMessage=void 0;const i=n("obTc");t.Web3ResponseMessage=function(e){return Object.assign({type:i.RelayMessageType.WEB3_RESPONSE},e)},t.isWeb3ResponseMessage=function(e){return e&&e.type===i.RelayMessageType.WEB3_RESPONSE}},PYje:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='@namespace svg "http://www.w3.org/2000/svg";.-walletlink-css-reset,.-walletlink-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:transparent;background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;bottom:auto;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;content:normal;counter-increment:none;counter-reset:none;cursor:auto;direction:ltr;display:block;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;left:auto;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;max-height:none;max-width:none;min-height:0;min-width:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";right:auto;tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;top:auto;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;width:auto;word-spacing:normal;z-index:auto}.-walletlink-css-reset *{box-sizing:border-box;display:initial;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-walletlink-css-reset [class*=container]{margin:0;padding:0}.-walletlink-css-reset style{display:none}'},Ppv8:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.injectCssReset=void 0;const s=i(n("PYje"));t.injectCssReset=function(){const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(s.default)),document.documentElement.appendChild(e)}},Py8h:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLink=t.WalletLinkProvider=void 0;const i=n("e7sy"),s=n("Yjll");var r=n("e7sy");Object.defineProperty(t,"WalletLinkProvider",{enumerable:!0,get:function(){return r.WalletLinkProvider}});var o=n("Yjll");Object.defineProperty(t,"WalletLink",{enumerable:!0,get:function(){return o.WalletLink}}),t.default=s.WalletLink,"undefined"!=typeof window&&(window.WalletLink=s.WalletLink,window.WalletLinkProvider=i.WalletLinkProvider)},RtZe:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=t.EthereumRpcError=void 0;const i=n("N1pS");class s extends Error{constructor(e,t,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==n&&(this.data=n)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return i.default(this.serialize(),r,2)}}function r(e,t){if("[Circular]"!==t)return t}t.EthereumRpcError=s,t.EthereumProviderError=class extends s{constructor(e,t,n){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}}},UTEl:function(e,t,n){(function(t){const i=n("KU7o"),s=n("hLHX"),r={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},o={encodeData(e,n,r,o=!0){const a=["bytes32"],l=[this.hashType(e,r)];if(o){const c=(e,n,a)=>{if(void 0!==r[n])return["bytes32",null==a?"0x0000000000000000000000000000000000000000000000000000000000000000":i.keccak(this.encodeData(n,a,r,o))];if(void 0===a)throw new Error(`missing value for field ${e} of type ${n}`);if("bytes"===n)return["bytes32",i.keccak(a)];if("string"===n)return"string"==typeof a&&(a=t.from(a,"utf8")),["bytes32",i.keccak(a)];if(n.lastIndexOf("]")===n.length-1){const t=n.slice(0,n.lastIndexOf("[")),r=a.map(n=>c(e,t,n));return["bytes32",i.keccak(s.rawEncode(r.map(([e])=>e),r.map(([,e])=>e)))]}return[n,a]};for(const t of r[e]){const[e,i]=c(t.name,t.type,n[t.name]);a.push(e),l.push(i)}}else for(const s of r[e]){let e=n[s.name];if(void 0!==e)if("bytes"===s.type)a.push("bytes32"),e=i.keccak(e),l.push(e);else if("string"===s.type)a.push("bytes32"),"string"==typeof e&&(e=t.from(e,"utf8")),e=i.keccak(e),l.push(e);else if(void 0!==r[s.type])a.push("bytes32"),e=i.keccak(this.encodeData(s.type,e,r,o)),l.push(e);else{if(s.type.lastIndexOf("]")===s.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");a.push(s.type),l.push(e)}}return s.rawEncode(a,l)},encodeType(e,t){let n="",i=this.findTypeDependencies(e,t).filter(t=>t!==e);i=[e].concat(i.sort());for(const s of i){if(!t[s])throw new Error("No type definition specified: "+s);n+=s+"("+t[s].map(({name:e,type:t})=>t+" "+e).join(",")+")"}return n},findTypeDependencies(e,t,n=[]){if(e=e.match(/^\w*/)[0],n.includes(e)||void 0===t[e])return n;n.push(e);for(const i of t[e])for(const e of this.findTypeDependencies(i.type,t,n))!n.includes(e)&&n.push(e);return n},hashStruct(e,t,n,s=!0){return i.keccak(this.encodeData(e,t,n,s))},hashType(e,t){return i.keccak(this.encodeType(e,t))},sanitizeData(e){const t={};for(const n in r.properties)e[n]&&(t[n]=e[n]);return t.types&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},hash(e,n=!0){const s=this.sanitizeData(e),r=[t.from("1901","hex")];return r.push(this.hashStruct("EIP712Domain",s.domain,s.types,n)),"EIP712Domain"!==s.primaryType&&r.push(this.hashStruct(s.primaryType,s.message,s.types,n)),i.keccak(t.concat(r))}};e.exports={TYPED_MESSAGE_SCHEMA:r,TypedDataUtils:o,hashForSignTypedDataLegacy:function(e){return function(e){const t=new Error("Expect argument to be non-empty array");if("object"!=typeof e||!e.length)throw t;const n=e.map(function(e){return"bytes"===e.type?i.toBuffer(e.value):e.value}),r=e.map(function(e){return e.type}),o=e.map(function(e){if(!e.name)throw t;return e.type+" "+e.name});return s.soliditySHA3(["bytes32","bytes32"],[s.soliditySHA3(new Array(e.length).fill("string"),o),s.soliditySHA3(r,n)])}(e.data)},hashForSignTypedData_v3:function(e){return o.hash(e.data,!1)},hashForSignTypedData_v4:function(e){return o.hash(e.data)}}}).call(this,n("tjlA").Buffer)},UUbE:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkRelayEventManager=void 0;const i=n("oK5k");t.WalletLinkRelayEventManager=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const e=this._nextRequestId,t=(0,i.prepend0x)(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}}},WCWn:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEgN3Y5aDE0VjdIMVptNy41IDQuMzlWMTRoLTF2LTIuNjFjLS40NC0uMTktLjc1LS42My0uNzUtMS4xNGExLjI1IDEuMjUgMCAwIDEgMi41IDBjMCAuNTEtLjMxLjk1LS43NSAxLjE0Wk01LjY3IDZWNC4zM0M1LjY3IDMuMDUgNi43MSAyIDggMnMyLjMzIDEuMDUgMi4zMyAyLjMzVjZoMlY0LjMzQzEyLjMzIDEuOTQgMTAuMzkgMCA4IDBTMy42NyAxLjk0IDMuNjcgNC4zM1Y2aDJaIiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+"},Xy71:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkFlow=void 0;const i=n("hh2p"),s=n("qCKp"),r=n("/aAL"),o=n("kU1M"),a=n("1vXP");t.LinkFlow=class{constructor(e){this.extensionUI$=new s.BehaviorSubject({}),this.subscriptions=new s.Subscription,this.isConnected=!1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=e.darkMode,this.version=e.version,this.sessionId=e.sessionId,this.sessionSecret=e.sessionSecret,this.walletLinkUrl=e.walletLinkUrl,this.isParentConnection=e.isParentConnection,this.connected$=e.connected$,fetch("https://api.wallet.coinbase.com/rpc/v2/getFeatureFlags").then(e=>e.json()).then(e=>{const t=e.result.desktop.extension_ui;this.extensionUI$.next(void 0===t?{value:!1}:{value:t})}).catch(e=>{console.error(`Couldn't fetch feature flags - ${e}`),this.extensionUI$.next({value:!1})})}attach(e){this.root=document.createElement("div"),this.root.className="-walletlink-link-flow-root",e.appendChild(this.root),this.render(),this.subscriptions.add(this.connected$.subscribe(e=>{this.isConnected!==e&&(this.isConnected=e,this.render())}))}detach(){var e;this.root&&(this.subscriptions.unsubscribe(),(0,i.render)(null,this.root),null===(e=this.root.parentElement)||void 0===e||e.removeChild(this.root))}setConnectDisabled(e){this.connectDisabled=e}open(e){this.isOpen=!0,this.onCancel=e.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){if(!this.root)return;const e=this.extensionUI$.pipe((0,o.first)(e=>void 0!==e.value)).subscribe(e=>{this.root&&(0,i.render)(e.value?(0,i.h)(a.TryExtensionLinkDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,walletLinkUrl:this.walletLinkUrl,isOpen:this.isOpen,isConnected:this.isConnected,isParentConnection:this.isParentConnection,onCancel:this.onCancel,connectDisabled:this.connectDisabled}):(0,i.h)(r.LinkDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,walletLinkUrl:this.walletLinkUrl,isOpen:this.isOpen,isConnected:this.isConnected,isParentConnection:this.isParentConnection,onCancel:this.onCancel}),this.root)});this.subscriptions.add(e)}}},YQXw:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggMEMzLjU4IDAgMCAzLjU4IDAgOHMzLjU4IDggOCA4IDgtMy41OCA4LTgtMy41OC04LTgtOFptNS45MSA3aC0xLjk0Yy0uMS0xLjU3LS40Mi0zLS45MS00LjE1IDEuNDguODggMi41NSAyLjM4IDIuODUgNC4xNVpNOCAxNGMtLjQ1IDAtMS43Mi0xLjc3LTEuOTUtNWgzLjljLS4yMyAzLjIzLTEuNSA1LTEuOTUgNVpNNi4wNSA3QzYuMjggMy43NyA3LjU1IDIgOCAyYy40NSAwIDEuNzIgMS43NyAxLjk1IDVoLTMuOVpNNC45NCAyLjg1QzQuNDYgNCA0LjEzIDUuNDMgNC4wMyA3SDIuMDljLjMtMS43NyAxLjM3LTMuMjcgMi44NS00LjE1Wk0yLjA5IDloMS45NGMuMSAxLjU3LjQyIDMgLjkxIDQuMTVBNS45OTggNS45OTggMCAwIDEgMi4wOSA5Wm04Ljk3IDQuMTVjLjQ4LTEuMTUuODEtMi41OC45MS00LjE1aDEuOTRhNS45OTggNS45OTggMCAwIDEtMi44NSA0LjE1WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},Yjll:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLink=void 0;const i=n("ArRG"),s=n("Zozw"),r=n("e7sy"),o=n("G0Bx"),a=n("ZmYy"),l=n("UUbE"),c=n("oK5k"),u=e.env.WALLETLINK_URL||"https://www.walletlink.org",d=e.env.WALLETLINK_VERSION||n("oY2H").version||"unknown";class h{constructor(e){this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;let t,n=e.walletLinkUrl||u;t=e.walletLinkUIConstructor?e.walletLinkUIConstructor:e=>new o.WalletLinkSdkUI(e),this._overrideIsMetaMask=void 0!==e.overrideIsMetaMask&&e.overrideIsMetaMask,this._walletLinkAnalytics=e.walletLinkAnalytics?e.walletLinkAnalytics:new i.WalletLinkAnalytics;const r=new URL(n);this._storage=new s.ScopedLocalStorage(`-walletlink:${r.protocol}//${r.host}`),this._storage.setItem("version",h.VERSION),void 0===window.walletLinkExtension&&(this._relayEventManager=new l.WalletLinkRelayEventManager,this._relay=new a.WalletLinkRelay({walletLinkUrl:n,version:d,darkMode:!!e.darkMode,walletLinkUIConstructor:t,storage:this._storage,relayEventManager:this._relayEventManager,walletLinkAnalytics:this._walletLinkAnalytics}),this.setAppInfo(e.appName,e.appLogoUrl),this._relay.attachUI())}makeWeb3Provider(e="",t=1){if(void 0!==window.walletLinkExtension)return"boolean"==typeof window.walletLinkExtension.isCipher&&window.walletLinkExtension.isCipher||window.walletLinkExtension.setProviderInfo(e,t),window.walletLinkExtension;const n=this._relay;if(!n||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return e||n.setConnectDisabled(!0),new r.WalletLinkProvider({relayProvider:()=>Promise.resolve(n),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:e,chainId:t,walletLinkAnalytics:this._walletLinkAnalytics,overrideIsMetaMask:this._overrideIsMetaMask})}setAppInfo(e,t){var n;this._appName=e||"DApp",this._appLogoUrl=t||(0,c.getFavicon)(),void 0!==window.walletLinkExtension?"boolean"==typeof window.walletLinkExtension.isCipher&&window.walletLinkExtension.isCipher||window.walletLinkExtension.setAppInfo(this._appName,this._appLogoUrl):null===(n=this._relay)||void 0===n||n.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var e;void 0!==window.walletLinkExtension?window.walletLinkExtension.close():null===(e=this._relay)||void 0===e||e.resetAndReload()}}t.WalletLink=h,h.VERSION=d}).call(this,n("8oxB"))},ZK22:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Session=void 0;const i=n("qCKp"),s=n("kU1M"),r=n("oK5k"),o=n("bCcq"),a="session:id",l="session:secret",c="session:linked";class u{constructor(e,t,n,i){this._storage=e,this._id=t||(0,r.randomBytesHex)(16),this._secret=n||(0,r.randomBytesHex)(32);const s=o.sha256.create();s.update(`${this._id}, ${this._secret} WalletLink`),this._key=s.hex(),this._linked=!!i}static load(e){const t=e.getItem(a),n=e.getItem(c),i=e.getItem(l);return t&&i?new u(e,t,i,"1"===n):null}static clear(e){e.removeItem(l),e.removeItem(a),e.removeItem(c)}static get persistedSessionIdChange$(){return(0,i.fromEvent)(window,"storage").pipe((0,s.filter)(e=>e.key===a),(0,s.map)(e=>({oldValue:e.oldValue||null,newValue:e.newValue||null})))}static hash(e){return o.sha256.create().update(e).hex()}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(a,this._id),this._storage.setItem(l,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(c,this._linked?"1":"0")}}t.Session=u},ZmYy:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__decorate||function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkRelay=void 0;const l=a(n("7wIv")),c=n("qCKp"),u=n("kU1M"),d=n("ArRG"),h=n("MkKo"),p=n("ZxoF"),g=n("oK5k"),f=o(n("0zMk")),_=n("ZK22"),m=n("4W9J"),b=n("8YYL"),w=n("IBgt"),y=n("6RcL"),k=n("vFHP"),E=n("OoBR");class v{constructor(e){this.accountsCallback=null,this.chainCallback=null,this.appName="",this.appLogoUrl=null,this.subscriptions=new c.Subscription,this.walletLinkUrl=e.walletLinkUrl,this.storage=e.storage,this._session=_.Session.load(e.storage)||new _.Session(e.storage).save(),this.relayEventManager=e.relayEventManager,this.walletLinkAnalytics=e.walletLinkAnalytics?e.walletLinkAnalytics:new d.WalletLinkAnalytics,this.connection=new h.WalletLinkConnection(this._session.id,this._session.key,this.walletLinkUrl,this.walletLinkAnalytics),this.subscriptions.add(this.connection.incomingEvent$.pipe((0,u.filter)(e=>"Web3Response"===e.event)).subscribe({next:this.handleIncomingEvent})),this.subscriptions.add(this.connection.linked$.pipe((0,u.skip)(1),(0,u.tap)(e=>{var t;this.isLinked=e;const n=this.storage.getItem(m.LOCAL_STORAGE_ADDRESSES_KEY);if(n&&""!==n.split(" ")[0]&&!e){const e=_.Session.hash(this._session.id);null===(t=this.walletLinkAnalytics)||void 0===t||t.sendEvent(p.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:e})}})).subscribe()),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,u.filter)(e=>!!e.metadata&&"1"===e.metadata.__destroyed)).subscribe(()=>{var e;return null===(e=this.walletLinkAnalytics)||void 0===e||e.sendEvent(p.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.connection.isDestroyed,sessionIdHash:_.Session.hash(this._session.id)}),this.resetAndReload()})),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,u.filter)(e=>e.metadata&&void 0!==e.metadata.WalletUsername)).pipe((0,u.mergeMap)(e=>f.decrypt(e.metadata.WalletUsername,this._session.secret))).subscribe({next:e=>{this.storage.setItem(m.WALLET_USER_NAME_KEY,e)},error:()=>{var e;null===(e=this.walletLinkAnalytics)||void 0===e||e.sendEvent(p.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"username"})}})),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,u.filter)(e=>e.metadata&&void 0!==e.metadata.AppVersion)).pipe((0,u.mergeMap)(e=>f.decrypt(e.metadata.AppVersion,this._session.secret))).subscribe({next:e=>{this.storage.setItem(m.APP_VERSION_KEY,e)},error:()=>{var e;null===(e=this.walletLinkAnalytics)||void 0===e||e.sendEvent(p.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appversion"})}})),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,u.filter)(e=>e.metadata&&void 0!==e.metadata.ChainId&&void 0!==e.metadata.JsonRpcUrl)).pipe((0,u.mergeMap)(e=>(0,c.zip)(f.decrypt(e.metadata.ChainId,this._session.secret),f.decrypt(e.metadata.JsonRpcUrl,this._session.secret)))).pipe((0,u.distinctUntilChanged)()).subscribe({next:([e,t])=>{this.chainCallback&&this.chainCallback(e,t)},error:()=>{var e;null===(e=this.walletLinkAnalytics)||void 0===e||e.sendEvent(p.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}})),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,u.filter)(e=>e.metadata&&void 0!==e.metadata.EthereumAddress)).pipe((0,u.mergeMap)(e=>f.decrypt(e.metadata.EthereumAddress,this._session.secret))).subscribe({next:e=>{this.accountsCallback&&this.accountsCallback([e]),v.accountRequestCallbackIds.size>0&&(Array.from(v.accountRequestCallbackIds.values()).forEach(t=>{const n=(0,E.Web3ResponseMessage)({id:t,response:(0,k.RequestEthereumAccountsResponse)([e])});this.invokeCallback(Object.assign(Object.assign({},n),{id:t}))}),v.accountRequestCallbackIds.clear())},error:()=>{var e;null===(e=this.walletLinkAnalytics)||void 0===e||e.sendEvent(p.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}})),this.ui=e.walletLinkUIConstructor({walletLinkUrl:e.walletLinkUrl,version:e.version,darkMode:e.darkMode,session:this._session,connected$:this.connection.connected$}),this.connection.connect()}attachUI(){this.ui.attach()}resetAndReload(){this.connection.setSessionMetadata("__destroyed","1").pipe((0,u.timeout)(1e3),(0,u.catchError)(e=>(0,c.of)(null))).subscribe(e=>{var t,n;try{this.subscriptions.unsubscribe()}catch(i){null===(t=this.walletLinkAnalytics)||void 0===t||t.sendEvent(p.EVENTS.GENERAL_ERROR,{message:"Had error unsubscribing"})}null===(n=this.walletLinkAnalytics)||void 0===n||n.sendEvent(p.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:_.Session.hash(this._session.id)}),this.connection.destroy(),this.storage.clear(),this.ui.reloadUI()},e=>{var t;null===(t=this.walletLinkAnalytics)||void 0===t||t.sendEvent(p.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`faled to reset and relod with ${e}`,sessionIdHash:_.Session.hash(this._session.id)})})}setAppInfo(e,t){this.appName=e,this.appLogoUrl=t}getStorageItem(e){return this.storage.getItem(e)}get session(){return this._session}setStorageItem(e,t){this.storage.setItem(e,t)}requestEthereumAccounts(){return this.sendRequest({method:b.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}})}signEthereumMessage(e,t,n,i){return this.sendRequest({method:b.Web3Method.signEthereumMessage,params:{message:(0,g.hexStringFromBuffer)(e,!0),address:t,addPrefix:n,typedDataJson:i||null}})}ethereumAddressFromSignedMessage(e,t,n){return this.sendRequest({method:b.Web3Method.ethereumAddressFromSignedMessage,params:{message:(0,g.hexStringFromBuffer)(e,!0),signature:(0,g.hexStringFromBuffer)(t,!0),addPrefix:n}})}signEthereumTransaction(e){return this.sendRequest({method:b.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,g.bigIntStringFromBN)(e.weiValue),data:(0,g.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,g.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,g.bigIntStringFromBN)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,g.bigIntStringFromBN)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,g.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:b.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,g.bigIntStringFromBN)(e.weiValue),data:(0,g.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,g.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,g.bigIntStringFromBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,g.bigIntStringFromBN)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,g.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,t){return this.sendRequest({method:b.Web3Method.submitEthereumTransaction,params:{signedTransaction:(0,g.hexStringFromBuffer)(e,!0),chainId:t}})}scanQRCode(e){return this.sendRequest({method:b.Web3Method.scanQRCode,params:{regExp:e}})}genericRequest(e,t){return this.sendRequest({method:b.Web3Method.generic,params:{action:t,data:e}})}addEthereumChain(e,t,n,i,s,r){return this.sendRequest({method:b.Web3Method.addEthereumChain,params:{chainId:e,rpcUrls:t,blockExplorerUrls:n,chainName:i,iconUrls:s,nativeCurrency:r}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let t=null;const n=(0,g.randomBytesHex)(8),i=()=>{this.publishWeb3RequestCanceledEvent(n),this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:n,response:(0,k.ErrorResponse)(e.method,"User rejected request")})),null==t||t()};return{promise:new Promise((s,r)=>{var o;const a=e.method===b.Web3Method.requestEthereumAccounts,l=e.method===b.Web3Method.switchEthereumChain;if(a){const e=(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)||null;if(e&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e))return void(window.location.href=`https://go.cb-w.com/xoXnYwQimhb?cb_url=${window.location.href}`);this.ui.inlineAccountsResponse()?this.ui.requestEthereumAccounts({onCancel:i,onAccounts:e=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:n,response:(0,k.RequestEthereumAccountsResponse)(e)}))}}):this.ui.requestEthereumAccounts({onCancel:i}),v.accountRequestCallbackIds.add(n)}else if(e.method===b.Web3Method.switchEthereumChain||e.method===b.Web3Method.addEthereumChain){const i=()=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:n,response:(0,k.SwitchEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))};this.ui.switchEthereumChain({onCancel:i,onApprove:e=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:n,response:(0,k.SwitchEthereumChainResponse)({isApproved:!0,rpcUrl:e})}))},chainId:e.params.chainId}),this.ui.inlineSwitchEthereumChain()||(t=this.ui.showConnecting({onCancel:i,onResetConnection:this.resetAndReload}))}else if(this.ui.isStandalone()){const t=()=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:n,response:(0,k.ErrorResponse)(e.method,"User rejected request")}))},i=e=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:n,response:e}))};switch(e.method){case b.Web3Method.signEthereumMessage:this.ui.signEthereumMessage({request:e,onSuccess:i,onCancel:t});break;case b.Web3Method.signEthereumTransaction:this.ui.signEthereumTransaction({request:e,onSuccess:i,onCancel:t});break;case b.Web3Method.submitEthereumTransaction:this.ui.submitEthereumTransaction({request:e,onSuccess:i,onCancel:t});break;case b.Web3Method.ethereumAddressFromSignedMessage:this.ui.ethereumAddressFromSignedMessage({request:e,onSuccess:i});break;default:t()}}else t=this.ui.showConnecting({onCancel:i,onResetConnection:this.resetAndReload});this.relayEventManager.callbacks.set(n,e=>{if(this.ui.hideRequestEthereumAccounts(),null==t||t(),e.errorMessage)return r(new Error(e.errorMessage));s(e)}),a&&this.ui.inlineAccountsResponse()||l&&this.ui.inlineSwitchEthereumChain()||this.ui.isStandalone()||this.publishWeb3RequestEvent(n,e)}),cancel:i}}setConnectDisabled(e){this.ui.setConnectDisabled(e)}setAccountsCallback(e){this.accountsCallback=e}setChainCallback(e){this.chainCallback=e}publishWeb3RequestEvent(e,t){const n=(0,y.Web3RequestMessage)({id:e,request:t});this.subscriptions.add(this.publishEvent("Web3Request",n,!0).subscribe({error:e=>{this.handleWeb3ResponseMessage((0,E.Web3ResponseMessage)({id:n.id,response:{method:n.request.method,errorMessage:e.message}}))}}))}publishWeb3RequestCanceledEvent(e){const t=(0,w.Web3RequestCanceledMessage)(e);this.subscriptions.add(this.publishEvent("Web3RequestCanceled",t,!1).subscribe())}publishEvent(e,t,n){const i=this.session.secret;return new c.Observable(e=>{f.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{origin:location.origin})),i).then(t=>{e.next(t),e.complete()})}).pipe((0,u.mergeMap)(t=>this.connection.publishEvent(e,t,n)))}handleIncomingEvent(e){try{this.subscriptions.add(f.decrypt(e.data,this.session.secret).pipe((0,u.map)(e=>JSON.parse(e))).subscribe({next:e=>{const t=(0,E.isWeb3ResponseMessage)(e)?e:null;t&&this.handleWeb3ResponseMessage(t)},error:()=>{var e;null===(e=this.walletLinkAnalytics)||void 0===e||e.sendEvent(p.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}))}catch(t){return}}handleWeb3ResponseMessage(e){const{response:t}=e;if((0,k.isRequestEthereumAccountsResponse)(t))return Array.from(v.accountRequestCallbackIds.values()).forEach(t=>this.invokeCallback(Object.assign(Object.assign({},e),{id:t}))),void v.accountRequestCallbackIds.clear();this.invokeCallback(e)}invokeCallback(e){const t=this.relayEventManager.callbacks.get(e.id);t&&(t(e.response),this.relayEventManager.callbacks.delete(e.id))}switchEthereumChain(e){return this.sendRequest({method:b.Web3Method.switchEthereumChain,params:{chainId:e}})}}v.accountRequestCallbackIds=new Set,r([l.default],v.prototype,"resetAndReload",null),r([l.default],v.prototype,"handleIncomingEvent",null),t.WalletLinkRelay=v},Zozw:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScopedLocalStorage=void 0,t.ScopedLocalStorage=class{constructor(e){this.scope=e}setItem(e,t){localStorage.setItem(this.scopedKey(e),t)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){const e=this.scopedKey(""),t=[];for(let n=0;n<localStorage.length;n++){const i=localStorage.key(n);"string"==typeof i&&i.startsWith(e)&&t.push(i)}t.forEach(e=>localStorage.removeItem(e))}scopedKey(e){return`${this.scope}:${e}`}}},ZxoF:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),s(n("wG4r"),t),s(n("uR0R"),t)},bCcq:function(module,exports,__webpack_require__){(function(process,global){var __WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&"object"==typeof module&&module.exports,AMD=__webpack_require__("PDX0"),ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];!root.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!ARRAY_BUFFER||!root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e,t){return function(n){return new Sha256(t,!0).update(n)[e]()}},createMethod=function(e){var t=createOutputMethod("hex",e);NODE_JS&&(t=nodeWrap(t,e)),t.create=function(){return new Sha256(e)},t.update=function(e){return t.create().update(e)};for(var n=0;n<OUTPUT_TYPES.length;++n){var i=OUTPUT_TYPES[n];t[i]=createOutputMethod(i,e)}return t},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(e){if("string"==typeof e)return crypto.createHash(algorithm).update(e,"utf8").digest("hex");if(null==e)throw new Error(ERROR);return e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),Array.isArray(e)||ArrayBuffer.isView(e)||e.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(e)).digest("hex"):method(e)};return nodeMethod},createHmacOutputMethod=function(e,t){return function(n,i){return new HmacSha256(n,t,!0).update(i)[e]()}},createHmacMethod=function(e){var t=createHmacOutputMethod("hex",e);t.create=function(t){return new HmacSha256(t,e)},t.update=function(e,n){return t.create(e).update(n)};for(var n=0;n<OUTPUT_TYPES.length;++n){var i=OUTPUT_TYPES[n];t[i]=createHmacOutputMethod(i,e)}return t};function Sha256(e,t){t?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}function HmacSha256(e,t,n){var i,s=typeof e;if("string"===s){var r,o=[],a=e.length,l=0;for(i=0;i<a;++i)(r=e.charCodeAt(i))<128?o[l++]=r:r<2048?(o[l++]=192|r>>6,o[l++]=128|63&r):r<55296||r>=57344?(o[l++]=224|r>>12,o[l++]=128|r>>6&63,o[l++]=128|63&r):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++i)),o[l++]=240|r>>18,o[l++]=128|r>>12&63,o[l++]=128|r>>6&63,o[l++]=128|63&r);e=o}else{if("object"!==s)throw new Error(ERROR);if(null===e)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||ARRAY_BUFFER&&ArrayBuffer.isView(e)))throw new Error(ERROR)}e.length>64&&(e=new Sha256(t,!0).update(e).array());var c=[],u=[];for(i=0;i<64;++i){var d=e[i]||0;c[i]=92^d,u[i]=54^d}Sha256.call(this,t,n),this.update(u),this.oKeyPad=c,this.inner=!0,this.sharedMemory=n}Sha256.prototype.update=function(e){if(!this.finalized){var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(ERROR);if(null===e)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||ARRAY_BUFFER&&ArrayBuffer.isView(e)))throw new Error(ERROR);t=!0}for(var i,s,r=0,o=e.length,a=this.blocks;r<o;){if(this.hashed&&(this.hashed=!1,a[0]=this.block,a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),t)for(s=this.start;r<o&&s<64;++r)a[s>>2]|=e[r]<<SHIFT[3&s++];else for(s=this.start;r<o&&s<64;++r)(i=e.charCodeAt(r))<128?a[s>>2]|=i<<SHIFT[3&s++]:i<2048?(a[s>>2]|=(192|i>>6)<<SHIFT[3&s++],a[s>>2]|=(128|63&i)<<SHIFT[3&s++]):i<55296||i>=57344?(a[s>>2]|=(224|i>>12)<<SHIFT[3&s++],a[s>>2]|=(128|i>>6&63)<<SHIFT[3&s++],a[s>>2]|=(128|63&i)<<SHIFT[3&s++]):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++r)),a[s>>2]|=(240|i>>18)<<SHIFT[3&s++],a[s>>2]|=(128|i>>12&63)<<SHIFT[3&s++],a[s>>2]|=(128|i>>6&63)<<SHIFT[3&s++],a[s>>2]|=(128|63&i)<<SHIFT[3&s++]);this.lastByteIndex=s,this.bytes+=s-this.start,s>=64?(this.block=a[16],this.start=s-64,this.hash(),this.hashed=!0):this.start=s}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=EXTRA[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var e,t,n,i,s,r,o=this.h0,a=this.h1,l=this.h2,c=this.h3,u=this.h4,d=this.h5,h=this.h6,p=this.h7,g=this.blocks;for(e=16;e<64;++e)g[e]=g[e-16]+(((t=g[e-15])>>>7|t<<25)^(t>>>18|t<<14)^t>>>3)+g[e-7]+(((t=g[e-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)<<0;for(r=a&l,e=0;e<64;e+=4)this.first?(this.is224?(n=300032,p=(t=g[0]-1413257819)-150054599<<0,c=t+24177077<<0):(n=704751109,p=(t=g[0]-210244248)-1521486534<<0,c=t+143694565<<0),this.first=!1):(p=c+(t=p+((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&d^~u&h)+K[e]+g[e])<<0,c=t+(((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+((n=o&a)^o&l^r))<<0),h=l+(t=h+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&u^~p&d)+K[e+1]+g[e+1])<<0,l=t+(((c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10))+((i=c&o)^c&a^n))<<0,d=a+(t=d+((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&p^~h&u)+K[e+2]+g[e+2])<<0,a=t+(((l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10))+((s=l&c)^l&o^i))<<0,u=o+(t=u+((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&h^~d&p)+K[e+3]+g[e+3])<<0,o=t+(((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+((r=a&l)^a&c^s))<<0;this.h0=this.h0+o<<0,this.h1=this.h1+a<<0,this.h2=this.h2+l<<0,this.h3=this.h3+c<<0,this.h4=this.h4+u<<0,this.h5=this.h5+d<<0,this.h6=this.h6+h<<0,this.h7=this.h7+p<<0},Sha256.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,i=this.h3,s=this.h4,r=this.h5,o=this.h6,a=this.h7,l=HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[15&s]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o];return this.is224||(l+=HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[15&a]),l},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,i=this.h3,s=this.h4,r=this.h5,o=this.h6,a=this.h7,l=[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,n>>24&255,n>>16&255,n>>8&255,255&n,i>>24&255,i>>16&255,i>>8&255,255&i,s>>24&255,s>>16&255,s>>8&255,255&s,r>>24&255,r>>16&255,r>>8&255,255&r,o>>24&255,o>>16&255,o>>8&255,255&o];return this.is224||l.push(a>>24&255,a>>16&255,a>>8&255,255&a),l},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=(function(){return exports}).call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()}).call(this,__webpack_require__("8oxB"),__webpack_require__("yLpj"))},bFFw:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='.-walletlink-css-reset .-walletlink-link-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-walletlink-css-reset .-walletlink-link-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.33);transition:opacity .25s}.-walletlink-css-reset .-walletlink-link-dialog-backdrop-hidden{opacity:0}.-walletlink-css-reset .-walletlink-link-dialog-box{display:flex;position:relative;flex-direction:column;background-color:#f6f6f6;border-radius:16px;box-shadow:0px 16px 24px rgba(0,0,0,.1),0px 0px 8px rgba(0,0,0,.05);transform:scale(1);transition:opacity .25s,transform .25s;overflow:hidden}.-walletlink-css-reset .-walletlink-link-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-walletlink-css-reset .-walletlink-link-dialog-box-content{padding:24px;text-align:center}.-walletlink-css-reset .-walletlink-link-dialog-box-content h3{display:block;margin-bottom:24px;text-align:left;text-transform:uppercase;font-size:22px;font-weight:bold;line-height:1.2;color:#000}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode{position:relative;display:block;margin-bottom:24px;background-color:#f6f6f6;padding:16px;border-radius:16px;box-shadow:4px 4px 8px rgba(0,0,0,.15),-8px -8px 8px #fff;overflow:hidden}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode-wrapper{display:block;width:232px;height:232px;padding:4px;border-radius:4px;background:#f4f4f4;margin-bottom:16px}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode-wrapper img{display:block;width:224px;height:224px}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode>p{display:block;color:gray;font-weight:bold;font-size:12px;text-align:center}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode-connecting{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:rgba(246,246,246,.98)}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode-connecting p{margin-top:16px;color:#333;font-size:12px;font-weight:bold}.-walletlink-css-reset .-walletlink-link-dialog-box-content a{text-align:center;cursor:pointer;transition:color .1s;font-size:14px}.-walletlink-css-reset .-walletlink-link-dialog-box-content a,.-walletlink-css-reset .-walletlink-link-dialog-box-content a:link,.-walletlink-css-reset .-walletlink-link-dialog-box-content a:visited{color:#999}.-walletlink-css-reset .-walletlink-link-dialog-box-content a:hover,.-walletlink-css-reset .-walletlink-link-dialog-box-content a:active{color:#666;text-decoration:underline}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel{position:absolute;-webkit-appearance:none;display:flex;align-items:center;justify-content:center;top:24px;right:24px;width:24px;height:24px;border-radius:12px;background-color:#e7e7e7;cursor:pointer}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel-x{position:relative;display:block}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel-x::before,.-walletlink-css-reset .-walletlink-link-dialog-box-cancel-x::after{content:"";position:absolute;display:block;top:-1px;left:-7px;width:14px;height:2px;background-color:#999;transition:background-color .2s}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel-x::before{transform:rotate(45deg)}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel-x::after{transform:rotate(135deg)}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x-a,.-walletlink-css-reset .-walletlink-link-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x-b{background-color:#000}.-walletlink-css-reset .-walletlink-link-dialog-container{display:block}.-walletlink-css-reset .-walletlink-link-dialog-container-hidden{display:none}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box{background-color:#2a2a2a}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content h3{color:#ccc}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content-qrcode{background-color:#2a2a2a;box-shadow:4px 4px 8px rgba(0,0,0,.5),-8px -8px 8px #343434}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content-qrcode>p{color:#999}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content-qrcode-connecting{background:rgba(42,42,42,.98)}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content-qrcode-connecting p{color:#ddd}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content a,.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content a:link,.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content a:visited{color:#888}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content a:hover,.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content a:active{color:#aaa}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-cancel{background-color:#333}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-cancel-x::before,.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-cancel-x::after{background-color:#aaa}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x::before,.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x::after{background-color:#eee}'},e7sy:function(e,t,n){"use strict";(function(e){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkProvider=void 0;const s=i(n("Fj00")),r=i(n("OZ/i")),o=n("h9sC"),a=n("ArRG"),l=n("CiWU"),c=n("ZxoF"),u=n("ZK22"),d=n("4W9J"),h=n("oK5k"),p=i(n("UTEl")),g=n("98+w"),f=n("CkXD"),_=n("4Uva"),m="DefaultChainId",b="DefaultJsonRpcUrl",w="HasChainBeenSwitched",y="HasChainOverriddenFromRelay";t.WalletLinkProvider=class extends s.default{constructor(e){super(),this.isCoinbaseWallet=!0,this._filterPolyfill=new g.FilterPolyfill(this),this._subscriptionManager=new _.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,this._send=this.send,this._sendAsync=this.sendAsync,this.setProviderInfo=this.setProviderInfo.bind(this),this.updateProviderInfo=this.updateProviderInfo.bind(this),this.getChainId=this.getChainId.bind(this),this.setAppInfo=this.setAppInfo.bind(this),this.enable=this.enable.bind(this),this.close=this.close.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.request=this.request.bind(this),this._setAddresses=this._setAddresses.bind(this),this.scanQRCode=this.scanQRCode.bind(this),this.genericRequest=this.genericRequest.bind(this),this._jsonRpcUrlFromOpts=e.jsonRpcUrl,this._overrideIsMetaMask=e.overrideIsMetaMask,this._relayProvider=e.relayProvider,this._storage=e.storage,this._relayEventManager=e.relayEventManager,this._walletLinkAnalytics=e.walletLinkAnalytics?e.walletLinkAnalytics:new a.WalletLinkAnalytics;const t=this.getChainId(),n=(0,h.prepend0x)(t.toString(16));this.emit("connect",{chainIdStr:n});const i=this._storage.getItem(d.LOCAL_STORAGE_ADDRESSES_KEY);if(i){const e=i.split(" ");""!==e[0]&&(this._addresses=e,this.emit("accountsChanged",e))}this._subscriptionManager.events.on("notification",e=>{this.emit("message",{type:e.method,data:e.params})}),this._addresses.length>0&&this.initializeRelay(),window.addEventListener("message",e=>{var t;if("walletLinkMessage"===e.data.type&&"defaultChainChanged"===e.data.data.action){const n=null!==(t=e.data.data.jsonRpcUrl)&&void 0!==t?t:this.jsonRpcUrl;this.updateProviderInfo(n,Number(e.data.data.chainId),!0)}})}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return(0,h.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return!0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return!0}isConnected(){return!0}get jsonRpcUrl(){var e;return null!==(e=this._storage.getItem(b))&&void 0!==e?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(b,e)}get isChainOverridden(){return"true"===this._storage.getItem(y)}set isChainOverridden(e){this._storage.setItem(y,e.toString())}setProviderInfo(e,t){this.isChainOverridden||this.updateProviderInfo(e,this.getChainId(),!1)}updateProviderInfo(e,t,n){if("true"===this._storage.getItem(w)&&n)return;n&&(this.isChainOverridden=!0),this.jsonRpcUrl=e;const i=this.getChainId();this._storage.setItem(m,t.toString(10)),(0,h.ensureIntNumber)(t)===i&&this.hasMadeFirstChainChangedEmission||(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async addEthereumChain(e,t,n,i,s,r){var o,a;const l=await this.initializeRelay(),c=await l.addEthereumChain(e.toString(),t,n,i,s,r).promise;return"boolean"==typeof c.result?(!0===c.result&&(this._storage.setItem(w,"true"),this.updateProviderInfo(t[0],e,!1)),!0===c.result):(!0===(null===(o=c.result)||void 0===o?void 0:o.isApproved)&&(this._storage.setItem(w,"true"),this.updateProviderInfo(t[0],e,!1)),!0===(null===(a=c.result)||void 0===a?void 0:a.isApproved))}async switchEthereumChain(e){var t;if((0,h.ensureIntNumber)(e)===this.getChainId())return;const n=await this.initializeRelay(),i=await n.switchEthereumChain(e.toString(10)).promise;if("boolean"!=typeof i.result){const t=i.result;t.isApproved&&t.rpcUrl.length>0&&(this._storage.setItem(w,"true"),this.updateProviderInfo(t.rpcUrl,e,!1))}else if(i.result){this._storage.setItem(w,"true");const n=l.EthereumChain.fromChainId(BigInt(e)),i=null!==(t=l.EthereumChain.rpcUrl(n))&&void 0!==t?t:"";this.updateProviderInfo(i,e,!1)}}setAppInfo(e,t){this.initializeRelay().then(n=>n.setAppInfo(e,t))}async enable(){return this._walletLinkAnalytics.sendEvent(c.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?u.Session.hash(this._relay.session.id):null}),this._addresses.length>0?this._addresses:await this._send(f.JSONRPCMethod.eth_requestAccounts)}close(){this.initializeRelay().then(e=>e.resetAndReload())}send(e,t){if("string"==typeof e){const n=e,i=Array.isArray(t)?t:void 0!==t?[t]:[];return this._sendRequestAsync({jsonrpc:"2.0",id:0,method:n,params:i}).then(e=>e.result)}return"function"==typeof t?this._sendAsync(e,t):Array.isArray(e)?e.map(e=>this._sendRequest(e)):this._sendRequest(e)}sendAsync(e,t){if("function"!=typeof t)throw new Error("callback is required");if(Array.isArray(e)){const n=t;return void this._sendMultipleRequestsAsync(e).then(e=>n(null,e)).catch(e=>n(e,null))}const n=t;this._sendRequestAsync(e).then(e=>n(null,e)).catch(e=>n(e,null))}async request(e){if(!e||"object"!=typeof e||Array.isArray(e))throw o.ethErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:e});const{method:t,params:n}=e;if("string"!=typeof t||0===t.length)throw o.ethErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:e});if(void 0!==n&&!Array.isArray(n)&&("object"!=typeof n||null===n))throw o.ethErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:e});const i=void 0===n?[]:n,s=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:t,params:i,jsonrpc:"2.0",id:s})).result}async scanQRCode(e){const t=await this.initializeRelay(),n=await t.scanQRCode((0,h.ensureRegExpString)(e)).promise;if("string"!=typeof n.result)throw new Error("result was not a string");return n.result}async genericRequest(e,t){const n=await this.initializeRelay(),i=await n.genericRequest(e,t).promise;if("string"!=typeof i.result)throw new Error("result was not a string");return i.result}supportsSubscriptions(){return!1}subscribe(){throw new Error("Subscriptions are not supported")}unsubscribe(){throw new Error("Subscriptions are not supported")}disconnect(){return!0}_sendRequest(e){const t={jsonrpc:"2.0",id:e.id},{method:n}=e;if(t.result=this._handleSynchronousMethods(e),void 0===t.result)throw new Error(`WalletLink does not support calling ${n} synchronously without a callback. Please provide a callback parameter to call ${n} asynchronously.`);return t}_setAddresses(e){if(!Array.isArray(e))throw new Error("addresses is not an array");const t=e.map(e=>(0,h.ensureAddressString)(e));JSON.stringify(t)!==JSON.stringify(this._addresses)&&(this._addresses=t,this.emit("accountsChanged",this._addresses),this._storage.setItem(d.LOCAL_STORAGE_ADDRESSES_KEY,t.join(" ")),window.dispatchEvent(new CustomEvent("walletlink:addresses",{detail:this._addresses})))}_sendRequestAsync(e){return new Promise((t,n)=>{try{const i=this._handleSynchronousMethods(e);if(void 0!==i)return t({jsonrpc:"2.0",id:e.id,result:i});const s=this._handleAsynchronousFilterMethods(e);if(void 0!==s)return void s.then(n=>t(Object.assign(Object.assign({},n),{id:e.id}))).catch(e=>n(e));const r=this._handleSubscriptionMethods(e);if(void 0!==r)return void r.then(n=>t({jsonrpc:"2.0",id:e.id,result:n.result})).catch(e=>n(e))}catch(i){return n(i)}this._handleAsynchronousMethods(e).then(n=>t(Object.assign(Object.assign({},n),{id:e.id}))).catch(e=>n(e))})}_sendMultipleRequestsAsync(e){return Promise.all(e.map(e=>this._sendRequestAsync(e)))}_handleSynchronousMethods(e){const{method:t}=e,n=e.params||[];switch(t){case f.JSONRPCMethod.eth_accounts:return this._eth_accounts();case f.JSONRPCMethod.eth_coinbase:return this._eth_coinbase();case f.JSONRPCMethod.eth_uninstallFilter:return this._eth_uninstallFilter(n);case f.JSONRPCMethod.net_version:return this._net_version();case f.JSONRPCMethod.eth_chainId:return this._eth_chainId();default:return}}_handleAsynchronousMethods(e){const{method:t}=e,n=e.params||[];switch(t){case f.JSONRPCMethod.eth_requestAccounts:return this._eth_requestAccounts();case f.JSONRPCMethod.eth_sign:return this._eth_sign(n);case f.JSONRPCMethod.eth_ecRecover:return this._eth_ecRecover(n);case f.JSONRPCMethod.personal_sign:return this._personal_sign(n);case f.JSONRPCMethod.personal_ecRecover:return this._personal_ecRecover(n);case f.JSONRPCMethod.eth_signTransaction:return this._eth_signTransaction(n);case f.JSONRPCMethod.eth_sendRawTransaction:return this._eth_sendRawTransaction(n);case f.JSONRPCMethod.eth_sendTransaction:return this._eth_sendTransaction(n);case f.JSONRPCMethod.eth_signTypedData_v1:return this._eth_signTypedData_v1(n);case f.JSONRPCMethod.eth_signTypedData_v2:return this._throwUnsupportedMethodError();case f.JSONRPCMethod.eth_signTypedData_v3:return this._eth_signTypedData_v3(n);case f.JSONRPCMethod.eth_signTypedData_v4:case f.JSONRPCMethod.eth_signTypedData:return this._eth_signTypedData_v4(n);case f.JSONRPCMethod.walletlink_arbitrary:return this._walletlink_arbitrary(n);case f.JSONRPCMethod.wallet_addEthereumChain:return this._wallet_addEthereumChain(n);case f.JSONRPCMethod.wallet_switchEthereumChain:return this._wallet_switchEthereumChain(n)}if(!this.jsonRpcUrl)throw Error("Error: No jsonRpcUrl provided");return window.fetch(this.jsonRpcUrl,{method:"POST",body:JSON.stringify(e),mode:"cors",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{if(!e)throw o.ethErrors.rpc.parse({});const t=e,{error:n}=t;if(n)throw(0,o.serializeError)(n);return t})}_handleAsynchronousFilterMethods(e){const{method:t}=e,n=e.params||[];switch(t){case f.JSONRPCMethod.eth_newFilter:return this._eth_newFilter(n);case f.JSONRPCMethod.eth_newBlockFilter:return this._eth_newBlockFilter();case f.JSONRPCMethod.eth_newPendingTransactionFilter:return this._eth_newPendingTransactionFilter();case f.JSONRPCMethod.eth_getFilterChanges:return this._eth_getFilterChanges(n);case f.JSONRPCMethod.eth_getFilterLogs:return this._eth_getFilterLogs(n)}}_handleSubscriptionMethods(e){switch(e.method){case f.JSONRPCMethod.eth_subscribe:case f.JSONRPCMethod.eth_unsubscribe:return this._subscriptionManager.handleRequest(e)}}_isKnownAddress(e){try{const t=(0,h.ensureAddressString)(e);return this._addresses.includes(t)}catch(t){}return!1}_ensureKnownAddress(e){if(!this._isKnownAddress(e))throw new Error("Unknown Ethereum address")}_prepareTransactionParams(t){const n=t.from?(0,h.ensureAddressString)(t.from):this.selectedAddress;if(!n)throw new Error("Ethereum address is unavailable");return this._ensureKnownAddress(n),{fromAddress:n,toAddress:t.to?(0,h.ensureAddressString)(t.to):null,weiValue:null!=t.value?(0,h.ensureBN)(t.value):new r.default(0),data:t.data?(0,h.ensureBuffer)(t.data):e.alloc(0),nonce:null!=t.nonce?(0,h.ensureIntNumber)(t.nonce):null,gasPriceInWei:null!=t.gasPrice?(0,h.ensureBN)(t.gasPrice):null,maxFeePerGas:null!=t.maxFeePerGas?(0,h.ensureBN)(t.maxFeePerGas):null,maxPriorityFeePerGas:null!=t.maxPriorityFeePerGas?(0,h.ensureBN)(t.maxPriorityFeePerGas):null,gasLimit:null!=t.gas?(0,h.ensureBN)(t.gas):null,chainId:this.getChainId()}}_requireAuthorization(){if(0===this._addresses.length)throw o.ethErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw o.ethErrors.provider.unsupportedMethod({})}async _signEthereumMessage(e,t,n,i){this._ensureKnownAddress(t);try{const s=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await s.signEthereumMessage(e,t,n,i).promise).result}}catch(s){if("string"==typeof s.message&&s.message.match(/(denied|rejected)/i))throw o.ethErrors.provider.userRejectedRequest("User denied message signature");throw s}}async _ethereumAddressFromSignedMessage(e,t,n){const i=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await i.ethereumAddressFromSignedMessage(e,t,n).promise).result}}_eth_accounts(){return this._addresses}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,h.hexStringFromIntNumber)(this.getChainId())}getChainId(){const e=this._storage.getItem(m)||"1",t=parseInt(e,10);return(0,h.ensureIntNumber)(t)}async _eth_requestAccounts(){if(this._walletLinkAnalytics.sendEvent(c.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?u.Session.hash(this._relay.session.id):null}),this._addresses.length>0)return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let e;try{const t=await this.initializeRelay();e=await t.requestEthereumAccounts().promise}catch(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw o.ethErrors.provider.userRejectedRequest("User denied account authorization");throw t}if(!e.result)throw new Error("accounts received is empty");return this._setAddresses(e.result),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(e){this._requireAuthorization();const t=(0,h.ensureAddressString)(e[0]),n=(0,h.ensureBuffer)(e[1]);return this._signEthereumMessage(n,t,!1)}_eth_ecRecover(e){const t=(0,h.ensureBuffer)(e[0]),n=(0,h.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!1)}_personal_sign(e){this._requireAuthorization();const t=(0,h.ensureBuffer)(e[0]),n=(0,h.ensureAddressString)(e[1]);return this._signEthereumMessage(t,n,!0)}_personal_ecRecover(e){const t=(0,h.ensureBuffer)(e[0]),n=(0,h.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!0)}async _eth_signTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const e=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await e.signEthereumTransaction(t).promise).result}}catch(n){if("string"==typeof n.message&&n.message.match(/(denied|rejected)/i))throw o.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw n}}async _eth_sendRawTransaction(e){const t=(0,h.ensureBuffer)(e[0]),n=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await n.submitEthereumTransaction(t,this.getChainId()).promise).result}}async _eth_sendTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const e=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await e.signAndSubmitEthereumTransaction(t).promise).result}}catch(n){if("string"==typeof n.message&&n.message.match(/(denied|rejected)/i))throw o.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw n}}async _eth_signTypedData_v1(e){this._requireAuthorization();const t=(0,h.ensureParsedJSONObject)(e[0]),n=(0,h.ensureAddressString)(e[1]);this._ensureKnownAddress(n);const i=p.default.hashForSignTypedDataLegacy({data:t}),s=JSON.stringify(t,null,2);return this._signEthereumMessage(i,n,!1,s)}async _eth_signTypedData_v3(e){this._requireAuthorization();const t=(0,h.ensureAddressString)(e[0]),n=(0,h.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const i=p.default.hashForSignTypedData_v3({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,t,!1,s)}async _eth_signTypedData_v4(e){this._requireAuthorization();const t=(0,h.ensureAddressString)(e[0]),n=(0,h.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const i=p.default.hashForSignTypedData_v4({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,t,!1,s)}async _walletlink_arbitrary(e){const t=e[0],n=e[1];if("string"!=typeof n)throw new Error("parameter must be a string");if("object"!=typeof t||null===t)throw new Error("parameter must be an object");return{jsonrpc:"2.0",id:0,result:await this.genericRequest(t,n)}}async _wallet_addEthereumChain(e){var t,n;const i=e[0];if(0===(null===(t=i.rpcUrls)||void 0===t?void 0:t.length))return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};const s=parseInt(i.chainId,16);return await this.addEthereumChain(s,null!==(n=i.rpcUrls)&&void 0!==n?n:[],i.blockExplorerUrls,i.chainName,i.iconUrls,i.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(e){const t=e[0];return await this.switchEthereumChain(parseInt(t.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}_eth_uninstallFilter(e){const t=(0,h.ensureHexString)(e[0]);return this._filterPolyfill.uninstallFilter(t)}async _eth_newFilter(e){const t=e[0];return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(t)}}async _eth_newBlockFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newBlockFilter()}}async _eth_newPendingTransactionFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newPendingTransactionFilter()}}_eth_getFilterChanges(e){const t=(0,h.ensureHexString)(e[0]);return this._filterPolyfill.getFilterChanges(t)}_eth_getFilterLogs(e){const t=(0,h.ensureHexString)(e[0]);return this._filterPolyfill.getFilterLogs(t)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then(e=>(e.setAccountsCallback(e=>this._setAddresses(e)),e.setChainCallback((e,t)=>{this.updateProviderInfo(t,parseInt(e,10),!0)}),this._relay=e,e))}}}).call(this,n("tjlA").Buffer)},h9sC:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMessageFromCode=t.serializeError=t.EthereumProviderError=t.EthereumRpcError=t.ethErrors=t.errorCodes=void 0;const i=n("RtZe");Object.defineProperty(t,"EthereumRpcError",{enumerable:!0,get:function(){return i.EthereumRpcError}}),Object.defineProperty(t,"EthereumProviderError",{enumerable:!0,get:function(){return i.EthereumProviderError}});const s=n("Bq1D");Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return s.serializeError}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return s.getMessageFromCode}});const r=n("ryqF");Object.defineProperty(t,"ethErrors",{enumerable:!0,get:function(){return r.ethErrors}});const o=n("jt4f");Object.defineProperty(t,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})},hLHX:function(e,t,n){(function(t){const i=n("KU7o"),s=n("OZ/i");function r(e){return e.startsWith("int[")?"int256"+e.slice(3):"int"===e?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):"uint"===e?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):"fixed"===e?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):"ufixed"===e?"ufixed128x128":e}function o(e){return parseInt(/^\D+(\d+)$/.exec(e)[1],10)}function a(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[parseInt(t[1],10),parseInt(t[2],10)]}function l(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?""===t[2]?"dynamic":parseInt(t[2],10):null}function c(e){var t=typeof e;if("string"===t)return i.isHexString(e)?new s(i.stripHexPrefix(e),16):new s(e,10);if("number"===t)return new s(e);if(e.toArray)return e;throw new Error("Argument is not a number")}function u(e,n){var r,d,h,p;if("address"===e)return u("uint160",c(n));if("bool"===e)return u("uint8",n?1:0);if("string"===e)return u("bytes",new t(n,"utf8"));if(function(e){return e.lastIndexOf("]")===e.length-1}(e)){if(void 0===n.length)throw new Error("Not an array?");if("dynamic"!==(r=l(e))&&0!==r&&n.length>r)throw new Error("Elements exceed array size: "+r);for(p in h=[],e=e.slice(0,e.lastIndexOf("[")),"string"==typeof n&&(n=JSON.parse(n)),n)h.push(u(e,n[p]));if("dynamic"===r){var g=u("uint256",n.length);h.unshift(g)}return t.concat(h)}if("bytes"===e)return n=new t(n),h=t.concat([u("uint256",n.length),n]),n.length%32!=0&&(h=t.concat([h,i.zeros(32-n.length%32)])),h;if(e.startsWith("bytes")){if((r=o(e))<1||r>32)throw new Error("Invalid bytes<N> width: "+r);return i.setLengthRight(n,32)}if(e.startsWith("uint")){if((r=o(e))%8||r<8||r>256)throw new Error("Invalid uint<N> width: "+r);if((d=c(n)).bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+d.bitLength());if(d<0)throw new Error("Supplied uint is negative");return d.toArrayLike(t,"be",32)}if(e.startsWith("int")){if((r=o(e))%8||r<8||r>256)throw new Error("Invalid int<N> width: "+r);if((d=c(n)).bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+d.bitLength());return d.toTwos(256).toArrayLike(t,"be",32)}if(e.startsWith("ufixed")){if(r=a(e),(d=c(n))<0)throw new Error("Supplied ufixed is negative");return u("uint256",d.mul(new s(2).pow(new s(r[1]))))}if(e.startsWith("fixed"))return r=a(e),u("int256",c(n).mul(new s(2).pow(new s(r[1]))));throw new Error("Unsupported or invalid type: "+e)}function d(e){return"string"===e||"bytes"===e||"dynamic"===l(e)}function h(e,n){if(e.length!==n.length)throw new Error("Number of types are not matching the values");for(var s,a,l=[],u=0;u<e.length;u++){var d=r(e[u]),h=n[u];if("bytes"===d)l.push(h);else if("string"===d)l.push(new t(h,"utf8"));else if("bool"===d)l.push(new t(h?"01":"00","hex"));else if("address"===d)l.push(i.setLength(h,20));else if(d.startsWith("bytes")){if((s=o(d))<1||s>32)throw new Error("Invalid bytes<N> width: "+s);l.push(i.setLengthRight(h,s))}else if(d.startsWith("uint")){if((s=o(d))%8||s<8||s>256)throw new Error("Invalid uint<N> width: "+s);if((a=c(h)).bitLength()>s)throw new Error("Supplied uint exceeds width: "+s+" vs "+a.bitLength());l.push(a.toArrayLike(t,"be",s/8))}else{if(!d.startsWith("int"))throw new Error("Unsupported or invalid type: "+d);if((s=o(d))%8||s<8||s>256)throw new Error("Invalid int<N> width: "+s);if((a=c(h)).bitLength()>s)throw new Error("Supplied int exceeds width: "+s+" vs "+a.bitLength());l.push(a.toTwos(s).toArrayLike(t,"be",s/8))}}return t.concat(l)}e.exports={rawEncode:function(e,n){var i=[],s=[],o=32*e.length;for(var a in e){var l=r(e[a]),c=u(l,n[a]);d(l)?(i.push(u("uint256",o)),s.push(c),o+=c.length):i.push(c)}return t.concat(i.concat(s))},solidityPack:h,soliditySHA3:function(e,t){return i.keccak(h(e,t))}}}).call(this,n("tjlA").Buffer)},hh2p:function(e,t,n){"use strict";n.r(t),n.d(t,"render",function(){return U}),n.d(t,"hydrate",function(){return F}),n.d(t,"createElement",function(){return _}),n.d(t,"h",function(){return _}),n.d(t,"Fragment",function(){return w}),n.d(t,"createRef",function(){return b}),n.d(t,"isValidElement",function(){return o}),n.d(t,"Component",function(){return y}),n.d(t,"cloneElement",function(){return B}),n.d(t,"createContext",function(){return W}),n.d(t,"toChildArray",function(){return A}),n.d(t,"options",function(){return s});var i,s,r,o,a,l,c,u,d={},h=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function g(e,t){for(var n in t)e[n]=t[n];return e}function f(e){var t=e.parentNode;t&&t.removeChild(e)}function _(e,t,n){var s,r,o,a={};for(o in t)"key"==o?s=t[o]:"ref"==o?r=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?i.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return m(e,a,s,r,null)}function m(e,t,n,i,o){var a={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++r:o};return null==o&&null!=s.vnode&&s.vnode(a),a}function b(){return{current:null}}function w(e){return e.children}function y(e,t){this.props=e,this.context=t}function k(e,t){if(null==t)return e.__?k(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?k(e):null}function E(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return E(e)}}function v(e){(!e.__d&&(e.__d=!0)&&a.push(e)&&!M.__r++||c!==s.debounceRendering)&&((c=s.debounceRendering)||l)(M)}function M(){for(var e;M.__r=a.length;)e=a.sort(function(e,t){return e.__v.__b-t.__v.__b}),a=[],e.some(function(e){var t,n,i,s,r,o;e.__d&&(r=(s=(t=e).__v).__e,(o=t.__P)&&(n=[],(i=g({},s)).__v=s.__v+1,L(o,s,i,t.__n,void 0!==o.ownerSVGElement,null!=s.__h?[r]:null,n,null==r?k(s):r,s.__h),O(n,s),s.__e!=r&&E(s)))})}function S(e,t,n,i,s,r,o,a,l,c){var u,p,g,f,_,b,y,E=i&&i.__k||h,v=E.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(f=n.__k[u]=null==(f=t[u])||"boolean"==typeof f?null:"string"==typeof f||"number"==typeof f||"bigint"==typeof f?m(null,f,null,null,f):Array.isArray(f)?m(w,{children:f},null,null,null):f.__b>0?m(f.type,f.props,f.key,null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(g=E[u])||g&&f.key==g.key&&f.type===g.type)E[u]=void 0;else for(p=0;p<v;p++){if((g=E[p])&&f.key==g.key&&f.type===g.type){E[p]=void 0;break}g=null}L(e,f,g=g||d,s,r,o,a,l,c),_=f.__e,(p=f.ref)&&g.ref!=p&&(y||(y=[]),g.ref&&y.push(g.ref,null,f),y.push(p,f.__c||_,f)),null!=_?(null==b&&(b=_),"function"==typeof f.type&&f.__k===g.__k?f.__d=l=x(f,l,e):l=C(e,f,g,E,_,l),"function"==typeof n.type&&(n.__d=l)):l&&g.__e==l&&l.parentNode!=e&&(l=k(g))}for(n.__e=b,u=v;u--;)null!=E[u]&&("function"==typeof n.type&&null!=E[u].__e&&E[u].__e==n.__d&&(n.__d=k(i,u+1)),P(E[u],E[u]));if(y)for(u=0;u<y.length;u++)D(y[u],y[++u],y[++u])}function x(e,t,n){for(var i,s=e.__k,r=0;s&&r<s.length;r++)(i=s[r])&&(i.__=e,t="function"==typeof i.type?x(i,t,n):C(n,i,i,s,i.__e,t));return t}function A(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some(function(e){A(e,t)}):t.push(e)),t}function C(e,t,n,i,s,r){var o,a,l;if(void 0!==t.__d)o=t.__d,t.__d=void 0;else if(null==n||s!=r||null==s.parentNode)e:if(null==r||r.parentNode!==e)e.appendChild(s),o=null;else{for(a=r,l=0;(a=a.nextSibling)&&l<i.length;l+=2)if(a==s)break e;e.insertBefore(s,r),o=r}return void 0!==o?o:s.nextSibling}function I(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||p.test(t)?n:n+"px"}function N(e,t,n,i,s){var r;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||I(e.style,t,"");if(n)for(t in n)i&&n[t]===i[t]||I(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])r=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?i||e.addEventListener(t,r?T:R,r):e.removeEventListener(t,r?T:R,r);else if("dangerouslySetInnerHTML"!==t){if(s)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function R(e){this.l[e.type+!1](s.event?s.event(e):e)}function T(e){this.l[e.type+!0](s.event?s.event(e):e)}function L(e,t,n,i,r,o,a,l,c){var u,d,h,p,f,_,m,b,k,E,v,M=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(c=n.__h,l=t.__e=n.__e,t.__h=null,o=[l]),(u=s.__b)&&u(t);try{e:if("function"==typeof M){if(b=t.props,k=(u=M.contextType)&&i[u.__c],E=u?k?k.props.value:u.__:i,n.__c?m=(d=t.__c=n.__c).__=d.__E:("prototype"in M&&M.prototype.render?t.__c=d=new M(b,E):(t.__c=d=new y(b,E),d.constructor=M,d.render=H),k&&k.sub(d),d.props=b,d.state||(d.state={}),d.context=E,d.__n=i,h=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=M.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=g({},d.__s)),g(d.__s,M.getDerivedStateFromProps(b,d.__s))),p=d.props,f=d.state,h)null==M.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==M.getDerivedStateFromProps&&b!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(b,E),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(b,d.__s,E)||t.__v===n.__v){d.props=b,d.state=d.__s,t.__v!==n.__v&&(d.__d=!1),d.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),d.__h.length&&a.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(b,d.__s,E),null!=d.componentDidUpdate&&d.__h.push(function(){d.componentDidUpdate(p,f,_)})}d.context=E,d.props=b,d.state=d.__s,(u=s.__r)&&u(t),d.__d=!1,d.__v=t,d.__P=e,u=d.render(d.props,d.state,d.context),d.state=d.__s,null!=d.getChildContext&&(i=g(g({},i),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(_=d.getSnapshotBeforeUpdate(p,f)),v=null!=u&&u.type===w&&null==u.key?u.props.children:u,S(e,Array.isArray(v)?v:[v],t,n,i,r,o,a,l,c),d.base=t.__e,t.__h=null,d.__h.length&&a.push(d),m&&(d.__E=d.__=null),d.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=j(n.__e,t,n,i,r,o,a,c);(u=s.diffed)&&u(t)}catch(e){t.__v=null,(c||null!=o)&&(t.__e=l,t.__h=!!c,o[o.indexOf(l)]=null),s.__e(e,t,n)}}function O(e,t){s.__c&&s.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){s.__e(e,t.__v)}})}function j(e,t,n,s,r,o,a,l){var c,u,h,p=n.props,g=t.props,_=t.type,m=0;if("svg"===_&&(r=!0),null!=o)for(;m<o.length;m++)if((c=o[m])&&"setAttribute"in c==!!_&&(_?c.localName===_:3===c.nodeType)){e=c,o[m]=null;break}if(null==e){if(null===_)return document.createTextNode(g);e=r?document.createElementNS("http://www.w3.org/2000/svg",_):document.createElement(_,g.is&&g),o=null,l=!1}if(null===_)p===g||l&&e.data===g||(e.data=g);else{if(o=o&&i.call(e.childNodes),u=(p=n.props||d).dangerouslySetInnerHTML,h=g.dangerouslySetInnerHTML,!l){if(null!=o)for(p={},m=0;m<e.attributes.length;m++)p[e.attributes[m].name]=e.attributes[m].value;(h||u)&&(h&&(u&&h.__html==u.__html||h.__html===e.innerHTML)||(e.innerHTML=h&&h.__html||""))}if(function(e,t,n,i,s){var r;for(r in n)"children"===r||"key"===r||r in t||N(e,r,null,n[r],i);for(r in t)s&&"function"!=typeof t[r]||"children"===r||"key"===r||"value"===r||"checked"===r||n[r]===t[r]||N(e,r,t[r],n[r],i)}(e,g,p,r,l),h)t.__k=[];else if(m=t.props.children,S(e,Array.isArray(m)?m:[m],t,n,s,r&&"foreignObject"!==_,o,a,o?o[0]:n.__k&&k(n,0),l),null!=o)for(m=o.length;m--;)null!=o[m]&&f(o[m]);l||("value"in g&&void 0!==(m=g.value)&&(m!==p.value||m!==e.value||"progress"===_&&!m)&&N(e,"value",m,p.value,!1),"checked"in g&&void 0!==(m=g.checked)&&m!==e.checked&&N(e,"checked",m,p.checked,!1))}return e}function D(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){s.__e(e,n)}}function P(e,t,n){var i,r;if(s.unmount&&s.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||D(i,null,t)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){s.__e(e,t)}i.base=i.__P=null}if(i=e.__k)for(r=0;r<i.length;r++)i[r]&&P(i[r],t,"function"!=typeof e.type);n||null==e.__e||f(e.__e),e.__e=e.__d=void 0}function H(e,t,n){return this.constructor(e,n)}function U(e,t,n){var r,o,a;s.__&&s.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,a=[],L(t,e=(!r&&n||t).__k=_(w,null,[e]),o||d,d,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?i.call(t.childNodes):null,a,!r&&n?n:o?o.__e:t.firstChild,r),O(a,e)}function F(e,t){U(e,t,F)}function B(e,t,n){var s,r,o,a=g({},e.props);for(o in t)"key"==o?s=t[o]:"ref"==o?r=t[o]:a[o]=t[o];return arguments.length>2&&(a.children=arguments.length>3?i.call(arguments,2):n),m(e.type,a,s||e.key,r||e.ref,null)}function W(e,t){var n={__c:t="__cC"+u++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,i;return this.getChildContext||(n=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(v)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}i=h.slice,s={__e:function(e,t){for(var n,i,s;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&null!=i.getDerivedStateFromError&&(n.setState(i.getDerivedStateFromError(e)),s=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),s=n.__d),s)return n.__E=n}catch(t){e=t}throw e}},r=0,o=function(e){return null!=e&&void 0===e.constructor},y.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=g({},this.state),"function"==typeof e&&(e=e(g({},n),this.props)),e&&g(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),v(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),v(this))},y.prototype.render=w,a=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,M.__r=0,u=0},i6jr:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Snackbar=void 0;const s=i(n("iuhU")),r=n("hh2p"),o=n("J5ZA"),a=i(n("uc/Z"));t.Snackbar=class{constructor(e){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=e.darkMode}attach(e){this.root=document.createElement("div"),this.root.className="-walletlink-snackbar-root",e.appendChild(this.root),this.render()}presentItem(e){const t=this.nextItemKey++;return this.items.set(t,e),this.render(),()=>{this.items.delete(t),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,r.render)((0,r.h)("div",null,(0,r.h)(l,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([e,t])=>(0,r.h)(c,Object.assign({},t,{key:e}))))),this.root)}};const l=e=>(0,r.h)("div",{class:(0,s.default)("-walletlink-snackbar-container")},(0,r.h)("style",null,a.default),(0,r.h)("div",{class:"-walletlink-snackbar"},e.children)),c=({message:e,menuItems:t})=>{const[n,i]=(0,o.useState)(!0),[a,l]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{const e=[window.setTimeout(()=>{i(!1)},1),window.setTimeout(()=>{l(!0)},1e4)];return()=>{e.forEach(window.clearTimeout)}}),(0,r.h)("div",{class:(0,s.default)("-walletlink-snackbar-instance",n&&"-walletlink-snackbar-instance-hidden",a&&"-walletlink-snackbar-instance-expanded")},(0,r.h)("div",{class:"-walletlink-snackbar-instance-header",onClick:()=>{l(!a)}},(0,r.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",class:"-walletlink-snackbar-instance-header-cblogo"}),(0,r.h)("div",{class:"-walletlink-snackbar-instance-header-message"},e),(0,r.h)("div",{class:"-gear-container"},!a&&(0,r.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,r.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),t&&t.length>0&&(0,r.h)("div",{class:"-walletlink-snackbar-instance-menu"},t.map((e,t)=>(0,r.h)("div",{class:(0,s.default)("-walletlink-snackbar-instance-menu-item",e.isRed&&"-walletlink-snackbar-instance-menu-item-is-red"),onClick:e.onClick,key:t},(0,r.h)("svg",{width:e.svgWidth,height:e.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.h)("path",{"fill-rule":e.defaultFillRule,"clip-rule":e.defaultClipRule,d:e.path,fill:"#AAAAAA"})),(0,r.h)("span",{class:(0,s.default)("-walletlink-snackbar-instance-menu-item-info",e.isRed&&"-walletlink-snackbar-instance-menu-item-info-is-red")},e.info)))))}},iuhU:function(e,t,n){"use strict";function i(e){var t,n,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=i(e[t]))&&(s&&(s+=" "),s+=n);else for(t in e)e[t]&&(s&&(s+=" "),s+=t);return s}n.r(t),t.default=function(){for(var e,t,n=0,s="";n<arguments.length;)(e=arguments[n++])&&(t=i(e))&&(s&&(s+=" "),s+=t);return s}},jOtK:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientMessagePublishEvent=t.ClientMessageSetSessionConfig=t.ClientMessageGetSessionConfig=t.ClientMessageIsLinked=t.ClientMessageHostSession=void 0,t.ClientMessageHostSession=function(e){return Object.assign({type:"HostSession"},e)},t.ClientMessageIsLinked=function(e){return Object.assign({type:"IsLinked"},e)},t.ClientMessageGetSessionConfig=function(e){return Object.assign({type:"GetSessionConfig"},e)},t.ClientMessageSetSessionConfig=function(e){return Object.assign({type:"SetSessionConfig"},e)},t.ClientMessagePublishEvent=function(e){return Object.assign({type:"PublishEvent"},e)}},jt4f:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.errorCodes=void 0,t.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},t.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},oK5k:function(e,t,n){"use strict";(function(e){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getFavicon=t.range=t.isBigNumber=t.ensureParsedJSONObject=t.ensureBN=t.ensureRegExpString=t.ensureIntNumber=t.ensureBuffer=t.ensureAddressString=t.ensureEvenLengthHexString=t.ensureHexString=t.isHexString=t.prepend0x=t.strip0x=t.has0xPrefix=t.hexStringFromIntNumber=t.intNumberFromHexString=t.bigIntStringFromBN=t.hexStringFromBuffer=t.hexStringToUint8Array=t.uint8ArrayToHex=t.randomBytesHex=void 0;const s=i(n("OZ/i")),r=n("p7SB"),o=/^[0-9]*$/,a=/^[a-f0-9]*$/;function l(e){return[...e].map(e=>e.toString(16).padStart(2,"0")).join("")}function c(e){return e.startsWith("0x")||e.startsWith("0X")}function u(e){return c(e)?e.slice(2):e}function d(e){return c(e)?"0x"+e.slice(2):"0x"+e}function h(e){if("string"!=typeof e)return!1;const t=u(e).toLowerCase();return a.test(t)}function p(e,t=!1){if("string"==typeof e){const n=u(e).toLowerCase();if(a.test(n))return(0,r.HexString)(t?"0x"+n:n)}throw new Error(`"${e}" is not a hexadecimal string`)}function g(e,t=!1){let n=p(e,!1);return n.length%2==1&&(n=(0,r.HexString)("0"+n)),t?(0,r.HexString)("0x"+n):n}function f(e){if("number"==typeof e&&Number.isInteger(e))return(0,r.IntNumber)(e);if("string"==typeof e){if(o.test(e))return(0,r.IntNumber)(Number(e));if(h(e))return(0,r.IntNumber)(new s.default(g(e,!1),16).toNumber())}throw new Error(`Not an integer: ${e}`)}function _(e){if(null==e||"function"!=typeof e.constructor)return!1;const{constructor:t}=e;return"function"==typeof t.config&&"number"==typeof t.EUCLID}t.randomBytesHex=function(e){return l(crypto.getRandomValues(new Uint8Array(e)))},t.uint8ArrayToHex=l,t.hexStringToUint8Array=function(e){return new Uint8Array(e.match(/.{1,2}/g).map(e=>parseInt(e,16)))},t.hexStringFromBuffer=function(e,t=!1){const n=e.toString("hex");return(0,r.HexString)(t?"0x"+n:n)},t.bigIntStringFromBN=function(e){return(0,r.BigIntString)(e.toString(10))},t.intNumberFromHexString=function(e){return(0,r.IntNumber)(new s.default(g(e,!1),16).toNumber())},t.hexStringFromIntNumber=function(e){return(0,r.HexString)("0x"+new s.default(e).toString(16))},t.has0xPrefix=c,t.strip0x=u,t.prepend0x=d,t.isHexString=h,t.ensureHexString=p,t.ensureEvenLengthHexString=g,t.ensureAddressString=function(e){if("string"==typeof e){const t=u(e).toLowerCase();if(h(t)&&40===t.length)return(0,r.AddressString)(d(t))}throw new Error(`Invalid Ethereum address: ${e}`)},t.ensureBuffer=function(t){if(e.isBuffer(t))return t;if("string"==typeof t){if(h(t)){const n=g(t,!1);return e.from(n,"hex")}return e.from(t,"utf8")}throw new Error(`Not binary data: ${t}`)},t.ensureIntNumber=f,t.ensureRegExpString=function(e){if(e instanceof RegExp)return(0,r.RegExpString)(e.toString());throw new Error(`Not a RegExp: ${e}`)},t.ensureBN=function(e){if(null!=e&&(s.default.isBN(e)||_(e)))return new s.default(e.toString(10),10);if("number"==typeof e)return new s.default(f(e));if("string"==typeof e){if(o.test(e))return new s.default(e,10);if(h(e))return new s.default(g(e,!1),16)}throw new Error(`Not an integer: ${e}`)},t.ensureParsedJSONObject=function(e){if("string"==typeof e)return JSON.parse(e);if("object"==typeof e)return e;throw new Error(`Not a JSON string or an object: ${e}`)},t.isBigNumber=_,t.range=function(e,t){return Array.from({length:t-e},(t,n)=>e+n)},t.getFavicon=function(){const e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:n}=document.location,i=e?e.getAttribute("href"):null;return!i||i.startsWith("javascript:")?null:i.startsWith("http://")||i.startsWith("https://")||i.startsWith("data:")?i:i.startsWith("//")?t+i:`${t}//${n}${i}`}}).call(this,n("tjlA").Buffer)},oY2H:function(e){e.exports=JSON.parse('{"name":"walletlink","version":"2.3.0","description":"WalletLink JavaScript SDK","keywords":["cipher","cipherbrowser","coinbase","coinbasewallet","eth","ether","ethereum","etherium","injection","toshi","wallet","walletlink","web3"],"main":"dist/index.js","types":"dist/index.d.ts","repository":"https://github.com/walletlink/walletlink.git","author":"Coinbase, Inc.","license":"Apache-2.0","scripts":{"tsc":"tsc --noEmit --pretty","test":"yarn build-npm && karma start","build":"node compile-assets.js && webpack --config webpack.config.js","build-chrome":"webpack --config webpack.config.chrome.js","build-npm":"tsc -p ./tsconfig.build.json","build:dev":"export WALLETLINK_URL=\'http://localhost:3000\'; yarn build && yarn build-chrome","build:dev:watch":"nodemon -e \'ts,tsx,js,json,css,scss,svg\' --ignore \'src/**/*-css.ts\' --ignore \'src/**/*-svg.ts\' --watch src/ --watch chrome/ --exec \'yarn build:dev\'","build:prod":"yarn build && yarn build-chrome && yarn build-npm && cp ./package.json ../README.md ../LICENSE build/npm && cp -a src/vendor-js build/npm/dist && sed -i.bak \'s| \\"private\\": true,||g\' build/npm/package.json && rm -f build/npm/package.json.bak","lint":"tslint -p . \'src/**/*.ts{,x}\'","lint:watch":"nodemon -e ts,tsx,js,json,css,scss,svg --watch src/ --exec \'yarn tsc && yarn lint\'"},"dependencies":{"@metamask/safe-event-emitter":"2.0.0","bind-decorator":"^1.0.11","bn.js":"^5.1.1","clsx":"^1.1.0","eth-block-tracker":"4.4.3","eth-json-rpc-filters":"4.2.2","eth-rpc-errors":"4.0.2","js-sha256":"0.9.0","json-rpc-engine":"6.1.0","keccak":"^3.0.1","preact":"^10.5.9","rxjs":"^6.6.3","stream-browserify":"^3.0.0"},"devDependencies":{"@types/bn.js":"^4.11.6","@types/node":"^14.14.20","browserify":"17.0.0","copy-webpack-plugin":"^6.4.1","core-js":"^3.8.2","jasmine":"3.8.0","karma":"^6.3.2","karma-browserify":"8.1.0","karma-chrome-launcher":"^3.1.0","karma-jasmine":"^4.0.1","nodemon":"^2.0.6","raw-loader":"^4.0.2","regenerator-runtime":"^0.13.7","rxjs-tslint":"^0.1.7","sass":"^1.32.0","svgo":"^2.8.0","ts-jest":"^26.4.4","ts-loader":"^8.0.13","tslib":"^2.0.3","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","tslint-config-security":"^1.16.0","tslint-microsoft-contrib":"^6.2.0","typescript":"^4.1.3","watchify":"4.0.0","webpack":"^5.49.0","webpack-cli":"^3.3.12","whatwg-fetch":"^3.5.0"},"engines":{"node":">= 10.0.0"},"jest":{"transform":{"^.+\\\\.tsx?$":"ts-jest"},"testEnvironment":"node","testPathIgnorePatterns":["<rootDir>/dist/","<rootDir>/node_modules/"],"testRegex":"(/__tests__/.*|\\\\.(test|spec))\\\\.(ts|tsx|js)$","moduleFileExtensions":["ts","js","json"]}}')},obTc:function(e,t,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.RelayMessageType=void 0,(i=t.RelayMessageType||(t.RelayMessageType={})).SESSION_ID_REQUEST="SESSION_ID_REQUEST",i.SESSION_ID_RESPONSE="SESSION_ID_RESPONSE",i.LINKED="LINKED",i.UNLINKED="UNLINKED",i.WEB3_REQUEST="WEB3_REQUEST",i.WEB3_REQUEST_CANCELED="WEB3_REQUEST_CANCELED",i.WEB3_RESPONSE="WEB3_RESPONSE"},p7SB:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RegExpString=t.IntNumber=t.BigIntString=t.AddressString=t.HexString=t.OpaqueType=void 0,t.OpaqueType=function(){return e=>e},t.HexString=e=>e,t.AddressString=e=>e,t.BigIntString=e=>e,t.IntNumber=function(e){return Math.floor(e)},t.RegExpString=e=>e},ryqF:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ethErrors=void 0;const i=n("RtZe"),s=n("Bq1D"),r=n("jt4f");function o(e,t){const[n,r]=l(t);return new i.EthereumRpcError(e,n||s.getMessageFromCode(e),r)}function a(e,t){const[n,r]=l(t);return new i.EthereumProviderError(e,n||s.getMessageFromCode(e),r)}function l(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t||void 0,n]}}return[]}t.ethErrors={rpc:{parse:e=>o(r.errorCodes.rpc.parse,e),invalidRequest:e=>o(r.errorCodes.rpc.invalidRequest,e),invalidParams:e=>o(r.errorCodes.rpc.invalidParams,e),methodNotFound:e=>o(r.errorCodes.rpc.methodNotFound,e),internal:e=>o(r.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return o(t,e)},invalidInput:e=>o(r.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>o(r.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>o(r.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>o(r.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>o(r.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>o(r.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>a(r.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(r.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(r.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(r.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(r.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:n,data:s}=e;if(!n||"string"!=typeof n)throw new Error('"message" must be a nonempty string');return new i.EthereumProviderError(t,n,s)}}}},u8Fu:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-walletlink-css-reset .-walletlink-spinner{display:inline-block}.-walletlink-css-reset .-walletlink-spinner svg{display:inline-block;animation:2s linear infinite -walletlink-spinner-svg}.-walletlink-css-reset .-walletlink-spinner svg circle{animation:1.9s ease-in-out infinite both -walletlink-spinner-circle;display:block;fill:transparent;stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -walletlink-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -walletlink-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}"},uR0R:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkAnalyticsAbstract=void 0,t.WalletLinkAnalyticsAbstract=class{}},"uc/Z":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-walletlink-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-walletlink-css-reset .-gear-container *{user-select:none}.-walletlink-css-reset .-gear-container svg{opacity:0;position:absolute}.-walletlink-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-walletlink-css-reset .-walletlink-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-walletlink-css-reset .-walletlink-snackbar *{user-select:none}.-walletlink-css-reset .-walletlink-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-walletlink-css-reset .-walletlink-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-walletlink-css-reset .-walletlink-snackbar-instance-header *{cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-walletlink-css-reset .-walletlink-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-walletlink-css-reset .-walletlink-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-walletlink-css-reset .-walletlink-snackbar-instance-expanded .-walletlink-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"},vFHP:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumAddressFromSignedMessageResponse=t.SubmitEthereumTransactionResponse=t.SignEthereumTransactionResponse=t.SignEthereumMessageResponse=t.isRequestEthereumAccountsResponse=t.RequestEthereumAccountsResponse=t.SwitchEthereumChainResponse=t.ErrorResponse=void 0;const i=n("8YYL");t.ErrorResponse=function(e,t){return{method:e,errorMessage:t}},t.SwitchEthereumChainResponse=function(e){return{method:i.Web3Method.switchEthereumChain,result:e}},t.RequestEthereumAccountsResponse=function(e){return{method:i.Web3Method.requestEthereumAccounts,result:e}},t.isRequestEthereumAccountsResponse=function(e){return e&&e.method===i.Web3Method.requestEthereumAccounts},t.SignEthereumMessageResponse=function(e){return{method:i.Web3Method.signEthereumMessage,result:e}},t.SignEthereumTransactionResponse=function(e){return{method:i.Web3Method.signEthereumTransaction,result:e}},t.SubmitEthereumTransactionResponse=function(e){return{method:i.Web3Method.submitEthereumTransaction,result:e}},t.EthereumAddressFromSignedMessageResponse=function(e){return{method:i.Web3Method.ethereumAddressFromSignedMessage,result:e}}},wG4r:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EVENTS=void 0,t.EVENTS={REQUEST_CHILD_ETHEREUM_ACCOUNTS_START:"walletlink_sdk.request_child_ethereum_accounts.start",REQUEST_CHILD_ETHEREUM_ACCOUNTS_RESPONSE:"walletlink_sdk.request_child_ethereum_accounts.response",STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",GENERAL_ERROR:"walletlink_sdk.general_error"}}}]);