@privy-io/react-auth 1.5.0-beta.11 → 1.5.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -195,6 +195,18 @@ interface PrivyInterface {
195
195
  * For users who are authenticated, opens the Privy modal and prompts the user to link a wallet.
196
196
  */
197
197
  linkWallet: () => void;
198
+ /**
199
+ * For users who are authenticated, opens the Privy modal and prompts the user to link google OAuth account
200
+ */
201
+ linkGoogle: () => void;
202
+ /**
203
+ * For users who are authenticated, opens the Privy modal and prompts the user to link twitter OAuth account
204
+ */
205
+ linkTwitter: () => void;
206
+ /**
207
+ * For users who are authenticated, opens the Privy modal and prompts the user to link discord OAuth account
208
+ */
209
+ linkDiscord: () => void;
198
210
  /**
199
211
  * Log the current user out and clears their authentication state. `authenticated` will become false, `user` will become null, and the Privy Auth tokens will be deleted from the browser's local storage.
200
212
  *
package/dist/index.esm.js CHANGED
@@ -1,15 +1,15 @@
1
- import{useEffect as t2,useState as l1}from"react";import i2 from"axios";import C3 from"axios";var G=class extends Error{constructor(l,i){super(l);i instanceof Error&&(this.cause=i)}toString(){return`${this.type}: ${this.message}`}},y1=class extends G{constructor(l,i,o,n){super(o,n);this.type=l;this.status=i}},f=class extends G{constructor(l,i){super(l,i);this.type="client_error"}};var I=class extends G{constructor(l,i){super(l,i);this.type="connector_error"}},R=a=>{if(!C3.isAxiosError(a))return V(a);if(!a.response)return new y1("api_error",null,a.message,a);let{type:e,message:l,error:i}=a.response.data;return new y1(e||"ApiError",a.response.status,l||i,a)},V=a=>a instanceof G?a:a instanceof Error?new f(a.message,a):new f(`Internal error: ${a}`);var L1=class{constructor(e,l,i){this.appId=e,this.session=l,this.defaults=i}async get(e,l){try{return await i2.get(e,this.buildConfig({headers:{"Cache-Control":"no-cache"},...l}))}catch(i){throw R(i)}}async post(e,l,i){try{return await i2.post(e,l,this.buildConfig(i))}catch(o){throw R(o)}}async delete(e,l){try{return await i2.delete(e,this.buildConfig(l))}catch(i){throw R(i)}}buildConfig(e){return e=e||{},e.headers=e.headers||{},e.headers["privy-app-id"]=this.appId,this.session.token!==null&&(e.headers.authorization=`Bearer ${this.session.token}`),{...this.defaults,...e}}};var O2="https://api.privy.io/v0",D2=process.env.NEXT_PUBLIC_PRIVY_AUTH_URL||"https://auth.privy.io",o2="70f97dc579834350a5baec117b3c5ae3",U2=1e4,z=1200,F2=3e4;import s3 from"jwt-decode";var i1=class{static parse(e){try{return new i1(e)}catch{return null}}constructor(e){this.value=e,this._decoded=s3(e)}get subject(){return this._decoded.sub}get expiration(){return this._decoded.exp}isExpired(e=0){let l=Date.now(),i=(this.expiration-e)*1e3;return l>=i}};var o1=class{constructor(e){this.promise=null;this.fn=e}execute(e){return this.promise===null&&(this.promise=(async()=>{try{return await this.fn(e)}finally{this.promise=null}})()),this.promise}};var r2=class{constructor(){this._cache={}}get(e){return this._cache[e]}put(e,l){l!==void 0?this._cache[e]=l:this.del(e)}del(e){delete this._cache[e]}},n2=class{get(e){let l=localStorage.getItem(e);return l===null?void 0:JSON.parse(l)}put(e,l){l!==void 0?localStorage.setItem(e,JSON.stringify(l)):this.del(e)}del(e){localStorage.removeItem(e)}};function d3(){return typeof window<"u"&&window.localStorage?new n2:new r2}var N=d3();var c3=a=>{var e;return(e=a.map(l=>{if(l.type==="wallet")return{address:l.address,type:l.type,verifiedAt:new Date(l.verified_at*1e3),chainType:l.chain_type}}).filter(l=>l))==null?void 0:e[0]},p3=a=>{var e;return(e=a.map(l=>{if(l.type==="email")return{address:l.address,type:l.type,verifiedAt:new Date(l.verified_at*1e3)}}).filter(l=>l))==null?void 0:e[0]},h3=a=>{var e;return(e=a.map(l=>{if(l.type==="google_oauth")return{subject:l.subject,email:l.email,name:l.name,type:l.type,verifiedAt:new Date(l.verified_at*1e3)}}).filter(l=>l))==null?void 0:e[0]},f3=a=>{var e;return(e=a.map(l=>{if(l.type==="twitter_oauth")return{subject:l.subject,username:l.username,name:l.name,type:l.type,verifiedAt:new Date(l.verified_at*1e3)}}).filter(l=>l))==null?void 0:e[0]},u3=a=>{var e;return(e=a.map(l=>{if(l.type==="discord_oauth")return{subject:l.subject,username:l.username,email:l.email,type:l.type,verifiedAt:new Date(l.verified_at*1e3)}}).filter(l=>l))==null?void 0:e[0]};function r1(a){if(!a)return null;let e=p3(a.linked_accounts),l=c3(a.linked_accounts),i=h3(a.linked_accounts),o=f3(a.linked_accounts),n=u3(a.linked_accounts);return{id:a.id,createdAt:new Date(a.created_at*1e3),linkedAccounts:[...l?[l]:[],...e?[e]:[],...i?[i]:[],...o?[o]:[],...n?[n]:[]],email:e&&{address:e==null?void 0:e.address},wallet:l&&{address:l.address,chainType:l.chainType,chainId:l.chainId,walletType:l.walletType},google:i&&{subject:i.subject,email:i.email,name:i.name},twitter:o&&{subject:o.subject,username:o.username,name:o.name},discord:n&&{subject:n.subject,username:n.username,email:n.email}}}var V2=()=>"/api/v1/sessions",H2=()=>"/api/v1/sessions/logout",B2=()=>"/api/v1/siwe/init",G2=()=>"/api/v1/siwe/authenticate",z2=()=>"/api/v1/passwordless/init",j2=()=>"/api/v1/passwordless/authenticate",$2=()=>"/api/v1/oauth/init",q2=()=>"/api/v1/oauth/authenticate",K2=()=>"/api/v1/siwe/unlink",Y2=()=>"/api/v1/passwordless/unlink";var m3=30,C2="privy:token",s2="privy:refresh_token",v1=class{constructor(){this.authenticateOnce=new o1(async e=>this._authenticate(e)),this.refreshOnce=new o1(this._refresh.bind(this)),this.destroyOnce=new o1(this._destroy.bind(this))}get token(){let e=N.get(C2);return typeof e=="string"?e:null}get refreshToken(){let e=N.get(s2);return typeof e=="string"?e:null}hasRefreshCredentials(){return typeof this.token=="string"&&typeof this.refreshToken=="string"}hasActiveToken(){let e=i1.parse(this.token);return e!==null&&!e.isExpired(m3)}authenticate(e){return this.authenticateOnce.execute(e)}refresh(){return this.refreshOnce.execute()}destroy(){return this.destroyOnce.execute()}async _authenticate(e){try{let{token:l,refresh_token:i,user:o}=await e.authenticate();return l&&this.storeToken(l),i&&this.storeRefreshToken(i),r1(o)}catch(l){throw console.warn("Error authenticating session"),V(l)}}async _refresh(){if(!this.api)throw new f("Session has no API instance");let e=this.token,l=this.refreshToken;if(!e||!l)return null;try{let i=await this.api.post(V2(),{refresh_token:l});return this.storeToken(i.data.token),this.storeRefreshToken(i.data.refresh_token),r1(i.data.user)}catch(i){throw V(i)}}async _destroy(){var e;try{await((e=this.api)==null?void 0:e.post(H2(),{})),this.destroyLocalState()}catch(l){throw console.warn("Error destroying session"),V(l)}}destroyLocalState(){this.storeToken(null),this.storeRefreshToken(null)}storeToken(e){typeof e=="string"?N.put(C2,e):N.del(C2)}storeRefreshToken(e){typeof e=="string"?N.put(s2,e):N.del(s2)}};import{getAddress as w3}from"@ethersproject/address";import X2 from"@walletconnect/web3-provider";var n1=class{constructor(e){this.removeListener=(e,l)=>{if(this._provider)return this._provider.removeListener(e,l)};this.setProvider=e=>{this._provider=e,this._subscriptions.forEach(l=>{var i;(i=this._provider)==null||i.on(l.eventName,l.listener)})};this._provider=e,this._subscriptions=[]}on(e,l){if(this._provider)return this._provider.on(e,l);this._subscriptions.push({eventName:e,listener:l})}request(e){if(!this._provider)throw new I(`A wallet request of type ${e.method} was made to a disconnected wallet: `);return this._provider.request(e)}},C1=class extends n1{constructor(l){super(l)}},E1=class extends n1{constructor(e){super(e)}sendAsync(e,l){throw new Error("sendAsync is no longer supported by EIP-1193. Use the request method instead.")}};import{providers as Z3}from"ethers";var J2=["metamask","coinbase_wallet","wallet_connect"];import{ethers as b3}from"ethers";var x1=class extends I{constructor(){super("Wallet timeout");this.type="wallet_error"}},c2=a=>{if(a instanceof I)return a;if((a==null?void 0:a.code)&&(a==null?void 0:a.reason)){let e=new s1(a);return a.code===b3.errors.ACTION_REJECTED&&(e.details=J.E4001_USER_REJECTED_REQUEST),e}return a!=null&&a.code?new s1(a):new I("Unknown connector error",a)},d2=class extends G{constructor(l,i,o){super(l);this.type="provider_error";this.code=i,this.data=o}},s1=class extends d2{constructor(l){var n,p,m;let i=l;super(i.message,i.code,i.data);let o=Object.values(J).find(b=>b.eipCode===i.code);this.details=o||J.UNKNOWN_ERROR,i.code===-32002&&((n=i.message)!=null&&n.includes("already pending for origin")?(p=i.message)!=null&&p.includes("wallet_requestPermissions")?this.details=J.E32002_CONNECTION_ALREADY_PENDING:this.details=J.E32002_REQUEST_ALREADY_PENDING:(m=i.message)!=null&&m.includes("Already processing")&&i.message.includes("eth_requestAccounts")&&(this.details=J.E32002_WALLET_LOCKED))}},k3={ERROR_USER_EXISTS:{message:"User already exists for this address",detail:"Try another address!",retryable:!1},ERROR_TIMED_OUT:{message:"Could not log in with wallet",detail:"Please try connecting again.",retryable:!0},ERROR_WALLET_CONNECTION:{message:"Could not log in with wallet",detail:"Please try connecting again.",retryable:!0}},M3={E32002_CONNECTION_ALREADY_PENDING:{eipCode:-32002,message:"Connection request already pending",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E32002_REQUEST_ALREADY_PENDING:{eipCode:-32002,message:"Resource request already pending",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E32002_WALLET_LOCKED:{eipCode:-32002,message:"Wallet might be locked",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E4001_USER_REJECTED_REQUEST:{eipCode:4001,message:"Signature rejected",detail:"Please try signing again.",retryable:!0}},g3={E4001_DEFAULT_USER_REJECTED_REQUEST:{eipCode:4001,message:"User Rejected Request",detail:"The user rejected the request.",default:!0,retryable:!0},E4100_DEFAULT_UNAUTHORIZED:{eipCode:4100,message:"Unauthorized",detail:"The requested method and/or account has not been authorized by the user.",default:!0,retryable:!1},E4200_DEFAULT_UNSUPPORTED_METHOD:{eipCode:4200,message:"Unsupported Method",detail:"The Provider does not support the requested method.",default:!0,retryable:!1},E4900_DEFAULT_DISCONNECTED:{eipCode:4900,message:"Disconnected",detail:"The Provider is disconnected from all chains.",default:!0,retryable:!0},E4901_DEFAULT_CHAIN_DISCONNECTED:{eipCode:4901,message:"Chain Disconnected",detail:"The Provider is not connected to the requested chain.",default:!0,retryable:!0},E32700_DEFAULT_PARSE_ERROR:{eipCode:-32700,message:"Parse error",detail:"Invalid JSON",default:!0,retryable:!1},E32600_DEFAULT_INVALID_REQUEST:{eipCode:-32600,message:"Invalid request",detail:"JSON is not a valid request object",default:!0,retryable:!1},E32601_DEFAULT_METHOD_NOT_FOUND:{eipCode:-32601,message:"Method not found",detail:"Method does not exist",default:!0,retryable:!1},E32602_DEFAULT_INVALID_PARAMS:{eipCode:-32602,message:"Invalid params",detail:"Invalid method parameters",default:!0,retryable:!1},E32603_DEFAULT_INTERNAL_ERROR:{eipCode:-32603,message:"Internal error",detail:"Internal JSON-RPC error",default:!0,retryable:!0},E32000_DEFAULT_INVALID_INPUT:{eipCode:-32e3,message:"Invalid input",detail:"Missing or invalid parameters",default:!0,retryable:!1},E32001_DEFAULT_RESOURCE_NOT_FOUND:{eipCode:-32001,message:"Resource not found",detail:"Requested resource not found",default:!0,retryable:!1},E32002_DEFAULT_RESOURCE_UNAVAILABLE:{eipCode:-32002,message:"Resource unavailable",detail:"Requested resource not available",default:!0,retryable:!0},E32003_DEFAULT_TRANSACTION_REJECTED:{eipCode:-32003,message:"Transaction rejected",detail:"Transaction creation failed",default:!0,retryable:!0},E32004_DEFAULT_METHOD_NOT_SUPPORTED:{eipCode:-32004,message:"Method not supported",detail:"Method is not implemented",default:!0,retryable:!1},E32005_DEFAULT_LIMIT_EXCEEDED:{eipCode:-32005,message:"Limit exceeded",detail:"Request exceeds defined limit",default:!0,retryable:!1},E32006_DEFAULT_JSON_RPC_VERSION_NOT_SUPPORTED:{eipCode:-32006,message:"JSON-RPC version not supported",detail:"Version of JSON-RPC protocol is not supported",default:!0,retryable:!1}},J={UNKNOWN_ERROR:{eipCode:0,message:"Unknown error",detail:"Unknown error",retryable:!0},...g3,...M3},p2={...k3,...J};var h2="privy:wallet_type",A1=(a=new x1,e=F2)=>new Promise((l,i)=>setTimeout(()=>{i(a)},e)),f2=()=>{if(!window.ethereum)return!1;if(window.ethereum.isMetaMask)return!0;if(window.ethereum.providers){for(let a of window.ethereum.providers)if(a.isMetaMask)return!0}return!1},u2=()=>{if(!window.ethereum)return!1;if(window.ethereum.isCoinbaseWallet)return!0;if(window.ethereum.providers){for(let a of window.ethereum.providers)if(a.isCoinbaseWallet)return!0}return!1},_1=class{constructor(){this.walletType=null;this.getEthereumProvider=()=>this.ethProvider;this.createSiweMessage=(e,l,i,o,n,p,m)=>`${i} wants you to sign in with your Ethereum account:
1
+ import{useEffect as t2,useState as l1}from"react";import i2 from"axios";import C3 from"axios";var G=class extends Error{constructor(l,i){super(l);i instanceof Error&&(this.cause=i)}toString(){return`${this.type}: ${this.message}`}},y1=class extends G{constructor(l,i,o,r){super(o,r);this.type=l;this.status=i}},u=class extends G{constructor(l,i){super(l,i);this.type="client_error"}};var R=class extends G{constructor(l,i){super(l,i);this.type="connector_error"}},W=a=>{if(!C3.isAxiosError(a))return V(a);if(!a.response)return new y1("api_error",null,a.message,a);let{type:e,message:l,error:i}=a.response.data;return new y1(e||"ApiError",a.response.status,l||i,a)},V=a=>a instanceof G?a:a instanceof Error?new u(a.message,a):new u(`Internal error: ${a}`);var L1=class{constructor(e,l,i){this.appId=e,this.session=l,this.defaults=i}async get(e,l){try{return await i2.get(e,this.buildConfig({headers:{"Cache-Control":"no-cache"},...l}))}catch(i){throw W(i)}}async post(e,l,i){try{return await i2.post(e,l,this.buildConfig(i))}catch(o){throw W(o)}}async delete(e,l){try{return await i2.delete(e,this.buildConfig(l))}catch(i){throw W(i)}}buildConfig(e){return e=e||{},e.headers=e.headers||{},e.headers["privy-app-id"]=this.appId,this.session.token!==null&&(e.headers.authorization=`Bearer ${this.session.token}`),{...this.defaults,...e}}};var O2="https://api.privy.io/v0",D2=process.env.NEXT_PUBLIC_PRIVY_AUTH_URL||"https://auth.privy.io",o2="70f97dc579834350a5baec117b3c5ae3",U2=1e4,z=1200,F2=3e4;import s3 from"jwt-decode";var i1=class{static parse(e){try{return new i1(e)}catch{return null}}constructor(e){this.value=e,this._decoded=s3(e)}get subject(){return this._decoded.sub}get expiration(){return this._decoded.exp}isExpired(e=0){let l=Date.now(),i=(this.expiration-e)*1e3;return l>=i}};var o1=class{constructor(e){this.promise=null;this.fn=e}execute(e){return this.promise===null&&(this.promise=(async()=>{try{return await this.fn(e)}finally{this.promise=null}})()),this.promise}};var r2=class{constructor(){this._cache={}}get(e){return this._cache[e]}put(e,l){l!==void 0?this._cache[e]=l:this.del(e)}del(e){delete this._cache[e]}},n2=class{get(e){let l=localStorage.getItem(e);return l===null?void 0:JSON.parse(l)}put(e,l){l!==void 0?localStorage.setItem(e,JSON.stringify(l)):this.del(e)}del(e){localStorage.removeItem(e)}};function d3(){return typeof window<"u"&&window.localStorage?new n2:new r2}var N=d3();var c3=a=>{var e;return(e=a.map(l=>{if(l.type==="wallet")return{address:l.address,type:l.type,verifiedAt:new Date(l.verified_at*1e3),chainType:l.chain_type}}).filter(l=>l))==null?void 0:e[0]},p3=a=>{var e;return(e=a.map(l=>{if(l.type==="email")return{address:l.address,type:l.type,verifiedAt:new Date(l.verified_at*1e3)}}).filter(l=>l))==null?void 0:e[0]},h3=a=>{var e;return(e=a.map(l=>{if(l.type==="google_oauth")return{subject:l.subject,email:l.email,name:l.name,type:l.type,verifiedAt:new Date(l.verified_at*1e3)}}).filter(l=>l))==null?void 0:e[0]},f3=a=>{var e;return(e=a.map(l=>{if(l.type==="twitter_oauth")return{subject:l.subject,username:l.username,name:l.name,type:l.type,verifiedAt:new Date(l.verified_at*1e3)}}).filter(l=>l))==null?void 0:e[0]},u3=a=>{var e;return(e=a.map(l=>{if(l.type==="discord_oauth")return{subject:l.subject,username:l.username,email:l.email,type:l.type,verifiedAt:new Date(l.verified_at*1e3)}}).filter(l=>l))==null?void 0:e[0]};function r1(a){if(!a)return null;let e=p3(a.linked_accounts),l=c3(a.linked_accounts),i=h3(a.linked_accounts),o=f3(a.linked_accounts),r=u3(a.linked_accounts);return{id:a.id,createdAt:new Date(a.created_at*1e3),linkedAccounts:[...l?[l]:[],...e?[e]:[],...i?[i]:[],...o?[o]:[],...r?[r]:[]],email:e&&{address:e==null?void 0:e.address},wallet:l&&{address:l.address,chainType:l.chainType,chainId:l.chainId,walletType:l.walletType},google:i&&{subject:i.subject,email:i.email,name:i.name},twitter:o&&{subject:o.subject,username:o.username,name:o.name},discord:r&&{subject:r.subject,username:r.username,email:r.email}}}var V2=()=>"/api/v1/sessions",H2=()=>"/api/v1/sessions/logout",B2=()=>"/api/v1/siwe/init",G2=()=>"/api/v1/siwe/authenticate",z2=()=>"/api/v1/passwordless/init",j2=()=>"/api/v1/passwordless/authenticate",$2=()=>"/api/v1/oauth/init",q2=()=>"/api/v1/oauth/authenticate",K2=()=>"/api/v1/siwe/unlink",Y2=()=>"/api/v1/passwordless/unlink";var m3=30,C2="privy:token",s2="privy:refresh_token",v1=class{constructor(){this.authenticateOnce=new o1(async e=>this._authenticate(e)),this.refreshOnce=new o1(this._refresh.bind(this)),this.destroyOnce=new o1(this._destroy.bind(this))}get token(){let e=N.get(C2);return typeof e=="string"?e:null}get refreshToken(){let e=N.get(s2);return typeof e=="string"?e:null}hasRefreshCredentials(){return typeof this.token=="string"&&typeof this.refreshToken=="string"}hasActiveToken(){let e=i1.parse(this.token);return e!==null&&!e.isExpired(m3)}authenticate(e){return this.authenticateOnce.execute(e)}refresh(){return this.refreshOnce.execute()}destroy(){return this.destroyOnce.execute()}async _authenticate(e){try{let{token:l,refresh_token:i,user:o}=await e.authenticate();return l&&this.storeToken(l),i&&this.storeRefreshToken(i),r1(o)}catch(l){throw console.warn("Error authenticating session"),V(l)}}async _refresh(){if(!this.api)throw new u("Session has no API instance");let e=this.token,l=this.refreshToken;if(!e||!l)return null;try{let i=await this.api.post(V2(),{refresh_token:l});return this.storeToken(i.data.token),this.storeRefreshToken(i.data.refresh_token),r1(i.data.user)}catch(i){throw V(i)}}async _destroy(){var e;try{await((e=this.api)==null?void 0:e.post(H2(),{})),this.destroyLocalState()}catch(l){throw console.warn("Error destroying session"),V(l)}}destroyLocalState(){this.storeToken(null),this.storeRefreshToken(null)}storeToken(e){typeof e=="string"?N.put(C2,e):N.del(C2)}storeRefreshToken(e){typeof e=="string"?N.put(s2,e):N.del(s2)}};import{getAddress as w3}from"@ethersproject/address";import X2 from"@walletconnect/web3-provider";var n1=class{constructor(e){this.removeListener=(e,l)=>{if(this._provider)return this._provider.removeListener(e,l)};this.setProvider=e=>{this._provider=e,this._subscriptions.forEach(l=>{var i;(i=this._provider)==null||i.on(l.eventName,l.listener)})};this._provider=e,this._subscriptions=[]}on(e,l){if(this._provider)return this._provider.on(e,l);this._subscriptions.push({eventName:e,listener:l})}request(e){if(!this._provider)throw new R(`A wallet request of type ${e.method} was made to a disconnected wallet: `);return this._provider.request(e)}},C1=class extends n1{constructor(l){super(l)}},E1=class extends n1{constructor(e){super(e)}sendAsync(e,l){throw new Error("sendAsync is no longer supported by EIP-1193. Use the request method instead.")}};import{providers as Z3}from"ethers";var J2=["metamask","coinbase_wallet","wallet_connect"];import{ethers as b3}from"ethers";var x1=class extends R{constructor(){super("Wallet timeout");this.type="wallet_error"}},c2=a=>{if(a instanceof R)return a;if((a==null?void 0:a.code)&&(a==null?void 0:a.reason)){let e=new s1(a);return a.code===b3.errors.ACTION_REJECTED&&(e.details=J.E4001_USER_REJECTED_REQUEST),e}return a!=null&&a.code?new s1(a):new R("Unknown connector error",a)},d2=class extends G{constructor(l,i,o){super(l);this.type="provider_error";this.code=i,this.data=o}},s1=class extends d2{constructor(l){var r,p,b;let i=l;super(i.message,i.code,i.data);let o=Object.values(J).find(k=>k.eipCode===i.code);this.details=o||J.UNKNOWN_ERROR,i.code===-32002&&((r=i.message)!=null&&r.includes("already pending for origin")?(p=i.message)!=null&&p.includes("wallet_requestPermissions")?this.details=J.E32002_CONNECTION_ALREADY_PENDING:this.details=J.E32002_REQUEST_ALREADY_PENDING:(b=i.message)!=null&&b.includes("Already processing")&&i.message.includes("eth_requestAccounts")&&(this.details=J.E32002_WALLET_LOCKED))}},k3={ERROR_USER_EXISTS:{message:"User already exists for this address",detail:"Try another address!",retryable:!1},ERROR_TIMED_OUT:{message:"Could not log in with wallet",detail:"Please try connecting again.",retryable:!0},ERROR_WALLET_CONNECTION:{message:"Could not log in with wallet",detail:"Please try connecting again.",retryable:!0}},M3={E32002_CONNECTION_ALREADY_PENDING:{eipCode:-32002,message:"Connection request already pending",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E32002_REQUEST_ALREADY_PENDING:{eipCode:-32002,message:"Resource request already pending",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E32002_WALLET_LOCKED:{eipCode:-32002,message:"Wallet might be locked",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E4001_USER_REJECTED_REQUEST:{eipCode:4001,message:"Signature rejected",detail:"Please try signing again.",retryable:!0}},g3={E4001_DEFAULT_USER_REJECTED_REQUEST:{eipCode:4001,message:"User Rejected Request",detail:"The user rejected the request.",default:!0,retryable:!0},E4100_DEFAULT_UNAUTHORIZED:{eipCode:4100,message:"Unauthorized",detail:"The requested method and/or account has not been authorized by the user.",default:!0,retryable:!1},E4200_DEFAULT_UNSUPPORTED_METHOD:{eipCode:4200,message:"Unsupported Method",detail:"The Provider does not support the requested method.",default:!0,retryable:!1},E4900_DEFAULT_DISCONNECTED:{eipCode:4900,message:"Disconnected",detail:"The Provider is disconnected from all chains.",default:!0,retryable:!0},E4901_DEFAULT_CHAIN_DISCONNECTED:{eipCode:4901,message:"Chain Disconnected",detail:"The Provider is not connected to the requested chain.",default:!0,retryable:!0},E32700_DEFAULT_PARSE_ERROR:{eipCode:-32700,message:"Parse error",detail:"Invalid JSON",default:!0,retryable:!1},E32600_DEFAULT_INVALID_REQUEST:{eipCode:-32600,message:"Invalid request",detail:"JSON is not a valid request object",default:!0,retryable:!1},E32601_DEFAULT_METHOD_NOT_FOUND:{eipCode:-32601,message:"Method not found",detail:"Method does not exist",default:!0,retryable:!1},E32602_DEFAULT_INVALID_PARAMS:{eipCode:-32602,message:"Invalid params",detail:"Invalid method parameters",default:!0,retryable:!1},E32603_DEFAULT_INTERNAL_ERROR:{eipCode:-32603,message:"Internal error",detail:"Internal JSON-RPC error",default:!0,retryable:!0},E32000_DEFAULT_INVALID_INPUT:{eipCode:-32e3,message:"Invalid input",detail:"Missing or invalid parameters",default:!0,retryable:!1},E32001_DEFAULT_RESOURCE_NOT_FOUND:{eipCode:-32001,message:"Resource not found",detail:"Requested resource not found",default:!0,retryable:!1},E32002_DEFAULT_RESOURCE_UNAVAILABLE:{eipCode:-32002,message:"Resource unavailable",detail:"Requested resource not available",default:!0,retryable:!0},E32003_DEFAULT_TRANSACTION_REJECTED:{eipCode:-32003,message:"Transaction rejected",detail:"Transaction creation failed",default:!0,retryable:!0},E32004_DEFAULT_METHOD_NOT_SUPPORTED:{eipCode:-32004,message:"Method not supported",detail:"Method is not implemented",default:!0,retryable:!1},E32005_DEFAULT_LIMIT_EXCEEDED:{eipCode:-32005,message:"Limit exceeded",detail:"Request exceeds defined limit",default:!0,retryable:!1},E32006_DEFAULT_JSON_RPC_VERSION_NOT_SUPPORTED:{eipCode:-32006,message:"JSON-RPC version not supported",detail:"Version of JSON-RPC protocol is not supported",default:!0,retryable:!1}},J={UNKNOWN_ERROR:{eipCode:0,message:"Unknown error",detail:"Unknown error",retryable:!0},...g3,...M3},p2={...k3,...J};var h2="privy:wallet_type",A1=(a=new x1,e=F2)=>new Promise((l,i)=>setTimeout(()=>{i(a)},e)),f2=()=>{if(!window.ethereum)return!1;if(window.ethereum.isMetaMask)return!0;if(window.ethereum.providers){for(let a of window.ethereum.providers)if(a.isMetaMask)return!0}return!1},u2=()=>{if(!window.ethereum)return!1;if(window.ethereum.isCoinbaseWallet)return!0;if(window.ethereum.providers){for(let a of window.ethereum.providers)if(a.isCoinbaseWallet)return!0}return!1},_1=class{constructor(){this.walletType=null;this.getEthereumProvider=()=>this.ethProvider;this.createSiweMessage=(e,l,i,o,r,p,b)=>`${i} wants you to sign in with your Ethereum account:
2
2
  ${l}
3
3
 
4
- ${m}
4
+ ${b}
5
5
 
6
6
  URI: ${o}
7
7
  Version: 1
8
8
  Chain ID: ${e}
9
9
  Nonce: ${p}
10
- Issued At: ${n}
10
+ Issued At: ${r}
11
11
  Resources:
12
- - https://privy.io`;this.ethProvider=new n1}initialize(){let e=N.get(h2);J2.includes(e)&&(this.walletType=e,this.connect({showPrompt:!1}))}destroy(){this.walletType=null,N.del(h2)}async connect(e){var l,i;switch(this.walletType){case"metamask":this.ethProvider.setProvider(window.ethereum),(l=window.ethereum.providers)==null||l.forEach(async n=>{n.isMetaMask&&this.ethProvider.setProvider(n)});break;case"coinbase_wallet":this.ethProvider.setProvider(window.ethereum),(i=window.ethereum.providers)==null||i.forEach(async n=>{n.isCoinbaseWallet&&this.ethProvider.setProvider(n)});break;case"wallet_connect":let o=new X2({infuraId:o2});this.ethProvider.setProvider(o);break;default:throw new I(`Unsupported wallet: ${this.walletType}`)}return!await this.isConnected()&&e.showPrompt&&await this.promptConnection(this.walletType),this.address()}async isConnected(){switch(this.walletType){case"metamask":return await this.address()!==null;case"coinbase_wallet":return await this.address()!==null;case"wallet_connect":return this.ethProvider.connected;default:throw new I(`Unsupported wallet: ${this.walletType}`)}}async promptConnection(e){try{switch(e){case"metamask":await Promise.race([this.ethProvider.request({method:"eth_requestAccounts"}),A1()]);break;case"coinbase_wallet":await Promise.race([this.ethProvider.request({method:"eth_requestAccounts"}),A1()]);break;case"wallet_connect":let l=new X2({infuraId:o2});this.ethProvider.setProvider(l),await Promise.race([l.enable(),A1()]),N.put(h2,e);break;default:throw new I(`Unsupported wallet: ${this.walletType}`)}}catch(l){throw c2(l)}}async sign(e){let i=new Z3.Web3Provider(new C1(this.getEthereumProvider())).getSigner();return Promise.race([i.signMessage(e),A1()]).catch(o=>{throw c2(o)})}prepareMessage(e,l,i){let o=window.location.host,n=window.location.origin,p=`${o} requests that you authenticate with Privy.`,m=new Date().toISOString();return this.createSiweMessage(e,l,o,n,m,i,p)}async chainId(){let e=await this.getEthereumProvider().request({method:"eth_chainId"}),l=Number(e);return String(l)}async address(){let e=await this.getEthereumProvider().request({method:"eth_accounts"});return Array.isArray(e)&&e.length>0?w3(e[0]):null}};var m2,T1=class{constructor(e){let l=e.apiURL||O2,i=e.timeout||U2;this.appId=e.appId,this.connector=new _1,this.connector.initialize(),m2||(m2=new v1),this.session=m2,this.api=new L1(e.appId,this.session,{baseURL:l,timeout:i}),this.session.api=this.api}async authenticate(){if(!this.authFlow)throw new f("No auth flow in progress.");return await this.session.authenticate(this.authFlow)}async logout(){await this.session.destroy(),this.connector.destroy(),this.authFlow=void 0}startAuthFlow(e){e.api=this.api,this.authFlow=e}async unlinkEmail(e){try{let l=await this.api.post(Y2(),{address:e});return r1(l.data)}catch(l){throw V(l)}}async unlinkWallet(e){try{let l=await this.api.post(K2(),{address:e});return r1(l.data)}catch(l){throw V(l)}}async getAuthenticatedUser(){return this.session.hasRefreshCredentials()?this.session.refresh():null}async getAccessToken(){return this.session.hasActiveToken()?this.session.token:this.session.hasRefreshCredentials()?(await this.session.refresh(),this.session.token):null}async getAppSettings(){try{let e=await this.api.get(`/api/v1/apps/${this.appId}`);return{id:e.data.id,name:e.data.name,verificationKey:e.data.verification_key,logoUrl:e.data.logo_url||void 0,theme:e.data.theme,accentColor:e.data.accent_color||void 0,walletAuth:e.data.wallet_auth,emailAuth:e.data.email_auth,googleOAuth:e.data.google_oauth,twitterOAuth:e.data.twitter_oauth,discordOAuth:e.data.discord_oauth,createdAt:new Date(e.data.created_at*1e3),updatedAt:new Date(e.data.updated_at*1e3)}}catch(e){throw V(e)}}};import{Web3Provider as n6}from"@ethersproject/providers";import{createContext as y3,useContext as L3}from"react";var k=()=>{throw new Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")};var b2=y3({ready:!1,authenticated:!1,user:null,login:k,linkEmail:k,linkWallet:k,logout:k,getAccessToken:k,getEthereumProvider:k,getEthersProvider:k,getWeb3jsProvider:k,unlinkEmail:k,unlinkWallet:k}),_=()=>L3(b2);var f1=class{constructor(e){this.connector=e,this.meta={wallet:this.connector.walletType}}async authenticate(){if(!this.api)throw new f("Auth flow has no API instance");if(!this.connector.walletType)throw new f("Wallet must be specified");try{let e=await this.connector.connect({showPrompt:!0}),l=await this.connector.chainId(),i=await this.api.post(B2(),{address:e}),o=this.connector.prepareMessage(l,e,i.data.nonce),n=await this.connector.sign(o),p=await this.api.post(G2(),{message:o,signature:n});return{user:p.data.user,token:p.data.token,refresh_token:p.data.refresh_token}}catch(e){throw R(e)}}getEthereumProvider(){return this.connector.getEthereumProvider()}};var u1=class{constructor(e){this.meta={email:e}}async authenticate(){if(!this.api)throw new f("Auth flow has no API instance");if(!this.meta.email||!this.meta.emailCode)throw new f("Email and email code must be set prior to calling authenticate.");try{let e=j2(),l=await this.api.post(e,{email:this.meta.email,code:this.meta.emailCode});return{user:l.data.user,token:l.data.token,refresh_token:l.data.refresh_token}}catch(e){throw R(e)}}async sendCodeEmail(e){if(!this.api)throw new f("Auth flow has no API instance");if(e&&(this.meta.email=e),!this.meta.email)throw new f("Email must be set when initialzing authentication.");try{let l=z2();return(await this.api.post(l,{email:this.meta.email})).data}catch(l){throw R(l)}}};var m1=class{constructor(e,l,i){this.meta={provider:e},this.meta.authorizationCode=l,this.meta.stateCode=i}async authenticate(){if(!this.api)throw new f("Auth flow has no API instance");if(!this.meta.authorizationCode||!this.meta.stateCode)throw new f("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenticate.");try{let e=q2(),l=await this.api.post(e,{authorization_code:this.meta.authorizationCode,state_code:this.meta.stateCode});return{user:l.data.user,token:l.data.token,refresh_token:l.data.refresh_token}}catch(e){throw R(e)}}async getAuthorizationUrl(){if(!this.api)throw new f("Auth flow has no API instance");if(!this.meta.provider)throw new f("Provider must be set when initialzing OAuth authentication.");try{let e=$2();return(await this.api.post(e,{provider:this.meta.provider,redirect_to:window.location.href})).data}catch(e){throw R(e)}}};import"wicg-inert";import t6 from"react-dom";import o3 from"styled-components";import{createContext as E3,useContext as x3,useEffect as t4,useState as e4}from"react";import{jsx as v3}from"react/jsx-runtime";function Q2(a){return v3("link",{rel:"prefetch",href:a.src})}import{jsx as A3,jsxs as _3}from"react/jsx-runtime";var a4=E3({app:null,options:{email:!0,wallet:!0,google:!1,twitter:!1,discord:!1},currentScreen:"LANDING",lastScreen:"LANDING",navigate:k,navigateBack:k}),l4=a=>{let e=a.appSettings,l=a.authenticated,i=a.visible,[o,n]=e4(null),[p,m]=e4(null);t4(()=>{l||n(null)},[l]),t4(()=>{i||(m("LANDING"),n("LANDING"))},[i]);let b={app:e,options:a.options,currentScreen:o||"LANDING",lastScreen:p||"LANDING",navigate:g=>{m(o),n(g)},navigateBack:()=>{n(p)}};return _3(a4.Provider,{value:b,children:[e&&e.logoUrl&&A3(Q2,{src:e.logoUrl}),a.children]})},u=()=>x3(a4);import{useEffect as s5,useState as d5}from"react";import F1 from"styled-components";import S3 from"styled-components";import{jsx as i4}from"react/jsx-runtime";var o4=({style:a,...e})=>i4("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",style:{height:"1.5rem",width:"1.5rem",...a},...e,children:i4("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})});import{jsx as r4}from"react/jsx-runtime";var n4=({style:a,...e})=>r4("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",style:{height:"1.5rem",width:"1.5rem",...a},...e,children:r4("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"})});import{createContext as T3,useContext as P3}from"react";var k2=T3({getAuthMeta:k,closePrivyModal:k,initLoginWithWallet:k,loginWithWallet:k,loginWithCode:k,loginWithEmail:k,resendEmailCode:k,initLoginWithOAuth:k}),y=()=>P3(k2);import{jsx as x,jsxs as p4}from"react/jsx-runtime";var M2=()=>x("div",{}),C4=({backFn:a})=>x("div",{children:x(n4,{onClick:a})}),s4=()=>{let{closePrivyModal:a}=y();return x("div",{children:x("div",{children:x(o4,{onClick:a})})})},I3=()=>{let{app:a}=u();return a!=null&&a.logoUrl?x("div",{children:x("img",{src:a.logoUrl,alt:`${a==null?void 0:a.name} logo`,style:{objectFit:"contain",width:"120px",height:"30px"}})}):null};var A=({backFn:a})=>p4(c4,{children:[a?x(C4,{backFn:a}):x(M2,{}),x(I3,{},"app-name"),x(s4,{})]}),d4=({backFn:a})=>p4(c4,{children:[a?x(C4,{backFn:a}):x(M2,{}),x(M2,{}),x(s4,{})]}),c4=S3.div`
12
+ - https://privy.io`;this.ethProvider=new n1}initialize(){let e=N.get(h2);J2.includes(e)&&(this.walletType=e,this.connect({showPrompt:!1}))}destroy(){this.walletType=null,N.del(h2)}async connect(e){var l,i;switch(this.walletType){case"metamask":this.ethProvider.setProvider(window.ethereum),(l=window.ethereum.providers)==null||l.forEach(async r=>{r.isMetaMask&&this.ethProvider.setProvider(r)});break;case"coinbase_wallet":this.ethProvider.setProvider(window.ethereum),(i=window.ethereum.providers)==null||i.forEach(async r=>{r.isCoinbaseWallet&&this.ethProvider.setProvider(r)});break;case"wallet_connect":let o=new X2({infuraId:o2});this.ethProvider.setProvider(o);break;default:throw new R(`Unsupported wallet: ${this.walletType}`)}return!await this.isConnected()&&e.showPrompt&&await this.promptConnection(this.walletType),this.address()}async isConnected(){switch(this.walletType){case"metamask":return await this.address()!==null;case"coinbase_wallet":return await this.address()!==null;case"wallet_connect":return this.ethProvider.connected;default:throw new R(`Unsupported wallet: ${this.walletType}`)}}async promptConnection(e){try{switch(e){case"metamask":await Promise.race([this.ethProvider.request({method:"eth_requestAccounts"}),A1()]);break;case"coinbase_wallet":await Promise.race([this.ethProvider.request({method:"eth_requestAccounts"}),A1()]);break;case"wallet_connect":let l=new X2({infuraId:o2});this.ethProvider.setProvider(l),await Promise.race([l.enable(),A1()]),N.put(h2,e);break;default:throw new R(`Unsupported wallet: ${this.walletType}`)}}catch(l){throw c2(l)}}async sign(e){let i=new Z3.Web3Provider(new C1(this.getEthereumProvider())).getSigner();return Promise.race([i.signMessage(e),A1()]).catch(o=>{throw c2(o)})}prepareMessage(e,l,i){let o=window.location.host,r=window.location.origin,p=`${o} requests that you authenticate with Privy.`,b=new Date().toISOString();return this.createSiweMessage(e,l,o,r,b,i,p)}async chainId(){let e=await this.getEthereumProvider().request({method:"eth_chainId"}),l=Number(e);return String(l)}async address(){let e=await this.getEthereumProvider().request({method:"eth_accounts"});return Array.isArray(e)&&e.length>0?w3(e[0]):null}};var m2,T1=class{constructor(e){let l=e.apiURL||O2,i=e.timeout||U2;this.appId=e.appId,this.connector=new _1,this.connector.initialize(),m2||(m2=new v1),this.session=m2,this.api=new L1(e.appId,this.session,{baseURL:l,timeout:i}),this.session.api=this.api}async authenticate(){if(!this.authFlow)throw new u("No auth flow in progress.");return await this.session.authenticate(this.authFlow)}async logout(){await this.session.destroy(),this.connector.destroy(),this.authFlow=void 0}startAuthFlow(e){e.api=this.api,this.authFlow=e}async unlinkEmail(e){try{let l=await this.api.post(Y2(),{address:e});return r1(l.data)}catch(l){throw V(l)}}async unlinkWallet(e){try{let l=await this.api.post(K2(),{address:e});return r1(l.data)}catch(l){throw V(l)}}async getAuthenticatedUser(){return this.session.hasRefreshCredentials()?this.session.refresh():null}async getAccessToken(){return this.session.hasActiveToken()?this.session.token:this.session.hasRefreshCredentials()?(await this.session.refresh(),this.session.token):null}async getAppSettings(){try{let e=await this.api.get(`/api/v1/apps/${this.appId}`);return{id:e.data.id,name:e.data.name,verificationKey:e.data.verification_key,logoUrl:e.data.logo_url||void 0,theme:e.data.theme,accentColor:e.data.accent_color||void 0,walletAuth:e.data.wallet_auth,emailAuth:e.data.email_auth,googleOAuth:e.data.google_oauth,twitterOAuth:e.data.twitter_oauth,discordOAuth:e.data.discord_oauth,createdAt:new Date(e.data.created_at*1e3),updatedAt:new Date(e.data.updated_at*1e3)}}catch(e){throw V(e)}}};import{Web3Provider as n6}from"@ethersproject/providers";import{createContext as y3,useContext as L3}from"react";var f=()=>{throw new Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")};var b2=y3({ready:!1,authenticated:!1,user:null,login:f,linkEmail:f,linkWallet:f,linkGoogle:f,linkTwitter:f,linkDiscord:f,logout:f,getAccessToken:f,getEthereumProvider:f,getEthersProvider:f,getWeb3jsProvider:f,unlinkEmail:f,unlinkWallet:f}),_=()=>L3(b2);var f1=class{constructor(e){this.connector=e,this.meta={wallet:this.connector.walletType}}async authenticate(){if(!this.api)throw new u("Auth flow has no API instance");if(!this.connector.walletType)throw new u("Wallet must be specified");try{let e=await this.connector.connect({showPrompt:!0}),l=await this.connector.chainId(),i=await this.api.post(B2(),{address:e}),o=this.connector.prepareMessage(l,e,i.data.nonce),r=await this.connector.sign(o),p=await this.api.post(G2(),{message:o,signature:r});return{user:p.data.user,token:p.data.token,refresh_token:p.data.refresh_token}}catch(e){throw W(e)}}getEthereumProvider(){return this.connector.getEthereumProvider()}};var u1=class{constructor(e){this.meta={email:e}}async authenticate(){if(!this.api)throw new u("Auth flow has no API instance");if(!this.meta.email||!this.meta.emailCode)throw new u("Email and email code must be set prior to calling authenticate.");try{let e=j2(),l=await this.api.post(e,{email:this.meta.email,code:this.meta.emailCode});return{user:l.data.user,token:l.data.token,refresh_token:l.data.refresh_token}}catch(e){throw W(e)}}async sendCodeEmail(e){if(!this.api)throw new u("Auth flow has no API instance");if(e&&(this.meta.email=e),!this.meta.email)throw new u("Email must be set when initialzing authentication.");try{let l=z2();return(await this.api.post(l,{email:this.meta.email})).data}catch(l){throw W(l)}}};var m1=class{constructor(e,l,i){this.meta={provider:e},this.meta.authorizationCode=l,this.meta.stateCode=i}async authenticate(){if(!this.api)throw new u("Auth flow has no API instance");if(!this.meta.authorizationCode||!this.meta.stateCode)throw new u("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenticate.");try{let e=q2(),l=await this.api.post(e,{authorization_code:this.meta.authorizationCode,state_code:this.meta.stateCode});return{user:l.data.user,token:l.data.token,refresh_token:l.data.refresh_token}}catch(e){throw W(e)}}async getAuthorizationUrl(){if(!this.api)throw new u("Auth flow has no API instance");if(!this.meta.provider)throw new u("Provider must be set when initialzing OAuth authentication.");try{let e=$2();return(await this.api.post(e,{provider:this.meta.provider,redirect_to:window.location.href})).data}catch(e){throw W(e)}}};import"wicg-inert";import t6 from"react-dom";import o3 from"styled-components";import{createContext as E3,useContext as x3,useEffect as t4,useState as e4}from"react";import{jsx as v3}from"react/jsx-runtime";function Q2(a){return v3("link",{rel:"prefetch",href:a.src})}import{jsx as A3,jsxs as _3}from"react/jsx-runtime";var a4=E3({app:null,options:{email:!0,wallet:!0,google:!1,twitter:!1,discord:!1},currentScreen:"LANDING",lastScreen:"LANDING",navigate:f,navigateBack:f}),l4=a=>{let e=a.appSettings,l=a.authenticated,i=a.visible,[o,r]=e4(null),[p,b]=e4(null);t4(()=>{l||r(null)},[l]),t4(()=>{i||(b("LANDING"),r("LANDING"))},[i]);let k={app:e,options:a.options,currentScreen:o||"LANDING",lastScreen:p||"LANDING",navigate:g=>{b(o),r(g)},navigateBack:()=>{r(p)}};return _3(a4.Provider,{value:k,children:[e&&e.logoUrl&&A3(Q2,{src:e.logoUrl}),a.children]})},m=()=>x3(a4);import{useEffect as s5,useState as d5}from"react";import F1 from"styled-components";import S3 from"styled-components";import{jsx as i4}from"react/jsx-runtime";var o4=({style:a,...e})=>i4("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",style:{height:"1.5rem",width:"1.5rem",...a},...e,children:i4("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})});import{jsx as r4}from"react/jsx-runtime";var n4=({style:a,...e})=>r4("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",style:{height:"1.5rem",width:"1.5rem",...a},...e,children:r4("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"})});import{createContext as T3,useContext as P3}from"react";var k2=T3({getAuthMeta:f,closePrivyModal:f,initLoginWithWallet:f,loginWithWallet:f,loginWithCode:f,loginWithEmail:f,resendEmailCode:f,initLoginWithOAuth:f}),y=()=>P3(k2);import{jsx as x,jsxs as p4}from"react/jsx-runtime";var M2=()=>x("div",{}),C4=({backFn:a})=>x("div",{children:x(n4,{onClick:a})}),s4=()=>{let{closePrivyModal:a}=y();return x("div",{children:x("div",{children:x(o4,{onClick:a})})})},I3=()=>{let{app:a}=m();return a!=null&&a.logoUrl?x("div",{children:x("img",{src:a.logoUrl,alt:`${a==null?void 0:a.name} logo`,style:{objectFit:"contain",width:"120px",height:"30px"}})}):null};var A=({backFn:a})=>p4(c4,{children:[a?x(C4,{backFn:a}):x(M2,{}),x(I3,{},"app-name"),x(s4,{})]}),d4=({backFn:a})=>p4(c4,{children:[a?x(C4,{backFn:a}):x(M2,{}),x(M2,{}),x(s4,{})]}),c4=S3.div`
13
13
  height: 30px;
14
14
  display: flex;
15
15
  align-items: center;
@@ -72,7 +72,7 @@ Resources:
72
72
  @media (max-width: 440px) {
73
73
  height: 30px;
74
74
  }
75
- `;import m4 from"styled-components";import{jsx as T,jsxs as R3}from"react/jsx-runtime";var X=({style:a,...e})=>R3("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...a},...e,children:[T("rect",{width:"28",height:"28",rx:"6",fill:"white"}),T("path",{d:"M23.0126 5L15.1958 10.7823L16.6533 7.37359L23.0126 5Z",fill:"#E17726",stroke:"#E17726",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),T("path",{d:"M4.98753 5L12.7329 10.8299L11.3468 7.37954L4.98753 5ZM20.1987 18.4027L18.1166 21.5794L22.5723 22.8049L23.8454 18.4741L20.1987 18.4027ZM4.16064 18.4741L5.42775 22.8049L9.87153 21.5794L7.80133 18.4027L4.16064 18.4741Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),T("path",{d:"M9.6336 13.0369L8.39624 14.9049L12.7984 15.1071L12.6556 10.3659L9.6336 13.0429V13.0369ZM18.3665 13.0429L15.2969 10.3064L15.1958 15.1071L19.5979 14.9049L18.3665 13.0429ZM9.87155 21.5794L12.5426 20.2945L10.2463 18.5098L9.87155 21.5794ZM15.4635 20.2886L18.1166 21.5794L17.7597 18.5039L15.4635 20.2886Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),T("path",{d:"M18.1167 21.5794L15.4635 20.2944L15.6776 22.0196L15.6539 22.7513L18.1167 21.5794ZM9.87158 21.5794L12.3463 22.7513L12.3285 22.0196L12.5426 20.2944L9.87158 21.5794Z",fill:"#D5BFB2",stroke:"#D5BFB2",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),T("path",{d:"M12.3878 17.3616L10.1868 16.7191L11.7454 16.0052L12.3938 17.3616H12.3878ZM15.6062 17.3616L16.2605 15.9993L17.8251 16.7131L15.6062 17.3675V17.3616Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),T("path",{d:"M9.87147 21.5794L10.2581 18.4027L7.80127 18.4741L9.87147 21.5794ZM17.7418 18.4027L18.1166 21.5794L20.1987 18.4741L17.7418 18.4027ZM19.6038 14.9048L15.2016 15.107L15.6061 17.3676L16.2605 15.9994L17.8251 16.7132L19.6038 14.9048ZM10.1868 16.7192L11.7454 16.0053L12.3938 17.3617L12.8042 15.1011L8.4021 14.9048L10.1868 16.7192Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),T("path",{d:"M8.4021 14.9048L10.2462 18.5038L10.1868 16.7192L8.4021 14.9048ZM17.8251 16.7192L17.7537 18.5038L19.5978 14.9048L17.8251 16.7192ZM12.8042 15.107L12.3878 17.3676L12.9113 20.0327L13.0303 16.5169L12.8042 15.107ZM15.1957 15.107L14.9815 16.511L15.0886 20.0327L15.6061 17.3617L15.1957 15.1011V15.107Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),T("path",{d:"M15.6062 17.3617L15.0887 20.0327L15.4635 20.2945L17.7538 18.5098L17.8252 16.7192L15.6062 17.3617ZM10.1869 16.7192L10.2463 18.5039L12.5426 20.2885L12.9114 20.0327L12.3939 17.3617L10.1809 16.7192H10.1869Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),T("path",{d:"M15.6598 22.7513L15.6776 22.0196L15.4754 21.853H12.5248L12.3285 22.0196L12.3463 22.7513L9.87158 21.5793L10.7401 22.2932L12.495 23.5008H15.4992L17.26 22.2873L18.1167 21.5793L15.6539 22.7513H15.6598Z",fill:"#C0AC9D",stroke:"#C0AC9D",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),T("path",{d:"M15.4634 20.2885L15.0886 20.0327H12.9114L12.5425 20.2945L12.3284 22.0196L12.5247 21.8531H15.4753L15.6776 22.0196L15.4634 20.2945V20.2885Z",fill:"#161616",stroke:"#161616",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),T("path",{d:"M23.3456 11.1571L24 7.97442L23.0125 5L15.4575 10.5919L18.3664 13.0369L22.4711 14.2326L23.3754 13.1797L22.9827 12.8941L23.6074 12.323L23.1315 11.9542L23.7561 11.4783L23.3397 11.1571H23.3456ZM4 7.96847L4.66627 11.1571L4.23795 11.4723L4.87448 11.9482L4.39857 12.323L5.01725 12.8941L4.62463 13.1797L5.52885 14.2326L9.63355 13.0428L12.5425 10.586L4.98751 5L4 7.96847Z",fill:"#763E1A",stroke:"#763E1A",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),T("path",{d:"M22.4712 14.2325L18.3665 13.0428L19.6038 14.9048L17.7597 18.5038L20.1987 18.4741H23.8454L22.4712 14.2325ZM9.63358 13.0368L5.52888 14.2325L4.16064 18.4741H7.80728L10.2463 18.5038L8.40217 14.9048L9.63953 13.0368H9.63358ZM15.1957 15.107L15.4634 10.5859L16.6532 7.37354H11.3468L12.5366 10.5859L12.8043 15.107L12.9054 16.5229V20.0327H15.0887L15.1006 16.5229L15.1957 15.107Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as h4,jsxs as W3}from"react/jsx-runtime";var d1=({style:a,...e})=>W3("svg",{width:"1024",height:"1024",viewBox:"0 0 1024 1024",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...a},...e,children:[h4("rect",{width:"1024",height:"1024",fill:"#0052FF"}),h4("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z",fill:"white"})]});import{jsx as c1,jsxs as N3}from"react/jsx-runtime";var P1=({style:a,...e})=>N3("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...a},...e,children:[c1("rect",{width:"28",height:"28",rx:"6",fill:"#141414"}),c1("g",{clipPath:"url(#clip0_1765_9946)",children:c1("path",{d:"M8.09448 10.3941C11.3558 7.20196 16.6442 7.20196 19.9055 10.3941L20.2982 10.7782C20.3369 10.8157 20.3677 10.8606 20.3887 10.9102C20.4097 10.9599 20.4206 11.0132 20.4206 11.0671C20.4206 11.121 20.4097 11.1744 20.3887 11.224C20.3677 11.2737 20.3369 11.3186 20.2982 11.3561L18.9554 12.6702C18.9158 12.7086 18.8628 12.7301 18.8077 12.7301C18.7526 12.7301 18.6996 12.7086 18.66 12.6702L18.1198 12.1415C15.8448 9.91503 12.1557 9.91503 9.88015 12.1415L9.30167 12.7075C9.26207 12.7459 9.20909 12.7673 9.15395 12.7673C9.0988 12.7673 9.04582 12.7459 9.00622 12.7075L7.66346 11.3934C7.62475 11.3559 7.59397 11.3109 7.57295 11.2613C7.55193 11.2117 7.5411 11.1583 7.5411 11.1044C7.5411 11.0505 7.55193 10.9971 7.57295 10.9475C7.59397 10.8979 7.62475 10.8529 7.66346 10.8154L8.09448 10.3941ZM22.6829 13.1115L23.8776 14.2814C23.9163 14.319 23.9471 14.3639 23.9681 14.4135C23.9892 14.4632 24 14.5165 24 14.5704C24 14.6243 23.9892 14.6777 23.9681 14.7273C23.9471 14.777 23.9163 14.8219 23.8776 14.8594L18.4893 20.1332C18.4102 20.2101 18.3042 20.2531 18.1938 20.2531C18.0835 20.2531 17.9775 20.2101 17.8984 20.1332L14.0743 16.3901C14.0545 16.3708 14.0279 16.36 14.0003 16.36C13.9726 16.36 13.9461 16.3708 13.9263 16.3901L10.1021 20.1332C10.023 20.2101 9.91703 20.2531 9.8067 20.2531C9.69636 20.2531 9.59038 20.2101 9.51124 20.1332L4.12236 14.8594C4.08365 14.8219 4.05287 14.777 4.03185 14.7273C4.01083 14.6777 4 14.6243 4 14.5704C4 14.5165 4.01083 14.4632 4.03185 14.4135C4.05287 14.3639 4.08365 14.319 4.12236 14.2814L5.31767 13.1115C5.39678 13.0348 5.50265 12.9919 5.61285 12.9919C5.72305 12.9919 5.82892 13.0348 5.90803 13.1115L9.73216 16.8546C9.75194 16.874 9.7785 16.8848 9.80616 16.8848C9.83381 16.8848 9.86037 16.874 9.88015 16.8546L13.7043 13.1115C13.7834 13.0346 13.8894 12.9916 13.9997 12.9916C14.1101 12.9916 14.216 13.0346 14.2952 13.1115L18.1198 16.8546C18.1396 16.874 18.1662 16.8848 18.1938 16.8848C18.2215 16.8848 18.2481 16.874 18.2678 16.8546L22.092 13.1115C22.1711 13.0346 22.2771 12.9916 22.3874 12.9916C22.4977 12.9916 22.6037 13.0346 22.6829 13.1115Z",fill:"white"})}),c1("defs",{children:c1("clipPath",{id:"clip0_1765_9946",children:c1("rect",{width:"20",height:"12.2531",fill:"white",transform:"translate(4 8)"})})})]});import{isMobile as u4}from"react-device-detect";import{isIOS as O3,isMobile as D3}from"react-device-detect";var g2=a=>{let e=new URL(window.location.href);if(!window.ethereum&&D3){let l;switch(a){case"metamask":O3?l="dapp://"+e.hostname+e.pathname:l="https://metamask.app.link/dapp/"+e.hostname+e.pathname;break;case"coinbase_wallet":l="https://go.cb-w.com/dapp?cb_url="+encodeURIComponent(e.href.replace(/\/$/g,""));break;case"wallet_connect":break;default:break}l&&window.location.assign(l)}};import f4 from"styled-components";var S1=f4.span`
75
+ `;import m4 from"styled-components";import{jsx as P,jsxs as R3}from"react/jsx-runtime";var X=({style:a,...e})=>R3("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...a},...e,children:[P("rect",{width:"28",height:"28",rx:"6",fill:"white"}),P("path",{d:"M23.0126 5L15.1958 10.7823L16.6533 7.37359L23.0126 5Z",fill:"#E17726",stroke:"#E17726",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M4.98753 5L12.7329 10.8299L11.3468 7.37954L4.98753 5ZM20.1987 18.4027L18.1166 21.5794L22.5723 22.8049L23.8454 18.4741L20.1987 18.4027ZM4.16064 18.4741L5.42775 22.8049L9.87153 21.5794L7.80133 18.4027L4.16064 18.4741Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M9.6336 13.0369L8.39624 14.9049L12.7984 15.1071L12.6556 10.3659L9.6336 13.0429V13.0369ZM18.3665 13.0429L15.2969 10.3064L15.1958 15.1071L19.5979 14.9049L18.3665 13.0429ZM9.87155 21.5794L12.5426 20.2945L10.2463 18.5098L9.87155 21.5794ZM15.4635 20.2886L18.1166 21.5794L17.7597 18.5039L15.4635 20.2886Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M18.1167 21.5794L15.4635 20.2944L15.6776 22.0196L15.6539 22.7513L18.1167 21.5794ZM9.87158 21.5794L12.3463 22.7513L12.3285 22.0196L12.5426 20.2944L9.87158 21.5794Z",fill:"#D5BFB2",stroke:"#D5BFB2",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M12.3878 17.3616L10.1868 16.7191L11.7454 16.0052L12.3938 17.3616H12.3878ZM15.6062 17.3616L16.2605 15.9993L17.8251 16.7131L15.6062 17.3675V17.3616Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M9.87147 21.5794L10.2581 18.4027L7.80127 18.4741L9.87147 21.5794ZM17.7418 18.4027L18.1166 21.5794L20.1987 18.4741L17.7418 18.4027ZM19.6038 14.9048L15.2016 15.107L15.6061 17.3676L16.2605 15.9994L17.8251 16.7132L19.6038 14.9048ZM10.1868 16.7192L11.7454 16.0053L12.3938 17.3617L12.8042 15.1011L8.4021 14.9048L10.1868 16.7192Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M8.4021 14.9048L10.2462 18.5038L10.1868 16.7192L8.4021 14.9048ZM17.8251 16.7192L17.7537 18.5038L19.5978 14.9048L17.8251 16.7192ZM12.8042 15.107L12.3878 17.3676L12.9113 20.0327L13.0303 16.5169L12.8042 15.107ZM15.1957 15.107L14.9815 16.511L15.0886 20.0327L15.6061 17.3617L15.1957 15.1011V15.107Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M15.6062 17.3617L15.0887 20.0327L15.4635 20.2945L17.7538 18.5098L17.8252 16.7192L15.6062 17.3617ZM10.1869 16.7192L10.2463 18.5039L12.5426 20.2885L12.9114 20.0327L12.3939 17.3617L10.1809 16.7192H10.1869Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M15.6598 22.7513L15.6776 22.0196L15.4754 21.853H12.5248L12.3285 22.0196L12.3463 22.7513L9.87158 21.5793L10.7401 22.2932L12.495 23.5008H15.4992L17.26 22.2873L18.1167 21.5793L15.6539 22.7513H15.6598Z",fill:"#C0AC9D",stroke:"#C0AC9D",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M15.4634 20.2885L15.0886 20.0327H12.9114L12.5425 20.2945L12.3284 22.0196L12.5247 21.8531H15.4753L15.6776 22.0196L15.4634 20.2945V20.2885Z",fill:"#161616",stroke:"#161616",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M23.3456 11.1571L24 7.97442L23.0125 5L15.4575 10.5919L18.3664 13.0369L22.4711 14.2326L23.3754 13.1797L22.9827 12.8941L23.6074 12.323L23.1315 11.9542L23.7561 11.4783L23.3397 11.1571H23.3456ZM4 7.96847L4.66627 11.1571L4.23795 11.4723L4.87448 11.9482L4.39857 12.323L5.01725 12.8941L4.62463 13.1797L5.52885 14.2326L9.63355 13.0428L12.5425 10.586L4.98751 5L4 7.96847Z",fill:"#763E1A",stroke:"#763E1A",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M22.4712 14.2325L18.3665 13.0428L19.6038 14.9048L17.7597 18.5038L20.1987 18.4741H23.8454L22.4712 14.2325ZM9.63358 13.0368L5.52888 14.2325L4.16064 18.4741H7.80728L10.2463 18.5038L8.40217 14.9048L9.63953 13.0368H9.63358ZM15.1957 15.107L15.4634 10.5859L16.6532 7.37354H11.3468L12.5366 10.5859L12.8043 15.107L12.9054 16.5229V20.0327H15.0887L15.1006 16.5229L15.1957 15.107Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as h4,jsxs as W3}from"react/jsx-runtime";var d1=({style:a,...e})=>W3("svg",{width:"1024",height:"1024",viewBox:"0 0 1024 1024",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...a},...e,children:[h4("rect",{width:"1024",height:"1024",fill:"#0052FF"}),h4("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z",fill:"white"})]});import{jsx as c1,jsxs as N3}from"react/jsx-runtime";var P1=({style:a,...e})=>N3("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...a},...e,children:[c1("rect",{width:"28",height:"28",rx:"6",fill:"#141414"}),c1("g",{clipPath:"url(#clip0_1765_9946)",children:c1("path",{d:"M8.09448 10.3941C11.3558 7.20196 16.6442 7.20196 19.9055 10.3941L20.2982 10.7782C20.3369 10.8157 20.3677 10.8606 20.3887 10.9102C20.4097 10.9599 20.4206 11.0132 20.4206 11.0671C20.4206 11.121 20.4097 11.1744 20.3887 11.224C20.3677 11.2737 20.3369 11.3186 20.2982 11.3561L18.9554 12.6702C18.9158 12.7086 18.8628 12.7301 18.8077 12.7301C18.7526 12.7301 18.6996 12.7086 18.66 12.6702L18.1198 12.1415C15.8448 9.91503 12.1557 9.91503 9.88015 12.1415L9.30167 12.7075C9.26207 12.7459 9.20909 12.7673 9.15395 12.7673C9.0988 12.7673 9.04582 12.7459 9.00622 12.7075L7.66346 11.3934C7.62475 11.3559 7.59397 11.3109 7.57295 11.2613C7.55193 11.2117 7.5411 11.1583 7.5411 11.1044C7.5411 11.0505 7.55193 10.9971 7.57295 10.9475C7.59397 10.8979 7.62475 10.8529 7.66346 10.8154L8.09448 10.3941ZM22.6829 13.1115L23.8776 14.2814C23.9163 14.319 23.9471 14.3639 23.9681 14.4135C23.9892 14.4632 24 14.5165 24 14.5704C24 14.6243 23.9892 14.6777 23.9681 14.7273C23.9471 14.777 23.9163 14.8219 23.8776 14.8594L18.4893 20.1332C18.4102 20.2101 18.3042 20.2531 18.1938 20.2531C18.0835 20.2531 17.9775 20.2101 17.8984 20.1332L14.0743 16.3901C14.0545 16.3708 14.0279 16.36 14.0003 16.36C13.9726 16.36 13.9461 16.3708 13.9263 16.3901L10.1021 20.1332C10.023 20.2101 9.91703 20.2531 9.8067 20.2531C9.69636 20.2531 9.59038 20.2101 9.51124 20.1332L4.12236 14.8594C4.08365 14.8219 4.05287 14.777 4.03185 14.7273C4.01083 14.6777 4 14.6243 4 14.5704C4 14.5165 4.01083 14.4632 4.03185 14.4135C4.05287 14.3639 4.08365 14.319 4.12236 14.2814L5.31767 13.1115C5.39678 13.0348 5.50265 12.9919 5.61285 12.9919C5.72305 12.9919 5.82892 13.0348 5.90803 13.1115L9.73216 16.8546C9.75194 16.874 9.7785 16.8848 9.80616 16.8848C9.83381 16.8848 9.86037 16.874 9.88015 16.8546L13.7043 13.1115C13.7834 13.0346 13.8894 12.9916 13.9997 12.9916C14.1101 12.9916 14.216 13.0346 14.2952 13.1115L18.1198 16.8546C18.1396 16.874 18.1662 16.8848 18.1938 16.8848C18.2215 16.8848 18.2481 16.874 18.2678 16.8546L22.092 13.1115C22.1711 13.0346 22.2771 12.9916 22.3874 12.9916C22.4977 12.9916 22.6037 13.0346 22.6829 13.1115Z",fill:"white"})}),c1("defs",{children:c1("clipPath",{id:"clip0_1765_9946",children:c1("rect",{width:"20",height:"12.2531",fill:"white",transform:"translate(4 8)"})})})]});import{isMobile as u4}from"react-device-detect";import{isIOS as O3,isMobile as D3}from"react-device-detect";var g2=a=>{let e=new URL(window.location.href);if(!window.ethereum&&D3){let l;switch(a){case"metamask":O3?l="dapp://"+e.hostname+e.pathname:l="https://metamask.app.link/dapp/"+e.hostname+e.pathname;break;case"coinbase_wallet":l="https://go.cb-w.com/dapp?cb_url="+encodeURIComponent(e.href.replace(/\/$/g,""));break;case"wallet_connect":break;default:break}l&&window.location.assign(l)}};import f4 from"styled-components";var S1=f4.span`
76
76
  @media (max-width: 440px) {
77
77
  display: none;
78
78
  }
@@ -80,7 +80,7 @@ Resources:
80
80
  @media (min-width: 441px) {
81
81
  display: none;
82
82
  }
83
- `;import{jsx as B,jsxs as b1}from"react/jsx-runtime";var I1=()=>{let{navigate:a}=u(),{initLoginWithWallet:e,closePrivyModal:l}=y();return b1(U3,{children:[b1(w2,{onClick:()=>{f2()?(e("metamask"),a("AWAITING_CONNECTION")):u4?(g2("metamask"),l()):a("INSTALL_METAMASK_SCREEN")},children:[B(X,{}),B("span",{children:"Metamask"}),B("span",{children:f2()?"Connect":"Install"})]}),b1(w2,{onClick:()=>{u2()?(e("coinbase_wallet"),a("AWAITING_CONNECTION")):u4?(g2("coinbase_wallet"),l()):a("INSTALL_COINBASE_WALLET_SCREEN")},children:[B(d1,{}),b1("span",{children:["Coinbase",B(S1,{children:" Wallet"})]}),B("span",{children:u2()?"Connect":"Install"})]}),b1(w2,{onClick:()=>{e("wallet_connect"),a("AWAITING_CONNECTION")},children:[B(P1,{}),B("span",{children:"WalletConnect"}),B("span",{children:"Connect"})]})]})},U3=m4.div`
83
+ `;import{jsx as B,jsxs as b1}from"react/jsx-runtime";var I1=()=>{let{navigate:a}=m(),{initLoginWithWallet:e,closePrivyModal:l}=y();return b1(U3,{children:[b1(w2,{onClick:()=>{f2()?(e("metamask"),a("AWAITING_CONNECTION")):u4?(g2("metamask"),l()):a("INSTALL_METAMASK_SCREEN")},children:[B(X,{}),B("span",{children:"Metamask"}),B("span",{children:f2()?"Connect":"Install"})]}),b1(w2,{onClick:()=>{u2()?(e("coinbase_wallet"),a("AWAITING_CONNECTION")):u4?(g2("coinbase_wallet"),l()):a("INSTALL_COINBASE_WALLET_SCREEN")},children:[B(d1,{}),b1("span",{children:["Coinbase",B(S1,{children:" Wallet"})]}),B("span",{children:u2()?"Connect":"Install"})]}),b1(w2,{onClick:()=>{e("wallet_connect"),a("AWAITING_CONNECTION")},children:[B(P1,{}),B("span",{children:"WalletConnect"}),B("span",{children:"Connect"})]})]})},U3=m4.div`
84
84
  display: flex;
85
85
  flex-direction: column;
86
86
  align-items: flex-start;
@@ -157,7 +157,7 @@ Resources:
157
157
  :hover > :last-child {
158
158
  opacity: 1;
159
159
  }
160
- `;import F3 from"styled-components";import{jsx as b4,jsxs as H3}from"react/jsx-runtime";var R1=()=>{let{navigate:a}=u();return H3(V3,{children:[b4("span",{children:"Don\u2019t have a wallet? "}),b4("button",{onClick:()=>{a("WALLET_EDUCATION")},children:"Create one now."})]})},V3=F3.div`
160
+ `;import F3 from"styled-components";import{jsx as b4,jsxs as H3}from"react/jsx-runtime";var R1=()=>{let{navigate:a}=m();return H3(V3,{children:[b4("span",{children:"Don\u2019t have a wallet? "}),b4("button",{onClick:()=>{a("WALLET_EDUCATION")},children:"Create one now."})]})},V3=F3.div`
161
161
  font-size: 13px;
162
162
  color: #6b7280;
163
163
 
@@ -274,7 +274,7 @@ Resources:
274
274
  border-color: var(--fail-light);
275
275
  border-bottom-color: var(--fail-light);
276
276
  }
277
- `;var A4=a=>!!String(a).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),D1=a=>{var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;a=a.replace(e,function(i,o,n,p){return o+o+n+n+p+p});var l=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return{r:parseInt((l==null?void 0:l[1])||"00",16),g:parseInt((l==null?void 0:l[2])||"00",16),b:parseInt((l==null?void 0:l[3])||"00",16)}};import{Fragment as C5,jsx as t1,jsxs as L2}from"react/jsx-runtime";var U1=()=>{let[a,e]=y2(""),[l,i]=y2(!1),[o,n]=y2(null),{authenticated:p}=_(),{loginWithEmail:m}=y(),{navigate:b,options:g}=u(),w=g.wallet;a5(()=>{let s=document.querySelector("#email-input");s==null||s.focus()},[]);let M=A4(a);return L2(C5,{children:[L2(l5,{children:[L2(o5,{children:[t1(E4,{}),t1("input",{id:"email-input",type:"email",placeholder:"your@email.com",onChange:s=>e(s.target.value),onKeyUp:s=>{s.key==="Enter"&&(i(!0),m(a).then(()=>{b("AWAITING_EMAIL_CODE")}).catch(Z=>{(Z==null?void 0:Z.status)===422?n(Z.message):n("Issue submitting email"),i(!1)}))},value:a,autoComplete:"email"})]}),t1(i5,{disabled:l||!M,onClick:()=>{i(!0),m(a).then(()=>{b("AWAITING_EMAIL_CODE")}).catch(s=>{(s==null?void 0:s.status)===422?n(s.message):n("Issue submitting email"),i(!1)})},children:l?t1(Z2,{color:"var(--disabled-fg)",style:{height:"1rem",width:"1rem",borderWidth:"2px"}}):"Submit"})]}),o?t1(n5,{fail:!!o,children:o||""}):null,!p&&!o&&w?t1(r5,{children:t1("span",{children:"You\u2019ll be able to connect a wallet later."})}):null]})},l5=M1.div`
277
+ `;var A4=a=>!!String(a).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),D1=a=>{var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;a=a.replace(e,function(i,o,r,p){return o+o+r+r+p+p});var l=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return{r:parseInt((l==null?void 0:l[1])||"00",16),g:parseInt((l==null?void 0:l[2])||"00",16),b:parseInt((l==null?void 0:l[3])||"00",16)}};import{Fragment as C5,jsx as t1,jsxs as L2}from"react/jsx-runtime";var U1=()=>{let[a,e]=y2(""),[l,i]=y2(!1),[o,r]=y2(null),{authenticated:p}=_(),{loginWithEmail:b}=y(),{navigate:k,options:g}=m(),w=g.wallet;a5(()=>{let s=document.querySelector("#email-input");s==null||s.focus()},[]);let M=A4(a);return L2(C5,{children:[L2(l5,{children:[L2(o5,{children:[t1(E4,{}),t1("input",{id:"email-input",type:"email",placeholder:"your@email.com",onChange:s=>e(s.target.value),onKeyUp:s=>{s.key==="Enter"&&(i(!0),b(a).then(()=>{k("AWAITING_EMAIL_CODE")}).catch(Z=>{(Z==null?void 0:Z.status)===422?r(Z.message):r("Issue submitting email"),i(!1)}))},value:a,autoComplete:"email"})]}),t1(i5,{disabled:l||!M,onClick:()=>{i(!0),b(a).then(()=>{k("AWAITING_EMAIL_CODE")}).catch(s=>{(s==null?void 0:s.status)===422?r(s.message):r("Issue submitting email"),i(!1)})},children:l?t1(Z2,{color:"var(--disabled-fg)",style:{height:"1rem",width:"1rem",borderWidth:"2px"}}):"Submit"})]}),o?t1(n5,{fail:!!o,children:o||""}):null,!p&&!o&&w?t1(r5,{children:t1("span",{children:"You\u2019ll be able to connect a wallet later."})}):null]})},l5=M1.div`
278
278
  display: flex;
279
279
  border: 1px solid #d1d5db;
280
280
  width: 100%;
@@ -358,7 +358,7 @@ Resources:
358
358
  opacity: ${a=>a.success||a.fail?"1":"0"};
359
359
 
360
360
  transition: ${a=>a.fail?"":"all 150ms ease-in-out"};
361
- `;import{Fragment as V1,jsx as L,jsxs as q}from"react/jsx-runtime";var T4=()=>{let{ready:a,authenticated:e,user:l}=_(),{navigate:i,options:o}=u(),n=o.email,p=o.wallet,m=o.google,b=o.twitter,g=o.discord,w=p?0:1,[M,s]=d5(w);s5(()=>{var F,r,C,h,E;let D=(l==null?void 0:l.google)||(l==null?void 0:l.twitter)||(l==null?void 0:l.discord),S=(l==null?void 0:l.google)&&(l==null?void 0:l.twitter)&&(l==null?void 0:l.discord);a&&e&&(D?(F=l.wallet)!=null&&F.address||i("CONNECT_WALLET_OPTIONAL"):((r=l==null?void 0:l.email)==null?void 0:r.address)&&!((C=l.wallet)!=null&&C.address)?i("CONNECT_WALLET_OPTIONAL"):((h=l==null?void 0:l.wallet)==null?void 0:h.address)&&!((E=l.email)!=null&&E.address)?i("CONNECT_EMAIL_OPTIONAL"):S&&(console.error("Launched modal, but nothing left to connect."),i("FULLY_LINKED_SCREEN")))},[a]);let Z=M==0,W=M==1;return q(V1,{children:[L(A,{},"header"),q($,{children:[L(v2,{children:L("h2",{children:"Connect with"})}),p&&L(c5,{active:Z,onClick:()=>s(0)}),n&&L(p5,{active:W,onClick:()=>s(1),google:m,twitter:b,discord:g})]}),L(j,{protectedByPrivy:!0})]})};function c5(a){return q(P4,{active:a.active,onClick:a.onClick,children:[L(v2,{active:a.active,children:L("h3",{children:"Wallet"})}),a.active&&q(V1,{children:[L(I1,{}),L(R1,{})]})]})}function p5(a){let e=a.google||a.twitter||a.discord;return q(P4,{active:a.active,onClick:a.onClick,children:[L(v2,{active:a.active,children:L("h3",{children:e?"Email & Social":"Email"})}),q(V1,{children:[a.active&&L(U1,{}),a.active&&e&&L(h5,{google:a.google,twitter:a.twitter,discord:a.discord})]})]})}function h5(a){return q(V1,{children:[q(f5,{children:[L(_4,{}),L("p",{children:" Or "}),L(_4,{})]}),L(L4,{showGoogle:a.google,showDiscord:a.discord,showTwitter:a.twitter})]})}var v2=F1.div`
361
+ `;import{Fragment as V1,jsx as L,jsxs as q}from"react/jsx-runtime";var T4=()=>{let{ready:a,authenticated:e,user:l}=_(),{navigate:i,options:o}=m(),r=o.email,p=o.wallet,b=o.google,k=o.twitter,g=o.discord,w=p?0:1,[M,s]=d5(w);s5(()=>{var F,n,C,h,E;let D=(l==null?void 0:l.google)||(l==null?void 0:l.twitter)||(l==null?void 0:l.discord),I=(l==null?void 0:l.google)&&(l==null?void 0:l.twitter)&&(l==null?void 0:l.discord);a&&e&&(D?(F=l.wallet)!=null&&F.address||i("CONNECT_WALLET_OPTIONAL"):((n=l==null?void 0:l.email)==null?void 0:n.address)&&!((C=l.wallet)!=null&&C.address)?i("CONNECT_WALLET_OPTIONAL"):((h=l==null?void 0:l.wallet)==null?void 0:h.address)&&!((E=l.email)!=null&&E.address)?i("CONNECT_EMAIL_OPTIONAL"):I&&(console.error("Launched modal, but nothing left to connect."),i("FULLY_LINKED_SCREEN")))},[a]);let Z=M==0,T=M==1;return q(V1,{children:[L(A,{},"header"),q($,{children:[L(v2,{children:L("h2",{children:"Connect with"})}),p&&L(c5,{active:Z,onClick:()=>s(0)}),r&&L(p5,{active:T,onClick:()=>s(1),google:b,twitter:k,discord:g})]}),L(j,{protectedByPrivy:!0})]})};function c5(a){return q(P4,{active:a.active,onClick:a.onClick,children:[L(v2,{active:a.active,children:L("h3",{children:"Wallet"})}),a.active&&q(V1,{children:[L(I1,{}),L(R1,{})]})]})}function p5(a){let e=a.google||a.twitter||a.discord;return q(P4,{active:a.active,onClick:a.onClick,children:[L(v2,{active:a.active,children:L("h3",{children:e?"Email & Social":"Email"})}),q(V1,{children:[a.active&&L(U1,{}),a.active&&e&&L(h5,{google:a.google,twitter:a.twitter,discord:a.discord})]})]})}function h5(a){return q(V1,{children:[q(f5,{children:[L(_4,{}),L("p",{children:" Or "}),L(_4,{})]}),L(L4,{showGoogle:a.google,showDiscord:a.discord,showTwitter:a.twitter})]})}var v2=F1.div`
362
362
  font-weight: ${a=>a.active?600:500};
363
363
  color: ${a=>a.active?"inherit":"#6b7280"};
364
364
  display: flex;
@@ -397,7 +397,7 @@ Resources:
397
397
  border-top: 1px solid #d1d5db;
398
398
  margin: 0px 8px;
399
399
  }
400
- `;import{useEffect as S4,useState as H1}from"react";import B1 from"styled-components";import{Fragment as g5,jsx as K,jsxs as g1}from"react/jsx-runtime";var u5=1400;var I4=()=>{var r;let{navigate:a,app:e}=u(),{closePrivyModal:l,resendEmailCode:i,getAuthMeta:o,loginWithCode:n}=y(),{authenticated:p,user:m}=_(),[b,g]=H1(["","","","",""]),[w,M]=H1(!1),[s,Z]=H1(null),[W,D]=H1(null);S4(()=>{if(p&&w){let C=setTimeout(()=>{var h;(h=m==null?void 0:m.wallet)!=null&&h.address?l():a("CONNECT_WALLET_OPTIONAL")},z);return()=>clearTimeout(C)}},[p,w,m]),S4(()=>{if(s&&W===0){let C=setTimeout(()=>{g(["","","","",""]),Z(null);let h=document.querySelector("input[name=code-0]");h==null||h.focus()},u5);return()=>clearTimeout(C)}},[s]);let S=C=>{var N2;let h=C.currentTarget.value.replace(" ","");if(h==="")return;if(isNaN(Number(h))){Z("Code should be numeric"),D(1);return}Z(null),D(null);let E=Number((N2=C.currentTarget.name)==null?void 0:N2.charAt(5)),e2=[...h||[""]].slice(0,5-E),a2=[...b.slice(0,E),...e2,...b.slice(E+e2.length)];g(a2);let n3=e2.length,W2=Math.min(Math.max(E+n3,0),4);if(!isNaN(Number(C.currentTarget.value))){let U=document.querySelector(`input[name=code-${W2}]`);U==null||U.focus()}if(a2.every(U=>U&&!isNaN(+U))){let U=document.querySelector(`input[name=code-${W2}]`);U==null||U.blur(),n(a2.join("")).then(()=>M(!0)).catch(l2=>{(l2==null?void 0:l2.status)===422?Z("Invalid or expired verification code"):Z("Issue verifying code"),D(0)})}C.preventDefault()},F=C=>{W===1&&(Z(null),D(null));let h=[...b.slice(0,C),"",...b.slice(C+1)];if(g(h),C>0){let E=document.querySelector(`input[name=code-${C-1}]`);E==null||E.focus()}};return g1(g5,{children:[K(A,{},"header"),g1(m5,{children:[g1("p",{children:["Please check ",(r=o())==null?void 0:r.email," for an email from ",(e==null?void 0:e.name)||"privy.io"," and enter your code below."]}),g1(b5,{children:[K("div",{children:b.map((C,h)=>K("input",{name:`code-${h}`,type:"text",value:b[h],onChange:S,onKeyUp:E=>{E.key==="Backspace"&&F(h)},inputMode:"numeric",autoFocus:h===0,pattern:"[0-9]",className:`${w?"success":""} ${s?"fail":""}`,autoComplete:"one-time-code"},h))}),K(k5,{fail:!!s,success:w,children:K("span",{children:s||(w?"Success!":"")})})]}),g1(M5,{children:[K("span",{children:"Didn\u2019t get an email?"}),K("button",{onClick:i,children:"Resend Code"})]})]}),K(j,{protectedByPrivy:!0})]})},m5=B1.div`
400
+ `;import{useEffect as S4,useState as H1}from"react";import B1 from"styled-components";import{Fragment as g5,jsx as K,jsxs as g1}from"react/jsx-runtime";var u5=1400;var I4=()=>{var n;let{navigate:a,app:e}=m(),{closePrivyModal:l,resendEmailCode:i,getAuthMeta:o,loginWithCode:r}=y(),{authenticated:p,user:b}=_(),[k,g]=H1(["","","","",""]),[w,M]=H1(!1),[s,Z]=H1(null),[T,D]=H1(null);S4(()=>{if(p&&w){let C=setTimeout(()=>{var h;(h=b==null?void 0:b.wallet)!=null&&h.address?l():a("CONNECT_WALLET_OPTIONAL")},z);return()=>clearTimeout(C)}},[p,w,b]),S4(()=>{if(s&&T===0){let C=setTimeout(()=>{g(["","","","",""]),Z(null);let h=document.querySelector("input[name=code-0]");h==null||h.focus()},u5);return()=>clearTimeout(C)}},[s]);let I=C=>{var N2;let h=C.currentTarget.value.replace(" ","");if(h==="")return;if(isNaN(Number(h))){Z("Code should be numeric"),D(1);return}Z(null),D(null);let E=Number((N2=C.currentTarget.name)==null?void 0:N2.charAt(5)),e2=[...h||[""]].slice(0,5-E),a2=[...k.slice(0,E),...e2,...k.slice(E+e2.length)];g(a2);let n3=e2.length,W2=Math.min(Math.max(E+n3,0),4);if(!isNaN(Number(C.currentTarget.value))){let U=document.querySelector(`input[name=code-${W2}]`);U==null||U.focus()}if(a2.every(U=>U&&!isNaN(+U))){let U=document.querySelector(`input[name=code-${W2}]`);U==null||U.blur(),r(a2.join("")).then(()=>M(!0)).catch(l2=>{(l2==null?void 0:l2.status)===422?Z("Invalid or expired verification code"):Z("Issue verifying code"),D(0)})}C.preventDefault()},F=C=>{T===1&&(Z(null),D(null));let h=[...k.slice(0,C),"",...k.slice(C+1)];if(g(h),C>0){let E=document.querySelector(`input[name=code-${C-1}]`);E==null||E.focus()}};return g1(g5,{children:[K(A,{},"header"),g1(m5,{children:[g1("p",{children:["Please check ",(n=o())==null?void 0:n.email," for an email from ",(e==null?void 0:e.name)||"privy.io"," and enter your code below."]}),g1(b5,{children:[K("div",{children:k.map((C,h)=>K("input",{name:`code-${h}`,type:"text",value:k[h],onChange:I,onKeyUp:E=>{E.key==="Backspace"&&F(h)},inputMode:"numeric",autoFocus:h===0,pattern:"[0-9]",className:`${w?"success":""} ${s?"fail":""}`,autoComplete:"one-time-code"},h))}),K(k5,{fail:!!s,success:w,children:K("span",{children:s||(w?"Success!":"")})})]}),g1(M5,{children:[K("span",{children:"Didn\u2019t get an email?"}),K("button",{onClick:i,children:"Resend Code"})]})]}),K(j,{protectedByPrivy:!0})]})},m5=B1.div`
401
401
  display: flex;
402
402
  flex-direction: column;
403
403
  align-items: flex-start;
@@ -544,7 +544,7 @@ Resources:
544
544
  margin-top: auto;
545
545
  margin-bottom: auto;
546
546
  }
547
- `;import{jsx as c,jsxs as q1}from"react/jsx-runtime";var V4=({style:a,...e})=>q1("svg",{width:"286",height:"183",viewBox:"0 0 286 183",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"1.25rem",width:"1.25rem",...a},...e,children:[c("rect",{x:"198.5",y:"133",width:"50",height:"50",rx:"25",fill:"#E1E7EF"}),c("path",{d:"M236.373 144.791L225.206 153.052L227.289 148.181L236.373 144.791Z",fill:"#E17726",stroke:"#E17726",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M210.627 144.791L221.692 153.116L219.711 148.187L210.627 144.785V144.791ZM232.353 163.933L229.377 168.47L235.738 170.219L237.557 164.036L232.347 163.933H232.353ZM209.448 164.036L211.257 170.219L217.602 168.47L214.647 163.933L209.448 164.036Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M217.262 156.27L215.497 158.939L221.783 159.23L221.579 152.46L217.262 156.281V156.27V156.27ZM229.737 156.281L225.351 152.374L225.206 159.23L231.492 158.939L229.732 156.281H229.737ZM217.602 168.475L221.417 166.64L218.14 164.089L217.607 168.475H217.602ZM225.588 166.63L229.377 168.475L228.865 164.084L225.588 166.635V166.63Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M229.377 168.47L225.588 166.635L225.895 169.1L225.862 170.144L229.382 168.47H229.377ZM217.602 168.47L221.137 170.144L221.11 169.1L221.417 166.635L217.602 168.47V168.47Z",fill:"#D5BFB2",stroke:"#D5BFB2",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M221.197 162.448L218.054 161.533L220.282 160.516L221.207 162.453H221.197V162.448ZM225.793 162.448L226.729 160.505L228.962 161.522L225.793 162.459V162.448Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M217.602 168.47L218.156 163.933L214.647 164.035L217.602 168.47V168.47ZM228.844 163.933L229.377 168.47L232.353 164.035L228.844 163.933V163.933ZM231.503 158.939L225.217 159.23L225.793 162.459L226.729 160.505L228.962 161.522L231.503 158.939V158.939ZM218.054 161.533L220.282 160.516L221.207 162.453L221.794 159.224L215.508 158.944L218.059 161.538L218.054 161.533Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M215.503 158.939L218.134 164.078L218.048 161.528L215.497 158.934L215.503 158.939ZM228.962 161.533L228.86 164.084L231.492 158.944L228.957 161.538L228.962 161.533ZM221.794 159.23L221.196 162.459L221.945 166.263L222.117 161.242L221.794 159.23ZM225.211 159.23L224.904 161.237L225.055 166.269L225.792 162.453L225.206 159.224V159.235L225.211 159.23Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M225.793 162.448L225.055 166.263L225.588 166.635L228.86 164.084L228.962 161.528L225.793 162.448V162.448ZM218.054 161.528L218.14 164.078L221.417 166.629L221.945 166.263L221.207 162.448L218.048 161.528H218.059H218.054Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M225.868 170.144L225.895 169.1L225.604 168.863H221.39L221.11 169.1L221.137 170.144L217.602 168.47L218.845 169.487L221.353 171.215H225.642L228.155 169.482L229.377 168.47L225.857 170.144H225.868V170.144Z",fill:"#C0AC9D",stroke:"#C0AC9D",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M225.588 166.63L225.055 166.264H221.945L221.417 166.635L221.11 169.1L221.39 168.863H225.604L225.895 169.1L225.588 166.635V166.624V166.63Z",fill:"#161616",stroke:"#161616",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M236.846 153.585L237.783 149.037L236.373 144.791L225.583 152.777L229.737 156.27L235.598 157.976L236.889 156.475L236.33 156.066L237.223 155.248L236.545 154.72L237.438 154.042L236.846 153.585H236.857H236.846ZM209.217 149.032L210.17 153.585L209.556 154.037L210.466 154.715L209.787 155.248L210.67 156.066L210.11 156.475L211.402 157.976L217.263 156.275L221.417 152.767L210.627 144.791L209.217 149.032V149.032Z",fill:"#763E1A",stroke:"#763E1A",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M235.598 157.976L229.737 156.275L231.502 158.934L228.871 164.073L232.353 164.03H237.562L235.598 157.97V157.976ZM217.263 156.27L211.402 157.976L209.448 164.035H214.658L218.14 164.079L215.508 158.939L217.273 156.27H217.263V156.27ZM225.206 159.224L225.588 152.766L227.289 148.176H219.711L221.412 152.766L221.794 159.224L221.939 161.248V166.263H225.055L225.071 161.248L225.206 159.224V159.224Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("rect",{x:"192",y:"30",width:"50",height:"50",rx:"25",fill:"#0C5BFF"}),c("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M205 55C205 61.6274 210.373 67 217 67C223.627 67 229 61.6274 229 55C229 48.3726 223.627 43 217 43C210.373 43 205 48.3726 205 55ZM213.933 51.1333C213.491 51.1333 213.133 51.4915 213.133 51.9333V58.0667C213.133 58.5085 213.491 58.8667 213.933 58.8667H220.067C220.508 58.8667 220.867 58.5085 220.867 58.0667V51.9333C220.867 51.4915 220.508 51.1333 220.067 51.1333H213.933Z",fill:"white"}),c("rect",{x:"39.5",y:"18",width:"50",height:"50",rx:"25",fill:"url(#paint0_linear_428_81)"}),c("path",{d:"M77.3677 42.8335H74.102C74.102 36.2519 68.6881 30.9167 62.0091 30.9167C55.4129 30.9167 50.0501 36.1213 49.9189 42.5901C49.7831 49.2769 56.1492 55.0834 62.9357 55.0834H63.7893C69.7724 55.0834 77.7916 50.468 79.0445 44.8444C79.2758 43.8079 78.445 42.8335 77.3677 42.8335ZM57.1562 43.1267C57.1562 44.0068 56.4257 44.7267 55.5325 44.7267C54.6394 44.7267 53.9089 44.0065 53.9089 43.1267V40.5383C53.9089 39.6582 54.6394 38.9383 55.5325 38.9383C56.4257 38.9383 57.1562 39.6582 57.1562 40.5383V43.1267ZM62.794 43.1267C62.794 44.0068 62.0636 44.7267 61.1705 44.7267C60.2773 44.7267 59.5468 44.0065 59.5468 43.1267V40.5383C59.5468 39.6582 60.2776 38.9383 61.1705 38.9383C62.0636 38.9383 62.794 39.6582 62.794 40.5383V43.1267Z",fill:"url(#paint1_linear_428_81)"}),c("rect",{x:"46.5",y:"124",width:"50",height:"50",rx:"25",fill:"#141414"}),c("g",{clipPath:"url(#clip0_428_81)",children:c("path",{d:"M62.1497 143.578C67.3134 138.585 75.6867 138.585 80.8505 143.578L81.4722 144.179C81.5335 144.238 81.5822 144.308 81.6155 144.386C81.6488 144.463 81.666 144.547 81.666 144.631C81.666 144.715 81.6488 144.799 81.6155 144.876C81.5822 144.954 81.5335 145.024 81.4722 145.083L79.3462 147.139C79.2835 147.199 79.1996 147.232 79.1123 147.232C79.025 147.232 78.9411 147.199 78.8784 147.139L78.0232 146.311C74.421 142.829 68.58 142.829 64.977 146.311L64.0611 147.197C63.9984 147.257 63.9145 147.29 63.8272 147.29C63.7399 147.29 63.656 147.257 63.5933 147.197L61.4672 145.141C61.4059 145.083 61.3572 145.012 61.3239 144.935C61.2906 144.857 61.2735 144.774 61.2735 144.689C61.2735 144.605 61.2906 144.521 61.3239 144.444C61.3572 144.366 61.4059 144.296 61.4672 144.237L62.1497 143.578ZM85.248 147.829L87.1397 149.659C87.201 149.718 87.2497 149.788 87.283 149.865C87.3163 149.943 87.3334 150.027 87.3334 150.111C87.3334 150.195 87.3163 150.279 87.283 150.356C87.2497 150.434 87.201 150.504 87.1397 150.563L78.6081 158.812C78.4828 158.933 78.315 159 78.1403 159C77.9656 159 77.7978 158.933 77.6725 158.812L71.6177 152.957C71.5864 152.927 71.5443 152.91 71.5005 152.91C71.4567 152.91 71.4147 152.927 71.3833 152.957L65.3285 158.812C65.2032 158.933 65.0354 159 64.8607 159C64.686 159 64.5182 158.933 64.3929 158.812L55.8605 150.563C55.7992 150.504 55.7505 150.434 55.7172 150.356C55.6839 150.279 55.6667 150.195 55.6667 150.111C55.6667 150.027 55.6839 149.943 55.7172 149.865C55.7505 149.788 55.7992 149.718 55.8605 149.659L57.7531 147.829C57.8783 147.709 58.0459 147.642 58.2204 147.642C58.3949 147.642 58.5625 147.709 58.6878 147.829L64.7427 153.684C64.774 153.714 64.816 153.731 64.8598 153.731C64.9036 153.731 64.9457 153.714 64.977 153.684L71.0319 147.829C71.1572 147.709 71.325 147.641 71.4997 147.641C71.6743 147.641 71.8422 147.709 71.9675 147.829L78.0232 153.684C78.0545 153.714 78.0965 153.731 78.1403 153.731C78.1841 153.731 78.2262 153.714 78.2575 153.684L84.3124 147.829C84.4377 147.709 84.6055 147.641 84.7802 147.641C84.9549 147.641 85.1227 147.709 85.248 147.829Z",fill:"white"})}),c("rect",{x:"103.5",y:"58",width:"78",height:"78",rx:"39",fill:"white"}),c("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M131.626 83.0058C128.674 83.3405 126.5 85.8652 126.5 88.8363V92.0779V103.277V105.099C126.5 108.098 128.713 110.636 131.695 110.952C134.982 111.301 139.216 111.667 142.5 111.667C147.147 111.667 153.695 110.934 156.773 110.555C157.765 110.433 158.5 109.588 158.5 108.589V92.0779C158.5 91.0782 157.765 90.2337 156.773 90.1115C153.705 89.7336 147.189 89.0046 142.545 88.9999L142.5 88.9999L142.46 88.9999C139.655 89.0025 136.165 89.2695 133.166 89.564C132.488 89.5642 131.907 89.0495 131.84 88.3608C131.768 87.6279 132.304 86.9755 133.037 86.9036C136.061 86.6067 139.621 86.3333 142.5 86.3333C145.707 86.3333 149.764 86.6728 152.989 87.007C154.039 87.1159 155.006 87.2247 155.833 87.3221V85.3898C155.833 84.3995 155.112 83.56 154.131 83.4288C151.262 83.0454 145.367 82.3333 141.167 82.3333C138.276 82.3333 134.583 82.6705 131.626 83.0058ZM153.833 102.333C154.938 102.333 155.833 101.438 155.833 100.333C155.833 99.2287 154.938 98.3333 153.833 98.3333C152.729 98.3333 151.833 99.2287 151.833 100.333C151.833 101.438 152.729 102.333 153.833 102.333Z",fill:"#696FFD"}),c("rect",{x:"103.5",y:"58",width:"78",height:"78",rx:"39",stroke:"#E1E7EF",strokeWidth:"2"}),c("path",{d:"M269.405 111C278.27 111 285.457 103.837 285.457 95C285.457 86.1634 278.27 79 269.405 79C260.54 79 253.354 86.1634 253.354 95C253.354 103.837 260.54 111 269.405 111Z",fill:"#B9BBFE"}),c("path",{d:"M133.971 24C140.62 24 146.01 18.6274 146.01 12C146.01 5.37258 140.62 0 133.971 0C127.322 0 121.932 5.37258 121.932 12C121.932 18.6274 127.322 24 133.971 24Z",fill:"#B9BBFE"}),c("path",{d:"M15.5917 112C20.5782 112 24.6206 107.971 24.6206 103C24.6206 98.0294 20.5782 94 15.5917 94C10.6051 94 6.56274 98.0294 6.56274 103C6.56274 107.971 10.6051 112 15.5917 112Z",fill:"#B9BBFE"}),c("path",{d:"M152.029 177C157.57 177 162.061 172.523 162.061 167C162.061 161.477 157.57 157 152.029 157C146.488 157 141.997 161.477 141.997 167C141.997 172.523 146.488 177 152.029 177Z",fill:"#E9E9FF"}),c("path",{d:"M263.386 21C267.818 21 271.412 17.4183 271.412 13C271.412 8.58172 267.818 5 263.386 5C258.953 5 255.36 8.58172 255.36 13C255.36 17.4183 258.953 21 263.386 21Z",fill:"#E9E9FF"}),c("path",{d:"M7.06436 36C10.6658 36 13.5853 33.0899 13.5853 29.5C13.5853 25.9101 10.6658 23 7.06436 23C3.46296 23 0.543457 25.9101 0.543457 29.5C0.543457 33.0899 3.46296 36 7.06436 36Z",fill:"#E9E9FF"}),q1("defs",{children:[q1("linearGradient",{id:"paint0_linear_428_81",x1:"64.5",y1:"18",x2:"64.5",y2:"68",gradientUnits:"userSpaceOnUse",children:[c("stop",{stopColor:"#534BB1"}),c("stop",{offset:"1",stopColor:"#551BF9"})]}),q1("linearGradient",{id:"paint1_linear_428_81",x1:"64.5",y1:"30.9167",x2:"64.5",y2:"55.0834",gradientUnits:"userSpaceOnUse",children:[c("stop",{stopColor:"white"}),c("stop",{offset:"1",stopColor:"white",stopOpacity:"0.82"})]}),c("clipPath",{id:"clip0_428_81",children:c("rect",{width:"31.6667",height:"19.1667",fill:"white",transform:"translate(55.6667 139.833)"})})]})]});import*as Y from"react-device-detect";import{Fragment as _2,jsx as d,jsxs as v}from"react/jsx-runtime";var _5=()=>{let{navigate:a}=u(),e="https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en";return Y.isFirefox&&(e="https://addons.mozilla.org/en-US/firefox/addon/ether-metamask/"),v(z4,{children:[v(j4,{children:[d("h3",{children:"Create a wallet with Metamask"}),d(X,{style:{width:"152px",height:"152px"}})]}),v(A2,{children:[d(h1,{children:v("div",{children:[d("span",{children:"Install the "}),d("a",{href:e,target:"_blank",children:"MetaMask browser extension"})]})}),d($1,{}),d(h1,{children:"Set up your first wallet"})]}),d($4,{onClick:()=>a("LANDING"),children:"Done! I have my wallet"})]})},T2=()=>{let{navigate:a}=u();return v(z4,{children:[v(j4,{children:[d("h3",{children:"Create a wallet with Coinbase"}),d(D4,{style:{width:"152px",height:"152px"}})]}),v(A2,{children:[d(h1,{children:"Open the camera on your phone"}),d($1,{}),d(h1,{children:"Scan the QR code with your camera"}),d($1,{}),d(h1,{children:"Click the link and download the app"})]}),d($4,{onClick:()=>a("LANDING"),children:"Done! I have my wallet"})]})},G4=()=>{let[a,e]=A5("WHAT_IS_A_WALLET"),{navigateBack:l}=u();return v(_2,{children:[d(A,{backFn:a==="WHAT_IS_A_WALLET"?l:a==="PICK_A_NEW_WALLET"?()=>e("WHAT_IS_A_WALLET"):()=>e("PICK_A_NEW_WALLET")},"header"),v(T5,{children:[a==="WHAT_IS_A_WALLET"&&v(_2,{children:[d(S1,{children:d(V4,{style:{width:"100%",height:"auto",borderRadius:"var(--border-radius-sm)"}})}),v(P5,{children:[d("h3",{children:"What is a wallet?"}),d("p",{children:"Wallets are how you can store, send, and receive cryptocurrencies and NFTs. They are also a new way\xA0to\xA0log\xA0in."}),d("p",{children:"Instead of creating new accounts and passwords every time you explore crypto apps, you can just connect\xA0your\xA0wallet."})]}),d(R5,{children:d(W5,{onClick:()=>{e("PICK_A_NEW_WALLET")},children:"Get a Wallet"})})]}),a==="PICK_A_NEW_WALLET"&&d(_2,{children:v(S5,{children:[v("div",{children:[d("h3",{children:"Create a new wallet"}),d("p",{children:"Select one the wallet providers below to get started on your web3 adventure."})]}),v(I5,{children:[v(H4,{onClick:()=>{Y.isIOS?window.location.href="https://apps.apple.com/us/app/metamask-blockchain-wallet/id1438144202":Y.isAndroid?window.location.href="https://play.google.com/store/apps/details?id=io.metamask":e("CREATE_METAMASK_WALLET")},children:[d(X,{}),d(B4,{children:d("h4",{children:"MetaMask"})}),d("div",{children:d("span",{children:"Set up"})})]}),v(H4,{onClick:()=>{Y.isIOS?window.location.href="https://apps.apple.com/us/app/coinbase-wallet-nfts-crypto/id1278383455":Y.isAndroid?window.location.href="https://play.google.com/store/apps/details?id=org.toshi":e("CREATE_COINBASE_WALLET")},children:[d(d1,{}),d(B4,{children:d("h4",{children:"Coinbase Wallet"})}),d("div",{children:d("span",{children:"Set up"})})]})]})]})}),a==="CREATE_COINBASE_WALLET"&&d(T2,{}),a==="CREATE_METAMASK_WALLET"&&d(_5,{})]}),v(Q,{children:[d("span",{children:"Still not sure? "}),d("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]})},T5=O.div`
547
+ `;import{jsx as c,jsxs as q1}from"react/jsx-runtime";var V4=({style:a,...e})=>q1("svg",{width:"286",height:"183",viewBox:"0 0 286 183",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"1.25rem",width:"1.25rem",...a},...e,children:[c("rect",{x:"198.5",y:"133",width:"50",height:"50",rx:"25",fill:"#E1E7EF"}),c("path",{d:"M236.373 144.791L225.206 153.052L227.289 148.181L236.373 144.791Z",fill:"#E17726",stroke:"#E17726",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M210.627 144.791L221.692 153.116L219.711 148.187L210.627 144.785V144.791ZM232.353 163.933L229.377 168.47L235.738 170.219L237.557 164.036L232.347 163.933H232.353ZM209.448 164.036L211.257 170.219L217.602 168.47L214.647 163.933L209.448 164.036Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M217.262 156.27L215.497 158.939L221.783 159.23L221.579 152.46L217.262 156.281V156.27V156.27ZM229.737 156.281L225.351 152.374L225.206 159.23L231.492 158.939L229.732 156.281H229.737ZM217.602 168.475L221.417 166.64L218.14 164.089L217.607 168.475H217.602ZM225.588 166.63L229.377 168.475L228.865 164.084L225.588 166.635V166.63Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M229.377 168.47L225.588 166.635L225.895 169.1L225.862 170.144L229.382 168.47H229.377ZM217.602 168.47L221.137 170.144L221.11 169.1L221.417 166.635L217.602 168.47V168.47Z",fill:"#D5BFB2",stroke:"#D5BFB2",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M221.197 162.448L218.054 161.533L220.282 160.516L221.207 162.453H221.197V162.448ZM225.793 162.448L226.729 160.505L228.962 161.522L225.793 162.459V162.448Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M217.602 168.47L218.156 163.933L214.647 164.035L217.602 168.47V168.47ZM228.844 163.933L229.377 168.47L232.353 164.035L228.844 163.933V163.933ZM231.503 158.939L225.217 159.23L225.793 162.459L226.729 160.505L228.962 161.522L231.503 158.939V158.939ZM218.054 161.533L220.282 160.516L221.207 162.453L221.794 159.224L215.508 158.944L218.059 161.538L218.054 161.533Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M215.503 158.939L218.134 164.078L218.048 161.528L215.497 158.934L215.503 158.939ZM228.962 161.533L228.86 164.084L231.492 158.944L228.957 161.538L228.962 161.533ZM221.794 159.23L221.196 162.459L221.945 166.263L222.117 161.242L221.794 159.23ZM225.211 159.23L224.904 161.237L225.055 166.269L225.792 162.453L225.206 159.224V159.235L225.211 159.23Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M225.793 162.448L225.055 166.263L225.588 166.635L228.86 164.084L228.962 161.528L225.793 162.448V162.448ZM218.054 161.528L218.14 164.078L221.417 166.629L221.945 166.263L221.207 162.448L218.048 161.528H218.059H218.054Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M225.868 170.144L225.895 169.1L225.604 168.863H221.39L221.11 169.1L221.137 170.144L217.602 168.47L218.845 169.487L221.353 171.215H225.642L228.155 169.482L229.377 168.47L225.857 170.144H225.868V170.144Z",fill:"#C0AC9D",stroke:"#C0AC9D",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M225.588 166.63L225.055 166.264H221.945L221.417 166.635L221.11 169.1L221.39 168.863H225.604L225.895 169.1L225.588 166.635V166.624V166.63Z",fill:"#161616",stroke:"#161616",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M236.846 153.585L237.783 149.037L236.373 144.791L225.583 152.777L229.737 156.27L235.598 157.976L236.889 156.475L236.33 156.066L237.223 155.248L236.545 154.72L237.438 154.042L236.846 153.585H236.857H236.846ZM209.217 149.032L210.17 153.585L209.556 154.037L210.466 154.715L209.787 155.248L210.67 156.066L210.11 156.475L211.402 157.976L217.263 156.275L221.417 152.767L210.627 144.791L209.217 149.032V149.032Z",fill:"#763E1A",stroke:"#763E1A",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("path",{d:"M235.598 157.976L229.737 156.275L231.502 158.934L228.871 164.073L232.353 164.03H237.562L235.598 157.97V157.976ZM217.263 156.27L211.402 157.976L209.448 164.035H214.658L218.14 164.079L215.508 158.939L217.273 156.27H217.263V156.27ZM225.206 159.224L225.588 152.766L227.289 148.176H219.711L221.412 152.766L221.794 159.224L221.939 161.248V166.263H225.055L225.071 161.248L225.206 159.224V159.224Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),c("rect",{x:"192",y:"30",width:"50",height:"50",rx:"25",fill:"#0C5BFF"}),c("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M205 55C205 61.6274 210.373 67 217 67C223.627 67 229 61.6274 229 55C229 48.3726 223.627 43 217 43C210.373 43 205 48.3726 205 55ZM213.933 51.1333C213.491 51.1333 213.133 51.4915 213.133 51.9333V58.0667C213.133 58.5085 213.491 58.8667 213.933 58.8667H220.067C220.508 58.8667 220.867 58.5085 220.867 58.0667V51.9333C220.867 51.4915 220.508 51.1333 220.067 51.1333H213.933Z",fill:"white"}),c("rect",{x:"39.5",y:"18",width:"50",height:"50",rx:"25",fill:"url(#paint0_linear_428_81)"}),c("path",{d:"M77.3677 42.8335H74.102C74.102 36.2519 68.6881 30.9167 62.0091 30.9167C55.4129 30.9167 50.0501 36.1213 49.9189 42.5901C49.7831 49.2769 56.1492 55.0834 62.9357 55.0834H63.7893C69.7724 55.0834 77.7916 50.468 79.0445 44.8444C79.2758 43.8079 78.445 42.8335 77.3677 42.8335ZM57.1562 43.1267C57.1562 44.0068 56.4257 44.7267 55.5325 44.7267C54.6394 44.7267 53.9089 44.0065 53.9089 43.1267V40.5383C53.9089 39.6582 54.6394 38.9383 55.5325 38.9383C56.4257 38.9383 57.1562 39.6582 57.1562 40.5383V43.1267ZM62.794 43.1267C62.794 44.0068 62.0636 44.7267 61.1705 44.7267C60.2773 44.7267 59.5468 44.0065 59.5468 43.1267V40.5383C59.5468 39.6582 60.2776 38.9383 61.1705 38.9383C62.0636 38.9383 62.794 39.6582 62.794 40.5383V43.1267Z",fill:"url(#paint1_linear_428_81)"}),c("rect",{x:"46.5",y:"124",width:"50",height:"50",rx:"25",fill:"#141414"}),c("g",{clipPath:"url(#clip0_428_81)",children:c("path",{d:"M62.1497 143.578C67.3134 138.585 75.6867 138.585 80.8505 143.578L81.4722 144.179C81.5335 144.238 81.5822 144.308 81.6155 144.386C81.6488 144.463 81.666 144.547 81.666 144.631C81.666 144.715 81.6488 144.799 81.6155 144.876C81.5822 144.954 81.5335 145.024 81.4722 145.083L79.3462 147.139C79.2835 147.199 79.1996 147.232 79.1123 147.232C79.025 147.232 78.9411 147.199 78.8784 147.139L78.0232 146.311C74.421 142.829 68.58 142.829 64.977 146.311L64.0611 147.197C63.9984 147.257 63.9145 147.29 63.8272 147.29C63.7399 147.29 63.656 147.257 63.5933 147.197L61.4672 145.141C61.4059 145.083 61.3572 145.012 61.3239 144.935C61.2906 144.857 61.2735 144.774 61.2735 144.689C61.2735 144.605 61.2906 144.521 61.3239 144.444C61.3572 144.366 61.4059 144.296 61.4672 144.237L62.1497 143.578ZM85.248 147.829L87.1397 149.659C87.201 149.718 87.2497 149.788 87.283 149.865C87.3163 149.943 87.3334 150.027 87.3334 150.111C87.3334 150.195 87.3163 150.279 87.283 150.356C87.2497 150.434 87.201 150.504 87.1397 150.563L78.6081 158.812C78.4828 158.933 78.315 159 78.1403 159C77.9656 159 77.7978 158.933 77.6725 158.812L71.6177 152.957C71.5864 152.927 71.5443 152.91 71.5005 152.91C71.4567 152.91 71.4147 152.927 71.3833 152.957L65.3285 158.812C65.2032 158.933 65.0354 159 64.8607 159C64.686 159 64.5182 158.933 64.3929 158.812L55.8605 150.563C55.7992 150.504 55.7505 150.434 55.7172 150.356C55.6839 150.279 55.6667 150.195 55.6667 150.111C55.6667 150.027 55.6839 149.943 55.7172 149.865C55.7505 149.788 55.7992 149.718 55.8605 149.659L57.7531 147.829C57.8783 147.709 58.0459 147.642 58.2204 147.642C58.3949 147.642 58.5625 147.709 58.6878 147.829L64.7427 153.684C64.774 153.714 64.816 153.731 64.8598 153.731C64.9036 153.731 64.9457 153.714 64.977 153.684L71.0319 147.829C71.1572 147.709 71.325 147.641 71.4997 147.641C71.6743 147.641 71.8422 147.709 71.9675 147.829L78.0232 153.684C78.0545 153.714 78.0965 153.731 78.1403 153.731C78.1841 153.731 78.2262 153.714 78.2575 153.684L84.3124 147.829C84.4377 147.709 84.6055 147.641 84.7802 147.641C84.9549 147.641 85.1227 147.709 85.248 147.829Z",fill:"white"})}),c("rect",{x:"103.5",y:"58",width:"78",height:"78",rx:"39",fill:"white"}),c("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M131.626 83.0058C128.674 83.3405 126.5 85.8652 126.5 88.8363V92.0779V103.277V105.099C126.5 108.098 128.713 110.636 131.695 110.952C134.982 111.301 139.216 111.667 142.5 111.667C147.147 111.667 153.695 110.934 156.773 110.555C157.765 110.433 158.5 109.588 158.5 108.589V92.0779C158.5 91.0782 157.765 90.2337 156.773 90.1115C153.705 89.7336 147.189 89.0046 142.545 88.9999L142.5 88.9999L142.46 88.9999C139.655 89.0025 136.165 89.2695 133.166 89.564C132.488 89.5642 131.907 89.0495 131.84 88.3608C131.768 87.6279 132.304 86.9755 133.037 86.9036C136.061 86.6067 139.621 86.3333 142.5 86.3333C145.707 86.3333 149.764 86.6728 152.989 87.007C154.039 87.1159 155.006 87.2247 155.833 87.3221V85.3898C155.833 84.3995 155.112 83.56 154.131 83.4288C151.262 83.0454 145.367 82.3333 141.167 82.3333C138.276 82.3333 134.583 82.6705 131.626 83.0058ZM153.833 102.333C154.938 102.333 155.833 101.438 155.833 100.333C155.833 99.2287 154.938 98.3333 153.833 98.3333C152.729 98.3333 151.833 99.2287 151.833 100.333C151.833 101.438 152.729 102.333 153.833 102.333Z",fill:"#696FFD"}),c("rect",{x:"103.5",y:"58",width:"78",height:"78",rx:"39",stroke:"#E1E7EF",strokeWidth:"2"}),c("path",{d:"M269.405 111C278.27 111 285.457 103.837 285.457 95C285.457 86.1634 278.27 79 269.405 79C260.54 79 253.354 86.1634 253.354 95C253.354 103.837 260.54 111 269.405 111Z",fill:"#B9BBFE"}),c("path",{d:"M133.971 24C140.62 24 146.01 18.6274 146.01 12C146.01 5.37258 140.62 0 133.971 0C127.322 0 121.932 5.37258 121.932 12C121.932 18.6274 127.322 24 133.971 24Z",fill:"#B9BBFE"}),c("path",{d:"M15.5917 112C20.5782 112 24.6206 107.971 24.6206 103C24.6206 98.0294 20.5782 94 15.5917 94C10.6051 94 6.56274 98.0294 6.56274 103C6.56274 107.971 10.6051 112 15.5917 112Z",fill:"#B9BBFE"}),c("path",{d:"M152.029 177C157.57 177 162.061 172.523 162.061 167C162.061 161.477 157.57 157 152.029 157C146.488 157 141.997 161.477 141.997 167C141.997 172.523 146.488 177 152.029 177Z",fill:"#E9E9FF"}),c("path",{d:"M263.386 21C267.818 21 271.412 17.4183 271.412 13C271.412 8.58172 267.818 5 263.386 5C258.953 5 255.36 8.58172 255.36 13C255.36 17.4183 258.953 21 263.386 21Z",fill:"#E9E9FF"}),c("path",{d:"M7.06436 36C10.6658 36 13.5853 33.0899 13.5853 29.5C13.5853 25.9101 10.6658 23 7.06436 23C3.46296 23 0.543457 25.9101 0.543457 29.5C0.543457 33.0899 3.46296 36 7.06436 36Z",fill:"#E9E9FF"}),q1("defs",{children:[q1("linearGradient",{id:"paint0_linear_428_81",x1:"64.5",y1:"18",x2:"64.5",y2:"68",gradientUnits:"userSpaceOnUse",children:[c("stop",{stopColor:"#534BB1"}),c("stop",{offset:"1",stopColor:"#551BF9"})]}),q1("linearGradient",{id:"paint1_linear_428_81",x1:"64.5",y1:"30.9167",x2:"64.5",y2:"55.0834",gradientUnits:"userSpaceOnUse",children:[c("stop",{stopColor:"white"}),c("stop",{offset:"1",stopColor:"white",stopOpacity:"0.82"})]}),c("clipPath",{id:"clip0_428_81",children:c("rect",{width:"31.6667",height:"19.1667",fill:"white",transform:"translate(55.6667 139.833)"})})]})]});import*as Y from"react-device-detect";import{Fragment as _2,jsx as d,jsxs as v}from"react/jsx-runtime";var _5=()=>{let{navigate:a}=m(),e="https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en";return Y.isFirefox&&(e="https://addons.mozilla.org/en-US/firefox/addon/ether-metamask/"),v(z4,{children:[v(j4,{children:[d("h3",{children:"Create a wallet with Metamask"}),d(X,{style:{width:"152px",height:"152px"}})]}),v(A2,{children:[d(h1,{children:v("div",{children:[d("span",{children:"Install the "}),d("a",{href:e,target:"_blank",children:"MetaMask browser extension"})]})}),d($1,{}),d(h1,{children:"Set up your first wallet"})]}),d($4,{onClick:()=>a("LANDING"),children:"Done! I have my wallet"})]})},T2=()=>{let{navigate:a}=m();return v(z4,{children:[v(j4,{children:[d("h3",{children:"Create a wallet with Coinbase"}),d(D4,{style:{width:"152px",height:"152px"}})]}),v(A2,{children:[d(h1,{children:"Open the camera on your phone"}),d($1,{}),d(h1,{children:"Scan the QR code with your camera"}),d($1,{}),d(h1,{children:"Click the link and download the app"})]}),d($4,{onClick:()=>a("LANDING"),children:"Done! I have my wallet"})]})},G4=()=>{let[a,e]=A5("WHAT_IS_A_WALLET"),{navigateBack:l}=m();return v(_2,{children:[d(A,{backFn:a==="WHAT_IS_A_WALLET"?l:a==="PICK_A_NEW_WALLET"?()=>e("WHAT_IS_A_WALLET"):()=>e("PICK_A_NEW_WALLET")},"header"),v(T5,{children:[a==="WHAT_IS_A_WALLET"&&v(_2,{children:[d(S1,{children:d(V4,{style:{width:"100%",height:"auto",borderRadius:"var(--border-radius-sm)"}})}),v(P5,{children:[d("h3",{children:"What is a wallet?"}),d("p",{children:"Wallets are how you can store, send, and receive cryptocurrencies and NFTs. They are also a new way\xA0to\xA0log\xA0in."}),d("p",{children:"Instead of creating new accounts and passwords every time you explore crypto apps, you can just connect\xA0your\xA0wallet."})]}),d(R5,{children:d(W5,{onClick:()=>{e("PICK_A_NEW_WALLET")},children:"Get a Wallet"})})]}),a==="PICK_A_NEW_WALLET"&&d(_2,{children:v(S5,{children:[v("div",{children:[d("h3",{children:"Create a new wallet"}),d("p",{children:"Select one the wallet providers below to get started on your web3 adventure."})]}),v(I5,{children:[v(H4,{onClick:()=>{Y.isIOS?window.location.href="https://apps.apple.com/us/app/metamask-blockchain-wallet/id1438144202":Y.isAndroid?window.location.href="https://play.google.com/store/apps/details?id=io.metamask":e("CREATE_METAMASK_WALLET")},children:[d(X,{}),d(B4,{children:d("h4",{children:"MetaMask"})}),d("div",{children:d("span",{children:"Set up"})})]}),v(H4,{onClick:()=>{Y.isIOS?window.location.href="https://apps.apple.com/us/app/coinbase-wallet-nfts-crypto/id1278383455":Y.isAndroid?window.location.href="https://play.google.com/store/apps/details?id=org.toshi":e("CREATE_COINBASE_WALLET")},children:[d(d1,{}),d(B4,{children:d("h4",{children:"Coinbase Wallet"})}),d("div",{children:d("span",{children:"Set up"})})]})]})]})}),a==="CREATE_COINBASE_WALLET"&&d(T2,{}),a==="CREATE_METAMASK_WALLET"&&d(_5,{})]}),v(Q,{children:[d("span",{children:"Still not sure? "}),d("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]})},T5=O.div`
548
548
  > svg {
549
549
  @media (max-width: 440px) {
550
550
  display: none;
@@ -664,7 +664,7 @@ Resources:
664
664
  background-color: #696efd1a;
665
665
  border-radius: var(--border-radius-sm);
666
666
  }
667
- `;import{useEffect as N5}from"react";import q4 from"styled-components";import{Fragment as U5,jsx as w1,jsxs as K1}from"react/jsx-runtime";var K4=()=>{let{user:a}=_(),{closePrivyModal:e}=y(),{app:l}=u();return N5(()=>{var i;if((i=a==null?void 0:a.email)!=null&&i.address){let o=setTimeout(()=>{e()},z);return()=>clearTimeout(o)}},[a]),K1(U5,{children:[w1(A,{},"header"),K1(D5,{children:[w1("h3",{children:"Connect your Email"}),K1("p",{children:["Add your email to your ",l==null?void 0:l.name," account so they can contact you about your account activity."]})]}),K1(O5,{children:[w1(U1,{}),w1(z1,{onClick:()=>{e()},className:"hide-on-mobile",children:"I\u2019ll do this later"})]}),w1(j,{protectedByPrivy:!0})]})},O5=q4($)`
667
+ `;import{useEffect as N5}from"react";import q4 from"styled-components";import{Fragment as U5,jsx as w1,jsxs as K1}from"react/jsx-runtime";var K4=()=>{let{user:a}=_(),{closePrivyModal:e}=y(),{app:l}=m();return N5(()=>{var i;if((i=a==null?void 0:a.email)!=null&&i.address){let o=setTimeout(()=>{e()},z);return()=>clearTimeout(o)}},[a]),K1(U5,{children:[w1(A,{},"header"),K1(D5,{children:[w1("h3",{children:"Connect your Email"}),K1("p",{children:["Add your email to your ",l==null?void 0:l.name," account so they can contact you about your account activity."]})]}),K1(O5,{children:[w1(U1,{}),w1(z1,{onClick:()=>{e()},className:"hide-on-mobile",children:"I\u2019ll do this later"})]}),w1(j,{protectedByPrivy:!0})]})},O5=q4($)`
668
668
  gap: 12px;
669
669
  `,D5=q4.div`
670
670
  display: flex;
@@ -684,7 +684,7 @@ Resources:
684
684
  font-size: 18px;
685
685
  color: #111827;
686
686
  }
687
- `;import{useEffect as Y4,useState as P2}from"react";import J1 from"styled-components";import{Fragment as G5,jsx as a1,jsxs as Y1}from"react/jsx-runtime";var S2=2,J4={metamask:{name:"MetaMask",component:X},coinbase_wallet:{name:"Coinbase Wallet",component:d1},wallet_connect:{name:"WalletConnect",component:P1}},X4=()=>{var F;let[a,e]=P2(!1),[l,i]=P2(void 0),{navigate:o,navigateBack:n}=u(),{getAuthMeta:p,closePrivyModal:m,loginWithWallet:b}=y(),[g,w]=P2(0),{user:M}=_();Y4(()=>{i(void 0),b().then(()=>e(!0)).catch(r=>{console.error(r),(r==null?void 0:r.status)===422?i(p2.ERROR_USER_EXISTS):r instanceof s1&&!r.details.default?i(r.details):i(p2.ERROR_WALLET_CONNECTION)})},[g]),Y4(()=>{var r;if((r=M==null?void 0:M.wallet)!=null&&r.address){e(!0);let C=setTimeout(()=>{var h;(h=M==null?void 0:M.email)!=null&&h.address?m():o("CONNECT_EMAIL_OPTIONAL")},z);return()=>clearTimeout(C)}},[M]);let s=((F=p())==null?void 0:F.wallet)||"metamask",Z=J4[s].name,W=J4[s].component,D=a?`Successfully connected with ${Z}`:l?l.message:`Waiting for ${Z}`,S="";if(a)S="You\u2019re good to go!";else if(g>=S2&&l)S="Unable to connect wallet";else if(l)S=l.detail;else switch(s){case"wallet_connect":S="Open your mobile wallet app to continue";break;default:S="Don\u2019t see your wallet modal? Check your other browser windows."}return Y1(G5,{children:[a1(d4,{backFn:n}),Y1(F5,{children:[a1(H5,{children:Y1("div",{children:[a1(x4,{success:a,fail:!!l}),a1(W,{style:{width:"38px",height:"38px"}})]})}),Y1(V5,{children:[a1("h3",{children:D}),a1("p",{children:S})]}),a1(B5,{onClick:()=>{w(g+1),i(void 0)},visible:!a&&(l==null?void 0:l.retryable)&&g<S2,disabled:!a&&!((l==null?void 0:l.retryable)&&g<S2),children:"Retry"})]})]})},F5=J1.div`
687
+ `;import{useEffect as Y4,useState as P2}from"react";import J1 from"styled-components";import{Fragment as G5,jsx as a1,jsxs as Y1}from"react/jsx-runtime";var S2=2,J4={metamask:{name:"MetaMask",component:X},coinbase_wallet:{name:"Coinbase Wallet",component:d1},wallet_connect:{name:"WalletConnect",component:P1}},X4=()=>{var F;let[a,e]=P2(!1),[l,i]=P2(void 0),{navigate:o,navigateBack:r}=m(),{getAuthMeta:p,closePrivyModal:b,loginWithWallet:k}=y(),[g,w]=P2(0),{user:M}=_();Y4(()=>{i(void 0),k().then(()=>e(!0)).catch(n=>{console.error(n),(n==null?void 0:n.status)===422?i(p2.ERROR_USER_EXISTS):n instanceof s1&&!n.details.default?i(n.details):i(p2.ERROR_WALLET_CONNECTION)})},[g]),Y4(()=>{var n;if((n=M==null?void 0:M.wallet)!=null&&n.address){e(!0);let C=setTimeout(()=>{var h;(h=M==null?void 0:M.email)!=null&&h.address?b():o("CONNECT_EMAIL_OPTIONAL")},z);return()=>clearTimeout(C)}},[M]);let s=((F=p())==null?void 0:F.wallet)||"metamask",Z=J4[s].name,T=J4[s].component,D=a?`Successfully connected with ${Z}`:l?l.message:`Waiting for ${Z}`,I="";if(a)I="You\u2019re good to go!";else if(g>=S2&&l)I="Unable to connect wallet";else if(l)I=l.detail;else switch(s){case"wallet_connect":I="Open your mobile wallet app to continue";break;default:I="Don\u2019t see your wallet modal? Check your other browser windows."}return Y1(G5,{children:[a1(d4,{backFn:r}),Y1(F5,{children:[a1(H5,{children:Y1("div",{children:[a1(x4,{success:a,fail:!!l}),a1(T,{style:{width:"38px",height:"38px"}})]})}),Y1(V5,{children:[a1("h3",{children:D}),a1("p",{children:I})]}),a1(B5,{onClick:()=>{w(g+1),i(void 0)},visible:!a&&(l==null?void 0:l.retryable)&&g<S2,disabled:!a&&!((l==null?void 0:l.retryable)&&g<S2),children:"Retry"})]})]})},F5=J1.div`
688
688
  display: flex;
689
689
  flex-direction: column;
690
690
  align-items: center;
@@ -731,7 +731,7 @@ Resources:
731
731
  opacity: ${a=>a.visible?"1":"0"};
732
732
  transition: opacity 200ms;
733
733
  }
734
- `;import{Fragment as z5,jsx as X1,jsxs as Q4}from"react/jsx-runtime";var I2=()=>Q4(z5,{children:[X1(A,{},"header"),X1(I2,{}),Q4(Q,{children:[X1("span",{children:"Still not sure? "}),X1("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]});import{Fragment as j5,jsx as Q1,jsxs as t3}from"react/jsx-runtime";var e3=()=>t3(j5,{children:[Q1(A,{},"header"),Q1(T2,{}),t3(Q,{children:[Q1("span",{children:"Still not sure? "}),Q1("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]});import{useEffect as $5}from"react";import q5 from"styled-components";import{Fragment as Y5,jsx as R2,jsxs as a3}from"react/jsx-runtime";var l3=()=>{let{closePrivyModal:a}=y(),{authenticated:e,ready:l}=_(),{navigate:i}=u();return $5(()=>{l&&!e&&i("LANDING")},[e,l]),a3(Y5,{children:[R2(A,{},"header"),a3(K5,{children:[R2("h3",{children:"You're all logged in!"}),R2(G1,{onClick:()=>{a()},children:"Go back to the app"})]})]})},K5=q5($)`
734
+ `;import{Fragment as z5,jsx as X1,jsxs as Q4}from"react/jsx-runtime";var I2=()=>Q4(z5,{children:[X1(A,{},"header"),X1(I2,{}),Q4(Q,{children:[X1("span",{children:"Still not sure? "}),X1("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]});import{Fragment as j5,jsx as Q1,jsxs as t3}from"react/jsx-runtime";var e3=()=>t3(j5,{children:[Q1(A,{},"header"),Q1(T2,{}),t3(Q,{children:[Q1("span",{children:"Still not sure? "}),Q1("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]});import{useEffect as $5}from"react";import q5 from"styled-components";import{Fragment as Y5,jsx as R2,jsxs as a3}from"react/jsx-runtime";var l3=()=>{let{closePrivyModal:a}=y(),{authenticated:e,ready:l}=_(),{navigate:i}=m();return $5(()=>{l&&!e&&i("LANDING")},[e,l]),a3(Y5,{children:[R2(A,{},"header"),a3(K5,{children:[R2("h3",{children:"You're all logged in!"}),R2(G1,{onClick:()=>{a()},children:"Go back to the app"})]})]})},K5=q5($)`
735
735
  gap: 36px;
736
736
  `;import J5 from"styled-components";import{jsx as Q5}from"react/jsx-runtime";var i3=a=>{let e=a.accentColor||"#696ffd";return Q5(X5,{accentColor:e,children:a.children})},X5=J5.div`
737
737
  /*! Modified from https://unpkg.com/tailwindcss@3.2.3/src/css/preflight.css */
@@ -1031,7 +1031,7 @@ Resources:
1031
1031
  display: none;
1032
1032
  }
