PageSourceSearch

https://redpepepixies.vercel.app/_next/static/chunks/7326.01a1da3d58dfeefb.js

js redpepepixies.vercel.app collected 2026-10-03 07:38:48 UTC 8,663 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7326],{4732:function(e,t,i){i.d(t,{W:function(){return r}});var s=i(70324),n=i(87336);class r extends n.Z{constructor(e){let{chains:t=s.gL9,options:i}=e;super(),this.chains=t,this.options=i}getBlockExplorerUrls(e){let t=e.explorers?.map(e=>e.url)??[];return t.length>0?t:void 0}isChainUnsupported(e){return!this.chains.some(t=>t.chainId===e)}updateChains(e){this.chains=e}}},9337:function(e,t,i){i.d(t,{A:function(){return a},C:function(){return o},R:function(){return c},S:function(){return d},U:function(){return l},a:function(){return h}});var s=i(92718);class n extends Error{constructor(e,t){let{cause:i,code:s,data:n}=t;if(!Number.isInteger(s))throw Error('"code" must be an integer.');if(!e||"string"!=typeof e)throw Error('"message" must be a nonempty string.');super(`${e}. Cause: ${JSON.stringify(i)}`),this.cause=i,this.code=s,this.data=n}}class r extends n{constructor(e,t){let{cause:i,code:s,data:n}=t;if(!(Number.isInteger(s)&&s>=1e3&&s<=4999))throw Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,{cause:i,code:s,data:n})}}class a extends Error{constructor(){super(...arguments),(0,s._)(this,"name","AddChainError"),(0,s._)(this,"message","Error adding chain")}}class o extends Error{constructor(e){let{chainId:t,connectorId:i}=e;super(`Chain "${t}" not configured for connector "${i}".`),(0,s._)(this,"name","ChainNotConfigured")}}
1class h extends Error{constructor(){super(...arguments),(0,s._)(this,"name","ConnectorNotFoundError"),(0,s._)(this,"message","Connector not found")}}class c extends n{constructor(e){super("Resource unavailable",{cause:e,code:-32002}),(0,s._)(this,"name","ResourceUnavailable")}}class d extends r{constructor(e){super("Error switching chain",{cause:e,code:4902}),(0,s._)(this,"name","SwitchChainError")}}class l extends r{constructor(e){super("User rejected request",{cause:e,code:4001}),(0,s._)(this,"name","UserRejectedRequestError")}}},77326:function(e,t,i){i.d(t,{WalletConnectConnector:function(){return _}});var s=i(92718),n=i(9337),r=i(42246),a=i(91894),o=i(8810),h=i(3767),c=i(69185),d=i(4732);i(87336);let l=new Set([1,137,10,42161,56]),u="eip155",p="wagmi.requestedChains",g="wallet_addEthereumChain",m="last-used-chain-id";class _ extends d.W{constructor(e){super({...e,options:{isNewChainsStale:!0,...e.options}}),(0,s._)(this,"id",h.w.walletConnect),(0,s._)(this,"name","WalletConnect"),(0,s._)(this,"ready",!0),(0,s._)(this,"onAccountsChanged",e=>{0===e.length?this.emit("disconnect"):e[0]&&this.emit("change",{account:r.getAddress(e[0])})}),(0,s._)(this,"onChainChanged",async e=>{let t=Number(e),i=this.isChainUnsupported(t);await this._storage.setItem(m,String(e)),this.emit("change",{chain:{id:t,unsupported:i}})}),(0,s._)(this,"onDisconnect",async()=>{await this._setRequestedChainsIds([]),await this._storage.removeItem(m),this.emit("disconnect")}),(0,s._)(this,"onDisplayUri",e=>{this.emit("message",{type:"display_uri",data:e})}),(0,s._)(this,"onConnect",()=>{this.emit("connect",{provider:this._provider})}),this._storage=e.options.storage,this._createProvider(),this.filteredChains=this.chains.length>50?this.chains.filter(e=>l.has(e.chainId)):this.chains,this.showWalletConnectModal=!1!==this.options.qrcode}async connect(){let{chainId:e,pairingTopic:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let i=e;if(!i){let e=await this._storage.getItem(m),t=e?parseInt(e):void 0;i=t&&!this.isChainUnsupported(t)?t:this.filteredChains[0]?.chainId}if(!i)throw Error("No chains found on connector.");let s=await this.getProvider();if(this.setupListeners(),s.session){await s.disconnect();let e=this.filteredChains.filter(e=>e.chainId!==i).map(e=>e.chainId);this.emit("message",{type:"connecting"}),await s.connect({pairingTopic:t,chains:[i],optionalChains:e.length>0?e:[i]}),await this._setRequestedChainsIds(this.filteredChains.map(e=>{let{chainId:t}=e;return t}))}let n=await s.enable();if(!n[0])throw Error("No accounts found on provider.");let o=r.getAddress(n[0]),h=await this.getChainId(),c=this.isChainUnsupported(h);return{account:o,chain:{id:h,unsupported:c},provider:new a.Q(s)}}catch(e){if(/user rejected/i.test(e?.message))throw new n.U(e);throw e}}async disconnect(){let e=()=>{if("undefined"!=typeof localStorage)for(let e in localStorage)e.startsWith("wc@2")&&localStorage.removeItem(e)};e();let t=await this.getProvider();(async()=>{try{await t.disconnect()}catch(e){if(!/No matching key/i.test(e.message))throw e}finally{this._removeListeners(),await this._setRequestedChainsIds([]),e()}})()}async getAccount(){let{accounts:e}=await this.getProvider();if(!e[0])throw Error("No accounts found on provider.");return r.getAddress(e[0])}async getChainId(){let{chainId:e}=await this.getProvider();return e}async getProvider(){let{chainId:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._provider||await this._createProvider(),e&&await this.switchChain(e),!this._provider)throw Error("No provider found.");return this._provider}async getSigner(){let{chainId:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[t,i]=await Promise.all([this.getProvider({chainId:e}),this.getAccount()]);return new a.Q(t,e).getSigner(i)}async isAuthorized(){try{let[e,t]=await Promise.all([this.getAccount(),this.getProvider()]),i=await this._isChainsStale();if(!e)return!1;if(i&&t.session){try{await t.disconnect()}catch{}return!1}return!0}catch{return!1}}async switchChain(e){let t=this.chains.find(t=>t.chainId===e);if(!t)throw new n.S(`Chain with ID: ${e}, not found on connector.`);try{let i=await this.getProvider(),s=this._getNamespaceChainsIds(),n=this._getNamespaceMethods();if(!s.includes(e)&&n.includes(g)){let s=t.explorers&&t.explorers[0],n=s?{blockExplorerUrls:[s.url]}:{};await i.request({method:g,params:[{chainId:o.hexValue(t.chainId),chainName:t.name,nativeCurrency:t.nativeCurrency,rpcUrls:(0,c.g)(t),...n}]});let r=await this._getRequestedChainsIds();
1r.push(e),await this._setRequestedChainsIds(r)}return await i.request({method:"wallet_switchEthereumChain",params:[{chainId:o.hexValue(e)}]}),t}catch(t){let e="string"==typeof t?t:t?.message;if(/user rejected request/i.test(e))throw new n.U(t);throw new n.S(t)}}async _createProvider(){return this._initProviderPromise||(this._initProviderPromise=this.initProvider()),this._initProviderPromise}async initProvider(){let{default:e,OPTIONAL_EVENTS:t,OPTIONAL_METHODS:s}=await Promise.all([i.e(1384),i.e(5178),i.e(748),i.e(1730)]).then(i.bind(i,11730)),[n,...r]=this.filteredChains.map(e=>{let{chainId:t}=e;return t});n&&(this._provider=await e.init({showQrModal:this.showWalletConnectModal,projectId:this.options.projectId,methods:["eth_sendTransaction","personal_sign","eth_signTypedData_v4"],optionalMethods:s,optionalEvents:t,chains:[n],optionalChains:r,metadata:{name:this.options.dappMetadata.name,description:this.options.dappMetadata.description||"",url:this.options.dappMetadata.url,icons:[this.options.dappMetadata.logoUrl||""]},rpcMap:Object.fromEntries(this.filteredChains.map(e=>[e.chainId,e.rpc[0]||""])),qrModalOptions:this.options.qrModalOptions}))}async _isChainsStale(){if(this._getNamespaceMethods().includes(g)||!this.options.isNewChainsStale)return!1;let e=await this._getRequestedChainsIds(),t=this.filteredChains.map(e=>{let{chainId:t}=e;return t}),i=this._getNamespaceChainsIds();return(!i.length||!!i.some(e=>t.includes(e)))&&!t.every(t=>e.includes(t))}async setupListeners(){this._provider&&(this._removeListeners(),this._provider.on("accountsChanged",this.onAccountsChanged),this._provider.on("chainChanged",this.onChainChanged),this._provider.on("disconnect",this.onDisconnect),this._provider.on("session_delete",this.onDisconnect),this._provider.on("display_uri",this.onDisplayUri),this._provider.on("connect",this.onConnect))}_removeListeners(){this._provider&&(this._provider.removeListener("accountsChanged",this.onAccountsChanged),this._provider.removeListener("chainChanged",this.onChainChanged),this._provider.removeListener("disconnect",this.onDisconnect),this._provider.removeListener("session_delete",this.onDisconnect),this._provider.removeListener("display_uri",this.onDisplayUri),this._provider.removeListener("connect",this.onConnect))}async _setRequestedChainsIds(e){await this._storage.setItem(p,JSON.stringify(e))}async _getRequestedChainsIds(){let e=await this._storage.getItem(p);return e?JSON.parse(e):[]}_getNamespaceChainsIds(){return this._provider?this._provider.session?.namespaces[u]?.chains?.map(e=>parseInt(e.split(":")[1]||""))??[]:[]}_getNamespaceMethods(){return this._provider?this._provider.session?.namespaces[u]?.methods??[]:[]}}}}]);

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.