@dcl/builder-site 7.12.0 → 7.12.1-16758968085.commit-584a3db
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-DQoXbeYM.js → Back-D5STX2lw.js} +1 -1
- package/assets/CollectionProvider.container-BaEMB-wp.js +1 -0
- package/assets/{CollectionStatus.container-DKgxtW3U.js → CollectionStatus.container-B2OPK2Ue.js} +1 -1
- package/assets/{ConfirmDelete-ByscZFVO.js → ConfirmDelete-Bs3FcWOF.js} +1 -1
- package/assets/{FileSaver.min-QgUKiRmw.js → FileSaver.min-EoiSD4gI.js} +1 -1
- package/assets/ItemProvider.container-CGmqD6PU.js +1 -0
- package/assets/{JumpIn.container-BiqC78Ge.js → JumpIn.container-BIyRudXB.js} +1 -1
- package/assets/{LandAction-CvKFbUMl.js → LandAction-DOytAk-q.js} +1 -1
- package/assets/LandProviderPage-COudVDk6.js +1 -0
- package/assets/LoggedInDetailPage.container-vr7Cw4cZ.js +1 -0
- package/assets/{Navigation-BF79MFFc.css → Navigation-MHkrS5J4.css} +1 -1
- package/assets/Navigation.container-CW-ABnAA.js +1 -0
- package/assets/{NotFound-Dbd8gZSK.js → NotFound-CfvqR_51.js} +1 -1
- package/assets/{OptionsDropdown-BWBuC7KW.js → OptionsDropdown-H4Zg0eZ8.js} +1 -1
- package/assets/{RentalPeriod-CG-gyky7.js → RentalPeriod-BrppyRRD.js} +1 -1
- package/assets/{SDKTag-CFCXHU8H.js → SDKTag-B7DWlXZ9.js} +1 -1
- package/assets/{SceneStats.container-BUtGE_VO.js → SceneStats.container-1wNXzlOf.js} +1 -1
- package/assets/{SignInRequired-C_nU0wec.js → SignInRequired-DPkhoSXa.js} +1 -1
- package/assets/{ThirdPartyKindBadge-zrKPoF7F.js → ThirdPartyKindBadge-5ike70QT.js} +1 -1
- package/assets/{dataReader-0czo1JS_.js → dataReader-rfmttWrC.js} +1 -1
- package/assets/{date-FmFpH_C4.js → date-DENw_2Xc.js} +1 -1
- package/assets/{fortmatic-BrEIUkkm.js → fortmatic-BgIBiTDd.js} +1 -1
- package/assets/hooks-CDZe9Lu5.js +1 -0
- package/assets/index-8wGhoQ8Y.js +1 -0
- package/assets/{index-C1Myejmp.js → index-9SJ3UOTG.js} +1 -1
- package/assets/{index-qclQwEt-.js → index-B-nWj7ez.js} +1 -1
- package/assets/index-B-sKTBem.css +1 -0
- package/assets/{index-CLk3PLzN.js → index-B7oNBWvX.js} +1 -1
- package/assets/{index-CjE61Bgg.js → index-BGPqosiB.js} +1 -1
- package/assets/index-BNAQrDIs.js +1 -0
- package/assets/index-BPD3Zu-2.js +1 -0
- package/assets/{index-BearCfEI.js → index-BR0ofDWx.js} +33 -33
- package/assets/index-BXlsGIRR.js +1 -0
- package/assets/index-BaHLlwKw.js +1 -0
- package/assets/{index-CtrdQAF7.js → index-BthJ0w6M.js} +2 -2
- package/assets/{index-Bz9-hv1M.js → index-BuQVBO_f.js} +1 -1
- package/assets/index-BuhJD_ui.js +1 -0
- package/assets/{index-wXD7RGfH.js → index-ByleWi4d.js} +1 -1
- package/assets/index-BzKxaGj5.css +1 -0
- package/assets/{index-V7VZvdlb.css → index-C0Oh-tmd.css} +7 -7
- package/assets/{index-BXAXL7Cc.js → index-CAIaAe2b.js} +1 -1
- package/assets/index-CP9nod7z.js +1 -0
- package/assets/{index-DTfO5cLO.js → index-CjHBnYia.js} +1 -1
- package/assets/{index-CYW0Q70l.js → index-CtVWfxz2.js} +1 -1
- package/assets/{index-CajmgluS.js → index-Cx8X0BDJ.js} +1 -1
- package/assets/{index-Kjv6OouU.js → index-CzYmRIiY.js} +1 -1
- package/assets/index-D-sHHmDj.js +2 -0
- package/assets/index-D0vlqAN4.js +1 -0
- package/assets/{index-CmcYgJHD.css → index-D70ZlrJ6.css} +1 -1
- package/assets/{index-Dc9Et61g.js → index-DCE6rxhI.js} +1 -1
- package/assets/index-DH4vF6Ym.js +1 -0
- package/assets/{index-BHpIdKs3.js → index-DJNRUtaJ.js} +1 -1
- package/assets/index-DOHfwAz0.js +1 -0
- package/assets/{index-DQ2AFQhT.js → index-DOnKJtgq.js} +1 -1
- package/assets/index-DVkX9BeB.js +1 -0
- package/assets/index-DkcQftO1.js +1 -0
- package/assets/{index-B7WmTM6z.js → index-DpYx8jO4.js} +1 -1
- package/assets/index-DqeZULYN.css +1 -0
- package/assets/index-DyKuHhZQ.js +1 -0
- package/assets/{index-UkHdfAsI.js → index-EsYepVsM.js} +1 -1
- package/assets/index-JsbjsMyk.js +1 -0
- package/assets/index-KfL_z-Ma.css +1 -0
- package/assets/{index-CPuLTOrJ.js → index-QhKGcgc8.js} +1 -1
- package/assets/index-Vf3QROaF.js +1 -0
- package/assets/{index-Bnv5GFLy.js → index-dNbhHo5A.js} +1 -1
- package/assets/index-flOj5Hy1.js +1 -0
- package/assets/index-ksyOZk5H.js +1 -0
- package/assets/index-mS0rT_pG.js +1 -0
- package/assets/index-oFDP35qN.js +1 -0
- package/assets/{index-CmEObJpJ.css → index-olBQrqCQ.css} +1 -1
- package/assets/{index-ApEZI19q.js → index-p7MIwvGn.js} +1 -1
- package/assets/index-zEN2qdfp.js +1 -0
- package/assets/{index.es-DnykoLDv.js → index.es-DvcruW81.js} +4 -4
- package/assets/selectors-CpsYGKcu.js +1 -0
- package/index.html +3 -3
- package/package.json +3 -3
- package/assets/CollectionProvider.container-B3-Cph8S.js +0 -1
- package/assets/ItemProvider.container-DCcmBNU2.js +0 -1
- package/assets/LandProviderPage-BWPMhRsc.js +0 -1
- package/assets/LoggedInDetailPage.container-B2RBWKCs.js +0 -1
- package/assets/Navigation.container-CNk-oi6a.js +0 -1
- package/assets/index-B4XjxWcB.js +0 -1
- package/assets/index-B5I1K1RV.js +0 -1
- package/assets/index-BBoLEJK-.js +0 -1
- package/assets/index-BbEA3PXZ.js +0 -1
- package/assets/index-ByK4zAfp.js +0 -1
- package/assets/index-C4HOIUiG.js +0 -1
- package/assets/index-CJV7xl7b.js +0 -1
- package/assets/index-CT2jMw7r.js +0 -1
- package/assets/index-CWjKNZDR.js +0 -1
- package/assets/index-CbswjC0k.js +0 -1
- package/assets/index-CrGd2yii.css +0 -1
- package/assets/index-D7ZlIOIa.js +0 -1
- package/assets/index-DIM2zvTY.js +0 -1
- package/assets/index-DIpghzlz.js +0 -1
- package/assets/index-DSEKMIHC.js +0 -2
- package/assets/index-DTDatg6N.css +0 -1
- package/assets/index-DaXG71WG.css +0 -1
- package/assets/index-DfHP73AZ.js +0 -1
- package/assets/index-DtmlCjTH.js +0 -1
- package/assets/index-VO_KxvBV.js +0 -1
- package/assets/index-ialSxpLk.css +0 -1
- package/assets/index-q7duD2UN.js +0 -1
- package/assets/index-sczLlTJD.js +0 -1
- package/assets/index-uZ7kGo8x.js +0 -1
- package/assets/index-wPLvF6wj.js +0 -1
- package/assets/selectors-1tqbakPd.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var B=Object.defineProperty;var D=(e,t,n)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>D(e,typeof t!="symbol"?t+"":t,n);import{Z as f,D as d,
|
|
1
|
+
var B=Object.defineProperty;var D=(e,t,n)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>D(e,typeof t!="symbol"?t+"":t,n);import{Z as f,D as d,az as $,aA as m,aB as v,G as _,H as s,M as o,J as N,I as U,N as T,as as C,aC as V,aD as w,aE as k,aF as y,X as O,aG as M,ad as A,aH as G,aI as J,aJ as X,aK as z}from"./index-BR0ofDWx.js";import{S as H}from"./SignInRequired-DPkhoSXa.js";const K="_container_1abv2_1",q="_nameContainer_1abv2_8",F="_editNameBtn_1abv2_20",Y="_actions_1abv2_30",W="_downloadBtn_1abv2_36",Z="_button_1abv2_13",I={container:K,nameContainer:q,editNameBtn:F,actions:Y,downloadBtn:W,button:Z},Q=m.get("EXPLORER_URL",""),ee=m.get("BUILDER_SERVER_URL",""),se=m.get("PEER_TESTING_URL","");function te({currentProject:e,metrics:t,limits:n,areEntitiesOutOfBoundaries:r,isUploading:c,onOpenModal:l}){const b=f(),E=d.useCallback(()=>{l("ExportModal",{project:e})},[e,l]),u=d.useCallback(()=>{l("EditProjectModal")},[l]),a=d.useCallback(()=>{l("DeployModal",{view:$.NONE,projectId:e.id})},[l,e]),h=d.useMemo(()=>{if(!e)return"";const i=new URL(Q);return i.searchParams.set("skipSetup","true"),i.searchParams.set("realm",`${ee}/projects/${e.id}`),i.searchParams.set("DEBUG_MODE","true"),m.is(v.Env.DEVELOPMENT)?(i.searchParams.set("NETWORK","sepolia"),i.searchParams.set("DEBUG_SCENE_LOG","")):i.searchParams.set("CATALYST",se),i.toString()},[]),g=d.useMemo(()=>Object.keys(t).some(i=>t[i]>n[i]),[t]),x=d.useMemo(()=>c||r,[t,n,r,c]),j=d.useMemo(()=>c||!x,[c,x]),L=d.useCallback(()=>r?_("topbar.bounds_exceeded",{br:s.jsx("br",{})}):g?_("topbar.limits_exceeded"):null,[r,g]),S=d.useCallback(()=>{b.goBack()},[b]);return s.jsxs("div",{className:I.container,children:[s.jsxs("div",{className:I.nameContainer,children:[s.jsx(o.Button,{basic:!0,"aria-label":_("inspector.top_bar.back"),onClick:S,children:s.jsx(o.Icon,{name:"chevron left"})}),e&&s.jsxs(o.Button,{basic:!0,onClick:u,disabled:c,className:I.editNameBtn,children:[e.title,s.jsx(N,{name:"layout",className:"edit-project-icon"})]}),c&&s.jsx(N,{name:"cloud-upload",className:"cloud-upload-indicator is-uploading"})]}),s.jsxs("div",{className:I.actions,children:[e?s.jsx(U,{projectId:e.id}):null,s.jsx(o.Popup,{content:_("inspector.top_bar.download"),trigger:s.jsx(o.Button,{secondary:!0,"aria-label":_("inspector.top_bar.download"),size:"small",className:I.downloadBtn,disabled:c,onClick:E,children:s.jsx(o.Icon,{name:"download"})})}),s.jsxs(o.Button,{as:"a",href:h,target:"_blank",secondary:!0,size:"small",disabled:c,children:[s.jsx(o.Icon,{name:"eye"}),_("inspector.top_bar.preview")]}),s.jsx(o.Popup,{content:L(),position:"bottom center",disabled:j,trigger:s.jsx("span",{children:s.jsxs(o.Button,{primary:!0,size:"small",disabled:x,onClick:a,children:[s.jsx(o.Icon,{name:"globe"}),_("inspector.top_bar.publish")]})}),on:"hover"})]})]})}const ne=e=>({currentProject:C(e),metrics:V(e),limits:w(e),areEntitiesOutOfBoundaries:k(e)>0,isUploading:y(e)}),ae=e=>({onOpenModal:(t,n)=>e(O(t,n))}),oe=T(ne,ae)(te);var p={VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.12.1-16758968085.commit-584a3db"};const re=e=>e.replace(/\/$/,""),P=re(p.VITE_BASE_URL);let ce=class extends d.PureComponent{constructor(){super(...arguments);R(this,"state",{isLoaded:!1});R(this,"refIframe",n=>{const{onConnect:r}=this.props;n&&(n.onload=()=>{this.setState({isLoaded:!0})},r(n.id))})}componentDidMount(){const{onOpen:n}=this.props;n()}render(){const{scene:n,project:r,isLoggedIn:c,isReloading:l,address:b=""}=this.props;if(!c)return s.jsx(H,{});let E=`${P}/inspector-index.html`,u=`${P}/bin/index.js`;p.VITE_INSPECTOR_PORT&&(E=`http://localhost:${p.VITE_INSPECTOR_PORT}`,u=`${E}/bin/index.js`);let a=`?dataLayerRpcParentUrl=${window.location.origin}`;if(p.VITE_BIN_INDEX_JS_DEV_PORT&&p.VITE_BIN_INDEX_JS_DEV_PATH){const h=btoa(p.VITE_BIN_INDEX_JS_DEV_PATH);u=`http://localhost:${p.VITE_BIN_INDEX_JS_DEV_PORT}/content/contents/b64-${h}`}return a=a.concat(`&binIndexJsUrl=${u}`),a=a.concat(`&contentUrl=${m.get("INSPECTOR_CONTENT_URL")}`),a=a.concat(`&segmentKey=${m.get("INSPECTOR_SEGMENT_API_KEY")}`),a=a.concat(`&segmentAppId=${m.get("INSPECTOR_SEGMENT_APP_ID")}`),a=a.concat(`&segmentUserId=${b}`),r!=null&&r.id&&(a=a.concat(`&projectId=${r.id}`)),s.jsxs("div",{className:"InspectorPage",children:[(!this.state.isLoaded||l)&&s.jsx(o.Loader,{active:!0}),n&&!l&&s.jsxs(s.Fragment,{children:[s.jsx(oe,{}),s.jsx("iframe",{ref:this.refIframe,title:"inspector",id:"inspector",src:`${E}${a}`})]})]})}};const ie=e=>({address:M(e),isLoggedIn:A(e),scene:G(e),project:C(e),isReloading:J(e)}),de=e=>({onOpen:()=>e(X()),onConnect:t=>e(z(t))}),Ee=T(ie,de)(ce);export{Ee as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ae as C,Z as k,bi as T,D as c,K as D,H as e,ag as f,M as s,ai as S,G as n,a4 as w,a5 as x,hK as L,O as P,bD as E,b0 as R,X as F,Y as M,Q as v,ep as y}from"./index-BR0ofDWx.js";import{j as H}from"./hooks-CDZe9Lu5.js";import{N as I}from"./NotFound-CfvqR_51.js";const z=o=>{const{template:a,isLoading:r,scene:l,onOpenModal:i,onLoadTemplateScene:p}=o,m=k(),t=T(),d=c.useMemo(()=>({id:a==null?void 0:a.id,name:a==null?void 0:a.title,description:a==null?void 0:a.description}),[a]);c.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(I,{}),g=c.useCallback(()=>{t==null||t.track("Download Template",d),i("ExportModal",{project:a})},[t,a,d,i]),_=c.useCallback(()=>{m.push(D.templates())},[m]),N=c.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(S,{})]})},O=C.memo(z),B=()=>{const o=w(),a=H(),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=c.useCallback((t,d)=>o(F(t,d)),[o]),m=c.useCallback(t=>o(M(t,v.TEMPLATE)),[o]);return e.jsx(O,{template:r,scene:l,isLoading:i,onOpenModal:p,onLoadTemplateScene:m})},G=B;export{G as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var i=Object.defineProperty;var c=(n,e,t)=>e in n?i(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var s=(n,e,t)=>c(n,typeof e!="symbol"?e+"":e,t);import{
|
|
1
|
+
var i=Object.defineProperty;var c=(n,e,t)=>e in n?i(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var s=(n,e,t)=>c(n,typeof e!="symbol"?e+"":e,t);import{ae as r,af as d,H as a,ag as p,M as h,ah as g,ai as l,N as C,ad as m,a7 as x,aj as u}from"./index-BR0ofDWx.js";let j=class extends r.PureComponent{constructor(){super(...arguments);s(this,"handleOnConnect",t=>{this.props.onConnect(t)});s(this,"handleRedirectToAuthDapp",()=>{if(!this.props.isConnected&&!this.props.isConnecting){const t=new URLSearchParams(window.location.search),o=/^decentraland.(zone|org|today)$/.test(window.location.host)?"/builder":"";d(`${o}${t.get("redirectTo")||"/"}`)}})}render(){const{isConnected:t}=this.props;return a.jsxs(a.Fragment,{children:[a.jsx(p,{}),a.jsx(h.Page,{children:a.jsx(g,{onConnect:this.handleRedirectToAuthDapp,isConnected:t,handleLoginConnect:this.handleOnConnect})}),a.jsx(l,{})]})}};const P=n=>({isConnected:m(n),isConnecting:x(n)}),R=n=>({onConnect:e=>n(u(e))}),$=C(P,R)(j);export{$ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var x=Object.defineProperty;var j=(i,n,t)=>n in i?x(i,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[n]=t;var d=(i,n,t)=>j(i,typeof n!="symbol"?n+"":n,t);import{D as C,
|
|
1
|
+
var x=Object.defineProperty;var j=(i,n,t)=>n in i?x(i,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[n]=t;var d=(i,n,t)=>j(i,typeof n!="symbol"?n+"":n,t);import{D as C,b$ as h,H as e,M as s,G as r,eb as b,cF as v,cG as y,bk as u,bJ as S,ch as A,N as _,ec as T,ed as z,ee as N}from"./index-BR0ofDWx.js";import{L as P}from"./LoggedInDetailPage.container-vr7Cw4cZ.js";import{S as f}from"./SignInRequired-DPkhoSXa.js";import"./Navigation.container-CW-ABnAA.js";import"./selectors-CpsYGKcu.js";let G=class extends C.PureComponent{constructor(){super(...arguments);d(this,"timeoutId",null);d(this,"state",{hasCopiedText:!1,type:h.PARCEL,managerAddress:""});d(this,"handleOnCopy",()=>{this.timeoutId&&clearTimeout(this.timeoutId),this.setState({hasCopiedText:!0}),this.timeoutId=setTimeout(()=>{this.timeoutId=null,this.setState({hasCopiedText:!1})},1200)});d(this,"handleAddressChange",(t,a)=>{this.setState({managerAddress:a.value})});d(this,"handleTypeChange",(t,a)=>{this.setState({type:a.value})});d(this,"handleAddAuthorization",()=>{const{onSetUpdateManager:t}=this.props,{managerAddress:a,type:c}=this.state;t(a,c,!0)})}renderPage(){const{authorizations:t,wallet:a,onSetUpdateManager:c}=this.props,{hasCopiedText:g,managerAddress:o,type:m}=this.state,p=A(o);return e.jsx(s.Grid,{children:a===null?e.jsx(s.Loader,{size:"big",active:!0}):e.jsxs(e.Fragment,{children:[e.jsxs(s.Grid.Row,{children:[e.jsx(s.Grid.Column,{computer:4,mobile:16,children:e.jsx("div",{className:"left-column secondary-text",children:r("global.address")})}),e.jsxs(s.Grid.Column,{computer:12,mobile:16,children:[e.jsx("div",{className:"blockie-container",children:e.jsx(s.Blockie,{seed:a.address,scale:12})}),e.jsxs("div",{className:"address-container",children:[e.jsx("div",{className:"address",children:b()?v(a.address):a.address}),e.jsx(y,{role:"button",text:a.address,onCopy:this.handleOnCopy,children:g?e.jsx("span",{children:r("settings_page.copied")}):e.jsx("span",{className:"link",children:r("settings_page.copy_address")})})]})]})]}),e.jsxs(s.Grid.Row,{children:[e.jsx(s.Grid.Column,{computer:4,mobile:16,children:e.jsx("div",{className:"left-column secondary-text",children:r("settings_page.authorizations")})}),e.jsxs(s.Grid.Column,{computer:12,mobile:16,children:[e.jsx(s.Section,{className:"authoziations-disclaimer",children:r("settings_page.disclaimer",{emphasis:e.jsx("strong",{children:r("settings_page.emphasis")})})}),e.jsxs(s.Row,{className:"authorization-action",children:[e.jsx(u,{id:"settings_page.authorization_action",values:{address:e.jsx(s.Field,{value:o,onChange:this.handleAddressChange,placeholder:"0x...",error:o.length>0&&!p}),type:e.jsx(s.Dropdown,{options:[{text:"Parcels",value:h.PARCEL},{text:"Estates",value:h.ESTATE}],value:m,onChange:this.handleTypeChange})}}),e.jsx(s.Button,{size:"small",primary:!0,disabled:o.length===0||!p,onClick:this.handleAddAuthorization,children:r("global.submit")})]}),t.length>0?e.jsxs(s.Section,{children:[e.jsx(s.Header,{sub:!0,children:r("settings_page.authorizations_title")}),t.map(l=>e.jsxs(s.Row,{className:"authorization",children:[e.jsx(u,{id:"settings_page.authorization",values:{address:e.jsx(S,{address:l.address}),type:e.jsxs("span",{children:[" ",e.jsx("strong",{children:r(`global.${l.type}_plural`)})," "]})}}),e.jsx(s.Button,{basic:!0,onClick:()=>c(l.address,l.type,!1),children:r("global.revoke")})]}))]}):null]})]})]})})}renderLogin(){return e.jsx(f,{})}renderLoading(){return e.jsx("div",{className:"center",children:e.jsx(s.Loader,{active:!0,size:"huge"})})}render(){return e.jsx(P,{className:"SettingsPage",children:this.renderPage()})}};const L=i=>({wallet:T(i),authorizations:z(i)}),R=i=>({onSetUpdateManager:(n,t,a)=>i(N(n,t,a))}),B=_(L,R)(G);export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as l,Z as E,
|
|
1
|
+
import{D as l,Z as E,dy as I,K as w,bI as h,H as e,M as d,G as r,bH as y,N as H,di as T,dn as B,a7 as R,bD as P,cM as D,bR as O,c3 as A,cP as F}from"./index-BR0ofDWx.js";import{L as M}from"./LoggedInDetailPage.container-vr7Cw4cZ.js";import{B as z}from"./Back-D5STX2lw.js";import{N as G}from"./NotFound-CfvqR_51.js";import"./Navigation.container-CW-ABnAA.js";import"./selectors-CpsYGKcu.js";import"./SignInRequired-DPkhoSXa.js";function K(i){const[s,u]=l.useState(void 0),[g,L]=l.useState(void 0),{isLoading:b,ens:o,landTiles:c}=i,m=E(),x=l.useMemo(()=>{const a=Object.values(c||{});if(a.length===1)return a[0].land;let n;for(const t of a)if(t.land.id!==o.landId){n=t.land;break}return n},[c]);l.useEffect(()=>{!s&&!b&&o&&u(x)},[x]);const j=l.useCallback((a,n)=>{const t=h(a,n);return c&&t in c?c[t].land:void 0},[c]),f=l.useCallback((a,n)=>{const t=j(a,n);t&&u(t)},[]),v=l.useCallback(()=>{const a=I(c,s.id);u(a)},[s,c]),S=l.useCallback(()=>{s&&m.push(w.landAssignENS(s.id,o.subdomain))},[o,m,s]),C=l.useCallback((a,n)=>{const t=h(a,n);return(!s||s.id!==t)&&g===t},[]),_=l.useCallback((a,n)=>C(a,n)&&j(a,n)?{color:"#fcc6d1",scale:1.4}:null,[]),k=l.useCallback((a,n)=>{L(h(a,n))},[]),p=l.useCallback(()=>{m.goBack()},[m]),N=s&&o&&s.id===o.landId;return e.jsx(M,{className:"ENSSelectLandPage",hasNavigation:!1,children:b?e.jsx(d.Loader,{active:!0,size:"massive"}):o?e.jsxs(e.Fragment,{children:[e.jsx(z,{absolute:!0,onClick:p}),e.jsxs(d.Narrow,{children:[e.jsx(d.Row,{children:e.jsx(d.Column,{children:e.jsxs(d.Section,{children:[e.jsx(d.Header,{className:"title",size:"large",children:r("ens_select_land_page.title",{name:o?o.subdomain:r("global.name")})}),e.jsx("span",{className:"subtitle",children:r("ens_select_land_page.subtitle")})]})})}),e.jsx("div",{className:"atlas-wrapper",children:e.jsx(y,{showControls:!0,showOwner:!0,isDraggable:!0,landId:s?s.id:void 0,onClick:f,onHover:k,onLocateLand:v,layers:[_]})}),e.jsxs(d.Row,{className:"atlas-footer",children:[e.jsx(d.Column,{grow:!0,children:s?e.jsxs("div",{className:"selected-land",children:[e.jsx("div",{className:"label",children:r("ens_select_land_page.land_selected")}),e.jsxs("div",{className:"land",children:[s.name," (",s.id,")"]})]}):null}),e.jsx(d.Column,{grow:!1,children:e.jsxs("div",{className:"actions",children:[e.jsx(d.Button,{secondary:!0,onClick:p,children:r("global.cancel")}),e.jsx(d.Button,{primary:!0,disabled:!s||N,onClick:S,children:N?r("ens_select_land_page.already_assigned"):r("global.continue")})]})})]})]})]}):e.jsx(G,{})})}const Q=(i,s)=>{const{subdomain:u}=s.match.params,g=T(i);return{ens:B(g,u),isLoading:R(i)||P(D(i),F)||O(i),landTiles:A(i)}},X=H(Q)(K);export{X as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var C=Object.defineProperty;var v=(s,r,e)=>r in s?C(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var l=(s,r,e)=>v(s,typeof r!="symbol"?r+"":r,e);import{
|
|
1
|
+
var C=Object.defineProperty;var v=(s,r,e)=>r in s?C(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var l=(s,r,e)=>v(s,typeof r!="symbol"?r+"":r,e);import{aA as L,D as u,Q as P,H as t,ak as f,ag as p,M as a,ai as g,G as d,aU as b,K as y,aV as k,aW as m,J as h,N as w,aX as N,am as S,ap as F,ao as j,aY as I,ad as R,as as A,aZ as E,O as _,a_ as O,a$ as T,b0 as M,b1 as B,b2 as D,au as U,b3 as V,X as $,Y as W}from"./index-BR0ofDWx.js";import{B as q}from"./Back-D5STX2lw.js";import{S as K}from"./SDKTag-B7DWlXZ9.js";function X(s){return s?{id:s.id,title:s.title,description:s.description,thumbnail:s.thumbnail,isPublic:!1,sceneId:s.sceneId,ethAddress:s.ethAddress,createdAt:s.createdAt,updatedAt:s.updatedAt,layout:s.layout,isTemplate:!1,video:s.video,templateStatus:null}:null}const Y=L.get("PROFILE_URL","");let z=class extends u.PureComponent{constructor(){super(...arguments);l(this,"handlePreview",()=>{this.props.onPreview()});l(this,"handleLike",()=>{const{currentPool:e,isLoggedIn:n,onOpenModal:o}=this.props;e&&(n?this.props.onLikePool(e.id,!e.like):o("LikeModal",{}))});l(this,"handleBack",()=>{const{history:e}=this.props;e.push(y.poolSearch())})}componentDidMount(){const{match:e,onLoadProject:n}=this.props;e.params.projectId&&n(e.params.projectId,this.getType())}componentDidUpdate(){const e=this.getCurrentProject(),n=this.getCurrentScene(),{isLoading:o,onLoadProjectScene:i}=this.props;e&&!n&&!o&&i(e,this.getType())}componentWillUnmount(){this.props.onCloseEditor()}getType(){return this.props.match&&this.props.match.params&&this.props.match.params.type||P.PUBLIC}getCurrentProject(){const{currentProject:e,currentPool:n}=this.props;switch(this.getType()){case"pool":return n;default:return e}}getCurrentScene(){const{scenes:e}=this.props,n=this.getCurrentProject();return n&&e[n.sceneId]||null}getCurrentPool(){const{currentPool:e}=this.props;switch(this.getType()){case"pool":return e;default:return null}}getParcelCount(){const e=this.getCurrentProject();return e?e.layout.cols*e.layout.rows:0}getObjectCount(){const e=this.getCurrentScene();if(!e||!e.sdk6)return 0;const n=this.getParcelCount();if(n===0)return 0;const o=Object.keys(e.sdk6.entities).length;return o<n?0:o-n}renderNotFount(){return t.jsx(f,{})}renderLoading(){return t.jsxs(t.Fragment,{children:[t.jsx(p,{}),t.jsx(a.Page,{isFullscreen:!0,children:t.jsx(a.Loader,{active:!0,size:"huge"})}),t.jsx(g,{isFullscreen:!0})]})}handleExportProject(){const{onOpenModal:e}=this.props;e("ExportModal",{project:X(this.getCurrentProject())})}renderAuthor(){const{currentAuthor:e}=this.props;if(!e)return null;const n=e.avatars[0].ethAddress;return t.jsxs("div",{className:"author",children:[d("public_page.made_by"),t.jsx(b,{address:n,as:"a",href:`${Y}/accounts/${n}`})]})}render(){const{isFetching:e,isPreviewing:n,isReady:o}=this.props;if(e)return this.renderLoading();const i=this.getCurrentProject();if(!i)return this.renderNotFount();const c=this.getCurrentPool(),x=this.getCurrentScene();return t.jsxs(t.Fragment,{children:[!n&&t.jsxs(t.Fragment,{children:[t.jsx(p,{}),t.jsxs(a.Container,{className:"back-container",children:[t.jsx(q,{absolute:!0,onClick:this.handleBack}),t.jsxs(a.Button,{secondary:!0,onClick:this.handleExportProject.bind(this),loading:!i,disabled:!i,children:[t.jsx(a.Icon,{name:"download"}),d("scene_detail_page.download_scene")]})]})]}),t.jsxs("div",{className:"SceneViewPage"+(n?" preview":" mini"),children:[t.jsx("div",{className:"thumbnail",style:{backgroundImage:`url("${i.thumbnail}")`},children:t.jsx(a.Responsive,{minWidth:1025,as:u.Fragment,children:t.jsx(k,{isReadOnly:!0,type:this.getType()},i.id)})}),t.jsxs("div",{className:"scene-action-list",children:[c&&t.jsx("div",{className:"scene-action",children:t.jsx(m,{text:t.jsxs(t.Fragment,{children:[t.jsx(h,{name:c.like?"heart-full":"heart"}),c.likes>0&&t.jsx("span",{className:"LikeCount",children:c.likes})]}),type:"circle",onClick:this.handleLike})}),t.jsx("div",{style:{flex:1}}),t.jsx(a.Responsive,{minWidth:1025,as:u.Fragment,children:t.jsx("div",{className:"scene-action",children:t.jsx(m,{icon:"view",type:"circle",isActive:n,isDisabled:!o,onClick:this.handlePreview})})})]}),t.jsxs("div",{className:"detail",children:[t.jsxs("div",{className:"title",children:[t.jsx("h1",{children:i.title}),t.jsx(K,{scene:x})]}),this.renderAuthor(),i.description&&t.jsx("div",{className:"description",children:t.jsx("p",{children:i.description})}),t.jsxs("div",{className:"component-list",children:[t.jsxs("div",{className:"component",children:[t.jsx(h,{name:"scene-parcel"})," ",d("public_page.parcel_count",{parcels:this.getParcelCount()})]}),t.jsxs("div",{className:"component",children:[t.jsx(h,{name:"scene-object"})," ",d("public_page.item_count",{items:this.getObjectCount()})]})]})]})]}),!n&&t.jsx(g,{})]})}};const G=s=>({isPreviewing:S(s),isReady:!F(s)&&j(s),isFetching:I(s)&&!j(s),isLoggedIn:R(s),currentProject:A(s),currentPool:E(s),scenes:_(s),currentAuthor:O(s),isLoading:T(s)||!!M(s).length}),H=s=>({onLikePool:(r,e=!0)=>s(B(r,e)),onPreview:()=>s(D(!0)),onCloseEditor:()=>s(U()),onLoadProject:(r,e=P.PUBLIC)=>s(V(r,e)),onOpenModal:(r,e)=>s($(r,e)),onLoadProjectScene:(r,e)=>s(W(r,e))}),se=w(G,H)(N(z));export{se as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-dNbhHo5A.js","assets/index-BR0ofDWx.js","assets/index-C0Oh-tmd.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{B as pe,_ as me}from"./index-BR0ofDWx.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.12.1-16758968085.commit-584a3db",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.12.1-16758968085.commit-584a3db",VITE_REACT_APP_WEBSITE_VERSION:"7.12.1-16758968085.commit-584a3db"},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-dNbhHo5A.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var ct=Object.defineProperty;var ht=(i,m,e)=>m in i?ct(i,m,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[m]=e;var c=(i,m,e)=>ht(i,typeof m!="symbol"?m+"":m,e);import{ae as q,H as t,M as d,G as r,bk as $,bJ as mt,D as b,gt as Q,L as ee,K as F,cj as We,b4 as P,N as Fe,bD as G,gu as gt,eF as pt,gv as ut,gw as Ct,gx as It,gy as bt,gz as xt,gA as _t,gB as Et,gC as vt,gD as V,et as jt,gE as K,gF as Pe,a4 as te,Z as xe,a5 as C,aG as se,gG as St,de as _e,br as Ve,fe as Ee,ft,fW as Tt,fX as wt,eC as ge,gm as yt,gH as Pt,gI as At,fZ as Nt,eG as He,gJ as Rt,gK as Mt,gL as Dt,gM as Lt,fo as Ot,fY as kt,f_ as Bt,aM as ve,gN as Wt,gO as Ft,eU as Ae,bK as Vt,ad as Ht,eJ as je,gP as Ue,X as $e,ew as Ut,er as Ge,fG as X,dG as pe,es as $t,eX as ue,gQ as Ye,bi as Se,fV as Je,e_ as L,eu as z,fC as ze,fD as Ce,J as H,f9 as Ie,dF as Gt,eS as Yt,fl as Jt,gR as zt,gS as qe,gT as Ze,gU as Ke,fd as fe,eD as qt,gV as Zt,gW as Kt,fK as Qe,eM as Qt,eL as Xe,eN as Xt,eP as es,eQ as ts,gX as ss,gY as as,gZ as ns,g_ as ae,g$ as de,h0 as is,eg as os,h1 as ls,h2 as rs,h3 as ds,h4 as cs,h5 as hs,h6 as ms,h7 as gs,h8 as ps,h9 as us,ha as Cs,fm as Is,hb as bs,hc as xs,hd as _s,he as Es,hf as vs,hg as js,hh as Ss,hi as fs,f$ as Ts,bU as ie,hj as ws,hk as Ne,hl as ys,hm as Ps,eW as Re,fH as ce,hn as he,eV as As,eR as Me,eY as Ns,eZ as De,e$ as Le,f0 as Oe,ho as Rs,hp as Ms,f1 as Ds,f2 as ke,f3 as Be,hq as Ls,fc as Os,hr as ks,hs as Bs,ht as Ws,hu as et,hv as Fs,hw as Vs,hx as Hs,hy as Us,hz as $s,eI as Gs,hA as Ys,fg as Js,ff as zs,fi as qs,hB as Zs}from"./index-BR0ofDWx.js";import{g as le,h as Te,i as we}from"./hooks-CDZe9Lu5.js";import{J as Ks}from"./JumpIn.container-BIyRudXB.js";import{C as Qs}from"./CollectionProvider.container-BaEMB-wp.js";import{C as tt}from"./ConfirmDelete-Bs3FcWOF.js";import{C as st}from"./CollectionStatus.container-B2OPK2Ue.js";import{d as Xs,e as ea,c as ta}from"./selectors-CpsYGKcu.js";import{I as sa}from"./ItemProvider.container-CGmqD6PU.js";const aa=({open:i,assignee:m,onConfirm:e,onClose:s})=>t.jsxs(d.Modal,{size:"tiny",className:"ConfirmApprovalModal",open:i,children:[t.jsx(d.Modal.Header,{children:r("curation_page.confirm_not_assigned_curation_modal.title")}),t.jsxs(d.Modal.Content,{children:[t.jsx("div",{className:"message-container",children:t.jsx($,{id:"curation_page.confirm_not_assigned_curation_modal.body",values:{assignee:t.jsx("strong",{children:t.jsx(mt,{textOnly:!0,address:m})})}})}),t.jsx("span",{children:t.jsx($,{id:"curation_page.confirm_not_assigned_curation_modal.confirm_footer"})})]}),t.jsxs(d.Modal.Actions,{children:[t.jsx(d.Button,{onClick:s,children:r("global.cancel")}),t.jsx(d.Button,{primary:!0,onClick:e,children:r("curation_page.confirm_not_assigned_curation_modal.confirm_button")})]})]}),na=q.memo(aa);var D=(i=>(i.REJECT_COLLECTION="REJECT_COLLECTION",i.REJECT_CURATION="REJECT_CURATION",i.DISABLE_COLLECTION="DISABLE_COLLECTION",i.DISABLE_THIRD_PARTY="DISABLE_THIRD_PARTY",i))(D||{});const U="item_editor.top_panel.rejection_modal",ia=({open:i,type:m,isLoading:e,thirdParty:s,hasPendingTransaction:a,onDisableThirdParty:n,collection:o,curation:l,onReject:h,onRejectCuration:g,onClose:p})=>{const E=b.useMemo(()=>{switch(m){case D.DISABLE_COLLECTION:return U+".disable_collection";case D.REJECT_CURATION:return U+".reject_curation";case D.DISABLE_THIRD_PARTY:return U+".disable_third_party";default:return""}},[m]),w=()=>{switch(m){case D.DISABLE_COLLECTION:h(o);break;case D.REJECT_CURATION:g(l.collectionId);break;case D.DISABLE_THIRD_PARTY:s&&n(s.id);break}},S=m===D.DISABLE_COLLECTION&&!o.isApproved||m===D.DISABLE_THIRD_PARTY&&!(s!=null&&s.isApproved)||m===D.REJECT_COLLECTION&&!o.isApproved||m===D.REJECT_CURATION&&(l==null?void 0:l.status)===Q.REJECTED;return t.jsx(d.Modal,{size:"tiny",className:"RejectionModal",open:i,children:a?t.jsx(oa,{i18nKey:E}):S?t.jsx(la,{link:o.forumLink,onClose:p}):t.jsx(ra,{i18nKey:E,isLoading:e,onClose:p,onConfirm:w})})},oa=({i18nKey:i})=>t.jsxs(t.Fragment,{children:[t.jsx(d.Modal.Header,{children:r(`${i}.title`)}),t.jsxs("div",{className:"loading-transaction",children:[t.jsx("div",{className:"danger-text",children:r(`${i}.tx_pending`)}),t.jsx("small",{className:"danger-text",children:t.jsx($,{id:U+".visit_activity",values:{activity_link:t.jsx(ee,{to:F.activity(),children:r("global.activity")})}})}),t.jsx(d.Loader,{active:!0,size:"large"})]})]}),la=({link:i,onClose:m})=>t.jsxs(t.Fragment,{children:[t.jsx(d.Modal.Header,{children:r(U+".veredict_explanation")}),t.jsx(d.Modal.Content,{children:r(U+".go_to_forum")}),t.jsxs(d.Modal.Actions,{children:[t.jsx("a",{href:i,className:"forum-link",target:"_blank",rel:"noopener noreferrer",children:t.jsxs(d.Button,{secondary:!0,icon:!0,labelPosition:"right",children:[t.jsx("div",{children:r(U+".forum_link")}),t.jsx("div",{className:"discussion",children:r(U+".discussion")}),t.jsx(d.Icon,{name:"chevron right"})]})}),t.jsx(d.Button,{basic:!0,onClick:m,children:r("global.done")})]})]}),ra=({i18nKey:i,isLoading:m,onConfirm:e,onClose:s})=>t.jsxs(t.Fragment,{children:[t.jsx(d.Modal.Header,{children:r(`${i}.title`)}),t.jsx(d.Modal.Content,{children:r(`${i}.subtitle`)}),t.jsxs(d.Modal.Actions,{children:[t.jsx(We,{primary:!0,onClick:e,disabled:m,loading:m,network:P.Network.MATIC,children:r(`${i}.action`)}),t.jsx(d.Button,{disabled:m,onClick:s,children:r("global.cancel")})]})]}),da=q.memo(ia),ca=(i,m)=>({isLoading:G(pt(i),gt)||G(Ct(i),ut)||It(i),hasPendingTransaction:bt(i)||!!(m.thirdParty&&xt(i,m.thirdParty.id))}),ha=i=>({onReject:m=>i(_t(m)),onRejectCuration:m=>i(Et(m)),onDisableThirdParty:m=>i(vt(m))}),ma=Fe(ca,ha)(da);var y=(i=>(i[i.APPROVE=0]="APPROVE",i[i.REJECT=1]="REJECT",i[i.ENABLE=2]="ENABLE",i[i.DISABLE=3]="DISABLE",i[i.DEPLOY_MISSING_ENTITIES=4]="DEPLOY_MISSING_ENTITIES",i))(y||{});let ga=class extends q.PureComponent{constructor(){super(...arguments);c(this,"state",{currentVeredict:void 0,showRejectionModal:null,showApproveConfirmModal:!1});c(this,"handleBack",()=>{const{history:e}=this.props;e.push(F.curation())});c(this,"handleConfirmApprovalModal",(e,s)=>{const{address:a,onInitiateApprovalFlow:n,onInitiateTPApprovalFlow:o,onSetAssignee:l}=this.props;this.setState({showApproveConfirmModal:!1}),a&&l(e.id,a,s),V(e)?o(e):n(e)});c(this,"setShowRejectionModal",e=>this.setState({showRejectionModal:e}));c(this,"renderPage",e=>{const{items:s,itemCurations:a,curation:n,totalItems:o,thirdParty:l}=this.props,{showRejectionModal:h,showApproveConfirmModal:g}=this.state,{chainId:p}=this.props,E=jt(e);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"actions",children:t.jsx("div",{className:"back",onClick:this.handleBack})}),t.jsxs("div",{className:"title",children:[e.name," · ",r(`collection.type.${E}`),t.jsx(Ks,{size:"small",active:!0,collection:e,chainId:p,items:V(e)?s:void 0,text:r("global.see_in_decentraland")})]}),t.jsx("div",{className:"actions",children:t.jsx("span",{className:"button-container",children:V(e)&&o!==void 0?this.renderTPButtons(e,n,a):this.renderButtons(e,n)})}),h&&t.jsx(ma,{type:h,open:!0,collection:e,curation:n,thirdParty:l,onClose:()=>this.setShowRejectionModal(null)}),(n==null?void 0:n.assignee)&&g&&t.jsx(na,{open:!0,assignee:n.assignee,onConfirm:()=>this.handleConfirmApprovalModal(e,n),onClose:()=>this.setState({showApproveConfirmModal:!1})})]})});c(this,"renderButton",(e,s,a)=>{const{address:n,thirdParty:o,onInitiateApprovalFlow:l,onInitiateTPApprovalFlow:h,onDeployMissingEntities:g,reviewedItems:p,totalItems:E}=this.props,w={[y.APPROVE]:()=>a!=null&&a.assignee&&n!==(a==null?void 0:a.assignee)?this.setState({showApproveConfirmModal:!0}):V(s)?h(s):l(s),[y.ENABLE]:()=>l(s),[y.DISABLE]:()=>this.setShowRejectionModal(o?D.DISABLE_THIRD_PARTY:D.DISABLE_COLLECTION),[y.REJECT]:()=>{(a==null?void 0:a.status)===Q.PENDING?this.setShowRejectionModal(D.REJECT_CURATION):this.setShowRejectionModal(D.REJECT_COLLECTION)},[y.DEPLOY_MISSING_ENTITIES]:()=>g(s)},S={[y.APPROVE]:"approve",[y.ENABLE]:"enable",[y.DISABLE]:"disable",[y.REJECT]:"reject",[y.DEPLOY_MISSING_ENTITIES]:"deploy_missing_entities"},j=e===y.APPROVE||e===y.ENABLE||e===y.DEPLOY_MISSING_ENTITIES,_=!V(s)||!!E&&p.length>=K(E);return t.jsx(d.Popup,{content:r("item_editor.top_panel.items_pending_to_review"),disabled:_,position:"bottom center",trigger:t.jsx("div",{children:t.jsx(d.Button,{primary:j,onClick:()=>w[e](),disabled:V(s)&&e===y.APPROVE&&!!E&&p.length<K(E),children:r(`item_editor.top_panel.${S[e]}`)})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0})});c(this,"renderTPButtons",(e,s,a)=>{const{reviewedItems:n,totalItems:o,thirdParty:l}=this.props,h=a==null?void 0:a.some(g=>g.status===Q.PENDING);return t.jsxs(t.Fragment,{children:[t.jsxs(d.Header,{sub:!0,children:[h?r("item_editor.top_panel.reviewed_counter",{count:n.length,threshold:K(o)}):r("item_editor.top_panel.not_enough_items_to_curate_more"),n.length>=K(o)?t.jsx(d.Icon,{name:"check circle"}):null]}),h&&this.renderButton(y.APPROVE,e,s),h&&this.renderButton(y.REJECT,e,s),!h&&(l==null?void 0:l.isApproved)&&this.renderButton(y.DISABLE,e,null)]})});c(this,"renderButtons",(e,s)=>s&&e.isApproved&&s.status==="pending"?t.jsxs(t.Fragment,{children:[this.renderButton(y.APPROVE,e,s),this.renderButton(y.REJECT,e,s)]}):s&&e.isApproved&&(s.status==="approved"||s.status==="rejected")?t.jsxs(t.Fragment,{children:[this.renderButton(y.DISABLE,e,s),this.props.hasCollectionMissingEntities&&this.renderButton(y.DEPLOY_MISSING_ENTITIES,e,s)]}):Pe(e)&&e.isApproved?t.jsxs(t.Fragment,{children:[this.renderButton(y.DISABLE,e,s),this.props.hasCollectionMissingEntities&&this.renderButton(y.DEPLOY_MISSING_ENTITIES,e,s)]}):Pe(e)?this.renderButton(y.ENABLE,e,s):t.jsxs(t.Fragment,{children:[this.renderButton(y.APPROVE,e,s),this.renderButton(y.REJECT,e,s)]}))}render(){const{collection:e,items:s,isCommitteeMember:a,isReviewing:n,isConnected:o,isLoading:l}=this.props,h=!e||l&&!s.length;return a&&n&&o?t.jsx("div",{className:"TopPanel",children:h?t.jsx(d.Loader,{size:"small",active:!0}):this.renderPage(e)}):null}};const pa=({reviewedItems:i})=>{const m=te(),e=xe(),s=le(),a=Te(),n=C(se),o=C(St),l=C(_e),h=C(Ve),g=C(u=>s?Ee(u,s):null),p=C(u=>g?ft(u,g.id):[]),E=C(u=>g?Tt(u,g.id):[]),w=C(u=>s?wt(u,s):null),S=C(u=>s?ge(u,s):void 0),j=C(u=>g&&V(g)?yt(u,g):null),_=C(u=>s?Pt(u,s):!1),f=C(u=>G(At(u),Ot)||G(Nt(u),kt)||G(He(u),Bt)),T=b.useCallback((u,N,k)=>{m(Rt(u,N,k))},[m]),R=b.useCallback(u=>{m(Mt(u))},[m]),M=b.useCallback(u=>{m(Dt(u))},[m]),I=b.useCallback(u=>{m(Lt(u))},[m]);return t.jsx(ga,{address:n,items:p,totalItems:(S==null?void 0:S.total)||null,collection:g,itemCurations:E,thirdParty:j,curation:w,chainId:o,isConnected:l,isReviewing:a,isCommitteeMember:h,selectedCollectionId:s,hasCollectionMissingEntities:_,isLoading:f,reviewedItems:i,onSetAssignee:T,onInitiateTPApprovalFlow:R,onInitiateApprovalFlow:M,onDeployMissingEntities:I,history:e})},ua=pa,at=()=>{const{search:i}=ve();return C(e=>Wt(e,i))},Ca="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.22722%2012.7164C4.07574%2012.5731%204%2012.3582%204%2012.2149C4%2012.0716%204.07574%2011.8567%204.22722%2011.7134L5.28757%2010.7104C5.59053%2010.4239%206.04497%2010.4239%206.34793%2010.7104L9.35858%2013.8448C9.51006%2013.9881%209.73728%2013.9881%209.88876%2013.8448L17.6521%206.21493C17.955%205.92836%2018.4095%205.92836%2018.7124%206.21493L19.7728%207.21791C20.0757%207.50448%2020.0757%207.93433%2019.7728%208.2209L10.116%2017.7851C9.9645%2017.9284%209.81302%2018%209.5858%2018C9.35858%2018%209.2071%2017.9284%209.05562%2017.7851L4.22722%2012.7164Z'%20fill='white'/%3e%3c/svg%3e",Ia=i=>{const{collectionId:m}=i,[e,s]=b.useState(!1),[a,n]=b.useState(null),o=xe(),l=ve(),h=b.useMemo(()=>Ft(l.search),[l.search]);b.useEffect(()=>{h&&(s(!0),n(h))},[h]);function g(){s(!1);const p=new URLSearchParams(l.search);p.delete("newItem"),o.replace({search:p.toString()})}return e&&a&&m?t.jsx(d.Toast,{type:d.ToastType.INFO,title:r("sagas.item.item_added_toast.title"),closable:!0,icon:t.jsx("div",{className:"ItemAddedToast icon-container",children:t.jsx("img",{src:Ca,alt:r("sagas.item.item_added_toast.title")})}),onClose:g,body:t.jsx($,{id:"sagas.item.item_added_toast.body",values:{name:a,br:()=>t.jsx("br",{}),b:p=>t.jsx("strong",{children:p}),"collection-link":p=>t.jsx(ee,{to:F.collectionDetail(m),children:t.jsx(d.Button,{className:"ItemAddedToast view-collection-link",basic:!0,children:p})})}})}):null},ba=q.memo(Ia),xa=({collection:i,address:m,hasUserOrphanItems:e,isLoggedIn:s,isReviewing:a,onOpenModal:n,onDeleteCollection:o})=>{var I,u;const l=ve(),h=xe(),g=((I=l.state)==null?void 0:I.fromParam)===Ae.COLLECTIONS,p=((u=l.state)==null?void 0:u.fromParam)===Ae.TP_COLLECTIONS,E=b.useCallback(()=>{h.push(F.collections())},[h]),w=b.useCallback(()=>{if(i&&(g||p)){const N=g?F.collectionDetail:F.thirdPartyCollectionDetail;h.push(N(i.id))}else h.push(F.itemEditor())},[g,p,h,i]),S=b.useCallback(()=>{n("CreateCollectionModal")},[n]),j=b.useCallback(()=>{i&&n("CreateSingleItemModal",{collectionId:i.id})},[i,n]),_=b.useCallback(()=>{i&&n("AddExistingItemModal",{collectionId:i.id})},[i,n]),f=b.useCallback(()=>{i&&n("EditCollectionNameModal",{collection:i})},[i,n]),T=b.useCallback(()=>{i&&o(i)},[i,o]),R=b.useCallback(()=>{const N=i&&Vt(i.owner,m||"");return i?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:`block ${g||p?"close":"back"}`,onClick:w}),t.jsxs("div",{className:"title",children:[t.jsx(ee,{to:F.collectionDetail(i.id),children:i.name}),t.jsx(st,{collection:i})]}),N&&!i.isPublished?t.jsx(d.Dropdown,{trigger:t.jsx("div",{className:"block actions"}),inline:!0,direction:"left",children:t.jsxs(d.Dropdown.Menu,{children:[t.jsx(d.Dropdown.Item,{onClick:f,children:r("item_editor.left_panel.actions.edit_name")}),t.jsx(d.Dropdown.Item,{onClick:j,children:r("item_editor.left_panel.actions.new_item")}),e&&t.jsx(d.Dropdown.Item,{onClick:_,children:r("item_editor.left_panel.actions.add_existing_item")}),t.jsx(tt,{name:i.name,onDelete:T,trigger:t.jsx(d.Dropdown.Item,{text:r("global.delete")})})]})}):null]}):null},[i,m,e,g,p]),M=b.useCallback(()=>t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"block close",onClick:E}),t.jsx("div",{className:"title",children:e?r("item_editor.left_panel.title"):r("item_editor.left_panel.title_alternative")}),s?t.jsx(d.Dropdown,{trigger:t.jsx("div",{className:"block add"}),inline:!0,direction:"left",children:t.jsx(d.Dropdown.Menu,{children:t.jsx(d.Dropdown.Item,{onClick:S,children:r("item_editor.left_panel.actions.new_collection")})})}):t.jsx("div",{className:"block"})]}),[e,s]);return a?null:t.jsx(d.Row,{grow:!1,shrink:!1,className:"Header",children:i?R():M()})},_a=()=>{const i=le();return C(m=>i?Ee(m,i):null)},Ea=()=>{const i=te(),m=C(se),e=C(Ht),s=Te(),a=C(je),n=_a(),o=C(p=>!!(n&&m&&Ue(p,m,n))),l=b.useCallback((p,E)=>i($e(p,E)),[i]),h=b.useCallback(p=>i(Ut(p)),[i]),g=b.useCallback(p=>i(Ge(p)),[i]);return t.jsx(xa,{address:m,collection:n??void 0,isLoggedIn:e,isReviewing:s,onOpenModal:l,onDeleteCollection:h,onDeleteItem:g,hasEditRights:o,hasUserOrphanItems:a})},B=10;class W extends b.PureComponent{constructor(){super(...arguments);c(this,"state",{isCollapsed:!1});c(this,"handleToggle",()=>{this.setState({isCollapsed:!this.state.isCollapsed})})}render(){const{label:e,children:s}=this.props,{isCollapsed:a}=this.state,n=!a;return t.jsxs("div",{className:`Collapsable ${n?"is-open":""}`.trim(),children:[t.jsxs("div",{className:"header",onClick:this.handleToggle,children:[t.jsx("div",{className:"label",children:e}),t.jsx("div",{className:"handle"})]}),t.jsx("div",{className:"content",children:n?s:null})]})}}class va extends b.PureComponent{constructor(){super(...arguments);c(this,"handleClick",()=>{const{item:e,onClick:s}=this.props;s(e)})}renderToggleItem(){const{item:e,isVisible:s,isPlayingEmote:a}=this.props;return X(e)?t.jsx(d.Icon,{className:"toggle-emote",name:s&&a?"pause":"play",onClick:this.handleClick}):t.jsx("div",{className:`toggle ${s?"is-visible":"is-hidden"}`,onClick:this.handleClick})}render(){const{item:e,isSelected:s,selectedCollectionId:a,bodyShape:n}=this.props;return t.jsx("div",{className:`SidebarItem ${s?"is-selected":""}`,children:t.jsxs(ee,{to:F.itemEditor({itemId:e.id,collectionId:a||void 0,newItem:void 0}),children:[t.jsx(pe,{item:e}),t.jsxs("div",{className:"name",children:[t.jsx($t,{item:e}),e.name]}),t.jsx(d.Popup,{content:r("item_editor.left_panel.invalid_representation_tooltip",{bodyShape:t.jsx("b",{children:r(`body_shapes.${ue(e)}`).toLowerCase()})}),disabled:Ye(e,n),position:"top center",trigger:this.renderToggleItem()})]})})}}var A=(i=>(i.TO_REVIEW="to-review",i.REVIEWED="reviewed",i.ALL_ITEMS="all-items",i))(A||{});const ja={[A.TO_REVIEW]:1,[A.REVIEWED]:1,[A.ALL_ITEMS]:1};class Sa extends b.PureComponent{constructor(){super(...arguments);c(this,"state",{currentTab:A.TO_REVIEW,currentPages:ja,reviewedTabPage:1,showGetMoreSamplesModal:!1,showAllItemsTabChangeModal:!1});c(this,"analytics",Se());c(this,"handleReviewItemsTrigger",e=>{const{items:s,onReviewItems:a}=this.props,{currentTab:n}=this.state;this.getIsReviewingTPItems()&&n===A.TO_REVIEW&&!Je(s,e==null?void 0:e.items)&&a()});c(this,"isVisible",e=>{const{visibleItems:s}=this.props;return s.some(a=>a.id===e.id)});c(this,"handleClick",e=>{var g;const{bodyShape:s,visibleItems:a,wearableController:n,isPlayingEmote:o,onSetItems:l}=this.props;if(!Ye(e,s))return;let h=a.filter(p=>p.id!==e.id);if(X(e))if(this.isVisible(e)){o?n==null||n.emote.pause():n==null||n.emote.play();return}else h=h.filter(p=>p.type!==L.EMOTE);this.isVisible(e)||(h.push(e),(g=this.analytics)==null||g.track("Preview Item",{ITEM_ID:e!=null&&e.urn?z(e.urn)?ze(e.urn):Ce(e.urn):null,ITEM_TYPE:e.type,ITEM_NAME:e.name,ITEM_IS_THIRD_PARTY:z(e.urn)})),l(h)});c(this,"handleTabChange",e=>{const{onLoadPage:s,onReviewItems:a,onResetReviewedItems:n}=this.props,{currentPages:o}=this.state;e===A.ALL_ITEMS?this.setState({showAllItemsTabChangeModal:!1},()=>{n(),s(o[A.ALL_ITEMS])}):e===A.TO_REVIEW&&a(),this.setState({currentTab:e})});c(this,"handleGetRandomSampleClick",()=>{const{showSamplesModalAgain:e,onLoadRandomPage:s}=this.props;e?this.setState({showGetMoreSamplesModal:!0}):s()});c(this,"handleModalProceed",()=>{const{onLoadRandomPage:e}=this.props;e(),this.setState({showGetMoreSamplesModal:!1})});c(this,"handlePageChange",(e,s)=>{const{currentTab:a}=this.state,{onLoadPage:n}=this.props;this.setState(o=>({currentPages:{...o.currentPages,[a]:+s.activePage}})),a!==A.REVIEWED&&n(+s.activePage)});c(this,"handleSwitchToAllItemsTab",()=>{const{reviewedItems:e}=this.props;e.length>0?this.setState({showAllItemsTabChangeModal:!0}):this.handleTabChange(A.ALL_ITEMS)});c(this,"getIsReviewingTPItems",()=>{const{collection:e,isReviewing:s}=this.props;return e?z(e.urn)&&s:!1});c(this,"renderSidebarItem",e=>{const{collection:s,selectedItemId:a,bodyShape:n,isPlayingEmote:o}=this.props;return t.jsx(va,{item:e,isSelected:a===e.id,isVisible:this.isVisible(e),isPlayingEmote:o,selectedCollectionId:(s==null?void 0:s.id)??null,bodyShape:n,onClick:this.handleClick},e.id)});c(this,"renderSidebarCategory",e=>{const s=e.filter(Ie),a=e.filter(X);return e.length===0?t.jsx("div",{className:"empty",children:t.jsx("div",{className:"subtitle",children:r("item_editor.left_panel.empty_collection")})}):s.length===0||a.length===0?e.map(this.renderSidebarItem):t.jsxs(t.Fragment,{children:[t.jsx(W,{label:this.renderCollapsableLabel(L.WEARABLE),children:s.map(this.renderSidebarItem)}),t.jsx(W,{label:this.renderCollapsableLabel(L.EMOTE),children:a.map(this.renderSidebarItem)})]})});c(this,"renderTabPagination",e=>{const{currentTab:s,currentPages:a}=this.state,n=a[s],o=Math.ceil(e/B);return o>1?t.jsx(d.Pagination,{siblingRange:0,firstItem:null,lastItem:null,totalPages:o,activePage:n,onPageChange:this.handlePageChange}):null});c(this,"renderPaginationStats",e=>{const{currentPages:s,currentTab:a}=this.state,n=s[a],o=(n-1)*B,l=n*B;return t.jsx(d.Header,{sub:!0,children:r("item_editor.left_panel.reviewed_tab.page_counter",{pageStart:o,pageEnd:l>e?e:l,total:e})})});c(this,"renderTabContent",()=>{const{items:e,isLoading:s,totalItems:a,reviewedItems:n}=this.props,{currentTab:o,currentPages:l}=this.state,h=this.getIsReviewingTPItems(),g=l[o];if(s)return t.jsx(d.Loader,{size:"large",active:!0});switch(o){case A.TO_REVIEW:return t.jsxs(t.Fragment,{children:[this.renderSidebarCategory(e),!h&&a?this.renderTabPagination(a):null]});case A.REVIEWED:{const p=n.slice((g-1)*B,g*B);return t.jsxs(t.Fragment,{children:[n.length?this.renderPaginationStats(n.length):null,this.renderSidebarCategory(p),n.length?this.renderTabPagination(n.length):null]})}case A.ALL_ITEMS:return t.jsxs(t.Fragment,{children:[e.length&&a?this.renderPaginationStats(a):null,this.renderSidebarCategory(e),e.length&&a?this.renderTabPagination(a):null]});default:return null}});c(this,"renderTabHeader",()=>{const{isLoading:e,totalItems:s,reviewedItems:a}=this.props,{currentTab:n}=this.state;let o;const l=!s||s<B||a.length===s;switch(n){case A.TO_REVIEW:o=t.jsx(d.Popup,{content:r("item_editor.top_panel.not_enough_items_to_curate_more"),disabled:!l,position:"bottom center",trigger:t.jsx("div",{children:t.jsxs(d.Button,{disabled:e||l,primary:!0,className:"random-sample-button",onClick:this.handleGetRandomSampleClick,children:[t.jsx(d.Icon,{name:"random"}),r("item_editor.left_panel.get_random_sample")]})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0});break;case A.REVIEWED:o=t.jsx($,{id:"item_editor.left_panel.reviewed_samples",values:{reviewed_samples_bold:t.jsx("b",{children:r("item_editor.left_panel.reviewed_samples_bold",{count:a.length})}),total:K(s??1)}});break;default:return null}return t.jsxs("div",{className:"tab-header",children:[" ",o," "]})});c(this,"renderModal",()=>{const{onToggleShowSamplesModalAgain:e,showSamplesModalAgain:s}=this.props,{showGetMoreSamplesModal:a}=this.state;return t.jsxs(d.Modal,{open:a,size:"small",className:"ConfirmNewSampleModal",children:[t.jsx(d.Modal.Header,{children:r("item_editor.left_panel.get_more_samples_modal.title")}),t.jsxs(d.Modal.Content,{children:[t.jsx($,{id:"item_editor.left_panel.get_more_samples_modal.content",values:{count:10,tabName:t.jsx("b",{children:A.REVIEWED})}}),t.jsxs("div",{className:"checkbox-container",onClick:e,children:[t.jsx(d.Checkbox,{checked:!s}),r("item_editor.left_panel.get_more_samples_modal.dont_show_again")]})]}),t.jsxs(d.Modal.Actions,{children:[t.jsx(d.Button,{onClick:()=>this.setState({showGetMoreSamplesModal:!1}),children:r("global.cancel")}),t.jsx(d.Button,{primary:!0,onClick:this.handleModalProceed,children:r("item_editor.left_panel.get_more_samples_modal.understood")})]})]})});c(this,"renderAllItemsTabChangeModal",()=>{const{showAllItemsTabChangeModal:e}=this.state;return t.jsxs(d.Modal,{open:e,size:"small",className:"ConfirmNewSampleModal",children:[t.jsx(d.Modal.Header,{children:r("item_editor.left_panel.all_items_check.title")}),t.jsx(d.Modal.Content,{children:r("item_editor.left_panel.all_items_check.content")}),t.jsxs(d.Modal.Actions,{children:[t.jsx(d.Button,{onClick:()=>this.setState({showAllItemsTabChangeModal:!1}),children:r("global.cancel")}),t.jsx(d.Button,{primary:!0,onClick:()=>this.handleTabChange(A.ALL_ITEMS),children:r("item_editor.left_panel.get_more_samples_modal.understood")})]})]})});c(this,"renderTabs",()=>{const{currentTab:e}=this.state;return t.jsxs(d.Tabs,{isFullscreen:!0,children:[t.jsx(d.Tabs.Tab,{active:e===A.TO_REVIEW,onClick:()=>this.handleTabChange(A.TO_REVIEW),children:r("item_editor.left_panel.to_review")}),t.jsx(d.Tabs.Tab,{active:e===A.REVIEWED,onClick:()=>this.handleTabChange(A.REVIEWED),children:r("item_editor.left_panel.reviewed")}),t.jsx(d.Tabs.Tab,{active:e===A.ALL_ITEMS,onClick:this.handleSwitchToAllItemsTab,children:r("item_editor.left_panel.all_items")})]})})}componentDidMount(){this.handleReviewItemsTrigger()}componentDidUpdate(e){this.handleReviewItemsTrigger(e)}renderCollapsableLabel(e){return t.jsxs(t.Fragment,{children:[t.jsx(H,{name:e}),t.jsx($,{id:`item_editor.left_panel.${e}`})]})}render(){return t.jsxs(d.Section,{className:"Items",children:[this.getIsReviewingTPItems()?t.jsxs(t.Fragment,{children:[this.renderTabs(),this.renderTabHeader()]}):null,this.renderTabContent(),this.renderModal(),this.renderAllItemsTabChangeModal()]})}}class fa extends b.PureComponent{render(){const{collection:m,isSelected:e}=this.props;return t.jsx("div",{className:`SidebarCollection ${e?"is-selected":""}`,children:t.jsxs(ee,{to:F.itemEditor({collectionId:m.id}),children:[t.jsx(Gt,{collectionId:m.id}),t.jsxs("div",{className:"wrapper",children:[t.jsxs("div",{className:"name",children:[t.jsx(st,{collection:m}),m.name]}),t.jsx("div",{className:"count",children:r("item_editor.left_panel.items_count",{count:m.itemCount})})]})]})})}}class Ta extends b.PureComponent{constructor(){super(...arguments);c(this,"state",{currentPage:1});c(this,"handlePageChange",(e,s)=>{const{onLoadPage:a}=this.props;this.setState({currentPage:+s.activePage}),a(+s.activePage)})}render(){const{collections:e,isLoading:s,items:a,selectedCollectionId:n,totalCollections:o}=this.props,{currentPage:l}=this.state;if(e.length===0)return null;const h=Math.ceil(o/B);return s?t.jsx(d.Loader,{size:"small",active:!0}):!s&&a.length===0&&e.length===0?t.jsx("div",{className:"empty",children:t.jsx("div",{className:"subtitle",children:r("collections_page.empty_description")})}):t.jsx(t.Fragment,{children:t.jsxs(d.Section,{className:"Collections",children:[e.map(g=>t.jsx(fa,{collection:g,items:a,isSelected:g.id===n},g.id)),h>1?t.jsx(d.Pagination,{siblingRange:0,firstItem:null,lastItem:null,totalPages:h,activePage:l,onPageChange:this.handlePageChange}):null]})})}}var J=(i=>(i.COLLECTIONS="collections",i.ORPHAN_ITEMS="orphanItems",i))(J||{});const Y=1;let wa=class extends b.PureComponent{constructor(){super(...arguments);c(this,"state",this.getInitialState());c(this,"handleToggleShowSamplesModalAgain",()=>{this.setState(e=>({showSamplesModalAgain:!e.showSamplesModalAgain}))});c(this,"fetchResource",()=>{const{address:e,onFetchCollections:s,onFetchOrphanItems:a,isReviewing:n,selectedCollectionId:o}=this.props,{pages:l}=this.state;if(e&&!n&&!o){const h=l[l.length-1];(this.isCollectionTabActive()?s:a)(e,{limit:B,page:h})}});c(this,"loadPage",e=>{this.setState({pages:[e]},()=>this.fetchResource())});c(this,"getRandomPage",(e,s)=>Math.floor(Math.random()*(s-e+1)+e));c(this,"loadRandomPage",e=>{const{pages:s}=this.state,{totalItems:a,totalCollections:n,onSetReviewedItems:o}=this.props,l=this.isCollectionTabActive()?n:a,h=Math.ceil(l/B);if(h>s.length){const g=[...Array(h).keys()].map(p=>p+1).filter(p=>!s.includes(p));if(g.length>0){const p=g[Math.floor(Math.random()*g.length)];this.setState(E=>({pages:[...E.pages,p]}),this.fetchResource)}}o(e)});c(this,"handleTabChange",e=>{this.setState({currentTab:e,pages:[Y]},this.fetchResource)});c(this,"isCollectionTabActive",()=>{const{selectedCollectionId:e}=this.props,{currentTab:s}=this.state;return s===J.COLLECTIONS&&!e})}getInitialState(){const{selectedCollectionId:e,selectedItemId:s}=this.props;let a=J.COLLECTIONS;return!e&&s&&(a=J.ORPHAN_ITEMS),{pages:[Y],currentTab:a,initialPage:Y,showSamplesModalAgain:!0}}componentDidMount(){const{address:e,hasUserOrphanItems:s,selectedItem:a,onFetchOrphanItem:n,onSetItems:o}=this.props;this.fetchResource(),e&&s===void 0&&n(e),a&&o([a])}componentDidUpdate(e,s){const{isConnected:a,address:n,selectedCollectionId:o,selectedItemId:l,selectedItem:h,orphanItems:g,totalItems:p,visibleItems:E,hasUserOrphanItems:w,onSetItems:S,onFetchOrphanItem:j}=this.props,{initialPage:_,pages:f}=this.state;if(!o&&n&&l&&p&&(_===Y||s.initialPage<_)){if(!g.find(T=>T.id===l)){const T=Math.ceil(p/B),R=f[f.length-1],M=Math.min(T,R+1);f.includes(M)||this.setState({pages:[M],initialPage:M},this.fetchResource)}}else if(e.selectedItemId&&l&&e.selectedItemId!==l){const T=E.filter(R=>R.type!==L.EMOTE);S(T)}else n&&a&&(a!==e.isConnected||e.selectedCollectionId&&!o)&&this.setState({pages:[Y]},this.fetchResource),e.selectedCollectionId!==o&&this.setState({pages:[Y]}),n&&n!==e.address&&w===void 0&&j(n);!e.selectedItem&&h&&h.type!==L.EMOTE&&S([h]),e.selectedCollectionId!==o&&S([])}componentWillUnmount(){const{onSetItems:e}=this.props;e([])}getItems(e,s,a){const{selectedCollectionId:n,orphanItems:o,isReviewing:l}=this.props;return n&&e?Yt(e)&&l?s.filter(h=>!!(a!=null&&a.find(g=>g.itemId===h.id&&g.status===Q.PENDING))):s:o}render(){const{items:e,totalItems:s,totalCollections:a,collections:n,selectedItemId:o,selectedCollectionId:l,visibleItems:h,bodyShape:g,reviewedItems:p,isReviewing:E,isPlayingEmote:w,isConnected:S,wearableController:j,isLoading:_,hasUserOrphanItems:f,onSetItems:T,onSetReviewedItems:R,onResetReviewedItems:M}=this.props,{pages:I,showSamplesModalAgain:u}=this.state,N=!l&&f,k=this.isCollectionTabActive()&&!l,x=!this.isCollectionTabActive()||l;return t.jsx("div",{className:"LeftPanel",children:S?t.jsx(Qs,{id:l,itemSelected:o,itemsPage:I,itemsPageSize:B,fetchCollectionItemsOptions:{status:E?Q.PENDING:void 0},onChangePage:v=>this.setState({pages:[v]}),children:({paginatedCollections:v,collection:O,paginatedItems:re,initialPage:it,isLoadingCollection:ot,isLoadingCollectionItems:lt,itemCurations:rt})=>{const Z=this.getItems(O,re,rt),ye=this.isCollectionTabActive(),dt=l&&O?it:this.state.initialPage;return t.jsxs(t.Fragment,{children:[t.jsx(Ea,{}),N?t.jsxs(d.Tabs,{isFullscreen:!0,children:[t.jsx(d.Tabs.Tab,{active:ye,onClick:()=>this.handleTabChange(J.COLLECTIONS),children:r("collections_page.collections")}),t.jsx(d.Tabs.Tab,{active:!ye,onClick:()=>this.handleTabChange(J.ORPHAN_ITEMS),children:r("item_editor.left_panel.items")})]}):null,k?t.jsx(Ta,{collections:v,totalCollections:a||n.length,items:e,hasHeader:Z.length>0,selectedCollectionId:l,onLoadPage:this.loadPage,isLoading:ot}):null,x?t.jsxs(t.Fragment,{children:[t.jsx(Sa,{items:Z,totalItems:s||Z.length,hasHeader:!l&&n.length>0,selectedItemId:o,collection:O,isReviewing:E,isPlayingEmote:w,visibleItems:h,bodyShape:g,onResetReviewedItems:M,reviewedItems:p,onSetItems:T,wearableController:j,initialPage:dt,isLoading:lt||_,onToggleShowSamplesModalAgain:this.handleToggleShowSamplesModalAgain,showSamplesModalAgain:u,onReviewItems:()=>R(Z),onLoadRandomPage:()=>this.loadRandomPage(Z),onLoadPage:this.loadPage}),t.jsx(ba,{collectionId:l})]}):null]})}}):null})}};const ya=i=>{const m=te(),e=le(),s=we(),a=Te(),n=at(),o=C(x=>se(x)),l=C(x=>_e(x)),h=C(x=>Jt(x)),g=C(x=>zt(x)),p=C(x=>qe(x)),E=C(x=>Ze(x)),w=C(x=>Ke(x)),S=C(x=>je(x)),j=C(x=>He(x)),_=C(x=>s?fe(x,s):null),f=C(x=>{if(e)return ge(x,e);if(o)return ge(x,o)}),T=C(x=>e?void 0:qt(x)),R=C(x=>o&&!e?Zt(x,o,f==null?void 0:f.limit):Kt(x)),M=b.useMemo(()=>G(j,es)||G(j,ts),[j]),I=b.useCallback(x=>m(Qe(x)),[m]),u=b.useCallback((x,v)=>m(Qt(x,v)),[m]),N=b.useCallback((x,v)=>m(Xe(x,v)),[m]),k=b.useCallback(x=>m(Xt(x)),[m]);return t.jsx(wa,{...i,address:o,isConnected:l,items:h,totalItems:(f==null?void 0:f.total)||null,totalCollections:(T==null?void 0:T.total)||null,orphanItems:R,collections:g,selectedItemId:s,selectedItem:_,selectedCollectionId:e,visibleItems:n,bodyShape:p,wearableController:E,isReviewing:a,isLoading:M,isPlayingEmote:w,hasUserOrphanItems:S,onSetItems:I,onFetchCollections:u,onFetchOrphanItems:N,onFetchOrphanItem:k})},Pa=ya;class me extends q.PureComponent{constructor(){super(...arguments);c(this,"handleAvatarColorChange",(e,s)=>{const{currentColor:a,colors:n,onChange:o}=this.props;if(a.toHexString()!==s.value){const l=n.find(h=>h.toHexString()===s.value);o(l)}});c(this,"renderItem",(e,s)=>{const a=e.toHexString();return t.jsx(d.Dropdown.Item,{value:a,onClick:this.handleAvatarColorChange,children:t.jsx("i",{className:"color",style:{background:a}})},s)})}render(){const{currentColor:e,colors:s,label:a}=this.props,n=e.toHexString();return t.jsx(d.Dropdown,{inline:!0,direction:"right",className:"AvatarColorDropdown Select",value:n,trigger:t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"label",children:a}),t.jsx("div",{className:"value",children:t.jsx("i",{className:"color",style:{background:n}})}),t.jsx("div",{className:"handle"})]}),children:t.jsx(d.Dropdown.Menu,{className:"colors-menu",children:s.map(this.renderItem)})})}}let Aa=class extends q.PureComponent{constructor(){super(...arguments);c(this,"handleAvatarChangeWearable",(e,s)=>{const{wearable:a,category:n,bodyShape:o,onChange:l,baseWearables:h}=this.props,g=s.value?h.find(p=>p.id===s.value):null;a!==g&&l(n,o,g??null)})}render(){const{wearable:e,bodyShape:s,category:a,label:n,isNullable:o,baseWearables:l}=this.props,h=ss(l,a,s).map(p=>({value:p.id,text:as(p)}));o&&h.push({value:"",text:r("global.none")});const g=e?h.find(p=>p.value===e.id):null;return t.jsx(d.Dropdown,{inline:!0,direction:"right",className:"AvatarWearableDropdown Select",value:e?e.id:"",options:h,scrolling:!0,onChange:this.handleAvatarChangeWearable,trigger:t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"label",children:n}),t.jsx("div",{className:"value",children:g?g.text:r("global.none")}),t.jsx("div",{className:"handle"})]})})}};const Na=i=>({baseWearables:ns(i)}),ne=Fe(Na)(Aa);let Ra=class extends b.PureComponent{constructor(){super(...arguments);c(this,"state",{showSceneBoundaries:!1,isShowingAvatarAttributes:!1,isLoading:!1});c(this,"analytics",Se());c(this,"handleToggleShowingAvatarAttributes",()=>{this.setState({isShowingAvatarAttributes:!this.state.isShowingAvatarAttributes})});c(this,"handleBodyShapeChange",(e,{value:s})=>{const{onSetBodyShape:a}=this.props;a(s)});c(this,"handleAnimationChange",(e,{value:s})=>{const{emotes:a,visibleItems:n,onSetAvatarAnimation:o,onSetItems:l}=this.props,h=a.find(p=>p.id===s),g=n.filter(p=>p.type!==L.EMOTE);g.forEach(p=>{var E;(E=this.analytics)==null||E.track("Play Emote",{EMOTE_PLAYED_BASE:!h,EMOTE_PLAYED_ITEM_ID:h!=null&&h.urn?Ce(h.urn):null,EMOTE_PLAYED_NAME:h?h.name:s,PREVIEWED_WEARABLE_ITEM_ID:p!=null&&p.urn?z(p.urn)?ze(p.urn):Ce(p.urn):null,PREVIEWED_WEARABLE_NAME:p.name})}),h?g.push(h):o(s),l(g)});c(this,"handleSkinColorChange",e=>{const{onSetSkinColor:s}=this.props;s(e)});c(this,"handleEyeColorChange",e=>{const{onSetEyeColor:s}=this.props;s(e)});c(this,"handleHairColorChange",e=>{const{onSetHairColor:s}=this.props;s(e)});c(this,"handleWearableChange",(e,s,a)=>{const{onSetBaseWearable:n}=this.props;n(e,s,a)});c(this,"handleWearablePreviewLoad",()=>{const{wearableController:e,onSetWearablePreviewController:s}=this.props;e||s(d.WearablePreview.createController("wearable-editor")),this.setState({isLoading:!1})});c(this,"handleControlActionChange",async e=>{const{wearableController:s}=this.props,a=.1;if(s)switch(await(s==null?void 0:s.emote.pause()),e){case ae.ZOOM_IN:{await(s==null?void 0:s.scene.changeZoom(a));break}case ae.ZOOM_OUT:{await(s==null?void 0:s.scene.changeZoom(-a));break}}});c(this,"handlePlayEmote",()=>{const{wearableController:e,isPlayingEmote:s,visibleItems:a,onSetAvatarAnimation:n,onSetItems:o}=this.props,l=a.filter(h=>h.type!==L.EMOTE);s?(n(P.PreviewEmote.IDLE),o(l)):e==null||e.emote.play()});c(this,"renderEmotePlayButton",()=>{const{isPlayingEmote:e}=this.props,s=e?"stop":"play",a=e?r("item_editor.center_panel.stop"):r("item_editor.center_panel.play_emote");return t.jsxs(d.Button,{icon:!0,onClick:this.handlePlayEmote,children:[t.jsx(d.Icon,{name:s}),t.jsx("span",{children:a})]})});c(this,"renderEmoteDropdownButton",()=>{const{collection:e,emotes:s,isPlayingEmote:a}=this.props,n=!!e,o=s.length>0;return a?null:t.jsx(d.Dropdown,{className:"avatar-animation button icon",floating:!0,scrolling:!0,children:t.jsxs(d.Dropdown.Menu,{children:[o&&t.jsxs(t.Fragment,{children:[t.jsx(d.Dropdown.Header,{content:n?r("item_editor.center_panel.from_collection"):r("item_editor.center_panel.from_items")}),t.jsx(d.Dropdown.Divider,{}),s.map(l=>t.jsx(d.Dropdown.Item,{value:l.id,text:l.name,onClick:this.handleAnimationChange},l.id)),t.jsx(d.Dropdown.Divider,{}),t.jsx(d.Dropdown.Header,{content:r("item_editor.center_panel.default")}),t.jsx(d.Dropdown.Divider,{})]}),P.PreviewEmote.schema.enum.map(l=>t.jsx(d.Dropdown.Item,{value:l,text:r(`emotes.${l}`),onClick:this.handleAnimationChange},l))]})})});c(this,"renderEmoteSelector",()=>t.jsx(d.Popup,{content:r("item_editor.center_panel.disabled_animation_dropdown"),disabled:!0,position:"top center",trigger:t.jsx("div",{className:"avatar-animation-dropdown-wrapper option",children:t.jsxs(d.Button.Group,{children:[this.renderEmotePlayButton(),this.renderEmoteDropdownButton()]})})}))}componentDidMount(){const{address:e,collection:s,emotes:a,selectedBaseWearables:n,hasUserOrphanItems:o,onFetchBaseWearables:l,onFetchOrphanItems:h,onFetchCollectionItems:g}=this.props,p=a.length>0;n||l(),p||(s&&!V(s)?g(s.id):e&&o&&h(e)),this.setState({isLoading:!0})}componentWillUnmount(){const{onSetWearablePreviewController:e}=this.props;e(null)}renderSelectTrigger(e,s){return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"label",children:e}),t.jsx("div",{className:"value",children:s}),t.jsx("div",{className:"handle"})]})}getDropdownAttributes(e,s,a){const n=s.find(o=>o.value===e);return{value:e,options:s,trigger:this.renderSelectTrigger(a,n?n.text:"")}}render(){const{bodyShape:e,skinColor:s,eyeColor:a,hairColor:n,emote:o,selectedBaseWearables:l,selectedItem:h,visibleItems:g,isImportFilesModalOpen:p,wearableController:E}=this.props,{isShowingAvatarAttributes:w,showSceneBoundaries:S,isLoading:j}=this.state,_=g.some(X)&&(h==null?void 0:h.type)===L.EMOTE,f=o===P.PreviewEmote.JUMP?1:void 0;return t.jsxs("div",{className:`CenterPanel ${p?"import-files-modal-is-open":""}`,children:[t.jsx(d.WearablePreview,{id:"wearable-editor",profile:"default",bodyShape:e,emote:o,zoom:f,skin:de(s),eyes:de(a),hair:de(n),urns:l?Object.values(l).map(T=>T?T.id:null).filter(T=>T!==null):[],base64s:g.map(is),disableAutoRotate:!0,disableBackground:!0,wheelZoom:1.5,wheelStart:100,dev:os,onUpdate:()=>this.setState({isLoading:!0}),onLoad:this.handleWearablePreviewLoad,disableDefaultEmotes:_,showSceneBoundaries:S}),_?t.jsxs("div",{className:"zoom-controls",children:[t.jsx(d.Button,{className:"zoom-control zoom-in-control",onClick:()=>this.handleControlActionChange(ae.ZOOM_IN),children:t.jsx(d.Icon,{name:"plus"})}),t.jsx(d.Button,{className:"zoom-control zoom-out-control",onClick:()=>this.handleControlActionChange(ae.ZOOM_OUT),children:t.jsx(d.Icon,{name:"minus"})})]}):null,j&&t.jsx(d.Center,{children:t.jsx(d.Loader,{active:!0})}),t.jsxs("div",{className:"footer",children:[_&&!j&&E?t.jsx("div",{className:"emote-controls-container",children:t.jsx(d.EmoteControls,{className:"emote-controls",wearablePreviewId:"wearable-editor",wearablePreviewController:E})}):null,t.jsxs("div",{className:"options",children:[t.jsx("div",{className:`option ${w?"active":""}`,onClick:this.handleToggleShowingAvatarAttributes,children:t.jsx(d.Icon,{name:"user"})}),_?null:this.renderEmoteSelector(),t.jsx("div",{className:`option ${S?"active":""}`,children:t.jsx(H,{name:"cylinder",onClick:()=>this.setState(T=>({showSceneBoundaries:!T.showSceneBoundaries}))})})]}),t.jsxs("div",{className:`avatar-attributes ${w?"active":""}`,children:[t.jsx("div",{className:"dropdown-container",children:t.jsx(d.Dropdown,{inline:!0,direction:"right",className:"Select",onChange:this.handleBodyShapeChange,...this.getDropdownAttributes(e,[{value:P.BodyShape.MALE,text:r("body_shapes.male")},{value:P.BodyShape.FEMALE,text:r("body_shapes.female")}],r("wearable.category.body_shape"))})}),t.jsx("div",{className:"dropdown-container",children:t.jsx(me,{currentColor:s,colors:ls(),label:r("wearable.color.skin"),onChange:this.handleSkinColorChange})}),t.jsx("div",{className:"dropdown-container",children:t.jsx(me,{currentColor:a,colors:rs(),label:r("wearable.color.eye"),onChange:this.handleEyeColorChange})}),t.jsx("div",{className:"dropdown-container",children:t.jsx(me,{currentColor:n,colors:ds(),label:r("wearable.color.hair"),onChange:this.handleHairColorChange})}),t.jsx("div",{className:"dropdown-container",children:l&&t.jsx(ne,{wearable:l[P.WearableCategory.HAIR],category:P.WearableCategory.HAIR,bodyShape:e,label:r("wearable.category.hair"),onChange:this.handleWearableChange,isNullable:!0})}),t.jsx("div",{className:"dropdown-container",children:l&&t.jsx(ne,{wearable:l[P.WearableCategory.FACIAL_HAIR],category:P.WearableCategory.FACIAL_HAIR,bodyShape:e,label:r("wearable.category.facial_hair"),onChange:this.handleWearableChange,isNullable:!0})}),t.jsx("div",{className:"dropdown-container",children:l&&t.jsx(ne,{wearable:l[P.WearableCategory.UPPER_BODY],category:P.WearableCategory.UPPER_BODY,bodyShape:e,label:r("wearable.category.upper_body"),onChange:this.handleWearableChange})}),t.jsx("div",{className:"dropdown-container",children:l&&t.jsx(ne,{wearable:l[P.WearableCategory.LOWER_BODY],category:P.WearableCategory.LOWER_BODY,bodyShape:e,label:r("wearable.category.lower_body"),onChange:this.handleWearableChange})})]})]})]})}};const Ma=()=>{const i=te(),m=C(se),e=C(qe),s=C(cs),a=C(hs),n=C(ms),o=C(gs),l=C(ps),h=at(),g=C(Ze),p=C(us),E=C(Ke),w=C(Cs),S=C(je),j=C(Is),_=le(),f=we(),T=C(v=>f?fe(v,f):null),R=b.useMemo(()=>_?j.find(v=>v.id===_):void 0,[j,_]),M=b.useMemo(()=>_?p.filter(v=>v.collectionId===_):p.filter(v=>!v.collectionId),[p,_]),I=l?l[e]:null,N=b.useMemo(()=>!h.some(X)&&o===P.PreviewEmote.IDLE,[h,o])?!1:E,k="CreateSingleItemModal"in w,x=b.useMemo(()=>({onSetBodyShape:v=>{i(bs(v))},onSetAvatarAnimation:v=>{i(xs(v))},onSetSkinColor:v=>{i(_s(v))},onSetEyeColor:v=>{i(Es(v))},onSetHairColor:v=>{i(vs(v))},onSetBaseWearable:(v,O,re)=>{i(js(v,O,re))},onFetchBaseWearables:()=>{i(Ss())},onSetWearablePreviewController:v=>{i(fs(v))},onSetItems:v=>{i(Qe(v))},onFetchOrphanItems:(v,O)=>{i(Xe(v,O))},onFetchCollectionItems:(v,O)=>{i(Ts(v,O))}}),[i]);return t.jsx(Ra,{address:m,bodyShape:e,collection:R,selectedItem:T,selectedBaseWearables:I,skinColor:s,eyeColor:a,hairColor:n,emote:o,visibleItems:h,wearableController:g,emotes:M,isPlayingEmote:N,isImportFilesModalOpen:k,hasUserOrphanItems:S,...x})},Da=Ma;class La extends b.PureComponent{constructor(){super(...arguments);c(this,"handleChange",e=>{const{value:s,maxLength:a,onChange:n}=this.props,o=e.target.value;s!==o&&n(a?o.slice(0,a):o)})}render(){const{label:e,disabled:s,value:a}=this.props;return t.jsxs("div",{className:`Input ${s?"is-disabled":""}`.trim(),children:[t.jsx("div",{className:"label",children:e}),t.jsx("input",{value:a||"",onChange:this.handleChange,disabled:s})]})}}class oe extends b.PureComponent{constructor(){super(...arguments);c(this,"state",{value:this.props.value});c(this,"handleChange",(e,s)=>{const{value:a,onChange:n}=this.props,o=s.value;o!==a&&(this.setState({value:o}),n(o))})}componentWillReceiveProps(e){const{itemId:s,value:a}=e;(s!==this.props.itemId||a!==this.state.value)&&this.setState({value:a})}renderTrigger(){const{label:e,options:s}=this.props,{value:a}=this.state,n=s.find(o=>o.value===a);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"label",children:e}),t.jsx("div",{className:"value",children:n?n.text:r("item_editor.right_panel.select_placeholder")}),t.jsx("div",{className:"handle"})]})}render(){const{options:e,disabled:s}=this.props,{value:a}=this.state;return t.jsx(d.Dropdown,{className:`Select ${a?"":"blank"}`.trim(),trigger:this.renderTrigger(),inline:!0,direction:"right",scrolling:e.length>4,value:a||void 0,options:e,disabled:s,onChange:this.handleChange})}}c(oe,"defaultProps",{disabled:!1});class be extends b.PureComponent{constructor(){super(...arguments);c(this,"state",{value:this.props.value});c(this,"handleChange",(e,s)=>{const{onChange:a}=this.props,{value:n}=this.state,o=s.value,l=[...n];for(const h of o)n.includes(h)||l.push(h);l.length!==n.length&&(this.setState({value:l}),a(l))});c(this,"handleRemove",e=>{const{onChange:s}=this.props,a=this.state.value.filter(n=>n!==e);this.setState({value:a}),s(a)})}componentWillReceiveProps(e){const{itemId:s,value:a}=e;(s!==this.props.itemId||a!==this.state.value)&&this.setState({value:a})}renderTrigger(){const{label:e,info:s,options:a}=this.props,{value:n}=this.state,o=a.reduce((l,h)=>(l[h.value]=h.text,l),{});return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"label",children:[e,s?t.jsx(ie,{content:s,className:"info"}):null]}),t.jsx("div",{className:"values",children:n.length>0?n.map(l=>t.jsxs("div",{className:"value",children:[o[l],t.jsx("div",{className:"remove",onClick:h=>{this.handleRemove(l),h.stopPropagation()}})]},l)):t.jsx("div",{className:"placeholder",children:r("item_editor.right_panel.select_placeholder")})}),t.jsx("div",{className:"handle"})]})}render(){const{options:e,disabled:s}=this.props,{value:a}=this.state;return t.jsx(d.Dropdown,{inline:!0,multiple:!0,className:`MultiSelect ${a.length>0?"":"blank"}`.trim(),trigger:this.renderTrigger(),direction:"right",value:a,scrolling:!1,options:e.filter(n=>!a.includes(n.value)),disabled:s,onChange:this.handleChange,closeOnChange:!0})}}c(be,"defaultProps",{disabled:!1});class nt extends b.PureComponent{constructor(){super(...arguments);c(this,"state",{draft:"",value:this.props.value});c(this,"handleChange",e=>{this.setState({draft:e.target.value})});c(this,"handleAdd",()=>{const{onChange:e}=this.props,{draft:s,value:a}=this.state,n=s.trim();if(n!=="")if(a.includes(n))this.setState({draft:""});else{const o=[...a,n];this.setState({value:o,draft:""}),e(o)}});c(this,"handleKeyDown",e=>{if(e.key==="#"){e.preventDefault();return}else if(e.keyCode===ws||e.keyCode===Ne||e.keyCode===ys)this.handleAdd();else if(e.keyCode===Ps||e.keyCode===Ne){const{draft:s,value:a}=this.state,n=a[a.length-1];n&&s===""&&this.handleRemove(n)}});c(this,"handleRemove",e=>{const{onChange:s}=this.props,a=this.state.value.filter(n=>n!==e);this.setState({value:a}),s(a)})}componentWillReceiveProps(e){const{itemId:s,value:a}=e;(s!==this.props.itemId||a!==this.state.value)&&this.setState({value:a})}render(){const{isDisabled:e}=this.props,{draft:s,value:a}=this.state;return t.jsx("div",{className:`Tags ${a.length>0?"":"blank"} ${e?"is-disabled":""}`.trim(),children:t.jsxs("div",{className:"values",children:[a.map(n=>t.jsxs("div",{className:"value",children:[n,t.jsx("div",{className:"remove",onClick:o=>{this.handleRemove(n),o.stopPropagation()}})]},n)),t.jsx("input",{value:s,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleAdd,disabled:e})]})})}}c(nt,"defaultProps",{isDisabled:!1});let Oa=class extends b.PureComponent{constructor(){super(...arguments);c(this,"analytics",Se());c(this,"state",this.getInitialState());c(this,"thumbnailInput",b.createRef());c(this,"handleDeleteItem",()=>{const{onDeleteItem:e}=this.props,{selectedItem:s}=this.props;e(s)});c(this,"handleAddRepresentationToItem",()=>{const{selectedItem:e,onOpenModal:s}=this.props;s("CreateSingleItemModal",{item:e,addRepresentation:!0})});c(this,"handleChangeItemFile",()=>{const{selectedItem:e,onOpenModal:s}=this.props;s("CreateSingleItemModal",{item:e,changeItemFile:!0})});c(this,"handleOpenVideoDialog",(e={})=>{const{selectedItem:s,onOpenModal:a}=this.props;a("EditVideoModal",{item:s,onSaveVideo:this.handleSaveVideo,...e})});c(this,"handleSaveVideo",e=>{this.setState({video:URL.createObjectURL(e),contents:{...this.state.contents,[Re]:e},isDirty:!0})});c(this,"handleChangeName",e=>{this.setState({name:e,isDirty:this.isDirty({name:e})})});c(this,"handleChangeDescription",(e,s)=>{const a=s.value??"";this.setState({description:a,isDirty:this.isDirty({description:a})})});c(this,"handleChangeUtility",(e,s)=>{const a=s.value??"";this.setState({utility:a,isDirty:this.isDirty({utility:a})})});c(this,"handleChangeRarity",e=>{this.setState({rarity:e,isDirty:this.isDirty({rarity:e})})});c(this,"handleAllowVrmExport",(e,{checked:s})=>{const a={...this.state.data,blockVrmExport:!s};this.setState({data:a,isDirty:this.isDirty({data:a})})});c(this,"handleAllowOutlineCompatible",(e,{checked:s})=>{const a={...this.state.data,outlineCompatible:s};this.setState({data:a,isDirty:this.isDirty({data:a})})});c(this,"handleChangeCategory",e=>{let s;ce(this.state.data)?s={...this.state.data,category:e}:(s={...this.state.data,category:e},e===P.WearableCategory.SKIN&&(s=this.setReplaces(s,[]),s=this.setHides(s,[]))),this.setState({data:s,isDirty:this.isDirty({data:s})})});c(this,"handlePlayModeChange",e=>{const s={...this.state.data,loop:e===he.LOOP};this.setState({data:s,isDirty:this.isDirty({data:s})})});c(this,"handleChangeReplaces",e=>{const s=this.setReplaces(this.state.data,e);this.setState({data:s,isDirty:this.isDirty({data:s})})});c(this,"handleChangeHides",(e,s)=>{const a=this.state.data.hides;let n=[];s==="wearable"?n=[...a.filter(l=>!P.WearableCategory.schema.enum.includes(l)),...e]:n=[...a.filter(l=>!P.BodyPartCategory.schema.enum.includes(l)),...e];const o=this.setHides(this.state.data,n);this.setState({data:o,isDirty:this.isDirty({data:o})})});c(this,"handleChangeTags",e=>{const s={...this.state.data,tags:e};this.setState({data:s,isDirty:this.isDirty({data:s})})});c(this,"handleOnSaveItem",async()=>{var w,S;const{selectedItem:e,itemStatus:s,onSaveItem:a}=this.props,{name:n,description:o,utility:l,rarity:h,contents:g,data:p,isDirty:E}=this.state;if(E&&e){let j=p;j&&!ce(j)&&(j={...j,removesDefaultHiding:j.category===P.WearableCategory.UPPER_BODY||(w=j.hides)!=null&&w.includes(P.WearableCategory.UPPER_BODY)?[P.BodyPartCategory.HANDS]:[],..."blockVrmExport"in j?{blockVrmExport:j.blockVrmExport}:{},..."outlineCompatible"in j?{outlineCompatible:j.outlineCompatible}:{}});const _={...e.contents,...await As(g)},f={...e,name:n,description:o,rarity:h,data:j,contents:_,utility:l??void 0};s&&[Me.UNPUBLISHED,Me.UNDER_REVIEW].includes(s)&&(f.video=_[Re]),a(f,g),z(f.urn)&&((S=this.analytics)==null||S.track("Edit Item",{contents:g})),this.setState({isDirty:!1}),this.handleOnResetItem()}});c(this,"handleOnResetItem",()=>{const{selectedItem:e}=this.props;e&&this.setItem(e)});c(this,"handleOpenThumbnailDialog",()=>{const{selectedItem:e,onOpenModal:s}=this.props;(e==null?void 0:e.type)===L.EMOTE?s("EditThumbnailModal",{onSaveThumbnail:this.handleEmoteThumbnailChange,item:e}):this.thumbnailInput.current&&this.thumbnailInput.current.click()});c(this,"handleEmoteThumbnailChange",e=>{const s=Ns(e);this.setState({thumbnail:e,contents:{[De]:s},isDirty:!0})});c(this,"handleThumbnailChange",async e=>{const{files:s}=e.target;if(s&&s.length>0){const a=s[0],n=await Le(a),o=await Le(a,1024,1024),l=URL.createObjectURL(n);this.setState({thumbnail:l,contents:{[De]:o},isDirty:!0})}});c(this,"handleDownloadItem",()=>{const{selectedItemId:e,onDownload:s}=this.props;e&&s(e)})}componentDidMount(){const{selectedItem:e}=this.props;e&&this.setItem(e)}componentDidUpdate(e){const{selectedItemId:s,selectedItem:a}=this.props;e.selectedItemId!==s?a?this.setItem(a):this.setState(this.getInitialState()):a&&(!e.selectedItem||this.hasSavedItem())&&this.setItem(a)}setItem(e){var a;const s=e.data;Ie(e)&&((a=s.replaces)!=null&&a.length)&&(s.hides=s.hides.concat(s.replaces),s.replaces=[]),this.setState({thumbnail:"",video:"",name:e.name,description:e.description,utility:e.utility||"",rarity:e.rarity,data:e.data,hasItem:!0,isDirty:!1})}getInitialState(){return{name:"",description:"",utility:"",thumbnail:"",video:"",rarity:void 0,contents:{},data:void 0,hasItem:!1,isDirty:!1}}setReplaces(e,s){return{...e,replaces:s,representations:e.representations.map(a=>({...a,overrideReplaces:s}))}}setHides(e,s){return{...e,hides:s,representations:e.representations.map(a=>({...a,overrideHides:s}))}}canEditItemMetadata(e){const{collection:s,canEditSelectedItem:a}=this.props;return!e||s&&Oe(s)?!1:a}isSkin(){const{data:e}=this.state;return(e==null?void 0:e.category)===P.WearableCategory.SKIN}isDirty(e={}){const{selectedItem:s}=this.props,{hasItem:a}=this.state;return a?this.hasStateItemChanged({...this.state,...e},s):!1}hasSavedItem(){const{selectedItem:e}=this.props,{isDirty:s}=this.state;return e&&!s&&this.hasStateItemChanged(this.state,e)}hasStateItemChanged(e,s){return e.name!==s.name||e.description!==s.description||e.utility!==s.utility||e.rarity!==s.rarity||!Je(e.data,s.data)}asCategorySelect(e,s){return s.map(a=>({value:a,text:r(`${e}.category.${a}`)}))}asRaritySelect(e){return e.map(s=>({value:s,text:r(`wearable.rarity.${s}`)}))}asPlayModeSelect(e){return e.map(s=>({value:s,text:r(`emote.play_mode.${s}.text`),description:r(`emote.play_mode.${s}.description`)}))}renderOverrides(e){const s=this.canEditItemMetadata(e),a=this.state.data;if(!e||ce(a))return null;const n=Rs(e.contents,a.category),o=Ms(e.contents),l=a.hides.filter(g=>n.includes(g)),h=a.hides.filter(g=>o.includes(g));return t.jsxs(t.Fragment,{children:[t.jsx(be,{itemId:e.id,label:r("item_editor.right_panel.base_body"),info:r("item_editor.right_panel.base_body_info"),value:h,options:this.asCategorySelect(e.type,o),disabled:!s,onChange:g=>this.handleChangeHides(g,"bodypart")}),t.jsx(be,{itemId:e.id,label:r("item_editor.right_panel.wearables"),info:r("item_editor.right_panel.wearables_info"),value:l,options:this.asCategorySelect(e.type,l.some(g=>g===P.WearableCategory.BODY_SHAPE)?n:n.filter(g=>g!==P.WearableCategory.BODY_SHAPE)),disabled:!s,onChange:g=>this.handleChangeHides(g,"wearable")})]})}renderModelDetails(e){const{isDownloading:s}=this.props,{thumbnail:a}=this.state,n=this.canEditItemMetadata(e),o=s?t.jsx(d.Loader,{active:!0,size:"tiny",className:"donwload-item-loader"}):t.jsx(H,{name:"export",className:"download-item-button",onClick:this.handleDownloadItem});return t.jsxs("div",{className:"details",children:[n?t.jsxs(t.Fragment,{children:[t.jsx(H,{name:"edit",className:"edit-item-file",onClick:this.handleChangeItemFile}),o,t.jsxs("div",{className:"thumbnail-container",children:[t.jsx(pe,{item:e,src:a,hasBadge:!0,badgeSize:"small"}),t.jsxs("div",{className:"thumbnail-edit-container",children:[t.jsx("input",{type:"file",ref:this.thumbnailInput,onChange:this.handleThumbnailChange,accept:"image/png"}),t.jsx("div",{className:"thumbnail-edit-background"}),t.jsx(H,{name:"camera",onClick:this.handleOpenThumbnailDialog})]})]})]}):t.jsxs(t.Fragment,{children:[o,t.jsx(pe,{item:e,src:a,hasBadge:!0,badgeSize:"small"})]}),t.jsx(Ds,{item:e})]})}renderVideoDetails(e){if(!ke(e))return null;const s=this.canEditItemMetadata(e),a=s?()=>this.handleOpenVideoDialog():()=>this.handleOpenVideoDialog({viewOnly:!0});return t.jsx("div",{className:"details",children:s?t.jsxs(t.Fragment,{children:[t.jsx(H,{name:"edit",className:"edit-item-file",onClick:a}),t.jsx(H,{name:"play",className:"play-video-button",onClick:a}),t.jsx(Be,{item:e,src:this.state.video,showMetrics:!0,onClick:a})]}):t.jsxs(t.Fragment,{children:[Ls(e)&&t.jsx(H,{name:"play",className:"play-video-button",onClick:a}),t.jsx(Be,{item:e,src:this.state.video,showMetrics:!0})]})})}renderPermissions(e){return t.jsx(Os,{requiredPermissions:e.data.requiredPermissions})}render(){const{selectedItemId:e,address:s,isWearableUtilityEnabled:a,isConnected:n,error:o,isCampaignEnabled:l,isVrmOptOutEnabled:h,campaignName:g,campaignTag:p}=this.props,{name:E,description:w,utility:S,rarity:j,data:_,isDirty:f,hasItem:T}=this.state,R=P.Rarity.getRarities(),M=ks();return t.jsx("div",{className:"RightPanel",children:n?t.jsx(sa,{id:e,children:(I,u,N)=>{var O;const k=u&&Oe(u),x=this.canEditItemMetadata(I),v=I?Ie(I)?Bs(I.contents):Ws():[];return N?t.jsx(d.Loader,{size:"massive",active:!0}):T||!e?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"header",children:[t.jsx("div",{className:"title",children:r("item_editor.right_panel.properties")}),I&&et(I,s)&&!I.isPublished&&!k?t.jsx(d.Dropdown,{trigger:t.jsx("div",{className:"actions"}),inline:!0,direction:"left",children:t.jsxs(d.Dropdown.Menu,{children:[ue(I)!==null?t.jsx(d.Dropdown.Item,{text:r("item_detail_page.add_representation",{bodyShape:r(`body_shapes.${ue(I)}`).toLowerCase()}),onClick:this.handleAddRepresentationToItem}):null,t.jsx(tt,{name:E,onDelete:this.handleDeleteItem,trigger:t.jsx(d.Dropdown.Item,{text:r("global.delete")})})]})}):null]}),t.jsxs("div",{className:"container",children:[t.jsx(W,{label:r("item_editor.right_panel.details"),children:I?t.jsxs(t.Fragment,{children:[this.renderModelDetails(I),this.renderVideoDetails(I)]}):null}),t.jsx(W,{label:r("item_editor.right_panel.basics"),children:I?t.jsxs(t.Fragment,{children:[t.jsx(La,{label:r("global.name"),value:E,disabled:!x,maxLength:Fs,onChange:this.handleChangeName}),t.jsx(d.TextAreaField,{maxLength:Vs,onChange:this.handleChangeDescription,label:r("global.description"),placeholder:r("item_editor.right_panel.description_placeholder"),disabled:!x,value:w,rows:"2",cols:"12"}),a?t.jsx(d.TextAreaField,{maxLength:Hs,onChange:this.handleChangeUtility,label:r("global.utility"),placeholder:r("item_editor.right_panel.utility_placeholder"),disabled:!x,value:S,tooltip:{content:r("item_editor.right_panel.utility_tooltip")},rows:"2",cols:"12"}):null,t.jsx(oe,{itemId:I.id,label:r("global.category"),value:_.category,options:this.asCategorySelect(I.type,v),disabled:!x,onChange:this.handleChangeCategory}),!(I.urn&&z(I.urn))&&t.jsx(oe,{itemId:I.id,label:r("global.rarity"),value:j,options:this.asRaritySelect(R),disabled:I.isPublished||!x,onChange:this.handleChangeRarity})]}):null}),(I==null?void 0:I.type)===L.WEARABLE&&t.jsx(W,{label:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"overrides-label-panel",children:r("item_editor.right_panel.overrides")}),t.jsx(ie,{content:r("item_editor.right_panel.overrides_info"),className:"info"})]}),children:this.renderOverrides(I)}),(I==null?void 0:I.type)===L.EMOTE&&t.jsx(W,{label:r("item_editor.right_panel.animation"),children:I?t.jsx(oe,{itemId:I.id,label:r("create_single_item_modal.play_mode_label"),value:_.loop?he.LOOP:he.SIMPLE,options:this.asPlayModeSelect(M),disabled:!x,onChange:this.handlePlayModeChange}):null}),I&&ke(I)&&((O=I.data.requiredPermissions)!=null&&O.length)?t.jsx(W,{label:r("item_editor.right_panel.required_permissions"),children:this.renderPermissions(I)}):null,t.jsx(W,{label:r("item_editor.right_panel.tags"),children:I?t.jsxs(t.Fragment,{children:[t.jsx(nt,{itemId:I.id,value:_.tags,onChange:this.handleChangeTags,isDisabled:!x}),l&&g&&p&&x&&t.jsx("p",{className:"event-tag",children:r("item_editor.right_panel.event_tag",{event_tag:t.jsx("span",{children:p}),event_name:t.jsx("span",{children:g})})})]}):null}),(I==null?void 0:I.type)===L.WEARABLE&&h&&t.jsx(W,{label:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"overrides-label-panel",children:r("item_editor.right_panel.copyright.title")}),t.jsx(ie,{content:r("item_editor.right_panel.copyright.info"),className:"info"})]}),children:t.jsx("div",{className:"right-panel-copyright-section",children:t.jsxs("div",{className:"right-panel-export-protection",children:[t.jsx("span",{children:r("item_editor.right_panel.copyright.vrm_export")}),t.jsx(d.Checkbox,{toggle:!0,label:_!=null&&_.blockVrmExport?r("item_editor.right_panel.copyright.disabled"):r("item_editor.right_panel.copyright.enabled"),checked:!(_!=null&&_.blockVrmExport),onChange:this.handleAllowVrmExport,"aria-label":r("item_editor.right_panel.copyright.vrm_export")})]})})}),(I==null?void 0:I.type)===L.WEARABLE&&t.jsx(W,{label:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"overrides-label-panel",children:r("item_editor.right_panel.outline_compatible.title")}),t.jsx(ie,{content:r("item_editor.right_panel.outline_compatible.info"),className:"info"})]}),children:t.jsx("div",{className:"right-panel-copyright-section",children:t.jsxs("div",{className:"right-panel-export-protection",children:[t.jsx("span",{children:r("item_editor.right_panel.outline_compatible.title")}),t.jsx(d.Checkbox,{toggle:!0,label:(_==null?void 0:_.outlineCompatible)!==!1?r("item_editor.right_panel.copyright.enabled"):r("item_editor.right_panel.copyright.disabled"),checked:(_==null?void 0:_.outlineCompatible)!==!1,onChange:this.handleAllowOutlineCompatible,"aria-label":r("item_editor.right_panel.outline_compatible.title")})]})})}),f?t.jsxs("div",{className:"edit-buttons",children:[t.jsx(d.Button,{secondary:!0,onClick:this.handleOnResetItem,children:r("global.cancel")}),t.jsx(We,{primary:!0,onClick:this.handleOnSaveItem,network:P.Network.MATIC,children:r("global.save")})]}):o&&e?t.jsxs("p",{className:"danger-text",children:[r("global.error_ocurred"),": ",o]}):null]})]}):null}}):null})}};const ka=()=>{const i=te(),m=we(),e=C(u=>se(u)),s=C(u=>_e(u)),a=C(u=>Us(u)),n=C(u=>$s(u)),o=C(u=>Ve(u)),l=C(u=>Gs(u)),h=C(u=>Xs(u)),g=C(u=>Ys(u)),p=C(u=>Js(u)),E=C(u=>m?fe(u,m):null),w=C(u=>m&&E&&E.collectionId?Ee(u,E.collectionId):null),S=C(u=>{const N=ea(u),k=ta(u);return N==null?void 0:N[k]}),j=C(u=>zs(u)),_=C(u=>!E||!e?!1:w?Ue(u,e,w):et(E,e)),f=b.useMemo(()=>m?j[m]:null,[m,j]),T=b.useCallback((u,N)=>i(qs(u,N)),[i]),R=b.useCallback(u=>i(Ge(u)),[i]),M=b.useCallback((u,N)=>i($e(u,N)),[i]),I=b.useCallback(u=>i(Zs(u)),[i]);return t.jsx(Oa,{address:e,collection:w,selectedItem:E,selectedItemId:m,canEditSelectedItem:_,itemStatus:f,error:a,isConnected:s,isDownloading:n,isCommitteeMember:o,isCampaignEnabled:l,campaignTag:h,campaignName:S,isVrmOptOutEnabled:g,isWearableUtilityEnabled:p,onSaveItem:T,onDeleteItem:R,onOpenModal:M,onDownload:I})},Ba=ka;class Xa extends b.PureComponent{constructor(){super(...arguments);c(this,"state",{reviewedItems:[]});c(this,"handleOnSetReviewedItems",e=>{this.setState(s=>({reviewedItems:[...s.reviewedItems,...e.filter(a=>!s.reviewedItems.some(n=>n.id===a.id))]}))});c(this,"handleResetReviewedItems",()=>{this.setState({reviewedItems:[]})})}render(){const{reviewedItems:e}=this.state;return t.jsx(t.Fragment,{children:t.jsxs("div",{className:"ItemEditorPage",children:[t.jsx(ua,{reviewedItems:e}),t.jsxs("div",{className:"content",children:[t.jsx(Pa,{reviewedItems:e,onResetReviewedItems:this.handleResetReviewedItems,onSetReviewedItems:this.handleOnSetReviewedItems}),t.jsx(Da,{}),t.jsx(Ba,{})]})]})})}}export{Xa as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._image_142g7_1,._main_142g7_2{position:relative;width:64px;height:64px;border-radius:50%!important}._image_142g7_1{overflow:hidden}._network_142g7_13{position:absolute;bottom:0;right:0;width:32px;height:32px;z-index:1}._ellipsis_4huv2_1{margin:auto!important;color:var(--primary-text)}._itemImage_1y9df_1{min-width:64px;max-width:64px;height:64px;padding:5px;margin-left:18px;margin-right:24px}._itemStatus_1y9df_10{margin-right:4px}._grid_1y9df_14{padding:10px 0!important;color:var(--text);border-bottom:1px solid var(--divider)}._grid_1y9df_14:hover{background-color:#24212966;color:var(--text)}._row_1y9df_25{align-items:center!important;font-size:15px}._column_1y9df_30{display:flex!important}._statusColumn_1y9df_34{font-size:13px;text-transform:uppercase}._statusColumn_1y9df_34._synced_1y9df_39{color:#34ce76}._statusColumn_1y9df_34._unsynced_1y9df_43{color:#fc9965}._avatarColumn_1y9df_47{align-items:center;padding-left:10px!important}._nameWrapper_1y9df_52{display:flex;align-items:center;overflow:hidden}._name_1y9df_52{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._itemActions_1y9df_65{display:flex;align-items:center;justify-content:flex-end;width:100%}._action_1y9df_72{margin-left:5px}._status_rgxu1_1{text-transform:uppercase;padding:4px 8px;border-radius:32px;display:inline-flex;align-items:center;gap:4px}._status_rgxu1_1 .icon{height:18px}._pending_migration_rgxu1_14{color:#ffbc5b;background-color:#ffbc5b33}._synced_rgxu1_19{color:#65d890;background-color:#65d89033}._unpublished_rgxu1_24,._unsynced_rgxu1_25{color:#63b4f6;background-color:#63b4f633}._pending_mapping_rgxu1_30,._under_review_rgxu1_31{color:#ecebed;background-color:#ecebed33}._icon_rgxu1_10{width:17px;height:17px}._itemImage_1rili_1{min-width:64px;max-width:64px;height:64px;padding:5px;margin-left:18px;margin-right:24px}._itemStatus_1rili_10{margin-right:4px}._grid_1rili_14{padding:10px 0!important;color:var(--text);border-bottom:1px solid var(--divider);position:relative}._grid_1rili_14:not(._loading_1rili_21):hover{background-color:#24212966;color:var(--text)}._row_1rili_26{align-items:center!important;font-size:15px}._column_1rili_31{display:flex!important}._avatarColumn_1rili_35{align-items:center;padding-left:10px!important}._nameWrapper_1rili_40{display:flex;align-items:center;overflow:hidden}._name_1rili_40{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._itemActions_1rili_53{display:flex;align-items:center;justify-content:flex-end;width:100%}._action_1rili_60{margin-left:5px}._overlay_1rili_65{position:absolute;pointer-events:none;z-index:100000000;top:0;left:0;width:100%;height:100%;background-color:#00000046;z-index:1000;display:flex;justify-content:center;align-items:center}._itemCheckbox_2k9qa_1{margin-right:10px}._gridHeader_2k9qa_5.ui.grid{border-bottom:1px solid var(--divider);padding-bottom:10px;color:var(--secondary-text)}._gridHeader_2k9qa_5.ui.grid>.row>.column:first-child{padding-left:10px}._gridHeader_2k9qa_5.ui.grid>.row>.column._itemColumn_2k9qa_15{display:flex;align-items:center}._gridHeader_4acv6_1.ui.grid{border-bottom:1px solid var(--divider);padding-bottom:10px;color:var(--secondary-text)}._gridHeader_4acv6_1.ui.grid>.row>.column:first-child{padding-left:10px}._gridHeader_4acv6_1.ui.grid>.row>.column._itemColumn_4acv6_11{display:flex;align-items:center}._itemCheckbox_4acv6_16{margin-right:10px}._linkedToColumn_4acv6_20>span{margin-right:6px}._main_16i8r_3,._main_16i8r_3>.ui.container{display:flex;flex-direction:column;min-height:0;flex:1}._slots_16i8r_11{font-weight:700;text-transform:uppercase;position:relative}._slots_16i8r_11:before{content:"";display:inline-block;background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%202C4%203.10457%203.10457%204%202%204C0.89543%204%200%203.10457%200%202C0%200.89543%200.89543%200%202%200C3.10457%200%204%200.89543%204%202Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%208C4%209.10457%203.10457%2010%202%2010C0.89543%2010%200%209.10457%200%208C0%206.89543%200.89543%206%202%206C3.10457%206%204%206.89543%204%208Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%2014C4%2015.1046%203.10457%2016%202%2016C0.89543%2016%200%2015.1046%200%2014C0%2012.8954%200.89543%2012%202%2012C3.10457%2012%204%2012.8954%204%2014Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%202C10%203.10457%209.10457%204%208%204C6.89543%204%206%203.10457%206%202C6%200.89543%206.89543%200%208%200C9.10457%200%2010%200.89543%2010%202Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%208C10%209.10457%209.10457%2010%208%2010C6.89543%2010%206%209.10457%206%208C6%206.89543%206.89543%206%208%206C9.10457%206%2010%206.89543%2010%208Z'%20fill='%23FF2D55'/%3e%3cpath%20d='M8%2015.5C8.82843%2015.5%209.5%2014.8284%209.5%2014C9.5%2013.1716%208.82843%2012.5%208%2012.5C7.17157%2012.5%206.5%2013.1716%206.5%2014C6.5%2014.8284%207.17157%2015.5%208%2015.5Z'%20stroke='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16%202C16%203.10457%2015.1046%204%2014%204C12.8954%204%2012%203.10457%2012%202C12%200.89543%2012.8954%200%2014%200C15.1046%200%2016%200.89543%2016%202Z'%20fill='%23FF2D55'/%3e%3cpath%20d='M14%209.5C14.8284%209.5%2015.5%208.82843%2015.5%208C15.5%207.17157%2014.8284%206.5%2014%206.5C13.1716%206.5%2012.5%207.17157%2012.5%208C12.5%208.82843%2013.1716%209.5%2014%209.5Z'%20stroke='%23FF2D55'/%3e%3cpath%20d='M14%2015.5C14.8284%2015.5%2015.5%2014.8284%2015.5%2014C15.5%2013.1716%2014.8284%2012.5%2014%2012.5C13.1716%2012.5%2012.5%2013.1716%2012.5%2014C12.5%2014.8284%2013.1716%2015.5%2014%2015.5Z'%20stroke='%23FF2D55'/%3e%3c/svg%3e");width:16px;height:16px;top:3px;position:relative;margin-right:8px}.button._slots_16i8r_11._empty_16i8r_28:before{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%202C4%203.10457%203.10457%204%202%204C0.89543%204%200%203.10457%200%202C0%200.89543%200.89543%200%202%200C3.10457%200%204%200.89543%204%202Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%208C4%209.10457%203.10457%2010%202%2010C0.89543%2010%200%209.10457%200%208C0%206.89543%200.89543%206%202%206C3.10457%206%204%206.89543%204%208Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%2014C4%2015.1046%203.10457%2016%202%2016C0.89543%2016%200%2015.1046%200%2014C0%2012.8954%200.89543%2012%202%2012C3.10457%2012%204%2012.8954%204%2014Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%202C10%203.10457%209.10457%204%208%204C6.89543%204%206%203.10457%206%202C6%200.89543%206.89543%200%208%200C9.10457%200%2010%200.89543%2010%202Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%208C10%209.10457%209.10457%2010%208%2010C6.89543%2010%206%209.10457%206%208C6%206.89543%206.89543%206%208%206C9.10457%206%2010%206.89543%2010%208Z'%20fill='%23736E7D'/%3e%3cpath%20d='M8%2015.5C8.82843%2015.5%209.5%2014.8284%209.5%2014C9.5%2013.1716%208.82843%2012.5%208%2012.5C7.17157%2012.5%206.5%2013.1716%206.5%2014C6.5%2014.8284%207.17157%2015.5%208%2015.5Z'%20stroke='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16%202C16%203.10457%2015.1046%204%2014%204C12.8954%204%2012%203.10457%2012%202C12%200.89543%2012.8954%200%2014%200C15.1046%200%2016%200.89543%2016%202Z'%20fill='%23736E7D'/%3e%3cpath%20d='M14%209.5C14.8284%209.5%2015.5%208.82843%2015.5%208C15.5%207.17157%2014.8284%206.5%2014%206.5C13.1716%206.5%2012.5%207.17157%2012.5%208C12.5%208.82843%2013.1716%209.5%2014%209.5Z'%20stroke='%23736E7D'/%3e%3cpath%20d='M14%2015.5C14.8284%2015.5%2015.5%2014.8284%2015.5%2014C15.5%2013.1716%2014.8284%2012.5%2014%2012.5C13.1716%2012.5%2012.5%2013.1716%2012.5%2014C12.5%2014.8284%2013.1716%2015.5%2014%2015.5Z'%20stroke='%23736E7D'/%3e%3c/svg%3e")}._searchContainer_16i8r_32{display:flex;align-items:center;justify-content:end}._searchContainer_16i8r_32 .dcl.text-filter{flex:1}._searchContainer_16i8r_32 ._searchInfo_16i8r_42{color:var(--secondary-text)}._syncedStatusList_16i8r_46.ui.dropdown{margin-left:25px;padding-left:7px;margin-right:10px;color:var(--primary)}._selectionInfo_16i8r_53{display:flex;justify-content:center;align-items:center;margin-bottom:20px;padding:10px 0;border:1px solid var(--secondary-text);border-radius:4px}._header_16i8r_63{display:flex;flex-direction:row;align-items:center;gap:16px;padding-right:142px;padding-left:90px;min-width:1400px;width:100%}._header_16i8r_63 ._content_16i8r_74{display:flex;flex-direction:row;background-color:#242129;padding:24px;width:calc(100% - 50px);border-radius:8px}._header_16i8r_63 ._title_16i8r_83{display:flex;flex-direction:row;align-items:center;gap:12px;overflow:hidden;margin-right:20px;flex:1 1 auto;min-width:0}._editCollectionName_16i8r_96{visibility:hidden;padding-left:16px}._header_16i8r_63 ._title_16i8r_83 ._name_16i8r_101:hover+._editCollectionName_16i8r_96{visibility:visible}._nameAndType_16i8r_105{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}._nameWrapper_16i8r_115{display:flex;flex-direction:row;align-items:center;gap:15px;min-width:0;flex:1}._header_16i8r_63 ._title_16i8r_83 ._name_16i8r_101{margin-top:0;margin-bottom:0;cursor:pointer;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;min-width:0;width:fit-content}._header_16i8r_63 ._title_16i8r_83 ._size_16i8r_139{font-size:16px}._header_16i8r_63 ._actions_16i8r_143{display:flex;flex-direction:row;align-items:center;gap:16px;flex:0 0 auto}._body_16i8r_151{display:flex;flex-direction:column;padding-right:142px;padding-left:142px;margin-top:16px;gap:16px;min-width:1400px;flex:1}._info_16i8r_162{display:flex;flex-direction:row;gap:10px;align-items:center;font-weight:600}._infoHeader_16i8r_170{display:flex;flex-direction:row;text-transform:uppercase;color:#a09ba8;gap:10px}._infoContent_16i8r_178{display:flex;flex-direction:row;align-items:center;gap:5px;border-radius:6px;padding:8px;background-color:#43404a}._info_16i8r_162 .dui-info-tooltip__trigger{background-repeat:no-repeat;background-size:cover;height:20px;width:20px}._slotsIcon_16i8r_195{background-color:#5e5b67;border-radius:32px;padding:2px;height:24px;width:24px;background-image:url("data:image/svg+xml,%3csvg%20width='19'%20height='14'%20viewBox='0%200%2019%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%204H4V0H2C0.9%200%200%200.9%200%202V4ZM0%209H4V5H0V9ZM5%209H9V5H5V9ZM10%209H14V5H10V9ZM5%204H9V0H5V4ZM10%200V4H14V0H10ZM15%209H19V5H15V9ZM2%2014H4V10H0V12C0%2013.1%200.9%2014%202%2014ZM5%2014H9V10H5V14ZM10%2014H14V10H10V14ZM15%2014H17C18.1%2014%2019%2013.1%2019%2012V10H15V14ZM15%200V4H19V2C19%200.9%2018.1%200%2017%200H15Z'%20fill='white'/%3e%3c/svg%3e");background-size:70%;background-position:center;background-repeat:no-repeat}._copyButton_16i8r_207{cursor:pointer}._empty_16i8r_28{padding:200px 0;width:100%;border-radius:8px;justify-content:center;color:var(--secondary-text);text-align:center;line-height:22px;font-size:15px;background-color:#242129}._empty_16i8r_28 h3{color:#cfcdd4;margin-bottom:5px}._empty_16i8r_28 p{color:#a09ba8}._sparkles_16i8r_232{width:54px;height:56px;background-image:url(https://cdn.decentraland.org/@dcl/builder-site/7.12.0/assets/sparkles-C-WJN0Gh.svg);background-repeat:no-repeat;margin:auto auto 20px}._start_16i8r_241{width:80px;height:80px;background-image:url("data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_6709_15241)'%3e%3cpath%20d='M20%2032.0004H28C29.1%2032.0004%2030%2031.1004%2030%2030.0004V20.0004H33.18C34.96%2020.0004%2035.86%2017.8404%2034.6%2016.5804L25.42%207.40043C24.64%206.62043%2023.38%206.62043%2022.6%207.40043L13.42%2016.5804C12.16%2017.8404%2013.04%2020.0004%2014.82%2020.0004H18V30.0004C18%2031.1004%2018.9%2032.0004%2020%2032.0004ZM12%2036.0004H36C37.1%2036.0004%2038%2036.9004%2038%2038.0004C38%2039.1004%2037.1%2040.0004%2036%2040.0004H12C10.9%2040.0004%2010%2039.1004%2010%2038.0004C10%2036.9004%2010.9%2036.0004%2012%2036.0004Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_6709_15241'%3e%3crect%20width='48'%20height='48'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e");background-size:48px;background-position:center;background-repeat:no-repeat;border-radius:50%;background-color:#43404a;margin:auto auto 20px}._migrationBanner_16i8r_254{min-width:1116px;color:#000;display:flex;align-items:center;background-color:#ffbc5b;padding:9px 16px;min-height:42px;font-weight:700;text-transform:uppercase;border-radius:8px;margin-right:142px;margin-left:142px;margin-top:15px}._migrationBanner_16i8r_254 .icon{height:18px;margin-right:10px}._type_16i8r_277{display:flex;flex-direction:row;gap:8px}._linkedWearableBadge_16i8r_283{padding:4px 8px;border-radius:32px}._typeBadge_16i8r_288{background-color:#00a146}._programmaticBadge_16i8r_292{background-color:#691fa9}._standardBadge_16i8r_296{background-color:#43404a}._loader_16i8r_302{display:flex;justify-content:center;align-items:center;min-height:0;flex:1}
|
|
1
|
+
._image_142g7_1,._main_142g7_2{position:relative;width:64px;height:64px;border-radius:50%!important}._image_142g7_1{overflow:hidden}._network_142g7_13{position:absolute;bottom:0;right:0;width:32px;height:32px;z-index:1}._ellipsis_4huv2_1{margin:auto!important;color:var(--primary-text)}._itemImage_1y9df_1{min-width:64px;max-width:64px;height:64px;padding:5px;margin-left:18px;margin-right:24px}._itemStatus_1y9df_10{margin-right:4px}._grid_1y9df_14{padding:10px 0!important;color:var(--text);border-bottom:1px solid var(--divider)}._grid_1y9df_14:hover{background-color:#24212966;color:var(--text)}._row_1y9df_25{align-items:center!important;font-size:15px}._column_1y9df_30{display:flex!important}._statusColumn_1y9df_34{font-size:13px;text-transform:uppercase}._statusColumn_1y9df_34._synced_1y9df_39{color:#34ce76}._statusColumn_1y9df_34._unsynced_1y9df_43{color:#fc9965}._avatarColumn_1y9df_47{align-items:center;padding-left:10px!important}._nameWrapper_1y9df_52{display:flex;align-items:center;overflow:hidden}._name_1y9df_52{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._itemActions_1y9df_65{display:flex;align-items:center;justify-content:flex-end;width:100%}._action_1y9df_72{margin-left:5px}._status_rgxu1_1{text-transform:uppercase;padding:4px 8px;border-radius:32px;display:inline-flex;align-items:center;gap:4px}._status_rgxu1_1 .icon{height:18px}._pending_migration_rgxu1_14{color:#ffbc5b;background-color:#ffbc5b33}._synced_rgxu1_19{color:#65d890;background-color:#65d89033}._unpublished_rgxu1_24,._unsynced_rgxu1_25{color:#63b4f6;background-color:#63b4f633}._pending_mapping_rgxu1_30,._under_review_rgxu1_31{color:#ecebed;background-color:#ecebed33}._icon_rgxu1_10{width:17px;height:17px}._itemImage_1rili_1{min-width:64px;max-width:64px;height:64px;padding:5px;margin-left:18px;margin-right:24px}._itemStatus_1rili_10{margin-right:4px}._grid_1rili_14{padding:10px 0!important;color:var(--text);border-bottom:1px solid var(--divider);position:relative}._grid_1rili_14:not(._loading_1rili_21):hover{background-color:#24212966;color:var(--text)}._row_1rili_26{align-items:center!important;font-size:15px}._column_1rili_31{display:flex!important}._avatarColumn_1rili_35{align-items:center;padding-left:10px!important}._nameWrapper_1rili_40{display:flex;align-items:center;overflow:hidden}._name_1rili_40{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._itemActions_1rili_53{display:flex;align-items:center;justify-content:flex-end;width:100%}._action_1rili_60{margin-left:5px}._overlay_1rili_65{position:absolute;pointer-events:none;z-index:100000000;top:0;left:0;width:100%;height:100%;background-color:#00000046;z-index:1000;display:flex;justify-content:center;align-items:center}._itemCheckbox_2k9qa_1{margin-right:10px}._gridHeader_2k9qa_5.ui.grid{border-bottom:1px solid var(--divider);padding-bottom:10px;color:var(--secondary-text)}._gridHeader_2k9qa_5.ui.grid>.row>.column:first-child{padding-left:10px}._gridHeader_2k9qa_5.ui.grid>.row>.column._itemColumn_2k9qa_15{display:flex;align-items:center}._gridHeader_4acv6_1.ui.grid{border-bottom:1px solid var(--divider);padding-bottom:10px;color:var(--secondary-text)}._gridHeader_4acv6_1.ui.grid>.row>.column:first-child{padding-left:10px}._gridHeader_4acv6_1.ui.grid>.row>.column._itemColumn_4acv6_11{display:flex;align-items:center}._itemCheckbox_4acv6_16{margin-right:10px}._linkedToColumn_4acv6_20>span{margin-right:6px}._main_16i8r_3,._main_16i8r_3>.ui.container{display:flex;flex-direction:column;min-height:0;flex:1}._slots_16i8r_11{font-weight:700;text-transform:uppercase;position:relative}._slots_16i8r_11:before{content:"";display:inline-block;background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%202C4%203.10457%203.10457%204%202%204C0.89543%204%200%203.10457%200%202C0%200.89543%200.89543%200%202%200C3.10457%200%204%200.89543%204%202Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%208C4%209.10457%203.10457%2010%202%2010C0.89543%2010%200%209.10457%200%208C0%206.89543%200.89543%206%202%206C3.10457%206%204%206.89543%204%208Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%2014C4%2015.1046%203.10457%2016%202%2016C0.89543%2016%200%2015.1046%200%2014C0%2012.8954%200.89543%2012%202%2012C3.10457%2012%204%2012.8954%204%2014Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%202C10%203.10457%209.10457%204%208%204C6.89543%204%206%203.10457%206%202C6%200.89543%206.89543%200%208%200C9.10457%200%2010%200.89543%2010%202Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%208C10%209.10457%209.10457%2010%208%2010C6.89543%2010%206%209.10457%206%208C6%206.89543%206.89543%206%208%206C9.10457%206%2010%206.89543%2010%208Z'%20fill='%23FF2D55'/%3e%3cpath%20d='M8%2015.5C8.82843%2015.5%209.5%2014.8284%209.5%2014C9.5%2013.1716%208.82843%2012.5%208%2012.5C7.17157%2012.5%206.5%2013.1716%206.5%2014C6.5%2014.8284%207.17157%2015.5%208%2015.5Z'%20stroke='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16%202C16%203.10457%2015.1046%204%2014%204C12.8954%204%2012%203.10457%2012%202C12%200.89543%2012.8954%200%2014%200C15.1046%200%2016%200.89543%2016%202Z'%20fill='%23FF2D55'/%3e%3cpath%20d='M14%209.5C14.8284%209.5%2015.5%208.82843%2015.5%208C15.5%207.17157%2014.8284%206.5%2014%206.5C13.1716%206.5%2012.5%207.17157%2012.5%208C12.5%208.82843%2013.1716%209.5%2014%209.5Z'%20stroke='%23FF2D55'/%3e%3cpath%20d='M14%2015.5C14.8284%2015.5%2015.5%2014.8284%2015.5%2014C15.5%2013.1716%2014.8284%2012.5%2014%2012.5C13.1716%2012.5%2012.5%2013.1716%2012.5%2014C12.5%2014.8284%2013.1716%2015.5%2014%2015.5Z'%20stroke='%23FF2D55'/%3e%3c/svg%3e");width:16px;height:16px;top:3px;position:relative;margin-right:8px}.button._slots_16i8r_11._empty_16i8r_28:before{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%202C4%203.10457%203.10457%204%202%204C0.89543%204%200%203.10457%200%202C0%200.89543%200.89543%200%202%200C3.10457%200%204%200.89543%204%202Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%208C4%209.10457%203.10457%2010%202%2010C0.89543%2010%200%209.10457%200%208C0%206.89543%200.89543%206%202%206C3.10457%206%204%206.89543%204%208Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%2014C4%2015.1046%203.10457%2016%202%2016C0.89543%2016%200%2015.1046%200%2014C0%2012.8954%200.89543%2012%202%2012C3.10457%2012%204%2012.8954%204%2014Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%202C10%203.10457%209.10457%204%208%204C6.89543%204%206%203.10457%206%202C6%200.89543%206.89543%200%208%200C9.10457%200%2010%200.89543%2010%202Z'%20fill='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%208C10%209.10457%209.10457%2010%208%2010C6.89543%2010%206%209.10457%206%208C6%206.89543%206.89543%206%208%206C9.10457%206%2010%206.89543%2010%208Z'%20fill='%23736E7D'/%3e%3cpath%20d='M8%2015.5C8.82843%2015.5%209.5%2014.8284%209.5%2014C9.5%2013.1716%208.82843%2012.5%208%2012.5C7.17157%2012.5%206.5%2013.1716%206.5%2014C6.5%2014.8284%207.17157%2015.5%208%2015.5Z'%20stroke='%23736E7D'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16%202C16%203.10457%2015.1046%204%2014%204C12.8954%204%2012%203.10457%2012%202C12%200.89543%2012.8954%200%2014%200C15.1046%200%2016%200.89543%2016%202Z'%20fill='%23736E7D'/%3e%3cpath%20d='M14%209.5C14.8284%209.5%2015.5%208.82843%2015.5%208C15.5%207.17157%2014.8284%206.5%2014%206.5C13.1716%206.5%2012.5%207.17157%2012.5%208C12.5%208.82843%2013.1716%209.5%2014%209.5Z'%20stroke='%23736E7D'/%3e%3cpath%20d='M14%2015.5C14.8284%2015.5%2015.5%2014.8284%2015.5%2014C15.5%2013.1716%2014.8284%2012.5%2014%2012.5C13.1716%2012.5%2012.5%2013.1716%2012.5%2014C12.5%2014.8284%2013.1716%2015.5%2014%2015.5Z'%20stroke='%23736E7D'/%3e%3c/svg%3e")}._searchContainer_16i8r_32{display:flex;align-items:center;justify-content:end}._searchContainer_16i8r_32 .dcl.text-filter{flex:1}._searchContainer_16i8r_32 ._searchInfo_16i8r_42{color:var(--secondary-text)}._syncedStatusList_16i8r_46.ui.dropdown{margin-left:25px;padding-left:7px;margin-right:10px;color:var(--primary)}._selectionInfo_16i8r_53{display:flex;justify-content:center;align-items:center;margin-bottom:20px;padding:10px 0;border:1px solid var(--secondary-text);border-radius:4px}._header_16i8r_63{display:flex;flex-direction:row;align-items:center;gap:16px;padding-right:142px;padding-left:90px;min-width:1400px;width:100%}._header_16i8r_63 ._content_16i8r_74{display:flex;flex-direction:row;background-color:#242129;padding:24px;width:calc(100% - 50px);border-radius:8px}._header_16i8r_63 ._title_16i8r_83{display:flex;flex-direction:row;align-items:center;gap:12px;overflow:hidden;margin-right:20px;flex:1 1 auto;min-width:0}._editCollectionName_16i8r_96{visibility:hidden;padding-left:16px}._header_16i8r_63 ._title_16i8r_83 ._name_16i8r_101:hover+._editCollectionName_16i8r_96{visibility:visible}._nameAndType_16i8r_105{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}._nameWrapper_16i8r_115{display:flex;flex-direction:row;align-items:center;gap:15px;min-width:0;flex:1}._header_16i8r_63 ._title_16i8r_83 ._name_16i8r_101{margin-top:0;margin-bottom:0;cursor:pointer;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;min-width:0;width:fit-content}._header_16i8r_63 ._title_16i8r_83 ._size_16i8r_139{font-size:16px}._header_16i8r_63 ._actions_16i8r_143{display:flex;flex-direction:row;align-items:center;gap:16px;flex:0 0 auto}._body_16i8r_151{display:flex;flex-direction:column;padding-right:142px;padding-left:142px;margin-top:16px;gap:16px;min-width:1400px;flex:1}._info_16i8r_162{display:flex;flex-direction:row;gap:10px;align-items:center;font-weight:600}._infoHeader_16i8r_170{display:flex;flex-direction:row;text-transform:uppercase;color:#a09ba8;gap:10px}._infoContent_16i8r_178{display:flex;flex-direction:row;align-items:center;gap:5px;border-radius:6px;padding:8px;background-color:#43404a}._info_16i8r_162 .dui-info-tooltip__trigger{background-repeat:no-repeat;background-size:cover;height:20px;width:20px}._slotsIcon_16i8r_195{background-color:#5e5b67;border-radius:32px;padding:2px;height:24px;width:24px;background-image:url("data:image/svg+xml,%3csvg%20width='19'%20height='14'%20viewBox='0%200%2019%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%204H4V0H2C0.9%200%200%200.9%200%202V4ZM0%209H4V5H0V9ZM5%209H9V5H5V9ZM10%209H14V5H10V9ZM5%204H9V0H5V4ZM10%200V4H14V0H10ZM15%209H19V5H15V9ZM2%2014H4V10H0V12C0%2013.1%200.9%2014%202%2014ZM5%2014H9V10H5V14ZM10%2014H14V10H10V14ZM15%2014H17C18.1%2014%2019%2013.1%2019%2012V10H15V14ZM15%200V4H19V2C19%200.9%2018.1%200%2017%200H15Z'%20fill='white'/%3e%3c/svg%3e");background-size:70%;background-position:center;background-repeat:no-repeat}._copyButton_16i8r_207{cursor:pointer}._empty_16i8r_28{padding:200px 0;width:100%;border-radius:8px;justify-content:center;color:var(--secondary-text);text-align:center;line-height:22px;font-size:15px;background-color:#242129}._empty_16i8r_28 h3{color:#cfcdd4;margin-bottom:5px}._empty_16i8r_28 p{color:#a09ba8}._sparkles_16i8r_232{width:54px;height:56px;background-image:url(https://cdn.decentraland.org/@dcl/builder-site/7.12.1-16758968085.commit-584a3db/assets/sparkles-C-WJN0Gh.svg);background-repeat:no-repeat;margin:auto auto 20px}._start_16i8r_241{width:80px;height:80px;background-image:url("data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_6709_15241)'%3e%3cpath%20d='M20%2032.0004H28C29.1%2032.0004%2030%2031.1004%2030%2030.0004V20.0004H33.18C34.96%2020.0004%2035.86%2017.8404%2034.6%2016.5804L25.42%207.40043C24.64%206.62043%2023.38%206.62043%2022.6%207.40043L13.42%2016.5804C12.16%2017.8404%2013.04%2020.0004%2014.82%2020.0004H18V30.0004C18%2031.1004%2018.9%2032.0004%2020%2032.0004ZM12%2036.0004H36C37.1%2036.0004%2038%2036.9004%2038%2038.0004C38%2039.1004%2037.1%2040.0004%2036%2040.0004H12C10.9%2040.0004%2010%2039.1004%2010%2038.0004C10%2036.9004%2010.9%2036.0004%2012%2036.0004Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_6709_15241'%3e%3crect%20width='48'%20height='48'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e");background-size:48px;background-position:center;background-repeat:no-repeat;border-radius:50%;background-color:#43404a;margin:auto auto 20px}._migrationBanner_16i8r_254{min-width:1116px;color:#000;display:flex;align-items:center;background-color:#ffbc5b;padding:9px 16px;min-height:42px;font-weight:700;text-transform:uppercase;border-radius:8px;margin-right:142px;margin-left:142px;margin-top:15px}._migrationBanner_16i8r_254 .icon{height:18px;margin-right:10px}._type_16i8r_277{display:flex;flex-direction:row;gap:8px}._linkedWearableBadge_16i8r_283{padding:4px 8px;border-radius:32px}._typeBadge_16i8r_288{background-color:#00a146}._programmaticBadge_16i8r_292{background-color:#691fa9}._standardBadge_16i8r_296{background-color:#43404a}._loader_16i8r_302{display:flex;justify-content:center;align-items:center;min-height:0;flex:1}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bi as b,Z as _,D as c,K as d,H as s,ag as g,M as l,G as n,hJ as x,J as h,ai as k,N as v,hK as C,hL as j}from"./index-BR0ofDWx.js";import{b as N,N as T}from"./Navigation.container-CW-ABnAA.js";import"./selectors-CpsYGKcu.js";var r=(e=>(e.ACTIVE="active",e.COMING_SOON="coming_soon",e))(r||{});const E="_titleContainer_5ka3v_1",S="_backButton_5ka3v_8",B="_title_5ka3v_1",f="_templates_5ka3v_26",I="_subtitle_5ka3v_32",a={titleContainer:E,backButton:S,title:B,templates:f,subtitle:I},y=({templates:e,onLoadTemplates:u})=>{const i=b(),o=_();c.useEffect(()=>{u()},[u]);const p=c.useCallback(()=>{o.push(d.scenes())},[o]),m=c.useCallback(t=>{i==null||i.track("Go to template detail",{id:t.id,name:t.title,description:t.description}),o.push(d.templateDetail(t.id))},[i,o]);return s.jsxs(s.Fragment,{children:[s.jsx(g,{}),s.jsxs(l.Page,{isFullscreen:!0,className:"ScenesPage",children:[s.jsx(N,{activeTab:T.SCENES}),s.jsxs("div",{className:a.titleContainer,children:[s.jsx(l.Button,{className:a.backButton,basic:!0,icon:s.jsx(l.Icon,{name:"arrow alternate circle left outline"}),onClick:p,"aria-label":n("templates_page.back_to_scenes")}),s.jsx("h2",{className:a.title,children:n("templates_page.title")})]}),s.jsx("div",{className:a.templates,children:Object.values(e).map(t=>s.jsx(x,{title:t.title,description:t.description,videoSrc:t.video,imgSrc:t.thumbnail,subtitle:s.jsxs("span",{className:a.subtitle,children:[s.jsx(h,{name:"scene-parcel"}),n("templates_page.parcels",{size:t.layout.rows*t.layout.cols})]}),tag:t.templateStatus!==r.ACTIVE?{label:n("templates_page.coming_soon"),color:"#716B7C"}:void 0,disabled:t.templateStatus!==r.ACTIVE,onClick:m.bind(null,t)},t.id))})]}),s.jsx(k,{})]})},A=e=>({templates:C(e)}),G=e=>({onLoadTemplates:()=>e(j())}),F=v(A,G)(y);export{F as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var X=Object.defineProperty;var Y=(r,a,n)=>a in r?X(r,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[a]=n;var P=(r,a,n)=>Y(r,typeof a!="symbol"?a+"":a,n);import{D as c,H as e,J as Z,Z as J,K as D,eu as A,eU as H,eV as w,eW as f,eR as q,eX as $,eY as ee,eZ as S,e_ as se,e$ as ae,f0 as te,M as i,G as t,dG as ie,f1 as le,f2 as T,f3 as ne,f4 as ce,f5 as re,L as oe,et as de,cG as ue,f6 as me,f7 as z,b4 as he,f8 as xe,cF as pe,f9 as je,fa as ge,fb as ve,fc as Ne,a4 as be,a5 as g,ec as Ie,fd as fe,fe as _e,ff as Ce,eG as ye,fg as Ee,bD as M,fh as ke,fi as Se,er as Te,X as Pe,eP as De,fj as we,fk as Me}from"./index-BR0ofDWx.js";import{d as Le}from"./hooks-CDZe9Lu5.js";import{I as Re}from"./ItemProvider.container-CGmqD6PU.js";import{C as Be}from"./ConfirmDelete-Bs3FcWOF.js";import{L as Ue}from"./LoggedInDetailPage.container-vr7Cw4cZ.js";import{N as Oe}from"./NotFound-CfvqR_51.js";import{B as Fe}from"./Back-D5STX2lw.js";import"./Navigation.container-CW-ABnAA.js";import"./selectors-CpsYGKcu.js";import"./SignInRequired-DPkhoSXa.js";class Ve extends c.PureComponent{constructor(n){super(n);P(this,"state",{isNoticeClosed:!1});P(this,"handleCloseNotice",()=>{const{storageKey:n}=this.props;this.setState({isNoticeClosed:!0}),localStorage.setItem(n,"1")});const{storageKey:o}=n;this.state={isNoticeClosed:localStorage.getItem(o)!==null}}render(){const{children:n}=this.props,{isNoticeClosed:o}=this.state;return o?null:e.jsxs("div",{className:"Notice",children:[e.jsx("div",{className:"text",children:n}),e.jsx(Z,{name:"close",onClick:this.handleCloseNotice})]})}}const Ae="dcl-item-notice";function He(r){const{item:a,itemId:n,isLoading:o,status:v,collection:_,hasAccess:N,isWearableUtilityEnabled:C,onDelete:y,onSaveItem:x,onOpenModal:u}=r,j=c.useRef(null),b=J(),I=c.useCallback(()=>{a&&b.push(D.itemEditor({itemId:a.id,collectionId:a.collectionId}),{fromParam:A(a.urn)?H.TP_COLLECTIONS:H.COLLECTIONS})},[b,a]),d=c.useCallback(async s=>{const l=await w({[f]:s}),h={...a,contents:{...a==null?void 0:a.contents,[f]:l[f]}};v&&[q.UNPUBLISHED,q.UNDER_REVIEW].includes(v)&&(h.video=l[f]),x(h,{[f]:s})},[x,a,v]),p=c.useCallback(()=>{u("EditVideoModal",{item:a,onSaveVideo:d})},[a,u,d]),L=c.useCallback(()=>{y(a)},[a,y]),E=c.useCallback(()=>{a&&$(a)?u("CreateSingleItemModal",{item:a,addRepresentation:!0}):u("CreateSingleItemModal",{item:a,changeItemFile:!0})},[u,a]),R=c.useCallback(()=>{u("EditItemURNModal",{item:a})},[a,u]),B=c.useCallback(async s=>{const l=ee(s);x({...a,contents:{...a==null?void 0:a.contents,...await w({[S]:l})}},{[S]:l})},[x,a]),U=c.useCallback(()=>{(a==null?void 0:a.type)===se.EMOTE?u("EditThumbnailModal",{onSaveThumbnail:B,item:a,collection:_}):j.current&&j.current.click()},[j.current,_,a,u,B]),O=c.useCallback(async s=>{const{files:l}=s.target;if(l&&l.length>0){const h=l[0],k=await ae(h,1024,1024);k&&a&&(a.contents={...a.contents,...await w({[S]:k})},x(a,{[S]:k}))}},[x,a]),F=c.useCallback(()=>{u("MoveItemToCollectionModal",{item:a})},[a,u]),G=c.useCallback((s,l)=>{var V;const h=s.data,W=!(l&&te(l));return e.jsxs(e.Fragment,{children:[e.jsx(i.Section,{children:e.jsx(i.Row,{children:e.jsx(Fe,{onClick:()=>b.push(D.collectionDetail(s.collectionId))})})}),e.jsxs(i.Narrow,{children:[!l&&!s.collectionId?e.jsx(Ve,{storageKey:Ae,children:t("item_detail_page.notice")}):null,e.jsxs("div",{className:"item-data",children:[e.jsxs("div",{className:"item-data-left-panel",children:[e.jsx(ie,{item:s,hasBadge:!0,hasRarityBadge:!0,hasUtilityBadge:!0}),e.jsx("div",{children:e.jsxs(i.Button,{primary:!0,onClick:U,children:[e.jsx("input",{type:"file",ref:j,onChange:O,accept:"image/png"}),e.jsx(i.Icon,{name:"camera"}),t("item_detail_page.edit_thumbnail")]})}),e.jsxs("div",{className:"metrics",children:[e.jsx("span",{className:"subtitle",children:t("item_detail_page.properties")}),e.jsx(le,{item:s})]}),T(s)?e.jsx(ne,{item:s,onClick:p,children:(m,K,Q,$e)=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"overlay",children:e.jsx(i.Icon,{name:"play",className:"play-video-button",onClick:p})}),e.jsxs(i.Button,{primary:!0,onClick:p,children:[e.jsx(i.Icon,{name:"video"}),t("item_detail_page.edit_video")]}),e.jsxs("div",{className:"metrics",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.properties")}),e.jsx(ce,{duration:K,size:Q,showIcons:!1})]})]})}):null,e.jsxs("div",{className:"details",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.details")}),s.isPublished&&e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.details_info.id")}),e.jsxs("div",{className:"value",children:["#",s.tokenId]})]}),h.category?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.category")}),e.jsx("div",{className:"value",children:t(`${s.type}.category.${h.category}`)})]}):null,s.isPublished&&s.rarity?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.supply")}),e.jsxs("div",{className:"value",children:[s.totalSupply,"/",re(s)]})]}):null,l?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.collection")}),e.jsx(oe,{className:"collection-link",to:D.collectionDetail(l.id,de(l)),children:l.name})]}):null,s.urn?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("global.urn")}),e.jsxs("div",{className:"value urn",children:[e.jsxs("span",{children:[s.urn,e.jsx(ue,{role:"button",text:s.urn,children:e.jsx(i.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:"link copy",name:"copy outline"})})]}),e.jsx("div",{className:"urn-actions",children:A(s.urn)?e.jsx(i.Popup,{content:t("collection_item.cannot_edit_urn"),disabled:!s.isPublished,position:"top center",trigger:e.jsx("div",{children:e.jsx("button",{disabled:s.isPublished,className:"link",onClick:R,children:t("item.edit_urn")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):null})]})]}):null]})]}),e.jsxs("div",{className:"cards-container",children:[e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:s.name}),e.jsxs("div",{className:"actions",children:[T(s)&&e.jsx(i.Button,{className:"edit",inverted:!0,size:"small",onClick:E,children:t("global.edit")}),e.jsx(i.Button,{inverted:!0,size:"small",onClick:I,children:t("collection_detail_page.preview")}),W?e.jsx(i.Dropdown,{trigger:e.jsx(i.Button,{basic:!0,className:"more-actions-button",children:e.jsx(i.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(i.Dropdown.Menu,{children:[e.jsx(Be,{name:s.name,onDelete:L,trigger:s.isPublished?e.jsx(i.Popup,{content:t("item_detail_page.delete_published_item"),position:"right center",trigger:e.jsx(i.Dropdown.Item,{disabled:!0,text:t("global.delete")}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):e.jsx(i.Dropdown.Item,{text:t("global.delete")})}),!s.collectionId&&e.jsx(i.Dropdown.Item,{text:t("collection_item.move_to_another_collection"),onClick:F})]})}):null]})]}),e.jsxs("div",{className:"attribute-row",children:[s.description&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("global.description")}),e.jsx("div",{className:"data",children:s.description})]}),s.utility&&C&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("global.utility")}),e.jsx("div",{className:"data",children:s.utility})]})]}),s.data.tags.length?e.jsx("div",{className:"attribute-row",children:e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.tags.title")}),e.jsx("div",{className:"data tags-container",children:s.data.tags.map(m=>e.jsx("span",{className:"tag",children:m},m))})]})}):null]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"title",children:t("item_detail_page.selling.title")}),e.jsxs("div",{className:"data",children:[me(s)?e.jsxs(i.Section,{className:"price-container",children:[e.jsx("div",{className:"subtitle",children:t("item.price")}),e.jsx("div",{className:"value",children:t("global.free")})]}):s.price?e.jsxs(i.Section,{className:"price-container",children:[e.jsx("div",{className:"subtitle",children:t("item.price")}),s.price&&s.price!==z.toString()?e.jsx(i.Mana,{showTooltip:!0,network:he.Network.MATIC,className:"mana-price-container",children:(()=>{const m=xe(s.price);return m.length>10?e.jsx(i.Popup,{content:m,position:"top center",trigger:e.jsx("span",{children:`${m.slice(0,3)}...${m.slice(-4)}`}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):e.jsx("div",{className:"value",children:m})})()}):s.price===z.toString()?e.jsx("div",{className:"value",children:t("item.not_for_sale")}):"-"]}):null,e.jsxs(i.Section,{className:"beneficiary-container",children:[e.jsx("div",{className:"subtitle",children:t("item.beneficiary")}),s.beneficiary?e.jsx("div",{className:"value",children:pe(s.beneficiary)}):"-"]})]})]}),je(s)&&!T(s)?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:t("item_detail_page.representations.title")}),e.jsx(i.Button,{className:"edit-button",inverted:!0,size:"small",onClick:E,children:$(s)?t("global.add"):t("global.edit")})]}),e.jsx("div",{className:"data",children:e.jsx("div",{className:"representations-container",children:s.data.representations.map(m=>e.jsxs("div",{className:"representation",children:[e.jsx("img",{className:"item-image",src:ge(s),alt:s.name}),m.mainFile,e.jsx(ve,{item:s,bodyShape:m.bodyShapes[0]})]},m.mainFile))})})]}):null,T(s)&&((V=s.data.requiredPermissions)!=null&&V.length)?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:t("item_detail_page.required_permissions")}),e.jsx(i.Button,{inverted:!0,className:"learn-more-permissions",size:"small",href:"https://docs.decentraland.org/creator/development-guide/sdk7/scene-metadata/#required-permissions",rel:"noopener noreferrer",target:"_blank",content:t("global.learn_more")})]}),e.jsx("div",{className:"data",children:e.jsx(Ne,{requiredPermissions:s.data.requiredPermissions,basic:!0})})]}):null]})]})]})]})},[C,b,j,U,O,p,R,E,E,F,I,L,I]);return e.jsx(Re,{id:n,children:(s,l,h)=>e.jsx(Ue,{className:"ItemDetailPage",hasNavigation:!N&&!o,isLoading:o||h,children:N&&s?G(s,l):e.jsx(Oe,{})})})}const qe=()=>{const r=be(),a=Le(),n=g(Ie),o=g(d=>a?fe(d,a):null),v=g(d=>o&&o.collectionId?_e(d,o.collectionId):null),_=g(Ce),N=g(ye),C=g(Ee),y=o?_[o.id]:null,x=M(N,De)||M(N,we)||M(N,Me),u=g(d=>o!==null&&ke(d,n.address,v,o)),j=c.useCallback((d,p)=>r(Se(d,p)),[r]),b=c.useCallback(d=>r(Te(d)),[r]),I=c.useCallback((d,p)=>r(Pe(d,p)),[r]);return e.jsx(He,{itemId:a,wallet:n,item:o,collection:v,status:y,isLoading:x,isWearableUtilityEnabled:C,hasAccess:u,onSaveItem:j,onDelete:b,onOpenModal:I})},as=qe;export{as as default};
|