1033
1033
  }
1034
- `;import{useEffect as e6}from"react";import{jsx as P,jsxs as r6}from"react/jsx-runtime";var a6=()=>{let{currentScreen:a}=u(),e=a==="AWAITING_CONNECTION";return r6(o6,{compact:e,children:[a==="LANDING"&&P(T4,{}),a==="AWAITING_EMAIL_CODE"&&P(I4,{}),a==="CONNECT_WALLET_OPTIONAL"&&P(O4,{}),a==="CONNECT_EMAIL_OPTIONAL"&&P(K4,{}),a==="WALLET_EDUCATION"&&P(G4,{}),a==="AWAITING_CONNECTION"&&P(X4,{}),a==="FULLY_LINKED_SCREEN"&&P(l3,{}),a==="INSTALL_METAMASK_SCREEN"&&P(I2,{}),a==="INSTALL_COINBASE_WALLET_SCREEN"&&P(e3,{})]})},r3=()=>{let{app:a}=u();return t6.createPortal(P(i6,{children:P(i3,{accentColor:a==null?void 0:a.accentColor,children:P(a6,{})})}),document.body)},l6=({children:a,...e})=>(e6(()=>{var l;if(e.open){(l=document==null?void 0:document.activeElement)==null||l.blur();let i=(document==null?void 0:document.querySelector("#root"))||(document==null?void 0:document.querySelector("#__next"));i==null||i.setAttribute("inert","true")}return()=>{let i=(document==null?void 0:document.querySelector("#root"))||(document==null?void 0:document.querySelector("#__next"));i==null||i.removeAttribute("inert")}},[e.open,e.onClose]),P("dialog",{open:!0,role:"dialog",...e,children:a})),i6=o3(l6)`
1034
+ `;import{useEffect as e6}from"react";import{jsx as S,jsxs as r6}from"react/jsx-runtime";var a6=()=>{let{currentScreen:a}=m(),e=a==="AWAITING_CONNECTION";return r6(o6,{compact:e,children:[a==="LANDING"&&S(T4,{}),a==="AWAITING_EMAIL_CODE"&&S(I4,{}),a==="CONNECT_WALLET_OPTIONAL"&&S(O4,{}),a==="CONNECT_EMAIL_OPTIONAL"&&S(K4,{}),a==="WALLET_EDUCATION"&&S(G4,{}),a==="AWAITING_CONNECTION"&&S(X4,{}),a==="FULLY_LINKED_SCREEN"&&S(l3,{}),a==="INSTALL_METAMASK_SCREEN"&&S(I2,{}),a==="INSTALL_COINBASE_WALLET_SCREEN"&&S(e3,{})]})},r3=()=>{let{app:a}=m();return t6.createPortal(S(i6,{children:S(i3,{accentColor:a==null?void 0:a.accentColor,children:S(a6,{})})}),document.body)},l6=({children:a,...e})=>(e6(()=>{var l;if(e.open){(l=document==null?void 0:document.activeElement)==null||l.blur();let i=(document==null?void 0:document.querySelector("#root"))||(document==null?void 0:document.querySelector("#__next"));i==null||i.setAttribute("inert","true")}return()=>{let i=(document==null?void 0:document.querySelector("#root"))||(document==null?void 0:document.querySelector("#__next"));i==null||i.removeAttribute("inert")}},[e.open,e.onClose]),S("dialog",{open:!0,role:"dialog",...e,children:a})),i6=o3(l6)`
1035
1035
  position: fixed;
