Planar-Pioneers/assets/index.8ed69dda.js

19 lines
151 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.804e2479.js";import{_ as I,C as a,l as ue,q as _t,t as F,b2 as Fe,ab as j,aD as En,w as Te,b3 as Le,a9 as w,O as ie,az as Jt,as as ut,aF as N,a1 as S,aL as Je,a2 as p,aH as qt,A as me,$ as Z,b7 as O,b9 as an,ar as qe,bv as vt,a8 as V,bt as ui,bc as bt,T as ci,u as on,j as di,bw as hn,aM as jt,a0 as D,aO as Se,J as H,G as ae,I as Pe,aI as ct,aG as dt,z as Ke,bo as gi,bs as fi,aK as yt,bd as vn,am as Gt,H as mi,bf as pi}from"./@vue.6f8187b0.js";import{c as $n}from"./nanoevents.1080beb7.js";import{L as Ze}from"./lz-string.dccec454.js";import{Y as hi}from"./vue-next-select.f5f69b1a.js";import{D as vi}from"./vuedraggable.ce650350.js";import{p as bi}from"./vue-textarea-autosize.35804eaf.js";import{P as yi}from"./vue-panzoom.89be130f.js";import{s as _i,u as Tn}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";const wi=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerpolicy&&(s.referrerPolicy=r.referrerpolicy),r.crossorigin==="use-credentials"?s.credentials="include":r.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}};wi();const Ni="modulepreload",bn={},Ci="./",$t=function(t,n){return!n||n.length===0?t():Promise.all(n.map(i=>{if(i=`${Ci}${i}`,i in bn)return;bn[i]=!0;const r=i.endsWith(".css"),s=r?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${s}`))return;const l=document.createElement("link");if(l.rel=r?"stylesheet":Ni,r||(l.as="script",l.crossOrigin=""),l.href=i,document.head.appendChild(l),r)return new Promise((o,c)=>{l.addEventListener("load",o),l.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},ki="./projInfo-schema.json",Si="Planar Pioneers",xi="A game about controlling and exploiting planes!",Ii="planar-pioneers",Mi="thepaperpilot",Ei="",$i="",Ti="0.0",Fi="Initial Commit",Pi=!0,Di=!1,Vi=2,Ai=!0,Oi=null,Li="",Bi=["main"],qi=3600,Ri=0,Ui=!0,zi="base64";var J={$schema:ki,title:Si,description:xi,id:Ii,author:Mi,discordName:Ei,discordLink:$i,versionNumber:Ti,versionTitle:Fi,allowGoBack:Pi,defaultShowSmall:Di,defaultDecimalsShown:Vi,useHeader:Ai,banner:Oi,logo:Li,initialTabs:Bi,maxTickLength:qi,offlineLimit:Ri,enablePausing:Ui,exportEncoding:zi};class ji{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 i=new Gi(t,n);for(this.first===void 0?(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;){const r=this.last;this.map.delete(r.key),this.last=r.prev,this.last.next=void 0}}}class Gi{constructor(t,n){this.next=void 0,this.prev=void 0,this.key=t,this.value=n}}const tn=17,Wi=9e15,Hi=Math.log10(9e15),Zi=1/9e15,Yi=308,Ji=-324,yn=5,Ki=(1<<10)-1,Xi=function(){const e=[];for(let n=Ji+1;n<=Yi;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),tt=[2,Math.E,3,4,5,6,7,8,9,10],Qi=[[1,1.0891180521811203,1.1789767925673957,1.2701455431742086,1.3632090180450092,1.4587818160364217,1.5575237916251419,1.6601571006859253,1.767485818836978,1.8804192098842727,2],[1,1.1121
`,e),await rt(pt())}}function pt(){const e=zt(),t=qn({id:e});return ke(t),K.saves.push(e),t}function zt(){let e,t=0;do e=`${J.id}-${t++}`;while(localStorage.getItem(e)!=null);return e}const Nr=F(!1);async function rt(e){console.info("Loading save",e),Nr.value=!0;const{layers:t,removeLayer:n,addLayer:i}=await $t(()=>Promise.resolve().then(function(){return zr}),void 0),{fixOldSave:r,getInitialLayers:s}=await $t(()=>Promise.resolve().then(function(){return pu}),void 0);for(const l in t){const o=t[l];o&&n(o)}s(e).forEach(l=>i(l,e)),e=qn(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,J.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==J.versionNumber&&(r(e.modVersion,e),e.modVersion=J.versionNumber),Object.assign(U,e),K.active=U.id,Ce.emit("onLoad")}setInterval(()=>{U.autosave&&ke()},1e3);window.onbeforeunload=()=>{U.autosave&&ke()};window.save=ke;const Cr=window.hardReset=async()=>{await rt(pt())};window.deleteLowerSaves=()=>{const e=Object.values(K.saves).indexOf(U.id)+1;Object.values(K.saves).slice(e).forEach(t=>localStorage.removeItem(t)),K.saves=K.saves.slice(0,e)};const Dt=_t({active:"",saves:[],showTPS:!0,theme:ln.Nordic,unthrottled:!1,alignUnits:!1});Fe(Dt,e=>{const t=Ze.compressToUTF16(JSON.stringify(e));localStorage.setItem(J.id,t)},{deep:!0});var K=window.settings=Dt;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:ln.Nordic,alignUnits:!1};Ce.emit("loadSettings",e),Object.assign(Dt,e),Cr()};function kr(){try{let e=localStorage.getItem(J.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Ze.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(Dt,t)}Ce.emit("loadSettings",Dt)}catch{}}const Sr=_t([]),xr=_t([]),Ir=_t([]);function he(e,t="span"){return typeof e=="function"?j({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),j({template:e})):j({render:()=>({})}):e}function We(e){if(st(e))return typeof e=="function"?e():he(e);const t=e[Pt];return w(t,e[Kt](),null)}function Be(e){if(st(e))return typeof e=="function"?e():typeof e=="string"?w(ie,null,[e]):w(e,null,null);const t=e[Pt];return w(t,e[Kt](),null)}function st(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Ft]===!0}function Rn(e,t){const n=F(null),i=F(void 0);function r(o){n.value||(n.value=setInterval(l,250)),i.value=o}function s(){n.value&&(clearInterval(n.value),n.value=null)}function l(){t&&t.value?t.value():e&&e.value&&e.value(i.value)}return En(s),{start:r,stop:s,handleHolding:l}}function Un(e,t="div"){const n=Te();return Le(()=>{n.value=he(we(e),t)}),n}function Ot(e,t="div"){const n=Te(null);return Le(()=>{const i=we(e);n.value=i==""||i==null?null:he(i,t)}),n}function we(e){return a(a(e))}function q(...e){return e.includes(Object)||e.push(Object),e}var Q=(e,t)=>{const n=e.__vccOpts||e;for(const[i,r]of t)n[i]=r;return n};const Mr=j({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var b;const n=F({}),i=new ResizeObserver(o),r=F(null);Jt(()=>{const m=r.value;m!=null&&i.observe(m)});let s=!0,l=F((b=r.value)==null?void 0:b.getBoundingClientRect());function o(){s&&(s=!1,ut(()=>{var m;l.value=(m=r.value)==null?void 0:m.getBoundingClientRect(),Object.values(n.value).filter(_=>_).forEach(_=>_.rect=_.element.getBoundingClientRect()),t("updateNodes",n.value),s=!0}))}Ce.on("fontsLoaded",o);const c={attributes:!1,childList:!0,subtree:!1};qt(un,(m,_)=>{const y=new MutationObserver(()=>d(m));y.observe(_,c),n.value[m]={element:_,observer:y,rect:_.getBoundingClientRect()},o()}),qt(cn,m=>{var _;(_=n.value[m])==null||_.observer.disconnect(),n.value[m]=void 0,o()}),qt(dn,n),qt(gn,l);function d(m){const _=n.value[m];_!=null&&(_.rect=_.element.getBoundingClientRect(),t("updateNodes",n.value))}return(m,_)=>(N(),S(ie,null,[Je(m.$slots,"default",{},void 0,!0),p("di
`).slice(3,5).map(n=>n.trim()).join(`
`))!=null?t:""}function Cn(e,t){var n;if(u.isNaN(t))throw ge.hasNaN||(U.autosave=!1,ge.hasNaN=!0,ge.NaNPath=e[at],ge.NaNPersistent=e),console.error("Attempted to save NaN value to",(n=e[at])==null?void 0:n.join("."),e),new Error("Attempted to set NaN value. See above for details");e[ht].value=t}function Nt(e,t=!0){const n=ue(e)?e:F(e);ue(e)&&(e=e.value);const i=I({get(){return n.value},set(s){t?Cn(r,s):r[ht].value=s}});i[Vt]=e;const r={get value(){return n.value},set value(s){t?Cn(r,s):r[ht].value=s},__v_isRef:!0,[ht]:n,[Vt]:e,[Zt]:Or(),[Yt]:!1,[Ye]:i,[at]:void 0};return Ne.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",r,`
Created at:
`+r[Zt]):lt[Ne[Ne.length-1]].add(r),r}function Lr(e){return e!=null&&typeof e=="object"&&ht in e}function Br(e){Ne.length===0?console.warn("Deleting a persistent ref outside of a layer. Ignoring...",e):lt[Ne[Ne.length-1]].delete(e),e[Yt]=!0}Ce.on("addLayer",(e,t)=>{const n=[],i=(r,s=[])=>{let l=!1;return Object.keys(r).forEach(o=>{let c=r[o];if(c!=null&&typeof c=="object"){if(c[Ar]===!0)return;if(it in c&&(c=c[it]),Lr(c)){if(l=!0,c[Yt]){console.warn("Deleted persistent ref present in returned object. Ignoring...",c,`
Created at:
`+c[Zt]);return}lt[e.id].delete(c);const d=[e.id,...s,o];c[at]!=null&&JSON.stringify(d)!==JSON.stringify(c[at])&&console.error(`Persistent ref is being saved to \`${d.join(".")}\` when it's already present at \`${c[at].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,c),c[at]=d;const b=s.reduce((_,y)=>(y in _||(_[y]={}),_[y]),t),m=b[o];b[o]=c[ht],di(b)?m!=null?b[o]=m:b[o]=c[Vt]:m!=null?b[o].value=m:b[o].value=c[Vt]}else!(c instanceof u)&&!ue(c)&&!n.includes(c)&&(typeof c.type=="symbol"&&n.push(c),i(c,[...s,o])&&(hn(c)&&!hn(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.",it in r?r[it]:r,o):l=!0))}}),l};i(e[it]),lt[e.id].forEach(r=>{r[Yt]||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,`
Created at:
`+r[Zt])}),lt[e.id].clear()});const un=Symbol("RegisterNode"),cn=Symbol("UnregisterNode"),dn=Symbol("Nodes"),gn=Symbol("Bounds"),_e=on({});window.layers=_e;const lt={},Ne=[];function jn(e,t){return wt(()=>{const n={},i=n.emitter=$n();if(n.on=i.on.bind(i),n.emit=i.emit.bind(i),n.nodes=F({}),n.id=e,Ne.push(e),lt[e]=new Set,n.minimized=Nt(!1,!1),Object.assign(n,t.call(n,n)),Ne[Ne.length-1]==null||Ne[Ne.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen
Stack: ${Ne}
Trying to pop ${n.id}`;Ne.pop(),A(n,"color"),A(n,"display"),A(n,"classes"),A(n,"style"),A(n,"name"),de(n,"name",n.id),A(n,"minWidth"),de(n,"minWidth",600),A(n,"minimizable"),de(n,"minimizable",!0),A(n,"minimizedDisplay");const r=n.style;return n.style=I(()=>{var l,o;let s=a(n.minWidth);return(typeof s=="number"||!Number.isNaN(parseInt(s)))&&(s=s+"px"),[(l=a(r))!=null?l:"",(o=n.minimized)!=null&&o.value?{flexGrow:"0",flexShrink:"0",width:"60px",minWidth:"",flexBasis:"",margin:"0"}:{flexGrow:"",flexShrink:"",width:"",minWidth:s,flexBasis:s,margin:""}]}),n})}function Gn(e,t){if(console.info("Adding layer",e.id),_e[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,_e[e.id]);return}de(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),_e[e.id]=e,Ce.emit("addLayer",e,t.layers[e.id])}function qr(e){return _e[e]}function Wn(e){console.info("Removing layer",e.id),Ce.emit("removeLayer",e),_e[e.id]=void 0}function Rr(e){Wn(e),Gn(e,U)}function Ur(e){const t=F(!1);return{openModal:()=>t.value=!0,modal:ne(()=>w(Qe,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>w("h2",null,[a(e.name)]),body:a(e.display)}))}}Ce.on("update",function(t){Object.values(_e).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(_e).forEach(n=>{n==null||n.emit("update",t)}),Object.values(_e).forEach(n=>{n==null||n.emit("postUpdate",t)})});var zr=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:un,UnregisterNodeInjectionKey:cn,NodesInjectionKey:dn,BoundsInjectionKey:gn,layers:_e,persistentRefs:lt,addingLayers:Ne,createLayer:jn,addLayer:Gn,getLayer:qr,removeLayer:Wn,reloadLayer:Rr,setupLayerModal:Ur},Symbol.toStringTag,{value:"Module"}));const jr=j({components:{Context:zn},props:{index:{type:Number,required:!0},display:{type:q(Object,String,Function),required:!0},minimizedDisplay:q(Object,String,Function),minimized:{type:Object,required:!0},name:{type:q(String),required:!0},color:q(String),minimizable:q(Boolean),nodes:{type:Object,required:!0}},emits:["setMinimized"],setup(e){const{display:t,index:n,minimized:i,minimizedDisplay:r}=me(e),s=Un(t),l=Ot(r),o=I(()=>J.allowGoBack&&n.value>0&&!we(i));function c(){U.tabs.splice(a(e.index),1/0)}function d(b){e.nodes.value=b}return{component:s,minimizedComponent:l,showGoBack:o,updateNodes:d,unref:a,goBack:c}}}),Gr={key:1};function Wr(e,t,n,i,r,s){const l=jt("Context");return N(),S("div",{class:"layer-container",style:Pe({"--layer-color":e.unref(e.color)})},[e.showGoBack?(N(),S("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...o)=>e.goBack&&e.goBack(...o))},"\u274C")):D("",!0),e.unref(e.minimized)?(N(),S("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=o=>e.$emit("setMinimized",!1))},[e.minimizedComponent?(N(),Z(Se(e.minimizedComponent),{key:0})):(N(),S("div",Gr,H(e.unref(e.name)),1))])):(N(),S("div",{key:2,class:ae(["layer-tab",{showGoBack:e.showGoBack}])},[w(l,{onUpdateNodes:e.updateNodes},{default:O(()=>[(N(),Z(Se(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(N(),S("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=o=>e.$emit("setMinimized",!0))}," \u25BC ")):D("",!0)],4)}var Hr=Q(jr,[["render",Wr],["__scopeId","data-v-72dd78b1"]]);const Hn=e=>(ct("data-v-4b4bda40"),e=e(),dt(),e),Zr=Hn(()=>p("h2",null,"Changelog",-1)),Yr=Hn(()=>p("details",{open:""},[p("summary",null,[V("v0.0 Initial Commit - "),p("time",null,"2021-09-04")]),V(" This is the first release :D "),p("ul",null,[p("li",{class:"feature"},"Did everything"),p("li",{class:"fix"},"Had some fun"),p("li",{class:"breaking"},"Removed everything"),p("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),Jr=j({__name:"Changelog",setup(e,{expose:t}){const n=F(!1);return t({open(){n.value=!0}}),(i,r)=>(N(),Z(Qe,{modelValue:n.value,"onUpdate:modelValue":r[0]||(r[0]=s=>n.value=s)},{header:O(()=>[Zr]),body:O(()=>[Yr]),_:1},8,["modelValue"]))}});var Kr=Q(Jr,[["__scopeId","data-v-4b4bda40"]]),Xr=j({props:{element:Object,display:{type:q(Object,String,Function),required:!0},style:q(Object,String,Array),classes:q(Object),directio
${B}
${E}`)}}return d[k]}Fe(n,k=>{k&&Object.keys(d).forEach(E=>delete d[E])});const m=I(()=>K.saves.reduce((k,E)=>(k[E]=b(E),k),{}));function _(k){let E;switch(U.id===k?E=Bn(U):E=JSON.stringify(m.value[k]),J.exportEncoding){default:console.warn(`Unknown save encoding: ${J.exportEncoding}. Defaulting to lz`);case"lz":E=Ze.compressToUTF16(E);break;case"base64":E=btoa(unescape(encodeURIComponent(E)));break;case"plain":break}const B=document.createElement("textarea");B.value=E,document.body.appendChild(B),B.select(),B.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(B)}function y(k){U.id===k&&ke();const E={...m.value[k],id:zt()};ke(E),K.saves.push(E.id)}function h(k){K.saves=K.saves.filter(E=>E!==k),localStorage.removeItem(k),d[k]=void 0}function C(k){m.value[U.id].time=U.time,ke(),d[U.id]=void 0,rt(m.value[k]),d[k]=void 0}function $(k){if(l.value=k,ut(()=>{l.value=null}),k[0]!=="{")if(k[0]==="e")k=decodeURIComponent(escape(atob(k)));else if(k[0]==="\u1BE1")k=Ze.decompressFromUTF16(k);else{console.warn("Unable to determine preset encoding",k);return}const E=JSON.parse(k);E.id=zt(),ke(E),K.saves.push(E.id),C(E.id)}function P(k,E){const B=m.value[k];B!=null&&(B.name=E,U.id===k?(U.name=E,ke()):(ke(B),d[k]=void 0))}return(k,E)=>(N(),Z(Qe,{modelValue:n.value,"onUpdate:modelValue":E[4]||(E[4]=B=>n.value=B),ref_key:"modal",ref:i},{header:O(()=>[ro]),body:O(({shown:B})=>[B?(N(),Z(a(vi),{key:0,list:a(K).saves,handle:".handle",itemKey:pe=>pe},{item:O(({element:pe})=>[w(io,{save:a(m)[pe],onOpen:se=>C(pe),onExport:se=>_(pe),onEditName:se=>P(pe,se),onDuplicate:se=>y(pe),onDelete:se=>h(pe)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):D("",!0)]),footer:O(()=>[p("div",ao,[w(Jn,{modelValue:s.value,"onUpdate:modelValue":E[0]||(E[0]=B=>s.value=B),title:"Import Save",placeholder:"Paste your save here!",class:ae({importingFailed:r.value})},null,8,["modelValue","class"]),p("div",oo,[so,p("div",lo,[p("button",{class:"button",onClick:E[1]||(E[1]=B=>C(a(pt)().id))},"New Game"),Object.keys(a(c)).length>0?(N(),Z(Zn,{key:0,options:a(c),modelValue:l.value,"onUpdate:modelValue":E[2]||(E[2]=B=>$(B)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):D("",!0)])]),p("div",uo,[co,p("button",{class:"button modal-default-button",onClick:E[3]||(E[3]=B=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Kn=Q(go,[["__scopeId","data-v-2a4275be"]]);const xe=e=>(ct("data-v-318a1c31"),e=e(),dt(),e),fo=["src","alt"],mo={key:1,class:"title"},po=xe(()=>p("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),ho={class:"discord"},vo={class:"discord-links"},bo={key:0},yo=["href"],_o=xe(()=>p("li",null,[p("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"The Paper Pilot Community")],-1)),wo=xe(()=>p("li",null,[p("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),No={href:"https://forums.moddingtree.com/",target:"_blank"},Co=xe(()=>p("span",{class:"material-icons"},"forum",-1)),ko=xe(()=>p("span",{class:"material-icons"},"info",-1)),So=xe(()=>p("span",{class:"material-icons"},"library_books",-1)),xo=xe(()=>p("span",{class:"material-icons"},"settings",-1)),Io=xe(()=>p("span",{class:"material-icons"},"library_books",-1)),Mo=xe(()=>p("span",{class:"material-icons"},"settings",-1)),Eo=xe(()=>p("span",{class:"material-icons"},"info",-1)),$o={href:"https://forums.moddingtree.com/",target:"_blank"},To=xe(()=>p("span",{class:"material-icons"},"forum",-1)),Fo={class:"discord"},Po={class:"discord-links"},Do={key:0},Vo=["href"],Ao=xe(()=>p("li",null,[p("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"The Paper Pilot Community")],-1)),Oo=xe(()=>p("li",null,[p("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Lo=j({__name:"Nav",setup(e){const t=F(null),n=F(null),i=F(null),r=F(null),{useHeader:s,banner:l,title:o,discordName:c,discordLink:d,versionNumber:b}=J;function m(){window.open(d,"mywindow")}return(_,y)=>(N(),S(ie,null,[a(s)?(N(),S("div",qe({key:0,class:"n
${(-a(r)-30)*Math.sin(((e.actions.length-1)/2-y)*a(o))},
${(a(r)+30)*Math.cos(((e.actions.length-1)/2-y)*a(o))}
)`,onMousedown:$=>c($,_),onTouchstart:$=>c($,_),onMouseup:$=>d($,_),onTouchend:vt($=>d($,_),["stop"])},[p("circle",{fill:a(Y)(_.fillColor,e.node),r:"20","stroke-width":((C=e.selectedAction)==null?void 0:C.id)===_.id?4:0,stroke:a(s)},null,8,Zo),p("text",{fill:a(l),class:"material-icons"},H(a(Y)(_.icon,e.node)),9,Yo)],42,Ho)}),128))])):D("",!0)]),_:1}))}});var Ko=Q(Jo,[["__scopeId","data-v-9efb2a56"]]);const Xo=["transform"],Qo={key:0},es=["r","fill","stroke"],ts=["r","fill","stroke"],ns=["r","fill"],is=["r","stroke-dasharray","stroke-dashoffset","stroke"],rs={key:1,transform:"rotate(45, 0, 0)"},as=["width","height","transform","fill","stroke"],os=["width","height","transform","fill","stroke"],ss=["width","height","transform","fill"],ls=["width","height","transform","stroke-dasharray","stroke-dashoffset","stroke"],us=["fill","y"],cs=["fill"],ds={key:0},gs=["fill","y"],fs=["fill","y"],ms=j({__name:"BoardNode",props:{node:null,nodeType:null,dragging:null,dragged:null,hasDragged:{type:Boolean},receivingNode:{type:Boolean},selectedNode:null,selectedAction:null},emits:["mouseDown","endDragging","clickAction"],setup(e,{emit:t}){const n=e,i=Math.sqrt(2),r=me(n),s=I(()=>a(r.selectedNode)===a(r.node)),l=I(()=>Y(r.nodeType.value.draggable,a(r.node)));Fe(l,G=>{const ce=a(r.node);a(r.dragging)===ce&&!G&&t("endDragging",ce)});const o=I(()=>{var ce;const G=a(r.node);return(ce=Y(r.nodeType.value.actions,G))==null?void 0:ce.filter($e=>Xe(Y($e.visibility,G)))}),c=I(()=>{var ce;const G=a(r.node);if(Y(r.nodeType.value.draggable,G)&&((ce=a(r.dragging))==null?void 0:ce.id)===G.id&&a(r.dragged)!=null){const{x:$e,y:Ie}=a(r.dragged);return{x:G.position.x+Math.round($e/25)*25,y:G.position.y+Math.round(Ie/25)*25}}return G.position}),d=I(()=>Y(r.nodeType.value.shape,a(r.node))),b=I(()=>Y(r.nodeType.value.title,a(r.node))),m=I(()=>Y(r.nodeType.value.subtitle,a(r.node))),_=I(()=>{var G;return(G=s.value?a(r.selectedAction)&&Y(a(r.selectedAction).tooltip,a(r.node)):null)!=null?G:Y(r.nodeType.value.label,a(r.node))}),y=I(()=>{var G,ce;return Y((ce=(G=a(r.selectedAction))==null?void 0:G.confirmationLabel)!=null?ce:{text:"Tap again to confirm"},a(r.node))}),h=I(()=>Y(r.nodeType.value.size,a(r.node))),C=I(()=>{var G;return(G=Y(r.nodeType.value.progress,a(r.node)))!=null?G:0}),$=I(()=>Ve[K.theme].variables["--background"]),P=I(()=>{var G;return(G=Y(r.nodeType.value.outlineColor,a(r.node)))!=null?G:Ve[K.theme].variables["--outline"]}),k=I(()=>{var G;return(G=Y(r.nodeType.value.fillColor,a(r.node)))!=null?G:Ve[K.theme].variables["--raised-background"]}),E=I(()=>Y(r.nodeType.value.progressColor,a(r.node))),B=I(()=>{var G;return(G=Y(r.nodeType.value.titleColor,a(r.node)))!=null?G:Ve[K.theme].variables["--foreground"]}),pe=I(()=>Y(r.nodeType.value.progressDisplay,a(r.node))),se=I(()=>r.dragging.value!=null&&a(r.hasDragged)&&Y(r.nodeType.value.canAccept,a(r.node),r.dragging.value)),X=I(()=>Y(r.nodeType.value.style,a(r.node))),te=I(()=>Y(r.nodeType.value.classes,a(r.node)));function kt(G){t("mouseDown",G,r.node.value,l.value)}function Bt(G){var ce,$e,Ie;(ce=r.hasDragged)!=null&&ce.value||(t("endDragging",r.node.value),(Ie=($e=r.nodeType.value).onClick)==null||Ie.call($e,r.node.value),G.stopPropagation())}return(G,ce)=>{var $e,Ie,ft;return N(),S("g",{class:ae(["boardnode",{[e.node.type]:!0,isSelected:a(s),isDraggable:a(l),...a(te)}]),style:Pe([{opacity:(($e=e.dragging)==null?void 0:$e.id)===e.node.id&&e.hasDragged?.5:1},(Ie=a(X))!=null?Ie:[]]),transform:`translate(${a(c).x},${a(c).y})${a(s)?" scale(1.2)":""}`},[w(Ko,{actions:(ft=a(o))!=null?ft:[],"is-selected":a(s),node:e.node,"node-type":e.nodeType,"selected-action":e.selectedAction,onClickAction:ce[0]||(ce[0]=Ae=>t("clickAction",Ae))},null,8,["actions","is-selected","node","node-type","selected-action"]),p("g",{class:"node-container",onMousedown:kt,onTouchstartPassive:kt,onMouseup:Bt,onTouchendPassive:Bt},[a(d)===a(He).Circle?(N(),S("g",Qo,[a(se)?(N(),S("circle",{key:0,class:"receiver",r:a(h)+8,fill:a($),stroke:e.receivingNode?"#0F0":"#0F03","stroke-width":2},null,8,es)):D("",!0),p("circle",{c
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 wr();const{globalBus:e}=await $t(()=>Promise.resolve().then(function(){return yr}),void 0),{startGameLoop:t}=await $t(()=>import("./gameLoop.9fb02b0a.js"),["assets/gameLoop.9fb02b0a.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=pi(Uu);e.emit("setupVue",n),n.mount("#app"),ut(()=>{const i=Tn(),{updateServiceWorker:r}=ju({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(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{u as D,$t as _,ge as a,J as b,pu as c,Ce as g,Nr as l,U as p,K as s};