PageSourceSearch

https://revitalizeai.vercel.app/_next/static/chunks/6457.456e246689654077.js

js revitalizeai.vercel.app collected 2026-10-03 07:41:36 UTC 4,183 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6457],{59014:function(t,e,i){i.d(e,{n:function(){return n}});function n(t){return"string"==typeof t?Number.parseInt(t,"0x"===t.trim().substring(0,2)?16:10):"bigint"==typeof t?Number(t):t}},76457:function(t,e,i){i.d(e,{EmbeddedWalletConnector:function(){return c}});var n=i(69552),s=i(19485),r=i(59014),a=i(26340),h=i(27021),o=i(65761);i(54146);class c extends h.C{constructor(t){super(),(0,n._)(this,"id",a.w.paper),(0,n._)(this,"name","Embedded Wallet"),(0,n._)(this,"ready",!0),(0,n._)(this,"user",null),(0,n._)(this,"onAccountsChanged",async t=>{0===t.length?await this.onDisconnect():this.emit("change",{account:s.getAddress(t[0])})}),(0,n._)(this,"onChainChanged",t=>{let e=(0,r.n)(t),i=-1===this.options.chains.findIndex(t=>t.chainId===e);this.emit("change",{chain:{id:e,unsupported:i}})}),(0,n._)(this,"onDisconnect",async()=>{this.emit("disconnect")}),this.options=t}getEmbeddedWalletSDK(){return this._embeddedWalletSdk||(this._embeddedWalletSdk=new o.E({clientId:this.options.clientId,chain:"Ethereum",onAuthSuccess:this.options.onAuthSuccess})),this._embeddedWalletSdk}async connect(t){if(t){if(!t.authResult)throw Error("Missing authData - call authenticate() first with your authentication strategy");if(!t.authResult.user)throw Error("Missing authData.user - call authenticate() first with your authentication strategy");this.user=t.authResult.user}else{let t=await this.authenticate({strategy:"iframe"});if(!t.user)throw Error("Error connecting User");this.user=t.user}return t?.chainId&&this.switchChain(t.chainId),this.getAddress()}async disconnect(){let t=this._embeddedWalletSdk;await t?.auth.logout(),this._signer=void 0,this._embeddedWalletSdk=void 0,this.user=null}async getAddress(){if(!this.user)throw Error("Embedded Wallet is not connected");
1return await this.getSigner().then(t=>t.getAddress())}async isConnected(){try{let t=await this.getAddress();return!!t}catch(t){return!1}}async getProvider(){let t=await this.getSigner();if(!t.provider)throw Error("Provider not found");return t.provider}async getSigner(){if(this._signer)return this._signer;let t=await this.getUser(),e=await t.wallet.getEthersJsSigner({rpcEndpoint:this.options.chain.rpc[0]||""});if(!e)throw Error("Signer not found");return this._signer=e,e}async isAuthorized(){return!1}async switchChain(t){let e=this.options.chains.find(e=>e.chainId===t);if(!e)throw Error("Chain not configured");try{await this.user?.wallet.setChain({chain:"Ethereum"}),this._signer=await this.user?.wallet.getEthersJsSigner({rpcEndpoint:e.rpc[0]||""}),this.emit("change",{chain:{id:t,unsupported:!1}})}catch(t){console.warn("Failed to switch chain",t)}}async setupListeners(){return Promise.resolve()}updateChains(t){this.options.chains=t}async getUser(){if(!this.user||!this.user.wallet||!this.user.wallet.getEthersJsSigner){let t=this.getEmbeddedWalletSDK(),e=await t.getUser();if(e.status===o.U.LOGGED_IN_WALLET_INITIALIZED)this.user=e;else throw Error("Embedded Wallet is not authenticated, please authenticate first")}return this.user}async getEmail(){let t=await this.getUser();return t.authDetails.email}async getRecoveryInformation(){let t=await this.getUser();return t.authDetails}async sendVerificationEmail(t){let{email:e}=t,i=this.getEmbeddedWalletSDK();return i.auth.sendEmailLoginOtp({email:e})}async authenticate(t){let e=this.getEmbeddedWalletSDK(),i=t.strategy;switch(i){case"email_verification":return await e.auth.verifyEmailLoginOtp({email:t.email,otp:t.verificationCode,recoveryCode:t.recoveryCode});case"apple":case"facebook":case"google":{let n=d[i];return e.auth.loginWithOauth({oauthProvider:n,closeOpenedWindow:t.closeOpenedWindow,openedWindow:t.openedWindow})}case"jwt":return e.auth.loginWithCustomJwt({jwt:t.jwt,encryptionKey:t.encryptionKey});case"auth_endpoint":return e.auth.loginWithCustomAuthEndpoint({payload:t.payload,encryptionKey:t.encryptionKey});case"iframe_email_verification":return e.auth.loginWithEmailOtp({email:t.email});case"iframe":return e.auth.loginWithModal();default:!function(t){throw Error("Invalid param: "+t)}(i)}}}let d={google:o.c.GOOGLE,facebook:o.c.FACEBOOK,apple:o.c.APPLE}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.