@dcl/builder-site 7.19.0 → 7.19.1-19862996915.commit-78aa089
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-BiiwRci0.js → Back-Bf8NJ2pw.js} +1 -1
- package/assets/{CollectionProvider.container-DflF1wDU.js → CollectionProvider.container-A9BHn77V.js} +1 -1
- package/assets/{CollectionStatus.container-CB6NpIWJ.js → CollectionStatus.container-BOY138hz.js} +1 -1
- package/assets/{ConfirmDelete-DbOvRTAN.js → ConfirmDelete-C2lcfdm9.js} +1 -1
- package/assets/{FileSaver.min-DxwzZUzB.js → FileSaver.min-CZKhQ4Qe.js} +1 -1
- package/assets/{ItemProvider.container-CwXmjtiu.js → ItemProvider.container-BQijaefG.js} +2 -2
- package/assets/{JumpIn.container-9hoS9dDE.js → JumpIn.container-BxOE2sT9.js} +1 -1
- package/assets/{LandAction-CmPHqo26.js → LandAction-BgLBPcNN.js} +1 -1
- package/assets/{LandProviderPage-XT-wuXx3.js → LandProviderPage-CgSVjUnq.js} +1 -1
- package/assets/{LoggedInDetailPage.container-BKHHdpyw.js → LoggedInDetailPage.container-JGDqajAT.js} +1 -1
- package/assets/{Navigation-BwVpKw2E.css → Navigation-2AtoWGrF.css} +1 -1
- package/assets/{Navigation.container-CXL1uNrk.js → Navigation.container-DMse8-Rx.js} +1 -1
- package/assets/{NotFound-BRE3uxVB.js → NotFound-GY9JDZ-n.js} +1 -1
- package/assets/{OptionsDropdown-w6mo4pkB.js → OptionsDropdown-CtmdLKWB.js} +1 -1
- package/assets/{RentalPeriod-xaK2LedP.js → RentalPeriod-Dlho_yh8.js} +1 -1
- package/assets/{SDKTag-_dtW9rV9.js → SDKTag-BJ_H8rlP.js} +1 -1
- package/assets/{SceneStats.container-DItMX74e.js → SceneStats.container-Cxb6M_GL.js} +1 -1
- package/assets/{SignInRequired-Dyg4CYup.js → SignInRequired-BWudNNPu.js} +1 -1
- package/assets/{ThirdPartyKindBadge-BbAezXzB.js → ThirdPartyKindBadge-mWbP5DSx.js} +1 -1
- package/assets/{dataReader-oLau9YkX.js → dataReader-COUnb8fy.js} +1 -1
- package/assets/{date-BLHZs3cn.js → date-BfHDXBBW.js} +1 -1
- package/assets/{fortmatic-BaNuTnMs.js → fortmatic-iOV8i9Wo.js} +1 -1
- package/assets/{hooks-CK_m9kX-.js → hooks-TIqxBqu9.js} +1 -1
- package/assets/index-6LKhtn6Y.css +1 -0
- package/assets/{index-BJocszHZ.js → index-B-mUSqb7.js} +1 -1
- package/assets/{index-CULmIEsX.js → index-B1bk9ra6.js} +1 -1
- package/assets/{index-C6Ljy0zW.js → index-B4K1ugRP.js} +1 -1
- package/assets/{index-D0_DiOgH.js → index-BFNz-69h.js} +1 -1
- package/assets/{index-CKsOZ7Nm.css → index-BGkKHC6q.css} +7 -7
- package/assets/{index-Q9zr9nAD.js → index-BKtAqR4n.js} +1 -1
- package/assets/{index-Ca55RDBU.js → index-BRlGE8Op.js} +1 -1
- package/assets/index-BZfvTuBv.js +1 -0
- package/assets/{index-DceABlEs.js → index-B_iwu6vS.js} +1 -1
- package/assets/{index-D1zilnkH.js → index-BbQuOJdf.js} +1 -1
- package/assets/{index-5k92toJ3.js → index-BdIEyI1R.js} +1 -1
- package/assets/{index-33VMjg0p.js → index-BeTPtqRE.js} +1 -1
- package/assets/{index-DxTb4GUB.js → index-BfBbnYnz.js} +1 -1
- package/assets/{index-rtv3ilhk.js → index-BfR6FKwz.js} +1 -1
- package/assets/{index-4x97-Awd.js → index-BnKY49se.js} +1 -1
- package/assets/{index-C8nFTPFo.js → index-BnYAeGV4.js} +1 -1
- package/assets/{index-B6--3Y0E.js → index-BzskykAD.js} +1 -1
- package/assets/{index-2C2g-LD3.js → index-CI3fwSox.js} +1 -1
- package/assets/index-CL0XkxU9.js +1 -0
- package/assets/index-COiyk7Z1.js +1 -0
- package/assets/{index-ILlHFLXJ.js → index-CP_XJ4GY.js} +1 -1
- package/assets/{index-CF41jN7I.js → index-CQeoF7d1.js} +1 -1
- package/assets/{index-D_rU2i23.js → index-CTzs-SGZ.js} +1 -1
- package/assets/index-Ca3n1wfr.js +2 -0
- package/assets/{index-CpWwd8y_.css → index-CcCBz-5B.css} +1 -1
- package/assets/{index-CHX-HRNW.js → index-Cd7LdfGO.js} +1 -1
- package/assets/{index-DjBYc5DV.js → index-CdFbEayB.js} +1 -1
- package/assets/{index-mvJXOtfQ.js → index-Cixp35DA.js} +1 -1
- package/assets/index-CmzoNBUv.css +1 -0
- package/assets/{index-hv4-U6Oe.js → index-D55-7asq.js} +1 -1
- package/assets/{index-C0PMGLnP.js → index-D6ZfIHI0.js} +1 -1
- package/assets/index-DErVUkyl.css +1 -0
- package/assets/{index-BqfvJQtQ.js → index-DGlmHUp_.js} +1 -1
- package/assets/{index-DDb0diH8.js → index-DHW2OAL5.js} +1 -1
- package/assets/{index-DfhjTRKU.js → index-DJyNMPGi.js} +1 -1
- package/assets/{index-CHBa_6eD.js → index-DWOiPZOn.js} +1 -1
- package/assets/{index-TujGy-8_.js → index-Dah5SZzS.js} +1 -1
- package/assets/{index-CjkP9_4j.js → index-DdTAzVtX.js} +1 -1
- package/assets/{index-COwAuGwJ.css → index-DhRNz-rp.css} +1 -1
- package/assets/{index-CcE2BXCw.js → index-Diyui-M6.js} +1 -1
- package/assets/{index-A_eO3nLl.js → index-DtNubho2.js} +1 -1
- package/assets/{index-UD374e2H.js → index-HbI_NRfn.js} +829 -300
- package/assets/{index-CosF1ry6.js → index-JJ2SeOEl.js} +1 -1
- package/assets/index-_A_8LKzj.js +1 -0
- package/assets/index-bT4sKY1R.css +1 -0
- package/assets/{index-BstTehS5.js → index-qldDdwnF.js} +1 -1
- package/assets/{index-DiBOcJQ7.js → index-rYKKtHvv.js} +1 -1
- package/assets/{index-p6KDqRJP.js → index-yb_S6n0w.js} +1 -1
- package/assets/{index.es-Cxq5abSy.js → index.es-DGpPqybY.js} +4 -4
- package/assets/{selectors-A-tGldC4.js → selectors-DhSvUgcI.js} +1 -1
- package/index.html +3 -3
- package/package.json +3 -3
- package/assets/index-B7CTycpd.css +0 -1
- package/assets/index-BCE5l4gQ.css +0 -1
- package/assets/index-BxbT7FzG.js +0 -1
- package/assets/index-C0eW87D3.js +0 -1
- package/assets/index-C76G48D2.css +0 -1
- package/assets/index-COWROTya.js +0 -1
- package/assets/index-CptCSL_w.js +0 -1
- package/assets/index-DpjYOTYz.css +0 -1
- package/assets/index-SXAYJeSU.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var J=Object.defineProperty;var V=(s,t,a)=>t in s?J(s,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[t]=a;var I=(s,t,a)=>V(s,typeof t!="symbol"?t+"":t,a);import{aG as H,J as l,en as X,N as e,bO as Z,c4 as ee,c5 as se,eo as te,ep as ne,M as i,eq as ae,a7 as A,R as f,cO as oe,S as n,aF as le,bP as ie,T as K,bE as ce,ca as re,a2 as Q,er as de,es as ue,bq as y,et as me,eu as ge,Z as pe,ev as he,bJ as Y,ew as _e,ak as xe,a4 as be,am as je,ao as Se,O as Ce,aa as ye,ab as N,cb as Ee,Y as De,U as Ne,cU as ke,db as B,cc as Te,a0 as Ie,a1 as fe,a3 as Re,ex as Me,cX as we,ey as Le,da as ve,cd as Oe}from"./index-HbI_NRfn.js";import{c as Pe}from"./hooks-TIqxBqu9.js";import{B as $e}from"./Back-Bf8NJ2pw.js";import{N as Fe}from"./NotFound-GY9JDZ-n.js";import{S as Ae}from"./SDKTag-BJ_H8rlP.js";import{a as U,S as Be}from"./SceneStats.container-Cxb6M_GL.js";import"./date-BfHDXBBW.js";import"./index-BdIEyI1R.js";const z=H.get("EXPLORER_URL",""),Ue=H.get("WORLDS_CONTENT_SERVER","");let ze=class extends l.PureComponent{constructor(){super(...arguments);I(this,"getHighlightLayer",(a,o)=>(u,_)=>{const{deployment:m,landTiles:g}=this.props,c=ie(u,_),x=g[c];return x&&m.parcels.some(d=>d===c)?{color:a[x.land.role],scale:o}:null});I(this,"renderThumbnail",()=>{const{deployment:a,landTiles:o,project:u}=this.props,[_,m]=X(a.base);return(a.base in o?o[a.base].land.id:null)?e.jsx("div",{className:"atlas-wrapper",children:e.jsx(Z,{x:_,y:m,isDraggable:!1,zoom:.75,layers:[this.getHighlightLayer(ee,1.4),this.getHighlightLayer(se,1.2)]})}):e.jsx("div",{className:"thumbnail-wrapper",children:e.jsx("img",{className:"thumbnail",src:u.thumbnail,alt:u.description})})});I(this,"getExplorerUrl",a=>te?`${z}/?realm=${Ue}/world/${a}&NETWORK=sepolia`:`${z}/world/${a}`)}render(){const{project:a,deployment:o,landTiles:u,history:_,onOpenModal:m}=this.props,g=o.base in u?u[o.base].land.id:null,c=o.world?o.world:o.base,x=ne(a,o);let d=i("scene_detail_page.published");return x===ae.NEEDS_SYNC&&(d=i("scene_detail_page.unsynced")),e.jsxs("div",{className:A("DeploymentDetail",{clickable:g}),onClick:()=>g&&_.push(f.landDetail(g)),children:[this.renderThumbnail(),e.jsx(U,{label:i("scene_detail_page.status"),children:d}),e.jsx(U,{label:i("scene_detail_page.location"),children:e.jsxs("div",{className:A({"world-url":o.world}),children:[c,o.world?e.jsxs(e.Fragment,{children:[e.jsx(oe,{role:"button",text:this.getExplorerUrl(o.world),showPopup:!0,children:e.jsx(n.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:"link copy",name:"copy outline"})}),e.jsx("a",{href:this.getExplorerUrl(o.world),target:"_blank",rel:"noopener noreferrer",children:e.jsx(n.Icon,{name:"external alternate"})})]}):null]})}),e.jsx(Be,{deployment:o}),e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsx(n.Dropdown.Menu,{children:e.jsx(n.Dropdown.Item,{text:i("scene_detail_page.actions.unpublish"),onClick:()=>m("DeployModal",{view:le.CLEAR_DEPLOYMENT,deploymentId:o.id})})})})]})}};const Ge=s=>({landTiles:re(s)}),He=s=>({onOpenModal:(t,a)=>s(Q(t,a))}),Ke=K(Ge,He)(ce(ze)),Qe="https://cdn.decentraland.org/@dcl/builder-site/7.19.1-19862996915.commit-78aa089/assets/automatic_migrate-DQYv7lI_.webp",Ye="https://cdn.decentraland.org/@dcl/builder-site/7.19.1-19862996915.commit-78aa089/assets/migrate_smart_items-D2zNoKEa.webp";var h=(s=>(s.INFO="info",s.MIGRATE="migrate",s))(h||{});function G(s){return s&&s.sdk6?Object.values(s.sdk6.components).filter(a=>a.type===de.Script).length:0}const qe="_modalContainer_5geih_1",We="_subtitle_5geih_20",Je="_content_5geih_27",Ve="_actions_5geih_35",Xe="_loadingMessage_5geih_53",Ze="_loader_5geih_57",C={modalContainer:qe,subtitle:We,content:Je,actions:Ve,loadingMessage:Xe,loader:Ze};function es({project:s,scene:t,isLoading:a,isSavingSDK6Copy:o,isSavingScene:u,onNavigate:_,onClose:m,onMigrateScene:g}){const[c,x]=l.useState(h.INFO),[d,E]=l.useState(!1),b=l.useMemo(()=>G(t)>0,[t]),j=l.useCallback(()=>{x(h.INFO)},[]),r=l.useCallback(()=>{a||m()},[a,m]),S=l.useCallback(()=>{switch(c){case h.INFO:return ue;case h.MIGRATE:return s!=null&&s.thumbnail?s.thumbnail:b?Ye:Qe}},[c,b,s]),R=l.useCallback(()=>{switch(c){case h.INFO:x(h.MIGRATE);break;case h.MIGRATE:s&&g(s,d);break}},[c,d,s,g]),M=()=>c===h.MIGRATE&&b?{smartItemsCount:G(t)}:{},w=()=>!a||c!==h.MIGRATE?e.jsx(n.Button,{disabled:a,primary:!0,onClick:R,children:i(`migrate_to_sdk7_modal.${D}.action`)}):o?e.jsxs("span",{className:C.loadingMessage,children:[e.jsx(n.Loader,{size:"tiny",inline:!0,className:C.loader}),i("migrate_to_sdk7_modal.saving_copy")]}):u?e.jsxs("span",{className:C.loadingMessage,children:[e.jsx(n.Loader,{size:"tiny"}),i("migrate_to_sdk7_modal.migrating_scene")]}):null,D=b?`${c}_smart_items`:c,L=!a&&(c!==h.MIGRATE||b);return e.jsxs(n.Modal,{open:!0,className:C.modalContainer,onClose:r,children:[e.jsx(n.ModalNavigation,{title:i(`migrate_to_sdk7_modal.${D}.title`),onBack:c!==h.INFO?j:void 0,onClose:r}),e.jsxs(n.ModalContent,{className:C.content,children:[e.jsx("p",{className:C.subtitle,children:i(`migrate_to_sdk7_modal.${D}.subtitle`,{b:k=>e.jsx("b",{children:k}),br:()=>e.jsx("br",{}),...M()})}),e.jsx("div",{style:{width:"648px",height:"324px",backgroundPosition:"center",backgroundSize:"cover",backgroundImage:`url(${S()}`}}),c===h.MIGRATE&&e.jsx(n.Checkbox,{disabled:a,checked:d,label:i("migrate_to_sdk7_modal.save_a_copy"),onChange:(k,{checked:v})=>{E(!!v)}})]}),e.jsxs(n.ModalActions,{className:C.actions,children:[w(),L&&e.jsx(n.Button,{disabled:a,secondary:!0,onClick:()=>_(f.sceneEditor(s==null?void 0:s.id)),children:i("migrate_to_sdk7_modal.use_legacy_builder")})]})]})}const ss=(s,t)=>{var a,o;return{isLoading:y(ge(s),me),isSavingScene:!!((a=t.project)!=null&&a.id)&&pe(s).has((o=t.project)==null?void 0:o.id),isSavingSDK6Copy:y(Y(s),he)}},ts=s=>({onMigrateScene:(t,a)=>s(_e(t,a))}),ns=K(ss,ts)(es),as=s=>{const{project:t,scene:a,isLoading:o,deployments:u,onOpenModal:_,onDelete:m,onDuplicate:g,onLoadProjectScene:c}=s,[x,d]=l.useState(!1),[E,b]=l.useState(!1),j=be();l.useEffect(()=>{t&&!a&&c(t)},[t,a,c]);const r=()=>e.jsx(n.Center,{children:e.jsx(n.Loader,{active:!0,size:"large"})}),S=()=>e.jsx(Fe,{}),R=l.useCallback(()=>{_("EditProjectModal")},[_]),M=l.useCallback(()=>{d(!0)},[d]),w=l.useCallback(()=>{g(t)},[t,g]),D=l.useCallback(()=>{m(t),d(!1)},[t,m,d]),L=l.useCallback(()=>{d(!1)},[d]),k=l.useCallback(()=>{a!=null&&a.sdk6?b(!0):j.push(f.inspector(t==null?void 0:t.id))},[t,a,j]),v=()=>{const{project:p,isLoading:T,isLoadingDeployments:O}=s;return T||O||!p?null:e.jsx(Ce,{projectId:p.id,className:"deployment-status"})},$=l.useCallback(p=>{j.push(p)},[j]),q=(p,T)=>{const{isLoadingDeployments:O,onOpenModal:W,scene:P}=s;return e.jsxs(e.Fragment,{children:[e.jsxs(n.Section,{size:"large",children:[e.jsxs(n.Row,{children:[e.jsx(n.Column,{children:e.jsxs(n.Row,{children:[e.jsx($e,{absolute:!0,onClick:()=>$(f.scenes())}),e.jsxs(n.Header,{className:"name",children:[p.title,e.jsx(n.Icon,{name:"edit outline",onClick:R})]})]})}),e.jsx(n.Column,{className:"actions",align:"right",children:e.jsxs(n.Row,{children:[e.jsxs(n.Button,{inverted:!0,className:"download-button",onClick:()=>W("ExportModal",{project:p}),children:[e.jsx(n.Icon,{name:"download"}),i("scene_detail_page.download_scene")]}),e.jsxs(n.Button,{primary:!0,className:"edit-button",disabled:!P,loading:!P,onClick:k,children:[e.jsx(n.Icon,{name:"edit outline"}),i("scene_detail_page.edit_scene")]}),e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("scene_detail_page.actions.duplicate"),onClick:w}),e.jsx(n.Dropdown.Item,{text:i("scene_detail_page.actions.delete"),onClick:M})]})})]})})]}),e.jsxs(n.Row,{className:"status-container",children:[v(),e.jsx(Ae,{scene:P})]})]}),e.jsx(n.Section,{children:e.jsx("div",{className:"header-image",style:{backgroundImage:p.thumbnail?`url(${p.thumbnail})`:""}})}),e.jsxs(n.Section,{className:p.description?"":"no-margin-bottom",children:[e.jsx(n.Header,{sub:!0,children:i("scene_detail_page.published_in")}),O?e.jsx(n.Loader,{active:!0,size:"small"}):T.length===0?e.jsxs(n.Empty,{className:"empty-deployments-container",children:[e.jsx("div",{className:"empty-deployments-thumbnail"}),i("scene_detail_page.no_deployments")]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"deployments",children:T.map(F=>e.jsx(Ke,{project:p,deployment:F},F.id))}),e.jsx("div",{className:"notice",children:i("analytics.notice")})]})]}),p.description?e.jsxs(n.Section,{className:"description no-margin-bottom",children:[e.jsx(n.Header,{sub:!0,children:i("scene_detail_page.description")}),e.jsx("p",{className:"description-content",children:p.description})]}):null]})};return e.jsxs(e.Fragment,{children:[e.jsx(je,{}),e.jsxs(n.Page,{className:"SceneDetailPage",isFullscreen:!0,children:[o&&!t?r():null,!o&&!t?S():null,t?e.jsxs(e.Fragment,{children:[q(t,u),e.jsx(n.Confirm,{size:"tiny",open:x,header:i("project_card.confirm_delete_header",{title:t.title}),content:i("project_card.confirm_delete_content",{title:t.title}),confirmButton:e.jsx(n.Button,{primary:!0,children:i("global.confirm")}),cancelButton:e.jsx(n.Button,{secondary:!0,children:i("global.cancel")}),onCancel:L,onConfirm:D})]}):null,E&&e.jsx(ns,{project:t,scene:a,onNavigate:$,onClose:()=>b(!1)})]}),e.jsx(Se,{})]})},os=xe.memo(as),ls=()=>{const s=ye(),t=Pe(),a=N(Ee),o=l.useMemo(()=>t&&t in a?a[t]:null,[t,a]),u=N(De),_=l.useMemo(()=>t&&t in u?u[t]:[],[t,u]),m=N(Ne),g=l.useMemo(()=>o&&m[o.sceneId],[o,m]),c=N(r=>y(Y(r),Me)),x=N(r=>y(ke(r),we)||y(B(r),Le)||y(B(r),ve)||y(Te(r),Oe)),d=l.useCallback((r,S)=>s(Q(r,S)),[s]),E=l.useCallback(r=>s(Ie(r)),[s]),b=l.useCallback(r=>s(fe(r)),[s]),j=l.useCallback((r,S)=>s(Re(r,S)),[s]);return e.jsx(os,{project:o,deployments:_,scene:g,isLoading:c,isLoadingDeployments:x,onOpenModal:d,onDelete:E,onDuplicate:b,onLoadProjectScene:j})},xs=ls;export{xs as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ak as le,N as e,S as a,M as n,J as i,fA as ee,fB as Ie,eZ as k,cq as $e,cr as J,T as K,e$ as Ne,fC as oe,fD as Fe,a2 as B,fE as Ue,fF as fe,f8 as X,cO as de,fG as ue,ek as ve,cP as We,bq as O,fH as He,eN as ye,fI as Oe,eE as ze,fn as ke,b4 as Ye,a4 as Ee,fJ as V,fK as ne,R as A,f0 as Te,eC as me,fL as Ge,fM as qe,bp as se,ff as Qe,fe as Ve,fg as Ze,fa as Pe,f2 as Se,Q as _e,fN as Je,dO as Xe,eA as Ke,fj as es,fO as ss,fP as Z,fQ as as,fd as ts,eO as pe,fR as he,aM as ns,cZ as ls,fS as os,fT as is,ez as rs,fU as cs,fV as ds,b1 as us,f6 as y,fW as ms,eF as _s,P as H,fX as xe,a7 as ae,fY as ps,fh as te,fZ as ge,aa as hs,ab as w,fm as xs,f_ as gs,f$ as bs,g0 as Cs,g1 as js,g2 as Is}from"./index-HbI_NRfn.js";import{e as Ns}from"./hooks-TIqxBqu9.js";import{g as fs}from"./selector-CtnQnmhq.js";import{C as vs}from"./CollectionProvider.container-A9BHn77V.js";import{L as ys}from"./LoggedInDetailPage.container-JGDqajAT.js";import{N as ks}from"./NotFound-GY9JDZ-n.js";import{B as Es}from"./Back-Bf8NJ2pw.js";import{C as Ts}from"./CollectionStatus.container-BOY138hz.js";import{J as Ps}from"./JumpIn.container-BxOE2sT9.js";import{C as Ss}from"./ConfirmDelete-C2lcfdm9.js";import"./Navigation.container-DMse8-Rx.js";import"./selectors-DhSvUgcI.js";import"./SignInRequired-BWudNNPu.js";const Rs=({type:s})=>e.jsx(a.Popup,{content:n(s==="publish"?"collection_detail_page.cant_mint":"collection_detail_page.cant_push"),position:"top center",trigger:e.jsx("div",{className:"popup-button",children:e.jsx(a.Button,{secondary:!0,compact:!0,disabled:!0,children:n("collection_detail_page.under_review")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:s==="publish"}),be=le.memo(Rs),ws=s=>{const{collection:l,items:o,status:t,hasPendingCuration:u,onPublish:m,onPush:c,onInit:b}=s;i.useEffect(()=>{l.isPublished&&b()},[l,b]);const p=o.length>ee,I=i.useMemo(()=>o.length===0||!o.every(Ie)||p,[o,p]);let C;if(l.isPublished)l.isApproved?u?C=e.jsx(be,{type:"push"}):t===k.UNSYNCED?C=e.jsx(a.Button,{primary:!0,compact:!0,onClick:c,children:n("collection_detail_page.push_changes")}):C=e.jsx(a.Button,{secondary:!0,compact:!0,disabled:!0,children:n("global.published")}):C=e.jsx(be,{type:"publish"});else{const j=e.jsx($e,{disabled:I,primary:!0,compact:!0,onClick:m,network:J.Network.MATIC,children:n("collection_detail_page.publish")});if(I){let N;o.length>ee?N=n("collection_detail_page.publish_reason_max_items",{maxItems:ee}):o.length===0?N=n("collection_detail_page.publish_reason_no_items"):N=n("collection_detail_page.publish_reason_items_not_complete"),C=e.jsx(a.Popup,{content:N,position:"top center",trigger:e.jsx("div",{className:"popup-button",children:j}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0})}else C=j}return C},Ms=le.memo(ws),Ds=(s,l)=>{const{id:o}=l.collection,t=Ne(s);return{items:oe(s,o),status:t[o],hasPendingCuration:Fe(s,o)}},Ls=(s,l)=>{const{id:o}=l.collection;return{onPublish:()=>s(B("PublishWizardCollectionModal",{collectionId:o})),onPush:()=>s(B("PushCollectionChangesModal",{collectionId:o})),onInit:()=>s(Ue(o))}},Ce=K(Ds,Ls)(Ms),As="_dropdown_1a07a_1",Bs="_ellipsis_1a07a_9",$s="_menu_1a07a_13",Fs="_disabled_1a07a_13",Us="_item_1a07a_13",je={dropdown:As,ellipsis:Bs,menu:$s,disabled:Fs,item:Us},Ws=({collection:s,wallet:l,onOpenModal:o,onDelete:t})=>{const u=()=>{o("ManageCollectionRoleModal",{type:ue.MANAGER,collectionId:s.id,roles:s.managers})},m=()=>{o("ManageCollectionRoleModal",{type:ue.MINTER,collectionId:s.id,roles:s.minters})},c=()=>{o("AddExistingItemModal",{collectionId:s.id})},b=()=>{t(s)},p=fe(s,l.address);return e.jsx(a.Dropdown,{className:je.dropdown,trigger:e.jsx(a.Button,{basic:!0,children:e.jsx(a.Icon,{className:je.ellipsis,name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(a.Dropdown.Menu,{children:[s.isPublished?p?e.jsxs(e.Fragment,{children:[e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.managers"),onClick:u}),e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.minters"),onClick:m})]}):null:X(s)?null:e.jsxs(e.Fragment,{children:[e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.add_existing_item"),onClick:c}),e.jsx(Ss,{name:s.name,onDelete:b,trigger:e.jsx(a.Dropdown.Item,{text:n("global.delete")})})]}),e.jsx(de,{role:"option",className:"item",text:s.urn,children:e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.copy_urn")})}),e.jsx(a.Popup,{content:n("collection_context_menu.unpublished"),position:"right center",disabled:s.isPublished,trigger:e.jsx(de,{role:"option",className:"item",text:s.contractAddress,children:e.jsx(a.Dropdown.Item,{disabled:!s.isPublished,text:n("collection_context_menu.copy_address")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0})]})})},Hs=(s,l)=>({wallet:ve(s),items:oe(s,l.collection.id),name:We(s)||"",isForumPostLoading:O(ye(s),He)}),Os=s=>({onOpenModal:(l,o)=>s(B(l,o)),onPostToForum:(l,o)=>s(Oe(l,o)),onDelete:l=>s(ze(l))}),zs=K(Hs,Os)(Ws),Ys=({isEnabled:s,onClick:l})=>s?e.jsx(a.Dropdown.Item,{text:n("collection_item.reset_item"),onClick:l}):null,Gs=le.memo(Ys),qs=(s,l)=>{const{itemId:o}=l;return{isEnabled:ke(s)[o]===k.UNSYNCED}},Qs=(s,l)=>{const{itemId:o}=l;return{onClick:()=>s(B("ResetItemModal",{itemId:o}))}},Vs=K(qs,Qs)(Gs),Zs="_itemImage_10lcv_1",Js="_itemStatus_10lcv_9",Xs="_mana_10lcv_13",Ks="_grid_10lcv_19",ea="_row_10lcv_30",sa="_avatarColumn_10lcv_35",aa="_avatarContainer_10lcv_40",ta="_info_10lcv_44",na="_nameWrapper_10lcv_49",la="_badgeContainer_10lcv_54",oa="_badge_10lcv_54",ia="_name_10lcv_49",ra="_linkAction_10lcv_76",ca="_subtitle_10lcv_80",da="_itemActions_10lcv_86",ua="_removeSaleButton_10lcv_93",ma="_status_10lcv_98",_a="_ready_10lcv_112",pa="_notReady_10lcv_117",ha="_incomplete_10lcv_122",xa="_published_10lcv_126",ga="_underReview_10lcv_131",ba="_unsynced_10lcv_132",Ca="_alertIcon_10lcv_137",ja="_check_10lcv_148",Ia="_contextMenuButton_10lcv_152",Na="_contextMenu_10lcv_152",r={itemImage:Zs,itemStatus:Js,mana:Xs,grid:Ks,row:ea,avatarColumn:sa,avatarContainer:aa,info:ta,nameWrapper:na,badgeContainer:la,badge:oa,name:ia,linkAction:ra,subtitle:ca,itemActions:da,removeSaleButton:ua,status:ma,ready:_a,notReady:pa,incomplete:ha,published:xa,underReview:ga,unsynced:ba,alertIcon:Ca,check:ja,contextMenuButton:Ia,contextMenu:Na},fa=25;function va({onOpenModal:s,onSetItems:l,onRemoveFromSale:o,item:t,isOffchainPublicItemOrdersEnabled:u,isOffchainPublicItemOrdersEnabledVariants:m,collection:c,status:b,ethAddress:p,wallet:I,loadingTradeIds:C,isCancellingItemOrder:j}){const N=Ye(),f=Ee(),x=I&&V(c,I),T=I&&u&&ne(c,I),z=!u||T&&t.tradeId||x,E=i.useMemo(()=>{var R;return((R=m==null?void 0:m.payload.value.trim())==null?void 0:R.toLocaleLowerCase())===(p==null?void 0:p.toLocaleLowerCase())},[m,p]),P=i.useCallback(()=>{if(u&&T&&!E){s("PutForSaleOffchainModal",{itemId:t.id});return}s("EditPriceAndBeneficiaryModal",{itemId:t.id})},[t,s]),M=i.useCallback(()=>{s("SeeInWorldModal",{itemIds:[t.id]})},[s,t]),S=i.useCallback(()=>{l([t]),f.push(A.itemEditor({itemId:t.id,collectionId:t.collectionId}),{fromParam:Te.COLLECTIONS}),N==null||N.track("Preview Item",{ITEM_ID:t!=null&&t.urn?me(t.urn)?Ge(t.urn):qe(t.urn):null,ITEM_TYPE:t.type,ITEM_NAME:t.name,ITEM_IS_THIRD_PARTY:me(t.urn)})},[t,l,f]),$=i.useCallback(()=>{s("DeleteItemModal",{item:t})},[t,s]),Y=i.useCallback(()=>{s("MoveItemToAnotherCollectionModal",{item:t,fromCollection:c})},[t,s,c]),D=i.useCallback(()=>{s("PutForSaleOffchainModal",{itemId:t.id})},[]),L=i.useCallback(()=>{t.tradeId&&o(t.tradeId)},[t]),F=i.useCallback(()=>!t.price||E?e.jsx("div",{className:`link ${r.linkAction}`,onClick:se(P),children:n("collection_item.set_price")}):t.price===Qe.toString()||u&&!x&&!t.tradeId?e.jsx("span",{children:"-"}):Ve(t)?e.jsx("span",{children:n("global.free")}):e.jsx(a.Mana,{className:r.mana,network:J.Network.MATIC,showTooltip:!0,children:Ze(t.price)}),[t,x,u,P]),G=i.useCallback(()=>b===k.UNSYNCED?e.jsxs("div",{className:`${r.unsynced} ${r.status}`,children:[e.jsx("div",{className:r.alertIcon}),n("collection_item.unsynced")]}):b===k.UNDER_REVIEW||t.isPublished&&!t.isApproved?e.jsxs("div",{className:`${r.underReview} ${r.status}`,children:[e.jsx(a.Icon,{name:"clock outline"}),n("collection_item.under_review")]}):t.isPublished&&t.isApproved?e.jsxs("div",{className:`${r.published} ${r.status}`,children:[e.jsx(a.Icon,{name:"check circle outline"}),n("collection_item.published")]}):Ie(t)?e.jsxs("div",{className:`${r.ready} ${r.status}`,children:[e.jsx(a.Icon,{className:r.check,name:"cloud upload"}),n("collection_item.ready")]}):!t.price||Pe(t)&&!(Se in t.contents)?e.jsxs("div",{className:`${r.notReady} ${r.status}`,children:[e.jsx(a.Icon,{name:"exclamation circle"}),n("collection_item.not_ready")]}):e.jsx("span",{onClick:se(S),className:`link ${r.linkAction}`,children:n("collection_item.edit_item")}),[S,t,b]),U=i.useCallback(()=>e.jsx("div",{className:r.itemActions,children:e.jsx(a.Dropdown,{trigger:e.jsx(a.Button,{basic:!0,children:e.jsx(a.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:r.action,onClick:se(),children:e.jsxs(a.Dropdown.Menu,{className:r.contextMenu,children:[e.jsx(a.Dropdown.Item,{text:n("collection_item.see_details"),as:_e,to:A.itemDetail(t.id)}),e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.see_in_decentraland"),onClick:M}),e.jsx(a.Dropdown.Item,{text:n("collection_item.preview"),onClick:S}),!c.isPublished&&e.jsx(a.Dropdown.Item,{text:n("collection_item.move_to_another_collection"),onClick:Y}),Je(c,t,p)&&!X(c)?e.jsxs(e.Fragment,{children:[t.price&&z?e.jsx(a.Dropdown.Item,{text:n("collection_item.edit_price"),onClick:P}):null,e.jsx(Vs,{itemId:t.id}),t.isPublished?null:e.jsxs(e.Fragment,{children:[e.jsx(a.Dropdown.Divider,{}),e.jsx(a.Dropdown.Item,{text:n("collection_item.delete_item"),onClick:$})]})]}):null]})})}),[c,t,p,M,S,Y,P,$]),v=t.data;return e.jsxs(a.Table.Row,{className:`CollectionItem ${r.row}`,children:[e.jsx(a.Table.Cell,{className:`${r.avatarColumn}`,width:t.name.length>fa?6:5,children:e.jsx(_e,{to:A.itemDetail(t.id),className:"CollectionItem",children:e.jsxs("div",{className:r.avatarContainer,children:[e.jsx(Xe,{className:r.itemImage,item:t}),e.jsx("div",{className:r.info,children:e.jsx("div",{className:r.nameWrapper,children:e.jsxs("div",{className:r.name,title:t.name,children:[e.jsx(Ke,{className:r.itemStatus,item:t}),t.name,e.jsx("div",{className:r.badgeContainer,children:e.jsx(es,{className:r.badge,item:t,size:"small"})})]})})})]})})}),e.jsx(a.Table.Cell,{className:r.column,children:t.rarity&&v.category?e.jsx(ss,{size:"medium",rarity:t.rarity,withTooltip:!0}):null}),e.jsx(a.Table.Cell,{className:r.column,children:v.category?e.jsx("div",{children:n(`${t.type}.category.${v.category}`)}):null}),Z(t)&&as(v)?e.jsx(a.Table.Cell,{className:r.column,children:v.category?e.jsx("div",{children:n(`emote.play_mode.${v.loop?"loop":"simple"}.text`)}):null}):null,E||u&&!c.isPublished?null:e.jsx(a.Table.Cell,{className:r.column,children:F()}),t.isPublished&&t.isApproved?e.jsx(a.Table.Cell,{className:r.column,children:e.jsxs("div",{children:[t.totalSupply,"/",ts(t)]})}):null,e.jsx(a.Table.Cell,{children:G()}),u&&!x&&!t.tradeId&&t.isPublished&&e.jsx(a.Table.Cell,{children:e.jsx(a.Button,{primary:!0,size:"tiny",disabled:!T,onClick:D,children:n("collection_item.put_for_sale")})}),u&&t.tradeId&&e.jsx(a.Table.Cell,{children:e.jsx(a.Button,{secondary:!0,size:"tiny",className:r.removeSaleButton,onClick:L,loading:j&&C.includes(t.tradeId),children:n("collection_item.remove_from_sale")})}),e.jsx(a.Table.Cell,{className:r.contextMenuButton,children:U()})]})}const ya=(s,l)=>{const o=ke(s),t=pe(s).filter(u=>u.type===he).map(u=>u.payload.tradeId);return{ethAddress:ns(s),status:o[l.item.id],wallet:ls(s),isOffchainPublicItemOrdersEnabled:os(s),isOffchainPublicItemOrdersEnabledVariants:is(s),isCancellingItemOrder:O(pe(s),he),loadingTradeIds:t}},ka=s=>({onOpenModal:(l,o)=>s(B(l,o)),onDeleteItem:l=>s(rs(l)),onSetItems:l=>s(cs(l)),onRemoveFromSale:l=>s(ds(l,!0))}),Ea=K(ya,ka)(va);function Ta({collection:s,wallet:l,items:o,isOnSaleLoading:t,lastLocation:u,status:m,onOpenModal:c,isLoading:b,onFetchCollectionForumPostReply:p}){const I=us(),C=i.useMemo(()=>new URLSearchParams(I.search).get("tab"),[I]),[j,N]=i.useState(C||y.WEARABLE),f=Ee(),x=u===A.collections(),T=i.useCallback(()=>{s&&s.isPublished&&!s.isApproved&&s.forumLink&&p(s.id)},[s,p]);i.useEffect(()=>{s&&T()},[s]);const z=i.useCallback(()=>{c("MintItemsModal",{collectionId:s.id})},[s,c]),E=i.useCallback(()=>{c("CreateSingleItemModal",{collectionId:s.id})},[s,c]),P=i.useCallback(()=>{s&&!s.isPublished&&c("EditCollectionNameModal",{collection:s})},[s,c]),M=i.useCallback(()=>{s&&c("SellCollectionModal",{collectionId:s.id,isOnSale:ne(s,l)||V(s,l)})},[s,l,c]),S=i.useCallback(()=>{x?f.goBack():f.push(A.collections())},[f,x]),$=i.useCallback(()=>{s&&f.push(ms(s,o),{fromParam:Te.COLLECTIONS})},[f,s,o]),Y=i.useCallback((d,h="")=>{const _=window.open(d,h);_&&_.focus()},[]),D=i.useCallback(()=>{s&&s.isPublished&&s.forumLink&&Y(s.forumLink,"_blank")},[s]),L=i.useCallback(d=>{N(d),f.push(A.collectionDetail(s.id,_s.STANDARD,{tab:j}))},[s,f]),F=i.useCallback(d=>{const h=d===y.WEARABLE?n("collection_detail_page.wearables"):n("collection_detail_page.emotes");return e.jsx(a.Popup,{className:"modal-tooltip",content:n("collection_detail_page.missing_item_price",{item_type:h.toLowerCase()}),position:"top center",trigger:e.jsx("i",{"aria-hidden":"true",className:"circle icon tiny"})})},[]),G=i.useCallback(()=>e.jsx(a.Popup,{className:"modal-tooltip",content:n("collection_detail_page.missing_smart_wearable_video"),position:"top center",trigger:e.jsx("i",{"aria-hidden":"true",className:"circle icon tiny"})}),[]),U=i.useCallback(d=>{if(!s)return null;const h=X(s),_=d.length>0;return e.jsxs(e.Fragment,{children:[e.jsx(Ps,{size:"small",active:!0,collection:s,text:n("global.see_in_decentraland"),disabled:h||!_}),e.jsxs(a.Button,{basic:!0,className:"action-button",disabled:h||!_,onClick:$,children:[e.jsx(H,{name:"cube"}),e.jsx("span",{className:"text",children:n("collection_detail_page.preview")})]}),_&&!s.isPublished?e.jsxs(a.Button,{basic:!0,className:"action-button add-items",disabled:h,onClick:E,children:[e.jsx(H,{name:"add-active"}),e.jsx("span",{className:"text",children:n("collection_detail_page.add_item")})]}):null]})},[s,$,E]),v=i.useCallback(()=>{if(!s)return null;const d=V(s,l),h=ne(s,l);return d?e.jsx(xe,{network:J.Network.MATIC,children:_=>e.jsx(a.Button,{className:ae("action-button",d?"basic":"primary"),disabled:t||!_,onClick:M,children:e.jsx("span",{className:"text",children:d?n("collection_detail_page.remove_from_marketplace"):n("collection_detail_page.put_for_sale")})})}):h?null:e.jsx(xe,{network:J.Network.MATIC,children:_=>e.jsxs(a.Button,{className:ae("action-button",h?"secondary":"primary"),disabled:t||!_,onClick:M,children:[e.jsx(a.Icon,{name:"lock"}),e.jsx("span",{className:"text",children:n("collection_detail_page.enable_sales")})]})})},[s,M]),R=i.useCallback((d="tiny")=>{if(s!=null&&s.forumPostReply){const{highest_post_number:h,last_read_post_number:_}=s.forumPostReply,q=h-(_??0);return e.jsx(a.Label,{className:"badge-forum-unread-posts",circular:!0,size:d,children:q})}return null},[s]),ie=i.useCallback(()=>!(s!=null&&s.isApproved)||![k.UNSYNCED,k.UNDER_REVIEW].includes(m)?null:e.jsxs("div",{className:"unsynced-collection container",children:[e.jsx("i",{className:"unsynced-collection alert-icon"}),e.jsxs("div",{className:"unsynced-collection message",children:[e.jsx("h4",{className:"unsynced-collection title",children:n("collection_detail_page.unsynced_collection_title")}),e.jsx("p",{className:"unsynced-collection text",children:n(`collection_detail_page.${m}_collection_message`,{br:e.jsx("br",{})})})]}),m===k.UNDER_REVIEW?e.jsxs(a.Button,{primary:!0,onClick:D,className:"unsynced-collection action-button",children:[e.jsx("span",{children:n("collection_context_menu.forum_post")}),R("medium")]}):null,m===k.UNSYNCED?e.jsx(Ce,{collection:s}):null]}),[s,m,R,D]),Re=i.useCallback(d=>{if(!s)return null;const h=ps(s,l.address),_=X(s),q=V(s,l),Q=d.some(Z),W=d.some(te),we=Q?d.some(g=>Z(g)&&!g.price):!1,Me=W?d.some(g=>te(g)&&!g.price):!1,De=W&&d.some(g=>Pe(g)&&!(Se in g.contents)),ce=Q&&!W,Le=W&&!Q,Ae=d.filter(g=>Le?te(g):ce?Z(g):g.type===j),Be=Q&&W;return e.jsxs(e.Fragment,{children:[e.jsx(a.Section,{className:ae({"is-published":s.isPublished}),children:e.jsxs(a.Row,{children:[e.jsx(Es,{absolute:!0,onClick:S}),e.jsx(a.Narrow,{children:e.jsxs(a.Row,{children:[e.jsx(a.Column,{grow:!1,className:"name-container",children:_?e.jsxs(a.Header,{size:"huge",className:"name",children:[s.isPublished&&e.jsx(Ts,{collection:s}),s.name]}):e.jsxs(a.Row,{className:"header-row",onClick:P,children:[e.jsx(a.Header,{size:"huge",className:"name",children:s.name}),e.jsx(H,{name:"edit",className:"edit-collection-name"}),q?e.jsx(a.Label,{className:"badge-on-sale",size:"small",circular:!0,children:n("collection_detail_page.on_sale")}):null]})}),e.jsx(a.Column,{align:"right",className:"actions-container",shrink:!1,grow:!1,children:e.jsxs(a.Row,{className:"actions",children:[s.isPublished&&s.isApproved?e.jsx(a.Popup,{content:n("collection_detail_page.can_mint"),className:"CollectionDetailPage popup-mint",position:"top center",trigger:e.jsx(a.Button,{basic:!0,className:"action-button",disabled:!h,onClick:z,children:e.jsx("span",{className:"text",children:n("collection_detail_page.mint_items")})}),on:"hover",inverted:!0,flowing:!0}):null,s.isPublished&&s.forumLink&&!s.isApproved?e.jsxs(e.Fragment,{children:[e.jsx(a.Button,{basic:!0,onClick:D,children:e.jsx("span",{children:n("collection_context_menu.forum_post")})}),s!=null&&s.forumPostReply?R():null]}):null,!(s.isPublished&&s.isApproved)&&m!==k.UNSYNCED?e.jsx(Ce,{collection:s}):null,fe(s,l.address)&&s.isPublished&&s.isApproved?v():null,ge(s,l.address)?e.jsx(zs,{collection:s}):null]})})]})})]})}),e.jsxs(a.Narrow,{children:[ie(),Be?e.jsxs(a.Tabs,{isFullscreen:!0,children:[e.jsxs(a.Tabs.Tab,{active:j===y.WEARABLE,onClick:()=>L(y.WEARABLE),children:[e.jsx(H,{name:"wearable"}),n("collection_detail_page.wearables"),Me?F(y.WEARABLE):De?G():null]}),e.jsxs(a.Tabs.Tab,{active:j===y.EMOTE,onClick:()=>L(y.EMOTE),children:[e.jsx(H,{name:"emote"}),n("collection_detail_page.emotes"),we?F(y.EMOTE):null]}),e.jsx("div",{className:"secondary-actions tab",children:U(d)})]}):e.jsx("div",{className:"secondary-actions",children:U(d)}),d.length>0?e.jsxs(a.Table,{basic:"very",children:[e.jsx(a.Table.Header,{children:e.jsxs(a.Table.Row,{children:[e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.item")}),e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.rarity")}),e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.category")}),j===y.EMOTE||ce?e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.play_mode")}):null,s.isPublished?e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.price")}):null,s.isPublished&&s.isApproved?e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.supply")}):null,e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.status")}),!q&&e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.actions")}),e.jsx(a.Table.HeaderCell,{})]})}),e.jsx(a.Table.Body,{children:Ae.map(g=>e.jsx(Ea,{collection:s,item:g},g.id))})]}):e.jsxs("div",{className:"empty",children:[e.jsx("div",{className:"sparkles"}),e.jsxs("div",{children:[e.jsx("span",{className:"empty-collection-title",children:n("collection_detail_page.add_items_title")}),e.jsx("br",{}),n("collection_detail_page.add_items_subtitle"),e.jsx("br",{}),n("collection_detail_page.cant_remove"),e.jsx("br",{}),e.jsx(a.Button,{basic:!0,className:"empty-action-button",disabled:_,onClick:E,children:e.jsx("span",{className:"text",children:n("collection_detail_page.add_item")})})]})]})]})]})},[j,m,l,s,E,U,P,F,L,ie,v,L,D,G,R,z,S]),re=l!==null&&s!==null&&ge(s,l.address);return e.jsx(vs,{id:s==null?void 0:s.id,itemsPage:1,itemsPageSize:5e3,children:({isLoadingCollection:d,isLoadingCollectionItems:h,items:_})=>e.jsx(ys,{className:"CollectionDetailPage",hasNavigation:!re&&!b&&!d,isLoading:b||d||h,children:re?Re(_):e.jsx(ks,{})})})}const Pa=()=>{const s=hs(),l=Ns()||"",o=w(ve),t=w(x=>xs(x,l)),u=w(Ne),m=w(gs),c=w(ye),b=w(x=>oe(x,l)),p=w(fs),I=i.useMemo(()=>m||O(c,Cs),[m,c]),C=u[l],j=O(c,js)||O(c,Is),N=i.useCallback((x,T)=>s(B(x,T)),[s]),f=i.useCallback(x=>s(bs(x)),[s]);return e.jsx(Ta,{wallet:o,collection:t,isOnSaleLoading:I,isLoading:j,items:b,status:C,lastLocation:p,onOpenModal:N,onFetchCollectionForumPostReply:f})},za=Pa;export{za as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g}from"./index-
|
|
1
|
+
import{a as g}from"./index-BfR6FKwz.js";import"./index-HbI_NRfn.js";var m=Object.defineProperty,v=Object.defineProperties,y=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,d=(e,r,t)=>r in e?m(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,h=(e,r)=>{for(var t in r||(r={}))w.call(r,t)&&d(e,t,r[t]);if(c)for(var t of c(r))f.call(r,t)&&d(e,t,r[t]);return e},_=(e,r)=>v(e,y(r)),u=(e,r,t)=>new Promise((n,s)=>{var l=i=>{try{o(t.next(i))}catch(p){s(p)}},a=i=>{try{o(t.throw(i))}catch(p){s(p)}},o=i=>i.done?n(i.value):Promise.resolve(i.value).then(l,a);o((t=t.apply(e,r)).next())}),b=(e=>(e.Start="magic_oauth_login_with_redirect_start",e.Verify="magic_oauth_login_with_redirect_verify",e.Popup="magic_oauth_login_with_popup",e.VerifyTelegramData="magic_oauth_verify_telegram_data",e))(b||{}),R=(e=>(e.InvalidRequest="invalid_request",e.InvalidClient="invalid_client",e.InvalidScope="invalid_scope",e.InvalidGrant="invalid_grant",e.UnauthorizedClient="unauthorized_client",e.UnsupportedResponseType="unsupported_response_type",e.UnsupportedGrantType="unsupported_grant_type",e.UnsupportedTokenType="unsupported_token_type",e.AccessDenied="access_denied",e.ServerError="server_error",e.TemporarilyUnavailable="temporarily_unavailable",e))(R||{}),I=class extends g.Internal{constructor(){super(),this.name="oauth2",this.config={},this.compat={"magic-sdk":">=2.4.6","@magic-sdk/react-native":!1,"@magic-sdk/react-native-bare":!1,"@magic-sdk/react-native-expo":!1},this.seamlessTelegramLogin()}loginWithRedirect(e){return this.utils.createPromiEvent((r,t)=>u(this,null,function*(){var n;let s=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_redirect_start",[_(h({},e),{apiKey:this.sdk.apiKey,platform:"web"})]),l=yield this.request(s),a=l,o=l;if(o.error&&t(this.createError(o.error,(n=o.error_description)!=null?n:"An error occurred.",{errorURI:o.error_uri,provider:o.provider})),a!=null&&a.oauthAuthoriationURI){let i=a.useMagicServerCallback?new URL(a.oauthAuthoriationURI,this.sdk.endpoint).href:a.oauthAuthoriationURI;a!=null&&a.shouldReturnURI?r(i):window.location.href=i}r(null)}))}getRedirectResult(e,r){let t=r||window.location.search,n=window.location.origin+window.location.pathname;return window.history.replaceState(null,"",n),P.call(this,t,e)}loginWithPopup(e){let r=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_popup",[_(h({},e),{apiKey:this.sdk.apiKey,platform:"web"})]);return this.request(r)}seamlessTelegramLogin(){try{if(!window.location.hash.toString().includes("#tgWebAppData"))return;let e=document.createElement("script");e.src="https://telegram.org/js/telegram-web-app.js",document.head.prepend(e),e.onload=()=>u(this,null,function*(){var r;try{let t=(r=window.Telegram)==null?void 0:r.WebApp.initData,n=this.utils.createJsonRpcRequestPayload("magic_oauth_verify_telegram_data",[{userData:t,isMiniApp:!0}]);yield this.request(n)}catch(t){console.log("Error while verifying telegram data",t)}})}catch(e){console.log("Error while loading telegram-web-app script",e)}}};function P(e,r){return this.utils.createPromiEvent((t,n)=>u(this,null,function*(){var s;let l=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_redirect_verify",[{authorizationResponseParams:e,magicApiKey:this.sdk.apiKey,platform:"web",lifespan:r}]),a=yield this.request(l),o=a,i=a;i.error&&n(this.createError(i.error,(s=i.error_description)!=null?s:"An error occurred.",{errorURI:i.error_uri,provider:i.provider})),t(o)}))}export{R as OAuthErrorCode,I as OAuthExtension,b as OAuthPayloadMethods};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as f,B as a}from"./index-
|
|
1
|
+
import{q as f,B as a}from"./index-HbI_NRfn.js";var l=function(o,r){if(typeof Blob>"u"||!(o instanceof Blob))throw new Error("first argument must be a Blob");if(typeof r!="function")throw new Error("second argument must be a function");const e=new FileReader;function n(t){e.removeEventListener("loadend",n,!1),t.error?r(t.error):r(null,a.from(e.result))}e.addEventListener("loadend",n,!1),e.readAsArrayBuffer(o)};const u=f(l),s=Object.freeze(Object.defineProperty({__proto__:null,default:u},Symbol.toStringTag,{value:"Module"}));export{s as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{q as le}from"./index-
|
|
1
|
+
import{q as le}from"./index-HbI_NRfn.js";function me(w,f){for(var h=0;h<f.length;h++){const x=f[h];if(typeof x!="string"&&!Array.isArray(x)){for(const u in x)if(u!=="default"&&!(u in w)){const s=Object.getOwnPropertyDescriptor(x,u);s&&Object.defineProperty(w,u,s.get?s:{enumerable:!0,get:()=>x[u]})}}}return Object.freeze(Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}))}var J=function(w,f){var h={};function x(u){if(h[u])return h[u].exports;var s=h[u]={i:u,l:!1,exports:{}};return w[u].call(s.exports,s,s.exports,x),s.l=!0,s.exports}return x(732)}({336:function(w,f,h){Object.defineProperty(f,"__esModule",{value:!0});const x=h(946),u=h(623);class s extends u.SceneWriter{constructor(){super(...arguments),this.instanceCount=0,this.nameMapping={}}addEntity(a,e){if(this.entities.has(a))throw new Error(`There is already an entity with name "${a}"`);this.nameMapping[a]=++this.instanceCount,this.entities.set(a,e)}getEntityName(a){const e=super.getEntityName(a);return e&&""+this.nameMapping[e]}stepPrologue(){return`dcl.subscribe('sceneStart');
|
|
2
2
|
`}stepStartEntity(a,e){return`dcl.addEntity('${e}');
|
|
3
3
|
`}stepSetEntityParent(a,e,n){let t="0";if(n&&(t=this.getEntityName(n),!t))throw new Error(`Parent entity of "${super.getEntityName(a)}" is missing, you should add parents first.`);return`dcl.setParent('${e}', '${t}');
|
|
4
4
|
`}stepWriteComponentDeclaration(a,e,n,t){return x.getComponentName(e)==="engine.transform"?`dcl.updateEntityComponent('${this.getEntityName(a)}', 'engine.transform', ${x.getComponentClassId(e)}, JSON.stringify(${JSON.stringify(e)}));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BnKY49se.js","assets/index-HbI_NRfn.js","assets/index-BGkKHC6q.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{B as pe,_ as me}from"./index-HbI_NRfn.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.19.1-19862996915.commit-78aa089",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.19.1-19862996915.commit-78aa089",VITE_REACT_APP_WEBSITE_VERSION:"7.19.1-19862996915.commit-78aa089"},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=(i,a=++f[0])=>{I!==a&&(I=a,v.forEach(r=>r(i,a)))};let j=f[1];const O=(i=++f[1])=>(j!==i&&!v.size&&(j=i,y.forEach(([a])=>{const r=a[1](i);r>I&&(I=r)})),I),A=i=>(a,r)=>{const h=[...a];h[1]=[i,...h[1]],b(h,r)},y=new Map,H=(i,a)=>{if((z?"production":void 0)!=="production"&&y.has(i))throw new Error("prop listener already exists");if(v.size){const r=a[3](A(i));y.set(i,[a,r])}else y.set(i,[a])},Z=i=>{var a;const r=y.get(i);r&&(y.delete(i),(a=r[1])==null||a.call(r))},ue=i=>(v.add(i),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(i),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(i,a){const r=Reflect.get(i,a);Z(a);const h=Reflect.deleteProperty(i,a);return h&&b(["delete",[a],r]),h},set(i,a,r,h){const U=Reflect.has(i,a),N=Reflect.get(i,a,h);if(U&&(e(N,r)||d.has(r)&&e(N,d.get(r))))return!0;Z(a),F(r)&&(r=ye(r)||r);let V=r;if(r instanceof Promise)r.then(L=>{r.status="fulfilled",r.value=L,b(["resolve",[a],L])}).catch(L=>{r.status="rejected",r.reason=L,b(["reject",[a],L])});else{!C.has(r)&&s(r)&&(V=W(r));const L=!x.has(V)&&C.get(V);L&&H(a,L)}return Reflect.set(i,a,V,h),b(["set",[a],r,N]),!0}});d.set(o,k);const fe=[q,O,c,ue];return C.set(k,fe),Reflect.ownKeys(o).forEach(i=>{const a=Object.getOwnPropertyDescriptor(o,i);"value"in a&&(k[i]=o[i],delete a.value,delete a.writable),Object.defineProperty(q,i,a)}),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 ae=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}=ae?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}=ae?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,ie=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(ie)for(var s of ie(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-BnKY49se.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
|
-
.DeploymentDetail{border-bottom:1px solid var(--divider);display:flex;align-items:center;padding:24px;margin-bottom:8px;background-color:var(--dark-two);border-radius:10px;gap:45px}.DeploymentDetail:first-child{border-top:1px solid var(--divider)}.DeploymentDetail:last-child{grid-column-end:-1}.DeploymentDetail.clickable:hover{background-color:#24212966;cursor:pointer}.DeploymentDetail .atlas-wrapper{width:95px;height:95px;background-color:var(--card);border-radius:8px}.DeploymentDetail .atlas-wrapper canvas{border-radius:8px}.DeploymentDetail .thumbnail-wrapper{background-color:var(--card);border-radius:8px}.DeploymentDetail .thumbnail-wrapper .thumbnail{width:95px;height:95px;border-radius:8px}.DeploymentDetail .title{font-size:15px;font-weight:600;font-stretch:normal;font-style:normal;line-height:1.6;letter-spacing:normal}.DeploymentDetail .stat{display:flex;flex-direction:column;min-width:128px;margin-right:32px}.DeploymentDetail .status{width:10px;height:10px;margin-bottom:1px;display:inline-block;border-radius:100%;margin-right:6px}.DeploymentDetail .status.online{background-color:#3fff47}.DeploymentDetail .status.needs-sync{background-color:orange}.DeploymentDetail .ui.dropdown{position:absolute;right:0}.DeploymentDetail .Stats .value .world-url{display:flex;flex-direction:row}.DeploymentDetail .Stats .value .world-url .icon.link,.DeploymentDetail .Stats .value .world-url a{color:var(--text)}.DeploymentDetail .Stats .value .world-url .icon.link{margin-left:5px}._modalContainer_5geih_1.ui.modal{width:740px;height:740px;display:flex!important;flex-direction:column;align-items:center;justify-content:center}._modalContainer_5geih_1 .dcl.modal-navigation{width:100%}._modalContainer_5geih_1 .dcl.modal-navigation-title{max-width:560px;text-align:center}._subtitle_5geih_20{font-size:14px;line-height:16px;text-align:center;max-width:560px}._modalContainer_5geih_1.ui.modal>._content_5geih_27{flex:1;display:flex;flex-direction:column;justify-content:space-between;align-items:center}._actions_5geih_35{display:flex;flex-direction:column;gap:15px;align-items:center;justify-content:center;width:100%}._actions_5geih_35 button{width:100%;max-width:476px}._actions_5geih_35 button.ui.button:not(:first-child){margin-left:0}._loadingMessage_5geih_53{display:flex}._loader_5geih_57.ui.loader.inline{margin-right:10px}.SceneDetailPage{margin-top:24px}.SceneDetailPage .dcl.section.large{margin-bottom:26px}.SceneDetailPage .dcl.back{margin-right:8px}.SceneDetailPage .header-image{height:347px;width:100%;background-color:var(--card);background-size:cover;background-position:center;object-fit:cover}.SceneDetailPage .capitalize .ui.header:not(.sub){text-transform:capitalize}.SceneDetailPage .header.name{display:flex;align-items:baseline}.SceneDetailPage .header.name .icon.edit{margin-left:21px;font-size:20px;cursor:pointer}.SceneDetailPage .status-container{margin-left:40px}.SceneDetailPage .status-badge{height:22px;padding:2px 8px;border-radius:34px;color:var(--shadows);font-weight:500;margin-right:10px}.SceneDetailPage .button.download-button,.SceneDetailPage .button.download-button:hover{background-color:#fff;color:var(--shadows)}.SceneDetailPage .button.edit-button .icon.edit{margin-right:6.85px}.SceneDetailPage .dcl.column.actions{margin-left:20px}.SceneDetailPage .dcl.section.medium.no-margin-bottom{margin-bottom:0}.SceneDetailPage .dcl.section .ui.header.sub{margin-bottom:32px;color:var(--text);font-size:20px;font-weight:400}.SceneDetailPage .empty-deployments-container{display:flex;flex-direction:column;padding:28px;background-color:var(--dark-two);color:var(--text);border:none}.SceneDetailPage .empty-deployments-thumbnail{height:86px;width:86px;background-position:center;background-size:contain;background-repeat:no-repeat;background-image:url(https://cdn.decentraland.org/@dcl/builder-site/7.19.
|
|
1
|
+
.DeploymentDetail{border-bottom:1px solid var(--divider);display:flex;align-items:center;padding:24px;margin-bottom:8px;background-color:var(--dark-two);border-radius:10px;gap:45px}.DeploymentDetail:first-child{border-top:1px solid var(--divider)}.DeploymentDetail:last-child{grid-column-end:-1}.DeploymentDetail.clickable:hover{background-color:#24212966;cursor:pointer}.DeploymentDetail .atlas-wrapper{width:95px;height:95px;background-color:var(--card);border-radius:8px}.DeploymentDetail .atlas-wrapper canvas{border-radius:8px}.DeploymentDetail .thumbnail-wrapper{background-color:var(--card);border-radius:8px}.DeploymentDetail .thumbnail-wrapper .thumbnail{width:95px;height:95px;border-radius:8px}.DeploymentDetail .title{font-size:15px;font-weight:600;font-stretch:normal;font-style:normal;line-height:1.6;letter-spacing:normal}.DeploymentDetail .stat{display:flex;flex-direction:column;min-width:128px;margin-right:32px}.DeploymentDetail .status{width:10px;height:10px;margin-bottom:1px;display:inline-block;border-radius:100%;margin-right:6px}.DeploymentDetail .status.online{background-color:#3fff47}.DeploymentDetail .status.needs-sync{background-color:orange}.DeploymentDetail .ui.dropdown{position:absolute;right:0}.DeploymentDetail .Stats .value .world-url{display:flex;flex-direction:row}.DeploymentDetail .Stats .value .world-url .icon.link,.DeploymentDetail .Stats .value .world-url a{color:var(--text)}.DeploymentDetail .Stats .value .world-url .icon.link{margin-left:5px}._modalContainer_5geih_1.ui.modal{width:740px;height:740px;display:flex!important;flex-direction:column;align-items:center;justify-content:center}._modalContainer_5geih_1 .dcl.modal-navigation{width:100%}._modalContainer_5geih_1 .dcl.modal-navigation-title{max-width:560px;text-align:center}._subtitle_5geih_20{font-size:14px;line-height:16px;text-align:center;max-width:560px}._modalContainer_5geih_1.ui.modal>._content_5geih_27{flex:1;display:flex;flex-direction:column;justify-content:space-between;align-items:center}._actions_5geih_35{display:flex;flex-direction:column;gap:15px;align-items:center;justify-content:center;width:100%}._actions_5geih_35 button{width:100%;max-width:476px}._actions_5geih_35 button.ui.button:not(:first-child){margin-left:0}._loadingMessage_5geih_53{display:flex}._loader_5geih_57.ui.loader.inline{margin-right:10px}.SceneDetailPage{margin-top:24px}.SceneDetailPage .dcl.section.large{margin-bottom:26px}.SceneDetailPage .dcl.back{margin-right:8px}.SceneDetailPage .header-image{height:347px;width:100%;background-color:var(--card);background-size:cover;background-position:center;object-fit:cover}.SceneDetailPage .capitalize .ui.header:not(.sub){text-transform:capitalize}.SceneDetailPage .header.name{display:flex;align-items:baseline}.SceneDetailPage .header.name .icon.edit{margin-left:21px;font-size:20px;cursor:pointer}.SceneDetailPage .status-container{margin-left:40px}.SceneDetailPage .status-badge{height:22px;padding:2px 8px;border-radius:34px;color:var(--shadows);font-weight:500;margin-right:10px}.SceneDetailPage .button.download-button,.SceneDetailPage .button.download-button:hover{background-color:#fff;color:var(--shadows)}.SceneDetailPage .button.edit-button .icon.edit{margin-right:6.85px}.SceneDetailPage .dcl.column.actions{margin-left:20px}.SceneDetailPage .dcl.section.medium.no-margin-bottom{margin-bottom:0}.SceneDetailPage .dcl.section .ui.header.sub{margin-bottom:32px;color:var(--text);font-size:20px;font-weight:400}.SceneDetailPage .empty-deployments-container{display:flex;flex-direction:column;padding:28px;background-color:var(--dark-two);color:var(--text);border:none}.SceneDetailPage .empty-deployments-thumbnail{height:86px;width:86px;background-position:center;background-size:contain;background-repeat:no-repeat;background-image:url(https://cdn.decentraland.org/@dcl/builder-site/7.19.1-19862996915.commit-78aa089/assets/scene-CZXq89b-.svg);margin-bottom:16px}.SceneDetailPage .deployments+.notice{color:var(--text);text-align:right;margin-top:8px}.SceneDetailPage .description-content{font-size:20px;font-weight:400}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a4 as A,J as t,aG as
|
|
1
|
+
import{a4 as A,J as t,aG as L,R as B,N as e,M as l,S as n,P as v,a7 as f,cM as S,cN as T,cL as P,Q as M,cO as R,aa as w,ab as p,cY as O,bq as V,cU as U,cP as $,cT as D,cZ as q,c_ as G,a2 as H,c$ as Q}from"./index-HbI_NRfn.js";import{b as J}from"./hooks-TIqxBqu9.js";import{L as K}from"./LoggedInDetailPage.container-JGDqajAT.js";import{N as W}from"./Navigation.container-DMse8-Rx.js";import"./SignInRequired-BWudNNPu.js";import"./selectors-DhSvUgcI.js";const Y="_main_7p9v2_1",Z="_fields_7p9v2_9",z="_ensImage_7p9v2_16",X="_field_7p9v2_9",ee="_fieldContainer_7p9v2_29",ae="_fieldTitle_7p9v2_41",se="_subdomain_7p9v2_50",le="_actionBtn_7p9v2_64",ne="_editableFieldValue_7p9v2_84",ie="_avatar_7p9v2_90",te="_avatarImg_7p9v2_97",de="_avatarName_7p9v2_104",ce="_ensBtn_7p9v2_109",oe="_address_7p9v2_116",re="_returnLink_7p9v2_122",me="_editableField_7p9v2_84",_e="_emptyFieldPlaceholder_7p9v2_138",pe="_pin_7p9v2_144",ue="_externalLink_7p9v2_154",he="_unclaimedBadge_7p9v2_159",xe="_disabled_7p9v2_170",s={main:Y,fields:Z,ensImage:z,field:X,fieldContainer:ee,fieldTitle:ae,subdomain:se,actionBtn:le,editableFieldValue:ne,avatar:ie,avatarImg:te,avatarName:de,ensBtn:ce,address:oe,returnLink:re,editableField:me,emptyFieldPlaceholder:_e,pin:pe,externalLink:ue,unclaimedBadge:he,disabled:xe};function Ne(r){const{ens:a,isLoading:j,alias:u,avatar:m,name:_,wallet:h,onOpenModal:c,onFetchENS:x}=r,d=A(),g=t.useMemo(()=>a?`${L.get("MARKETPLACE_API")}/ens/generate?ens=${a.name}&width=330&height=330`:"",[a]),o=(a==null?void 0:a.ensOwnerAddress)!==(a==null?void 0:a.nftOwnerAddress);t.useEffect(()=>{_&&h&&x(_)},[_,h,x]);const b=t.useCallback(()=>{c("EnsMapAddressModal",{ens:a})},[c,a]),F=t.useCallback(()=>{c("UseAsAliasModal",{newName:a==null?void 0:a.name})},[c,a==null?void 0:a.name]),N=t.useCallback(()=>{d.push(B.ensSelectLand(a==null?void 0:a.subdomain))},[d,a==null?void 0:a.subdomain]),C=t.useCallback(()=>{c("ReclaimNameModal",{ens:a})},[c]),k=t.useMemo(()=>{var I;let i;return u!==(a==null?void 0:a.name)?i=e.jsxs("div",{className:s.editableField,children:[e.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.unassign")}),e.jsx(n.Button,{compact:!0,primary:!0,onClick:F,className:s.actionBtn,"aria-label":l("ens_detail_page.set_as_primary"),children:e.jsx(n.Icon,{name:"user plus"})})]}):i=e.jsx("div",{className:s.editableField,children:e.jsxs("span",{className:s.avatar,"data-testid":"alias-avatar",children:[m?e.jsx("img",{className:s.avatarImg,src:((I=m.avatar.snapshots)==null?void 0:I.face256)||"",alt:m.realName}):e.jsx(v,{name:"profile"}),e.jsx("span",{className:s.avatarName,children:a.name}),l("ens_list_page.table.you")]})}),e.jsxs("div",{className:s.field,children:[e.jsxs("span",{className:s.fieldTitle,children:[l("ens_detail_page.alias"),e.jsx(n.InfoTooltip,{on:"click",content:l("ens_detail_page.tooltips.alias")})]}),i]})},[a==null?void 0:a.name,o,m,u,F]),E=t.useMemo(()=>{let i=null;return o?i=e.jsxs("div",{className:f(s.editableField,s.disabled),children:[e.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.reclaim_for_address")}),e.jsx(n.Button,{compact:!0,secondary:!0,disabled:!0,className:s.actionBtn,"aria-label":l("ens_detail_page.reclaim_for_address"),children:e.jsx(n.Icon,{name:"pencil alternate"})})]}):a!=null&&a.ensAddressRecord?i=e.jsxs("span",{className:s.editableField,children:[e.jsxs("span",{className:s.editableFieldValue,children:[e.jsx("img",{src:S,alt:"Ethereum"}),T(a.ensAddressRecord)]}),e.jsx(n.Button,{compact:!0,secondary:!0,inverted:!0,onClick:b,className:s.actionBtn,"aria-label":l("ens_detail_page.edit_address"),children:e.jsx(n.Icon,{name:"pencil alternate"})})]}):i=e.jsxs("div",{className:s.editableField,children:[e.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.assign_address")}),e.jsx(n.Button,{compact:!0,secondary:!0,onClick:b,className:s.actionBtn,"aria-label":l("ens_detail_page.assign_address"),children:e.jsx(n.Icon,{name:"pencil alternate"})})]}),e.jsxs("div",{className:f(s.field,{[s.disabled]:o}),children:[e.jsxs("span",{className:s.fieldTitle,children:[l("ens_detail_page.address"),e.jsx(n.InfoTooltip,{on:"click",content:l("ens_detail_page.tooltips.address")})]}),i]})},[a==null?void 0:a.ensAddressRecord,o,b]),y=t.useMemo(()=>{let i=null;return o?i=e.jsxs("div",{className:s.editableField,children:[e.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.reclaim_for_location")}),e.jsx(n.Button,{compact:!0,disabled:!0,className:s.actionBtn,"aria-label":l("ens_detail_page.reclaim_for_location"),children:e.jsx(n.Icon,{name:"crosshairs"})})]}):a!=null&&a.landId?P(a.landId)?i=e.jsxs("div",{className:s.editableField,"data-testid":"land-field",children:[e.jsxs("span",{className:s.editableFieldValue,children:[e.jsx("div",{className:s.pin,children:e.jsx(v,{name:"pin"})}),a==null?void 0:a.landId]}),e.jsx(n.Button,{compact:!0,onClick:N,className:s.actionBtn,"aria-label":l("ens_list_page.button.assign_to_land"),children:e.jsx(n.Icon,{name:"pencil alternate"})})]}):i=e.jsxs("div",{className:s.editableField,"data-testid":"estate-field",children:[e.jsxs("span",{className:s.editableFieldValue,children:[e.jsx("div",{className:s.pin,children:e.jsx(v,{name:"pin"})}),`Estate (${a.landId})`]}),e.jsx(n.Button,{compact:!0,className:s.actionBtn,onClick:N,"aria-label":l("ens_list_page.button.assign_to_land"),children:e.jsx(n.Icon,{name:"pencil alternate"})})]}):i=e.jsxs("div",{className:s.editableField,children:[e.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.point_location")}),e.jsx(n.Button,{compact:!0,className:s.actionBtn,onClick:N,"aria-label":l("ens_list_page.button.assign_to_land"),children:e.jsx(n.Icon,{name:"crosshairs"})})]}),e.jsxs("div",{className:f(s.field,{[s.disabled]:o}),children:[e.jsxs("span",{className:s.fieldTitle,children:[l("ens_detail_page.land"),e.jsx(n.InfoTooltip,{on:"click",content:l("ens_detail_page.tooltips.land")})]}),i]})},[a==null?void 0:a.landId,o,N]);return e.jsxs(K,{activeTab:W.NAMES,isPageFullscreen:!0,isLoading:j||!a,children:[e.jsx(M,{to:B.ens(),children:e.jsxs(n.Button,{basic:!0,className:s.returnLink,children:[e.jsx(n.Icon,{name:"chevron left"}),"Return"]})}),e.jsxs("div",{className:s.main,children:[e.jsx("img",{alt:a==null?void 0:a.subdomain,src:g,className:s.ensImage}),e.jsxs("div",{className:s.fields,children:[e.jsxs("div",{className:s.fieldContainer,children:[e.jsxs("div",{children:[e.jsx("span",{className:s.fieldTitle,children:l("ens_detail_page.name")}),e.jsxs("span",{className:s.subdomain,children:[e.jsxs("span",{children:[e.jsx("span",{children:a==null?void 0:a.name}),".dcl.eth"]}),e.jsx(R,{role:"button",text:(a==null?void 0:a.subdomain)||"",showPopup:!0,className:"copy-to-clipboard",children:e.jsx(n.Icon,{"aria-label":"copy name","aria-hidden":"false",name:"clone outline"})}),(a==null?void 0:a.ensOwnerAddress)!==(a==null?void 0:a.nftOwnerAddress)?e.jsx("span",{className:s.unclaimedBadge,children:l("ens_detail_page.unclaimed")}):null]})]}),e.jsx(n.Button,{primary:!0,onClick:C,children:l("ens_detail_page.reclaim_name")})]}),e.jsxs("div",{className:s.fieldContainer,children:[k,E,y]})]})]})]})}function Ie(){const r=w(),a=J(),j=p(d=>a?O(d,`${a}.dcl.eth`):null),u=p(d=>V(U(d),Q)),m=p($),_=p(D),h=p(q),c=t.useCallback(d=>r(G(d)),[r]),x=t.useCallback((d,g)=>r(H(d,g)),[r]);return e.jsx(Ne,{name:a,ens:j,isLoading:u,alias:m,avatar:_,wallet:h,onFetchENS:c,onOpenModal:x})}export{Ie as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var E=Object.defineProperty;var _=(n,t,a)=>t in n?E(n,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[t]=a;var j=(n,t,a)=>_(n,typeof t!="symbol"?t+"":t,a);import{J as R,N as e,b6 as v,M as r,bN as T,S as s,R as k,bO as y,bP as D,bQ as I,bR as f,bS as S,T as O,bE as F,bT as $,bU as H,bV as h,bW as g,bD as C,bX as V,bY as B,bZ as G}from"./index-
|
|
1
|
+
var E=Object.defineProperty;var _=(n,t,a)=>t in n?E(n,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[t]=a;var j=(n,t,a)=>_(n,typeof t!="symbol"?t+"":t,a);import{J as R,N as e,b6 as v,M as r,bN as T,S as s,R as k,bO as y,bP as D,bQ as I,bR as f,bS as S,T as O,bE as F,bT as $,bU as H,bV as h,bW as g,bD as C,bX as V,bY as B,bZ as G}from"./index-HbI_NRfn.js";import{N as W}from"./Navigation.container-DMse8-Rx.js";import{L as M}from"./LoggedInDetailPage.container-JGDqajAT.js";import{R as X}from"./RentalPeriod-Dlho_yh8.js";import"./selectors-DhSvUgcI.js";import"./SignInRequired-BWudNNPu.js";import"./index-BdIEyI1R.js";const Y=n=>n.ui.land,Z=n=>Y(n).view;class A extends R.PureComponent{render(){const{list:t}=this.props;switch(t.length){case 0:return r("global.none");case 1:return t[0];case 2:return e.jsx(v,{id:"list.two",values:{first:t[0],second:t[1]}});default:return e.jsx(v,{id:"list.two",values:{first:t[0],second:r("list.more",{count:t.length-1})}})}}}const q=(n,t)=>f(n,S)?1:f(t,S)?-1:n>t?1:-1;let z=class extends R.PureComponent{render(){const{land:t,deployments:a,rental:l,history:o}=this.props,{x:d,y:p}=T(t);return e.jsxs(s.Table.Row,{className:"TableRow",onClick:()=>o.push(k.landDetail(t.id)),children:[e.jsx(s.Table.Cell,{children:e.jsxs(s.Row,{children:[e.jsx(s.Column,{width:67,grow:!1,shrink:!1,children:e.jsx(y,{landId:t.id,width:45,height:45,isDraggable:!1,size:9})}),e.jsx(s.Column,{className:"name",children:e.jsxs("div",{children:[t.name," ",e.jsx("span",{className:"secondary-text",children:D(d,p)})]})})]})}),e.jsx(s.Table.Cell,{children:e.jsxs("div",{children:[r(`roles.${t.role}`)," ",l?e.jsx(X,{land:t,rental:l}):null]})}),e.jsx(s.Table.Cell,{children:e.jsx(A,{list:t.operators.sort(q).map(c=>e.jsx(I,{address:c}))})}),e.jsx(s.Table.Cell,{children:e.jsx(A,{list:a.map(c=>c.name)})})]})}};const J=(n,t)=>{const{land:a}=t,o=$(n)[a.id]||[],d=H(n,a);return{deployments:o,rental:d}},Q=O(J)(F(z)),b=20;let U=class extends R.PureComponent{constructor(){super(...arguments);j(this,"state",{showOwner:!0,showOperator:!0,showLessor:!0,showTenant:!0,page:1,selectedLand:0});j(this,"handleNext",()=>{const{selectedLand:a}=this.state,l=this.getFilteredLands();a===l.length-1?this.setState({selectedLand:0}):this.setState({selectedLand:a+1})});j(this,"handlePrev",()=>{const{selectedLand:a}=this.state;if(a===0){const l=this.getFilteredLands();this.setState({selectedLand:l.length-1})}else this.setState({selectedLand:a-1})})}componentWillReceiveProps(a){a.lands!==this.props.lands&&this.setState({page:1})}renderLand(){const{view:a,onSetView:l}=this.props,{page:o,showOwner:d,showOperator:p,showTenant:c,showLessor:u,selectedLand:N}=this.state,i=this.getFilteredLands(),P=Math.ceil(i.length/b);let w,L;if(i.length>1&&N<i.length){const{x:m,y:x}=T(i[N]);w=m,L=x}else if(i.length===1){const{x:m,y:x}=T(i[0]);w=m,L=x}return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(s.Container,{children:e.jsxs(s.Row,{height:30,children:[e.jsx(s.Column,{children:e.jsxs(s.Row,{children:[e.jsx(s.Header,{sub:!0,children:r("land_page.results",{count:i.length.toLocaleString()})}),a===h.ATLAS&&i.length>1?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"arrow prev",onClick:this.handlePrev}),e.jsx("div",{className:"arrow next",onClick:this.handleNext})]}):null]})}),e.jsx(s.Column,{align:"right",children:e.jsxs(s.Row,{children:[e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{value:"owner",checked:d,onClick:()=>this.setState({showOwner:!d}),label:r(`roles.${g.OWNER}`)}),content:r("land_page.owner_explanation")}),e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{className:"operator-checkbox",value:"operator",checked:p,onClick:()=>this.setState({showOperator:!p}),label:r(`roles.${g.OPERATOR}`)}),className:"radio-popup",content:e.jsx("div",{children:r("land_page.operator_explanation")})}),e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{className:"tenant-checkbox",value:"tentant",checked:c,onClick:()=>this.setState({showTenant:!c}),label:r(`roles.${g.TENANT}`)}),className:"radio-popup",content:e.jsx("div",{children:r("land_page.tenant_explanation")})}),e.jsx(C,{className:"grid",icon:"table",isActive:a===h.GRID,onClick:()=>l(h.GRID)}),e.jsx(C,{className:"atlas",icon:"pin",isActive:a===h.ATLAS,onClick:()=>l(h.ATLAS)})]})})]})})}),a===h.GRID?e.jsxs(s.Container,{children:[e.jsx(s.Section,{className:"table-section",children:i.length>0?e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"4",children:r("global.name")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("global.role")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("land_page.operated_by")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("land_page.online_scenes")})]})}),e.jsx(s.Table.Body,{children:i.slice((o-1)*b,o*b).map((m,x)=>e.jsx(Q,{land:m},x))})]}):null}),P>1?e.jsx(s.Section,{className:"pagination-section",children:e.jsx(s.Pagination,{firstItem:null,lastItem:null,activePage:o,onPageChange:(m,x)=>this.setState({page:+x.activePage}),totalPages:P})}):null]}):e.jsx("div",{className:"atlas-wrapper",children:e.jsx(y,{className:"main",x:w,y:L,showOperator:p,showOwner:d,showTenant:c,showLessor:u,hasPopup:!0})})]})}getFilteredLands(){const{lands:a}=this.props,{showOwner:l,showOperator:o,showLessor:d,showTenant:p}=this.state;return a.filter(u=>!!(l&&u.roles.includes(g.OWNER)||o&&u.roles.includes(g.OPERATOR)||p&&u.roles.includes(g.TENANT)||d&&u.roles.includes(g.LESSOR)))}render(){const{isLoading:a,view:l}=this.props;return e.jsx(M,{className:`LandPage ${l}-view`,activeTab:W.LAND,isLoading:a,isPageFullscreen:!0,isFooterFullscreen:l===h.ATLAS,isNavigationFullscreen:l===h.ATLAS,children:this.renderLand()})}};const K=n=>({lands:V(n),view:Z(n),isLoading:B(n)}),ee=n=>({onSetView:t=>n(G(t))}),he=O(K,ee)(U);export{he as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ak as C,a4 as k,b4 as T,J as o,R as S,N as e,am as f,S as s,ao as
|
|
1
|
+
import{ak as C,a4 as k,b4 as T,J as o,R as S,N as e,am as f,S as s,ao as D,M as n,aa as w,ab as x,i0 as L,U as P,bq as E,bJ as R,a2 as F,a3 as M,W as v,ex as y}from"./index-HbI_NRfn.js";import{j as I}from"./hooks-TIqxBqu9.js";import{N as z}from"./NotFound-GY9JDZ-n.js";const H=c=>{const{template:a,isLoading:r,scene:l,onOpenModal:i,onLoadTemplateScene:p}=c,m=k(),t=T(),d=o.useMemo(()=>({id:a==null?void 0:a.id,name:a==null?void 0:a.title,description:a==null?void 0:a.description}),[a]);o.useEffect(()=>{a&&!l&&p(a)},[a,l,p]);const j=()=>e.jsx(s.Center,{children:e.jsx(s.Loader,{active:!0,size:"large"})}),h=()=>e.jsx(z,{}),g=o.useCallback(()=>{t==null||t.track("Download Template",d),i("ExportModal",{project:a})},[t,a,d,i]),_=o.useCallback(()=>{m.push(S.templates())},[m]),N=o.useCallback(()=>{a&&(t==null||t.track("Select Template",d),i("CloneTemplateModal",{template:a}))},[t,a,d,i]),b=u=>e.jsxs(e.Fragment,{children:[e.jsx(s.Section,{size:"large",children:e.jsx(s.Row,{children:e.jsx(s.Column,{children:e.jsx(s.Row,{children:e.jsxs("div",{className:"title-container",children:[e.jsx(s.Button,{className:"back-button",basic:!0,icon:e.jsx(s.Icon,{name:"arrow alternate circle left outline"}),onClick:_,"aria-label":n("templates_page.back_to_scenes")}),e.jsx(s.Header,{className:"name",children:u.title})]})})})})}),e.jsx(s.Section,{children:e.jsx("div",{className:"header-image",style:{backgroundImage:`url(${u.thumbnail})`}})}),e.jsxs(s.Section,{children:[e.jsxs(s.Row,{className:"content info-container",children:[e.jsxs(s.Column,{className:"creator-container",children:[e.jsx(s.Header,{children:n("template_detail_page.creator")}),e.jsxs("p",{className:"description-content",children:[e.jsx(s.Logo,{})," Decentraland",e.jsx("br",{}),"Foundation"]})]}),e.jsxs(s.Column,{className:"description-container",children:[e.jsx(s.Header,{children:n("template_detail_page.description")}),e.jsx("p",{className:"description-content",children:u.description})]}),e.jsxs(s.Column,{className:"action-buttons-container",children:[e.jsx(s.Button,{primary:!0,className:"select-button",onClick:N,children:n("template_detail_page.select_template")}),e.jsx(s.Button,{inverted:!0,className:"download-button",onClick:g,children:n("template_detail_page.download_scene")})]})]}),e.jsx(s.Row,{className:"content",children:e.jsxs(s.Column,{className:"scene-details-container",children:[e.jsx(s.Header,{children:n("template_detail_page.scene_details")}),e.jsx("p",{className:"description-content world",children:n("template_detail_page.built_for_world")}),e.jsx("p",{className:"description-content size-scene",children:n("template_detail_page.parcels",{...u.layout})}),e.jsx("p",{className:"description-content personalize-content",children:n("template_detail_page.personalize_it_yourself")}),l&&e.jsx("p",{className:"description-content sdk",children:l!=null&&l.sdk6?"SDK 6":"SDK 7"})]})})]})]});return e.jsxs(e.Fragment,{children:[e.jsx(f,{}),e.jsxs(s.Page,{className:"TemplateDetailPage",isFullscreen:!0,children:[r&&!a?j():null,!r&&!a?h():null,a?b(a):null]}),e.jsx(D,{})]})},B=C.memo(H),O=()=>{const c=w(),a=I(),r=x(t=>a&&L(t)[a]||null),l=x(t=>r&&P(t)[r.sceneId]||null),i=x(t=>E(R(t),y)),p=o.useCallback((t,d)=>c(F(t,d)),[c]),m=o.useCallback(t=>c(M(t,v.TEMPLATE)),[c]);return e.jsx(B,{template:r,scene:l,isLoading:i,onOpenModal:p,onLoadTemplateScene:m})},$=O;export{$ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ProjectCard{position:relative;width:100%;max-width:var(--scenespage-card-width);height:var(--scenespage-card-height);border-radius:10px;background:rgba(var(--bluish-steel-raw),.16);cursor:pointer;display:flex;justify-content:flex-end;flex-direction:column}.ProjectCard .project-thumbnail{height:170px;width:100%;max-width:256px;background-size:100% 170px;border-top-left-radius:10px;border-top-right-radius:10px}.ProjectCard .deployment-status{align-self:flex-end;margin-right:8px;margin-bottom:8px;position:absolute;right:0;bottom:70px}.ProjectCard .project-data{height:70px;width:100%;padding:12px 9px 14px;background-color:#313131;align-self:flex-end;color:var(--text);z-index:1;border-bottom-left-radius:10px;border-bottom-right-radius:10px}.ProjectCard .title{font-size:18px;line-height:24px;font-weight:600;overflow:hidden;white-space:nowrap;width:240px;text-overflow:ellipsis}.ProjectCard .description{display:flex;align-items:center;font-size:14px;font-weight:400;line-height:24px;letter-spacing:0px;text-align:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;user-select:none}.ProjectCard .description .Icon{margin-right:5px}.ProjectCard .description .Icon.scene-object{margin-left:11px}.ProjectCard .overlay{position:absolute;left:0;right:0;top:0;bottom:0;background:var(--background);opacity:.3}.ProjectCard:hover{z-index:999}.ProjectCard .options-container{display:flex;justify-content:space-between;align-items:center;position:absolute;top:0;width:100%;padding:8px}.ProjectCard .options-container .options-dropdown{visibility:hidden}.ProjectCard:hover .options-container .options-dropdown{visibility:visible}.ProjectCard .options-dropdown .icon:before{color:var(--text)!important}.ProjectCard.has-thumbnail{position:relative;background-size:cover;background-position:center}.ProjectCard .title-wrapper{display:flex}.ProjectCard .Icon.is-uploading{margin-left:4px;margin-top:2px}.ProjectCard .error-indicator{width:16px;height:16px;background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%3e%3cdefs%3e%3cfilter%20id='a'%20width='108.5%25'%20height='175%25'%20x='-4.2%25'%20y='-37.5%25'%20filterUnits='objectBoundingBox'%3e%3cfeOffset%20dy='2'%20in='SourceAlpha'%20result='shadowOffsetOuter1'/%3e%3cfeGaussianBlur%20in='shadowOffsetOuter1'%20result='shadowBlurOuter1'%20stdDeviation='2'/%3e%3cfeColorMatrix%20in='shadowBlurOuter1'%20result='shadowMatrixOuter1'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.16%200'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='shadowMatrixOuter1'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3ccircle%20id='c'%20cx='8'%20cy='8'%20r='8'/%3e%3cfilter%20id='b'%20width='187.5%25'%20height='187.5%25'%20x='-43.8%25'%20y='-31.2%25'%20filterUnits='objectBoundingBox'%3e%3cfeOffset%20dy='2'%20in='SourceAlpha'%20result='shadowOffsetOuter1'/%3e%3cfeGaussianBlur%20in='shadowOffsetOuter1'%20result='shadowBlurOuter1'%20stdDeviation='2'/%3e%3cfeComposite%20in='shadowBlurOuter1'%20in2='SourceAlpha'%20operator='out'%20result='shadowBlurOuter1'/%3e%3cfeColorMatrix%20in='shadowBlurOuter1'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.5%200'/%3e%3c/filter%3e%3c/defs%3e%3cg%20fill='none'%20fill-rule='evenodd'%20filter='url(%23a)'%20transform='translate(-2%20-6)'%3e%3cg%20transform='translate(8%208)'%3e%3cuse%20fill='%23000'%20filter='url(%23b)'%20xlink:href='%23c'/%3e%3ccircle%20cx='8'%20cy='8'%20r='7.25'%20fill='%23F00'%20stroke='%23FFF'%20stroke-linejoin='square'%20stroke-width='1.5'/%3e%3c/g%3e%3cpath%20fill='%23FFF'%20d='M17%2012.5v4a1%201%200%201%201-2%200v-4a1%201%200%201%201%202%200zm-2%207a1%201%200%201%201%202%200%201%201%200%200%201-2%200z'/%3e%3c/g%3e%3c/svg%3e");background-repeat:no-repeat;background-position:center -2px;margin-top:3px;margin-left:7px}.ScenesPageAd{padding-top:32px}.ScenesPage .ui.button.inverted,.ScenesPage .ui.button.inverted:hover{background-color:#fff;color:var(--shadows)}.ScenesPage .project-cards{position:relative}.ScenesPage .subtitle{display:flex;align-items:center;justify-content:space-between}.ScenesPage .empty-projects{display:flex;flex-direction:column;width:100%;border-radius:12px;border:1px solid var(--divider);align-items:center;justify-content:center;color:var(--text);background-color:var(--dark-two);-webkit-user-select:none;user-select:none;text-align:center;line-height:28px;padding-top:105px;padding-bottom:122px}.ScenesPage .empty-projects .empty-project-thumbnail{width:86px;height:86px;background:url(https://cdn.decentraland.org/@dcl/builder-site/7.19.1-19862996915.commit-78aa089/assets/scene-CZXq89b-.svg);background-size:contain;background-repeat:no-repeat;background-position:center;margin-bottom:30px}.ScenesPage .empty-projects .description{margin-bottom:40px}.ScenesPage .empty-projects .actions{display:flex;align-items:center;justify-content:center;gap:14px}.ScenesPage .template-cards{margin-top:80px}.ScenesPage .template-cards.animate .TemplateCard{animation:templateAnimation 2s}.ScenesPage .project-cards .subtitle,.ScenesPage .template-cards .subtitle{font-size:20px}.ScenesPage .CardList .ProjectCard,.ScenesPage .CardList .ProjectCard .project-thumbnail{max-width:unset}.ScenesPage .CardList{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:var(--scenespage-card-margin)}.ScenesPage .ProjectCard{transition:transform .2s ease-in-out;box-shadow:0 2px 4px #00000029}.ScenesPage .ProjectCard:hover{box-shadow:0 10px 20px #0000003d;transform:translateY(-4px)}.ScenesPage .dcl.tabs,.ScenesPage .dcl.tabs .ui.container{position:relative}.ScenesPage .projects-menu .items-count,.ScenesPage .scene-pool-menu .ui.header.sub{flex:1 0 auto;color:var(--secondary-text);text-transform:uppercase;font-size:13px;line-height:18px;font-weight:500}.ScenesPage .projects-menu .actions{display:flex;flex:1 0 auto;align-items:center;justify-content:flex-end;font-size:13px;line-height:18px;text-transform:uppercase;margin-bottom:8px}.ScenesPage .projects-menu .actions .ui.button{font-size:14px;font-weight:600}.ScenesPage .projects-menu .actions .ui.button+.ui.button{margin-left:16px}.ScenesPage .projects-menu .actions .ui.button.create-scene{display:flex;align-items:center}.ScenesPage .projects-menu .actions .ui.dropdown.active.visible{z-index:99999}.ScenesPage .projects-menu .actions .ui.dropdown+.ui.button{margin-left:24px}.ScenesPage .project-cards.has-pagination .CardList{min-height:606px}.ScenesPage .project-cards .ui.pagination{width:100%;display:flex;justify-content:center}.ScenesPage .project-cards .ui.pagination{margin-top:40px}.ScenesPage .project-cards .ui.pagination .item[type=nextItem],.ScenesPage .project-cards .ui.pagination .item[type=prevItem]{position:absolute;background-color:var(--secondary)}.ScenesPage .project-cards .ui.pagination .item[type=prevItem]{left:0}.ScenesPage .project-cards .ui.pagination .item[type=nextItem]{right:0}.ScenesPage .SyncToast{top:77px}.ScenesPage .scene-pool-projects{display:flex;overflow:auto;padding-top:20px;gap:var(--scenespage-card-margin)}.ScenesPage .scene-pool-projects .ProjectCard{flex:none}.ScenesPage .ui.button.import-scene,.ScenesPage .ui.button.create-scene{display:flex;align-items:center;justify-content:center;gap:10px;padding:12px 18px}.ScenesPage .import-scene:before,.ScenesPage .create-scene:before{content:"";width:20px;height:20px;background-position:center;background-repeat:no-repeat;display:block}.ScenesPage .import-scene:before{background-image:url("data:image/svg+xml,%3csvg%20width='19'%20height='18'%20viewBox='0%200%2019%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.25%203H14.75C15.1625%203%2015.5%203.3375%2015.5%203.75V5.25C15.5%205.6625%2015.1625%206%2014.75%206C14.3375%206%2014%205.6625%2014%205.25V4.5H5V5.25C5%205.6625%204.6625%206%204.25%206C3.8375%206%203.5%205.6625%203.5%205.25V3.75C3.5%203.3375%203.8375%203%204.25%203ZM6.50075%2010.5C6.272%2010.5%206.04775%2010.3965%205.9%2010.2C5.651%209.8685%205.7185%209.39825%206.05%209.15L9.05%206.9C9.3095%206.705%209.6665%206.69975%209.93125%206.8865L12.9312%208.997C13.2703%209.2355%2013.352%209.7035%2013.1135%2010.0417C12.875%2010.38%2012.4078%2010.4625%2012.0688%2010.224L10.2479%208.94308C10.2493%208.96187%2010.25%208.98085%2010.25%209V15C10.25%2015.414%209.91475%2015.75%209.5%2015.75C9.08525%2015.75%208.75%2015.414%208.75%2015V9.00013L6.95%2010.35C6.815%2010.4513%206.6575%2010.5%206.50075%2010.5Z'%20fill='black'/%3e%3c/svg%3e")}.ScenesPage .create-scene:before{background-image:url("data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.7829%2015.3424V16.7893C10.7824%2016.9117%2010.7338%2017.0289%2010.6479%2017.1152C10.562%2017.2015%2010.4457%2017.25%2010.3245%2017.25H8.48794C8.36653%2017.25%208.25008%2017.2014%208.16414%2017.1148C8.0782%2017.0283%208.02979%2016.9109%208.02954%2016.7883V15.3424H10.7829ZM13.1042%2011.8362L14.1897%2013.7281C14.2295%2013.7983%2014.2502%2013.8779%2014.25%2013.9588C14.2498%2014.0397%2014.2285%2014.1192%2014.1883%2014.1892C14.1481%2014.2592%2014.0905%2014.3174%2014.0211%2014.3579C13.9516%2014.3984%2013.8729%2014.4198%2013.7927%2014.42H4.95725C4.87708%2014.4198%204.79835%2014.3984%204.72894%2014.3579C4.65953%2014.3174%204.60186%2014.2592%204.56169%2014.1892C4.52152%2014.1192%204.50025%2014.0397%204.5%2013.9588C4.49976%2013.8779%204.52055%2013.7983%204.5603%2013.7281L5.64681%2011.8362H13.1042ZM12.3493%208.32899L13.4358%2010.2219C13.4755%2010.2921%2013.4963%2010.3717%2013.4961%2010.4526C13.4958%2010.5335%2013.4746%2010.613%2013.4344%2010.683C13.3942%2010.753%2013.3365%2010.8112%2013.2671%2010.8517C13.1977%2010.8922%2013.119%2010.9136%2013.0388%2010.9138H5.71216C5.63198%2010.9136%205.55326%2010.8922%205.48385%2010.8517C5.41443%2010.8112%205.35677%2010.753%205.31659%2010.683C5.27642%2010.613%205.25515%2010.5335%205.25491%2010.4526C5.25466%2010.3717%205.27545%2010.2921%205.3152%2010.2219L6.40074%208.32899H12.3493ZM9.77342%201.731L12.635%206.71468C12.6748%206.78496%2012.6956%206.86453%2012.6953%206.94545C12.6951%207.02636%2012.6738%207.1058%2012.6336%207.17583C12.5935%207.24586%2012.5358%207.30403%2012.4664%207.34454C12.397%207.38504%2012.3183%207.40647%2012.2381%207.40667H6.5129C6.43272%207.40647%206.354%207.38504%206.28459%207.34454C6.21518%207.30403%206.15751%207.24586%206.11734%207.17583C6.07716%207.1058%206.05589%207.02636%206.05565%206.94545C6.0554%206.86453%206.07619%206.78496%206.11594%206.71468L8.97755%201.731C9.01806%201.66073%209.07612%201.60241%209.14595%201.56187C9.21578%201.52133%209.29493%201.5%209.37549%201.5C9.45604%201.5%209.53519%201.52133%209.60502%201.56187C9.67485%201.60241%209.73292%201.66073%209.77342%201.731Z'%20fill='white'/%3e%3c/svg%3e")}.ScenesPage .no-scenes-container{display:flex;flex-direction:column;width:100%;padding:50px;background:#242129;border-radius:10px;align-items:center;justify-content:center}.ScenesPage .no-scenes-title{font-size:24px}.ScenesPage .no-scenes-description{color:#fff;width:100%;max-width:620px;font-size:14px;line-height:24px;text-align:center;margin-bottom:36px}.ScenesPage .no-scenes-description a{color:#fff;text-decoration:underline}@keyframes templateAnimation{0%{background:rgba(var(--bluish-steel-raw),.16)}25%{background:rgba(var(--bluish-steel-raw),.3)}50%{background:rgba(var(--bluish-steel-raw),.16)}75%{background:rgba(var(--bluish-steel-raw),.3)}to{background:rgba(var(--bluish-steel-raw),.16)}}
|