@dcl/builder-site 7.15.1-19635806307.commit-d7ee146 → 7.16.1-19644308472.commit-c4256dc
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/{Back-dywI829J.js → Back-CDOxIrnn.js} +1 -1
- package/assets/{CollectionProvider.container-DZHmH5be.js → CollectionProvider.container-3333NUxE.js} +1 -1
- package/assets/{CollectionStatus.container-CaZzcpaQ.js → CollectionStatus.container-DzhTjeP9.js} +1 -1
- package/assets/{ConfirmDelete-DU4aX_JK.js → ConfirmDelete-Bi0mUMu0.js} +1 -1
- package/assets/{FileSaver.min-x62HquKy.js → FileSaver.min-CZvv48fT.js} +1 -1
- package/assets/{ItemProvider.container-DFtYrM1p.js → ItemProvider.container-7qkDLYej.js} +2 -2
- package/assets/{JumpIn.container-DSMZx_a9.js → JumpIn.container-Db9sy8sq.js} +1 -1
- package/assets/{LandAction-DaiwhV4A.js → LandAction-CiY0RweX.js} +1 -1
- package/assets/{LandProviderPage--bgvV_7Q.js → LandProviderPage-DMoeh5ZK.js} +1 -1
- package/assets/{LoggedInDetailPage.container-CB30S7Lh.js → LoggedInDetailPage.container-C9GSQhch.js} +1 -1
- package/assets/{Navigation-BChRKWii.css → Navigation-CV4Ecri2.css} +1 -1
- package/assets/{Navigation.container-BFN51RYJ.js → Navigation.container-DdDz8aQR.js} +1 -1
- package/assets/{NotFound-DURGbwSh.js → NotFound-BxsG7cuR.js} +1 -1
- package/assets/{OptionsDropdown-DoMw7q9_.js → OptionsDropdown-DdF7xSCX.js} +1 -1
- package/assets/{RentalPeriod-BfSrUKdt.js → RentalPeriod-DgXK5WFQ.js} +1 -1
- package/assets/{SDKTag-CerPJVCy.js → SDKTag-ChEtvoIS.js} +1 -1
- package/assets/{SceneStats.container-DjwKoWL6.js → SceneStats.container-ZJOdavL5.js} +1 -1
- package/assets/{SignInRequired-vN-iPiDW.js → SignInRequired-DmF9Qp0Q.js} +1 -1
- package/assets/{ThirdPartyKindBadge-BXaziN42.js → ThirdPartyKindBadge-BA3-jy7a.js} +1 -1
- package/assets/{dataReader-Dz-xyDlM.js → dataReader-DAefHot9.js} +1 -1
- package/assets/{date-ByxPc1Qq.js → date-XnshaYAj.js} +1 -1
- package/assets/{fortmatic-Cn5yGqJP.js → fortmatic-Bxn9btu4.js} +1 -1
- package/assets/{hooks-DzVESl21.js → hooks-BR9ATp8C.js} +1 -1
- package/assets/{index-BeoD6rus.js → index-1qhlYVJo.js} +1 -1
- package/assets/index-8nDAcs6q.js +1 -0
- package/assets/{index-zBeVtBBF.js → index-B6z24HhG.js} +1 -1
- package/assets/{index-BBzJMEnM.js → index-B7JMFszx.js} +1 -1
- package/assets/{index-B5gir1L8.js → index-BBxq5T5O.js} +1 -1
- package/assets/{index-02dofCge.js → index-BCXSooAS.js} +1 -1
- package/assets/{index-M9PWEZ6W.js → index-BDqGuP6d.js} +1 -1
- package/assets/{index-BGGCfgs1.js → index-BNWfs07B.js} +1 -1
- package/assets/{index-C04w9RGH.js → index-BQKKZYid.js} +1 -1
- package/assets/{index-CuPK033E.js → index-BZVd6DXW.js} +1 -1
- package/assets/{index-DjZKGaAq.css → index-BdXvBSq9.css} +7 -7
- package/assets/{index-C-qtl_vF.js → index-Bg3kbxT6.js} +1 -1
- package/assets/{index-Dx6QpoJP.js → index-BgAj-Cjh.js} +1 -1
- package/assets/{index-DJrVEmpr.js → index-BhcZNLcf.js} +1 -1
- package/assets/{index-BQnEaR2z.css → index-Biexqjwx.css} +1 -1
- package/assets/{index-D8f-1HVA.css → index-C71GMpBg.css} +1 -1
- package/assets/{index-DfGkBjK-.js → index-CAEFSp6T.js} +1 -1
- package/assets/{index-Cro2ex56.js → index-CDypNyWX.js} +1 -1
- package/assets/{index-kdbp0ugi.js → index-CIJ-Apwv.js} +1 -1
- package/assets/{index-DnixHRts.js → index-CJe-sWhe.js} +1 -1
- package/assets/{index-DlsJ3ipZ.js → index-CLws8iD9.js} +1 -1
- package/assets/index-CTHhGxUn.js +1 -0
- package/assets/{index-VboKUuND.css → index-CUpuV6SS.css} +1 -1
- package/assets/{index-B24e1H5A.js → index-CYwns7My.js} +1 -1
- package/assets/{index-BGcvWFxv.js → index-CmdFvF1a.js} +1 -1
- package/assets/{index-5ipe3TlW.js → index-D3CkOUIz.js} +1 -1
- package/assets/{index-Bxol5PSo.js → index-D7MNQUVi.js} +1 -1
- package/assets/{index-CIydeCgn.css → index-DDJJ4aT_.css} +1 -1
- package/assets/{index-CxPPIPig.js → index-DDLQh72H.js} +23 -23
- package/assets/{index-Ba2Zg7Y1.js → index-DTyOeuDD.js} +1 -1
- package/assets/{index-Czuw8vCe.js → index-D_KoEYmR.js} +1 -1
- package/assets/{index-B5UgsE6c.js → index-DfkdTSnc.js} +1 -1
- package/assets/{index-DNvvewI-.js → index-DhbZhfsJ.js} +1 -1
- package/assets/{index-ClFTF6XS.js → index-DhhNoSjU.js} +1 -1
- package/assets/{index-BSK2s0-t.css → index-Dje7cGpR.css} +1 -1
- package/assets/{index-lERwrMXi.js → index-Dlnzy_Ws.js} +1 -1
- package/assets/{index-BclyDc1K.js → index-Dmtoehcg.js} +1 -1
- package/assets/{index-BKetbmVP.js → index-Dr1aQrkO.js} +1 -1
- package/assets/{index-B1GtOexf.css → index-DtoAxbrz.css} +1 -1
- package/assets/{index-CZJgeM62.js → index-DxDsw9f1.js} +1 -1
- package/assets/{index-QEgVAyE6.css → index-Fo4geG3i.css} +1 -1
- package/assets/{index-DMboK9CJ.js → index-HyBfIc0E.js} +1 -1
- package/assets/{index-DD0rSFI1.js → index-KdMkTi9U.js} +1 -1
- package/assets/{index-Bs20LQA8.js → index-TCqfus0x.js} +1 -1
- package/assets/{index-BzQvtvJY.js → index-Tn0fe1c8.js} +1 -1
- package/assets/{index-DhxsfBWh.js → index-VqI7gByO.js} +2 -2
- package/assets/{index-DA4-L9bx.js → index-Y7uEsaMN.js} +1 -1
- package/assets/{index-B3CunpBM.js → index-bgQz0P48.js} +1 -1
- package/assets/{index-DLDEaZPO.js → index-dkUDE4T4.js} +1 -1
- package/assets/{index-Cp4XPn7p.js → index-s-JRPuW3.js} +1 -1
- package/assets/{index.es-BuFTQZ6M.js → index.es-DjPcoY42.js} +4 -4
- package/assets/{selectors-B07yj6kb.js → selectors-BFWzed6x.js} +1 -1
- package/index.html +3 -3
- package/package.json +3 -3
- package/assets/index-B56895Yf.js +0 -1
- package/assets/index-Cs_nElc-.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as dt}from"./index-CxPPIPig.js";var U=(e=>(e.MissingApiKey="MISSING_API_KEY",e.ModalNotReady="MODAL_NOT_READY",e.MalformedResponse="MALFORMED_RESPONSE",e.InvalidArgument="INVALID_ARGUMENT",e.ExtensionNotInitialized="EXTENSION_NOT_INITIALIZED",e.IncompatibleExtensions="INCOMPATIBLE_EXTENSIONS",e))(U||{}),j=(e=>(e.SyncWeb3Method="SYNC_WEB3_METHOD",e.DuplicateIframe="DUPLICATE_IFRAME",e.ReactNativeEndpointConfiguration="REACT_NATIVE_ENDPOINT_CONFIGURATION",e.DeprecationNotice="DEPRECATION_NOTICE",e.ProductAnnouncement="ANNOUNCEMENT",e))(j||{}),ve=(e=>(e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.MagicLinkFailedVerification=-1e4]="MagicLinkFailedVerification",e[e.MagicLinkExpired=-10001]="MagicLinkExpired",e[e.MagicLinkRateLimited=-10002]="MagicLinkRateLimited",e[e.MagicLinkInvalidRedirectURL=-10006]="MagicLinkInvalidRedirectURL",e[e.UserAlreadyLoggedIn=-10003]="UserAlreadyLoggedIn",e[e.UpdateEmailFailed=-10004]="UpdateEmailFailed",e[e.UserRequestEditEmail=-10005]="UserRequestEditEmail",e[e.InactiveRecipient=-10010]="InactiveRecipient",e[e.AccessDeniedToUser=-10011]="AccessDeniedToUser",e[e.RedirectLoginComplete=-10015]="RedirectLoginComplete",e))(ve||{}),M=(e=>(e.MetaMask="metamask",e.CoinbaseWallet="coinbase_wallet",e))(M||{}),ae=(e=>(e.WalletSelected="wallet_selected",e.WalletConnected="wallet_connected",e.WalletRejected="wallet_rejected",e))(ae||{}),h=(e=>(e.LoginWithSms="magic_auth_login_with_sms",e.LoginWithEmailOTP="magic_auth_login_with_email_otp",e.LoginWithMagicLink="magic_auth_login_with_magic_link",e.LoginWithCredential="magic_auth_login_with_credential",e.SetAuthorizationToken="magic_auth_set_authorization_token",e.GetIdToken="magic_auth_get_id_token",e.GenerateIdToken="magic_auth_generate_id_token",e.GetMetadata="magic_auth_get_metadata",e.IsLoggedIn="magic_is_logged_in",e.Logout="magic_auth_logout",e.UpdateEmail="magic_auth_update_email",e.UserSettings="magic_auth_settings",e.UserSettingsTestMode="magic_auth_settings_testing_mode",e.LoginWithSmsTestMode="magic_auth_login_with_sms_testing_mode",e.LoginWithEmailOTPTestMode="magic_auth_login_with_email_otp_testing_mode",e.LoginWithMagicLinkTestMode="magic_login_with_magic_link_testing_mode",e.LoginWithCredentialTestMode="magic_auth_login_with_credential_testing_mode",e.GetIdTokenTestMode="magic_auth_get_id_token_testing_mode",e.GenerateIdTokenTestMode="magic_auth_generate_id_token_testing_mode",e.GetMetadataTestMode="magic_auth_get_metadata_testing_mode",e.IsLoggedInTestMode="magic_auth_is_logged_in_testing_mode",e.LogoutTestMode="magic_auth_logout_testing_mode",e.UpdateEmailTestMode="magic_auth_update_email_testing_mode",e.IntermediaryEvent="magic_intermediary_event",e.RequestAccounts="eth_requestAccounts",e.GetInfo="magic_get_info",e.ShowUI="magic_wallet",e.NFTPurchase="magic_nft_purchase",e.NFTCheckout="magic_nft_checkout",e.NFTTransfer="magic_nft_transfer",e.RequestUserInfoWithUI="mc_request_user_info",e.Disconnect="mc_disconnect",e.RecoverAccount="magic_auth_recover_account",e.RecoverAccountTestMode="magic_auth_recover_account_testing_mode",e.MagicBoxHeartBeat="magic_box_heart_beat",e.AutoConnect="mc_auto_connect",e.Login="mc_login",e.EncryptV1="magic_auth_encrypt_v1",e.DecryptV1="magic_auth_decrypt_v1",e.ShowNFTs="magic_show_nfts",e.ShowOnRamp="magic_show_fiat_onramp",e.ShowSendTokensUI="magic_show_send_tokens_ui",e.ShowAddress="magic_show_address",e.ShowBalances="magic_show_balances",e.SendGaslessTransaction="eth_sendGaslessTransaction",e))(h||{}),k=(e=>(e.MAGIC_HANDLE_RESPONSE="MAGIC_HANDLE_RESPONSE",e.MAGIC_OVERLAY_READY="MAGIC_OVERLAY_READY",e.MAGIC_SHOW_OVERLAY="MAGIC_SHOW_OVERLAY",e.MAGIC_HIDE_OVERLAY="MAGIC_HIDE_OVERLAY",e.MAGIC_HANDLE_EVENT="MAGIC_HANDLE_EVENT",e.MAGIC_MG_BOX_SEND_RECEIPT="MAGIC_MG_BOX_SEND_RECEIPT",e.MAGIC_SEND_PRODUCT_ANNOUNCEMENT="MAGIC_SEND_PRODUCT_ANNOUNCEMENT",e))(k||{}),ce=(e=>(e.MAGIC_HANDLE_REQUEST="MAGIC_HANDLE_REQUEST",e))(ce||{}),ht=(e=>(e.UpdateEmail="update-email",e.MFA="mfa",e.Recovery="recovery",e))(ht||{}),pt=(e=>(e.Retry="retry",e))(pt||{}),mt=(e=>(e.EmailSent="email-sent",e.EmailNotDeliverable="email-not-deliverable",e))(mt||{}),X=(e=>(e.VerifyEmailOtp="verify-email-otp",e.Cancel="cancel",e))(X||{}),Et=(e=>(e.EmailOTPSent="email-otp-sent",e.InvalidEmailOtp="invalid-email-otp",e.ExpiredEmailOtp="expired-email-otp",e))(Et||{}),ge=(e=>(e.Retry="device-retry",e))(ge||{}),ft=(e=>(e.DeviceApproved="device-approved",e.DeviceNeedsApproval="device-needs-approval",e.DeviceVerificationLinkExpired="device-verification-link-expired",e.DeviceVerificationEmailSent="device-verification-email-sent",e))(ft||{}),b=(e=>(e.Retry="Recency/auth-factor-retry",e.Cancel="Recency/auth-factor-verification-cancel",e.VerifyEmailOtp="Recency/auth-factor-verify-email-otp",e))(b||{}),gt=(e=>(e.PrimaryAuthFactorNeedsVerification="Recency/auth-factor-needs-verification",e.PrimaryAuthFactorVerified="Recency/auth-factor-verified",e.InvalidEmailOtp="Recency/auth-factor-invalid-email-otp",e.EmailExpired="Recency/auth-factor-verification-email-expired",e.EmailSent="Recency/auth-factor-verification-email-sent",e.EmailNotDeliverable="Recency/auth-factor-verification-email-not-deliverable",e))(gt||{}),P=(e=>(e.RetryWithNewEmail="UpdateEmail/retry-with-new-email",e.Cancel="UpdateEmail/new-email-verification-cancel",e.VerifyEmailOtp="UpdateEmail/new-email-verify-otp",e))(P||{}),_t=(e=>(e.NewAuthFactorNeedsVerification="UpdateEmail/new-email-needs-verification",e.EmailUpdated="UpdateEmail/email-updated",e.InvalidEmailOtp="UpdateEmail/new-email-invalid-email-otp",e.EmailExpired="UpdateEmail/new-email-verification-email-expired",e.EmailSent="UpdateEmail/new-email-verification-email-sent",e.EmailNotDeliverable="UpdateEmail/new-email-verification-email-not-deliverable",e.InvalidEmail="UpdateEmail/new-email-invalid",e.EmailAlreadyExists="UpdateEmail/new-email-already-exists",e))(_t||{}),vt=(e=>(e.Harmony="HARMONY",e))(vt||{}),It=(e=>(e.PhoneNumber="phone_number",e))(It||{}),Ee={VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.15.1-19635806307.commit-d7ee146"},yt=Object.create,pe=Object.defineProperty,wt=Object.defineProperties,Rt=Object.getOwnPropertyDescriptor,$t=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertyNames,Te=Object.getOwnPropertySymbols,At=Object.getPrototypeOf,He=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,Le=(e,t,r)=>t in e?pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ie=(e,t)=>{for(var r in t||(t={}))He.call(t,r)&&Le(e,r,t[r]);if(Te)for(var r of Te(t))Ot.call(t,r)&&Le(e,r,t[r]);return e},ye=(e,t)=>wt(e,$t(t)),Mt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Tt=(e,t)=>{for(var r in t)pe(e,r,{get:t[r],enumerable:!0})},Lt=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Nt(t))!He.call(e,n)&&n!==r&&pe(e,n,{get:()=>t[n],enumerable:!(i=Rt(t,n))||i.enumerable});return e},St=(e,t,r)=>(r=e!=null?yt(At(e)):{},Lt(!e||!e.__esModule?pe(r,"default",{value:e,enumerable:!0}):r,e)),v=(e,t,r)=>new Promise((i,n)=>{var s=u=>{try{o(r.next(u))}catch(l){n(l)}},a=u=>{try{o(r.throw(u))}catch(l){n(l)}},o=u=>u.done?i(u.value):Promise.resolve(u.value).then(s,a);o((r=r.apply(e,t)).next())}),Ct=Mt((e,t)=>{var r=Object.prototype.hasOwnProperty,i="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(i=!1));function s(l,c,d){this.fn=l,this.context=c,this.once=d||!1}function a(l,c,d,f,_){if(typeof d!="function")throw new TypeError("The listener must be a function");var I=new s(d,f||l,_),$=i?i+c:c;return l._events[$]?l._events[$].fn?l._events[$]=[l._events[$],I]:l._events[$].push(I):(l._events[$]=I,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var l=[],c,d;if(this._eventsCount===0)return l;for(d in c=this._events)r.call(c,d)&&l.push(i?d.slice(1):d);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(c)):l},u.prototype.listeners=function(l){var c=i?i+l:l,d=this._events[c];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,_=d.length,I=new Array(_);f<_;f++)I[f]=d[f].fn;return I},u.prototype.listenerCount=function(l){var c=i?i+l:l,d=this._events[c];return d?d.fn?1:d.length:0},u.prototype.emit=function(l,c,d,f,_,I){var $=i?i+l:l;if(!this._events[$])return!1;var p=this._events[$],L=arguments.length,C,y;if(p.fn){switch(p.once&&this.removeListener(l,p.fn,void 0,!0),L){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,c),!0;case 3:return p.fn.call(p.context,c,d),!0;case 4:return p.fn.call(p.context,c,d,f),!0;case 5:return p.fn.call(p.context,c,d,f,_),!0;case 6:return p.fn.call(p.context,c,d,f,_,I),!0}for(y=1,C=new Array(L-1);y<L;y++)C[y-1]=arguments[y];p.fn.apply(p.context,C)}else{var ut=p.length,V;for(y=0;y<ut;y++)switch(p[y].once&&this.removeListener(l,p[y].fn,void 0,!0),L){case 1:p[y].fn.call(p[y].context);break;case 2:p[y].fn.call(p[y].context,c);break;case 3:p[y].fn.call(p[y].context,c,d);break;case 4:p[y].fn.call(p[y].context,c,d,f);break;default:if(!C)for(V=1,C=new Array(L-1);V<L;V++)C[V-1]=arguments[V];p[y].fn.apply(p[y].context,C)}}return!0},u.prototype.on=function(l,c,d){return a(this,l,c,d,!1)},u.prototype.once=function(l,c,d){return a(this,l,c,d,!0)},u.prototype.removeListener=function(l,c,d,f){var _=i?i+l:l;if(!this._events[_])return this;if(!c)return o(this,_),this;var I=this._events[_];if(I.fn)I.fn===c&&(!f||I.once)&&(!d||I.context===d)&&o(this,_);else{for(var $=0,p=[],L=I.length;$<L;$++)(I[$].fn!==c||f&&!I[$].once||d&&I[$].context!==d)&&p.push(I[$]);p.length?this._events[_]=p.length===1?p[0]:p:o(this,_)}return this},u.prototype.removeAllListeners=function(l){var c;return l?(c=i?i+l:l,this._events[c]&&o(this,c)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=i,u.EventEmitter=u,typeof t<"u"&&(t.exports=u)});function bt(e){let t={exports:{}};return e(t,t.exports),t.exports}var Pt=Number.MAX_SAFE_INTEGER||9007199254740991,we={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Pt,MAX_SAFE_COMPONENT_LENGTH:16},kt=typeof dt=="object"&&Ee&&Ee.NODE_DEBUG&&/\bsemver\b/i.test(Ee.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{},E=kt,ee=bt(function(e,t){let{MAX_SAFE_COMPONENT_LENGTH:r}=we,i=(t=e.exports={}).re=[],n=t.src=[],s=t.t={},a=0,o=(u,l,c)=>{let d=a++;E(d,l),s[u]=d,n[d]=l,i[d]=new RegExp(l,c?"g":void 0)};o("NUMERICIDENTIFIER","0|[1-9]\\d*"),o("NUMERICIDENTIFIERLOOSE","[0-9]+"),o("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),o("MAINVERSION",`(${n[s.NUMERICIDENTIFIER]})\\.(${n[s.NUMERICIDENTIFIER]})\\.(${n[s.NUMERICIDENTIFIER]})`),o("MAINVERSIONLOOSE",`(${n[s.NUMERICIDENTIFIERLOOSE]})\\.(${n[s.NUMERICIDENTIFIERLOOSE]})\\.(${n[s.NUMERICIDENTIFIERLOOSE]})`),o("PRERELEASEIDENTIFIER",`(?:${n[s.NUMERICIDENTIFIER]}|${n[s.NONNUMERICIDENTIFIER]})`),o("PRERELEASEIDENTIFIERLOOSE",`(?:${n[s.NUMERICIDENTIFIERLOOSE]}|${n[s.NONNUMERICIDENTIFIER]})`),o("PRERELEASE",`(?:-(${n[s.PRERELEASEIDENTIFIER]}(?:\\.${n[s.PRERELEASEIDENTIFIER]})*))`),o("PRERELEASELOOSE",`(?:-?(${n[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${n[s.PRERELEASEIDENTIFIERLOOSE]})*))`),o("BUILDIDENTIFIER","[0-9A-Za-z-]+"),o("BUILD",`(?:\\+(${n[s.BUILDIDENTIFIER]}(?:\\.${n[s.BUILDIDENTIFIER]})*))`),o("FULLPLAIN",`v?${n[s.MAINVERSION]}${n[s.PRERELEASE]}?${n[s.BUILD]}?`),o("FULL",`^${n[s.FULLPLAIN]}$`),o("LOOSEPLAIN",`[v=\\s]*${n[s.MAINVERSIONLOOSE]}${n[s.PRERELEASELOOSE]}?${n[s.BUILD]}?`),o("LOOSE",`^${n[s.LOOSEPLAIN]}$`),o("GTLT","((?:<|>)?=?)"),o("XRANGEIDENTIFIERLOOSE",`${n[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),o("XRANGEIDENTIFIER",`${n[s.NUMERICIDENTIFIER]}|x|X|\\*`),o("XRANGEPLAIN",`[v=\\s]*(${n[s.XRANGEIDENTIFIER]})(?:\\.(${n[s.XRANGEIDENTIFIER]})(?:\\.(${n[s.XRANGEIDENTIFIER]})(?:${n[s.PRERELEASE]})?${n[s.BUILD]}?)?)?`),o("XRANGEPLAINLOOSE",`[v=\\s]*(${n[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[s.XRANGEIDENTIFIERLOOSE]})(?:${n[s.PRERELEASELOOSE]})?${n[s.BUILD]}?)?)?`),o("XRANGE",`^${n[s.GTLT]}\\s*${n[s.XRANGEPLAIN]}$`),o("XRANGELOOSE",`^${n[s.GTLT]}\\s*${n[s.XRANGEPLAINLOOSE]}$`),o("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),o("COERCERTL",n[s.COERCE],!0),o("LONETILDE","(?:~>?)"),o("TILDETRIM",`(\\s*)${n[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",o("TILDE",`^${n[s.LONETILDE]}${n[s.XRANGEPLAIN]}$`),o("TILDELOOSE",`^${n[s.LONETILDE]}${n[s.XRANGEPLAINLOOSE]}$`),o("LONECARET","(?:\\^)"),o("CARETTRIM",`(\\s*)${n[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",o("CARET",`^${n[s.LONECARET]}${n[s.XRANGEPLAIN]}$`),o("CARETLOOSE",`^${n[s.LONECARET]}${n[s.XRANGEPLAINLOOSE]}$`),o("COMPARATORLOOSE",`^${n[s.GTLT]}\\s*(${n[s.LOOSEPLAIN]})$|^$`),o("COMPARATOR",`^${n[s.GTLT]}\\s*(${n[s.FULLPLAIN]})$|^$`),o("COMPARATORTRIM",`(\\s*)${n[s.GTLT]}\\s*(${n[s.LOOSEPLAIN]}|${n[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",o("HYPHENRANGE",`^\\s*(${n[s.XRANGEPLAIN]})\\s+-\\s+(${n[s.XRANGEPLAIN]})\\s*$`),o("HYPHENRANGELOOSE",`^\\s*(${n[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${n[s.XRANGEPLAINLOOSE]})\\s*$`),o("STAR","(<|>)?=?\\s*\\*"),o("GTE0","^\\s*>=\\s*0.0.0\\s*$"),o("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}),Se=/^[0-9]+$/,Be=(e,t)=>{let r=Se.test(e),i=Se.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1},Ut=(e,t)=>Be(t,e),Dt={compareIdentifiers:Be,rcompareIdentifiers:Ut},{MAX_LENGTH:Ce,MAX_SAFE_INTEGER:re}=we,{re:be,t:Pe}=ee,{compareIdentifiers:H}=Dt,w=class{constructor(e,t){if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof w){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>Ce)throw new TypeError(`version is longer than ${Ce} characters`);E("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?be[Pe.LOOSE]:be[Pe.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>re||this.major<0)throw new TypeError("Invalid major version");if(this.minor>re||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>re||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<re)return n}return i}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(E("SemVer.compare",this.version,this.options,e),!(e instanceof w)){if(typeof e=="string"&&e===this.version)return 0;e=new w(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof w||(e=new w(e,this.options)),H(this.major,e.major)||H(this.minor,e.minor)||H(this.patch,e.patch)}comparePre(e){if(e instanceof w||(e=new w(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],i=e.prerelease[t];if(E("prerelease compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r!==i)return H(r,i)}while(++t)}compareBuild(e){e instanceof w||(e=new w(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(E("prerelease compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r!==i)return H(r,i)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);break;case"major":this.minor===0&&this.patch===0&&this.prerelease.length!==0||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":this.patch===0&&this.prerelease.length!==0||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}},Gt=(e,t,r)=>new w(e,r).compare(new w(t,r)),q=Gt,xt=(e,t,r)=>q(e,t,r)===0,Ft=xt,Wt=(e,t,r)=>q(e,t,r)!==0,jt=Wt,qt=(e,t,r)=>q(e,t,r)>0,Vt=qt,Ht=(e,t,r)=>q(e,t,r)>=0,Bt=Ht,Xt=(e,t,r)=>q(e,t,r)<0,Kt=Xt,Yt=(e,t,r)=>q(e,t,r)<=0,zt=Yt,Jt=(e,t,r,i)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return Ft(e,r,i);case"!=":return jt(e,r,i);case">":return Vt(e,r,i);case">=":return Bt(e,r,i);case"<":return Kt(e,r,i);case"<=":return zt(e,r,i);default:throw new TypeError(`Invalid operator: ${t}`)}},fe=Jt,B=Symbol("SemVer ANY"),Q=class{static get ANY(){return B}constructor(e,t){if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof Q){if(e.loose===!!t.loose)return e;e=e.value}E("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===B?this.value="":this.value=this.operator+this.semver.version,E("comp",this)}parse(e){let t=this.options.loose?ke[Ue.COMPARATORLOOSE]:ke[Ue.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new w(r[2],this.options.loose):this.semver=B}toString(){return this.value}test(e){if(E("Comparator.test",e,this.options.loose),this.semver===B||e===B)return!0;if(typeof e=="string")try{e=new w(e,this.options)}catch{return!1}return fe(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Q))throw new TypeError("a Comparator is required");if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""||new F(e.value,t).test(this.value);if(e.operator==="")return e.value===""||new F(this.value,t).test(e.semver);let r=!(this.operator!==">="&&this.operator!==">"||e.operator!==">="&&e.operator!==">"),i=!(this.operator!=="<="&&this.operator!=="<"||e.operator!=="<="&&e.operator!=="<"),n=this.semver.version===e.semver.version,s=!(this.operator!==">="&&this.operator!=="<="||e.operator!==">="&&e.operator!=="<="),a=fe(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),o=fe(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return r||i||n&&s||a||o}},{re:ke,t:Ue}=ee,F=class{constructor(e,t){if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof F)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new F(e.raw,t);if(e instanceof Q)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){let{loose:t}=this.options;e=e.trim();let r=t?N[R.HYPHENRANGELOOSE]:N[R.HYPHENRANGE];e=e.replace(r,ur(this.options.includePrerelease)),E("hyphen replace",e),e=e.replace(N[R.COMPARATORTRIM],Qt),E("comparator trim",e,N[R.COMPARATORTRIM]),e=(e=(e=e.replace(N[R.TILDETRIM],Zt)).replace(N[R.CARETTRIM],er)).split(/\s+/).join(" ");let i=t?N[R.COMPARATORLOOSE]:N[R.COMPARATOR];return e.split(" ").map(n=>tr(n,this.options)).join(" ").split(/\s+/).map(n=>cr(n,this.options)).filter(this.options.loose?n=>!!n.match(i):()=>!0).map(n=>new Q(n,this.options))}intersects(e,t){if(!(e instanceof F))throw new TypeError("a Range is required");return this.set.some(r=>De(r,t)&&e.set.some(i=>De(i,t)&&r.every(n=>i.every(s=>n.intersects(s,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new w(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(dr(this.set[t],e,this.options))return!0;return!1}},{re:N,t:R,comparatorTrimReplace:Qt,tildeTrimReplace:Zt,caretTrimReplace:er}=ee,De=(e,t)=>{let r=!0,i=e.slice(),n=i.pop();for(;r&&i.length;)r=i.every(s=>n.intersects(s,t)),n=i.pop();return r},tr=(e,t)=>(E("comp",e,t),e=nr(e,t),E("caret",e),e=rr(e,t),E("tildes",e),e=or(e,t),E("xrange",e),e=lr(e,t),E("stars",e),e),A=e=>!e||e.toLowerCase()==="x"||e==="*",rr=(e,t)=>e.trim().split(/\s+/).map(r=>ir(r,t)).join(" "),ir=(e,t)=>{let r=t.loose?N[R.TILDELOOSE]:N[R.TILDE];return e.replace(r,(i,n,s,a,o)=>{let u;return E("tilde",e,i,n,s,a,o),A(n)?u="":A(s)?u=`>=${n}.0.0 <${+n+1}.0.0-0`:A(a)?u=`>=${n}.${s}.0 <${n}.${+s+1}.0-0`:o?(E("replaceTilde pr",o),u=`>=${n}.${s}.${a}-${o} <${n}.${+s+1}.0-0`):u=`>=${n}.${s}.${a} <${n}.${+s+1}.0-0`,E("tilde return",u),u})},nr=(e,t)=>e.trim().split(/\s+/).map(r=>sr(r,t)).join(" "),sr=(e,t)=>{E("caret",e,t);let r=t.loose?N[R.CARETLOOSE]:N[R.CARET],i=t.includePrerelease?"-0":"";return e.replace(r,(n,s,a,o,u)=>{let l;return E("caret",e,n,s,a,o,u),A(s)?l="":A(a)?l=`>=${s}.0.0${i} <${+s+1}.0.0-0`:A(o)?l=s==="0"?`>=${s}.${a}.0${i} <${s}.${+a+1}.0-0`:`>=${s}.${a}.0${i} <${+s+1}.0.0-0`:u?(E("replaceCaret pr",u),l=s==="0"?a==="0"?`>=${s}.${a}.${o}-${u} <${s}.${a}.${+o+1}-0`:`>=${s}.${a}.${o}-${u} <${s}.${+a+1}.0-0`:`>=${s}.${a}.${o}-${u} <${+s+1}.0.0-0`):(E("no pr"),l=s==="0"?a==="0"?`>=${s}.${a}.${o}${i} <${s}.${a}.${+o+1}-0`:`>=${s}.${a}.${o}${i} <${s}.${+a+1}.0-0`:`>=${s}.${a}.${o} <${+s+1}.0.0-0`),E("caret return",l),l})},or=(e,t)=>(E("replaceXRanges",e,t),e.split(/\s+/).map(r=>ar(r,t)).join(" ")),ar=(e,t)=>{e=e.trim();let r=t.loose?N[R.XRANGELOOSE]:N[R.XRANGE];return e.replace(r,(i,n,s,a,o,u)=>{E("xRange",e,i,n,s,a,o,u);let l=A(s),c=l||A(a),d=c||A(o),f=d;return n==="="&&f&&(n=""),u=t.includePrerelease?"-0":"",l?i=n===">"||n==="<"?"<0.0.0-0":"*":n&&f?(c&&(a=0),o=0,n===">"?(n=">=",c?(s=+s+1,a=0,o=0):(a=+a+1,o=0)):n==="<="&&(n="<",c?s=+s+1:a=+a+1),n==="<"&&(u="-0"),i=`${n+s}.${a}.${o}${u}`):c?i=`>=${s}.0.0${u} <${+s+1}.0.0-0`:d&&(i=`>=${s}.${a}.0${u} <${s}.${+a+1}.0-0`),E("xRange return",i),i})},lr=(e,t)=>(E("replaceStars",e,t),e.trim().replace(N[R.STAR],"")),cr=(e,t)=>(E("replaceGTE0",e,t),e.trim().replace(N[t.includePrerelease?R.GTE0PRE:R.GTE0],"")),ur=e=>(t,r,i,n,s,a,o,u,l,c,d,f,_)=>`${r=A(i)?"":A(n)?`>=${i}.0.0${e?"-0":""}`:A(s)?`>=${i}.${n}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`} ${u=A(l)?"":A(c)?`<${+l+1}.0.0-0`:A(d)?`<${l}.${+c+1}.0-0`:f?`<=${l}.${c}.${d}-${f}`:e?`<${l}.${c}.${+d+1}-0`:`<=${u}`}`.trim(),dr=(e,t,r)=>{for(let i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let i=0;i<e.length;i++)if(E(e[i].semver),e[i].semver!==Q.ANY&&e[i].semver.prerelease.length>0){let n=e[i].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0},hr=(e,t,r)=>{try{t=new F(t,r)}catch{return!1}return t.test(e)},{MAX_LENGTH:pr}=we,{re:Ge,t:xe}=ee,mr=(e,t)=>{if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof w)return e;if(typeof e!="string"||e.length>pr||!(t.loose?Ge[xe.LOOSE]:Ge[xe.FULL]).test(e))return null;try{return new w(e,t)}catch{return null}},Er=mr,{re:ie,t:ne}=ee,fr=(e,t)=>{if(e instanceof w)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;let r=null;if((t=t||{}).rtl){let i;for(;(i=ie[ne.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),ie[ne.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;ie[ne.COERCERTL].lastIndex=-1}else r=e.match(ie[ne.COERCE]);return r===null?null:Er(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};function gr(e){return String.fromCharCode(parseInt(e.slice(1),16))}function _r(e){return`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`}function vr(e){return btoa(encodeURIComponent(e).replace(/%[0-9A-F]{2}/g,gr))}function Ir(e){return decodeURIComponent(Array.from(atob(e),_r).join(""))}function Xe(e){return vr(JSON.stringify(e))}function yr(e){return JSON.parse(Ir(e))}function K(e){return typeof e>"u"}function wr(e){return e===null}function Ke(e){return wr(e)||K(e)}function Rr(e){return Ke(e)?!1:!K(e.jsonrpc)&&!K(e.id)&&(!K(e.result)||!K(e.error))}function $r(e){return Ke(e)?!1:typeof e=="number"&&Object.values(ve).includes(e)}function ue(e){if(!e)return!0;for(let t in e)if(Object.hasOwnProperty.call(e,t))return!1;return!0}var g={};function Ii(e,t){return Object.assign(g,t),e}var Nr={"magic-sdk":"magic-sdk","@magic-sdk/react-native":"magic-sdk-rn","@magic-sdk/react-native-bare":"magic-sdk-rn-bare","@magic-sdk/react-native-expo":"magic-sdk-rn-expo"},D=class extends Error{constructor(e,t){super(`Magic SDK Error: [${e}] ${t}`),this.code=e,this.rawMessage=t,this.__proto__=Error,Object.setPrototypeOf(this,D.prototype)}},de=class extends Error{constructor(e){super(),this.__proto__=Error;let t=Number(e==null?void 0:e.code);this.rawMessage=(e==null?void 0:e.message)||"Internal error",this.code=$r(t)?t:ve.InternalError,this.message=`Magic RPC Error: [${this.code}] ${this.rawMessage}`,this.data=(e==null?void 0:e.data)||void 0,Object.setPrototypeOf(this,de.prototype)}},te=class{constructor(e,t){this.code=e,this.rawMessage=t,this.message=`Magic SDK Warning: [${e}] ${t}`}log(){console.warn(this.message)}},Ye=class extends Error{constructor(e,t,r,i){super(`Magic Extension Error (${e.name}): [${t}] ${r}`),this.code=t,this.rawMessage=r,this.data=i,this.__proto__=Error,Object.setPrototypeOf(this,Ye.prototype)}},Fe=class{constructor(e,t,r){this.code=t,this.rawMessage=r,this.message=`Magic Extension Warning (${e.name}): [${t}] ${r}`}log(){console.warn(this.message)}};function Ar(){return new D(U.MissingApiKey,"Please provide an API key that you acquired from the Magic developer dashboard.")}function Or(){return new D(U.ModalNotReady,"Modal is not ready.")}function Mr(){return new D(U.MalformedResponse,"Response from the Magic iframe is malformed.")}function Tr(e){return new D(U.ExtensionNotInitialized,`Extensions must be initialized with a Magic SDK instance before \`Extension.${e}\` can be accessed. Do not invoke \`Extension.${e}\` inside an extension constructor.`)}function Lr(e){let t=`Some extensions are incompatible with \`${g.sdkName}@${g.version}\`:`;return e.filter(r=>typeof r.compat<"u"&&r.compat!==null).forEach(r=>{let i=r.compat[g.sdkName];typeof i=="string"?t+=`
|
|
1
|
+
import{p as dt}from"./index-DDLQh72H.js";var U=(e=>(e.MissingApiKey="MISSING_API_KEY",e.ModalNotReady="MODAL_NOT_READY",e.MalformedResponse="MALFORMED_RESPONSE",e.InvalidArgument="INVALID_ARGUMENT",e.ExtensionNotInitialized="EXTENSION_NOT_INITIALIZED",e.IncompatibleExtensions="INCOMPATIBLE_EXTENSIONS",e))(U||{}),j=(e=>(e.SyncWeb3Method="SYNC_WEB3_METHOD",e.DuplicateIframe="DUPLICATE_IFRAME",e.ReactNativeEndpointConfiguration="REACT_NATIVE_ENDPOINT_CONFIGURATION",e.DeprecationNotice="DEPRECATION_NOTICE",e.ProductAnnouncement="ANNOUNCEMENT",e))(j||{}),ve=(e=>(e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.MagicLinkFailedVerification=-1e4]="MagicLinkFailedVerification",e[e.MagicLinkExpired=-10001]="MagicLinkExpired",e[e.MagicLinkRateLimited=-10002]="MagicLinkRateLimited",e[e.MagicLinkInvalidRedirectURL=-10006]="MagicLinkInvalidRedirectURL",e[e.UserAlreadyLoggedIn=-10003]="UserAlreadyLoggedIn",e[e.UpdateEmailFailed=-10004]="UpdateEmailFailed",e[e.UserRequestEditEmail=-10005]="UserRequestEditEmail",e[e.InactiveRecipient=-10010]="InactiveRecipient",e[e.AccessDeniedToUser=-10011]="AccessDeniedToUser",e[e.RedirectLoginComplete=-10015]="RedirectLoginComplete",e))(ve||{}),M=(e=>(e.MetaMask="metamask",e.CoinbaseWallet="coinbase_wallet",e))(M||{}),ae=(e=>(e.WalletSelected="wallet_selected",e.WalletConnected="wallet_connected",e.WalletRejected="wallet_rejected",e))(ae||{}),h=(e=>(e.LoginWithSms="magic_auth_login_with_sms",e.LoginWithEmailOTP="magic_auth_login_with_email_otp",e.LoginWithMagicLink="magic_auth_login_with_magic_link",e.LoginWithCredential="magic_auth_login_with_credential",e.SetAuthorizationToken="magic_auth_set_authorization_token",e.GetIdToken="magic_auth_get_id_token",e.GenerateIdToken="magic_auth_generate_id_token",e.GetMetadata="magic_auth_get_metadata",e.IsLoggedIn="magic_is_logged_in",e.Logout="magic_auth_logout",e.UpdateEmail="magic_auth_update_email",e.UserSettings="magic_auth_settings",e.UserSettingsTestMode="magic_auth_settings_testing_mode",e.LoginWithSmsTestMode="magic_auth_login_with_sms_testing_mode",e.LoginWithEmailOTPTestMode="magic_auth_login_with_email_otp_testing_mode",e.LoginWithMagicLinkTestMode="magic_login_with_magic_link_testing_mode",e.LoginWithCredentialTestMode="magic_auth_login_with_credential_testing_mode",e.GetIdTokenTestMode="magic_auth_get_id_token_testing_mode",e.GenerateIdTokenTestMode="magic_auth_generate_id_token_testing_mode",e.GetMetadataTestMode="magic_auth_get_metadata_testing_mode",e.IsLoggedInTestMode="magic_auth_is_logged_in_testing_mode",e.LogoutTestMode="magic_auth_logout_testing_mode",e.UpdateEmailTestMode="magic_auth_update_email_testing_mode",e.IntermediaryEvent="magic_intermediary_event",e.RequestAccounts="eth_requestAccounts",e.GetInfo="magic_get_info",e.ShowUI="magic_wallet",e.NFTPurchase="magic_nft_purchase",e.NFTCheckout="magic_nft_checkout",e.NFTTransfer="magic_nft_transfer",e.RequestUserInfoWithUI="mc_request_user_info",e.Disconnect="mc_disconnect",e.RecoverAccount="magic_auth_recover_account",e.RecoverAccountTestMode="magic_auth_recover_account_testing_mode",e.MagicBoxHeartBeat="magic_box_heart_beat",e.AutoConnect="mc_auto_connect",e.Login="mc_login",e.EncryptV1="magic_auth_encrypt_v1",e.DecryptV1="magic_auth_decrypt_v1",e.ShowNFTs="magic_show_nfts",e.ShowOnRamp="magic_show_fiat_onramp",e.ShowSendTokensUI="magic_show_send_tokens_ui",e.ShowAddress="magic_show_address",e.ShowBalances="magic_show_balances",e.SendGaslessTransaction="eth_sendGaslessTransaction",e))(h||{}),k=(e=>(e.MAGIC_HANDLE_RESPONSE="MAGIC_HANDLE_RESPONSE",e.MAGIC_OVERLAY_READY="MAGIC_OVERLAY_READY",e.MAGIC_SHOW_OVERLAY="MAGIC_SHOW_OVERLAY",e.MAGIC_HIDE_OVERLAY="MAGIC_HIDE_OVERLAY",e.MAGIC_HANDLE_EVENT="MAGIC_HANDLE_EVENT",e.MAGIC_MG_BOX_SEND_RECEIPT="MAGIC_MG_BOX_SEND_RECEIPT",e.MAGIC_SEND_PRODUCT_ANNOUNCEMENT="MAGIC_SEND_PRODUCT_ANNOUNCEMENT",e))(k||{}),ce=(e=>(e.MAGIC_HANDLE_REQUEST="MAGIC_HANDLE_REQUEST",e))(ce||{}),ht=(e=>(e.UpdateEmail="update-email",e.MFA="mfa",e.Recovery="recovery",e))(ht||{}),pt=(e=>(e.Retry="retry",e))(pt||{}),mt=(e=>(e.EmailSent="email-sent",e.EmailNotDeliverable="email-not-deliverable",e))(mt||{}),X=(e=>(e.VerifyEmailOtp="verify-email-otp",e.Cancel="cancel",e))(X||{}),Et=(e=>(e.EmailOTPSent="email-otp-sent",e.InvalidEmailOtp="invalid-email-otp",e.ExpiredEmailOtp="expired-email-otp",e))(Et||{}),ge=(e=>(e.Retry="device-retry",e))(ge||{}),ft=(e=>(e.DeviceApproved="device-approved",e.DeviceNeedsApproval="device-needs-approval",e.DeviceVerificationLinkExpired="device-verification-link-expired",e.DeviceVerificationEmailSent="device-verification-email-sent",e))(ft||{}),b=(e=>(e.Retry="Recency/auth-factor-retry",e.Cancel="Recency/auth-factor-verification-cancel",e.VerifyEmailOtp="Recency/auth-factor-verify-email-otp",e))(b||{}),gt=(e=>(e.PrimaryAuthFactorNeedsVerification="Recency/auth-factor-needs-verification",e.PrimaryAuthFactorVerified="Recency/auth-factor-verified",e.InvalidEmailOtp="Recency/auth-factor-invalid-email-otp",e.EmailExpired="Recency/auth-factor-verification-email-expired",e.EmailSent="Recency/auth-factor-verification-email-sent",e.EmailNotDeliverable="Recency/auth-factor-verification-email-not-deliverable",e))(gt||{}),P=(e=>(e.RetryWithNewEmail="UpdateEmail/retry-with-new-email",e.Cancel="UpdateEmail/new-email-verification-cancel",e.VerifyEmailOtp="UpdateEmail/new-email-verify-otp",e))(P||{}),_t=(e=>(e.NewAuthFactorNeedsVerification="UpdateEmail/new-email-needs-verification",e.EmailUpdated="UpdateEmail/email-updated",e.InvalidEmailOtp="UpdateEmail/new-email-invalid-email-otp",e.EmailExpired="UpdateEmail/new-email-verification-email-expired",e.EmailSent="UpdateEmail/new-email-verification-email-sent",e.EmailNotDeliverable="UpdateEmail/new-email-verification-email-not-deliverable",e.InvalidEmail="UpdateEmail/new-email-invalid",e.EmailAlreadyExists="UpdateEmail/new-email-already-exists",e))(_t||{}),vt=(e=>(e.Harmony="HARMONY",e))(vt||{}),It=(e=>(e.PhoneNumber="phone_number",e))(It||{}),Ee={VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.16.1-19644308472.commit-c4256dc"},yt=Object.create,pe=Object.defineProperty,wt=Object.defineProperties,Rt=Object.getOwnPropertyDescriptor,$t=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertyNames,Te=Object.getOwnPropertySymbols,At=Object.getPrototypeOf,He=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,Le=(e,t,r)=>t in e?pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ie=(e,t)=>{for(var r in t||(t={}))He.call(t,r)&&Le(e,r,t[r]);if(Te)for(var r of Te(t))Ot.call(t,r)&&Le(e,r,t[r]);return e},ye=(e,t)=>wt(e,$t(t)),Mt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Tt=(e,t)=>{for(var r in t)pe(e,r,{get:t[r],enumerable:!0})},Lt=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Nt(t))!He.call(e,n)&&n!==r&&pe(e,n,{get:()=>t[n],enumerable:!(i=Rt(t,n))||i.enumerable});return e},St=(e,t,r)=>(r=e!=null?yt(At(e)):{},Lt(!e||!e.__esModule?pe(r,"default",{value:e,enumerable:!0}):r,e)),v=(e,t,r)=>new Promise((i,n)=>{var s=u=>{try{o(r.next(u))}catch(l){n(l)}},a=u=>{try{o(r.throw(u))}catch(l){n(l)}},o=u=>u.done?i(u.value):Promise.resolve(u.value).then(s,a);o((r=r.apply(e,t)).next())}),Ct=Mt((e,t)=>{var r=Object.prototype.hasOwnProperty,i="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(i=!1));function s(l,c,d){this.fn=l,this.context=c,this.once=d||!1}function a(l,c,d,f,_){if(typeof d!="function")throw new TypeError("The listener must be a function");var I=new s(d,f||l,_),$=i?i+c:c;return l._events[$]?l._events[$].fn?l._events[$]=[l._events[$],I]:l._events[$].push(I):(l._events[$]=I,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var l=[],c,d;if(this._eventsCount===0)return l;for(d in c=this._events)r.call(c,d)&&l.push(i?d.slice(1):d);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(c)):l},u.prototype.listeners=function(l){var c=i?i+l:l,d=this._events[c];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,_=d.length,I=new Array(_);f<_;f++)I[f]=d[f].fn;return I},u.prototype.listenerCount=function(l){var c=i?i+l:l,d=this._events[c];return d?d.fn?1:d.length:0},u.prototype.emit=function(l,c,d,f,_,I){var $=i?i+l:l;if(!this._events[$])return!1;var p=this._events[$],L=arguments.length,C,y;if(p.fn){switch(p.once&&this.removeListener(l,p.fn,void 0,!0),L){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,c),!0;case 3:return p.fn.call(p.context,c,d),!0;case 4:return p.fn.call(p.context,c,d,f),!0;case 5:return p.fn.call(p.context,c,d,f,_),!0;case 6:return p.fn.call(p.context,c,d,f,_,I),!0}for(y=1,C=new Array(L-1);y<L;y++)C[y-1]=arguments[y];p.fn.apply(p.context,C)}else{var ut=p.length,V;for(y=0;y<ut;y++)switch(p[y].once&&this.removeListener(l,p[y].fn,void 0,!0),L){case 1:p[y].fn.call(p[y].context);break;case 2:p[y].fn.call(p[y].context,c);break;case 3:p[y].fn.call(p[y].context,c,d);break;case 4:p[y].fn.call(p[y].context,c,d,f);break;default:if(!C)for(V=1,C=new Array(L-1);V<L;V++)C[V-1]=arguments[V];p[y].fn.apply(p[y].context,C)}}return!0},u.prototype.on=function(l,c,d){return a(this,l,c,d,!1)},u.prototype.once=function(l,c,d){return a(this,l,c,d,!0)},u.prototype.removeListener=function(l,c,d,f){var _=i?i+l:l;if(!this._events[_])return this;if(!c)return o(this,_),this;var I=this._events[_];if(I.fn)I.fn===c&&(!f||I.once)&&(!d||I.context===d)&&o(this,_);else{for(var $=0,p=[],L=I.length;$<L;$++)(I[$].fn!==c||f&&!I[$].once||d&&I[$].context!==d)&&p.push(I[$]);p.length?this._events[_]=p.length===1?p[0]:p:o(this,_)}return this},u.prototype.removeAllListeners=function(l){var c;return l?(c=i?i+l:l,this._events[c]&&o(this,c)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=i,u.EventEmitter=u,typeof t<"u"&&(t.exports=u)});function bt(e){let t={exports:{}};return e(t,t.exports),t.exports}var Pt=Number.MAX_SAFE_INTEGER||9007199254740991,we={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Pt,MAX_SAFE_COMPONENT_LENGTH:16},kt=typeof dt=="object"&&Ee&&Ee.NODE_DEBUG&&/\bsemver\b/i.test(Ee.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{},E=kt,ee=bt(function(e,t){let{MAX_SAFE_COMPONENT_LENGTH:r}=we,i=(t=e.exports={}).re=[],n=t.src=[],s=t.t={},a=0,o=(u,l,c)=>{let d=a++;E(d,l),s[u]=d,n[d]=l,i[d]=new RegExp(l,c?"g":void 0)};o("NUMERICIDENTIFIER","0|[1-9]\\d*"),o("NUMERICIDENTIFIERLOOSE","[0-9]+"),o("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),o("MAINVERSION",`(${n[s.NUMERICIDENTIFIER]})\\.(${n[s.NUMERICIDENTIFIER]})\\.(${n[s.NUMERICIDENTIFIER]})`),o("MAINVERSIONLOOSE",`(${n[s.NUMERICIDENTIFIERLOOSE]})\\.(${n[s.NUMERICIDENTIFIERLOOSE]})\\.(${n[s.NUMERICIDENTIFIERLOOSE]})`),o("PRERELEASEIDENTIFIER",`(?:${n[s.NUMERICIDENTIFIER]}|${n[s.NONNUMERICIDENTIFIER]})`),o("PRERELEASEIDENTIFIERLOOSE",`(?:${n[s.NUMERICIDENTIFIERLOOSE]}|${n[s.NONNUMERICIDENTIFIER]})`),o("PRERELEASE",`(?:-(${n[s.PRERELEASEIDENTIFIER]}(?:\\.${n[s.PRERELEASEIDENTIFIER]})*))`),o("PRERELEASELOOSE",`(?:-?(${n[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${n[s.PRERELEASEIDENTIFIERLOOSE]})*))`),o("BUILDIDENTIFIER","[0-9A-Za-z-]+"),o("BUILD",`(?:\\+(${n[s.BUILDIDENTIFIER]}(?:\\.${n[s.BUILDIDENTIFIER]})*))`),o("FULLPLAIN",`v?${n[s.MAINVERSION]}${n[s.PRERELEASE]}?${n[s.BUILD]}?`),o("FULL",`^${n[s.FULLPLAIN]}$`),o("LOOSEPLAIN",`[v=\\s]*${n[s.MAINVERSIONLOOSE]}${n[s.PRERELEASELOOSE]}?${n[s.BUILD]}?`),o("LOOSE",`^${n[s.LOOSEPLAIN]}$`),o("GTLT","((?:<|>)?=?)"),o("XRANGEIDENTIFIERLOOSE",`${n[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),o("XRANGEIDENTIFIER",`${n[s.NUMERICIDENTIFIER]}|x|X|\\*`),o("XRANGEPLAIN",`[v=\\s]*(${n[s.XRANGEIDENTIFIER]})(?:\\.(${n[s.XRANGEIDENTIFIER]})(?:\\.(${n[s.XRANGEIDENTIFIER]})(?:${n[s.PRERELEASE]})?${n[s.BUILD]}?)?)?`),o("XRANGEPLAINLOOSE",`[v=\\s]*(${n[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[s.XRANGEIDENTIFIERLOOSE]})(?:${n[s.PRERELEASELOOSE]})?${n[s.BUILD]}?)?)?`),o("XRANGE",`^${n[s.GTLT]}\\s*${n[s.XRANGEPLAIN]}$`),o("XRANGELOOSE",`^${n[s.GTLT]}\\s*${n[s.XRANGEPLAINLOOSE]}$`),o("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),o("COERCERTL",n[s.COERCE],!0),o("LONETILDE","(?:~>?)"),o("TILDETRIM",`(\\s*)${n[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",o("TILDE",`^${n[s.LONETILDE]}${n[s.XRANGEPLAIN]}$`),o("TILDELOOSE",`^${n[s.LONETILDE]}${n[s.XRANGEPLAINLOOSE]}$`),o("LONECARET","(?:\\^)"),o("CARETTRIM",`(\\s*)${n[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",o("CARET",`^${n[s.LONECARET]}${n[s.XRANGEPLAIN]}$`),o("CARETLOOSE",`^${n[s.LONECARET]}${n[s.XRANGEPLAINLOOSE]}$`),o("COMPARATORLOOSE",`^${n[s.GTLT]}\\s*(${n[s.LOOSEPLAIN]})$|^$`),o("COMPARATOR",`^${n[s.GTLT]}\\s*(${n[s.FULLPLAIN]})$|^$`),o("COMPARATORTRIM",`(\\s*)${n[s.GTLT]}\\s*(${n[s.LOOSEPLAIN]}|${n[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",o("HYPHENRANGE",`^\\s*(${n[s.XRANGEPLAIN]})\\s+-\\s+(${n[s.XRANGEPLAIN]})\\s*$`),o("HYPHENRANGELOOSE",`^\\s*(${n[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${n[s.XRANGEPLAINLOOSE]})\\s*$`),o("STAR","(<|>)?=?\\s*\\*"),o("GTE0","^\\s*>=\\s*0.0.0\\s*$"),o("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}),Se=/^[0-9]+$/,Be=(e,t)=>{let r=Se.test(e),i=Se.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1},Ut=(e,t)=>Be(t,e),Dt={compareIdentifiers:Be,rcompareIdentifiers:Ut},{MAX_LENGTH:Ce,MAX_SAFE_INTEGER:re}=we,{re:be,t:Pe}=ee,{compareIdentifiers:H}=Dt,w=class{constructor(e,t){if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof w){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>Ce)throw new TypeError(`version is longer than ${Ce} characters`);E("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?be[Pe.LOOSE]:be[Pe.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>re||this.major<0)throw new TypeError("Invalid major version");if(this.minor>re||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>re||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<re)return n}return i}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(E("SemVer.compare",this.version,this.options,e),!(e instanceof w)){if(typeof e=="string"&&e===this.version)return 0;e=new w(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof w||(e=new w(e,this.options)),H(this.major,e.major)||H(this.minor,e.minor)||H(this.patch,e.patch)}comparePre(e){if(e instanceof w||(e=new w(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],i=e.prerelease[t];if(E("prerelease compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r!==i)return H(r,i)}while(++t)}compareBuild(e){e instanceof w||(e=new w(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(E("prerelease compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r!==i)return H(r,i)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);break;case"major":this.minor===0&&this.patch===0&&this.prerelease.length!==0||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":this.patch===0&&this.prerelease.length!==0||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}},Gt=(e,t,r)=>new w(e,r).compare(new w(t,r)),q=Gt,xt=(e,t,r)=>q(e,t,r)===0,Ft=xt,Wt=(e,t,r)=>q(e,t,r)!==0,jt=Wt,qt=(e,t,r)=>q(e,t,r)>0,Vt=qt,Ht=(e,t,r)=>q(e,t,r)>=0,Bt=Ht,Xt=(e,t,r)=>q(e,t,r)<0,Kt=Xt,Yt=(e,t,r)=>q(e,t,r)<=0,zt=Yt,Jt=(e,t,r,i)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return Ft(e,r,i);case"!=":return jt(e,r,i);case">":return Vt(e,r,i);case">=":return Bt(e,r,i);case"<":return Kt(e,r,i);case"<=":return zt(e,r,i);default:throw new TypeError(`Invalid operator: ${t}`)}},fe=Jt,B=Symbol("SemVer ANY"),Q=class{static get ANY(){return B}constructor(e,t){if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof Q){if(e.loose===!!t.loose)return e;e=e.value}E("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===B?this.value="":this.value=this.operator+this.semver.version,E("comp",this)}parse(e){let t=this.options.loose?ke[Ue.COMPARATORLOOSE]:ke[Ue.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new w(r[2],this.options.loose):this.semver=B}toString(){return this.value}test(e){if(E("Comparator.test",e,this.options.loose),this.semver===B||e===B)return!0;if(typeof e=="string")try{e=new w(e,this.options)}catch{return!1}return fe(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Q))throw new TypeError("a Comparator is required");if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""||new F(e.value,t).test(this.value);if(e.operator==="")return e.value===""||new F(this.value,t).test(e.semver);let r=!(this.operator!==">="&&this.operator!==">"||e.operator!==">="&&e.operator!==">"),i=!(this.operator!=="<="&&this.operator!=="<"||e.operator!=="<="&&e.operator!=="<"),n=this.semver.version===e.semver.version,s=!(this.operator!==">="&&this.operator!=="<="||e.operator!==">="&&e.operator!=="<="),a=fe(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),o=fe(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return r||i||n&&s||a||o}},{re:ke,t:Ue}=ee,F=class{constructor(e,t){if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof F)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new F(e.raw,t);if(e instanceof Q)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){let{loose:t}=this.options;e=e.trim();let r=t?N[R.HYPHENRANGELOOSE]:N[R.HYPHENRANGE];e=e.replace(r,ur(this.options.includePrerelease)),E("hyphen replace",e),e=e.replace(N[R.COMPARATORTRIM],Qt),E("comparator trim",e,N[R.COMPARATORTRIM]),e=(e=(e=e.replace(N[R.TILDETRIM],Zt)).replace(N[R.CARETTRIM],er)).split(/\s+/).join(" ");let i=t?N[R.COMPARATORLOOSE]:N[R.COMPARATOR];return e.split(" ").map(n=>tr(n,this.options)).join(" ").split(/\s+/).map(n=>cr(n,this.options)).filter(this.options.loose?n=>!!n.match(i):()=>!0).map(n=>new Q(n,this.options))}intersects(e,t){if(!(e instanceof F))throw new TypeError("a Range is required");return this.set.some(r=>De(r,t)&&e.set.some(i=>De(i,t)&&r.every(n=>i.every(s=>n.intersects(s,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new w(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(dr(this.set[t],e,this.options))return!0;return!1}},{re:N,t:R,comparatorTrimReplace:Qt,tildeTrimReplace:Zt,caretTrimReplace:er}=ee,De=(e,t)=>{let r=!0,i=e.slice(),n=i.pop();for(;r&&i.length;)r=i.every(s=>n.intersects(s,t)),n=i.pop();return r},tr=(e,t)=>(E("comp",e,t),e=nr(e,t),E("caret",e),e=rr(e,t),E("tildes",e),e=or(e,t),E("xrange",e),e=lr(e,t),E("stars",e),e),A=e=>!e||e.toLowerCase()==="x"||e==="*",rr=(e,t)=>e.trim().split(/\s+/).map(r=>ir(r,t)).join(" "),ir=(e,t)=>{let r=t.loose?N[R.TILDELOOSE]:N[R.TILDE];return e.replace(r,(i,n,s,a,o)=>{let u;return E("tilde",e,i,n,s,a,o),A(n)?u="":A(s)?u=`>=${n}.0.0 <${+n+1}.0.0-0`:A(a)?u=`>=${n}.${s}.0 <${n}.${+s+1}.0-0`:o?(E("replaceTilde pr",o),u=`>=${n}.${s}.${a}-${o} <${n}.${+s+1}.0-0`):u=`>=${n}.${s}.${a} <${n}.${+s+1}.0-0`,E("tilde return",u),u})},nr=(e,t)=>e.trim().split(/\s+/).map(r=>sr(r,t)).join(" "),sr=(e,t)=>{E("caret",e,t);let r=t.loose?N[R.CARETLOOSE]:N[R.CARET],i=t.includePrerelease?"-0":"";return e.replace(r,(n,s,a,o,u)=>{let l;return E("caret",e,n,s,a,o,u),A(s)?l="":A(a)?l=`>=${s}.0.0${i} <${+s+1}.0.0-0`:A(o)?l=s==="0"?`>=${s}.${a}.0${i} <${s}.${+a+1}.0-0`:`>=${s}.${a}.0${i} <${+s+1}.0.0-0`:u?(E("replaceCaret pr",u),l=s==="0"?a==="0"?`>=${s}.${a}.${o}-${u} <${s}.${a}.${+o+1}-0`:`>=${s}.${a}.${o}-${u} <${s}.${+a+1}.0-0`:`>=${s}.${a}.${o}-${u} <${+s+1}.0.0-0`):(E("no pr"),l=s==="0"?a==="0"?`>=${s}.${a}.${o}${i} <${s}.${a}.${+o+1}-0`:`>=${s}.${a}.${o}${i} <${s}.${+a+1}.0-0`:`>=${s}.${a}.${o} <${+s+1}.0.0-0`),E("caret return",l),l})},or=(e,t)=>(E("replaceXRanges",e,t),e.split(/\s+/).map(r=>ar(r,t)).join(" ")),ar=(e,t)=>{e=e.trim();let r=t.loose?N[R.XRANGELOOSE]:N[R.XRANGE];return e.replace(r,(i,n,s,a,o,u)=>{E("xRange",e,i,n,s,a,o,u);let l=A(s),c=l||A(a),d=c||A(o),f=d;return n==="="&&f&&(n=""),u=t.includePrerelease?"-0":"",l?i=n===">"||n==="<"?"<0.0.0-0":"*":n&&f?(c&&(a=0),o=0,n===">"?(n=">=",c?(s=+s+1,a=0,o=0):(a=+a+1,o=0)):n==="<="&&(n="<",c?s=+s+1:a=+a+1),n==="<"&&(u="-0"),i=`${n+s}.${a}.${o}${u}`):c?i=`>=${s}.0.0${u} <${+s+1}.0.0-0`:d&&(i=`>=${s}.${a}.0${u} <${s}.${+a+1}.0-0`),E("xRange return",i),i})},lr=(e,t)=>(E("replaceStars",e,t),e.trim().replace(N[R.STAR],"")),cr=(e,t)=>(E("replaceGTE0",e,t),e.trim().replace(N[t.includePrerelease?R.GTE0PRE:R.GTE0],"")),ur=e=>(t,r,i,n,s,a,o,u,l,c,d,f,_)=>`${r=A(i)?"":A(n)?`>=${i}.0.0${e?"-0":""}`:A(s)?`>=${i}.${n}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`} ${u=A(l)?"":A(c)?`<${+l+1}.0.0-0`:A(d)?`<${l}.${+c+1}.0-0`:f?`<=${l}.${c}.${d}-${f}`:e?`<${l}.${c}.${+d+1}-0`:`<=${u}`}`.trim(),dr=(e,t,r)=>{for(let i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let i=0;i<e.length;i++)if(E(e[i].semver),e[i].semver!==Q.ANY&&e[i].semver.prerelease.length>0){let n=e[i].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0},hr=(e,t,r)=>{try{t=new F(t,r)}catch{return!1}return t.test(e)},{MAX_LENGTH:pr}=we,{re:Ge,t:xe}=ee,mr=(e,t)=>{if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof w)return e;if(typeof e!="string"||e.length>pr||!(t.loose?Ge[xe.LOOSE]:Ge[xe.FULL]).test(e))return null;try{return new w(e,t)}catch{return null}},Er=mr,{re:ie,t:ne}=ee,fr=(e,t)=>{if(e instanceof w)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;let r=null;if((t=t||{}).rtl){let i;for(;(i=ie[ne.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),ie[ne.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;ie[ne.COERCERTL].lastIndex=-1}else r=e.match(ie[ne.COERCE]);return r===null?null:Er(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};function gr(e){return String.fromCharCode(parseInt(e.slice(1),16))}function _r(e){return`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`}function vr(e){return btoa(encodeURIComponent(e).replace(/%[0-9A-F]{2}/g,gr))}function Ir(e){return decodeURIComponent(Array.from(atob(e),_r).join(""))}function Xe(e){return vr(JSON.stringify(e))}function yr(e){return JSON.parse(Ir(e))}function K(e){return typeof e>"u"}function wr(e){return e===null}function Ke(e){return wr(e)||K(e)}function Rr(e){return Ke(e)?!1:!K(e.jsonrpc)&&!K(e.id)&&(!K(e.result)||!K(e.error))}function $r(e){return Ke(e)?!1:typeof e=="number"&&Object.values(ve).includes(e)}function ue(e){if(!e)return!0;for(let t in e)if(Object.hasOwnProperty.call(e,t))return!1;return!0}var g={};function Ii(e,t){return Object.assign(g,t),e}var Nr={"magic-sdk":"magic-sdk","@magic-sdk/react-native":"magic-sdk-rn","@magic-sdk/react-native-bare":"magic-sdk-rn-bare","@magic-sdk/react-native-expo":"magic-sdk-rn-expo"},D=class extends Error{constructor(e,t){super(`Magic SDK Error: [${e}] ${t}`),this.code=e,this.rawMessage=t,this.__proto__=Error,Object.setPrototypeOf(this,D.prototype)}},de=class extends Error{constructor(e){super(),this.__proto__=Error;let t=Number(e==null?void 0:e.code);this.rawMessage=(e==null?void 0:e.message)||"Internal error",this.code=$r(t)?t:ve.InternalError,this.message=`Magic RPC Error: [${this.code}] ${this.rawMessage}`,this.data=(e==null?void 0:e.data)||void 0,Object.setPrototypeOf(this,de.prototype)}},te=class{constructor(e,t){this.code=e,this.rawMessage=t,this.message=`Magic SDK Warning: [${e}] ${t}`}log(){console.warn(this.message)}},Ye=class extends Error{constructor(e,t,r,i){super(`Magic Extension Error (${e.name}): [${t}] ${r}`),this.code=t,this.rawMessage=r,this.data=i,this.__proto__=Error,Object.setPrototypeOf(this,Ye.prototype)}},Fe=class{constructor(e,t,r){this.code=t,this.rawMessage=r,this.message=`Magic Extension Warning (${e.name}): [${t}] ${r}`}log(){console.warn(this.message)}};function Ar(){return new D(U.MissingApiKey,"Please provide an API key that you acquired from the Magic developer dashboard.")}function Or(){return new D(U.ModalNotReady,"Modal is not ready.")}function Mr(){return new D(U.MalformedResponse,"Response from the Magic iframe is malformed.")}function Tr(e){return new D(U.ExtensionNotInitialized,`Extensions must be initialized with a Magic SDK instance before \`Extension.${e}\` can be accessed. Do not invoke \`Extension.${e}\` inside an extension constructor.`)}function Lr(e){let t=`Some extensions are incompatible with \`${g.sdkName}@${g.version}\`:`;return e.filter(r=>typeof r.compat<"u"&&r.compat!==null).forEach(r=>{let i=r.compat[g.sdkName];typeof i=="string"?t+=`
|
|
2
2
|
- Extension \`${r.name}\` supports version(s) \`${i}\``:i||(t+=`
|
|
3
3
|
- Extension \`${r.name}\` does not support ${g.platform} environments.`)}),new D(U.IncompatibleExtensions,t)}function Sr(e){let t=r=>{let i=r+1,n=i%10,s=i%100;return n===1&&s!==11?`${i}st`:n===2&&s!==12?`${i}nd`:n===3&&s!==13?`${i}rd`:`${i}th`};return new D(U.InvalidArgument,`Invalid ${t(e.argument)} argument given to \`${e.procedure}\`.
|
|
4
4
|
Expected: \`${e.expected}\`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as e,g9 as Ge,ga as Re,a7 as Z,dM as Ue,S as s,T as F,fl as Ie,a4 as Q,f7 as We,M as o,fU as Oe,e$ as te,gb as He,cO as Fe,a2 as M,eD as ze,gc as qe,g2 as Ve,bq as ke,g4 as Ye,g5 as Ze,eO as Ne,gd as Qe,J as l,R as B,ge as Je,gf as Ke,eY as $,dN as fe,ez as Xe,gg as et,bp as ye,Q as be,fm as ve,ey as we,eB as ue,gh as tt,gi as ge,gj as st,gk as nt,gl as at,gm as it,gn as ot,fp as lt,go as rt,gp as Se,eE as ct,gq as dt,gr as mt,gs as he,P as _t,cM as ut,cN as gt,aa as ht,ab as w,eZ as pe,eJ as Ce,fB as pt,ej as Ct,gt as xt,gu as jt,gv as It,eM as kt,gw as Nt,gx as ft,gy as yt,gz as bt,gA as vt,f$ as wt}from"./index-CxPPIPig.js";import{e as St,f as Pt}from"./hooks-DzVESl21.js";import{g as Dt}from"./selector-CtnQnmhq.js";import{L as Et}from"./LoggedInDetailPage.container-CB30S7Lh.js";import{C as Mt}from"./CollectionProvider.container-DZHmH5be.js";import{N as Tt}from"./NotFound-DURGbwSh.js";import{B as $t}from"./Back-dywI829J.js";import{C as Bt,T as Lt}from"./ThirdPartyKindBadge-BXaziN42.js";import{C as se}from"./ConfirmDelete-DU4aX_JK.js";import"./Navigation.container-BFN51RYJ.js";import"./selectors-B07yj6kb.js";import"./SignInRequired-vN-iPiDW.js";const At=t=>e.jsx("img",{"data-testid":Ge,src:Re[t.network],alt:t.network,className:t.className}),Gt="_image_142g7_1",Rt="_main_142g7_2",Ut="_network_142g7_13",q={image:Gt,main:Rt,network:Ut},Wt=t=>{const{collection:n,collectionId:r,className:i,shape:m}=t;return e.jsxs("div",{className:Z(q.main,i),children:[n!=null&&n.itemCount?e.jsx(Ue,{collectionId:r,className:q.image}):e.jsx(s.Blockie,{className:q.image,seed:r,size:8,scale:8,shape:m??"circle"}),n!=null&&n.linkedContractNetwork?e.jsx(At,{network:n==null?void 0:n.linkedContractNetwork,className:q.network}):null]})},Ot=(t,n)=>({collection:Ie(t,n.collectionId)}),Ht=F(Ot)(Wt),Ft="_ellipsis_4huv2_1",xe={ellipsis:Ft},zt=t=>{const{collection:n}=t,r=Q(),i=()=>{n.isPublished&&n.forumLink&&S(n.forumLink,"_blank")},m=()=>{const{items:_,onOpenModal:d}=t;d("SeeInWorldModal",{itemIds:_.map(f=>f.id)})},a=()=>{const{collection:_,items:d}=t;r.push(Oe(_,d),{fromParam:te.TP_COLLECTIONS})},j=()=>{const{collection:_,onDelete:d}=t;d(_)},C=()=>{const{collection:_,onOpenModal:d}=t;_.isPublished||d("EditCollectionURNModal",{collection:_})},b=()=>{const{collection:_,onOpenModal:d}=t;d("CreateAndEditMultipleItemsModal",{collectionId:_.id,type:He.EDIT})},S=(_,d="")=>{const f=window.open(_,d);f&&f.focus()},I=!We(n)&&!n.isPublished;return e.jsx(s.Dropdown,{className:xe.dropdown,trigger:e.jsx(s.Button,{basic:!0,children:e.jsx(s.Icon,{className:xe.ellipsis,size:"large",name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(s.Dropdown.Menu,{children:[e.jsx(s.Dropdown.Item,{text:o("collection_context_menu.see_in_decentraland"),onClick:m}),e.jsx(s.Dropdown.Item,{text:o("global.open_in_editor"),onClick:a}),e.jsx(s.Popup,{content:o("collection_context_menu.delete_published_collection"),position:"right center",disabled:I,trigger:I?e.jsx(se,{name:n.name,onDelete:j,trigger:e.jsx(s.Dropdown.Item,{text:o("global.delete")})}):e.jsx(s.Dropdown.Item,{text:o("global.delete"),disabled:!0}),hideOnScroll:!0,on:"hover",inverted:!0}),e.jsx(s.Popup,{content:o("collection_context_menu.change_published_urn"),position:"right center",disabled:!n.isPublished,trigger:e.jsx(s.Dropdown.Item,{text:o("collection_context_menu.edit_urn"),onClick:C,disabled:n.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0}),e.jsx(s.Dropdown.Item,{text:o("collection_context_menu.edit_in_bulk"),onClick:b}),e.jsx(s.Popup,{content:o("collection_context_menu.unpublished"),position:"right center",disabled:n.isPublished||!!n.forumLink,trigger:e.jsx(s.Dropdown.Item,{disabled:!n.isPublished||!n.forumLink,text:o("collection_context_menu.forum_post"),onClick:i}),hideOnScroll:!0,on:"hover",inverted:!0})]})})},qt=t=>({name:Fe(t)||""}),Vt=t=>({onOpenModal:(n,r)=>t(M(n,r)),onDelete:n=>t(ze(n))}),Yt=F(qt,Vt)(zt),Zt=(t,n)=>{const{collection:r,items:i}=n;return{itemCurations:Ve(t,r.id),isLoadingItemCurations:ke(Ze(t),Ye),isLinkedWearablesPaymentsEnabled:Ne(t),itemsStatus:Qe(t,i.map(m=>m.id))}},Qt=t=>({onNewClick:(n,r,i)=>t(M("PublishWizardCollectionModal",{collectionId:n,itemsWithChanges:r,itemsToPublish:i})),onPushChangesClick:(n,r)=>t(M("PushChangesModal",{collectionId:n,itemsWithChanges:r})),onClick:(n,r,i)=>t(M("PublishThirdPartyCollectionModal",{collectionId:n,itemIds:r,action:i}))}),Jt=F(Zt,Qt)(qe),Kt="_itemImage_1y9df_1",Xt="_itemStatus_1y9df_10",es="_grid_1y9df_14",ts="_row_1y9df_25",ss="_column_1y9df_30",ns="_statusColumn_1y9df_34",as="_synced_1y9df_39",is="_unsynced_1y9df_43",os="_avatarColumn_1y9df_47",ls="_nameWrapper_1y9df_52",rs="_name_1y9df_52",cs="_itemActions_1y9df_65",ds="_action_1y9df_72",x={itemImage:Kt,itemStatus:Xt,grid:es,row:ts,column:ss,statusColumn:ns,synced:as,unsynced:is,avatarColumn:os,nameWrapper:ls,name:rs,itemActions:cs,action:ds};function ms({item:t,status:n,selected:r,onSelect:i,onOpenModal:m,onDelete:a}){const j=Q(),C=l.useCallback((h,D)=>{i(t,D.checked)},[t,i]),b=l.useCallback(()=>{m("SeeInWorldModal",{itemIds:[t.id]})},[t,m]),S=l.useCallback(()=>{t.isPublished||m("EditItemURNModal",{item:t})},[t,m]),I=l.useCallback(()=>{j.push(B.itemEditor({itemId:t.id,collectionId:t.collectionId}),{fromParam:te.TP_COLLECTIONS})},[t,j]),_=l.useCallback(()=>{a(t)},[a,t]),d=l.useMemo(()=>{if(!t.urn)return"";try{const h=Je(t.urn);return Ke(h)?h.thirdPartyTokenId??"":""}catch{return""}},[t]),f=l.useMemo(()=>{switch(n){case $.UNDER_REVIEW:return e.jsx(s.Icon,{name:"clock outline"});case $.SYNCED:return e.jsx(s.Icon,{name:"check circle outline"});case $.UNSYNCED:return e.jsx(s.Icon,{name:"exclamation circle"});default:return null}},[n]),y=t.data;return e.jsx(s.Grid,{className:`CollectionItem ${x.grid}`,columns:"equal",children:e.jsxs(s.Grid.Row,{className:x.row,children:[e.jsxs(s.Grid.Column,{className:`${x.column} ${x.avatarColumn}`,width:5,children:[e.jsx(s.Checkbox,{checked:r,disabled:t.isPublished,onClick:C}),e.jsx(fe,{className:x.itemImage,item:t,hasBadge:!0,badgeSize:"small"}),e.jsx("div",{className:x.nameWrapper,children:e.jsxs("div",{className:x.name,title:t.name,children:[e.jsx(Xe,{className:x.itemStatus,item:t}),t.name]})})]}),e.jsx(s.Grid.Column,{className:x.column,children:y.category?e.jsx("div",{children:o(`wearable.category.${y.category}`)}):null}),e.jsx(s.Grid.Column,{className:x.column,children:e.jsx("div",{children:o(`body_shapes.${et(t)}`)})}),e.jsx(s.Grid.Column,{className:x.column,children:e.jsx("div",{children:d})}),e.jsxs(s.Grid.Column,{width:3,className:`${x.column} ${x.statusColumn} ${x[n]}`,children:[f,e.jsx("div",{children:o(`third_party_collection_detail_page.synced_statuses.${n}`)})]}),e.jsx(s.Grid.Column,{width:1,className:x.column,children:e.jsx("div",{className:x.itemActions,children:e.jsx(s.Dropdown,{trigger:e.jsx(s.Button,{basic:!0,children:e.jsx(s.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:x.action,onClick:ye(),children:e.jsxs(s.Dropdown.Menu,{children:[e.jsx(s.Dropdown.Item,{text:o("collection_item.see_details"),as:be,to:B.itemDetail(t.id)}),e.jsx(s.Dropdown.Item,{text:o("collection_context_menu.see_in_decentraland"),onClick:b}),e.jsx(s.Dropdown.Item,{text:o("global.open_in_editor"),onClick:I}),e.jsx(s.Popup,{content:o("collection_item.cannot_edit_urn"),position:"right center",disabled:!t.isPublished,trigger:e.jsx(s.Dropdown.Item,{text:o("collection_item.edit_urn"),onClick:S,disabled:t.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}),!t.isPublished&&e.jsx(se,{name:t.name,onDelete:_,trigger:e.jsx(s.Dropdown.Item,{text:o("global.delete")})})]})})})})]})})}const _s=(t,n)=>({status:ve(t)[n.item.id]}),us=t=>({onDelete:n=>t(we(n)),onOpenModal:(n,r)=>t(M(n,r))}),gs=F(_s,us)(ms),hs="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%20clip-path='url(%23clip0_8524_427)'%3e%3cpath%20d='M20.5%203L20.34%203.03L15%205.1L9%203L3.36%204.9C3.15%204.97%203%205.15%203%205.38V20.5C3%2020.78%203.22%2021%203.5%2021L3.66%2020.97L9%2018.9L15%2021L20.64%2019.1C20.85%2019.03%2021%2018.85%2021%2018.62V3.5C21%203.22%2020.78%203%2020.5%203ZM15%2019L9%2016.89V5L15%207.11V19Z'%20fill='%23A09BA8'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_8524_427'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ps="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.669%200H1.33362C0.593463%200%200%200.600131%200%201.33362V10.669C0%2011.4025%200.593463%2012.0026%201.33362%2012.0026H10.669C11.4025%2012.0026%2012.0026%2011.4025%2012.0026%2010.669V1.33362C12.0026%200.600131%2011.4092%200%2010.669%200ZM10.669%2010.669H1.33362V2.66725H10.669V10.669ZM7.00152%206.66812C7.00152%207.22157%206.55476%207.66834%206.00131%207.66834C5.44785%207.66834%205.00109%207.22157%205.00109%206.66812C5.00109%206.11466%205.44785%205.6679%206.00131%205.6679C6.55476%205.6679%207.00152%206.11466%207.00152%206.66812ZM6.00131%204.00087C4.18091%204.00087%202.62724%205.10778%202.00044%206.66812C2.62724%208.22846%204.18091%209.33537%206.00131%209.33537C7.8217%209.33537%209.37537%208.22846%2010.0022%206.66812C9.37537%205.10778%207.8217%204.00087%206.00131%204.00087ZM6.00131%208.33515C5.08111%208.33515%204.33428%207.58832%204.33428%206.66812C4.33428%205.74792%205.08111%205.00109%206.00131%205.00109C6.92151%205.00109%207.66834%205.74792%207.66834%206.66812C7.66834%207.58832%206.92151%208.33515%206.00131%208.33515Z'%20fill='%23ECEBED'/%3e%3c/svg%3e",Cs="_status_rgxu1_1",xs="_pending_migration_rgxu1_14",js="_synced_rgxu1_19",Is="_unpublished_rgxu1_24",ks="_unsynced_rgxu1_25",Ns="_pending_mapping_rgxu1_30",fs="_under_review_rgxu1_31",ys="_icon_rgxu1_10",V={status:Cs,pending_migration:xs,synced:js,unpublished:Is,unsynced:ks,pending_mapping:Ns,under_review:fs,icon:ys},bs=t=>{const{status:n,item:r}=t,i=!r.mappings&&ue(r.urn),m=!r.isMappingComplete&&ue(r.urn),a=l.useMemo(()=>{if(i)return e.jsx("img",{src:hs,className:V.icon});if(m)return e.jsx(s.Icon,{name:"warning circle"});switch(n){case $.UNDER_REVIEW:return e.jsx("img",{src:ps,className:V.icon});case $.SYNCED:return e.jsx(s.Icon,{name:"check circle"});case $.UNSYNCED:case $.UNPUBLISHED:return e.jsx(s.Icon,{name:"cloud upload"})}},[n,i,m]),j=l.useMemo(()=>i?o("item_status.pending_mapping"):m?o("item_status.pending_migration"):o(`item_status.${n}`),[n,i,m]),C=l.useMemo(()=>i?"pending_mapping":m?"pending_migration":n,[n,i,m]);return e.jsxs("div",{className:Z(V[C],V.status),children:[a," ",j]})},vs="_itemImage_1rili_1",ws="_itemStatus_1rili_10",Ss="_grid_1rili_14",Ps="_loading_1rili_21",Ds="_row_1rili_26",Es="_column_1rili_31",Ms="_avatarColumn_1rili_35",Ts="_nameWrapper_1rili_40",$s="_name_1rili_40",Bs="_itemActions_1rili_53",Ls="_action_1rili_60",As="_overlay_1rili_65",N={itemImage:vs,itemStatus:ws,grid:Ss,loading:Ps,row:Ds,column:Es,avatarColumn:Ms,nameWrapper:Ts,name:$s,itemActions:Bs,action:Ls,overlay:As};function Gs({item:t,status:n,selected:r,loading:i,collection:m,onSaveItem:a,onSelect:j,onOpenModal:C,onDelete:b}){const S=Q(),I=l.useMemo(()=>tt(t),[t]),_=l.useMemo(()=>m.linkedContractAddress&&m.linkedContractNetwork?{address:m.linkedContractAddress,network:m.linkedContractNetwork}:null,[m]),[d,f]=l.useState(I),y=l.useMemo(()=>{if(d&&_){const v=ge(d,_);return st(v)?void 0:"Invalid mapping"}},[d,_]);l.useEffect(()=>{!_||y||(!I&&d||I&&d&&!nt(I,d))&&h(d,_)},[I,y,d,_]);const h=l.useCallback(at((v,T)=>{const A=ge(v,T);a({...t,mappings:A})},1e3),[a]),D=l.useCallback((v,T)=>{i||j(t,T.checked)},[t,i,j]),P=l.useCallback(()=>{C("SeeInWorldModal",{itemIds:[t.id]})},[t,C]),L=l.useCallback(()=>{t.isPublished||C("EditItemURNModal",{item:t})},[t,C]),R=l.useCallback(()=>{S.push(B.itemEditor({itemId:t.id,collectionId:t.collectionId}),{fromParam:te.TP_COLLECTIONS})},[t,S]),c=l.useCallback(()=>{b(t)},[b,t]);return e.jsxs(s.Grid,{className:Z(N.grid,i&&N.loading),columns:"equal",children:[i&&e.jsx("div",{className:N.overlay,children:e.jsx(s.Loader,{size:"large",active:!0})}),e.jsxs(s.Grid.Row,{className:N.row,children:[e.jsxs(s.Grid.Column,{className:`${N.column} ${N.avatarColumn}`,width:4,children:[e.jsx(s.Checkbox,{checked:r,disabled:t.isPublished||i,onClick:D}),e.jsx(fe,{className:N.itemImage,item:t,hasBadge:!0,badgeSize:"small"}),e.jsx("div",{className:N.nameWrapper,children:e.jsx("div",{className:N.name,title:t.name,children:t.name})})]}),e.jsx(s.Grid.Column,{children:_&&e.jsx(it,{disabled:i,mapping:d,error:y,onChange:f,isCompact:!0})}),e.jsx(s.Grid.Column,{width:3,className:Z(N.column,N.statusColumn),children:e.jsx(bs,{status:n,item:t})}),e.jsx(s.Grid.Column,{width:1,className:N.column,children:e.jsx("div",{className:N.itemActions,children:e.jsx(s.Dropdown,{trigger:e.jsx(s.Button,{basic:!0,children:e.jsx(s.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:N.action,disabled:i,onClick:ye(),children:e.jsxs(s.Dropdown.Menu,{children:[e.jsx(s.Dropdown.Item,{text:o("collection_item.see_details"),as:be,to:B.itemDetail(t.id)}),e.jsx(s.Dropdown.Item,{text:o("collection_context_menu.see_in_decentraland"),onClick:P}),e.jsx(s.Dropdown.Item,{text:o("global.open_in_editor"),onClick:R}),e.jsx(s.Popup,{content:o("collection_item.cannot_edit_urn"),position:"right center",disabled:!t.isPublished,trigger:e.jsx(s.Dropdown.Item,{text:o("collection_item.edit_urn"),onClick:L,disabled:t.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}),!t.isPublished&&e.jsx(se,{name:t.name,onDelete:c,trigger:e.jsx(s.Dropdown.Item,{text:o("global.delete")})})]})})})})]})]})}const Rs=(t,n)=>{const r=ve(t);return{loading:!!ot(t)[n.item.id],status:r[n.item.id]}},Us=t=>({onDelete:n=>t(we(n)),onSaveItem:n=>t(lt(n,{},{onlySaveItem:!0})),onOpenModal:(n,r)=>t(M(n,r))}),Ws=F(Rs,Us)(Gs),G=50,Os="_itemCheckbox_2k9qa_1",Hs="_gridHeader_2k9qa_5",Fs="_itemColumn_2k9qa_15",ee={itemCheckbox:Os,gridHeader:Hs,itemColumn:Fs},zs=({areAllSelected:t,onSelectedAllClick:n})=>e.jsx(s.Grid,{columns:"equal",className:ee.gridHeader,children:e.jsxs(s.Grid.Row,{children:[e.jsxs(s.Grid.Column,{width:5,className:ee.itemColumn,children:[e.jsx(s.Checkbox,{className:ee.itemCheckbox,checked:t,onClick:n})," ",o("global.item")]}),e.jsx(s.Grid.Column,{children:o("global.category")}),e.jsx(s.Grid.Column,{children:o("global.body_shape")}),e.jsx(s.Grid.Column,{children:"URN ID"}),e.jsxs(s.Grid.Column,{width:3,children:[" ",o("collection_row.status")," "]}),e.jsx(s.Grid.Column,{width:1})]})}),qs="_gridHeader_4acv6_1",Vs="_itemColumn_4acv6_11",Ys="_itemCheckbox_4acv6_16",Zs="_linkedToColumn_4acv6_20",Y={gridHeader:qs,itemColumn:Vs,itemCheckbox:Ys,linkedToColumn:Zs},Qs=({areAllSelected:t,onSelectedAllClick:n})=>e.jsx(s.Grid,{columns:"equal",className:Y.gridHeader,children:e.jsxs(s.Grid.Row,{children:[e.jsxs(s.Grid.Column,{width:4,className:Y.itemColumn,children:[e.jsx(s.Checkbox,{className:Y.itemCheckbox,checked:t,onClick:n})," ",o("global.item")]}),e.jsxs(s.Grid.Column,{className:Y.linkedToColumn,children:[e.jsx("span",{children:o("third_party_collection_detail_page.linked_to")}),e.jsx(rt,{})]}),e.jsxs(s.Grid.Column,{width:3,children:[" ",o("collection_row.status")," "]}),e.jsx(s.Grid.Column,{width:1})]})}),Js="_main_16i8r_3",Ks="_slots_16i8r_11",Xs="_empty_16i8r_28",en="_searchContainer_16i8r_32",tn="_searchInfo_16i8r_42",sn="_syncedStatusList_16i8r_46",nn="_selectionInfo_16i8r_53",an="_header_16i8r_63",on="_content_16i8r_74",ln="_title_16i8r_83",rn="_editCollectionName_16i8r_96",cn="_name_16i8r_101",dn="_nameAndType_16i8r_105",mn="_nameWrapper_16i8r_115",_n="_size_16i8r_139",un="_actions_16i8r_143",gn="_body_16i8r_151",hn="_info_16i8r_162",pn="_infoHeader_16i8r_170",Cn="_infoContent_16i8r_178",xn="_slotsIcon_16i8r_195",jn="_copyButton_16i8r_207",In="_sparkles_16i8r_232",kn="_start_16i8r_241",Nn="_migrationBanner_16i8r_254",fn="_type_16i8r_277",yn="_linkedWearableBadge_16i8r_283",bn="_typeBadge_16i8r_288",vn="_programmaticBadge_16i8r_292",wn="_standardBadge_16i8r_296",Sn="_loader_16i8r_302",u={main:Js,slots:Ks,empty:Xs,searchContainer:en,searchInfo:tn,syncedStatusList:sn,selectionInfo:nn,header:an,content:on,title:ln,editCollectionName:rn,name:cn,nameAndType:dn,nameWrapper:mn,size:_n,actions:un,body:gn,info:hn,infoHeader:pn,infoContent:Cn,slotsIcon:xn,copyButton:jn,sparkles:In,start:kn,migrationBanner:Nn,type:fn,linkedWearableBadge:yn,typeBadge:bn,programmaticBadge:vn,standardBadge:wn,loader:Sn},je=({children:t,title:n,info:r})=>e.jsxs("div",{className:u.info,children:[e.jsxs("div",{className:u.infoHeader,children:[n," ",r&&e.jsx(s.InfoTooltip,{content:r})]}),e.jsx("div",{className:u.infoContent,children:t})]});function Pn({currentPage:t,lastLocation:n,wallet:r,thirdParty:i,items:m,collection:a,totalItems:j,isLoading:C,isThirdPartyV2Enabled:b,isLinkedWearablesPaymentsEnabled:S,onFetchAvailableSlots:I,onFetchThirdParty:_,onNewItem:d,onEditName:f,isLoadingAvailableSlots:y}){const[h,D]=l.useState({}),[P,L]=l.useState(t),[R,c]=l.useState(!1),[v,T]=l.useState(!1),[A,ne]=l.useState("ALL"),U=Q(),ae=n===B.collections();l.useEffect(()=>{i&&i.availableSlots===void 0&&!y&&I(i.id)},[i,y,I]),l.useEffect(()=>{!C&&!i&&(a!=null&&a.urn)&&_(Se(a.urn))},[a==null?void 0:a.urn,C,i]),l.useEffect(()=>{if(t!==P&&L(t),v){const g=m.reduce((p,k)=>(p[k.id]=!0,p),{});D(g),c(!1)}},[P,v,m,i,t]);const Pe=l.useCallback(()=>{a!=null&&a.id&&d(a.id)},[a==null?void 0:a.id,d]),De=l.useCallback(()=>{a&&f(a)},[a,f]),Ee=l.useCallback(()=>{ae?U.goBack():U.push(B.collections(ct.THIRD_PARTY))},[U,ae]),Me=l.useCallback((g,p)=>{L(+p.activePage),U.push(B.thirdPartyCollectionDetail(a.id,{page:+p.activePage}))},[a,U]),J=l.useCallback((g,p)=>{D({...h,[g.id]:p}),T(!1),c(!1)},[h]),W=l.useCallback(g=>g.every(p=>h[p.id]),[h]),ie=l.useCallback((g,p)=>{const k={...h},O=!W(g);for(const H of g)k[H.id]=O;D(k),c(!0),T(v&&!!p.checked)},[h,v,W]),oe=l.useCallback(()=>{D({})},[]),le=l.useMemo(()=>a&&i&&r&&dt(r.address,i),[a,i,r]),Te=l.useCallback(g=>{if(T(!0),a){const p=Math.ceil(j/G);g(a.id,{page:mt(p),limit:G,overridePaginationData:!1})}},[j]),re=l.useCallback((g,{value:p})=>{ne(p)},[ne]),$e=[{value:"ALL",text:o("third_party_collection_detail_page.synced_filter.all")},{value:"SYNCED",text:o("item_status.synced")},{value:"UNSYNCED",text:o("item_status.unsynced")},...a!=null&&a.isMappingComplete?[]:[{value:"MIGRATION_REQUIRED",text:o("item_status.pending_migration")},{value:"MAPPING_PENDING",text:o("item_status.pending_mapping")}]],Be=l.useMemo(()=>{switch(A){case"SYNCED":return{synced:!0};case"UNSYNCED":return{synced:!1};case"MIGRATION_REQUIRED":return{mappingStatus:he.UNPUBLISHED_MAPPING};case"MAPPING_PENDING":return{mappingStatus:he.MISSING_MAPPING};default:return{}}},[A]),Le=l.useCallback((g,p,k,O,H)=>{const ce=p.filter(E=>h[E.id]),de=ce.length,me=!!(a!=null&&a.linkedContractAddress&&(a!=null&&a.linkedContractNetwork)),z=j,K=Math.ceil(z/G),_e=(a==null?void 0:a.itemCount)===0;return a?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:u.header,children:[e.jsx($t,{absolute:!0,onClick:Ee}),e.jsxs("div",{className:u.content,children:[e.jsxs("div",{className:u.title,children:[e.jsx(Ht,{collectionId:a.id}),e.jsxs("div",{className:u.nameAndType,children:[e.jsxs("div",{className:u.nameWrapper,children:[e.jsx(s.Header,{size:"large",className:u.name,onClick:De,children:a.name}),!a.isPublished&&e.jsx(_t,{name:"edit",className:u.editCollectionName})]}),e.jsxs("div",{className:u.type,children:[e.jsx(Bt,{isThirdParty:!0}),e.jsx(Lt,{isProgrammatic:g.isProgrammatic})]})]})]}),e.jsxs("div",{className:u.actions,children:[a.linkedContractAddress&&a.linkedContractNetwork&&e.jsxs(je,{title:o("third_party_collection_detail_page.smart_contract_address_short"),info:o("third_party_collection_detail_page.smart_contract_address_long"),children:[ut(a.linkedContractAddress)," ",e.jsx(gt,{className:u.copyButton,showPopup:!0,text:a.linkedContractAddress,role:"button",children:e.jsx(s.Icon,{name:"copy outline"})})]}),!S&&e.jsxs(je,{title:o("third_party_collection_detail_page.slots_short"),info:o("third_party_collection_detail_page.slots_long"),children:[e.jsx("div",{className:u.slotsIcon}),y?e.jsx(s.Loader,{active:!0,inline:!0,size:"tiny"}):e.jsxs("span",{children:[g.availableSlots??0," / ",g.maxItems]})]}),e.jsxs(s.Button,{inverted:!0,onClick:Pe,children:[e.jsx(s.Icon,{name:"plus"}),o("third_party_collection_detail_page.new_items")]}),g.availableSlots!==void 0?e.jsx(Jt,{collection:a,items:ce,slots:g.availableSlots}):null,e.jsx(Yt,{collection:a,items:k})]})]})]}),!a.isMappingComplete&&e.jsxs("div",{className:u.migrationBanner,children:[e.jsx(s.Icon,{name:"sync"})," ",o("third_party_collection_detail_page.migration_banner")]}),e.jsx("div",{className:u.body,children:O?e.jsx("div",{className:u.loader,children:e.jsx(s.Loader,{size:"massive",inline:!0,active:!0})}):e.jsxs(e.Fragment,{children:[(a.itemCount??0)>0&&e.jsxs("div",{className:u.searchContainer,children:[k.length>0&&e.jsx("div",{className:u.searchInfo,children:o("third_party_collection_detail_page.search_info",{page:(P-1)*G+1,pageTotal:Math.min(z,P*G),total:z})}),e.jsx(s.Dropdown,{className:u.syncedStatusList,direction:"left",value:A,options:$e,onChange:re})]}),k.length?e.jsxs(e.Fragment,{children:[de>0?e.jsxs("div",{className:u.selectionInfo,children:[o("third_party_collection_detail_page.selection",{count:de})," ",e.jsx("span",{className:"link",onClick:oe,children:o("third_party_collection_detail_page.clear_selection")}),". ",R&&K>1?e.jsx("span",{className:"link",onClick:()=>Te(H),children:o("third_party_collection_detail_page.select_all",{total:z})}):null," "]}):null,e.jsxs("div",{children:[b&&me?e.jsx(Qs,{areAllSelected:W(k),onSelectedAllClick:(E,X)=>ie(k,X)}):e.jsx(zs,{areAllSelected:W(k),onSelectedAllClick:(E,X)=>ie(k,X)}),k.map(E=>b&&me?e.jsx(Ws,{collection:a,item:E,selected:!!h[E.id],onSelect:J},E.id):e.jsx(gs,{collection:a,item:E,selected:!!h[E.id],onSelect:J},E.id)),K>1?e.jsx(s.Pagination,{firstItem:null,lastItem:null,totalPages:K,activePage:P,onPageChange:Me}):null]})]}):e.jsxs("div",{className:u.empty,children:[e.jsx("div",{className:_e?u.start:u.sparkles}),_e?e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:o("third_party_collection_detail_page.start_adding_items")}),e.jsx("p",{children:o("third_party_collection_detail_page.cant_remove")})]}):e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:o("third_party_collection_detail_page.not_found")}),e.jsx("p",{children:o("third_party_collection_detail_page.try_again")})]})]})]})})]}):(console.error("No collection defined"),null)},[a,h,y,S,b,j,P,J,W,re,oe,A]),Ae=le&&a;return e.jsx(Mt,{id:a==null?void 0:a.id,itemsPage:P,itemsPageSize:G,fetchCollectionItemsOptions:Be,children:({isLoadingCollection:g,isLoadingCollectionItems:p,items:k,paginatedItems:O,onFetchCollectionItemsPages:H})=>e.jsx(Et,{className:u.main,hasNavigation:!le&&!C&&!g,isLoading:C||g,children:Ae&&i?Le(i,k,O,p,H):e.jsx(Tt,{})})})}const Dn=()=>{const t=ht(),n=St()||"",r=Pt(),i=w(c=>Ie(c,n)),m=l.useMemo(()=>i?pe(i):!1,[i]),a=w(c=>{var v;return((v=Ce(c,n))==null?void 0:v.total)||null}),j=w(c=>i?pt(c,i.id):[]),C=w(c=>i&&Ce(c,i.id)||null),b=w(Ct),S=w(xt),I=w(Ne),_=w(c=>i&&pe(i)?jt(c,i):null),d=w(c=>It(c)),f=w(c=>ke(kt(c),wt)||Nt(c)||!!(m&&i&&ft(c,Se(i.urn)))),y=w(c=>yt(c)),h=w(c=>Dt(c)),D=l.useCallback(c=>t(M("CreateItemsModal",{collectionId:c})),[t]),P=l.useCallback(c=>t(M("EditCollectionNameModal",{collection:c})),[t]),L=l.useCallback(c=>t(bt(c)),[t]),R=l.useCallback(c=>t(vt(c)),[t]);return e.jsx(Pn,{items:j,totalItems:a,currentPage:r,paginatedData:C,wallet:b,collection:i,isThirdPartyV2Enabled:S,isLinkedWearablesPaymentsEnabled:I,thirdParty:_,authorizations:d,isLoading:f,isLoadingAvailableSlots:y,lastLocation:h,onNewItem:D,onEditName:P,onFetchAvailableSlots:L,onFetchThirdParty:R})},Hn=Dn;export{Hn as default};
|
|
1
|
+
import{N as e,g9 as Ge,ga as Re,a7 as Z,dM as Ue,S as s,T as F,fl as Ie,a4 as Q,f7 as We,M as o,fU as Oe,e$ as te,gb as He,cO as Fe,a2 as M,eD as ze,gc as qe,g2 as Ve,bq as ke,g4 as Ye,g5 as Ze,eO as Ne,gd as Qe,J as l,R as B,ge as Je,gf as Ke,eY as $,dN as fe,ez as Xe,gg as et,bp as ye,Q as be,fm as ve,ey as we,eB as ue,gh as tt,gi as ge,gj as st,gk as nt,gl as at,gm as it,gn as ot,fp as lt,go as rt,gp as Se,eE as ct,gq as dt,gr as mt,gs as he,P as _t,cM as ut,cN as gt,aa as ht,ab as w,eZ as pe,eJ as Ce,fB as pt,ej as Ct,gt as xt,gu as jt,gv as It,eM as kt,gw as Nt,gx as ft,gy as yt,gz as bt,gA as vt,f$ as wt}from"./index-DDLQh72H.js";import{e as St,f as Pt}from"./hooks-BR9ATp8C.js";import{g as Dt}from"./selector-CtnQnmhq.js";import{L as Et}from"./LoggedInDetailPage.container-C9GSQhch.js";import{C as Mt}from"./CollectionProvider.container-3333NUxE.js";import{N as Tt}from"./NotFound-BxsG7cuR.js";import{B as $t}from"./Back-CDOxIrnn.js";import{C as Bt,T as Lt}from"./ThirdPartyKindBadge-BA3-jy7a.js";import{C as se}from"./ConfirmDelete-Bi0mUMu0.js";import"./Navigation.container-DdDz8aQR.js";import"./selectors-BFWzed6x.js";import"./SignInRequired-DmF9Qp0Q.js";const At=t=>e.jsx("img",{"data-testid":Ge,src:Re[t.network],alt:t.network,className:t.className}),Gt="_image_142g7_1",Rt="_main_142g7_2",Ut="_network_142g7_13",q={image:Gt,main:Rt,network:Ut},Wt=t=>{const{collection:n,collectionId:r,className:i,shape:m}=t;return e.jsxs("div",{className:Z(q.main,i),children:[n!=null&&n.itemCount?e.jsx(Ue,{collectionId:r,className:q.image}):e.jsx(s.Blockie,{className:q.image,seed:r,size:8,scale:8,shape:m??"circle"}),n!=null&&n.linkedContractNetwork?e.jsx(At,{network:n==null?void 0:n.linkedContractNetwork,className:q.network}):null]})},Ot=(t,n)=>({collection:Ie(t,n.collectionId)}),Ht=F(Ot)(Wt),Ft="_ellipsis_4huv2_1",xe={ellipsis:Ft},zt=t=>{const{collection:n}=t,r=Q(),i=()=>{n.isPublished&&n.forumLink&&S(n.forumLink,"_blank")},m=()=>{const{items:_,onOpenModal:d}=t;d("SeeInWorldModal",{itemIds:_.map(f=>f.id)})},a=()=>{const{collection:_,items:d}=t;r.push(Oe(_,d),{fromParam:te.TP_COLLECTIONS})},j=()=>{const{collection:_,onDelete:d}=t;d(_)},C=()=>{const{collection:_,onOpenModal:d}=t;_.isPublished||d("EditCollectionURNModal",{collection:_})},b=()=>{const{collection:_,onOpenModal:d}=t;d("CreateAndEditMultipleItemsModal",{collectionId:_.id,type:He.EDIT})},S=(_,d="")=>{const f=window.open(_,d);f&&f.focus()},I=!We(n)&&!n.isPublished;return e.jsx(s.Dropdown,{className:xe.dropdown,trigger:e.jsx(s.Button,{basic:!0,children:e.jsx(s.Icon,{className:xe.ellipsis,size:"large",name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(s.Dropdown.Menu,{children:[e.jsx(s.Dropdown.Item,{text:o("collection_context_menu.see_in_decentraland"),onClick:m}),e.jsx(s.Dropdown.Item,{text:o("global.open_in_editor"),onClick:a}),e.jsx(s.Popup,{content:o("collection_context_menu.delete_published_collection"),position:"right center",disabled:I,trigger:I?e.jsx(se,{name:n.name,onDelete:j,trigger:e.jsx(s.Dropdown.Item,{text:o("global.delete")})}):e.jsx(s.Dropdown.Item,{text:o("global.delete"),disabled:!0}),hideOnScroll:!0,on:"hover",inverted:!0}),e.jsx(s.Popup,{content:o("collection_context_menu.change_published_urn"),position:"right center",disabled:!n.isPublished,trigger:e.jsx(s.Dropdown.Item,{text:o("collection_context_menu.edit_urn"),onClick:C,disabled:n.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0}),e.jsx(s.Dropdown.Item,{text:o("collection_context_menu.edit_in_bulk"),onClick:b}),e.jsx(s.Popup,{content:o("collection_context_menu.unpublished"),position:"right center",disabled:n.isPublished||!!n.forumLink,trigger:e.jsx(s.Dropdown.Item,{disabled:!n.isPublished||!n.forumLink,text:o("collection_context_menu.forum_post"),onClick:i}),hideOnScroll:!0,on:"hover",inverted:!0})]})})},qt=t=>({name:Fe(t)||""}),Vt=t=>({onOpenModal:(n,r)=>t(M(n,r)),onDelete:n=>t(ze(n))}),Yt=F(qt,Vt)(zt),Zt=(t,n)=>{const{collection:r,items:i}=n;return{itemCurations:Ve(t,r.id),isLoadingItemCurations:ke(Ze(t),Ye),isLinkedWearablesPaymentsEnabled:Ne(t),itemsStatus:Qe(t,i.map(m=>m.id))}},Qt=t=>({onNewClick:(n,r,i)=>t(M("PublishWizardCollectionModal",{collectionId:n,itemsWithChanges:r,itemsToPublish:i})),onPushChangesClick:(n,r)=>t(M("PushChangesModal",{collectionId:n,itemsWithChanges:r})),onClick:(n,r,i)=>t(M("PublishThirdPartyCollectionModal",{collectionId:n,itemIds:r,action:i}))}),Jt=F(Zt,Qt)(qe),Kt="_itemImage_1y9df_1",Xt="_itemStatus_1y9df_10",es="_grid_1y9df_14",ts="_row_1y9df_25",ss="_column_1y9df_30",ns="_statusColumn_1y9df_34",as="_synced_1y9df_39",is="_unsynced_1y9df_43",os="_avatarColumn_1y9df_47",ls="_nameWrapper_1y9df_52",rs="_name_1y9df_52",cs="_itemActions_1y9df_65",ds="_action_1y9df_72",x={itemImage:Kt,itemStatus:Xt,grid:es,row:ts,column:ss,statusColumn:ns,synced:as,unsynced:is,avatarColumn:os,nameWrapper:ls,name:rs,itemActions:cs,action:ds};function ms({item:t,status:n,selected:r,onSelect:i,onOpenModal:m,onDelete:a}){const j=Q(),C=l.useCallback((h,D)=>{i(t,D.checked)},[t,i]),b=l.useCallback(()=>{m("SeeInWorldModal",{itemIds:[t.id]})},[t,m]),S=l.useCallback(()=>{t.isPublished||m("EditItemURNModal",{item:t})},[t,m]),I=l.useCallback(()=>{j.push(B.itemEditor({itemId:t.id,collectionId:t.collectionId}),{fromParam:te.TP_COLLECTIONS})},[t,j]),_=l.useCallback(()=>{a(t)},[a,t]),d=l.useMemo(()=>{if(!t.urn)return"";try{const h=Je(t.urn);return Ke(h)?h.thirdPartyTokenId??"":""}catch{return""}},[t]),f=l.useMemo(()=>{switch(n){case $.UNDER_REVIEW:return e.jsx(s.Icon,{name:"clock outline"});case $.SYNCED:return e.jsx(s.Icon,{name:"check circle outline"});case $.UNSYNCED:return e.jsx(s.Icon,{name:"exclamation circle"});default:return null}},[n]),y=t.data;return e.jsx(s.Grid,{className:`CollectionItem ${x.grid}`,columns:"equal",children:e.jsxs(s.Grid.Row,{className:x.row,children:[e.jsxs(s.Grid.Column,{className:`${x.column} ${x.avatarColumn}`,width:5,children:[e.jsx(s.Checkbox,{checked:r,disabled:t.isPublished,onClick:C}),e.jsx(fe,{className:x.itemImage,item:t,hasBadge:!0,badgeSize:"small"}),e.jsx("div",{className:x.nameWrapper,children:e.jsxs("div",{className:x.name,title:t.name,children:[e.jsx(Xe,{className:x.itemStatus,item:t}),t.name]})})]}),e.jsx(s.Grid.Column,{className:x.column,children:y.category?e.jsx("div",{children:o(`wearable.category.${y.category}`)}):null}),e.jsx(s.Grid.Column,{className:x.column,children:e.jsx("div",{children:o(`body_shapes.${et(t)}`)})}),e.jsx(s.Grid.Column,{className:x.column,children:e.jsx("div",{children:d})}),e.jsxs(s.Grid.Column,{width:3,className:`${x.column} ${x.statusColumn} ${x[n]}`,children:[f,e.jsx("div",{children:o(`third_party_collection_detail_page.synced_statuses.${n}`)})]}),e.jsx(s.Grid.Column,{width:1,className:x.column,children:e.jsx("div",{className:x.itemActions,children:e.jsx(s.Dropdown,{trigger:e.jsx(s.Button,{basic:!0,children:e.jsx(s.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:x.action,onClick:ye(),children:e.jsxs(s.Dropdown.Menu,{children:[e.jsx(s.Dropdown.Item,{text:o("collection_item.see_details"),as:be,to:B.itemDetail(t.id)}),e.jsx(s.Dropdown.Item,{text:o("collection_context_menu.see_in_decentraland"),onClick:b}),e.jsx(s.Dropdown.Item,{text:o("global.open_in_editor"),onClick:I}),e.jsx(s.Popup,{content:o("collection_item.cannot_edit_urn"),position:"right center",disabled:!t.isPublished,trigger:e.jsx(s.Dropdown.Item,{text:o("collection_item.edit_urn"),onClick:S,disabled:t.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}),!t.isPublished&&e.jsx(se,{name:t.name,onDelete:_,trigger:e.jsx(s.Dropdown.Item,{text:o("global.delete")})})]})})})})]})})}const _s=(t,n)=>({status:ve(t)[n.item.id]}),us=t=>({onDelete:n=>t(we(n)),onOpenModal:(n,r)=>t(M(n,r))}),gs=F(_s,us)(ms),hs="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%20clip-path='url(%23clip0_8524_427)'%3e%3cpath%20d='M20.5%203L20.34%203.03L15%205.1L9%203L3.36%204.9C3.15%204.97%203%205.15%203%205.38V20.5C3%2020.78%203.22%2021%203.5%2021L3.66%2020.97L9%2018.9L15%2021L20.64%2019.1C20.85%2019.03%2021%2018.85%2021%2018.62V3.5C21%203.22%2020.78%203%2020.5%203ZM15%2019L9%2016.89V5L15%207.11V19Z'%20fill='%23A09BA8'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_8524_427'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ps="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.669%200H1.33362C0.593463%200%200%200.600131%200%201.33362V10.669C0%2011.4025%200.593463%2012.0026%201.33362%2012.0026H10.669C11.4025%2012.0026%2012.0026%2011.4025%2012.0026%2010.669V1.33362C12.0026%200.600131%2011.4092%200%2010.669%200ZM10.669%2010.669H1.33362V2.66725H10.669V10.669ZM7.00152%206.66812C7.00152%207.22157%206.55476%207.66834%206.00131%207.66834C5.44785%207.66834%205.00109%207.22157%205.00109%206.66812C5.00109%206.11466%205.44785%205.6679%206.00131%205.6679C6.55476%205.6679%207.00152%206.11466%207.00152%206.66812ZM6.00131%204.00087C4.18091%204.00087%202.62724%205.10778%202.00044%206.66812C2.62724%208.22846%204.18091%209.33537%206.00131%209.33537C7.8217%209.33537%209.37537%208.22846%2010.0022%206.66812C9.37537%205.10778%207.8217%204.00087%206.00131%204.00087ZM6.00131%208.33515C5.08111%208.33515%204.33428%207.58832%204.33428%206.66812C4.33428%205.74792%205.08111%205.00109%206.00131%205.00109C6.92151%205.00109%207.66834%205.74792%207.66834%206.66812C7.66834%207.58832%206.92151%208.33515%206.00131%208.33515Z'%20fill='%23ECEBED'/%3e%3c/svg%3e",Cs="_status_rgxu1_1",xs="_pending_migration_rgxu1_14",js="_synced_rgxu1_19",Is="_unpublished_rgxu1_24",ks="_unsynced_rgxu1_25",Ns="_pending_mapping_rgxu1_30",fs="_under_review_rgxu1_31",ys="_icon_rgxu1_10",V={status:Cs,pending_migration:xs,synced:js,unpublished:Is,unsynced:ks,pending_mapping:Ns,under_review:fs,icon:ys},bs=t=>{const{status:n,item:r}=t,i=!r.mappings&&ue(r.urn),m=!r.isMappingComplete&&ue(r.urn),a=l.useMemo(()=>{if(i)return e.jsx("img",{src:hs,className:V.icon});if(m)return e.jsx(s.Icon,{name:"warning circle"});switch(n){case $.UNDER_REVIEW:return e.jsx("img",{src:ps,className:V.icon});case $.SYNCED:return e.jsx(s.Icon,{name:"check circle"});case $.UNSYNCED:case $.UNPUBLISHED:return e.jsx(s.Icon,{name:"cloud upload"})}},[n,i,m]),j=l.useMemo(()=>i?o("item_status.pending_mapping"):m?o("item_status.pending_migration"):o(`item_status.${n}`),[n,i,m]),C=l.useMemo(()=>i?"pending_mapping":m?"pending_migration":n,[n,i,m]);return e.jsxs("div",{className:Z(V[C],V.status),children:[a," ",j]})},vs="_itemImage_1rili_1",ws="_itemStatus_1rili_10",Ss="_grid_1rili_14",Ps="_loading_1rili_21",Ds="_row_1rili_26",Es="_column_1rili_31",Ms="_avatarColumn_1rili_35",Ts="_nameWrapper_1rili_40",$s="_name_1rili_40",Bs="_itemActions_1rili_53",Ls="_action_1rili_60",As="_overlay_1rili_65",N={itemImage:vs,itemStatus:ws,grid:Ss,loading:Ps,row:Ds,column:Es,avatarColumn:Ms,nameWrapper:Ts,name:$s,itemActions:Bs,action:Ls,overlay:As};function Gs({item:t,status:n,selected:r,loading:i,collection:m,onSaveItem:a,onSelect:j,onOpenModal:C,onDelete:b}){const S=Q(),I=l.useMemo(()=>tt(t),[t]),_=l.useMemo(()=>m.linkedContractAddress&&m.linkedContractNetwork?{address:m.linkedContractAddress,network:m.linkedContractNetwork}:null,[m]),[d,f]=l.useState(I),y=l.useMemo(()=>{if(d&&_){const v=ge(d,_);return st(v)?void 0:"Invalid mapping"}},[d,_]);l.useEffect(()=>{!_||y||(!I&&d||I&&d&&!nt(I,d))&&h(d,_)},[I,y,d,_]);const h=l.useCallback(at((v,T)=>{const A=ge(v,T);a({...t,mappings:A})},1e3),[a]),D=l.useCallback((v,T)=>{i||j(t,T.checked)},[t,i,j]),P=l.useCallback(()=>{C("SeeInWorldModal",{itemIds:[t.id]})},[t,C]),L=l.useCallback(()=>{t.isPublished||C("EditItemURNModal",{item:t})},[t,C]),R=l.useCallback(()=>{S.push(B.itemEditor({itemId:t.id,collectionId:t.collectionId}),{fromParam:te.TP_COLLECTIONS})},[t,S]),c=l.useCallback(()=>{b(t)},[b,t]);return e.jsxs(s.Grid,{className:Z(N.grid,i&&N.loading),columns:"equal",children:[i&&e.jsx("div",{className:N.overlay,children:e.jsx(s.Loader,{size:"large",active:!0})}),e.jsxs(s.Grid.Row,{className:N.row,children:[e.jsxs(s.Grid.Column,{className:`${N.column} ${N.avatarColumn}`,width:4,children:[e.jsx(s.Checkbox,{checked:r,disabled:t.isPublished||i,onClick:D}),e.jsx(fe,{className:N.itemImage,item:t,hasBadge:!0,badgeSize:"small"}),e.jsx("div",{className:N.nameWrapper,children:e.jsx("div",{className:N.name,title:t.name,children:t.name})})]}),e.jsx(s.Grid.Column,{children:_&&e.jsx(it,{disabled:i,mapping:d,error:y,onChange:f,isCompact:!0})}),e.jsx(s.Grid.Column,{width:3,className:Z(N.column,N.statusColumn),children:e.jsx(bs,{status:n,item:t})}),e.jsx(s.Grid.Column,{width:1,className:N.column,children:e.jsx("div",{className:N.itemActions,children:e.jsx(s.Dropdown,{trigger:e.jsx(s.Button,{basic:!0,children:e.jsx(s.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:N.action,disabled:i,onClick:ye(),children:e.jsxs(s.Dropdown.Menu,{children:[e.jsx(s.Dropdown.Item,{text:o("collection_item.see_details"),as:be,to:B.itemDetail(t.id)}),e.jsx(s.Dropdown.Item,{text:o("collection_context_menu.see_in_decentraland"),onClick:P}),e.jsx(s.Dropdown.Item,{text:o("global.open_in_editor"),onClick:R}),e.jsx(s.Popup,{content:o("collection_item.cannot_edit_urn"),position:"right center",disabled:!t.isPublished,trigger:e.jsx(s.Dropdown.Item,{text:o("collection_item.edit_urn"),onClick:L,disabled:t.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}),!t.isPublished&&e.jsx(se,{name:t.name,onDelete:c,trigger:e.jsx(s.Dropdown.Item,{text:o("global.delete")})})]})})})})]})]})}const Rs=(t,n)=>{const r=ve(t);return{loading:!!ot(t)[n.item.id],status:r[n.item.id]}},Us=t=>({onDelete:n=>t(we(n)),onSaveItem:n=>t(lt(n,{},{onlySaveItem:!0})),onOpenModal:(n,r)=>t(M(n,r))}),Ws=F(Rs,Us)(Gs),G=50,Os="_itemCheckbox_2k9qa_1",Hs="_gridHeader_2k9qa_5",Fs="_itemColumn_2k9qa_15",ee={itemCheckbox:Os,gridHeader:Hs,itemColumn:Fs},zs=({areAllSelected:t,onSelectedAllClick:n})=>e.jsx(s.Grid,{columns:"equal",className:ee.gridHeader,children:e.jsxs(s.Grid.Row,{children:[e.jsxs(s.Grid.Column,{width:5,className:ee.itemColumn,children:[e.jsx(s.Checkbox,{className:ee.itemCheckbox,checked:t,onClick:n})," ",o("global.item")]}),e.jsx(s.Grid.Column,{children:o("global.category")}),e.jsx(s.Grid.Column,{children:o("global.body_shape")}),e.jsx(s.Grid.Column,{children:"URN ID"}),e.jsxs(s.Grid.Column,{width:3,children:[" ",o("collection_row.status")," "]}),e.jsx(s.Grid.Column,{width:1})]})}),qs="_gridHeader_4acv6_1",Vs="_itemColumn_4acv6_11",Ys="_itemCheckbox_4acv6_16",Zs="_linkedToColumn_4acv6_20",Y={gridHeader:qs,itemColumn:Vs,itemCheckbox:Ys,linkedToColumn:Zs},Qs=({areAllSelected:t,onSelectedAllClick:n})=>e.jsx(s.Grid,{columns:"equal",className:Y.gridHeader,children:e.jsxs(s.Grid.Row,{children:[e.jsxs(s.Grid.Column,{width:4,className:Y.itemColumn,children:[e.jsx(s.Checkbox,{className:Y.itemCheckbox,checked:t,onClick:n})," ",o("global.item")]}),e.jsxs(s.Grid.Column,{className:Y.linkedToColumn,children:[e.jsx("span",{children:o("third_party_collection_detail_page.linked_to")}),e.jsx(rt,{})]}),e.jsxs(s.Grid.Column,{width:3,children:[" ",o("collection_row.status")," "]}),e.jsx(s.Grid.Column,{width:1})]})}),Js="_main_16i8r_3",Ks="_slots_16i8r_11",Xs="_empty_16i8r_28",en="_searchContainer_16i8r_32",tn="_searchInfo_16i8r_42",sn="_syncedStatusList_16i8r_46",nn="_selectionInfo_16i8r_53",an="_header_16i8r_63",on="_content_16i8r_74",ln="_title_16i8r_83",rn="_editCollectionName_16i8r_96",cn="_name_16i8r_101",dn="_nameAndType_16i8r_105",mn="_nameWrapper_16i8r_115",_n="_size_16i8r_139",un="_actions_16i8r_143",gn="_body_16i8r_151",hn="_info_16i8r_162",pn="_infoHeader_16i8r_170",Cn="_infoContent_16i8r_178",xn="_slotsIcon_16i8r_195",jn="_copyButton_16i8r_207",In="_sparkles_16i8r_232",kn="_start_16i8r_241",Nn="_migrationBanner_16i8r_254",fn="_type_16i8r_277",yn="_linkedWearableBadge_16i8r_283",bn="_typeBadge_16i8r_288",vn="_programmaticBadge_16i8r_292",wn="_standardBadge_16i8r_296",Sn="_loader_16i8r_302",u={main:Js,slots:Ks,empty:Xs,searchContainer:en,searchInfo:tn,syncedStatusList:sn,selectionInfo:nn,header:an,content:on,title:ln,editCollectionName:rn,name:cn,nameAndType:dn,nameWrapper:mn,size:_n,actions:un,body:gn,info:hn,infoHeader:pn,infoContent:Cn,slotsIcon:xn,copyButton:jn,sparkles:In,start:kn,migrationBanner:Nn,type:fn,linkedWearableBadge:yn,typeBadge:bn,programmaticBadge:vn,standardBadge:wn,loader:Sn},je=({children:t,title:n,info:r})=>e.jsxs("div",{className:u.info,children:[e.jsxs("div",{className:u.infoHeader,children:[n," ",r&&e.jsx(s.InfoTooltip,{content:r})]}),e.jsx("div",{className:u.infoContent,children:t})]});function Pn({currentPage:t,lastLocation:n,wallet:r,thirdParty:i,items:m,collection:a,totalItems:j,isLoading:C,isThirdPartyV2Enabled:b,isLinkedWearablesPaymentsEnabled:S,onFetchAvailableSlots:I,onFetchThirdParty:_,onNewItem:d,onEditName:f,isLoadingAvailableSlots:y}){const[h,D]=l.useState({}),[P,L]=l.useState(t),[R,c]=l.useState(!1),[v,T]=l.useState(!1),[A,ne]=l.useState("ALL"),U=Q(),ae=n===B.collections();l.useEffect(()=>{i&&i.availableSlots===void 0&&!y&&I(i.id)},[i,y,I]),l.useEffect(()=>{!C&&!i&&(a!=null&&a.urn)&&_(Se(a.urn))},[a==null?void 0:a.urn,C,i]),l.useEffect(()=>{if(t!==P&&L(t),v){const g=m.reduce((p,k)=>(p[k.id]=!0,p),{});D(g),c(!1)}},[P,v,m,i,t]);const Pe=l.useCallback(()=>{a!=null&&a.id&&d(a.id)},[a==null?void 0:a.id,d]),De=l.useCallback(()=>{a&&f(a)},[a,f]),Ee=l.useCallback(()=>{ae?U.goBack():U.push(B.collections(ct.THIRD_PARTY))},[U,ae]),Me=l.useCallback((g,p)=>{L(+p.activePage),U.push(B.thirdPartyCollectionDetail(a.id,{page:+p.activePage}))},[a,U]),J=l.useCallback((g,p)=>{D({...h,[g.id]:p}),T(!1),c(!1)},[h]),W=l.useCallback(g=>g.every(p=>h[p.id]),[h]),ie=l.useCallback((g,p)=>{const k={...h},O=!W(g);for(const H of g)k[H.id]=O;D(k),c(!0),T(v&&!!p.checked)},[h,v,W]),oe=l.useCallback(()=>{D({})},[]),le=l.useMemo(()=>a&&i&&r&&dt(r.address,i),[a,i,r]),Te=l.useCallback(g=>{if(T(!0),a){const p=Math.ceil(j/G);g(a.id,{page:mt(p),limit:G,overridePaginationData:!1})}},[j]),re=l.useCallback((g,{value:p})=>{ne(p)},[ne]),$e=[{value:"ALL",text:o("third_party_collection_detail_page.synced_filter.all")},{value:"SYNCED",text:o("item_status.synced")},{value:"UNSYNCED",text:o("item_status.unsynced")},...a!=null&&a.isMappingComplete?[]:[{value:"MIGRATION_REQUIRED",text:o("item_status.pending_migration")},{value:"MAPPING_PENDING",text:o("item_status.pending_mapping")}]],Be=l.useMemo(()=>{switch(A){case"SYNCED":return{synced:!0};case"UNSYNCED":return{synced:!1};case"MIGRATION_REQUIRED":return{mappingStatus:he.UNPUBLISHED_MAPPING};case"MAPPING_PENDING":return{mappingStatus:he.MISSING_MAPPING};default:return{}}},[A]),Le=l.useCallback((g,p,k,O,H)=>{const ce=p.filter(E=>h[E.id]),de=ce.length,me=!!(a!=null&&a.linkedContractAddress&&(a!=null&&a.linkedContractNetwork)),z=j,K=Math.ceil(z/G),_e=(a==null?void 0:a.itemCount)===0;return a?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:u.header,children:[e.jsx($t,{absolute:!0,onClick:Ee}),e.jsxs("div",{className:u.content,children:[e.jsxs("div",{className:u.title,children:[e.jsx(Ht,{collectionId:a.id}),e.jsxs("div",{className:u.nameAndType,children:[e.jsxs("div",{className:u.nameWrapper,children:[e.jsx(s.Header,{size:"large",className:u.name,onClick:De,children:a.name}),!a.isPublished&&e.jsx(_t,{name:"edit",className:u.editCollectionName})]}),e.jsxs("div",{className:u.type,children:[e.jsx(Bt,{isThirdParty:!0}),e.jsx(Lt,{isProgrammatic:g.isProgrammatic})]})]})]}),e.jsxs("div",{className:u.actions,children:[a.linkedContractAddress&&a.linkedContractNetwork&&e.jsxs(je,{title:o("third_party_collection_detail_page.smart_contract_address_short"),info:o("third_party_collection_detail_page.smart_contract_address_long"),children:[ut(a.linkedContractAddress)," ",e.jsx(gt,{className:u.copyButton,showPopup:!0,text:a.linkedContractAddress,role:"button",children:e.jsx(s.Icon,{name:"copy outline"})})]}),!S&&e.jsxs(je,{title:o("third_party_collection_detail_page.slots_short"),info:o("third_party_collection_detail_page.slots_long"),children:[e.jsx("div",{className:u.slotsIcon}),y?e.jsx(s.Loader,{active:!0,inline:!0,size:"tiny"}):e.jsxs("span",{children:[g.availableSlots??0," / ",g.maxItems]})]}),e.jsxs(s.Button,{inverted:!0,onClick:Pe,children:[e.jsx(s.Icon,{name:"plus"}),o("third_party_collection_detail_page.new_items")]}),g.availableSlots!==void 0?e.jsx(Jt,{collection:a,items:ce,slots:g.availableSlots}):null,e.jsx(Yt,{collection:a,items:k})]})]})]}),!a.isMappingComplete&&e.jsxs("div",{className:u.migrationBanner,children:[e.jsx(s.Icon,{name:"sync"})," ",o("third_party_collection_detail_page.migration_banner")]}),e.jsx("div",{className:u.body,children:O?e.jsx("div",{className:u.loader,children:e.jsx(s.Loader,{size:"massive",inline:!0,active:!0})}):e.jsxs(e.Fragment,{children:[(a.itemCount??0)>0&&e.jsxs("div",{className:u.searchContainer,children:[k.length>0&&e.jsx("div",{className:u.searchInfo,children:o("third_party_collection_detail_page.search_info",{page:(P-1)*G+1,pageTotal:Math.min(z,P*G),total:z})}),e.jsx(s.Dropdown,{className:u.syncedStatusList,direction:"left",value:A,options:$e,onChange:re})]}),k.length?e.jsxs(e.Fragment,{children:[de>0?e.jsxs("div",{className:u.selectionInfo,children:[o("third_party_collection_detail_page.selection",{count:de})," ",e.jsx("span",{className:"link",onClick:oe,children:o("third_party_collection_detail_page.clear_selection")}),". ",R&&K>1?e.jsx("span",{className:"link",onClick:()=>Te(H),children:o("third_party_collection_detail_page.select_all",{total:z})}):null," "]}):null,e.jsxs("div",{children:[b&&me?e.jsx(Qs,{areAllSelected:W(k),onSelectedAllClick:(E,X)=>ie(k,X)}):e.jsx(zs,{areAllSelected:W(k),onSelectedAllClick:(E,X)=>ie(k,X)}),k.map(E=>b&&me?e.jsx(Ws,{collection:a,item:E,selected:!!h[E.id],onSelect:J},E.id):e.jsx(gs,{collection:a,item:E,selected:!!h[E.id],onSelect:J},E.id)),K>1?e.jsx(s.Pagination,{firstItem:null,lastItem:null,totalPages:K,activePage:P,onPageChange:Me}):null]})]}):e.jsxs("div",{className:u.empty,children:[e.jsx("div",{className:_e?u.start:u.sparkles}),_e?e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:o("third_party_collection_detail_page.start_adding_items")}),e.jsx("p",{children:o("third_party_collection_detail_page.cant_remove")})]}):e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:o("third_party_collection_detail_page.not_found")}),e.jsx("p",{children:o("third_party_collection_detail_page.try_again")})]})]})]})})]}):(console.error("No collection defined"),null)},[a,h,y,S,b,j,P,J,W,re,oe,A]),Ae=le&&a;return e.jsx(Mt,{id:a==null?void 0:a.id,itemsPage:P,itemsPageSize:G,fetchCollectionItemsOptions:Be,children:({isLoadingCollection:g,isLoadingCollectionItems:p,items:k,paginatedItems:O,onFetchCollectionItemsPages:H})=>e.jsx(Et,{className:u.main,hasNavigation:!le&&!C&&!g,isLoading:C||g,children:Ae&&i?Le(i,k,O,p,H):e.jsx(Tt,{})})})}const Dn=()=>{const t=ht(),n=St()||"",r=Pt(),i=w(c=>Ie(c,n)),m=l.useMemo(()=>i?pe(i):!1,[i]),a=w(c=>{var v;return((v=Ce(c,n))==null?void 0:v.total)||null}),j=w(c=>i?pt(c,i.id):[]),C=w(c=>i&&Ce(c,i.id)||null),b=w(Ct),S=w(xt),I=w(Ne),_=w(c=>i&&pe(i)?jt(c,i):null),d=w(c=>It(c)),f=w(c=>ke(kt(c),wt)||Nt(c)||!!(m&&i&&ft(c,Se(i.urn)))),y=w(c=>yt(c)),h=w(c=>Dt(c)),D=l.useCallback(c=>t(M("CreateItemsModal",{collectionId:c})),[t]),P=l.useCallback(c=>t(M("EditCollectionNameModal",{collection:c})),[t]),L=l.useCallback(c=>t(bt(c)),[t]),R=l.useCallback(c=>t(vt(c)),[t]);return e.jsx(Pn,{items:j,totalItems:a,currentPage:r,paginatedData:C,wallet:b,collection:i,isThirdPartyV2Enabled:S,isLinkedWearablesPaymentsEnabled:I,thirdParty:_,authorizations:d,isLoading:f,isLoadingAvailableSlots:y,lastLocation:h,onNewItem:D,onEditName:P,onFetchAvailableSlots:L,onFetchThirdParty:R})},Hn=Dn;export{Hn as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as n,ar as s,as as r,at as i,au as m,av as g,aw as t,aj as d,ax as c,ay as u,az as S,a2 as I,aA as P,aB as l,aC as y,aD as C,aE as E}from"./index-
|
|
1
|
+
import{T as n,ar as s,as as r,at as i,au as m,av as g,aw as t,aj as d,ax as c,ay as u,az as S,a2 as I,aA as P,aB as l,aC as y,aD as C,aE as E}from"./index-DDLQh72H.js";const O=a=>({isPreviewing:r(a),isSidebarOpen:i(a),isReady:m(a),isLoading:g(a),isFetching:t(a),isLoggedIn:d(a),isScreenshotReady:c(a),currentProject:u(a),numItems:S(a)}),R=a=>({onOpenModal:(e,o)=>a(I(e,o)),onCloseEditor:()=>a(P()),onZoomIn:()=>a(l()),onZoomOut:()=>a(y()),onResetCamera:()=>a(C()),onTakeScreenshot:()=>a(E())}),L=n(O,R)(s);export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var i=Object.defineProperty;var c=(n,e,t)=>e in n?i(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var s=(n,e,t)=>c(n,typeof e!="symbol"?e+"":e,t);import{ak as r,al as d,N as a,am as p,S as h,an as g,ao as l,T as C,aj as m,ad as x,ap as u}from"./index-
|
|
1
|
+
var i=Object.defineProperty;var c=(n,e,t)=>e in n?i(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var s=(n,e,t)=>c(n,typeof e!="symbol"?e+"":e,t);import{ak as r,al as d,N as a,am as p,S as h,an as g,ao as l,T as C,aj as m,ad as x,ap as u}from"./index-DDLQh72H.js";let j=class extends r.PureComponent{constructor(){super(...arguments);s(this,"handleOnConnect",t=>{this.props.onConnect(t)});s(this,"handleRedirectToAuthDapp",()=>{if(!this.props.isConnected&&!this.props.isConnecting){const t=new URLSearchParams(window.location.search),o=/^decentraland.(zone|org|today)$/.test(window.location.host)?"/builder":"";d(`${o}${t.get("redirectTo")||"/"}`)}})}render(){const{isConnected:t}=this.props;return a.jsxs(a.Fragment,{children:[a.jsx(p,{}),a.jsx(h.Page,{children:a.jsx(g,{onConnect:this.handleRedirectToAuthDapp,isConnected:t,handleLoginConnect:this.handleOnConnect})}),a.jsx(l,{})]})}};const P=n=>({isConnected:m(n),isConnecting:x(n)}),S=n=>({onConnect:e=>n(u(e))}),T=C(P,S)(j);export{T as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{B as pe,_ as me}from"./index-CxPPIPig.js";const he=Symbol(),ee=Object.getPrototypeOf,Y=new WeakMap,ge=e=>e&&(Y.has(e)?Y.get(e):ee(e)===Object.prototype||ee(e)===Array.prototype),ye=e=>ge(e)&&e[he]||null,te=(e,t=!0)=>{Y.set(e,t)},z={BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.15.1-19635806307.commit-d7ee146",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.15.1-19635806307.commit-d7ee146",VITE_REACT_APP_WEBSITE_VERSION:"7.15.1-19635806307.commit-d7ee146"},F=e=>typeof e=="object"&&e!==null,C=new WeakMap,x=new WeakSet,ve=(e=Object.is,t=(o,g)=>new Proxy(o,g),s=o=>F(o)&&!x.has(o)&&(Array.isArray(o)||!(Symbol.iterator in o))&&!(o instanceof WeakMap)&&!(o instanceof WeakSet)&&!(o instanceof Error)&&!(o instanceof Number)&&!(o instanceof Date)&&!(o instanceof String)&&!(o instanceof RegExp)&&!(o instanceof ArrayBuffer),n=o=>{switch(o.status){case"fulfilled":return o.value;case"rejected":throw o.reason;default:throw o}},l=new WeakMap,c=(o,g,I=n)=>{const v=l.get(o);if((v==null?void 0:v[0])===g)return v[1];const b=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o));return te(b,!0),l.set(o,[g,b]),Reflect.ownKeys(o).forEach(j=>{if(Object.getOwnPropertyDescriptor(b,j))return;const O=Reflect.get(o,j),A={value:O,enumerable:!0,configurable:!0};if(x.has(O))te(O,!1);else if(O instanceof Promise)delete A.value,A.get=()=>I(O);else if(C.has(O)){const[y,H]=C.get(O);A.value=c(y,H(),I)}Object.defineProperty(b,j,A)}),Object.preventExtensions(b)},d=new WeakMap,f=[1,1],W=o=>{if(!F(o))throw new Error("object required");const g=d.get(o);if(g)return g;let I=f[0];const v=new Set,b=(a,i=++f[0])=>{I!==i&&(I=i,v.forEach(r=>r(a,i)))};let j=f[1];const O=(a=++f[1])=>(j!==a&&!v.size&&(j=a,y.forEach(([i])=>{const r=i[1](a);r>I&&(I=r)})),I),A=a=>(i,r)=>{const h=[...i];h[1]=[a,...h[1]],b(h,r)},y=new Map,H=(a,i)=>{if((z?"production":void 0)!=="production"&&y.has(a))throw new Error("prop listener already exists");if(v.size){const r=i[3](A(a));y.set(a,[i,r])}else y.set(a,[i])},Z=a=>{var i;const r=y.get(a);r&&(y.delete(a),(i=r[1])==null||i.call(r))},ue=a=>(v.add(a),v.size===1&&y.forEach(([r,h],U)=>{if((z?"production":void 0)!=="production"&&h)throw new Error("remove already exists");const N=r[3](A(U));y.set(U,[r,N])}),()=>{v.delete(a),v.size===0&&y.forEach(([r,h],U)=>{h&&(h(),y.set(U,[r]))})}),q=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o)),k=t(q,{deleteProperty(a,i){const r=Reflect.get(a,i);Z(i);const h=Reflect.deleteProperty(a,i);return h&&b(["delete",[i],r]),h},set(a,i,r,h){const U=Reflect.has(a,i),N=Reflect.get(a,i,h);if(U&&(e(N,r)||d.has(r)&&e(N,d.get(r))))return!0;Z(i),F(r)&&(r=ye(r)||r);let V=r;if(r instanceof Promise)r.then(L=>{r.status="fulfilled",r.value=L,b(["resolve",[i],L])}).catch(L=>{r.status="rejected",r.reason=L,b(["reject",[i],L])});else{!C.has(r)&&s(r)&&(V=W(r));const L=!x.has(V)&&C.get(V);L&&H(i,L)}return Reflect.set(a,i,V,h),b(["set",[i],r,N]),!0}});d.set(o,k);const fe=[q,O,c,ue];return C.set(k,fe),Reflect.ownKeys(o).forEach(a=>{const i=Object.getOwnPropertyDescriptor(o,a);"value"in i&&(k[a]=o[a],delete i.value,delete i.writable),Object.defineProperty(q,a,i)}),k})=>[W,C,x,e,t,s,n,l,c,d,f],[be]=ve();function P(e={}){return be(e)}function D(e,t,s){const n=C.get(e);(z?"production":void 0)!=="production"&&!n&&console.warn("Please use proxy object");let l;const c=[],d=n[3];let f=!1;const o=d(g=>{c.push(g),l||(l=Promise.resolve().then(()=>{l=void 0,f&&t(c.splice(0))}))});return f=!0,()=>{f=!1,o()}}function we(e,t){const s=C.get(e);(z?"production":void 0)!=="production"&&!s&&console.warn("Please use proxy object");const[n,l,c]=s;return c(n,l(),t)}const u=P({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),de={state:u,subscribe(e){return D(u,()=>e(u))},push(e,t){e!==u.view&&(u.view=e,t&&(u.data=t),u.history.push(e))},reset(e){u.view=e,u.history=[e]},replace(e){u.history.length>1&&(u.history[u.history.length-1]=e,u.view=e)},goBack(){if(u.history.length>1){u.history.pop();const[e]=u.history.slice(-1);u.view=e}},setData(e){u.data=e}},m={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return m.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return m.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},isTelegram(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)},formatNativeUrl(e,t,s){if(m.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let n=e;n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const l=encodeURIComponent(t);return`${n}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!m.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let n=e;if(n.startsWith("https://t.me")){const c=pe.from(t).toString("base64").replace(/[=]/g,"");n.endsWith("/")&&(n=n.slice(0,-1)),this.setWalletConnectDeepLink(n,s);const d=new URL(n);return d.searchParams.set("startapp",c),d.toString()}n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const l=encodeURIComponent(t);return`${n}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){const s=this.isTelegram()?"_blank":t;window.open(e,s,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(m.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(m.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(m.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(m.WCM_VERSION,"2.7.0")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=de.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},Ie=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),p=P({enabled:Ie,userSessionId:"",events:[],connectedWalletId:void 0}),_e={state:p,subscribe(e){return D(p.events,()=>e(we(p.events[p.events.length-1])))},initialize(){p.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(p.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){p.connectedWalletId=e},click(e){if(p.enabled){const t={type:"CLICK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},track(e){if(p.enabled){const t={type:"TRACK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},view(e){if(p.enabled){const t={type:"VIEW",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}}},_=P({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),w={state:_,subscribe(e){return D(_,()=>e(_))},setChains(e){_.chains=e},setWalletConnectUri(e){_.walletConnectUri=e},setIsCustomDesktop(e){_.isCustomDesktop=e},setIsCustomMobile(e){_.isCustomMobile=e},setIsDataLoaded(e){_.isDataLoaded=e},setIsUiLoaded(e){_.isUiLoaded=e},setIsAuth(e){_.isAuth=e}},B=P({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),$={state:B,subscribe(e){return D(B,()=>e(B))},setConfig(e){var t,s;_e.initialize(),w.setChains(e.chains),w.setIsAuth(!!e.enableAuthMode),w.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),w.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),m.setModalVersionInStorage(),Object.assign(B,e)}};var Ee=Object.defineProperty,se=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,ne=(e,t,s)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Le=(e,t)=>{for(var s in t||(t={}))Oe.call(t,s)&&ne(e,s,t[s]);if(se)for(var s of se(t))We.call(t,s)&&ne(e,s,t[s]);return e};const G="https://explorer-api.walletconnect.com",Q="wcm",X="js-2.7.0";async function K(e,t){const s=Le({sdkType:Q,sdkVersion:X},t),n=new URL(e,G);return n.searchParams.append("projectId",$.state.projectId),Object.entries(s).forEach(([c,d])=>{d&&n.searchParams.append(c,String(d))}),(await fetch(n)).json()}const S={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${G}/w3m/v1/getWalletImage/${e}?projectId=${$.state.projectId}&sdkType=${Q}&sdkVersion=${X}`},getAssetImageUrl(e){return`${G}/w3m/v1/getAssetImage/${e}?projectId=${$.state.projectId}&sdkType=${Q}&sdkVersion=${X}`}};var Ce=Object.defineProperty,oe=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Se=(e,t)=>{for(var s in t||(t={}))Pe.call(t,s)&&re(e,s,t[s]);if(oe)for(var s of oe(t))Ae.call(t,s)&&re(e,s,t[s]);return e};const ie=m.isMobile(),E=P({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),ke={state:E,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=$.state;if(e==="NONE"||t==="ALL"&&!e)return E.recomendedWallets;if(m.isArray(e)){const n={recommendedIds:e.join(",")},{listings:l}=await S.getAllListings(n),c=Object.values(l);c.sort((d,f)=>{const W=e.indexOf(d.id),o=e.indexOf(f.id);return W-o}),E.recomendedWallets=c}else{const{chains:s,isAuth:n}=w.state,l=s==null?void 0:s.join(","),c=m.isArray(t),d={page:1,sdks:n?"auth_v1":void 0,entries:m.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:f}=ie?await S.getMobileListings(d):await S.getDesktopListings(d);E.recomendedWallets=Object.values(f)}return E.recomendedWallets},async getWallets(e){const t=Se({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:n}=$.state,{recomendedWallets:l}=E;if(n==="ALL")return E.wallets;l.length?t.excludedIds=l.map(I=>I.id).join(","):m.isArray(s)&&(t.excludedIds=s.join(",")),m.isArray(n)&&(t.excludedIds=[t.excludedIds,n].filter(Boolean).join(",")),w.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:d}=e,{listings:f,total:W}=ie?await S.getMobileListings(t):await S.getDesktopListings(t),o=Object.values(f),g=d?"search":"wallets";return E[g]={listings:[...E[g].listings,...o],total:W,page:c??1},{listings:o,total:W}},getWalletImageUrl(e){return S.getWalletImageUrl(e)},getAssetImageUrl(e){return S.getAssetImageUrl(e)},resetSearch(){E.search={listings:[],total:0,page:1}}},T=P({open:!1}),J={state:T,subscribe(e){return D(T,()=>e(T))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:n}=w.state;if(m.removeWalletConnectDeepLink(),w.setWalletConnectUri(e==null?void 0:e.uri),w.setChains(e==null?void 0:e.chains),de.reset("ConnectWallet"),s&&n)T.open=!0,t();else{const l=setInterval(()=>{const c=w.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),T.open=!0,t())},200)}})},close(){T.open=!1}};var Me=Object.defineProperty,ae=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,le=(e,t,s)=>t in e?Me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Ue=(e,t)=>{for(var s in t||(t={}))De.call(t,s)&&le(e,s,t[s]);if(ae)for(var s of ae(t))je.call(t,s)&&le(e,s,t[s]);return e};function Te(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const R=P({themeMode:Te()?"dark":"light"}),ce={state:R,subscribe(e){return D(R,()=>e(R))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(R.themeMode=t),s&&(R.themeVariables=Ue({},s))}},M=P({open:!1,message:"",variant:"success"}),Ve={state:M,subscribe(e){return D(M,()=>e(M))},openToast(e,t){M.open=!0,M.message=e,M.variant=t},closeToast(){M.open=!1}};class $e{constructor(t){this.openModal=J.open,this.closeModal=J.close,this.subscribeModal=J.subscribe,this.setTheme=ce.setThemeConfig,ce.setThemeConfig(t),$.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await me(()=>import("./index-B5UgsE6c.js"),__vite__mapDeps([0,1,2]));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),w.setIsUiLoaded(!0)}}}const xe=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:$e},Symbol.toStringTag,{value:"Module"}));export{m as C,ke as E,J as M,w as O,de as R,ce as T,Ve as a,_e as b,$ as c,xe as i};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DfkdTSnc.js","assets/index-DDLQh72H.js","assets/index-BdXvBSq9.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{B as pe,_ as me}from"./index-DDLQh72H.js";const he=Symbol(),ee=Object.getPrototypeOf,Y=new WeakMap,ge=e=>e&&(Y.has(e)?Y.get(e):ee(e)===Object.prototype||ee(e)===Array.prototype),ye=e=>ge(e)&&e[he]||null,te=(e,t=!0)=>{Y.set(e,t)},z={BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.16.1-19644308472.commit-c4256dc",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.16.1-19644308472.commit-c4256dc",VITE_REACT_APP_WEBSITE_VERSION:"7.16.1-19644308472.commit-c4256dc"},F=e=>typeof e=="object"&&e!==null,C=new WeakMap,x=new WeakSet,ve=(e=Object.is,t=(o,g)=>new Proxy(o,g),s=o=>F(o)&&!x.has(o)&&(Array.isArray(o)||!(Symbol.iterator in o))&&!(o instanceof WeakMap)&&!(o instanceof WeakSet)&&!(o instanceof Error)&&!(o instanceof Number)&&!(o instanceof Date)&&!(o instanceof String)&&!(o instanceof RegExp)&&!(o instanceof ArrayBuffer),n=o=>{switch(o.status){case"fulfilled":return o.value;case"rejected":throw o.reason;default:throw o}},l=new WeakMap,c=(o,g,I=n)=>{const v=l.get(o);if((v==null?void 0:v[0])===g)return v[1];const b=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o));return te(b,!0),l.set(o,[g,b]),Reflect.ownKeys(o).forEach(j=>{if(Object.getOwnPropertyDescriptor(b,j))return;const O=Reflect.get(o,j),A={value:O,enumerable:!0,configurable:!0};if(x.has(O))te(O,!1);else if(O instanceof Promise)delete A.value,A.get=()=>I(O);else if(C.has(O)){const[y,H]=C.get(O);A.value=c(y,H(),I)}Object.defineProperty(b,j,A)}),Object.preventExtensions(b)},d=new WeakMap,f=[1,1],W=o=>{if(!F(o))throw new Error("object required");const g=d.get(o);if(g)return g;let I=f[0];const v=new Set,b=(a,i=++f[0])=>{I!==i&&(I=i,v.forEach(r=>r(a,i)))};let j=f[1];const O=(a=++f[1])=>(j!==a&&!v.size&&(j=a,y.forEach(([i])=>{const r=i[1](a);r>I&&(I=r)})),I),A=a=>(i,r)=>{const h=[...i];h[1]=[a,...h[1]],b(h,r)},y=new Map,H=(a,i)=>{if((z?"production":void 0)!=="production"&&y.has(a))throw new Error("prop listener already exists");if(v.size){const r=i[3](A(a));y.set(a,[i,r])}else y.set(a,[i])},Z=a=>{var i;const r=y.get(a);r&&(y.delete(a),(i=r[1])==null||i.call(r))},ue=a=>(v.add(a),v.size===1&&y.forEach(([r,h],U)=>{if((z?"production":void 0)!=="production"&&h)throw new Error("remove already exists");const N=r[3](A(U));y.set(U,[r,N])}),()=>{v.delete(a),v.size===0&&y.forEach(([r,h],U)=>{h&&(h(),y.set(U,[r]))})}),q=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o)),k=t(q,{deleteProperty(a,i){const r=Reflect.get(a,i);Z(i);const h=Reflect.deleteProperty(a,i);return h&&b(["delete",[i],r]),h},set(a,i,r,h){const U=Reflect.has(a,i),N=Reflect.get(a,i,h);if(U&&(e(N,r)||d.has(r)&&e(N,d.get(r))))return!0;Z(i),F(r)&&(r=ye(r)||r);let V=r;if(r instanceof Promise)r.then(L=>{r.status="fulfilled",r.value=L,b(["resolve",[i],L])}).catch(L=>{r.status="rejected",r.reason=L,b(["reject",[i],L])});else{!C.has(r)&&s(r)&&(V=W(r));const L=!x.has(V)&&C.get(V);L&&H(i,L)}return Reflect.set(a,i,V,h),b(["set",[i],r,N]),!0}});d.set(o,k);const fe=[q,O,c,ue];return C.set(k,fe),Reflect.ownKeys(o).forEach(a=>{const i=Object.getOwnPropertyDescriptor(o,a);"value"in i&&(k[a]=o[a],delete i.value,delete i.writable),Object.defineProperty(q,a,i)}),k})=>[W,C,x,e,t,s,n,l,c,d,f],[be]=ve();function P(e={}){return be(e)}function D(e,t,s){const n=C.get(e);(z?"production":void 0)!=="production"&&!n&&console.warn("Please use proxy object");let l;const c=[],d=n[3];let f=!1;const o=d(g=>{c.push(g),l||(l=Promise.resolve().then(()=>{l=void 0,f&&t(c.splice(0))}))});return f=!0,()=>{f=!1,o()}}function we(e,t){const s=C.get(e);(z?"production":void 0)!=="production"&&!s&&console.warn("Please use proxy object");const[n,l,c]=s;return c(n,l(),t)}const u=P({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),de={state:u,subscribe(e){return D(u,()=>e(u))},push(e,t){e!==u.view&&(u.view=e,t&&(u.data=t),u.history.push(e))},reset(e){u.view=e,u.history=[e]},replace(e){u.history.length>1&&(u.history[u.history.length-1]=e,u.view=e)},goBack(){if(u.history.length>1){u.history.pop();const[e]=u.history.slice(-1);u.view=e}},setData(e){u.data=e}},m={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return m.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return m.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},isTelegram(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)},formatNativeUrl(e,t,s){if(m.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let n=e;n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const l=encodeURIComponent(t);return`${n}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!m.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let n=e;if(n.startsWith("https://t.me")){const c=pe.from(t).toString("base64").replace(/[=]/g,"");n.endsWith("/")&&(n=n.slice(0,-1)),this.setWalletConnectDeepLink(n,s);const d=new URL(n);return d.searchParams.set("startapp",c),d.toString()}n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const l=encodeURIComponent(t);return`${n}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){const s=this.isTelegram()?"_blank":t;window.open(e,s,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(m.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(m.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(m.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(m.WCM_VERSION,"2.7.0")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=de.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},Ie=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),p=P({enabled:Ie,userSessionId:"",events:[],connectedWalletId:void 0}),_e={state:p,subscribe(e){return D(p.events,()=>e(we(p.events[p.events.length-1])))},initialize(){p.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(p.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){p.connectedWalletId=e},click(e){if(p.enabled){const t={type:"CLICK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},track(e){if(p.enabled){const t={type:"TRACK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},view(e){if(p.enabled){const t={type:"VIEW",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}}},_=P({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),w={state:_,subscribe(e){return D(_,()=>e(_))},setChains(e){_.chains=e},setWalletConnectUri(e){_.walletConnectUri=e},setIsCustomDesktop(e){_.isCustomDesktop=e},setIsCustomMobile(e){_.isCustomMobile=e},setIsDataLoaded(e){_.isDataLoaded=e},setIsUiLoaded(e){_.isUiLoaded=e},setIsAuth(e){_.isAuth=e}},B=P({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),$={state:B,subscribe(e){return D(B,()=>e(B))},setConfig(e){var t,s;_e.initialize(),w.setChains(e.chains),w.setIsAuth(!!e.enableAuthMode),w.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),w.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),m.setModalVersionInStorage(),Object.assign(B,e)}};var Ee=Object.defineProperty,se=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,ne=(e,t,s)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Le=(e,t)=>{for(var s in t||(t={}))Oe.call(t,s)&&ne(e,s,t[s]);if(se)for(var s of se(t))We.call(t,s)&&ne(e,s,t[s]);return e};const G="https://explorer-api.walletconnect.com",Q="wcm",X="js-2.7.0";async function K(e,t){const s=Le({sdkType:Q,sdkVersion:X},t),n=new URL(e,G);return n.searchParams.append("projectId",$.state.projectId),Object.entries(s).forEach(([c,d])=>{d&&n.searchParams.append(c,String(d))}),(await fetch(n)).json()}const S={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${G}/w3m/v1/getWalletImage/${e}?projectId=${$.state.projectId}&sdkType=${Q}&sdkVersion=${X}`},getAssetImageUrl(e){return`${G}/w3m/v1/getAssetImage/${e}?projectId=${$.state.projectId}&sdkType=${Q}&sdkVersion=${X}`}};var Ce=Object.defineProperty,oe=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Se=(e,t)=>{for(var s in t||(t={}))Pe.call(t,s)&&re(e,s,t[s]);if(oe)for(var s of oe(t))Ae.call(t,s)&&re(e,s,t[s]);return e};const ie=m.isMobile(),E=P({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),ke={state:E,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=$.state;if(e==="NONE"||t==="ALL"&&!e)return E.recomendedWallets;if(m.isArray(e)){const n={recommendedIds:e.join(",")},{listings:l}=await S.getAllListings(n),c=Object.values(l);c.sort((d,f)=>{const W=e.indexOf(d.id),o=e.indexOf(f.id);return W-o}),E.recomendedWallets=c}else{const{chains:s,isAuth:n}=w.state,l=s==null?void 0:s.join(","),c=m.isArray(t),d={page:1,sdks:n?"auth_v1":void 0,entries:m.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:f}=ie?await S.getMobileListings(d):await S.getDesktopListings(d);E.recomendedWallets=Object.values(f)}return E.recomendedWallets},async getWallets(e){const t=Se({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:n}=$.state,{recomendedWallets:l}=E;if(n==="ALL")return E.wallets;l.length?t.excludedIds=l.map(I=>I.id).join(","):m.isArray(s)&&(t.excludedIds=s.join(",")),m.isArray(n)&&(t.excludedIds=[t.excludedIds,n].filter(Boolean).join(",")),w.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:d}=e,{listings:f,total:W}=ie?await S.getMobileListings(t):await S.getDesktopListings(t),o=Object.values(f),g=d?"search":"wallets";return E[g]={listings:[...E[g].listings,...o],total:W,page:c??1},{listings:o,total:W}},getWalletImageUrl(e){return S.getWalletImageUrl(e)},getAssetImageUrl(e){return S.getAssetImageUrl(e)},resetSearch(){E.search={listings:[],total:0,page:1}}},T=P({open:!1}),J={state:T,subscribe(e){return D(T,()=>e(T))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:n}=w.state;if(m.removeWalletConnectDeepLink(),w.setWalletConnectUri(e==null?void 0:e.uri),w.setChains(e==null?void 0:e.chains),de.reset("ConnectWallet"),s&&n)T.open=!0,t();else{const l=setInterval(()=>{const c=w.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),T.open=!0,t())},200)}})},close(){T.open=!1}};var Me=Object.defineProperty,ae=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,le=(e,t,s)=>t in e?Me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Ue=(e,t)=>{for(var s in t||(t={}))De.call(t,s)&&le(e,s,t[s]);if(ae)for(var s of ae(t))je.call(t,s)&&le(e,s,t[s]);return e};function Te(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const R=P({themeMode:Te()?"dark":"light"}),ce={state:R,subscribe(e){return D(R,()=>e(R))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(R.themeMode=t),s&&(R.themeVariables=Ue({},s))}},M=P({open:!1,message:"",variant:"success"}),Ve={state:M,subscribe(e){return D(M,()=>e(M))},openToast(e,t){M.open=!0,M.message=e,M.variant=t},closeToast(){M.open=!1}};class $e{constructor(t){this.openModal=J.open,this.closeModal=J.close,this.subscribeModal=J.subscribe,this.setTheme=ce.setThemeConfig,ce.setThemeConfig(t),$.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await me(()=>import("./index-DfkdTSnc.js"),__vite__mapDeps([0,1,2]));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),w.setIsUiLoaded(!0)}}}const xe=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:$e},Symbol.toStringTag,{value:"Module"}));export{m as C,ke as E,J as M,w as O,de as R,ce as T,Ve as a,_e as b,$ as c,xe as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b1 as be,a4 as F,J as n,ak as je,N as e,M as s,Q as de,R as E,dN as me,S as t,T as U,ey as Ie,a2 as he,ez as Se,eA as Z,a7 as Ne,dM as Ce,eB as fe,eC as ue,eD as Re,eE as ce,P as ve,eF as f,bD as oe,eG as w,aM as we,eH as Le,eI as De,eJ as Ee,eK as Ae,eL as Oe,bq as G,eM as Pe,eN as ie,eO as ye,eP as ke,eQ as Me,eR as He,eS as $e,eT as Be,eU as Fe,eV as Ue,eW as Ve,eX as ze}from"./index-CxPPIPig.js";import{B as qe,c as Ge,N as Ye}from"./Navigation.container-BFN51RYJ.js";import{L as Ze}from"./LoggedInDetailPage.container-CB30S7Lh.js";import{O as ge}from"./OptionsDropdown-DoMw7q9_.js";import{a as B}from"./date-ByxPc1Qq.js";import{C as _e}from"./CollectionStatus.container-CaZzcpaQ.js";import"./selectors-B07yj6kb.js";import"./SignInRequired-vN-iPiDW.js";import"./index-B5gir1L8.js";const Qe=l=>l.ui.collection,We=l=>Qe(l).view,re=20;function Je(l){const{search:a,pathname:c}=be(),d=F(),r=d.push.bind(d),o=n.useMemo(()=>{var i;return((i=l==null?void 0:l.pageSize)==null?void 0:i.toString())??re.toString()},[l==null?void 0:l.pageSize]),x=n.useMemo(()=>{const i=new URLSearchParams(a);return i.delete("page"),i.delete("first"),i.delete("offset"),i.delete("sortBy"),Object.fromEntries(i.entries())},[a]),u=n.useMemo(()=>new URLSearchParams(a).get("sortBy"),[a])??void 0,[g,b,A]=n.useMemo(()=>{const i=new URLSearchParams(a),_=parseInt(i.get("page")??"1"),p=parseInt(i.get("first")??o),I=(_-1)*p;return[_,p,I]},[o,a]),j=n.useCallback(()=>{const i=new URLSearchParams(a);i.set("page",(g+1).toString()),r(`${c}?${i.toString()}`)},[a,g,r,c]),S=n.useCallback(i=>{const _=new URLSearchParams(a);_.set("page",i.toString()),r(`${c}?${_.toString()}`)},[a,r,c]),O=n.useCallback(i=>{const _=new URLSearchParams(a);_.set("page","1"),_.set("sortBy",i),r(`${c}?${_.toString()}`)},[c,r,a]),V=n.useCallback((i,_,p={clearOldFilters:!1})=>{const I=new URLSearchParams(p.clearOldFilters?{}:a);I.set("page","1"),p.clearOldFilters&&u&&I.set("sortBy",u),I.set(i,_),r(`${c}?${I.toString()}`)},[c,r,a,u]),R=l!=null&&l.count?Math.ceil((l==null?void 0:l.count)/((l==null?void 0:l.pageSize)??re)):void 0,N=R?g<R:void 0;return{page:g,pages:R,hasMorePages:N,first:b,offset:A,sortBy:u,filters:x,goToNextPage:j,goToPage:S,changeSorting:O,changeFilter:V}}const Ke="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%2018H28V28H18V18Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M4%204H14V14H4V4Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M18%204H28V14H18V4Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M4%2018H14V28H4V18Z'%20fill='%23A09BA8'/%3e%3c/svg%3e",Xe=l=>{const{item:a,onDeleteItem:c,onOpenModal:d}=l,[r,o]=n.useState(!1),x=n.useCallback(()=>o(!1),[o]),u=n.useCallback(()=>o(!0),[o]),g=n.useCallback(()=>d("MoveItemToCollectionModal"),[d]),b=n.useCallback(()=>{o(!1),c()},[o,c]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"ItemCard is-card",children:[e.jsx(ge,{className:"options-dropdown",options:[{text:s("item_card.move_to_collection"),handler:g},{text:s("global.delete"),handler:u}]}),e.jsxs(de,{to:E.itemDetail(a.id),children:[e.jsx(me,{item:a}),e.jsxs(t.Card.Content,{children:[e.jsx("div",{className:"text",title:a.name,children:a.name}),e.jsx("div",{className:"subtitle",children:s(`item.type.${a.type}`)})]})]})]}),e.jsx(t.Confirm,{size:"tiny",open:r,header:s("item_card.confirm_delete_header",{name:a.name}),content:s("item_card.confirm_delete_content",{name:a.name}),confirmButton:e.jsx(t.Button,{primary:!0,children:s("global.confirm")}),cancelButton:e.jsx(t.Button,{secondary:!0,children:s("global.cancel")}),onCancel:x,onConfirm:b})]})},ea=je.memo(Xe),aa=(l,a)=>({onDeleteItem:()=>l(Ie(a.item)),onOpenModal:c=>l(he(c,{item:a.item}))}),ta=U(void 0,aa)(ea),la="_ItemRow_xmdia_1",sa="_image_xmdia_7",na="_name_xmdia_21",ca="_title_xmdia_29",oa="_imageColumn_xmdia_30",ia="_published_xmdia_35",D={ItemRow:la,image:sa,name:na,title:ca,imageColumn:oa,published:ia};function ra(l){const{item:a}=l,c=F(),d=n.useCallback(()=>{c.push(E.itemDetail(a.id))},[c]);return e.jsxs(t.Table.Row,{className:D.ItemRow,onClick:d,children:[e.jsx(t.Table.Cell,{width:4,children:e.jsxs("div",{className:D.imageColumn,children:[e.jsx(me,{className:D.image,item:a}),e.jsxs("div",{className:D.title,children:[e.jsx(Se,{item:a}),e.jsx("div",{className:D.name,children:a.name})]})]})}),e.jsx(t.Table.Cell,{width:3,children:B(a.createdAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:B(a.updatedAt,{addSuffix:!0})})]})}const da=l=>{const{collection:a,onDeleteCollection:c,itemCount:d}=l,[r,o]=n.useState(!1),x=n.useCallback(()=>o(!1),[o]),u=n.useCallback(()=>o(!0),[o]),g=n.useCallback(()=>{o(!1),c()},[o,c]),b=Z(a);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"CollectionCard is-card",children:[!a.isPublished&&e.jsx(ge,{className:Ne({"empty-collection-options":d===0},"options-dropdown"),options:[{text:s("global.delete"),handler:u}]}),e.jsxs(de,{to:E.collectionDetail(a.id,b),children:[e.jsx(Ce,{collectionId:a.id}),e.jsxs(t.Card.Content,{children:[e.jsxs("div",{className:"text",title:a.name,children:[e.jsx(_e,{collection:a})," ",a.name]}),e.jsxs("div",{className:"subtitle",children:[s(`collection.type.${b}`)," · ",s("collection_card.item_count",{count:d})]}),!a.isMappingComplete&&fe(a.urn)&&e.jsxs("div",{className:"pending-migration",children:[e.jsx(t.Icon,{name:"warning circle"})," ",s("item_status.pending_migration")]})]})]})]}),e.jsx(t.Confirm,{size:"tiny",open:r,header:s("collection_card.confirm_delete_header",{name:a.name}),content:s("collection_card.confirm_delete_content",{name:a.name}),confirmButton:e.jsx(t.Button,{primary:!0,children:s("global.confirm")}),cancelButton:e.jsx(t.Button,{secondary:!0,children:s("global.cancel")}),onCancel:x,onConfirm:g,className:"delete-collection-confirm"})]})},ma=n.memo(da),ha=(l,a)=>({itemCount:ue(l,a.collection.id)}),Ca=(l,a)=>({onDeleteCollection:()=>l(Re(a.collection))}),ua=U(ha,Ca)(ma),ga="_CollectionRow_k7d4q_1",_a="_image_k7d4q_7",xa="_name_k7d4q_16",pa="_title_k7d4q_24",Ta="_imageColumn_k7d4q_25",ba="_published_k7d4q_30",L={CollectionRow:ga,image:_a,name:xa,title:pa,imageColumn:Ta,published:ba};function ja(l){const{collection:a,itemCount:c}=l,d=F(),r=n.useCallback(()=>{d.push(E.collectionDetail(a.id,Z(a)))},[d]),o=Z(a);return e.jsxs(t.Table.Row,{className:L.CollectionRow,onClick:r,children:[e.jsx(t.Table.Cell,{width:3,children:e.jsxs("div",{className:L.imageColumn,children:[e.jsx(Ce,{className:L.image,collectionId:a.id}),e.jsxs("div",{className:L.title,children:[e.jsx(_e,{collection:a}),e.jsx("div",{className:L.name,children:a.name})]})]})}),e.jsx(t.Table.Cell,{width:3,children:s(`collection.type.${o}`)}),e.jsx(t.Table.Cell,{width:2,children:c}),e.jsx(t.Table.Cell,{width:3,children:B(a.createdAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:B(a.updatedAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:a.isPublished?e.jsxs("div",{className:L.published,children:[s("global.published")," ",e.jsx(t.Icon,{name:"check"})]}):null})]})}const Ia=(l,a)=>({itemCount:ue(l,a.collection.id)}),Sa=U(Ia)(ja);var m=(l=>(l.STANDARD_COLLECTIONS="standard_collections",l.THIRD_PARTY_COLLECTIONS="third_party_collections",l.ITEMS="orphan_items",l))(m||{});const Y=20;function Na(l){const{address:a,items:c,collections:d,view:r,collectionsPaginationData:o,itemsPaginationData:x,hasUserOrphanItems:u,isLoadingItems:g,isLoadingCollections:b,isLoadingOrphanItem:A,isLinkedWearablesPaymentsEnabled:j,isThirdPartyManager:S,onFetchCollections:O,onFetchOrphanItem:V,onFetchOrphanItems:R,onOpenModal:N,onSetView:i}=l,_=F(),{page:p,pages:I,goToPage:Q,filters:P,changeFilter:y,sortBy:k,changeSorting:W}=Je({pageSize:Y,count:o==null?void 0:o.total}),h=P.section??m.STANDARD_COLLECTIONS,M=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS,[J,xe]=n.useState(P.search??""),H=n.useRef(null);n.useEffect(()=>{u===void 0&&a&&V(a)},[a,u]),n.useEffect(()=>{a&&(h===m.ITEMS?R(a,{page:p,limit:Y}):O(a,{page:p,limit:Y,q:P.search??void 0,type:h===m.STANDARD_COLLECTIONS?ce.STANDARD:ce.THIRD_PARTY,sort:k}))},[a,p,h,P.search,k,R,O]);const pe=n.useCallback(()=>{N("CreateThirdPartyCollectionModal")},[N]),$=n.useCallback(()=>{N(j?"CreateCollectionSelectorModal":"CreateCollectionModal")},[N,j]),K=n.useCallback((C,T)=>{xe(T.value),H.current&&(clearTimeout(H.current),H.current=null),H.current=setTimeout(()=>{y("search",T.value)},500)},[y]),X=n.useCallback(()=>{_.push(E.itemEditor())},[_]),ee=n.useCallback((C,{value:T})=>{W(T)},[W]),z=n.useCallback(C=>{h!==C&&y("section",C)},[a,h,y]),ae=n.useCallback(()=>e.jsx(t.Card.Group,{children:M?d.map((C,T)=>e.jsx(ua,{collection:C},T)):g?e.jsx(t.Loader,{size:"large",active:!0}):c.map((C,T)=>e.jsx(ta,{item:C},T))}),[c,d,g,M,h]),te=n.useCallback(()=>M?e.jsx(t.Section,{children:e.jsxs(t.Table,{basic:"very",children:[e.jsx(t.Table.Header,{children:e.jsxs(t.Table.Row,{children:[e.jsx(t.Table.HeaderCell,{children:s("collections_page.collection")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.type")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.items")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.created_at")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.last_modified")}),e.jsx(t.Table.HeaderCell,{})]})}),e.jsx(t.Table.Body,{children:d.map(C=>e.jsx(Sa,{collection:C},C.id))})]})}):e.jsx(t.Section,{children:e.jsxs(t.Table,{basic:"very",children:[e.jsx(t.Table.Header,{children:e.jsxs(t.Table.Row,{children:[e.jsx(t.Table.HeaderCell,{children:s("global.item")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.created_at")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.last_modified")})]})}),e.jsx(t.Table.Body,{children:c.map(C=>e.jsx(ra,{item:C},C.id))})]})}),[c,d,M]),le=n.useCallback((C,T)=>{p!==T.activePage&&Q(Number(T.activePage))},[p,Q]),se=n.useCallback(()=>e.jsxs("div",{className:"collections-main-actions",children:[h!==m.ITEMS&&e.jsx(t.Field,{placeholder:s("itemdrawer.search_items"),className:"collections-search-field",input:{icon:"search"},onChange:K,icon:e.jsx(t.Icon,{name:"search",className:"searchIcon"}),iconPosition:"left",value:J,isClearable:!0}),e.jsxs(t.Row,{className:"actions",grow:!1,children:[S&&!j&&e.jsx(t.Button,{className:"action-button",size:"small",basic:!0,onClick:pe,children:s("collections_page.new_third_party_collection")}),e.jsxs(t.Button,{className:"action-button open-editor",size:"small",basic:!0,onClick:X,children:[e.jsx(ve,{name:"cube"}),s("item_editor.open")]}),e.jsxs(t.Button,{className:"action-button",size:"small",primary:!0,onClick:$,children:[e.jsx(t.Icon,{name:"plus square"})," ",s("collections_page.new_collection")]})]})]}),[J,S,j,K,X,$]),ne=n.useCallback(()=>e.jsx(t.Column,{align:"right",children:e.jsxs(t.Row,{className:"actions",children:[h===m.STANDARD_COLLECTIONS||m.THIRD_PARTY_COLLECTIONS&&e.jsx(t.Dropdown,{direction:"left",value:k,options:[{value:f.MOST_RELEVANT,text:s("curation_page.order.most_relevant")},{value:f.CREATED_AT_DESC,text:s("global.order.newest")},{value:f.CREATED_AT_ASC,text:s("global.order.oldest")},{value:f.UPDATED_AT_DESC,text:s("global.order.updated_at_desc")},{value:f.UPDATED_AT_ASC,text:s("global.order.updated_at_asc")},{value:f.NAME_DESC,text:s("global.order.name_desc")},{value:f.NAME_ASC,text:s("global.order.name_asc")}],onChange:ee}),e.jsx(oe,{className:"grid",icon:"grid",isActive:r===w.GRID,onClick:()=>i(w.GRID)}),e.jsx(oe,{className:"list",icon:"table",isActive:r===w.LIST,onClick:()=>i(w.LIST)})]})}),[r,i,k,ee]),Te=n.useCallback(()=>{const C=o==null?void 0:o.total,T=x==null?void 0:x.total,v=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS?C:T,q=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS?I:x==null?void 0:x.totalPages;return A?e.jsx(t.Loader,{active:!0,size:"large"}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"banner-container",children:e.jsx(qe,{id:Ge})}),e.jsx("div",{className:"filters",children:e.jsxs(t.Container,{children:[(u||S||j)&&e.jsxs("div",{className:"action-tabs-container",children:[e.jsx("img",{src:Ke,className:"collections-icon"}),e.jsxs(t.Tabs,{isFullscreen:!0,children:[e.jsx(t.Tabs.Tab,{active:h===m.STANDARD_COLLECTIONS,onClick:()=>z(m.STANDARD_COLLECTIONS),children:s("collections_page.collections")}),(S||j)&&e.jsx(t.Tabs.Tab,{active:h===m.THIRD_PARTY_COLLECTIONS,onClick:()=>z(m.THIRD_PARTY_COLLECTIONS),children:s("collections_page.third_party_collections")}),u&&e.jsx(t.Tabs.Tab,{active:h===m.ITEMS,onClick:()=>z(m.ITEMS),children:s("collections_page.single_items")})]})]}),se(),e.jsxs(t.Row,{height:30,children:[e.jsx(t.Column,{children:e.jsx(t.Row,{children:!g&&!b&&!!v&&v>0&&e.jsx(t.Header,{sub:!0,children:s("collections_page.results",{count:v})})})}),ne()]})]})}),g||b||v===void 0?e.jsx(t.Loader,{active:!0,size:"large"}):v>0?e.jsxs(e.Fragment,{children:[r===w.GRID?ae():r===w.LIST?te():null,!!q&&q>1&&e.jsx(t.Pagination,{className:"pagination",firstItem:null,lastItem:null,totalPages:q,activePage:p,onPageChange:le})]}):e.jsxs("div",{className:"empty",children:[e.jsx(t.Header,{className:"title",size:"large",children:s("collections_page.no_items")}),e.jsx("div",{className:"empty-description",children:s("collections_page.empty_description")}),e.jsx("div",{className:"create-new-wrapper",children:e.jsx("div",{className:"create-new create-new-collection",onClick:$,children:e.jsx("div",{className:"text",children:s("collections_page.new_collection")})})})]})]})},[p,I,o,x,r,u,g,b,A,j,S,le,$,ae,te,ne,se]);return e.jsx(Ze,{className:"CollectionsPage",activeTab:Ye.COLLECTIONS,children:Te()})}const fa=l=>{const a=we(l),c=Le(l),d=a?De(l,a):[],r=a?Ee(l,a):null,o=Ae(l);return{items:d,address:a,collections:c,collectionsPaginationData:o,itemsPaginationData:r,view:We(l),isThirdPartyManager:Oe(l),isLoadingCollections:G(Pe(l),Ue),isLoadingItems:G(ie(l),Ve),isLoadingOrphanItem:G(ie(l),ze),isLinkedWearablesPaymentsEnabled:ye(l),isCampaignEnabled:ke(l),hasUserOrphanItems:Me(l)}},Ra=l=>({onSetView:a=>l(He(a)),onOpenModal:(a,c)=>l(he(a,c)),onFetchOrphanItems:(a,c)=>l($e(a,c)),onFetchCollections:(a,c)=>l(Be(a,c)),onFetchOrphanItem:a=>l(Fe(a))}),ka=U(fa,Ra)(Na);export{ka as default};
|
|
1
|
+
import{b1 as be,a4 as F,J as n,ak as je,N as e,M as s,Q as de,R as E,dN as me,S as t,T as U,ey as Ie,a2 as he,ez as Se,eA as Z,a7 as Ne,dM as Ce,eB as fe,eC as ue,eD as Re,eE as ce,P as ve,eF as f,bD as oe,eG as w,aM as we,eH as Le,eI as De,eJ as Ee,eK as Ae,eL as Oe,bq as G,eM as Pe,eN as ie,eO as ye,eP as ke,eQ as Me,eR as He,eS as $e,eT as Be,eU as Fe,eV as Ue,eW as Ve,eX as ze}from"./index-DDLQh72H.js";import{B as qe,c as Ge,N as Ye}from"./Navigation.container-DdDz8aQR.js";import{L as Ze}from"./LoggedInDetailPage.container-C9GSQhch.js";import{O as ge}from"./OptionsDropdown-DdF7xSCX.js";import{a as B}from"./date-XnshaYAj.js";import{C as _e}from"./CollectionStatus.container-DzhTjeP9.js";import"./selectors-BFWzed6x.js";import"./SignInRequired-DmF9Qp0Q.js";import"./index-BBxq5T5O.js";const Qe=l=>l.ui.collection,We=l=>Qe(l).view,re=20;function Je(l){const{search:a,pathname:c}=be(),d=F(),r=d.push.bind(d),o=n.useMemo(()=>{var i;return((i=l==null?void 0:l.pageSize)==null?void 0:i.toString())??re.toString()},[l==null?void 0:l.pageSize]),x=n.useMemo(()=>{const i=new URLSearchParams(a);return i.delete("page"),i.delete("first"),i.delete("offset"),i.delete("sortBy"),Object.fromEntries(i.entries())},[a]),u=n.useMemo(()=>new URLSearchParams(a).get("sortBy"),[a])??void 0,[g,b,A]=n.useMemo(()=>{const i=new URLSearchParams(a),_=parseInt(i.get("page")??"1"),p=parseInt(i.get("first")??o),I=(_-1)*p;return[_,p,I]},[o,a]),j=n.useCallback(()=>{const i=new URLSearchParams(a);i.set("page",(g+1).toString()),r(`${c}?${i.toString()}`)},[a,g,r,c]),S=n.useCallback(i=>{const _=new URLSearchParams(a);_.set("page",i.toString()),r(`${c}?${_.toString()}`)},[a,r,c]),O=n.useCallback(i=>{const _=new URLSearchParams(a);_.set("page","1"),_.set("sortBy",i),r(`${c}?${_.toString()}`)},[c,r,a]),V=n.useCallback((i,_,p={clearOldFilters:!1})=>{const I=new URLSearchParams(p.clearOldFilters?{}:a);I.set("page","1"),p.clearOldFilters&&u&&I.set("sortBy",u),I.set(i,_),r(`${c}?${I.toString()}`)},[c,r,a,u]),R=l!=null&&l.count?Math.ceil((l==null?void 0:l.count)/((l==null?void 0:l.pageSize)??re)):void 0,N=R?g<R:void 0;return{page:g,pages:R,hasMorePages:N,first:b,offset:A,sortBy:u,filters:x,goToNextPage:j,goToPage:S,changeSorting:O,changeFilter:V}}const Ke="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%2018H28V28H18V18Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M4%204H14V14H4V4Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M18%204H28V14H18V4Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M4%2018H14V28H4V18Z'%20fill='%23A09BA8'/%3e%3c/svg%3e",Xe=l=>{const{item:a,onDeleteItem:c,onOpenModal:d}=l,[r,o]=n.useState(!1),x=n.useCallback(()=>o(!1),[o]),u=n.useCallback(()=>o(!0),[o]),g=n.useCallback(()=>d("MoveItemToCollectionModal"),[d]),b=n.useCallback(()=>{o(!1),c()},[o,c]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"ItemCard is-card",children:[e.jsx(ge,{className:"options-dropdown",options:[{text:s("item_card.move_to_collection"),handler:g},{text:s("global.delete"),handler:u}]}),e.jsxs(de,{to:E.itemDetail(a.id),children:[e.jsx(me,{item:a}),e.jsxs(t.Card.Content,{children:[e.jsx("div",{className:"text",title:a.name,children:a.name}),e.jsx("div",{className:"subtitle",children:s(`item.type.${a.type}`)})]})]})]}),e.jsx(t.Confirm,{size:"tiny",open:r,header:s("item_card.confirm_delete_header",{name:a.name}),content:s("item_card.confirm_delete_content",{name:a.name}),confirmButton:e.jsx(t.Button,{primary:!0,children:s("global.confirm")}),cancelButton:e.jsx(t.Button,{secondary:!0,children:s("global.cancel")}),onCancel:x,onConfirm:b})]})},ea=je.memo(Xe),aa=(l,a)=>({onDeleteItem:()=>l(Ie(a.item)),onOpenModal:c=>l(he(c,{item:a.item}))}),ta=U(void 0,aa)(ea),la="_ItemRow_xmdia_1",sa="_image_xmdia_7",na="_name_xmdia_21",ca="_title_xmdia_29",oa="_imageColumn_xmdia_30",ia="_published_xmdia_35",D={ItemRow:la,image:sa,name:na,title:ca,imageColumn:oa,published:ia};function ra(l){const{item:a}=l,c=F(),d=n.useCallback(()=>{c.push(E.itemDetail(a.id))},[c]);return e.jsxs(t.Table.Row,{className:D.ItemRow,onClick:d,children:[e.jsx(t.Table.Cell,{width:4,children:e.jsxs("div",{className:D.imageColumn,children:[e.jsx(me,{className:D.image,item:a}),e.jsxs("div",{className:D.title,children:[e.jsx(Se,{item:a}),e.jsx("div",{className:D.name,children:a.name})]})]})}),e.jsx(t.Table.Cell,{width:3,children:B(a.createdAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:B(a.updatedAt,{addSuffix:!0})})]})}const da=l=>{const{collection:a,onDeleteCollection:c,itemCount:d}=l,[r,o]=n.useState(!1),x=n.useCallback(()=>o(!1),[o]),u=n.useCallback(()=>o(!0),[o]),g=n.useCallback(()=>{o(!1),c()},[o,c]),b=Z(a);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"CollectionCard is-card",children:[!a.isPublished&&e.jsx(ge,{className:Ne({"empty-collection-options":d===0},"options-dropdown"),options:[{text:s("global.delete"),handler:u}]}),e.jsxs(de,{to:E.collectionDetail(a.id,b),children:[e.jsx(Ce,{collectionId:a.id}),e.jsxs(t.Card.Content,{children:[e.jsxs("div",{className:"text",title:a.name,children:[e.jsx(_e,{collection:a})," ",a.name]}),e.jsxs("div",{className:"subtitle",children:[s(`collection.type.${b}`)," · ",s("collection_card.item_count",{count:d})]}),!a.isMappingComplete&&fe(a.urn)&&e.jsxs("div",{className:"pending-migration",children:[e.jsx(t.Icon,{name:"warning circle"})," ",s("item_status.pending_migration")]})]})]})]}),e.jsx(t.Confirm,{size:"tiny",open:r,header:s("collection_card.confirm_delete_header",{name:a.name}),content:s("collection_card.confirm_delete_content",{name:a.name}),confirmButton:e.jsx(t.Button,{primary:!0,children:s("global.confirm")}),cancelButton:e.jsx(t.Button,{secondary:!0,children:s("global.cancel")}),onCancel:x,onConfirm:g,className:"delete-collection-confirm"})]})},ma=n.memo(da),ha=(l,a)=>({itemCount:ue(l,a.collection.id)}),Ca=(l,a)=>({onDeleteCollection:()=>l(Re(a.collection))}),ua=U(ha,Ca)(ma),ga="_CollectionRow_k7d4q_1",_a="_image_k7d4q_7",xa="_name_k7d4q_16",pa="_title_k7d4q_24",Ta="_imageColumn_k7d4q_25",ba="_published_k7d4q_30",L={CollectionRow:ga,image:_a,name:xa,title:pa,imageColumn:Ta,published:ba};function ja(l){const{collection:a,itemCount:c}=l,d=F(),r=n.useCallback(()=>{d.push(E.collectionDetail(a.id,Z(a)))},[d]),o=Z(a);return e.jsxs(t.Table.Row,{className:L.CollectionRow,onClick:r,children:[e.jsx(t.Table.Cell,{width:3,children:e.jsxs("div",{className:L.imageColumn,children:[e.jsx(Ce,{className:L.image,collectionId:a.id}),e.jsxs("div",{className:L.title,children:[e.jsx(_e,{collection:a}),e.jsx("div",{className:L.name,children:a.name})]})]})}),e.jsx(t.Table.Cell,{width:3,children:s(`collection.type.${o}`)}),e.jsx(t.Table.Cell,{width:2,children:c}),e.jsx(t.Table.Cell,{width:3,children:B(a.createdAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:B(a.updatedAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:a.isPublished?e.jsxs("div",{className:L.published,children:[s("global.published")," ",e.jsx(t.Icon,{name:"check"})]}):null})]})}const Ia=(l,a)=>({itemCount:ue(l,a.collection.id)}),Sa=U(Ia)(ja);var m=(l=>(l.STANDARD_COLLECTIONS="standard_collections",l.THIRD_PARTY_COLLECTIONS="third_party_collections",l.ITEMS="orphan_items",l))(m||{});const Y=20;function Na(l){const{address:a,items:c,collections:d,view:r,collectionsPaginationData:o,itemsPaginationData:x,hasUserOrphanItems:u,isLoadingItems:g,isLoadingCollections:b,isLoadingOrphanItem:A,isLinkedWearablesPaymentsEnabled:j,isThirdPartyManager:S,onFetchCollections:O,onFetchOrphanItem:V,onFetchOrphanItems:R,onOpenModal:N,onSetView:i}=l,_=F(),{page:p,pages:I,goToPage:Q,filters:P,changeFilter:y,sortBy:k,changeSorting:W}=Je({pageSize:Y,count:o==null?void 0:o.total}),h=P.section??m.STANDARD_COLLECTIONS,M=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS,[J,xe]=n.useState(P.search??""),H=n.useRef(null);n.useEffect(()=>{u===void 0&&a&&V(a)},[a,u]),n.useEffect(()=>{a&&(h===m.ITEMS?R(a,{page:p,limit:Y}):O(a,{page:p,limit:Y,q:P.search??void 0,type:h===m.STANDARD_COLLECTIONS?ce.STANDARD:ce.THIRD_PARTY,sort:k}))},[a,p,h,P.search,k,R,O]);const pe=n.useCallback(()=>{N("CreateThirdPartyCollectionModal")},[N]),$=n.useCallback(()=>{N(j?"CreateCollectionSelectorModal":"CreateCollectionModal")},[N,j]),K=n.useCallback((C,T)=>{xe(T.value),H.current&&(clearTimeout(H.current),H.current=null),H.current=setTimeout(()=>{y("search",T.value)},500)},[y]),X=n.useCallback(()=>{_.push(E.itemEditor())},[_]),ee=n.useCallback((C,{value:T})=>{W(T)},[W]),z=n.useCallback(C=>{h!==C&&y("section",C)},[a,h,y]),ae=n.useCallback(()=>e.jsx(t.Card.Group,{children:M?d.map((C,T)=>e.jsx(ua,{collection:C},T)):g?e.jsx(t.Loader,{size:"large",active:!0}):c.map((C,T)=>e.jsx(ta,{item:C},T))}),[c,d,g,M,h]),te=n.useCallback(()=>M?e.jsx(t.Section,{children:e.jsxs(t.Table,{basic:"very",children:[e.jsx(t.Table.Header,{children:e.jsxs(t.Table.Row,{children:[e.jsx(t.Table.HeaderCell,{children:s("collections_page.collection")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.type")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.items")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.created_at")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.last_modified")}),e.jsx(t.Table.HeaderCell,{})]})}),e.jsx(t.Table.Body,{children:d.map(C=>e.jsx(Sa,{collection:C},C.id))})]})}):e.jsx(t.Section,{children:e.jsxs(t.Table,{basic:"very",children:[e.jsx(t.Table.Header,{children:e.jsxs(t.Table.Row,{children:[e.jsx(t.Table.HeaderCell,{children:s("global.item")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.created_at")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.last_modified")})]})}),e.jsx(t.Table.Body,{children:c.map(C=>e.jsx(ra,{item:C},C.id))})]})}),[c,d,M]),le=n.useCallback((C,T)=>{p!==T.activePage&&Q(Number(T.activePage))},[p,Q]),se=n.useCallback(()=>e.jsxs("div",{className:"collections-main-actions",children:[h!==m.ITEMS&&e.jsx(t.Field,{placeholder:s("itemdrawer.search_items"),className:"collections-search-field",input:{icon:"search"},onChange:K,icon:e.jsx(t.Icon,{name:"search",className:"searchIcon"}),iconPosition:"left",value:J,isClearable:!0}),e.jsxs(t.Row,{className:"actions",grow:!1,children:[S&&!j&&e.jsx(t.Button,{className:"action-button",size:"small",basic:!0,onClick:pe,children:s("collections_page.new_third_party_collection")}),e.jsxs(t.Button,{className:"action-button open-editor",size:"small",basic:!0,onClick:X,children:[e.jsx(ve,{name:"cube"}),s("item_editor.open")]}),e.jsxs(t.Button,{className:"action-button",size:"small",primary:!0,onClick:$,children:[e.jsx(t.Icon,{name:"plus square"})," ",s("collections_page.new_collection")]})]})]}),[J,S,j,K,X,$]),ne=n.useCallback(()=>e.jsx(t.Column,{align:"right",children:e.jsxs(t.Row,{className:"actions",children:[h===m.STANDARD_COLLECTIONS||m.THIRD_PARTY_COLLECTIONS&&e.jsx(t.Dropdown,{direction:"left",value:k,options:[{value:f.MOST_RELEVANT,text:s("curation_page.order.most_relevant")},{value:f.CREATED_AT_DESC,text:s("global.order.newest")},{value:f.CREATED_AT_ASC,text:s("global.order.oldest")},{value:f.UPDATED_AT_DESC,text:s("global.order.updated_at_desc")},{value:f.UPDATED_AT_ASC,text:s("global.order.updated_at_asc")},{value:f.NAME_DESC,text:s("global.order.name_desc")},{value:f.NAME_ASC,text:s("global.order.name_asc")}],onChange:ee}),e.jsx(oe,{className:"grid",icon:"grid",isActive:r===w.GRID,onClick:()=>i(w.GRID)}),e.jsx(oe,{className:"list",icon:"table",isActive:r===w.LIST,onClick:()=>i(w.LIST)})]})}),[r,i,k,ee]),Te=n.useCallback(()=>{const C=o==null?void 0:o.total,T=x==null?void 0:x.total,v=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS?C:T,q=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS?I:x==null?void 0:x.totalPages;return A?e.jsx(t.Loader,{active:!0,size:"large"}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"banner-container",children:e.jsx(qe,{id:Ge})}),e.jsx("div",{className:"filters",children:e.jsxs(t.Container,{children:[(u||S||j)&&e.jsxs("div",{className:"action-tabs-container",children:[e.jsx("img",{src:Ke,className:"collections-icon"}),e.jsxs(t.Tabs,{isFullscreen:!0,children:[e.jsx(t.Tabs.Tab,{active:h===m.STANDARD_COLLECTIONS,onClick:()=>z(m.STANDARD_COLLECTIONS),children:s("collections_page.collections")}),(S||j)&&e.jsx(t.Tabs.Tab,{active:h===m.THIRD_PARTY_COLLECTIONS,onClick:()=>z(m.THIRD_PARTY_COLLECTIONS),children:s("collections_page.third_party_collections")}),u&&e.jsx(t.Tabs.Tab,{active:h===m.ITEMS,onClick:()=>z(m.ITEMS),children:s("collections_page.single_items")})]})]}),se(),e.jsxs(t.Row,{height:30,children:[e.jsx(t.Column,{children:e.jsx(t.Row,{children:!g&&!b&&!!v&&v>0&&e.jsx(t.Header,{sub:!0,children:s("collections_page.results",{count:v})})})}),ne()]})]})}),g||b||v===void 0?e.jsx(t.Loader,{active:!0,size:"large"}):v>0?e.jsxs(e.Fragment,{children:[r===w.GRID?ae():r===w.LIST?te():null,!!q&&q>1&&e.jsx(t.Pagination,{className:"pagination",firstItem:null,lastItem:null,totalPages:q,activePage:p,onPageChange:le})]}):e.jsxs("div",{className:"empty",children:[e.jsx(t.Header,{className:"title",size:"large",children:s("collections_page.no_items")}),e.jsx("div",{className:"empty-description",children:s("collections_page.empty_description")}),e.jsx("div",{className:"create-new-wrapper",children:e.jsx("div",{className:"create-new create-new-collection",onClick:$,children:e.jsx("div",{className:"text",children:s("collections_page.new_collection")})})})]})]})},[p,I,o,x,r,u,g,b,A,j,S,le,$,ae,te,ne,se]);return e.jsx(Ze,{className:"CollectionsPage",activeTab:Ye.COLLECTIONS,children:Te()})}const fa=l=>{const a=we(l),c=Le(l),d=a?De(l,a):[],r=a?Ee(l,a):null,o=Ae(l);return{items:d,address:a,collections:c,collectionsPaginationData:o,itemsPaginationData:r,view:We(l),isThirdPartyManager:Oe(l),isLoadingCollections:G(Pe(l),Ue),isLoadingItems:G(ie(l),Ve),isLoadingOrphanItem:G(ie(l),ze),isLinkedWearablesPaymentsEnabled:ye(l),isCampaignEnabled:ke(l),hasUserOrphanItems:Me(l)}},Ra=l=>({onSetView:a=>l(He(a)),onOpenModal:(a,c)=>l(he(a,c)),onFetchOrphanItems:(a,c)=>l($e(a,c)),onFetchCollections:(a,c)=>l(Be(a,c)),onFetchOrphanItem:a=>l(Fe(a))}),ka=U(fa,Ra)(Na);export{ka as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var h=Object.defineProperty;var m=(a,s,e)=>s in a?h(a,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[s]=e;var r=(a,s,e)=>m(a,typeof s!="symbol"?s+"":s,e);import{J as p,N as t,M as d,b6 as g,S as o,Q as u,R as x,cq as E,bW as N,aR as b,T as j,cs as L}from"./index-
|
|
1
|
+
var h=Object.defineProperty;var m=(a,s,e)=>s in a?h(a,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[s]=e;var r=(a,s,e)=>m(a,typeof s!="symbol"?s+"":s,e);import{J as p,N as t,M as d,b6 as g,S as o,Q as u,R as x,cq as E,bW as N,aR as b,T as j,cs as L}from"./index-DDLQh72H.js";import{L as f}from"./LandAction-CiY0RweX.js";import{L as v}from"./LandProviderPage-DMoeh5ZK.js";import"./Back-CDOxIrnn.js";import"./NotFound-BxsG7cuR.js";import"./hooks-BR9ATp8C.js";let D=class extends p.PureComponent{constructor(){super(...arguments);r(this,"state",{});r(this,"handleNameChange",(e,n)=>{this.setState({name:n.value})});r(this,"handleDescriptionChange",(e,n)=>{this.setState({description:n.value})})}getName(e){return typeof this.state.name>"u"?e.name:this.state.name}getDescription(e){return typeof this.state.description>"u"?e.description||"":this.state.description}render(){const{onEdit:e}=this.props,{name:n,description:c}=this.state,l=!n&&!c;return t.jsx(v,{className:"LandEditPage",children:i=>t.jsx(f,{land:i,title:d("edit_page.title"),subtitle:t.jsx(g,{id:"edit_page.subtitle",values:{name:t.jsx("strong",{children:i.name})}}),children:t.jsxs(o.Form,{onSubmit:()=>e(i,this.getName(i),this.getDescription(i)),children:[t.jsx(o.Field,{label:"Name",value:this.getName(i),onChange:this.handleNameChange}),t.jsx(o.Field,{label:"Description",value:this.getDescription(i),onChange:this.handleDescriptionChange}),t.jsxs(o.Row,{children:[t.jsx(u,{className:"cancel",to:x.landDetail(i.id),children:t.jsx(o.Button,{children:d("global.cancel")})}),t.jsx(E,{type:"submit",primary:!0,disabled:l||!this.getName(i)||i.role!==N.OWNER,network:b.Network.ETHEREUM,children:d("global.submit")})]})]})})})}};const P=a=>({onEdit:(s,e,n)=>a(L(s,e,n))}),F=j(null,P)(D);export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var B=Object.defineProperty;var D=(e,t,n)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>D(e,typeof t!="symbol"?t+"":t,n);import{a4 as f,J as d,aF as $,aG as m,aH as v,M as _,N as s,S as o,P as g,O as U,T,ay as j,aI as O,aJ as V,aK as w,aL as y,a2 as k,aM as M,aj as A,aN as G,aO as J,aP as X,aQ as z}from"./index-
|
|
1
|
+
var B=Object.defineProperty;var D=(e,t,n)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>D(e,typeof t!="symbol"?t+"":t,n);import{a4 as f,J as d,aF as $,aG as m,aH as v,M as _,N as s,S as o,P as g,O as U,T,ay as j,aI as O,aJ as V,aK as w,aL as y,a2 as k,aM as M,aj as A,aN as G,aO as J,aP as X,aQ as z}from"./index-DDLQh72H.js";import{S as H}from"./SignInRequired-DmF9Qp0Q.js";const K="_container_1abv2_1",q="_nameContainer_1abv2_8",F="_editNameBtn_1abv2_20",Y="_actions_1abv2_30",Q="_downloadBtn_1abv2_36",W="_button_1abv2_13",I={container:K,nameContainer:q,editNameBtn:F,actions:Y,downloadBtn:Q,button:W},Z=m.get("EXPLORER_URL",""),ee=m.get("BUILDER_SERVER_URL",""),se=m.get("PEER_TESTING_URL","");function te({currentProject:e,metrics:t,limits:n,areEntitiesOutOfBoundaries:c,isUploading:r,onOpenModal:l}){const b=f(),E=d.useCallback(()=>{l("ExportModal",{project:e})},[e,l]),u=d.useCallback(()=>{l("EditProjectModal")},[l]),a=d.useCallback(()=>{l("DeployModal",{view:$.NONE,projectId:e.id})},[l,e]),h=d.useMemo(()=>{if(!e)return"";const i=new URL(Z);return i.searchParams.set("skipSetup","true"),i.searchParams.set("realm",`${ee}/projects/${e.id}`),i.searchParams.set("DEBUG_MODE","true"),m.is(v.Env.DEVELOPMENT)?(i.searchParams.set("NETWORK","sepolia"),i.searchParams.set("DEBUG_SCENE_LOG","")):i.searchParams.set("CATALYST",se),i.toString()},[]),N=d.useMemo(()=>Object.keys(t).some(i=>t[i]>n[i]),[t]),x=d.useMemo(()=>r||c,[t,n,c,r]),C=d.useMemo(()=>r||!x,[r,x]),L=d.useCallback(()=>c?_("topbar.bounds_exceeded",{br:s.jsx("br",{})}):N?_("topbar.limits_exceeded"):null,[c,N]),S=d.useCallback(()=>{b.goBack()},[b]);return s.jsxs("div",{className:I.container,children:[s.jsxs("div",{className:I.nameContainer,children:[s.jsx(o.Button,{basic:!0,"aria-label":_("inspector.top_bar.back"),onClick:S,children:s.jsx(o.Icon,{name:"chevron left"})}),e&&s.jsxs(o.Button,{basic:!0,onClick:u,disabled:r,className:I.editNameBtn,children:[e.title,s.jsx(g,{name:"layout",className:"edit-project-icon"})]}),r&&s.jsx(g,{name:"cloud-upload",className:"cloud-upload-indicator is-uploading"})]}),s.jsxs("div",{className:I.actions,children:[e?s.jsx(U,{projectId:e.id}):null,s.jsx(o.Popup,{content:_("inspector.top_bar.download"),trigger:s.jsx(o.Button,{secondary:!0,"aria-label":_("inspector.top_bar.download"),size:"small",className:I.downloadBtn,disabled:r,onClick:E,children:s.jsx(o.Icon,{name:"download"})})}),s.jsxs(o.Button,{as:"a",href:h,target:"_blank",secondary:!0,size:"small",disabled:r,children:[s.jsx(o.Icon,{name:"eye"}),_("inspector.top_bar.preview")]}),s.jsx(o.Popup,{content:L(),position:"bottom center",disabled:C,trigger:s.jsx("span",{children:s.jsxs(o.Button,{primary:!0,size:"small",disabled:x,onClick:a,children:[s.jsx(o.Icon,{name:"globe"}),_("inspector.top_bar.publish")]})}),on:"hover"})]})]})}const ne=e=>({currentProject:j(e),metrics:O(e),limits:V(e),areEntitiesOutOfBoundaries:w(e)>0,isUploading:y(e)}),ae=e=>({onOpenModal:(t,n)=>e(k(t,n))}),oe=T(ne,ae)(te);var p={VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.16.1-19644308472.commit-c4256dc"};const ce=e=>e.replace(/\/$/,""),P=ce(p.VITE_BASE_URL);let re=class extends d.PureComponent{constructor(){super(...arguments);R(this,"state",{isLoaded:!1});R(this,"refIframe",n=>{const{onConnect:c}=this.props;n&&(n.onload=()=>{this.setState({isLoaded:!0})},c(n.id))})}componentDidMount(){const{onOpen:n}=this.props;n()}render(){const{scene:n,project:c,isLoggedIn:r,isReloading:l,address:b=""}=this.props;if(!r)return s.jsx(H,{});let E=`${P}/inspector-index.html`,u=`${P}/bin/index.js`;p.VITE_INSPECTOR_PORT&&(E=`http://localhost:${p.VITE_INSPECTOR_PORT}`,u=`${E}/bin/index.js`);let a=`?dataLayerRpcParentUrl=${window.location.origin}`;if(p.VITE_BIN_INDEX_JS_DEV_PORT&&p.VITE_BIN_INDEX_JS_DEV_PATH){const h=btoa(p.VITE_BIN_INDEX_JS_DEV_PATH);u=`http://localhost:${p.VITE_BIN_INDEX_JS_DEV_PORT}/content/contents/b64-${h}`}return a=a.concat(`&binIndexJsUrl=${u}`),a=a.concat(`&contentUrl=${m.get("INSPECTOR_CONTENT_URL")}`),a=a.concat(`&segmentKey=${m.get("INSPECTOR_SEGMENT_API_KEY")}`),a=a.concat(`&segmentAppId=${m.get("INSPECTOR_SEGMENT_APP_ID")}`),a=a.concat(`&segmentUserId=${b}`),c!=null&&c.id&&(a=a.concat(`&projectId=${c.id}`)),s.jsxs("div",{className:"InspectorPage",children:[(!this.state.isLoaded||l)&&s.jsx(o.Loader,{active:!0}),n&&!l&&s.jsxs(s.Fragment,{children:[s.jsx(oe,{}),s.jsx("iframe",{ref:this.refIframe,title:"inspector",id:"inspector",src:`${E}${a}`})]})]})}};const ie=e=>({address:M(e),isLoggedIn:A(e),scene:G(e),project:j(e),isReloading:J(e)}),de=e=>({onOpen:()=>e(X()),onConnect:t=>e(z(t))}),Ee=T(ie,de)(re);export{Ee as default};
|