1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[29766],{434:(e,t,n)=>{"use strict";n.d(t,{E:()=>r,w:()=>s});var i=n(6249);let r=(0,i.createContext)({});function s(){return(0,i.useContext)(r)}},1046:(e,t,n)=>{"use strict";n.d(t,{F:()=>i});let i="solana:signMessage"},14477:(e,t,n)=>{"use strict";n.d(t,{q:()=>i});let i="solana:signTransaction"},18579:(e,t)=>{function n(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw Error("Invalid hex color: "+e);(3===t.length||4===t.length)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");let n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});let t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,i=e.width&&e.width>=21?e.width:void 0,r=e.scale||4;return{width:i,scale:i?4:r,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){let i=t.getScale(e,n);return Math.floor((e+2*n.margin)*i)},t.qrToImageData=function(e,n,i){let r=n.modules.size,s=n.modules.data,a=t.getScale(r,i),o=Math.floor((r+2*i.margin)*a),l=i.margin*a,c=[i.color.light,i.color.dark];for(let t=0;t<o;t++)for(let n=0;n<o;n++){let d=(t*o+n)*4,u=i.color.light;t>=l&&n>=l&&t<o-l&&n<o-l&&(u=c[+!!s[Math.floor((t-l)/a)*r+Math.floor((n-l)/a)]]),e[d++]=u.r,e[d++]=u.g,e[d++]=u.b,e[d]=u.a}}},19355:(e,t,n)=>{"use strict";n.d(t,{j:()=>i});let i="standard:events"},23871:(e,t,n)=>{"use strict";function i(e){switch(e){case"processed":case"confirmed":case"finalized":case void 0:return e;case"recent":return"processed";case"single":case"singleGossip":return"confirmed";case"max":case"root":return"finalized";default:return}}n.d(t,{i:()=>i})},24961:(e,t,n)=>{let i=n(18579);function r(e,t){let n=e.a/255,i=t+'="'+e.hex+'"';return n<1?i+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function s(e,t,n){let i=e+t;return void 0!==n&&(i+=" "+n),i}t.render=function(e,t,n){let a=i.getOptions(t),o=e.modules.size,l=e.modules.data,c=o+2*a.margin,d=a.color.light.a?"<path "+r(a.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",u="<path "+r(a.color.dark,"stroke")+' d="'+function(e,t,n){let i="",r=0,a=!1,o=0;for(let l=0;l<e.length;l++){let c=Math.floor(l%t),d=Math.floor(l/t);c||a||(a=!0),e[l]?(o++,l>0&&c>0&&e[l-1]||(i+=a?s("M",c+n,.5+d+n):s("m",r,0),r=0,a=!1),c+1<t&&e[l+1]||(i+=s("h",o),o=0)):r++}return i}(l,o,a.margin)+'"/>',h='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+('viewBox="0 0 '+c+" ")+c+'" shape-rendering="crispEdges">'+d+u+"</svg>\n";return"function"==typeof n&&n(null,h),h}},30318:(e,t,n)=>{"use strict";var i,r;n.d(t,{B:()=>i}),(r=i||(i={})).Mainnet="mainnet-beta",r.Testnet="testnet",r.Devnet="devnet"},32527:(e,t,n)=>{"use strict";function i(e){return"version"in e}n.d(t,{Y:()=>i})},46400:e=>{e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},50186:(e,t,n)=>{let i=n(46400),r=n(64648),s=n(89046),a=n(24961);function o(e,t,n,s,a){let o=[].slice.call(arguments,1),l=o.length,c="function"==typeof o[l-1];if(!c&&!i())throw Error("Callback required as last argument");if(c){if(l<2)throw Error("Too few arguments provided");2===l?(a=n,n=t,t=s=void 0):3===l&&(t.getContext&&void 0===a?(a=s,s=void 0):(a=s,s=n,n=t,t=void 0))}else{if(l<1)throw Error("Too few arguments provided");return 1===l?(n=t,t=s=void 0):2!==l||t.getContext||(s=n,n=t,t=void 0),new Promise(function(i,a){try{let a=r.create(n,s);i(e(a,t,s))}catch(e){a(e)}})}try{let i=r.create(n,s);a(null,e(i,t,s))}catch(e){a(e)}}t.create=r.create,t.toCanvas=o.bind(null,s.render),t.toDataURL=o.bind(null,s.renderToDataURL),t.toString=o.bind(null,function(e,t,n){return a.render(e,n)})}
1,54038:(e,t,n)=>{"use strict";n.d(t,{S:()=>a});var i=n(80771),r=n(6249),s=n(434);let a=({children:e,endpoint:t,config:n={commitment:"confirmed"}})=>{let a=(0,r.useMemo)(()=>new i.Connection(t,n),[t,n]);return r.createElement(s.E.Provider,{value:{connection:a}},e)}},63726:(e,t,n)=>{"use strict";n.d(t,{R:()=>i});let i="solana:signAndSendTransaction"},64206:(e,t,n)=>{"use strict";n.d(t,{AE:()=>r,Ez:()=>s,K3:()=>w,Kd:()=>d,PQ:()=>o,UF:()=>h,Y6:()=>a,Y8:()=>l,fk:()=>c,kW:()=>u,m7:()=>i,o7:()=>p,z4:()=>f});class i extends Error{constructor(e,t){super(e),this.error=t}}class r extends i{constructor(){super(...arguments),this.name="WalletNotReadyError"}}class s extends i{constructor(){super(...arguments),this.name="WalletConfigError"}}class a extends i{constructor(){super(...arguments),this.name="WalletConnectionError"}}class o extends i{constructor(){super(...arguments),this.name="WalletDisconnectedError"}}class l extends i{constructor(){super(...arguments),this.name="WalletDisconnectionError"}}class c extends i{constructor(){super(...arguments),this.name="WalletAccountError"}}class d extends i{constructor(){super(...arguments),this.name="WalletPublicKeyError"}}class u extends i{constructor(){super(...arguments),this.name="WalletNotConnectedError"}}class h extends i{constructor(){super(...arguments),this.name="WalletSendTransactionError"}}class f extends i{constructor(){super(...arguments),this.name="WalletSignTransactionError"}}class w extends i{constructor(){super(...arguments),this.name="WalletSignMessageError"}}class p extends i{constructor(){super(...arguments),this.name="WalletSignInError"}}},67804:(e,t,n)=>{"use strict";n.d(t,{w:()=>i});let i="standard:disconnect"},68862:(e,t,n)=>{"use strict";let i,r;n.d(t,{r:()=>tN});var s,a,o,l,c,d,u,h,f,w,p,m,g,y,v,b,E,M,k,T,W,S,x,I,_,C,A,R,O,L,j,z,P,U,N,D,K,q,F,B,$,V,Y,Q,H,Z,G,J,X,ee,et,en,ei,er,es,ea,eo,el,ec,ed,eu,eh,ef,ew,ep,em,eg,ey,ev,eb,eE,eM,ek,eT,eW,eS,ex,eI=n(82052),e_=n(64206);(s=o||(o={})).Installed="Installed",s.NotDetected="NotDetected",s.Loadable="Loadable",s.Unsupported="Unsupported";class eC extends eI.A{get connected(){return!!this.publicKey}async autoConnect(){await this.connect()}async prepareTransaction(e,t,n={}){let i=this.publicKey;if(!i)throw new e_.kW;return e.feePayer=e.feePayer||i,e.recentBlockhash=e.recentBlockhash||(await t.getLatestBlockhash({commitment:n.preflightCommitment,minContextSlot:n.minContextSlot})).blockhash,e}}var eA=n(32527);class eR extends eC{async sendTransaction(e,t,n={}){let i=!0;try{if((0,eA.Y)(e)){if(!this.supportedTransactionVersions)throw new e_.UF("Sending versioned transactions isn't supported by this wallet");if(!this.supportedTransactionVersions.has(e.version))throw new e_.UF(`Sending transaction version ${e.version} isn't supported by this wallet`);try{let i=(e=await this.signTransaction(e)).serialize();return await t.sendRawTransaction(i,n)}catch(e){if(e instanceof e_.z4)throw i=!1,e;throw new e_.UF(e?.message,e)}}try{let{signers:i,...r}=n;e=await this.prepareTransaction(e,t,r),i?.length&&e.partialSign(...i);let s=(e=await this.signTransaction(e)).serialize();return await t.sendRawTransaction(s,r)}catch(e){if(e instanceof e_.z4)throw i=!1,e;throw new e_.UF(e?.message,e)}}catch(e){throw i&&this.emit("error",e),e}}async signAllTransactions(e){for(let t of e)if((0,eA.Y)(t)){if(!this.supportedTransactionVersions)throw new e_.z4("Signing versioned transactions isn't supported by this wallet");if(!this.supportedTransactionVersions.has(t.version))throw new e_.z4(`Signing transaction version ${t.version} isn't supported by this wallet`)}let t=[];for(let n of e)t.push(await this.signTransaction(n));return t}}class eO extends eR{}class eL extends eO{}var ej=n(80771);let ez="solana:signIn";var eP=n(1046),eU=n(63726),eN=n(14477);n(50186);let eD=`(?:\\nURI: (?<uri>[^\\n]+))?(?:\\nVersion: (?<version>[^\\n]+))?(?:\\nChain ID: (?<chainId>[^\\n]+))?(?:\\nNonce: (?<nonce>[^\\n]+))?(?:\\nIssued At: (?<issuedAt>[^\\n]+))?(?:\\nExpiration Time: (?<expirationTime>[^\\n]+))?(?:\\nNot Before: (?<notBefore>[^\\n]+))?(?:\\nRequest ID: (?<requestId>[^\\n]+))?(?:\\nResources:(?<resources>(?:\\n- [^\\n]+)*))?`;RegExp(`^(?<domain>[^\\n]+?) wants you to sign in with your Solana account:\\n(?<address>[^\\n]+)(?:\\n|$)(?:\\n(?<statement>[\\S\\s]*?)(?:\\n|$))??${eD}\\n*$`);let eK="ERROR_FORBIDDEN_WALLET_BASE_URL";
vendor: 4,482 bytes, lines 1-20
1class eq extends Error{constructor(...e){const[t,n,i]=e;super(n),this.code=t,this.data=i,this.name="SolanaMobileWalletAdapterError"}}class eF extends Error{constructor(...e){const[t,n,i,r]=e;super(i),this.code=n,this.data=r,this.jsonRpcMessageId=t,this.name="SolanaMobileWalletAdapterProtocolError"}}function eB(e,t,n,i){return new(n||(n=Promise))(function(r,s){function a(e){try{l(i.next(e))}catch(e){s(e)}}function o(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,o)}l((i=i.apply(e,t||[])).next())})}function e$(e,t){let n=window.btoa(String.fromCharCode.call(null,...e));return t?n.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):n}function eV(e){return new Uint8Array(window.atob(e).split("").map(e=>e.charCodeAt(0)))}function eY(e,t){return eB(this,void 0,void 0,function*(){let n=yield crypto.subtle.exportKey("raw",e),i=yield crypto.subtle.sign({hash:"SHA-256",name:"ECDSA"},t,n),r=new Uint8Array(n.byteLength+i.byteLength);return r.set(new Uint8Array(n),0),r.set(new Uint8Array(i),n.byteLength),r})}let eQ="solana:cloneAuthorization";function eH(e,t){return eB(this,void 0,void 0,function*(){let n=e.slice(0,4),r=e.slice(4,16),s=e.slice(16),a=yield crypto.subtle.decrypt(eZ(n,r),t,s);return(void 0===i&&(i=new TextDecoder("utf-8")),i).decode(a)})}function eZ(e,t){return{additionalData:e,iv:t,name:"AES-GCM",tagLength:128}}function eG(){return eB(this,void 0,void 0,function*(){return yield crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!1,["deriveKey","deriveBits"])})}function eJ(e){if(e<49152||e>65535)throw new eq("ERROR_ASSOCIATION_PORT_OUT_OF_RANGE",`Association port number must be between 49152 and 65535. ${e} given.`,{port:e});return e}function eX(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}let e0=null,e1=[150,150,200,500,500,750,750,1e3];function e5(e){return new DataView(e).getUint32(0,!1)}var e2=n(95552),e4=n(67804),e6=n(19355),e8=n(67469);let e3="solana:mainnet";function e7(e,t,n,i){return new(n||(n=Promise))(function(r,s){function a(e){try{l(i.next(e))}catch(e){s(e)}}function o(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,o)}l((i=i.apply(e,t||[])).next())})}function e9(e,t,n,i){if("a"===n&&!i)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)}function te(e,t,n,i,r){if("m"===i)throw TypeError("Private method is not writable");if("a"===i&&!r)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n}let tt=` 2<div class="mobile-wallet-adapter-embedded-modal-container" role="dialog" aria-modal="true" aria-labelledby="modal-title"> 3 <div data-modal-close style="position: absolute; width: 100%; height: 100%;"></div> 4 <div class="mobile-wallet-adapter-embedded-modal-card"> 5 <div> 6 <button data-modal-close class="mobile-wallet-adapter-embedded-modal-close"> 7 <svg width="14" height="14"> 8 <path d="M 6.7125,8.3036995 1.9082,13.108199 c -0.2113,0.2112 -0.4765,0.3168 -0.7957,0.3168 -0.3192,0 -0.5844,-0.1056 -0.7958,-0.3168 C 0.1056,12.896899 0,12.631699 0,12.312499 c 0,-0.3192 0.1056,-0.5844 0.3167,-0.7958 L 5.1212,6.7124995 0.3167,1.9082 C 0.1056,1.6969 0,1.4317 0,1.1125 0,0.7933 0.1056,0.5281 0.3167,0.3167 0.5281,0.1056 0.7933,0 1.1125,0 1.4317,0 1.6969,0.1056 1.9082,0.3167 L 6.7125,5.1212 11.5167,0.3167 C 11.7281,0.1056 11.9933,0 12.3125,0 c 0.3192,0 0.5844,0.1056 0.7957,0.3167 0.2112,0.2114 0.3168,0.4766 0.3168,0.7958 0,0.3192 -0.1056,0.5844 -0.3168,0.7957 L 8.3037001,6.7124995 13.1082,11.516699 c 0.2112,0.2114 0.3168,0.4766 0.3168,0.7958 0,0.3192 -0.1056,0.5844 -0.3168,0.7957 -0.2113,0.2112 -0.4765,0.3168 -0.7957,0.3168 -0.3192,0 -0.5844,-0.1056 -0.7958,-0.3168 z" /> 9 </svg> 10 </button> 11 </div> 12 <div class="mobile-wallet-adapter-embedded-modal-content"></div> 13 </div> 14</div> 15`,tn=` 16.mobile-wallet-adapter-embedded-modal-container { 17 display: flex; /* Use flexbox to center content */ 18 justify-content: center; /* Center horizontally */ 19 align-items: center; /* Center vertically */ 20 position: fixed;
20 /* Stay in place */ 21 z-index: 1; /* Sit on top */ 22 left: 0; 23 top: 0; 24 width: 100%; /* Full width */ 25 height: 100%; /* Full height */ 26 background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ 27 overflow-y: auto; /* enable scrolling */ 28} 29 30.mobile-wallet-adapter-embedded-modal-card { 31 display: flex; 32 flex-direction: column; 33 margin: auto 20px; 34 max-width: 780px; 35 padding: 20px; 36 border-radius: 24px; 37 background: #ffffff; 38 font-family: "Inter Tight", "PT Sans", Calibri, sans-serif; 39 transform: translateY(-200%); 40 animation: slide-in 0.5s forwards; 41} 42 43@keyframes slide-in { 44 100% { transform: translateY(0%); } 45} 46 47.mobile-wallet-adapter-embedded-modal-close { 48 display: flex; 49 align-items: center; 50 justify-content: center; 51 width: 32px; 52 height: 32px; 53 cursor: pointer; 54 background: #e4e9e9; 55 border: none; 56 border-radius: 50%; 57} 58 59.mobile-wallet-adapter-embedded-modal-close:focus-visible { 60 outline-color: red; 61} 62 63.mobile-wallet-adapter-embedded-modal-close svg { 64 fill: #546266; 65 transition: fill 200ms ease 0s; 66} 67 68.mobile-wallet-adapter-embedded-modal-close:hover svg { 69 fill: #fff; 70} 71`,ti=` 72<link rel="preconnect" href="https://fonts.googleapis.com"> 73<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> 74<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet"> 75`;class tr{constructor(){l.add(this),c.set(this,null),d.set(this,{}),u.set(this,!1),this.dom=null,this.open=()=>{console.debug("Modal open"),e9(this,l,"m",f).call(this),e9(this,c,"f")&&(e9(this,c,"f").style.display="flex")},this.close=e=>{var t;console.debug("Modal close"),e9(this,l,"m",w).call(this),e9(this,c,"f")&&(e9(this,c,"f").style.display="none"),null==(t=e9(this,d,"f").close)||t.forEach(t=>t(e))},p.set(this,e=>{"Escape"===e.key&&this.close(e)}),this.init=this.init.bind(this),te(this,c,document.getElementById("mobile-wallet-adapter-embedded-root-ui"),"f")}init(){return e7(this,void 0,void 0,function*(){console.log("Injecting modal"),e9(this,l,"m",h).call(this)})}addEventListener(e,t){var n;return(null==(n=e9(this,d,"f")[e])?void 0:n.push(t))||(e9(this,d,"f")[e]=[t]),()=>this.removeEventListener(e,t)}removeEventListener(e,t){var n;e9(this,d,"f")[e]=null==(n=e9(this,d,"f")[e])?void 0:n.filter(e=>t!==e)}}function ts(e){return window.btoa(String.fromCharCode.call(null,...e))}function ta(e){return new Uint8Array(window.atob(e).split("").map(e=>e.charCodeAt(0)))}c=new WeakMap,d=new WeakMap,u=new WeakMap,p=new WeakMap,l=new WeakSet,h=function(){if(document.getElementById("mobile-wallet-adapter-embedded-root-ui")){e9(this,c,"f")||te(this,c,document.getElementById("mobile-wallet-adapter-embedded-root-ui"),"f");return}te(this,c,document.createElement("div"),"f"),e9(this,c,"f").id="mobile-wallet-adapter-embedded-root-ui",e9(this,c,"f").innerHTML=tt,e9(this,c,"f").style.display="none";let e=e9(this,c,"f").querySelector(".mobile-wallet-adapter-embedded-modal-content");e&&(e.innerHTML=this.contentHtml);let t=document.createElement("style");t.id="mobile-wallet-adapter-embedded-modal-styles",t.textContent=tn+this.contentStyles;let n=document.createElement("div");n.innerHTML=ti,this.dom=n.attachShadow({mode:"closed"}),this.dom.appendChild(t),this.dom.appendChild(e9(this,c,"f")),document.body.appendChild(n)},f=function(){!e9(this,c,"f")||e9(this,u,"f")||([...e9(this,c,"f").querySelectorAll("[data-modal-close]")].forEach(e=>null==e?void 0:e.addEventListener("click",this.close)),window.addEventListener("load",this.close),document.addEventListener("keydown",e9(this,p,"f")),te(this,u,!0,"f"))},w=function(){!e9(this,u,"f")||(window.removeEventListener("load",this.close),document.removeEventListener("keydown",e9(this,p,"f")),e9(this,c,"f")&&([...e9(this,c,"f").querySelectorAll("[data-modal-close]")].forEach(e=>null==e?void 0:e.removeEventListener("click",this.close)),te(this,u,!1,"f")))};let to="Mobile Wallet Adapter",tl=[eU.R,eN.q,eP.F,ez];class tc{constructor(e){m.add(this),g.set(this,{}),y.set(this,"1.0.0"),v.set(this,to),b.set(this,"https://solanamobile.com/wallets"),E.set(this,"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03IDIuNUgxN0MxNy44Mjg0IDIuNSAxOC41IDMuMTc
75xNTcgMTguNSA0VjIwQzE4LjUgMjAuODI4NCAxNy44Mjg0IDIxLjUgMTcgMjEuNUg3QzYuMTcxNTcgMjEuNSA1LjUgMjAuODI4NCA1LjUgMjBWNEM1LjUgMy4xNzE1NyA2LjE3MTU3IDIuNSA3IDIuNVpNMyA0QzMgMS43OTA4NiA0Ljc5MDg2IDAgNyAwSDE3QzE5LjIwOTEgMCAyMSAxLjc5MDg2IDIxIDRWMjBDMjEgMjIuMjA5MSAxOS4yMDkxIDI0IDE3IDI0SDdDNC43OTA4NiAyNCAzIDIyLjIwOTEgMyAyMFY0Wk0xMSA0LjYxNTM4QzEwLjQ0NzcgNC42MTUzOCAxMCA1LjA2MzEgMTAgNS42MTUzOFY2LjM4NDYyQzEwIDYuOTM2OSAxMC40NDc3IDcuMzg0NjIgMTEgNy4zODQ2MkgxM0MxMy41NTIzIDcuMzg0NjIgMTQgNi45MzY5IDE0IDYuMzg0NjJWNS42MTUzOEMxNCA1LjA2MzEgMTMuNTUyMyA0LjYxNTM4IDEzIDQuNjE1MzhIMTFaIiBmaWxsPSIjRENCOEZGIi8+Cjwvc3ZnPgo="),M.set(this,void 0),k.set(this,void 0),T.set(this,void 0),W.set(this,!1),S.set(this,0),x.set(this,[]),I.set(this,void 0),_.set(this,void 0),C.set(this,void 0),A.set(this,(e,t)=>{var n;return(null==(n=e9(this,g,"f")[e])?void 0:n.push(t))||(e9(this,g,"f")[e]=[t]),()=>e9(this,m,"m",O).call(this,e,t)}),L.set(this,({silent:e}={})=>e7(this,void 0,void 0,function*(){if(e9(this,W,"f")||this.connected)return{accounts:this.accounts};te(this,W,!0,"f");try{if(e){let e=yield e9(this,T,"f").get();if(!e)return{accounts:this.accounts};yield e9(this,P,"f").call(this,e.capabilities),yield e9(this,z,"f").call(this,e)}else yield e9(this,j,"f").call(this)}catch(e){throw Error(e instanceof Error&&e.message||"Unknown error")}finally{te(this,W,!1,"f")}return{accounts:this.accounts}})),j.set(this,e=>e7(this,void 0,void 0,function*(){try{let t=yield e9(this,T,"f").get();if(t)return e9(this,z,"f").call(this,t),t;let n=yield e9(this,I,"f").select(e9(this,x,"f"));return yield e9(this,D,"f").call(this,t=>e7(this,void 0,void 0,function*(){let[i,r]=yield Promise.all([t.getCapabilities(),t.authorize({chain:n,identity:e9(this,M,"f"),sign_in_payload:e})]),s=e9(this,q,"f").call(this,r.accounts),a=Object.assign(Object.assign({},r),{accounts:s,chain:n,capabilities:i});return Promise.all([e9(this,P,"f").call(this,i),e9(this,T,"f").set(a),e9(this,z,"f").call(this,a)]),a}))}catch(e){throw Error(e instanceof Error&&e.message||"Unknown error")}})),z.set(this,e=>e7(this,void 0,void 0,function*(){var t;let n=null==e9(this,k,"f")||(null==(t=e9(this,k,"f"))?void 0:t.accounts.length)!==e.accounts.length||e9(this,k,"f").accounts.some((t,n)=>t.address!==e.accounts[n].address);te(this,k,e,"f"),n&&e9(this,m,"m",R).call(this,"change",{accounts:this.accounts})})),P.set(this,e=>e7(this,void 0,void 0,function*(){let t=e.features.includes("solana:signTransactions"),n=e.supports_sign_and_send_transactions,i=eU.R in this.features!==n||eN.q in this.features!==t;te(this,_,Object.assign(Object.assign({},(n||!n&&!t)&&{[eU.R]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signAndSendTransaction:e9(this,$,"f")}}),t&&{[eN.q]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signTransaction:e9(this,V,"f")}}),"f"),i&&e9(this,m,"m",R).call(this,"change",{features:this.features})})),U.set(this,(e,t,n)=>e7(this,void 0,void 0,function*(){var i,r;try{let[s,a]=yield Promise.all([null!=(r=null==(i=e9(this,k,"f"))?void 0:i.capabilities)?r:yield e.getCapabilities(),e.authorize({auth_token:t,identity:e9(this,M,"f"),chain:n})]),o=e9(this,q,"f").call(this,a.accounts),l=Object.assign(Object.assign({},a),{accounts:o,chain:n,capabilities:s});Promise.all([e9(this,T,"f").set(l),e9(this,z,"f").call(this,l)])}catch(e){throw e9(this,N,"f").call(this),Error(e instanceof Error&&e.message||"Unknown error")}})),N.set(this,()=>e7(this,void 0,void 0,function*(){var e;e9(this,T,"f").clear(),te(this,W,!1,"f"),te(this,S,(e=e9(this,S,"f"),++e),"f"),te(this,k,void 0,"f"),e9(this,m,"m",R).call(this,"change",{accounts:this.accounts})})),D.set(this,e=>e7(this,void 0,void 0,function*(){var t;let n=null==(t=e9(this,k,"f"))?void 0:t.wallet_uri_base,i=e9(this,S,"f");try{return yield function(e,t){return eB(this,void 0,void 0,function*(){let n,i;if("u"<typeof window||!0!==window.isSecureContext)throw new eq("ERROR_SECURE_CONTEXT_REQUIRED","The mobile wallet adapter protocol must be used in a secure context (`https`).");let r=yield function(){return eB(this,void 0,void 0,function*(){return yield crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign"])})}(),s=yield function(e,t){return eB(this,void 0,void 0,function*(){let n=eJ(49152+Math.floor(16384*Math.random())),i=yield function(e,t,n,i=["v1"]){return eB(this,void 0,void 0,function*(){let r=eJ(t),s=function(e){let t="",n=new Uint8Array(e),i=n.byteLength;for(let e=0;e<i;e++)t+=String.fromCharCode(n[e]);return window.btoa(t)}((yield crypto.subtle.exportKey("raw",e))),a=function(e,t){let n=null;if(t){try{n=new URL(t)}catch(e){}if((null==n?void 0:n.protocol)!=="https:")throw new eq(eK,"Base URLs supplied by wallets must be valid `https` URLs")}return n||(n=new URL("solana-wallet:/")),new URL(e.startsWith("/")?e:[...eX(n.pathname),...eX(e)].join("/"),n)}("v1/associate/local",n);return a.searchParams.set("association",s.replace(/[/+=]/g,e=>({"/":"_","+":"-","=":"."})[e])),a.searchParams.set("port",`${r}
75`),i.forEach(e=>{a.searchParams.set("v",e)}),a})}(e,n,t);return yield function(e){return eB(this,void 0,void 0,function*(){if("https:"===e.protocol)window.location.assign(e);else try{switch(1*(-1===navigator.userAgent.indexOf("Firefox/"))){case 0:null==e0&&((e0=document.createElement("iframe")).style.display="none",document.body.appendChild(e0)),e0.contentWindow.location.href=e.toString();break;case 1:{let t=new Promise((e,t)=>{function n(){clearTimeout(r),window.removeEventListener("blur",i)}function i(){n(),e()}window.addEventListener("blur",i);let r=setTimeout(()=>{n(),t()},3e3)});window.location.assign(e),yield t}}}catch(e){throw new eq("ERROR_WALLET_NOT_FOUND","Found no installed wallet that supports the mobile wallet protocol.")}})}(i),n})}(r.publicKey,null==t?void 0:t.baseUri),a=`ws://localhost:${s}/solana-wallet`,o=(i=[...e1],()=>i.length>1?i.shift():i[0]),l=1,c=0,d={__type:"disconnected"};return new Promise((t,i)=>{let s,u,h,f={},w=()=>eB(this,void 0,void 0,function*(){if("connecting"!==d.__type)return void console.warn(`Expected adapter state to be \`connecting\` at the moment the websocket opens. Got \`${d.__type}\`.`);s.removeEventListener("open",w);let{associationKeypair:e}=d,t=yield eG();s.send((yield eY(t.publicKey,e.privateKey))),d={__type:"hello_req_sent",associationPublicKey:e.publicKey,ecdhPrivateKey:t.privateKey}}),p=e=>{e.wasClean?d={__type:"disconnected"}:i(new eq("ERROR_SESSION_CLOSED",`The wallet session dropped unexpectedly (${e.code}: ${e.reason}).`,{closeEvent:e})),u()},m=e=>eB(this,void 0,void 0,function*(){u(),Date.now()-n>=3e4?i(new eq("ERROR_SESSION_TIMEOUT",`Failed to connect to the wallet websocket at ${a}.`)):(yield new Promise(e=>{let t=o();h=window.setTimeout(e,t)}),y())}),g=n=>eB(this,void 0,void 0,function*(){let a=yield n.data.arrayBuffer();switch(d.__type){case"connecting":if(0!==a.byteLength)throw Error("Encountered unexpected message while connecting");let o=yield eG();s.send((yield eY(o.publicKey,r.privateKey))),d={__type:"hello_req_sent",associationPublicKey:r.publicKey,ecdhPrivateKey:o.privateKey};break;case"connected":try{let e=a.slice(0,4),t=e5(e);if(t!==c+1)throw Error("Encrypted message has invalid sequence number");c=t;let n=yield function(e,t){return eB(this,void 0,void 0,function*(){let n=JSON.parse((yield eH(e,t)));if(Object.hasOwnProperty.call(n,"error"))throw new eF(n.id,n.error.code,n.error.message);return n})}(a,d.sharedSecret),i=f[n.id];delete f[n.id],i.resolve(n.result)}catch(e){if(e instanceof eF){let t=f[e.jsonRpcMessageId];delete f[e.jsonRpcMessageId],t.reject(e)}else throw e}break;case"hello_req_sent":{var h,w;if(0===a.byteLength){let e=yield eG();s.send((yield eY(e.publicKey,r.privateKey))),d={__type:"hello_req_sent",associationPublicKey:r.publicKey,ecdhPrivateKey:e.privateKey};break}let n=yield function(e,t,n){return eB(this,void 0,void 0,function*(){let[i,r]=yield Promise.all([crypto.subtle.exportKey("raw",t),crypto.subtle.importKey("raw",e.slice(0,65),{name:"ECDH",namedCurve:"P-256"},!1,[])]),s=yield crypto.subtle.deriveBits({name:"ECDH",public:r},n,256),a=yield crypto.subtle.importKey("raw",s,"HKDF",!1,["deriveKey"]);return yield crypto.subtle.deriveKey({name:"HKDF",hash:"SHA-256",salt:new Uint8Array(i),info:new Uint8Array},a,{name:"AES-GCM",length:128},!1,["encrypt","decrypt"])})}(a,d.associationPublicKey,d.ecdhPrivateKey),o=a.slice(65),p=0!==o.byteLength?yield eB(this,void 0,void 0,function*(){let e=e5(o.slice(0,4));if(e!==c+1)throw Error("Encrypted message has invalid sequence number");return c=e,function(e,t){return eB(this,void 0,void 0,function*(){let n=JSON.parse((yield eH(e,t))),i="legacy";if(Object.hasOwnProperty.call(n,"v"))switch(n.v){case 1:case"1":case"v1":i="v1";break;case"legacy":i="legacy";break;default:throw new eq("ERROR_INVALID_PROTOCOL_VERSION",`Unknown/unsupported protocol version: ${n.v}`)}return{protocol_version:i}})}(o,n)}):{protocol_version:"legacy"};d={__type:"connected",sharedSecret:n,sessionProperties:p};let m=(h=p.protocol_version,w=(e,t)=>eB(this,void 0,void 0,function*(){let i=l++;return s.send((yield function(e,t){return eB(this,void 0,void 0,function*(){let n=JSON.stringify(e);return function(e,t,n){return eB(this,void 0,void 0,function*(){let i=function(e){if(e>=0x100000000)throw Error("Outbound sequence number overflow. The maximum sequence number is 32-bytes.");let t=new ArrayBuffer(4);return new DataView(t).setUint32(0,e,!1),new Uint8Array(t)}(t),r=new Uint8Array(12);crypto.getRandomValues(r);let s=yield crypto.subtle.encrypt(eZ(i,r),n,new TextEncoder().encode(e)),a=new Uint8Array(i.byteLength+r.byteLength+s.byteLength);return a.set(new Uint8Array(i),0),a.set(new Uint8Array(r),i.byteLength),a.set(new Uint8Array(s),i.byteLength+r.byteLength),a})}(n,e.id,t)})}({id:i,jsonrpc:"2.0",method:e,params:null!=t?t:{}},n))),new Promise((t,n)=>{f[i]={resolve(i){switch(e){case"authorize":case"reauthorize":{let{wallet_uri_base:e}=i;if(null!=e)try{let t;try{t=new URL(e)}catch(e){throw new eq(eK,"Invalid base URL supplied by wallet")}if("https:"!==t.protocol)throw new eq(eK,"Base URLs supplied by wallets must be valid `https` URLs")}catch(e){n(e);return}}}t(i)},reject:n}})}),new Proxy({},{get:(e,t)=>"then"===t?null:(null==e[t]&&(e[t]=function(e){return eB(this,void 0,void 0,function*(){let{method:n,params:i}=function(e,t,n){let i=t,r=e.toString().replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`).toLowerCase();switch(e){case"authorize":{let{chain:e}=i;
vendor: 11,073 bytes, lines 75-100
75if("legacy"===n){switch(e){case"solana:testnet":e="testnet";break;case"solana:devnet":e="devnet";break;case"solana:mainnet":e="mainnet-beta";break;default:e=i.cluster}i.cluster=e}else{switch(e){case"testnet":case"devnet":e=`solana:${e}`;break;case"mainnet-beta":e="solana:mainnet"}i.chain=e}}case"reauthorize":{let{auth_token:e,identity:t}=i;e&&("legacy"===n?(r="reauthorize",i={auth_token:e,identity:t}):r="authorize")}}return{method:r,params:i}}(t,e,h),r=yield w(n,i);return"authorize"===n&&i.sign_in_payload&&!r.sign_in_result&&(r.sign_in_result=yield function(e,t,n){var i;return eB(this,void 0,void 0,function*(){var r,s,a,o;let l=null!=(i=e.domain)?i:window.location.host,c=t.accounts[0].address,d=(o=function(e){let t=`${e.domain} wants you to sign in with your Solana account: 76`;t+=`${e.address}`,e.statement&&(t+=` 77 78${e.statement}`);let n=[];if(e.uri&&n.push(`URI: ${e.uri}`),e.version&&n.push(`Version: ${e.version}`),e.chainId&&n.push(`Chain ID: ${e.chainId}`),e.nonce&&n.push(`Nonce: ${e.nonce}`),e.issuedAt&&n.push(`Issued At: ${e.issuedAt}`),e.expirationTime&&n.push(`Expiration Time: ${e.expirationTime}`),e.notBefore&&n.push(`Not Before: ${e.notBefore}`),e.requestId&&n.push(`Request ID: ${e.requestId}`),e.resources)for(let t of(n.push("Resources:"),e.resources))n.push(`- ${t}`);return n.length&&(t+=` 79 80${n.join("\n")}`),t}(Object.assign(Object.assign({},e),{domain:l,address:(r=eV(c),(s="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",Object.freeze({...a={read(e,t){let n=0===t?e:e.slice(t);if(0===n.length)return["",0];let i=n.findIndex(e=>0!==e);i=-1===i?n.length:i;let r=s[0].repeat(i);return i===n.length?[r,e.length]:[r+function(e,t){let n=BigInt(t.length),i=[];for(;e>0n;)i.unshift(t[Number(e%n)]),e/=n;return i.join("")}(n.slice(i).reduce((e,t)=>256n*e+BigInt(t),0n),s),e.length]}},decode:(e,t=0)=>a.read(e,t)[0]})).decode(r))})),window.btoa(o)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),u=eV((yield n("sign_messages",{addresses:[c],payloads:[d]})).signed_payloads[0]),h=e$(u.slice(0,u.length-64)),f=e$(u.slice(u.length-64));return{address:c,signed_message:0==h.length?d:h,signature:f}})}(i.sign_in_payload,r,w)),function(e,t,n){if("getCapabilities"===e)switch(n){case"legacy":{let e=["solana:signTransactions"];return!0===t.supports_clone_authorization&&e.push(eQ),Object.assign(Object.assign({},t),{features:e})}case"v1":return Object.assign(Object.assign({},t),{supports_sign_and_send_transactions:!0,supports_clone_authorization:t.features.includes(eQ)})}return t}(t,r,h)})}),e[t]),defineProperty:()=>!1,deleteProperty:()=>!1}));try{t((yield e(m)))}catch(e){i(e)}finally{u(),s.close()}}}}),y=()=>{u&&u(),d={__type:"connecting",associationKeypair:r},void 0===n&&(n=Date.now()),(s=new WebSocket(a,["com.solana.mobilewalletadapter.v1"])).addEventListener("open",w),s.addEventListener("close",p),s.addEventListener("error",m),s.addEventListener("message",g),u=()=>{window.clearTimeout(h),s.removeEventListener("open",w),s.removeEventListener("close",p),s.removeEventListener("error",m),s.removeEventListener("message",g)}};y()})})}(e,n?{baseUri:n}:void 0)}catch(e){throw e9(this,S,"f")!==i&&(yield new Promise(()=>{})),e instanceof Error&&"SolanaMobileWalletAdapterError"===e.name&&"ERROR_WALLET_NOT_FOUND"===e.code&&(yield e9(this,C,"f").call(this,this)),e}})),K.set(this,()=>{if(!e9(this,k,"f"))throw Error("Wallet not connected");return{authToken:e9(this,k,"f").auth_token,chain:e9(this,k,"f").chain}}),q.set(this,e=>e.map(e=>{var t,n;let i=ta(e.address);return{address:e8.encode(i),publicKey:i,label:e.label,icon:e.icon,chains:null!=(t=e.chains)?t:e9(this,x,"f"),features:null!=(n=e.features)?n:tl}})),F.set(this,e=>e7(this,void 0,void 0,function*(){let{authToken:t,chain:n}=e9(this,K,"f").call(this);try{let i=e.map(e=>ts(e));return yield e9(this,D,"f").call(this,e=>e7(this,void 0,void 0,function*(){return yield e9(this,U,"f").call(this,e,t,n),(yield e.signTransactions({payloads:i})).signed_payloads.map(ta)}))}catch(e){throw Error(e instanceof Error&&e.message||"Unknown error")}})),B.set(this,(e,t)=>e7(this,void 0,void 0,function*(){let{authToken:n,chain:i}=e9(this,K,"f").call(this);try{return yield e9(this,D,"f").call(this,r=>e7(this,void 0,void 0,function*(){let[s,a]=yield Promise.all([r.getCapabilities(),e9(this,U,"f").call(this,r,n,i)]);if(s.supports_sign_and_send_transactions){let n=ts(e);return(yield r.signAndSendTransactions(Object.assign(Object.assign({},t),{payloads:[n]}))).signatures.map(ta)[0]}throw Error("connected wallet does not support signAndSendTransaction")}))}catch(e){throw Error(e instanceof Error&&e.message||"Unknown error")}})),$.set(this,(...e)=>e7(this,void 0,void 0,function*(){let t=[];for(let n of e){let e=yield e9(this,B,"f").call(this,n.transaction,n.options);t.push({signature:e})}return t})),V.set(this,(...e)=>e7(this,void 0,void 0,function*(){return(yield e9(this,F,"f").call(this,e.map(({transaction:e})=>e))).map(e=>({signedTransaction:e}))})),Y.set(this,(...e)=>e7(this,void 0,void 0,function*(){let{authToken:t,chain:n}=e9(this,K,"f").call(this),i=e.map(({account:e})=>ts(e.publicKey)),r=e.map(({message:e})=>ts(e));try{return yield e9(this,D,"f").call(this,e=>e7(this,void 0,void 0,function*(){return yield e9(this,U,"f").call(this,e,t,n),(yield e.signMessages({addresses:i,payloads:r})).signed_payloads.map(ta).map(e=>({signedMessage:e,signature:e.slice(-64)}))}))}catch(e){throw Error(e instanceof Error&&e.message||"Unknown error")}})),Q.set(this,(...e)=>e7(this,void 0,void 0,function*(){let t=[];if(!(e.length>1))return[(yield e9(this,H,"f").call(this,e[0]))];for(let n of e)t.push((yield e9(this,H,"f").call(this,n)));return t})),H.set(this,e=>e7(this,void 0,void 0,function*(){var t,n,i;te(this,W,!0,"f");try{let r=yield e9(this,j,"f").call(this,Object.assign(Object.assign({},e),{domain:null!=(t=null==e?void 0:e.domain)?t:window.location.host}));if(!r.sign_in_result)throw Error("Sign in failed, no sign in result returned by wallet");let s=r.sign_in_result.address,a=r.accounts.find(e=>e.address==s);return{account:Object.assign(Object.assign({},null!=a?a:{address:e8.encode(ta(s))}),{publicKey:ta(s),chains:null!=(n=null==a?void 0:a.chains)?n:e9(this,x,"f"),features:null!=(i=null==a?void 0:a.features)?i:r.capabilities.features}),signedMessage:ta(r.sign_in_result.signed_message),signature:ta(r.sign_in_result.signature)}}catch(e){throw Error(e instanceof Error&&e.message||"Unknown error")}finally{te(this,W,!1,"f")}})),te(this,T,e.authorizationCache,"f"),te(this,M,e.appIdentity,"f"),te(this,x,e.chains,"f"),te(this,I,e.chainSelector,"f"),te(this,C,e.onWalletNotFound,"f"),te(this,_,{[eU.R]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signAndSendTransaction:e9(this,$,"f")},[eN.q]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signTransaction:e9(this,V,"f")}},"f")}get version(){return e9(this,y,"f")}get name(){return e9(this,v,"f")}get url(){return e9(this,b,"f")}get icon(){return e9(this,E,"f")}get chains(){return e9(this,x,"f")}get features(){return Object.assign({[e2.u]:{version:"1.0.0",connect:e9(this,L,"f")},[e4.w]:{version:"1.0.0",disconnect:e9(this,N,"f")},[e6.j]:{version:"1.0.0",on:e9(this,A,"f")},[eP.F]:{version:"1.0.0",signMessage:e9(this,Y,"f")},[ez]:{version:"1.0.0",signIn:e9(this,Q,"f")}},e9(this,_,"f"))}get accounts(){var e,t;return null!=(t=null==(e=e9(this,k,"f"))?void 0:e.accounts)?t:[]}get connected(){return!!e9(this,k,"f")}get isAuthorized(){return!!e9(this,k,"f")}get currentAuthorization(){return e9(this,k,"f")}get cachedAuthorizationResult(){return e9(this,T,"f").get()}}g=new WeakMap,y=new WeakMap,v=new WeakMap,b=new WeakMap,E=new WeakMap,M=new WeakMap,k=new WeakMap,T=new WeakMap,W=new WeakMap,S=new WeakMap,x=new WeakMap,I=new WeakMap,_=new WeakMap,C=new WeakMap,A=new WeakMap,L=new WeakMap,j=new WeakMap,z=new WeakMap,P=new WeakMap,U=new WeakMap,N=new WeakMap,D=new WeakMap,K=new WeakMap,q=new WeakMap,F=new WeakMap,B=new WeakMap,$=new WeakMap,V=new WeakMap,Y=new WeakMap,Q=new WeakMap,H=new WeakMap,m=new WeakSet,R=function(e,...t){var n;null==(n=e9(this,g,"f")[e])||n.forEach(e=>e.apply(null,t))},O=function(e,t){var n;e9(this,g,"f")[e]=null==(n=e9(this,g,"f")[e])?void 0:n.filter(e=>t!==e)},new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakSet;Event,new WeakMap;class td extends tr{constructor(){super(...arguments),this.contentStyles=th,this.contentHtml=tu}initWithError(e){super.init(),this.populateError(e)}populateError(e){var t,n;let i=null==(t=this.dom)?void 0:t.getElementById("mobile-wallet-adapter-error-message"),r=null==(n=this.dom)?void 0:n.getElementById("mobile-wallet-adapter-error-action");if(i){if("SolanaMobileWalletAdapterError"===e.name)switch(e.code){case"ERROR_WALLET_NOT_FOUND":i.innerHTML="To use mobile wallet adapter, you must have a compatible mobile wallet application installed on your device.",r&&r.addEventListener("click",()=>{window.location.href="https://solanamobile.com/wallets"});return;case"ERROR_BROWSER_NOT_SUPPORTED":i.innerHTML="This browser appears to be incompatible with mobile wallet adapter. Open this page in a compatible mobile browser app and try again.",r&&(r.style.display="none");return}i.innerHTML=`An unexpected error occurred: ${e.message}`}else console.log("Failed to locate error dialog element")}}let tu=` 81<svg class="mobile-wallet-adapter-embedded-modal-error-icon" xmlns="http://www.w3.org/2000/svg" height="50px" viewBox="0 -960 960 960" width="50px" fill="#000000"><path d="M 280,-80 Q 197,-80 138.5,-138.5 80,-197 80,-280 80,-363 138.5,-421.5 197,-480 280,-480 q 83,0 141.5,58.5 58.5,58.5 58.5,141.5 0,83 -58.5,141.5 Q 363,-80 280,-80 Z M 824,-120 568,-376 Q 556,-389 542.5,-402.5 529,-416 516,-428 q 38,-24 61,-64 23,-40 23,-88 0,-75 -52.5,-127.5 Q 495,-760 420,-760 345,-760 292.5,-707.5 240,-655 240,-580 q 0,6 0.5,11.5 0.5,5.5 1.5,11.5 -18,2 -39.5,8 -21.5,6 -38.5,14 -2,-11 -3,-22 -1,-11 -1,-23 0,-109 75.5,-184.5 Q 311,-840 420,-840 q 109,0 184.5,75.5 75.5,75.5 75.5,184.5 0,43 -13.5,81.5 Q 653,-460 629,-428 l 251,252 z m -615,-61 71,-71 70,71 29,-28 -71,-71 71,-71 -28,-28 -71,71 -71,-71 -28,28 71,71 -71,71 z"/></svg> 82<div class="mobile-wallet-adapter-embedded-modal-title">We can't find a wallet.</div> 83<div id="mobile-wallet-adapter-error-message" class="mobile-wallet-adapter-embedded-modal-subtitle"></div> 84<div> 85 <button data-error-action id="mobile-wallet-adapter-error-action" class="mobile-wallet-adapter-embedded-modal-error-action"> 86 Find a wallet 87 </button> 88</div> 89`,th=` 90.mobile-wallet-adapter-embedded-modal-content { 91 text-align: center; 92} 93 94.mobile-wallet-adapter-embedded-modal-error-icon { 95 margin-top: 24px; 96} 97 98.mobile-wallet-adapter-embedded-modal-title { 99 margin: 18px 100px auto 100px; 100 color: #000000;
101 font-size: 2.75em; 102 font-weight: 600; 103} 104 105.mobile-wallet-adapter-embedded-modal-subtitle { 106 margin: 30px 60px 40px 60px; 107 color: #000000; 108 font-size: 1.25em; 109 font-weight: 400; 110} 111 112.mobile-wallet-adapter-embedded-modal-error-action { 113 display: block; 114 width: 100%; 115 height: 56px; 116 /*margin-top: 40px;*/ 117 font-size: 1.25em; 118 /*line-height: 24px;*/ 119 /*letter-spacing: -1%;*/ 120 background: #000000; 121 color: #FFFFFF; 122 border-radius: 18px; 123} 124 125/* Smaller screens */ 126@media all and (max-width: 600px) { 127 .mobile-wallet-adapter-embedded-modal-title { 128 font-size: 1.5em; 129 margin-right: 12px; 130 margin-left: 12px; 131 } 132 .mobile-wallet-adapter-embedded-modal-subtitle { 133 margin-right: 12px; 134 margin-left: 12px; 135 } 136} 137`,tf="SolanaMobileWalletAdapterDefaultAuthorizationCache";function tw(e,t,n,i){return new(n||(n=Promise))(function(r,s){function a(e){try{l(i.next(e))}catch(e){s(e)}}function o(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,o)}l((i=i.apply(e,t||[])).next())})}function tp(e,t,n,i){if("a"===n&&!i)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)}function tm(e,t,n,i,r){if("m"===i)throw TypeError("Private method is not writable");if("a"===i&&!r)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n}let tg="standard:connect";function ty(e){return window.btoa(String.fromCharCode.call(null,...e))}function tv(e){switch(e){case"mainnet-beta":return"solana:mainnet";case"testnet":return"solana:testnet";case"devnet":return"solana:devnet";default:return e}}class tb extends eL{constructor(e,t){super(),Z.add(this),this.supportedTransactionVersions=new Set(["legacy",0]),G.set(this,void 0),J.set(this,!1),X.set(this,"u">typeof window&&window.isSecureContext&&"u">typeof document&&/android/i.test(navigator.userAgent)?o.Loadable:o.Unsupported),ee.set(this,void 0),et.set(this,void 0),en.set(this,void 0),ei.set(this,e=>tw(this,void 0,void 0,function*(){if(e.accounts&&e.accounts.length>0){tp(this,Z,"m",es).call(this);let t=yield tp(this,ee,"f").call(this,e.accounts);t!==tp(this,et,"f")&&(tm(this,et,t,"f"),tm(this,en,void 0,"f"),this.emit("connect",this.publicKey))}})),tm(this,ee,e=>tw(this,void 0,void 0,function*(){var n;let i=yield t.addressSelector.select(e.map(({publicKey:e})=>ty(e)));return null!=(n=e.find(({publicKey:e})=>ty(e)===i))?n:e[0]}),"f"),tm(this,G,e,"f"),tp(this,G,"f").features["standard:events"].on("change",tp(this,ei,"f")),this.name=tp(this,G,"f").name,this.icon=tp(this,G,"f").icon,this.url=tp(this,G,"f").url}get publicKey(){var e;if(!tp(this,en,"f")&&tp(this,et,"f"))try{tm(this,en,new ej.PublicKey(tp(this,et,"f").publicKey),"f")}catch(e){throw new e_.Kd(e instanceof Error&&(null==e?void 0:e.message)||"Unknown error",e)}return null!=(e=tp(this,en,"f"))?e:null}get connected(){return tp(this,G,"f").connected}get connecting(){return tp(this,J,"f")}get readyState(){return tp(this,X,"f")}autoConnect_DO_NOT_USE_OR_YOU_WILL_BE_FIRED(){return tw(this,void 0,void 0,function*(){return yield this.autoConnect()})}autoConnect(){return tw(this,void 0,void 0,function*(){tp(this,Z,"m",er).call(this,!0)})}connect(){return tw(this,void 0,void 0,function*(){tp(this,Z,"m",er).call(this)})}performAuthorization(e){return tw(this,void 0,void 0,function*(){try{let t=yield tp(this,G,"f").cachedAuthorizationResult;if(t)return yield tp(this,G,"f").features[tg].connect({silent:!0}),t;return e?yield tp(this,G,"f").features[ez].signIn(e):yield tp(this,G,"f").features[tg].connect(),yield yield tp(this,G,"f").cachedAuthorizationResult}catch(e){throw new e_.Y6(e instanceof Error&&e.message||"Unknown error",e)}})}disconnect(){return tw(this,void 0,void 0,function*(){return yield tp(this,Z,"m",el).call(this,()=>tw(this,void 0,void 0,function*(){tm(this,J,!1,"f"),tm(this,en,void 0,"f"),tm(this,et,void 0,"f"),yield tp(this,G,"f").features["standard:disconnect"].disconnect(),this.emit
vendor: 6,539 bytes, line 137
137("disconnect")}))})}signIn(e){return tw(this,void 0,void 0,function*(){return tp(this,Z,"m",el).call(this,()=>tw(this,void 0,void 0,function*(){var t;if(tp(this,X,"f")!==o.Installed&&tp(this,X,"f")!==o.Loadable)throw new e_.AE;tm(this,J,!0,"f");try{let n=yield tp(this,G,"f").features[ez].signIn(Object.assign(Object.assign({},e),{domain:null!=(t=null==e?void 0:e.domain)?t:window.location.host}));if(n.length>0)return n[0];throw Error("Sign in failed, no sign in result returned by wallet")}catch(e){throw new e_.Y6(e instanceof Error&&e.message||"Unknown error",e)}finally{tm(this,J,!1,"f")}}))})}signMessage(e){return tw(this,void 0,void 0,function*(){return yield tp(this,Z,"m",el).call(this,()=>tw(this,void 0,void 0,function*(){let t=tp(this,Z,"m",ea).call(this);try{return(yield tp(this,G,"f").features[eP.F].signMessage({account:t,message:e}))[0].signature}catch(e){throw new e_.K3(null==e?void 0:e.message,e)}}))})}sendTransaction(e,t,n){return tw(this,void 0,void 0,function*(){return yield tp(this,Z,"m",el).call(this,()=>tw(this,void 0,void 0,function*(){let i=tp(this,Z,"m",ea).call(this);try{if(eU.R in tp(this,G,"f").features){let t=tv(tp(this,G,"f").currentAuthorization.chain),[r]=(yield tp(this,G,"f").features[eU.R].signAndSendTransaction({account:i,transaction:e.serialize(),chain:t,options:n?{skipPreflight:n.skipPreflight,maxRetries:n.maxRetries}:void 0})).map(e=>ty(e.signature));return r}{let[i]=yield tp(this,Z,"m",eo).call(this,[e]);if("version"in i)return yield t.sendTransaction(i);{let e=i.serialize();return yield t.sendRawTransaction(e,Object.assign(Object.assign({},n),{preflightCommitment:function(){let e,i;switch(t.commitment){case"confirmed":case"finalized":case"processed":e=t.commitment;break;default:e="finalized"}switch(null==n?void 0:n.preflightCommitment){case"confirmed":case"finalized":case"processed":i=n.preflightCommitment;break;case void 0:i=e;break;default:i="finalized"}let r="finalized"===i?2:+("confirmed"===i),s="finalized"===e?2:+("confirmed"===e);return r<s?i:e}()}))}}}catch(e){throw new e_.UF(null==e?void 0:e.message,e)}}))})}signTransaction(e){return tw(this,void 0,void 0,function*(){return yield tp(this,Z,"m",el).call(this,()=>tw(this,void 0,void 0,function*(){let[t]=yield tp(this,Z,"m",eo).call(this,[e]);return t}))})}signAllTransactions(e){return tw(this,void 0,void 0,function*(){return yield tp(this,Z,"m",el).call(this,()=>tw(this,void 0,void 0,function*(){return yield tp(this,Z,"m",eo).call(this,e)}))})}}G=new WeakMap,J=new WeakMap,X=new WeakMap,ee=new WeakMap,et=new WeakMap,en=new WeakMap,ei=new WeakMap,Z=new WeakSet,er=function(e=!1){return tw(this,void 0,void 0,function*(){if(!this.connecting&&!this.connected)return yield tp(this,Z,"m",el).call(this,()=>tw(this,void 0,void 0,function*(){if(tp(this,X,"f")!==o.Installed&&tp(this,X,"f")!==o.Loadable)throw new e_.AE;tm(this,J,!0,"f");try{yield tp(this,G,"f").features[tg].connect({silent:e})}catch(e){throw new e_.Y6(e instanceof Error&&e.message||"Unknown error",e)}finally{tm(this,J,!1,"f")}}))})},es=function(){tp(this,X,"f")!==o.Installed&&this.emit("readyStateChange",tm(this,X,o.Installed,"f"))},ea=function(){if(!tp(this,G,"f").isAuthorized||!tp(this,et,"f"))throw new e_.kW;return tp(this,et,"f")},eo=function(e){return tw(this,void 0,void 0,function*(){let t=tp(this,Z,"m",ea).call(this);try{if(eN.q in tp(this,G,"f").features)return tp(this,G,"f").features[eN.q].signTransaction(...e.map(e=>({account:t,transaction:e.serialize()}))).then(e=>e.map(e=>{let t=e.signedTransaction,n=t[0],i=ej.VersionedMessage.deserializeMessageVersion(t.slice(64*n+1,t.length));return"legacy"===i?ej.Transaction.from(t):ej.VersionedTransaction.deserialize(t)}));throw Error("Connected wallet does not support signing transactions")}catch(e){throw new e_.z4(null==e?void 0:e.message,e)}})},el=function(e){return tw(this,void 0,void 0,function*(){try{return yield e()}catch(e){throw this.emit("error",e),e}})};class tE extends tb{constructor(e){var t;const n=tv(null!=(t=e.chain)?t:e.cluster);super(new tc({appIdentity:e.appIdentity,authorizationCache:{set:e.authorizationResultCache.set,get:()=>tw(this,void 0,void 0,function*(){return yield e.authorizationResultCache.get()}),clear:e.authorizationResultCache.clear},chains:[n],chainSelector:{select(e){return e7(this,void 0,void 0,function*(){return 1===e.length?e[0]:e.includes(e3)?e3:e[0]})}},onWalletNotFound:()=>tw(this,void 0,void 0,function*(){e.onWalletNotFound(this)})}),{addressSelector:e.addressSelector,chain:n})}}class tM extends tE{}function tk(e){return tw(this,void 0,void 0,function*(){return function(){return e7(this,void 0,void 0,function*(){if("u">typeof window){let e=window.navigator.userAgent.toLowerCase(),t=new td;e.includes("wv")?t.initWithError({name:"SolanaMobileWalletAdapterError",code:"ERROR_BROWSER_NOT_SUPPORTED",message:""}):t.initWithError({name:"SolanaMobileWalletAdapterError",code:"ERROR_WALLET_NOT_FOUND",message:""}),t.open()}})}()})}let tT=n(84076).Z;var tW=n(23871);new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap;var tS=n(25558),tx=function(e,t,n,i){if("a"===n&&!i)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},tI=function(e,t,n,i,r){if("m"===i)throw TypeError("Private method is not writable");if("a"===i&&!r)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n};class t_ extends eC{get name(){return tx(this,em,"f").name}get url(){return"https://github.com/solana-labs/wallet-standard"}get icon(){return tx(this,em,"f").icon}get readyState(){return tx(this,eg,"f")}get publicKey(){return tx(this,eu,"f")}get connecting(){return tx(this,eh,"f")}get supportedTransactionVersions(){return tx(this,ep,"f")}get wallet(){return tx(this,em,"f")}get standard(){return!0}constructor({wallet:e}){super(),ec.add(this),ed.set(this,void 0),eu.set(this,void 0),eh.set(this,void 0),ef.set(this,void 0),ew.set(this,void 0),ep.set(this,void 0),em.set(this,void 0),eg.set(this,"u"<typeof window||"u"<typeof document?o.Unsupported:o.Installed),eM.set(this,e=>{if("accounts"in e){let e=tx(this,em,"f").accounts[0];tx(this,ed,"f")&&!tx(this,ef,"f")&&e!==tx(this,ed,"f")&&(e?tx(this,ec,"m",ev).call(this,e):(this.emit
137("error",new e_.PQ),tx(this,ec,"m",eb).call(this)))}"features"in e&&tx(this,ec,"m",eE).call(this)}),tI(this,em,e,"f"),tI(this,ed,null,"f"),tI(this,eu,null,"f"),tI(this,eh,!1,"f"),tI(this,ef,!1,"f"),tI(this,ew,tx(this,em,"f").features[e6.j].on("change",tx(this,eM,"f")),"f"),tx(this,ec,"m",eE).call(this)}destroy(){tI(this,ed,null,"f"),tI(this,eu,null,"f"),tI(this,eh,!1,"f"),tI(this,ef,!1,"f");let e=tx(this,ew,"f");e&&(tI(this,ew,null,"f"),e())}async autoConnect(){return tx(this,ec,"m",ey).call(this,{silent:!0})}async connect(){return tx(this,ec,"m",ey).call(this)}async disconnect(){if(e4.w in tx(this,em,"f").features)try{tI(this,ef,!0,"f"),await tx(this,em,"f").features[e4.w].disconnect()}catch(e){this.emit("error",new e_.Y8(e?.message,e))}finally{tI(this,ef,!1,"f")}tx(this,ec,"m",eb).call(this)}async sendTransaction(e,t,n={}){try{var i;let r,s=tx(this,ed,"f");if(!s)throw new e_.kW;if(eU.R in tx(this,em,"f").features)if(s.features.includes(eU.R))r=eU.R;else if(eN.q in tx(this,em,"f").features&&s.features.includes(eN.q))r=eN.q;else throw new e_.fk;else if(eN.q in tx(this,em,"f").features){if(!s.features.includes(eN.q))throw new e_.fk;r=eN.q}else throw new e_.Ez;let a=(i=t.rpcEndpoint).includes("https://api.mainnet-beta.solana.com")?e3:/\bdevnet\b/i.test(i)?"solana:devnet":/\btestnet\b/i.test(i)?"solana:testnet":/\blocalhost\b/i.test(i)||/\b127\.0\.0\.1\b/.test(i)?"solana:localnet":e3;if(!s.chains.includes(a))throw new e_.UF;try{let i,{signers:o,...l}=n;if((0,eA.Y)(e)?(o?.length&&e.sign(o),i=e.serialize()):(e=await this.prepareTransaction(e,t,l),o?.length&&e.partialSign(...o),i=new Uint8Array(e.serialize({requireAllSignatures:!1,verifySignatures:!1}))),r===eU.R){let[e]=await tx(this,em,"f").features[eU.R].signAndSendTransaction({account:s,chain:a,transaction:i,options:{preflightCommitment:(0,tW.i)(l.preflightCommitment||t.commitment),skipPreflight:l.skipPreflight,maxRetries:l.maxRetries,minContextSlot:l.minContextSlot}});return tS.A.encode(e.signature)}{let[e]=await tx(this,em,"f").features[eN.q].signTransaction({account:s,chain:a,transaction:i,options:{preflightCommitment:(0,tW.i)(l.preflightCommitment||t.commitment),minContextSlot:l.minContextSlot}});return await t.sendRawTransaction(e.signedTransaction,{...l,preflightCommitment:(0,tW.i)(l.preflightCommitment||t.commitment)})}}catch(e){if(e instanceof e_.m7)throw e;throw new e_.UF(e?.message,e)}}catch(e){throw this.emit("error",e),e}}}ed=new WeakMap,eu=new WeakMap,eh=new WeakMap,ef=new WeakMap,ew=new WeakMap,ep=new WeakMap,em=new WeakMap,eg=new WeakMap,eM=new WeakMap,ec=new WeakSet,ey=async function(e){try{if(this.connected||this.connecting)return;if(tx(this,eg,"f")!==o.Installed)throw new e_.AE;if(tI(this,eh,!0,"f"),!tx(this,em,"f").accounts.length)try{await tx(this,em,"f").features[e2.u].connect(e)}catch(e){throw new e_.Y6(e?.message,e)}let t=tx(this,em,"f").accounts[0];if(!t)throw new e_.fk;tx(this,ec,"m",ev).call(this,t)}catch(e){throw this.emit("error",e),e}finally{tI(this,eh,!1,"f")}},ev=function(e){let t;try{t=new ej.PublicKey(e.address)}catch(e){throw new e_.Kd(e?.message,e)}tI(this,ed,e,"f"),tI(this,eu,t,"f"),tx(this,ec,"m",eE).call(this),this.emit("connect",t)},eb=function(){tI(this,ed,null,"f"),tI(this,eu,null,"f"),tx(this,ec,"m",eE).call(this),this.emit("disconnect")},eE=function(){let e=eU.R in tx(this,em,"f").features?tx(this,em,"f").features[eU.R].supportedTransactionVersions:tx(this,em,"f").features[eN.q].supportedTransactionVersions;tI(this,ep,!function(e,t){if(e===t)return!0;let n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}(e,["legacy"])?new Set(e):null,"f"),eN.q in tx(this,em,"f").features&&tx(this,ed,"f")?.features.includes(eN.q)?(this.signTransaction=tx(this,ec,"m",ek),this.signAllTransactions=tx(this,ec,"m",eT)):(delete this.signTransaction,delete this.signAllTransactions),eP.F in tx(this,em,"f").features&&tx(this,ed,"f")?.features.includes(eP.F)?this.signMessage=tx(this,ec,"m",eW):delete this.signMessage,ez in tx(this,em,"f").features?this.signIn=tx(this,ec,"m",eS):delete this.signIn},ek=async function(e){try{let t=tx(this,ed,"f");if(!t)throw new e_.kW;if(!(eN.q in tx(this,em,"f").features))throw new e_.Ez;if(!t.features.includes(eN.q))throw new e_.fk;try{let n=(await tx(this,em,"f").features[eN.q].signTransaction({account:t,transaction:(0,eA.Y)(e)?e.serialize():new Uint8Array(e.serialize({requireAllSignatures:!1,verifySignatures:!1}))}
vendor: 8,314 bytes, line 137
137))[0].signedTransaction;return(0,eA.Y)(e)?ej.VersionedTransaction.deserialize(n):ej.Transaction.from(n)}catch(e){if(e instanceof e_.m7)throw e;throw new e_.z4(e?.message,e)}}catch(e){throw this.emit("error",e),e}},eT=async function(e){try{let t=tx(this,ed,"f");if(!t)throw new e_.kW;if(!(eN.q in tx(this,em,"f").features))throw new e_.Ez;if(!t.features.includes(eN.q))throw new e_.fk;try{let n=await tx(this,em,"f").features[eN.q].signTransaction(...e.map(e=>({account:t,transaction:(0,eA.Y)(e)?e.serialize():new Uint8Array(e.serialize({requireAllSignatures:!1,verifySignatures:!1}))})));return e.map((e,t)=>{let i=n[t].signedTransaction;return(0,eA.Y)(e)?ej.VersionedTransaction.deserialize(i):ej.Transaction.from(i)})}catch(e){throw new e_.z4(e?.message,e)}}catch(e){throw this.emit("error",e),e}},eW=async function(e){try{let t=tx(this,ed,"f");if(!t)throw new e_.kW;if(!(eP.F in tx(this,em,"f").features))throw new e_.Ez;if(!t.features.includes(eP.F))throw new e_.fk;try{return(await tx(this,em,"f").features[eP.F].signMessage({account:t,message:e}))[0].signature}catch(e){throw new e_.K3(e?.message,e)}}catch(e){throw this.emit("error",e),e}},eS=async function(e={}){try{let t;if(!(ez in tx(this,em,"f").features))throw new e_.Ez;try{[t]=await tx(this,em,"f").features[ez].signIn(e)}catch(e){throw new e_.o7(e?.message,e)}if(!t)throw new e_.o7;return tx(this,ec,"m",ev).call(this,t.account),t}catch(e){throw this.emit("error",e),e}};var tC=n(85402),tA=n(6249);function tR(e){let t=(0,tA.useRef)(void 0);return void 0===t.current&&(t.current={value:e()}),t.current.value}function tO(e){return e.filter(tT).map(e=>new t_({wallet:e}))}(a=ex||(ex={}))[a.DESKTOP_WEB=0]="DESKTOP_WEB",a[a.MOBILE_WEB=1]="MOBILE_WEB";var tL=n(434);class tj extends e_.m7{constructor(){super(...arguments),this.name="WalletNotSelectedError"}}var tz=n(72291);function tP({children:e,wallets:t,adapter:n,isUnloadingRef:i,onAutoConnectRequest:r,onConnectError:s,onError:a,onSelectWallet:l}){let c=(0,tA.useRef)(!1),[d,u]=(0,tA.useState)(!1),h=(0,tA.useRef)(!1),[f,w]=(0,tA.useState)(!1),[p,m]=(0,tA.useState)(()=>n?.publicKey??null),[g,y]=(0,tA.useState)(()=>n?.connected??!1),v=(0,tA.useRef)(a);(0,tA.useEffect)(()=>(v.current=a,()=>{v.current=void 0}),[a]);let b=(0,tA.useRef)((e,t)=>(!i.current&&(v.current?v.current(e,t):(console.error(e,t),e instanceof e_.AE&&"u">typeof window&&t&&window.open(t.url,"_blank"))),e)),[E,M]=(0,tA.useState)(()=>t.map(e=>({adapter:e,readyState:e.readyState})).filter(({readyState:e})=>e!==o.Unsupported));(0,tA.useEffect)(()=>{function e(e){M(t=>{let n=t.findIndex(({adapter:e})=>e===this);if(-1===n)return t;let{adapter:i}=t[n];return[...t.slice(0,n),{adapter:i,readyState:e},...t.slice(n+1)].filter(({readyState:e})=>e!==o.Unsupported)})}return M(e=>t.map((t,n)=>{let i=e[n];return i&&i.adapter===t&&i.readyState===t.readyState?i:{adapter:t,readyState:t.readyState}}).filter(({readyState:e})=>e!==o.Unsupported)),t.forEach(t=>t.on("readyStateChange",e,t)),()=>{t.forEach(t=>t.off("readyStateChange",e,t))}},[n,t]);let k=(0,tA.useMemo)(()=>E.find(e=>e.adapter===n)??null,[n,E]);(0,tA.useEffect)(()=>{if(!n)return;let e=e=>{m(e),c.current=!1,u(!1),y(!0),h.current=!1,w(!1)},t=()=>{i.current||(m(null),c.current=!1,u(!1),y(!1),h.current=!1,w(!1))},r=e=>{b.current(e,n)};return n.on("connect",e),n.on("disconnect",t),n.on("error",r),()=>{n.off("connect",e),n.off("disconnect",t),n.off("error",r),t()}},[n,i]);let T=(0,tA.useRef)(!1);(0,tA.useEffect)(()=>()=>{T.current=!1},[n]),(0,tA.useEffect)(()=>{T.current||c.current||g||!r||k?.readyState!==o.Installed&&k?.readyState!==o.Loadable||(c.current=!0,u(!0),T.current=!0,async function(){try{await r()}catch{s()}finally{u(!1),c.current=!1}}())},[g,r,s,k]);let W=(0,tA.useCallback)(async(e,t,i)=>{if(!n)throw b.current(new tj);if(!g)throw b.current(new e_.kW,n);return await n.sendTransaction(e,t,i)},[n,g]),S=(0,tA.useMemo)(()=>n&&"signTransaction"in n?async e=>{if(!g)throw b.current(new e_.kW,n);return await n.signTransaction(e)}:void 0,[n,g]),x=(0,tA.useMemo)(()=>n&&"signAllTransactions"in n?async e=>{if(!g)throw b.current(new e_.kW,n);return await n.signAllTransactions(e)}:void 0,[n,g]),I=(0,tA.useMemo)(()=>n&&"signMessage"in n?async e=>{if(!g)throw b.current(new e_.kW,n);return await n.signMessage(e)}:void 0,[n,g]),_=(0,tA.useMemo)(()=>n&&"signIn"in n?async e=>await n.signIn(e):void 0,[n]),C=(0,tA.useCallback)(async()=>{if(c.current||h.current||k?.adapter.connected)return;if(!k)throw b.current(new tj);let{adapter:e,readyState:t}=k;if(t!==o.Installed&&t!==o.Loadable)throw b.current(new e_.AE,e);c.current=!0,u(!0);try{await e.connect()}catch(e){throw s(),e}finally{u(!1),c.current=!1}},[s,k]),A=(0,tA.useCallback)(async()=>{if(!h.current&&n){h.current=!0,w(!0);try{await n.disconnect()}finally{w(!1),h.current=!1}}},[n]);return tA.createElement(tz.b.Provider,{value:{autoConnect:!!r,wallets:E,wallet:k,publicKey:p,connected:g,connecting:d,disconnecting:f,select:l,connect:C,disconnect:A,sendTransaction:W,signTransaction:S,signAllTransactions:x,signMessage:I,signIn:_}},e)}function tU(e){return function({adapters:e,userAgentString:t}){return e.some(e=>e.name!==to&&e.readyState===o.Installed)?ex.DESKTOP_WEB:t&&/android/i.test(t)&&!/(WebView|Version\/.+(Chrome)\/(\d+)\.(\d+)\.(\d+)\.(\d+)|; wv\).+(Chrome)\/(\d+)\.(\d+)\.(\d+)\.(\d+))/i.test(t)?ex.MOBILE_WEB:ex.DESKTOP_WEB}({adapters:e,userAgentString:(void 0===r&&(r=globalThis.navigator?.userAgent??null),r)})===ex.MOBILE_WEB}function tN({children:e,wallets:t,autoConnect:n,localStorageKey:i="walletName",onError:r}){let s,a,o,{connection:l}=(0,tL.w)(),c=function(e){var t;let n,i=tR(()=>new Set),{get:r,on:s}=tR(()=>(0,tC.N)()),[a,o]=(0,tA.useState)(()=>tO(r()));(0,tA.useEffect)(()=>{let e=[s("register",(...e)=>o(t=>[...t,...tO(e)])),s("unregister",(...e)=>o(t=>t.filter(t=>e.some(e=>e===t.wallet))))];return()=>e.forEach(e=>e())},[s]);let l=(t=a,n=(0,tA.useRef)(void 0),(0,tA.useEffect)(()=>{n.current=t}),n.current);return(0,tA.useEffect)(()=>{if(!l)return;let e=new Set(a);new Set(l.filter(t=>!e.has(t))).forEach(e=>e.destroy())},[l,a]),(0,tA.useEffect)(()=>()=>a.forEach(e=>e.destroy()),[]),(0,tA.useMemo)(()=>[...a,...e.filter(({name:e})=>!a.some(t=>t.name===e)||(i.has(e)||(i.add(e),console.warn(`${e} was registered as a Standard Wallet. The Wallet Adapter for ${e} can be removed from your app.`)),!1))],[a,e,i])}(t),d=(0,tA.useMemo)(()=>{var e;if(!tU(c))return null;let t=c.find(e=>e.name===to);return t?t:new tM({addressSelector:{select(e){return tw(this,void 0,void 0,function*(){return e[0]})}},appIdentity:{uri:function(){let e=globalThis.location;if(e)return`${e.protocol}//${e.host}`}()},authorizationResultCache:function(){let e;try{e=window.localStorage}catch(e){}return{clear(){return e7(this,void 0,void 0,function*(){if(e)try{e.removeItem(tf)}catch(e){}})},get(){return e7(this,void 0,void 0,function*(){if(e)try{let t=JSON.parse(e.getItem(tf));if(!t||!t.accounts)return t||void 0;{let e=t.accounts.map(e=>Object.assign(Object.assign({},e),{publicKey:"publicKey"in e?new Uint8Array(Object.values(e.publicKey)):e8.decode(e.address)}));return Object.assign(Object.assign({},t),{accounts:e})}}catch(e){}})},set(t){return e7(this,void 0,void 0,function*(){if(e)try{e.setItem(tf,JSON.stringify(t))}catch(e){}})}}}(),cluster:(e=l?.rpcEndpoint)?/devnet/i.test(e)?"devnet":/testnet/i.test(e)?"testnet":"mainnet-beta":"mainnet-beta",onWalletNotFound:tk})},[c,l?.rpcEndpoint]),u=(0,tA.useMemo)(()=>null==d||-1!==c.indexOf(d)?c:[d,...c],[c,d]),[h,f]=(a=(s=(0,tA.useState)(()=>{try{let e=localStorage.getItem(i);if(e)return JSON.parse(e)}catch(e){"u">typeof window&&console.error(e)}return null}))[0],o=(0,tA.useRef)(!0),(0,tA.useEffect)(()=>{if(o.current){o.current=!1;return}try{null===a?localStorage.removeItem(i):localStorage.setItem(i,JSON.stringify(a))}catch(e){"u">typeof window&&console.error(e)}},[a,i]),s),w=(0,tA.useMemo)(()=>u.find(e=>e.name===h)??null,[u,h]),p=(0,tA.useCallback)(e=>{h!==e&&(w&&w.name!==to&&w.disconnect(),f(e))},[w,f,h]);(0,tA.useEffect)(()=>{if(w)return w.on("disconnect",e),()=>{w.off("disconnect",e)};function e(){y.current||f(null)}},[w,c,f,h]);let m=(0,tA.useRef)(!1),g=(0,tA.useMemo)(()=>{if(n&&w)return async()=>{(!0===n||await n(w))&&(m.current?await w.connect():await w.autoConnect())}},[n,w]),y=(0,tA.useRef)(!1);(0,tA.useEffect)(()=>
137{if(h===to&&tU(c)){y.current=!1;return}function e(){y.current=!0}return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}},[c,h]);let v=(0,tA.useCallback)(()=>{w&&p(null)},[w,p]),b=(0,tA.useCallback)(e=>{m.current=!0,p(e)},[p]);return tA.createElement(tP,{wallets:u,adapter:w,isUnloadingRef:y,onAutoConnectRequest:g,onConnectError:v,onError:r,onSelectWallet:b},e)}},72291:(e,t,n)=>{"use strict";n.d(t,{b:()=>o,v:()=>l});var i=n(6249);let r=[],s={autoConnect:!1,connecting:!1,connected:!1,disconnecting:!1,select(){a("call","select")},connect:()=>Promise.reject(a("call","connect")),disconnect:()=>Promise.reject(a("call","disconnect")),sendTransaction:()=>Promise.reject(a("call","sendTransaction")),signTransaction:()=>Promise.reject(a("call","signTransaction")),signAllTransactions:()=>Promise.reject(a("call","signAllTransactions")),signMessage:()=>Promise.reject(a("call","signMessage")),signIn:()=>Promise.reject(a("call","signIn"))};function a(e,t){let n=Error(`You have tried to ${e} "${t}" on a WalletContext without providing one. Make sure to render a WalletProvider as an ancestor of the component that uses WalletContext.`);return console.error(n),n}Object.defineProperty(s,"wallets",{get:()=>(a("read","wallets"),r)}),Object.defineProperty(s,"wallet",{get:()=>(a("read","wallet"),null)}),Object.defineProperty(s,"publicKey",{get:()=>(a("read","publicKey"),null)});let o=(0,i.createContext)(s);function l(){return(0,i.useContext)(o)}},84076:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(63726),r=n(14477),s=n(95552),a=n(19355);function o(e){return s.u in e.features&&a.j in e.features&&(i.R in e.features||r.q in e.features)}},85402:(e,t,n)=>{"use strict";let i,r;n.d(t,{N:()=>m,d:()=>d});var s,a=function(e,t,n,i){if("a"===n&&!i)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},o=function(e,t,n,i,r){if("m"===i)throw TypeError("Private method is not writable");if("a"===i&&!r)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n};let l=new Set,c={};function d(){if(r||(r=Object.freeze({register:u,get:h,on:f}),"u"<typeof window))return r;let e=Object.freeze({register:u});try{window.addEventListener("wallet-standard:register-wallet",({detail:t})=>t(e))}catch(e){console.error("wallet-standard:register-wallet event listener could not be added\n",e)}try{window.dispatchEvent(new p(e))}catch(e){console.error("wallet-standard:app-ready event could not be dispatched\n",e)}return r}function u(...e){return(e=e.filter(e=>!l.has(e))).length?(e.forEach(e=>{i=void 0,l.add(e)}),c.register?.forEach(t=>w(()=>t(...e))),function(){e.forEach(e=>{i=void 0,l.delete(e)}),c.unregister?.forEach(t=>w(()=>t(...e)))}):()=>{}}function h(){return i||(i=[...l]),i}function f(e,t){return c[e]?.push(t)||(c[e]=[t]),function(){c[e]=c[e]?.filter(e=>t!==e)}}function w(e){try{e()}catch(e){console.error(e)}}
137class p extends Event{get detail(){return a(this,s,"f")}get type(){return"wallet-standard:app-ready"}constructor(e){super("wallet-standard:app-ready",{bubbles:!1,cancelable:!1,composed:!1}),s.set(this,void 0),o(this,s,e,"f")}preventDefault(){throw Error("preventDefault cannot be called")}stopImmediatePropagation(){throw Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw Error("stopPropagation cannot be called")}}function m(){if(r||(r=d(),"u"<typeof window))return r;let e=window.navigator.wallets||[];if(!Array.isArray(e))return console.error("window.navigator.wallets is not an array"),r;let{register:t}=r,n=(...e)=>e.forEach(e=>w(()=>e({register:t})));try{Object.defineProperty(window.navigator,"wallets",{value:Object.freeze({push:n})})}catch(e){return console.error("window.navigator.wallets could not be set"),r}return n(...e),r}s=new WeakMap},89046:(e,t,n)=>{let i=n(18579);t.render=function(e,t,n){var r;let s=n,a=t;void 0!==s||t&&t.getContext||(s=t,t=void 0),t||(a=function(){try{return document.createElement("canvas")}catch(e){throw Error("You need to specify a canvas element")}}()),s=i.getOptions(s);let o=i.getImageWidth(e.modules.size,s),l=a.getContext("2d"),c=l.createImageData(o,o);return i.qrToImageData(c.data,e,s),r=a,l.clearRect(0,0,r.width,r.height),r.style||(r.style={}),r.height=o,r.width=o,r.style.height=o+"px",r.style.width=o+"px",l.putImageData(c,0,0),a},t.renderToDataURL=function(e,n,i){let r=i;void 0!==r||n&&n.getContext||(r=n,n=void 0),r||(r={});let s=t.render(e,n,r),a=r.type||"image/png",o=r.rendererOpts||{};return s.toDataURL(a,o.quality)}}
137,95552:(e,t,n)=>{"use strict";n.d(t,{u:()=>i});let i="standard:connect"}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.