@dcl-regenesislabs/web-editor 0.3.23-41465068147.commit-06ea194 → 0.3.23

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.
Files changed (2) hide show
  1. package/editor.js +1 -1
  2. package/package.json +2 -3
package/editor.js CHANGED
@@ -38052,4 +38052,4 @@ ${n}
38052
38052
  ${r}`));return"w"+Array.from(new Uint8Array(a).slice(0,16),s=>s.toString(16).padStart(2,"0")).join("")}function bAr(t){return`${t.file===void 0?"":`${t.file}:${t.line??1}:${t.column??0}: `}${t.severity==="error"?"ERROR":"WARNING"}: ${t.message}`}function xAr(t){return t.length<=3?t.join(", "):`${t.slice(0,3).join(", ")} and ${t.length-3} more`}function wAr(t,n){const r=D0(t.get("package.json"));for(const a of[r==null?void 0:r.devDependencies,r==null?void 0:r.dependencies]){const s=typeof a=="object"&&a!==null?a["@dcl/sdk"]:void 0;if(typeof s=="string"&&s!==n)return`⚠ This project asks for @dcl/sdk ${s}; the editor builds it with ${n}.`}return null}function SAr(t){const{emit:n,log:r}=t;let a=null,s=!1,l=null,f=Promise.resolve();const m=k=>{const N=f.then(k,k);return f=N.catch(()=>{}),N};async function _(){if(s)throw new Error("The editor was closed");a===null&&(l=null);const k=a??qTr(t.urls);a=k;try{const N=await k.ready;return{builder:k,sdkVersion:N.sdkVersion,info:N}}catch(N){throw k.dispose(),a===k&&(a=null),N}}async function x(k,N,L){const{builder:B,info:H}=await _();let X=!1;const Y=await gAr(N,t.packages,H.snapshot,pe=>{t.onPackages(k,pe),L&&!X&&r("Downloading packages from npm…"),X=!0});Y.lockFile!==void 0&&(N.set(zR,Y.lockFile),await t.saveLock(k,Y.lockFile));const te=Y.lock===null?"":Xqt(Y.lock);if(te!==l)try{await B.setPackages(Y.lock,t.packages),l=te}catch(pe){L&&r(`⚠ ${GPt(pe)}`),await B.setPackages(null),l=""}if(t.onPackages(k,Y.status),!(!L||Y.status===null)){if(Y.status.state==="error")r(`✖ ${Y.status.message??"The packages could not be installed"}`);else if(Y.downloaded>0){const pe=Object.entries(Y.status.installed).map(([fe,Z])=>`${fe} ${Z}`);r(`✔ Packages frozen into the scene: ${pe.join(", ")} (${Y.status.total} in all)`)}for(const pe of Y.status.warnings)r(`⚠ ${pe}`)}}function T(k,N,L=k){const B=gqe(t.pageDir,L),H=new Set;let X=null,Y=null,te=!0,pe=!1,fe=!1,Z=null;const me=gt=>(n({type:"failed",message:gt}),r(`✖ Build failed: ${gt.split(`
38053
38053
  `)[0]}`),!1);async function Oe(gt){const ct=performance.now();n({type:"buildStarted",changed:gt}),r(gt.length===0?"Building the scene…":`Rebuilding: ${xAr(gt)}`);try{const{builder:wt,sdkVersion:ht}=await _(),He=gt.length===0?wAr(N,ht):null;He!==null&&r(He);const Mt=gt.length===0||gt.includes("package.json")||gt.includes(zR),{snapshot:$e,result:Re}=await m(async()=>{(Mt||l!==Z)&&(await x(k,N,!0),Z=l);const St=new Map(N);return{snapshot:St,result:await wt.build(St)}});if(fe)return!1;const $t=Re.diagnostics.filter(St=>St.severity==="error"||St.file===void 0||$e.has(St.file));n({type:"diagnostics",diagnostics:$t.map(({severity:St,message:ut,file:Pt,line:qt,column:Gt})=>({severity:St,message:ut,file:Pt,line:qt,column:Gt}))});for(const St of $t)r(bAr(St));if(!Re.ok){const St=Re.events.find(ut=>ut.type==="failed");return me((St==null?void 0:St.type)==="failed"?St.message:"The build produced no bundle")}const bt=D0($e.get("scene.json"));return bt===null?me("scene.json is missing or is not valid JSON"):(await t2r({realmUrl:B,projectId:L,files:$e,buildOutputs:Re.outputs,sceneJson:bt,sdkVersion:ht,machineId:await t.machineId(L)}),fe?!1:(n({type:"bundleSaved"}),r(`✔ Built in ${Math.round(performance.now()-ct)} ms`),!0))}catch(wt){return fe?!1:me(GPt(wt))}}function Be(){return fe?Promise.resolve(!1):(Y!==null||(Y=(async()=>{for(;(te||H.size>0)&&!fe;){const gt=te?[]:[...H];te=!1,H.clear(),pe=await Oe(gt)}return pe&&!fe})().finally(()=>{Y=null})),Y)}return{id:k,files:N,start:Be,flush(){return X!==null&&clearTimeout(X),X=null,Be()},async published(){const gt=await(await caches.open(awe)).match(yqe(B)),ct=await(gt==null?void 0:gt.json().catch(()=>{})),wt=ct==null?void 0:ct.entity;return(wt==null?void 0:wt.id)===FZe(L,await t.machineId(L))},changed(gt){fe||(H.add(gt),X!==null&&clearTimeout(X),X=setTimeout(()=>{X=null,Be()},yAr))},stop(){fe=!0,X!==null&&clearTimeout(X)}}}return{realmUrl:k=>gqe(t.pageDir,k),open:T,async build(k,N,L){const{builder:B,sdkVersion:H}=await _();return m(async()=>(await x(k,N,!1),{...await B.build(N,L),sdkVersion:H}))},install:(k,N)=>m(()=>x(k,N,!1)),dispose(){s=!0,a==null||a.dispose(),a=null}}}const QPt=64*1024*1024,TAr=4*1024*1024;function kAr(t,n){return t.length>8192?!1:n==="POST"?t==="/content/entities/active":n!=="GET"&&n!=="HEAD"?!1:t==="/about"||t==="/scene.json"||/^\/content\/contents\/(?:b64-[A-Za-z0-9+/=]+|[A-Za-z0-9]+)$/.test(decodeURIComponent(t))}function EAr(t,n,r){const a=t===null?null:new URL(t).origin;let s="",l=null,f="",m="",_=new AbortController,x=0,T=0;const k=(B,H=[])=>{l!==null&&a!==null&&l.postMessage({...B,session:n,instance:s},a,H)},N=async B=>{var me;if(typeof B.requestId!="string"||B.requestId.length>128||typeof B.path!="string")return;const H=B.requestId;if(x>=64){k({type:"realm-response",requestId:H,error:"Too many preview resource requests"});return}const X=_,Y=l,te=new AbortController,pe=setTimeout(()=>te.abort(new Error("Preview resource timed out")),3e4);let fe=0,Z;x++;try{const Oe=new URL(f+B.path);if(!Oe.href.startsWith(f+"/")||!kAr(B.path,B.method))throw new Error("Invalid preview resource");if(B.body!==void 0&&(!(B.body instanceof ArrayBuffer)||B.body.byteLength>1024*1024))throw new Error("Invalid preview request body");const Be=await fetch(Oe,{method:String(B.method),credentials:"omit",redirect:"error",signal:AbortSignal.any([X.signal,te.signal]),headers:{"Content-Type":"application/json"},body:B.method==="POST"?B.body:void 0}),gt=Be.headers.get("Content-Type")??"application/octet-stream",ct=gt.includes("application/json")?TAr:QPt;if(Z=(me=Be.body)==null?void 0:me.getReader(),Number(Be.headers.get("Content-Length"))>ct)throw new Error("Preview resource exceeds the memory limit");const wt=[];if(Z!==void 0)for(;;){const{done:$e,value:Re}=await Z.read();if($e)break;if(fe+=Re.byteLength,T+=Re.byteLength,fe>ct||T>QPt)throw new Error("Preview resource exceeds the memory limit");wt.push(Re)}const ht=new Uint8Array(fe);let He=0;for(const $e of wt)ht.set($e,He),He+=$e.byteLength;wt.length=0;let Mt=ht.buffer;if(B.method!=="HEAD"&&Mt.byteLength>0&&gt.includes("application/json")){const $e=JSON.parse(new TextDecoder().decode(Mt)),Re=$t=>typeof $t=="string"?$t.startsWith(f+"/")||$t===f?m+$t.slice(f.length):$t:Array.isArray($t)?$t.map(Re):pc($t)?Object.fromEntries(Object.entries($t).map(([bt,St])=>[bt,Re(St)])):$t;Mt=new TextEncoder().encode(JSON.stringify(Re($e))).buffer}!X.signal.aborted&&Y===l&&k({type:"realm-response",requestId:H,status:Be.status,headers:{"Content-Type":gt},body:Mt},[Mt])}catch(Oe){!X.signal.aborted&&Y===l&&k({type:"realm-response",requestId:H,error:Oe instanceof Error?Oe.message:String(Oe)})}finally{clearTimeout(pe),te.abort(),Z!==void 0&&Z.cancel().catch(Oe=>{Oe instanceof Error&&Oe.name==="AbortError"||console.warn("Preview stream cleanup:",Oe)}),T-=fe,x--}},L=B=>{const H=B.data;B.origin!==a||!pc(H)||H.session!==n||H.instance!==s||s===""||(H.type==="connect"&&l===null&&B.source!==null&&"postMessage"in B.source&&(l=B.source),!(B.source!==l||l===null)&&(H.type==="realm-request"?N(H):r(H)))};return window.addEventListener("message",L),{send:k,reset:(B="",H="",X="")=>{_.abort(),_=new AbortController,l=null,s=B,f=H,m=X},dispose:()=>{_.abort(),window.removeEventListener("message",L)}}}const YPt=["localhost","127.0.0.1","[::1]"];function AAr(t,n,r=""){if(YPt.includes(new URL(t).hostname)){const a=new URLSearchParams(r).get("editor-mobile");return`${a!==null&&URL.canParse(a)&&YPt.includes(new URL(a).hostname)?new URL(a).origin:"http://127.0.0.1:8788"}/mobile-preview/index.html`}return n===null?null:new URL("mobile-preview/index.html",n.replace(/\/$/,"")+"/").href}function CAr(t){if(t===null)return null;const n=new URL(t).hostname;return n==="decentraland.zone"||n.endsWith(".decentraland.zone")?"zone":null}function OAr(t,n,r,a=null){const s=crypto.randomUUID(),l=EAr(t,s,fe=>pe(fe)),f=new Set,m=new Map;let _={mode:"closed",url:null,ready:!1},x=null,T="",k="",N=0,L=null,B=!1,H=null;const X=fe=>{_=fe;for(const Z of f)Z()},Y=()=>{k!==""&&l.send({type:"stop",session:s,instance:k}),l.reset(),H==null||H.close(),H=null,k="";for(const fe of m.values())fe.reject(new Error("The mobile preview was closed."));m.clear(),X({mode:"closed",url:null,ready:!1})},te=()=>{N++,x=null,Y()};window.addEventListener("pagehide",te);const pe=fe=>{if(!pc(fe)||fe.session!==s||fe.instance!==k||(fe.type==="ready"&&(X({..._,ready:!0}),l.send({type:"visibility",session:s,instance:k,visible:_.mode!=="minimized"})),fe.type==="closed"&&te(),fe.type!=="capture"||typeof fe.requestId!="string"))return;const Z=m.get(fe.requestId);Z!==void 0&&(typeof fe.error=="string"?Z.reject(new Error(fe.error)):typeof fe.image=="string"&&fe.image.length<=4e6&&typeof fe.width=="number"&&fe.width>0&&fe.width<=1024&&typeof fe.height=="number"&&fe.height>0&&fe.height<=1024?Z.resolve({mimeType:"image/jpeg",image:fe.image,width:fe.width,height:fe.height}):Z.reject(new Error("The mobile preview sent an invalid picture.")))};return{state:()=>_,status:()=>({mode:_.mode,ready:_.ready}),subscribe:fe=>(f.add(fe),()=>f.delete(fe)),open:async(fe,Z,me="embedded")=>{if(B||t===null)return{ok:!1,reason:"unavailable"};const Oe=fe.replace(/\/$/,"");if(_.mode===me&&x===Oe)return N++,{ok:!0};if((me==="embedded"||me==="minimized")&&(_.mode==="embedded"||_.mode==="minimized")&&x===Oe){if(N++,X({..._,mode:me}),l.send({type:"visibility",session:s,instance:k,visible:me!=="minimized"}),me==="minimized")for(const Mt of m.values())Mt.reject(new Error("Restore the mobile preview before taking a picture."));return{ok:!0}}if(me==="minimized")return{ok:!1,reason:"unavailable"};const Be=me==="tab"?window.open("about:blank",`dcl-phone-preview-${crypto.randomUUID()}`):null;if(me==="tab"&&Be===null)return{ok:!1,reason:"unavailable"};const gt=++N;if(!await fetch(t,{method:"HEAD",signal:AbortSignal.timeout(5e3)}).then(Mt=>Mt.ok,()=>!1)||gt!==N||B||Be!=null&&Be.closed)return Be==null||Be.close(),{ok:!1,reason:"unavailable"};if(Y(),await new Promise(Mt=>setTimeout(Mt,100)),gt!==N||B||Be!=null&&Be.closed)return Be==null||Be.close(),{ok:!1,reason:"unavailable"};k=crypto.randomUUID();const wt=new URL(t);wt.searchParams.set("previewSession",s),wt.searchParams.set("previewInstance",k),wt.searchParams.set("editorOrigin",window.location.origin),me==="tab"&&wt.searchParams.set("previewDetached","1"),wt.searchParams.set("maxpixels",String(1600*720)),T=new URL(`realm/${s}/${k}`,t).href,l.reset(k,Oe,T);const ht=new URL("decentraland://open");ht.searchParams.set("preview",T),ht.searchParams.set("position",Z);const He=["--local-editor-preview","--skip-lobby","--guest-profile","--fake-deeplink",ht.href];return a!==null&&He.push("--dclenv",a),wt.searchParams.set("args",He.join(" ")),x=Oe,X({mode:me,url:wt.href,ready:!1}),H=Be,Be!==null&&PAr(Be,wt.href),{ok:!0}},close:te,capture:async fe=>{if(fe.throwIfAborted(),_.mode==="closed"||!_.ready)throw new Error("Open the mobile preview and wait for it to load before taking a picture.");_.mode==="minimized"&&(L=N,X({..._,mode:"embedded"}),l.send({type:"visibility",session:s,instance:k,visible:!0}));const Z=crypto.randomUUID();try{return await new Promise((me,Oe)=>{const Be=()=>{clearTimeout(ct),fe.removeEventListener("abort",gt),m.delete(Z)},gt=()=>{Be(),Oe(fe.reason)},ct=setTimeout(()=>{Be(),Oe(new Error("The mobile preview did not answer. Bring its tab to the foreground and retry."))},1e4);m.set(Z,{resolve:wt=>{Be(),me(wt)},reject:wt=>{Be(),Oe(wt)}}),fe.addEventListener("abort",gt,{once:!0}),l.send({type:"capture",session:s,instance:k,requestId:Z})})}finally{m.size===0&&(L===N&&_.mode==="embedded"&&(X({..._,mode:"minimized"}),l.send({type:"visibility",session:s,instance:k,visible:!1})),L=null)}},built:async fe=>{if(x===null)return;const Z=x,me=await n(fe),Oe=FZe(me,await r(me));!B&&Z===x&&l.send({type:"scene-updated",session:s,instance:k,realm:T,entityId:Oe})},dispose:()=>{te(),B=!0,window.removeEventListener("pagehide",te),l.dispose(),f.clear()}}}function PAr(t,n){const r=t.document;r.title="Mobile scene preview",r.body.style.cssText="margin:0;background:#19191c;overflow:hidden";const a=r.createElement("iframe");a.title="Mobile scene preview",a.allow="autoplay; fullscreen; gamepad; cross-origin-isolated",a.style.cssText="width:100vw;height:100vh;border:0;display:block",a.src=n,r.body.replaceChildren(a)}const IAr=200,NAr=2e3,DAr=/^\((?:no logs|\+\d+ older entries not retained)\)$/;function RAr(t,n){for(let r=Math.min(t.length,n.length);r>0;r--){const a=t.length-r;if(n.slice(0,r).every((s,l)=>s===t[a+l]))return n.slice(r)}return[...n]}function MAr(t,n){let r=[],a=!1,s;const l=async()=>{try{const f=await t(`scene_logs ${IAr} --server`);if(a)return;const m=f.split(`
