/* empty css */import"./vue.f6263579.js";import{ZasV,Casg,qasIA,uasAt,jasca,lashe,bvasLA,tasy,a8asr,aaasY,ayasMA,arasqe,aEasp,a0asQ,aKasTe,a1asd,OasD,aGaswA,Aasye,_asx,b6asG,b8astt,bsasma,aqasuA,buashA,bbasUt,Tasda,a7asu,b1asme,Gasae,wasIe,b2asJA,aNasge,IasRe,$asR,aLasjA,aJasPt,JasO,aHasXe,aFasYe,zasxe,boasfa,auasva,alasct,aCaspa,bcasTA,aoasCa,bnasha,beasBa}from"./@vue.4ce677c2.js";import{caskt}from"./nanoevents.1080beb7.js";import{LasJe}from"./lz-string.f2f3b7cf.js";import{sasEa,uasGt}from"./vue-toastification.b7cd620e.js";import{pasba}from"./vue-textarea-autosize.35804eaf.js";import{sasQa}from"./semver.83ff78cf.js";import{lasya}from"./socket.io-client.79ce0df5.js";import{Aaszt,TasIa,RasNa,BasSa,uaswa,Easmt}from"./@pixi.1eac1889.js";import{DasTa}from"./vuedraggable.c3acdf62.js";import{YasRa}from"./vue-next-select.0dc4e443.js";import{vasUa,nasPa}from"./workbox-window.8d14e8b7.js";import"./earcut.b6f90e68.js";import"./lru-cache.9a21e90b.js";import"./yallist.fd762fe7.js";import"./engine.io-client.58517560.js";import"./engine.io-parser.3f360695.js";import"./@socket.io.aec831e2.js";import"./socket.io-parser.544e37d1.js";import"./ismobilejs.5c6954b9.js";import"./eventemitter3.dc5195d7.js";import"./url.e51cb87b.js";import"./querystring.23ae9a54.js";import"./sortablejs.cbae5b2d.js";constka=function(){constA=document.createElement("link").relList;if(A&&A.supports&&A.supports("modulepreload"))return;for(constnofdocument.querySelectorAll('link[rel="modulepreload"]'))a(n);newMutationObserver(n=>{for(constsofn)if(s.type==="childList")for(constlofs.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&a(l)}).observe(document,{childList:!0,subtree:!0});functiont(n){consts={};returnn.integrity&&(s.integrity=n.integrity),n.referrerpolicy&&(s.referrerPolicy=n.referrerpolicy),n.crossorigin==="use-credentials"?s.credentials="include":n.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}functiona(n){if(n.ep)return;n.ep=!0;consts=t(n);fetch(n.href,s)}};ka();constGa="modulepreload",dt={},za="./",kA=function(A,t){return!t||t.length===0?A():Promise.all(t.map(a=>{if(a=`${za}${a}`,aindt)return;dt[a]=!0;constn=a.endsWith(".css"),s=n?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${s}`))return;constl=document.createElement("link");if(l.rel=n?"stylesheet":Ga,n||(l.as="script",l.crossOrigin=""),l.href=a,document.head.appendChild(l),n)returnnewPromise((o,c)=>{l.addEventListener("load",o),l.addEventListener("error",()=>c(newError(`Unable to preload CSS for ${a}`)))})})).then(()=>A())},Da="./projInfo-schema.json",Va="Super Auto Coots",Ma="A project made in Profectus",Ja="superautocoots",Oa="",qa="",xa="",Xa="0.0.0",Ya="Initial Commit",Fa=!1,Wa=!1,Ka=2,La=!0,ja=null,Ha="",Za=["main"],_a=3600,$a=1,en=!0,An="base64";varF={$schema:Da,title:Va,description:Ma,id:Ja,author:Oa,discordName:qa,discordLink:xa,versionNumber:Xa,versionTitle:Ya,allowGoBack:Fa,defaultShowSmall:Wa,defaultDecimalsShown:Ka,useHeader:La,banner:ja,logo:Ha,initialTabs:Za,maxTickLength:_a,offlineLimit:$a,enablePausing:en,exportEncoding:An};classtn{constructor(A){this.map=newMap,this.first=void0,this.last=void0,this.maxSize=A}getsize(){returnthis.map.size}get(A){constt=this.map.get(A);if(t!==void0)returnt!==this.first&&(t===this.last?(this.last=t.prev,this.last.next=void0):(t.prev.next=t.next,t.next.prev=t.prev),t.next=this.first,this.first.prev=t,this.first=t),t.value}set(A,t){if(this.maxSize<1)return;if(this.map.has(A))thrownewError("Cannot update existing keys in the cache");consta=newan(A,t);for(this.first===void0?(this.first=a,this.last=a):(a.next=this.first,this.first.prev=a,this.first=a),this.map.set(A,a);this.map.size>this.maxSize;){constn=this.last;this.map.delete(n.key),this.last=n.prev,this.last.next=void0}}}classan{constructor(A,t){this.next=void0,this.prev=void0,this.key=A,this.value=t}}constFA=17,nn=9e15,rn=Math.log10(9e15),sn=1/9e15,l
`))!=null?A:""}function Bt(e,A){var t;if(N.isNaN(A))throw se.hasNaN||(X.autosave=!1,se.hasNaN=!0,se.NaNPath=e[He],se.NaNPersistent=e),console.error("Attempted to save NaN value to",(t=e[He])==null?void 0:t.join("."),e),"Attempted to set NaN value. See above for details";e[nA].value=A}function Ft(e,A=!0){const t=he(e)?e:y(e);he(e)&&(e=e.value);const a=V({get(){return t.value},set(s){A?Bt(n,s):n[nA].value=s}});a[gA]=e;const n={get value(){return t.value},set value(s){A?Bt(n,s):n[nA].value=s},__v_isRef:!0,[nA]:t,[gA]:e,[VA]:Gn(),[ZA]:!1,[_A]:a,[He]:void 0};return be.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",n,`
`+n[VA]):rA[be[be.length-1]].add(n),n}function zn(e){return e!=null&&typeof e=="object"&&nA in e}le.on("addLayer",(e,A)=>{const t=[],a=(n,s=[])=>{let l=!1;return Object.keys(n).forEach(o=>{let c=n[o];if(c!=null&&typeof c=="object")if(je in c&&(c=c[je]),zn(c)){if(l=!0,c[ZA]){console.warn("Deleted persistent ref present in returned object. Ignoring...",c,`
`+c[VA]);return}rA[e.id].delete(c);const C=[e.id,...s,o];c[He]!=null&&JSON.stringify(C)!==JSON.stringify(c[He])&&console.error(`Persistentrefisbeingsavedto\`${C.join(".")}\` when it's already present at \`${c[He].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,c),c[He]=C;constB=s.reduce((E,I)=>(IinE||(E[I]={}),E[I]),A),h=B[o];B[o]=c[nA],ca(B)?h!=null?B[o]=h:B[o]=c[gA]:h!=null?B[o].value=h:B[o].value=c[gA]}else!(cinstanceofN)&&!he(c)&&!t.includes(c)&&(typeofc.type=="symbol"&&t.push(c),a(c,[...s,o])&&(LA(c)&&!LA(n)?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.",jeinn?n[je]:n,o):l=!0))}),l};a(e[je]),rA[e.id].forEach(n=>{n[ZA]||console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,n,`
${S}`)}}return C[v]}me(t,v=>{v&&Object.keys(C).forEach(S=>delete C[S])});const h=V(()=>P.saves.reduce((v,S)=>(v[S]=B(S),v),{}));function E(v){let S;switch(X.id===v?S=Yt(X):S=JSON.stringify(h.value[v]),F.exportEncoding){default:console.warn(`Unknownsaveencoding:${F.exportEncoding}.Defaultingtolz`);case"lz":S=Je.compressToUTF16(S);break;case"base64":S=btoa(unescape(encodeURIComponent(S)));break;case"plain":break}const K=document.createElement("textarea");K.value=S,document.body.appendChild(K),K.select(),K.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(K)}function I(v){X.id===v&&pe();const S={...h.value[v],id:PA()};pe(S),P.saves.push(S.id)}function b(v){P.saves=P.saves.filter(S=>S!==v),localStorage.removeItem(v),C[v]=void 0}function T(v){h.value[X.id].time=X.time,pe(),C[X.id]=void 0,Ze(h.value[v]),C[v]=void 0}function ee(v){if(l.value=v,qe(()=>{l.value=null}),v[0]!=="{")if(v[0]==="e")v=decodeURIComponent(escape(atob(v)));else if(v[0]==="\u1BE1")v=Je.decompressFromUTF16(v);else{console.warn("Unable to determine preset encoding",v);return}const S=JSON.parse(v);S.id=PA(),pe(S),P.saves.push(S.id),T(S.id)}function L(v,S){const K=h.value[v];K!=null&&(K.name=S,X.id===v?(X.name=S,pe()):(pe(K),C[v]=void 0))}return(v,S)=>(p(),x(Fe,{modelValue:t.value,"onUpdate:modelValue":S[4]||(S[4]=K=>t.value=K),ref_key:"modal",ref:a},{header:G(()=>[co]),body:G(({shown:K})=>[K?(p(),x(g(Ta),{key:0,list:g(P).saves,handle:".handle",itemKey:Ne=>Ne},{item:G(({element:Ne})=>[r(go,{save:g(h)[Ne],onOpen:de=>T(Ne),onExport:de=>E(Ne),onEditName:de=>L(Ne,de),onDuplicate:de=>I(Ne),onDelete:de=>b(Ne)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):R("",!0)]),footer:G(()=>[d("div",mo,[r(QA,{modelValue:s.value,"onUpdate:modelValue":S[0]||(S[0]=K=>s.value=K),title:"Import Save",placeholder:"Paste your save here!",class:ae({importingFailed:n.value})},null,8,["modelValue","class"]),d("div",fo,[vo,d("div",po,[d("button",{class:"button",onClick:S[1]||(S[1]=K=>T(g(sA)().id))},"New Game"),Object.keys(g(c)).length>0?(p(),x(Ml,{key:0,options:g(c),modelValue:l.value,"onUpdate:modelValue":S[2]||(S[2]=K=>ee(K)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):R("",!0)])]),d("div",Co,[ho,d("button",{class:"button modal-default-button",onClick:S[3]||(S[3]=K=>t.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var ia=$(Bo,[["__scopeId","data-v-5b5b1604"]]);const Ge=e=>(Xe("data-v-6fe7fdfe"),e=e(),Ye(),e),Eo=["src","alt"],bo={key:1,class:"title"},Qo=Ge(()=>d("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),yo={class:"discord"},Io={class:"discord-links"},No={key:0},So=["href"],wo=Ge(()=>d("li",null,[d("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),To=Ge(()=>d("span",{class:"material-icons"},"info",-1)),Ro=Ge(()=>d("span",{class:"material-icons"},"help",-1)),Uo=Ge(()=>d("span",{class:"material-icons"},"settings",-1)),Po=Ge(()=>d("span",{class:"material-icons"},"settings",-1)),ko=Ge(()=>d("span",{class:"material-icons"},"info",-1)),Go={href:"https://forums.moddingtree.com/",target:"_blank"},zo=Ge(()=>d("span",{class:"material-icons"},"forum",-1)),Do={class:"discord"},Vo={class:"discord-links"},Mo={key:0},Jo=["href"],Oo=Ge(()=>d("li",null,[d("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),qo=Y({__name:"Nav",setup(e){const A=y(null),t=y(null),a=y(null),n=y(null),{useHeader:s,banner:l,title:o,discordName:c,discordLink:C,versionNumber:B}=F;function h(){window.open(C,"mywindow")}return(E,I)=>(p(),Q(D,null,[g(s)?(p(),Q("div",uA({key:0,class:"nav"},E.$attrs),[g(l)?(p(),Q("img",{key:0,src:g(l),class:"banner",alt:g(o)},null,8,Eo)):(p(),Q("div",bo,O(g(o)),1)),d("div",{onClick:I[0]||(I[0]=b=>{var T;return(T=n.value)==null?void 0:T.open()}),class:"version-container"},[r(W,{display:"Changelog",direction:g(Z).Down,class:"version"},{default:G(()=>[d("span",null,"v"+O(g(B)),1)]),_:1},8,["direction"])]),Qo,d("div",yo,[d("span",{onClick:h,class:"material-ic
Learnmoreatwww.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await Hn();const{globalBus:e}=await kA(()=>Promise.resolve().then(function(){return Pn}),void 0),{startGameLoop:A}=await kA(()=>import("./gameLoop.ce98c402.js"),["assets/gameLoop.ce98c402.js","assets/@fontsource.f66d05e7.css","assets/vue.f6263579.js","assets/earcut.b6f90e68.js","assets/@vue.4ce677c2.js","assets/nanoevents.1080beb7.js","assets/lz-string.f2f3b7cf.js","assets/vue-toastification.b7cd620e.js","assets/vue-toastification.4b5f8ac8.css","assets/vue-textarea-autosize.35804eaf.js","assets/semver.83ff78cf.js","assets/lru-cache.9a21e90b.js","assets/yallist.fd762fe7.js","assets/socket.io-client.79ce0df5.js","assets/engine.io-client.58517560.js","assets/engine.io-parser.3f360695.js","assets/@socket.io.aec831e2.js","assets/socket.io-parser.544e37d1.js","assets/@pixi.1eac1889.js","assets/ismobilejs.5c6954b9.js","assets/eventemitter3.dc5195d7.js","assets/url.e51cb87b.js","assets/querystring.23ae9a54.js","assets/vuedraggable.c3acdf62.js","assets/sortablejs.cbae5b2d.js","assets/vue-next-select.0dc4e443.js","assets/vue-next-select.9e6f4164.css","assets/workbox-window.8d14e8b7.js"]),t=window.vue=Ba(vu);e.emit("setupVue",t),t.mount("#app"),qe(()=>{const a=Gt(),{updateServiceWorker:n}=Cu({onNeedRefresh(){a.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(){n()}})},onOfflineReady(){a.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),A()});export{N as D,kA as _,se as a,F as b,Ul as c,le as g,Zn as l,X as p,P as s};