Profectus/assets/index.9b24a867.js

19 lines
144 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.359c6955.js";import{q as it,C as l,ab as q,t as x,aF as h,a1 as N,aL as Re,bv as gt,G as te,as as Ke,_ as E,az as yt,a2 as g,J as V,O as W,aK as Le,a0 as $,I as me,a8 as T,a9 as y,b7 as O,aI as Ce,aG as ke,u as Ot,b2 as he,l as re,j as Zn,bw as fn,aH as Ct,A as de,$ as R,b9 as Yt,bt as Xn,ar as Pe,bc as Nn,T as Qn,b3 as Ae,aM as ze,aD as Cn,w as _e,aO as se,z as Fe,bs as er,am as Mt,H as tr,y as gn,bo as nr,ay as rr,bf as ir}from"./@vue.6f8187b0.js";import{L as Ge}from"./lz-string.bfbf8ec3.js";import{c as kn}from"./nanoevents.1080beb7.js";import{i as ar}from"./unofficial-galaxy-sdk.21372393.js";import{p as sr}from"./vue-textarea-autosize.35804eaf.js";import{D as or}from"./vuedraggable.055200e5.js";import{Y as lr}from"./vue-next-select.68e0c605.js";import{s as ur,u as cr}from"./vue-toastification.45d39007.js";import"./sortablejs.20039f18.js";const dr=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerpolicy&&(a.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?a.credentials="include":i.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}};dr();const fr="modulepreload",mn={},gr="./",mt=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${gr}${r}`,r in mn)return;mn[r]=!0;const i=r.endsWith(".css"),a=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${a}`))return;const s=document.createElement("link");if(s.rel=i?"stylesheet":fr,i||(s.as="script",s.crossOrigin=""),s.href=r,document.head.appendChild(s),i)return new Promise((c,d)=>{s.addEventListener("load",c),s.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())},mr="./projInfo-schema.json",hr="Profectus",pr="A project made in Profectus",vr="",br="",yr="",_r="",wr="0.0",Nr="Initial Commit",Cr=!0,kr=!1,Sr=2,Ir=!0,$r=null,Mr="",xr=["main"],Tr=3600,Pr=1,Fr=!0,Er="base64",Or=!1;var U={$schema:mr,title:hr,description:pr,id:vr,author:br,discordName:yr,discordLink:_r,versionNumber:wr,versionTitle:Nr,allowGoBack:Cr,defaultShowSmall:kr,defaultDecimalsShown:Sr,useHeader:Ir,banner:$r,logo:Mr,initialTabs:xr,maxTickLength:Tr,offlineLimit:Pr,enablePausing:Fr,exportEncoding:Er,disableHealthWarning:Or};const Vr=it({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{}});var F=window.player=Vr;function rt(e){return JSON.stringify(e,(t,n)=>{var r;return(r=l(n))!=null?r:null})}var H=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n};const Lr=["onClick"],Dr=q({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=x(!1),r=x(null);function i(){t("click"),r.value&&clearTimeout(r.value),n.value=!1,Ke(()=>{n.value=!0,r.value=setTimeout(()=>n.value=!1,500)})}return(a,s)=>(h(),N("button",{onClick:gt(i,["stop"]),class:te(["feedback",{activated:n.value,left:e.left}])},[Re(a.$slots,"default",{},void 0,!0)],10,Lr))}});var Zt=H(Dr,[["__scopeId","data-v-01a1b95c"]]);const Vt=e=>(Ce("data-v-ac351c02"),e=e(),ke(),e),Rr={class:"error"},Ar={class:"error-title"},qr={class:"error-details",style:{"margin-top":"-10px"}},Br={key:0},Ur={class:"instructions"},zr=["href"],Gr=Vt(()=>g("span",{class:"material-icons",style:{"font-size":"16px"}},"content_paste",-1)),Hr=Vt(()=>g("span",{style:{"margin-left":"8px","font-size":"medium"}},"Copy Save",-1)),jr=Vt(()=>g("br",null,null,-1)),Wr={key:0,style:{"margin-top":"20px"}},Jr=Vt(()=>g("h3",null,"Other errors",-1)),Kr=[Jr],Yr={class:"error-details"},Zr={key:0,style:{"margin-top":"10px"}},Xr={key:1,st
`))),i=E(()=>t.errors.map(s=>s.cause==null?[]:(typeof s.cause=="string"?s.cause:JSON.stringify(s.cause)).split(`
`)));function a(){let s=rt(F);switch(U.exportEncoding){default:console.warn(`Unknown save encoding: ${U.exportEncoding}. Defaulting to lz`);case"lz":s=Ge.compressToUTF16(s);break;case"base64":s=btoa(unescape(encodeURIComponent(s)));break;case"plain":break}console.log(s);const c=document.createElement("textarea");c.value=s,document.body.appendChild(c),c.select(),c.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(c)}return yt(()=>{F.autosave=!1,F.devSpeed=0}),(s,c)=>(h(),N("div",Rr,[g("h1",Ar,V(l(n).name)+": "+V(l(n).message),1),g("div",qr,[l(n).cause?(h(),N("div",Br,[(h(!0),N(W,null,Le(l(i)[0],d=>(h(),N("div",{key:d},V(d),1))),128))])):$("",!0),l(n).stack?(h(),N("div",{key:1,style:me(l(n).cause?"margin-top: 10px":"")},[(h(!0),N(W,null,Le(l(r)[0],d=>(h(),N("div",{key:d},V(d),1))),128))],4)):$("",!0)]),g("div",Ur,[T(" Check the console for more details, and consider sharing it with the developers on "),g("a",{href:l(U).discordLink||"https://discord.gg/yJ4fjnjU54",class:"discord-link"},"discord",8,zr),T("! "),y(Zt,{onClick:a,class:"button",style:{display:"inline-flex"}},{default:O(()=>[Gr,Hr]),_:1}),jr,e.errors.length>1?(h(),N("div",Wr,Kr)):$("",!0),(h(!0),N(W,null,Le(e.errors.slice(1),(d,f)=>(h(),N("div",{key:f,style:{"margin-top":"20px"}},[g("details",Yr,[g("summary",null,V(d.name)+": "+V(d.message),1),d.cause?(h(),N("div",Zr,[(h(!0),N(W,null,Le(l(i)[f+1],b=>(h(),N("div",{key:b},V(b),1))),128))])):$("",!0),d.stack?(h(),N("div",Xr,[(h(!0),N(W,null,Le(l(r)[f+1],b=>(h(),N("div",{key:b},V(b),1))),128))])):$("",!0)])]))),128))])]))}});var Sn=H(Qr,[["__scopeId","data-v-ac351c02"]]);const He={variables:{"--foreground":"#dfdfdf","--background":"#0f0f0f","--feature-foreground":"#0f0f0f","--tooltip-background":"rgba(0, 0, 0, 0.75)","--raised-background":"#0f0f0f","--points":"#ffffff","--locked":"#bf8f8f","--highlighted":"#333","--bought":"#77bf5f","--danger":"rgb(220, 53, 69)","--link":"#02f2f2","--outline":"#dfdfdf","--accent1":"#627a82","--accent2":"#658262","--accent3":"#7c6282","--border-radius":"15px","--modal-border":"solid 2px var(--color)","--feature-margin":"0px"},floatingTabs:!0,mergeAdjacent:!0,showPin:!0};var Xt=(e=>(e.Classic="classic",e.Paper="paper",e.Nordic="nordic",e.Aqua="aqua",e))(Xt||{}),Qt={classic:He,paper:{...He,variables:{...He.variables,"--background":"#2a323d","--feature-foreground":"#000","--raised-background":"#333c4a","--locked":"#3a3e45","--bought":"#5C8A58","--outline":"#333c4a","--border-radius":"4px","--modal-border":"","--feature-margin":"5px"},floatingTabs:!1},nordic:{...He,variables:{...He.variables,"--foreground":"#D8DEE9","--background":"#2E3440","--feature-foreground":"#000","--raised-background":"#3B4252","--points":"#E5E9F0","--locked":"#4c566a","--highlighted":"#434c5e","--bought":"#8FBCBB","--danger":"#D08770","--link":"#88C0D0","--outline":"#3B4252","--accent1":"#B48EAD","--accent2":"#A3BE8C","--accent3":"#EBCB8B","--border-radius":"4px","--modal-border":"solid 2px #3B4252","--feature-margin":"5px"},floatingTabs:!1},aqua:{...He,variables:{...He.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}},j=window.state=Ot({lastTenTicks:[],mouseActivity:[!1],hasNaN:!1,NaNPath:[],errors:it([])});const oe=kn();"fonts"in document&&(document.fonts.onloadingdone=()=>oe.emit("fontsLoaded"));document.onmousemove=function(){j.mouseActivity[j.mouseActivity.length-1]=!0};var ei=Object.freeze(Object.defineProperty({__proto__:null,globalBus:oe},Symbol.toStringTag,{value:"Module"}));function xe(e={}){return Object.assign({id:`${U.id}-0`,name:"Default Save",tabs:U.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:U.id,modVersion:U.versionNumber,layers:{}},e)}function ae(e){const t=Ge.compressToUTF16(rt(e!=null?e:F));return localStorage.setItem((e!=null?e:F).id,t),t}async function ti(){ai();try{let e=localStorage.getItem(G.active);if(e==null){await Te(et());return}if(e=qe
`,e),await Te(et())}}function qe(e){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Ge.decompressFromUTF16(e);else return console.warn("Unable to determine preset encoding",e),null;return e}function et(){const e=ft(),t=xe({id:e});return ae(t),G.saves.push(e),t}function ft(){let e,t=0;do e=`${U.id}-${t++}`;while(localStorage.getItem(e)!=null);return e}const en=x(!1);async function Te(e){console.info("Loading save",e),en.value=!0;const{layers:t,removeLayer:n,addLayer:r}=await mt(()=>Promise.resolve().then(function(){return vs}),void 0),{fixOldSave:i,getInitialLayers:a}=await mt(()=>Promise.resolve().then(function(){return Tl}),void 0);for(const s in t){const c=t[s];c&&n(c)}a(e).forEach(s=>r(s,e)),e=xe(e),e.offlineProd&&e.time!=null&&e.time&&e.devSpeed!==0&&(e.offlineTime==null&&(e.offlineTime=0),e.offlineTime+=Math.min(e.offlineTime+(Date.now()-e.time)/1e3,U.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==U.versionNumber&&(i(e.modVersion,e),e.modVersion=U.versionNumber),Object.assign(F,e),G.active=F.id,oe.emit("onLoad")}const be=Ot({});function ni(e){if(be[e]==null){let t=localStorage.getItem(e);if(t==null)be[e]={error:"Save doesn't exist in localStorage",id:e};else if(t==="dW5kZWZpbmVk")be[e]={error:"Save is undefined",id:e};else try{if(t=qe(t),t==null)return console.warn("Unable to determine preset encoding",t),be[e]={error:"Unable to determine preset encoding",id:e},be[e];be[e]={...JSON.parse(t),id:e}}catch(n){be[e]={error:n,id:e},console.warn(`Failed to load info about save with id ${e}:
${n}
${t}`)}}return be[e]}function ri(){Object.keys(be).forEach(e=>delete be[e])}function kt(e){be[e]=void 0}setInterval(()=>{F.autosave&&ae()},1e3);window.onbeforeunload=()=>{F.autosave&&ae()};window.save=ae;const ii=window.hardReset=async()=>{await Te(et())};window.deleteLowerSaves=()=>{const e=Object.values(G.saves).indexOf(F.id)+1;Object.values(G.saves).slice(e).forEach(t=>localStorage.removeItem(t)),G.saves=G.saves.slice(0,e)};const ht=it({active:"",saves:[],showTPS:!0,theme:Xt.Nordic,unthrottled:!1,alignUnits:!1,showHealthWarning:!0});he(ht,e=>{const t=Ge.compressToUTF16(JSON.stringify(e));localStorage.setItem(U.id,t)},{deep:!0});var G=window.settings=ht;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Xt.Nordic,unthrottled:!1,alignUnits:!1,showHealthWarning:!0};oe.emit("loadSettings",e),Object.assign(ht,e),ii()};function ai(){try{let e=localStorage.getItem(U.id);if(e!=null&&e!==""){if(e=qe(e),e==null){console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(ht,t)}oe.emit("loadSettings",ht)}catch{}}const si=it([]),In=it([]);function oi(e){In.push(e)}const li=it([]);class ui{constructor(t){this.map=new Map,this.first=void 0,this.last=void 0,this.maxSize=t}get size(){return this.map.size}get(t){const n=this.map.get(t);if(n!==void 0)return n!==this.first&&(n===this.last?(this.last=n.prev,this.last.next=void 0):(n.prev.next=n.next,n.next.prev=n.prev),n.next=this.first,this.first.prev=n,this.first=n),n.value}set(t,n){if(this.maxSize<1)return;if(this.map.has(t))throw new Error("Cannot update existing keys in the cache");const r=new ci(t,n);for(this.first===void 0?(this.first=r,this.last=r):(r.next=this.first,this.first.prev=r,this.first=r),this.map.set(t,r);this.map.size>this.maxSize;){const i=this.last;this.map.delete(i.key),this.last=i.prev,this.last.next=void 0}}}class ci{constructor(t,n){this.next=void 0,this.prev=void 0,this.key=t,this.value=n}}const zt=17,di=9e15,fi=Math.log10(9e15),gi=1/9e15,mi=308,hi=-324,hn=5,pi=(1<<10)-1,vi=function(){const e=[];for(let n=hi+1;n<=mi;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),je=[2,Math.E,3,4,5,6,7,8,9,10],bi=[[1,1.0891180521811203,1.1789767925673957,1.2701455431742086,1.3632090180450092,1.4587818160364217,1.5575237916251419,1.6601571006859253,1.767485818836978,1.8804192098842727,2],[1,1.1121114330934079,1.231038924931609,1.3583836963111375,1.4960519303993531,1.6463542337511945,1.8121385357018724,1.996971324618307,2.2053895545527546,2.4432574483385254,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356972596,1.3632807444991446,1.5979222279405536,1.8842640123816674,2.2416069644878687,2.69893426559423,3.3012632110403577,4.121250340630164,5.281493033448316,7],[1,1.1736630594087796,1.379783782386201,1.6292821855668218,1.9378971836180754,2.3289975651071977,2.8384347394720835,3.5232708454565906,4.478242031114584,5.868592169644505,8],[1,1.1793017514670474,1.394054150657457,1.65664127441059,1.985170999970283,2.4069682290577457,2.9647310119960752,3.7278665320924946,4.814462547283592,6.436522247411611,9],[1,1.1840100246247336,1.4061375836156955,1.6802272208863964,2.026757028388619,2.4770056063449646,3.080525271755482,3.9191964192627284,5.135152840833187,6.989961179534715,10]],yi=[[-1,-.9194161097107025,-.8335625019330468,-.7425599821143978,-.6466611521029437,-.5462617907227869,-.4419033816638769,-.3342645487554494,-.2241
`).slice(3,5).map(n=>n.trim()).join(`
`))!=null?t:""}function yn(e,t){var n;u.isNaN(t)&&(j.hasNaN||(F.autosave=!1,j.hasNaN=!0,j.NaNPath=e[Je],j.NaNPersistent=e),console.error(`Attempted to save NaN value to ${(n=e[Je])==null?void 0:n.join(".")}`)),e[tt].value=t}function _t(e,t=!0){const n=re(e)?e:x(e);re(e)&&(e=e.value);const r=E({get(){return n.value},set(a){t?yn(i,a):i[tt].value=a}});r[Ye]=e;const i={get value(){return n.value},set value(a){t?yn(i,a):i[tt].value=a},__v_isRef:!0,[tt]:n,[Ye]:e,[Tt]:fs(),[Wt]:!1,[De]:r,[Je]:void 0};return ye.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",i,`
Created at:
`+i[Tt]):nt[ye[ye.length-1]].add(i),i}function gs(e){return e!=null&&typeof e=="object"&&tt in e}oe.on("addLayer",(e,t)=>{const n=[],r=(i,a=[])=>{let s=!1;return Object.keys(i).forEach(c=>{let d=i[c];if(d!=null&&typeof d=="object"){if(d[Jt]===!0)return;if(We in d&&(d=d[We]),gs(d)){if(s=!0,d[Wt]){console.warn("Deleted persistent ref present in returned object. Ignoring...",d,`
Created at:
`+d[Tt]);return}nt[e.id].delete(d);const f=[e.id,...a,c];d[Je]!=null&&JSON.stringify(f)!==JSON.stringify(d[Je])&&console.error(`Persistent ref is being saved to \`${f.join(".")}\` when it's already present at \`${d[Je].join(".")}\`.`,"This can cause unexpected behavior when loading saves between updates."),d[Je]=f;const b=a.reduce((w,k)=>(k in w||(w[k]={}),w[k]),t),v=b[c];b[c]=d[tt],Zn(b)?v!=null?b[c]=v:b[c]=d[Ye]:v!=null?b[c].value=v:b[c].value=d[Ye]}else!(d instanceof u)&&!(d instanceof o)&&!re(d)&&!n.includes(d)&&(typeof d.type=="symbol"&&n.push(d),r(d,[...a,c])&&(fn(d)&&!fn(i)?console.warn("Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.",We in i?i[We]:i,c):s=!0))}}),s};r(e[We]),nt[e.id].forEach(i=>{i[Wt]||console.error(`Created persistent ref in ${e.id} without registering it to the layer!`,`Make sure to include everything persistent in the returned object.
Created at:
`+i[Tt])}),nt[e.id].clear()});const tn=Symbol("RegisterNode"),nn=Symbol("UnregisterNode"),rn=Symbol("Nodes"),an=Symbol("Bounds"),le=Ot({});window.layers=le;const nt={},ye=[];function sn(e,t){return Ze(()=>{const n={},r=n.emitter=kn();if(n.on=r.on.bind(r),n.emit=r.emit.bind(r),n.nodes=x({}),n.id=e,ye.push(e),nt[e]=new Set,n.minimized=_t(!1,!1),Object.assign(n,t.call(n,n)),ye[ye.length-1]==null||ye[ye.length-1]!==e)throw new Error(`Adding layers stack in invalid state. This should not happen
Stack: ${ye}
Trying to pop ${n.id}`);ye.pop(),L(n,"color"),L(n,"display"),L(n,"classes"),L(n,"style"),L(n,"name"),ce(n,"name",n.id),L(n,"minWidth"),ce(n,"minWidth",600),L(n,"minimizable"),ce(n,"minimizable",!0),L(n,"minimizedDisplay");const i=n.style;return n.style=E(()=>{var s,c;let a=l(n.minWidth);return(typeof a=="number"||!Number.isNaN(parseInt(a)))&&(a=a+"px"),[(s=l(i))!=null?s:"",(c=n.minimized)!=null&&c.value?{flexGrow:"0",flexShrink:"0",width:"60px",minWidth:"",flexBasis:"",margin:"0"}:{flexGrow:"",flexShrink:"",width:"",minWidth:a,flexBasis:a,margin:""}]}),n})}function Rn(e,t){if(console.info("Adding layer",e.id),le[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,le[e.id]);return}ce(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),le[e.id]=e,oe.emit("addLayer",e,t.layers[e.id])}function ms(e){return le[e]}function An(e){console.info("Removing layer",e.id),oe.emit("removeLayer",e),le[e.id]=void 0}function hs(e){An(e),Rn(e,F)}function ps(e){const t=x(!1);return{openModal:()=>t.value=!0,modal:ee(()=>y(Ee,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>y("h2",null,[l(e.name)]),body:l(e.display)}))}}oe.on("update",function(t){Object.values(le).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(le).forEach(n=>{n==null||n.emit("update",t)}),Object.values(le).forEach(n=>{n==null||n.emit("postUpdate",t)})});var vs=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:tn,UnregisterNodeInjectionKey:nn,NodesInjectionKey:rn,BoundsInjectionKey:an,layers:le,persistentRefs:nt,addingLayers:ye,createLayer:sn,addLayer:Rn,getLayer:ms,removeLayer:An,reloadLayer:hs,setupLayerModal:ps},Symbol.toStringTag,{value:"Module"}));const bs=q({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var b;const n=x({}),r=new ResizeObserver(c),i=x(null);yt(()=>{const v=i.value;v!=null&&r.observe(v)});let a=!0,s=x((b=i.value)==null?void 0:b.getBoundingClientRect());function c(){a&&(a=!1,Ke(()=>{var v;s.value=(v=i.value)==null?void 0:v.getBoundingClientRect(),Object.values(n.value).filter(w=>w).forEach(w=>w.rect=w.element.getBoundingClientRect()),t("updateNodes",n.value),a=!0}))}oe.on("fontsLoaded",c);const d={attributes:!1,childList:!0,subtree:!1};Ct(tn,(v,w)=>{const k=new MutationObserver(()=>f(v));k.observe(w,d),n.value[v]={element:w,observer:k,rect:w.getBoundingClientRect()},c()}),Ct(nn,v=>{var w;(w=n.value[v])==null||w.observer.disconnect(),n.value[v]=void 0,c()}),Ct(rn,n),Ct(an,s);function f(v){const w=n.value[v];w!=null&&(w.rect=w.element.getBoundingClientRect(),t("updateNodes",n.value))}return(v,w)=>(h(),N(W,null,[Re(v.$slots,"default",{},void 0,!0),g("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var qn=H(bs,[["__scopeId","data-v-2b1dc1bc"]]);const ys=["onPointerdown"],_s={class:"modal-wrapper"},ws=["width"],Ns={class:"modal-header"},Cs={class:"modal-body"},ks={class:"modal-footer"},Ss=g("div",{class:"modal-default-flex-grow"},null,-1),Ee=q({__name:"Modal",props:{modelValue:{type:Boolean},preventClosing:{type:Boolean},width:null},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){const i=de(e),a=E(()=>l(i.modelValue)||c.value);function s(){l(i.preventClosing)!==!0&&n("update:modelValue",!1)}const c=x(!1),d=x(null),f=E(()=>{var b,v;return(v=(b=d.value)==null?void 0:b.nodes)!=null?v:null});return t({isOpen:a,nodes:f}),(b,v)=>(h(),R(Qn,{to:"#modal-root"},[y(Nn,{name:"modal",onBeforeEnter:v[0]||(v[0]=w=>c.value=!0),onAfterLeave:v[1]||(v[1]=w=>c.value=!1),appear:""},{default:O(()=>[Yt(g("div",Pe({class:"modal-mask",onPointerdown:gt(s,["self"])},b.$attrs),[g("div",_s,[g("div",{class:"modal-container",width:e.width},[g("div",Ns,[Re(b.$slots,"header",{shown:l(a)},()=>[T(" default header ")])]),g("div",Cs,[y(qn,{ref_key:"contextRef",ref:d},{default:O(()=>[Re(b.$slots,"body",{shown:l(a)},()=>[T(" default body ")])]),_:3},512)]),g("div",ks,[Re(b.$slots,"footer",{shown:l(a)},()=>[g("div",{class:"modal-default-footer"},[Ss,g("button",{class:"button modal-default-button",onClick:s}," Close ")])])])],8,ws)])],16,ys),[[Xn,e.modelValue]
Learn more at www.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await ti();const{globalBus:e}=await mt(()=>Promise.resolve().then(function(){return ei}),void 0),{startGameLoop:t}=await mt(()=>import("./gameLoop.94f0e4f9.js"),["assets/gameLoop.94f0e4f9.js","assets/@fontsource.f66d05e7.css","assets/vue.359c6955.js","assets/lz-string.bfbf8ec3.js","assets/@vue.6f8187b0.js","assets/nanoevents.1080beb7.js","assets/unofficial-galaxy-sdk.21372393.js","assets/vue-textarea-autosize.35804eaf.js","assets/vuedraggable.055200e5.js","assets/sortablejs.20039f18.js","assets/vue-next-select.68e0c605.js","assets/vue-next-select.9e6f4164.css","assets/vue-toastification.45d39007.js","assets/vue-toastification.4b5f8ac8.css"]),n=window.vue=ir(bc);n.config.errorHandler=function(r,i,a){console.error(r,a,i)},e.emit("setupVue",n),n.mount("#app"),Ke(()=>{const r=cr(),{updateServiceWorker:i}=_c({onNeedRefresh(){r.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){i()}})},onOfflineReady(){r.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(a){a&&setInterval(()=>a.update(),60*60*1e3)}})}),t()});export{u as D,mt as _,j as a,U as b,Tl as c,oe as g,en as l,F as p,G as s};