38054
38054
  `).filter(_=>_.trim()!==""&&!DAr.test(_.trim()));for(const _ of RAr(r,m))n(_);r=m}catch{}a||(s=setTimeout(()=>void l(),NAr))};return l(),()=>{a=!0,clearTimeout(s)}}function LAr(t,n,r){r.throwIfAborted();const a=tt.scene,s=[...t].sort().join(";");return new Promise((l,f)=>{const m=()=>{clearTimeout(N),T(),r.removeEventListener("abort",k)},_=L=>{m(),f(L)},x=()=>{var B;tt.scene===a||tt.status!=="ready"||!tt.frozen||((B=tt.scene)==null?void 0:B.parcels.map(H=>`${H.x},${H.y}`).sort().join(";"))!==s||(m(),l())},T=Rqe(x),k=()=>_(r.reason),N=setTimeout(()=>_(new Error("The preview has not loaded the new parcels. Retry sceneSettings before building outside the current layout.")),9e4);r.addEventListener("abort",k,{once:!0});try{n(),x()}catch(L){_(L)}})}const FAr=new Set(["node_modules",".git","bin","dist"]),jAr=300*1024,BAr=56,UAr=5;function $Ar(t){const n=t.origin,r=typeof n=="object"&&n!==null&&!Array.isArray(n)?n:null;return r!==null&&(r.source==="import"||r.source==="github")?r:{...r??{},source:"user"}}function zAr(t,n){const r=new Map;let a=new Map;function s(m,_){if(_.size>jAr)return t.blob(m,_.hash);let x=r.get(_.hash);return x===void 0&&(x=t.blob(m,_.hash),r.set(_.hash,x),x.catch(()=>r.delete(_.hash))),x}const l={async folders(){const m=await t.list();return a=new Map(m.map(x=>[x.name,x])),(await Promise.all(m.map(async x=>{const T=x.files["data.json"];if(T===void 0)return null;const k=await s(x.name,T).then(L=>new TextDecoder().decode(L),()=>null);if(k===null)return null;const N=Object.fromEntries(Object.entries(x.files).map(([L,B])=>[L,B.size]));return{name:x.name,data:k,files:N}}))).filter(x=>x!==null)},async read(m,_){var T;const x=(T=a.get(m.name))==null?void 0:T.files[_];if(x===void 0)throw new Error(`${m.name}/${_} is not in your library`);return s(m.name,x)}};async function f(m,_){const x={},T=new Map;for(const[N,L]of _){const B=await n(L);x[N]={hash:B,size:L.length},T.set(B,L)}const k=[...T].map(([N,L])=>({hash:N,size:L.length}));for(const N of await t.uploads(m,k)){const L=T.get(N.hash);L!==void 0&&await t.putBlob(N,L)}await t.put(m,x)}return{tree:l,async copyOut(m,_){const[x,T,k]=_.split("/");if(x!=="custom"||T===void 0||k!==void 0||!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(T))throw new Error(`not a prefab folder: ${_}`);const N=`${_}/`,L=new Map;for(const[Z,me]of m.files()){const Oe=Z.slice(N.length);Z.startsWith(N)&&!Oe.split("/").some(Be=>FAr.has(Be))&&L.set(Oe,me)}const B=L.get("data.json"),H=B===void 0?null:Xq(new TextDecoder().decode(B));if(H===null)throw new Error(`${_} has no readable data.json`);const X={...H,id:typeof H.id=="string"?H.id:crypto.randomUUID(),origin:$Ar(H)},Y=`${JSON.stringify(X,null,2)}
