@dcl/shop 0.1.0-29994103056.commit-191afbc → 0.1.0-29996672089.commit-ce4d282
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/Activity-ji9z26-b.js +243 -0
- package/assets/{AnimatedBackground-CwVmQoMy.js → AnimatedBackground-dlJZeXOs.js} +3 -3
- package/assets/Assets-DHtvK9gi.js +758 -0
- package/assets/{Assets.styles-BmY0qPN-.js → Assets.styles-DBA9HXW7.js} +1 -1
- package/assets/Authorizations-BNMCiOdB.js +163 -0
- package/assets/Cart-BlShrWP_.js +3 -0
- package/assets/{CircularProgress-BmaY3soK.js → CircularProgress-DvTkhDvC.js} +1 -1
- package/assets/{Collection-BlMV8rIO.js → Collection-DFIFsgYQ.js} +2 -2
- package/assets/CollectionCarousel-DMwkzkYf.js +1 -0
- package/assets/{ConstantsUtil-DO6FyoSW.js → ConstantsUtil-CJUlyS7R.js} +1 -1
- package/assets/{ContentClient-eS-Purid.js → ContentClient-DtuNqgIp.js} +1 -1
- package/assets/{Creator-CVsany2p.js → Creator-BzYX40qE.js} +1 -1
- package/assets/{CssVarsProvider-D03-j1T8.js → CssVarsProvider-D82yS8Ds.js} +1 -1
- package/assets/{DeploymentBuilder-mzKF7T6P.js → DeploymentBuilder-Bt5zjBVh.js} +1 -1
- package/assets/{ErrorNotice-BDH9xoG4.js → ErrorNotice-C7soUjRV.js} +1 -1
- package/assets/{ExchangeController-BKklF67w.js → ExchangeController-CiGVwKQf.js} +1 -1
- package/assets/{GetCredits-l0W_kkUA.js → GetCredits-eVhxGnMo.js} +1 -1
- package/assets/{HelpersUtil-1AJlaO39.js → HelpersUtil-C32FavmO.js} +1 -1
- package/assets/{ImportListings-CaC4hXkS.js → ImportListings-BiGwtdUn.js} +2 -2
- package/assets/ItemDetail-6dC_vNLF.css +1 -0
- package/assets/ItemDetail-DQOBDAhC.js +78 -0
- package/assets/{LoadMore-DCZi1YY-.js → LoadMore-BjvEi3Wj.js} +1 -1
- package/assets/MarketCheckout-BB0_ss_n.js +3 -0
- package/assets/{MyAssets-Gc_o5t9O.js → MyAssets-cbSiEx2B.js} +2 -2
- package/assets/{MyFavorites-CTtHG-tK.js → MyFavorites-DxWrJSpf.js} +2 -2
- package/assets/{NetworkUtil-BGlQiKvg.js → NetworkUtil-Xp0fNa8X.js} +1 -1
- package/assets/{NotFound-0kATSaSv.js → NotFound-Cj4SIl5T.js} +1 -1
- package/assets/{PrimaryListModal-QH5JEih2.js → PrimaryListModal-CdZJXblc.js} +1 -1
- package/assets/{StoreSettings-D97bWmhq.js → StoreSettings-LdrMcuVr.js} +5 -5
- package/assets/Success-BRT1MWds.js +4 -0
- package/assets/{SwapController-C8nP5wvc.js → SwapController-CXQ00xts.js} +1 -1
- package/assets/{Tooltip-BaUllE5E.js → Tooltip-BZ57TVaP.js} +1 -1
- package/assets/TradeService-SfkC7zHZ.js +1 -0
- package/assets/{W3MFrameProviderSingleton-B-iMukUt.js → W3MFrameProviderSingleton-B8RM0-JJ.js} +3 -3
- package/assets/{WebCryptoP256-BN2oUA6b.js → WebCryptoP256-D_33Dvnx.js} +1 -1
- package/assets/authorizations-D44lw00X.js +1 -0
- package/assets/{basic-BAZBRGQf.js → basic-CtFzqtOx.js} +1 -1
- package/assets/{biconomy-Bnx-4bDS.js → biconomy-BaeM1SCU.js} +1 -1
- package/assets/{browser-Cad_aDY9.js → browser-9oFjBwrz.js} +1 -1
- package/assets/{browser-ponyfill-CQ0GHmxr.js → browser-ponyfill-DMgE6PM5.js} +1 -1
- package/assets/browser-ponyfill-Djb5Py6a.js +1 -0
- package/assets/buy-Dszi8UeF.js +1 -0
- package/assets/buy-gasless-Nfp6cMbQ.js +1 -0
- package/assets/{cart-checkout-CUI-WqEI.js → cart-checkout-Ba3nMBI0.js} +1 -1
- package/assets/{categories-BGNx7jfw.js → categories-D0iwhqs_.js} +1 -1
- package/assets/{ccip-CPI8_6cL.js → ccip-CaKFUjmD.js} +1 -1
- package/assets/{ccip-s5BQ-vNw.js → ccip-DGnj8pvI.js} +1 -1
- package/assets/{chains-C1bwVnfj.js → chains-Bzau33xB.js} +1 -1
- package/assets/collection-DSysxaCY.js +1 -0
- package/assets/{common-yfho93wI.js → common-BaN-pXG4.js} +1 -1
- package/assets/{controller-CL9wipr5.js → controller-DqW_a2vQ.js} +2 -2
- package/assets/{core-gCo9rRyh.js → core-BfFj7IDN.js} +4 -4
- package/assets/{custom-BIAxnPyV.js → custom-CyKMgWLF.js} +1 -1
- package/assets/{data-capture-D_IuhqRX.js → data-capture-DyJzM655.js} +1 -1
- package/assets/{decimals-B36bI5dA.js → decimals-DaU_ek4_.js} +1 -1
- package/assets/decimals-HChuNAkm.js +1 -0
- package/assets/{detectExtension-CKplVZ9K.js → detectExtension-C2ped1rb.js} +1 -1
- package/assets/{email-BCklj9Js.js → email-B1LVTurO.js} +1 -1
- package/assets/{embedded-wallet-B6X4cZQC.js → embedded-wallet-DbH1O4GQ.js} +1 -1
- package/assets/{emotion-styled.browser.esm-D40Lt8fm.js → emotion-styled.browser.esm-CMXzhKww.js} +1 -1
- package/assets/{engine-skvS20px.js → engine-BNiIRF8k.js} +1 -1
- package/assets/{errors-DmdGTuzI.js → errors-DUo56sGG.js} +1 -1
- package/assets/estimate-l1-fee-DbEUBk2I.js +1 -0
- package/assets/eth_estimateGas-DcV1bi0C.js +1 -0
- package/assets/{eth_getStorageAt-C0E8Vng5.js → eth_getStorageAt-CvOhghFe.js} +1 -1
- package/assets/eth_getTransactionCount-BNyI69eR.js +1 -0
- package/assets/{ethereum-C5kfwN9D.js → ethereum-B_IIMsg0.js} +1 -1
- package/assets/{ethers-BIvjmL85.js → ethers-w5dOkonM.js} +1 -1
- package/assets/{execute-B_XUV-t5.js → execute-CzNqLgfO.js} +2 -2
- package/assets/{extractIPFS-CsawLTu6.js → extractIPFS-mhjpSq1K.js} +1 -1
- package/assets/{features-D1q967sn.js → features-D_R5E38-.js} +1 -1
- package/assets/{fetchTokenMetadata-Bgs6k1N5.js → fetchTokenMetadata-BZsN957Y.js} +2 -2
- package/assets/{fortmatic-DwISA9k4.js → fortmatic-DhmlcDbL.js} +1 -1
- package/assets/{get-bytecode-nwWHW248.js → get-bytecode-D38h1G96.js} +1 -1
- package/assets/get-ecosystem-wallet-info-BIlu2xkX.js +1 -0
- package/assets/{getBalance-D2FG5QKV.js → getBalance-BD5xADMR.js} +2 -2
- package/assets/{getInstalledModules-fBSGgSis.js → getInstalledModules-3Q5HYxkN.js} +1 -1
- package/assets/getNFT-B7e2uNF-.js +1 -0
- package/assets/{getNFT-BHzS5Cs2.js → getNFT-DjEJIHB0.js} +2 -2
- package/assets/{getOverlayAlpha-B90Fo_-m.js → getOverlayAlpha-Ho14PJoT.js} +1 -1
- package/assets/{hashTypedData-Cetq1UOK.js → hashTypedData-CC4Umz6j.js} +1 -1
- package/assets/{hashTypedData-DwlPS8MG.js → hashTypedData-DE2iuKMA.js} +1 -1
- package/assets/{import-DLMm_P8-.js → import-BPLVQmln.js} +1 -1
- package/assets/{in-app-CL2vGnrW.js → in-app-qD4m50Nn.js} +1 -1
- package/assets/{in-app-wallet-calls-CQYLsbwB.js → in-app-wallet-calls-BcFExuty.js} +1 -1
- package/assets/{index-DYAXJBpy.js → index--PWwvcNI.js} +1 -1
- package/assets/{index-Che81lrU.js → index-0syK5-Ww.js} +1 -1
- package/assets/{index-Chep4cKH.js → index-2Q-POj3l.js} +3 -3
- package/assets/{index-Ctbl3gOg.js → index-5RDpMwKv.js} +1 -1
- package/assets/{index-BptsdzIZ.js → index-Aw0QE_Br.js} +1 -1
- package/assets/{index-DcsKpVUb.js → index-B9U21JU-.js} +1 -1
- package/assets/{index-BrG8RI5z.js → index-B9n-6xCt.js} +1 -1
- package/assets/{index-DOyivP0c.js → index-BAKqn_lj.js} +2 -2
- package/assets/{index-D5zi_XmR.js → index-BBLW_jFO.js} +1 -1
- package/assets/{index-DAhYJ23_.js → index-BFydxC8W.js} +1 -1
- package/assets/{index-CMZ-l1j1.js → index-BGbFLGJH.js} +1 -1
- package/assets/{index-CwlKjFOG.js → index-BNa7Mf2M.js} +1 -1
- package/assets/{index-BEYHZcex.js → index-BW1vsFdc.js} +1 -1
- package/assets/{index-BBg2vZhG.js → index-B_AeYsKa.js} +1 -1
- package/assets/{index-CnFuk6fK.js → index-BfnFZQqu.js} +1 -1
- package/assets/{index-BXIq_1Tg.js → index-Bi7dtaTz.js} +1 -1
- package/assets/{index-Bn-EvtCB.js → index-Bk6ayCIs.js} +1 -1
- package/assets/{index-Dzy3N4vA.js → index-BnrQ0KXT.js} +1 -1
- package/assets/{index-Cx9CeoZH.js → index-Bt55wXtx.js} +1 -1
- package/assets/{index-BywohlL7.js → index-BuXSM1De.js} +1 -1
- package/assets/{index-B65D0iv0.js → index-ByOIX4VW.js} +1 -1
- package/assets/{index-CVPd9k0D.js → index-C4111GJ-.js} +2 -2
- package/assets/{index-DexIqMzn.js → index-C8P6BHpY.js} +3 -3
- package/assets/{index-D6Thjy9g.js → index-CA73t5p4.js} +1 -1
- package/assets/{index-Zev_LSPI.js → index-CDkTFenk.js} +2 -2
- package/assets/index-CGNquv7o.js +289 -0
- package/assets/{index-B-wT7-Au.js → index-CPvKfkxC.js} +1 -1
- package/assets/{index-C6-1JAkG.js → index-CXMHgbT-.js} +1 -1
- package/assets/{index-CrqgaFmq.js → index-Ck1Cgm82.js} +1 -1
- package/assets/{index-D2F7-1mk.js → index-Cl3G53Lb.js} +1 -1
- package/assets/{index-BGuUm-N-.js → index-CqYbCFw1.js} +1 -1
- package/assets/index-CrKaGnrK.css +1 -0
- package/assets/{index-C5t2d1JX.js → index-CrhtLjWe.js} +1 -1
- package/assets/{index-CHspULa1.js → index-CuA9C-j1.js} +1 -1
- package/assets/{index-BedvNbsM.js → index-CwFsoF5e.js} +1 -1
- package/assets/{index-DTJ6mS_J.js → index-CwKIaxXt.js} +1 -1
- package/assets/{index-B-3QmCY1.js → index-Cx9QgWtN.js} +1 -1
- package/assets/{index-C97CPhyL.js → index-D2bdndwX.js} +1 -1
- package/assets/{index-K0TqdX33.js → index-D7KDT9M9.js} +1 -1
- package/assets/{index-nTA1Tk1a.js → index-DD8leihn.js} +1 -1
- package/assets/{index-DjQcD_Sm.js → index-DGOaB47n.js} +1 -1
- package/assets/index-DH3Yzbz3.js +1 -0
- package/assets/{index-CSRkaTCL.js → index-DRB-gQiu.js} +1 -1
- package/assets/{index-ChbyDwUh.js → index-DUx_udvr.js} +1 -1
- package/assets/{index-DLJwIINa.js → index-DVl2fB76.js} +1 -1
- package/assets/{index-CyrfWYlv.js → index-DWj03ICg.js} +1 -1
- package/assets/{index-BZk7RUfM.js → index-D_jFC223.js} +1 -1
- package/assets/{index-C0wsNojR.js → index-D_xn82-1.js} +1 -1
- package/assets/{index-DnxELmkR.js → index-DcVvVcVQ.js} +1 -1
- package/assets/{index-C2te_xAY.js → index-Dg2IevmK.js} +2 -2
- package/assets/{index-CjBPO58E.js → index-Dp3Py-Ws.js} +1 -1
- package/assets/{index-d3ZKkcaA.js → index-Dv2SQ_eL.js} +1 -1
- package/assets/{index-o_m2wFAn.js → index-DxFC7t5T.js} +1 -1
- package/assets/{index-C2N-AU8j.js → index-Dzj-nA_x.js} +3 -3
- package/assets/index-HN6Rk25C.js +1 -0
- package/assets/{index-BkQHYnhC.js → index-I5rJvbQ1.js} +1 -1
- package/assets/{index-CWfnhYLp.js → index-OGdy2qbx.js} +1 -1
- package/assets/{index-CvIOskBU.js → index-QMzB_9kT.js} +1 -1
- package/assets/{index-B6gcmiqs.js → index-VUv3xRHQ.js} +1 -1
- package/assets/{index-DyhpH4px.js → index-grzzP9n9.js} +1 -1
- package/assets/{index-D3iIxnX6.js → index-hDcHuSsT.js} +1 -1
- package/assets/{index-D-i0A7WQ.js → index-hmML8Yn6.js} +2 -2
- package/assets/{index-0F8nhLaF.js → index-lVvjFIjk.js} +1 -1
- package/assets/{index-uK7qM9c7.js → index-w4_5Aj8T.js} +1 -1
- package/assets/{index-CW9ug21x.js → index-yRQsdAyS.js} +3 -3
- package/assets/{index-yr9vyS0z.js → index-z9bgkHOn.js} +1 -1
- package/assets/{index.es-DnNvUOrT.js → index.es-CMAy1XDw.js} +1 -1
- package/assets/{index.es-CZtQ8FVb.js → index.es-CMyspuf3.js} +4 -4
- package/assets/{index.es-DlHsAJbI.js → index.es-DLt1eklQ.js} +1 -1
- package/assets/{linkAccount-DKoZKguc.js → linkAccount-e50lqdUE.js} +1 -1
- package/assets/{localBatchGatewayRequest-DiUucTH0.js → localBatchGatewayRequest-Da4arsJr.js} +1 -1
- package/assets/mana-rate-BM11zYcS.js +1 -0
- package/assets/{native-t1vLKS11.js → native-BMBZUPnx.js} +1 -1
- package/assets/{networks-D5rFr4Uy.js → networks-CP5ZxOS7.js} +1 -1
- package/assets/{onramp-RD8o9zW8.js → onramp-DEaPwD93.js} +1 -1
- package/assets/{openzeppelin-GzHB2W1P.js → openzeppelin-ubglQWTS.js} +1 -1
- package/assets/{ownerOf-Cl_sRHvA.js → ownerOf-dLmWQ3QZ.js} +1 -1
- package/assets/{parseNft-CbgJiXpe.js → parseNft-nhS1PzrY.js} +2 -2
- package/assets/{parseSignature-DGB4v4W-.js → parseSignature-DIaDPyGA.js} +1 -1
- package/assets/{parseSignature-DZazOabU.js → parseSignature-DtIw2rXo.js} +3 -3
- package/assets/{passkeys-BDOXnD26.js → passkeys-l4VrwtfF.js} +1 -1
- package/assets/{pay-with-exchange-ChCNzNHg.js → pay-with-exchange-yIOka8rX.js} +1 -1
- package/assets/{prepare-contract-call-DmYPUPWz.js → prepare-contract-call-aT1l2NVg.js} +1 -1
- package/assets/{qr-overlay-BIPzfQds.js → qr-overlay-BC6wsExf.js} +3 -3
- package/assets/{react-BrLDncxD.js → react-C51i12iP.js} +1 -1
- package/assets/{receive-CsWO80gl.js → receive-DGr9WBJt.js} +1 -1
- package/assets/{resolveImplementation-CInkT_I9.js → resolveImplementation-CgWwbjqg.js} +1 -1
- package/assets/{rpc-DOR15RcJ.js → rpc-2WnfD84R.js} +1 -1
- package/assets/{secp256k1-DUaLgTGJ.js → secp256k1-BzEjkNEy.js} +1 -1
- package/assets/{secp256k1-C8pkcGJ3.js → secp256k1-C2nawWfp.js} +1 -1
- package/assets/{secp256k1-N7sx_maT.js → secp256k1-C3Ly2cZR.js} +1 -1
- package/assets/{send-BEnX8iHn.js → send-DaMmaBKd.js} +1 -1
- package/assets/{send-batch-transaction-Cl-WR4dD.js → send-batch-transaction-BJnHeeX4.js} +1 -1
- package/assets/{send-eip712-transaction-BnpCutKi.js → send-eip712-transaction-lGbfEAzA.js} +2 -2
- package/assets/send-gasless-transaction-GytT3EN0.js +2 -0
- package/assets/{send-transaction-BcThrsCr.js → send-transaction-wju-H3Cn.js} +2 -2
- package/assets/sendMetaTransaction-CiO3jI6F.js +1 -0
- package/assets/{sendRawTransaction-BJLeMhAd.js → sendRawTransaction-B7gRnaFv.js} +3 -3
- package/assets/{sentry-DYZXk5O5.js → sentry-DKBoGDXH.js} +1 -1
- package/assets/{serializeTransaction-BMgHZkKp.js → serializeTransaction-K8-WLWnl.js} +1 -1
- package/assets/{session-proposal-Ds2RY-CA.js → session-proposal-eLNEKDfD.js} +1 -1
- package/assets/{session-request-CLTybC5q.js → session-request-D0qpm2ew.js} +2 -2
- package/assets/{sha256-DM_yyL1v.js → sha256-BcAs0Y4r.js} +1 -1
- package/assets/{signing-Dr9d33yf.js → signing-gBX9gJ32.js} +3 -3
- package/assets/{socials-CaYP6kJa.js → socials-CD_j_07F.js} +1 -1
- package/assets/{swaps-BHrutsbS.js → swaps-Bzm1G8N4.js} +1 -1
- package/assets/{thirdweb-DIAnaqbp.js → thirdweb-DCMx7j1D.js} +3 -3
- package/assets/{to-serializable-transaction-DqNZm-Zy.js → to-serializable-transaction-BZAI7BsG.js} +2 -2
- package/assets/{totalSupply-DKYveUeg.js → totalSupply-BCBM6uY2.js} +1 -1
- package/assets/trade-encoding-2LKm-Goy.js +1 -0
- package/assets/{transaction-HL8b44XJ.js → transaction-Db6pntE5.js} +1 -1
- package/assets/{transactionReceipt-iA2axmC8.js → transactionReceipt-CRyPQK5a.js} +1 -1
- package/assets/{transactions-DAq9dNVo.js → transactions-I7lCf2CM.js} +1 -1
- package/assets/useCreditPacks-DYrmYjK5.js +1 -0
- package/assets/{useInfiniteGrid-Dh1-HUF4.js → useInfiniteGrid-CDzsfZBu.js} +1 -1
- package/assets/useManaRate-BEdT5IGm.js +1 -0
- package/assets/{useStore-DBh7zwbY.js → useStore-D1gCXOP_.js} +2 -2
- package/assets/{useTheme-ddXkiCRZ.js → useTheme-CUwz5NUH.js} +1 -1
- package/assets/useTheme-hvTZJoGa.js +1 -0
- package/assets/{utils-5mrprTVL.js → utils-DBnU1jhd.js} +1 -1
- package/assets/{verifyHash-C62BfpA_.js → verifyHash-DGsbtWAk.js} +1 -1
- package/assets/{w3m-modal-Bxbo8T_Z.js → w3m-modal-C4axQEqk.js} +1 -1
- package/assets/{w3m-modal-BT8yrl74.js → w3m-modal-DJ_LdfUD.js} +1 -1
- package/assets/{wait-for-tx-receipt-D_og-NhE.js → wait-for-tx-receipt-JPXzoKCu.js} +1 -1
- package/assets/{wallets-B72ZtlfA.js → wallets-CkR7yrP_.js} +5 -5
- package/assets/{web-connector-DBmok4eN.js → web-connector-HjRYE3VT.js} +3 -3
- package/assets/{writeContract-CLiFKioV.js → writeContract-DSPOgOMV.js} +1 -1
- package/assets/{zora-sepolia-Bef01XwU.js → zora-sepolia-Bwjy_6bk.js} +1 -1
- package/assets/{zoraTestnet-Bfnpd26p.js → zoraTestnet-2TguyOvD.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/assets/Assets-DqZw3BZv.js +0 -758
- package/assets/Authorizations-BxmoVEl_.js +0 -163
- package/assets/Cart-DA1J5Be_.js +0 -3
- package/assets/CollectionCarousel-B2cDWt_o.js +0 -1
- package/assets/ItemDetail-BiAHzfHh.css +0 -1
- package/assets/ItemDetail-DHaOvIrD.js +0 -78
- package/assets/MarketCheckout-BrvEzX8j.js +0 -3
- package/assets/MyPurchases-DLOdIHUA.js +0 -200
- package/assets/Success-DRMy6BRe.js +0 -4
- package/assets/TradeService-ZNznSjPX.js +0 -1
- package/assets/authorizations-QONJAQC4.js +0 -1
- package/assets/browser-ponyfill-vZOvKb_B.js +0 -1
- package/assets/buy-CE5I6jg2.js +0 -1
- package/assets/buy-gasless-DPcBjPtZ.js +0 -1
- package/assets/collection-Bm8Org8q.js +0 -1
- package/assets/decimals-BPDUTKfa.js +0 -1
- package/assets/estimate-l1-fee-J0AI4VGA.js +0 -1
- package/assets/eth_estimateGas-BeErQaun.js +0 -1
- package/assets/eth_getTransactionCount-kFIWL36y.js +0 -1
- package/assets/get-ecosystem-wallet-info-BRMexyn8.js +0 -1
- package/assets/getNFT-DrLPmHpk.js +0 -1
- package/assets/index-Bw9Y53F1.css +0 -1
- package/assets/index-CD_HpB6P.js +0 -1
- package/assets/index-DaOu_NHP.js +0 -289
- package/assets/mana-rate-BX_VjspN.js +0 -1
- package/assets/send-gasless-transaction-CGxm_r0E.js +0 -2
- package/assets/sendMetaTransaction-iOoE_Tw3.js +0 -1
- package/assets/trade-encoding-DqhxC9n7.js +0 -1
- package/assets/useCreditPacks-CV1PhThV.js +0 -1
- package/assets/useTheme--bd6Ub02.js +0 -1
|
@@ -0,0 +1,758 @@
|
|
|
1
|
+
import{u as Ze,r as p,j as e,b as Je}from"./react-C51i12iP.js";import{p as W,h as Xe,c as Ye,M as et,s,F as t,u as oe,a as tt,b as Ne,x as _e,v as nt,t as o,I as N,C as F,d as he,j as D,k as st,l as ot,m as Ae,G as rt,A as Q,ax as it,ay as at}from"./index-CGNquv7o.js";import{r as lt,m as ct,a as Pe}from"./mana-rate-BM11zYcS.js";import{u as Me}from"./useManaRate-BEdT5IGm.js";import{g as dt,h as ft,i as pt,j as ut,k as xt,C as ht,l as mt,o as gt,m as bt,n as yt,M as wt}from"./Assets.styles-DBA9HXW7.js";import{d as me,R as jt,F as vt,S as ge,b as $t}from"./categories-D0iwhqs_.js";import{L as Ct}from"./LoadMore-BjvEi3Wj.js";import{M as kt}from"./MarketCheckout-BB0_ss_n.js";import{u as St}from"./useInfiniteGrid-CDzsfZBu.js";import{E as Rt}from"./ErrorNotice-C7soUjRV.js";import{d as It}from"./dcl-schemas-BICTSpB5.js";import{u as Et,G as Tt,w as zt,S as Nt}from"./buy-gasless-Nfp6cMbQ.js";import{s as _t}from"./buy-Dszi8UeF.js";import{h as At}from"./trade-encoding-2LKm-Goy.js";import{f as Pt}from"./errors-DUo56sGG.js";import{J as Mt,C as Lt,B as se}from"./ethers-w5dOkonM.js";import{l as Bt}from"./loader-logo-BzY9EKdC.js";import{n as Ft}from"./emotion-CSxEP8yM.js";import"./sentry-DKBoGDXH.js";import"./intl-CBcMB1D2.js";import"./index-HN6Rk25C.js";import"./Tooltip-BZ57TVaP.js";import"./authorizations-D44lw00X.js";import"./sendMetaTransaction-CiO3jI6F.js";function Z(n){const r=n.source??"item",f=n.tradeId||`${n.contractAddress}-${n.tokenId??n.itemId??""}`;return`${r}:${f}`}const H="100000000000000000000",Le=2,V=15,Wt=/^[a-zA-Z0-9]+$/;function be(n){const r=n.trim();return r.length===0?{ok:!1,reason:"empty"}:Wt.test(r)?r.length<Le?{ok:!1,reason:"too-short"}:r.length>V?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Ht(n){return n.replace(/[^a-zA-Z0-9]/g,"").slice(0,V)}const Ot=["function available(string _subdomain) view returns (bool)"],ye={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Ut(){return W.chainId===It.ChainId.MATIC_MAINNET?ye.mainnet:ye.sepolia}async function Gt(n,r={}){var d;const{rpc:f,address:u}=Ut(),h=new Mt(f),l=new Lt(u,Ot,h);console.info(`[names] availability check → DCLRegistrar(${u}).available("${n}") on ${f}`);const c=await l.available(n);if((d=r.signal)!=null&&d.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${n}" available=${c}`),c?"available":"taken"}const qt="https://app.across.to/api";class Be extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function Dt(n){return ct(H,n)}async function Vt(n,r,f={}){var d;const u=f.chainId??W.chainId,h=f.provider??"across",l=`${W.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(r)}&chainId=${u}&provider=${h}`,c=await et(l,{method:"GET",identity:n,metadata:{}});if(!c.ok){let a;try{a=(d=await c.json())==null?void 0:d.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new Be:new Error(`fetchNameCreditRoute ${c.status}`)}return c.json()}function Kt(n,r){const f=se.from(n.availableAmount),h=se.from(H).sub(f);return{credits:[{value:n.amount,expiresAt:Number(n.expiresAt),salt:At(n.id)}],creditsSignatures:[n.signature],externalCall:{target:r.externalCall.target,selector:r.externalCall.selector,data:r.externalCall.data,expiresAt:r.externalCall.expiresAt,salt:r.externalCall.salt},customExternalCallSignature:r.customExternalCallSignature,maxUncreditedValue:h.isNegative()?"0":h.toString(),maxCreditedValue:H}}async function Qt(n,r={}){const f=qt,u=r.intervalMs??1e4,h=r.maxAttempts??60;let l={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let c=0;c<h;c++){try{const d=await fetch(`${f}/deposit/status?originChainId=137&depositTxHash=${n}`);if(d.ok){const a=await d.json(),x=(a.status??"pending").toLowerCase(),m=a.fillTx??a.fillTxnRef??null,w=a.actionsSucceeded!==!1;if(x==="filled")return{status:"filled",destinationTxHash:m,actionsSucceeded:w};if(x==="refunded"||x==="expired")return{status:x,destinationTxHash:null,actionsSucceeded:!1};l={status:"pending",destinationTxHash:m,actionsSucceeded:w}}}catch{}c<h-1&&await new Promise(d=>setTimeout(d,u))}return l}async function Zt(n){const{name:r,identity:f,signer:u}=n,h=n.chainId??W.chainId,l=n.provider??"across",c=(n.beneficiary??await u.getAddress()).toLowerCase();let d=null,a=!1;console.info("[names] register start",{name:r,buyer:c,chainId:h,provider:l});try{const x=await lt(h),m=Dt(x);console.info("[names] step 1/6 sized reservation",{usdCents:m,manaRate:x});const w=await Vt(f,r,{chainId:h,provider:l});console.info("[names] step 2/6 route fetched",{target:w.externalCall.target,selector:w.externalCall.selector,provider:w.provider,quoteId:w.quoteId});const v=await Xe(f,m);if(d=v.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:v.credit.id,maxCreditedValue:v.maxCreditedValue}),se.from(v.maxCreditedValue).lt(H))throw new Error("Credit under-sized for the name price");const k=Kt(v.credit,w);let g;try{g=await Et({chainId:h,buyer:c,signer:u,args:k})}catch(y){if(!(y instanceof Tt))throw y;g=await _t(h,k,u)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:g}),await zt(g),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:g}),l==="across"){const y=await Qt(g,n.acrossPoll);if(console.info("[names] step 6/6 across status",y),y.status==="pending")return{status:"pending",originTxHash:g};if(y.status!=="filled"||!y.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:g,destinationTxHash:y.destinationTxHash}}return{status:"pending",originTxHash:g}}catch(x){if(console.error("[names] register failed — raw error:",x,{name:r,buyer:c,originConfirmed:a}),x instanceof Nt)return{status:"pending",originTxHash:x.txHash};throw d&&!a&&await Ye(f,[d]).catch(()=>{}),x instanceof Be?x:new Error(Pt(x,"Couldn't register the name. Please try again.",{sale:!0}))}}const Jt=s.div`
|
|
2
|
+
position: fixed;
|
|
3
|
+
inset: 0;
|
|
4
|
+
z-index: 10000;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
padding: 16px;
|
|
9
|
+
background: rgba(22, 21, 24, 0.55);
|
|
10
|
+
`,Xt=s.div`
|
|
11
|
+
width: 560px;
|
|
12
|
+
max-width: 100%;
|
|
13
|
+
max-height: 92vh;
|
|
14
|
+
overflow-y: auto;
|
|
15
|
+
background: ${t.colors.white};
|
|
16
|
+
border-radius: 16px;
|
|
17
|
+
padding: 20px 24px 24px;
|
|
18
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
19
|
+
|
|
20
|
+
${t.media.down("mobile")} {
|
|
21
|
+
padding: 16px;
|
|
22
|
+
}
|
|
23
|
+
`,we=s.div`
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: flex-start;
|
|
26
|
+
justify-content: space-between;
|
|
27
|
+
gap: 12px;
|
|
28
|
+
`,je=s.h2`
|
|
29
|
+
margin: 0;
|
|
30
|
+
font-family: ${t.font.sans};
|
|
31
|
+
font-weight: 700;
|
|
32
|
+
font-size: 22px;
|
|
33
|
+
line-height: 1.2;
|
|
34
|
+
color: ${t.colors.text};
|
|
35
|
+
`,ve=s.button`
|
|
36
|
+
flex: none;
|
|
37
|
+
display: grid;
|
|
38
|
+
place-items: center;
|
|
39
|
+
width: 28px;
|
|
40
|
+
height: 28px;
|
|
41
|
+
border: 0;
|
|
42
|
+
background: none;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
color: ${t.colors.text};
|
|
45
|
+
|
|
46
|
+
.ico {
|
|
47
|
+
width: 18px;
|
|
48
|
+
height: 18px;
|
|
49
|
+
}
|
|
50
|
+
&:disabled {
|
|
51
|
+
opacity: 0.4;
|
|
52
|
+
cursor: default;
|
|
53
|
+
}
|
|
54
|
+
&:focus-visible {
|
|
55
|
+
outline: 2px solid ${t.colors.accent};
|
|
56
|
+
outline-offset: 2px;
|
|
57
|
+
}
|
|
58
|
+
`,$e=s.div`
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
gap: 6px;
|
|
62
|
+
margin-top: 4px;
|
|
63
|
+
font-family: ${t.font.sans};
|
|
64
|
+
font-size: 14px;
|
|
65
|
+
color: ${t.colors.text2};
|
|
66
|
+
|
|
67
|
+
.ico {
|
|
68
|
+
width: 16px;
|
|
69
|
+
height: 16px;
|
|
70
|
+
color: ${t.colors.brandViolet};
|
|
71
|
+
}
|
|
72
|
+
`,Ce=s.hr`
|
|
73
|
+
border: 0;
|
|
74
|
+
border-top: 1px solid ${t.colors.line};
|
|
75
|
+
margin: 16px 0;
|
|
76
|
+
`,ke=s.div`
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
gap: 16px;
|
|
80
|
+
`,Se=s.div`
|
|
81
|
+
flex: none;
|
|
82
|
+
display: grid;
|
|
83
|
+
place-items: center;
|
|
84
|
+
width: 56px;
|
|
85
|
+
height: 56px;
|
|
86
|
+
border-radius: 10px;
|
|
87
|
+
background: ${t.gradients.amethyst};
|
|
88
|
+
color: ${t.colors.white};
|
|
89
|
+
|
|
90
|
+
.ico {
|
|
91
|
+
width: 30px;
|
|
92
|
+
height: 30px;
|
|
93
|
+
}
|
|
94
|
+
`,Re=s.div`
|
|
95
|
+
flex: 1;
|
|
96
|
+
min-width: 0;
|
|
97
|
+
`,Ie=s.div`
|
|
98
|
+
font-family: ${t.font.sans};
|
|
99
|
+
font-weight: 700;
|
|
100
|
+
font-size: 20px;
|
|
101
|
+
line-height: 1.3;
|
|
102
|
+
color: ${t.colors.text};
|
|
103
|
+
overflow: hidden;
|
|
104
|
+
text-overflow: ellipsis;
|
|
105
|
+
white-space: nowrap;
|
|
106
|
+
|
|
107
|
+
span {
|
|
108
|
+
font-weight: 400;
|
|
109
|
+
color: ${t.colors.muted2};
|
|
110
|
+
}
|
|
111
|
+
`,Ee=s.div`
|
|
112
|
+
font-family: ${t.font.sans};
|
|
113
|
+
font-size: 14px;
|
|
114
|
+
color: ${t.colors.muted2};
|
|
115
|
+
`,Te=s.div`
|
|
116
|
+
flex: none;
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
gap: 6px;
|
|
120
|
+
font-family: ${t.font.sans};
|
|
121
|
+
font-weight: 600;
|
|
122
|
+
font-size: 24px;
|
|
123
|
+
color: ${t.colors.text};
|
|
124
|
+
|
|
125
|
+
.ico {
|
|
126
|
+
width: 22px;
|
|
127
|
+
height: 22px;
|
|
128
|
+
color: ${t.colors.brandViolet};
|
|
129
|
+
}
|
|
130
|
+
`,Yt=s.div`
|
|
131
|
+
margin-top: 16px;
|
|
132
|
+
padding: 16px;
|
|
133
|
+
border-radius: 12px;
|
|
134
|
+
background: #f2e7fc;
|
|
135
|
+
`,en=s.div`
|
|
136
|
+
font-family: ${t.font.sans};
|
|
137
|
+
font-weight: 700;
|
|
138
|
+
font-size: 16px;
|
|
139
|
+
color: ${t.colors.text};
|
|
140
|
+
`,tn=s.p`
|
|
141
|
+
margin: 8px 0 16px;
|
|
142
|
+
font-family: ${t.font.sans};
|
|
143
|
+
font-size: 14px;
|
|
144
|
+
line-height: 1.5;
|
|
145
|
+
color: ${t.colors.text2};
|
|
146
|
+
|
|
147
|
+
b {
|
|
148
|
+
font-weight: 700;
|
|
149
|
+
color: ${t.colors.brandViolet};
|
|
150
|
+
}
|
|
151
|
+
`,nn=s.label`
|
|
152
|
+
display: flex;
|
|
153
|
+
align-items: center;
|
|
154
|
+
gap: 8px;
|
|
155
|
+
padding: 12px 14px;
|
|
156
|
+
background: ${t.colors.white};
|
|
157
|
+
border: 1px solid ${t.colors.text};
|
|
158
|
+
border-radius: 10px;
|
|
159
|
+
cursor: text;
|
|
160
|
+
|
|
161
|
+
&:focus-within {
|
|
162
|
+
border-color: ${t.colors.magenta};
|
|
163
|
+
}
|
|
164
|
+
`,sn=s.span`
|
|
165
|
+
flex: none;
|
|
166
|
+
font-family: ${t.font.sans};
|
|
167
|
+
font-size: 18px;
|
|
168
|
+
color: ${t.colors.muted2};
|
|
169
|
+
`,on=s.input`
|
|
170
|
+
flex: 0 1 auto;
|
|
171
|
+
min-width: 0;
|
|
172
|
+
border: 0;
|
|
173
|
+
outline: none;
|
|
174
|
+
background: transparent;
|
|
175
|
+
font-family: ${t.font.sans};
|
|
176
|
+
font-size: 16px;
|
|
177
|
+
font-weight: 600;
|
|
178
|
+
color: ${t.colors.text};
|
|
179
|
+
|
|
180
|
+
&::placeholder {
|
|
181
|
+
color: #a09ba8;
|
|
182
|
+
font-weight: 400;
|
|
183
|
+
}
|
|
184
|
+
`,rn=s.span`
|
|
185
|
+
flex: none;
|
|
186
|
+
font-family: ${t.font.sans};
|
|
187
|
+
font-size: 16px;
|
|
188
|
+
color: ${t.colors.muted2};
|
|
189
|
+
`,ze=s.button`
|
|
190
|
+
margin-top: 16px;
|
|
191
|
+
width: 100%;
|
|
192
|
+
height: 52px;
|
|
193
|
+
border: 0;
|
|
194
|
+
border-radius: 12px;
|
|
195
|
+
cursor: pointer;
|
|
196
|
+
background: ${t.gradients.amethyst};
|
|
197
|
+
color: ${t.colors.softWhite};
|
|
198
|
+
font-family: ${t.font.sans};
|
|
199
|
+
font-weight: 600;
|
|
200
|
+
font-size: 15px;
|
|
201
|
+
letter-spacing: 0.46px;
|
|
202
|
+
text-transform: uppercase;
|
|
203
|
+
|
|
204
|
+
&:hover:not(:disabled) {
|
|
205
|
+
filter: brightness(1.06);
|
|
206
|
+
}
|
|
207
|
+
&:focus-visible {
|
|
208
|
+
outline: 2px solid ${t.colors.accent};
|
|
209
|
+
outline-offset: 2px;
|
|
210
|
+
}
|
|
211
|
+
&:disabled {
|
|
212
|
+
cursor: not-allowed;
|
|
213
|
+
background: #ddc7ec;
|
|
214
|
+
color: #f4ecfa;
|
|
215
|
+
}
|
|
216
|
+
`,an=s.div`
|
|
217
|
+
display: flex;
|
|
218
|
+
flex-direction: column;
|
|
219
|
+
align-items: flex-start;
|
|
220
|
+
gap: 20px;
|
|
221
|
+
padding: 32px 0 8px;
|
|
222
|
+
`,ln=s.img`
|
|
223
|
+
align-self: center;
|
|
224
|
+
width: 56px;
|
|
225
|
+
height: 56px;
|
|
226
|
+
`,cn=s.div`
|
|
227
|
+
font-family: ${t.font.sans};
|
|
228
|
+
font-weight: 700;
|
|
229
|
+
font-size: 18px;
|
|
230
|
+
color: ${t.colors.text};
|
|
231
|
+
`,dn=s.div`
|
|
232
|
+
display: flex;
|
|
233
|
+
align-items: center;
|
|
234
|
+
gap: 12px;
|
|
235
|
+
width: 100%;
|
|
236
|
+
`,fn=s.div`
|
|
237
|
+
flex: 1;
|
|
238
|
+
height: 8px;
|
|
239
|
+
border-radius: 999px;
|
|
240
|
+
background: ${t.colors.chip};
|
|
241
|
+
overflow: hidden;
|
|
242
|
+
|
|
243
|
+
span {
|
|
244
|
+
display: block;
|
|
245
|
+
height: 100%;
|
|
246
|
+
width: 40%;
|
|
247
|
+
border-radius: 999px;
|
|
248
|
+
background: ${t.gradients.amethyst};
|
|
249
|
+
animation: nameProgress 1.1s ease-in-out infinite;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
@keyframes nameProgress {
|
|
253
|
+
0% {
|
|
254
|
+
transform: translateX(-100%);
|
|
255
|
+
}
|
|
256
|
+
100% {
|
|
257
|
+
transform: translateX(320%);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
`,pn=s.span`
|
|
261
|
+
flex: none;
|
|
262
|
+
font-family: ${t.font.sans};
|
|
263
|
+
font-size: 14px;
|
|
264
|
+
color: ${t.colors.muted};
|
|
265
|
+
`,un=s.div`
|
|
266
|
+
display: flex;
|
|
267
|
+
flex-direction: column;
|
|
268
|
+
align-items: center;
|
|
269
|
+
gap: 16px;
|
|
270
|
+
padding: 24px;
|
|
271
|
+
border-radius: 12px;
|
|
272
|
+
background: #e2f5ea;
|
|
273
|
+
text-align: center;
|
|
274
|
+
`,xn=s.div`
|
|
275
|
+
display: grid;
|
|
276
|
+
place-items: center;
|
|
277
|
+
width: 56px;
|
|
278
|
+
height: 56px;
|
|
279
|
+
border-radius: 50%;
|
|
280
|
+
background: ${t.colors.ok};
|
|
281
|
+
color: ${t.colors.white};
|
|
282
|
+
|
|
283
|
+
.ico {
|
|
284
|
+
width: 30px;
|
|
285
|
+
height: 30px;
|
|
286
|
+
}
|
|
287
|
+
`,hn=s.p`
|
|
288
|
+
margin: 0;
|
|
289
|
+
font-family: ${t.font.sans};
|
|
290
|
+
font-size: 16px;
|
|
291
|
+
line-height: 1.4;
|
|
292
|
+
color: ${t.colors.text};
|
|
293
|
+
|
|
294
|
+
b {
|
|
295
|
+
font-weight: 700;
|
|
296
|
+
}
|
|
297
|
+
`,mn=s.div`
|
|
298
|
+
display: flex;
|
|
299
|
+
gap: 16px;
|
|
300
|
+
margin-top: 20px;
|
|
301
|
+
|
|
302
|
+
${t.media.down("mobile")} {
|
|
303
|
+
flex-direction: column;
|
|
304
|
+
}
|
|
305
|
+
`,gn=s.button`
|
|
306
|
+
flex: 1;
|
|
307
|
+
height: 48px;
|
|
308
|
+
border: 1px solid ${t.colors.accent};
|
|
309
|
+
border-radius: 8px;
|
|
310
|
+
background: ${t.colors.white};
|
|
311
|
+
color: ${t.colors.accent};
|
|
312
|
+
cursor: pointer;
|
|
313
|
+
font-family: ${t.font.sans};
|
|
314
|
+
font-weight: 600;
|
|
315
|
+
font-size: 13px;
|
|
316
|
+
letter-spacing: 0.46px;
|
|
317
|
+
text-transform: uppercase;
|
|
318
|
+
|
|
319
|
+
&:hover {
|
|
320
|
+
background: rgba(105, 31, 169, 0.06);
|
|
321
|
+
}
|
|
322
|
+
&:focus-visible {
|
|
323
|
+
outline: 2px solid ${t.colors.accent};
|
|
324
|
+
outline-offset: 2px;
|
|
325
|
+
}
|
|
326
|
+
`,bn=s.a`
|
|
327
|
+
flex: 1;
|
|
328
|
+
display: inline-flex;
|
|
329
|
+
align-items: center;
|
|
330
|
+
justify-content: center;
|
|
331
|
+
height: 48px;
|
|
332
|
+
border-radius: 8px;
|
|
333
|
+
background: ${t.colors.dclRed};
|
|
334
|
+
color: ${t.colors.softWhite};
|
|
335
|
+
cursor: pointer;
|
|
336
|
+
text-decoration: none;
|
|
337
|
+
font-family: ${t.font.sans};
|
|
338
|
+
font-weight: 600;
|
|
339
|
+
font-size: 13px;
|
|
340
|
+
letter-spacing: 0.46px;
|
|
341
|
+
text-transform: uppercase;
|
|
342
|
+
|
|
343
|
+
&:hover {
|
|
344
|
+
filter: brightness(1.05);
|
|
345
|
+
}
|
|
346
|
+
&:focus-visible {
|
|
347
|
+
outline: 2px solid ${t.colors.accent};
|
|
348
|
+
outline-offset: 2px;
|
|
349
|
+
}
|
|
350
|
+
`,yn=s.div`
|
|
351
|
+
display: flex;
|
|
352
|
+
align-items: flex-start;
|
|
353
|
+
gap: 12px;
|
|
354
|
+
padding: 16px;
|
|
355
|
+
margin-top: 8px;
|
|
356
|
+
border-radius: 12px;
|
|
357
|
+
background: rgba(255, 45, 85, 0.1);
|
|
358
|
+
font-family: ${t.font.sans};
|
|
359
|
+
font-size: 14px;
|
|
360
|
+
line-height: 1.5;
|
|
361
|
+
color: ${t.colors.text};
|
|
362
|
+
|
|
363
|
+
.ico {
|
|
364
|
+
width: 22px;
|
|
365
|
+
height: 22px;
|
|
366
|
+
flex: none;
|
|
367
|
+
color: ${t.colors.dclRed};
|
|
368
|
+
}
|
|
369
|
+
`;function wn({name:n,priceCredits:r,onClose:f}){const{session:u}=oe(),{data:h,isError:l}=tt(u),c=Ne(),d=Ze(),[a,x]=p.useState("confirm"),[m,w]=p.useState(""),[v,k]=p.useState(null),g=p.useRef(!1),y=m.trim().toLowerCase()===n.toLowerCase(),j=a==="completing",S=r!=null?_e(r):"—";p.useEffect(()=>{const b=T=>{T.key==="Escape"&&!j&&f()};document.addEventListener("keydown",b);const _=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",b),document.body.style.overflow=_}},[j,f]);async function C(){if(!(!u||!y||g.current)){g.current=!0,x("completing"),k(null);try{await Zt({name:n,identity:u.identity,signer:u.signer}),D("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:r??null}),c.invalidateQueries({queryKey:["usd-balance"]}),x("success")}catch(b){D(ot(b)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:st(b),purchase_type:"name"}),k((b==null?void 0:b.message)||o("names.errorGeneric")),x("error")}finally{g.current=!1}}}const I=a!=="success",R=nt(u==null?void 0:u.providerType);return e.jsx(Jt,{onClick:j?void 0:f,role:"presentation",children:e.jsxs(Xt,{role:"dialog","aria-modal":"true","aria-label":o("names.buyTitle"),onClick:b=>b.stopPropagation(),children:[I&&e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(je,{children:a==="error"?o("names.errorTitle"):o("names.buyTitle")}),e.jsx(ve,{onClick:f,disabled:j,"aria-label":o("buyModal.close"),children:e.jsx(N,{name:"close"})})]}),e.jsxs($e,{children:[o("names.myCreditsBalance")," ",e.jsx(F,{})," ",he(h,l)]}),e.jsx(Ce,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(ke,{children:[e.jsx(Se,{"aria-hidden":!0,children:"@"}),e.jsxs(Re,{children:[e.jsxs(Ie,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ee,{children:o("names.subtitle")})]}),e.jsxs(Te,{children:[e.jsx(F,{}),S]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(yn,{children:[e.jsx(N,{name:"info","aria-hidden":!0}),e.jsx("span",{children:v})]}),e.jsx(ze,{onClick:()=>x("confirm"),children:o("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Yt,{children:[e.jsx(en,{children:o("names.confirmTitle")}),e.jsx(tn,{dangerouslySetInnerHTML:{__html:o("names.confirmBody",{name:`<b>@${jn(n)}</b>`})}}),e.jsxs(nn,{children:[e.jsx(sn,{"aria-hidden":!0,children:"@"}),e.jsx(on,{value:m,onChange:b=>w(b.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":o("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(m.length,8)}ch`}}),e.jsx(rn,{children:".dcl.eth"})]})]}),e.jsx(ze,{onClick:()=>void C(),disabled:!y||!u,children:o("names.buyCta")})]})]}),a==="completing"&&e.jsxs(an,{children:[e.jsx(ln,{src:Bt,alt:"",width:56,height:56}),e.jsx(cn,{children:R?o("names.confirming"):o("names.completing")}),e.jsxs(dn,{children:[e.jsx(fn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(pn,{children:"1/1"})]})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(je,{children:o("names.successHeaderTitle")}),e.jsx(ve,{onClick:f,"aria-label":o("buyModal.close"),children:e.jsx(N,{name:"close"})})]}),e.jsxs($e,{children:[o("names.myCreditsBalance")," ",e.jsx(F,{})," ",he(h,l)]}),e.jsx(Ce,{}),e.jsxs(un,{children:[e.jsx(xn,{"aria-hidden":!0,children:e.jsx(N,{name:"check"})}),e.jsxs(hn,{children:[e.jsx("b",{children:o("names.successBannerBold")})," ",o("names.successBannerRest")]})]}),e.jsxs(ke,{style:{marginTop:20},children:[e.jsx(Se,{"aria-hidden":!0,children:"@"}),e.jsxs(Re,{children:[e.jsxs(Ie,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ee,{children:o("names.subtitle")})]}),e.jsxs(Te,{children:[e.jsx(F,{}),S]})]}),e.jsxs(mn,{children:[e.jsx(gn,{onClick:()=>{f(),d("/my-assets")},children:o("names.myItems")}),e.jsx(bn,{href:W.profileUrl,target:"_blank",rel:"noopener noreferrer",children:o("names.assignToAvatar")})]})]})]})})}function jn(n){return n.replace(/[&<>"']/g,r=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[r])}const vn=s.div`
|
|
370
|
+
width: 100%;
|
|
371
|
+
min-width: 0;
|
|
372
|
+
`,$n=s.nav`
|
|
373
|
+
display: flex;
|
|
374
|
+
align-items: center;
|
|
375
|
+
gap: 6px;
|
|
376
|
+
margin: 4px 0 16px;
|
|
377
|
+
font-family: ${t.font.sans};
|
|
378
|
+
font-size: 12px;
|
|
379
|
+
line-height: 1;
|
|
380
|
+
color: ${t.colors.muted};
|
|
381
|
+
`,Cn=s.button`
|
|
382
|
+
border: 0;
|
|
383
|
+
background: none;
|
|
384
|
+
padding: 0;
|
|
385
|
+
cursor: pointer;
|
|
386
|
+
font: inherit;
|
|
387
|
+
color: ${t.colors.muted};
|
|
388
|
+
|
|
389
|
+
&:hover {
|
|
390
|
+
text-decoration: underline;
|
|
391
|
+
}
|
|
392
|
+
&:focus-visible {
|
|
393
|
+
outline: 2px solid ${t.colors.accent};
|
|
394
|
+
outline-offset: 2px;
|
|
395
|
+
}
|
|
396
|
+
`,kn=s.span`
|
|
397
|
+
font-weight: 700;
|
|
398
|
+
color: ${t.colors.muted};
|
|
399
|
+
`,Sn=s.div`
|
|
400
|
+
display: flex;
|
|
401
|
+
flex-direction: column;
|
|
402
|
+
gap: 48px;
|
|
403
|
+
padding-bottom: 48px;
|
|
404
|
+
background: #ecdbfd;
|
|
405
|
+
border-radius: ${t.radius.banner};
|
|
406
|
+
overflow: hidden;
|
|
407
|
+
|
|
408
|
+
${t.media.down("mobile")} {
|
|
409
|
+
gap: 32px;
|
|
410
|
+
padding-bottom: 32px;
|
|
411
|
+
}
|
|
412
|
+
`,Rn=s.div`
|
|
413
|
+
position: relative;
|
|
414
|
+
border-radius: ${t.radius.banner};
|
|
415
|
+
overflow: hidden;
|
|
416
|
+
padding: 88px 48px;
|
|
417
|
+
display: flex;
|
|
418
|
+
flex-direction: column;
|
|
419
|
+
align-items: center;
|
|
420
|
+
gap: 48px;
|
|
421
|
+
text-align: center;
|
|
422
|
+
background: radial-gradient(120% 95% at 50% 118%, #d13bd6 0%, #a026b0 28%, #6a1b9c 58%, #4a1173 100%);
|
|
423
|
+
|
|
424
|
+
${t.media.down("mobile")} {
|
|
425
|
+
padding: 40px 20px;
|
|
426
|
+
gap: 28px;
|
|
427
|
+
}
|
|
428
|
+
`,In=s.div`
|
|
429
|
+
display: flex;
|
|
430
|
+
flex-direction: column;
|
|
431
|
+
align-items: center;
|
|
432
|
+
gap: 12px;
|
|
433
|
+
`,En=s.h1`
|
|
434
|
+
margin: 0;
|
|
435
|
+
font-family: ${t.font.sans};
|
|
436
|
+
font-weight: 600;
|
|
437
|
+
font-size: 40px;
|
|
438
|
+
line-height: 1.167;
|
|
439
|
+
color: ${t.colors.white};
|
|
440
|
+
|
|
441
|
+
${t.media.down("mobile")} {
|
|
442
|
+
font-size: 26px;
|
|
443
|
+
}
|
|
444
|
+
`,Tn=s.p`
|
|
445
|
+
margin: 0;
|
|
446
|
+
max-width: 760px;
|
|
447
|
+
font-family: ${t.font.sans};
|
|
448
|
+
font-weight: 500;
|
|
449
|
+
font-size: 24px;
|
|
450
|
+
line-height: 1.334;
|
|
451
|
+
color: #ecebed;
|
|
452
|
+
|
|
453
|
+
${t.media.down("mobile")} {
|
|
454
|
+
font-size: 16px;
|
|
455
|
+
}
|
|
456
|
+
`,zn=s.div`
|
|
457
|
+
width: min(785px, 100%);
|
|
458
|
+
display: flex;
|
|
459
|
+
flex-direction: column;
|
|
460
|
+
gap: 12px;
|
|
461
|
+
`,Nn=s.div`
|
|
462
|
+
position: relative;
|
|
463
|
+
`,_n=s("div",Ft("invalid"))`
|
|
464
|
+
display: flex;
|
|
465
|
+
align-items: center;
|
|
466
|
+
gap: 8px;
|
|
467
|
+
padding: 8px 8px 8px 16px;
|
|
468
|
+
background: ${t.colors.softWhite};
|
|
469
|
+
border: 1.5px solid ${({invalid:n})=>n?"#ff2d55":t.colors.line};
|
|
470
|
+
border-radius: 20px;
|
|
471
|
+
|
|
472
|
+
&:focus-within {
|
|
473
|
+
border-color: ${({invalid:n})=>n?"#ff2d55":t.colors.magenta};
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
${t.media.down("mobile")} {
|
|
477
|
+
border-radius: 16px;
|
|
478
|
+
}
|
|
479
|
+
`,An=s.span`
|
|
480
|
+
position: absolute;
|
|
481
|
+
left: -9999px;
|
|
482
|
+
top: 0;
|
|
483
|
+
visibility: hidden;
|
|
484
|
+
pointer-events: none;
|
|
485
|
+
white-space: pre;
|
|
486
|
+
font-family: ${t.font.sans};
|
|
487
|
+
font-size: 20px;
|
|
488
|
+
font-weight: 600;
|
|
489
|
+
line-height: 1.6;
|
|
490
|
+
|
|
491
|
+
${t.media.down("mobile")} {
|
|
492
|
+
font-size: 16px;
|
|
493
|
+
}
|
|
494
|
+
`,Pn=s.div`
|
|
495
|
+
position: absolute;
|
|
496
|
+
top: calc(100% + 8px);
|
|
497
|
+
left: 0;
|
|
498
|
+
right: 0;
|
|
499
|
+
z-index: 2;
|
|
500
|
+
display: flex;
|
|
501
|
+
align-items: center;
|
|
502
|
+
gap: 8px;
|
|
503
|
+
padding: 8px 12px;
|
|
504
|
+
border-radius: 8px;
|
|
505
|
+
background: #ffcdd4;
|
|
506
|
+
color: #ec303a;
|
|
507
|
+
font-family: ${t.font.sans};
|
|
508
|
+
font-size: 14px;
|
|
509
|
+
font-weight: 500;
|
|
510
|
+
line-height: 1.2;
|
|
511
|
+
text-align: left;
|
|
512
|
+
|
|
513
|
+
${t.media.down("mobile")} {
|
|
514
|
+
position: static;
|
|
515
|
+
margin-top: 8px;
|
|
516
|
+
align-items: flex-start;
|
|
517
|
+
flex-wrap: wrap;
|
|
518
|
+
}
|
|
519
|
+
`,Mn=s.a`
|
|
520
|
+
display: inline-flex;
|
|
521
|
+
align-items: center;
|
|
522
|
+
gap: 2px;
|
|
523
|
+
margin-left: auto;
|
|
524
|
+
color: #ec303a;
|
|
525
|
+
font-weight: 600;
|
|
526
|
+
text-decoration: underline;
|
|
527
|
+
text-transform: uppercase;
|
|
528
|
+
white-space: nowrap;
|
|
529
|
+
|
|
530
|
+
${t.media.down("mobile")} {
|
|
531
|
+
margin-left: 0;
|
|
532
|
+
}
|
|
533
|
+
`,Ln=s.label`
|
|
534
|
+
flex: 1;
|
|
535
|
+
min-width: 0;
|
|
536
|
+
display: flex;
|
|
537
|
+
align-items: center;
|
|
538
|
+
gap: 0;
|
|
539
|
+
cursor: text;
|
|
540
|
+
overflow: hidden;
|
|
541
|
+
`,Bn=s.span`
|
|
542
|
+
flex: none;
|
|
543
|
+
margin-right: 8px;
|
|
544
|
+
font-family: ${t.font.sans};
|
|
545
|
+
font-size: 26px;
|
|
546
|
+
font-weight: 500;
|
|
547
|
+
line-height: 1;
|
|
548
|
+
color: #a09ba8;
|
|
549
|
+
|
|
550
|
+
${t.media.down("mobile")} {
|
|
551
|
+
font-size: 20px;
|
|
552
|
+
}
|
|
553
|
+
`,Fn=s.input`
|
|
554
|
+
flex: 0 1 auto;
|
|
555
|
+
min-width: 0;
|
|
556
|
+
max-width: 100%;
|
|
557
|
+
border: 0;
|
|
558
|
+
outline: none;
|
|
559
|
+
background: transparent;
|
|
560
|
+
font-family: ${t.font.sans};
|
|
561
|
+
font-size: 20px;
|
|
562
|
+
font-weight: 600;
|
|
563
|
+
line-height: 1.6;
|
|
564
|
+
color: ${t.colors.text};
|
|
565
|
+
padding: 0;
|
|
566
|
+
|
|
567
|
+
&::placeholder {
|
|
568
|
+
color: #5e5b67;
|
|
569
|
+
font-weight: 400;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
${t.media.down("mobile")} {
|
|
573
|
+
font-size: 16px;
|
|
574
|
+
}
|
|
575
|
+
`,Wn=s.span`
|
|
576
|
+
flex: none;
|
|
577
|
+
margin-left: 2px;
|
|
578
|
+
font-family: ${t.font.sans};
|
|
579
|
+
font-size: 20px;
|
|
580
|
+
font-weight: 400;
|
|
581
|
+
line-height: 1.6;
|
|
582
|
+
color: #5e5b67;
|
|
583
|
+
|
|
584
|
+
${t.media.down("mobile")} {
|
|
585
|
+
font-size: 16px;
|
|
586
|
+
}
|
|
587
|
+
`,Hn=s.span`
|
|
588
|
+
flex: none;
|
|
589
|
+
font-family: ${t.font.sans};
|
|
590
|
+
font-size: 13px;
|
|
591
|
+
color: #a09ba8;
|
|
592
|
+
white-space: nowrap;
|
|
593
|
+
`,Fe=s.button`
|
|
594
|
+
flex: none;
|
|
595
|
+
display: inline-flex;
|
|
596
|
+
align-items: center;
|
|
597
|
+
justify-content: center;
|
|
598
|
+
gap: 8px;
|
|
599
|
+
height: 52px;
|
|
600
|
+
padding: 0 24px;
|
|
601
|
+
border: 0;
|
|
602
|
+
border-radius: 12px;
|
|
603
|
+
cursor: pointer;
|
|
604
|
+
background: ${t.gradients.cerise};
|
|
605
|
+
color: ${t.colors.softWhite};
|
|
606
|
+
font-family: ${t.font.sans};
|
|
607
|
+
font-weight: 600;
|
|
608
|
+
font-size: 15px;
|
|
609
|
+
letter-spacing: 0.46px;
|
|
610
|
+
line-height: 24px;
|
|
611
|
+
text-transform: uppercase;
|
|
612
|
+
|
|
613
|
+
&:hover:not(:disabled) {
|
|
614
|
+
filter: brightness(1.05);
|
|
615
|
+
}
|
|
616
|
+
&:focus-visible {
|
|
617
|
+
outline: 2px solid ${t.colors.white};
|
|
618
|
+
outline-offset: 2px;
|
|
619
|
+
}
|
|
620
|
+
&:disabled {
|
|
621
|
+
cursor: not-allowed;
|
|
622
|
+
background: #e7c8e9;
|
|
623
|
+
color: #fbe9fb;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
${t.media.down("mobile")} {
|
|
627
|
+
display: none;
|
|
628
|
+
}
|
|
629
|
+
`,On=s(Fe)`
|
|
630
|
+
display: none;
|
|
631
|
+
|
|
632
|
+
${t.media.down("mobile")} {
|
|
633
|
+
display: inline-flex;
|
|
634
|
+
width: 100%;
|
|
635
|
+
height: 48px;
|
|
636
|
+
border-radius: 12px;
|
|
637
|
+
}
|
|
638
|
+
`,Un=s.span`
|
|
639
|
+
display: inline-flex;
|
|
640
|
+
align-items: center;
|
|
641
|
+
gap: 4px;
|
|
642
|
+
font-weight: 600;
|
|
643
|
+
|
|
644
|
+
.ico {
|
|
645
|
+
width: 16px;
|
|
646
|
+
height: 16px;
|
|
647
|
+
}
|
|
648
|
+
`,J=s.div`
|
|
649
|
+
display: flex;
|
|
650
|
+
align-items: center;
|
|
651
|
+
gap: 8px;
|
|
652
|
+
padding: 8px 14px;
|
|
653
|
+
border-radius: 8px;
|
|
654
|
+
font-family: ${t.font.sans};
|
|
655
|
+
font-size: 13px;
|
|
656
|
+
font-weight: 500;
|
|
657
|
+
text-align: left;
|
|
658
|
+
|
|
659
|
+
background: ${({tone:n})=>n==="error"?"rgba(255, 45, 85, 0.12)":n==="ok"?"rgba(30, 166, 114, 0.14)":"rgba(255,255,255,0.14)"};
|
|
660
|
+
color: ${({tone:n})=>n==="error"?"#ff2d55":n==="ok"?"#0f7a4f":"#ecebed"};
|
|
661
|
+
|
|
662
|
+
.ico {
|
|
663
|
+
width: 16px;
|
|
664
|
+
height: 16px;
|
|
665
|
+
flex: none;
|
|
666
|
+
}
|
|
667
|
+
`,Gn=s.section`
|
|
668
|
+
display: flex;
|
|
669
|
+
flex-direction: column;
|
|
670
|
+
gap: 48px;
|
|
671
|
+
padding: 0 48px;
|
|
672
|
+
|
|
673
|
+
${t.media.down("mobile")} {
|
|
674
|
+
gap: 24px;
|
|
675
|
+
padding: 0 20px;
|
|
676
|
+
}
|
|
677
|
+
`,qn=s.h2`
|
|
678
|
+
margin: 0;
|
|
679
|
+
text-align: center;
|
|
680
|
+
font-family: ${t.font.sans};
|
|
681
|
+
font-weight: 600;
|
|
682
|
+
font-size: 32px;
|
|
683
|
+
line-height: 1.167;
|
|
684
|
+
color: ${t.colors.text2};
|
|
685
|
+
|
|
686
|
+
${t.media.down("mobile")} {
|
|
687
|
+
font-size: 22px;
|
|
688
|
+
}
|
|
689
|
+
`,Dn=s.div`
|
|
690
|
+
display: flex;
|
|
691
|
+
gap: 48px;
|
|
692
|
+
align-items: stretch;
|
|
693
|
+
|
|
694
|
+
${t.media.down("mobile")} {
|
|
695
|
+
flex-direction: column;
|
|
696
|
+
gap: 24px;
|
|
697
|
+
}
|
|
698
|
+
`,X=s.article`
|
|
699
|
+
flex: 1 0 0;
|
|
700
|
+
min-width: 0;
|
|
701
|
+
display: flex;
|
|
702
|
+
flex-direction: column;
|
|
703
|
+
height: 340px;
|
|
704
|
+
background: ${t.colors.white};
|
|
705
|
+
border: 0.25px solid ${t.colors.muted2};
|
|
706
|
+
border-radius: ${t.radius.card};
|
|
707
|
+
overflow: hidden;
|
|
708
|
+
`,Y=s.div`
|
|
709
|
+
flex: 1 0 0;
|
|
710
|
+
min-height: 0;
|
|
711
|
+
background: linear-gradient(135deg, #7a1fa2 0%, #c640cd 55%, #ff2d55 100%);
|
|
712
|
+
`,ee=s.div`
|
|
713
|
+
flex: none;
|
|
714
|
+
height: 96px;
|
|
715
|
+
display: flex;
|
|
716
|
+
flex-direction: column;
|
|
717
|
+
justify-content: space-between;
|
|
718
|
+
padding: 8px;
|
|
719
|
+
`,te=s.p`
|
|
720
|
+
margin: 0;
|
|
721
|
+
font-family: ${t.font.sans};
|
|
722
|
+
font-weight: 600;
|
|
723
|
+
font-size: 14px;
|
|
724
|
+
line-height: 1.57;
|
|
725
|
+
color: ${t.colors.text};
|
|
726
|
+
`,Vn=s.a`
|
|
727
|
+
display: inline-flex;
|
|
728
|
+
align-items: center;
|
|
729
|
+
gap: 4px;
|
|
730
|
+
font-family: ${t.font.sans};
|
|
731
|
+
font-weight: 500;
|
|
732
|
+
font-size: 14px;
|
|
733
|
+
line-height: 30px;
|
|
734
|
+
color: ${t.colors.accent};
|
|
735
|
+
text-decoration: underline;
|
|
736
|
+
|
|
737
|
+
.ico {
|
|
738
|
+
width: 13px;
|
|
739
|
+
height: 13px;
|
|
740
|
+
}
|
|
741
|
+
`,Kn=s.span`
|
|
742
|
+
font-family: ${t.font.sans};
|
|
743
|
+
font-weight: 500;
|
|
744
|
+
font-size: 14px;
|
|
745
|
+
line-height: 30px;
|
|
746
|
+
color: ${t.colors.accent};
|
|
747
|
+
text-decoration: underline;
|
|
748
|
+
`,Qn=s.span`
|
|
749
|
+
position: absolute;
|
|
750
|
+
width: 1px;
|
|
751
|
+
height: 1px;
|
|
752
|
+
padding: 0;
|
|
753
|
+
margin: -1px;
|
|
754
|
+
overflow: hidden;
|
|
755
|
+
clip: rect(0, 0, 0, 0);
|
|
756
|
+
white-space: nowrap;
|
|
757
|
+
border: 0;
|
|
758
|
+
`,Zn="https://docs.decentraland.org/creator/worlds/about/";function Jn(n){const r=typeof window<"u"?window.location.hostname:"";return`${r.endsWith("decentraland.org")?"https://decentraland.org":r.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(n)}`}function Xn({onBack:n}){Ae({title:o("seo.names.title"),description:o("seo.names.description")});const{session:r,signIn:f}=oe(),{data:u}=Me(),h=u?Pe(H,u):null,[l,c]=p.useState(""),[d,a]=p.useState("idle"),[x,m]=p.useState(!1),w=p.useRef(null),[v,k]=p.useState(void 0);p.useLayoutEffect(()=>{w.current&&k(w.current.offsetWidth)},[l]),p.useEffect(()=>{if(!be(l).ok){a(l.length===0?"idle":"invalid");return}a("checking");const I=new AbortController,R=setTimeout(()=>{(async()=>{try{const b=await Gt(l,{signal:I.signal});a(b)}catch(b){if((b==null?void 0:b.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(R),I.abort()}},[l]);const g=be(l),y=g.ok&&(d==="available"||d==="error");function j(){if(y){if(!r){f();return}m(!0)}}const S=e.jsxs(e.Fragment,{children:[o("names.claim"),h!=null?e.jsxs(Un,{children:[e.jsx(F,{}),_e(h)]}):null]});return e.jsxs(vn,{"data-testid":"names-page",children:[e.jsxs($n,{"aria-label":o("names.breadcrumbAria"),children:[e.jsx(Cn,{onClick:n,children:o("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(kn,{children:o("names.breadcrumbCurrent")})]}),e.jsxs(Sn,{children:[e.jsxs(Rn,{children:[e.jsxs(In,{children:[e.jsx(En,{children:o("names.heroTitle")}),e.jsx(Tn,{children:o("names.heroSubtitle")})]}),e.jsxs(zn,{children:[e.jsxs(Nn,{children:[e.jsxs(_n,{invalid:d==="taken",children:[e.jsxs(Ln,{children:[e.jsx(Bn,{"aria-hidden":!0,children:"@"}),e.jsx(Fn,{value:l,onChange:C=>c(Ht(C.target.value)),placeholder:o("names.inputPlaceholder"),"aria-label":o("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:V,style:{width:v!=null?`${v}px`:void 0}}),e.jsx(An,{ref:w,"aria-hidden":!0,children:l||o("names.inputPlaceholder")}),e.jsx(Wn,{children:o("names.suffix")})]}),l.length>0?e.jsxs(Hn,{"aria-hidden":!0,children:[l.length,"/",V]}):null,e.jsx(Fe,{onClick:j,disabled:!y,"data-testid":"names-claim",children:S})]}),d==="taken"?e.jsxs(Pn,{role:"status","data-testid":"names-taken",children:[e.jsx(N,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:o("names.taken")}),e.jsxs(Mn,{href:Jn(l),target:"_blank",rel:"noopener noreferrer",children:[o("names.takenMakeOffer"),e.jsx(N,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(On,{onClick:j,disabled:!y,children:S}),d==="checking"?e.jsx(J,{tone:"muted",role:"status","data-testid":"names-checking",children:o("names.checking")}):d==="error"?e.jsx(J,{tone:"muted",role:"status",children:o("names.checkError")}):d==="invalid"&&!g.ok&&g.reason==="too-short"?e.jsx(J,{tone:"muted",role:"status",children:o("names.tooShort",{min:Le})}):null,e.jsx(Qn,{role:"status","aria-live":"polite",children:d==="available"?o("names.available",{name:l}):""})]})]}),e.jsxs(Gn,{children:[e.jsx(qn,{children:o("names.whyTitle")}),e.jsxs(Dn,{children:[e.jsxs(X,{children:[e.jsx(Y,{"aria-hidden":!0}),e.jsx(ee,{children:e.jsx(te,{children:o("names.why1")})})]}),e.jsxs(X,{children:[e.jsx(Y,{"aria-hidden":!0}),e.jsxs(ee,{children:[e.jsx(te,{children:o("names.why2")}),e.jsxs(Vn,{href:Zn,target:"_blank",rel:"noopener noreferrer",children:[o("names.why2Link"),e.jsx(N,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(X,{children:[e.jsx(Y,{"aria-hidden":!0}),e.jsxs(ee,{children:[e.jsx(te,{children:o("names.why3")}),e.jsx(Kn,{children:o("names.why3Link")})]})]})]})]})]}),x?e.jsx(wn,{name:l,priceCredits:h,onClose:()=>m(!1)}):null]})}const ne=48;function Yn(n){return{tradeId:n.tradeId??n.id,listingType:"primary",contractAddress:n.contractAddress,itemId:n.itemId??"",name:n.name,thumbnail:n.thumbnail,rarity:n.rarity,category:n.category,wearableCategory:n.wearableCategory??null,creator:n.creator,manaWei:n.manaWei??"0",available:1,network:n.network,chainId:n.chainId,createdAt:0}}function Cs(){const[n]=Je(),r=(n.get("q")??"").trim().toLowerCase(),f=Ne(),{session:u,signIn:h}=oe(),l=(n.get("q")??"").trim();Ae({title:l?o("seo.collectibles.searchTitle",{query:l}):o("seo.collectibles.title"),description:o("seo.collectibles.description")});const[c,d]=p.useState("wearable"),[a,x]=p.useState(null),[m,w]=p.useState([]),[v,k]=p.useState(""),[g,y]=p.useState(""),[j,S]=p.useState("on_sale"),[C,I]=p.useState(!1),[R,b]=p.useState("newest"),[_,T]=p.useState(!1),[re,K]=p.useState(null);p.useEffect(()=>{if(!_)return;const i=B=>{B.key==="Escape"&&T(!1)};document.addEventListener("keydown",i);const $=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=$}},[_]);const O=j==="on_sale",A=v&&!Number.isNaN(Number(v))?Number(v):void 0,P=g&&!Number.isNaN(Number(g))?Number(g):void 0,ie=a?$t[a]:void 0,ae=(me.find(i=>i.key===R)??me[0]).server,le={category:c,rarities:m.length?m:void 0,wearableCategories:ie,minPriceCredits:A,maxPriceCredits:P,search:r||void 0,sortBy:ae,isSmart:C||void 0,onSale:!0},ce={category:c,rarities:m.length?m:void 0,wearableCategories:ie,search:r||void 0,sortBy:ae,isWearableSmart:C||void 0,isOnSale:j==="not_for_sale"?!1:void 0},{items:M,total:de,isLoading:E,isPlaceholderData:z,error:We,hasNextPage:He,isFetchingNextPage:fe,fetchNextPage:Oe}=St(O?["shop-items",le]:["catalog-items",ce],i=>O?it({...le,first:ne,skip:i}):at({...ce,first:ne,skip:i}),{enabled:c!=="names"}),U=de,Ue=E||z,Ge=E?15:Math.min(Math.max(M.length,1),ne),{data:G,isError:qe}=Me(),De=i=>G&&i.manaWei?Pe(i.manaWei,G):null,pe=p.useRef(null);p.useEffect(()=>{E||z||!r||pe.current===r||(pe.current=r,D("Shop Searched",{query:r,result_count:U}))},[r,E,z,U]);const q=p.useRef("__init__");p.useEffect(()=>{if(E||z)return;const i=JSON.stringify({category:c,subCategory:a,rarities:m,min:A,max:P,sort:R,status:j,smart:C});if(q.current==="__init__"||q.current===i){q.current=i;return}q.current=i,D("Shop Applied Filter",{filters:{category:c,sub_category:a,rarities:m,min_price_credits:A??null,max_price_credits:P??null,status:j,smart:C,sort:R},result_count:U})},[c,a,m,A,P,R,j,C,E,z,U]);function ue(i){d(i),x(null)}function xe(i){w($=>$.includes(i)?$.filter(B=>B!==i):[...$,i])}function Ve(){d("wearable"),x(null),w([]),k(""),y(""),S("on_sale"),I(!1)}function Ke(i){const $=M.find(B=>B.id===i.id);if(!(!$||$.source!=="legacy"||!$.manaWei)){if(!u){h();return}K(Yn($))}}function Qe(){f.invalidateQueries({queryKey:["shop-items"]})}const L=[];(A!=null||P!=null)&&L.push({key:"price",label:o("filter.price"),onRemove:()=>{k(""),y("")}});for(const i of jt)m.includes(i)&&L.push({key:`rarity-${i}`,label:rt(i),onRemove:()=>xe(i)});return C&&L.push({key:"smart",label:o("filter.smart"),onRemove:()=>I(!1)}),j!=="on_sale"&&L.push({key:"status",label:j==="all"?o("filter.statusAll"):o("filter.notForSale"),onRemove:()=>S("on_sale")}),e.jsxs(dt,{"data-testid":"browse",children:[c!=="names"&&e.jsxs(e.Fragment,{children:[_?e.jsx(ft,{onClick:()=>T(!1),"aria-hidden":!0}):null,e.jsxs(pt,{className:_?"is-open":"","data-testid":"browse-sidebar",children:[e.jsxs(ut,{children:[e.jsx(xt,{children:o("assets.filters")}),e.jsx(ht,{onClick:()=>T(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(mt,{children:e.jsx(gt,{category:c,subCategory:a,onCategory:ue,onSub:x,priceMin:v,priceMax:g,onPriceMin:k,onPriceMax:y,rarities:m,onToggleRarity:xe,status:j,onStatus:S,smart:C,onSmart:I})}),e.jsx(bt,{children:e.jsx(yt,{type:"button",onClick:()=>T(!1),children:o("assets.showItems")})})]})]}),e.jsx(wt,{children:c==="names"?e.jsx(Xn,{onBack:()=>ue("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(vt,{sort:R,onSort:b,total:de,loading:E||z,query:r,onOpenFilters:()=>T(!0),chips:L,onClearChips:Ve}),qe&&O&&M.some(i=>i.source==="legacy")?e.jsx("p",{className:"market-banner market-banner--warn",children:o("assets.marketUnavailable")}):null,We?e.jsx(Rt,{message:o("assets.loadError"),testId:"browse-error"}):null,e.jsx("div",{className:"grid","data-testid":"grid",children:Ue?e.jsx(ge,{count:Ge}):e.jsxs(e.Fragment,{children:[M.map(i=>{if(!O)return e.jsx(Q,{item:i,mode:"view"},Z(i));const $=i;return $.source==="legacy"?e.jsx(Q,{item:$,mode:"market",marketPriceCredits:De($),onBuyNow:Ke},Z(i)):e.jsx(Q,{item:i},Z(i))}),fe?e.jsx(ge,{count:6}):null]})}),e.jsx(Ct,{hasNextPage:He,isFetching:fe,onLoadMore:()=>void Oe()}),!E&&!z&&M.length===0?e.jsx("p",{className:"muted",children:o("assets.noItems")}):null]})}),re&&G?e.jsx(kt,{listing:re,rate:G,onClose:()=>K(null),onSold:()=>{K(null),Qe()}}):null]})}export{Cs as Assets};
|