@dcl/shop 0.1.0-29233106796.commit-1837efd → 0.1.0-29233112588.commit-3471a57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{AnimatedBackground-C0rqDJfb.js → AnimatedBackground-CHkBmxUh.js} +1 -1
- package/assets/{Assets-DFF19cjO.js → Assets-4BU9Crmz.js} +1 -1
- package/assets/{Button-uGoMyMeg.js → Button-BX2vF44i.js} +1 -1
- package/assets/{Cart-bVoFfuT2.js → Cart-Dt1wJOE3.js} +1 -1
- package/assets/{CircularProgress-Ca679YX-.js → CircularProgress-CDHgSKkY.js} +1 -1
- package/assets/Collection-DIn7EG6I.js +1 -0
- package/assets/{Creator-CEshnkfr.js → Creator-St94H6BT.js} +1 -1
- package/assets/{ExchangeController-CFvT4C3L.js → ExchangeController-CFIPrnwO.js} +1 -1
- package/assets/{GetCredits-D48kUeN-.js → GetCredits-DdaqNRBc.js} +2 -2
- package/assets/{HelpersUtil-DSOtZH4j.js → HelpersUtil-B5jzyW6x.js} +1 -1
- package/assets/{ImportListings-DN6Tu-bh.js → ImportListings-uI1Q9Cni.js} +1 -1
- package/assets/{ItemDetail-B1lNS7Di.js → ItemDetail-Q5BXaKCZ.js} +2 -2
- package/assets/{Market-KfYPcfQF.js → Market-DQAo1ZUc.js} +1 -1
- package/assets/{MenuItem-6nwFKjkW.js → MenuItem-BadlrOSJ.js} +1 -1
- package/assets/{MyAssets-BXYso89u.js → MyAssets-D-1zLGLa.js} +1 -1
- package/assets/{MyFavorites-6TD3GhQr.js → MyFavorites-DOkuuWff.js} +1 -1
- package/assets/{MyPurchases-DPAy76Q8.js → MyPurchases-CmUWGyAk.js} +1 -1
- package/assets/{NotFound-CXoM3h2z.js → NotFound-DtdtCA8G.js} +1 -1
- package/assets/{RealCheckout-75GM0cgX.js → RealCheckout-Ct5C78JH.js} +1 -1
- package/assets/{ShopFooterInner-C274TFSL.js → ShopFooterInner-qgccN1H6.js} +2 -2
- package/assets/{Success-FCI3WLUn.js → Success-ClzM1ItH.js} +1 -1
- package/assets/{SvgIcon-DuD4CLX1.js → SvgIcon-ZHB11KC9.js} +1 -1
- package/assets/{SwapController-Bt0cz6Wd.js → SwapController-Clus5sIm.js} +1 -1
- package/assets/{TradeService-DYLc9PvE.js → TradeService-05ryi2Hm.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-BvhNgFgm.js → W3MFrameProviderSingleton-CNJGu1s_.js} +3 -3
- package/assets/{WebCryptoP256-CmPjTQJj.js → WebCryptoP256-Ba2CR4Xp.js} +1 -1
- package/assets/{basic-B0YfIqrx.js → basic-Bv9yTnhd.js} +1 -1
- package/assets/{biconomy-ge27Lvzm.js → biconomy-chS0NxIt.js} +1 -1
- package/assets/{buy-CtGOLfNq.js → buy-DSDTz9Ug.js} +1 -1
- package/assets/{buy-gasless-RvPPxhUM.js → buy-gasless-VKTXyC9T.js} +1 -1
- package/assets/{ccip-Dj85jtj6.js → ccip-9Gv2Pf4C.js} +1 -1
- package/assets/{ccip-I5jvI7YU.js → ccip-Bbl_0s1O.js} +1 -1
- package/assets/{collection-DttFUtCF.js → collection-CJBo0QKZ.js} +1 -1
- package/assets/{controller-KIszeBL2.js → controller-CmXQtg8P.js} +2 -2
- package/assets/{core-ov94tG9b.js → core-nWNc93zq.js} +4 -4
- package/assets/{custom-5PrshmtG.js → custom-BPvT6WKj.js} +1 -1
- package/assets/{data-capture-lUD162xM.js → data-capture-OsDnZUv7.js} +1 -1
- package/assets/decimals-CY4MKUZO.js +1 -0
- package/assets/{decimals-DpraMyBi.js → decimals-DrVIWQab.js} +1 -1
- package/assets/{detectExtension-aE5lnWvs.js → detectExtension-CiOOHgJ5.js} +1 -1
- package/assets/{email-CthjyMNP.js → email-BL_6Rwog.js} +1 -1
- package/assets/{embedded-wallet-BJY3GXC2.js → embedded-wallet-BEqYuuLS.js} +1 -1
- package/assets/{engine-j-oLBjOz.js → engine-BSw4yNxP.js} +1 -1
- package/assets/{estimate-l1-fee-DjWZekSm.js → estimate-l1-fee-CRG_ZYOH.js} +1 -1
- package/assets/{eth_estimateGas-DN3qr8TB.js → eth_estimateGas-BFj64_s-.js} +1 -1
- package/assets/{eth_getStorageAt-DQzkgcMe.js → eth_getStorageAt-CrCM1uRk.js} +1 -1
- package/assets/{eth_getTransactionCount-DM4ijSWf.js → eth_getTransactionCount-BukD81TA.js} +1 -1
- package/assets/{extractIPFS-iOFrfwzj.js → extractIPFS-Dm1i6XJu.js} +1 -1
- package/assets/{features-B2Sp0NPq.js → features-I4--UPMy.js} +1 -1
- package/assets/{fetchTokenMetadata-BuZDzhII.js → fetchTokenMetadata-DOoK744L.js} +2 -2
- package/assets/{generateUtilityClasses-EHQxwZec.js → generateUtilityClasses-CVd9wG9P.js} +1 -1
- package/assets/{get-ecosystem-wallet-info-f_luxiNk.js → get-ecosystem-wallet-info-DTNpaty2.js} +1 -1
- package/assets/{getBalance-DR8safQ4.js → getBalance-BHZ3IFEu.js} +1 -1
- package/assets/{getInstalledModules-DYdUHIJC.js → getInstalledModules-De7CDRYo.js} +1 -1
- package/assets/{getNFT-DRWdoeee.js → getNFT-CHg09T74.js} +1 -1
- package/assets/{getNFT-BRjpGSIo.js → getNFT-DoL2HIvx.js} +2 -2
- package/assets/{hashTypedData-DLv4vmSt.js → hashTypedData-CL274mk_.js} +1 -1
- package/assets/{hashTypedData-CfSRA3ti.js → hashTypedData-DTKiEvBJ.js} +1 -1
- package/assets/{import-B7IrqJHM.js → import-B6HLomRq.js} +1 -1
- package/assets/{in-app-wallet-calls-DArzhQxl.js → in-app-wallet-calls-qDphU_6F.js} +1 -1
- package/assets/{index-DjLIZOTh.js → index--LoqTj-4.js} +1 -1
- package/assets/{index-Dl-2j4dO.js → index-7QxFZeGQ.js} +1 -1
- package/assets/{index-DrNzHQM5.js → index-B2hwSpcv.js} +1 -1
- package/assets/{index-D9E3HDnS.js → index-BBXAY787.js} +1 -1
- package/assets/{index-7RiTEasz.js → index-BFflN0t4.js} +1 -1
- package/assets/{index-BILR6PXd.js → index-BLqeW9QA.js} +1 -1
- package/assets/{index-D8yull60.js → index-BQTrO182.js} +5 -5
- package/assets/{index-mQkXd2DT.js → index-BWC26FPE.js} +1 -1
- package/assets/{index-Catw56Zo.js → index-Bchsu7Gy.js} +1 -1
- package/assets/{index-FgCfQjOt.js → index-Bf90wxgH.js} +1 -1
- package/assets/{index-DlKR3Fym.js → index-Bg45xunH.js} +1 -1
- package/assets/{index-Bn5lQZ1w.js → index-Bij4-TSD.js} +1 -1
- package/assets/{index-CRCB75oU.js → index-BjWZj4AD.js} +1 -1
- package/assets/{index-CXqoUgKu.js → index-BjxI-vsX.js} +1 -1
- package/assets/{index-Dr-5ALhc.js → index-C---HSEJ.js} +1 -1
- package/assets/{index-hm6YyqJl.js → index-C0NXl_ZK.js} +2 -2
- package/assets/{index-Br04ERn8.js → index-C5PABxhi.js} +1 -1
- package/assets/{index-BsihGVe1.js → index-CGW_QnLp.js} +1 -1
- package/assets/{index-COxGjPhG.js → index-CH8sNaIF.js} +1 -1
- package/assets/{index-CEMLnpSr.js → index-CHKlpOE4.js} +1 -1
- package/assets/{index-BVKDtuC0.js → index-CPOS-ZX8.js} +1 -1
- package/assets/{index-CrfX_nUp.js → index-CSWQsOGj.js} +1 -1
- package/assets/{index-DbCLSKdx.js → index-CTAdPvyN.js} +1 -1
- package/assets/{index-CD_ojwcp.js → index-CW-8lHlO.js} +1 -1
- package/assets/{index-C6V3kfM1.js → index-C_ObzGNF.js} +1 -1
- package/assets/{index-D9dKa_F_.js → index-CfVmURma.js} +1 -1
- package/assets/{index-DtCgIhCZ.js → index-ChIJGn_8.js} +1 -1
- package/assets/{index-BJpc1lfK.js → index-Cj7Pp_YX.js} +1 -1
- package/assets/{index-Bq01IzMZ.js → index-Cn7q_Auu.js} +1 -1
- package/assets/{index-D-dOTleV.js → index-CrD2cxhw.js} +1 -1
- package/assets/{index-CN5d5qP-.js → index-Cu7Lu9bv.js} +3 -3
- package/assets/{index-Co5EcXpK.js → index-D4o1kYfZ.js} +1 -1
- package/assets/{index-QP8xnR1y.js → index-DB4TJQHV.js} +1 -1
- package/assets/{index-B-B0JHcE.js → index-DD484ptW.js} +1 -1
- package/assets/{index-B3X7tTfx.js → index-DKCzuFlD.js} +1 -1
- package/assets/{index-bhBCwNAI.js → index-DM517EYv.js} +1 -1
- package/assets/{index-BJWi_Mde.js → index-DPo1Jc-3.js} +1 -1
- package/assets/{index-Cg6lHlPj.js → index-DVG2tLnZ.js} +1 -1
- package/assets/{index-D2X-VE01.js → index-DXBQ7p7A.js} +1 -1
- package/assets/{index-BrTElmXN.js → index-DZ7OqNDh.js} +1 -1
- package/assets/{index-D5dW41Yp.js → index-DeK2gk15.js} +2 -2
- package/assets/{index-DxiDSDBc.js → index-DkS85S-U.js} +1 -1
- package/assets/{index-Cb2_Tzeq.js → index-DqP4ubUd.js} +1 -1
- package/assets/{index-C3Is1Apr.js → index-DslCyXew.js} +1 -1
- package/assets/{index-DRIZge00.js → index-EEHmZhmi.js} +1 -1
- package/assets/{index-KO5jocfW.js → index-LkTNNJf8.js} +1 -1
- package/assets/{index-BuTY5O7i.js → index-WG-2bU2R.js} +1 -1
- package/assets/{index-C0naoCgt.js → index-X8WyejKw.js} +1 -1
- package/assets/{index-D4hUhx_k.js → index-ZXE3Jzhw.js} +2 -2
- package/assets/{index-CyLTth0X.js → index-kdRTF64R.js} +3 -3
- package/assets/{index-DMKKgcdZ.js → index-nNjDHMMe.js} +1 -1
- package/assets/{index-BP-fVzDu.js → index-or9-gmVP.js} +1 -1
- package/assets/{index-BN--SoPG.js → index-ttsk6pAT.js} +1 -1
- package/assets/{index.es-BiEhEc8p.js → index.es-Dwau1Unb.js} +1 -1
- package/assets/{index.es-DyfpWv1f.js → index.es-LD6l3yAP.js} +1 -1
- package/assets/{index.es-CQ6rFGBE.js → index.es-i4tm8RED.js} +4 -4
- package/assets/{localBatchGatewayRequest-BDrEFVai.js → localBatchGatewayRequest-CO3ZuHSj.js} +1 -1
- package/assets/{mana-rate-DrmNLaz-.js → mana-rate-C-rCn1C4.js} +1 -1
- package/assets/network-CSs93eko.js +1 -0
- package/assets/{networks-bRyDO1Qp.js → networks-BFEXyN7L.js} +1 -1
- package/assets/{onramp-BEQTNzss.js → onramp-CzcBij_c.js} +1 -1
- package/assets/{openzeppelin-D_XQzmtX.js → openzeppelin-CGHqJu29.js} +1 -1
- package/assets/{ownerOf-OA2RTQQO.js → ownerOf-qN-FBNCP.js} +1 -1
- package/assets/{parseNft-CXoj0hvM.js → parseNft-h7dpSl-B.js} +2 -2
- package/assets/{parseSignature-BxaAhKeg.js → parseSignature-ClgBcz_E.js} +1 -1
- package/assets/{parseSignature-CKZOR4TK.js → parseSignature-gJmLCKAP.js} +3 -3
- package/assets/{pay-with-exchange-aKfCF8UA.js → pay-with-exchange-DCBEgJ2h.js} +1 -1
- package/assets/{qr-overlay-D2uIJnFP.js → qr-overlay-DbAEP7oV.js} +1 -1
- package/assets/{receive-DA3o78qy.js → receive-CTwQVNv_.js} +1 -1
- package/assets/{resolveImplementation-fVGP_Xas.js → resolveImplementation-CGH4osIy.js} +1 -1
- package/assets/{rpc-DBEEzhj8.js → rpc-BngWyGfZ.js} +1 -1
- package/assets/{secp256k1-hn5_kA6G.js → secp256k1-9xB5BW84.js} +1 -1
- package/assets/{secp256k1-B8n8HBER.js → secp256k1-DOofANAG.js} +1 -1
- package/assets/{secp256k1-BbaO7vsd.js → secp256k1-DgN2B_kR.js} +1 -1
- package/assets/{send-DU8MQ1y8.js → send-BDlN2sgB.js} +1 -1
- package/assets/{send-batch-transaction-DY_pgHDI.js → send-batch-transaction-wZHP58R7.js} +1 -1
- package/assets/{send-eip712-transaction-BkgoythS.js → send-eip712-transaction-Bi1a8eyR.js} +2 -2
- package/assets/{send-gasless-transaction-BVYH1gYX.js → send-gasless-transaction-Bw_gGkTl.js} +2 -2
- package/assets/{sendRawTransaction-DbhgEUz6.js → sendRawTransaction-5EC8yzHr.js} +3 -3
- package/assets/{serializeTransaction-DZrTl33k.js → serializeTransaction-BlqVFvkg.js} +1 -1
- package/assets/{session-proposal-Cl2sjjeM.js → session-proposal-ctnDmZur.js} +1 -1
- package/assets/{session-request-dut4_Z-r.js → session-request-CUsXTmQ3.js} +2 -2
- package/assets/{sha256-BCXR6ojR.js → sha256-RE6wmqKj.js} +1 -1
- package/assets/{signing-DstZY6Ke.js → signing-D7DnlITB.js} +4 -4
- package/assets/{socials-DFT4pr6K.js → socials-C4i949oG.js} +1 -1
- package/assets/{swaps-B6e9-nOS.js → swaps-qHGa0ddB.js} +1 -1
- package/assets/{thirdweb-13r7kkOp.js → thirdweb-CR0hbJDH.js} +3 -3
- package/assets/{totalSupply-CEHgHE1R.js → totalSupply-C-TxVq4_.js} +1 -1
- package/assets/{transactionReceipt-CJqXaM7n.js → transactionReceipt-BaHYZskc.js} +1 -1
- package/assets/{transactions-Dg8-HdPI.js → transactions-CZHtKEkE.js} +1 -1
- package/assets/{useInfiniteGrid-_j3sTNFy.js → useInfiniteGrid-BddL8SSO.js} +1 -1
- package/assets/{verifyHash-DDifZCfe.js → verifyHash-Bi4U7qrf.js} +1 -1
- package/assets/{w3m-modal-Bz6lLxMo.js → w3m-modal-BNkfhTR4.js} +1 -1
- package/assets/{w3m-modal-wr6gqHHl.js → w3m-modal-D7g91RDF.js} +1 -1
- package/assets/{wait-for-tx-receipt-TO5nTGOg.js → wait-for-tx-receipt-MuErdbkx.js} +1 -1
- package/assets/{wallet-kind-BSzJpUob.js → wallet-kind-CIBO15i5.js} +1 -1
- package/assets/{wallets-CrZ_KakB.js → wallets-CsMQQSxs.js} +6 -6
- package/assets/{web-connector-C-PKMENi.js → web-connector-Cil3jKzV.js} +3 -3
- package/assets/{writeContract-dUugnk5I.js → writeContract-BXtYV0Oi.js} +1 -1
- package/assets/{zoraTestnet-z7D1VXMG.js → zoraTestnet-UyN43x8_.js} +1 -1
- package/index.html +8 -8
- package/package.json +2 -2
- package/assets/Collection-Cbyv2bH1.js +0 -1
- package/assets/decimals-CF3AbQzO.js +0 -1
- package/assets/network-CpS8nVMF.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as k}from"./index-BV8s6ez1.js";import{az as w}from"./sendRawTransaction-
|
|
1
|
+
import{r as k}from"./index-BV8s6ez1.js";import{az as w}from"./sendRawTransaction-5EC8yzHr.js";import{c as I,e as q}from"./hashTypedData-CL274mk_.js";import"./NetworkUtil-DDES604E.js";import"./ethers-JeCAM1sd.js";import"./react-Vu6nbGi5.js";import"./index-BQTrO182.js";const v=()=>"9.1.0",C=t=>t.toString(16).padStart(2,"0"),R=t=>{const e=new Uint8Array(t/2);return window.crypto.getRandomValues(e),Array.from(e,C).join("")},E=()=>typeof window<"u"?R(10):new Date().getTime().toString(36);class g{}g.makeRequest=(t,e)=>({id:E(),method:t,params:e,env:{sdkVersion:v()}});g.makeResponse=(t,e,s)=>({id:t,success:!0,version:s,data:e});g.makeErrorResponse=(t,e,s)=>({id:t,success:!1,error:e,version:s});var r;(function(t){t.sendTransactions="sendTransactions",t.rpcCall="rpcCall",t.getChainInfo="getChainInfo",t.getSafeInfo="getSafeInfo",t.getTxBySafeTxHash="getTxBySafeTxHash",t.getSafeBalances="getSafeBalances",t.signMessage="signMessage",t.signTypedMessage="signTypedMessage",t.getEnvironmentInfo="getEnvironmentInfo",t.getOffChainSignature="getOffChainSignature",t.requestAddressBook="requestAddressBook",t.wallet_getPermissions="wallet_getPermissions",t.wallet_requestPermissions="wallet_requestPermissions"})(r||(r={}));var f;(function(t){t.requestAddressBook="requestAddressBook"})(f||(f={}));class H{constructor(e=null,s=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:a,data:n,source:i})=>{const o=!n,l=!this.isServer&&i===window.parent,u=typeof n.version<"u"&&parseInt(n.version.split(".")[0]),B=typeof u=="number"&&u>=1;let y=!0;return Array.isArray(this.allowedOrigins)&&(y=this.allowedOrigins.find(P=>P.test(a))!==void 0),!o&&l&&B&&y},this.logIncomingMessage=a=>{console.info(`Safe Apps SDK v1: A message was received from origin ${a.origin}. `,a.data)},this.onParentMessage=a=>{this.isValidMessage(a)&&(this.debugMode&&this.logIncomingMessage(a),this.handleIncomingMessage(a.data))},this.handleIncomingMessage=a=>{const{id:n}=a,i=this.callbacks.get(n);i&&(i(a),this.callbacks.delete(n))},this.send=(a,n)=>{const i=g.makeRequest(a,n);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(i,"*"),new Promise((o,l)=>{this.callbacks.set(i.id,u=>{if(!u.success){l(new Error(u.error));return}o(u)})})},this.allowedOrigins=e,this.debugMode=s,this.isServer||window.addEventListener("message",this.onParentMessage)}}const S=t=>typeof t=="object"&&t!=null&&"domain"in t&&"types"in t&&"message"in t;var m=k();class A{constructor(e){this.communicator=e}async getBySafeTxHash(e){if(!e)throw new Error("Invalid safeTxHash");return(await this.communicator.send(r.getTxBySafeTxHash,{safeTxHash:e})).data}async signMessage(e){const s={message:e};return(await this.communicator.send(r.signMessage,s)).data}async signTypedMessage(e){if(!S(e))throw new Error("Invalid typed data");return(await this.communicator.send(r.signTypedMessage,{typedData:e})).data}async send({txs:e,params:s}){if(!e||!e.length)throw new Error("No transactions were passed");const a={txs:e,params:s};return(await this.communicator.send(r.sendTransactions,a)).data}}const c={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"},h={defaultBlockParam:(t="latest")=>t,returnFullTxObjectParam:(t=!1)=>t,blockNumberToHex:t=>Number.isInteger(t)?`0x${t.toString(16)}`:t};class O{constructor(e){this.communicator=e,this.call=this.buildRequest({call:c.eth_call,formatters:[null,h.defaultBlockParam]}),this.getBalance=this.buildRequest({call:c.eth_getBalance,formatters:[null,h.defaultBlockParam]}),this.getCode=this.buildRequest({call:c.eth_getCode,formatters:[null,h.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:c.eth_getStorageAt,formatters:[null,h.blockNumberToHex,h.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:c.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:c.eth_getBlockByHash,formatters:[null,h.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:c.eth_getBlockByNumber,formatters:[h.blockNumberToHex,h.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:c.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:c.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:c.eth_getTransactionCount,formatters:[null,h.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:c.eth_gasPrice}),this.getEstimateGas=s=>this.buildRequest({call:c.eth_estimateGas})([s]),this.setSafeSettings=this.buildRequest({call:c.safe_setSettings})}buildRequest(e){const{call:s,formatters:a}=e;return async n=>{a&&Array.isArray(n)&&a.forEach((l,u)=>{l&&(n[u]=l(n[u]))});const i={call:s,params:n||[]};return(await this.communicator.send(r.rpcCall,i)).data}}}const x="0x1626ba7e",V="0x20c13b0b",p=4001;class d extends Error{constructor(e,s,a){super(e),this.code=s,this.data=a,Object.setPrototypeOf(this,d.prototype)}}class _{constructor(e){this.communicator=e}async getPermissions(){return(await this.communicator.send(r.wallet_getPermissions,void 0)).data}async requestPermissions(e){if(!this.isPermissionRequestValid(e))throw new d("Permissions request is invalid",p);try{return(await this.communicator.send(r.wallet_requestPermissions,e)).data}catch{throw new d("Permissions rejected",p)}}isPermissionRequestValid(e){return e.every(s=>typeof s=="object"?Object.keys(s).every(a=>!!Object.values(f).includes(a)):!1)}}const b=(t,e)=>e.some(s=>s.parentCapability===t),M=()=>(t,e,s)=>{const a=s.value;return s.value=async function(){const n=new _(this.communicator);let i=await n.getPermissions();if(b(e,i)||(i=await n.requestPermissions([{[e]:{}}])),!b(e,i))throw new d("Permissions rejected",p);return a.apply(this)},s};var j=function(t,e,s,a){var n=arguments.length,i=n<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,s):a,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,s,a);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(i=(n<3?o(i):n>3?o(e,s,i):o(e,s))||i);return n>3&&i&&Object.defineProperty(e,s,i),i};class T{constructor(e){this.communicator=e}async getChainInfo(){return(await this.communicator.send(r.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(r.getSafeInfo,void 0)).data}async experimental_getBalances({currency:e="usd"}={}){return(await this.communicator.send(r.getSafeBalances,{currency:e})).data}async check1271Signature(e,s="0x"){const a=await this.getInfo(),n=w({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:[e,s]}),i={call:c.eth_call,params:[{to:a.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(r.rpcCall,i)).data.slice(0,10).toLowerCase()===x}catch{return!1}}async check1271SignatureBytes(e,s="0x"){const a=await this.getInfo(),n=w({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:[e,s]}),i={call:c.eth_call,params:[{to:a.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(r.rpcCall,i)).data.slice(0,10).toLowerCase()===V}catch{return!1}}calculateMessageHash(e){return I(e)}calculateTypedMessageHash(e){const s=typeof e.domain.chainId=="object"?e.domain.chainId.toNumber():Number(e.domain.chainId);let a=e.primaryType;if(!a){const n=Object.values(e.types),i=Object.keys(e.types).filter(o=>n.every(l=>l.every(({type:u})=>u.replace("[","").replace("]","")!==o)));if(i.length===0||i.length>1)throw new Error("Please specify primaryType");a=i[0]}return q({message:e.message,domain:{...e.domain,chainId:s,verifyingContract:e.domain.verifyingContract,salt:e.domain.salt},types:e.types,primaryType:a})}async getOffChainSignature(e){return(await this.communicator.send(r.getOffChainSignature,e)).data}async isMessageSigned(e,s="0x"){let a;if(typeof e=="string"&&(a=async()=>{const n=this.calculateMessageHash(e);return await this.isMessageHashSigned(n,s)}),S(e)&&(a=async()=>{const n=this.calculateTypedMessageHash(e);return await this.isMessageHashSigned(n,s)}),a)return await a();throw new Error("Invalid message type")}async isMessageHashSigned(e,s="0x"){const a=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const n of a)if(await n(e,s))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(r.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(r.requestAddressBook,void 0)).data}}j([M()],T.prototype,"requestAddressBook",null);class W{constructor(e={}){const{allowedDomains:s=null,debug:a=!1}=e;this.communicator=new H(s,a),this.eth=new O(this.communicator),this.txs=new A(this.communicator),this.safe=new T(this.communicator),this.wallet=new _(this.communicator)}}const $=m.Operation,z=m.TokenType,J=m.TransactionStatus,Q=m.TransferDirection;export{g as MessageFormatter,r as Methods,$ as Operation,c as RPC_CALLS,f as RestrictedMethods,z as TokenType,J as TransactionStatus,Q as TransferDirection,W as default,v as getSDKVersion,S as isObjectEIP712TypedData};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as c,b as a}from"./lit-element-B3y9oplH.js";import{n as o,o as h}from"./class-map-CxwNmq0D.js";import{e as m,n as b}from"./ref-BsAZ42-h.js";import{c as x}from"./index-
|
|
1
|
+
import{i as c,b as a}from"./lit-element-B3y9oplH.js";import{n as o,o as h}from"./class-map-CxwNmq0D.js";import{e as m,n as b}from"./ref-BsAZ42-h.js";import{c as x}from"./index-DslCyXew.js";import{d as f,r as $,e as g}from"./index-kdRTF64R.js";const w=f`
|
|
2
2
|
:host {
|
|
3
3
|
position: relative;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as Vv,g as Wv}from"./react-Vu6nbGi5.js";import{r as Kv}from"./index-BV8s6ez1.js";import{n as Zv}from"./native-C_y7cRlS.js";import{r as Yv}from"./index-
|
|
1
|
+
import{e as Vv,g as Wv}from"./react-Vu6nbGi5.js";import{r as Kv}from"./index-BV8s6ez1.js";import{n as Zv}from"./native-C_y7cRlS.js";import{r as Yv}from"./index-DeK2gk15.js";function Jv(e,r){for(var n=0;n<r.length;n++){const t=r[n];if(typeof t!="string"&&!Array.isArray(t)){for(const o in t)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(t,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>t[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Nd={},Wn={},Nt={},sn={},xr={},Kn={},Zn={},Tl;function wg(){if(Tl)return Zn;Tl=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.getSDKVersion=void 0;const e=()=>"9.1.0";return Zn.getSDKVersion=e,Zn}var Yn={},Sl;function Xv(){if(Sl)return Yn;Sl=1,Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.generateRequestId=void 0;const e=t=>t.toString(16).padStart(2,"0"),r=t=>{const o=new Uint8Array(t/2);return window.crypto.getRandomValues(o),Array.from(o,e).join("")},n=()=>typeof window<"u"?r(10):new Date().getTime().toString(36);return Yn.generateRequestId=n,Yn}var Il;function Pg(){if(Il)return Kn;Il=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.MessageFormatter=void 0;const e=wg(),r=Xv();class n{}return Kn.MessageFormatter=n,n.makeRequest=(t,o)=>({id:(0,r.generateRequestId)(),method:t,params:o,env:{sdkVersion:(0,e.getSDKVersion)()}}),n.makeResponse=(t,o,s)=>({id:t,success:!0,version:s,data:o}),n.makeErrorResponse=(t,o,s)=>({id:t,success:!1,error:o,version:s}),Kn}var qr={},Rl;function Kr(){if(Rl)return qr;Rl=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.RestrictedMethods=qr.Methods=void 0;var e;(function(n){n.sendTransactions="sendTransactions",n.rpcCall="rpcCall",n.getChainInfo="getChainInfo",n.getSafeInfo="getSafeInfo",n.getTxBySafeTxHash="getTxBySafeTxHash",n.getSafeBalances="getSafeBalances",n.signMessage="signMessage",n.signTypedMessage="signTypedMessage",n.getEnvironmentInfo="getEnvironmentInfo",n.getOffChainSignature="getOffChainSignature",n.requestAddressBook="requestAddressBook",n.wallet_getPermissions="wallet_getPermissions",n.wallet_requestPermissions="wallet_requestPermissions"})(e||(qr.Methods=e={}));var r;return(function(n){n.requestAddressBook="requestAddressBook"})(r||(qr.RestrictedMethods=r={})),qr}var Bl;function Qv(){return Bl||(Bl=1,(function(e){var r=xr&&xr.__createBinding||(Object.create?(function(s,a,i,c){c===void 0&&(c=i);var d=Object.getOwnPropertyDescriptor(a,i);(!d||("get"in d?!a.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return a[i]}}),Object.defineProperty(s,c,d)}):(function(s,a,i,c){c===void 0&&(c=i),s[c]=a[i]})),n=xr&&xr.__exportStar||function(s,a){for(var i in s)i!=="default"&&!Object.prototype.hasOwnProperty.call(a,i)&&r(a,s,i)};Object.defineProperty(e,"__esModule",{value:!0});const t=Pg();class o{constructor(a=null,i=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:c,data:d,source:f})=>{const l=!d,m=!this.isServer&&f===window.parent,y=typeof d.version<"u"&&parseInt(d.version.split(".")[0]),h=typeof y=="number"&&y>=1;let b=!0;return Array.isArray(this.allowedOrigins)&&(b=this.allowedOrigins.find(E=>E.test(c))!==void 0),!l&&m&&h&&b},this.logIncomingMessage=c=>{console.info(`Safe Apps SDK v1: A message was received from origin ${c.origin}. `,c.data)},this.onParentMessage=c=>{this.isValidMessage(c)&&(this.debugMode&&this.logIncomingMessage(c),this.handleIncomingMessage(c.data))},this.handleIncomingMessage=c=>{const{id:d}=c,f=this.callbacks.get(d);f&&(f(c),this.callbacks.delete(d))},this.send=(c,d)=>{const f=t.MessageFormatter.makeRequest(c,d);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(f,"*"),new Promise((l,m)=>{this.callbacks.set(f.id,y=>{if(!y.success){m(new Error(y.error));return}l(y)})})},this.allowedOrigins=a,this.debugMode=i,this.isServer||window.addEventListener("message",this.onParentMessage)}}e.default=o,n(Kr(),e)})(xr)),xr}var Jn={},Mr={},Xn={},Ol;function e6(){if(Ol)return Xn;Ol=1,Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.isObjectEIP712TypedData=void 0;const e=r=>typeof r=="object"&&r!=null&&"domain"in r&&"types"in r&&"message"in r;return Xn.isObjectEIP712TypedData=e,Xn}var $d={},Cl;function t6(){return Cl||(Cl=1,Object.defineProperty($d,"__esModule",{value:!0})),$d}var zd={},xl;function r6(){return xl||(xl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TransferDirection=e.TransactionStatus=e.TokenType=e.Operation=void 0;var r=Kv();Object.defineProperty(e,"Operation",{enumerable:!0,get:function(){return r.Operation}}),Object.defineProperty(e,"TokenType",{enumerable:!0,get:function(){return r.TokenType}}),Object.defineProperty(e,"TransactionStatus",{enumerable:!0,get:function(){return r.TransactionStatus}}),Object.defineProperty(e,"TransferDirection",{enumerable:!0,get:function(){return r.TransferDirection}})})(zd)),zd}var Ld={},ql;function n6(){return ql||(ql=1,Object.defineProperty(Ld,"__esModule",{value:!0}),Kr()),Ld}var Ml;function gf(){return Ml||(Ml=1,(function(e){var r=Mr&&Mr.__createBinding||(Object.create?(function(t,o,s,a){a===void 0&&(a=s);var i=Object.getOwnPropertyDescriptor(o,s);(!i||("get"in i?!o.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(t,a,i)}):(function(t,o,s,a){a===void 0&&(a=s),t[a]=o[s]})),n=Mr&&Mr.__exportStar||function(t,o){for(var s in t)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&r(o,t,s)};Object.defineProperty(e,"__esModule",{value:!0}),n(e6(),e),n(t6(),e),n(r6(),e),n(n6(),e)})(Mr)),Mr}var kl;function o6(){if(kl)return Jn;kl=1,Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.TXs=void 0;const e=Kr(),r=gf();class n{constructor(o){this.communicator=o}async getBySafeTxHash(o){if(!o)throw new Error("Invalid safeTxHash");return(await this.communicator.send(e.Methods.getTxBySafeTxHash,{safeTxHash:o})).data}async signMessage(o){const s={message:o};return(await this.communicator.send(e.Methods.signMessage,s)).data}async signTypedMessage(o){if(!(0,r.isObjectEIP712TypedData)(o))throw new Error("Invalid typed data");return(await this.communicator.send(e.Methods.signTypedMessage,{typedData:o})).data}async send({txs:o,params:s}){if(!o||!o.length)throw new Error("No transactions were passed");const a={txs:o,params:s};return(await this.communicator.send(e.Methods.sendTransactions,a)).data}}return Jn.TXs=n,Jn}var Qn={},eo={},Hl;function _f(){return Hl||(Hl=1,Object.defineProperty(eo,"__esModule",{value:!0}),eo.RPC_CALLS=void 0,eo.RPC_CALLS={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"}),eo}var Fl;function a6(){if(Fl)return Qn;Fl=1,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.Eth=void 0;const e=_f(),r=Kr(),n={defaultBlockParam:(o="latest")=>o,returnFullTxObjectParam:(o=!1)=>o,blockNumberToHex:o=>Number.isInteger(o)?`0x${o.toString(16)}`:o};class t{constructor(s){this.communicator=s,this.call=this.buildRequest({call:e.RPC_CALLS.eth_call,formatters:[null,n.defaultBlockParam]}),this.getBalance=this.buildRequest({call:e.RPC_CALLS.eth_getBalance,formatters:[null,n.defaultBlockParam]}),this.getCode=this.buildRequest({call:e.RPC_CALLS.eth_getCode,formatters:[null,n.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:e.RPC_CALLS.eth_getStorageAt,formatters:[null,n.blockNumberToHex,n.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:e.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:e.RPC_CALLS.eth_getBlockByHash,formatters:[null,n.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:e.RPC_CALLS.eth_getBlockByNumber,formatters:[n.blockNumberToHex,n.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionCount,formatters:[null,n.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:e.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=a=>this.buildRequest({call:e.RPC_CALLS.eth_estimateGas})([a]),this.setSafeSettings=this.buildRequest({call:e.RPC_CALLS.safe_setSettings})}buildRequest(s){const{call:a,formatters:i}=s;return async c=>{i&&Array.isArray(c)&&i.forEach((l,m)=>{l&&(c[m]=l(c[m]))});const d={call:a,params:c||[]};return(await this.communicator.send(r.Methods.rpcCall,d)).data}}}return Qn.Eth=t,Qn}var $t={},Ud={},Dd={},to={},ro={},Nl;function i6(){return Nl||(Nl=1,Object.defineProperty(ro,"__esModule",{value:!0}),ro.version=void 0,ro.version="1.2.3"),ro}var $l;function Bn(){if($l)return to;$l=1,Object.defineProperty(to,"__esModule",{value:!0}),to.BaseError=void 0;const e=i6();class r extends Error{constructor(t,o={}){var c;const s=o.cause instanceof r?o.cause.details:(c=o.cause)!=null&&c.message?o.cause.message:o.details,a=o.cause instanceof r&&o.cause.docsPath||o.docsPath,i=[t||"An error occurred.","",...o.metaMessages?[...o.metaMessages,""]:[],...a?[`Docs: https://abitype.dev${a}`]:[],...s?[`Details: ${s}`]:[],`Version: abitype@${e.version}`].join(`
|
|
2
2
|
`);super(i),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),o.cause&&(this.cause=o.cause),this.details=s,this.docsPath=a,this.metaMessages=o.metaMessages,this.shortMessage=t}}return to.BaseError=r,to}var Ia={},zl;function s6(){if(zl)return Ia;zl=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.narrow=e;function e(r){return r}return Ia}var Ra={},Ba={},Oa={},Ca={},qt={},Ll;function Ku(){if(Ll)return qt;Ll=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.isTupleRegex=qt.integerRegex=qt.bytesRegex=void 0,qt.execTyped=e;function e(r,n){const t=r.exec(n);return t==null?void 0:t.groups}return qt.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,qt.integerRegex=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,qt.isTupleRegex=/^\(.+?\).*?$/,qt}var Ul;function Ag(){if(Ul)return Ca;Ul=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.formatAbiParameter=n;const e=Ku(),r=/^tuple(?<array>(\[(\d*)\])*)$/;function n(t){let o=t.type;if(r.test(t.type)&&"components"in t){o="(";const s=t.components.length;for(let i=0;i<s;i++){const c=t.components[i];o+=n(c),i<s-1&&(o+=", ")}const a=(0,e.execTyped)(r,t.type);return o+=`)${(a==null?void 0:a.array)||""}`,n({...t,type:o})}return"indexed"in t&&t.indexed&&(o=`${o} indexed`),t.name?`${o} ${t.name}`:o}return Ca}var Dl;function Tg(){if(Dl)return Oa;Dl=1,Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.formatAbiParameters=r;const e=Ag();function r(n){let t="";const o=n.length;for(let s=0;s<o;s++){const a=n[s];t+=(0,e.formatAbiParameter)(a),s!==o-1&&(t+=", ")}return t}return Oa}var Gl;function Sg(){if(Gl)return Ba;Gl=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.formatAbiItem=r;const e=Tg();function r(n){var t;return n.type==="function"?`function ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})${n.stateMutability&&n.stateMutability!=="nonpayable"?` ${n.stateMutability}`:""}${(t=n.outputs)!=null&&t.length?` returns (${(0,e.formatAbiParameters)(n.outputs)})`:""}`:n.type==="event"?`event ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})`:n.type==="error"?`error ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})`:n.type==="constructor"?`constructor(${(0,e.formatAbiParameters)(n.inputs)})${n.stateMutability==="payable"?" payable":""}`:n.type==="fallback"?`fallback() external${n.stateMutability==="payable"?" payable":""}`:"receive() external payable"}return Ba}var Vl;function c6(){if(Vl)return Ra;Vl=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.formatAbi=r;const e=Sg();function r(n){const t=[],o=n.length;for(let s=0;s<o;s++){const a=n[s],i=(0,e.formatAbiItem)(a);t.push(i)}return t}return Ra}var xa={},Ce={},Wl;function On(){if(Wl)return Ce;Wl=1,Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.functionModifiers=Ce.eventModifiers=Ce.modifiers=void 0,Ce.isErrorSignature=n,Ce.execErrorSignature=t,Ce.isEventSignature=s,Ce.execEventSignature=a,Ce.isFunctionSignature=c,Ce.execFunctionSignature=d,Ce.isStructSignature=l,Ce.execStructSignature=m,Ce.isConstructorSignature=h,Ce.execConstructorSignature=b,Ce.isFallbackSignature=g,Ce.execFallbackSignature=v,Ce.isReceiveSignature=u;const e=Ku(),r=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function n(w){return r.test(w)}function t(w){return(0,e.execTyped)(r,w)}const o=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function s(w){return o.test(w)}function a(w){return(0,e.execTyped)(o,w)}const i=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function c(w){return i.test(w)}function d(w){return(0,e.execTyped)(i,w)}const f=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function l(w){return f.test(w)}function m(w){return(0,e.execTyped)(f,w)}const y=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function h(w){return y.test(w)}function b(w){return(0,e.execTyped)(y,w)}const E=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function g(w){return E.test(w)}function v(w){return(0,e.execTyped)(E,w)}const P=/^receive\(\) external payable$/;function u(w){return P.test(w)}return Ce.modifiers=new Set(["memory","indexed","storage","calldata"]),Ce.eventModifiers=new Set(["indexed"]),Ce.functionModifiers=new Set(["calldata","memory","storage"]),Ce}var qa={},zt={},Kl;function Zu(){if(Kl)return zt;Kl=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.UnknownSolidityTypeError=zt.UnknownTypeError=zt.InvalidAbiItemError=void 0;const e=Bn();class r extends e.BaseError{constructor({signature:s}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(s,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}zt.InvalidAbiItemError=r;class n extends e.BaseError{constructor({type:s}){super("Unknown type.",{metaMessages:[`Type "${s}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}zt.UnknownTypeError=n;class t extends e.BaseError{constructor({type:s}){super("Unknown type.",{metaMessages:[`Type "${s}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}return zt.UnknownSolidityTypeError=t,zt}var Fe={},Zl;function Qo(){if(Zl)return Fe;Zl=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.InvalidAbiTypeParameterError=Fe.InvalidFunctionModifierError=Fe.InvalidModifierError=Fe.SolidityProtectedKeywordError=Fe.InvalidParameterError=Fe.InvalidAbiParametersError=Fe.InvalidAbiParameterError=void 0;const e=Bn();class r extends e.BaseError{constructor({param:d}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(d,null,2)})`,docsPath:"/api/human#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}}Fe.InvalidAbiParameterError=r;class n extends e.BaseError{constructor({params:d}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(d,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}Fe.InvalidAbiParametersError=n;class t extends e.BaseError{constructor({param:d}){super("Invalid ABI parameter.",{details:d}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}Fe.InvalidParameterError=t;class o extends e.BaseError{constructor({param:d,name:f}){super("Invalid ABI parameter.",{details:d,metaMessages:[`"${f}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}Fe.SolidityProtectedKeywordError=o;class s extends e.BaseError{constructor({param:d,type:f,modifier:l}){super("Invalid ABI parameter.",{details:d,metaMessages:[`Modifier "${l}" not allowed${f?` in "${f}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}Fe.InvalidModifierError=s;class a extends e.BaseError{constructor({param:d,type:f,modifier:l}){super("Invalid ABI parameter.",{details:d,metaMessages:[`Modifier "${l}" not allowed${f?` in "${f}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${l}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}Fe.InvalidFunctionModifierError=a;class i extends e.BaseError{constructor({abiParameter:d}){super("Invalid ABI parameter.",{details:JSON.stringify(d,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}return Fe.InvalidAbiTypeParameterError=i,Fe}var Lt={},Yl;function vf(){if(Yl)return Lt;Yl=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.InvalidStructSignatureError=Lt.UnknownSignatureError=Lt.InvalidSignatureError=void 0;const e=Bn();class r extends e.BaseError{constructor({signature:s,type:a}){super(`Invalid ${a} signature.`,{details:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}Lt.InvalidSignatureError=r;class n extends e.BaseError{constructor({signature:s}){super("Unknown signature.",{details:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}Lt.UnknownSignatureError=n;class t extends e.BaseError{constructor({signature:s}){super("Invalid struct signature.",{details:s,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}return Lt.InvalidStructSignatureError=t,Lt}var no={},Jl;function Ig(){if(Jl)return no;Jl=1,Object.defineProperty(no,"__esModule",{value:!0}),no.CircularReferenceError=void 0;const e=Bn();class r extends e.BaseError{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}return no.CircularReferenceError=r,no}var at={},oo={},Xl;function Rg(){if(Xl)return oo;Xl=1,Object.defineProperty(oo,"__esModule",{value:!0}),oo.InvalidParenthesisError=void 0;const e=Bn();class r extends e.BaseError{constructor({current:t,depth:o}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${o>0?"opening":"closing"} parentheses.`],details:`Depth "${o}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}return oo.InvalidParenthesisError=r,oo}var cn={},Ql;function u6(){if(Ql)return cn;Ql=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.parameterCache=void 0,cn.getParameterCacheKey=e;function e(r,n,t){let o="";if(t)for(const s of Object.entries(t)){if(!s)continue;let a="";for(const i of s[1])a+=`[${i.type}${i.name?`:${i.name}`:""}]`;o+=`(${s[0]}{${a}})`}return n?`${n}:${r}${o}`:`${r}${o}`}return cn.parameterCache=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]),cn}var e0;function Rn(){if(e0)return at;e0=1,Object.defineProperty(at,"__esModule",{value:!0}),at.parseSignature=i,at.parseFunctionSignature=c,at.parseEventSignature=d,at.parseErrorSignature=f,at.parseConstructorSignature=l,at.parseFallbackSignature=m,at.parseAbiParameter=E,at.splitParameters=g,at.isSolidityType=v,at.isSolidityKeyword=u,at.isValidDataLocation=w;const e=Ku(),r=Zu(),n=Qo(),t=vf(),o=Rg(),s=u6(),a=On();function i(_,p={}){if((0,a.isFunctionSignature)(_))return c(_,p);if((0,a.isEventSignature)(_))return d(_,p);if((0,a.isErrorSignature)(_))return f(_,p);if((0,a.isConstructorSignature)(_))return l(_,p);if((0,a.isFallbackSignature)(_))return m(_);if((0,a.isReceiveSignature)(_))return{type:"receive",stateMutability:"payable"};throw new t.UnknownSignatureError({signature:_})}function c(_,p={}){const S=(0,a.execFunctionSignature)(_);if(!S)throw new t.InvalidSignatureError({signature:_,type:"function"});const A=g(S.parameters),T=[],O=A.length;for(let R=0;R<O;R++)T.push(E(A[R],{modifiers:a.functionModifiers,structs:p,type:"function"}));const I=[];if(S.returns){const R=g(S.returns),H=R.length;for(let F=0;F<H;F++)I.push(E(R[F],{modifiers:a.functionModifiers,structs:p,type:"function"}))}return{name:S.name,type:"function",stateMutability:S.stateMutability??"nonpayable",inputs:T,outputs:I}}function d(_,p={}){const S=(0,a.execEventSignature)(_);if(!S)throw new t.InvalidSignatureError({signature:_,type:"event"});const A=g(S.parameters),T=[],O=A.length;for(let I=0;I<O;I++)T.push(E(A[I],{modifiers:a.eventModifiers,structs:p,type:"event"}));return{name:S.name,type:"event",inputs:T}}function f(_,p={}){const S=(0,a.execErrorSignature)(_);if(!S)throw new t.InvalidSignatureError({signature:_,type:"error"});const A=g(S.parameters),T=[],O=A.length;for(let I=0;I<O;I++)T.push(E(A[I],{structs:p,type:"error"}));return{name:S.name,type:"error",inputs:T}}function l(_,p={}){const S=(0,a.execConstructorSignature)(_);if(!S)throw new t.InvalidSignatureError({signature:_,type:"constructor"});const A=g(S.parameters),T=[],O=A.length;for(let I=0;I<O;I++)T.push(E(A[I],{structs:p,type:"constructor"}));return{type:"constructor",stateMutability:S.stateMutability??"nonpayable",inputs:T}}function m(_){const p=(0,a.execFallbackSignature)(_);if(!p)throw new t.InvalidSignatureError({signature:_,type:"fallback"});return{type:"fallback",stateMutability:p.stateMutability??"nonpayable"}}const y=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,h=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,b=/^u?int$/;function E(_,p){var j,k;const S=(0,s.getParameterCacheKey)(_,p==null?void 0:p.type,p==null?void 0:p.structs);if(s.parameterCache.has(S))return s.parameterCache.get(S);const A=e.isTupleRegex.test(_),T=(0,e.execTyped)(A?h:y,_);if(!T)throw new n.InvalidParameterError({param:_});if(T.name&&u(T.name))throw new n.SolidityProtectedKeywordError({param:_,name:T.name});const O=T.name?{name:T.name}:{},I=T.modifier==="indexed"?{indexed:!0}:{},R=(p==null?void 0:p.structs)??{};let H,F={};if(A){H="tuple";const B=g(T.type),C=[],q=B.length;for(let M=0;M<q;M++)C.push(E(B[M],{structs:R}));F={components:C}}else if(T.type in R)H="tuple",F={components:R[T.type]};else if(b.test(T.type))H=`${T.type}256`;else if(T.type==="address payable")H="address";else if(H=T.type,(p==null?void 0:p.type)!=="struct"&&!v(H))throw new r.UnknownSolidityTypeError({type:H});if(T.modifier){if(!((k=(j=p==null?void 0:p.modifiers)==null?void 0:j.has)!=null&&k.call(j,T.modifier)))throw new n.InvalidModifierError({param:_,type:p==null?void 0:p.type,modifier:T.modifier});if(a.functionModifiers.has(T.modifier)&&!w(H,!!T.array))throw new n.InvalidFunctionModifierError({param:_,type:p==null?void 0:p.type,modifier:T.modifier})}const x={type:`${H}${T.array??""}`,...O,...I,...F};return s.parameterCache.set(S,x),x}function g(_,p=[],S="",A=0){const T=_.trim().length;for(let O=0;O<T;O++){const I=_[O],R=_.slice(O+1);switch(I){case",":return A===0?g(R,[...p,S.trim()]):g(R,p,`${S}${I}`,A);case"(":return g(R,p,`${S}${I}`,A+1);case")":return g(R,p,`${S}${I}`,A-1);default:return g(R,p,`${S}${I}`,A)}}if(S==="")return p;if(A!==0)throw new o.InvalidParenthesisError({current:S,depth:A});return p.push(S.trim()),p}function v(_){return _==="address"||_==="bool"||_==="function"||_==="string"||e.bytesRegex.test(_)||e.integerRegex.test(_)}const P=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function u(_){return _==="address"||_==="bool"||_==="function"||_==="string"||_==="tuple"||e.bytesRegex.test(_)||e.integerRegex.test(_)||P.test(_)}function w(_,p){return p||_==="bytes"||_==="string"||_==="tuple"}return at}var t0;function Yu(){if(t0)return qa;t0=1,Object.defineProperty(qa,"__esModule",{value:!0}),qa.parseStructs=i;const e=Ku(),r=Zu(),n=Qo(),t=vf(),o=Ig(),s=On(),a=Rn();function i(f){const l={},m=f.length;for(let E=0;E<m;E++){const g=f[E];if(!(0,s.isStructSignature)(g))continue;const v=(0,s.execStructSignature)(g);if(!v)throw new t.InvalidSignatureError({signature:g,type:"struct"});const P=v.properties.split(";"),u=[],w=P.length;for(let _=0;_<w;_++){const S=P[_].trim();if(!S)continue;const A=(0,a.parseAbiParameter)(S,{type:"struct"});u.push(A)}if(!u.length)throw new t.InvalidStructSignatureError({signature:g});l[v.name]=u}const y={},h=Object.entries(l),b=h.length;for(let E=0;E<b;E++){const[g,v]=h[E];y[g]=d(v,l)}return y}const c=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function d(f=[],l={},m=new Set){const y=[],h=f.length;for(let b=0;b<h;b++){const E=f[b];if(e.isTupleRegex.test(E.type))y.push(E);else{const v=(0,e.execTyped)(c,E.type);if(!(v!=null&&v.type))throw new n.InvalidAbiTypeParameterError({abiParameter:E});const{array:P,type:u}=v;if(u in l){if(m.has(u))throw new o.CircularReferenceError({type:u});y.push({...E,type:`tuple${P??""}`,components:d(l[u],l,new Set([...m,u]))})}else if((0,a.isSolidityType)(u))y.push(E);else throw new r.UnknownTypeError({type:u})}}return y}return qa}var r0;function d6(){if(r0)return xa;r0=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.parseAbi=t;const e=On(),r=Yu(),n=Rn();function t(o){const s=(0,r.parseStructs)(o),a=[],i=o.length;for(let c=0;c<i;c++){const d=o[c];(0,e.isStructSignature)(d)||a.push((0,n.parseSignature)(d,s))}return a}return xa}var Ma={},n0;function f6(){if(n0)return Ma;n0=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.parseAbiItem=o;const e=Zu(),r=On(),n=Yu(),t=Rn();function o(s){let a;if(typeof s=="string")a=(0,t.parseSignature)(s);else{const i=(0,n.parseStructs)(s),c=s.length;for(let d=0;d<c;d++){const f=s[d];if(!(0,r.isStructSignature)(f)){a=(0,t.parseSignature)(f,i);break}}}if(!a)throw new e.InvalidAbiItemError({signature:s});return a}return Ma}var ka={},o0;function l6(){if(o0)return ka;o0=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.parseAbiParameter=o;const e=Qo(),r=On(),n=Yu(),t=Rn();function o(s){let a;if(typeof s=="string")a=(0,t.parseAbiParameter)(s,{modifiers:r.modifiers});else{const i=(0,n.parseStructs)(s),c=s.length;for(let d=0;d<c;d++){const f=s[d];if(!(0,r.isStructSignature)(f)){a=(0,t.parseAbiParameter)(f,{modifiers:r.modifiers,structs:i});break}}}if(!a)throw new e.InvalidAbiParameterError({param:s});return a}return ka}var Ha={},a0;function b6(){if(a0)return Ha;a0=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.parseAbiParameters=s;const e=Qo(),r=On(),n=Yu(),t=Rn(),o=Rn();function s(a){const i=[];if(typeof a=="string"){const c=(0,t.splitParameters)(a),d=c.length;for(let f=0;f<d;f++)i.push((0,o.parseAbiParameter)(c[f],{modifiers:r.modifiers}))}else{const c=(0,n.parseStructs)(a),d=a.length;for(let f=0;f<d;f++){const l=a[f];if((0,r.isStructSignature)(l))continue;const m=(0,t.splitParameters)(l),y=m.length;for(let h=0;h<y;h++)i.push((0,o.parseAbiParameter)(m[h],{modifiers:r.modifiers,structs:c}))}}if(i.length===0)throw new e.InvalidAbiParametersError({params:a});return i}return Ha}var i0;function hr(){return i0||(i0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CircularReferenceError=e.InvalidParenthesisError=e.UnknownSignatureError=e.InvalidSignatureError=e.InvalidStructSignatureError=e.InvalidAbiParameterError=e.InvalidAbiParametersError=e.InvalidParameterError=e.SolidityProtectedKeywordError=e.InvalidModifierError=e.InvalidFunctionModifierError=e.InvalidAbiTypeParameterError=e.UnknownSolidityTypeError=e.InvalidAbiItemError=e.UnknownTypeError=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=e.formatAbiParameters=e.formatAbiParameter=e.formatAbiItem=e.formatAbi=e.narrow=e.BaseError=void 0;var r=Bn();Object.defineProperty(e,"BaseError",{enumerable:!0,get:function(){return r.BaseError}});var n=s6();Object.defineProperty(e,"narrow",{enumerable:!0,get:function(){return n.narrow}});var t=c6();Object.defineProperty(e,"formatAbi",{enumerable:!0,get:function(){return t.formatAbi}});var o=Sg();Object.defineProperty(e,"formatAbiItem",{enumerable:!0,get:function(){return o.formatAbiItem}});var s=Ag();Object.defineProperty(e,"formatAbiParameter",{enumerable:!0,get:function(){return s.formatAbiParameter}});var a=Tg();Object.defineProperty(e,"formatAbiParameters",{enumerable:!0,get:function(){return a.formatAbiParameters}});var i=d6();Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return i.parseAbi}});var c=f6();Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return c.parseAbiItem}});var d=l6();Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return d.parseAbiParameter}});var f=b6();Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return f.parseAbiParameters}});var l=Zu();Object.defineProperty(e,"UnknownTypeError",{enumerable:!0,get:function(){return l.UnknownTypeError}}),Object.defineProperty(e,"InvalidAbiItemError",{enumerable:!0,get:function(){return l.InvalidAbiItemError}}),Object.defineProperty(e,"UnknownSolidityTypeError",{enumerable:!0,get:function(){return l.UnknownSolidityTypeError}});var m=Qo();Object.defineProperty(e,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return m.InvalidAbiTypeParameterError}}),Object.defineProperty(e,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return m.InvalidFunctionModifierError}}),Object.defineProperty(e,"InvalidModifierError",{enumerable:!0,get:function(){return m.InvalidModifierError}}),Object.defineProperty(e,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return m.SolidityProtectedKeywordError}}),Object.defineProperty(e,"InvalidParameterError",{enumerable:!0,get:function(){return m.InvalidParameterError}}),Object.defineProperty(e,"InvalidAbiParametersError",{enumerable:!0,get:function(){return m.InvalidAbiParametersError}}),Object.defineProperty(e,"InvalidAbiParameterError",{enumerable:!0,get:function(){return m.InvalidAbiParameterError}});var y=vf();Object.defineProperty(e,"InvalidStructSignatureError",{enumerable:!0,get:function(){return y.InvalidStructSignatureError}}),Object.defineProperty(e,"InvalidSignatureError",{enumerable:!0,get:function(){return y.InvalidSignatureError}}),Object.defineProperty(e,"UnknownSignatureError",{enumerable:!0,get:function(){return y.UnknownSignatureError}});var h=Rg();Object.defineProperty(e,"InvalidParenthesisError",{enumerable:!0,get:function(){return h.InvalidParenthesisError}});var b=Ig();Object.defineProperty(e,"CircularReferenceError",{enumerable:!0,get:function(){return b.CircularReferenceError}})})(Dd)),Dd}var un={},Fa={},s0;function me(){if(s0)return Fa;s0=1,Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.getAction=e;function e(r,n,t){const o=r[n.name];if(typeof o=="function")return o;const s=r[t];return typeof s=="function"?s:a=>n(r,a)}return Fa}var Na={},$a={},se={},ao={},c0;function er(){if(c0)return ao;c0=1,Object.defineProperty(ao,"__esModule",{value:!0}),ao.formatAbiItem=r,ao.formatAbiParams=n;const e=Be();function r(o,{includeName:s=!1}={}){if(o.type!=="function"&&o.type!=="event"&&o.type!=="error")throw new e.InvalidDefinitionTypeError(o.type);return`${o.name}(${n(o.inputs,{includeName:s})})`}function n(o,{includeName:s=!1}={}){return o?o.map(a=>t(a,{includeName:s})).join(s?", ":","):""}function t(o,{includeName:s}){return o.type.startsWith("tuple")?`(${n(o.components,{includeName:s})})${o.type.slice(5)}`:o.type+(s&&o.name?` ${o.name}`:"")}return ao}var za={},La={},u0;function Qe(){if(u0)return La;u0=1,Object.defineProperty(La,"__esModule",{value:!0}),La.isHex=e;function e(r,{strict:n=!0}={}){return!r||typeof r!="string"?!1:n?/^0x[0-9a-fA-F]*$/.test(r):r.startsWith("0x")}return La}var d0;function De(){if(d0)return za;d0=1,Object.defineProperty(za,"__esModule",{value:!0}),za.size=r;const e=Qe();function r(n){return(0,e.isHex)(n,{strict:!1})?Math.ceil((n.length-2)/2):n.length}return za}var dn={},io={},f0;function m6(){return f0||(f0=1,Object.defineProperty(io,"__esModule",{value:!0}),io.version=void 0,io.version="2.54.1"),io}var l0;function ue(){if(l0)return dn;l0=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.BaseError=void 0,dn.setErrorConfig=n;const e=m6();let r={getDocsUrl:({docsBaseUrl:s,docsPath:a="",docsSlug:i})=>a?`${s??"https://viem.sh"}${a}${i?`#${i}`:""}`:void 0,version:`viem@${e.version}`};function n(s){r=s}class t extends Error{constructor(a,i={}){var m;const c=(()=>{var y;return i.cause instanceof t?i.cause.details:(y=i.cause)!=null&&y.message?i.cause.message:i.details})(),d=i.cause instanceof t&&i.cause.docsPath||i.docsPath,f=(m=r.getDocsUrl)==null?void 0:m.call(r,{...i,docsPath:d}),l=[a||"An error occurred.","",...i.metaMessages?[...i.metaMessages,""]:[],...f?[`Docs: ${f}`]:[],...c?[`Details: ${c}`]:[],...r.version?[`Version: ${r.version}`]:[]].join(`
|
|
3
3
|
`);super(l,i.cause?{cause:i.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=c,this.docsPath=d,this.metaMessages=i.metaMessages,this.name=i.name??this.name,this.shortMessage=a,this.version=e.version}walk(a){return o(this,a)}}dn.BaseError=t;function o(s,a){return a!=null&&a(s)?s:s&&typeof s=="object"&&"cause"in s&&s.cause!==void 0?o(s.cause,a):a?null:s}return dn}var b0;function Be(){if(b0)return se;b0=1,Object.defineProperty(se,"__esModule",{value:!0}),se.UnsupportedPackedAbiType=se.InvalidDefinitionTypeError=se.InvalidArrayError=se.InvalidAbiDecodingTypeError=se.InvalidAbiEncodingTypeError=se.DecodeLogTopicsMismatch=se.DecodeLogDataMismatch=se.BytesSizeMismatchError=se.AbiItemAmbiguityError=se.AbiFunctionSignatureNotFoundError=se.AbiFunctionOutputsNotFoundError=se.AbiFunctionNotFoundError=se.AbiEventNotFoundError=se.AbiEventSignatureNotFoundError=se.AbiEventSignatureEmptyTopicsError=se.AbiErrorSignatureNotFoundError=se.AbiErrorNotFoundError=se.AbiErrorInputsNotFoundError=se.AbiEncodingLengthMismatchError=se.AbiEncodingBytesSizeMismatchError=se.AbiEncodingArrayLengthMismatchError=se.AbiDecodingZeroDataError=se.AbiDecodingDataSizeTooSmallError=se.AbiDecodingDataSizeInvalidError=se.AbiConstructorParamsNotFoundError=se.AbiConstructorNotFoundError=void 0;const e=er(),r=De(),n=ue();class t extends n.BaseError{constructor({docsPath:H}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
|
|
4
4
|
`),{docsPath:H,name:"AbiConstructorNotFoundError"})}}se.AbiConstructorNotFoundError=t;class o extends n.BaseError{constructor({docsPath:H}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as b,b as c}from"./lit-element-B3y9oplH.js";import{n}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-
|
|
1
|
+
import{i as b,b as c}from"./lit-element-B3y9oplH.js";import{n}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-DslCyXew.js";import"./index-or9-gmVP.js";import{d as g,r as m,e as h}from"./index-kdRTF64R.js";const v=g`
|
|
2
2
|
:host {
|
|
3
3
|
width: var(--local-width);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as p,b as m}from"./lit-element-B3y9oplH.js";import{n as i}from"./class-map-CxwNmq0D.js";import{c as f}from"./index-
|
|
1
|
+
import{i as p,b as m}from"./lit-element-B3y9oplH.js";import{n as i}from"./class-map-CxwNmq0D.js";import{c as f}from"./index-DslCyXew.js";import"./index-D4o1kYfZ.js";import{d as h,r as b,e as w}from"./index-kdRTF64R.js";import{N as d}from"./W3MFrameProviderSingleton-CNJGu1s_.js";const g=h`
|
|
2
2
|
:host {
|
|
3
3
|
width: 100%;
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{w as k,i as W,b as v}from"./lit-element-B3y9oplH.js";import{n as y}from"./class-map-CxwNmq0D.js";import{c as I}from"./index-
|
|
1
|
+
import{w as k,i as W,b as v}from"./lit-element-B3y9oplH.js";import{n as y}from"./class-map-CxwNmq0D.js";import{c as I}from"./index-DslCyXew.js";import"./index-D4o1kYfZ.js";import{Q as M}from"./browser-DHYOtFa8.js";import{d as O,r as N}from"./index-kdRTF64R.js";const Q=.1,_=2.5,$=7;function x(t,a,d){return t===a?!1:(t-a<0?a-t:t-a)<=d+Q}function A(t,a){const d=Array.prototype.slice.call(M.create(t,{errorCorrectionLevel:a}).modules.data,0),l=Math.sqrt(d.length);return d.reduce((h,f,p)=>(p%l===0?h.push([f]):h[h.length-1].push(f))&&h,[])}const q={generate({uri:t,size:a,logoSize:d,padding:l=8,dotColor:h="var(--apkt-colors-black)"}){const p=[],u=A(t,"Q"),n=(a-2*l)/u.length,E=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];E.forEach(({x:i,y:e})=>{const s=(u.length-$)*n*i+l,r=(u.length-$)*n*e+l,c=.45;for(let o=0;o<E.length;o+=1){const m=n*($-o*2);p.push(k`
|
|
2
2
|
<rect
|
|
3
3
|
fill=${o===2?"var(--apkt-colors-black)":"var(--apkt-colors-white)"}
|
|
4
4
|
width=${o===0?m-10:m}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as d,b as h}from"./lit-element-B3y9oplH.js";import{n as r}from"./class-map-CxwNmq0D.js";import{e as m,n as f}from"./ref-BsAZ42-h.js";import{d as c,r as v,e as y,v as b}from"./index-
|
|
1
|
+
import{i as d,b as h}from"./lit-element-B3y9oplH.js";import{n as r}from"./class-map-CxwNmq0D.js";import{e as m,n as f}from"./ref-BsAZ42-h.js";import{d as c,r as v,e as y,v as b}from"./index-kdRTF64R.js";import{c as g,U as w}from"./index-DslCyXew.js";const x=c`
|
|
2
2
|
:host {
|
|
3
3
|
position: relative;
|
|
4
4
|
display: inline-block;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as d,b as u}from"./lit-element-B3y9oplH.js";import{n as p}from"./class-map-CxwNmq0D.js";import{c as m}from"./index-
|
|
1
|
+
import{i as d,b as u}from"./lit-element-B3y9oplH.js";import{n as p}from"./class-map-CxwNmq0D.js";import{c as m}from"./index-DslCyXew.js";import{d as f,r as h}from"./index-kdRTF64R.js";const g=f`
|
|
2
2
|
:host {
|
|
3
3
|
position: relative;
|
|
4
4
|
display: flex;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as b,b as l}from"./lit-element-B3y9oplH.js";import{n as s}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-
|
|
1
|
+
import{i as b,b as l}from"./lit-element-B3y9oplH.js";import{n as s}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-DslCyXew.js";import{d as m,r as f,e as v}from"./index-kdRTF64R.js";const h=m`
|
|
2
2
|
button {
|
|
3
3
|
border: none;
|
|
4
4
|
background: transparent;
|