@dcl/shop 1.4.1-31270463822.commit-d816951 → 1.4.1
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-DRduybVV.js → Activity-Bp8Sw4qK.js} +24 -24
- package/_assets/{AnimatedBackground-ypLCVsPZ.js → AnimatedBackground-lL_07dfc.js} +1 -1
- package/_assets/{Assets-Cwv_G3fi.js → Assets-IJnjhA4j.js} +7 -7
- package/_assets/{Assets.styles-DPnoon7Z.js → Assets.styles-DvKHdPv2.js} +1 -1
- package/_assets/{Authorizations-D6ULsW9E.js → Authorizations-Dik9aSxH.js} +1 -1
- package/_assets/{Cart-CQO5e78H.js → Cart-pNR-1Udw.js} +1 -1
- package/_assets/{CircularProgress-DLhxWHZE.js → CircularProgress-Be3b2-j-.js} +1 -1
- package/_assets/{Collection-Dujbxbtk.js → Collection-CC0NQbio.js} +1 -1
- package/_assets/{CollectionCarousel-BuxdLEjb.js → CollectionCarousel-CbSaEpnt.js} +2 -2
- package/_assets/{Confetti-DgKI9CE0.js → Confetti-CsLfYVYK.js} +1 -1
- package/_assets/{Creator-UxVsIlzx.js → Creator-BHrSc3yG.js} +1 -1
- package/_assets/{ErrorNotice-Ce7lGsYT.js → ErrorNotice-85K9YN9v.js} +1 -1
- package/_assets/{ExchangeController-DuD0bbgT.js → ExchangeController-pCPaWVPt.js} +1 -1
- package/_assets/{Faq-BOc22i5I.js → Faq-TM-W-SNb.js} +1 -1
- package/_assets/{GetCredits-BsP8gUID.js → GetCredits-DdXr31aY.js} +1 -1
- package/_assets/{Grow-t2UFwA6e.js → Grow-ChVTGdeq.js} +1 -1
- package/_assets/{HelpersUtil-BZkorgZo.js → HelpersUtil-Ic5GpN9l.js} +1 -1
- package/_assets/{ItemDetail-B04NYAZe.js → ItemDetail-CyOs-AQj.js} +1 -1
- package/_assets/LazyEmoteControls-CkOxDI6U.js +2 -0
- package/_assets/{LoadMore-BiqDnpiK.js → LoadMore-CZrX5Gv7.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-CwLEZBYt.js → ManaPricingBanner.styles-BKaFLBUK.js} +1 -1
- package/_assets/{MyAssets-B-BQ0Gvo.js → MyAssets-BQCzzNvz.js} +2 -2
- package/_assets/{MyFavorites-HoGz-hoR.js → MyFavorites-BqzCIYTK.js} +1 -1
- package/_assets/{NotFound-BGcJ8gYV.js → NotFound-BHSNy_W9.js} +1 -1
- package/_assets/{NotificationsBell-DhVP1k-e.js → NotificationsBell-Cayv1bNv.js} +1 -1
- package/_assets/{OutfitDetail-BVdTdbU8.js → OutfitDetail-BTWKm6JG.js} +1 -1
- package/_assets/{OutfitPreview-Dc8OljjJ.js → OutfitPreview-D11FWLSw.js} +1 -1
- package/_assets/{OutfitStudio-CdFWnwOk.js → OutfitStudio-dGwku2rf.js} +1 -1
- package/_assets/{StoreSettings-C5zvB9ig.js → StoreSettings-CitNcyvk.js} +1 -1
- package/_assets/{Success-wVR2FEwa.js → Success-D4YuNuG8.js} +1 -1
- package/_assets/{SwapController-BmDxMQDQ.js → SwapController-C5PTgP9M.js} +1 -1
- package/_assets/{Tooltip-DmJBOJG4.js → Tooltip-B8fVdcBn.js} +1 -1
- package/_assets/{TradeService-BOVZw_cj.js → TradeService-gwq3auT8.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-CW1PUUTw.js → W3MFrameProviderSingleton-CpAC0lb5.js} +3 -3
- package/_assets/{WebCryptoP256-BJtPdt0B.js → WebCryptoP256-BdZ7qw2f.js} +1 -1
- package/_assets/{authorizations-C1arBETV.js → authorizations-DF77DF8l.js} +1 -1
- package/_assets/{basic-DsaYVSJa.js → basic-BzrBYDLn.js} +1 -1
- package/_assets/{biconomy-CdlDa34k.js → biconomy-D0NqkYS4.js} +1 -1
- package/_assets/{builder-KOO6PWgS.js → builder-NgL-D1DH.js} +1 -1
- package/_assets/{buy-M73sUQEC.js → buy-BO3reV5y.js} +1 -1
- package/_assets/{buy-gasless-B04We20s.js → buy-gasless-D-P_OEFk.js} +1 -1
- package/_assets/{categories-D6lgqZ-J.js → categories-DEDiLarq.js} +1 -1
- package/_assets/{ccip-u425zS87.js → ccip-CKxxDuCA.js} +1 -1
- package/_assets/{ccip-DyPtCXe7.js → ccip-CrlybRWE.js} +1 -1
- package/_assets/{collectionPage.styles-DArUMgMV.js → collectionPage.styles-B7luoUwY.js} +4 -4
- package/_assets/{controller-0MuFE3Gz.js → controller-D-WxJPwg.js} +2 -2
- package/_assets/{core-94MvqV9r.js → core-B2vVQmfh.js} +4 -4
- package/_assets/{createSvgIcon-WVKovDz9.js → createSvgIcon-BpHWx1Ka.js} +1 -1
- package/_assets/{custom-Ce3DNkNI.js → custom-CxNQPA4R.js} +1 -1
- package/_assets/{data-capture-BAWa7qDw.js → data-capture-COq-EdMa.js} +1 -1
- package/_assets/{email-Cr0XOmY6.js → email-T9V3sqd1.js} +1 -1
- package/_assets/{embedded-wallet-DwCd7IHR.js → embedded-wallet-Dg7uu1gY.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-BEfi2ynx.js → emotion-styled.browser.esm-DGNmaOEg.js} +1 -1
- package/_assets/{engine-CeV65-ng.js → engine-B6OKL1kN.js} +1 -1
- package/_assets/{errors-D2Oxm3fm.js → errors-ByuDglQO.js} +1 -1
- package/_assets/{estimate-l1-fee-BaiEAtA8.js → estimate-l1-fee-U77A6DZp.js} +1 -1
- package/_assets/{execute-D1vpEx_6.js → execute-BKGpV3HT.js} +2 -2
- package/_assets/{features-xL7U_YA_.js → features-B_0m5qAO.js} +1 -1
- package/_assets/{fetchTokenMetadata-CbzSe8vV.js → fetchTokenMetadata-BLkwh0vx.js} +2 -2
- package/_assets/{field.styles-M7cznL3G.js → field.styles-Di2XxH4G.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-GCURfOgC.js → get-ecosystem-wallet-info-DcdrlNuu.js} +1 -1
- package/_assets/{getBalance-B8Ul3w-q.js → getBalance-XiFtLwlO.js} +1 -1
- package/_assets/{getNFT-ChCvt1Pa.js → getNFT-Bmd84BZn.js} +1 -1
- package/_assets/{getNFT-Bo7oToRD.js → getNFT-BywN0Kux.js} +1 -1
- package/_assets/{grid.styles-SyT_GsJ_.js → grid.styles-CHyL7A8J.js} +1 -1
- package/_assets/{hashTypedData-DYmarbOl.js → hashTypedData-CPoOrHdV.js} +1 -1
- package/_assets/{hashTypedData-Drw1v4Gy.js → hashTypedData-D6j6Ztal.js} +1 -1
- package/_assets/{in-app-a_vaCizu.js → in-app-bZq5TT4x.js} +1 -1
- package/_assets/{in-app-wallet-calls-BPQLmHd_.js → in-app-wallet-calls-zHwhzKhq.js} +1 -1
- package/_assets/{index-BnPkJ78u.js → index-2FoefM9Q.js} +1 -1
- package/_assets/{index-2yXtFC3w.js → index-5bRECx6a.js} +1 -1
- package/_assets/{index-hZagCJ_-.js → index-6jfgxkro.js} +1 -1
- package/_assets/{index-CoZetxg0.js → index-B1FHWlJe.js} +1 -1
- package/_assets/{index-B22HUskl.js → index-BFMoyHW0.js} +1 -1
- package/_assets/{index-CDT-f5kR.js → index-BHzsqUc8.js} +1 -1
- package/_assets/{index-C4KlFepO.js → index-BPlrOFTC.js} +1 -1
- package/_assets/{index-BLgEoAMc.js → index-BQ9JyrRe.js} +1 -1
- package/_assets/{index-7h3SJCpU.js → index-BSn1_2Zj.js} +1 -1
- package/_assets/{index-Bo8PlEzQ.js → index-BZ1hhBx4.js} +1 -1
- package/_assets/{index-WAgD6WPQ.js → index-BZGM9FWk.js} +1 -1
- package/_assets/{index-C35WtbE5.js → index-BbJAHpzm.js} +1 -1
- package/_assets/{index-C8RkDmvI.js → index-BcgGNlqh.js} +2 -2
- package/_assets/{index-Bm5-3PXX.js → index-BsW8Eyey.js} +1 -1
- package/_assets/{index-BtMueIRm.js → index-ByuFbmZ8.js} +1 -1
- package/_assets/{index-NZglH3wv.js → index-C4jkL4id.js} +1 -1
- package/_assets/{index-B6D4YICs.js → index-C617s7dD.js} +1 -1
- package/_assets/{index-DEECJUIl.js → index-CNswf2xV.js} +1 -1
- package/_assets/{index-BXnelBcK.js → index-C__aQGZ3.js} +1 -1
- package/_assets/{index-xyDGbsu7.js → index-CfoYiHeb.js} +2 -2
- package/_assets/{index-BYMZCtEX.js → index-Cm_4zTDf.js} +3 -3
- package/_assets/{index-B8l9BXVE.js → index-Cn8WVps3.js} +1 -1
- package/_assets/{index-BLTpEQOz.js → index-CntdB4i7.js} +1 -1
- package/_assets/{index-CTlOaM0r.js → index-Coy9djZY.js} +1 -1
- package/_assets/{index-BJ7QDORu.js → index-CtQ9l7ML.js} +1 -1
- package/_assets/{index-u6d-Hhga.js → index-CteyodZT.js} +3 -3
- package/_assets/{index-BOQ3wHjU.js → index-CuVgNl3Y.js} +1 -1
- package/_assets/{index-BvG65AZz.js → index-CvqOZGzt.js} +1 -1
- package/_assets/{index-C489Mrmb.js → index-CxWIzN3m.js} +1 -1
- package/_assets/{index-DNsu9EnW.js → index-D00IKQW6.js} +1 -1
- package/_assets/{index-siSK96BI.js → index-D24PzU1R.js} +3 -3
- package/_assets/{index-Bf38MyW2.js → index-D3IKI6V4.js} +1 -1
- package/_assets/{index-DZ2zOH0O.js → index-D4yUYJLc.js} +1 -1
- package/_assets/{index-BXK7U_aX.js → index-D7XGzB3c.js} +1 -1
- package/_assets/{index--ud9yc1V.js → index-DF4Ha-75.js} +1 -1
- package/_assets/{index-BWubgfNg.js → index-DIketzHJ.js} +1 -1
- package/_assets/{index-DRK-ZYhT.js → index-DPM_2inZ.js} +1 -1
- package/_assets/{index-DChQ_aNN.js → index-DPtintqP.js} +1 -1
- package/_assets/{index-oTvtIcJO.js → index-Di-TSk-N.js} +1 -1
- package/_assets/{index-DJ8_ExxR.js → index-Dp3NEgRA.js} +2 -2
- package/_assets/{index--6xa_84e.js → index-DrWafdvv.js} +1 -1
- package/_assets/{index-YLh9o5JS.js → index-DtzuonLF.js} +1 -1
- package/_assets/{index-B51NwmXP.js → index-DwSMiBZJ.js} +1 -1
- package/_assets/{index-BMDEszE5.js → index-Dwdhqx6d.js} +1 -1
- package/_assets/{index-_IfC7BYG.js → index-ExVTqMiG.js} +1 -1
- package/_assets/{index-CMxdP6bK.js → index-V2TPPzBO.js} +1 -1
- package/_assets/{index-MGR8iOdq.js → index-Xxhqhd7B.js} +1 -1
- package/_assets/{index-D9fdrY1Y.js → index-dfp4J94C.js} +1 -1
- package/_assets/{index-wv69CvU6.js → index-drIus9if.js} +1 -1
- package/_assets/{index-CSb_9996.js → index-hUIzKCfu.js} +1 -1
- package/_assets/{index-BzGWS8ln.js → index-uGopMLx_.js} +67 -67
- package/_assets/{index-DQSjD6iE.js → index-yx-xGak5.js} +1 -1
- package/_assets/{index.es-DdiRHtEp.js → index.es-7a-YRioH.js} +1 -1
- package/_assets/{index.es-C0xQ9UwN.js → index.es-BFjxQxKe.js} +1 -1
- package/_assets/{index.es-CDVFQNzM.js → index.es-DWauw0u3.js} +4 -4
- package/_assets/{localBatchGatewayRequest-peECUp5W.js → localBatchGatewayRequest-0VkJzsEN.js} +1 -1
- package/_assets/{networks-BaamH2vu.js → networks-DyQsWWgA.js} +1 -1
- package/_assets/{onramp-CMdgEVET.js → onramp-DzK_7EqG.js} +1 -1
- package/_assets/{openzeppelin-DIm1JWyK.js → openzeppelin-BtnpZFcF.js} +1 -1
- package/_assets/{parseNft-tHUKXiwx.js → parseNft-DVNQcQTW.js} +2 -2
- package/_assets/{parseSignature-BlcmAmYI.js → parseSignature-d_qU1nsa.js} +3 -3
- package/_assets/{parseSignature-DyEannI8.js → parseSignature-uahxpo6h.js} +1 -1
- package/_assets/{passkeys-BGingCMs.js → passkeys-DCXgcJ3i.js} +1 -1
- package/_assets/{pay-with-exchange-DVNVJXkL.js → pay-with-exchange-BAKpQWUa.js} +1 -1
- package/_assets/{qr-overlay-CfVKqNDZ.js → qr-overlay-cF8AYPXz.js} +1 -1
- package/_assets/{receive-s4vwQksb.js → receive-DKeQiKpb.js} +1 -1
- package/_assets/{resolveImplementation-CtJMMHNn.js → resolveImplementation-BbMBWFik.js} +1 -1
- package/_assets/{rpc-L1fXd1Sd.js → rpc-B_5Ot3q6.js} +1 -1
- package/_assets/{secp256k1-CTZes-uV.js → secp256k1-BJ5_5ze6.js} +1 -1
- package/_assets/{secp256k1-z67sN914.js → secp256k1-C2MsrfGW.js} +1 -1
- package/_assets/{secp256k1-DHUNQ5bk.js → secp256k1-vgDnLeQE.js} +1 -1
- package/_assets/{send-CbigwlGz.js → send-DRkbPGAy.js} +1 -1
- package/_assets/{send-batch-transaction-koPW-Xx-.js → send-batch-transaction-C98vx0Si.js} +1 -1
- package/_assets/{send-eip712-transaction-D_0yg9Nh.js → send-eip712-transaction-B9uhwtxq.js} +2 -2
- package/_assets/{send-gasless-transaction-DHTCbZYH.js → send-gasless-transaction-DlAx-hhk.js} +2 -2
- package/_assets/{send-transaction-vVmLV10q.js → send-transaction-D7omgpzp.js} +2 -2
- package/_assets/{sendMetaTransaction-Cha0OHLb.js → sendMetaTransaction-o2u8XwNS.js} +1 -1
- package/_assets/{sendRawTransaction-CVp_7MRP.js → sendRawTransaction-DevIof93.js} +3 -3
- package/_assets/{serializeTransaction-Cqo7tlLM.js → serializeTransaction-DLeETOYT.js} +1 -1
- package/_assets/{session-proposal-C2uAA2u5.js → session-proposal-KU3_N1na.js} +1 -1
- package/_assets/{session-request-BlpO5ZV_.js → session-request-uPrgrHzK.js} +2 -2
- package/_assets/{signing-D6VaYziU.js → signing-QBKrHvr9.js} +3 -3
- package/_assets/{skeleton.styles-PDRIkUUL.js → skeleton.styles-BC9MqXiU.js} +1 -1
- package/_assets/{socials-CYBI3Ubm.js → socials-CoKeQXiF.js} +1 -1
- package/_assets/{styled-D4QGMvI6.js → styled-DOIj5nPF.js} +1 -1
- package/_assets/{swaps-FcdbmTiI.js → swaps-CRzxJol6.js} +1 -1
- package/_assets/{thirdweb-CTcb9atG.js → thirdweb-C12p7UHc.js} +3 -3
- package/_assets/{to-serializable-transaction-DmYzeFAP.js → to-serializable-transaction-VMfkzTnh.js} +2 -2
- package/_assets/{transactionReceipt-CYlPad05.js → transactionReceipt-BD6aaYgU.js} +1 -1
- package/_assets/{transactions-BnGm7i4k.js → transactions-eYCJ_4w6.js} +1 -1
- package/_assets/{useCreditPacks-DtBkBG2H.js → useCreditPacks-A5RBl1MB.js} +1 -1
- package/_assets/{useImportable-21fWQPLj.js → useImportable-DsSOJu2h.js} +1 -1
- package/_assets/{useInfiniteGrid-Dx4PYR2K.js → useInfiniteGrid-BSzq15pV.js} +1 -1
- package/_assets/{useStore-C53ctj6V.js → useStore-Cus0x1de.js} +1 -1
- package/_assets/{useTheme-crJpDWt-.js → useTheme-BRanpp9G.js} +1 -1
- package/_assets/{verifyHash-7YoL5c_b.js → verifyHash-B4ZiNM58.js} +1 -1
- package/_assets/{w3m-modal-BI79L6Y4.js → w3m-modal-CC3uZxtJ.js} +1 -1
- package/_assets/{w3m-modal-DKGkgUce.js → w3m-modal-DjOtYjTK.js} +1 -1
- package/_assets/{wait-for-tx-receipt-D_Gb9jAL.js → wait-for-tx-receipt-BnCyfeD5.js} +1 -1
- package/_assets/{wallets-DSYNibaO.js → wallets-HnCmZe2C.js} +5 -5
- package/_assets/{web-connector-Dp__jGfa.js → web-connector-Bx6u3JDC.js} +3 -3
- package/_assets/{writeContract-cBq5zJm-.js → writeContract-BD-47Gns.js} +1 -1
- package/_assets/{zoraTestnet-93TlIFkU.js → zoraTestnet-Uh6KMdOq.js} +1 -1
- package/index.html +11 -11
- package/package.json +1 -1
- package/_assets/LazyEmoteControls-Bk_SueO8.js +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-
|
|
2
|
-
import{q as
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-CuVgNl3Y.js","_assets/react-BYHuwl8r.js","_assets/index-uGopMLx_.js","_assets/dcl-schemas-CmtP3U6y.js","_assets/sentry-Dx-KuLV3.js","_assets/ethers-CFqPm_mN.js","_assets/intl-CBcMB1D2.js","_assets/index-l2QjlKjX.css","_assets/useImportable-DsSOJu2h.js","_assets/buy-BO3reV5y.js","_assets/authorizations-DF77DF8l.js","_assets/sendMetaTransaction-o2u8XwNS.js","_assets/ManaPricingBanner.styles-BKaFLBUK.js","_assets/Faq-TM-W-SNb.js","_assets/field.styles-Di2XxH4G.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{q as Ae,bF as Ee,v as O,l as A,bG as $e,t as n,s as l,x as Le,B as Pe,y as Ne,b as r,an as Te,I as E,bH as ie,bI as se,bJ as Se,_ as Fe,A as N,bK as Ce,D as De,aF as W,L as Me,bL as He,F as $,bM as qe,bN as _}from"./index-uGopMLx_.js";import{r as g,u as ze,j as t,L as oe,e as Re}from"./react-BYHuwl8r.js";import{u as Oe}from"./useImportable-DsSOJu2h.js";import{L as We}from"./LoadMore-CZrX5Gv7.js";import{u as L}from"./useInfiniteGrid-BSzq15pV.js";import{m as de}from"./mana-matic-C4e1sNO3.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-CFqPm_mN.js";import"./intl-CBcMB1D2.js";import"./buy-BO3reV5y.js";import"./authorizations-DF77DF8l.js";import"./sendMetaTransaction-o2u8XwNS.js";const _e=15e3;function Ge(e,s){return e.txHash&&s.txHash?e.txHash===s.txHash:e.txHash||s.txHash?!1:e.status===s.status&&Math.abs(e.createdAt-s.createdAt)<=_e}function Ue(e){const s=[...e].sort((i,d)=>d.createdAt-i.createdAt),a=[];for(const i of s){const d=a[a.length-1];d&&Ge(d[d.length-1],i)?d.push(i):a.push([i])}return a.map(i=>{var d;return{id:((d=i.find(o=>o.txHash))==null?void 0:d.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(o=>o.createdAt)),status:Be(i),totalCredits:i.reduce((o,h)=>o+h.credits,0),lines:i}})}function Be(e){return e.some(s=>s.status==="PENDING")?"PENDING":e.some(s=>s.status==="SETTLED")?"SETTLED":"EXPIRED"}function Ke(e){return e==="SETTLED"?"SETTLED":e==="EXPIRED"?"FAILED":"PENDING"}function Qe(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Xe(e){const s=[],a=new Map;for(const i of e){const d=Qe(i);if(!d){s.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const o=a.get(d);if(o){o.quantity+=1,o.credits+=i.credits;continue}const h={key:d,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};a.set(d,h),s.push(h)}return s}function Ve(e,s){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:s?Ae(e.manaWei,s):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function Ye(e){return e.status!=="EXPIRED"||!!e.submittedTxHash}function Je(e){const a=Ue(e.purchases.filter(Ye)).map(c=>({kind:"purchase",id:`purchase:${c.id}`,createdAt:c.createdAt,order:c})),i=e.sales.map(c=>{const m=Ve(c,e.rate);return{kind:"sale",id:`sale:${m.id}`,createdAt:m.createdAt,sale:m}}),d=(e.creditOrders??[]).filter(c=>c.status!=="failed"&&c.status!=="abandoned").map(c=>({kind:"credit",id:`credit:${c.id}`,createdAt:c.createdAt,order:c})),o=new Set(e.purchases.filter(c=>c.txHash).map(c=>c.txHash.toLowerCase())),h=(e.manaPurchases??[]).filter(c=>!o.has(c.txHash.toLowerCase())).map(c=>({kind:"mana-purchase",id:`mana-purchase:${c.id}`,createdAt:c.createdAt,sale:c}));return[...a,...i,...d,...h].sort((c,m)=>m.createdAt-c.createdAt||(c.id<m.id?-1:1))}function Ze(e,s){return s==="all"?e:s==="sales"?e.filter(a=>a.kind==="sale"):e.filter(a=>a.kind==="purchase"||a.kind==="credit"||a.kind==="mana-purchase")}const ce=e=>e.trim().toLowerCase();function et(e){const s=new Map;for(const a of e??[]){const i=ce(a.txHash??"");if(!i)continue;const d=s.get(i);d?d.push(a):s.set(i,[a])}return s}function tt(e,s,a=Date.now()){const i=s.txHash?e.get(ce(s.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const d=i.length===1?it(i[0].netCents):null,o=i.filter(c=>!c.available&&c.availableAt>a);if(o.length===0)return{kind:"credited",credits:d};const h=o.reduce((c,m)=>Math.max(c,m.availableAt),0);return{kind:"pending",credits:d,availableAt:h}}function it(e){return Ee(e)}function st(){const e=O(i=>{var d;return(d=i.session)==null?void 0:d.address}),{data:s,isLoading:a}=A({queryKey:["listing-count",e],queryFn:()=>$e({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:s==null?void 0:s.total,isLoading:a}}const nt="https://cdn.decentraland.org/@dcl/shop/1.4.1/_assets/credits-product-vs4Q6u6l.svg",G=Le`
|
|
3
3
|
0% { background-position: 200% 0; }
|
|
4
4
|
100% { background-position: -200% 0; }
|
|
5
|
-
`,
|
|
5
|
+
`,at=l.section`
|
|
6
6
|
width: 100%;
|
|
7
7
|
min-width: 0;
|
|
8
8
|
min-height: 60vh;
|
|
@@ -15,24 +15,24 @@ import{q as At,bF as Et,v as O,l as A,bG as $t,t as n,s as l,x as Lt,B as Pt,y a
|
|
|
15
15
|
as the page reloading rather than as a filter changing. */
|
|
16
16
|
max-width: 1003px;
|
|
17
17
|
margin-inline: auto;
|
|
18
|
-
`,
|
|
18
|
+
`,rt=l.div`
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: baseline;
|
|
21
21
|
gap: 12px;
|
|
22
22
|
margin-bottom: 20px;
|
|
23
|
-
`,
|
|
23
|
+
`,ot=l.h1`
|
|
24
24
|
font-family: ${n.font.sans};
|
|
25
25
|
margin: 0;
|
|
26
26
|
color: ${n.colors.softWhite};
|
|
27
27
|
`;l.span`
|
|
28
28
|
color: ${n.colors.gray4};
|
|
29
29
|
font-size: 14px;
|
|
30
|
-
`;const
|
|
30
|
+
`;const dt=l.div`
|
|
31
31
|
display: flex;
|
|
32
32
|
gap: 8px;
|
|
33
33
|
margin-bottom: 20px;
|
|
34
34
|
flex-wrap: wrap;
|
|
35
|
-
`,
|
|
35
|
+
`,le=l.button`
|
|
36
36
|
appearance: none;
|
|
37
37
|
/* Figma 2275:294685 / 294707: a translucent white pill that fills SOFT-WHITE when it is the one you
|
|
38
38
|
are on, with no border in either state — the outline this used to carry made the selected chip read
|
|
@@ -76,9 +76,9 @@ import{q as At,bF as Et,v as O,l as A,bG as $t,t as n,s as l,x as Lt,B as Pt,y a
|
|
|
76
76
|
&[data-active='true']:focus-visible {
|
|
77
77
|
outline-color: ${n.colors.text};
|
|
78
78
|
}
|
|
79
|
-
`,
|
|
79
|
+
`,ct=l(le)`
|
|
80
80
|
position: relative;
|
|
81
|
-
`,
|
|
81
|
+
`,lt=l.span`
|
|
82
82
|
position: absolute;
|
|
83
83
|
/* The 5.5 / 2.5 the design measures from the pill's outer edge. The chip has no border now, so its
|
|
84
84
|
padding box IS that edge and the offsets no longer carry a hairline's worth on top. */
|
|
@@ -101,9 +101,9 @@ import{q as At,bF as Et,v as O,l as A,bG as $t,t as n,s as l,x as Lt,B as Pt,y a
|
|
|
101
101
|
font-size: 12px;
|
|
102
102
|
line-height: 1.6;
|
|
103
103
|
color: ${n.colors.white};
|
|
104
|
-
`,
|
|
104
|
+
`,ut=l.div`
|
|
105
105
|
min-height: 60vh;
|
|
106
|
-
`,
|
|
106
|
+
`,ne=l.div`
|
|
107
107
|
display: flex;
|
|
108
108
|
flex-direction: column;
|
|
109
109
|
gap: 16px;
|
|
@@ -142,7 +142,7 @@ import{q as At,bF as Et,v as O,l as A,bG as $t,t as n,s as l,x as Lt,B as Pt,y a
|
|
|
142
142
|
/* Pin to the right regardless of how many elements sit on the left (the credit-purchase card adds a
|
|
143
143
|
leading thumbnail, giving the head three children instead of two). */
|
|
144
144
|
margin-left: auto;
|
|
145
|
-
`,
|
|
145
|
+
`,ht=l.div`
|
|
146
146
|
flex: 0 0 auto;
|
|
147
147
|
width: 52px;
|
|
148
148
|
height: 52px;
|
|
@@ -188,7 +188,7 @@ import{q as At,bF as Et,v as O,l as A,bG as $t,t as n,s as l,x as Lt,B as Pt,y a
|
|
|
188
188
|
background: ${n.colors.line};
|
|
189
189
|
color: ${n.colors.muted};
|
|
190
190
|
}
|
|
191
|
-
`,
|
|
191
|
+
`,pt=l.button`
|
|
192
192
|
font-size: 11px;
|
|
193
193
|
font-weight: 700;
|
|
194
194
|
text-transform: uppercase;
|
|
@@ -226,15 +226,15 @@ import{q as At,bF as Et,v as O,l as A,bG as $t,t as n,s as l,x as Lt,B as Pt,y a
|
|
|
226
226
|
&[data-kind='income'] {
|
|
227
227
|
color: ${n.colors.okStrong};
|
|
228
228
|
}
|
|
229
|
-
`,
|
|
229
|
+
`,ue=l.img`
|
|
230
230
|
width: 16px;
|
|
231
231
|
height: 16px;
|
|
232
232
|
vertical-align: -0.15em;
|
|
233
|
-
`,
|
|
233
|
+
`,mt=l.span`
|
|
234
234
|
display: inline-flex;
|
|
235
235
|
align-items: center;
|
|
236
236
|
cursor: pointer;
|
|
237
|
-
`,
|
|
237
|
+
`,xt=l.span`
|
|
238
238
|
position: fixed;
|
|
239
239
|
transform: translateX(-50%);
|
|
240
240
|
padding: 6px 8px;
|
|
@@ -248,7 +248,7 @@ import{q as At,bF as Et,v as O,l as A,bG as $t,t as n,s as l,x as Lt,B as Pt,y a
|
|
|
248
248
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
249
249
|
pointer-events: none;
|
|
250
250
|
z-index: 9999;
|
|
251
|
-
`,
|
|
251
|
+
`,gt=l.p`
|
|
252
252
|
margin: 0;
|
|
253
253
|
/* 18px sides to sit on the same rail as CardHead and Line; no bottom, since Line brings its own 12px. */
|
|
254
254
|
padding: 12px 18px 0;
|
|
@@ -334,7 +334,7 @@ import{q as At,bF as Et,v as O,l as A,bG as $t,t as n,s as l,x as Lt,B as Pt,y a
|
|
|
334
334
|
`,Y=l.span`
|
|
335
335
|
font-size: 13px;
|
|
336
336
|
color: ${n.colors.muted};
|
|
337
|
-
`,
|
|
337
|
+
`,ft=l.div`
|
|
338
338
|
display: flex;
|
|
339
339
|
align-items: center;
|
|
340
340
|
gap: 4px;
|
|
@@ -346,7 +346,7 @@ import{q as At,bF as Et,v as O,l as A,bG as $t,t as n,s as l,x as Lt,B as Pt,y a
|
|
|
346
346
|
width: 14px;
|
|
347
347
|
height: 14px;
|
|
348
348
|
}
|
|
349
|
-
`,
|
|
349
|
+
`,ae=l.div`
|
|
350
350
|
height: 132px;
|
|
351
351
|
border-radius: 16px;
|
|
352
352
|
border: 1px solid transparent;
|
|
@@ -357,7 +357,7 @@ import{q as At,bF as Et,v as O,l as A,bG as $t,t as n,s as l,x as Lt,B as Pt,y a
|
|
|
357
357
|
@media (prefers-reduced-motion: reduce) {
|
|
358
358
|
animation: none;
|
|
359
359
|
}
|
|
360
|
-
`,
|
|
360
|
+
`,he=l.div`
|
|
361
361
|
display: flex;
|
|
362
362
|
flex-direction: column;
|
|
363
363
|
align-items: center;
|
|
@@ -366,13 +366,13 @@ import{q as At,bF as Et,v as O,l as A,bG as $t,t as n,s as l,x as Lt,B as Pt,y a
|
|
|
366
366
|
padding: 90px 20px;
|
|
367
367
|
min-height: 50vh;
|
|
368
368
|
color: ${n.colors.softWhite};
|
|
369
|
-
`,
|
|
369
|
+
`,pe=l.p`
|
|
370
370
|
font-size: 22px;
|
|
371
371
|
font-weight: 700;
|
|
372
372
|
margin: 6px 0 0;
|
|
373
|
-
`,
|
|
373
|
+
`,me=l.p`
|
|
374
374
|
margin: 0;
|
|
375
375
|
color: ${n.colors.softWhite};
|
|
376
|
-
`,
|
|
376
|
+
`,yt=l(Pe)`
|
|
377
377
|
margin-top: 12px;
|
|
378
|
-
`,J=q.withComponent(ot),be=g.lazy(()=>Ft(()=>import("./index-BOQ3wHjU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(t=>({default:t.ImportListings}))),P=24,ve=["all","purchases","sales"],z="section",rt="listings",R="view",je="migrate";function I(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function xt(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function gt(t){const s=Number(t)/1e18;return Number.isFinite(s)?s.toLocaleString("en",{maximumFractionDigits:2}):"0"}function ft({children:t}){const s=g.useRef(null),[a,i]=g.useState(null),d=()=>{var h;const o=(h=s.current)==null?void 0:h.getBoundingClientRect();o&&i({top:o.bottom+8,left:o.left+o.width/2})};return e.jsxs(me,{ref:s,tabIndex:0,onMouseEnter:d,onMouseLeave:()=>i(null),onFocus:d,onBlur:()=>i(null),children:[t,a?Rt.createPortal(e.jsx(xe,{style:{top:a.top,left:a.left},role:"tooltip",children:r("activity.polygonMana")}),document.body):null]})}function we({item:t}){const s=!!t.contractAddress&&!!t.itemId,a=!!t.tradeId||s,{data:i,isLoading:d}=A({queryKey:["order-line-display",t.tradeId,t.contractAddress,t.itemId],queryFn:()=>t.tradeId?qt(t.tradeId):_(t.contractAddress,{itemId:t.itemId}),enabled:a,staleTime:5*6e4}),o=a&&d,h=(i==null?void 0:i.name)??r("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",m=W({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=e.jsxs(e.Fragment,{children:[o?e.jsx(K,{}):e.jsx(B,{children:c?e.jsx("img",{src:c,alt:h}):e.jsx(E,{name:"cart",size:20})}),e.jsxs(Q,{children:[o?e.jsx(V,{}):e.jsx(X,{title:h,children:h}),t.quantity>1?e.jsx(Y,{children:r("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(fe,{children:[e.jsx(N,{className:"ccy-mark"})," ",t.credits]})]});return m?e.jsx(J,{to:m,"data-link":"true",children:f}):e.jsx(q,{children:f})}function ke({order:t}){const s=Xt(t.lines),a=s.reduce((o,h)=>o+h.quantity,0),i=Kt(t.status),d=i==="SETTLED"?r("activity.completed"):i==="FAILED"?r("activity.failed"):r("activity.processing");return e.jsxs(T,{"data-testid":"purchase-order",children:[e.jsxs(S,{children:[e.jsxs(F,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsxs(D,{children:[r("activity.purchaseLabel")," · ",r("activity.itemCount",{count:a})]})]}),e.jsxs(M,{children:[e.jsx(H,{"data-status":i,children:d}),e.jsxs(w,{children:[e.jsx(N,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),i==="FAILED"?e.jsx(ge,{children:r("activity.purchaseFailedNote")}):null,e.jsx(U,{children:s.map(o=>e.jsx(we,{item:o},o.key))})]})}function Ie({sale:t}){const{data:s,isLoading:a}=A({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>_(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),i=(s==null?void 0:s.name)??r("activity.itemFallback"),d=(s==null?void 0:s.thumbnail)??"",o=W({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,h=e.jsxs(e.Fragment,{children:[a?e.jsx(K,{}):e.jsx(B,{children:d?e.jsx("img",{src:d,alt:i}):e.jsx(E,{name:"offer",size:20})}),e.jsxs(Q,{children:[a?e.jsx(V,{}):e.jsx(X,{title:i,children:i}),e.jsx(Y,{children:r("activity.boughtFrom",{account:xt(t.seller)})})]})]});return e.jsxs(T,{"data-testid":"activity-mana-purchase",children:[e.jsxs(S,{children:[e.jsxs(F,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsx(D,{children:r("activity.paidWithMana")})]}),e.jsxs(M,{children:[e.jsx(H,{"data-status":"SETTLED",children:r("activity.completed")}),e.jsxs(w,{children:[gt(t.manaWei)," ",e.jsx(ft,{children:e.jsx(ut,{src:dt,alt:"MANA"})})]})]})]}),e.jsx(U,{children:o?e.jsx(J,{to:o,"data-link":"true",children:h}):e.jsx(q,{children:h})})]})}function Ae({sale:t,payout:s}){const{data:a,isLoading:i}=A({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>_(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),d=(a==null?void 0:a.name)??r("activity.itemFallback"),o=(a==null?void 0:a.thumbnail)??"",h=W({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,c=e.jsxs(e.Fragment,{children:[i?e.jsx(K,{}):e.jsx(B,{children:o?e.jsx("img",{src:o,alt:d}):e.jsx(E,{name:"offer",size:20})}),e.jsxs(Q,{children:[i?e.jsx(V,{}):e.jsx(X,{title:d,children:d}),e.jsxs(Y,{children:[r("activity.soldTo",{account:xt(t.counterparty)}),s.kind==="pending"?` · ${r("activity.payoutPendingOn",{date:I(s.availableAt)})}`:""]})]})]});return e.jsxs(T,{"data-testid":"activity-sale",children:[e.jsxs(S,{children:[e.jsxs(F,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsx(D,{children:r("activity.saleLabel")})]}),e.jsxs(M,{children:[e.jsx(H,{"data-status":s.kind==="pending"?"PENDING":"SOLD",children:s.kind==="pending"?r("activity.payoutPending"):r("activity.sold")}),s.kind==="direct"?e.jsxs(w,{"data-kind":"income",children:["+",gt(t.manaWei)," ",e.jsx(ft,{children:e.jsx(ut,{src:dt,alt:"MANA"})})]}):s.credits!==null?e.jsxs(w,{"data-kind":"income",children:[e.jsx(N,{className:"ccy-mark"})," +",Mt(s.credits)]}):e.jsx(w,{"data-kind":"income",children:r("activity.payoutCredited")})]})]}),e.jsx(U,{children:h?e.jsx(J,{to:h,"data-link":"true",children:c}):e.jsx(q,{children:c})})]})}function Ee({order:t}){const s=`$${(t.usdCents/100).toFixed(2)}`,a=Ct(t.status),i=a==="SETTLED"?r("activity.completed"):a==="FAILED"?r("activity.failed"):a==="UNFINISHED"?r("activity.unfinished"):r("activity.processing"),d=O(p=>p.session),o=Dt(),[h,c]=g.useState(!1),m=t.status==="initiated"&&!!d;g.useEffect(()=>{const p=()=>c(!1);return window.addEventListener("pageshow",p),()=>window.removeEventListener("pageshow",p)},[]);async function f(){if(!(!d||h)){c(!0);try{const p=await Ht(t.id,d.identity);if(p.kind==="url"){if(/^https:\/\/([a-z0-9-]+\.)*stripe\.com\//i.test(p.url)){window.location.href=p.url;return}$.error(r("activity.resumeUnavailable"))}else p.kind==="expired"?($.info(r("activity.resumeExpired")),o.invalidateQueries({queryKey:["credit-orders"]})):p.kind==="paid"?($.success(r("activity.resumePaid")),o.invalidateQueries({queryKey:["credit-orders"]})):$.error(r("activity.resumeUnavailable"));c(!1)}catch{c(!1)}}}return e.jsx(T,{"data-testid":"credit-order",children:e.jsxs(S,{children:[e.jsx(he,{children:e.jsx("img",{src:ne,alt:"","aria-hidden":!0})}),e.jsxs(F,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsxs(D,{children:[r("activity.creditPurchaseLabel")," · ",r("activity.creditPaid",{usd:s})]})]}),e.jsxs(M,{children:[m?e.jsx(pe,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?r("activity.resuming"):r("activity.resume")}):null,e.jsx(H,{"data-status":a,children:i}),e.jsxs(w,{"data-kind":a==="UNFINISHED"?void 0:"income",children:[a==="UNFINISHED"?"":"+",e.jsx(N,{className:"ccy-mark"})," ",t.credits]})]})]})})}function $e({filter:t}){const s={all:{icon:"clock",title:r("activity.emptyAllTitle"),body:r("activity.emptyAllBody")},purchases:{icon:"cart",title:r("activity.emptyPurchasesTitle"),body:r("activity.emptyPurchasesBody")},sales:{icon:"offer",title:r("activity.emptySalesTitle"),body:r("activity.emptySalesBody")}}[t];return e.jsxs(ht,{children:[e.jsx(E,{name:s.icon,size:40,color:n.colors.muted2}),e.jsx(pt,{children:s.title}),e.jsx(mt,{children:s.body}),t!=="sales"?e.jsx(ye,{as:ot,to:"/items",variant:"white",children:r("notFound.cta")}):null]})}function Oe(){const{session:t}=O(),[s,a]=g.useState("all"),[i,d]=zt(),o=i.get(z)===rt||i.get(R)===je;Nt({title:o?r("seo.import.title"):r("nav.activity"),noindex:!0});const{count:h}=Ot(),{count:c}=se(),f=h!==void 0&&c!==void 0&&(h>0||c>0||o),p=!!t&&!o&&s!=="sales",x=!!t&&!o&&s!=="purchases",y=L(["purchases",t==null?void 0:t.address],u=>St(t.address,t.identity,{first:P,skip:u}),{enabled:p}),b=L(["sales",t==null?void 0:t.address],u=>it(t.address,{role:"seller",first:P,skip:u}),{enabled:x}),v=L(["credit-orders",t==null?void 0:t.address],u=>st(t.address,t.identity,{first:P,skip:u}),{enabled:p}),j=L(["mana-purchases",t==null?void 0:t.address],u=>it(t.address,{role:"buyer",first:P,skip:u}),{enabled:p}),{data:Z}=A({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>st(t.address,t.identity,{first:200}).then(u=>u.payouts),enabled:x,staleTime:6e4}),yt=g.useMemo(()=>te(Z),[Z]),{data:bt}=Tt(x);if(!t)return e.jsxs(ht,{children:[e.jsx(E,{name:"clock",size:40,color:n.colors.muted2}),e.jsx(pt,{children:r("activity.signInTitle")}),e.jsx(mt,{children:r("activity.signInBody")})]});const tt=Zt(Jt({purchases:p?y.items:[],sales:x?b.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:bt}),s),vt=p&&(y.isLoading||v.isLoading||j.isLoading)||x&&b.isLoading,et=p&&(y.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||x&&b.isFetchingNextPage,jt=p&&(y.hasNextPage||v.hasNextPage||j.hasNextPage)||x&&b.hasNextPage;function wt(){p&&y.hasNextPage&&y.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),x&&b.hasNextPage&&b.fetchNextPage()}function kt(u){if(a(u),!o)return;const k=new URLSearchParams(i);k.delete(z),k.delete(R),d(k,{replace:!0})}function It(){const u=new URLSearchParams(i);u.set(z,rt),u.delete(R),d(u,{replace:!0})}return e.jsxs(ae,{children:[e.jsx(re,{children:e.jsx(oe,{children:r("nav.activity")})}),e.jsxs(de,{role:"tablist","aria-label":r("nav.activity"),children:[ve.map(u=>e.jsx(lt,{type:"button",role:"tab","aria-selected":!o&&s===u,"data-active":!o&&s===u,"data-testid":`activity-filter-${u}`,onClick:()=>kt(u),children:r(`activity.filter.${u}`)},u)),f?e.jsxs(ce,{type:"button",role:"tab","aria-selected":o,"data-active":o,"data-testid":"activity-filter-migrate","aria-label":h?r("activity.migrate.chipAria",{count:h}):void 0,onClick:It,children:[r("activity.migrate.chip"),h?e.jsx(le,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),o?e.jsx(g.Suspense,{fallback:e.jsx(ue,{"aria-busy":"true"}),children:e.jsx(be,{})}):vt?e.jsx(nt,{children:Array.from({length:5}).map((u,k)=>e.jsx(at,{},k))}):tt.length===0?e.jsx($e,{filter:s}):e.jsxs(e.Fragment,{children:[e.jsxs(nt,{children:[tt.map(u=>u.kind==="purchase"?e.jsx(ke,{order:u.order},u.id):u.kind==="credit"?e.jsx(Ee,{order:u.order},u.id):u.kind==="mana-purchase"?e.jsx(Ie,{sale:u.sale},u.id):e.jsx(Ae,{sale:u.sale,payout:ee(yt,u.sale)},u.id)),et?e.jsx(at,{}):null]}),e.jsx(Wt,{hasNextPage:jt,isFetching:et,onLoadMore:wt})]})]})}export{Oe as Activity};
|
|
378
|
+
`,J=q.withComponent(oe),bt=g.lazy(()=>Fe(()=>import("./index-CuVgNl3Y.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(e=>({default:e.ImportListings}))),P=24,vt=["all","purchases","sales"],z="section",re="listings",R="view",jt="migrate";function I(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function xe(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function ge(e){const s=Number(e)/1e18;return Number.isFinite(s)?s.toLocaleString("en",{maximumFractionDigits:2}):"0"}function fe({children:e}){const s=g.useRef(null),[a,i]=g.useState(null),d=()=>{var h;const o=(h=s.current)==null?void 0:h.getBoundingClientRect();o&&i({top:o.bottom+8,left:o.left+o.width/2})};return t.jsxs(mt,{ref:s,tabIndex:0,onMouseEnter:d,onMouseLeave:()=>i(null),onFocus:d,onBlur:()=>i(null),children:[e,a?Re.createPortal(t.jsx(xt,{style:{top:a.top,left:a.left},role:"tooltip",children:r("activity.polygonMana")}),document.body):null]})}function wt({item:e}){const s=!!e.contractAddress&&!!e.itemId,a=!!e.tradeId||s,{data:i,isLoading:d}=A({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?qe(e.tradeId):_(e.contractAddress,{itemId:e.itemId}),enabled:a,staleTime:5*6e4}),o=a&&d,h=(i==null?void 0:i.name)??r("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",m=W({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=t.jsxs(t.Fragment,{children:[o?t.jsx(K,{}):t.jsx(B,{children:c?t.jsx("img",{src:c,alt:h}):t.jsx(E,{name:"cart",size:20})}),t.jsxs(Q,{children:[o?t.jsx(V,{}):t.jsx(X,{title:h,children:h}),e.quantity>1?t.jsx(Y,{children:r("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(ft,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]});return m?t.jsx(J,{to:m,"data-link":"true",children:f}):t.jsx(q,{children:f})}function kt({order:e}){const s=Xe(e.lines),a=s.reduce((o,h)=>o+h.quantity,0),i=Ke(e.status),d=i==="SETTLED"?r("activity.completed"):i==="FAILED"?r("activity.failed"):r("activity.processing");return t.jsxs(T,{"data-testid":"purchase-order",children:[t.jsxs(S,{children:[t.jsxs(F,{children:[t.jsx(C,{children:I(e.createdAt)}),t.jsxs(D,{children:[r("activity.purchaseLabel")," · ",r("activity.itemCount",{count:a})]})]}),t.jsxs(M,{children:[t.jsx(H,{"data-status":i,children:d}),t.jsxs(w,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.totalCredits]})]})]}),i==="FAILED"?t.jsx(gt,{children:r("activity.purchaseFailedNote")}):null,t.jsx(U,{children:s.map(o=>t.jsx(wt,{item:o},o.key))})]})}function It({sale:e}){const{data:s,isLoading:a}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>_(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(s==null?void 0:s.name)??r("activity.itemFallback"),d=(s==null?void 0:s.thumbnail)??"",o=W({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,h=t.jsxs(t.Fragment,{children:[a?t.jsx(K,{}):t.jsx(B,{children:d?t.jsx("img",{src:d,alt:i}):t.jsx(E,{name:"offer",size:20})}),t.jsxs(Q,{children:[a?t.jsx(V,{}):t.jsx(X,{title:i,children:i}),t.jsx(Y,{children:r("activity.boughtFrom",{account:xe(e.seller)})})]})]});return t.jsxs(T,{"data-testid":"activity-mana-purchase",children:[t.jsxs(S,{children:[t.jsxs(F,{children:[t.jsx(C,{children:I(e.createdAt)}),t.jsx(D,{children:r("activity.paidWithMana")})]}),t.jsxs(M,{children:[t.jsx(H,{"data-status":"SETTLED",children:r("activity.completed")}),t.jsxs(w,{children:[ge(e.manaWei)," ",t.jsx(fe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]})]})]}),t.jsx(U,{children:o?t.jsx(J,{to:o,"data-link":"true",children:h}):t.jsx(q,{children:h})})]})}function At({sale:e,payout:s}){const{data:a,isLoading:i}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>_(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),d=(a==null?void 0:a.name)??r("activity.itemFallback"),o=(a==null?void 0:a.thumbnail)??"",h=W({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,c=t.jsxs(t.Fragment,{children:[i?t.jsx(K,{}):t.jsx(B,{children:o?t.jsx("img",{src:o,alt:d}):t.jsx(E,{name:"offer",size:20})}),t.jsxs(Q,{children:[i?t.jsx(V,{}):t.jsx(X,{title:d,children:d}),t.jsxs(Y,{children:[r("activity.soldTo",{account:xe(e.counterparty)}),s.kind==="pending"?` · ${r("activity.payoutPendingOn",{date:I(s.availableAt)})}`:""]})]})]});return t.jsxs(T,{"data-testid":"activity-sale",children:[t.jsxs(S,{children:[t.jsxs(F,{children:[t.jsx(C,{children:I(e.createdAt)}),t.jsx(D,{children:r("activity.saleLabel")})]}),t.jsxs(M,{children:[t.jsx(H,{"data-status":s.kind==="pending"?"PENDING":"SOLD",children:s.kind==="pending"?r("activity.payoutPending"):r("activity.sold")}),s.kind==="direct"?t.jsxs(w,{"data-kind":"income",children:["+",ge(e.manaWei)," ",t.jsx(fe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]}):s.credits!==null?t.jsxs(w,{"data-kind":"income",children:[t.jsx(N,{className:"ccy-mark"})," +",Me(s.credits)]}):t.jsx(w,{"data-kind":"income",children:r("activity.payoutCredited")})]})]}),t.jsx(U,{children:h?t.jsx(J,{to:h,"data-link":"true",children:c}):t.jsx(q,{children:c})})]})}function Et({order:e}){const s=`$${(e.usdCents/100).toFixed(2)}`,a=Ce(e.status),i=a==="SETTLED"?r("activity.completed"):a==="FAILED"?r("activity.failed"):a==="UNFINISHED"?r("activity.unfinished"):r("activity.processing"),d=O(p=>p.session),o=De(),[h,c]=g.useState(!1),m=e.status==="initiated"&&!!d;g.useEffect(()=>{const p=()=>c(!1);return window.addEventListener("pageshow",p),()=>window.removeEventListener("pageshow",p)},[]);async function f(){if(!(!d||h)){c(!0);try{const p=await He(e.id,d.identity);if(p.kind==="url"){if(/^https:\/\/([a-z0-9-]+\.)*stripe\.com\//i.test(p.url)){window.location.href=p.url;return}$.error(r("activity.resumeUnavailable"))}else p.kind==="expired"?($.info(r("activity.resumeExpired")),o.invalidateQueries({queryKey:["credit-orders"]})):p.kind==="paid"?($.success(r("activity.resumePaid")),o.invalidateQueries({queryKey:["credit-orders"]})):$.error(r("activity.resumeUnavailable"));c(!1)}catch{c(!1)}}}return t.jsx(T,{"data-testid":"credit-order",children:t.jsxs(S,{children:[t.jsx(ht,{children:t.jsx("img",{src:nt,alt:"","aria-hidden":!0})}),t.jsxs(F,{children:[t.jsx(C,{children:I(e.createdAt)}),t.jsxs(D,{children:[r("activity.creditPurchaseLabel")," · ",r("activity.creditPaid",{usd:s})]})]}),t.jsxs(M,{children:[m?t.jsx(pt,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?r("activity.resuming"):r("activity.resume")}):null,t.jsx(H,{"data-status":a,children:i}),t.jsxs(w,{"data-kind":a==="UNFINISHED"?void 0:"income",children:[a==="UNFINISHED"?"":"+",t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]})]})})}function $t({filter:e}){const s={all:{icon:"clock",title:r("activity.emptyAllTitle"),body:r("activity.emptyAllBody")},purchases:{icon:"cart",title:r("activity.emptyPurchasesTitle"),body:r("activity.emptyPurchasesBody")},sales:{icon:"offer",title:r("activity.emptySalesTitle"),body:r("activity.emptySalesBody")}}[e];return t.jsxs(he,{children:[t.jsx(E,{name:s.icon,size:40,color:n.colors.muted2}),t.jsx(pe,{children:s.title}),t.jsx(me,{children:s.body}),e!=="sales"?t.jsx(yt,{as:oe,to:"/items",variant:"white",children:r("notFound.cta")}):null]})}function Ot(){const{session:e}=O(),[s,a]=g.useState("all"),[i,d]=ze(),o=i.get(z)===re||i.get(R)===jt;Ne({title:o?r("seo.import.title"):r("nav.activity"),noindex:!0});const{count:h}=Oe(),{count:c}=st(),f=h!==void 0&&c!==void 0&&(h>0||c>0||o),p=!!e&&!o&&s!=="sales",x=!!e&&!o&&s!=="purchases",y=L(["purchases",e==null?void 0:e.address],u=>Se(e.address,e.identity,{first:P,skip:u}),{enabled:p}),b=L(["sales",e==null?void 0:e.address],u=>ie(e.address,{role:"seller",first:P,skip:u}),{enabled:x}),v=L(["credit-orders",e==null?void 0:e.address],u=>se(e.address,e.identity,{first:P,skip:u}),{enabled:p}),j=L(["mana-purchases",e==null?void 0:e.address],u=>ie(e.address,{role:"buyer",first:P,skip:u}),{enabled:p}),{data:Z}=A({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>se(e.address,e.identity,{first:200}).then(u=>u.payouts),enabled:x,staleTime:6e4}),ye=g.useMemo(()=>et(Z),[Z]),{data:be}=Te(x);if(!e)return t.jsxs(he,{children:[t.jsx(E,{name:"clock",size:40,color:n.colors.muted2}),t.jsx(pe,{children:r("activity.signInTitle")}),t.jsx(me,{children:r("activity.signInBody")})]});const ee=Ze(Je({purchases:p?y.items:[],sales:x?b.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:be}),s),ve=p&&(y.isLoading||v.isLoading||j.isLoading)||x&&b.isLoading,te=p&&(y.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||x&&b.isFetchingNextPage,je=p&&(y.hasNextPage||v.hasNextPage||j.hasNextPage)||x&&b.hasNextPage;function we(){p&&y.hasNextPage&&y.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),x&&b.hasNextPage&&b.fetchNextPage()}function ke(u){if(a(u),!o)return;const k=new URLSearchParams(i);k.delete(z),k.delete(R),d(k,{replace:!0})}function Ie(){const u=new URLSearchParams(i);u.set(z,re),u.delete(R),d(u,{replace:!0})}return t.jsxs(at,{children:[t.jsx(rt,{children:t.jsx(ot,{children:r("nav.activity")})}),t.jsxs(dt,{role:"tablist","aria-label":r("nav.activity"),children:[vt.map(u=>t.jsx(le,{type:"button",role:"tab","aria-selected":!o&&s===u,"data-active":!o&&s===u,"data-testid":`activity-filter-${u}`,onClick:()=>ke(u),children:r(`activity.filter.${u}`)},u)),f?t.jsxs(ct,{type:"button",role:"tab","aria-selected":o,"data-active":o,"data-testid":"activity-filter-migrate","aria-label":h?r("activity.migrate.chipAria",{count:h}):void 0,onClick:Ie,children:[r("activity.migrate.chip"),h?t.jsx(lt,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),o?t.jsx(g.Suspense,{fallback:t.jsx(ut,{"aria-busy":"true"}),children:t.jsx(bt,{})}):ve?t.jsx(ne,{children:Array.from({length:5}).map((u,k)=>t.jsx(ae,{},k))}):ee.length===0?t.jsx($t,{filter:s}):t.jsxs(t.Fragment,{children:[t.jsxs(ne,{children:[ee.map(u=>u.kind==="purchase"?t.jsx(kt,{order:u.order},u.id):u.kind==="credit"?t.jsx(Et,{order:u.order},u.id):u.kind==="mana-purchase"?t.jsx(It,{sale:u.sale},u.id):t.jsx(At,{sale:u.sale,payout:tt(ye,u.sale)},u.id)),te?t.jsx(ae,{}):null]}),t.jsx(We,{hasNextPage:je,isFetching:te,onLoadMore:we})]})]})}export{Ot as Activity};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,j as m}from"./react-BYHuwl8r.js";import{s as d}from"./index-
|
|
1
|
+
import{r as u,j as m}from"./react-BYHuwl8r.js";import{s as d}from"./index-uGopMLx_.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-CFqPm_mN.js";import"./intl-CBcMB1D2.js";const P="https://cdn.decentraland.org/@dcl/shop/1.4.1/_assets/custom-welcome-background-BxlFQma9.webp",L="https://cdn.decentraland.org/@dcl/shop/1.4.1/_assets/DCL_LogoPattern-BryBPc3d.png",D=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as
|
|
1
|
+
import{r as m,b as We,j as e,u as Ye}from"./react-BYHuwl8r.js";import{u as et}from"./useUrlFilters-DH-gxdfV.js";import{u as tt,S as Le,R as nt,F as st,e as it}from"./categories-DEDiLarq.js";import{c as O,r as ot,aK as at,aL as rt,aR as lt,a as ct,l as dt,ch as ht,ci as pt,s,t,v as Be,aA as ft,D as ut,L as ge,b as n,z as mt,I as S,A as P,cj as ie,ax as xt,Z as ne,aP as gt,aO as yt,y as Pe,an as He,q as Ue,w as bt,ac as wt,ap as Te,aq as V,aZ as Ct,bD as vt}from"./index-uGopMLx_.js";import{R as jt,S as $t,a as kt,D as St,b as Et,C as Lt,c as Tt,F as Rt,d as _t,e as Mt,M as Ft,u as At,g as Nt,v as It,E as zt,h as Wt,f as Bt,i as Pt,j as Ht}from"./Assets.styles-DvKHdPv2.js";import{L as Ut}from"./LoadMore-CZrX5Gv7.js";import{u as Ot}from"./useInfiniteGrid-BSzq15pV.js";import{E as Gt}from"./ErrorNotice-85K9YN9v.js";import{d as Dt}from"./dcl-schemas-CmtP3U6y.js";import{s as Zt,G as qt,w as Vt,S as Kt}from"./buy-gasless-D-P_OEFk.js";import{s as Qt,j as Jt}from"./buy-BO3reV5y.js";import{f as Xt}from"./errors-ByuDglQO.js";import{J as Yt,C as en,B as ye}from"./ethers-CFqPm_mN.js";import{n as tn}from"./Tooltip-B8fVdcBn.js";import{G as nn}from"./grid.styles-CHyL7A8J.js";import"./skeleton.styles-BC9MqXiU.js";import"./sentry-Dx-KuLV3.js";import"./intl-CBcMB1D2.js";import"./authorizations-DF77DF8l.js";import"./sendMetaTransaction-o2u8XwNS.js";function K(i){const a=i.source??"item",o=i.tradeId||`${i.contractAddress}-${i.tokenId??i.itemId??""}`;return`${a}:${o}`}const G="100000000000000000000",Oe=2,se=15,sn=/^[a-zA-Z0-9]+$/;function Re(i){const a=i.trim();return a.length===0?{ok:!1,reason:"empty"}:sn.test(a)?a.length<Oe?{ok:!1,reason:"too-short"}:a.length>se?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function on(i){return i.replace(/[^a-zA-Z0-9]/g,"").slice(0,se)}const an=["function available(string _subdomain) view returns (bool)"],_e={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function rn(){return O.chainId===Number(Dt.ChainId.MATIC_MAINNET)?_e.mainnet:_e.sepolia}async function ln(i,a={}){var u;const{rpc:o,address:h}=rn(),p=new Yt(o),x=new en(h,an,p);console.info(`[names] availability check → DCLRegistrar(${h}).available("${i}") on ${o}`);const l=await x.available(i);if((u=a.signal)!=null&&u.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${i}" available=${l}`),l?"available":"taken"}const cn="https://app.across.to/api";class Ce extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}class be extends Error{constructor(){super("The name could not be registered on Ethereum; your funds were recovered."),this.name="NameNotRegisteredError"}}class we extends Error{constructor(){super("We couldn't confirm whether the purchase went through."),this.name="NameSettlementUnknownError"}}function dn(i){return lt(G,i)}async function hn(i,a,o={}){var u;const h=o.chainId??O.chainId,p=o.provider??"across",x=`${O.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(a)}&chainId=${h}&provider=${p}`,l=await ct(x,{method:"GET",identity:i,metadata:{}});if(!l.ok){let c;try{c=(u=await l.json())==null?void 0:u.code}catch{}throw c==="ROUTE_COST_TOO_HIGH"?new Ce:new Error(`fetchNameCreditRoute ${l.status}`)}return l.json()}function pn(i,a){const o=ye.from(i.availableAmount),p=ye.from(G).sub(o);return{credits:[{value:i.amount,expiresAt:Number(i.expiresAt),salt:Jt(i.id)}],creditsSignatures:[i.signature],externalCall:{target:a.externalCall.target,selector:a.externalCall.selector,data:a.externalCall.data,expiresAt:a.externalCall.expiresAt,salt:a.externalCall.salt},customExternalCallSignature:a.customExternalCallSignature,maxUncreditedValue:p.isNegative()?"0":p.toString(),maxCreditedValue:G}}async function fn(i,a={}){const o=cn,h=a.intervalMs??1e4,p=a.maxAttempts??60;let x={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let l=0;l<p;l++){try{const u=await fetch(`${o}/deposit/status?originChainId=137&depositTxHash=${i}`);if(u.ok){const c=await u.json(),d=(c.status??"pending").toLowerCase(),w=c.fillTx??c.fillTxnRef??null,y=typeof c.actionsSucceeded=="boolean"?c.actionsSucceeded:null;if(d==="filled")return{status:"filled",destinationTxHash:w,actionsSucceeded:y};if(d==="refunded"||d==="expired")return{status:d,destinationTxHash:null,actionsSucceeded:!1};x={status:"pending",destinationTxHash:w,actionsSucceeded:y}}}catch{}l<p-1&&await new Promise(u=>setTimeout(u,h))}return x}async function un(i){const{name:a,identity:o,signer:h}=i,p=i.chainId??O.chainId,x=i.provider??"across",l=(i.beneficiary??await h.getAddress()).toLowerCase();let u=null,c="unconfirmed";console.info("[names] register start",{name:a,buyer:l,chainId:p,provider:x});try{const d=await ot(p),w=dn(d);console.info("[names] step 1/6 sized reservation",{usdCents:w,manaRate:d});const y=await hn(o,a,{chainId:p,provider:x});console.info("[names] step 2/6 route fetched",{target:y.externalCall.target,selector:y.externalCall.selector,provider:y.provider,quoteId:y.quoteId});const j=await at(o,w);if(u=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),ye.from(j.maxCreditedValue).lt(G))throw new Error("Credit under-sized for the name price");const v=pn(j.credit,y);let g;try{g=await Zt({chainId:p,buyer:l,signer:h,args:v})}catch(b){if(!(b instanceof qt))throw b;if(b.reason==="relayer-unreachable"){c="unobservable";const $=new we;throw $.cause=b,$}g=await Qt(p,v,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:g}),await Vt(g),c="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:g}),x==="across"){const b=await fn(g,i.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:g};if(b.status==="filled"&&b.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:g}),{status:"pending",originTxHash:g};if(b.status!=="filled"||b.actionsSucceeded!==!0)throw new be;return{status:"registered",originTxHash:g,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:g}}catch(d){if(console.error("[names] register failed — raw error:",d,{name:a,buyer:l,originState:c}),d instanceof Kt)return{status:"pending",originTxHash:d.txHash};if(u&&c==="unconfirmed"&&await rt(o,[u]).catch(()=>{}),d instanceof Ce||d instanceof be||d instanceof we)throw d;const w=new Error(Xt(d,"Couldn't register the name. Please try again.",{sale:!0}));throw w.cause=d,w}}function mn(){const{data:i}=dt({queryKey:["feature-flag","shop-names"],queryFn:()=>ht(pt.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return i===!0}const xn=60,gn=700,yn=25;function bn(i){if(!i)return[];const a=[];for(let o=1;o<=i.length;o++)a.push({text:i.slice(0,o),delay:xn});a[a.length-1]={text:i,delay:gn};for(let o=i.length-1;o>=1;o--)a.push({text:i.slice(0,o),delay:yn});return a}function wn(i){return i.flatMap(bn)}function Cn(i,a){const o=m.useMemo(()=>wn(i),[i]),[h,p]=m.useState(0);return m.useEffect(()=>{if(!a||o.length===0)return;const x=setTimeout(()=>p(l=>(l+1)%o.length),o[h%o.length].delay);return()=>clearTimeout(x)},[h,a,o]),!a||o.length===0?"":o[h%o.length].text}const vn="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='46.999'%20height='46.999'%20viewBox='0%200%2046.999%2046.999'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vector'%3e%3cpath%20d='M23.5861%2046.999C27.4441%2046.999%2031.1266%2046.1286%2034.3708%2044.475H12.8014C16.0456%2046.1286%2019.6405%2046.999%2023.5861%2046.999Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M8.76807%2041.9509H38.1411C39.1056%2041.1676%2040.1577%2040.2102%2040.7715%2039.514H6.13765C7.01445%2040.3843%207.89126%2041.2547%208.76807%2041.9509Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M25.0767%2034.0307H2.2797C2.80578%2035.0752%203.41955%2036.0326%204.03331%2036.9899H22.5339L25.0767%2034.0307Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M23.5861%200C10.6094%200%200%2010.4442%200%2023.4125C0%2026.2846%200.526084%2029.0697%201.49057%2031.5938L10.6094%2020.7144L15.8702%2014.3608L28.6716%2029.679L32.3542%2025.2402L41.999%2036.7288H42.7882C45.5063%2032.8993%2046.9968%2028.2864%2046.9968%2023.3254C47.1722%2010.4442%2036.5628%200%2023.5861%200ZM15.7825%2012.272C13.9412%2012.272%2012.5383%2010.7924%2012.5383%209.05166C12.5383%207.31095%2014.0289%205.83136%2015.7825%205.83136C17.6238%205.83136%2019.0267%207.31095%2019.0267%209.05166C19.0267%2010.7924%2017.6238%2012.272%2015.7825%2012.272ZM32.8803%2022.8032C29.2853%2022.8032%2026.3919%2019.931%2026.3919%2016.3626C26.3919%2012.7942%2029.2853%209.92201%2032.8803%209.92201C36.4752%209.92201%2039.3686%2012.7942%2039.3686%2016.3626C39.4563%2019.931%2036.4752%2022.8032%2032.8803%2022.8032Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M16.484%2018.7126V31.6808H27.2687L16.484%2018.7126Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M33.1433%2037.164H39.2809L33.1433%2029.766V37.164Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3c/g%3e%3c/svg%3e",jn="https://cdn.decentraland.org/@dcl/shop/1.4.1/_assets/name-verified-oGwQ3ntb.svg",$n="#34fee6",kn=s.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -155,7 +155,7 @@ import{r as u,b as We,j as e,u as Ye}from"./react-BYHuwl8r.js";import{u as et}fr
|
|
|
155
155
|
font-family: ${t.font.sans};
|
|
156
156
|
font-size: 14px;
|
|
157
157
|
color: ${t.colors.muted2};
|
|
158
|
-
`,
|
|
158
|
+
`,ue=s.div`
|
|
159
159
|
flex: none;
|
|
160
160
|
display: flex;
|
|
161
161
|
align-items: center;
|
|
@@ -236,7 +236,7 @@ import{r as u,b as We,j as e,u as Ye}from"./react-BYHuwl8r.js";import{u as et}fr
|
|
|
236
236
|
font-family: ${t.font.sans};
|
|
237
237
|
font-size: 16px;
|
|
238
238
|
color: ${t.colors.muted2};
|
|
239
|
-
`,
|
|
239
|
+
`,me=s.button`
|
|
240
240
|
margin-top: 16px;
|
|
241
241
|
width: 100%;
|
|
242
242
|
height: 46px;
|
|
@@ -432,7 +432,7 @@ import{r as u,b as We,j as e,u as Ye}from"./react-BYHuwl8r.js";import{u as et}fr
|
|
|
432
432
|
color: ${t.colors.accent};
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
|
-
`;function Vn({name:i,priceCredits:a,onClose:o}){const{session:h}=Be(),{data:p,isError:x}=ft(h),l=
|
|
435
|
+
`;function Vn({name:i,priceCredits:a,onClose:o}){const{session:h}=Be(),{data:p,isError:x}=ft(h),l=ut(),u=We(),[c,d]=m.useState("confirm"),[w,y]=m.useState(""),[j,v]=m.useState(null),[g,b]=m.useState(!1),$=m.useRef(!1),_=w.trim().toLowerCase()===i.toLowerCase(),T=c==="completing",k=a!=null?ge(a):"—",F=a==null,N=p==null?void 0:p.credits,z=a!=null&&N!=null?a-N:0,M=z>0,I=F?n("names.priceUnavailable"):M?n("names.insufficientCredits",{credits:ge(z)}):null;m.useEffect(()=>{const f=L=>{L.key==="Escape"&&!T&&o()};document.addEventListener("keydown",f);const C=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",f),document.body.style.overflow=C}},[T,o]);async function R(){if(!(!h||!_||F||M||$.current)){$.current=!0,d("completing"),v(null);try{const f=await un({name:i,identity:h.identity,signer:h.signer});ne("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:a??null,settlement:f.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),d(f.status==="registered"?"success":"pending")}catch(f){ne(yt(f)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:gt(f),purchase_type:"name"});const C=f instanceof be,L=f instanceof we;v(f instanceof Ce?n("names.errorRouteCost"):C?n("names.errorNotRegistered"):L?n("names.errorSettlementUnknown"):(f==null?void 0:f.message)||n("names.errorGeneric")),b(C||L),d("error")}finally{$.current=!1}}}const H=c!=="success"&&c!=="pending",E=mt(h==null?void 0:h.providerType);return e.jsx(kn,{onClick:T?void 0:o,role:"presentation",children:e.jsxs(Sn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:f=>f.stopPropagation(),children:[H&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(ae,{children:c==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(re,{onClick:o,disabled:T,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(le,{children:[n("names.myCreditsBalance")," ",e.jsx(P,{})," ",ie(p,x)]}),e.jsx(ce,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(de,{children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(he,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(fe,{children:n("names.subtitle")})]}),e.jsxs(ue,{children:[e.jsx(P,{}),k]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(xe,{children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),g?e.jsx(me,{onClick:o,children:n("names.errorSpentDismiss")}):e.jsx(me,{onClick:()=>d("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(_n,{children:[e.jsx(Mn,{children:n("names.confirmTitle")}),e.jsx(Fn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Kn(i)}</b>`})}}),e.jsxs(An,{children:[e.jsx(Nn,{"aria-hidden":!0,children:"@"}),e.jsx(In,{value:w,onChange:f=>y(f.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(w.length,8)}ch`}}),e.jsx(zn,{children:".dcl.eth"})]})]}),I?e.jsxs(xe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:I})]}):null,e.jsx(me,{onClick:()=>void R(),disabled:!_||!h||F||M,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Wn,{children:[e.jsx(Bn,{src:xt,alt:"",width:56,height:56}),e.jsx(Pn,{children:E?n("names.confirming"):n("names.completing")}),e.jsxs(Hn,{children:[e.jsx(Un,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(On,{children:"1/1"})]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(ae,{children:n("names.pendingHeaderTitle")}),e.jsx(re,{onClick:o,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(le,{children:[n("names.myCreditsBalance")," ",e.jsx(P,{})," ",ie(p,x)]}),e.jsx(ce,{}),e.jsxs(xe,{"data-tone":"info",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(de,{style:{marginTop:20},children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(he,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(fe,{children:n("names.subtitle")})]}),e.jsxs(ue,{children:[e.jsx(P,{}),k]})]}),e.jsx(Fe,{children:e.jsx(Ae,{onClick:()=>{o(),u("/my-items")},children:n("names.myItems")})})]}),c==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(ae,{children:n("names.successHeaderTitle")}),e.jsx(re,{onClick:o,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(le,{children:[n("names.myCreditsBalance")," ",e.jsx(P,{})," ",ie(p,x)]}),e.jsx(ce,{}),e.jsxs(Gn,{children:[e.jsx(Dn,{"aria-hidden":!0,children:e.jsx(S,{name:"check"})}),e.jsxs(Zn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(de,{style:{marginTop:20},children:[e.jsxs(En,{"data-testid":"name-success-tile",children:[e.jsx(Ln,{src:vn,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(Tn,{children:[e.jsx("span",{"aria-hidden":!0,children:i}),e.jsx(Rn,{src:jn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(he,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(fe,{children:n("names.subtitle")})]}),e.jsxs(ue,{children:[e.jsx(P,{}),k]})]}),e.jsxs(Fe,{children:[e.jsx(Ae,{onClick:()=>{o(),u("/my-items")},children:n("names.myItems")}),e.jsx(qn,{href:O.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Kn(i){return i.replace(/[&<>"']/g,a=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[a])}const Qn="https://cdn.decentraland.org/@dcl/shop/1.4.1/_assets/identity-icon-C8yAW_Gq.svg",Jn="https://cdn.decentraland.org/@dcl/shop/1.4.1/_assets/world-icon-6xQ-PmmW.svg",Xn="https://cdn.decentraland.org/@dcl/shop/1.4.1/_assets/invite-icon-Bz6lCTuB.svg",Yn="data:image/svg+xml,%3csvg%20width='55.6797'%20height='63.6174'%20viewBox='0%200%2055.6797%2063.6174'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vote'%3e%3cpath%20id='Vector'%20d='M0.055012%2039.1045C1.61191%2039.4989%202.83757%2039.3938%204.4307%2039.392L8.27108%2039.3878L20.7762%2039.3883L42.8819%2039.3904L50.0954%2039.3907C51.793%2039.3907%2054.0562%2039.5509%2055.6466%2039.0843C55.5909%2040.7931%2055.647%2042.8581%2055.6469%2044.5864L55.6479%2055.616L55.6559%2059.5618C55.6583%2060.6219%2055.8213%2061.9838%2055.261%2062.8837C55.2205%2062.9265%2055.1794%2062.9688%2055.1377%2063.0104C54.7986%2063.3482%2054.3791%2063.5594%2053.9021%2063.5761C52.0714%2063.642%2050.1544%2063.6097%2048.3241%2063.6078L37.4452%2063.6066L2.97352%2063.6103C2.2022%2063.6084%201.15943%2063.6718%200.589171%2063.0576C-0.204857%2062.2037%200.0327979%2060.3244%200.0349529%2059.1687L0.0414734%2054.3929C0.0413119%2049.3191%20-0.00749456%2044.1727%200.055012%2039.1045Z'%20fill='white'%20fill-opacity='0.8'/%3e%3cpath%20id='Subtract'%20d='M37.1168%200.00495927C38.1773%200.00461149%2039.2888%20-0.0284991%2040.3433%200.0811311C41.0714%200.15695%2041.7266%200.914583%2041.7857%201.63484C41.853%202.45491%2041.8268%203.31926%2041.8258%204.15144L41.8189%208.70418L41.8199%2023.9639L40.1099%2023.9659L13.8726%2023.963L13.8678%209.0909L13.8648%204.29793C13.8644%202.52652%2013.3942%200.34203%2015.6754%200.0342561C15.8907%200.016712%2016.237%200.0120998%2016.4557%200.0117952C21.6059%200.00480262%2026.761%200.0117634%2031.9107%200.00788896L37.1168%200.00495927ZM33.3834%206.17293C32.439%206.55612%2031.0531%208.12922%2030.3014%208.88191L25.8297%2013.3634C25.3537%2012.824%2023.3455%2010.7605%2022.8209%2010.4239C22.5581%2010.2549%2022.2566%2010.1546%2021.9449%2010.1329C21.4563%2010.1008%2020.9754%2010.2879%2020.6139%2010.6134C20.2442%2010.9428%2020.0227%2011.4077%2020.0006%2011.9024C19.9561%2013.0748%2021.3406%2014.1198%2022.1256%2014.8868C22.9429%2015.714%2024.1669%2017.1028%2025.1168%2017.67C26.1632%2018.2949%2027.3471%2017.2145%2027.9723%2016.4942C30.25%2014.2025%2032.5393%2011.9456%2034.8101%209.64949C35.2937%209.16062%2035.7138%208.69126%2035.6851%207.96199C35.6419%206.86558%2034.7821%206.09682%2033.6959%206.14656C33.5914%206.15085%2033.4872%206.16001%2033.3834%206.17293Z'%20fill='%23FF7439'/%3e%3cpath%20id='Vector_2'%20d='M45.5498%2015.976C46.6399%2015.986%2049.9504%2015.7705%2050.7361%2016.241C51.0104%2016.4053%2051.2831%2016.6446%2051.4181%2016.9397C51.892%2017.9763%2052.1015%2019.357%2052.3802%2020.4819L54.0582%2027.2308C54.5046%2028.9073%2054.9023%2030.6043%2055.3338%2032.2824C55.6029%2033.329%2055.9417%2034.4293%2054.9705%2035.2255C54.8158%2035.359%2054.4427%2035.5934%2054.2329%2035.6091C52.7731%2035.7184%2051.1693%2035.6701%2049.7108%2035.6679L39.4635%2035.6649L14.5239%2035.6632C10.471%2035.6631%206.41808%2035.6665%202.36531%2035.6698C1.79359%2035.6657%201.33794%2035.6604%200.844568%2035.337C-0.57365%2034.4073%200.381076%2032.2112%200.72189%2030.8501L1.93462%2025.9936L3.28579%2020.566C3.53371%2019.5688%203.77194%2018.5694%204.04289%2017.5781C4.30559%2016.6172%204.74298%2016.1492%205.73966%2015.9892C7.15095%2015.9419%208.72017%2015.9778%2010.1434%2015.9809L10.1451%2023.9585C7.37011%2024.097%207.74242%2027.5535%209.84963%2027.6469C11.6268%2027.7258%2013.6164%2027.6909%2015.4098%2027.691L26.229%2027.6915L39.1339%2027.691L43.273%2027.6909C44.748%2027.6909%2047.2174%2028.0848%2047.3773%2025.9908C47.4212%2025.4807%2047.2565%2024.9745%2046.9209%2024.5879C46.5265%2024.141%2046.1143%2024.0046%2045.5418%2023.9673L45.5498%2015.976Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",es=s.div`
|
|
436
436
|
width: 100%;
|
|
437
437
|
min-width: 0;
|
|
438
438
|
`,ts=s.nav`
|
|
@@ -603,9 +603,9 @@ import{r as u,b as We,j as e,u as Ye}from"./react-BYHuwl8r.js";import{u as et}fr
|
|
|
603
603
|
${t.media.maxWidth("mobile")} {
|
|
604
604
|
margin-left: 0;
|
|
605
605
|
}
|
|
606
|
-
`,
|
|
606
|
+
`,us=s(Ge)`
|
|
607
607
|
color: #ec303a;
|
|
608
|
-
`,
|
|
608
|
+
`,ms=s.label`
|
|
609
609
|
flex: 1;
|
|
610
610
|
min-width: 0;
|
|
611
611
|
display: flex;
|
|
@@ -892,4 +892,4 @@ import{r as u,b as We,j as e,u as Ye}from"./react-BYHuwl8r.js";import{u as et}fr
|
|
|
892
892
|
clip: rect(0, 0, 0, 0);
|
|
893
893
|
white-space: nowrap;
|
|
894
894
|
border: 0;
|
|
895
|
-
`,_s="https://docs.decentraland.org/creator/worlds/about/",Ms="https://governance.decentraland.org";function Ie(i){const a=typeof window<"u"?window.location.hostname:"";return`${a.endsWith("decentraland.org")?"https://decentraland.org":a.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(i)}`}function Fs({onBack:i}){Pe({title:n("seo.names.title"),description:n("seo.names.description")});const{session:a,signIn:o}=Be(),h=un(),{data:p}=He(),x=p?Ue(G,p):null,[l,m]=u.useState(""),[c,d]=u.useState("idle"),[w,y]=u.useState(!1),[j,v]=u.useState(!1),[g,b]=u.useState(()=>{var C;return typeof window<"u"&&!!((C=window.matchMedia)!=null&&C.call(window,"(prefers-reduced-motion: reduce)").matches)});u.useEffect(()=>{var W;const C=(W=window.matchMedia)==null?void 0:W.call(window,"(prefers-reduced-motion: reduce)");if(!C)return;const L=A=>b(A.matches);return C.addEventListener("change",L),()=>C.removeEventListener("change",L)},[]);const $=n("names.placeholderExamples"),_=u.useMemo(()=>$.split(",").map(C=>C.trim()).filter(Boolean),[$]),k=Cn(_,!j&&!l&&!g)||n("names.inputPlaceholder"),F=u.useRef(null),[N,z]=u.useState(void 0);u.useLayoutEffect(()=>{F.current&&z(F.current.getBoundingClientRect().width)},[l,k]),u.useEffect(()=>{if(!Re(l).ok){d(l.length===0?"idle":"invalid");return}d("checking");const L=new AbortController,W=setTimeout(()=>{(async()=>{try{const A=await ln(l,{signal:L.signal});d(A)}catch(A){if((A==null?void 0:A.name)==="AbortError")return;d("error")}})()},400);return()=>{clearTimeout(W),L.abort()}},[l]);const M=Re(l),I=M.ok&&(c==="available"||c==="error"),R=h&&I,H=!h&&I;function E(){if(R){if(!a){o();return}y(!0)}}const f=e.jsxs(e.Fragment,{children:[n("names.claim"),x!=null?e.jsxs(Cs,{children:[e.jsx(P,{}),ge(x)]}):null]});return e.jsxs(es,{"data-testid":"names-page",children:[e.jsxs(ts,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(ns,{onClick:i,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(ss,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(is,{children:[e.jsxs(os,{children:[e.jsxs(as,{children:[e.jsx(rs,{children:n("names.heroTitle")}),e.jsx(ls,{children:n("names.heroSubtitle")})]}),e.jsxs(cs,{children:[e.jsxs(ds,{"data-testid":"names-input-wrap",children:[e.jsxs(hs,{invalid:c==="taken",children:[e.jsxs(us,{children:[e.jsx(xs,{"aria-hidden":!0,children:"@"}),e.jsx(gs,{value:l,onChange:C=>m(on(C.target.value)),placeholder:k,"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:se,onFocus:()=>v(!0),style:{width:N!=null?`${N}px`:void 0}}),e.jsx(ps,{ref:F,"aria-hidden":!0,"data-placeholder":!l||void 0,children:l||k}),e.jsx(ys,{children:n("names.suffix")})]}),l.length>0?e.jsxs(bs,{"aria-hidden":!0,children:[l.length,"/",se]}):null,e.jsx(De,{onClick:E,disabled:!R,"data-testid":"names-claim",children:f})]}),c==="taken"?e.jsxs(fs,{role:"status","data-testid":"names-taken",children:[e.jsx(S,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(ms,{href:Ie(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(S,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null,c==="checking"?e.jsx(Q,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):H?e.jsxs(Q,{tone:"muted",role:"status","data-testid":"names-disabled",children:[e.jsx(S,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.registrationDisabled")}),e.jsxs(js,{href:Ie(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.registrationDisabledLink"),e.jsx(S,{name:"external-link",size:13,"aria-hidden":!0})]})]}):c==="error"?e.jsx(Q,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!M.ok&&M.reason==="too-short"?e.jsx(Q,{tone:"muted",role:"status",children:n("names.tooShort",{min:Oe})}):null]}),e.jsx(ws,{onClick:E,disabled:!R,children:f}),e.jsx(Rs,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:l}):""})]})]}),e.jsxs($s,{children:[e.jsxs(ks,{children:[e.jsx(Ss,{children:n("names.whyTitle")}),e.jsx(Es,{children:n("names.whyIntro")})]}),e.jsxs(Ls,{children:[e.jsxs(J,{children:[e.jsx(X,{src:Qn,alt:""}),e.jsxs(Y,{children:[e.jsx(ee,{children:n("names.why1Title")}),e.jsx(te,{children:n("names.why1")})]})]}),e.jsxs(J,{children:[e.jsx(X,{src:Jn,alt:""}),e.jsxs(Y,{children:[e.jsx(ee,{children:n("names.why2Title")}),e.jsxs(te,{children:[n("names.why2")," ",e.jsx(Ts,{children:n("names.why2Address")})]}),e.jsxs(Ne,{href:_s,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(J,{children:[e.jsx(X,{src:Xn,alt:""}),e.jsxs(Y,{children:[e.jsx(ee,{children:n("names.why3Title")}),e.jsx(te,{children:n("names.why3")})]})]}),e.jsxs(J,{children:[e.jsx(X,{src:Yn,alt:""}),e.jsxs(Y,{children:[e.jsx(ee,{children:n("names.why4Title")}),e.jsx(te,{children:n("names.why4")}),e.jsxs(Ne,{href:Ms,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),w?e.jsx(Vn,{name:l,priceCredits:x,onClose:()=>y(!1)}):null]})}const As="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",ze=48,Ns=["all","on_sale","not_for_sale"];function ni(){const[i]=Ye(),a=We(),o=(i.get("q")??"").trim().toLowerCase(),h=(i.get("q")??"").trim();Pe({title:h?n("seo.collectibles.searchTitle",{query:h}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const p=u.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[x,l]=et(p),{subCategory:m,rarities:c,priceMin:d,priceMax:w,smart:y,sort:j}=x,v=x.category,g=Ns.includes(x.status)?x.status:"on_sale";tt(`${v}:${m??""}`);const[b,$]=u.useState(!1);u.useEffect(()=>{if(!b)return;const r=q=>{q.key==="Escape"&&$(!1)};document.addEventListener("keydown",r);const B=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),document.body.style.overflow=B}},[b]);const _=g==="on_sale",T=d&&!Number.isNaN(Number(d))?Number(d):void 0,k=w&&!Number.isNaN(Number(w))?Number(w):void 0,F=bt(),N=m?it[m]:void 0,z=(Le.find(r=>r.key===j)??Le[0]).server,M={category:v,rarities:c.length?c:void 0,wearableCategories:N,minPriceCredits:T,maxPriceCredits:k,search:o||void 0,sortBy:z,isSmart:y||void 0,onSale:!0,listingType:F?void 0:"primary"},I={category:v,rarities:c.length?c:void 0,wearableCategories:N,search:o||void 0,sortBy:z,isWearableSmart:y||void 0,isOnSale:g==="not_for_sale"?!1:void 0},{items:R,total:H,isLoading:E,isPlaceholderData:f,error:C,hasNextPage:L,isFetchingNextPage:W,isFetchNextPageError:A,fetchNextPage:Ze}=Ot(_?["shop-items",M]:["catalog-items",I],r=>_?Ct({...M,first:ze,skip:r}):vt({...I,first:ze,skip:r}),{enabled:v!=="names"}),D=H,{data:ve,isError:qe,isPending:Ve}=He(),Ke=r=>ve&&r.manaWei?Ue(r.manaWei,ve):null,Qe=_&&Ve&&R.some(r=>r.source==="legacy"),je=E||f||Qe,Je=E?15:Math.max(R.length,1),$e=u.useRef(null);u.useEffect(()=>{E||f||!o||$e.current===o||($e.current=o,ne("Shop Searched",{query:o,result_count:D}))},[o,E,f,D]);const Z=u.useRef("__init__");u.useEffect(()=>{if(E||f)return;const r=JSON.stringify({category:v,subCategory:m,rarities:c,min:T,max:k,sort:j,status:g,smart:y});if(Z.current==="__init__"||Z.current===r){Z.current=r;return}Z.current=r,ne("Shop Applied Filter",{filters:{category:v,sub_category:m,rarities:c,min_price_credits:T??null,max_price_credits:k??null,status:g,smart:y,sort:j},result_count:D})},[v,m,c,T,k,j,g,y,E,f,D]);function ke(r){l({category:r,subCategory:null})}function Se(r){l({status:r})}function Ee(r){l({rarities:c.includes(r)?c.filter(B=>B!==r):[...c,r]})}function Xe(){l(p)}const U=[];(T!=null||k!=null)&&U.push({key:"price",label:n("filter.price"),onRemove:()=>{l({priceMin:"",priceMax:""})}});for(const r of nt)c.includes(r)&&U.push({key:`rarity-${r}`,label:wt(r),onRemove:()=>Ee(r)});return y&&U.push({key:"smart",label:n("filter.smart"),onRemove:()=>l({smart:!1})}),g!=="on_sale"&&U.push({key:"status",label:g==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>Se("on_sale")}),e.jsxs(jt,{"data-testid":"browse",children:[v!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx($t,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(kt,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(St,{children:[e.jsx(Et,{children:n("assets.filters")}),e.jsx(Lt,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(Tt,{children:e.jsx(Rt,{category:v,subCategory:m,onCategory:ke,onSub:r=>l({subCategory:r}),priceMin:d,priceMax:w,onPriceMin:r=>l({priceMin:r}),onPriceMax:r=>l({priceMax:r}),rarities:c,onToggleRarity:Ee,status:g,onStatus:Se,smart:y,onSmart:r=>l({smart:r})})}),e.jsx(_t,{children:e.jsx(Mt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(Ft,{children:v==="names"?e.jsx(Fs,{onBack:()=>ke("all")}):e.jsxs(e.Fragment,{children:[e.jsx(st,{sort:j,onSort:r=>l({sort:r}),total:H,loading:E||f,query:o,onOpenFilters:()=>$(!0),chips:U,onClearChips:Xe}),qe&&_&&R.some(r=>r.source==="legacy")?e.jsx(At,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,C?e.jsx(Gt,{message:n("assets.loadError"),testId:"browse-error"}):null,!je&&R.length===0&&!C?e.jsxs(Nt,{"data-testid":"browse-empty",children:[e.jsx(It,{src:As,alt:""}),e.jsxs(zt,{children:[e.jsx(Wt,{children:n("assets.empty.title")}),e.jsx(Bt,{children:h?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:h}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Pt,{children:e.jsx(Ht,{type:"button",onClick:()=>a("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(nn,{"data-testid":"grid",children:je?e.jsx(Te,{count:Je}):e.jsxs(e.Fragment,{children:[R.map(r=>{if(!_)return e.jsx(V,{item:r,mode:"view"},K(r));const B=r;if(B.source!=="legacy")return e.jsx(V,{item:r},K(r));const q=Ke(B);return q==null?e.jsx(V,{item:r,mode:"view"},K(r)):e.jsx(V,{item:{...B,priceCredits:q}},K(r))}),W?e.jsx(Te,{count:6}):null]})}),e.jsx(Ut,{hasNextPage:L,isFetching:W,isError:A,onLoadMore:()=>void Ze()})]})]})})]})}export{ni as Assets};
|
|
895
|
+
`,_s="https://docs.decentraland.org/creator/worlds/about/",Ms="https://governance.decentraland.org";function Ie(i){const a=typeof window<"u"?window.location.hostname:"";return`${a.endsWith("decentraland.org")?"https://decentraland.org":a.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(i)}`}function Fs({onBack:i}){Pe({title:n("seo.names.title"),description:n("seo.names.description")});const{session:a,signIn:o}=Be(),h=mn(),{data:p}=He(),x=p?Ue(G,p):null,[l,u]=m.useState(""),[c,d]=m.useState("idle"),[w,y]=m.useState(!1),[j,v]=m.useState(!1),[g,b]=m.useState(()=>{var C;return typeof window<"u"&&!!((C=window.matchMedia)!=null&&C.call(window,"(prefers-reduced-motion: reduce)").matches)});m.useEffect(()=>{var W;const C=(W=window.matchMedia)==null?void 0:W.call(window,"(prefers-reduced-motion: reduce)");if(!C)return;const L=A=>b(A.matches);return C.addEventListener("change",L),()=>C.removeEventListener("change",L)},[]);const $=n("names.placeholderExamples"),_=m.useMemo(()=>$.split(",").map(C=>C.trim()).filter(Boolean),[$]),k=Cn(_,!j&&!l&&!g)||n("names.inputPlaceholder"),F=m.useRef(null),[N,z]=m.useState(void 0);m.useLayoutEffect(()=>{F.current&&z(F.current.getBoundingClientRect().width)},[l,k]),m.useEffect(()=>{if(!Re(l).ok){d(l.length===0?"idle":"invalid");return}d("checking");const L=new AbortController,W=setTimeout(()=>{(async()=>{try{const A=await ln(l,{signal:L.signal});d(A)}catch(A){if((A==null?void 0:A.name)==="AbortError")return;d("error")}})()},400);return()=>{clearTimeout(W),L.abort()}},[l]);const M=Re(l),I=M.ok&&(c==="available"||c==="error"),R=h&&I,H=!h&&I;function E(){if(R){if(!a){o();return}y(!0)}}const f=e.jsxs(e.Fragment,{children:[n("names.claim"),x!=null?e.jsxs(Cs,{children:[e.jsx(P,{}),ge(x)]}):null]});return e.jsxs(es,{"data-testid":"names-page",children:[e.jsxs(ts,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(ns,{onClick:i,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(ss,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(is,{children:[e.jsxs(os,{children:[e.jsxs(as,{children:[e.jsx(rs,{children:n("names.heroTitle")}),e.jsx(ls,{children:n("names.heroSubtitle")})]}),e.jsxs(cs,{children:[e.jsxs(ds,{"data-testid":"names-input-wrap",children:[e.jsxs(hs,{invalid:c==="taken",children:[e.jsxs(ms,{children:[e.jsx(xs,{"aria-hidden":!0,children:"@"}),e.jsx(gs,{value:l,onChange:C=>u(on(C.target.value)),placeholder:k,"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:se,onFocus:()=>v(!0),style:{width:N!=null?`${N}px`:void 0}}),e.jsx(ps,{ref:F,"aria-hidden":!0,"data-placeholder":!l||void 0,children:l||k}),e.jsx(ys,{children:n("names.suffix")})]}),l.length>0?e.jsxs(bs,{"aria-hidden":!0,children:[l.length,"/",se]}):null,e.jsx(De,{onClick:E,disabled:!R,"data-testid":"names-claim",children:f})]}),c==="taken"?e.jsxs(fs,{role:"status","data-testid":"names-taken",children:[e.jsx(S,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(us,{href:Ie(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(S,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null,c==="checking"?e.jsx(Q,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):H?e.jsxs(Q,{tone:"muted",role:"status","data-testid":"names-disabled",children:[e.jsx(S,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.registrationDisabled")}),e.jsxs(js,{href:Ie(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.registrationDisabledLink"),e.jsx(S,{name:"external-link",size:13,"aria-hidden":!0})]})]}):c==="error"?e.jsx(Q,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!M.ok&&M.reason==="too-short"?e.jsx(Q,{tone:"muted",role:"status",children:n("names.tooShort",{min:Oe})}):null]}),e.jsx(ws,{onClick:E,disabled:!R,children:f}),e.jsx(Rs,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:l}):""})]})]}),e.jsxs($s,{children:[e.jsxs(ks,{children:[e.jsx(Ss,{children:n("names.whyTitle")}),e.jsx(Es,{children:n("names.whyIntro")})]}),e.jsxs(Ls,{children:[e.jsxs(J,{children:[e.jsx(X,{src:Qn,alt:""}),e.jsxs(Y,{children:[e.jsx(ee,{children:n("names.why1Title")}),e.jsx(te,{children:n("names.why1")})]})]}),e.jsxs(J,{children:[e.jsx(X,{src:Jn,alt:""}),e.jsxs(Y,{children:[e.jsx(ee,{children:n("names.why2Title")}),e.jsxs(te,{children:[n("names.why2")," ",e.jsx(Ts,{children:n("names.why2Address")})]}),e.jsxs(Ne,{href:_s,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(J,{children:[e.jsx(X,{src:Xn,alt:""}),e.jsxs(Y,{children:[e.jsx(ee,{children:n("names.why3Title")}),e.jsx(te,{children:n("names.why3")})]})]}),e.jsxs(J,{children:[e.jsx(X,{src:Yn,alt:""}),e.jsxs(Y,{children:[e.jsx(ee,{children:n("names.why4Title")}),e.jsx(te,{children:n("names.why4")}),e.jsxs(Ne,{href:Ms,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),w?e.jsx(Vn,{name:l,priceCredits:x,onClose:()=>y(!1)}):null]})}const As="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",ze=48,Ns=["all","on_sale","not_for_sale"];function ni(){const[i]=Ye(),a=We(),o=(i.get("q")??"").trim().toLowerCase(),h=(i.get("q")??"").trim();Pe({title:h?n("seo.collectibles.searchTitle",{query:h}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const p=m.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[x,l]=et(p),{subCategory:u,rarities:c,priceMin:d,priceMax:w,smart:y,sort:j}=x,v=x.category,g=Ns.includes(x.status)?x.status:"on_sale";tt(`${v}:${u??""}`);const[b,$]=m.useState(!1);m.useEffect(()=>{if(!b)return;const r=q=>{q.key==="Escape"&&$(!1)};document.addEventListener("keydown",r);const B=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),document.body.style.overflow=B}},[b]);const _=g==="on_sale",T=d&&!Number.isNaN(Number(d))?Number(d):void 0,k=w&&!Number.isNaN(Number(w))?Number(w):void 0,F=bt(),N=u?it[u]:void 0,z=(Le.find(r=>r.key===j)??Le[0]).server,M={category:v,rarities:c.length?c:void 0,wearableCategories:N,minPriceCredits:T,maxPriceCredits:k,search:o||void 0,sortBy:z,isSmart:y||void 0,onSale:!0,listingType:F?void 0:"primary"},I={category:v,rarities:c.length?c:void 0,wearableCategories:N,search:o||void 0,sortBy:z,isWearableSmart:y||void 0,isOnSale:g==="not_for_sale"?!1:void 0},{items:R,total:H,isLoading:E,isPlaceholderData:f,error:C,hasNextPage:L,isFetchingNextPage:W,isFetchNextPageError:A,fetchNextPage:Ze}=Ot(_?["shop-items",M]:["catalog-items",I],r=>_?Ct({...M,first:ze,skip:r}):vt({...I,first:ze,skip:r}),{enabled:v!=="names"}),D=H,{data:ve,isError:qe,isPending:Ve}=He(),Ke=r=>ve&&r.manaWei?Ue(r.manaWei,ve):null,Qe=_&&Ve&&R.some(r=>r.source==="legacy"),je=E||f||Qe,Je=E?15:Math.max(R.length,1),$e=m.useRef(null);m.useEffect(()=>{E||f||!o||$e.current===o||($e.current=o,ne("Shop Searched",{query:o,result_count:D}))},[o,E,f,D]);const Z=m.useRef("__init__");m.useEffect(()=>{if(E||f)return;const r=JSON.stringify({category:v,subCategory:u,rarities:c,min:T,max:k,sort:j,status:g,smart:y});if(Z.current==="__init__"||Z.current===r){Z.current=r;return}Z.current=r,ne("Shop Applied Filter",{filters:{category:v,sub_category:u,rarities:c,min_price_credits:T??null,max_price_credits:k??null,status:g,smart:y,sort:j},result_count:D})},[v,u,c,T,k,j,g,y,E,f,D]);function ke(r){l({category:r,subCategory:null})}function Se(r){l({status:r})}function Ee(r){l({rarities:c.includes(r)?c.filter(B=>B!==r):[...c,r]})}function Xe(){l(p)}const U=[];(T!=null||k!=null)&&U.push({key:"price",label:n("filter.price"),onRemove:()=>{l({priceMin:"",priceMax:""})}});for(const r of nt)c.includes(r)&&U.push({key:`rarity-${r}`,label:wt(r),onRemove:()=>Ee(r)});return y&&U.push({key:"smart",label:n("filter.smart"),onRemove:()=>l({smart:!1})}),g!=="on_sale"&&U.push({key:"status",label:g==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>Se("on_sale")}),e.jsxs(jt,{"data-testid":"browse",children:[v!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx($t,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(kt,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(St,{children:[e.jsx(Et,{children:n("assets.filters")}),e.jsx(Lt,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(Tt,{children:e.jsx(Rt,{category:v,subCategory:u,onCategory:ke,onSub:r=>l({subCategory:r}),priceMin:d,priceMax:w,onPriceMin:r=>l({priceMin:r}),onPriceMax:r=>l({priceMax:r}),rarities:c,onToggleRarity:Ee,status:g,onStatus:Se,smart:y,onSmart:r=>l({smart:r})})}),e.jsx(_t,{children:e.jsx(Mt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(Ft,{children:v==="names"?e.jsx(Fs,{onBack:()=>ke("all")}):e.jsxs(e.Fragment,{children:[e.jsx(st,{sort:j,onSort:r=>l({sort:r}),total:H,loading:E||f,query:o,onOpenFilters:()=>$(!0),chips:U,onClearChips:Xe}),qe&&_&&R.some(r=>r.source==="legacy")?e.jsx(At,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,C?e.jsx(Gt,{message:n("assets.loadError"),testId:"browse-error"}):null,!je&&R.length===0&&!C?e.jsxs(Nt,{"data-testid":"browse-empty",children:[e.jsx(It,{src:As,alt:""}),e.jsxs(zt,{children:[e.jsx(Wt,{children:n("assets.empty.title")}),e.jsx(Bt,{children:h?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:h}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Pt,{children:e.jsx(Ht,{type:"button",onClick:()=>a("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(nn,{"data-testid":"grid",children:je?e.jsx(Te,{count:Je}):e.jsxs(e.Fragment,{children:[R.map(r=>{if(!_)return e.jsx(V,{item:r,mode:"view"},K(r));const B=r;if(B.source!=="legacy")return e.jsx(V,{item:r},K(r));const q=Ke(B);return q==null?e.jsx(V,{item:r,mode:"view"},K(r)):e.jsx(V,{item:{...B,priceCredits:q}},K(r))}),W?e.jsx(Te,{count:6}):null]})}),e.jsx(Ut,{hasNextPage:L,isFetching:W,isError:A,onLoadMore:()=>void Ze()})]})]})})]})}export{ni as Assets};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as b,j as o}from"./react-BYHuwl8r.js";import{C as oe,R as B,a as je,b as We}from"./categories-
|
|
1
|
+
import{r as b,j as o}from"./react-BYHuwl8r.js";import{C as oe,R as B,a as je,b as We}from"./categories-DEDiLarq.js";import{n as c,T as Re}from"./Tooltip-B8fVdcBn.js";import{s as t,t as e,I as T,b as a,ac as K,C as U}from"./index-uGopMLx_.js";const f=1e5,y=900,g=90,R=g*2,ie=y/g,ne=f-y,Y=100;function G(i){const s=Math.max(0,Math.min(Math.round(i),R));if(s<=g)return s*ie;const p=y+(s-g)/g*ne;return Math.round(p/Y)*Y}function M(i){const s=Math.max(0,Math.min(i,f));return s<=y?Math.round(s/ie):g+Math.round((s-y)/ne*g)}function q(i){return M(i)/R*100}const Te=t.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as i,L as _,r as F}from"./react-BYHuwl8r.js";import{t as o,s as n,B as G,x as N,y as P,b as e,v as B,z as O,I as z,A as K,l as w,D as H,c as Q,E as X,F as A,k as Z,G as J,H as E}from"./index-
|
|
1
|
+
import{j as i,L as _,r as F}from"./react-BYHuwl8r.js";import{t as o,s as n,B as G,x as N,y as P,b as e,v as B,z as O,I as z,A as K,l as w,D as H,c as Q,E as X,F as A,k as Z,G as J,H as E}from"./index-uGopMLx_.js";import{c as U,d as V,b as Y,e as tt,s as it,a as et}from"./authorizations-DF77DF8l.js";import{f as ot}from"./builder-NgL-D1DH.js";import{m as at}from"./mana-matic-C4e1sNO3.js";import{f as nt}from"./errors-ByuDglQO.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-CFqPm_mN.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-o2u8XwNS.js";const st=N`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,rt=N`
|
|
4
4
|
to { background-position: -200% 0; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,L as Ke,r as M,b as ia,a as ra}from"./react-BYHuwl8r.js";import{t as ue,s as i,b as s,L as le,C as We,ax as oa,ay as ze,az as ca,J as la,I as O,A as zt,K as Ne,y as da,X as H,am as ut,v as ua,w as ha,l as pa,aA as ga,D as ma,aB as xa,an as fa,aC as ya,aD as ht,aE as ba,aF as va,z as wa,aG as pt,Z as V,aH as gt,aI as Ca,k as ae,r as ja,c as mt,aJ as ka,aK as xt,aL as Ee,aM as $a,aN as ye,aO as be,aP as ft,g as yt,f as bt,aQ as Sa}from"./index-
|
|
1
|
+
import{j as e,L as Ke,r as M,b as ia,a as ra}from"./react-BYHuwl8r.js";import{t as ue,s as i,b as s,L as le,C as We,ax as oa,ay as ze,az as ca,J as la,I as O,A as zt,K as Ne,y as da,X as H,am as ut,v as ua,w as ha,l as pa,aA as ga,D as ma,aB as xa,an as fa,aC as ya,aD as ht,aE as ba,aF as va,z as wa,aG as pt,Z as V,aH as gt,aI as Ca,k as ae,r as ja,c as mt,aJ as ka,aK as xt,aL as Ee,aM as $a,aN as ye,aO as be,aP as ft,g as yt,f as bt,aQ as Sa}from"./index-uGopMLx_.js";import{M as Ma,S as Ta,C as Ia,H as Pa,a as Aa,T as za,X as Ea,b as Ba,B as Ra,c as qa,d as vt,e as Fa,f as je,P as Et,m as _a,g as Wa,h as La,i as Ka,j as Na,k as Le,l as de,L as Qa,n as Ua,o as wt,p as Ct,W as Ga,q as Ha,r as Oa,s as Da,A as Va,t as Ja,u as Xa,v as Ya,w as Za,x as es,y as ts,z as as,D as ss,E as ns,F as is,G as rs,I as os,J as cs,K as ls,N as ds,O as us,Q as Be,R as hs,U as ps,V as gs,Y as ms,Z as jt,_ as kt,$ as xs,a0 as fs,a1 as ys,a2 as bs,a3 as $t,a4 as vs}from"./CollectionCarousel-CbSaEpnt.js";import{f as ws,h as Cs,a as js,n as ks,i as $s,A as Ss}from"./authorizations-DF77DF8l.js";import{g as Ms,h as Re,p as Ts}from"./buy-BO3reV5y.js";import{b as Is,w as Ps,S as St,G as As}from"./buy-gasless-D-P_OEFk.js";import{u as zs,M as Es,R as ve,r as Bs,c as Rs,p as Mt,a as qe}from"./useCreditPacks-A5RBl1MB.js";import{i as qs,a as Fs}from"./errors-ByuDglQO.js";import{E as _s}from"./ErrorNotice-85K9YN9v.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-CFqPm_mN.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-o2u8XwNS.js";const{colors:se,radius:Ws}=ue,Ls=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ai as N,aj as U,ak as o,al as n,K as D,x as M}from"./index-
|
|
1
|
+
import{ai as N,aj as U,ak as o,al as n,K as D,x as M}from"./index-uGopMLx_.js";import{r as w,j as g}from"./react-BYHuwl8r.js";import{g as z,a as E,c as I,b as K}from"./clsx-WwvpwSg0.js";import{s as v}from"./styled-DOIj5nPF.js";function F(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=M(P||(P=l`
|
|
2
2
|
0% {
|
|
3
3
|
transform: rotate(0deg);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,r as h,d as J,b as X}from"./react-BYHuwl8r.js";import{t as b,s,a1 as ee,E as z,bu as te,bv as ae,I as oe,b as a,c as ie,k as re,l as se,y as ne,C as ce,ap as F,aq as le,bw as de,bx as pe}from"./index-
|
|
1
|
+
import{j as e,r as h,d as J,b as X}from"./react-BYHuwl8r.js";import{t as b,s,a1 as ee,E as z,bu as te,bv as ae,I as oe,b as a,c as ie,k as re,l as se,y as ne,C as ce,ap as F,aq as le,bw as de,bx as pe}from"./index-uGopMLx_.js";import{E as xe}from"./ErrorNotice-85K9YN9v.js";import{d as me,P as he,C as ge,a as ue,b as be}from"./collectionPage.styles-B7luoUwY.js";import{u as fe}from"./useStore-Cus0x1de.js";import{u as ve,S as W,a as ye,F as je,c as Ce,P as we,d as $e,H as ke,e as Ne}from"./categories-DEDiLarq.js";import{L as Se}from"./LoadMore-CZrX5Gv7.js";import{u as Pe}from"./useInfiniteGrid-BSzq15pV.js";import{G as Ae}from"./grid.styles-CHyL7A8J.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-CFqPm_mN.js";import"./intl-CBcMB1D2.js";import"./skeleton.styles-BC9MqXiU.js";const Me=s.section`
|
|
2
2
|
position: relative;
|
|
3
3
|
border-radius: ${b.radius.card};
|
|
4
4
|
overflow: hidden;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as n,r as k}from"./react-BYHuwl8r.js";import{s as a,t as o,b,A as M,L as A,bV as z,C as ce,x as le,I as K,k as pe,g as j,f as C,aY as U,ar as Q,a9 as he,ck as q,aq as ue}from"./index-
|
|
1
|
+
import{j as n,r as k}from"./react-BYHuwl8r.js";import{s as a,t as o,b,A as M,L as A,bV as z,C as ce,x as le,I as K,k as pe,g as j,f as C,aY as U,ar as Q,a9 as he,ck as q,aq as ue}from"./index-uGopMLx_.js";import{s as xe,i as F,A as V,g as B,r as Z,m as J,k as Y,l as G}from"./authorizations-DF77DF8l.js";import{i as ge}from"./errors-ByuDglQO.js";import{E as fe}from"./ErrorNotice-85K9YN9v.js";import{k as me,l as be,m as _,n as we,o as ye}from"./buy-BO3reV5y.js";import{s as ee,M as te,E as ae}from"./sendMetaTransaction-o2u8XwNS.js";import{I as ve,C as ne}from"./ethers-CFqPm_mN.js";const S="shop:resume_after_signin",ke=900*1e3;function xt(e){try{sessionStorage.setItem(S,JSON.stringify({...e,at:Date.now()}))}catch{}}function gt(e){let t;try{t=sessionStorage.getItem(S)}catch{return null}if(!t)return null;try{sessionStorage.removeItem(S)}catch{}let i;try{i=JSON.parse(t)}catch{return null}return!i||i.type!==e||typeof i.at!="number"||Date.now()-i.at>ke?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function je(e,t){return(e+t-1n)/t}function Ce(e,t,i){return e<=0||t<=0?0n:e>=t?i:je(i*BigInt(e),BigInt(t))}function ft(e){var u,p,y;const t=Number.isFinite(e.priceCents)?Math.max(0,Math.trunc(e.priceCents)):0,i=Number.isFinite(e.balanceCents)?Math.max(0,Math.trunc(e.balanceCents)):0,s=e.priceManaWei>0n?e.priceManaWei:0n,l=e.manaBalanceWei>0n?e.manaBalanceWei:0n;if(t<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];if(i>=t&&c.push({method:"credits",creditsCents:t,manaWei:0n}),s>0n&&i>0&&i<t){const r=t-i,f=Ce(r,t,s);l>=f&&c.push({method:"combined",creditsCents:i,manaWei:f})}s>0n&&l>=s&&c.push({method:"mana",creditsCents:0,manaWei:s});const h=((u=c.find(r=>r.method==="credits"))==null?void 0:u.method)??((p=c.find(r=>r.method==="combined"))==null?void 0:p.method)??((y=c.find(r=>r.method==="mana"))==null?void 0:y.method)??null,g=!c.some(r=>r.method==="mana"||r.method==="combined")&&s>0n&&l>0n?{manaWei:l,manaCents:Me(l,t,s),priceCents:t}:null;return{options:c,preferred:h,manaShortfall:g}}function Me(e,t,i){return Number(e*BigInt(t)/i)}function mt(e,t){let i=Number.isFinite(t)?Math.max(0,Math.trunc(t)):0;return e.map(s=>{const l=Number.isFinite(s)?Math.max(0,Math.trunc(s)):0,c=Math.min(l,i);return i-=c,c})}function $(e){return Number.isFinite(e)?Math.max(0,e)/10:0}function bt(e,t){return e.options.find(i=>i.method===t)??null}function wt(e,t){if(!Number.isFinite(e)||e<=0||t<=0n)return null;const i=e/10;return Number(t)/1e18/i}const E="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Ae=a.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -289,7 +289,7 @@ import{j as n,r as k}from"./react-BYHuwl8r.js";import{s as a,t as o,b,A as M,L a
|
|
|
289
289
|
@media (prefers-reduced-motion: reduce) {
|
|
290
290
|
animation: none;
|
|
291
291
|
}
|
|
292
|
-
`;function kt({auth:e,signer:t,title:i,reason:s,name:l,image:c,icon:h,onAuthorized:w,onCancel:g,onClose:u}){const[p,y]=k.useState(!1),[r,f]=k.useState(null);async function v(){y(!0),f(null);try{await xe({auth:e,signer:t,active:!0}),w()}catch(x){ge(x)?f(b("authorizeStep.errorRejected")):(pe(x,{flow:"authorize_step",kind:e.kind}),f(b("authorizeStep.errorGeneric"))),y(!1)}}return n.jsx(Ie,{onClick:p?void 0:u,role:"presentation","data-testid":"authorize-step-scrim",children:n.jsxs(Ee,{onClick:x=>x.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i,children:[n.jsxs(Ne,{children:[n.jsx(Pe,{children:i}),n.jsx(Se,{onClick:u,disabled:p,"aria-label":b("authorizeStep.close"),children:n.jsx(K,{name:"close",className:"ico"})})]}),n.jsxs(Fe,{"data-testid":"authorize-step-row",children:[n.jsx(Ve,{children:c?n.jsx("img",{src:c,alt:""}):h}),n.jsxs(Le,{children:[n.jsx(De,{title:l,children:l}),n.jsx(Re,{children:s})]})]}),n.jsx(Oe,{children:b("authorizeStep.note")}),n.jsx(fe,{message:r}),n.jsxs(qe,{children:[n.jsx(Xe,{type:"button",onClick:g,disabled:p,children:b("authorizeStep.cancel")}),n.jsx(He,{type:"button","data-testid":"authorize-step-action",onClick:()=>void v(),disabled:p,children:p?n.jsxs(n.Fragment,{children:[n.jsx(Ke,{"aria-hidden":!0}),b("authorizeStep.authorizing")]}):b("authorizeStep.authorize")})]})]})})}const jt="data:image/webp;base64,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",Ct="https://cdn.decentraland.org/@dcl/shop/1.4.1
|
|
292
|
+
`;function kt({auth:e,signer:t,title:i,reason:s,name:l,image:c,icon:h,onAuthorized:w,onCancel:g,onClose:u}){const[p,y]=k.useState(!1),[r,f]=k.useState(null);async function v(){y(!0),f(null);try{await xe({auth:e,signer:t,active:!0}),w()}catch(x){ge(x)?f(b("authorizeStep.errorRejected")):(pe(x,{flow:"authorize_step",kind:e.kind}),f(b("authorizeStep.errorGeneric"))),y(!1)}}return n.jsx(Ie,{onClick:p?void 0:u,role:"presentation","data-testid":"authorize-step-scrim",children:n.jsxs(Ee,{onClick:x=>x.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i,children:[n.jsxs(Ne,{children:[n.jsx(Pe,{children:i}),n.jsx(Se,{onClick:u,disabled:p,"aria-label":b("authorizeStep.close"),children:n.jsx(K,{name:"close",className:"ico"})})]}),n.jsxs(Fe,{"data-testid":"authorize-step-row",children:[n.jsx(Ve,{children:c?n.jsx("img",{src:c,alt:""}):h}),n.jsxs(Le,{children:[n.jsx(De,{title:l,children:l}),n.jsx(Re,{children:s})]})]}),n.jsx(Oe,{children:b("authorizeStep.note")}),n.jsx(fe,{message:r}),n.jsxs(qe,{children:[n.jsx(Xe,{type:"button",onClick:g,disabled:p,children:b("authorizeStep.cancel")}),n.jsx(He,{type:"button","data-testid":"authorize-step-action",onClick:()=>void v(),disabled:p,children:p?n.jsxs(n.Fragment,{children:[n.jsx(Ke,{"aria-hidden":!0}),b("authorizeStep.authorizing")]}):b("authorizeStep.authorize")})]})]})})}const jt="data:image/webp;base64,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",Ct="https://cdn.decentraland.org/@dcl/shop/1.4.1/_assets/buy-error-22UunaPC.png";async function Mt(e){const[t]=await oe({...e,trades:[e.trade]});return t}async function At(e){const[t]=await oe({...e,trades:[],mints:[e.mint]});return t}async function oe(e){const{trades:t,mints:i=[],buyer:s,signer:l,onSigned:c}=e;if(t.length===0&&i.length===0)throw new Error("No items to buy");const h=new Map;for(const u of t){const p=`${u.chainId}:${u.contract.toLowerCase()}`,y=h.get(p);y?y.push(u):h.set(p,[u])}const w=new Map;for(const u of i){const p=w.get(u.chainId);p?p.push(u):w.set(u.chainId,[u])}const g=[];for(const u of h.values())g.push(await Ue({trades:u,buyer:s,signer:l,onSigned:c}));for(const[u,p]of w)g.push(await Qe({mints:p,chainId:u,buyer:s,signer:l,onSigned:c}));return g}async function Ue(e){const{trades:t,buyer:i,signer:s,onSigned:l}=e,c=t[0],h=j(U(c.contract),c.chainId),w=j(C.MANAToken,c.chainId);await F({auth:{kind:V.Allowance,contractAddress:w.address,spenderAddress:h.address,chainId:c.chainId},signer:s});const g=t.map(r=>be(r,i));if(B.enabled)try{const r=new ve(h.abi).encodeFunctionData("accept",[g]),f=Z(),v=J(s.provider,f),x=await ee(v,f,r,h,{serverURL:B.relayerUrl});return l==null||l(),await Y(x,"the MANA purchase"),x}catch(r){if(r instanceof te&&r.code===ae.USER_DENIED||r instanceof G)throw r;console.warn("[buyWithMana] gasless meta-tx failed, falling back to a direct tx:",r)}await Q(s.provider,c.chainId);const p=await new ne(h.address,h.abi,s).accept(g,_(c.chainId));return l==null||l(),(await p.wait()).transactionHash}async function Qe(e){const{mints:t,chainId:i,buyer:s,signer:l,onSigned:c}=e,h=j(C.CollectionStore,i),w=j(C.MANAToken,i),g=t.map(r=>r.item);if(await F({auth:{kind:V.Allowance,contractAddress:w.address,spenderAddress:h.address,chainId:i},signer:l}),B.enabled)try{const r=we(g,s,h.abi),f=Z(),v=J(l.provider,f),x=await ee(v,f,r,h,{serverURL:B.relayerUrl});return c==null||c(),await Y(x,"the MANA purchase"),x}catch(r){if(r instanceof te&&r.code===ae.USER_DENIED||r instanceof G)throw r;console.warn("[buyMintWithMana] gasless meta-tx failed, falling back to a direct tx:",r)}await Q(l.provider,i);const p=await new ne(h.address,h.abi,l).buy(ye(g,s),_(i));return c==null||c(),(await p.wait()).transactionHash}async function zt(e){const{trade:t,...i}=e;return re({target:{kind:"trade",trade:t},...i})}async function $t(e){const{mint:t,...i}=e;return re({target:{kind:"store",mint:t},...i})}async function re(e){const{target:t,buyer:i,signer:s,credits:l,manaGapWei:c,onBroadcast:h,onReverted:w}=e;if(l.length===0)throw new Error("No credits to spend — use the MANA-only rail for that");if(c<=0n)throw new Error("No MANA gap to cover — use the credits-only rail for that");const g=se(t),u=j(C.MANAToken,g),p=j(C.CreditsManager,g);await F({auth:{kind:V.Allowance,contractAddress:u.address,spenderAddress:p.address,chainId:g},signer:s});const r=(l.reduce((f,v)=>f+BigInt(v.availableAmount),0n)+c).toString();return me({purchase:Ze(t,l,r),buyer:i,signer:s,onBroadcast:h,onReverted:w})}function se(e){return e.kind==="trade"?e.trade.chainId:e.mint.chainId}function Ze(e,t,i){return e.kind==="trade"?{kind:"trade",trade:e.trade,credits:t,maxCreditedValue:i}:{kind:"store",item:e.mint.item,chainId:e.mint.chainId,credits:t,maxCreditedValue:i}}function Wt(e,t){const i=se(t);return e==="combined"?{spender:j(C.CreditsManager,i).address,chainId:i}:{spender:t.kind==="trade"?j(U(t.trade.contract),i).address:j(C.CollectionStore,i).address,chainId:i}}function Tt(e){return n.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...e,children:n.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function Bt(e){return n.jsx("svg",{viewBox:"0 0 20 20",width:"24",height:"24","aria-hidden":!0,...e,children:n.jsx("path",{fill:"#f48221",d:"M10 0a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 11a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm0-8a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1Z"})})}const{colors:d,gradients:L,radius:de,z:Je}=o,It=a.div`
|
|
293
293
|
position: fixed;
|
|
294
294
|
inset: 0;
|
|
295
295
|
z-index: ${Je.overlay};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index.es-C4oAOZ2V.js","_assets/react-BYHuwl8r.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{s as o,_ as a}from"./index-
|
|
2
|
+
import{s as o,_ as a}from"./index-uGopMLx_.js";import{r as n,j as e}from"./react-BYHuwl8r.js";const s=o.div`
|
|
3
3
|
position: fixed;
|
|
4
4
|
inset: 0;
|
|
5
5
|
/**
|