@dcl/shop 0.10.1-31042990976.commit-7edc9b6 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_assets/Activity-CJO4ONwi.js +371 -0
- package/_assets/AnimatedBackground-CHiOSgJ6.js +97 -0
- package/_assets/{Assets-BzPVRWYe.js → Assets-1KVsmH01.js} +8 -8
- package/_assets/{Assets.styles-D4-S4NWG.js → Assets.styles-BUHnZ7Nb.js} +140 -132
- package/_assets/{Authorizations-gGXOHHeT.js → Authorizations-BGlyC4dr.js} +28 -26
- package/_assets/Cart-afrKtZvj.js +707 -0
- package/_assets/{CircularProgress-DNShuaaC.js → CircularProgress-K7JjSpPZ.js} +1 -1
- package/_assets/{Collection-CI_bqtk6.js → Collection-B0G71rJV.js} +19 -19
- package/_assets/CollectionCarousel-B4hzcKRb.js +816 -0
- package/_assets/{Confetti-DkcOmptO.js → Confetti-BBhDY6Q2.js} +1 -1
- package/_assets/{Creator-CFf63R4B.js → Creator-CYC3eVKx.js} +7 -7
- package/_assets/{ErrorNotice-C_rQ_hZp.js → ErrorNotice-CnPcFEw_.js} +1 -1
- package/_assets/{ExchangeController-BPF_kkCP.js → ExchangeController-BAefeOHy.js} +1 -1
- package/_assets/{Faq--E1fBOzk.js → Faq-D03YByjo.js} +20 -14
- package/_assets/{GetCredits-C2rjzPBY.js → GetCredits-Cyw0rRMV.js} +114 -80
- package/_assets/{Grow-CyHu9l8s.js → Grow-CPwRVF9g.js} +1 -1
- package/_assets/{HelpersUtil-Bh7qiwp_.js → HelpersUtil-DJC0aWJi.js} +1 -1
- package/_assets/{ItemDetail-CtR1YHPh.js → ItemDetail-DSuMCjR9.js} +510 -480
- package/_assets/LazyEmoteControls-D-xqLU4A.js +2 -0
- package/_assets/{LoadMore-BQIcG-2Y.js → LoadMore-CMAFsns3.js} +1 -1
- package/_assets/ManaPricingBanner.styles-Bb7BS6EM.js +93 -0
- package/_assets/{MyAssets-Dk_4queh.js → MyAssets-C5lGRPqP.js} +33 -33
- package/_assets/{MyFavorites-yuyxKJv4.js → MyFavorites-C1t1o6Li.js} +12 -11
- package/_assets/{NotFound-rquTctww.js → NotFound-Bdi_fN5j.js} +1 -1
- package/_assets/{NotificationsBell-CFCmzqHj.js → NotificationsBell-BQk3EV9b.js} +1 -1
- package/_assets/{OutfitDetail-BFc4wS6X.js → OutfitDetail-D3Mwl6KR.js} +4 -4
- package/_assets/{OutfitPreview-C214293j.js → OutfitPreview-BpWwkAro.js} +2 -2
- package/_assets/{OutfitStudio-OOy9Y3VP.js → OutfitStudio-BL7OYD9h.js} +1 -1
- package/_assets/{StoreSettings-BpkjL6md.js → StoreSettings-BNhzJJib.js} +1 -1
- package/_assets/{Success-BXjczKuA.js → Success-Cnu7oCbI.js} +1 -1
- package/_assets/{SwapController-CA7wAH0n.js → SwapController-BD23YCPw.js} +1 -1
- package/_assets/{Tooltip-BoJS18Z3.js → Tooltip-tAvMrdFp.js} +1 -1
- package/_assets/{TradeService-DsmKoPxy.js → TradeService-a2JgoWq2.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-DKeivVWe.js → W3MFrameProviderSingleton-CPDmjNiA.js} +3 -3
- package/_assets/{WebCryptoP256-CJPdW9Ug.js → WebCryptoP256-DIEJtB0I.js} +1 -1
- package/_assets/{authorizations-2Xd-ft_C.js → authorizations-HgwrWkaa.js} +1 -1
- package/_assets/{basic-CpO7N7NV.js → basic-B3qEjJvY.js} +1 -1
- package/_assets/{biconomy-HF5uwOUc.js → biconomy-CzcDC8vB.js} +1 -1
- package/_assets/{builder-uBBMnbtK.js → builder-TZGldT6a.js} +1 -1
- package/_assets/{buy-CgUGATyG.js → buy-CuFubBZY.js} +1 -1
- package/_assets/{buy-gasless-CVTH5KGZ.js → buy-gasless-DO6cBuJ3.js} +1 -1
- package/_assets/{categories-yTyOCTA2.js → categories-B3DJZe02.js} +54 -54
- package/_assets/{ccip-Bq1h60c1.js → ccip-CB03B_MW.js} +1 -1
- package/_assets/{ccip-BjT8ndU2.js → ccip-VI2-jJnV.js} +1 -1
- package/_assets/collectionPage.styles-DXfFyRiH.js +49 -0
- package/_assets/{controller-CBtSaaQD.js → controller-CEo6ipG_.js} +2 -2
- package/_assets/{core-CIuOeePP.js → core-DmqfUS4f.js} +4 -4
- package/_assets/{createSvgIcon-Dax4uwaL.js → createSvgIcon-WfOAVB94.js} +4 -4
- package/_assets/{custom-CYUokIbm.js → custom-bIxIBqCn.js} +1 -1
- package/_assets/{data-capture-6P55-IaB.js → data-capture-Dtaj6ehs.js} +1 -1
- package/_assets/disposePreview-5vjiqVZ0.js +1 -0
- package/_assets/{email-nYmfz15C.js → email-DBXWS-p0.js} +1 -1
- package/_assets/{embedded-wallet-D_e_UWzV.js → embedded-wallet-DqlpsZRk.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-s1GWUoDX.js → emotion-styled.browser.esm-pOAX0dMa.js} +1 -1
- package/_assets/{engine-CpLQoIqI.js → engine-gP8vp-2g.js} +1 -1
- package/_assets/{errors-hu6Xw0D2.js → errors-WNvNILsF.js} +1 -1
- package/_assets/{estimate-l1-fee-CLRDa6fI.js → estimate-l1-fee-X1cvAsdL.js} +1 -1
- package/_assets/{execute-DqPg9Ksw.js → execute-V2l_cDAW.js} +2 -2
- package/_assets/{features-BtrrmffG.js → features-CFR_-yBt.js} +1 -1
- package/_assets/{fetchTokenMetadata-DFJ36WnI.js → fetchTokenMetadata-Do5GLuIQ.js} +2 -2
- package/_assets/{field.styles-XpeJ0COA.js → field.styles-ciG_OcBi.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-DlCx83R8.js → get-ecosystem-wallet-info-CyDTxLgQ.js} +1 -1
- package/_assets/{getBalance-B5ocM9g2.js → getBalance-7wKu8RUe.js} +1 -1
- package/_assets/{getNFT-oiyevCuO.js → getNFT-BbpUiMXR.js} +1 -1
- package/_assets/{getNFT-DBaH5cpy.js → getNFT-DecLUThv.js} +1 -1
- package/_assets/{grid.styles-Dpb8Greh.js → grid.styles-Caahz6PS.js} +1 -1
- package/_assets/{hashTypedData-CeLfcFPQ.js → hashTypedData-C9kgxiiE.js} +1 -1
- package/_assets/{hashTypedData-NanWeJ-D.js → hashTypedData-Ca524zaX.js} +1 -1
- package/_assets/hero-credits-mobile-C9Muog4T.webp +0 -0
- package/_assets/{in-app-DfEVZ7ts.js → in-app-B-disnkm.js} +1 -1
- package/_assets/{in-app-wallet-calls-CaankqgP.js → in-app-wallet-calls-3yighozE.js} +1 -1
- package/_assets/{index-De-xiANX.js → index--1pBMb8n.js} +1 -1
- package/_assets/{index-BNnBkkJr.js → index-2-BWsekC.js} +1 -1
- package/_assets/{index-DxUWfPTE.js → index-8xcbpK09.js} +1 -1
- package/_assets/{index-Dyf04oQ8.js → index-B6l73M7K.js} +1 -1
- package/_assets/{index-BJ6fvgAM.js → index-BBX5Tona.js} +1 -1
- package/_assets/{index-_l18b6D8.js → index-BLCTVSaC.js} +1 -1
- package/_assets/{index-CYd-9A8i.js → index-BMFVFrWl.js} +3 -3
- package/_assets/{index-CaH_IfZ9.js → index-BQB7qYN1.js} +1 -1
- package/_assets/index-BYP7oMPZ.css +1 -0
- package/_assets/{index-BMGdvlP9.js → index-Bd7SNoIN.js} +2 -2
- package/_assets/{index-OiVd03k_.js → index-BdQllJHM.js} +1 -1
- package/_assets/{index-Cbb2oZ2Y.js → index-BjEDpwxR.js} +1 -1
- package/_assets/{index-B4WRMX84.js → index-BrU_i04f.js} +1 -1
- package/_assets/{index-BGSoCmOn.js → index-BuImQh6o.js} +1 -1
- package/_assets/{index-COqbI5lZ.js → index-C3MGLBUO.js} +1 -1
- package/_assets/index-C616xNgB.js +3699 -0
- package/_assets/{index-DI0-gUeO.js → index-CAl290ro.js} +1 -1
- package/_assets/{index-BPoXI4qO.js → index-CEDBhmGn.js} +1 -1
- package/_assets/{index-C8Cm7Ukd.js → index-CEnhHz30.js} +1 -1
- package/_assets/{index-BC1n3NBn.js → index-CFziwAGz.js} +1 -1
- package/_assets/{index-DJxot5zE.js → index-CGcb9Mz3.js} +1 -1
- package/_assets/{index-DxD-NQZ2.js → index-CKkE-eRE.js} +1 -1
- package/_assets/{index-cpjoojGa.js → index-CONyzZZC.js} +3 -3
- package/_assets/{index-BHzYL11-.js → index-CO_xP_3N.js} +1 -1
- package/_assets/{index-BqVSjccZ.js → index-CUAEZ5zJ.js} +1 -1
- package/_assets/index-CZBUgvRB.js +1 -0
- package/_assets/{index-BXdpk7Oq.js → index-CdFrv2eV.js} +1 -1
- package/_assets/{index-zPBk9zxn.js → index-CjhGjrdW.js} +1 -1
- package/_assets/{index-w9D58X3R.js → index-CmlH9TBP.js} +1 -1
- package/_assets/{index-enm6a-Yh.js → index-CyITvpDL.js} +1 -1
- package/_assets/{index-UiKz3U--.js → index-D58OkhU1.js} +1 -1
- package/_assets/{index-BKYIrw8q.js → index-D9iAFl4E.js} +1 -1
- package/_assets/{index-CWMeoaW8.js → index-DCAUOF_r.js} +1 -1
- package/_assets/{index-B-kvIPu1.js → index-DCMLwiSR.js} +1 -1
- package/_assets/{index-CPOch-_L.js → index-DEw1jYQT.js} +1 -1
- package/_assets/{index-Bry4nBQ3.js → index-DJOlt1Iv.js} +1 -1
- package/_assets/{index-Bu9Qy6np.js → index-DKghJgJj.js} +1 -1
- package/_assets/{index-CaRe7gid.js → index-DNvcQt0s.js} +3 -3
- package/_assets/{index-jzVm2M_d.js → index-DRI1gQSo.js} +1 -1
- package/_assets/{index-gR7VkXwX.js → index-DUmo7598.js} +3 -3
- package/_assets/{index-BccvdHMd.js → index-Dag4zALf.js} +1 -1
- package/_assets/index-DsH_mBtT.js +622 -0
- package/_assets/{index-BntzHAg5.js → index-DvjyzmjB.js} +1 -1
- package/_assets/{index-T6PQTPj1.js → index-DxB85HDB.js} +1 -1
- package/_assets/{index-ChhX0J8g.js → index-Eip3e8N8.js} +1 -1
- package/_assets/{index-CQMg581G.js → index-Gw3Mauv_.js} +1 -1
- package/_assets/{index-CkvT2_Qp.js → index-JuH5W7YS.js} +2 -2
- package/_assets/{index-D9avTVnT.js → index-N5sgh9IC.js} +1 -1
- package/_assets/{index-CIJje8vF.js → index-o0b8cjRQ.js} +1 -1
- package/_assets/{index-Deo0xkWr.js → index-p0fxtTsZ.js} +2 -2
- package/_assets/{index-FaWeourd.js → index-p4Ph7ugv.js} +1 -1
- package/_assets/{index-B0jVlmk0.js → index-tCYP1O3W.js} +1 -1
- package/_assets/{index-BZQS2qMR.js → index-yiECqJCb.js} +1 -1
- package/_assets/{index.es-DZrZt1nk.js → index.es-C5PJ78RX.js} +1 -1
- package/_assets/{index.es-COh1P5q0.js → index.es-D73EniUm.js} +1 -1
- package/_assets/{index.es-DKfCNVgZ.js → index.es-DF_hlZIu.js} +4 -4
- package/_assets/{localBatchGatewayRequest-BI4PJuWG.js → localBatchGatewayRequest-DvkdRgNo.js} +1 -1
- package/_assets/{networks-Blxn8DDe.js → networks-7b-i0dnd.js} +1 -1
- package/_assets/{onramp-Dy-wl2-G.js → onramp-CoF8bFaS.js} +1 -1
- package/_assets/{openzeppelin-BMYbmCTg.js → openzeppelin-DcsEW8tQ.js} +1 -1
- package/_assets/{parseNft-C3NZ6wub.js → parseNft-CNJ2CwyE.js} +2 -2
- package/_assets/{parseSignature-DYiE9TKW.js → parseSignature-D0-1k6Yx.js} +1 -1
- package/_assets/{parseSignature-C_OIotiZ.js → parseSignature-whU_pkfu.js} +3 -3
- package/_assets/{passkeys-B1XwJZLc.js → passkeys-SqHHDvyI.js} +1 -1
- package/_assets/{pay-with-exchange-CNHEYWhj.js → pay-with-exchange-Cvr7dd94.js} +1 -1
- package/_assets/promo-best-rated-emotes-C6kNvB-a.png +0 -0
- package/_assets/promo-week-selected-outfits-BBmkZYZx.png +0 -0
- package/_assets/{qr-overlay-xYKFPsA7.js → qr-overlay-HlBTd234.js} +1 -1
- package/_assets/{receive-CZ46hzUV.js → receive-HPltMi_i.js} +1 -1
- package/_assets/{resolveImplementation-CjcXKJyr.js → resolveImplementation-CM1yFlGf.js} +1 -1
- package/_assets/{rpc-CcyaVsGv.js → rpc-CPS_djFB.js} +1 -1
- package/_assets/{secp256k1-CKJqWWFY.js → secp256k1-CQmdb_AD.js} +1 -1
- package/_assets/{secp256k1-CtAF_8et.js → secp256k1-ChRNiO68.js} +1 -1
- package/_assets/{secp256k1-ZiNVKyYC.js → secp256k1-DUTfCpIK.js} +1 -1
- package/_assets/{send-batch-transaction-BjDzAjfB.js → send-batch-transaction-Vn4JOFM5.js} +1 -1
- package/_assets/{send-eip712-transaction-C_cuPsBN.js → send-eip712-transaction-Qvibiwhe.js} +2 -2
- package/_assets/{send-gasless-transaction-nJMNrEi5.js → send-gasless-transaction-DQLcvFHt.js} +2 -2
- package/_assets/{send-transaction-DlrF4JVI.js → send-transaction-CZ0kapdy.js} +2 -2
- package/_assets/{send-C3JUT-Wt.js → send-zy_Vr6BQ.js} +1 -1
- package/_assets/{sendMetaTransaction-CYTRgQS4.js → sendMetaTransaction-Ba_-1nOk.js} +1 -1
- package/_assets/{sendRawTransaction-CrjHCLLH.js → sendRawTransaction-BUz1EYd8.js} +3 -3
- package/_assets/{serializeTransaction-DCwr_uqm.js → serializeTransaction-B8qCVIIu.js} +1 -1
- package/_assets/{session-proposal-Cr_4TYaU.js → session-proposal-BqO43SKO.js} +1 -1
- package/_assets/{session-request-VECe4LIn.js → session-request-DbQI-hjo.js} +2 -2
- package/_assets/{signing-DsQKDYvj.js → signing-CVGndCRE.js} +3 -3
- package/_assets/{skeleton.styles-B5haYcet.js → skeleton.styles-K9f1Sxf1.js} +1 -1
- package/_assets/{socials-B80b3Xbl.js → socials-CNOGl_eO.js} +1 -1
- package/_assets/{styled-qF6AFIDl.js → styled-CljNQW-J.js} +1 -1
- package/_assets/{swaps-9KfTzTvK.js → swaps-D5haogfk.js} +1 -1
- package/_assets/{thirdweb-C31f21KI.js → thirdweb-CC2bk-Up.js} +3 -3
- package/_assets/{to-serializable-transaction-DRO125BM.js → to-serializable-transaction-BB0M9pw8.js} +2 -2
- package/_assets/{transactionReceipt-D2IEagp9.js → transactionReceipt-puJsrtjz.js} +1 -1
- package/_assets/{transactions-COJcFMl1.js → transactions-BnYHwdat.js} +1 -1
- package/_assets/{useCreditPacks-UUgawD-U.js → useCreditPacks-xyyhS_80.js} +1 -1
- package/_assets/{useImportable-DdzyhNKj.js → useImportable-Bh7jH6e9.js} +1 -1
- package/_assets/{useInfiniteGrid-CWAXtPPS.js → useInfiniteGrid-CV4TXaLn.js} +1 -1
- package/_assets/{useTheme-nSt_zjh9.js → useTheme-Czw2-J4G.js} +1 -1
- package/_assets/{verifyHash-3joPxTRt.js → verifyHash-CAYWYGEG.js} +1 -1
- package/_assets/{w3m-modal-fllBGzZL.js → w3m-modal-DtofW43q.js} +1 -1
- package/_assets/{w3m-modal-BdMUp7-V.js → w3m-modal-Fr29zvJe.js} +1 -1
- package/_assets/{wait-for-tx-receipt-DLk5rirA.js → wait-for-tx-receipt-mfzWqQ40.js} +1 -1
- package/_assets/{wallets-p_5_3A7U.js → wallets-DT2LKaVF.js} +5 -5
- package/_assets/{web-connector-B1ItZy3i.js → web-connector-4TZSYYzx.js} +3 -3
- package/_assets/{writeContract-_6f7I-3C.js → writeContract-CEQ0n4-z.js} +1 -1
- package/_assets/{zoraTestnet-BegtFmVb.js → zoraTestnet-Cd1Th5ww.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Activity-Cx-gKp62.js +0 -381
- package/_assets/AnimatedBackground-yDvJglBx.js +0 -97
- package/_assets/Cart-C4zUzYSx.js +0 -669
- package/_assets/CollectionCarousel-BAwS8rTZ.js +0 -804
- package/_assets/LazyEmoteControls-BUp4tFZX.js +0 -2
- package/_assets/ManaPricingBanner.styles-Dj_122X4.js +0 -74
- package/_assets/collectionPage.styles-BOOK4JE1.js +0 -48
- package/_assets/disposePreview-C6zVmkpS.js +0 -1
- package/_assets/index-BL2RPpVH.js +0 -3390
- package/_assets/index-C3zA3tgr.js +0 -519
- package/_assets/index-D-NhBWWr.css +0 -1
- package/_assets/index-sW8OdK66.js +0 -1
- package/_assets/packs-backdrop-BcXiUPeP.webp +0 -0
|
@@ -0,0 +1,816 @@
|
|
|
1
|
+
import{j as t,r as v}from"./react-BYHuwl8r.js";import{s as e,t as r,b as m,z as j,L as C,bZ as M,C as Z,w as J,I as X,F as Y,g as W,h as I,f as G,au as _,aa as ee,cm as F,as as te}from"./index-C616xNgB.js";import{s as ae,f as D,A as q,g as L,r as ne,m as ie,i as oe,j as se}from"./authorizations-HgwrWkaa.js";import{i as re}from"./errors-WNvNILsF.js";import{E as de}from"./ErrorNotice-CnPcFEw_.js";import{l as ce,m as le,n as pe}from"./buy-CuFubBZY.js";import{s as he,M as ue,E as xe}from"./sendMetaTransaction-Ba_-1nOk.js";import{I as ge,C as fe}from"./ethers-BDpbhgX6.js";const P="shop:resume_after_signin",me=900*1e3;function dt(n){try{sessionStorage.setItem(P,JSON.stringify({...n,at:Date.now()}))}catch{}}function ct(n){let a;try{a=sessionStorage.getItem(P)}catch{return null}if(!a)return null;try{sessionStorage.removeItem(P)}catch{}let i;try{i=JSON.parse(a)}catch{return null}return!i||i.type!==n||typeof i.at!="number"||Date.now()-i.at>me?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function be(n,a){return(n+a-1n)/a}function we(n,a,i){return n<=0||a<=0?0n:n>=a?i:be(i*BigInt(n),BigInt(a))}function lt(n){var b,h,y;const a=Number.isFinite(n.priceCents)?Math.max(0,Math.trunc(n.priceCents)):0,i=Number.isFinite(n.balanceCents)?Math.max(0,Math.trunc(n.balanceCents)):0,o=n.priceManaWei>0n?n.priceManaWei:0n,l=n.manaBalanceWei>0n?n.manaBalanceWei:0n;if(a<=0)return{options:[],preferred:null,manaShortfall:null};const d=[];if(i>=a&&d.push({method:"credits",creditsCents:a,manaWei:0n}),o>0n&&i>0&&i<a){const c=a-i,w=we(c,a,o);l>=w&&d.push({method:"combined",creditsCents:i,manaWei:w})}o>0n&&l>=o&&d.push({method:"mana",creditsCents:0,manaWei:o});const p=((b=d.find(c=>c.method==="credits"))==null?void 0:b.method)??((h=d.find(c=>c.method==="combined"))==null?void 0:h.method)??((y=d.find(c=>c.method==="mana"))==null?void 0:y.method)??null,g=!d.some(c=>c.method==="mana"||c.method==="combined")&&o>0n&&l>0n?{manaWei:l,manaCents:ye(l,a,o),priceCents:a}:null;return{options:d,preferred:p,manaShortfall:g}}function ye(n,a,i){return Number(n*BigInt(a)/i)}function pt(n,a){let i=Number.isFinite(a)?Math.max(0,Math.trunc(a)):0;return n.map(o=>{const l=Number.isFinite(o)?Math.max(0,Math.trunc(o)):0,d=Math.min(l,i);return i-=d,d})}function A(n){return Number.isFinite(n)?Math.max(0,n)/10:0}function ht(n,a){return n.options.find(i=>i.method===a)??null}function ut(n,a){if(!Number.isFinite(n)||n<=0||a<=0n)return null;const i=n/10;return Number(a)/1e18/i}const B="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",ve=e.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 12px;
|
|
5
|
+
align-items: stretch;
|
|
6
|
+
width: 100%;
|
|
7
|
+
`,K=`
|
|
8
|
+
width: 100%;
|
|
9
|
+
min-height: 56px;
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
gap: 8px;
|
|
14
|
+
flex-wrap: wrap;
|
|
15
|
+
padding: 0 12px;
|
|
16
|
+
border: 0;
|
|
17
|
+
border-radius: 12px;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
transition:
|
|
20
|
+
background 0.15s ease,
|
|
21
|
+
filter 0.15s ease;
|
|
22
|
+
font-family: ${r.font.sans};
|
|
23
|
+
font-weight: 600;
|
|
24
|
+
font-size: 15px;
|
|
25
|
+
line-height: 24px;
|
|
26
|
+
letter-spacing: 0.46px;
|
|
27
|
+
text-transform: uppercase;
|
|
28
|
+
color: ${r.colors.softWhite};
|
|
29
|
+
|
|
30
|
+
&:focus-visible {
|
|
31
|
+
outline: 2px solid ${r.colors.accent};
|
|
32
|
+
outline-offset: 2px;
|
|
33
|
+
}
|
|
34
|
+
&:disabled {
|
|
35
|
+
opacity: 0.6;
|
|
36
|
+
cursor: default;
|
|
37
|
+
}
|
|
38
|
+
`,O=e.button`
|
|
39
|
+
${K}
|
|
40
|
+
background: ${r.gradients.amethyst};
|
|
41
|
+
|
|
42
|
+
&:hover:not(:disabled) {
|
|
43
|
+
filter: brightness(1.08);
|
|
44
|
+
}
|
|
45
|
+
`,N=e.button`
|
|
46
|
+
${K}
|
|
47
|
+
background: ${r.colors.text2};
|
|
48
|
+
|
|
49
|
+
&:hover:not(:disabled) {
|
|
50
|
+
background: ${r.colors.gray0};
|
|
51
|
+
}
|
|
52
|
+
`,z=e.span`
|
|
53
|
+
display: inline-flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
gap: 6px;
|
|
56
|
+
text-transform: none;
|
|
57
|
+
letter-spacing: 0;
|
|
58
|
+
|
|
59
|
+
span {
|
|
60
|
+
font-size: 20px;
|
|
61
|
+
font-weight: 600;
|
|
62
|
+
line-height: normal;
|
|
63
|
+
}
|
|
64
|
+
.ico {
|
|
65
|
+
width: 24px;
|
|
66
|
+
height: 24px;
|
|
67
|
+
background: ${r.colors.softWhite};
|
|
68
|
+
}
|
|
69
|
+
`,E=e.span`
|
|
70
|
+
position: relative;
|
|
71
|
+
display: block;
|
|
72
|
+
width: 30px;
|
|
73
|
+
height: 30px;
|
|
74
|
+
flex: none;
|
|
75
|
+
|
|
76
|
+
/* Centred in the slot, not pinned to its top: the slot is taller than the glyph and sits next to a
|
|
77
|
+
vertically centred amount, so a top-pinned mark reads as floating above the number. */
|
|
78
|
+
img {
|
|
79
|
+
position: absolute;
|
|
80
|
+
top: 50%;
|
|
81
|
+
left: 0;
|
|
82
|
+
transform: translateY(-50%);
|
|
83
|
+
width: 24px;
|
|
84
|
+
height: 24px;
|
|
85
|
+
display: block;
|
|
86
|
+
}
|
|
87
|
+
`,ke=e.span`
|
|
88
|
+
font-size: 13px;
|
|
89
|
+
font-weight: 600;
|
|
90
|
+
letter-spacing: 0.02em;
|
|
91
|
+
opacity: 0.85;
|
|
92
|
+
`,je=e.span`
|
|
93
|
+
font-size: 18px;
|
|
94
|
+
font-weight: 600;
|
|
95
|
+
opacity: 0.7;
|
|
96
|
+
`,Ce=e.p`
|
|
97
|
+
margin: 0;
|
|
98
|
+
font-family: ${r.font.sans};
|
|
99
|
+
font-weight: 400;
|
|
100
|
+
font-size: 12px;
|
|
101
|
+
line-height: 1;
|
|
102
|
+
color: ${r.colors.muted};
|
|
103
|
+
text-align: center;
|
|
104
|
+
`,Me=e.p`
|
|
105
|
+
margin: -4px 0 0;
|
|
106
|
+
font-family: ${r.font.sans};
|
|
107
|
+
font-weight: 400;
|
|
108
|
+
font-size: 12px;
|
|
109
|
+
line-height: 1.4;
|
|
110
|
+
color: ${r.colors.muted};
|
|
111
|
+
text-align: center;
|
|
112
|
+
`;function xt({options:n,totalCents:a,onPay:i,busy:o=!1,rateNote:l,creditsLabel:d,shortfall:p,showCreditsAmount:x=!0,creditsFallback:g=null}){const b=n.some(h=>h.method==="credits");return t.jsxs(ve,{children:[!b&&g?t.jsx(O,{type:"button","data-testid":"pay-with-credits-topup",onClick:g.onClick,disabled:o,children:t.jsx("span",{children:g.label})}):null,n.map(h=>h.method==="credits"?t.jsxs(O,{type:"button","data-testid":"pay-with-credits",onClick:()=>i("credits"),disabled:o,children:[t.jsx("span",{children:d??m("buyModal.buy")}),x?t.jsxs(z,{children:[t.jsx(j,{}),t.jsx("span",{children:C(A(h.creditsCents))})]}):null]},"credits"):h.method==="mana"?t.jsxs(N,{type:"button","data-testid":"pay-with-mana",onClick:()=>i("mana"),disabled:o,children:[t.jsx("span",{children:m("buyModal.buyWithMana")}),t.jsxs(z,{children:[t.jsx(E,{children:t.jsx("img",{src:B,alt:"","aria-hidden":!0})}),t.jsx("span",{children:M(h.manaWei)})]})]},"mana"):t.jsxs(N,{type:"button","data-testid":"pay-with-combined",onClick:()=>i("combined"),disabled:o,children:[t.jsx("span",{children:m("buyModal.buyWith")}),t.jsxs(z,{children:[t.jsx(j,{}),t.jsx("span",{children:C(A(h.creditsCents))}),t.jsx(je,{children:"+"}),t.jsx(E,{children:t.jsx("img",{src:B,alt:"","aria-hidden":!0})}),t.jsx("span",{children:M(h.manaWei)}),t.jsx(ke,{children:"MANA"})]})]},"combined")),p?t.jsxs(t.Fragment,{children:[t.jsxs(N,{type:"button","data-testid":"pay-with-mana-disabled",disabled:!0,children:[t.jsx("span",{children:m("buyModal.buyWithMana")}),t.jsxs(z,{children:[t.jsx(E,{children:t.jsx("img",{src:B,alt:"","aria-hidden":!0})}),t.jsx("span",{children:M(p.manaWei)})]})]},"mana-short"),t.jsx(Me,{"data-testid":"mana-shortfall-note",children:m("buyModal.manaWorth",{mana:M(p.manaWei),credits:C(A(p.manaCents)),price:C(A(p.priceCents)),currency:Z.name})})]}):null,l?t.jsx(Ce,{"data-testid":"mana-rate-note",children:l}):null,t.jsx("span",{hidden:!0,"data-testid":"pay-total-cents",children:a})]})}function gt(n,a){const i=(o,...l)=>void n.invalidateQueries({queryKey:a?[o,...l]:[o]});n.invalidateQueries({queryKey:["usd-balance"]}),n.invalidateQueries({queryKey:["detail-trade"]}),n.invalidateQueries({queryKey:["shop-item"]}),i("owned-token",a==null?void 0:a.contractAddress,a==null?void 0:a.tokenId),i("public-token",a==null?void 0:a.contractAddress,a==null?void 0:a.tokenId),i("item-resales",a==null?void 0:a.contractAddress,a==null?void 0:a.itemId),n.invalidateQueries({queryKey:["shop-items"]}),n.invalidateQueries({queryKey:["catalog-items"]}),n.invalidateQueries({queryKey:["overview-listings"]}),n.invalidateQueries({queryKey:["upsell-listings"]}),n.invalidateQueries({queryKey:["my-assets"]}),n.invalidateQueries({queryKey:["purchases"]}),n.invalidateQueries({queryKey:["owned-item-count"]})}const Ae=J`
|
|
113
|
+
to { transform: rotate(360deg); }
|
|
114
|
+
`,ze=e.div`
|
|
115
|
+
position: fixed;
|
|
116
|
+
inset: 0;
|
|
117
|
+
z-index: 10000;
|
|
118
|
+
display: flex;
|
|
119
|
+
align-items: center;
|
|
120
|
+
justify-content: center;
|
|
121
|
+
padding: 16px;
|
|
122
|
+
background: rgba(22, 21, 24, 0.55);
|
|
123
|
+
`,Te=e.div`
|
|
124
|
+
width: 480px;
|
|
125
|
+
max-width: 100%;
|
|
126
|
+
max-height: 92vh;
|
|
127
|
+
overflow-y: auto;
|
|
128
|
+
background: ${r.colors.white};
|
|
129
|
+
border-radius: 16px;
|
|
130
|
+
padding: 12px 16px 16px;
|
|
131
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
132
|
+
display: flex;
|
|
133
|
+
flex-direction: column;
|
|
134
|
+
gap: 20px;
|
|
135
|
+
`,We=e.div`
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
justify-content: space-between;
|
|
139
|
+
gap: 8px;
|
|
140
|
+
padding-bottom: 16px;
|
|
141
|
+
border-bottom: 1px solid ${r.colors.gray4};
|
|
142
|
+
`,$e=e.h2`
|
|
143
|
+
margin: 0;
|
|
144
|
+
font-family: ${r.font.sans};
|
|
145
|
+
font-weight: 600;
|
|
146
|
+
font-size: 20px;
|
|
147
|
+
line-height: 1.6;
|
|
148
|
+
color: ${r.colors.text};
|
|
149
|
+
`,Be=e.button`
|
|
150
|
+
flex: none;
|
|
151
|
+
display: grid;
|
|
152
|
+
place-items: center;
|
|
153
|
+
width: 24px;
|
|
154
|
+
height: 24px;
|
|
155
|
+
border: 0;
|
|
156
|
+
background: none;
|
|
157
|
+
cursor: pointer;
|
|
158
|
+
color: ${r.colors.text};
|
|
159
|
+
|
|
160
|
+
.ico {
|
|
161
|
+
width: 18px;
|
|
162
|
+
height: 18px;
|
|
163
|
+
}
|
|
164
|
+
&:disabled {
|
|
165
|
+
opacity: 0.4;
|
|
166
|
+
cursor: default;
|
|
167
|
+
}
|
|
168
|
+
&:focus-visible {
|
|
169
|
+
outline: 2px solid ${r.colors.accent};
|
|
170
|
+
outline-offset: 2px;
|
|
171
|
+
}
|
|
172
|
+
`,Ne=e.div`
|
|
173
|
+
display: grid;
|
|
174
|
+
grid-template-columns: 44px 1fr;
|
|
175
|
+
align-items: center;
|
|
176
|
+
gap: 14px;
|
|
177
|
+
padding: 14px 18px;
|
|
178
|
+
background: ${r.colors.white};
|
|
179
|
+
border: 1px solid ${r.colors.line};
|
|
180
|
+
border-radius: 16px;
|
|
181
|
+
`,Ee=e.div`
|
|
182
|
+
width: 44px;
|
|
183
|
+
height: 44px;
|
|
184
|
+
border-radius: 10px;
|
|
185
|
+
background: ${r.colors.media};
|
|
186
|
+
overflow: hidden;
|
|
187
|
+
display: flex;
|
|
188
|
+
align-items: center;
|
|
189
|
+
justify-content: center;
|
|
190
|
+
color: ${r.colors.muted2};
|
|
191
|
+
|
|
192
|
+
img {
|
|
193
|
+
width: 100%;
|
|
194
|
+
height: 100%;
|
|
195
|
+
object-fit: contain;
|
|
196
|
+
}
|
|
197
|
+
.ccy-mark {
|
|
198
|
+
width: 26px;
|
|
199
|
+
height: 26px;
|
|
200
|
+
}
|
|
201
|
+
`,Ie=e.div`
|
|
202
|
+
min-width: 0;
|
|
203
|
+
display: flex;
|
|
204
|
+
flex-direction: column;
|
|
205
|
+
gap: 4px;
|
|
206
|
+
`,Pe=e.span`
|
|
207
|
+
font-weight: 700;
|
|
208
|
+
color: ${r.colors.text};
|
|
209
|
+
`,Se=e.span`
|
|
210
|
+
font-size: 13px;
|
|
211
|
+
line-height: 1.45;
|
|
212
|
+
color: ${r.colors.muted};
|
|
213
|
+
`,Ve=e.p`
|
|
214
|
+
margin: 0;
|
|
215
|
+
font-size: 12px;
|
|
216
|
+
line-height: 1.5;
|
|
217
|
+
color: ${r.colors.muted2};
|
|
218
|
+
`,Fe=e.div`
|
|
219
|
+
display: flex;
|
|
220
|
+
gap: 12px;
|
|
221
|
+
|
|
222
|
+
${r.media.maxWidth("mobile")} {
|
|
223
|
+
flex-direction: column-reverse;
|
|
224
|
+
}
|
|
225
|
+
`,Le=e.button`
|
|
226
|
+
flex: 1 1 0;
|
|
227
|
+
height: 48px;
|
|
228
|
+
border: 2px solid ${r.colors.accent};
|
|
229
|
+
border-radius: 12px;
|
|
230
|
+
background: transparent;
|
|
231
|
+
color: ${r.colors.accent};
|
|
232
|
+
cursor: pointer;
|
|
233
|
+
font-family: ${r.font.sans};
|
|
234
|
+
font-weight: 600;
|
|
235
|
+
font-size: 13px;
|
|
236
|
+
line-height: 24px;
|
|
237
|
+
letter-spacing: 0.46px;
|
|
238
|
+
text-transform: uppercase;
|
|
239
|
+
|
|
240
|
+
&:hover:not(:disabled) {
|
|
241
|
+
background: rgba(105, 31, 169, 0.06);
|
|
242
|
+
}
|
|
243
|
+
&:disabled {
|
|
244
|
+
cursor: default;
|
|
245
|
+
opacity: 0.5;
|
|
246
|
+
}
|
|
247
|
+
&:focus-visible {
|
|
248
|
+
outline: 2px solid ${r.colors.accent};
|
|
249
|
+
outline-offset: 2px;
|
|
250
|
+
}
|
|
251
|
+
`,Oe=e.button`
|
|
252
|
+
flex: 1 1 0;
|
|
253
|
+
display: inline-flex;
|
|
254
|
+
align-items: center;
|
|
255
|
+
justify-content: center;
|
|
256
|
+
gap: 8px;
|
|
257
|
+
height: 48px;
|
|
258
|
+
border: 0;
|
|
259
|
+
border-radius: 12px;
|
|
260
|
+
background: ${r.colors.accent};
|
|
261
|
+
color: ${r.colors.softWhite};
|
|
262
|
+
cursor: pointer;
|
|
263
|
+
font-family: ${r.font.sans};
|
|
264
|
+
font-weight: 600;
|
|
265
|
+
font-size: 13px;
|
|
266
|
+
line-height: 24px;
|
|
267
|
+
letter-spacing: 0.46px;
|
|
268
|
+
text-transform: uppercase;
|
|
269
|
+
|
|
270
|
+
&:hover:not(:disabled) {
|
|
271
|
+
background: ${r.colors.accentHover};
|
|
272
|
+
}
|
|
273
|
+
&:disabled {
|
|
274
|
+
cursor: default;
|
|
275
|
+
background: rgba(105, 31, 169, 0.4);
|
|
276
|
+
}
|
|
277
|
+
&:focus-visible {
|
|
278
|
+
outline: 2px solid ${r.colors.accent};
|
|
279
|
+
outline-offset: 2px;
|
|
280
|
+
}
|
|
281
|
+
`,Re=e.span`
|
|
282
|
+
width: 16px;
|
|
283
|
+
height: 16px;
|
|
284
|
+
border-radius: 50%;
|
|
285
|
+
border: 2px solid rgba(255, 255, 255, 0.5);
|
|
286
|
+
border-top-color: ${r.colors.white};
|
|
287
|
+
animation: ${Ae} 0.7s linear infinite;
|
|
288
|
+
|
|
289
|
+
@media (prefers-reduced-motion: reduce) {
|
|
290
|
+
animation: none;
|
|
291
|
+
}
|
|
292
|
+
`;function ft({auth:n,signer:a,title:i,reason:o,name:l,image:d,icon:p,onAuthorized:x,onCancel:g,onClose:b}){const[h,y]=v.useState(!1),[c,w]=v.useState(null);async function k(){y(!0),w(null);try{await ae({auth:n,signer:a,active:!0}),x()}catch(u){re(u)?w(m("authorizeStep.errorRejected")):(Y(u,{flow:"authorize_step",kind:n.kind}),w(m("authorizeStep.errorGeneric"))),y(!1)}}return t.jsx(ze,{onClick:h?void 0:b,role:"presentation",children:t.jsxs(Te,{onClick:u=>u.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i,children:[t.jsxs(We,{children:[t.jsx($e,{children:i}),t.jsx(Be,{onClick:b,disabled:h,"aria-label":m("authorizeStep.close"),children:t.jsx(X,{name:"close",className:"ico"})})]}),t.jsxs(Ne,{"data-testid":"authorize-step-row",children:[t.jsx(Ee,{children:d?t.jsx("img",{src:d,alt:""}):p}),t.jsxs(Ie,{children:[t.jsx(Pe,{title:l,children:l}),t.jsx(Se,{children:o})]})]}),t.jsx(Ve,{children:m("authorizeStep.note")}),t.jsx(de,{message:c}),t.jsxs(Fe,{children:[t.jsx(Le,{type:"button",onClick:g,disabled:h,children:m("authorizeStep.cancel")}),t.jsx(Oe,{type:"button","data-testid":"authorize-step-action",onClick:()=>void k(),disabled:h,children:h?t.jsxs(t.Fragment,{children:[t.jsx(Re,{"aria-hidden":!0}),m("authorizeStep.authorizing")]}):m("authorizeStep.authorize")})]})]})})}const mt="data:image/webp;base64,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";async function bt(n){const[a]=await Xe({...n,trades:[n.trade]});return a}async function Xe(n){const{trades:a,buyer:i,signer:o,onSigned:l}=n;if(a.length===0)throw new Error("No items to buy");const d=new Map;for(const x of a){const g=`${x.chainId}:${x.contract.toLowerCase()}`,b=d.get(g);b?b.push(x):d.set(g,[x])}const p=[];for(const x of d.values())p.push(await De({trades:x,buyer:i,signer:o,onSigned:l}));return p}async function De(n){const{trades:a,buyer:i,signer:o,onSigned:l}=n,d=a[0],p=W(G(d.contract),d.chainId),x=W(I.MANAToken,d.chainId);await D({auth:{kind:q.Allowance,contractAddress:x.address,spenderAddress:p.address,chainId:d.chainId},signer:o});const g=a.map(c=>le(c,i));if(L.enabled)try{const c=new ge(p.abi).encodeFunctionData("accept",[g]),w=ne(),k=ie(o.provider,w),u=await he(k,w,c,p,{serverURL:L.relayerUrl});return l==null||l(),await oe(u,"the MANA purchase"),u}catch(c){if(c instanceof ue&&c.code===xe.USER_DENIED||c instanceof se)throw c;console.warn("[buyWithMana] gasless meta-tx failed, falling back to a direct tx:",c)}await _(o.provider,d.chainId);const h=await new fe(p.address,p.abi,o).accept(g,pe(d.chainId));return l==null||l(),(await h.wait()).transactionHash}async function wt(n){const{trade:a,buyer:i,signer:o,credits:l,manaGapWei:d,onBroadcast:p,onReverted:x}=n;if(l.length===0)throw new Error("No credits to spend — use buyWithMana for a MANA-only purchase");if(d<=0n)throw new Error("No MANA gap to cover — use buyWithCredits for a credits-only purchase");const g=W(I.MANAToken,a.chainId),b=W(I.CreditsManager,a.chainId);await D({auth:{kind:q.Allowance,contractAddress:g.address,spenderAddress:b.address,chainId:a.chainId},signer:o});const y=(l.reduce((c,w)=>c+BigInt(w.availableAmount),0n)+d).toString();return ce({trade:a,buyer:i,signer:o,credits:l,maxCreditedValue:y,onBroadcast:p,onReverted:x})}function yt(n){return t.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...n,children:t.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function vt(n){return t.jsx("svg",{viewBox:"0 0 20 20",width:"24",height:"24","aria-hidden":!0,...n,children:t.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:s,gradients:Q,radius:H,z:qe}=r,kt=e.div`
|
|
293
|
+
position: fixed;
|
|
294
|
+
inset: 0;
|
|
295
|
+
z-index: ${qe.overlay};
|
|
296
|
+
display: flex;
|
|
297
|
+
overflow-y: auto;
|
|
298
|
+
padding: 20px;
|
|
299
|
+
`,jt=e.div`
|
|
300
|
+
position: fixed;
|
|
301
|
+
inset: 0;
|
|
302
|
+
background: rgba(22, 21, 24, 0.45);
|
|
303
|
+
`,Ct=e.div`
|
|
304
|
+
position: relative;
|
|
305
|
+
z-index: 1;
|
|
306
|
+
margin: auto;
|
|
307
|
+
width: 100%;
|
|
308
|
+
/* Wide enough to fit all 4 credit bundles comfortably in a single row (the credits-server returns 4;
|
|
309
|
+
the Figma mock showed 3 at ~180px). The pack tiles flex to share this width. */
|
|
310
|
+
max-width: 700px;
|
|
311
|
+
/* Flex-item auto-minimum can otherwise push the card past the viewport on a narrow screen. */
|
|
312
|
+
min-width: 0;
|
|
313
|
+
/* Never taller than the viewport (100% of the padded overlay): the no-funds state stacks a warning, a
|
|
314
|
+
line list, 4 pack tiles, the total AND the Cancel/Buy pair, which overflows a laptop screen at 100%
|
|
315
|
+
zoom and used to take the CTAs off-screen with it. The body absorbs the difference, and the clip is
|
|
316
|
+
the backstop — a phase that forgets to make itself shrinkable is then visibly cut off at the card's
|
|
317
|
+
edge instead of painting its buttons out on the scrim. */
|
|
318
|
+
max-height: 100%;
|
|
319
|
+
overflow: hidden;
|
|
320
|
+
background: ${s.white};
|
|
321
|
+
border-radius: 16px;
|
|
322
|
+
padding: 12px 16px 16px;
|
|
323
|
+
box-shadow: 0 24px 60px rgba(22, 21, 24, 0.28);
|
|
324
|
+
animation: cart-pop-in 0.16s ease;
|
|
325
|
+
display: flex;
|
|
326
|
+
flex-direction: column;
|
|
327
|
+
gap: 24px;
|
|
328
|
+
|
|
329
|
+
&[data-tall] {
|
|
330
|
+
min-height: 379px;
|
|
331
|
+
justify-content: space-between;
|
|
332
|
+
}
|
|
333
|
+
`,Mt=e.div`
|
|
334
|
+
display: flex;
|
|
335
|
+
flex-direction: column;
|
|
336
|
+
gap: 4px;
|
|
337
|
+
padding-bottom: 16px;
|
|
338
|
+
border-bottom: 1px solid ${s.gray4};
|
|
339
|
+
`,At=e.div`
|
|
340
|
+
display: flex;
|
|
341
|
+
align-items: flex-start;
|
|
342
|
+
justify-content: space-between;
|
|
343
|
+
gap: 8px;
|
|
344
|
+
`,zt=e.h2`
|
|
345
|
+
margin: 0;
|
|
346
|
+
font-size: 20px;
|
|
347
|
+
font-weight: 700;
|
|
348
|
+
line-height: 1.6;
|
|
349
|
+
color: ${s.text};
|
|
350
|
+
`,Tt=e.button`
|
|
351
|
+
flex-shrink: 0;
|
|
352
|
+
border: 0;
|
|
353
|
+
background: transparent;
|
|
354
|
+
cursor: pointer;
|
|
355
|
+
padding: 2px;
|
|
356
|
+
line-height: 0;
|
|
357
|
+
`,Wt=e.div`
|
|
358
|
+
display: flex;
|
|
359
|
+
align-items: center;
|
|
360
|
+
gap: 4px;
|
|
361
|
+
`,$t=e.span`
|
|
362
|
+
font-size: 14px;
|
|
363
|
+
font-weight: 600;
|
|
364
|
+
color: ${s.muted1};
|
|
365
|
+
`,Bt=e(j)`
|
|
366
|
+
width: 14px;
|
|
367
|
+
height: 14px;
|
|
368
|
+
background: ${s.text};
|
|
369
|
+
`,Nt=e.span`
|
|
370
|
+
font-size: 14px;
|
|
371
|
+
color: ${s.text};
|
|
372
|
+
`,Et=e.div`
|
|
373
|
+
display: flex;
|
|
374
|
+
flex-direction: column;
|
|
375
|
+
gap: 24px;
|
|
376
|
+
/* Shrink inside a viewport-capped card instead of overflowing it. Anything with its own flexible
|
|
377
|
+
region (e.g. the cart's line list) gives up height first; this scroll is the last resort so the
|
|
378
|
+
CTAs are always reachable on a short screen. */
|
|
379
|
+
min-height: 0;
|
|
380
|
+
overflow-y: auto;
|
|
381
|
+
|
|
382
|
+
/* Processing / loading states centre a single element in a taller body. */
|
|
383
|
+
&[data-processing] {
|
|
384
|
+
flex: 1;
|
|
385
|
+
align-items: center;
|
|
386
|
+
justify-content: center;
|
|
387
|
+
gap: 32px;
|
|
388
|
+
padding: 24px 0;
|
|
389
|
+
}
|
|
390
|
+
`,It=e.div`
|
|
391
|
+
display: flex;
|
|
392
|
+
gap: 12px;
|
|
393
|
+
align-items: center;
|
|
394
|
+
`,Pt=e.div`
|
|
395
|
+
flex-shrink: 0;
|
|
396
|
+
width: 180px;
|
|
397
|
+
height: 180px;
|
|
398
|
+
background: ${s.media};
|
|
399
|
+
border: 1px solid ${s.muted2};
|
|
400
|
+
border-radius: 16px;
|
|
401
|
+
display: grid;
|
|
402
|
+
place-items: center;
|
|
403
|
+
overflow: hidden;
|
|
404
|
+
|
|
405
|
+
& img {
|
|
406
|
+
width: 83%;
|
|
407
|
+
height: 83%;
|
|
408
|
+
object-fit: contain;
|
|
409
|
+
filter: drop-shadow(0.7px 2.9px 3.7px rgba(0, 0, 0, 0.1));
|
|
410
|
+
}
|
|
411
|
+
`,St=e.div`
|
|
412
|
+
flex: 1;
|
|
413
|
+
min-width: 0;
|
|
414
|
+
display: flex;
|
|
415
|
+
flex-direction: column;
|
|
416
|
+
gap: 32px;
|
|
417
|
+
padding: 8px;
|
|
418
|
+
`,Vt=e.div`
|
|
419
|
+
font-size: 20px;
|
|
420
|
+
font-weight: 600;
|
|
421
|
+
line-height: 1.57;
|
|
422
|
+
color: ${s.text};
|
|
423
|
+
overflow: hidden;
|
|
424
|
+
text-overflow: ellipsis;
|
|
425
|
+
`,Ft=e(ee)`
|
|
426
|
+
font-size: 10px;
|
|
427
|
+
line-height: 1.43;
|
|
428
|
+
color: ${s.muted};
|
|
429
|
+
`,Lt=e.div`
|
|
430
|
+
display: flex;
|
|
431
|
+
align-items: center;
|
|
432
|
+
gap: 4px;
|
|
433
|
+
|
|
434
|
+
& span {
|
|
435
|
+
font-size: 20.5px;
|
|
436
|
+
font-weight: 600;
|
|
437
|
+
color: ${s.text2};
|
|
438
|
+
}
|
|
439
|
+
`,Ot=e(j)`
|
|
440
|
+
width: 21.5px;
|
|
441
|
+
height: 21.5px;
|
|
442
|
+
background: ${s.text2};
|
|
443
|
+
`,Rt=e.div`
|
|
444
|
+
display: flex;
|
|
445
|
+
align-items: center;
|
|
446
|
+
gap: 8px;
|
|
447
|
+
justify-content: center;
|
|
448
|
+
background: rgba(255, 162, 90, 0.3);
|
|
449
|
+
border-radius: ${H.btn};
|
|
450
|
+
padding: 12px 8px;
|
|
451
|
+
`,Xt=e.p`
|
|
452
|
+
margin: 0;
|
|
453
|
+
font-size: 14px;
|
|
454
|
+
line-height: 1.334;
|
|
455
|
+
color: ${s.text2};
|
|
456
|
+
|
|
457
|
+
& b {
|
|
458
|
+
font-weight: 700;
|
|
459
|
+
}
|
|
460
|
+
`,Dt=e.div`
|
|
461
|
+
display: flex;
|
|
462
|
+
gap: 12px;
|
|
463
|
+
`,qt=e.button`
|
|
464
|
+
flex: 1;
|
|
465
|
+
height: 109px;
|
|
466
|
+
border: 1px solid ${s.muted2};
|
|
467
|
+
background: ${s.media};
|
|
468
|
+
border-radius: 16px;
|
|
469
|
+
display: flex;
|
|
470
|
+
align-items: center;
|
|
471
|
+
justify-content: center;
|
|
472
|
+
gap: 8px;
|
|
473
|
+
cursor: pointer;
|
|
474
|
+
transition: border-color 0.12s ease;
|
|
475
|
+
|
|
476
|
+
&[data-on] {
|
|
477
|
+
border: 4px solid #ff7439;
|
|
478
|
+
}
|
|
479
|
+
`,Kt=e.img`
|
|
480
|
+
width: 24px;
|
|
481
|
+
height: 26px;
|
|
482
|
+
flex: none;
|
|
483
|
+
`,Qt=e.span`
|
|
484
|
+
font-size: 24px;
|
|
485
|
+
font-weight: 500;
|
|
486
|
+
color: ${s.text};
|
|
487
|
+
`,Ht=e.span`
|
|
488
|
+
font-size: 14px;
|
|
489
|
+
color: ${s.text};
|
|
490
|
+
`,Ut=e.div`
|
|
491
|
+
display: flex;
|
|
492
|
+
align-items: center;
|
|
493
|
+
justify-content: space-between;
|
|
494
|
+
border-top: 1px solid ${s.gray4};
|
|
495
|
+
padding-top: 12px;
|
|
496
|
+
`,Zt=e.div`
|
|
497
|
+
display: flex;
|
|
498
|
+
align-items: center;
|
|
499
|
+
gap: 8px;
|
|
500
|
+
font-size: 24px;
|
|
501
|
+
font-weight: 700;
|
|
502
|
+
color: ${s.text};
|
|
503
|
+
`,Jt=e(j)`
|
|
504
|
+
width: 30px;
|
|
505
|
+
height: 30px;
|
|
506
|
+
background: ${s.text};
|
|
507
|
+
`,Yt=e.span`
|
|
508
|
+
font-size: 14px;
|
|
509
|
+
font-weight: 600;
|
|
510
|
+
color: ${s.muted1};
|
|
511
|
+
`,Gt=e.div`
|
|
512
|
+
position: sticky;
|
|
513
|
+
bottom: 0;
|
|
514
|
+
display: flex;
|
|
515
|
+
gap: 12px;
|
|
516
|
+
margin-top: -8px;
|
|
517
|
+
padding-top: 8px;
|
|
518
|
+
background: ${s.white};
|
|
519
|
+
`,_t=e.button`
|
|
520
|
+
flex: 1;
|
|
521
|
+
/* Let the CTAs shrink so their min-content can't widen the modal past the viewport on mobile. */
|
|
522
|
+
min-width: 0;
|
|
523
|
+
height: 46px;
|
|
524
|
+
border-radius: ${H.card};
|
|
525
|
+
border: 0;
|
|
526
|
+
cursor: pointer;
|
|
527
|
+
font-size: 15px;
|
|
528
|
+
font-weight: 600;
|
|
529
|
+
letter-spacing: 0.46px;
|
|
530
|
+
text-transform: uppercase;
|
|
531
|
+
display: inline-flex;
|
|
532
|
+
align-items: center;
|
|
533
|
+
justify-content: center;
|
|
534
|
+
gap: 8px;
|
|
535
|
+
|
|
536
|
+
&[data-full] {
|
|
537
|
+
width: 100%;
|
|
538
|
+
}
|
|
539
|
+
/* The design system's primary fill (Figma 738:53266 "BUY Button") — the same gradient the cart's
|
|
540
|
+
CHECKOUT carries, so the two ends of the buy flow match. */
|
|
541
|
+
&[data-variant='gradient'] {
|
|
542
|
+
background: ${Q.buyBtn};
|
|
543
|
+
color: ${s.softWhite};
|
|
544
|
+
}
|
|
545
|
+
&[data-variant='gradient']:hover:not(:disabled),
|
|
546
|
+
&[data-variant='gradient']:active:not(:disabled) {
|
|
547
|
+
background-image: linear-gradient(${s.dclRed}, ${s.dclRed});
|
|
548
|
+
}
|
|
549
|
+
&[data-variant='outline'] {
|
|
550
|
+
background: transparent;
|
|
551
|
+
border: 0.5px solid ${s.text};
|
|
552
|
+
color: ${s.text2};
|
|
553
|
+
font-size: 13px;
|
|
554
|
+
}
|
|
555
|
+
/* Figma's outlined hover (738:53251), which on this light card is the readable half of the pair: the
|
|
556
|
+
white-fill hover the dark-field buttons take would be invisible here. Same treatment as the
|
|
557
|
+
drawer's dismissing CTA (CartPopover ctaCss) — the two sit in one flow. */
|
|
558
|
+
&[data-variant='outline']:hover:not(:disabled) {
|
|
559
|
+
background: ${s.text2};
|
|
560
|
+
color: ${s.softWhite};
|
|
561
|
+
}
|
|
562
|
+
&[data-variant='ruby'] {
|
|
563
|
+
background: ${s.dclRed};
|
|
564
|
+
color: ${s.softWhite};
|
|
565
|
+
font-size: 13px;
|
|
566
|
+
letter-spacing: 0.61px;
|
|
567
|
+
}
|
|
568
|
+
// Solid accent fill (the error state's "Try again").
|
|
569
|
+
&[data-variant='purple'] {
|
|
570
|
+
background: ${s.accent};
|
|
571
|
+
color: ${s.softWhite};
|
|
572
|
+
font-size: 13px;
|
|
573
|
+
}
|
|
574
|
+
&:disabled {
|
|
575
|
+
opacity: 0.6;
|
|
576
|
+
cursor: default;
|
|
577
|
+
}
|
|
578
|
+
`,ea=e.img`
|
|
579
|
+
width: 61px;
|
|
580
|
+
height: 61px;
|
|
581
|
+
`,ta=e.div`
|
|
582
|
+
display: flex;
|
|
583
|
+
flex-direction: column;
|
|
584
|
+
align-items: center;
|
|
585
|
+
gap: 16px;
|
|
586
|
+
background: rgba(255, 201, 213, 0.5);
|
|
587
|
+
border-radius: 16px;
|
|
588
|
+
padding: 24px 16px;
|
|
589
|
+
`,aa=e.img`
|
|
590
|
+
width: 64px;
|
|
591
|
+
height: 80px;
|
|
592
|
+
object-fit: contain;
|
|
593
|
+
`,na=e.p`
|
|
594
|
+
margin: 0;
|
|
595
|
+
text-align: center;
|
|
596
|
+
font-size: 20px;
|
|
597
|
+
line-height: 1.334;
|
|
598
|
+
font-weight: 400;
|
|
599
|
+
color: ${s.text2};
|
|
600
|
+
|
|
601
|
+
& b {
|
|
602
|
+
font-weight: 700;
|
|
603
|
+
}
|
|
604
|
+
`,ia=e.div`
|
|
605
|
+
font-size: 20px;
|
|
606
|
+
font-weight: 700;
|
|
607
|
+
color: ${s.text2};
|
|
608
|
+
text-align: center;
|
|
609
|
+
`,oa=e.div`
|
|
610
|
+
width: 100%;
|
|
611
|
+
max-width: 456px;
|
|
612
|
+
height: 12px;
|
|
613
|
+
background: ${s.media};
|
|
614
|
+
border-radius: 100px;
|
|
615
|
+
overflow: hidden;
|
|
616
|
+
`,sa=e.span`
|
|
617
|
+
display: block;
|
|
618
|
+
height: 100%;
|
|
619
|
+
width: 40%;
|
|
620
|
+
border-radius: 100px;
|
|
621
|
+
background: ${Q.amethyst};
|
|
622
|
+
animation: buy-modal-progress 1.1s ease-in-out infinite;
|
|
623
|
+
|
|
624
|
+
@keyframes buy-modal-progress {
|
|
625
|
+
0% {
|
|
626
|
+
transform: translateX(-120%);
|
|
627
|
+
}
|
|
628
|
+
100% {
|
|
629
|
+
transform: translateX(320%);
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
&[data-step] {
|
|
634
|
+
animation: none;
|
|
635
|
+
min-width: 12px;
|
|
636
|
+
transition: width 0.35s ease;
|
|
637
|
+
}
|
|
638
|
+
`,ra=e.div`
|
|
639
|
+
display: flex;
|
|
640
|
+
flex-direction: column;
|
|
641
|
+
align-items: center;
|
|
642
|
+
gap: 16px;
|
|
643
|
+
background: rgba(193, 238, 207, 0.5);
|
|
644
|
+
border-radius: 16px;
|
|
645
|
+
padding: 24px 16px;
|
|
646
|
+
|
|
647
|
+
&[data-wide] {
|
|
648
|
+
flex-direction: row;
|
|
649
|
+
align-items: center;
|
|
650
|
+
gap: 24px;
|
|
651
|
+
padding: 16px 24px;
|
|
652
|
+
}
|
|
653
|
+
@media (max-width: 600px) {
|
|
654
|
+
&[data-wide] {
|
|
655
|
+
flex-direction: column;
|
|
656
|
+
gap: 12px;
|
|
657
|
+
padding: 16px;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
`,da=e.p`
|
|
661
|
+
margin: 0;
|
|
662
|
+
font-size: 20px;
|
|
663
|
+
line-height: 1.334;
|
|
664
|
+
color: ${s.text2};
|
|
665
|
+
text-align: center;
|
|
666
|
+
|
|
667
|
+
& b {
|
|
668
|
+
font-weight: 700;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
&[data-wide] {
|
|
672
|
+
text-align: left;
|
|
673
|
+
font-size: 18px;
|
|
674
|
+
}
|
|
675
|
+
@media (max-width: 600px) {
|
|
676
|
+
&[data-wide] {
|
|
677
|
+
text-align: center;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
`,{colors:U,media:T}=r,Ke=e.section`
|
|
681
|
+
margin-top: 40px;
|
|
682
|
+
`,Qe=e.div`
|
|
683
|
+
display: flex;
|
|
684
|
+
align-items: center;
|
|
685
|
+
justify-content: space-between;
|
|
686
|
+
margin-bottom: 20px;
|
|
687
|
+
`,He=e.h2`
|
|
688
|
+
font-size: 22px;
|
|
689
|
+
font-weight: 700;
|
|
690
|
+
color: ${U.softWhite};
|
|
691
|
+
`,Ue=e.button`
|
|
692
|
+
display: inline-flex;
|
|
693
|
+
align-items: center;
|
|
694
|
+
gap: 4px;
|
|
695
|
+
background: none;
|
|
696
|
+
border: 0;
|
|
697
|
+
padding: 0;
|
|
698
|
+
color: ${U.softWhite};
|
|
699
|
+
font-weight: 700;
|
|
700
|
+
font-size: 13px;
|
|
701
|
+
letter-spacing: 0.046em;
|
|
702
|
+
text-transform: uppercase;
|
|
703
|
+
cursor: pointer;
|
|
704
|
+
white-space: nowrap;
|
|
705
|
+
|
|
706
|
+
&:hover {
|
|
707
|
+
text-decoration: underline;
|
|
708
|
+
}
|
|
709
|
+
`,Ze=e(X)`
|
|
710
|
+
transform: rotate(-90deg);
|
|
711
|
+
`,Je=e.div`
|
|
712
|
+
position: relative;
|
|
713
|
+
`,R=e.button`
|
|
714
|
+
position: absolute;
|
|
715
|
+
top: 112px;
|
|
716
|
+
transform: translateY(-50%);
|
|
717
|
+
z-index: 5;
|
|
718
|
+
width: 53px;
|
|
719
|
+
height: 53px;
|
|
720
|
+
padding: 0;
|
|
721
|
+
border: 0;
|
|
722
|
+
background: transparent;
|
|
723
|
+
cursor: pointer;
|
|
724
|
+
filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.18));
|
|
725
|
+
transition:
|
|
726
|
+
transform 0.15s ease,
|
|
727
|
+
filter 0.15s ease,
|
|
728
|
+
opacity 0.15s ease;
|
|
729
|
+
|
|
730
|
+
& img {
|
|
731
|
+
display: block;
|
|
732
|
+
width: 100%;
|
|
733
|
+
height: 100%;
|
|
734
|
+
}
|
|
735
|
+
// Sit the arrows in the page gutter (aligned to the nav's 54px), not over the cards — at -40px their
|
|
736
|
+
// inner edge landed ~13px onto the first/last card.
|
|
737
|
+
&[data-side='left'] {
|
|
738
|
+
left: -53px;
|
|
739
|
+
}
|
|
740
|
+
&[data-side='right'] {
|
|
741
|
+
right: -53px;
|
|
742
|
+
}
|
|
743
|
+
&[data-side='left'] img {
|
|
744
|
+
transform: scaleX(-1);
|
|
745
|
+
}
|
|
746
|
+
&:hover:not(:disabled) {
|
|
747
|
+
transform: translateY(-50%) scale(1.07);
|
|
748
|
+
}
|
|
749
|
+
&:disabled {
|
|
750
|
+
opacity: 0;
|
|
751
|
+
pointer-events: none;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
@media (prefers-reduced-motion: reduce) {
|
|
755
|
+
transition: none;
|
|
756
|
+
}
|
|
757
|
+
${T.maxWidth("lg")} {
|
|
758
|
+
display: none;
|
|
759
|
+
}
|
|
760
|
+
`,Ye=e.div`
|
|
761
|
+
display: grid;
|
|
762
|
+
grid-auto-flow: column;
|
|
763
|
+
grid-auto-columns: calc((100% - 64px) / 5);
|
|
764
|
+
gap: 16px;
|
|
765
|
+
overflow-x: auto;
|
|
766
|
+
overflow-y: hidden;
|
|
767
|
+
padding: 12px 14px;
|
|
768
|
+
margin-left: -14px;
|
|
769
|
+
scroll-padding-inline: 14px;
|
|
770
|
+
scroll-snap-type: x mandatory;
|
|
771
|
+
scrollbar-width: none;
|
|
772
|
+
|
|
773
|
+
&::-webkit-scrollbar {
|
|
774
|
+
display: none;
|
|
775
|
+
}
|
|
776
|
+
& > * {
|
|
777
|
+
scroll-snap-align: start;
|
|
778
|
+
}
|
|
779
|
+
${T.maxWidth("xl")} {
|
|
780
|
+
grid-auto-columns: calc((100% - 48px) / 4);
|
|
781
|
+
}
|
|
782
|
+
${T.maxWidth("lg")} {
|
|
783
|
+
grid-auto-columns: calc((100% - 32px) / 3);
|
|
784
|
+
}
|
|
785
|
+
${T.maxWidth("sm")} {
|
|
786
|
+
grid-auto-columns: calc((100% - 16px) / 2);
|
|
787
|
+
}
|
|
788
|
+
`,Ge=e.div`
|
|
789
|
+
display: flex;
|
|
790
|
+
align-items: center;
|
|
791
|
+
justify-content: center;
|
|
792
|
+
gap: 8px;
|
|
793
|
+
margin-top: 18px;
|
|
794
|
+
`,_e=e.button`
|
|
795
|
+
width: 10px;
|
|
796
|
+
height: 10px;
|
|
797
|
+
border-radius: 50%;
|
|
798
|
+
border: 0;
|
|
799
|
+
padding: 0;
|
|
800
|
+
/* Figma "Carousel Dots" (verbatim): rgba(0,0,0,0.5) at rest, Brand/Orange active. */
|
|
801
|
+
background: rgba(0, 0, 0, 0.5);
|
|
802
|
+
cursor: pointer;
|
|
803
|
+
transition:
|
|
804
|
+
opacity 0.12s ease,
|
|
805
|
+
background 0.12s ease,
|
|
806
|
+
transform 0.12s ease;
|
|
807
|
+
|
|
808
|
+
&:hover {
|
|
809
|
+
opacity: 0.8;
|
|
810
|
+
}
|
|
811
|
+
&[data-active] {
|
|
812
|
+
background: #ff7439;
|
|
813
|
+
opacity: 1;
|
|
814
|
+
transform: scale(1.1);
|
|
815
|
+
}
|
|
816
|
+
`;function ca({title:n,items:a,onViewAll:i}){const o=v.useRef(null),[l,d]=v.useState(1),[p,x]=v.useState(0),[g,b]=v.useState(!0),[h,y]=v.useState(!1),c=v.useCallback(()=>{const u=o.current;if(!u)return;const{scrollLeft:f,scrollWidth:S,clientWidth:$}=u,V=Math.max(1,Math.ceil(S/$));d(V),x(Math.min(V-1,Math.round(f/$))),b(f<=1),y(f+$>=S-1)},[]);if(v.useEffect(()=>{c();const u=o.current;if(u)return u.addEventListener("scroll",c,{passive:!0}),window.addEventListener("resize",c),()=>{u.removeEventListener("scroll",c),window.removeEventListener("resize",c)}},[c,a.length]),a.length===0)return null;function w(u){const f=o.current;f&&f.scrollBy({left:u*f.clientWidth,behavior:"smooth"})}function k(u){const f=o.current;f&&f.scrollTo({left:u*f.clientWidth,behavior:"smooth"})}return t.jsxs(Ke,{"data-testid":"carousel",children:[t.jsxs(Qe,{children:[t.jsx(He,{children:n}),i?t.jsxs(Ue,{onClick:i,children:[m("collectionCarousel.viewAll"),t.jsx(Ze,{name:"chevron-down",size:16})]}):null]}),t.jsxs(Je,{children:[t.jsx(R,{"data-side":"left",onClick:()=>w(-1),"aria-label":m("collectionCarousel.scrollLeft"),disabled:g,children:t.jsx("img",{src:F,alt:"","aria-hidden":!0})}),t.jsx(Ye,{ref:o,children:a.map(u=>t.jsx(te,{item:u},u.id))}),t.jsx(R,{"data-side":"right",onClick:()=>w(1),"aria-label":m("collectionCarousel.scrollRight"),disabled:h,children:t.jsx("img",{src:F,alt:"","aria-hidden":!0})})]}),l>1?t.jsx(Ge,{"aria-label":m("collectionCarousel.pages"),children:Array.from({length:l}).map((u,f)=>t.jsx(_e,{"data-active":f===p||void 0,"aria-label":m("collectionCarousel.goToPage",{page:f+1}),"aria-current":f===p?"true":void 0,onClick:()=>k(f)},f))}):null]})}export{we as $,It as A,Wt as B,Ct as C,mt as D,Qt as E,Ht as F,Ut as G,Mt as H,Zt as I,Jt as J,Yt as K,ea as L,kt as M,lt as N,ct as O,xt as P,ca as Q,ft as R,jt as S,zt as T,B as U,dt as V,Rt as W,Tt as X,gt as Y,Xe as Z,pt as _,At as a,A as a0,ra as a1,da as a2,bt as a3,ht as a4,wt as a5,yt as b,$t as c,Bt as d,Nt as e,Et as f,ta as g,aa as h,na as i,Gt as j,_t as k,ia as l,ut as m,oa as n,sa as o,vt as p,Xt as q,Pt as r,St as s,Vt as t,Ft as u,Lt as v,Ot as w,Dt as x,qt as y,Kt as z};
|