@reown/appkit-cdn 1.0.7 → 1.1.0

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.
Files changed (37) hide show
  1. package/dist/{W3MFrameProviderSingleton-CTz2n0lO.js → W3MFrameProviderSingleton--HSg3nEz.js} +4029 -3503
  2. package/dist/{W3MFrameProviderSingleton-DQTwz0Iu.cjs → W3MFrameProviderSingleton-SRLqDWgO.cjs} +103 -103
  3. package/dist/ethers.cjs +1 -1
  4. package/dist/ethers.js +1529 -1609
  5. package/dist/{hooks.module-DqUWzNtD.js → hooks.module-B_N3JvEN.js} +1 -1
  6. package/dist/{hooks.module-LKtd6ff7.cjs → hooks.module-CmpdbiRp.cjs} +1 -1
  7. package/dist/{index-D5YBEcNb.js → index-2d-aRmQF.js} +20 -20
  8. package/dist/{index-CmzUtRNr.js → index-3Tles8GF.js} +2 -2
  9. package/dist/{index-Dq2Qc6hQ.cjs → index-3jinrfKR.cjs} +1 -1
  10. package/dist/{index-ChPlSHaF.cjs → index-BBwc05vi.cjs} +2 -2
  11. package/dist/{index-CBKmOjAo.cjs → index-BmU807V9.cjs} +1 -1
  12. package/dist/{index-DFW14Awr.cjs → index-CDAn9JfZ.cjs} +1 -1
  13. package/dist/{index-DSbDKpqj.cjs → index-CIzqgU5q.cjs} +1 -1
  14. package/dist/{index-Bmk1Ohcq.js → index-CJq05jyL.js} +17 -17
  15. package/dist/{index-BtFTDllB.js → index-CO1X8Cxc.js} +2 -2
  16. package/dist/{index-C7kbNRtJ.cjs → index-CQ4-w5mp.cjs} +1 -1
  17. package/dist/{index-CzyxiVR0.js → index-DDwvGjhD.js} +1 -1
  18. package/dist/{index-B7Uy57AM.js → index-DSzXjBUF.js} +2 -2
  19. package/dist/{index-Bn6ujDok.js → index-Dlv7g3Jh.js} +2 -2
  20. package/dist/{index-uB2KGMj2.js → index-_Sw9VWRf.js} +2 -2
  21. package/dist/{index-XWvMwQij.cjs → index-sfhFJZJt.cjs} +1 -1
  22. package/dist/{index-CERtK4zq.cjs → index-v7RnFZTP.cjs} +1 -1
  23. package/dist/{index.es-RYrbKE7v.cjs → index.es-CXs4mA1g.cjs} +2 -2
  24. package/dist/{index.es-Cgrh4cUP.js → index.es-TVTbcEaP.js} +2 -2
  25. package/dist/{metamask-sdk-C0m1muMC.js → metamask-sdk-CaVruToV.js} +1 -1
  26. package/dist/{metamask-sdk-vXyt2FVd.cjs → metamask-sdk-CsUP8MhX.cjs} +1 -1
  27. package/dist/{native-C9YiZkE_.js → native-BiFy-msx.js} +1 -1
  28. package/dist/{native-D13cmGux.cjs → native-gXKXtBE3.cjs} +1 -1
  29. package/dist/{w3m-modal-CHMPq1Um.cjs → w3m-modal-Dc1peoIh.cjs} +4 -4
  30. package/dist/{w3m-modal-7h2X-uBO.js → w3m-modal-DwtACkc9.js} +40 -37
  31. package/dist/wagmi-GgXheXd8.cjs +46 -0
  32. package/dist/wagmi-IogORaa7.js +18186 -0
  33. package/dist/wagmi.cjs +1 -1
  34. package/dist/wagmi.js +7 -7
  35. package/package.json +8 -6
  36. package/dist/wagmi-C7gaobmd.js +0 -26828
  37. package/dist/wagmi-DSpqRjMY.cjs +0 -47
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-XWvMwQij.cjs"),O=require("./W3MFrameProviderSingleton-DQTwz0Iu.cjs");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-sfhFJZJt.cjs"),O=require("./W3MFrameProviderSingleton-SRLqDWgO.cjs");/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./W3MFrameProviderSingleton-DQTwz0Iu.cjs"),N=require("./wagmi-DSpqRjMY.cjs"),P=()=>"9.1.0",Ge=e=>e.toString(16).padStart(2,"0"),We=e=>{const n=new Uint8Array(e/2);return window.crypto.getRandomValues(n),Array.from(n,Ge).join("")},qe=()=>typeof window<"u"?We(10):new Date().getTime().toString(36);class O{}O.makeRequest=(e,n)=>({id:qe(),method:e,params:n,env:{sdkVersion:P()}});O.makeResponse=(e,n,t)=>({id:e,success:!0,version:t,data:n});O.makeErrorResponse=(e,n,t)=>({id:e,success:!1,error:n,version:t});exports.Methods=void 0;(function(e){e.sendTransactions="sendTransactions",e.rpcCall="rpcCall",e.getChainInfo="getChainInfo",e.getSafeInfo="getSafeInfo",e.getTxBySafeTxHash="getTxBySafeTxHash",e.getSafeBalances="getSafeBalances",e.signMessage="signMessage",e.signTypedMessage="signTypedMessage",e.getEnvironmentInfo="getEnvironmentInfo",e.getOffChainSignature="getOffChainSignature",e.requestAddressBook="requestAddressBook",e.wallet_getPermissions="wallet_getPermissions",e.wallet_requestPermissions="wallet_requestPermissions"})(exports.Methods||(exports.Methods={}));exports.RestrictedMethods=void 0;(function(e){e.requestAddressBook="requestAddressBook"})(exports.RestrictedMethods||(exports.RestrictedMethods={}));class Ve{constructor(n=null,t=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:i,data:r,source:s})=>{const u=!r,l=!this.isServer&&s===window.parent,g=typeof r.version<"u"&&parseInt(r.version.split(".")[0]),A=typeof g=="number"&&g>=1;let h=!0;return Array.isArray(this.allowedOrigins)&&(h=this.allowedOrigins.find(I=>I.test(i))!==void 0),!u&&l&&A&&h},this.logIncomingMessage=i=>{console.info(`Safe Apps SDK v1: A message was received from origin ${i.origin}. `,i.data)},this.onParentMessage=i=>{this.isValidMessage(i)&&(this.debugMode&&this.logIncomingMessage(i),this.handleIncomingMessage(i.data))},this.handleIncomingMessage=i=>{const{id:r}=i,s=this.callbacks.get(r);s&&(s(i),this.callbacks.delete(r))},this.send=(i,r)=>{const s=O.makeRequest(i,r);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(s,"*"),new Promise((u,l)=>{this.callbacks.set(s.id,g=>{if(!g.success){l(new Error(g.error));return}u(g)})})},this.allowedOrigins=n,this.debugMode=t,this.isServer||window.addEventListener("message",this.onParentMessage)}}const R=e=>typeof e=="object"&&e!=null&&"domain"in e&&"types"in e&&"message"in e;var Fe={},E={},_={},M=m.commonjsGlobal&&m.commonjsGlobal.__awaiter||function(e,n,t,i){function r(s){return s instanceof t?s:new t(function(u){u(s)})}return new(t||(t=Promise))(function(s,u){function l(h){try{A(i.next(h))}catch(I){u(I)}}function g(h){try{A(i.throw(h))}catch(I){u(I)}}function A(h){h.done?s(h.value):r(h.value).then(l,g)}A((i=i.apply(e,n||[])).next())})};Object.defineProperty(_,"__esModule",{value:!0});_.getData=_.fetchData=_.stringifyQuery=_.insertParams=void 0;const ke=e=>typeof e=="object"&&e!==null&&"code"in e&&"message"in e;function Ke(e,n,t){return e.replace(new RegExp(`\\{${n}\\}`,"g"),t)}function Xe(e,n){return n?Object.keys(n).reduce((t,i)=>Ke(t,i,String(n[i])),e):e}_.insertParams=Xe;function Qe(e){if(!e)return"";const n=new URLSearchParams;Object.keys(e).forEach(i=>{e[i]!=null&&n.append(i,String(e[i]))});const t=n.toString();return t?`?${t}`:""}_.stringifyQuery=Qe;function p(e){return M(this,void 0,void 0,function*(){let n;try{n=yield e.json()}catch{n={}}if(!e.ok){const t=ke(n)?`CGW error - ${n.code}: ${n.message}`:`CGW error - status ${e.statusText}`;throw new Error(t)}return n})}function $e(e,n,t,i,r){return M(this,void 0,void 0,function*(){const s=Object.assign({"Content-Type":"application/json"},i),u={method:n??"POST",headers:s};r&&(u.credentials=r),t!=null&&(u.body=typeof t=="string"?t:JSON.stringify(t));const l=yield fetch(e,u);return p(l)})}_.fetchData=$e;function Ye(e,n,t){return M(this,void 0,void 0,function*(){const i={method:"GET"};n&&(i.headers=Object.assign(Object.assign({},n),{"Content-Type":"application/json"})),t&&(i.credentials=t);const r=yield fetch(e,i);return p(r)})}_.getData=Ye;Object.defineProperty(E,"__esModule",{value:!0});E.getEndpoint=E.deleteEndpoint=E.putEndpoint=E.postEndpoint=void 0;const S=_;function C(e,n,t,i){const r=(0,S.insertParams)(n,t),s=(0,S.stringifyQuery)(i);return`${e}${r}${s}`}function Je(e,n,t){const i=C(e,n,t==null?void 0:t.path,t==null?void 0:t.query);return(0,S.fetchData)(i,"POST",t==null?void 0:t.body,t==null?void 0:t.headers,t==null?void 0:t.credentials)}E.postEndpoint=Je;function ze(e,n,t){const i=C(e,n,t==null?void 0:t.path,t==null?void 0:t.query);return(0,S.fetchData)(i,"PUT",t==null?void 0:t.body,t==null?void 0:t.headers,t==null?void 0:t.credentials)}E.putEndpoint=ze;function Ze(e,n,t){const i=C(e,n,t==null?void 0:t.path,t==null?void 0:t.query);return(0,S.fetchData)(i,"DELETE",t==null?void 0:t.body,t==null?void 0:t.headers,t==null?void 0:t.credentials)}E.deleteEndpoint=Ze;function xe(e,n,t,i){if(i)return(0,S.getData)(i,void 0,t==null?void 0:t.credentials);const r=C(e,n,t==null?void 0:t.path,t==null?void 0:t.query);return(0,S.getData)(r,t==null?void 0:t.headers,t==null?void 0:t.credentials)}E.getEndpoint=xe;var b={};Object.defineProperty(b,"__esModule",{value:!0});b.DEFAULT_BASE_URL=void 0;b.DEFAULT_BASE_URL="https://safe-client.safe.global";var L={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationVersionState=void 0,function(n){n.UP_TO_DATE="UP_TO_DATE",n.OUTDATED="OUTDATED",n.UNKNOWN="UNKNOWN"}(e.ImplementationVersionState||(e.ImplementationVersionState={}))})(L);var B={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppSocialPlatforms=e.SafeAppFeatures=e.SafeAppAccessPolicyTypes=void 0,function(n){n.NoRestrictions="NO_RESTRICTIONS",n.DomainAllowlist="DOMAIN_ALLOWLIST"}(e.SafeAppAccessPolicyTypes||(e.SafeAppAccessPolicyTypes={})),function(n){n.BATCHED_TRANSACTIONS="BATCHED_TRANSACTIONS"}(e.SafeAppFeatures||(e.SafeAppFeatures={})),function(n){n.TWITTER="TWITTER",n.GITHUB="GITHUB",n.DISCORD="DISCORD"}(e.SafeAppSocialPlatforms||(e.SafeAppSocialPlatforms={}))})(B);var H={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LabelValue=e.StartTimeValue=e.DurationType=e.DetailedExecutionInfoType=e.TransactionListItemType=e.ConflictType=e.TransactionInfoType=e.SettingsInfoType=e.TransactionTokenType=e.TransferDirection=e.TransactionStatus=e.Operation=void 0,function(n){n[n.CALL=0]="CALL",n[n.DELEGATE=1]="DELEGATE"}(e.Operation||(e.Operation={})),function(n){n.AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",n.AWAITING_EXECUTION="AWAITING_EXECUTION",n.CANCELLED="CANCELLED",n.FAILED="FAILED",n.SUCCESS="SUCCESS"}(e.TransactionStatus||(e.TransactionStatus={})),function(n){n.INCOMING="INCOMING",n.OUTGOING="OUTGOING",n.UNKNOWN="UNKNOWN"}(e.TransferDirection||(e.TransferDirection={})),function(n){n.ERC20="ERC20",n.ERC721="ERC721",n.NATIVE_COIN="NATIVE_COIN"}(e.TransactionTokenType||(e.TransactionTokenType={})),function(n){n.SET_FALLBACK_HANDLER="SET_FALLBACK_HANDLER",n.ADD_OWNER="ADD_OWNER",n.REMOVE_OWNER="REMOVE_OWNER",n.SWAP_OWNER="SWAP_OWNER",n.CHANGE_THRESHOLD="CHANGE_THRESHOLD",n.CHANGE_IMPLEMENTATION="CHANGE_IMPLEMENTATION",n.ENABLE_MODULE="ENABLE_MODULE",n.DISABLE_MODULE="DISABLE_MODULE",n.SET_GUARD="SET_GUARD",n.DELETE_GUARD="DELETE_GUARD"}(e.SettingsInfoType||(e.SettingsInfoType={})),function(n){n.TRANSFER="Transfer",n.SETTINGS_CHANGE="SettingsChange",n.CUSTOM="Custom",n.CREATION="Creation",n.SWAP_ORDER="SwapOrder",n.TWAP_ORDER="TwapOrder",n.SWAP_TRANSFER="SwapTransfer"}(e.TransactionInfoType||(e.TransactionInfoType={})),function(n){n.NONE="None",n.HAS_NEXT="HasNext",n.END="End"}(e.ConflictType||(e.ConflictType={})),function(n){n.TRANSACTION="TRANSACTION",n.LABEL="LABEL",n.CONFLICT_HEADER="CONFLICT_HEADER",n.DATE_LABEL="DATE_LABEL"}(e.TransactionListItemType||(e.TransactionListItemType={})),function(n){n.MULTISIG="MULTISIG",n.MODULE="MODULE"}(e.DetailedExecutionInfoType||(e.DetailedExecutionInfoType={})),function(n){n.AUTO="AUTO",n.LIMIT_DURATION="LIMIT_DURATION"}(e.DurationType||(e.DurationType={})),function(n){n.AT_MINING_TIME="AT_MINING_TIME",n.AT_EPOCH="AT_EPOCH"}(e.StartTimeValue||(e.StartTimeValue={})),function(n){n.Queued="Queued",n.Next="Next"}(e.LabelValue||(e.LabelValue={}))})(H);var j={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FEATURES=e.GAS_PRICE_TYPE=e.RPC_AUTHENTICATION=void 0,function(n){n.API_KEY_PATH="API_KEY_PATH",n.NO_AUTHENTICATION="NO_AUTHENTICATION",n.UNKNOWN="UNKNOWN"}(e.RPC_AUTHENTICATION||(e.RPC_AUTHENTICATION={})),function(n){n.ORACLE="ORACLE",n.FIXED="FIXED",n.FIXED_1559="FIXED1559",n.UNKNOWN="UNKNOWN"}(e.GAS_PRICE_TYPE||(e.GAS_PRICE_TYPE={})),function(n){n.ERC721="ERC721",n.SAFE_APPS="SAFE_APPS",n.CONTRACT_INTERACTION="CONTRACT_INTERACTION",n.DOMAIN_LOOKUP="DOMAIN_LOOKUP",n.SPENDING_LIMIT="SPENDING_LIMIT",n.EIP1559="EIP1559",n.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL",n.TX_SIMULATION="TX_SIMULATION",n.EIP1271="EIP1271"}(e.FEATURES||(e.FEATURES={}))})(j);var U={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TokenType=void 0,function(n){n.ERC20="ERC20",n.ERC721="ERC721",n.NATIVE_TOKEN="NATIVE_TOKEN"}(e.TokenType||(e.TokenType={}))})(U);var G={};Object.defineProperty(G,"__esModule",{value:!0});var W={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfirmationViewTypes=void 0,function(n){n.COW_SWAP_ORDER="COW_SWAP_ORDER",n.COW_SWAP_TWAP_ORDER="COW_SWAP_TWAP_ORDER"}(e.ConfirmationViewTypes||(e.ConfirmationViewTypes={}))})(W);var q={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeMessageStatus=e.SafeMessageListItemType=void 0,function(n){n.DATE_LABEL="DATE_LABEL",n.MESSAGE="MESSAGE"}(e.SafeMessageListItemType||(e.SafeMessageListItemType={})),function(n){n.NEEDS_CONFIRMATION="NEEDS_CONFIRMATION",n.CONFIRMED="CONFIRMED"}(e.SafeMessageStatus||(e.SafeMessageStatus={}))})(q);var V={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeviceType=void 0,function(n){n.ANDROID="ANDROID",n.IOS="IOS",n.WEB="WEB"}(e.DeviceType||(e.DeviceType={}))})(V);var F={};Object.defineProperty(F,"__esModule",{value:!0});(function(e){var n=m.commonjsGlobal&&m.commonjsGlobal.__createBinding||(Object.create?function(a,c,o,d){d===void 0&&(d=o);var v=Object.getOwnPropertyDescriptor(c,o);(!v||("get"in v?!c.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return c[o]}}),Object.defineProperty(a,d,v)}:function(a,c,o,d){d===void 0&&(d=o),a[d]=c[o]}),t=m.commonjsGlobal&&m.commonjsGlobal.__exportStar||function(a,c){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(c,o)&&n(c,a,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.deleteAccount=e.getAccount=e.createAccount=e.verifyAuth=e.getAuthNonce=e.getContract=e.getSafeOverviews=e.unsubscribeAll=e.unsubscribeSingle=e.registerRecoveryModule=e.deleteRegisteredEmail=e.getRegisteredEmail=e.verifyEmail=e.resendEmailVerificationCode=e.changeEmail=e.registerEmail=e.unregisterDevice=e.unregisterSafe=e.registerDevice=e.getDelegates=e.confirmSafeMessage=e.proposeSafeMessage=e.getSafeMessage=e.getSafeMessages=e.getDecodedData=e.getMasterCopies=e.getSafeApps=e.getChainConfig=e.getChainsConfig=e.getConfirmationView=e.proposeTransaction=e.getNonces=e.postSafeGasEstimation=e.deleteTransaction=e.getTransactionDetails=e.getTransactionQueue=e.getTransactionHistory=e.getCollectiblesPage=e.getCollectibles=e.getAllOwnedSafes=e.getOwnedSafes=e.getFiatCurrencies=e.getBalances=e.getMultisigTransactions=e.getModuleTransactions=e.getIncomingTransfers=e.getSafeInfo=e.getRelayCount=e.relayTransaction=e.setBaseUrl=void 0,e.putAccountDataSettings=e.getAccountDataSettings=e.getAccountDataTypes=void 0;const i=E,r=b;t(L,e),t(B,e),t(H,e),t(j,e),t(U,e),t(G,e),t(W,e),t(q,e),t(V,e),t(F,e);let s=r.DEFAULT_BASE_URL;const u=a=>{s=a};e.setBaseUrl=u;function l(a,c){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/relay",{path:{chainId:a},body:c})}e.relayTransaction=l;function g(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/relay/{address}",{path:{chainId:a,address:c}})}e.getRelayCount=g;function A(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:a,address:c}})}e.getSafeInfo=A;function h(a,c,o,d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/incoming-transfers/",{path:{chainId:a,address:c},query:o},d)}e.getIncomingTransfers=h;function I(a,c,o,d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/module-transactions/",{path:{chainId:a,address:c},query:o},d)}e.getModuleTransactions=I;function X(a,c,o,d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/multisig-transactions/",{path:{chainId:a,address:c},query:o},d)}e.getMultisigTransactions=X;function Q(a,c,o="usd",d={}){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:a,address:c,currency:o},query:d})}e.getBalances=Q;function $(){return(0,i.getEndpoint)(s,"/v1/balances/supported-fiat-codes")}e.getFiatCurrencies=$;function Y(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:a,address:c}})}e.getOwnedSafes=Y;function J(a){return(0,i.getEndpoint)(s,"/v1/owners/{address}/safes",{path:{address:a}})}e.getAllOwnedSafes=J;function z(a,c,o={}){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:a,address:c},query:o})}e.getCollectibles=z;function Z(a,c,o={},d){return(0,i.getEndpoint)(s,"/v2/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:a,address:c},query:o},d)}e.getCollectiblesPage=Z;function x(a,c,o={},d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:a,safe_address:c},query:o},d)}e.getTransactionHistory=x;function ee(a,c,o={},d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:a,safe_address:c},query:o},d)}e.getTransactionQueue=ee;function ne(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:a,transactionId:c}})}e.getTransactionDetails=ne;function te(a,c,o){return(0,i.deleteEndpoint)(s,"/v1/chains/{chainId}/transactions/{safeTxHash}",{path:{chainId:a,safeTxHash:c},body:{signature:o}})}e.deleteTransaction=te;function ie(a,c,o){return(0,i.postEndpoint)(s,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:a,safe_address:c},body:o})}e.postSafeGasEstimation=ie;function ae(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/nonces",{path:{chainId:a,safe_address:c}})}e.getNonces=ae;function se(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:a,safe_address:c},body:o})}e.proposeTransaction=se;function ce(a,c,o,d){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/views/transaction-confirmation",{path:{chainId:a,safe_address:c},body:{data:o,to:d}})}e.getConfirmationView=ce;function oe(a){return(0,i.getEndpoint)(s,"/v1/chains",{query:a})}e.getChainsConfig=oe;function re(a){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}",{path:{chainId:a}})}e.getChainConfig=re;function de(a,c={}){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safe-apps",{path:{chainId:a},query:c})}e.getSafeApps=de;function ue(a){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:a}})}e.getMasterCopies=ue;function le(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/data-decoder",{path:{chainId:a},body:{data:c,to:o}})}e.getDecodedData=le;function fe(a,c,o){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:a,safe_address:c},query:{}},o)}e.getSafeMessages=fe;function ge(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/messages/{message_hash}",{path:{chainId:a,message_hash:c}})}e.getSafeMessage=ge;function he(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:a,safe_address:c},body:o})}e.proposeSafeMessage=he;function Ee(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/messages/{message_hash}/signatures",{path:{chainId:a,message_hash:c},body:o})}e.confirmSafeMessage=Ee;function _e(a,c={}){return(0,i.getEndpoint)(s,"/v2/chains/{chainId}/delegates",{path:{chainId:a},query:c})}e.getDelegates=_e;function Te(a){return(0,i.postEndpoint)(s,"/v1/register/notifications",{body:a})}e.registerDevice=Te;function ve(a,c,o){return(0,i.deleteEndpoint)(s,"/v1/chains/{chainId}/notifications/devices/{uuid}/safes/{safe_address}",{path:{chainId:a,safe_address:c,uuid:o}})}e.unregisterSafe=ve;function Ae(a,c){return(0,i.deleteEndpoint)(s,"/v1/chains/{chainId}/notifications/devices/{uuid}",{path:{chainId:a,uuid:c}})}e.unregisterDevice=Ae;function Ie(a,c,o,d){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails",{path:{chainId:a,safe_address:c},body:o,headers:d})}e.registerEmail=Ie;function Se(a,c,o,d,v){return(0,i.putEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:a,safe_address:c,signer:o},body:d,headers:v})}e.changeEmail=Se;function me(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}/verify-resend",{path:{chainId:a,safe_address:c,signer:o},body:""})}e.resendEmailVerificationCode=me;function ye(a,c,o,d){return(0,i.putEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}/verify",{path:{chainId:a,safe_address:c,signer:o},body:d})}e.verifyEmail=ye;function Oe(a,c,o,d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:a,safe_address:c,signer:o},headers:d})}e.getRegisteredEmail=Oe;function Ne(a,c,o,d){return(0,i.deleteEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:a,safe_address:c,signer:o},headers:d})}e.deleteRegisteredEmail=Ne;function Ce(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/recovery",{path:{chainId:a,safe_address:c},body:o})}e.registerRecoveryModule=Ce;function be(a){return(0,i.deleteEndpoint)(s,"/v1/subscriptions",{query:a})}e.unsubscribeSingle=be;function De(a){return(0,i.deleteEndpoint)(s,"/v1/subscriptions/all",{query:a})}e.unsubscribeAll=De;function Re(a,c){return(0,i.getEndpoint)(s,"/v1/safes",{query:Object.assign(Object.assign({},c),{safes:a.join(",")})})}e.getSafeOverviews=Re;function Me(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/contracts/{contractAddress}",{path:{chainId:a,contractAddress:c}})}e.getContract=Me;function we(){return(0,i.getEndpoint)(s,"/v1/auth/nonce",{credentials:"include"})}e.getAuthNonce=we;function Pe(a){return(0,i.postEndpoint)(s,"/v1/auth/verify",{body:a,credentials:"include"})}e.verifyAuth=Pe;function pe(a){return(0,i.postEndpoint)(s,"/v1/accounts",{body:a,credentials:"include"})}e.createAccount=pe;function Le(a){return(0,i.getEndpoint)(s,"/v1/accounts/{address}",{path:{address:a},credentials:"include"})}e.getAccount=Le;function Be(a){return(0,i.deleteEndpoint)(s,"/v1/accounts/{address}",{path:{address:a},credentials:"include"})}e.deleteAccount=Be;function He(){return(0,i.getEndpoint)(s,"/v1/accounts/data-types")}e.getAccountDataTypes=He;function je(a){return(0,i.getEndpoint)(s,"/v1/accounts/{address}/data-settings",{path:{address:a},credentials:"include"})}e.getAccountDataSettings=je;function Ue(a,c){return(0,i.putEndpoint)(s,"/v1/accounts/{address}/data-settings",{path:{address:a},body:c,credentials:"include"})}e.putAccountDataSettings=Ue})(Fe);class en{constructor(n){this.communicator=n}async getBySafeTxHash(n){if(!n)throw new Error("Invalid safeTxHash");return(await this.communicator.send(exports.Methods.getTxBySafeTxHash,{safeTxHash:n})).data}async signMessage(n){const t={message:n};return(await this.communicator.send(exports.Methods.signMessage,t)).data}async signTypedMessage(n){if(!R(n))throw new Error("Invalid typed data");return(await this.communicator.send(exports.Methods.signTypedMessage,{typedData:n})).data}async send({txs:n,params:t}){if(!n||!n.length)throw new Error("No transactions were passed");const i={txs:n,params:t};return(await this.communicator.send(exports.Methods.sendTransactions,i)).data}}const f={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"},T={defaultBlockParam:(e="latest")=>e,returnFullTxObjectParam:(e=!1)=>e,blockNumberToHex:e=>Number.isInteger(e)?`0x${e.toString(16)}`:e};class nn{constructor(n){this.communicator=n,this.call=this.buildRequest({call:f.eth_call,formatters:[null,T.defaultBlockParam]}),this.getBalance=this.buildRequest({call:f.eth_getBalance,formatters:[null,T.defaultBlockParam]}),this.getCode=this.buildRequest({call:f.eth_getCode,formatters:[null,T.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:f.eth_getStorageAt,formatters:[null,T.blockNumberToHex,T.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:f.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:f.eth_getBlockByHash,formatters:[null,T.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:f.eth_getBlockByNumber,formatters:[T.blockNumberToHex,T.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:f.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:f.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:f.eth_getTransactionCount,formatters:[null,T.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:f.eth_gasPrice}),this.getEstimateGas=t=>this.buildRequest({call:f.eth_estimateGas})([t]),this.setSafeSettings=this.buildRequest({call:f.safe_setSettings})}buildRequest(n){const{call:t,formatters:i}=n;return async r=>{i&&Array.isArray(r)&&i.forEach((l,g)=>{l&&(r[g]=l(r[g]))});const s={call:t,params:r||[]};return(await this.communicator.send(exports.Methods.rpcCall,s)).data}}}const tn="0x1626ba7e",an="0x20c13b0b",D=4001;class y extends Error{constructor(n,t,i){super(n),this.code=t,this.data=i,Object.setPrototypeOf(this,y.prototype)}}class k{constructor(n){this.communicator=n}async getPermissions(){return(await this.communicator.send(exports.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(n){if(!this.isPermissionRequestValid(n))throw new y("Permissions request is invalid",D);try{return(await this.communicator.send(exports.Methods.wallet_requestPermissions,n)).data}catch{throw new y("Permissions rejected",D)}}isPermissionRequestValid(n){return n.every(t=>typeof t=="object"?Object.keys(t).every(i=>!!Object.values(exports.RestrictedMethods).includes(i)):!1)}}const w=(e,n)=>n.some(t=>t.parentCapability===e),sn=()=>(e,n,t)=>{const i=t.value;return t.value=async function(){const r=new k(this.communicator);let s=await r.getPermissions();if(w(n,s)||(s=await r.requestPermissions([{[n]:{}}])),!w(n,s))throw new y("Permissions rejected",D);return i.apply(this)},t};var cn=function(e,n,t,i){var r=arguments.length,s=r<3?n:i===null?i=Object.getOwnPropertyDescriptor(n,t):i,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,n,t,i);else for(var l=e.length-1;l>=0;l--)(u=e[l])&&(s=(r<3?u(s):r>3?u(n,t,s):u(n,t))||s);return r>3&&s&&Object.defineProperty(n,t,s),s};class K{constructor(n){this.communicator=n}async getChainInfo(){return(await this.communicator.send(exports.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(exports.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:n="usd"}={}){return(await this.communicator.send(exports.Methods.getSafeBalances,{currency:n})).data}async check1271Signature(n,t="0x"){const i=await this.getInfo(),r=N.encodeFunctionData({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[n,t]}),s={call:f.eth_call,params:[{to:i.safeAddress,data:r},"latest"]};try{return(await this.communicator.send(exports.Methods.rpcCall,s)).data.slice(0,10).toLowerCase()===tn}catch{return!1}}async check1271SignatureBytes(n,t="0x"){const i=await this.getInfo(),r=N.encodeFunctionData({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[n,t]}),s={call:f.eth_call,params:[{to:i.safeAddress,data:r},"latest"]};try{return(await this.communicator.send(exports.Methods.rpcCall,s)).data.slice(0,10).toLowerCase()===an}catch{return!1}}calculateMessageHash(n){return N.hashMessage(n)}calculateTypedMessageHash(n){const t=typeof n.domain.chainId=="object"?n.domain.chainId.toNumber():Number(n.domain.chainId);let i=n.primaryType;if(!i){const r=Object.values(n.types),s=Object.keys(n.types).filter(u=>r.every(l=>l.every(({type:g})=>g.replace("[","").replace("]","")!==u)));if(s.length===0||s.length>1)throw new Error("Please specify primaryType");i=s[0]}return N.hashTypedData({message:n.message,domain:{...n.domain,chainId:t,verifyingContract:n.domain.verifyingContract,salt:n.domain.salt},types:n.types,primaryType:i})}async getOffChainSignature(n){return(await this.communicator.send(exports.Methods.getOffChainSignature,n)).data}async isMessageSigned(n,t="0x"){let i;if(typeof n=="string"&&(i=async()=>{const r=this.calculateMessageHash(n);return await this.isMessageHashSigned(r,t)}),R(n)&&(i=async()=>{const r=this.calculateTypedMessageHash(n);return await this.isMessageHashSigned(r,t)}),i)return await i();throw new Error("Invalid message type")}async isMessageHashSigned(n,t="0x"){const i=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const r of i)if(await r(n,t))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(exports.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(exports.Methods.requestAddressBook,void 0)).data}}cn([sn()],K.prototype,"requestAddressBook",null);class on{constructor(n={}){const{allowedDomains:t=null,debug:i=!1}=n;this.communicator=new Ve(t,i),this.eth=new nn(this.communicator),this.txs=new en(this.communicator),this.safe=new K(this.communicator),this.wallet=new k(this.communicator)}}exports.MessageFormatter=O;exports.RPC_CALLS=f;exports.default=on;exports.getSDKVersion=P;exports.isObjectEIP712TypedData=R;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./W3MFrameProviderSingleton-SRLqDWgO.cjs"),N=require("./wagmi-GgXheXd8.cjs"),P=()=>"9.1.0",Ge=e=>e.toString(16).padStart(2,"0"),We=e=>{const n=new Uint8Array(e/2);return window.crypto.getRandomValues(n),Array.from(n,Ge).join("")},qe=()=>typeof window<"u"?We(10):new Date().getTime().toString(36);class O{}O.makeRequest=(e,n)=>({id:qe(),method:e,params:n,env:{sdkVersion:P()}});O.makeResponse=(e,n,t)=>({id:e,success:!0,version:t,data:n});O.makeErrorResponse=(e,n,t)=>({id:e,success:!1,error:n,version:t});exports.Methods=void 0;(function(e){e.sendTransactions="sendTransactions",e.rpcCall="rpcCall",e.getChainInfo="getChainInfo",e.getSafeInfo="getSafeInfo",e.getTxBySafeTxHash="getTxBySafeTxHash",e.getSafeBalances="getSafeBalances",e.signMessage="signMessage",e.signTypedMessage="signTypedMessage",e.getEnvironmentInfo="getEnvironmentInfo",e.getOffChainSignature="getOffChainSignature",e.requestAddressBook="requestAddressBook",e.wallet_getPermissions="wallet_getPermissions",e.wallet_requestPermissions="wallet_requestPermissions"})(exports.Methods||(exports.Methods={}));exports.RestrictedMethods=void 0;(function(e){e.requestAddressBook="requestAddressBook"})(exports.RestrictedMethods||(exports.RestrictedMethods={}));class Ve{constructor(n=null,t=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:i,data:r,source:s})=>{const u=!r,l=!this.isServer&&s===window.parent,g=typeof r.version<"u"&&parseInt(r.version.split(".")[0]),A=typeof g=="number"&&g>=1;let h=!0;return Array.isArray(this.allowedOrigins)&&(h=this.allowedOrigins.find(I=>I.test(i))!==void 0),!u&&l&&A&&h},this.logIncomingMessage=i=>{console.info(`Safe Apps SDK v1: A message was received from origin ${i.origin}. `,i.data)},this.onParentMessage=i=>{this.isValidMessage(i)&&(this.debugMode&&this.logIncomingMessage(i),this.handleIncomingMessage(i.data))},this.handleIncomingMessage=i=>{const{id:r}=i,s=this.callbacks.get(r);s&&(s(i),this.callbacks.delete(r))},this.send=(i,r)=>{const s=O.makeRequest(i,r);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(s,"*"),new Promise((u,l)=>{this.callbacks.set(s.id,g=>{if(!g.success){l(new Error(g.error));return}u(g)})})},this.allowedOrigins=n,this.debugMode=t,this.isServer||window.addEventListener("message",this.onParentMessage)}}const R=e=>typeof e=="object"&&e!=null&&"domain"in e&&"types"in e&&"message"in e;var Fe={},E={},_={},M=m.commonjsGlobal&&m.commonjsGlobal.__awaiter||function(e,n,t,i){function r(s){return s instanceof t?s:new t(function(u){u(s)})}return new(t||(t=Promise))(function(s,u){function l(h){try{A(i.next(h))}catch(I){u(I)}}function g(h){try{A(i.throw(h))}catch(I){u(I)}}function A(h){h.done?s(h.value):r(h.value).then(l,g)}A((i=i.apply(e,n||[])).next())})};Object.defineProperty(_,"__esModule",{value:!0});_.getData=_.fetchData=_.stringifyQuery=_.insertParams=void 0;const ke=e=>typeof e=="object"&&e!==null&&"code"in e&&"message"in e;function Ke(e,n,t){return e.replace(new RegExp(`\\{${n}\\}`,"g"),t)}function Xe(e,n){return n?Object.keys(n).reduce((t,i)=>Ke(t,i,String(n[i])),e):e}_.insertParams=Xe;function Qe(e){if(!e)return"";const n=new URLSearchParams;Object.keys(e).forEach(i=>{e[i]!=null&&n.append(i,String(e[i]))});const t=n.toString();return t?`?${t}`:""}_.stringifyQuery=Qe;function p(e){return M(this,void 0,void 0,function*(){let n;try{n=yield e.json()}catch{n={}}if(!e.ok){const t=ke(n)?`CGW error - ${n.code}: ${n.message}`:`CGW error - status ${e.statusText}`;throw new Error(t)}return n})}function $e(e,n,t,i,r){return M(this,void 0,void 0,function*(){const s=Object.assign({"Content-Type":"application/json"},i),u={method:n??"POST",headers:s};r&&(u.credentials=r),t!=null&&(u.body=typeof t=="string"?t:JSON.stringify(t));const l=yield fetch(e,u);return p(l)})}_.fetchData=$e;function Ye(e,n,t){return M(this,void 0,void 0,function*(){const i={method:"GET"};n&&(i.headers=Object.assign(Object.assign({},n),{"Content-Type":"application/json"})),t&&(i.credentials=t);const r=yield fetch(e,i);return p(r)})}_.getData=Ye;Object.defineProperty(E,"__esModule",{value:!0});E.getEndpoint=E.deleteEndpoint=E.putEndpoint=E.postEndpoint=void 0;const S=_;function C(e,n,t,i){const r=(0,S.insertParams)(n,t),s=(0,S.stringifyQuery)(i);return`${e}${r}${s}`}function Je(e,n,t){const i=C(e,n,t==null?void 0:t.path,t==null?void 0:t.query);return(0,S.fetchData)(i,"POST",t==null?void 0:t.body,t==null?void 0:t.headers,t==null?void 0:t.credentials)}E.postEndpoint=Je;function ze(e,n,t){const i=C(e,n,t==null?void 0:t.path,t==null?void 0:t.query);return(0,S.fetchData)(i,"PUT",t==null?void 0:t.body,t==null?void 0:t.headers,t==null?void 0:t.credentials)}E.putEndpoint=ze;function Ze(e,n,t){const i=C(e,n,t==null?void 0:t.path,t==null?void 0:t.query);return(0,S.fetchData)(i,"DELETE",t==null?void 0:t.body,t==null?void 0:t.headers,t==null?void 0:t.credentials)}E.deleteEndpoint=Ze;function xe(e,n,t,i){if(i)return(0,S.getData)(i,void 0,t==null?void 0:t.credentials);const r=C(e,n,t==null?void 0:t.path,t==null?void 0:t.query);return(0,S.getData)(r,t==null?void 0:t.headers,t==null?void 0:t.credentials)}E.getEndpoint=xe;var b={};Object.defineProperty(b,"__esModule",{value:!0});b.DEFAULT_BASE_URL=void 0;b.DEFAULT_BASE_URL="https://safe-client.safe.global";var L={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationVersionState=void 0,function(n){n.UP_TO_DATE="UP_TO_DATE",n.OUTDATED="OUTDATED",n.UNKNOWN="UNKNOWN"}(e.ImplementationVersionState||(e.ImplementationVersionState={}))})(L);var B={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppSocialPlatforms=e.SafeAppFeatures=e.SafeAppAccessPolicyTypes=void 0,function(n){n.NoRestrictions="NO_RESTRICTIONS",n.DomainAllowlist="DOMAIN_ALLOWLIST"}(e.SafeAppAccessPolicyTypes||(e.SafeAppAccessPolicyTypes={})),function(n){n.BATCHED_TRANSACTIONS="BATCHED_TRANSACTIONS"}(e.SafeAppFeatures||(e.SafeAppFeatures={})),function(n){n.TWITTER="TWITTER",n.GITHUB="GITHUB",n.DISCORD="DISCORD"}(e.SafeAppSocialPlatforms||(e.SafeAppSocialPlatforms={}))})(B);var H={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LabelValue=e.StartTimeValue=e.DurationType=e.DetailedExecutionInfoType=e.TransactionListItemType=e.ConflictType=e.TransactionInfoType=e.SettingsInfoType=e.TransactionTokenType=e.TransferDirection=e.TransactionStatus=e.Operation=void 0,function(n){n[n.CALL=0]="CALL",n[n.DELEGATE=1]="DELEGATE"}(e.Operation||(e.Operation={})),function(n){n.AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",n.AWAITING_EXECUTION="AWAITING_EXECUTION",n.CANCELLED="CANCELLED",n.FAILED="FAILED",n.SUCCESS="SUCCESS"}(e.TransactionStatus||(e.TransactionStatus={})),function(n){n.INCOMING="INCOMING",n.OUTGOING="OUTGOING",n.UNKNOWN="UNKNOWN"}(e.TransferDirection||(e.TransferDirection={})),function(n){n.ERC20="ERC20",n.ERC721="ERC721",n.NATIVE_COIN="NATIVE_COIN"}(e.TransactionTokenType||(e.TransactionTokenType={})),function(n){n.SET_FALLBACK_HANDLER="SET_FALLBACK_HANDLER",n.ADD_OWNER="ADD_OWNER",n.REMOVE_OWNER="REMOVE_OWNER",n.SWAP_OWNER="SWAP_OWNER",n.CHANGE_THRESHOLD="CHANGE_THRESHOLD",n.CHANGE_IMPLEMENTATION="CHANGE_IMPLEMENTATION",n.ENABLE_MODULE="ENABLE_MODULE",n.DISABLE_MODULE="DISABLE_MODULE",n.SET_GUARD="SET_GUARD",n.DELETE_GUARD="DELETE_GUARD"}(e.SettingsInfoType||(e.SettingsInfoType={})),function(n){n.TRANSFER="Transfer",n.SETTINGS_CHANGE="SettingsChange",n.CUSTOM="Custom",n.CREATION="Creation",n.SWAP_ORDER="SwapOrder",n.TWAP_ORDER="TwapOrder",n.SWAP_TRANSFER="SwapTransfer"}(e.TransactionInfoType||(e.TransactionInfoType={})),function(n){n.NONE="None",n.HAS_NEXT="HasNext",n.END="End"}(e.ConflictType||(e.ConflictType={})),function(n){n.TRANSACTION="TRANSACTION",n.LABEL="LABEL",n.CONFLICT_HEADER="CONFLICT_HEADER",n.DATE_LABEL="DATE_LABEL"}(e.TransactionListItemType||(e.TransactionListItemType={})),function(n){n.MULTISIG="MULTISIG",n.MODULE="MODULE"}(e.DetailedExecutionInfoType||(e.DetailedExecutionInfoType={})),function(n){n.AUTO="AUTO",n.LIMIT_DURATION="LIMIT_DURATION"}(e.DurationType||(e.DurationType={})),function(n){n.AT_MINING_TIME="AT_MINING_TIME",n.AT_EPOCH="AT_EPOCH"}(e.StartTimeValue||(e.StartTimeValue={})),function(n){n.Queued="Queued",n.Next="Next"}(e.LabelValue||(e.LabelValue={}))})(H);var j={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FEATURES=e.GAS_PRICE_TYPE=e.RPC_AUTHENTICATION=void 0,function(n){n.API_KEY_PATH="API_KEY_PATH",n.NO_AUTHENTICATION="NO_AUTHENTICATION",n.UNKNOWN="UNKNOWN"}(e.RPC_AUTHENTICATION||(e.RPC_AUTHENTICATION={})),function(n){n.ORACLE="ORACLE",n.FIXED="FIXED",n.FIXED_1559="FIXED1559",n.UNKNOWN="UNKNOWN"}(e.GAS_PRICE_TYPE||(e.GAS_PRICE_TYPE={})),function(n){n.ERC721="ERC721",n.SAFE_APPS="SAFE_APPS",n.CONTRACT_INTERACTION="CONTRACT_INTERACTION",n.DOMAIN_LOOKUP="DOMAIN_LOOKUP",n.SPENDING_LIMIT="SPENDING_LIMIT",n.EIP1559="EIP1559",n.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL",n.TX_SIMULATION="TX_SIMULATION",n.EIP1271="EIP1271"}(e.FEATURES||(e.FEATURES={}))})(j);var U={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TokenType=void 0,function(n){n.ERC20="ERC20",n.ERC721="ERC721",n.NATIVE_TOKEN="NATIVE_TOKEN"}(e.TokenType||(e.TokenType={}))})(U);var G={};Object.defineProperty(G,"__esModule",{value:!0});var W={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfirmationViewTypes=void 0,function(n){n.COW_SWAP_ORDER="COW_SWAP_ORDER",n.COW_SWAP_TWAP_ORDER="COW_SWAP_TWAP_ORDER"}(e.ConfirmationViewTypes||(e.ConfirmationViewTypes={}))})(W);var q={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeMessageStatus=e.SafeMessageListItemType=void 0,function(n){n.DATE_LABEL="DATE_LABEL",n.MESSAGE="MESSAGE"}(e.SafeMessageListItemType||(e.SafeMessageListItemType={})),function(n){n.NEEDS_CONFIRMATION="NEEDS_CONFIRMATION",n.CONFIRMED="CONFIRMED"}(e.SafeMessageStatus||(e.SafeMessageStatus={}))})(q);var V={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeviceType=void 0,function(n){n.ANDROID="ANDROID",n.IOS="IOS",n.WEB="WEB"}(e.DeviceType||(e.DeviceType={}))})(V);var F={};Object.defineProperty(F,"__esModule",{value:!0});(function(e){var n=m.commonjsGlobal&&m.commonjsGlobal.__createBinding||(Object.create?function(a,c,o,d){d===void 0&&(d=o);var v=Object.getOwnPropertyDescriptor(c,o);(!v||("get"in v?!c.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return c[o]}}),Object.defineProperty(a,d,v)}:function(a,c,o,d){d===void 0&&(d=o),a[d]=c[o]}),t=m.commonjsGlobal&&m.commonjsGlobal.__exportStar||function(a,c){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(c,o)&&n(c,a,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.deleteAccount=e.getAccount=e.createAccount=e.verifyAuth=e.getAuthNonce=e.getContract=e.getSafeOverviews=e.unsubscribeAll=e.unsubscribeSingle=e.registerRecoveryModule=e.deleteRegisteredEmail=e.getRegisteredEmail=e.verifyEmail=e.resendEmailVerificationCode=e.changeEmail=e.registerEmail=e.unregisterDevice=e.unregisterSafe=e.registerDevice=e.getDelegates=e.confirmSafeMessage=e.proposeSafeMessage=e.getSafeMessage=e.getSafeMessages=e.getDecodedData=e.getMasterCopies=e.getSafeApps=e.getChainConfig=e.getChainsConfig=e.getConfirmationView=e.proposeTransaction=e.getNonces=e.postSafeGasEstimation=e.deleteTransaction=e.getTransactionDetails=e.getTransactionQueue=e.getTransactionHistory=e.getCollectiblesPage=e.getCollectibles=e.getAllOwnedSafes=e.getOwnedSafes=e.getFiatCurrencies=e.getBalances=e.getMultisigTransactions=e.getModuleTransactions=e.getIncomingTransfers=e.getSafeInfo=e.getRelayCount=e.relayTransaction=e.setBaseUrl=void 0,e.putAccountDataSettings=e.getAccountDataSettings=e.getAccountDataTypes=void 0;const i=E,r=b;t(L,e),t(B,e),t(H,e),t(j,e),t(U,e),t(G,e),t(W,e),t(q,e),t(V,e),t(F,e);let s=r.DEFAULT_BASE_URL;const u=a=>{s=a};e.setBaseUrl=u;function l(a,c){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/relay",{path:{chainId:a},body:c})}e.relayTransaction=l;function g(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/relay/{address}",{path:{chainId:a,address:c}})}e.getRelayCount=g;function A(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:a,address:c}})}e.getSafeInfo=A;function h(a,c,o,d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/incoming-transfers/",{path:{chainId:a,address:c},query:o},d)}e.getIncomingTransfers=h;function I(a,c,o,d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/module-transactions/",{path:{chainId:a,address:c},query:o},d)}e.getModuleTransactions=I;function X(a,c,o,d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/multisig-transactions/",{path:{chainId:a,address:c},query:o},d)}e.getMultisigTransactions=X;function Q(a,c,o="usd",d={}){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:a,address:c,currency:o},query:d})}e.getBalances=Q;function $(){return(0,i.getEndpoint)(s,"/v1/balances/supported-fiat-codes")}e.getFiatCurrencies=$;function Y(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:a,address:c}})}e.getOwnedSafes=Y;function J(a){return(0,i.getEndpoint)(s,"/v1/owners/{address}/safes",{path:{address:a}})}e.getAllOwnedSafes=J;function z(a,c,o={}){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:a,address:c},query:o})}e.getCollectibles=z;function Z(a,c,o={},d){return(0,i.getEndpoint)(s,"/v2/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:a,address:c},query:o},d)}e.getCollectiblesPage=Z;function x(a,c,o={},d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:a,safe_address:c},query:o},d)}e.getTransactionHistory=x;function ee(a,c,o={},d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:a,safe_address:c},query:o},d)}e.getTransactionQueue=ee;function ne(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:a,transactionId:c}})}e.getTransactionDetails=ne;function te(a,c,o){return(0,i.deleteEndpoint)(s,"/v1/chains/{chainId}/transactions/{safeTxHash}",{path:{chainId:a,safeTxHash:c},body:{signature:o}})}e.deleteTransaction=te;function ie(a,c,o){return(0,i.postEndpoint)(s,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:a,safe_address:c},body:o})}e.postSafeGasEstimation=ie;function ae(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/nonces",{path:{chainId:a,safe_address:c}})}e.getNonces=ae;function se(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:a,safe_address:c},body:o})}e.proposeTransaction=se;function ce(a,c,o,d){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/views/transaction-confirmation",{path:{chainId:a,safe_address:c},body:{data:o,to:d}})}e.getConfirmationView=ce;function oe(a){return(0,i.getEndpoint)(s,"/v1/chains",{query:a})}e.getChainsConfig=oe;function re(a){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}",{path:{chainId:a}})}e.getChainConfig=re;function de(a,c={}){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safe-apps",{path:{chainId:a},query:c})}e.getSafeApps=de;function ue(a){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:a}})}e.getMasterCopies=ue;function le(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/data-decoder",{path:{chainId:a},body:{data:c,to:o}})}e.getDecodedData=le;function fe(a,c,o){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:a,safe_address:c},query:{}},o)}e.getSafeMessages=fe;function ge(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/messages/{message_hash}",{path:{chainId:a,message_hash:c}})}e.getSafeMessage=ge;function he(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:a,safe_address:c},body:o})}e.proposeSafeMessage=he;function Ee(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/messages/{message_hash}/signatures",{path:{chainId:a,message_hash:c},body:o})}e.confirmSafeMessage=Ee;function _e(a,c={}){return(0,i.getEndpoint)(s,"/v2/chains/{chainId}/delegates",{path:{chainId:a},query:c})}e.getDelegates=_e;function Te(a){return(0,i.postEndpoint)(s,"/v1/register/notifications",{body:a})}e.registerDevice=Te;function ve(a,c,o){return(0,i.deleteEndpoint)(s,"/v1/chains/{chainId}/notifications/devices/{uuid}/safes/{safe_address}",{path:{chainId:a,safe_address:c,uuid:o}})}e.unregisterSafe=ve;function Ae(a,c){return(0,i.deleteEndpoint)(s,"/v1/chains/{chainId}/notifications/devices/{uuid}",{path:{chainId:a,uuid:c}})}e.unregisterDevice=Ae;function Ie(a,c,o,d){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails",{path:{chainId:a,safe_address:c},body:o,headers:d})}e.registerEmail=Ie;function Se(a,c,o,d,v){return(0,i.putEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:a,safe_address:c,signer:o},body:d,headers:v})}e.changeEmail=Se;function me(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}/verify-resend",{path:{chainId:a,safe_address:c,signer:o},body:""})}e.resendEmailVerificationCode=me;function ye(a,c,o,d){return(0,i.putEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}/verify",{path:{chainId:a,safe_address:c,signer:o},body:d})}e.verifyEmail=ye;function Oe(a,c,o,d){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:a,safe_address:c,signer:o},headers:d})}e.getRegisteredEmail=Oe;function Ne(a,c,o,d){return(0,i.deleteEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:a,safe_address:c,signer:o},headers:d})}e.deleteRegisteredEmail=Ne;function Ce(a,c,o){return(0,i.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/recovery",{path:{chainId:a,safe_address:c},body:o})}e.registerRecoveryModule=Ce;function be(a){return(0,i.deleteEndpoint)(s,"/v1/subscriptions",{query:a})}e.unsubscribeSingle=be;function De(a){return(0,i.deleteEndpoint)(s,"/v1/subscriptions/all",{query:a})}e.unsubscribeAll=De;function Re(a,c){return(0,i.getEndpoint)(s,"/v1/safes",{query:Object.assign(Object.assign({},c),{safes:a.join(",")})})}e.getSafeOverviews=Re;function Me(a,c){return(0,i.getEndpoint)(s,"/v1/chains/{chainId}/contracts/{contractAddress}",{path:{chainId:a,contractAddress:c}})}e.getContract=Me;function we(){return(0,i.getEndpoint)(s,"/v1/auth/nonce",{credentials:"include"})}e.getAuthNonce=we;function Pe(a){return(0,i.postEndpoint)(s,"/v1/auth/verify",{body:a,credentials:"include"})}e.verifyAuth=Pe;function pe(a){return(0,i.postEndpoint)(s,"/v1/accounts",{body:a,credentials:"include"})}e.createAccount=pe;function Le(a){return(0,i.getEndpoint)(s,"/v1/accounts/{address}",{path:{address:a},credentials:"include"})}e.getAccount=Le;function Be(a){return(0,i.deleteEndpoint)(s,"/v1/accounts/{address}",{path:{address:a},credentials:"include"})}e.deleteAccount=Be;function He(){return(0,i.getEndpoint)(s,"/v1/accounts/data-types")}e.getAccountDataTypes=He;function je(a){return(0,i.getEndpoint)(s,"/v1/accounts/{address}/data-settings",{path:{address:a},credentials:"include"})}e.getAccountDataSettings=je;function Ue(a,c){return(0,i.putEndpoint)(s,"/v1/accounts/{address}/data-settings",{path:{address:a},body:c,credentials:"include"})}e.putAccountDataSettings=Ue})(Fe);class en{constructor(n){this.communicator=n}async getBySafeTxHash(n){if(!n)throw new Error("Invalid safeTxHash");return(await this.communicator.send(exports.Methods.getTxBySafeTxHash,{safeTxHash:n})).data}async signMessage(n){const t={message:n};return(await this.communicator.send(exports.Methods.signMessage,t)).data}async signTypedMessage(n){if(!R(n))throw new Error("Invalid typed data");return(await this.communicator.send(exports.Methods.signTypedMessage,{typedData:n})).data}async send({txs:n,params:t}){if(!n||!n.length)throw new Error("No transactions were passed");const i={txs:n,params:t};return(await this.communicator.send(exports.Methods.sendTransactions,i)).data}}const f={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"},T={defaultBlockParam:(e="latest")=>e,returnFullTxObjectParam:(e=!1)=>e,blockNumberToHex:e=>Number.isInteger(e)?`0x${e.toString(16)}`:e};class nn{constructor(n){this.communicator=n,this.call=this.buildRequest({call:f.eth_call,formatters:[null,T.defaultBlockParam]}),this.getBalance=this.buildRequest({call:f.eth_getBalance,formatters:[null,T.defaultBlockParam]}),this.getCode=this.buildRequest({call:f.eth_getCode,formatters:[null,T.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:f.eth_getStorageAt,formatters:[null,T.blockNumberToHex,T.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:f.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:f.eth_getBlockByHash,formatters:[null,T.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:f.eth_getBlockByNumber,formatters:[T.blockNumberToHex,T.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:f.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:f.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:f.eth_getTransactionCount,formatters:[null,T.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:f.eth_gasPrice}),this.getEstimateGas=t=>this.buildRequest({call:f.eth_estimateGas})([t]),this.setSafeSettings=this.buildRequest({call:f.safe_setSettings})}buildRequest(n){const{call:t,formatters:i}=n;return async r=>{i&&Array.isArray(r)&&i.forEach((l,g)=>{l&&(r[g]=l(r[g]))});const s={call:t,params:r||[]};return(await this.communicator.send(exports.Methods.rpcCall,s)).data}}}const tn="0x1626ba7e",an="0x20c13b0b",D=4001;class y extends Error{constructor(n,t,i){super(n),this.code=t,this.data=i,Object.setPrototypeOf(this,y.prototype)}}class k{constructor(n){this.communicator=n}async getPermissions(){return(await this.communicator.send(exports.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(n){if(!this.isPermissionRequestValid(n))throw new y("Permissions request is invalid",D);try{return(await this.communicator.send(exports.Methods.wallet_requestPermissions,n)).data}catch{throw new y("Permissions rejected",D)}}isPermissionRequestValid(n){return n.every(t=>typeof t=="object"?Object.keys(t).every(i=>!!Object.values(exports.RestrictedMethods).includes(i)):!1)}}const w=(e,n)=>n.some(t=>t.parentCapability===e),sn=()=>(e,n,t)=>{const i=t.value;return t.value=async function(){const r=new k(this.communicator);let s=await r.getPermissions();if(w(n,s)||(s=await r.requestPermissions([{[n]:{}}])),!w(n,s))throw new y("Permissions rejected",D);return i.apply(this)},t};var cn=function(e,n,t,i){var r=arguments.length,s=r<3?n:i===null?i=Object.getOwnPropertyDescriptor(n,t):i,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,n,t,i);else for(var l=e.length-1;l>=0;l--)(u=e[l])&&(s=(r<3?u(s):r>3?u(n,t,s):u(n,t))||s);return r>3&&s&&Object.defineProperty(n,t,s),s};class K{constructor(n){this.communicator=n}async getChainInfo(){return(await this.communicator.send(exports.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(exports.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:n="usd"}={}){return(await this.communicator.send(exports.Methods.getSafeBalances,{currency:n})).data}async check1271Signature(n,t="0x"){const i=await this.getInfo(),r=N.encodeFunctionData({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[n,t]}),s={call:f.eth_call,params:[{to:i.safeAddress,data:r},"latest"]};try{return(await this.communicator.send(exports.Methods.rpcCall,s)).data.slice(0,10).toLowerCase()===tn}catch{return!1}}async check1271SignatureBytes(n,t="0x"){const i=await this.getInfo(),r=N.encodeFunctionData({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[n,t]}),s={call:f.eth_call,params:[{to:i.safeAddress,data:r},"latest"]};try{return(await this.communicator.send(exports.Methods.rpcCall,s)).data.slice(0,10).toLowerCase()===an}catch{return!1}}calculateMessageHash(n){return N.hashMessage(n)}calculateTypedMessageHash(n){const t=typeof n.domain.chainId=="object"?n.domain.chainId.toNumber():Number(n.domain.chainId);let i=n.primaryType;if(!i){const r=Object.values(n.types),s=Object.keys(n.types).filter(u=>r.every(l=>l.every(({type:g})=>g.replace("[","").replace("]","")!==u)));if(s.length===0||s.length>1)throw new Error("Please specify primaryType");i=s[0]}return N.hashTypedData({message:n.message,domain:{...n.domain,chainId:t,verifyingContract:n.domain.verifyingContract,salt:n.domain.salt},types:n.types,primaryType:i})}async getOffChainSignature(n){return(await this.communicator.send(exports.Methods.getOffChainSignature,n)).data}async isMessageSigned(n,t="0x"){let i;if(typeof n=="string"&&(i=async()=>{const r=this.calculateMessageHash(n);return await this.isMessageHashSigned(r,t)}),R(n)&&(i=async()=>{const r=this.calculateTypedMessageHash(n);return await this.isMessageHashSigned(r,t)}),i)return await i();throw new Error("Invalid message type")}async isMessageHashSigned(n,t="0x"){const i=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const r of i)if(await r(n,t))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(exports.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(exports.Methods.requestAddressBook,void 0)).data}}cn([sn()],K.prototype,"requestAddressBook",null);class on{constructor(n={}){const{allowedDomains:t=null,debug:i=!1}=n;this.communicator=new Ve(t,i),this.eth=new nn(this.communicator),this.txs=new en(this.communicator),this.safe=new K(this.communicator),this.wallet=new k(this.communicator)}}exports.MessageFormatter=O;exports.RPC_CALLS=f;exports.default=on;exports.getSDKVersion=P;exports.isObjectEIP712TypedData=R;
@@ -1,5 +1,5 @@
1
- import { L as a } from "./W3MFrameProviderSingleton-CTz2n0lO.js";
2
- import { Q as e, _ as n, Z as L, a8 as o, aE as W, a9 as l, aa as r, aT as M, aY as Z, aZ as V, ab as d, $ as p, ad as H, ac as c, ae as m, aW as _, aX as k, af as h, ag as g, ah as I, ai as b, aj as B, ak as T, al as v, b7 as w, b8 as S, a0 as f, am as x, b3 as A, an as N, a1 as U, b0 as D, ao as E, ap as P, aq as G, ar as O, aO as Q, b2 as y, b4 as z, aP as F, a$ as X, as as $, aQ as j, b5 as q, a_ as J, av as K, aR as R, a2 as Y, a3 as a1, a4 as i1, ax as s1, aw as C1, ay as u1, az as t1, aN as e1, aA as n1, b1 as L1, aU as o1, aV as W1, aS as l1, aB as r1, aC as M1, b6 as Z1, b9 as V1, a5 as d1, aD as p1, aF as H1, aH as c1, a6 as m1, aG as _1, aJ as k1, aI as h1, at as g1, au as I1, aK as b1, a7 as B1, aL as T1, aM as v1, y as w1, T as S1, U as f1, X as x1 } from "./W3MFrameProviderSingleton-CTz2n0lO.js";
1
+ import { Q as a } from "./W3MFrameProviderSingleton--HSg3nEz.js";
2
+ import { T as e, $ as n, _ as L, a9 as o, aF as W, aa as l, ab as r, aU as M, aZ as Z, a_ as V, ac as d, a0 as p, ae as H, ad as c, af as m, aX as _, aY as k, ag as h, ah as b, ai as g, aj as I, ak as B, al as T, am as v, b8 as w, b9 as S, a1 as f, an as x, b4 as A, ao as N, a2 as U, b1 as D, ap as E, aq as P, ar as G, as as z, aP as O, b3 as Q, b5 as F, aQ as X, b0 as $, at as j, aR as q, b6 as y, a$ as J, aw as K, aS as R, a3 as Y, a4 as a1, a5 as i1, ay as s1, ax as C1, az as u1, aA as t1, aO as e1, aB as n1, b2 as L1, aV as o1, aW as W1, aT as l1, aC as r1, aD as M1, b7 as Z1, ba as V1, a6 as d1, aE as p1, aG as H1, aI as c1, a7 as m1, aH as _1, aK as k1, aJ as h1, au as b1, av as g1, aL as I1, a8 as B1, aM as T1, aN as v1, z as w1, U as S1, X as f1, Z as x1 } from "./W3MFrameProviderSingleton--HSg3nEz.js";
3
3
  const s = a`<svg class="input_mask" width="328" height="100" viewBox="0 0 328 100" fill="none">
4
4
  <mask id="path-1-inside-1_18299_4189">
5
5
  <path
@@ -60,9 +60,9 @@ export {
60
60
  _ as WuiChipButton,
61
61
  k as WuiCompatibleNetwork,
62
62
  h as WuiConnectButton,
63
- g as WuiCtaButton,
64
- I as WuiDetailsGroup,
65
- b as WuiDetailsGroupItem,
63
+ b as WuiCtaButton,
64
+ g as WuiDetailsGroup,
65
+ I as WuiDetailsGroupItem,
66
66
  B as WuiDropdownMenu,
67
67
  T as WuiEmailInput,
68
68
  v as WuiEnsInput,
@@ -77,15 +77,15 @@ export {
77
77
  E as WuiInputElement,
78
78
  P as WuiInputNumeric,
79
79
  G as WuiInputText,
80
- O as WuiLink,
81
- Q as WuiListAccordion,
82
- y as WuiListAccount,
83
- z as WuiListButton,
84
- F as WuiListContent,
85
- X as WuiListDescription,
86
- $ as WuiListItem,
87
- j as WuiListNetwork,
88
- q as WuiListSocial,
80
+ z as WuiLink,
81
+ O as WuiListAccordion,
82
+ Q as WuiListAccount,
83
+ F as WuiListButton,
84
+ X as WuiListContent,
85
+ $ as WuiListDescription,
86
+ j as WuiListItem,
87
+ q as WuiListNetwork,
88
+ y as WuiListSocial,
89
89
  J as WuiListToken,
90
90
  K as WuiListWallet,
91
91
  R as WuiListWalletTransaction,
@@ -114,9 +114,9 @@ export {
114
114
  _1 as WuiTokenButton,
115
115
  k1 as WuiTokenListItem,
116
116
  h1 as WuiTooltip,
117
- g1 as WuiTransactionListItem,
118
- I1 as WuiTransactionListItemLoader,
119
- b1 as WuiTransactionVisual,
117
+ b1 as WuiTransactionListItem,
118
+ g1 as WuiTransactionListItemLoader,
119
+ I1 as WuiTransactionVisual,
120
120
  B1 as WuiVisual,
121
121
  T1 as WuiVisualThumbnail,
122
122
  v1 as WuiWalletImage,
@@ -1,4 +1,4 @@
1
- import { t as u, v as h, c0 as R } from "./W3MFrameProviderSingleton-CTz2n0lO.js";
1
+ import { u, w as h, c1 as R } from "./W3MFrameProviderSingleton--HSg3nEz.js";
2
2
  const n = u({ history: ["ConnectWallet"], view: "ConnectWallet", data: void 0 }), x = { state: n, subscribe(e) {
3
3
  return h(n, () => e(n));
4
4
  }, push(e, t) {
@@ -230,7 +230,7 @@ class se {
230
230
  }
231
231
  async initUi() {
232
232
  if (typeof window < "u") {
233
- await import("./index-CmzUtRNr.js");
233
+ await import("./index-3Tles8GF.js");
234
234
  const t = document.createElement("wcm-modal");
235
235
  document.body.insertAdjacentElement("beforeend", t), c.setIsUiLoaded(!0);
236
236
  }
@@ -1 +1 @@
1
- "use strict";const p=require("./W3MFrameProviderSingleton-DQTwz0Iu.cjs");function _(n,a){for(var i=0;i<a.length;i++){const e=a[i];if(typeof e!="string"&&!Array.isArray(e)){for(const s in e)if(s!=="default"&&!(s in n)){const o=Object.getOwnPropertyDescriptor(e,s);o&&Object.defineProperty(n,s,o.get?o:{enumerable:!0,get:()=>e[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}var l={},g={},f={};Object.defineProperty(f,"__esModule",{value:!0});f.getLowerCase=void 0;function w(n){return n&&n.toLowerCase()}f.getLowerCase=w;Object.defineProperty(g,"__esModule",{value:!0});g.SafeAppProvider=void 0;const m=p.eventsExports,u=f;class k extends m.EventEmitter{constructor(a,i){super(),this.submittedTxs=new Map,this.safe=a,this.sdk=i}async connect(){this.emit("connect",{chainId:this.chainId})}async disconnect(){}get chainId(){return this.safe.chainId}async request(a){const{method:i,params:e=[]}=a;switch(i){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return`0x${this.chainId.toString(16)}`;case"personal_sign":{const[t,r]=e;if(this.safe.safeAddress.toLowerCase()!==r.toLowerCase())throw new Error("The address or message hash is invalid");const h=await this.sdk.txs.signMessage(t);return("signature"in h?h.signature:void 0)||"0x"}case"eth_sign":{const[t,r]=e;if(this.safe.safeAddress.toLowerCase()!==t.toLowerCase()||!r.startsWith("0x"))throw new Error("The address or message hash is invalid");const h=await this.sdk.txs.signMessage(r);return("signature"in h?h.signature:void 0)||"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{const[t,r]=e,h=typeof r=="string"?JSON.parse(r):r;if(this.safe.safeAddress.toLowerCase()!==t.toLowerCase())throw new Error("The address is invalid");const c=await this.sdk.txs.signTypedMessage(h);return("signature"in c?c.signature:void 0)||"0x"}case"eth_sendTransaction":const s={...e[0],value:e[0].value||"0",data:e[0].data||"0x"};typeof s.gas=="string"&&s.gas.startsWith("0x")&&(s.gas=parseInt(s.gas,16));const o=await this.sdk.txs.send({txs:[s],params:{safeTxGas:s.gas}});return this.submittedTxs.set(o.safeTxHash,{from:this.safe.safeAddress,hash:o.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:s.data,value:s.value,to:s.to,blockHash:null,blockNumber:null,transactionIndex:null}),o.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,u.getLowerCase)(e[0]),e[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,u.getLowerCase)(e[0]),e[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,u.getLowerCase)(e[0]),e[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,u.getLowerCase)(e[0]),e[1],e[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([e[0],e[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([e[0],e[1]]);case"eth_getTransactionByHash":let d=e[0];try{d=(await this.sdk.txs.getBySafeTxHash(d)).txHash||d}catch{}return this.submittedTxs.has(d)?this.submittedTxs.get(d):this.sdk.eth.getTransactionByHash([d]).then(t=>(t&&(t.hash=e[0]),t));case"eth_getTransactionReceipt":{let t=e[0];try{t=(await this.sdk.txs.getBySafeTxHash(t)).txHash||t}catch{}return this.sdk.eth.getTransactionReceipt([t]).then(r=>(r&&(r.transactionHash=e[0]),r))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(e[0]);case"eth_call":return this.sdk.eth.call([e[0],e[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([e[0]]);case"eth_gasPrice":return this.sdk.eth.getGasPrice();case"wallet_getPermissions":return this.sdk.wallet.getPermissions();case"wallet_requestPermissions":return this.sdk.wallet.requestPermissions(e[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([e[0]]);default:throw Error(`"${a.method}" not implemented`)}}send(a,i){a||i("Undefined request"),this.request(a).then(e=>i(null,{jsonrpc:"2.0",id:a.id,result:e})).catch(e=>i(e,null))}}g.SafeAppProvider=k;(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.SafeAppProvider=void 0;var a=g;Object.defineProperty(n,"SafeAppProvider",{enumerable:!0,get:function(){return a.SafeAppProvider}})})(l);const y=_({__proto__:null},[l]);exports.index=y;
1
+ "use strict";const p=require("./W3MFrameProviderSingleton-SRLqDWgO.cjs");function _(n,a){for(var i=0;i<a.length;i++){const e=a[i];if(typeof e!="string"&&!Array.isArray(e)){for(const s in e)if(s!=="default"&&!(s in n)){const o=Object.getOwnPropertyDescriptor(e,s);o&&Object.defineProperty(n,s,o.get?o:{enumerable:!0,get:()=>e[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}var l={},g={},f={};Object.defineProperty(f,"__esModule",{value:!0});f.getLowerCase=void 0;function w(n){return n&&n.toLowerCase()}f.getLowerCase=w;Object.defineProperty(g,"__esModule",{value:!0});g.SafeAppProvider=void 0;const m=p.eventsExports,u=f;class k extends m.EventEmitter{constructor(a,i){super(),this.submittedTxs=new Map,this.safe=a,this.sdk=i}async connect(){this.emit("connect",{chainId:this.chainId})}async disconnect(){}get chainId(){return this.safe.chainId}async request(a){const{method:i,params:e=[]}=a;switch(i){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return`0x${this.chainId.toString(16)}`;case"personal_sign":{const[t,r]=e;if(this.safe.safeAddress.toLowerCase()!==r.toLowerCase())throw new Error("The address or message hash is invalid");const h=await this.sdk.txs.signMessage(t);return("signature"in h?h.signature:void 0)||"0x"}case"eth_sign":{const[t,r]=e;if(this.safe.safeAddress.toLowerCase()!==t.toLowerCase()||!r.startsWith("0x"))throw new Error("The address or message hash is invalid");const h=await this.sdk.txs.signMessage(r);return("signature"in h?h.signature:void 0)||"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{const[t,r]=e,h=typeof r=="string"?JSON.parse(r):r;if(this.safe.safeAddress.toLowerCase()!==t.toLowerCase())throw new Error("The address is invalid");const c=await this.sdk.txs.signTypedMessage(h);return("signature"in c?c.signature:void 0)||"0x"}case"eth_sendTransaction":const s={...e[0],value:e[0].value||"0",data:e[0].data||"0x"};typeof s.gas=="string"&&s.gas.startsWith("0x")&&(s.gas=parseInt(s.gas,16));const o=await this.sdk.txs.send({txs:[s],params:{safeTxGas:s.gas}});return this.submittedTxs.set(o.safeTxHash,{from:this.safe.safeAddress,hash:o.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:s.data,value:s.value,to:s.to,blockHash:null,blockNumber:null,transactionIndex:null}),o.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,u.getLowerCase)(e[0]),e[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,u.getLowerCase)(e[0]),e[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,u.getLowerCase)(e[0]),e[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,u.getLowerCase)(e[0]),e[1],e[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([e[0],e[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([e[0],e[1]]);case"eth_getTransactionByHash":let d=e[0];try{d=(await this.sdk.txs.getBySafeTxHash(d)).txHash||d}catch{}return this.submittedTxs.has(d)?this.submittedTxs.get(d):this.sdk.eth.getTransactionByHash([d]).then(t=>(t&&(t.hash=e[0]),t));case"eth_getTransactionReceipt":{let t=e[0];try{t=(await this.sdk.txs.getBySafeTxHash(t)).txHash||t}catch{}return this.sdk.eth.getTransactionReceipt([t]).then(r=>(r&&(r.transactionHash=e[0]),r))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(e[0]);case"eth_call":return this.sdk.eth.call([e[0],e[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([e[0]]);case"eth_gasPrice":return this.sdk.eth.getGasPrice();case"wallet_getPermissions":return this.sdk.wallet.getPermissions();case"wallet_requestPermissions":return this.sdk.wallet.requestPermissions(e[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([e[0]]);default:throw Error(`"${a.method}" not implemented`)}}send(a,i){a||i("Undefined request"),this.request(a).then(e=>i(null,{jsonrpc:"2.0",id:a.id,result:e})).catch(e=>i(e,null))}}g.SafeAppProvider=k;(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.SafeAppProvider=void 0;var a=g;Object.defineProperty(n,"SafeAppProvider",{enumerable:!0,get:function(){return a.SafeAppProvider}})})(l);const y=_({__proto__:null},[l]);exports.index=y;
@@ -1,4 +1,4 @@
1
- import { be as p } from "./W3MFrameProviderSingleton-CTz2n0lO.js";
1
+ import { bf as p } from "./W3MFrameProviderSingleton--HSg3nEz.js";
2
2
  function _(n, r) {
3
3
  for (var i = 0; i < r.length; i++) {
4
4
  const e = r[i];
@@ -1,5 +1,5 @@
1
- import { B as f, s as rn, p as L, q as sn, bc as an } from "./W3MFrameProviderSingleton-CTz2n0lO.js";
2
- import { j as on, r as _t, a as Et, b as cn } from "./hooks.module-DqUWzNtD.js";
1
+ import { B as f, s as rn, p as L, q as sn, bd as an } from "./W3MFrameProviderSingleton--HSg3nEz.js";
2
+ import { j as on, r as _t, a as Et, b as cn } from "./hooks.module-B_N3JvEN.js";
3
3
  var St = {}, ne = {}, be = {};
4
4
  Object.defineProperty(be, "__esModule", { value: !0 });
5
5
  be.walletLogo = void 0;
@@ -1,5 +1,5 @@
1
- import { p as I, bd as Rr, B, s as Ba, be as Bi, bf as Di, bg as Qe, q as Da, bc as Ha } from "./W3MFrameProviderSingleton-CTz2n0lO.js";
2
- import { a as ce, b as Ir, r as Dt, j as Ua } from "./hooks.module-DqUWzNtD.js";
1
+ import { p as I, be as Rr, B, s as Ba, bf as Bi, bg as Di, bh as Qe, q as Da, bd as Ha } from "./W3MFrameProviderSingleton--HSg3nEz.js";
2
+ import { a as ce, b as Ir, r as Dt, j as Ua } from "./hooks.module-B_N3JvEN.js";
3
3
  var Hi = {}, Ft = {}, Ar = {};
4
4
  Object.defineProperty(Ar, "__esModule", { value: !0 });
5
5
  Ar.walletLogo = void 0;
@@ -1,5 +1,5 @@
1
- import { p as m } from "./W3MFrameProviderSingleton-CTz2n0lO.js";
2
- import { e as P, h as We, a as Ve } from "./wagmi-C7gaobmd.js";
1
+ import { p as m } from "./W3MFrameProviderSingleton--HSg3nEz.js";
2
+ import { e as P, h as We, a as Ve } from "./wagmi-IogORaa7.js";
3
3
  const qe = () => "9.1.0", ke = (e) => e.toString(16).padStart(2, "0"), Fe = (e) => {
4
4
  const n = new Uint8Array(e / 2);
5
5
  return window.crypto.getRandomValues(n), Array.from(n, ke).join("");
@@ -1 +1 @@
1
- "use strict";const i=require("./W3MFrameProviderSingleton-DQTwz0Iu.cjs"),n=i.proxy({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),U={state:n,subscribe(e){return i.subscribe(n,()=>e(n))},push(e,t){e!==n.view&&(n.view=e,t&&(n.data=t),n.history.push(e))},reset(e){n.view=e,n.history=[e]},replace(e){n.history.length>1&&(n.history[n.history.length-1]=e,n.view=e)},goBack(){if(n.history.length>1){n.history.pop();const[e]=n.history.slice(-1);n.view=e}},setData(e){n.data=e}},r={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return r.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return r.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(r.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let o=e;o.includes("://")||(o=e.replaceAll("/","").replaceAll(":",""),o=`${o}://`),o.endsWith("/")||(o=`${o}/`),this.setWalletConnectDeepLink(o,s);const l=encodeURIComponent(t);return`${o}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!r.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let o=e;o.endsWith("/")||(o=`${o}/`),this.setWalletConnectDeepLink(o,s);const l=encodeURIComponent(t);return`${o}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(r.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(r.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(r.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(r.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=U.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},R=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),a=i.proxy({enabled:R,userSessionId:"",events:[],connectedWalletId:void 0}),_={state:a,subscribe(e){return i.subscribe(a.events,()=>e(i.snapshot(a.events[a.events.length-1])))},initialize(){a.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(a.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){a.connectedWalletId=e},click(e){if(a.enabled){const t={type:"CLICK",name:e.name,userSessionId:a.userSessionId,timestamp:Date.now(),data:e};a.events.push(t)}},track(e){if(a.enabled){const t={type:"TRACK",name:e.name,userSessionId:a.userSessionId,timestamp:Date.now(),data:e};a.events.push(t)}},view(e){if(a.enabled){const t={type:"VIEW",name:e.name,userSessionId:a.userSessionId,timestamp:Date.now(),data:e};a.events.push(t)}}},p=i.proxy({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),c={state:p,subscribe(e){return i.subscribe(p,()=>e(p))},setChains(e){p.chains=e},setWalletConnectUri(e){p.walletConnectUri=e},setIsCustomDesktop(e){p.isCustomDesktop=e},setIsCustomMobile(e){p.isCustomMobile=e},setIsDataLoaded(e){p.isDataLoaded=e},setIsUiLoaded(e){p.isUiLoaded=e},setIsAuth(e){p.isAuth=e}},C=i.proxy({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),b={state:C,subscribe(e){return i.subscribe(C,()=>e(C))},setConfig(e){var t,s;_.initialize(),c.setChains(e.chains),c.setIsAuth(!!e.enableAuthMode),c.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),c.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),r.setModalVersionInStorage(),Object.assign(C,e)}};var V=Object.defineProperty,D=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,k=(e,t,s)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,K=(e,t)=>{for(var s in t||(t={}))H.call(t,s)&&k(e,s,t[s]);if(D)for(var s of D(t))B.call(t,s)&&k(e,s,t[s]);return e};const L="https://explorer-api.walletconnect.com",O="wcm",E="js-2.6.2";async function w(e,t){const s=K({sdkType:O,sdkVersion:E},t),o=new URL(e,L);return o.searchParams.append("projectId",b.state.projectId),Object.entries(s).forEach(([l,d])=>{d&&o.searchParams.append(l,String(d))}),(await fetch(o)).json()}const m={async getDesktopListings(e){return w("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return w("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return w("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return w("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${L}/w3m/v1/getWalletImage/${e}?projectId=${b.state.projectId}&sdkType=${O}&sdkVersion=${E}`},getAssetImageUrl(e){return`${L}/w3m/v1/getAssetImage/${e}?projectId=${b.state.projectId}&sdkType=${O}&sdkVersion=${E}`}};var z=Object.defineProperty,S=Object.getOwnPropertySymbols,q=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,N=(e,t,s)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,F=(e,t)=>{for(var s in t||(t={}))q.call(t,s)&&N(e,s,t[s]);if(S)for(var s of S(t))J.call(t,s)&&N(e,s,t[s]);return e};const x=r.isMobile(),u=i.proxy({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),G={state:u,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=b.state;if(e==="NONE"||t==="ALL"&&!e)return u.recomendedWallets;if(r.isArray(e)){const s={recommendedIds:e.join(",")},{listings:o}=await m.getAllListings(s),l=Object.values(o);l.sort((d,h)=>{const v=e.indexOf(d.id),f=e.indexOf(h.id);return v-f}),u.recomendedWallets=l}else{const{chains:s,isAuth:o}=c.state,l=s==null?void 0:s.join(","),d=r.isArray(t),h={page:1,sdks:o?"auth_v1":void 0,entries:r.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:d?t.join(","):void 0},{listings:v}=x?await m.getMobileListings(h):await m.getDesktopListings(h);u.recomendedWallets=Object.values(v)}return u.recomendedWallets},async getWallets(e){const t=F({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:o}=b.state,{recomendedWallets:l}=u;if(o==="ALL")return u.wallets;l.length?t.excludedIds=l.map($=>$.id).join(","):r.isArray(s)&&(t.excludedIds=s.join(",")),r.isArray(o)&&(t.excludedIds=[t.excludedIds,o].filter(Boolean).join(",")),c.state.isAuth&&(t.sdks="auth_v1");const{page:d,search:h}=e,{listings:v,total:f}=x?await m.getMobileListings(t):await m.getDesktopListings(t),M=Object.values(v),j=h?"search":"wallets";return u[j]={listings:[...u[j].listings,...M],total:f,page:d??1},{listings:M,total:f}},getWalletImageUrl(e){return m.getWalletImageUrl(e)},getAssetImageUrl(e){return m.getAssetImageUrl(e)},resetSearch(){u.search={listings:[],total:0,page:1}}},y=i.proxy({open:!1}),W={state:y,subscribe(e){return i.subscribe(y,()=>e(y))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:o}=c.state;if(r.removeWalletConnectDeepLink(),c.setWalletConnectUri(e==null?void 0:e.uri),c.setChains(e==null?void 0:e.chains),U.reset("ConnectWallet"),s&&o)y.open=!0,t();else{const l=setInterval(()=>{const d=c.state;d.isUiLoaded&&d.isDataLoaded&&(clearInterval(l),y.open=!0,t())},200)}})},close(){y.open=!1}};var Q=Object.defineProperty,T=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,P=(e,t,s)=>t in e?Q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Z=(e,t)=>{for(var s in t||(t={}))X.call(t,s)&&P(e,s,t[s]);if(T)for(var s of T(t))Y.call(t,s)&&P(e,s,t[s]);return e};function ee(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const I=i.proxy({themeMode:ee()?"dark":"light"}),A={state:I,subscribe(e){return i.subscribe(I,()=>e(I))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(I.themeMode=t),s&&(I.themeVariables=Z({},s))}},g=i.proxy({open:!1,message:"",variant:"success"}),te={state:g,subscribe(e){return i.subscribe(g,()=>e(g))},openToast(e,t){g.open=!0,g.message=e,g.variant=t},closeToast(){g.open=!1}};class se{constructor(t){this.openModal=W.open,this.closeModal=W.close,this.subscribeModal=W.subscribe,this.setTheme=A.setThemeConfig,A.setThemeConfig(t),b.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(()=>require("./index-DFW14Awr.cjs"));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),c.setIsUiLoaded(!0)}}}const oe=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:se},Symbol.toStringTag,{value:"Module"}));exports.R=_;exports.T=U;exports.a=r;exports.index=oe;exports.ne=A;exports.oe=te;exports.p=c;exports.se=W;exports.te=G;exports.y=b;
1
+ "use strict";const i=require("./W3MFrameProviderSingleton-SRLqDWgO.cjs"),n=i.proxy({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),U={state:n,subscribe(e){return i.subscribe(n,()=>e(n))},push(e,t){e!==n.view&&(n.view=e,t&&(n.data=t),n.history.push(e))},reset(e){n.view=e,n.history=[e]},replace(e){n.history.length>1&&(n.history[n.history.length-1]=e,n.view=e)},goBack(){if(n.history.length>1){n.history.pop();const[e]=n.history.slice(-1);n.view=e}},setData(e){n.data=e}},r={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return r.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return r.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(r.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let o=e;o.includes("://")||(o=e.replaceAll("/","").replaceAll(":",""),o=`${o}://`),o.endsWith("/")||(o=`${o}/`),this.setWalletConnectDeepLink(o,s);const l=encodeURIComponent(t);return`${o}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!r.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let o=e;o.endsWith("/")||(o=`${o}/`),this.setWalletConnectDeepLink(o,s);const l=encodeURIComponent(t);return`${o}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(r.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(r.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(r.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(r.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=U.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},R=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),a=i.proxy({enabled:R,userSessionId:"",events:[],connectedWalletId:void 0}),_={state:a,subscribe(e){return i.subscribe(a.events,()=>e(i.snapshot(a.events[a.events.length-1])))},initialize(){a.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(a.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){a.connectedWalletId=e},click(e){if(a.enabled){const t={type:"CLICK",name:e.name,userSessionId:a.userSessionId,timestamp:Date.now(),data:e};a.events.push(t)}},track(e){if(a.enabled){const t={type:"TRACK",name:e.name,userSessionId:a.userSessionId,timestamp:Date.now(),data:e};a.events.push(t)}},view(e){if(a.enabled){const t={type:"VIEW",name:e.name,userSessionId:a.userSessionId,timestamp:Date.now(),data:e};a.events.push(t)}}},p=i.proxy({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),c={state:p,subscribe(e){return i.subscribe(p,()=>e(p))},setChains(e){p.chains=e},setWalletConnectUri(e){p.walletConnectUri=e},setIsCustomDesktop(e){p.isCustomDesktop=e},setIsCustomMobile(e){p.isCustomMobile=e},setIsDataLoaded(e){p.isDataLoaded=e},setIsUiLoaded(e){p.isUiLoaded=e},setIsAuth(e){p.isAuth=e}},C=i.proxy({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),b={state:C,subscribe(e){return i.subscribe(C,()=>e(C))},setConfig(e){var t,s;_.initialize(),c.setChains(e.chains),c.setIsAuth(!!e.enableAuthMode),c.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),c.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),r.setModalVersionInStorage(),Object.assign(C,e)}};var V=Object.defineProperty,D=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,k=(e,t,s)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,K=(e,t)=>{for(var s in t||(t={}))H.call(t,s)&&k(e,s,t[s]);if(D)for(var s of D(t))B.call(t,s)&&k(e,s,t[s]);return e};const L="https://explorer-api.walletconnect.com",O="wcm",E="js-2.6.2";async function w(e,t){const s=K({sdkType:O,sdkVersion:E},t),o=new URL(e,L);return o.searchParams.append("projectId",b.state.projectId),Object.entries(s).forEach(([l,d])=>{d&&o.searchParams.append(l,String(d))}),(await fetch(o)).json()}const m={async getDesktopListings(e){return w("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return w("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return w("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return w("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${L}/w3m/v1/getWalletImage/${e}?projectId=${b.state.projectId}&sdkType=${O}&sdkVersion=${E}`},getAssetImageUrl(e){return`${L}/w3m/v1/getAssetImage/${e}?projectId=${b.state.projectId}&sdkType=${O}&sdkVersion=${E}`}};var z=Object.defineProperty,S=Object.getOwnPropertySymbols,q=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,N=(e,t,s)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,F=(e,t)=>{for(var s in t||(t={}))q.call(t,s)&&N(e,s,t[s]);if(S)for(var s of S(t))J.call(t,s)&&N(e,s,t[s]);return e};const x=r.isMobile(),u=i.proxy({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),G={state:u,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=b.state;if(e==="NONE"||t==="ALL"&&!e)return u.recomendedWallets;if(r.isArray(e)){const s={recommendedIds:e.join(",")},{listings:o}=await m.getAllListings(s),l=Object.values(o);l.sort((d,h)=>{const v=e.indexOf(d.id),f=e.indexOf(h.id);return v-f}),u.recomendedWallets=l}else{const{chains:s,isAuth:o}=c.state,l=s==null?void 0:s.join(","),d=r.isArray(t),h={page:1,sdks:o?"auth_v1":void 0,entries:r.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:d?t.join(","):void 0},{listings:v}=x?await m.getMobileListings(h):await m.getDesktopListings(h);u.recomendedWallets=Object.values(v)}return u.recomendedWallets},async getWallets(e){const t=F({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:o}=b.state,{recomendedWallets:l}=u;if(o==="ALL")return u.wallets;l.length?t.excludedIds=l.map($=>$.id).join(","):r.isArray(s)&&(t.excludedIds=s.join(",")),r.isArray(o)&&(t.excludedIds=[t.excludedIds,o].filter(Boolean).join(",")),c.state.isAuth&&(t.sdks="auth_v1");const{page:d,search:h}=e,{listings:v,total:f}=x?await m.getMobileListings(t):await m.getDesktopListings(t),M=Object.values(v),j=h?"search":"wallets";return u[j]={listings:[...u[j].listings,...M],total:f,page:d??1},{listings:M,total:f}},getWalletImageUrl(e){return m.getWalletImageUrl(e)},getAssetImageUrl(e){return m.getAssetImageUrl(e)},resetSearch(){u.search={listings:[],total:0,page:1}}},y=i.proxy({open:!1}),W={state:y,subscribe(e){return i.subscribe(y,()=>e(y))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:o}=c.state;if(r.removeWalletConnectDeepLink(),c.setWalletConnectUri(e==null?void 0:e.uri),c.setChains(e==null?void 0:e.chains),U.reset("ConnectWallet"),s&&o)y.open=!0,t();else{const l=setInterval(()=>{const d=c.state;d.isUiLoaded&&d.isDataLoaded&&(clearInterval(l),y.open=!0,t())},200)}})},close(){y.open=!1}};var Q=Object.defineProperty,T=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,P=(e,t,s)=>t in e?Q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Z=(e,t)=>{for(var s in t||(t={}))X.call(t,s)&&P(e,s,t[s]);if(T)for(var s of T(t))Y.call(t,s)&&P(e,s,t[s]);return e};function ee(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const I=i.proxy({themeMode:ee()?"dark":"light"}),A={state:I,subscribe(e){return i.subscribe(I,()=>e(I))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(I.themeMode=t),s&&(I.themeVariables=Z({},s))}},g=i.proxy({open:!1,message:"",variant:"success"}),te={state:g,subscribe(e){return i.subscribe(g,()=>e(g))},openToast(e,t){g.open=!0,g.message=e,g.variant=t},closeToast(){g.open=!1}};class se{constructor(t){this.openModal=W.open,this.closeModal=W.close,this.subscribeModal=W.subscribe,this.setTheme=A.setThemeConfig,A.setThemeConfig(t),b.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(()=>require("./index-CDAn9JfZ.cjs"));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),c.setIsUiLoaded(!0)}}}const oe=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:se},Symbol.toStringTag,{value:"Module"}));exports.R=_;exports.T=U;exports.a=r;exports.index=oe;exports.ne=A;exports.oe=te;exports.p=c;exports.se=W;exports.te=G;exports.y=b;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./W3MFrameProviderSingleton-DQTwz0Iu.cjs"),t=e.Oe`<svg class="input_mask" width="328" height="100" viewBox="0 0 328 100" fill="none">
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./W3MFrameProviderSingleton-SRLqDWgO.cjs"),t=e.Oe`<svg class="input_mask" width="328" height="100" viewBox="0 0 328 100" fill="none">
2
2
  <mask id="path-1-inside-1_18299_4189">
3
3
  <path
4
4
  class="input_mask__border"