@dcl/shop 1.13.1-35585926635.commit-02c8d2e → 1.13.1-35590455689.commit-b96d6aa
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-DoatD7MW.js → Activity-DtmObND1.js} +6 -6
- package/_assets/{AnimatedBackground-dVEk0PGp.js → AnimatedBackground-C7LiOBAR.js} +2 -2
- package/_assets/Assets-BKSeyg2-.js +990 -0
- package/_assets/Cart-BlPpGnda.js +748 -0
- package/_assets/{Collection-CPZhq7CU.js → Collection-CcSqRcWT.js} +10 -10
- package/_assets/CollectionCarousel-B94cetFe.js +322 -0
- package/_assets/{Confetti-Bd901H1c.js → Confetti-BsAs2ze-.js} +4 -4
- package/_assets/{ConstantsUtil-Bk0e9ERj.js → ConstantsUtil-C2D8mddi.js} +2 -2
- package/_assets/{ContentClient-CWtagBtE.js → ContentClient-CzFsgWm1.js} +2 -2
- package/_assets/{Creator-pBuqm0Cj.js → Creator-CJGUaWbh.js} +16 -16
- package/_assets/{CreditPackPicker-COb2KClL.js → CreditPackPicker-CsfuFEfj.js} +67 -67
- package/_assets/{DeploymentBuilder-Dg-EXfAY.js → DeploymentBuilder-C567uLsW.js} +2 -2
- package/_assets/{EmotePlaybackBar-DyYs6qdM.js → EmotePlaybackBar-v4_tU2B8.js} +19 -19
- package/_assets/{ErrorNotice-Cm0KaFyV.js → ErrorNotice-Bvb886Qo.js} +2 -2
- package/_assets/Event-Dw7dIeEd.js +72 -0
- package/_assets/{ExchangeController-BzBrR3ZT.js → ExchangeController-DosyxWhL.js} +2 -2
- package/_assets/{Faq-D2noxWN_.js → Faq-CfWixARb.js} +2 -2
- package/_assets/{Filters-Dw8HD8Ma.js → Filters-YViPs7N9.js} +9 -9
- package/_assets/{GetCredits-BmFWdIGx.js → GetCredits-xHj_8fdJ.js} +22 -27
- package/_assets/{Grow-BiGjBqEo.js → Grow-CTV7DbJ0.js} +2 -2
- package/_assets/{HelpersUtil-DQga4Ywl.js → HelpersUtil-CH7uwgeQ.js} +2 -2
- package/_assets/ItemDetail-CGP_a6DC.js +3411 -0
- package/_assets/{LoadMore-i7_riiE5.js → LoadMore-DtjdrYgG.js} +2 -2
- package/_assets/{ManaPricingBanner.styles-Dyx_YmBW.js → ManaPricingBanner.styles-DujCFxcW.js} +2 -2
- package/_assets/{MyAssets-Bs1a3OD9.js → MyAssets-B6TkqwwO.js} +8 -8
- package/_assets/{MyFavorites-C03JcdtN.js → MyFavorites-B44xn-9o.js} +3 -3
- package/_assets/{MyStore-ryCuwvDl.js → MyStore-BQ6gSMq1.js} +7 -7
- package/_assets/{NetworkUtil-BbMBxyRo.js → NetworkUtil-gznX6ou4.js} +2 -2
- package/_assets/{NotFound-DOO8Ql2w.js → NotFound-D7NlwWss.js} +2 -2
- package/_assets/{NotificationsBell-VR9lnc9P.js → NotificationsBell-wL661h4k.js} +13 -13
- package/_assets/{OutfitDetail-Co1A4WCO.js → OutfitDetail-CSiCaTR7.js} +2 -2
- package/_assets/OutfitPreview-CKul99pm.js +7 -0
- package/_assets/{OutfitStudio-DGibRraW.js → OutfitStudio-BFVYiWYq.js} +10 -10
- package/_assets/PaymentMethodStep-gIGuBdJE.js +370 -0
- package/_assets/{SaleCountdown-NdYuBnTu.js → SaleCountdown-2TjAtNVx.js} +2 -2
- package/_assets/{Spinner-B5rI43ql.js → Spinner-CRDfDFgI.js} +2 -2
- package/_assets/{StoreSettings-C2dwtV13.js → StoreSettings-CWiJDJd-.js} +9 -9
- package/_assets/{Success-B6gpri2D.js → Success-BKyyN-pm.js} +2 -2
- package/_assets/{SwapController-Di8HGSG3.js → SwapController-DCQKOdcz.js} +2 -2
- package/_assets/{Tooltip-Bj-rfWuS.js → Tooltip-DDZC_HFb.js} +2 -2
- package/_assets/{TradeService-D2dJeuos.js → TradeService-DfSf1NpN.js} +2 -2
- package/_assets/{W3MFrameProviderSingleton-DwbyBYX9.js → W3MFrameProviderSingleton-CrWP7H9X.js} +4 -4
- package/_assets/{WebCryptoP256-CZzgSMZW.js → WebCryptoP256-CLuRQdD0.js} +2 -2
- package/_assets/{basic-C0ccxPdk.js → basic-CnpinvSd.js} +2 -2
- package/_assets/{biconomy-DGsEEV8A.js → biconomy-CQS-_u1K.js} +2 -2
- package/_assets/{browseLayout.styles-Dg021Y7v.js → browseLayout.styles-DlEgobcb.js} +2 -2
- package/_assets/{browser-DfAY1k2K.js → browser-JmFfz-b9.js} +2 -2
- package/_assets/{browser-D3mkrR6N.js → browser-jrXp40VI.js} +2 -2
- package/_assets/{browser-ponyfill-C5RB02M7.js → browser-ponyfill-vVJjiRiF.js} +2 -2
- package/_assets/{buy-Da1E8jgj.js → buy-DNvl7CRU.js} +2 -2
- package/_assets/{buy-gasless-CaUM9sxG.js → buy-gasless-Cd8D2hco.js} +2 -2
- package/_assets/cart-checkout-BvFV5K1b.js +2 -0
- package/_assets/{categories-DeCaTWZU.js → categories-D2I9oC9p.js} +2 -2
- package/_assets/{ccip-CIKPg0_h.js → ccip-D8g0xR6M.js} +2 -2
- package/_assets/{ccip-CIPTk6YK.js → ccip-fv1rGl9l.js} +2 -2
- package/_assets/{chains-CWGwszpJ.js → chains-rk6oFk-J.js} +2 -2
- package/_assets/collectionPage.styles-CNsIHztj.js +41 -0
- package/_assets/{common-DamPx7zD.js → common-CMmghlP6.js} +2 -2
- package/_assets/{controller-J7h5zgkf.js → controller-l-w-81tc.js} +3 -3
- package/_assets/{core-BILweyMC.js → core-BphVSVDd.js} +5 -5
- package/_assets/{createSvgIcon-BOJMqAuj.js → createSvgIcon-Ci6-mKZX.js} +4 -4
- package/_assets/{crumbs.styles-6TXvIB5e.js → crumbs.styles-DhvCPMDb.js} +2 -2
- package/_assets/{custom-CtbaVsvz.js → custom-COOt78S6.js} +2 -2
- package/_assets/{data-capture-D_Yc-lFk.js → data-capture-C7thi-6U.js} +5 -5
- package/_assets/{dcl-schemas-Do6ePE9M.js → dcl-schemas-rAoTN5Ga.js} +2 -2
- package/_assets/{decimals-CPcEXrkP.js → decimals-Dl7Q2CQ8.js} +2 -2
- package/_assets/{decimals-fY1-YeOV.js → decimals-DvdfA0Vf.js} +2 -2
- package/_assets/{detectExtension-BzGhSQVN.js → detectExtension-CnrRv_RG.js} +2 -2
- package/_assets/{disposePreview-BhRqNFqz.js → disposePreview-ZbaLYmpw.js} +2 -2
- package/_assets/{email-CDJff6Le.js → email-eSYyd3Ic.js} +7 -7
- package/_assets/{embedded-wallet-OlJuY5Lb.js → embedded-wallet-DDuKB0SG.js} +2 -2
- package/_assets/{emotion-styled.browser.esm-dqXx08M6.js → emotion-styled.browser.esm-hf9E1adQ.js} +2 -2
- package/_assets/{engine-Cqgf8_-e.js → engine-DD67Y28C.js} +2 -2
- package/_assets/{errors-COVZQXFS.js → errors-YbnZlxOr.js} +2 -2
- package/_assets/{estimate-l1-fee-cwAe5Vqz.js → estimate-l1-fee-Db8Xd1Gz.js} +2 -2
- package/_assets/{eth_estimateGas-Bi2jA3d6.js → eth_estimateGas-CuREEErh.js} +2 -2
- package/_assets/{eth_getStorageAt-Drv0-oaq.js → eth_getStorageAt-DZSUCK-B.js} +2 -2
- package/_assets/{eth_getTransactionCount-u8vibbIm.js → eth_getTransactionCount-BdILqCdx.js} +2 -2
- package/_assets/{ethereum-Mtg8xwT8.js → ethereum-B-cyXRfV.js} +2 -2
- package/_assets/{ethers-DVrorjJ1.js → ethers-BicPoGF3.js} +2 -2
- package/_assets/{events-CcYNTdVN.js → events-CaiMQ2jo.js} +2 -2
- package/_assets/{execute-CoAxXj0W.js → execute-DY89Xj7h.js} +3 -3
- package/_assets/{extractIPFS-DlbP2Osb.js → extractIPFS-DPI0xl1R.js} +2 -2
- package/_assets/{features-DNE6dOZ4.js → features-CuKlQS4a.js} +2 -2
- package/_assets/{fetchTokenMetadata-CiNffAhl.js → fetchTokenMetadata-BxkvK3Bm.js} +3 -3
- package/_assets/{field.styles-Dsz8I5YB.js → field.styles-DMi6RLqU.js} +2 -2
- package/_assets/{fortmatic-B2QacKOL.js → fortmatic-O6xyCC9X.js} +2 -2
- package/_assets/{get-bytecode-DCxZ_TJS.js → get-bytecode-Mi4Svfmk.js} +2 -2
- package/_assets/{get-ecosystem-wallet-info-Dpf1xtjk.js → get-ecosystem-wallet-info-UP5lf6cZ.js} +2 -2
- package/_assets/{getBalance-DacQHsEf.js → getBalance-B6-tJ5BV.js} +3 -3
- package/_assets/{getInstalledModules-_KOhu2kj.js → getInstalledModules-BtUgUvpg.js} +2 -2
- package/_assets/{getNFT-TgQU4sPn.js → getNFT-BkPMs9B5.js} +3 -3
- package/_assets/{getNFT-DLLMJ-N8.js → getNFT-DATmUgAo.js} +2 -2
- package/_assets/{grid.styles-zbj0YrVx.js → grid.styles-D0ZoMAGk.js} +2 -2
- package/_assets/{hashTypedData-CxzAx589.js → hashTypedData-CefqN4UY.js} +2 -2
- package/_assets/{hashTypedData-C4V4k80v.js → hashTypedData-DN22sW92.js} +2 -2
- package/_assets/{import-p1kr6qLz.js → import-uY6UfPXb.js} +2 -2
- package/_assets/{in-app-niBzraeI.js → in-app-Bny7t-DP.js} +2 -2
- package/_assets/{in-app-wallet-calls-Dyorin4y.js → in-app-wallet-calls-DCQO7CRP.js} +2 -2
- package/_assets/{index-DeaVX3Ga.js → index--MHqQDZS.js} +2 -2
- package/_assets/{index-B39be1Q8.js → index-0GVDw4uz.js} +2 -2
- package/_assets/{index-BdTU9iVQ.js → index-6JqTwz5Z.js} +4 -4
- package/_assets/{index-CwA52DzI.js → index-7-ubf_-8.js} +2 -2
- package/_assets/{index-CpfmSBK0.js → index-72AbyZoi.js} +2 -2
- package/_assets/{index-CWJFyp1v.js → index-B-pxbYDD.js} +2 -2
- package/_assets/{index-I_W87dfE.js → index-B0ZDNOJc.js} +2 -2
- package/_assets/{index-BzKWq7pb.js → index-B5rvK7P3.js} +2 -2
- package/_assets/{index-BdhRH7ae.js → index-B5yRX3sO.js} +2 -2
- package/_assets/{index-DXmPq_Kc.js → index-B8Miitap.js} +2 -2
- package/_assets/{index-CKb-Chs7.js → index-BB2vaXmU.js} +2 -2
- package/_assets/{index-D05bb_h6.js → index-BJ_QYYzi.js} +2 -2
- package/_assets/{index-pibLOLKX.js → index-BNxapPjc.js} +2 -2
- package/_assets/{index-C-cdcYSu.js → index-BUq9yZ3w.js} +5 -5
- package/_assets/{index-Dpu-M2gs.js → index-BXZWbQLr.js} +2 -2
- package/_assets/{index-Cn-ULh1k.js → index-BXk1eKu5.js} +2 -2
- package/_assets/{index-DjQWTjO5.js → index-BYX4J5QP.js} +2 -2
- package/_assets/{index-BhPBG2XL.js → index-BdzxJpnV.js} +9 -9
- package/_assets/{index-BrTe5eTC.js → index-BvC4isNn.js} +2 -2
- package/_assets/{index-CxOzFLm7.js → index-Bwq-s3g2.js} +2 -2
- package/_assets/{index-Ddqdlsoi.js → index-BxmlkA7q.js} +2 -2
- package/_assets/{index-DUaZ1t6t.js → index-C1VNSD13.js} +2 -2
- package/_assets/{index-CWE_Bdvd.js → index-C30kKaUV.js} +2 -2
- package/_assets/{index-DpJ4zJ7r.js → index-CDzHP3jq.js} +2 -2
- package/_assets/{index-U6lik-J8.js → index-CFX2-tLC.js} +2 -2
- package/_assets/{index-Bpbs2w1c.js → index-CM1GTgwu.js} +2 -2
- package/_assets/{index-CWc56QrX.js → index-CO1HUlye.js} +2 -2
- package/_assets/{index-B1DNuJsS.js → index-CP4g0MYO.js} +2 -2
- package/_assets/{index-Cq-Etsdf.js → index-CW8iztAv.js} +2 -2
- package/_assets/{index-iRDDuzQN.js → index-CYNOPRoZ.js} +2 -2
- package/_assets/{index-CZmSHbVE.js → index-CakMQwPl.js} +2 -2
- package/_assets/{index-BEbVm5wA.js → index-CbayBN70.js} +2 -2
- package/_assets/{index-DrGWXFkr.js → index-CbiZcfm9.js} +2 -2
- package/_assets/{index-ChhJ84F9.js → index-Cg51zZ2k.js} +2 -2
- package/_assets/{index-sTnDYGsF.js → index-Crr-s_9f.js} +2 -2
- package/_assets/{index-BaeSw32D.js → index-Cz_NLjja.js} +3 -3
- package/_assets/{index-CfGsvFRR.js → index-D1s-_zWj.js} +2 -2
- package/_assets/{index-_AZXosO6.js → index-D5mE-BZf.js} +2 -2
- package/_assets/{index-gg05iP5j.js → index-DBXe-H17.js} +4 -4
- package/_assets/{index-BhSgZf6d.css → index-DKFaSnR3.css} +1 -1
- package/_assets/{index-CEbyUU5H.js → index-DKolBddb.js} +2 -2
- package/_assets/{index-CcTOkZrG.js → index-DLNZA_z3.js} +2 -2
- package/_assets/{index-D8M-5R_3.js → index-DVuOEZvs.js} +2 -2
- package/_assets/{index-B6iPDUS8.js → index-DXGd7b5m.js} +2 -2
- package/_assets/{index-CxNh07aM.js → index-DY5YerbM.js} +3 -3
- package/_assets/{index-D8olnnil.js → index-DY6MimDO.js} +2 -2
- package/_assets/{index-D_SCQhiC.js → index-D_GN8H-m.js} +2 -2
- package/_assets/{index-CwoMLrsB.js → index-Dck2NPjx.js} +2 -2
- package/_assets/{index-BC9VPSaU.js → index-Dk93Si47.js} +2 -2
- package/_assets/{index-DzWgqsYH.js → index-Dm2tHUTz.js} +2 -2
- package/_assets/{index-rsyTCpy-.js → index-Dmr0-dT1.js} +2 -2
- package/_assets/{index-Dyy6WQp0.js → index-DtG0vwAQ.js} +5 -5
- package/_assets/{index-CRlpbq5e.js → index-DvmOwVBr.js} +2 -2
- package/_assets/{index-MqPRfHS_.js → index-HpMk4su8.js} +4 -4
- package/_assets/{index-CD44EXbq.js → index-MB1YeHVs.js} +2 -2
- package/_assets/{index-DDb_ETfE.js → index-Nax2ER2m.js} +2 -2
- package/_assets/{index-y9tZLe7Z.js → index-PCOMQSTj.js} +14 -14
- package/_assets/{index-CZEd2SGy.js → index-PdWok5k8.js} +3 -3
- package/_assets/{index-Ccey0v_W.js → index-TLvmnU-6.js} +2 -2
- package/_assets/{index-Csp5LciJ.js → index-Vx6QrhKv.js} +2 -2
- package/_assets/{index-CEVRFChv.js → index-_CzitlLr.js} +2 -2
- package/_assets/{index-DLcPHJzx.js → index-fKOqL46i.js} +2 -2
- package/_assets/{index-WiX7N7NB.js → index-gLJ8elkH.js} +2 -2
- package/_assets/{index-BgrkbkKX.js → index-oZ1tZhJd.js} +3 -3
- package/_assets/{index-BW2_mJUZ.js → index-os35Oj8Y.js} +3 -3
- package/_assets/{index-PmcUrVFZ.js → index-tJJoQndL.js} +2 -2
- package/_assets/{index-B1-eV0Yy.js → index-ujlY03pm.js} +2 -2
- package/_assets/{index-C9RSadCu.js → index-xFEDZfFw.js} +2 -2
- package/_assets/{index.es-CWkiohwA.js → index.es-BA-gf3fx.js} +2 -2
- package/_assets/{index.es-CPftFMVM.js → index.es-DXZDtwqn.js} +2 -2
- package/_assets/{index.es-BZZFX7UO.js → index.es-naJ1lYo9.js} +2 -2
- package/_assets/{index.es-p9GOzpcM.js → index.es-ug1d0j5_.js} +5 -5
- package/_assets/{items-empty-D3SdcrUb.js → items-empty-DQe16EqO.js} +2 -2
- package/_assets/{jump-BLEV_WoY.js → jump-CDi48t17.js} +2 -2
- package/_assets/{linkAccount-DAFP48le.js → linkAccount-D2r-_PNt.js} +2 -2
- package/_assets/{localBatchGatewayRequest-dB8Wq4kD.js → localBatchGatewayRequest-DCZrRD0b.js} +2 -2
- package/_assets/{modal.styles-C5SxmNLg.js → modal.styles-B9NcZpH1.js} +2 -2
- package/_assets/{native-CBQhq49N.js → native-CsJDQkEo.js} +2 -2
- package/_assets/{networks-8H1PRpMW.js → networks-H2-ip_xr.js} +2 -2
- package/_assets/{onramp-J5H4ebWV.js → onramp-jMWRpk_W.js} +2 -2
- package/_assets/{openzeppelin-D4p4dWkw.js → openzeppelin-CNtXocND.js} +2 -2
- package/_assets/{ownerOf-6NPphff8.js → ownerOf-D2gp3JZq.js} +2 -2
- package/_assets/{parseNft-CNeONFsP.js → parseNft-Cj0GHmVO.js} +3 -3
- package/_assets/{parseSignature-RdZmR6vg.js → parseSignature-Cr-6xEFY.js} +4 -4
- package/_assets/{parseSignature-CRChMV-U.js → parseSignature-DqjVaLFW.js} +2 -2
- package/_assets/{passkeys-asZ3JuTk.js → passkeys-ZTPY9Io2.js} +2 -2
- package/_assets/{pay-with-exchange-Cv_5xsJB.js → pay-with-exchange-DFmrgXeW.js} +2 -2
- package/_assets/{prepare-contract-call-Bgba2npe.js → prepare-contract-call-BXj1hstj.js} +2 -2
- package/_assets/{qr-overlay-DkizM6BP.js → qr-overlay-BaiwMdsM.js} +4 -4
- package/_assets/{react-ZT2P9-hV.js → react-BQkTEhfI.js} +2 -2
- package/_assets/{receive-CawQ-n3T.js → receive-C-lo_prs.js} +2 -2
- package/_assets/{resolveImplementation-BVnQ0KdI.js → resolveImplementation-CmaftYpU.js} +2 -2
- package/_assets/{resume-buy-VqFhR9e8.js → resume-buy-CVhyi-L1.js} +2 -2
- package/_assets/{resume-name-CTz059A2.js → resume-name-DUz5x9Rs.js} +2 -2
- package/_assets/{rpc-BJ7rd6au.js → rpc-B61gfFSf.js} +2 -2
- package/_assets/{sales-empty-l9JLZ5D0.js → sales-empty-B211ygk7.js} +2 -2
- package/_assets/{search-empty-CkXuQVln.js → search-empty-D4s8B_tZ.js} +2 -2
- package/_assets/{secp256k1-BaU6Nn5x.js → secp256k1-Bd-eUAzZ.js} +2 -2
- package/_assets/{secp256k1-BGQ_Uqpo.js → secp256k1-DV0o92mg.js} +2 -2
- package/_assets/{secp256k1-Bu5sn1ZV.js → secp256k1-iVBXtOip.js} +2 -2
- package/_assets/{send-DONjIfwF.js → send-DxdkG-xE.js} +2 -2
- package/_assets/{send-batch-transaction-C_JYVBkw.js → send-batch-transaction-CxU4nO-t.js} +2 -2
- package/_assets/{send-eip712-transaction-Clelg5Q-.js → send-eip712-transaction-DFcFblDh.js} +3 -3
- package/_assets/{send-gasless-transaction-DNc4O0S0.js → send-gasless-transaction-8mkyEx1n.js} +3 -3
- package/_assets/send-transaction-5bX-xy_o.js +3 -0
- package/_assets/sendMetaTransaction-C0dwdljX.js +2 -0
- package/_assets/{sendRawTransaction-BM57FQWh.js → sendRawTransaction-Z6tsEgH4.js} +4 -4
- package/_assets/{sentry-qVQnooqM.js → sentry-DEsWWpBW.js} +3 -3
- package/_assets/{serializeTransaction-FdLqYQ-w.js → serializeTransaction-97Bat4Ro.js} +2 -2
- package/_assets/{session-proposal-CAm5TVJB.js → session-proposal-BFyOx5ep.js} +2 -2
- package/_assets/{session-request-C8xtyN3L.js → session-request-B-ZDEBIl.js} +3 -3
- package/_assets/{sha256-CcM85_-b.js → sha256-CFlr28b8.js} +2 -2
- package/_assets/sha3-VyXLimeE.js +2 -0
- package/_assets/signin-empty-3JhXhx04.js +2 -0
- package/_assets/{signing-FPVJ2eSa.js → signing-CaEAGDvd.js} +4 -4
- package/_assets/{skeleton.styles-DTLcQB9A.js → skeleton.styles-CP5AXi51.js} +2 -2
- package/_assets/{socials-BHL-s99I.js → socials-BAatCjg9.js} +2 -2
- package/_assets/{styled-BOKv7XKm.js → styled-Ciz7uJTf.js} +3 -3
- package/_assets/{swaps-DDuyuFV1.js → swaps-Duk8fCsv.js} +2 -2
- package/_assets/{thirdweb-N4oYmhTQ.js → thirdweb-Cvgkcum1.js} +4 -4
- package/_assets/{to-serializable-transaction-DZXV0RS9.js → to-serializable-transaction-BQmkdzOC.js} +3 -3
- package/_assets/{totalSupply-DnoXRYZk.js → totalSupply-DWGbPH_3.js} +2 -2
- package/_assets/{trade-encoding-JnGsRcov.js → trade-encoding-7I6Mahyk.js} +2 -2
- package/_assets/{transaction-D82LqpKn.js → transaction-C6zqrRsP.js} +2 -2
- package/_assets/{transactionReceipt-DEqK-l-5.js → transactionReceipt-wHhvs2MM.js} +2 -2
- package/_assets/{transactions-1TYNoevC.js → transactions-CWlJM2Ik.js} +2 -2
- package/_assets/{useCreatorSales-oruupPPN.js → useCreatorSales-B_z9WK8w.js} +2 -2
- package/_assets/useInfiniteGrid-B28HAmqv.js +2 -0
- package/_assets/{useStore-CGFjD1j7.js → useStore-BH311mqp.js} +3 -3
- package/_assets/{useTheme-J18Pg7gw.js → useTheme-CnRNEYQX.js} +2 -2
- package/_assets/{utils-BE7z1_FY.js → utils-Dpy_P8-Z.js} +2 -2
- package/_assets/{verifyHash-Buuby46g.js → verifyHash-CNHX3bhf.js} +2 -2
- package/_assets/{w3m-modal-DhWirtG8.js → w3m-modal-BfLNfzQm.js} +2 -2
- package/_assets/{w3m-modal-BU-cBw0Z.js → w3m-modal-Cd0pP9Y6.js} +2 -2
- package/_assets/{wait-for-tx-receipt-CG08f_bj.js → wait-for-tx-receipt-CCoeTvDN.js} +2 -2
- package/_assets/{wallets-CMB2i32E.js → wallets-DBEimxdS.js} +6 -6
- package/_assets/{web-connector-BPh_N46m.js → web-connector-CFETM0Ek.js} +4 -4
- package/_assets/{writeContract-BcpztdZJ.js → writeContract-xYjTt9Gm.js} +2 -2
- package/_assets/{zora-sepolia-arxykf8i.js → zora-sepolia-CmFkNSlJ.js} +2 -2
- package/_assets/{zoraTestnet-DL2ClkoW.js → zoraTestnet-D9iiG-Zu.js} +2 -2
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Assets-CN1LU5Xt.js +0 -980
- package/_assets/Cart-Bwf6I0xV.js +0 -748
- package/_assets/CollectionCarousel-CrMGuIJ3.js +0 -322
- package/_assets/Event-C9d1J0Kb.js +0 -72
- package/_assets/ItemDetail-BSwm3WSx.js +0 -3779
- package/_assets/OutfitPreview-Ceha9IWa.js +0 -7
- package/_assets/cart-checkout-uu8usx3x.js +0 -2
- package/_assets/collectionPage.styles-DOzyhn9M.js +0 -41
- package/_assets/send-transaction-pFbo31gg.js +0 -3
- package/_assets/sendMetaTransaction-BcKatlZr.js +0 -2
- package/_assets/sha3-FAYNGyBi.js +0 -2
- package/_assets/signin-empty-UN_rVDWL.js +0 -2
- package/_assets/useInfiniteGrid-56c_34kP.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,L as W,e as re,j as e}from"./react-
|
|
1
|
+
import{r as u,L as W,e as re,j as e}from"./react-BQkTEhfI.js";import{a3 as H,w as U,a4 as le,a5 as de,a6 as ce,a7 as he,a as pe,s as i,I as L,a8 as ue,a9 as me,H as F,aa as xe,x as V,ab as ge,B as fe,t as n,ac as G,ad as N,ae as be,af as ye,ag as ve,ah as je,O as we,ai as $e,aj as ke,ak as Ie,al as Ce,am as Ee,an as ze,ao as Le,ap as Fe,aq as We,ar as Se,z as A,as as O,at as Ae,au as Oe,av as Te,aw as Pe,ax as Re,ay as Ne}from"./index-PCOMQSTj.js";import{d as B}from"./dcl-schemas-rAoTN5Ga.js";import{E as Q}from"./ErrorNotice-Bvb886Qo.js";import{E as Be}from"./EmotePlaybackBar-v4_tU2B8.js";import{O as Me}from"./OutfitPreview-CKul99pm.js";import{c as _e}from"./crumbs.styles-DhvCPMDb.js";import"./sentry-DEsWWpBW.js";import"./ethers-BicPoGF3.js";import"./intl-AKLEHPeO.js";import"./disposePreview-ZbaLYmpw.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="c31a5b53-252d-42c9-84e7-6dbe6dc14d39",t._sentryDebugIdIdentifier="sentry-dbid-c31a5b53-252d-42c9-84e7-6dbe6dc14d39")}catch{}})();function qe({address:t,outfitUrns:s,enabled:l=!0}){var b;const{data:r,isFetched:d}=H(t),m=((b=r==null?void 0:r.avatar)==null?void 0:b.wearables)??[],x=!!t&&!!r,p=m.join(","),c=l&&x&&m.length>0,{data:y,isLoading:v,isFetched:j}=U({queryKey:["wearable-rules",p],enabled:c,staleTime:30*6e4,retry:!1,queryFn:()=>he(m)}),k=s.join(",");return u.useMemo(()=>{const I=!!t&&!d||v||c&&!j;return x?{profile:"default",bodyShape:ce(r)??void 0,urns:[...de(y??[]),...s],...le(r),isLoading:I}:{profile:"default",urns:s,isLoading:I}},[t,x,r,d,y,v,j,c,k])}const{colors:o,radius:$,media:h,gradients:De}=pe,J=i.div`
|
|
2
2
|
max-width: 1721px;
|
|
3
3
|
margin: 0 auto;
|
|
4
4
|
/* The page's bottom padding is 56px, but the phone CTA bar is sticky and has its own bottom padding for the safe area.
|
|
@@ -366,4 +366,4 @@ import{r as u,L as W,e as re,j as e}from"./react-ZT2P9-hV.js";import{a1 as H,w a
|
|
|
366
366
|
margin: 0;
|
|
367
367
|
color: ${o.gray4};
|
|
368
368
|
`,K="outfit-detail-preview";function Lt(){const{id:t}=re(),s=V(c=>c.session),l=ge(),r=l==="creator",{data:d,isError:m,refetch:x}=U({queryKey:["outfit",t,r],enabled:N()&&!!t,staleTime:6e4,queryFn:()=>Ne(t,r&&s?s.identity:void 0)}),p=!N()||!t||d===null&&l!=="pending";return fe(p?{title:n("seo.outfit.notFoundTitle"),noindex:!0}:d?{title:d.name,image:G(d.thumbnailHash)??void 0}:{}),p?e.jsxs(D,{"data-testid":"outfit-notfound",children:[e.jsx(pt,{name:"cart",size:44}),e.jsx(ut,{children:n("outfits.detail.notFoundTitle")}),e.jsx(mt,{children:n("outfits.detail.notFoundBody")}),e.jsx(F,{as:W,to:"/items",variant:"purple",children:n("notFound.cta")})]}):m?e.jsxs(D,{"data-testid":"outfit-detail-error",children:[e.jsx(Q,{message:n("outfits.errors.generic")}),e.jsx(F,{variant:"purple",onClick:()=>void x(),children:n("outfits.detail.retry")})]}):d?e.jsx(gt,{outfit:d}):e.jsx(J,{"aria-busy":"true","data-testid":"outfit-detail-loading",children:e.jsxs(X,{children:[e.jsx(Y,{children:e.jsx("span",{className:"skeleton",style:{position:"absolute",inset:0},"aria-hidden":!0})}),e.jsxs(Z,{children:[e.jsx("span",{className:"skeleton",style:{width:"60%",height:32},"aria-hidden":!0}),e.jsx("span",{className:"skeleton",style:{width:"40%",height:16},"aria-hidden":!0}),e.jsx("span",{className:"skeleton",style:{width:"100%",height:48},"aria-hidden":!0})]})]})})}function xt({item:t}){const s=Ae(t),l=Oe(t.gender);return e.jsxs(at,{children:[t.rarity?e.jsx(z,{"data-variant":"rarity",style:{background:Re(t.rarity)},title:Pe(t.rarity),children:Te(t.rarity)}):null,t.isSmart?e.jsxs(z,{"data-variant":"smart",children:[e.jsx(L,{name:"smart",size:13}),n("assetCard.smart")]}):null,s?e.jsx(z,{"data-variant":"icon",children:e.jsx(L,{name:s})}):null,l?e.jsx(z,{"data-variant":"icon",children:e.jsx(L,{name:l})}):null]})}function gt({outfit:t}){const s=be(t),{split:l,availableCount:r,totalCredits:d,outfitCredits:m,addOutfit:x,isAdding:p}=ye(t,s),c=V(a=>{var w;return(w=a.session)==null?void 0:w.address}),y=ve(a=>a.items),v=u.useMemo(()=>new Set(y.map(je)),[y]),j=G(t.thumbnailHash),k=u.useRef(null);u.useEffect(()=>{k.current!==t.id&&(k.current=t.id,we("Shop Outfit Viewed",{outfit_id:t.id,item_count:t.items.length}))},[t.id,t.items.length]);const b=u.useMemo(()=>t.items.map(a=>{const w=$e(a),S=s.byKey.get(w)??null;return{key:w,item:S,state:S?ke(S,{address:c,cartKeys:v}):"missing"}}),[t,s.byKey,c,v]),{isFetched:I}=H(c),ee=!c||I,te=t.bodyShape==="female"?Ie:t.bodyShape==="male"?Ce:void 0,g=u.useMemo(()=>b.map(a=>a.item).filter(a=>!!a),[b]),P=u.useMemo(()=>Ee(g),[g]),ie=u.useMemo(()=>ze(g),[g]),R=u.useMemo(()=>{const a=Le(g);return a?Fe(a):null},[g]),ae=R??B.PreviewEmote.FASHION,se=!!R,f=qe({address:c,outfitUrns:P}),ne=t.items.length,oe=!s.isLoading&&!s.isError,C=l.purchasable.length;return e.jsxs(J,{"data-testid":"outfit-detail",children:[e.jsxs(Ke,{"aria-label":n("outfits.detail.breadcrumbAria"),children:[e.jsx(M,{to:"/overview",children:n("nav.overview")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(M,{to:"/overview",children:n("outfits.detail.breadcrumbLooks")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(He,{children:t.name})]}),e.jsxs(X,{children:[e.jsx(Y,{"data-testid":"outfit-detail-preview",style:{background:We(t)},children:j&&!s.isLoading&&P.length===0?e.jsx(Ue,{src:j,alt:t.name}):e.jsx(Me,{id:K,profile:f.profile,bodyShape:ie??f.bodyShape??te,urns:f.urns,emote:ae,unityMode:B.PreviewUnityMode.BUILDER,skin:f.skin,hair:f.hair,eyes:f.eyes,enabled:ee&&!f.isLoading&&!s.isLoading,controls:se?e.jsx(Be,{previewId:K,testId:"outfit-emote-controls"}):null})}),e.jsxs(Z,{children:[e.jsx(Ve,{children:t.name}),e.jsx(Ge,{"data-testid":"outfit-detail-meta",children:n("outfits.detail.itemsCount",{count:ne})}),s.isError?e.jsxs(nt,{children:[e.jsx(Q,{message:n("outfits.detail.resolveError"),testId:"outfit-detail-resolve-error"}),e.jsx(F,{variant:"outline","data-testid":"outfit-detail-retry",onClick:s.retry,children:n("outfits.detail.retry")})]}):e.jsxs(e.Fragment,{children:[e.jsx(Qe,{children:e.jsx(Je,{children:b.map(a=>e.jsx(Xe,{"data-testid":"outfit-detail-item","data-state":a.state,children:a.item?e.jsxs(e.Fragment,{children:[e.jsx(Ye,{to:`/item/${a.item.contractAddress}/${a.item.itemId}`,state:{item:a.item},"aria-label":a.item.name}),e.jsx(Ze,{src:a.item.thumbnail,alt:"",loading:"lazy"}),e.jsxs(_,{children:[e.jsx(T,{children:a.item.name}),a.item.creator?e.jsx(tt,{to:`/items/creator/${a.item.creator}`,children:e.jsx(Se,{address:a.item.creator})}):null,e.jsxs(q,{children:[a.state!=="unavailable"?e.jsxs(it,{children:[e.jsx(A,{size:15}),e.jsx(O,{credits:a.item.priceCredits})]}):null,a.state==="unavailable"?e.jsx(E,{children:n("outfits.card.unavailable")}):a.state==="own_listing"?e.jsx(E,{children:n("outfits.detail.yourListing")}):a.state==="in_cart"?e.jsx(E,{children:n("outfits.detail.inCart")}):null,e.jsx(xt,{item:a.item})]})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(et,{className:s.isLoading?"skeleton":void 0,"aria-hidden":!0}),e.jsx(_,{children:s.isLoading?e.jsx(T,{children:e.jsx("span",{className:"skeleton",style:{display:"block",width:"70%",height:14}})}):e.jsxs(e.Fragment,{children:[e.jsx(T,{children:n("outfits.card.unavailable")}),e.jsx(q,{children:e.jsx(E,{children:n("outfits.card.unavailable")})})]})})]})},a.key))})}),e.jsxs(ot,{"data-testid":"outfit-detail-ctabar",children:[oe&&l.ownListing.length>0?e.jsx(st,{children:n("outfits.detail.yourListingHint")}):null,g.length>0&&e.jsxs(rt,{children:[e.jsx(lt,{children:n("outfits.detail.totalPrice")}),s.isLoading?e.jsx("span",{className:"skeleton",style:{width:64,height:26},"aria-hidden":!0}):e.jsxs(dt,{children:[e.jsx(A,{size:22}),e.jsx(O,{credits:m})]})]}),s.isLoading?e.jsx("span",{className:"skeleton",style:{width:"100%",height:52,borderRadius:26},"aria-hidden":!0}):e.jsxs(ct,{variant:"purple","data-testid":"outfit-detail-cta",onClick:x,disabled:p||C===0,"aria-busy":p||void 0,children:[p?n("outfits.card.adding"):C>0?n("outfits.detail.addCount",{count:C}):r>0?n("outfits.detail.nothingToAdd"):n("outfits.card.unavailable"),!p&&C>0?e.jsxs(ht,{children:[e.jsx(A,{size:16}),e.jsx(O,{credits:d})]}):null]})]})]})]})]})]})}export{Lt as OutfitDetail,Lt as default};
|
|
369
|
-
//# sourceMappingURL=OutfitDetail-
|
|
369
|
+
//# sourceMappingURL=OutfitDetail-CSiCaTR7.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{r as u,j as d}from"./react-BQkTEhfI.js";import{d as m}from"./dcl-schemas-rAoTN5Ga.js";import{b2 as S,w as T,s as _,ag as q,b3 as M,b4 as U,b5 as W,t as k}from"./index-PCOMQSTj.js";import{d as C}from"./disposePreview-ZbaLYmpw.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4025783d-1cc2-41dc-9dd2-fcc6aab8e45a",e._sentryDebugIdIdentifier="sentry-dbid-4025783d-1cc2-41dc-9dd2-fcc6aab8e45a")}catch{}})();function h(e){return e.startsWith("urn:")}function $(e,n){var o,f;const s=(o=e.metadata)==null?void 0:o.emoteDataADR74;if(!((f=s==null?void 0:s.representations)!=null&&f.length))return null;const a=new Map((e.content??[]).map(r=>[r.file,r.hash])),t=s.representations.map(r=>({...r,contents:(r.contents??[]).filter(c=>a.has(c)).map(c=>({key:c,url:`${n}/content/contents/${a.get(c)}`}))}));return t.every(r=>r.contents.length===0)?null:{base64:H({...e.metadata,emoteDataADR74:{...s,representations:t}}),loop:!!s.loop}}function H(e){return btoa(JSON.stringify(e).replace(/[^\x20-\x7f]/g,""))}async function J(e,n=S([e]),s){var a;try{const t=await fetch(`${n}/content/entities/active`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({pointers:[e]}),signal:s});if(!t.ok)return await((a=t.body)==null?void 0:a.cancel()),null;const[o]=await t.json();return o?$(o,n):null}catch{return null}}function K(e){var s,a;const n=T({queryKey:["emote-base64",e],enabled:!!e,staleTime:18e5,retry:!1,queryFn:({signal:t})=>J(e,void 0,t)});return{base64:((s=n.data)==null?void 0:s.base64)??null,loop:((a=n.data)==null?void 0:a.loop)??!1,isLoading:n.isLoading}}const Q=_.div`
|
|
2
|
+
position: absolute;
|
|
3
|
+
inset: 0;
|
|
4
|
+
display: grid;
|
|
5
|
+
place-items: center;
|
|
6
|
+
`;function X({id:e,profile:n,bodyShape:s,urns:a,emote:t=m.PreviewEmote.FASHION,enabled:o=!0,skin:f,hair:r,eyes:c,unityMode:E=m.PreviewUnityMode.BUILDER,controls:x,onRenderer:I}){const A=q(l=>l.fittingOpen),{ref:j,active:D}=M(),b=t&&h(t)?t:null,{base64:p,loop:O,isLoading:R}=K(b),i=o&&a.length>0&&D&&!A&&!R,B=U(a)===m.ChainName.MATIC_AMOY,[L,g]=u.useState(!1),P=a.join(",");u.useEffect(()=>{g(!1)},[P,n,s,t,f,r,c]),u.useEffect(()=>{i&&g(!1)},[i]);const[F,w]=u.useState(!1);u.useEffect(()=>{if(!i){w(!1);return}let l=0,N=0;const v=()=>{document.getElementById(e)?w(!0):N++<300&&(l=requestAnimationFrame(v))};return v(),()=>cancelAnimationFrame(l)},[i,e]);const y=u.useRef(null);return u.useEffect(()=>{if(i)return()=>{C(y.current),y.current=null}},[i]),d.jsxs(d.Fragment,{children:[d.jsx("div",{ref:j,"data-preview-viewport":!0,"aria-hidden":!0}),i?d.jsx(W,{id:e,profile:n,bodyShape:s,urns:a,skin:f,hair:r,eyes:c,type:m.PreviewType.AVATAR,emote:b?void 0:t&&!h(t)?t:void 0,base64s:p?[p]:void 0,disableDefaultEmotes:!!p&&!O,unityMode:E,disableBackground:!0,disableFadeEffect:!0,dev:B,onRenderer:I,onLoad:()=>{var l;g(!0),y.current=((l=document.getElementById(e))==null?void 0:l.contentWindow)??null}},n):null,F?x:null,o&&a.length===0?null:!i||!L?d.jsx(Q,{"aria-busy":"true","aria-label":k("spinner.loading"),children:d.jsx("span",{className:"spinner","aria-hidden":!0})}):null]})}export{X as O};
|
|
7
|
+
//# sourceMappingURL=OutfitPreview-CKul99pm.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as d,j as t,L as A,e as
|
|
1
|
+
import{r as d,j as t,L as A,e as Jt,a as Xt,b as Yt}from"./react-BQkTEhfI.js";import{s,a as ut,I as _,aJ as Zt,t as e,z as ot,as as at,H as m,n as Tt,x as X,ab as te,B as ee,aK as ie,$ as se,aL as Ct,w as Et,ae as oe,ai as z,aM as V,aN as ae,aO as re,aP as J,am as ne,ao as de,ak as le,al as ue,ac as Lt,aq as ce,aQ as rt,aR as pe,aS as fe,aT as he,aU as F,aV as Rt,aW as zt,aX as O,l as nt,aY as dt,aZ as xe,a_ as me,a$ as ge,O as be,b0 as ye,b1 as je,ay as ve}from"./index-PCOMQSTj.js";import{s as we}from"./signin-empty-3JhXhx04.js";import{E as U}from"./ErrorNotice-Bvb886Qo.js";import{L as $e}from"./LoadMore-DtjdrYgG.js";import{u as ke}from"./useInfiniteGrid-B28HAmqv.js";import{O as Se}from"./OutfitPreview-CKul99pm.js";import{T as Ie}from"./skeleton.styles-CP5AXi51.js";import"./dcl-schemas-rAoTN5Ga.js";import"./sentry-DEsWWpBW.js";import"./ethers-BicPoGF3.js";import"./intl-AKLEHPeO.js";import"./disposePreview-ZbaLYmpw.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},f=new r.Error().stack;f&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[f]="056a8c48-3274-4c7b-9560-eb1fd5f149fc",r._sentryDebugIdIdentifier="sentry-dbid-056a8c48-3274-4c7b-9560-eb1fd5f149fc")}catch{}})();const{colors:x,radius:Y,media:Te}=ut,Ce=s.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -7,7 +7,7 @@ import{r as d,j as t,L as A,e as Yt,a as Jt,b as Xt}from"./react-ZT2P9-hV.js";im
|
|
|
7
7
|
align-items: center;
|
|
8
8
|
gap: 8px;
|
|
9
9
|
border: 1px solid rgba(255, 255, 255, 0.45);
|
|
10
|
-
border-radius: ${
|
|
10
|
+
border-radius: ${Y.pill};
|
|
11
11
|
padding: 0 14px;
|
|
12
12
|
height: 44px;
|
|
13
13
|
background: rgba(0, 0, 0, 0.25);
|
|
@@ -35,7 +35,7 @@ import{r as d,j as t,L as A,e as Yt,a as Jt,b as Xt}from"./react-ZT2P9-hV.js";im
|
|
|
35
35
|
`,Re=s.button`
|
|
36
36
|
min-height: 44px;
|
|
37
37
|
padding: 0 16px;
|
|
38
|
-
border-radius: ${
|
|
38
|
+
border-radius: ${Y.pill};
|
|
39
39
|
border: 1px solid rgba(255, 255, 255, 0.45);
|
|
40
40
|
background: none;
|
|
41
41
|
font: inherit;
|
|
@@ -58,7 +58,7 @@ import{r as d,j as t,L as A,e as Yt,a as Jt,b as Xt}from"./react-ZT2P9-hV.js";im
|
|
|
58
58
|
}
|
|
59
59
|
`,ze=s.span`
|
|
60
60
|
height: 190px;
|
|
61
|
-
border-radius: ${
|
|
61
|
+
border-radius: ${Y.card};
|
|
62
62
|
`,Pe=s.button`
|
|
63
63
|
position: relative;
|
|
64
64
|
display: flex;
|
|
@@ -67,7 +67,7 @@ import{r as d,j as t,L as A,e as Yt,a as Jt,b as Xt}from"./react-ZT2P9-hV.js";im
|
|
|
67
67
|
padding: 8px;
|
|
68
68
|
background: rgba(0, 0, 0, 0.4);
|
|
69
69
|
border: 1px solid transparent;
|
|
70
|
-
border-radius: ${
|
|
70
|
+
border-radius: ${Y.card};
|
|
71
71
|
text-align: left;
|
|
72
72
|
font: inherit;
|
|
73
73
|
color: ${x.softWhite};
|
|
@@ -222,7 +222,7 @@ import{r as d,j as t,L as A,e as Yt,a as Jt,b as Xt}from"./react-ZT2P9-hV.js";im
|
|
|
222
222
|
gap: 8px;
|
|
223
223
|
font-size: 13px;
|
|
224
224
|
color: ${n.gray4};
|
|
225
|
-
`,
|
|
225
|
+
`,Je=s.div`
|
|
226
226
|
display: flex;
|
|
227
227
|
align-items: center;
|
|
228
228
|
gap: 8px;
|
|
@@ -231,7 +231,7 @@ import{r as d,j as t,L as A,e as Yt,a as Jt,b as Xt}from"./react-ZT2P9-hV.js";im
|
|
|
231
231
|
width: 100%;
|
|
232
232
|
justify-content: flex-end;
|
|
233
233
|
}
|
|
234
|
-
`,
|
|
234
|
+
`,Xe=s.button`
|
|
235
235
|
display: inline-flex;
|
|
236
236
|
align-items: center;
|
|
237
237
|
justify-content: center;
|
|
@@ -252,7 +252,7 @@ import{r as d,j as t,L as A,e as Yt,a as Jt,b as Xt}from"./react-ZT2P9-hV.js";im
|
|
|
252
252
|
opacity: 0.5;
|
|
253
253
|
cursor: default;
|
|
254
254
|
}
|
|
255
|
-
`,
|
|
255
|
+
`,Ye=s.div`
|
|
256
256
|
position: fixed;
|
|
257
257
|
inset: 0;
|
|
258
258
|
z-index: ${De.overlay};
|
|
@@ -553,5 +553,5 @@ import{r as d,j as t,L as A,e as Yt,a as Jt,b as Xt}from"./react-ZT2P9-hV.js";im
|
|
|
553
553
|
display: flex;
|
|
554
554
|
flex-wrap: wrap;
|
|
555
555
|
gap: 10px;
|
|
556
|
-
`;function Vi(){const{id:r}=Yt(),{pathname:f}=Jt(),h=J(b=>b.session),c=J(b=>b.signIn),y=te();ee({title:e("outfits.studio.title"),noindex:!0});const j=f.endsWith("/new")?"new":r?"edit":"list";return y==="pending"?t.jsx(N,{"aria-busy":"true","data-testid":"outfit-studio-loading",children:t.jsx("span",{className:"spinner","aria-hidden":!0})}):h?y!=="creator"?t.jsxs(N,{"data-testid":"outfit-studio-unavailable",children:[t.jsx(He,{children:e("outfits.studio.title")}),t.jsx(k,{children:e("outfits.studio.notAvailable")}),t.jsx(m,{as:A,to:"/overview",variant:"white",children:e("outfits.studio.backToShop")})]}):j==="list"?t.jsx(zi,{}):t.jsx(Oi,{outfitId:j==="edit"?r:null},r??"new"):t.jsx(ie,{children:t.jsx(se,{testId:"outfit-studio-signin",icon:we,title:e("outfits.studio.signInTitle"),body:e("outfits.studio.signInBody"),cta:{label:e("outfits.studio.signIn"),onClick:()=>c()},ctaVariant:"solid",fill:!0})})}function Ri({outfit:r}){const f=Lt(r.thumbnailHash);return f?t.jsx(Ke,{style:{background:fe(r)},children:t.jsx("img",{src:f,alt:"",loading:"lazy"})}):t.jsx(Ge,{"aria-hidden":!0})}function zi(){const r=J(u=>u.session),f=Ct(),[h,c]=d.useState(null),[y,j]=d.useState(null),{data:b=[],isLoading:o,isError:R,refetch:T}=Et({queryKey:["outfits-all"],enabled:!!r,staleTime:3e4,queryFn:()=>je(r.identity)});async function C(u,S){if(r){j(u.id);try{S==="delete"?(await he(u.id,r.identity),F.success(e("outfits.studio.deleted"))):(await Rt({...lt(u),published:!1},r.identity,"update"),F.success(e("outfits.studio.unpublished"))),zt(f)}catch(E){E instanceof O||nt(E,{flow:`outfit-${S}`}),F.error(e(E instanceof O?dt(E.code):"outfits.errors.generic"))}finally{j(null),c(null)}}}return t.jsxs(Pt,{"data-testid":"outfit-studio-list",children:[t.jsxs(Wt,{children:[t.jsx(Ot,{children:e("outfits.studio.myOutfits")}),t.jsx(m,{as:A,to:"/outfits/new",variant:"white","data-testid":"outfit-studio-new",children:e("outfits.studio.new")})]}),o?t.jsx(kt,{"aria-busy":"true",children:Array.from({length:3},(u,S)=>t.jsx(Ue,{className:"skeleton","aria-hidden":!0},S))}):R?t.jsxs(N,{children:[t.jsx(U,{message:e("outfits.errors.generic")}),t.jsx(m,{variant:"white",onClick:()=>void T(),children:e("outfits.detail.retry")})]}):b.length===0?t.jsx(k,{children:e("outfits.studio.empty")}):t.jsx(kt,{children:b.map(u=>t.jsxs(_e,{"data-testid":"outfit-studio-row","data-published":u.published||void 0,children:[t.jsx(Ri,{outfit:u}),t.jsxs(qe,{children:[t.jsx(Qe,{children:u.name||e("outfits.studio.untitled")}),t.jsxs(Ve,{children:[t.jsx(At,{"data-state":u.published?"published":"draft",children:u.published?e("outfits.studio.publishedState"):e("outfits.studio.draft")}),e("outfits.card.items",{count:u.items.length})]})]}),t.jsxs(Ye,{children:[u.published?t.jsx(m,{as:A,to:`/items/outfits/${u.id}`,variant:"ghost",size:"sm",children:e("outfits.studio.view")}):null,t.jsx(m,{as:A,to:`/outfits/${u.id}/edit`,variant:"outline",size:"sm","data-testid":"outfit-studio-edit",children:e("outfits.studio.edit")}),t.jsx(Je,{type:"button","data-testid":"outfit-studio-delete","aria-label":e("outfits.studio.confirmDelete"),disabled:y===u.id,onClick:()=>c(u),children:t.jsx(_,{name:"trash",size:18})})]})]},u.id))}),h?t.jsxs(Xe,{role:"dialog","aria-modal":"true","aria-label":e("outfits.studio.deleteTitle"),"data-testid":"outfit-studio-confirm",children:[t.jsx(Ze,{onClick:()=>c(null)}),t.jsxs(ti,{children:[t.jsx(ei,{children:e("outfits.studio.deleteTitle")}),t.jsx("p",{className:"muted",children:e("outfits.studio.deleteBody")}),t.jsxs(ii,{children:[h.published?t.jsx(m,{variant:"purple","data-testid":"outfit-studio-confirm-unpublish",disabled:y===h.id,onClick:()=>void C(h,"unpublish"),children:e("outfits.studio.unpublish")}):null,t.jsx(m,{variant:h.published?"outline":"purple","data-testid":"outfit-studio-confirm-delete",disabled:y===h.id,onClick:()=>void C(h,"delete"),children:e("outfits.studio.confirmDelete")}),t.jsx(m,{variant:"ghost",onClick:()=>c(null),children:e("outfits.studio.cancel")})]})]})]}):null]})}const It=["image/png","image/jpeg","image/webp"];function Pi(){return{id:crypto.randomUUID(),name:"",thumbnailHash:"",items:[],bodyShape:"unisex",gradientFrom:rt.from,gradientTo:rt.to,published:!1}}function lt(r){return{id:r.id,name:r.name,thumbnailHash:r.thumbnailHash,items:r.items,bodyShape:r.bodyShape,gradientFrom:r.gradientFrom,gradientTo:r.gradientTo,published:r.published}}function Wi(r){try{const f=sessionStorage.getItem(r);return f?JSON.parse(f):null}catch{return null}}function Oi({outfitId:r}){const f=r===null,h=`outfit-draft:${r??"new"}`,c=J(i=>i.session),y=Ct(),j=Xt(),[b]=d.useState(()=>Wi(h)),[o,R]=d.useState(()=>b??(f?Pi():null)),[T,C]=d.useState(!!b),{data:u,isLoading:S,isError:E,refetch:Z}=Et({queryKey:["outfit",r,!0],enabled:!f&&!!c,staleTime:0,queryFn:()=>ve(r,c.identity)});d.useEffect(()=>{u&&R(i=>i??lt(u))},[u]);function $(i){R(a=>a&&{...a,...i}),C(!0)}d.useEffect(()=>{if(!(!o||!T))try{sessionStorage.setItem(h,JSON.stringify(o))}catch{}},[o,T,h]),d.useEffect(()=>{if(!T)return;const i=a=>a.preventDefault();return window.addEventListener("beforeunload",i),()=>window.removeEventListener("beforeunload",i)},[T]),d.useEffect(()=>()=>sessionStorage.removeItem(h),[h]);const g=oe(o??void 0),K=d.useMemo(()=>new Set(((o==null?void 0:o.items)??[]).map(z)),[o]),D=i=>ye((o==null?void 0:o.items)??[],i,g.byKey),l=i=>!!i.itemId&&D(i).length<=Y;function v(i){!o||!l(i)||$({items:D(i)})}const[H,ct]=d.useState(null),L=d.useRef(null),tt=d.useRef(!0);d.useEffect(()=>(tt.current=!0,()=>{tt.current=!1}),[]);const[G,pt]=d.useState(!1),[Bt,q]=d.useState(null),[et,ft]=d.useState(""),[Dt,ht]=d.useState(null),[I,Ht]=d.useState();d.useEffect(()=>()=>{L.current&&URL.revokeObjectURL(L.current)},[]);function xt(){const i=ge(et);if(!i){ht(e("outfits.studio.importError"));return}ht(null),ft(""),Ht(i.colors),$({items:i.items,...i.bodyShape?{bodyShape:i.bodyShape}:{}}),F.success(e("outfits.studio.importSuccess",{count:i.items.length}))}async function Mt(i){if(!i||!c)return;if(q(null),!It.includes(i.type)){q(e("outfits.errors.unsupportedType"));return}if(i.size>xe){q(e("outfits.errors.tooLarge"));return}L.current&&URL.revokeObjectURL(L.current);const a=URL.createObjectURL(i);L.current=a,ct(a),pt(!0);try{const p=await me(i,c.identity);$({thumbnailHash:p})}catch(p){p instanceof O||nt(p,{flow:"outfit-thumbnail"}),q(e(p instanceof O?dt(p.code):"outfits.errors.generic")),L.current&&(URL.revokeObjectURL(L.current),L.current=null),ct(null)}finally{pt(!1)}}const[M,mt]=d.useState(!1),[Ut,gt]=d.useState(null),it=!!o&&o.name.trim().length>0&&o.name.length<=60,_t=!!o&&V(o.gradientFrom)&&V(o.gradientTo),bt=!!o&&o.items.some(i=>{const a=g.byKey.get(z(i));return!a||ae(a)}),yt=!!o&&it&&!!o.thumbnailHash&&_t&&bt&&o.items.length>=re&&o.items.length<=Y;async function st(i){if(!(!c||!o||M)){mt(!0),gt(null);try{const a=await Rt({...o,published:i},c.identity,f?"create":"update");if(!tt.current)return;sessionStorage.removeItem(h),R(lt(a)),C(!1),zt(y),i&&!o.published?(be("Shop Outfit Published",{outfit_id:a.id,item_count:a.items.length}),F.success(e("outfits.studio.publishedToast"))):F.success(e("outfits.studio.saved")),f&&(y.setQueryData(["outfit",a.id,!0],a),j(`/outfits/${a.id}/edit`,{replace:!0}))}catch(a){a instanceof O||nt(a,{flow:"outfit-save"}),gt(e(a instanceof O?dt(a.code):"outfits.errors.generic"))}finally{mt(!1)}}}const Q=d.useMemo(()=>((o==null?void 0:o.items)??[]).map(i=>g.byKey.get(z(i))).filter(i=>!!i),[o,g.byKey]),jt=d.useMemo(()=>ne(Q),[Q]),Kt=d.useMemo(()=>{const i=de(Q);return i!=null&&i.itemId?z({contractAddress:i.contractAddress,itemId:i.itemId}):null},[Q]),Gt=(o==null?void 0:o.bodyShape)==="female"?le:(o==null?void 0:o.bodyShape)==="male"?ue:void 0;if(!c)return null;if(!o)return E?t.jsxs(N,{children:[t.jsx(U,{message:e("outfits.errors.generic")}),t.jsx(m,{variant:"white",onClick:()=>void Z(),children:e("outfits.detail.retry")})]}):!S&&u===null?t.jsxs(N,{"data-testid":"outfit-studio-missing",children:[t.jsx(k,{children:e("outfits.errors.notFound")}),t.jsx(m,{as:A,to:"/outfits/manage",variant:"white",children:e("outfits.studio.myOutfits")})]}):t.jsx(N,{"aria-busy":"true",children:t.jsx("span",{className:"spinner","aria-hidden":!0})});const vt=H??Lt(o.thumbnailHash),qt={...o,authorAddress:(c==null?void 0:c.address)??"",createdAt:0,updatedAt:0},Qt=o.items.reduce((i,a)=>{var p;return i+(((p=g.byKey.get(z(a)))==null?void 0:p.priceCredits)??0)},0);return t.jsxs(Pt,{"data-testid":"outfit-studio-editor",children:[t.jsxs(Wt,{children:[t.jsx(Me,{to:"/outfits/manage","aria-label":e("outfits.studio.myOutfits"),"data-testid":"outfit-studio-back",children:t.jsx(_,{name:"arrow-left",size:18})}),t.jsx(Ot,{children:f?e("outfits.studio.new"):e("outfits.studio.editTitle")}),t.jsx(At,{"data-state":o.published?"published":"draft",children:o.published?e("outfits.studio.publishedState"):e("outfits.studio.draft")})]}),t.jsxs(si,{children:[t.jsxs(oi,{children:[t.jsxs(ri,{"data-testid":"outfit-studio-preview",style:{background:ce(o)},children:[t.jsx(Se,{id:"outfit-studio-preview-frame",profile:"default",bodyShape:Gt,urns:jt,skin:I==null?void 0:I.skin,hair:I==null?void 0:I.hair,eyes:I==null?void 0:I.eyes,enabled:!g.isLoading}),jt.length===0&&!g.isLoading?t.jsx(ni,{children:e("outfits.studio.previewEmpty")}):null]}),t.jsxs(P,{children:[t.jsx(W,{as:"span",children:e("outfits.studio.bodyShape")}),t.jsx(di,{role:"group","aria-label":e("outfits.studio.bodyShape"),children:["unisex","male","female"].map(i=>t.jsx(li,{type:"button","data-selected":o.bodyShape===i||void 0,onClick:()=>$({bodyShape:i}),children:e(`outfits.studio.shape.${i}`)},i))})]}),t.jsxs(P,{children:[t.jsx(W,{as:"span",children:e("outfits.studio.gradient")}),t.jsx(ci,{children:["gradientFrom","gradientTo"].map(i=>t.jsxs(pi,{children:[t.jsx(fi,{type:"color",value:V(o[i])?o[i]:rt.from,"aria-label":e(i==="gradientFrom"?"outfits.studio.gradientTop":"outfits.studio.gradientBottom"),"data-testid":i==="gradientFrom"?"outfit-studio-gradient-from":"outfit-studio-gradient-to",onChange:a=>$({[i]:a.target.value.toLowerCase()})}),t.jsxs(hi,{children:[t.jsx("span",{children:e(i==="gradientFrom"?"outfits.studio.gradientTop":"outfits.studio.gradientBottom")}),t.jsx(xi,{value:o[i],maxLength:7,spellCheck:!1,placeholder:"#000000","aria-label":e(i==="gradientFrom"?"outfits.studio.gradientTopHex":"outfits.studio.gradientBottomHex"),"data-invalid":!V(o[i])||void 0,onChange:a=>{const p=a.target.value.trim().toLowerCase();$({[i]:p.startsWith("#")||p===""?p:`#${p}`})}})]})]},i))}),t.jsx(k,{children:e("outfits.studio.gradientHint")})]}),t.jsxs(P,{children:[t.jsx(W,{as:"span",children:e("outfits.studio.thumbnail")}),vt?t.jsx(ui,{"data-busy":G||void 0,children:t.jsx("img",{src:vt,alt:""})}):null,t.jsxs(gi,{as:"label",variant:"outline",size:"sm","data-busy":G||void 0,children:[G?e("outfits.studio.uploading"):e("outfits.studio.upload"),t.jsx("input",{type:"file",accept:It.join(","),hidden:!0,disabled:G,onChange:i=>{var a;return void Mt((a=i.target.files)==null?void 0:a[0])},"data-testid":"outfit-studio-thumb-input"})]}),t.jsx(k,{children:e("outfits.studio.thumbnailHint")}),t.jsx(U,{message:Bt,testId:"outfit-studio-thumb-error"})]}),t.jsxs(P,{children:[t.jsx(W,{as:"span",children:e("outfits.studio.cardPreview")}),t.jsx(mi,{"data-testid":"outfit-studio-card-preview",onClickCapture:i=>{i.preventDefault(),i.stopPropagation()},children:t.jsx(pe,{outfit:qt,resolution:g})})]})]}),t.jsxs(ai,{children:[t.jsxs(P,{children:[t.jsx(W,{htmlFor:"outfit-import",children:e("outfits.studio.import")}),t.jsxs(bi,{children:[t.jsx(St,{id:"outfit-import",value:et,spellCheck:!1,placeholder:e("outfits.studio.importPlaceholder"),onChange:i=>ft(i.target.value),onKeyDown:i=>{i.key==="Enter"&&xt()},"data-testid":"outfit-studio-import"}),t.jsx(m,{variant:"outline",size:"sm",onClick:xt,disabled:et.trim()==="","data-testid":"outfit-studio-import-apply",children:e("outfits.studio.importApply")})]}),t.jsx(k,{children:e("outfits.studio.importHint")}),t.jsx(U,{message:Dt,testId:"outfit-studio-import-error"})]}),t.jsxs(P,{children:[t.jsx(W,{htmlFor:"outfit-name",children:e("outfits.studio.name")}),t.jsx(St,{id:"outfit-name",value:o.name,maxLength:60,placeholder:e("outfits.studio.namePlaceholder"),onChange:i=>$({name:i.target.value}),"data-testid":"outfit-studio-name"})]}),t.jsxs(P,{children:[t.jsxs(W,{as:"span",children:[e("outfits.studio.items")," (",o.items.length,"/",Y,")"]}),o.items.length===0?t.jsx(k,{children:e("outfits.studio.noItems")}):t.jsx(yi,{children:o.items.map(i=>{const a=z(i),p=g.byKey.get(a);return t.jsxs(ji,{"data-testid":"outfit-studio-selected","data-missing":!p||void 0,children:[p?t.jsx(vi,{src:p.thumbnail,alt:""}):t.jsx(wi,{className:g.isLoading?"skeleton":void 0,"aria-hidden":!0}),t.jsx($i,{className:p?void 0:"muted",children:p?p.name:g.isLoading?t.jsx(Ie,{className:"skeleton",width:96,"aria-hidden":!0}):e("outfits.card.unavailable")}),a===Kt?t.jsx(ki,{"data-testid":"outfit-studio-plays-in-preview",children:e("outfits.studio.playsInPreview")}):null,p?t.jsxs(Si,{children:[t.jsx(ot,{size:12}),t.jsx(at,{credits:p.priceCredits})]}):null,t.jsx(Ci,{type:"button","aria-label":e("outfits.studio.remove"),title:e("outfits.studio.remove"),onClick:()=>$({items:o.items.filter(Vt=>z(Vt)!==a)}),children:t.jsx(_,{name:"trash",size:16})})]},a)})}),o.items.length>0?t.jsxs(Ii,{"data-testid":"outfit-studio-total",children:[t.jsx("span",{children:e("outfits.detail.totalPrice")}),t.jsxs(Ti,{children:[t.jsx(ot,{size:14}),t.jsx(at,{credits:Qt})]})]}):null,o.items.length>=Y?t.jsx(k,{children:e("outfits.studio.maxItems")}):null]}),t.jsx(Be,{selectedKeys:K,onPick:v,canPick:l})]})]}),t.jsxs(Ei,{"data-testid":"outfit-studio-savebar",children:[t.jsx(U,{message:Ut,testId:"outfit-studio-save-error"}),it?!yt&&!o.published?t.jsx(k,{"data-testid":"outfit-studio-publish-hint",children:!bt&&o.items.length>0?e("outfits.studio.needsWearable"):e("outfits.errors.notPublishable")}):null:t.jsx(k,{children:e("outfits.studio.needName")}),t.jsxs(Li,{children:[t.jsx(m,{variant:"outline","data-testid":"outfit-studio-save",disabled:M||!it,onClick:()=>void st(o.published),children:M?e("outfits.studio.saving"):e("outfits.studio.saveDraft")}),o.published?t.jsx(m,{variant:"white","data-testid":"outfit-studio-unpublish",disabled:M,onClick:()=>void st(!1),children:e("outfits.studio.unpublish")}):t.jsx(m,{variant:"white","data-testid":"outfit-studio-publish",disabled:M||!yt,onClick:()=>void st(!0),children:e("outfits.studio.publish")})]})]})]})}export{Vi as OutfitStudio,Vi as default};
|
|
557
|
-
//# sourceMappingURL=OutfitStudio-
|
|
556
|
+
`;function Vi(){const{id:r}=Jt(),{pathname:f}=Xt(),h=X(b=>b.session),c=X(b=>b.signIn),y=te();ee({title:e("outfits.studio.title"),noindex:!0});const j=f.endsWith("/new")?"new":r?"edit":"list";return y==="pending"?t.jsx(N,{"aria-busy":"true","data-testid":"outfit-studio-loading",children:t.jsx("span",{className:"spinner","aria-hidden":!0})}):h?y!=="creator"?t.jsxs(N,{"data-testid":"outfit-studio-unavailable",children:[t.jsx(He,{children:e("outfits.studio.title")}),t.jsx(k,{children:e("outfits.studio.notAvailable")}),t.jsx(m,{as:A,to:"/overview",variant:"white",children:e("outfits.studio.backToShop")})]}):j==="list"?t.jsx(zi,{}):t.jsx(Oi,{outfitId:j==="edit"?r:null},r??"new"):t.jsx(ie,{children:t.jsx(se,{testId:"outfit-studio-signin",icon:we,title:e("outfits.studio.signInTitle"),body:e("outfits.studio.signInBody"),cta:{label:e("outfits.studio.signIn"),onClick:()=>c()},ctaVariant:"solid",fill:!0})})}function Ri({outfit:r}){const f=Lt(r.thumbnailHash);return f?t.jsx(Ke,{style:{background:fe(r)},children:t.jsx("img",{src:f,alt:"",loading:"lazy"})}):t.jsx(Ge,{"aria-hidden":!0})}function zi(){const r=X(u=>u.session),f=Ct(),[h,c]=d.useState(null),[y,j]=d.useState(null),{data:b=[],isLoading:o,isError:R,refetch:T}=Et({queryKey:["outfits-all"],enabled:!!r,staleTime:3e4,queryFn:()=>je(r.identity)});async function C(u,S){if(r){j(u.id);try{S==="delete"?(await he(u.id,r.identity),F.success(e("outfits.studio.deleted"))):(await Rt({...lt(u),published:!1},r.identity,"update"),F.success(e("outfits.studio.unpublished"))),zt(f)}catch(E){E instanceof O||nt(E,{flow:`outfit-${S}`}),F.error(e(E instanceof O?dt(E.code):"outfits.errors.generic"))}finally{j(null),c(null)}}}return t.jsxs(Pt,{"data-testid":"outfit-studio-list",children:[t.jsxs(Wt,{children:[t.jsx(Ot,{children:e("outfits.studio.myOutfits")}),t.jsx(m,{as:A,to:"/outfits/new",variant:"white","data-testid":"outfit-studio-new",children:e("outfits.studio.new")})]}),o?t.jsx(kt,{"aria-busy":"true",children:Array.from({length:3},(u,S)=>t.jsx(Ue,{className:"skeleton","aria-hidden":!0},S))}):R?t.jsxs(N,{children:[t.jsx(U,{message:e("outfits.errors.generic")}),t.jsx(m,{variant:"white",onClick:()=>void T(),children:e("outfits.detail.retry")})]}):b.length===0?t.jsx(k,{children:e("outfits.studio.empty")}):t.jsx(kt,{children:b.map(u=>t.jsxs(_e,{"data-testid":"outfit-studio-row","data-published":u.published||void 0,children:[t.jsx(Ri,{outfit:u}),t.jsxs(qe,{children:[t.jsx(Qe,{children:u.name||e("outfits.studio.untitled")}),t.jsxs(Ve,{children:[t.jsx(At,{"data-state":u.published?"published":"draft",children:u.published?e("outfits.studio.publishedState"):e("outfits.studio.draft")}),e("outfits.card.items",{count:u.items.length})]})]}),t.jsxs(Je,{children:[u.published?t.jsx(m,{as:A,to:`/items/outfits/${u.id}`,variant:"ghost",size:"sm",children:e("outfits.studio.view")}):null,t.jsx(m,{as:A,to:`/outfits/${u.id}/edit`,variant:"outline",size:"sm","data-testid":"outfit-studio-edit",children:e("outfits.studio.edit")}),t.jsx(Xe,{type:"button","data-testid":"outfit-studio-delete","aria-label":e("outfits.studio.confirmDelete"),disabled:y===u.id,onClick:()=>c(u),children:t.jsx(_,{name:"trash",size:18})})]})]},u.id))}),h?t.jsxs(Ye,{role:"dialog","aria-modal":"true","aria-label":e("outfits.studio.deleteTitle"),"data-testid":"outfit-studio-confirm",children:[t.jsx(Ze,{onClick:()=>c(null)}),t.jsxs(ti,{children:[t.jsx(ei,{children:e("outfits.studio.deleteTitle")}),t.jsx("p",{className:"muted",children:e("outfits.studio.deleteBody")}),t.jsxs(ii,{children:[h.published?t.jsx(m,{variant:"purple","data-testid":"outfit-studio-confirm-unpublish",disabled:y===h.id,onClick:()=>void C(h,"unpublish"),children:e("outfits.studio.unpublish")}):null,t.jsx(m,{variant:h.published?"outline":"purple","data-testid":"outfit-studio-confirm-delete",disabled:y===h.id,onClick:()=>void C(h,"delete"),children:e("outfits.studio.confirmDelete")}),t.jsx(m,{variant:"ghost",onClick:()=>c(null),children:e("outfits.studio.cancel")})]})]})]}):null]})}const It=["image/png","image/jpeg","image/webp"];function Pi(){return{id:crypto.randomUUID(),name:"",thumbnailHash:"",items:[],bodyShape:"unisex",gradientFrom:rt.from,gradientTo:rt.to,published:!1}}function lt(r){return{id:r.id,name:r.name,thumbnailHash:r.thumbnailHash,items:r.items,bodyShape:r.bodyShape,gradientFrom:r.gradientFrom,gradientTo:r.gradientTo,published:r.published}}function Wi(r){try{const f=sessionStorage.getItem(r);return f?JSON.parse(f):null}catch{return null}}function Oi({outfitId:r}){const f=r===null,h=`outfit-draft:${r??"new"}`,c=X(i=>i.session),y=Ct(),j=Yt(),[b]=d.useState(()=>Wi(h)),[o,R]=d.useState(()=>b??(f?Pi():null)),[T,C]=d.useState(!!b),{data:u,isLoading:S,isError:E,refetch:Z}=Et({queryKey:["outfit",r,!0],enabled:!f&&!!c,staleTime:0,queryFn:()=>ve(r,c.identity)});d.useEffect(()=>{u&&R(i=>i??lt(u))},[u]);function $(i){R(a=>a&&{...a,...i}),C(!0)}d.useEffect(()=>{if(!(!o||!T))try{sessionStorage.setItem(h,JSON.stringify(o))}catch{}},[o,T,h]),d.useEffect(()=>{if(!T)return;const i=a=>a.preventDefault();return window.addEventListener("beforeunload",i),()=>window.removeEventListener("beforeunload",i)},[T]),d.useEffect(()=>()=>sessionStorage.removeItem(h),[h]);const g=oe(o??void 0),K=d.useMemo(()=>new Set(((o==null?void 0:o.items)??[]).map(z)),[o]),D=i=>ye((o==null?void 0:o.items)??[],i,g.byKey),l=i=>!!i.itemId&&D(i).length<=J;function v(i){!o||!l(i)||$({items:D(i)})}const[H,ct]=d.useState(null),L=d.useRef(null),tt=d.useRef(!0);d.useEffect(()=>(tt.current=!0,()=>{tt.current=!1}),[]);const[G,pt]=d.useState(!1),[Bt,q]=d.useState(null),[et,ft]=d.useState(""),[Dt,ht]=d.useState(null),[I,Ht]=d.useState();d.useEffect(()=>()=>{L.current&&URL.revokeObjectURL(L.current)},[]);function xt(){const i=ge(et);if(!i){ht(e("outfits.studio.importError"));return}ht(null),ft(""),Ht(i.colors),$({items:i.items,...i.bodyShape?{bodyShape:i.bodyShape}:{}}),F.success(e("outfits.studio.importSuccess",{count:i.items.length}))}async function Mt(i){if(!i||!c)return;if(q(null),!It.includes(i.type)){q(e("outfits.errors.unsupportedType"));return}if(i.size>xe){q(e("outfits.errors.tooLarge"));return}L.current&&URL.revokeObjectURL(L.current);const a=URL.createObjectURL(i);L.current=a,ct(a),pt(!0);try{const p=await me(i,c.identity);$({thumbnailHash:p})}catch(p){p instanceof O||nt(p,{flow:"outfit-thumbnail"}),q(e(p instanceof O?dt(p.code):"outfits.errors.generic")),L.current&&(URL.revokeObjectURL(L.current),L.current=null),ct(null)}finally{pt(!1)}}const[M,mt]=d.useState(!1),[Ut,gt]=d.useState(null),it=!!o&&o.name.trim().length>0&&o.name.length<=60,_t=!!o&&V(o.gradientFrom)&&V(o.gradientTo),bt=!!o&&o.items.some(i=>{const a=g.byKey.get(z(i));return!a||ae(a)}),yt=!!o&&it&&!!o.thumbnailHash&&_t&&bt&&o.items.length>=re&&o.items.length<=J;async function st(i){if(!(!c||!o||M)){mt(!0),gt(null);try{const a=await Rt({...o,published:i},c.identity,f?"create":"update");if(!tt.current)return;sessionStorage.removeItem(h),R(lt(a)),C(!1),zt(y),i&&!o.published?(be("Shop Outfit Published",{outfit_id:a.id,item_count:a.items.length}),F.success(e("outfits.studio.publishedToast"))):F.success(e("outfits.studio.saved")),f&&(y.setQueryData(["outfit",a.id,!0],a),j(`/outfits/${a.id}/edit`,{replace:!0}))}catch(a){a instanceof O||nt(a,{flow:"outfit-save"}),gt(e(a instanceof O?dt(a.code):"outfits.errors.generic"))}finally{mt(!1)}}}const Q=d.useMemo(()=>((o==null?void 0:o.items)??[]).map(i=>g.byKey.get(z(i))).filter(i=>!!i),[o,g.byKey]),jt=d.useMemo(()=>ne(Q),[Q]),Kt=d.useMemo(()=>{const i=de(Q);return i!=null&&i.itemId?z({contractAddress:i.contractAddress,itemId:i.itemId}):null},[Q]),Gt=(o==null?void 0:o.bodyShape)==="female"?le:(o==null?void 0:o.bodyShape)==="male"?ue:void 0;if(!c)return null;if(!o)return E?t.jsxs(N,{children:[t.jsx(U,{message:e("outfits.errors.generic")}),t.jsx(m,{variant:"white",onClick:()=>void Z(),children:e("outfits.detail.retry")})]}):!S&&u===null?t.jsxs(N,{"data-testid":"outfit-studio-missing",children:[t.jsx(k,{children:e("outfits.errors.notFound")}),t.jsx(m,{as:A,to:"/outfits/manage",variant:"white",children:e("outfits.studio.myOutfits")})]}):t.jsx(N,{"aria-busy":"true",children:t.jsx("span",{className:"spinner","aria-hidden":!0})});const vt=H??Lt(o.thumbnailHash),qt={...o,authorAddress:(c==null?void 0:c.address)??"",createdAt:0,updatedAt:0},Qt=o.items.reduce((i,a)=>{var p;return i+(((p=g.byKey.get(z(a)))==null?void 0:p.priceCredits)??0)},0);return t.jsxs(Pt,{"data-testid":"outfit-studio-editor",children:[t.jsxs(Wt,{children:[t.jsx(Me,{to:"/outfits/manage","aria-label":e("outfits.studio.myOutfits"),"data-testid":"outfit-studio-back",children:t.jsx(_,{name:"arrow-left",size:18})}),t.jsx(Ot,{children:f?e("outfits.studio.new"):e("outfits.studio.editTitle")}),t.jsx(At,{"data-state":o.published?"published":"draft",children:o.published?e("outfits.studio.publishedState"):e("outfits.studio.draft")})]}),t.jsxs(si,{children:[t.jsxs(oi,{children:[t.jsxs(ri,{"data-testid":"outfit-studio-preview",style:{background:ce(o)},children:[t.jsx(Se,{id:"outfit-studio-preview-frame",profile:"default",bodyShape:Gt,urns:jt,skin:I==null?void 0:I.skin,hair:I==null?void 0:I.hair,eyes:I==null?void 0:I.eyes,enabled:!g.isLoading}),jt.length===0&&!g.isLoading?t.jsx(ni,{children:e("outfits.studio.previewEmpty")}):null]}),t.jsxs(P,{children:[t.jsx(W,{as:"span",children:e("outfits.studio.bodyShape")}),t.jsx(di,{role:"group","aria-label":e("outfits.studio.bodyShape"),children:["unisex","male","female"].map(i=>t.jsx(li,{type:"button","data-selected":o.bodyShape===i||void 0,onClick:()=>$({bodyShape:i}),children:e(`outfits.studio.shape.${i}`)},i))})]}),t.jsxs(P,{children:[t.jsx(W,{as:"span",children:e("outfits.studio.gradient")}),t.jsx(ci,{children:["gradientFrom","gradientTo"].map(i=>t.jsxs(pi,{children:[t.jsx(fi,{type:"color",value:V(o[i])?o[i]:rt.from,"aria-label":e(i==="gradientFrom"?"outfits.studio.gradientTop":"outfits.studio.gradientBottom"),"data-testid":i==="gradientFrom"?"outfit-studio-gradient-from":"outfit-studio-gradient-to",onChange:a=>$({[i]:a.target.value.toLowerCase()})}),t.jsxs(hi,{children:[t.jsx("span",{children:e(i==="gradientFrom"?"outfits.studio.gradientTop":"outfits.studio.gradientBottom")}),t.jsx(xi,{value:o[i],maxLength:7,spellCheck:!1,placeholder:"#000000","aria-label":e(i==="gradientFrom"?"outfits.studio.gradientTopHex":"outfits.studio.gradientBottomHex"),"data-invalid":!V(o[i])||void 0,onChange:a=>{const p=a.target.value.trim().toLowerCase();$({[i]:p.startsWith("#")||p===""?p:`#${p}`})}})]})]},i))}),t.jsx(k,{children:e("outfits.studio.gradientHint")})]}),t.jsxs(P,{children:[t.jsx(W,{as:"span",children:e("outfits.studio.thumbnail")}),vt?t.jsx(ui,{"data-busy":G||void 0,children:t.jsx("img",{src:vt,alt:""})}):null,t.jsxs(gi,{as:"label",variant:"outline",size:"sm","data-busy":G||void 0,children:[G?e("outfits.studio.uploading"):e("outfits.studio.upload"),t.jsx("input",{type:"file",accept:It.join(","),hidden:!0,disabled:G,onChange:i=>{var a;return void Mt((a=i.target.files)==null?void 0:a[0])},"data-testid":"outfit-studio-thumb-input"})]}),t.jsx(k,{children:e("outfits.studio.thumbnailHint")}),t.jsx(U,{message:Bt,testId:"outfit-studio-thumb-error"})]}),t.jsxs(P,{children:[t.jsx(W,{as:"span",children:e("outfits.studio.cardPreview")}),t.jsx(mi,{"data-testid":"outfit-studio-card-preview",onClickCapture:i=>{i.preventDefault(),i.stopPropagation()},children:t.jsx(pe,{outfit:qt,resolution:g})})]})]}),t.jsxs(ai,{children:[t.jsxs(P,{children:[t.jsx(W,{htmlFor:"outfit-import",children:e("outfits.studio.import")}),t.jsxs(bi,{children:[t.jsx(St,{id:"outfit-import",value:et,spellCheck:!1,placeholder:e("outfits.studio.importPlaceholder"),onChange:i=>ft(i.target.value),onKeyDown:i=>{i.key==="Enter"&&xt()},"data-testid":"outfit-studio-import"}),t.jsx(m,{variant:"outline",size:"sm",onClick:xt,disabled:et.trim()==="","data-testid":"outfit-studio-import-apply",children:e("outfits.studio.importApply")})]}),t.jsx(k,{children:e("outfits.studio.importHint")}),t.jsx(U,{message:Dt,testId:"outfit-studio-import-error"})]}),t.jsxs(P,{children:[t.jsx(W,{htmlFor:"outfit-name",children:e("outfits.studio.name")}),t.jsx(St,{id:"outfit-name",value:o.name,maxLength:60,placeholder:e("outfits.studio.namePlaceholder"),onChange:i=>$({name:i.target.value}),"data-testid":"outfit-studio-name"})]}),t.jsxs(P,{children:[t.jsxs(W,{as:"span",children:[e("outfits.studio.items")," (",o.items.length,"/",J,")"]}),o.items.length===0?t.jsx(k,{children:e("outfits.studio.noItems")}):t.jsx(yi,{children:o.items.map(i=>{const a=z(i),p=g.byKey.get(a);return t.jsxs(ji,{"data-testid":"outfit-studio-selected","data-missing":!p||void 0,children:[p?t.jsx(vi,{src:p.thumbnail,alt:""}):t.jsx(wi,{className:g.isLoading?"skeleton":void 0,"aria-hidden":!0}),t.jsx($i,{className:p?void 0:"muted",children:p?p.name:g.isLoading?t.jsx(Ie,{className:"skeleton",width:96,"aria-hidden":!0}):e("outfits.card.unavailable")}),a===Kt?t.jsx(ki,{"data-testid":"outfit-studio-plays-in-preview",children:e("outfits.studio.playsInPreview")}):null,p?t.jsxs(Si,{children:[t.jsx(ot,{size:12}),t.jsx(at,{credits:p.priceCredits})]}):null,t.jsx(Ci,{type:"button","aria-label":e("outfits.studio.remove"),title:e("outfits.studio.remove"),onClick:()=>$({items:o.items.filter(Vt=>z(Vt)!==a)}),children:t.jsx(_,{name:"trash",size:16})})]},a)})}),o.items.length>0?t.jsxs(Ii,{"data-testid":"outfit-studio-total",children:[t.jsx("span",{children:e("outfits.detail.totalPrice")}),t.jsxs(Ti,{children:[t.jsx(ot,{size:14}),t.jsx(at,{credits:Qt})]})]}):null,o.items.length>=J?t.jsx(k,{children:e("outfits.studio.maxItems")}):null]}),t.jsx(Be,{selectedKeys:K,onPick:v,canPick:l})]})]}),t.jsxs(Ei,{"data-testid":"outfit-studio-savebar",children:[t.jsx(U,{message:Ut,testId:"outfit-studio-save-error"}),it?!yt&&!o.published?t.jsx(k,{"data-testid":"outfit-studio-publish-hint",children:!bt&&o.items.length>0?e("outfits.studio.needsWearable"):e("outfits.errors.notPublishable")}):null:t.jsx(k,{children:e("outfits.studio.needName")}),t.jsxs(Li,{children:[t.jsx(m,{variant:"outline","data-testid":"outfit-studio-save",disabled:M||!it,onClick:()=>void st(o.published),children:M?e("outfits.studio.saving"):e("outfits.studio.saveDraft")}),o.published?t.jsx(m,{variant:"white","data-testid":"outfit-studio-unpublish",disabled:M,onClick:()=>void st(!1),children:e("outfits.studio.unpublish")}):t.jsx(m,{variant:"white","data-testid":"outfit-studio-publish",disabled:M||!yt,onClick:()=>void st(!0),children:e("outfits.studio.publish")})]})]})]})}export{Vi as OutfitStudio,Vi as default};
|
|
557
|
+
//# sourceMappingURL=OutfitStudio-BFVYiWYq.js.map
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
import{r as P,j as e}from"./react-BQkTEhfI.js";import{s as i,a as t,V as q,t as r,I as w,z as y,F as j,C as $,W as R}from"./index-PCOMQSTj.js";import{m as k}from"./mana-matic-CEqvSwrJ.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},m=new s.Error().stack;m&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[m]="2fe35f6a-2f3f-41c7-9070-b55bcc848ca8",s._sentryDebugIdIdentifier="sentry-dbid-2fe35f6a-2f3f-41c7-9070-b55bcc848ca8")}catch{}})();const _="data:image/webp;base64,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",ee=i.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 24px;
|
|
5
|
+
padding: 12px 16px 16px;
|
|
6
|
+
min-height: 0;
|
|
7
|
+
overflow-y: auto;
|
|
8
|
+
`,te=i.div`
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
gap: 8px;
|
|
13
|
+
padding-bottom: 16px;
|
|
14
|
+
border-bottom: 1px solid ${t.colors.gray4};
|
|
15
|
+
`,ie=i.h2`
|
|
16
|
+
margin: 0;
|
|
17
|
+
font-family: ${t.font.sans};
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
font-size: 20px;
|
|
20
|
+
line-height: 1.6;
|
|
21
|
+
color: ${t.colors.text};
|
|
22
|
+
`,se=i.button`
|
|
23
|
+
flex: none;
|
|
24
|
+
display: grid;
|
|
25
|
+
place-items: center;
|
|
26
|
+
width: 18.535px;
|
|
27
|
+
height: 18.535px;
|
|
28
|
+
border: 0;
|
|
29
|
+
background: none;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
color: ${t.colors.text};
|
|
32
|
+
|
|
33
|
+
&:disabled {
|
|
34
|
+
opacity: 0.4;
|
|
35
|
+
cursor: default;
|
|
36
|
+
}
|
|
37
|
+
&:focus-visible {
|
|
38
|
+
outline: 2px solid ${t.colors.accent};
|
|
39
|
+
outline-offset: 2px;
|
|
40
|
+
}
|
|
41
|
+
`,ne=i.div`
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: 12px;
|
|
45
|
+
`,oe=i.div`
|
|
46
|
+
flex: none;
|
|
47
|
+
display: grid;
|
|
48
|
+
place-items: center;
|
|
49
|
+
width: 180.465px;
|
|
50
|
+
height: 179.763px;
|
|
51
|
+
border-radius: 15.746px;
|
|
52
|
+
background: ${t.colors.media};
|
|
53
|
+
border: 0.176px solid ${t.colors.muted2};
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
|
|
56
|
+
img {
|
|
57
|
+
width: 149.568px;
|
|
58
|
+
height: 148.866px;
|
|
59
|
+
object-fit: contain;
|
|
60
|
+
filter: drop-shadow(0.736px 2.945px 3.682px rgba(0, 0, 0, 0.1));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
${t.media.maxWidth("mobile")} {
|
|
64
|
+
width: 120px;
|
|
65
|
+
height: 120px;
|
|
66
|
+
}
|
|
67
|
+
`,ae=i.div`
|
|
68
|
+
flex: 1 1 0;
|
|
69
|
+
min-width: 0;
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
gap: 32px;
|
|
73
|
+
padding: 8px;
|
|
74
|
+
`,de=i.p`
|
|
75
|
+
margin: 0;
|
|
76
|
+
font-family: ${t.font.sans};
|
|
77
|
+
font-weight: 600;
|
|
78
|
+
font-size: 20px;
|
|
79
|
+
line-height: 1.57;
|
|
80
|
+
color: ${t.colors.text};
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
text-overflow: ellipsis;
|
|
83
|
+
`,le=i.div`
|
|
84
|
+
> div {
|
|
85
|
+
font-family: ${t.font.sans};
|
|
86
|
+
font-size: 10px;
|
|
87
|
+
line-height: 1.43;
|
|
88
|
+
color: ${t.colors.muted};
|
|
89
|
+
}
|
|
90
|
+
`,re=i.div`
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
gap: 4px;
|
|
94
|
+
|
|
95
|
+
/* A 24px slot holding a 19.855px glyph — keep both boxes rather than one flat size. */
|
|
96
|
+
.ico {
|
|
97
|
+
width: 24px;
|
|
98
|
+
height: 24px;
|
|
99
|
+
background: ${t.colors.text2};
|
|
100
|
+
-webkit-mask-size: 19.855px 19.855px;
|
|
101
|
+
mask-size: 19.855px 19.855px;
|
|
102
|
+
-webkit-mask-position: left center;
|
|
103
|
+
mask-position: left center;
|
|
104
|
+
}
|
|
105
|
+
span {
|
|
106
|
+
font-family: ${t.font.sans};
|
|
107
|
+
font-weight: 600;
|
|
108
|
+
font-size: 24px;
|
|
109
|
+
color: ${t.colors.text2};
|
|
110
|
+
}
|
|
111
|
+
`,ce=i.div`
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-direction: column;
|
|
114
|
+
gap: 12px;
|
|
115
|
+
`,B=i.button`
|
|
116
|
+
position: relative;
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
justify-content: space-between;
|
|
120
|
+
width: 100%;
|
|
121
|
+
padding: 12px 12px 12px 0;
|
|
122
|
+
border-radius: 12px;
|
|
123
|
+
border: 0;
|
|
124
|
+
background: ${t.colors.white};
|
|
125
|
+
cursor: pointer;
|
|
126
|
+
text-align: left;
|
|
127
|
+
font-family: ${t.font.sans};
|
|
128
|
+
|
|
129
|
+
&::after {
|
|
130
|
+
content: '';
|
|
131
|
+
position: absolute;
|
|
132
|
+
inset: 0;
|
|
133
|
+
border-radius: inherit;
|
|
134
|
+
border: 0.5px solid ${t.colors.muted};
|
|
135
|
+
pointer-events: none;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&[data-selected='true'] {
|
|
139
|
+
background: ${t.colors.media};
|
|
140
|
+
}
|
|
141
|
+
/* The gradient is masked to the border band alone, so the ring paints over nothing: a padding-box fill
|
|
142
|
+
here would sit on top of the row's content, since this layer is above it. */
|
|
143
|
+
&[data-selected='true']::after {
|
|
144
|
+
border: 3px solid transparent;
|
|
145
|
+
background: ${t.gradients.flare} border-box;
|
|
146
|
+
-webkit-mask:
|
|
147
|
+
linear-gradient(#000 0 0) padding-box,
|
|
148
|
+
linear-gradient(#000 0 0);
|
|
149
|
+
-webkit-mask-composite: xor;
|
|
150
|
+
mask-composite: exclude;
|
|
151
|
+
}
|
|
152
|
+
&[data-disabled='true'] {
|
|
153
|
+
cursor: not-allowed;
|
|
154
|
+
opacity: 0.55;
|
|
155
|
+
}
|
|
156
|
+
&:focus-visible {
|
|
157
|
+
outline: 2px solid ${t.colors.accent};
|
|
158
|
+
outline-offset: 2px;
|
|
159
|
+
}
|
|
160
|
+
`,O=i.div`
|
|
161
|
+
flex: none;
|
|
162
|
+
display: flex;
|
|
163
|
+
align-items: center;
|
|
164
|
+
justify-content: center;
|
|
165
|
+
min-width: 36px;
|
|
166
|
+
/* 12px on the left (per review) so the control clears the row's rounded corner; 9px elsewhere. */
|
|
167
|
+
padding: 9px 9px 9px 12px;
|
|
168
|
+
`,M=i.span`
|
|
169
|
+
display: grid;
|
|
170
|
+
place-items: center;
|
|
171
|
+
width: 20px;
|
|
172
|
+
height: 20px;
|
|
173
|
+
border-radius: 4px;
|
|
174
|
+
border: 2px solid ${t.colors.muted2};
|
|
175
|
+
background: ${t.colors.white};
|
|
176
|
+
|
|
177
|
+
&[data-checked='true'] {
|
|
178
|
+
border-color: ${t.colors.text};
|
|
179
|
+
background: ${t.colors.text};
|
|
180
|
+
}
|
|
181
|
+
.ico {
|
|
182
|
+
width: 14px;
|
|
183
|
+
height: 14px;
|
|
184
|
+
background: ${t.colors.white};
|
|
185
|
+
}
|
|
186
|
+
`,J=i.div`
|
|
187
|
+
flex: 1 1 0;
|
|
188
|
+
min-width: 0;
|
|
189
|
+
display: flex;
|
|
190
|
+
align-items: center;
|
|
191
|
+
justify-content: space-between;
|
|
192
|
+
gap: 8px;
|
|
193
|
+
`,C=i.div`
|
|
194
|
+
display: flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
gap: 13px;
|
|
197
|
+
min-width: 0;
|
|
198
|
+
`,D=i.span`
|
|
199
|
+
flex: none;
|
|
200
|
+
display: grid;
|
|
201
|
+
place-items: center;
|
|
202
|
+
`,E=i.img`
|
|
203
|
+
flex: none;
|
|
204
|
+
display: block;
|
|
205
|
+
width: ${({w:s})=>s}px;
|
|
206
|
+
height: ${({h:s})=>s}px;
|
|
207
|
+
object-fit: contain;
|
|
208
|
+
`,H=i.div`
|
|
209
|
+
display: flex;
|
|
210
|
+
flex-direction: column;
|
|
211
|
+
min-width: 0;
|
|
212
|
+
`,L=i.span`
|
|
213
|
+
text-transform: capitalize;
|
|
214
|
+
font-family: ${t.font.sans};
|
|
215
|
+
font-weight: 700;
|
|
216
|
+
font-size: 15px;
|
|
217
|
+
line-height: 26px;
|
|
218
|
+
letter-spacing: -0.2px;
|
|
219
|
+
color: ${t.colors.text2};
|
|
220
|
+
`,F=i.span`
|
|
221
|
+
display: flex;
|
|
222
|
+
align-items: center;
|
|
223
|
+
gap: 4px;
|
|
224
|
+
font-family: ${t.font.sans};
|
|
225
|
+
font-size: 12px;
|
|
226
|
+
line-height: 1;
|
|
227
|
+
color: ${t.colors.muted1};
|
|
228
|
+
|
|
229
|
+
/* A 13px slot holding a 10.4px glyph. */
|
|
230
|
+
.ico {
|
|
231
|
+
width: 13px;
|
|
232
|
+
height: 13px;
|
|
233
|
+
background: ${t.colors.text};
|
|
234
|
+
-webkit-mask-size: 10.4px 10.4px;
|
|
235
|
+
mask-size: 10.4px 10.4px;
|
|
236
|
+
-webkit-mask-position: left center;
|
|
237
|
+
mask-position: left center;
|
|
238
|
+
}
|
|
239
|
+
`,Z=i.span`
|
|
240
|
+
font-size: 10.4px;
|
|
241
|
+
color: ${t.colors.text};
|
|
242
|
+
`;i.span`
|
|
243
|
+
font-family: ${t.font.sans};
|
|
244
|
+
font-size: 12px;
|
|
245
|
+
font-weight: 600;
|
|
246
|
+
color: ${t.colors.dclRed};
|
|
247
|
+
`;const X=i.div`
|
|
248
|
+
flex: none;
|
|
249
|
+
display: flex;
|
|
250
|
+
align-items: center;
|
|
251
|
+
gap: 6px;
|
|
252
|
+
|
|
253
|
+
.ico {
|
|
254
|
+
width: 24px;
|
|
255
|
+
height: 24px;
|
|
256
|
+
background: ${t.colors.text2};
|
|
257
|
+
-webkit-mask-size: 19.855px 19.855px;
|
|
258
|
+
mask-size: 19.855px 19.855px;
|
|
259
|
+
-webkit-mask-position: left center;
|
|
260
|
+
mask-position: left center;
|
|
261
|
+
}
|
|
262
|
+
span {
|
|
263
|
+
font-family: ${t.font.sans};
|
|
264
|
+
font-weight: 600;
|
|
265
|
+
font-size: 20px;
|
|
266
|
+
color: ${t.colors.text2};
|
|
267
|
+
}
|
|
268
|
+
`,T=i.div`
|
|
269
|
+
flex: none;
|
|
270
|
+
display: flex;
|
|
271
|
+
flex-direction: column;
|
|
272
|
+
align-items: flex-end;
|
|
273
|
+
gap: 2px;
|
|
274
|
+
`,pe=i.button`
|
|
275
|
+
width: 100%;
|
|
276
|
+
height: 46px;
|
|
277
|
+
border: 0;
|
|
278
|
+
border-radius: 12px;
|
|
279
|
+
cursor: pointer;
|
|
280
|
+
background: ${t.gradients.amethyst};
|
|
281
|
+
color: ${t.colors.softWhite};
|
|
282
|
+
font-family: ${t.font.sans};
|
|
283
|
+
font-weight: 600;
|
|
284
|
+
font-size: 15px;
|
|
285
|
+
line-height: 24px;
|
|
286
|
+
letter-spacing: 0.46px;
|
|
287
|
+
text-transform: uppercase;
|
|
288
|
+
|
|
289
|
+
&:hover:not(:disabled) {
|
|
290
|
+
filter: brightness(1.05);
|
|
291
|
+
}
|
|
292
|
+
&:focus-visible {
|
|
293
|
+
outline: 2px solid ${t.colors.accent};
|
|
294
|
+
outline-offset: 2px;
|
|
295
|
+
}
|
|
296
|
+
&:disabled {
|
|
297
|
+
opacity: 0.6;
|
|
298
|
+
cursor: default;
|
|
299
|
+
}
|
|
300
|
+
`,xe=i.img`
|
|
301
|
+
width: 13px;
|
|
302
|
+
height: 13px;
|
|
303
|
+
display: block;
|
|
304
|
+
`,fe=i.img`
|
|
305
|
+
width: 24px;
|
|
306
|
+
height: 24px;
|
|
307
|
+
display: block;
|
|
308
|
+
`;i.span`
|
|
309
|
+
flex: none;
|
|
310
|
+
width: 32px;
|
|
311
|
+
display: grid;
|
|
312
|
+
gap: 2px;
|
|
313
|
+
place-items: center;
|
|
314
|
+
|
|
315
|
+
.ico {
|
|
316
|
+
width: 15px;
|
|
317
|
+
height: 15px;
|
|
318
|
+
background: ${t.colors.text2};
|
|
319
|
+
}
|
|
320
|
+
img {
|
|
321
|
+
width: 15px;
|
|
322
|
+
height: 15px;
|
|
323
|
+
display: block;
|
|
324
|
+
}
|
|
325
|
+
`;i.div`
|
|
326
|
+
flex: none;
|
|
327
|
+
display: flex;
|
|
328
|
+
align-items: center;
|
|
329
|
+
gap: 4px;
|
|
330
|
+
|
|
331
|
+
.ico {
|
|
332
|
+
width: 18px;
|
|
333
|
+
height: 18px;
|
|
334
|
+
background: ${t.colors.text2};
|
|
335
|
+
}
|
|
336
|
+
img {
|
|
337
|
+
width: 18px;
|
|
338
|
+
height: 18px;
|
|
339
|
+
display: block;
|
|
340
|
+
}
|
|
341
|
+
span {
|
|
342
|
+
font-family: ${t.font.sans};
|
|
343
|
+
font-weight: 600;
|
|
344
|
+
font-size: 17px;
|
|
345
|
+
color: ${t.colors.text2};
|
|
346
|
+
}
|
|
347
|
+
`;i.span`
|
|
348
|
+
font-family: ${t.font.sans};
|
|
349
|
+
font-weight: 600;
|
|
350
|
+
font-size: 15px;
|
|
351
|
+
color: ${t.colors.muted};
|
|
352
|
+
`;const he=i.span`
|
|
353
|
+
font-family: ${t.font.sans};
|
|
354
|
+
font-size: 11px;
|
|
355
|
+
line-height: 1.35;
|
|
356
|
+
color: ${t.colors.muted};
|
|
357
|
+
`,me=i.p`
|
|
358
|
+
display: flex;
|
|
359
|
+
align-items: flex-start;
|
|
360
|
+
gap: 12px;
|
|
361
|
+
margin: 0;
|
|
362
|
+
background: rgba(255, 162, 90, 0.3);
|
|
363
|
+
border-radius: ${t.radius.btn};
|
|
364
|
+
padding: 16px;
|
|
365
|
+
font-family: ${t.font.sans};
|
|
366
|
+
font-size: 14px;
|
|
367
|
+
line-height: 1.334;
|
|
368
|
+
color: ${t.colors.text2};
|
|
369
|
+
`;function we({asset:s,priceCredits:m,priceCents:A,options:b,priceManaWei:W,balanceCredits:K,manaBalanceWei:Y,onBuy:N,onClose:Q,busy:u=!1,notice:v}){const d=b.find(n=>n.method==="credits")??null,l=b.find(n=>n.method==="mana")??null,a=b.find(n=>n.method==="combined")??null,[z,I]=P.useState(()=>d?new Set(["credits"]):a?new Set(["credits","mana"]):l?new Set(["mana"]):new Set),g=!!d||!!a,c=!!l||!!a;P.useEffect(()=>{I(n=>{const o=new Set(n);return o.has("credits")&&!g&&o.delete("credits"),o.has("mana")&&!c&&o.delete("mana"),o.size===0&&(d?o.add("credits"):a?(o.add("credits"),o.add("mana")):l&&o.add("mana")),o.size===n.size&&[...o].every(G=>n.has(G))?n:o})},[g,c,d,a,l]);const p=z.has("credits"),x=z.has("mana"),f=p&&x?a?"combined":null:p?d?"credits":null:x&&l?"mana":null,U=f==="combined"&&a?a.credits:(d==null?void 0:d.credits)??q(A),V=f==="combined"&&a?a.manaWei:(l==null?void 0:l.manaWei)??W;function S(n){I(o=>{const h=new Set(o);return h.has(n)?h.delete(n):h.add(n),h})}return e.jsxs(ee,{children:[e.jsxs(te,{children:[e.jsx(ie,{children:r("buyModal.choosePayment")}),e.jsx(se,{onClick:Q,disabled:u,"aria-label":r("buyModal.close"),children:e.jsx(w,{name:"close",className:"ico"})})]}),e.jsxs(ne,{children:[e.jsx(oe,{children:s.thumb}),e.jsxs(ae,{children:[e.jsxs("div",{children:[e.jsx(de,{title:s.name,children:s.name||r("buyModal.itemFallback")}),s.caption?e.jsx(le,{children:s.caption}):null]}),e.jsxs(re,{children:[e.jsx(y,{}),e.jsx("span",{children:j(m)})]})]})]}),e.jsxs(ce,{children:[e.jsxs(B,{type:"button","data-testid":"pay-with-credits","data-selected":p,"data-disabled":!g,disabled:u||!g,"aria-pressed":p,onClick:()=>S("credits"),children:[e.jsx(O,{children:e.jsx(M,{"data-checked":p,children:e.jsx(w,{name:"check",className:"ico"})})}),e.jsxs(J,{children:[e.jsxs(C,{children:[e.jsx(D,{children:e.jsx(E,{src:_,w:32.582,h:34.401,alt:"","aria-hidden":!0})}),e.jsxs(H,{children:[e.jsx(L,{children:$.name}),e.jsxs(F,{children:[r("buyModal.creditsBalanceLabel"),e.jsx(y,{}),e.jsx(Z,{children:j(K)})]})]})]}),e.jsx(T,{children:e.jsxs(X,{children:[e.jsx(y,{}),e.jsx("span",{children:j(U)})]})})]})]}),e.jsxs(B,{type:"button","data-testid":"pay-with-mana","data-selected":x,"data-disabled":!c,disabled:u||!c,"aria-pressed":x,onClick:()=>S("mana"),children:[e.jsx(O,{children:e.jsx(M,{"data-checked":x,children:e.jsx(w,{name:"check",className:"ico"})})}),e.jsxs(J,{children:[e.jsxs(C,{children:[e.jsx(D,{children:e.jsx(E,{src:k,w:35.328,h:35.328,alt:"","aria-hidden":!0})}),e.jsxs(H,{children:[e.jsx(L,{children:r("buyModal.methodMana")}),e.jsxs(F,{children:[r("buyModal.manaBalanceLabel"),e.jsx(xe,{src:k,alt:"","aria-hidden":!0}),e.jsx(Z,{children:R(Y)})]})]})]}),e.jsx(T,{children:c?e.jsx(e.Fragment,{children:e.jsxs(X,{children:[e.jsx(fe,{src:k,alt:"","aria-hidden":!0}),e.jsx("span",{children:R(V)})]})}):e.jsx(he,{"data-testid":"mana-shortfall-note",children:r("buyModal.notEnoughMana")})})]})]})]}),v?e.jsx(me,{"data-testid":"price-changed",role:"status",children:v}):null,e.jsx(pe,{type:"button","data-testid":"confirm-payment",disabled:u||f===null,onClick:()=>f&&N(f),children:r("buyModal.buy")})]})}export{we as P};
|
|
370
|
+
//# sourceMappingURL=PaymentMethodStep-gIGuBdJE.js.map
|