38055
- `;L.set("data.json",new TextEncoder().encode(Y));const te=Oqe(kHt(H,T)).slice(0,BAr).replace(/_+$/,"")||"prefab",pe=new Set((await t.list()).map(Z=>Z.name));let fe=1;for(let Z=0;Z<UAr;Z++){let me=te;for(;pe.has(me);)me=`${te}_${++fe}`;try{return await f(me,L),{ref:`user:${me}`,scope:"user",data:Y}}catch(Oe){if(!(Oe instanceof pHt))throw Oe;pe.add(me)}}throw new Error("could not find a free name in your library — try again")},remove:m=>t.remove(m)}}const XPt=new WeakMap;function VAr(t){let n=XPt.get(t);return n===void 0&&(n=crypto.subtle.digest("SHA-256",new Uint8Array(t)).then(r=>[...new Uint8Array(r)].map(a=>a.toString(16).padStart(2,"0")).join("")),XPt.set(t,n)),n}async function WAr(t){const n=t.get(".dclignore"),r=BZe(t.keys(),n===void 0?void 0:new TextDecoder().decode(n)).filter(l=>l!==zR),a=new Map;let s=0;for(const l of r){const f=t.get(l);f!==void 0&&(a.set(await VAr(f),f.byteLength),s++)}return{bytes:[...a.values()].reduce((l,f)=>l+f,0),files:s}}const ZPt=4e3,qAr=4e6,HAr=mIt*24*60*60*1e3,GAr="assets/images",JAr=3e3,QAr=100,YAr="Sign in to keep prefabs in your own library. The built-in prefabs work without it.",XAr=t=>t instanceof Error?t.message:String(t);function B9e(t,n){var r,a,s;return{realm:n.replace(/\/$/,""),systemScene:"",position:((r=t.scene)==null?void 0:r.base)??((s=(a=t.scene)==null?void 0:a.parcels)==null?void 0:s[0])??"0,0",spawn:_2r(t),spawnPoints:JSON.stringify(Array.isArray(t.spawnPoints)?t.spawnPoints:[])}}const ZAr=({host:t,sceneCompiler:n})=>{const r=new nEr(Y2r()),a=zS(t),s=a===null||a.services.projects===null?null:fHt(a.services.projects,(Xn,Fr)=>a.signedFetch(Xn,Fr)),l=()=>{const{address:Xn,isGuest:Fr}=t.identity();return Fr||Xn===null?null:Xn.toLowerCase()},f=[],m=[],_=[],x=[],T=[],k=Xn=>{f.push(Xn),f.length>ZPt&&f.splice(0,f.length-ZPt);for(const Fr of m)Fr(Xn)},N=OAr(AAr(t.pageDir,(a==null?void 0:a.services.projects)??null,location.search),me,async Xn=>JPt(await X,l()??"guest",Xn),CAr((a==null?void 0:a.services.worldsContent)??null)),L=Xn=>{for(const Fr of _)Fr(Xn);Xn.type==="bundleSaved"&&pe!==null&&N.built(pe.id).catch(Fr=>console.error("[editor] mobile preview reload failed",Fr))},B=new Map,H=new Set,X=u4t.then(vAr),Y=SAr({pageDir:t.pageDir,urls:n,machineId:async Xn=>JPt(await X,l()??"guest",Xn),emit:L,log:k,packages:r.packages,saveLock:async(Xn,Fr)=>{await r.write(Xn,zR,Fr),St.touched(Xn,zR),(pe==null?void 0:pe.id)===Xn&&pe.files.set(zR,Fr)},onPackages:(Xn,Fr)=>{if(Fr===null){B.delete(Xn);return}B.set(Xn,Fr);for(const oi of H)oi(Xn,Fr)}});let te=null,pe=null,fe=null,Z=null;async function me(Xn){var Ya;const Fr=(Ya=(await r.list()).find(Za=>Za.id===Xn))==null?void 0:Ya.previewId;if(Fr!==void 0)return Fr;const oi="p"+Array.from(crypto.getRandomValues(new Uint8Array(16)),Za=>Za.toString(16).padStart(2,"0")).join("");return await r.patch(Xn,{previewId:oi}),oi}async function Oe(Xn){const Fr=new URL("preview/",t.pageDir).href,oi=await caches.open(awe);for(const Ya of await oi.keys())Ya.url.startsWith(Fr)&&(Xn===null||!Ya.url.startsWith(Xn))&&await oi.delete(Ya)}let Be=0,gt=Promise.resolve(),ct=Promise.resolve();const wt=a2r({service:(a==null?void 0:a.services.projects)??null,fetch:(Xn,Fr)=>a===null?Promise.reject(new Error("The assistant service is not configured.")):a.signedFetch(Xn,Fr),wallet:l,mobilePreview:N.status,memory:{read:async(Xn,Fr)=>{const oi=await r.assistantMemory(Xn,Fr);return pc(oi)&&typeof oi.id=="string"&&typeof oi.key=="string"?{id:oi.id,key:oi.key}:null},write:(Xn,Fr,oi)=>r.setAssistantMemory(Xn,Fr,oi)},project:()=>{const Xn=At();return{id:Xn.id,tools:{files:()=>Xn.files,write:(Fr,oi,Ya,Za)=>Mt(Xn.id,Fr,oi,{expected:Ya,signal:Za}),assets:qzt({files:()=>Xn.files}),scene:(Fr,oi)=>FTe(Fr,oi,async Ya=>{var ri,yl,Ba;const Za=ss=>{var gs,Hs;return JSON.stringify([(gs=ss==null?void 0:ss.scene)==null?void 0:gs.parcels,(Hs=ss==null?void 0:ss.scene)==null?void 0:Hs.base])};await Ik();const tl=Za(D0(await He(Xn.id,"scene.json")));await Wt(Xn.id,ss=>b2r(ss,Ya));const uu=D0(await He(Xn.id,"scene.json")),ur=Za(uu)!==tl,Pl=((ri=uu==null?void 0:uu.scene)==null?void 0:ri.parcels)??[],fm=(yl=tt.scene)==null?void 0:yl.parcels.map(ss=>`${ss.x},${ss.y}`).sort().join(";");if(ur||fm!==[...Pl].sort().join(";")){if(!await Xn.flush())throw new Error("The scene did not build. Fix the code and retry sceneSettings to load the new parcels.");oi.throwIfAborted();const ss=await me(Xn.id);te=B9e(uu??{},Y.realmUrl(ss)),await LAr(Pl,()=>{for(const gs of x)gs(te)},oi)}else if(te!==null){const ss=B9e(uu??{},te.realm);(ss.spawn!==te.spawn||ss.spawnPoints!==te.spawnPoints)&&(te={...te,spawn:ss.spawn,spawnPoints:ss.spawnPoints},Hfr(ss.spawn,ss.spawnPoints))}return{requiredPermissions:(uu==null?void 0:uu.requiredPermissions)??[],spawnPoints:(uu==null?void 0:uu.spawnPoints)??[],parcels:Pl,base:((Ba=uu==null?void 0:uu.scene)==null?void 0:Ba.base)??null,previewReady:!0}}),written:Qzt,view:(Fr,oi)=>wse(Fr,oi),playtest:mZe,uiLayout:WWe,turnEnded:QVt,build:TEr({saveScene:Vzt,fileWrites:()=>ct,vendorRuntime:zae,compile:()=>Y.build(Xn.id,new Map(Xn.files)),run:Wzt,mobilePreview:N.status})}}}});function ht(){wt.reset(),Z==null||Z(),Z=null,pe!==null&&(pe.stop(),r.close(pe.id),St.flush(pe.id),pe=null,fe=null)}async function He(Xn,Fr){return(pe==null?void 0:pe.id)===Xn?pe.files.get(Fr):r.read(Xn,Fr).catch(oi=>{if(!vI(oi))throw oi})}function Mt(Xn,Fr,oi,Ya){const Za=ct.then(async()=>{if(Ya==null||Ya.signal.throwIfAborted(),Ya!==void 0&&((pe==null?void 0:pe.id)!==Xn||!Xzt(pe.files.get(Fr),Ya.expected)))throw new Error("This file changed. Read it again before writing.");await r.write(Xn,Fr,oi),St.touched(Xn,Fr),(pe==null?void 0:pe.id)===Xn&&(pe.files.set(Fr,oi),pe.changed(Fr))});return ct=Za.catch(tl=>console.error("[editor] file write failed",tl)),Za}function $e(Xn,Fr){const oi=ct.then(async()=>{const Ya=await r.remove(Xn,Fr);return Ya&&St.touched(Xn,Fr),Ya&&(pe==null?void 0:pe.id)===Xn&&pe.files.delete(Fr)&&pe.changed(Fr),Ya});return ct=oi.catch(Ya=>console.error("[editor] file removal failed",Ya)),oi}function Re(Xn){const Fr=At();if(Fr.id!==Xn)throw new Error("that scene is not the one open");return{files:()=>Fr.files,write:(oi,Ya)=>Mt(Xn,oi,Ya),remove:async oi=>{await $e(Xn,oi)}}}async function $t(Xn){var Ya;const Fr=D0(await He(Xn,"scene.json").catch(()=>{})),oi=(((Ya=Fr==null?void 0:Fr.display)==null?void 0:Ya.title)??"").replace(/[\x00-\x1f\x7f]/g,"").replace(new RegExp(dHt.source,"g"),"").trim().slice(0,QAr);return oi===""?Xn:oi}async function bt(Xn,Fr){const oi=(await r.list()).find(Za=>Za.id===Xn);if(oi===void 0)return null;const Ya=await r.duplicate(Xn,`${oi.name} ${Fr}`,St.remoteIds());return await Wt(Ya.id,Za=>{var tl;return{...Za,display:{...Za.display??{},title:`${((tl=Za.display)==null?void 0:tl.title)||oi.name} ${Fr}`}}}),Ya.id}const St=lEr({store:r,session:()=>{const Xn=l();return s===null||Xn===null?null:{api:s,wallet:Xn}},account:()=>s===null?"unavailable":l()===null?"guest":"on",hash:nwe,title:$t,duplicate:async Xn=>{const Fr=await bt(Xn,pIt(new Date));if(Fr===null)throw new Error("The scene is no longer on this device");return Fr}});let ut=!1,Pt=0;async function qt(){const Xn=++Pt,Fr=l()!==null&&(await wt.shell.aiProviders()).some(oi=>oi.available);Xn!==Pt||Fr===ut||(ut=Fr,Yb())}qt();let Gt=l();const pt=setInterval(()=>{const Xn=l();Xn!==Gt&&(Gt=Xn,wt.reset(),Yb(),qt(),St.refresh(!0),Oe(fe).catch(Fr=>console.warn("[editor] could not clear the previews",Fr)))},JAr),Ue=()=>{document.visibilityState==="hidden"&&St.flush()};document.addEventListener("visibilitychange",Ue);const Ke=new Set;async function Wt(Xn,Fr){const oi=D0(await He(Xn,"scene.json"));if(oi===null)throw new Error("scene.json is missing or is not valid JSON");await Mt(Xn,"scene.json",gPt(Fr(oi)))}async function bn(Xn,Fr){if(Fr==null||Fr==="")return null;const oi=await He(Xn,Fr).catch(()=>{});return oi===void 0||oi.length>qAr?null:yPt(Fr,oi)}async function fn(Xn,Fr=St.status().projects){var Ya,Za,tl,uu;const oi=D0(await He(Xn.id,"scene.json").catch(()=>{}));return{sync:Fr[Xn.id],path:Xn.id,name:Xn.name,title:((Ya=oi==null?void 0:oi.display)==null?void 0:Ya.title)||Xn.name,world:((Za=oi==null?void 0:oi.worldConfiguration)==null?void 0:Za.name)||null,parcels:Array.isArray((tl=oi==null?void 0:oi.scene)==null?void 0:tl.parcels)?oi.scene.parcels.length:0,thumbnail:await bn(Xn.id,(uu=oi==null?void 0:oi.display)==null?void 0:uu.navmapThumbnail),favourite:Xn.favourite,lastOpened:Xn.lastOpened,published:Xn.published,deletedAt:Xn.deletedAt??void 0}}async function An(Xn,Fr){var Ya,Za;ht(),f.length=0,L({type:"sessionStarted"});const oi=tl=>{if(ht(),Fr===Be){k(`✖ ${tl}`);for(const uu of T)uu(tl)}};try{if(await St.prepareOpen(Xn,(ri,yl)=>k(`Downloading from your account… ${ri}/${yl}`)),Fr!==Be)return;if(!await r.open(Xn)){oi("This scene is open in another tab. Close it there to edit it here.");return}const tl=await r.readAll(Xn).then(async ri=>{for(const[yl,Ba]of YTr(ri))await Mt(Xn,yl,Ba),ri.set(yl,Ba);return ri}).catch(ri=>{throw r.close(Xn),ri});if(Fr!==Be){r.close(Xn);return}const uu=await me(Xn);if(Fr!==Be){r.close(Xn);return}const ur=Y.open(Xn,tl,uu);pe=ur;const Pl=Y.realmUrl(uu);if(fe=Pl,k(`▶ Opening ${((Za=(Ya=D0(ur.files.get("scene.json")))==null?void 0:Ya.display)==null?void 0:Za.title)||Xn}`),!await ur.start()&&!await ur.published()){if(Fr!==Be)return;k("✖ The scene did not build.");for(const ri of T)ri("The scene did not build.");return}if(await r.patch(Xn,{lastOpened:Date.now()}),Fr!==Be){ht();return}const fm=D0(ur.files.get("scene.json"))??{};te=B9e(fm,Pl),Z=MAr(ri=>t.engineConsole(ri),k);for(const ri of x)ri(te)}catch(tl){oi(XAr(tl))}}function xi(Xn){N.close(),te=null;const Fr=++Be,oi=wt.reset(),Ya=gt.then(async()=>{await oi,await ct,Fr===Be&&await Xn(Fr)});return gt=Ya.catch(Za=>console.error("[editor] project transition failed",Za)),Ya}function At(){if(pe===null)throw new Error("no project is open");return pe}const mi={saveFile:async({path:Xn,content:Fr})=>Mt(At().id,Xn,Fr),getFile:async({path:Xn})=>{const Fr=At().files.get(Xn)??aAr(Xn);if(Fr===void 0)throw new Error(`no such file: ${Xn}`);return{content:Fr}},removeFiles:async({filePaths:Xn})=>{const Fr=At(),oi=[],Ya=[];for(const Za of Xn)(await $e(Fr.id,Za).catch(()=>!1)?oi:Ya).push(Za);return{success:oi,failed:Ya}},getFilesSizes:async({path:Xn,ignore:Fr})=>{const oi=Xn===""?"":`${Xn.replace(/\/+$/,"")}/`;return{files:[...At().files.keys()].filter(Za=>Za.startsWith(oi)&&!Za.split("/").some(tl=>Fr.includes(tl))).sort().map(Za=>({path:Za}))}}},lr={async find(Xn){return(await r.list()).some(Fr=>Fr.id===Xn)?!0:(await St.refresh(!0),St.remoteOnly().some(Fr=>Fr.id===Xn))},files:async Xn=>(pe==null?void 0:pe.id)===Xn?new Map(pe.files):r.readAll(Xn),manifest:Xn=>St.manifest(Xn),build:async(Xn,Fr)=>Y.build(Xn,await lr.files(Xn),Fr),dependencies:async Xn=>cHt(await He(Xn,"package.json")),onImported:Xn=>(Ke.add(Xn),()=>Ke.delete(Xn))},ks=a===null?null:Q2r({host:a,setWorld:async(Xn,Fr)=>{var Ya,Za;((Za=(Ya=D0(await He(Xn,"scene.json")))==null?void 0:Ya.worldConfiguration)==null?void 0:Za.name)!==Fr&&await Wt(Xn,tl=>({...tl,worldConfiguration:{...tl.worldConfiguration??{},name:Fr}}))},files:Xn=>lr.files(Xn),build:(Xn,Fr)=>Y.build(Xn,Fr,{production:!0}),published:(Xn,Fr)=>r.patch(Xn,{published:Fr})}),Ia=(a==null?void 0:a.services.projects)==null?null:zAr(aEr(a.services.projects,(Xn,Fr)=>a.signedFetch(Xn,Fr)),nwe);Imr(l2r(t.editorBase)),u2r(t.editorBase),Zzt({material:d2r,sound:f2r}),chr(async()=>WAr(await lr.files(At().id)));const cc=mAr({builtin:kEr(t.editorBase,PB("prefabs/catalog.json"),qTe),user:()=>Ia!==null&&l()!==null?Ia.tree:null}),kc={...(a==null?void 0:a.services.projects)==null?{}:{...wt.shell,aiOffered:()=>ut,aiTranscript:()=>{const Xn=Gt;if(Xn===null||pe===null)return null;const Fr=pe.id;return{owner:`${Fr}@${Xn.toLowerCase()}`,load:()=>r.transcript(Fr,Xn),save:oi=>r.setTranscript(Fr,Xn,oi)}}},pickProject:async()=>{},openProject:Xn=>xi(Fr=>An(Xn,Fr)),relaunchProject:Xn=>xi(Fr=>An(Xn,Fr)),closeProject:()=>xi(async()=>{ht(),L({type:"sessionStarted"}),k("■ Scene closed"),await Oe(null).catch(Xn=>console.warn("[editor] could not clear the previews",Xn))}),getState:async()=>{const Xn=await r.list(),Fr=St.status().projects,oi=St.remoteOnly().map(Ya=>({path:Ya.id,name:Ya.name,title:Ya.name,world:null,parcels:0,thumbnail:null,remoteOnly:!0}));return{recentProjects:[...Xn].sort((Ya,Za)=>Za.lastOpened-Ya.lastOpened).map(Ya=>Ya.id),projects:[...await Promise.all(Xn.map(Ya=>fn(Ya,Fr))),...oi],logs:[...f],bevyWebDir:"",editorSceneDir:"",webPort:0,scenePort:0,editorScenePort:0,favourites:Xn.filter(Ya=>Ya.favourite).map(Ya=>Ya.id)}},onStackLog:Xn=>{m.push(Xn)},onBuildEvent:Xn=>{_.push(Xn)},onServersReady:Xn=>{x.push(Xn)},requestReady:async()=>te,phonePreview:async Xn=>te===null?{ok:!1,reason:"no-scene"}:N.open(te.realm,te.position,Xn),phonePreviewState:N.state,onPhonePreviewState:N.subscribe,closePhonePreview:N.close,capturePhonePreview:N.capture,onServersError:Xn=>{T.push(Xn)},toggleFavourite:async Xn=>{const Fr=(await r.list()).find(oi=>oi.id===Xn);Fr!==void 0&&await r.patch(Xn,{favourite:!Fr.favourite})},deleteProject:async Xn=>{const Fr=await r.trash(Xn);return Fr&&St.trashed(Xn),Fr},trashedProjects:async()=>Promise.all((await r.trashed()).map(Xn=>fn(Xn))),restoreProject:async Xn=>{const Fr=await r.restore(Xn);return Fr&&St.restored(Xn),Fr},syncStatus:async()=>(St.refresh(),St.status()),onSyncStatus:Xn=>St.subscribe(Xn),resolveSyncConflict:(Xn,Fr)=>St.resolve(Xn,Fr),exportProject:async Xn=>xEr(await $t(Xn),await lr.files(Xn)),importProject:async Xn=>{const Fr=await SEr(Xn,async(oi,Ya)=>{const Za=await r.create(oi,Ya,{taken:St.remoteIds()});return St.touched(Za.id,"scene.json"),Za.id});if((Fr==null?void 0:Fr.ok)===!0){const{id:oi,needsPackages:Ya}=Fr.report;Object.keys(Ya).length>0&&r.readAll(oi).then(Za=>Y.install(oi,Za)).catch(Za=>console.warn("[editor] could not install the packages of",oi,Za));for(const Za of Ke)Za(Fr.report)}return Fr},projectPackages:async Xn=>B.get(Xn)??null,onProjectPackages:Xn=>(H.add(Xn),()=>H.delete(Xn)),...ks===null||a===null?{}:{publishScene:(Xn,Fr,oi)=>ks.publish(Xn,Fr,oi),...ks.publishShared===void 0?{}:{publishShared:ks.publishShared},publishStop:async()=>ks.stop(),publishWorlds:async()=>G2r(l(),a.services.worldsContent)},canImportFolder:bEr(),renameProject:(Xn,Fr)=>Wt(Xn,oi=>({...oi,display:{...oi.display??{},title:Fr.trim()}})),duplicateProject:Xn=>bt(Xn,"copy"),sceneTemplates:async()=>nAr(),createScene:async(Xn,Fr,oi)=>{const Ya=SHt(oi),Za=D0(Ya.get("scene.json"));if(Za===null)throw new Error(`template not found: ${oi}`);Ya.set("scene.json",gPt({...Za,display:{...Za.display??{},title:Fr.trim()}}));const tl=await r.create(Fr,Ya,{taken:St.remoteIds()});return St.touched(tl.id,"scene.json"),tl.id},openExternal:async Xn=>{/^https?:$/.test(new URL(Xn).protocol)&&window.open(Xn,"_blank","noopener,noreferrer")},compositeEntityIds:async Xn=>{for(const Fr of g2r){const oi=await He(Xn,Fr);if(oi!==void 0)return y2r(new TextDecoder().decode(oi))}return[]},sceneSettings:async Xn=>{const Fr=D0(await He(Xn,"scene.json"));if(Fr===null)throw new Error("scene.json is missing or is not valid JSON");const oi=p2r(Fr);return{...oi,thumbnail:await bn(Xn,oi.thumbnailPath)}},saveSceneSettings:async(Xn,Fr)=>{const oi=m2r(Fr);return oi!==null?oi:(await Wt(Xn,Ya=>h2r(Ya,Fr)),null)},pickSceneThumbnail:async Xn=>{const Fr=await wHt(Object.values(bqe).join(","));if(Fr===null)return null;const oi=sHt(Fr.name);if(bqe[oi]===void 0)throw new Error("not a supported image (png, jpg, gif, webp)");const Ya=`${GAr}/scene-thumbnail${oi}`,Za=new Uint8Array(await Fr.arrayBuffer());return await Mt(Xn,Ya,Za),{path:Ya,dataUrl:yPt(Ya,Za)}},appVersion:async()=>n2r,prefabLibraryList:()=>cc.list(),prefabLibraryCopyIn:async(Xn,Fr)=>cc.copyIn(Xn,Re(Fr)),prefabLibraryUpdateCopy:async(Xn,Fr)=>cc.updateCopy(Xn,Re(Fr)),prefabUserLibrary:()=>Ia===null?"unavailable":l()===null?"guest":"on",...Ia===null?{}:{prefabLibraryCopyOut:async(Xn,Fr)=>{if(l()===null)throw new Error(YAr);return Ia.copyOut(Re(Xn),Fr)},prefabLibraryDelete:async Xn=>{const Fr=THt(Xn);return(Fr==null?void 0:Fr.scope)==="user"&&l()!==null?Ia.remove(Fr.name):!1}}};async function Gl(){const Xn=new Set;for(const Fr of[...await r.list(),...await r.trashed()]){const oi=Yqt(await He(Fr.id,zR).catch(()=>{}));for(const Ya of Object.keys((oi==null?void 0:oi.packages)??{}))Xn.add(Ya);for(const[Ya,Za]of Object.entries((oi==null?void 0:oi.dependencies)??{}))Xn.add(i7(Ya,Za))}for(const Fr of await r.packages.keys())Xn.has(Fr)||await r.packages.remove(Fr)}return r.purge(Date.now()-HAr).then(async Xn=>{const Fr=await caches.open(awe),oi=Xn.map(({id:Za,previewId:tl})=>Y.realmUrl(tl??Za));for(const Za of await Fr.keys())oi.some(tl=>Za.url.startsWith(tl))&&await Fr.delete(Za);const Ya=await caches.open(e2r);for(const Za of oi)await Ya.delete(`${Za}__storage`);Xn.length>0&&await Gl()}).catch(Xn=>console.warn("[editor] could not empty the trash",Xn)),{shell:kc,projects:lr,dataLayer:mi,dispose:()=>{N.dispose(),wt.dispose(),Be++,ht(),Y.dispose(),clearInterval(pt),document.removeEventListener("visibilitychange",Ue),St.flush().finally(()=>St.dispose())}}};let a7=null,RH=null,gre=null,KPt=!1;function KAr(){if(a7!==null)return a7;const t=window.__dclEditorHost;if(t===void 0||t.version!==0&&t.version!==1)return console.error("[editor] window.__dclEditorHost (contract v0 or v1) is missing: nothing to mount into"),null;console.log("[editor] web build 2026-11-02T14:47:08.363Z"),gIt(t),nDt(a=>t.engineConsole(a)),b4t(()=>t.identity()),YJn.needed=!1;const n=ZAr({host:t,sceneCompiler:c2r(t.editorBase)});window.editorShell=eCr(n.shell,t),NRt(n.dataLayer??null),EGe();const r=document.createElement("link");return r.rel="stylesheet",r.href=new URL("editor.css",t.editorBase).href,r.integrity=PB("editor.css"),r.crossOrigin="anonymous",r.onerror=()=>console.error("[editor] editor.css did not load or does not match the hash this editor was published with: its fonts are not applied"),document.head.appendChild(r),G1.project=null,G1.notice=null,a7={host:t,web:n,fonts:r},a7}function lwe(){const t=RH;RH=null,t==null||t.unmount()}function eCr(t,n){const{createScene:r,importProject:a,duplicateProject:s}=t;return{...t,...r===void 0?{}:{createScene:async(l,f,m)=>{const _=await r(l,f,m);return _!==null&&tw("project_created",{project_id:_,source:"template",template:m}),_}},...a===void 0?{}:{importProject:async l=>{const f=await a(l);return(f==null?void 0:f.ok)===!0&&tw("project_created",{project_id:f.report.id,source:"import",import_kind:l}),f}},...s===void 0?{}:{duplicateProject:async l=>{const f=await s(l);return f!==null&&tw("project_created",{project_id:f,source:"duplicate",from_project_id:l}),f}},openProject:async l=>{const f=RH;lwe(),f==null||f.api.close(),gre??(gre=v7t(n.container,C.jsx(DTr,{}))),n.setMode("edit"),G1.project=l,G1.opens++,await t.openProject(l),tw("project_opened")}}}function tCr(t,n){var m;const r=KAr();if(r===null)return()=>{};lwe();const a=document.createElement("div");a.style.cssText="position:relative;width:100%;height:100%",PJn(a),t.appendChild(a);const s=v7t(a,C.jsx(DJn,{}),"eui-create-root"),l={api:n,unmount:()=>{s(),a.remove()}};RH=l;const f=KPt?null:((m=zS(r.host))==null?void 0:m.openProject)??null;return KPt=!0,tw("editor_opened",{deep_link:f!==null}),f!==null&&r.web.projects.find(f).catch(()=>!1).then(_=>{var x;RH===l&&(_?(x=window.editorShell)==null||x.openProject(f):G1.notice=`“${f}” is not on this device or on your account. Here are your scenes.`)}),()=>{RH===l&&lwe()}}function nCr(){lwe();const t=a7;if(t===null)return;a7=null;const n=Ik();gre==null||gre(),gre=null,t.fonts.remove(),G1.project=null,delete window.editorShell,b4t(null),nDt(null),gIt(null),t.host.setMode("off"),n.finally(()=>{var r,a;(a=(r=t.web).dispose)==null||a.call(r),a7===null&&NRt(null)})}window.__dclEditor={mountHome:tCr,unmount:nCr};
38055
+ `;L.set("data.json",new TextEncoder().encode(Y));const te=Oqe(kHt(H,T)).slice(0,BAr).replace(/_+$/,"")||"prefab",pe=new Set((await t.list()).map(Z=>Z.name));let fe=1;for(let Z=0;Z<UAr;Z++){let me=te;for(;pe.has(me);)me=`${te}_${++fe}`;try{return await f(me,L),{ref:`user:${me}`,scope:"user",data:Y}}catch(Oe){if(!(Oe instanceof pHt))throw Oe;pe.add(me)}}throw new Error("could not find a free name in your library — try again")},remove:m=>t.remove(m)}}const XPt=new WeakMap;function VAr(t){let n=XPt.get(t);return n===void 0&&(n=crypto.subtle.digest("SHA-256",new Uint8Array(t)).then(r=>[...new Uint8Array(r)].map(a=>a.toString(16).padStart(2,"0")).join("")),XPt.set(t,n)),n}async function WAr(t){const n=t.get(".dclignore"),r=BZe(t.keys(),n===void 0?void 0:new TextDecoder().decode(n)).filter(l=>l!==zR),a=new Map;let s=0;for(const l of r){const f=t.get(l);f!==void 0&&(a.set(await VAr(f),f.byteLength),s++)}return{bytes:[...a.values()].reduce((l,f)=>l+f,0),files:s}}const ZPt=4e3,qAr=4e6,HAr=mIt*24*60*60*1e3,GAr="assets/images",JAr=3e3,QAr=100,YAr="Sign in to keep prefabs in your own library. The built-in prefabs work without it.",XAr=t=>t instanceof Error?t.message:String(t);function B9e(t,n){var r,a,s;return{realm:n.replace(/\/$/,""),systemScene:"",position:((r=t.scene)==null?void 0:r.base)??((s=(a=t.scene)==null?void 0:a.parcels)==null?void 0:s[0])??"0,0",spawn:_2r(t),spawnPoints:JSON.stringify(Array.isArray(t.spawnPoints)?t.spawnPoints:[])}}const ZAr=({host:t,sceneCompiler:n})=>{const r=new nEr(Y2r()),a=zS(t),s=a===null||a.services.projects===null?null:fHt(a.services.projects,(Xn,Fr)=>a.signedFetch(Xn,Fr)),l=()=>{const{address:Xn,isGuest:Fr}=t.identity();return Fr||Xn===null?null:Xn.toLowerCase()},f=[],m=[],_=[],x=[],T=[],k=Xn=>{f.push(Xn),f.length>ZPt&&f.splice(0,f.length-ZPt);for(const Fr of m)Fr(Xn)},N=OAr(AAr(t.pageDir,(a==null?void 0:a.services.projects)??null,location.search),me,async Xn=>JPt(await X,l()??"guest",Xn),CAr((a==null?void 0:a.services.worldsContent)??null)),L=Xn=>{for(const Fr of _)Fr(Xn);Xn.type==="bundleSaved"&&pe!==null&&N.built(pe.id).catch(Fr=>console.error("[editor] mobile preview reload failed",Fr))},B=new Map,H=new Set,X=u4t.then(vAr),Y=SAr({pageDir:t.pageDir,urls:n,machineId:async Xn=>JPt(await X,l()??"guest",Xn),emit:L,log:k,packages:r.packages,saveLock:async(Xn,Fr)=>{await r.write(Xn,zR,Fr),St.touched(Xn,zR),(pe==null?void 0:pe.id)===Xn&&pe.files.set(zR,Fr)},onPackages:(Xn,Fr)=>{if(Fr===null){B.delete(Xn);return}B.set(Xn,Fr);for(const oi of H)oi(Xn,Fr)}});let te=null,pe=null,fe=null,Z=null;async function me(Xn){var Ya;const Fr=(Ya=(await r.list()).find(Za=>Za.id===Xn))==null?void 0:Ya.previewId;if(Fr!==void 0)return Fr;const oi="p"+Array.from(crypto.getRandomValues(new Uint8Array(16)),Za=>Za.toString(16).padStart(2,"0")).join("");return await r.patch(Xn,{previewId:oi}),oi}async function Oe(Xn){const Fr=new URL("preview/",t.pageDir).href,oi=await caches.open(awe);for(const Ya of await oi.keys())Ya.url.startsWith(Fr)&&(Xn===null||!Ya.url.startsWith(Xn))&&await oi.delete(Ya)}let Be=0,gt=Promise.resolve(),ct=Promise.resolve();const wt=a2r({service:(a==null?void 0:a.services.projects)??null,fetch:(Xn,Fr)=>a===null?Promise.reject(new Error("The assistant service is not configured.")):a.signedFetch(Xn,Fr),wallet:l,mobilePreview:N.status,memory:{read:async(Xn,Fr)=>{const oi=await r.assistantMemory(Xn,Fr);return pc(oi)&&typeof oi.id=="string"&&typeof oi.key=="string"?{id:oi.id,key:oi.key}:null},write:(Xn,Fr,oi)=>r.setAssistantMemory(Xn,Fr,oi)},project:()=>{const Xn=At();return{id:Xn.id,tools:{files:()=>Xn.files,write:(Fr,oi,Ya,Za)=>Mt(Xn.id,Fr,oi,{expected:Ya,signal:Za}),assets:qzt({files:()=>Xn.files}),scene:(Fr,oi)=>FTe(Fr,oi,async Ya=>{var ri,yl,Ba;const Za=ss=>{var gs,Hs;return JSON.stringify([(gs=ss==null?void 0:ss.scene)==null?void 0:gs.parcels,(Hs=ss==null?void 0:ss.scene)==null?void 0:Hs.base])};await Ik();const tl=Za(D0(await He(Xn.id,"scene.json")));await Wt(Xn.id,ss=>b2r(ss,Ya));const uu=D0(await He(Xn.id,"scene.json")),ur=Za(uu)!==tl,Pl=((ri=uu==null?void 0:uu.scene)==null?void 0:ri.parcels)??[],fm=(yl=tt.scene)==null?void 0:yl.parcels.map(ss=>`${ss.x},${ss.y}`).sort().join(";");if(ur||fm!==[...Pl].sort().join(";")){if(!await Xn.flush())throw new Error("The scene did not build. Fix the code and retry sceneSettings to load the new parcels.");oi.throwIfAborted();const ss=await me(Xn.id);te=B9e(uu??{},Y.realmUrl(ss)),await LAr(Pl,()=>{for(const gs of x)gs(te)},oi)}else if(te!==null){const ss=B9e(uu??{},te.realm);(ss.spawn!==te.spawn||ss.spawnPoints!==te.spawnPoints)&&(te={...te,spawn:ss.spawn,spawnPoints:ss.spawnPoints},Hfr(ss.spawn,ss.spawnPoints))}return{requiredPermissions:(uu==null?void 0:uu.requiredPermissions)??[],spawnPoints:(uu==null?void 0:uu.spawnPoints)??[],parcels:Pl,base:((Ba=uu==null?void 0:uu.scene)==null?void 0:Ba.base)??null,previewReady:!0}}),written:Qzt,view:(Fr,oi)=>wse(Fr,oi),playtest:mZe,uiLayout:WWe,turnEnded:QVt,build:TEr({saveScene:Vzt,fileWrites:()=>ct,vendorRuntime:zae,compile:()=>Y.build(Xn.id,new Map(Xn.files)),run:Wzt,mobilePreview:N.status})}}}});function ht(){wt.reset(),Z==null||Z(),Z=null,pe!==null&&(pe.stop(),r.close(pe.id),St.flush(pe.id),pe=null,fe=null)}async function He(Xn,Fr){return(pe==null?void 0:pe.id)===Xn?pe.files.get(Fr):r.read(Xn,Fr).catch(oi=>{if(!vI(oi))throw oi})}function Mt(Xn,Fr,oi,Ya){const Za=ct.then(async()=>{if(Ya==null||Ya.signal.throwIfAborted(),Ya!==void 0&&((pe==null?void 0:pe.id)!==Xn||!Xzt(pe.files.get(Fr),Ya.expected)))throw new Error("This file changed. Read it again before writing.");await r.write(Xn,Fr,oi),St.touched(Xn,Fr),(pe==null?void 0:pe.id)===Xn&&(pe.files.set(Fr,oi),pe.changed(Fr))});return ct=Za.catch(tl=>console.error("[editor] file write failed",tl)),Za}function $e(Xn,Fr){const oi=ct.then(async()=>{const Ya=await r.remove(Xn,Fr);return Ya&&St.touched(Xn,Fr),Ya&&(pe==null?void 0:pe.id)===Xn&&pe.files.delete(Fr)&&pe.changed(Fr),Ya});return ct=oi.catch(Ya=>console.error("[editor] file removal failed",Ya)),oi}function Re(Xn){const Fr=At();if(Fr.id!==Xn)throw new Error("that scene is not the one open");return{files:()=>Fr.files,write:(oi,Ya)=>Mt(Xn,oi,Ya),remove:async oi=>{await $e(Xn,oi)}}}async function $t(Xn){var Ya;const Fr=D0(await He(Xn,"scene.json").catch(()=>{})),oi=(((Ya=Fr==null?void 0:Fr.display)==null?void 0:Ya.title)??"").replace(/[\x00-\x1f\x7f]/g,"").replace(new RegExp(dHt.source,"g"),"").trim().slice(0,QAr);return oi===""?Xn:oi}async function bt(Xn,Fr){const oi=(await r.list()).find(Za=>Za.id===Xn);if(oi===void 0)return null;const Ya=await r.duplicate(Xn,`${oi.name} ${Fr}`,St.remoteIds());return await Wt(Ya.id,Za=>{var tl;return{...Za,display:{...Za.display??{},title:`${((tl=Za.display)==null?void 0:tl.title)||oi.name} ${Fr}`}}}),Ya.id}const St=lEr({store:r,session:()=>{const Xn=l();return s===null||Xn===null?null:{api:s,wallet:Xn}},account:()=>s===null?"unavailable":l()===null?"guest":"on",hash:nwe,title:$t,duplicate:async Xn=>{const Fr=await bt(Xn,pIt(new Date));if(Fr===null)throw new Error("The scene is no longer on this device");return Fr}});let ut=!1,Pt=0;async function qt(){const Xn=++Pt,Fr=l()!==null&&(await wt.shell.aiProviders()).some(oi=>oi.available);Xn!==Pt||Fr===ut||(ut=Fr,Yb())}qt();let Gt=l();const pt=setInterval(()=>{const Xn=l();Xn!==Gt&&(Gt=Xn,wt.reset(),Yb(),qt(),St.refresh(!0),Oe(fe).catch(Fr=>console.warn("[editor] could not clear the previews",Fr)))},JAr),Ue=()=>{document.visibilityState==="hidden"&&St.flush()};document.addEventListener("visibilitychange",Ue);const Ke=new Set;async function Wt(Xn,Fr){const oi=D0(await He(Xn,"scene.json"));if(oi===null)throw new Error("scene.json is missing or is not valid JSON");await Mt(Xn,"scene.json",gPt(Fr(oi)))}async function bn(Xn,Fr){if(Fr==null||Fr==="")return null;const oi=await He(Xn,Fr).catch(()=>{});return oi===void 0||oi.length>qAr?null:yPt(Fr,oi)}async function fn(Xn,Fr=St.status().projects){var Ya,Za,tl,uu;const oi=D0(await He(Xn.id,"scene.json").catch(()=>{}));return{sync:Fr[Xn.id],path:Xn.id,name:Xn.name,title:((Ya=oi==null?void 0:oi.display)==null?void 0:Ya.title)||Xn.name,world:((Za=oi==null?void 0:oi.worldConfiguration)==null?void 0:Za.name)||null,parcels:Array.isArray((tl=oi==null?void 0:oi.scene)==null?void 0:tl.parcels)?oi.scene.parcels.length:0,thumbnail:await bn(Xn.id,(uu=oi==null?void 0:oi.display)==null?void 0:uu.navmapThumbnail),favourite:Xn.favourite,lastOpened:Xn.lastOpened,published:Xn.published,deletedAt:Xn.deletedAt??void 0}}async function An(Xn,Fr){var Ya,Za;ht(),f.length=0,L({type:"sessionStarted"});const oi=tl=>{if(ht(),Fr===Be){k(`✖ ${tl}`);for(const uu of T)uu(tl)}};try{if(await St.prepareOpen(Xn,(ri,yl)=>k(`Downloading from your account… ${ri}/${yl}`)),Fr!==Be)return;if(!await r.open(Xn)){oi("This scene is open in another tab. Close it there to edit it here.");return}const tl=await r.readAll(Xn).then(async ri=>{for(const[yl,Ba]of YTr(ri))await Mt(Xn,yl,Ba),ri.set(yl,Ba);return ri}).catch(ri=>{throw r.close(Xn),ri});if(Fr!==Be){r.close(Xn);return}const uu=await me(Xn);if(Fr!==Be){r.close(Xn);return}const ur=Y.open(Xn,tl,uu);pe=ur;const Pl=Y.realmUrl(uu);if(fe=Pl,k(`▶ Opening ${((Za=(Ya=D0(ur.files.get("scene.json")))==null?void 0:Ya.display)==null?void 0:Za.title)||Xn}`),!await ur.start()&&!await ur.published()){if(Fr!==Be)return;k("✖ The scene did not build.");for(const ri of T)ri("The scene did not build.");return}if(await r.patch(Xn,{lastOpened:Date.now()}),Fr!==Be){ht();return}const fm=D0(ur.files.get("scene.json"))??{};te=B9e(fm,Pl),Z=MAr(ri=>t.engineConsole(ri),k);for(const ri of x)ri(te)}catch(tl){oi(XAr(tl))}}function xi(Xn){N.close(),te=null;const Fr=++Be,oi=wt.reset(),Ya=gt.then(async()=>{await oi,await ct,Fr===Be&&await Xn(Fr)});return gt=Ya.catch(Za=>console.error("[editor] project transition failed",Za)),Ya}function At(){if(pe===null)throw new Error("no project is open");return pe}const mi={saveFile:async({path:Xn,content:Fr})=>Mt(At().id,Xn,Fr),getFile:async({path:Xn})=>{const Fr=At().files.get(Xn)??aAr(Xn);if(Fr===void 0)throw new Error(`no such file: ${Xn}`);return{content:Fr}},removeFiles:async({filePaths:Xn})=>{const Fr=At(),oi=[],Ya=[];for(const Za of Xn)(await $e(Fr.id,Za).catch(()=>!1)?oi:Ya).push(Za);return{success:oi,failed:Ya}},getFilesSizes:async({path:Xn,ignore:Fr})=>{const oi=Xn===""?"":`${Xn.replace(/\/+$/,"")}/`;return{files:[...At().files.keys()].filter(Za=>Za.startsWith(oi)&&!Za.split("/").some(tl=>Fr.includes(tl))).sort().map(Za=>({path:Za}))}}},lr={async find(Xn){return(await r.list()).some(Fr=>Fr.id===Xn)?!0:(await St.refresh(!0),St.remoteOnly().some(Fr=>Fr.id===Xn))},files:async Xn=>(pe==null?void 0:pe.id)===Xn?new Map(pe.files):r.readAll(Xn),manifest:Xn=>St.manifest(Xn),build:async(Xn,Fr)=>Y.build(Xn,await lr.files(Xn),Fr),dependencies:async Xn=>cHt(await He(Xn,"package.json")),onImported:Xn=>(Ke.add(Xn),()=>Ke.delete(Xn))},ks=a===null?null:Q2r({host:a,setWorld:async(Xn,Fr)=>{var Ya,Za;((Za=(Ya=D0(await He(Xn,"scene.json")))==null?void 0:Ya.worldConfiguration)==null?void 0:Za.name)!==Fr&&await Wt(Xn,tl=>({...tl,worldConfiguration:{...tl.worldConfiguration??{},name:Fr}}))},files:Xn=>lr.files(Xn),build:(Xn,Fr)=>Y.build(Xn,Fr,{production:!0}),published:(Xn,Fr)=>r.patch(Xn,{published:Fr})}),Ia=(a==null?void 0:a.services.projects)==null?null:zAr(aEr(a.services.projects,(Xn,Fr)=>a.signedFetch(Xn,Fr)),nwe);Imr(l2r(t.editorBase)),u2r(t.editorBase),Zzt({material:d2r,sound:f2r}),chr(async()=>WAr(await lr.files(At().id)));const cc=mAr({builtin:kEr(t.editorBase,PB("prefabs/catalog.json"),qTe),user:()=>Ia!==null&&l()!==null?Ia.tree:null}),kc={...(a==null?void 0:a.services.projects)==null?{}:{...wt.shell,aiOffered:()=>ut,aiTranscript:()=>{const Xn=Gt;if(Xn===null||pe===null)return null;const Fr=pe.id;return{owner:`${Fr}@${Xn.toLowerCase()}`,load:()=>r.transcript(Fr,Xn),save:oi=>r.setTranscript(Fr,Xn,oi)}}},pickProject:async()=>{},openProject:Xn=>xi(Fr=>An(Xn,Fr)),relaunchProject:Xn=>xi(Fr=>An(Xn,Fr)),closeProject:()=>xi(async()=>{ht(),L({type:"sessionStarted"}),k("■ Scene closed"),await Oe(null).catch(Xn=>console.warn("[editor] could not clear the previews",Xn))}),getState:async()=>{const Xn=await r.list(),Fr=St.status().projects,oi=St.remoteOnly().map(Ya=>({path:Ya.id,name:Ya.name,title:Ya.name,world:null,parcels:0,thumbnail:null,remoteOnly:!0}));return{recentProjects:[...Xn].sort((Ya,Za)=>Za.lastOpened-Ya.lastOpened).map(Ya=>Ya.id),projects:[...await Promise.all(Xn.map(Ya=>fn(Ya,Fr))),...oi],logs:[...f],bevyWebDir:"",editorSceneDir:"",webPort:0,scenePort:0,editorScenePort:0,favourites:Xn.filter(Ya=>Ya.favourite).map(Ya=>Ya.id)}},onStackLog:Xn=>{m.push(Xn)},onBuildEvent:Xn=>{_.push(Xn)},onServersReady:Xn=>{x.push(Xn)},requestReady:async()=>te,phonePreview:async Xn=>te===null?{ok:!1,reason:"no-scene"}:N.open(te.realm,te.position,Xn),phonePreviewState:N.state,onPhonePreviewState:N.subscribe,closePhonePreview:N.close,capturePhonePreview:N.capture,onServersError:Xn=>{T.push(Xn)},toggleFavourite:async Xn=>{const Fr=(await r.list()).find(oi=>oi.id===Xn);Fr!==void 0&&await r.patch(Xn,{favourite:!Fr.favourite})},deleteProject:async Xn=>{const Fr=await r.trash(Xn);return Fr&&St.trashed(Xn),Fr},trashedProjects:async()=>Promise.all((await r.trashed()).map(Xn=>fn(Xn))),restoreProject:async Xn=>{const Fr=await r.restore(Xn);return Fr&&St.restored(Xn),Fr},syncStatus:async()=>(St.refresh(),St.status()),onSyncStatus:Xn=>St.subscribe(Xn),resolveSyncConflict:(Xn,Fr)=>St.resolve(Xn,Fr),exportProject:async Xn=>xEr(await $t(Xn),await lr.files(Xn)),importProject:async Xn=>{const Fr=await SEr(Xn,async(oi,Ya)=>{const Za=await r.create(oi,Ya,{taken:St.remoteIds()});return St.touched(Za.id,"scene.json"),Za.id});if((Fr==null?void 0:Fr.ok)===!0){const{id:oi,needsPackages:Ya}=Fr.report;Object.keys(Ya).length>0&&r.readAll(oi).then(Za=>Y.install(oi,Za)).catch(Za=>console.warn("[editor] could not install the packages of",oi,Za));for(const Za of Ke)Za(Fr.report)}return Fr},projectPackages:async Xn=>B.get(Xn)??null,onProjectPackages:Xn=>(H.add(Xn),()=>H.delete(Xn)),...ks===null||a===null?{}:{publishScene:(Xn,Fr,oi)=>ks.publish(Xn,Fr,oi),...ks.publishShared===void 0?{}:{publishShared:ks.publishShared},publishStop:async()=>ks.stop(),publishWorlds:async()=>G2r(l(),a.services.worldsContent)},canImportFolder:bEr(),renameProject:(Xn,Fr)=>Wt(Xn,oi=>({...oi,display:{...oi.display??{},title:Fr.trim()}})),duplicateProject:Xn=>bt(Xn,"copy"),sceneTemplates:async()=>nAr(),createScene:async(Xn,Fr,oi)=>{const Ya=SHt(oi),Za=D0(Ya.get("scene.json"));if(Za===null)throw new Error(`template not found: ${oi}`);Ya.set("scene.json",gPt({...Za,display:{...Za.display??{},title:Fr.trim()}}));const tl=await r.create(Fr,Ya,{taken:St.remoteIds()});return St.touched(tl.id,"scene.json"),tl.id},openExternal:async Xn=>{/^https?:$/.test(new URL(Xn).protocol)&&window.open(Xn,"_blank","noopener,noreferrer")},compositeEntityIds:async Xn=>{for(const Fr of g2r){const oi=await He(Xn,Fr);if(oi!==void 0)return y2r(new TextDecoder().decode(oi))}return[]},sceneSettings:async Xn=>{const Fr=D0(await He(Xn,"scene.json"));if(Fr===null)throw new Error("scene.json is missing or is not valid JSON");const oi=p2r(Fr);return{...oi,thumbnail:await bn(Xn,oi.thumbnailPath)}},saveSceneSettings:async(Xn,Fr)=>{const oi=m2r(Fr);return oi!==null?oi:(await Wt(Xn,Ya=>h2r(Ya,Fr)),null)},pickSceneThumbnail:async Xn=>{const Fr=await wHt(Object.values(bqe).join(","));if(Fr===null)return null;const oi=sHt(Fr.name);if(bqe[oi]===void 0)throw new Error("not a supported image (png, jpg, gif, webp)");const Ya=`${GAr}/scene-thumbnail${oi}`,Za=new Uint8Array(await Fr.arrayBuffer());return await Mt(Xn,Ya,Za),{path:Ya,dataUrl:yPt(Ya,Za)}},appVersion:async()=>n2r,prefabLibraryList:()=>cc.list(),prefabLibraryCopyIn:async(Xn,Fr)=>cc.copyIn(Xn,Re(Fr)),prefabLibraryUpdateCopy:async(Xn,Fr)=>cc.updateCopy(Xn,Re(Fr)),prefabUserLibrary:()=>Ia===null?"unavailable":l()===null?"guest":"on",...Ia===null?{}:{prefabLibraryCopyOut:async(Xn,Fr)=>{if(l()===null)throw new Error(YAr);return Ia.copyOut(Re(Xn),Fr)},prefabLibraryDelete:async Xn=>{const Fr=THt(Xn);return(Fr==null?void 0:Fr.scope)==="user"&&l()!==null?Ia.remove(Fr.name):!1}}};async function Gl(){const Xn=new Set;for(const Fr of[...await r.list(),...await r.trashed()]){const oi=Yqt(await He(Fr.id,zR).catch(()=>{}));for(const Ya of Object.keys((oi==null?void 0:oi.packages)??{}))Xn.add(Ya);for(const[Ya,Za]of Object.entries((oi==null?void 0:oi.dependencies)??{}))Xn.add(i7(Ya,Za))}for(const Fr of await r.packages.keys())Xn.has(Fr)||await r.packages.remove(Fr)}return r.purge(Date.now()-HAr).then(async Xn=>{const Fr=await caches.open(awe),oi=Xn.map(({id:Za,previewId:tl})=>Y.realmUrl(tl??Za));for(const Za of await Fr.keys())oi.some(tl=>Za.url.startsWith(tl))&&await Fr.delete(Za);const Ya=await caches.open(e2r);for(const Za of oi)await Ya.delete(`${Za}__storage`);Xn.length>0&&await Gl()}).catch(Xn=>console.warn("[editor] could not empty the trash",Xn)),{shell:kc,projects:lr,dataLayer:mi,dispose:()=>{N.dispose(),wt.dispose(),Be++,ht(),Y.dispose(),clearInterval(pt),document.removeEventListener("visibilitychange",Ue),St.flush().finally(()=>St.dispose())}}};let a7=null,RH=null,gre=null,KPt=!1;function KAr(){if(a7!==null)return a7;const t=window.__dclEditorHost;if(t===void 0||t.version!==0&&t.version!==1)return console.error("[editor] window.__dclEditorHost (contract v0 or v1) is missing: nothing to mount into"),null;console.log("[editor] web build 2026-11-02T14:47:37.459Z"),gIt(t),nDt(a=>t.engineConsole(a)),b4t(()=>t.identity()),YJn.needed=!1;const n=ZAr({host:t,sceneCompiler:c2r(t.editorBase)});window.editorShell=eCr(n.shell,t),NRt(n.dataLayer??null),EGe();const r=document.createElement("link");return r.rel="stylesheet",r.href=new URL("editor.css",t.editorBase).href,r.integrity=PB("editor.css"),r.crossOrigin="anonymous",r.onerror=()=>console.error("[editor] editor.css did not load or does not match the hash this editor was published with: its fonts are not applied"),document.head.appendChild(r),G1.project=null,G1.notice=null,a7={host:t,web:n,fonts:r},a7}function lwe(){const t=RH;RH=null,t==null||t.unmount()}function eCr(t,n){const{createScene:r,importProject:a,duplicateProject:s}=t;return{...t,...r===void 0?{}:{createScene:async(l,f,m)=>{const _=await r(l,f,m);return _!==null&&tw("project_created",{project_id:_,source:"template",template:m}),_}},...a===void 0?{}:{importProject:async l=>{const f=await a(l);return(f==null?void 0:f.ok)===!0&&tw("project_created",{project_id:f.report.id,source:"import",import_kind:l}),f}},...s===void 0?{}:{duplicateProject:async l=>{const f=await s(l);return f!==null&&tw("project_created",{project_id:f,source:"duplicate",from_project_id:l}),f}},openProject:async l=>{const f=RH;lwe(),f==null||f.api.close(),gre??(gre=v7t(n.container,C.jsx(DTr,{}))),n.setMode("edit"),G1.project=l,G1.opens++,await t.openProject(l),tw("project_opened")}}}function tCr(t,n){var m;const r=KAr();if(r===null)return()=>{};lwe();const a=document.createElement("div");a.style.cssText="position:relative;width:100%;height:100%",PJn(a),t.appendChild(a);const s=v7t(a,C.jsx(DJn,{}),"eui-create-root"),l={api:n,unmount:()=>{s(),a.remove()}};RH=l;const f=KPt?null:((m=zS(r.host))==null?void 0:m.openProject)??null;return KPt=!0,tw("editor_opened",{deep_link:f!==null}),f!==null&&r.web.projects.find(f).catch(()=>!1).then(_=>{var x;RH===l&&(_?(x=window.editorShell)==null||x.openProject(f):G1.notice=`“${f}” is not on this device or on your account. Here are your scenes.`)}),()=>{RH===l&&lwe()}}function nCr(){lwe();const t=a7;if(t===null)return;a7=null;const n=Ik();gre==null||gre(),gre=null,t.fonts.remove(),G1.project=null,delete window.editorShell,b4t(null),nDt(null),gIt(null),t.host.setMode("off"),n.finally(()=>{var r,a;(a=(r=t.web).dispose)==null||a.call(r),a7===null&&NRt(null)})}window.__dclEditor={mountHome:tCr,unmount:nCr};
package/package.json CHANGED
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "name": "@dcl-regenesislabs/web-editor",
3
- "version": "0.3.23-41465068147.commit-06ea194",
3
+ "version": "0.3.23",
4
4
  "license": "Apache-2.0",
5
5
  "description": "The Decentraland scene editor for the web explorer: editor.js plus the files it loads beside it. Served by version, not installed.",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/dcl-regenesislabs/web-editor.git",
9
9
  "directory": "packages/web"
10
- },
11
- "commit": "06ea194f756e86411489447890ab72928e831ea6"
10
+ }
12
11
  }