1036
1036
  top: 0;
1037
1037
  left: 0;
@@ -1069,4 +1069,4 @@ Resources:
1069
1069
  white backgrounds on mobile. */
1070
1070
  box-shadow: 0px 0px 36px rgba(55, 65, 81, 0.15);
1071
1071
  }
1072
- `;import{Fragment as c6,jsx as Z1,jsxs as p6}from"react/jsx-runtime";function C6(a){return typeof a=="string"&&a.length===25}var s6=a=>{if(!C6(a.appId))throw new f("Cannot initialize the Privy provider with an invalid Privy app ID");let[e,l]=l1(null);return t2(()=>{let i=new T1({appId:a.appId,apiURL:D2});l(i)},[]),e===null?Z1(c6,{}):Z1(d6,{...a,client:e})},d6=a=>{let e=a.client,[l,i]=l1({email:!0,wallet:!0,google:!1,twitter:!1,discord:!1}),[o,n]=l1(!1),[p,m]=l1(!1),[b,g]=l1(!1),[w,M]=l1(null),[s,Z]=l1({accentColor:"#696ffd",theme:"System"});t2(()=>{async function r(){let C=await e.getAppSettings();Z(C)}r()},[]);function W(){i({email:!!(s!=null&&s.emailAuth),wallet:!!(s!=null&&s.walletAuth),google:!!(s!=null&&s.googleOAuth),twitter:!!(s!=null&&s.twitterOAuth),discord:!!(s!=null&&s.discordOAuth)})}let D=async()=>{let r=new URLSearchParams(window.location.search),C=r.get("privy_oauth_code"),h=r.get("privy_oauth_state"),E=r.get("privy_oauth_provider");C&&h&&C!=="undefined"&&E&&(W(),n(!0),e.startAuthFlow(new m1(E,C,h)),await e.authenticate())};t2(()=>{async function r(){let C=await e.getAuthenticatedUser();g(!!C),M(C),m(!0)}D().then(()=>{r()}).catch(C=>{console.error("Something went wrong initializing Privy OAuth"),console.log(C)})},[]),t2(()=>{p&&b&&w===null&&e.getAuthenticatedUser().then(M)},[p,b,w]);let S={ready:p,authenticated:b,user:w,linkWallet:()=>{W(),n(!0)},linkEmail:()=>{W(),n(!0)},login:()=>{W(),n(!0)},logout:async()=>{await e.logout(),M(null),g(!1),n(!1)},getAccessToken:()=>e.getAccessToken(),getEthereumProvider:()=>e.connector.getEthereumProvider(),getEthersProvider:()=>new n6(new C1(e.connector.getEthereumProvider())),getWeb3jsProvider:()=>new E1(e.connector.getEthereumProvider()),unlinkWallet:async r=>{let C=await e.unlinkWallet(r);return M(C),C},unlinkEmail:async r=>{let C=await e.unlinkEmail(r);return M(C),C}},F={getAuthMeta:()=>{var r;return(r=e.authFlow)==null?void 0:r.meta},closePrivyModal:()=>{var r;p&&b&&w&&((r=a.onSuccess)==null||r.call(a,w)),n(!1)},initLoginWithWallet:r=>{r||(r="metamask"),e.connector.walletType=r,e.startAuthFlow(new f1(e.connector))},initLoginWithOAuth:async r=>{e.startAuthFlow(new m1(r));let C=await e.authFlow.getAuthorizationUrl();C&&C.url&&window.location.assign(C.url)},loginWithWallet:async()=>{if(!(e.authFlow instanceof f1))throw new f("Must initialize SIWE flow first.");let r=await e.authenticate();M(r||w||null),g(!0)},loginWithEmail:async r=>{let C=new u1(r);e.startAuthFlow(C),await C.sendCodeEmail()},resendEmailCode:async()=>{var r;await((r=e.authFlow)==null?void 0:r.sendCodeEmail())},loginWithCode:async r=>{if(!(e.authFlow instanceof u1))throw new f("Must initialize email code flow first");e.authFlow.meta.emailCode=r.trim();let C=await e.authenticate();M(C||w||null),g(!0)}};return p6(b2.Provider,{value:S,children:[a.children,Z1(k2.Provider,{value:F,children:Z1(l4,{appSettings:s,options:l,visible:o,authenticated:b,children:o&&Z1(r3,{})})})]})};export{s6 as PrivyProvider,_ as usePrivy};
1072
+ `;import{Fragment as c6,jsx as Z1,jsxs as p6}from"react/jsx-runtime";function C6(a){return typeof a=="string"&&a.length===25}var s6=a=>{if(!C6(a.appId))throw new u("Cannot initialize the Privy provider with an invalid Privy app ID");let[e,l]=l1(null);return t2(()=>{let i=new T1({appId:a.appId,apiURL:D2});l(i)},[]),e===null?Z1(c6,{}):Z1(d6,{...a,client:e})},d6=a=>{let e=a.client,[l,i]=l1({email:!0,wallet:!0,google:!1,twitter:!1,discord:!1}),[o,r]=l1(!1),[p,b]=l1(!1),[k,g]=l1(!1),[w,M]=l1(null),[s,Z]=l1({accentColor:"#696ffd",theme:"System"});t2(()=>{async function n(){let C=await e.getAppSettings();Z(C)}n()},[]);function T(){i({email:!!(s!=null&&s.emailAuth),wallet:!!(s!=null&&s.walletAuth),google:!!(s!=null&&s.googleOAuth),twitter:!!(s!=null&&s.twitterOAuth),discord:!!(s!=null&&s.discordOAuth)})}let D=async()=>{let n=new URLSearchParams(window.location.search),C=n.get("privy_oauth_code"),h=n.get("privy_oauth_state"),E=n.get("privy_oauth_provider");C&&h&&C!=="undefined"&&E&&(T(),r(!0),e.startAuthFlow(new m1(E,C,h)),await e.authenticate())};t2(()=>{async function n(){let C=await e.getAuthenticatedUser();g(!!C),M(C),b(!0)}D().then(()=>{n()}).catch(C=>{console.error("Something went wrong initializing Privy OAuth"),console.log(C)})},[]),t2(()=>{p&&k&&w===null&&e.getAuthenticatedUser().then(M)},[p,k,w]);let I={ready:p,authenticated:k,user:w,linkWallet:()=>{T(),r(!0)},linkEmail:()=>{T(),r(!0)},linkGoogle:()=>{T(),r(!0)},linkTwitter:()=>{T(),r(!0)},linkDiscord:()=>{T(),r(!0)},login:()=>{T(),r(!0)},logout:async()=>{await e.logout(),M(null),g(!1),r(!1)},getAccessToken:()=>e.getAccessToken(),getEthereumProvider:()=>e.connector.getEthereumProvider(),getEthersProvider:()=>new n6(new C1(e.connector.getEthereumProvider())),getWeb3jsProvider:()=>new E1(e.connector.getEthereumProvider()),unlinkWallet:async n=>{let C=await e.unlinkWallet(n);return M(C),C},unlinkEmail:async n=>{let C=await e.unlinkEmail(n);return M(C),C}},F={getAuthMeta:()=>{var n;return(n=e.authFlow)==null?void 0:n.meta},closePrivyModal:()=>{var n;p&&k&&w&&((n=a.onSuccess)==null||n.call(a,w)),r(!1)},initLoginWithWallet:n=>{n||(n="metamask"),e.connector.walletType=n,e.startAuthFlow(new f1(e.connector))},initLoginWithOAuth:async n=>{e.startAuthFlow(new m1(n));let C=await e.authFlow.getAuthorizationUrl();C&&C.url&&window.location.assign(C.url)},loginWithWallet:async()=>{if(!(e.authFlow instanceof f1))throw new u("Must initialize SIWE flow first.");let n=await e.authenticate();M(n||w||null),g(!0)},loginWithEmail:async n=>{let C=new u1(n);e.startAuthFlow(C),await C.sendCodeEmail()},resendEmailCode:async()=>{var n;await((n=e.authFlow)==null?void 0:n.sendCodeEmail())},loginWithCode:async n=>{if(!(e.authFlow instanceof u1))throw new u("Must initialize email code flow first");e.authFlow.meta.emailCode=n.trim();let C=await e.authenticate();M(C||w||null),g(!0)}};return p6(b2.Provider,{value:I,children:[a.children,Z1(k2.Provider,{value:F,children:Z1(l4,{appSettings:s,options:l,visible:o,authenticated:k,children:o&&Z1(r3,{})})})]})};export{s6 as PrivyProvider,_ as usePrivy};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@privy-io/react-auth",
3
- "version": "1.5.0-beta.11",
3
+ "version": "1.5.0-beta.12",
4
4
  "description": "React client for the Privy Auth API",
5
5
  "keywords": [
6
6
  "authentication",