/* empty css */import"./vue.804e2479.js";import{_asE,Casa,lasfe,qasct,tasF,b2asxe,abasW,aDasdn,wasIe,b3asLe,a9asy,OasQ,azasDt,asasQe,aFas_,a1asI,aLasBe,a2asm,aHaskt,Aasde,$asG,b7asA,b9asWt,arasTe,bvasst,a8asD,btasUn,bcaslt,Tasjn,uasGt,jasWn,bwastn,aMasEt,a0asP,aOaswe,JasH,Gasoe,IasMe,aIaset,aGastt,zasRe,boasGn,bsasHn,aKasut,bdasnn,amas$t,HasZn,bfasYn}from"./@vue.6f8187b0.js";import{casgn}from"./nanoevents.1080beb7.js";import{LasOe}from"./lz-string.dccec454.js";import{YasJn}from"./vue-next-select.f5f69b1a.js";import{DasKn}from"./vuedraggable.ce650350.js";import{pasXn}from"./vue-textarea-autosize.35804eaf.js";import{PasQn}from"./vue-panzoom.89be130f.js";import{sasei,uasfn}from"./vue-toastification.5231d1bd.js";import"./amator.1e5a40c8.js";import"./bezier-easing.a990b400.js";import"./sortablejs.a0f68e5e.js";import"./panzoom.30c56ba6.js";import"./wheel.f2ae740f.js";import"./ngraph.events.083734c6.js";constti=function(){constt=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(constrofdocument.querySelectorAll('link[rel="modulepreload"]'))i(r);newMutationObserver(r=>{for(constoofr)if(o.type==="childList")for(constsofo.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});functionn(r){consto={};returnr.integrity&&(o.integrity=r.integrity),r.referrerpolicy&&(o.referrerPolicy=r.referrerpolicy),r.crossorigin==="use-credentials"?o.credentials="include":r.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}functioni(r){if(r.ep)return;r.ep=!0;consto=n(r);fetch(r.href,o)}};ti();constni="modulepreload",rn={},ii="./",vt=function(t,n){return!n||n.length===0?t():Promise.all(n.map(i=>{if(i=`${ii}${i}`,iinrn)return;rn[i]=!0;constr=i.endsWith(".css"),o=r?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${o}`))return;consts=document.createElement("link");if(s.rel=r?"stylesheet":ni,r||(s.as="script",s.crossOrigin=""),s.href=i,document.head.appendChild(s),r)returnnewPromise((l,c)=>{s.addEventListener("load",l),s.addEventListener("error",()=>c(newError(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},ri="./projInfo-schema.json",ai="Planar Pioneers",oi="A game about controlling and exploiting planes!",si="planar-pioneers",li="thepaperpilot",ui="",ci="",di="0.0",gi="Initial Commit",fi=!0,mi=!1,hi=2,vi=!0,pi=null,bi="",yi=["main"],_i=3600,wi=0,Ni=!0,Ci="base64";varY={$schema:ri,title:ai,description:oi,id:si,author:li,discordName:ui,discordLink:ci,versionNumber:di,versionTitle:gi,allowGoBack:fi,defaultShowSmall:mi,defaultDecimalsShown:hi,useHeader:vi,banner:pi,logo:bi,initialTabs:yi,maxTickLength:_i,offlineLimit:wi,enablePausing:Ni,exportEncoding:Ci};classSi{constructor(t){this.map=newMap,this.first=void0,this.last=void0,this.maxSize=t}getsize(){returnthis.map.size}get(t){constn=this.map.get(t);if(n!==void0)returnn!==this.first&&(n===this.last?(this.last=n.prev,this.last.next=void0):(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))thrownewError("Cannot update existing keys in the cache");consti=newki(t,n);for(this.first===void0?(this.first=i,this.last=i):(i.next=this.first,this.first.prev=i,this.first=i),this.map.set(t,i);this.map.size>this.maxSize;){constr=this.last;this.map.delete(r.key),this.last=r.prev,this.last.next=void0}}}classki{constructor(t,n){this.next=void0,this.prev=void0,this.key=t,this.value=n}}constzt=17,Ii=9e15,xi=Math.log10(9e15),Mi=1/9e15,Ei=308,$i=-324,an=5,Ti=(1<<10)-1,Fi=function(){conste=[];for(letn=$i+1;n<=Ei;n++)e.push(Number("1e"+n));constt=323;returnfunction(n){returne[n+t]}}(),We=[2,Math.E,3,4,5,6,7,8,9,10],Pi=[[1,1.0891180521811203,1.1789767925673957,1.2701455431742086,1.3632090180450092,1.4587818160364217,1.5575237916251419,1.6601571006859253,1.767485818836978,1.8804192098842727,2],[1,1.11211
`))!=null?t:""}function un(e,t){var n;if(u.isNaN(t))throw ue.hasNaN||(z.autosave=!1,ue.hasNaN=!0,ue.NaNPath=e[Ye],ue.NaNPersistent=e),console.error("Attempted to save NaN value to",(n=e[Ye])==null?void 0:n.join("."),e),new Error("Attempted to set NaN value. See above for details");e[ot].value=t}function dt(e,t=!0){const n=fe(e)?e:F(e);fe(e)&&(e=e.value);const i=E({get(){return n.value},set(o){t?un(r,o):r[ot].value=o}});i[_t]=e;const r={get value(){return n.value},set value(o){t?un(r,o):r[ot].value=o},__v_isRef:!0,[ot]:n,[_t]:e,[Pt]:pr(),[Vt]:!1,[Ae]:i,[Ye]:void 0};return be.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",r,`
`+r[Pt]):Xe[be[be.length-1]].add(r),r}function br(e){return e!=null&&typeof e=="object"&&ot in e}function yr(e){be.length===0?console.warn("Deleting a persistent ref outside of a layer. Ignoring...",e):Xe[be[be.length-1]].delete(e),e[Vt]=!0}ye.on("addLayer",(e,t)=>{const n=[],i=(r,o=[])=>{let s=!1;return Object.keys(r).forEach(l=>{let c=r[l];if(c!=null&&typeof c=="object"){if(c[vr]===!0)return;if(He in c&&(c=c[He]),br(c)){if(s=!0,c[Vt]){console.warn("Deleted persistent ref present in returned object. Ignoring...",c,`
`+c[Pt]);return}Xe[e.id].delete(c);const f=[e.id,...o,l];c[Ye]!=null&&JSON.stringify(f)!==JSON.stringify(c[Ye])&&console.error(`Persistentrefisbeingsavedto\`${f.join(".")}\` when it's already present at \`${c[Ye].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,c),c[Ye]=f;constb=o.reduce((C,N)=>(NinC||(C[N]={}),C[N]),t),h=b[l];b[l]=c[ot],Wn(b)?h!=null?b[l]=h:b[l]=c[_t]:h!=null?b[l].value=h:b[l].value=c[_t]}else!(cinstanceofu)&&!fe(c)&&!n.includes(c)&&(typeofc.type=="symbol"&&n.push(c),i(c,[...o,l])&&(tn(c)&&!tn(r)?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.",Heinr?r[He]:r,l):s=!0))}}),s};i(e[He]),Xe[e.id].forEach(r=>{r[Vt]||console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,r,`
Tryingtopop${n.id}`;be.pop(),O(n,"color"),O(n,"display"),O(n,"classes"),O(n,"style"),O(n,"name"),ge(n,"name",n.id),O(n,"minWidth"),ge(n,"minWidth",600),O(n,"minimizable"),ge(n,"minimizable",!0),O(n,"minimizedDisplay");const r=n.style;return n.style=E(()=>{var s,l;let o=a(n.minWidth);return(typeof o=="number"||!Number.isNaN(parseInt(o)))&&(o=o+"px"),[(s=a(r))!=null?s:"",(l=n.minimized)!=null&&l.value?{flexGrow:"0",flexShrink:"0",width:"60px",minWidth:"",flexBasis:"",margin:"0"}:{flexGrow:"",flexShrink:"",width:"",minWidth:o,flexBasis:o,margin:""}]}),n})}function xn(e,t){if(console.info("Adding layer",e.id),ve[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,ve[e.id]);return}ge(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),ve[e.id]=e,ye.emit("addLayer",e,t.layers[e.id])}function _r(e){return ve[e]}function Mn(e){console.info("Removing layer",e.id),ye.emit("removeLayer",e),ve[e.id]=void 0}function wr(e){Mn(e),xn(e,z)}function Nr(e){const t=F(!1);return{openModal:()=>t.value=!0,modal:ne(()=>y(Ue,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>y("h2",null,[a(e.name)]),body:a(e.display)}))}}ye.on("update",function(t){Object.values(ve).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(ve).forEach(n=>{n==null||n.emit("update",t)}),Object.values(ve).forEach(n=>{n==null||n.emit("postUpdate",t)})});var Cr=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Yt,UnregisterNodeInjectionKey:Jt,NodesInjectionKey:Kt,BoundsInjectionKey:Xt,layers:ve,persistentRefs:Xe,addingLayers:be,createLayer:In,addLayer:xn,getLayer:_r,removeLayer:Mn,reloadLayer:wr,setupLayerModal:Nr},Symbol.toStringTag,{value:"Module"}));const Sr=W({components:{Context:kn},props:{index:{type:Number,required:!0},display:{type:R(Object,String,Function),required:!0},minimizedDisplay:R(Object,String,Function),minimized:{type:Object,required:!0},name:{type:R(String),required:!0},color:R(String),minimizable:R(Boolean),nodes:{type:Object,required:!0}},emits:["setMinimized"],setup(e){const{display:t,index:n,minimized:i,minimizedDisplay:r}=de(e),o=Sn(t),s=Nt(r),l=E(()=>Y.allowGoBack&&n.value>0&&!pe(i));function c(){z.tabs.splice(a(e.index),1/0)}function f(b){e.nodes.value=b}return{component:o,minimizedComponent:s,showGoBack:l,updateNodes:f,unref:a,goBack:c}}}),kr={key:1};function Ir(e,t,n,i,r,o){const s=Et("Context");return _(),I("div",{class:"layer-container",style:Me({"--layer-color":e.unref(e.color)})},[e.showGoBack?(_(),I("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...l)=>e.goBack&&e.goBack(...l))},"\u274C")):P("",!0),e.unref(e.minimized)?(_(),I("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=l=>e.$emit("setMinimized",!1))},[e.minimizedComponent?(_(),G(we(e.minimizedComponent),{key:0})):(_(),I("div",kr,H(e.unref(e.name)),1))])):(_(),I("div",{key:2,class:oe(["layer-tab",{showGoBack:e.showGoBack}])},[y(s,{onUpdateNodes:e.updateNodes},{default:A(()=>[(_(),G(we(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(_(),I("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=l=>e.$emit("setMinimized",!0))}," \u25BC ")):P("",!0)],4)}var xr=X(Sr,[["render",Ir],["__scopeId","data-v-72dd78b1"]]);const En=e=>(et("data-v-4b4bda40"),e=e(),tt(),e),Mr=En(()=>m("h2",null,"Changelog",-1)),Er=En(()=>m("details",{open:""},[m("summary",null,[D("v0.0 Initial Commit - "),m("time",null,"2021-09-04")]),D(" This is the first release :D "),m("ul",null,[m("li",{class:"feature"},"Did everything"),m("li",{class:"fix"},"Had some fun"),m("li",{class:"breaking"},"Removed everything"),m("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),$r=W({__name:"Changelog",setup(e,{expose:t}){const n=F(!1);return t({open(){n.value=!0}}),(i,r)=>(_(),G(Ue,{modelValue:n.value,"onUpdate:modelValue":r[0]||(r[0]=o=>n.value=o)},{header:A(()=>[Mr]),body:A(()=>[Er]),_:1},8,["modelValue"]))}});var Tr=X($r,[["__scopeId","data-v-4b4bda40"]]),Fr=W({props:{element:Object,display:{type:R(Object,String,Function),required:!0},style:R(Object,String,Array),classes:R(Object),directio
Learnmoreatwww.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await tr();const{globalBus:e}=await vt(()=>Promise.resolve().then(function(){return Qi}),void 0),{startGameLoop:t}=await vt(()=>import("./gameLoop.1677b2ed.js"),["assets/gameLoop.1677b2ed.js","assets/@fontsource.f66d05e7.css","assets/vue.804e2479.js","assets/amator.1e5a40c8.js","assets/bezier-easing.a990b400.js","assets/@vue.6f8187b0.js","assets/nanoevents.1080beb7.js","assets/lz-string.dccec454.js","assets/vue-next-select.f5f69b1a.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.ce650350.js","assets/sortablejs.a0f68e5e.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-panzoom.89be130f.js","assets/panzoom.30c56ba6.js","assets/wheel.f2ae740f.js","assets/ngraph.events.083734c6.js","assets/vue-toastification.5231d1bd.js","assets/vue-toastification.4b5f8ac8.css"]),n=window.vue=Yn(Iu);e.emit("setupVue",n),n.mount("#app"),Qe(()=>{const i=fn(),{updateServiceWorker:r}=Mu({onNeedRefresh(){i.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(){r()}})},onOfflineReady(){i.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(o){o&&setInterval(()=>o.update(),60*60*1e3)}})}),t()});export{u as D,vt as _,ue as a,Y as b,Ql as c,ye as g,nr as l,z as p,K as s};