(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[258],{85269:function(t,e,s){var o={"./add-asset.tsx":[81431,6150],"./add-user.tsx":[41594,1594],"./arrow-left.tsx":[67698,7698],"./check.tsx":[99732,9732],"./chevron-bottom.tsx":[7309,7309],"./chevron-left.tsx":[48371,8371],"./chevron-right.tsx":[30029,29],"./chevron-right2.tsx":[70395,395],"./chevron-top.tsx":[84306,4306],"./chevron.tsx":[25168,5168],"./circle-check.tsx":[23043,3043],"./close-simple.tsx":[71117,1117],"./close.tsx":[83659,3659],"./cloud-upload.tsx":[22794,2794],"./copy.tsx":[23142,3142],"./customize.tsx":[66445,6445],"./danger.tsx":[10739,739],"./discord.tsx":[98016,8016],"./dot-horizontal.tsx":[54150,4150],"./eth.tsx":[22973,2973],"./explore.tsx":[83122,3122],"./eye.tsx":[10129,129],"./favorite.tsx":[86302,6302],"./info.tsx":[38477,8477],"./lock.tsx":[840,840],"./login.tsx":[76078,6078],"./logout.tsx":[48808,8808],"./medal.tsx":[77208,7208],"./microphone-outline.tsx":[48301,8301],"./microphone.tsx":[5418,5418],"./paper-plane.tsx":[26974,6974],"./pencil.tsx":[8818,8818],"./plus.tsx":[72714,2714],"./save.tsx":[98902,8902],"./script.tsx":[27309,7467],"./settings.tsx":[79439,9439],"./sound-off.tsx":[68890,8890],"./sound-on.tsx":[56958,6958],"./studio/add-asset.tsx":[94146,4146],"./studio/add-plus.tsx":[71971,1971],"./studio/arbitrum.tsx":[21169,1169],"./studio/avalanche.tsx":[70301,301],"./studio/base.tsx":[56419,6419],"./studio/bolt.tsx":[11096,1096],"./studio/chevron-down.tsx":[80173,173],"./studio/close-sidebar.tsx":[83584,3584],"./studio/code-dirty.tsx":[4168,4168],"./studio/code.tsx":[92267,2267],"./studio/create.tsx":[6277,6277],"./studio/drawer.tsx":[18799,8799],"./studio/duplicate.tsx":[32005,2005],"./studio/duplicate2.tsx":[10500,500],"./studio/ethereum.tsx":[23366,3366],"./studio/eyes.tsx":[91985,1985],"./studio/filters.tsx":[65792,5792],"./studio/info.tsx":[51877,1877],"./studio/layer.tsx":[51443,1443],"./studio/layers.tsx":[11557,1557],"./studio/leave.tsx":[12902,2902],"./studio/lock-outline.tsx":[13431,3431],"./studio/lock.tsx":[34818,4818],"./studio/pencil.tsx":[13381,3381],"./studio/plus.tsx":[54695,4695],"./studio/polygon.tsx":[34268,4268],"./studio/refresh.tsx":[96169,6169],"./studio/relocating.tsx":[40693,693],"./studio/remix.tsx":[85156,5156],"./studio/replace.tsx":[69436,9436],"./studio/reset.tsx":[24554,4554],"./studio/rotation.tsx":[96905,6905],"./studio/search.tsx":[22296,2296],"./studio/settings.tsx":[70024,24],"./studio/share.tsx":[34912,4912],"./studio/target.tsx":[44458,4458],"./studio/template.tsx":[68531,8531],"./studio/tezos.tsx":[50634,634],"./studio/trash-filled.tsx":[19882,9882],"./studio/trash.tsx":[16470,6470],"./studio/unlock-outline.tsx":[13673,3673],"./studio/unlock.tsx":[81141,1141],"./studio/users.tsx":[12282,2282],"./studio/warning.tsx":[21023,1023],"./studio/worlds.tsx":[98071,8071],"./trash.tsx":[57328,7328],"./unlock.tsx":[45671,5671],"./user-star.tsx":[90360,360],"./warning.tsx":[36804,6804],"./world-settings.tsx":[86665,6665],"./x.tsx":[13746,3746]};function webpackAsyncContext(t){if(!s.o(o,t))return Promise.resolve().then(function(){var e=Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e});var e=o[t],n=e[0];return s.e(e[1]).then(function(){return s(n)})}webpackAsyncContext.keys=function(){return Object.keys(o)},webpackAsyncContext.id=85269,t.exports=webpackAsyncContext},35088:function(t,e,s){"use strict";s.d(e,{B:function(){return useCustomSelect}});var o=s(14331);let n=new o.y({customSelectOptions:null,customSelectOptionsWidth:258,currentCustomSelect:null,customSelectedOption:null,setCustomSelectedOption:null});function useCustomSelect(){let{state:t,update:e}=(0,o.o)(n);return{customSelectOptions:t.customSelectOptions,customSelectOptionsWidth:t.customSelectOptionsWidth,customSelectOption:t.customSelectOption,currentCustomSelect:t.currentCustomSelect,customSelectedOption:t.customSelectedOption,setCustomSelectedOption:s=>{e(t=>{t.customSelectedOption=s}),t.setCustomSelectedOption&&t.setCustomSelectedOption(s)},setCustomSelectedOptionFunc:t=>{e(e=>{e.setCustomSelectedOption=t})},setCustomSelectOptions:t=>{e(e=>{e.customSelectOptions=t})},setCustomSelectOptionsWidth:t=>{e(e=>{e.customSelectOptionsWidth=t})},setCurrentCustomSelect:t=>{e(e=>{e.currentCustomSelect=t})}}}},10258:function(t,e,s){"use strict";s.d(e,{IK:function(){return MaestroProvider},Zo:function(){return useMaestro}});var o=s(27573),n=s(7653),i=s(7457),l=s(29512),r=s(38631),c=s(69825),u=s(47277),d=s(87821),a=s(86103),p=s.n(a);function PromptTip(){let t=(0,i._)(.5,1,.89,1),{activePrompt:e,promptsHidden:s,showPrompt:n,hidePrompt:l,position:a}=(0,r.R)();return(0,o.jsx)("div",{className:(0,c.S)(p().prompt,p()[null==e?void 0:e.position]),children:(0,o.jsx)(u.M,{mode:"wait",children:(null==e?void 0:e.message)&&!s&&(0,o.jsx)(d.E.span,{className:p().title,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{ease:t,duration:.4},exit:{opacity:0,y:-20},children:null==e?void 0:e.message},"prompt-".concat(null==e?void 0:e.id,"-").concat(null==e?void 0:e.message))})})}var m=s(35088),x=s(32315),h=s(57656),f=s.n(h);function Button(t){let{close:e,data:s}=t;return(0,o.jsxs)("button",{type:"button",className:(0,c.S)(f().container,"js-prevent-custom-select-close"),onClick:()=>{s.onClick(),e()},children:[s.icon&&"left"===s.icon.pos&&(0,o.jsx)(x.Z,{name:s.icon.name,width:s.icon.width,height:s.icon.height,folder:s.icon.folder}),(0,o.jsx)("span",{className:f().text,children:s.label}),s.icon&&"right"===s.icon.pos&&(0,o.jsx)(x.Z,{name:s.icon.name,width:s.icon.width,height:s.icon.height,folder:s.icon.folder})]})}var v=s(81486),_=s(76069),g=s.n(_);function DefaultOption(t){var e;let{data:s,close:n,selected:i,setSelectedOption:l}=t;return(0,o.jsxs)("div",{className:(0,c.S)(g().container,i&&g().selected,"js-prevent-custom-select-close"),onClick:()=>{l(s),n()},children:[(0,o.jsx)(v.Z,{id:"check",width:8,height:7}),(0,o.jsx)("span",{className:g().text,children:"function"==typeof s.label?null===(e=s.label)||void 0===e?void 0:e.call(s):s.label})]})}var S=s(83752),w=s(89044),b=s.n(w),C=s(51743);function getDefaultSelectedOption(t,e){return Array.isArray(t)?t.find(t=>(null==t?void 0:t.value)===e):(null==t?void 0:t.value)==e}function CustomSelectOptions(t){let{currentCustomSelect:e,selectedOption:s,options:i,setSelectedOption:l}=t,r=(0,n.useRef)(null),{customSelectOptionsWidth:u,customSelectedOption:d,setCustomSelectOptions:a,setCurrentCustomSelect:p,setCustomSelectedOptionFunc:x,setCustomSelectOptionsWidth:h}=(0,m.B)(),close=()=>{i&&(a(null),p(null),x(null),h(C.Z))},onWindowClick=t=>{t.target&&t.target.classList.contains("js-prevent-custom-select-close")||close()},positionBox=()=>{let t=e.getBoundingClientRect(),s=r.current.getBoundingClientRect(),o=t.top+t.height/2-s.height/2;t.width;let n=t.left+t.width/2-u/2,i=n+u;o<0&&(o=0),n<0&&(n=0),i>window.innerWidth&&(n=window.innerWidth-u),S.gsap.set(r.current,{top:o,maxHeight:window.innerHeight-o,left:n})},onResize=()=>{positionBox()};return(0,n.useEffect)(()=>(e&&positionBox(),i&&e&&(window.addEventListener("click",onWindowClick),window.addEventListener("resize",onResize)),()=>{window.removeEventListener("click",onWindowClick),window.removeEventListener("resize",onResize)}),[e]),(0,o.jsx)("div",{ref:r,className:(0,c.S)(b().options,"js-prevent-custom-select-close"),style:{width:"".concat(u,"px")},children:i.map((t,e)=>"button"===t.type?(0,o.jsx)(Button,{close:close,data:t,setSelectedOption:l},"CS-Opt-Btn-".concat(t.value,"-").concat(e)):(0,o.jsx)(DefaultOption,{close:close,data:t,setSelectedOption:l,selected:getDefaultSelectedOption(s,null==t?void 0:t.value)},"CS-Opt".concat(t.value,"-").concat(e)))})}var O=s(94525);let k=(0,n.createContext)(null),MaestroProvider=t=>{let{children:e}=t,[s,c]=(0,n.useState)(!1),[u,d]=(0,n.useState)(!1),[a,p]=(0,n.useState)(!1),[x,h]=(0,n.useState)(!1),[f,v]=(0,n.useState)(!1),_=(0,O.k)({muted:!1,volume:1,volumeBG:1}),{customSelectOptions:g,customSelectedOption:S,currentCustomSelect:w,setCustomSelectedOption:b}=(0,m.B)(),{activePrompt:C,promptsHidden:y,showPrompt:j,hidePrompt:P}=(0,r.R)();(0,i._)(.5,1,.89,1);let E=(0,l.Ds)(()=>{d(window.innerWidth<768)},10);return(0,n.useEffect)(()=>{var t;let e=/iPhone|iPad|iPod|Android/i.test(null===(t=navigator)||void 0===t?void 0:t.userAgent);c(e)},[]),(0,n.useEffect)(()=>{s?document.body.classList.add("is-mobile"):document.body.classList.remove("is-mobile")},[s]),(0,n.useEffect)(()=>{a?document.body.classList.add("is-dragging"):document.body.classList.remove("is-dragging")},[a]),(0,n.useEffect)(()=>(window.addEventListener("resize",E),E(),()=>{window.removeEventListener("resize",E)}),[]),(0,n.useEffect)(()=>{f&&document.documentElement.classList.add("lock-scroll")},[f]),(0,o.jsxs)(k.Provider,{value:{isMobile:s,isMobileBreakpoint:u,isDragging:a,loaderIsHidden:f,isPointerLocked:x,setLoaderIsHidden:v,setIsDragging:p,audioSettingsRef$:_},children:[e,g&&g.length>0&&(0,o.jsx)(CustomSelectOptions,{currentCustomSelect:w,options:g,selectedOption:S,setSelectedOption:b}),(0,o.jsx)(PromptTip,{})]})},useMaestro=()=>{let t=(0,n.useContext)(k);if(!t)throw Error("useMaestro needs to be called within MaestroContext.");return t}},38631:function(t,e,s){"use strict";s.d(e,{R:function(){return usePromptTip}});var o=s(14331),n=s(7653),i=s(27573);let l=[{id:"objectBackspaceDelete",message:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{children:"Press"})," ",(0,i.jsx)("i",{children:"backspace"})," ",(0,i.jsx)("span",{children:"to delete"})]}),autoHideTimeout:5e3,repeats:2},{id:"editTextIndications",message:"Click to edit, double click to edit text",autoHideTimeout:3e3,repeats:3},{id:"editTextEnterToFinish",message:(0,i.jsxs)(i.Fragment,{children:["Press ",(0,i.jsx)("i",{children:"enter"})," when finished editing"]})},{id:"scriptEditorSaveShortcut",message:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("i",{children:"CTRL"})," + ",(0,i.jsx)("i",{children:"S"})," ",(0,i.jsx)("span",{children:"to save"})]}),autoHideTimeout:3e3,repeats:3},{id:"loadingTemplate",message:"Loading template"},{id:"editsAutoSaved",message:"Edits are auto-saved",autoHideTimeout:4e3,repeats:1},{id:"clickShiftUniformScale",message:"Click and hold Shift for a uniform scale",repeats:3,autoHideTimeout:3e3},{id:"clickShift",message:"Click and hold Shift for a whole number",repeats:3,autoHideTimeout:3e3}],r=new o.y({promptsHidden:!1,message:null,activePrompt:null,queue:[]});function usePromptTip(){let{state:t,update:e}=(0,o.o)(r),[s,i]=(0,n.useState)({}),hidePrompt=s=>{let o=t.queue.filter(t=>t.id!==s);e(t=>{var e;t.queue=o,t.message=o.length>0?null===(e=o[o.length-1])||void 0===e?void 0:e.message:null,t.activePrompt=o.length>0?o[o.length-1]:null})},addCustomPromptRepeat=(t,e)=>{i({...s,[t]:e})};return{promptsHidden:t.promptsHidden,message:t.message,activePrompt:t.activePrompt,hidePrompt:t=>{hidePrompt(t)},showPrompt:t=>{let o=JSON.parse(window.localStorage.getItem("promptTips")||"{}"),n="object"==typeof t,i=n?t.id:t,r=t;n||(r=l.find(t=>t.id===i));let{message:c,display:u,autoHideTimeout:d,localStorage:a,position:p}=r,m=r.repeats;if(n?((null==s?void 0:s[i])||(null==s?void 0:s[i])===0||addCustomPromptRepeat(i,m),m=s[i]||m,a&&(m=(null==o?void 0:o[i])!=void 0?null==o?void 0:o[i]:s[i]||m)):a&&(m=(null==o?void 0:o[i])!=void 0?null==o?void 0:o[i]:r.repeats),m>0||null==m){if(m>0&&(n?addCustomPromptRepeat(i,m-1):r={...r,repeats:m-1},a)){let t={...o,[i]:m-1};window.localStorage.setItem("promptTips",JSON.stringify(t))}d&&setTimeout(()=>{hidePrompt(i)},d),e(t=>{t.queue=[...t.queue,r],t.message=c,t.activePrompt=r})}},setPreventPromptsDisplay:t=>{e(e=>{e.promptsHidden=t})}}}},94525:function(t,e,s){"use strict";s.d(e,{k:function(){return useSignalRef}});var o=s(46357),n=s(7653),i=s(56083);function useSignalRef(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:shallowEqual,s=(0,n.useRef)(null);return null==s.current&&(s.current=new o.M(t)),(0,i.q)(()=>()=>{s.current.dispose()},[]),(0,n.useEffect)(()=>{e(s.current.value,t)||s.current._push(t)},[t]),s}function shallowEqual(t,e){if(t===e)return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;let s=Object.keys(t),o=Object.keys(e);if(s.length!==o.length)return!1;for(let o=0;o<s.length;o++)if(!Object.prototype.hasOwnProperty.call(e,s[o])||t[s[o]]!==e[s[o]])return!1;return!0}},51743:function(t,e,s){"use strict";s.d(e,{A:function(){return CustomSelect},Z:function(){return d}});var o=s(27573),n=s(7653),i=s(69825),l=s(81486),r=s(35088),c=s(74409),u=s.n(c);let d=258;function CustomSelect(t){var e;let{options:s,optionsWidth:c,selectedOption:a,setSelectedOption:p,disabled:m=!1,defaultLabel:x="Select an option"}=t,h=(0,n.useRef)(null),[f,v]=(0,n.useState)(!0),{customSelectOptions:_,currentCustomSelect:g,setCustomSelectOptions:S,setCurrentCustomSelect:w,setCustomSelectedOptionFunc:b,setCustomSelectedOption:C,setCustomSelectOptionsWidth:O}=(0,r.B)();(0,n.useEffect)(()=>{f?(S(null),w(null),b(null),O(d)):(b(p),C(a),S(s),w(h.current),O(c||d))},[f]),(0,n.useEffect)(()=>{_||v(!0)},[_]);let k=(0,n.useCallback)(t=>{27===t.keyCode&&v(!0)},[]);return(0,n.useEffect)(()=>(window.addEventListener("keydown",k),()=>{window.removeEventListener("keydown",k)}),[]),(0,o.jsx)("div",{ref:h,className:(0,i.S)(u().container,"custom-select-wrapper","js-prevent-custom-select-close"),children:(0,o.jsxs)("div",{className:(0,i.S)(u().input,"custom-select-input","js-prevent-custom-select-close"),onClick:()=>{v(!f)},children:[(0,o.jsx)("span",{className:u().label,children:("function"==typeof(null==a?void 0:a.label)?null==a?void 0:null===(e=a.label)||void 0===e?void 0:e.call(a):null==a?void 0:a.label)||x}),(0,o.jsx)(l.Z,{id:"chevron-bottom",width:8,height:5})]})})}},32315:function(t,e,s){"use strict";var o=s(27573),n=s(7653),i=s(48505),l=s.n(i),r=s(44033),c=s(7878),u=s.n(c);e.Z=n.memo(t=>{let{className:e,name:n,width:i,height:c,folder:d,...a}=t,p=l()(()=>s(85269)("./".concat(d?"".concat(d,"/").concat(n):n,".tsx")),{ssr:!1}),m=(0,r.S)([e,u().icon,"icon","icon--".concat(n)]);return p&&(0,o.jsx)("span",{style:{width:"".concat(i,"px"),height:"".concat(c,"px")},className:m,children:(0,o.jsx)(p,{width:i,height:c,...a})})})},57656:function(t){t.exports={ellipsis:"Button_ellipsis___ZKFh","scrollbar-hidden":"Button_scrollbar-hidden__c8Fln","border-gradient":"Button_border-gradient__P_So_","button-overlay":"Button_button-overlay__khqQv","mask-border":"Button_mask-border__Nr0B_",container:"Button_container__mqV2G",text:"Button_text__3xthr"}},76069:function(t){t.exports={ellipsis:"DefaultOption_ellipsis__BVVsV","scrollbar-hidden":"DefaultOption_scrollbar-hidden__gnVti","border-gradient":"DefaultOption_border-gradient__3xL5u","button-overlay":"DefaultOption_button-overlay__7e5zH","mask-border":"DefaultOption_mask-border__LCYqU",container:"DefaultOption_container__ZBOkz",selected:"DefaultOption_selected__k_ONP",text:"DefaultOption_text__8wvOW"}},89044:function(t){t.exports={options:"Options_options__4Jo6N"}},74409:function(t){t.exports={container:"CustomSelect_container__68VXW",label:"CustomSelect_label__pH9_u",input:"CustomSelect_input__wtjaN"}},7878:function(t){t.exports={icon:"Icon_icon__uzfev"}},86103:function(t){t.exports={ellipsis:"PromptTip_ellipsis__ifKuQ","scrollbar-hidden":"PromptTip_scrollbar-hidden__rdr39","border-gradient":"PromptTip_border-gradient__2zapb","button-overlay":"PromptTip_button-overlay__e7F5x","mask-border":"PromptTip_mask-border__ZorCz",prompt:"PromptTip_prompt__17c6K",above:"PromptTip_above__gIGMa",title:"PromptTip_title__x3jFr",sharp:"PromptTip_sharp__gLoP9"}}}]);