TMT-Demo/assets/index.ff029041.js

18 lines
180 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.35fd3bc4.js";import{a2 as I,H as o,n as ge,u as Bt,x as q,b3 as Le,ae as x,o as h,a4 as S,a5 as g,r as Ue,K as ne,aG as ui,A as we,b4 as Fe,ac as d,U,as as ci,aC as Lt,av as Je,aJ as Yt,F as le,c as O,w as A,b9 as un,bs as rr,au as ze,bu as Ft,T as cn,Y as sr,ab as C,y as dn,l as ar,bv as Ge,aN as be,a3 as V,aP as re,O as X,M as te,aK as We,aI as Ye,D as it,bn as or,br as di,aM as Vt,ap as nn,bw as lr,L as ur,ay as cr,C as Zn,be as dr}from"./@vue.41db58fd.js";import{c as fi}from"./nanoevents.1080beb7.js";import{L as tt}from"./lz-string.f2f3b7cf.js";import{_ as G,C as fr}from"./@ivanv.f5f393ce.js";import{Y as pr}from"./vue-next-select.b7da6f19.js";import{D as mr}from"./vuedraggable.2a65e8c7.js";import{p as gr}from"./vue-textarea-autosize.35804eaf.js";import{s as hr,u as pi}from"./vue-toastification.1c45a88e.js";import{A as mi,T as vr,R as br,B as yr,u as _r,E as Jn}from"./@pixi.13a16b18.js";import{v as wr,n as Nr}from"./workbox-window.8d14e8b7.js";import"./earcut.b6f90e68.js";import"./sortablejs.4c7e7419.js";import"./ismobilejs.5c6954b9.js";import"./eventemitter3.dc5195d7.js";import"./url.6dd57c6c.js";import"./querystring.776b9ab3.js";const Cr=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 a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).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)}};Cr();const kr="modulepreload",Xn={},Sr="./",rn=function(t,n){return!n||n.length===0?t():Promise.all(n.map(i=>{if(i=`${Sr}${i}`,i in Xn)return;Xn[i]=!0;const r=i.endsWith(".css"),s=r?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${s}`))return;const a=document.createElement("link");if(a.rel=r?"stylesheet":kr,r||(a.as="script",a.crossOrigin=""),a.href=i,document.head.appendChild(a),r)return new Promise((u,c)=>{a.addEventListener("load",u),a.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},$r="./projInfo-schema.json",Mr="Profectus Demo",Ir="A demo project made in Profectus",Er="profectus-demo",Tr="",Pr="",Fr="",Vr="0.0",qr="Initial Commit",Or=!0,xr=!1,Dr=2,Rr=!0,Ar=null,Br="Logo.png",Lr=["main","c"],jr=3600,Ur=1,zr=!0,Gr="base64";var ie={$schema:$r,title:Mr,description:Ir,id:Er,author:Tr,discordName:Pr,discordLink:Fr,versionNumber:Vr,versionTitle:qr,allowGoBack:Or,defaultShowSmall:xr,defaultDecimalsShown:Dr,useHeader:Rr,banner:Ar,logo:Br,initialTabs:Lr,maxTickLength:jr,offlineLimit:Ur,enablePausing:zr,exportEncoding:Gr};class Hr{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 Wr(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 Wr{constructor(t,n){this.next=void 0,this.prev=void 0,this.key=t,this.value=n}}const bn=17,Yr=9e15,Kr=Math.log10(9e15),Zr=1/9e15,Jr=308,Xr=-324,Qn=5,Qr=(1<<10)-1,es=function(){const e=[];for(let n=Xr+1;n<=Jr;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),ut=[2,Math.E,3,4,5,6,7,8,9,10],ts=[[1,1.0891180521811203,1.1789767925673957,1.27
`,e),await pt(_t())}}function _t(){const e=Xt(),t=ki({id:e});return Pe(t),Q.saves.push(e),t}function Xt(){let e,t=0;do e=`${ie.id}-${t++}`;while(localStorage.getItem(e)!=null);return e}const $n=q(!1);async function pt(e){console.info("Loading save",e),$n.value=!0;const{layers:t,removeLayer:n,addLayer:i}=await rn(()=>Promise.resolve().then(function(){return Gs}),void 0),{fixOldSave:r,getInitialLayers:s}=await rn(()=>Promise.resolve().then(function(){return Dd}),void 0);for(const a in t){const u=t[a];u&&n(u)}s(e).forEach(a=>i(a,e)),e=ki(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,ie.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==ie.versionNumber&&(r(e.modVersion,e),e.modVersion=ie.versionNumber),Object.assign(D,e),Q.active=D.id,pe.emit("onLoad")}setInterval(()=>{D.autosave&&Pe()},1e3);window.onbeforeunload=()=>{D.autosave&&Pe()};window.save=Pe;const Cs=window.hardReset=async()=>{await pt(_t())};window.deleteLowerSaves=()=>{const e=Object.values(Q.saves).indexOf(D.id)+1;Object.values(Q.saves).slice(e).forEach(t=>localStorage.removeItem(t)),Q.saves=Q.saves.slice(0,e)};const xt=Bt({active:"",saves:[],showTPS:!0,theme:Sn.Nordic,unthrottled:!1,alignUnits:!1});Le(xt,e=>{const t=tt.compressToUTF16(JSON.stringify(e));localStorage.setItem(ie.id,t)},{deep:!0});var Q=window.settings=xt;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Sn.Nordic,alignUnits:!1};pe.emit("loadSettings",e),Object.assign(xt,e),Cs()};function ks(){try{let e=localStorage.getItem(ie.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=tt.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(xt,t)}pe.emit("loadSettings",xt)}catch{}}const Si=Bt([]);function $i(e){Si.push(e)}const Mi=Bt([]);function Ss(e){Mi.push(e)}const $s=Bt([]),Ms={class:"table"},Qt=x({__name:"Column",setup(e){const t=I(()=>Xe[Q.theme].mergeAdjacent);return(n,i)=>(h(),S("div",Ms,[g("div",{class:ne(["col",{mergeAdjacent:o(t)}])},[Ue(n.$slots,"default")],2)]))}}),Is={class:"table"},en=x({__name:"Row",setup(e){const t=I(()=>Xe[Q.theme].mergeAdjacent);return(n,i)=>(h(),S("div",Is,[g("div",{class:ne(["row",{mergeAdjacent:o(t)}])},[Ue(n.$slots,"default")],2)]))}});function Ii(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!ci(e)}function j(e,t="span"){return typeof e=="function"?x({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),x({template:e})):x({render:()=>({})}):e}function me(e){if(De(e))return typeof e=="function"?e():j(e);const t=e[ve];return d(t,e[_e](),null)}function Oe(...e){let t;return d(en,null,Ii(t=e.map(me))?t:{default:()=>[t]})}function Es(...e){let t;return d(Qt,null,Ii(t=e.map(me))?t:{default:()=>[t]})}function Be(e){if(De(e))return typeof e=="function"?e():typeof e=="string"?d(U,null,[e]):d(e,null,null);const t=e[ve];return d(t,e[_e](),null)}function ii(e,t){return e.reduce((n,i)=>d(U,null,[n,t,i]))}function De(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Ot]===!0}function Mn(e,t){const n=q(null),i=q(void 0);function r(u){n.value||(n.value=setInterval(a,250)),i.value=u}function s(){n.value&&(clearInterval(n.value),n.value=null)}function a(){t&&t.value?t.value():e&&e.value&&e.value(i.value)}return ui(s),{start:r,stop:s,handleHolding:a}}function Ct(e,t="div"){const n=we();return Fe(()=>{n.value=j(oe(e),t)}),n}function st(e,t="div"){const n=we(null);return Fe(()=>{const i=oe(e);n.value=i==""||i==null?null:j(i,t)}),n}function oe(e){return o(o(e))}function k(...e){return e.includes(Object)||e.push(Object),e}const Ts=x({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var p;const n=q({}),i=new ResizeObserver(u),r=q(null);Lt(()=>{const b=r.value;b!=null&&i.observe(b)});let s=!0,a=q((p=r.value)==null?void 0:p.getBoundingClientR
`).slice(3,5).map(n=>n.trim()).join(`
`))!=null?t:""}function ri(e,t){var n;if(l.isNaN(t))throw ye.hasNaN||(D.autosave=!1,ye.hasNaN=!0,ye.NaNPath=e[mt],ye.NaNPersistent=e),console.error("Attempted to save NaN value to",(n=e[mt])==null?void 0:n.join("."),e),new Error("Attempted to set NaN value. See above for details");e[wt].value=t}function he(e,t=!0){const n=ge(e)?e:q(e);ge(e)&&(e=e.value);const i=I({get(){return n.value},set(s){t?ri(r,s):r[wt].value=s}});i[rt]=e;const r={get value(){return n.value},set value(s){t?ri(r,s):r[wt].value=s},__v_isRef:!0,[wt]:n,[rt]:e,[an]:Bs(),[on]:!1,[Dt]:i,[mt]:void 0};return Ie.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",r,`
Created at:
`+r[an]):gt[Ie[Ie.length-1]].add(r),r}function Ls(e){return e!=null&&typeof e=="object"&&wt in e}function It(e){return e[Dt]}function js(e){Ie.length===0?console.warn("Deleting a persistent ref outside of a layer. Ignoring...",e):gt[Ie[Ie.length-1]].delete(e),e[on]=!0}pe.on("addLayer",(e,t)=>{const n=[],i=(r,s=[])=>{let a=!1;return Object.keys(r).forEach(u=>{let c=r[u];if(c!=null&&typeof c=="object")if(dt in c&&(c=c[dt]),Ls(c)){if(a=!0,c[on]){console.warn("Deleted persistent ref present in returned object. Ignoring...",c,`
Created at:
`+c[an]);return}gt[e.id].delete(c);const f=[e.id,...s,u];c[mt]!=null&&JSON.stringify(f)!==JSON.stringify(c[mt])&&console.error(`Persistent ref is being saved to \`${f.join(".")}\` when it's already present at \`${c[mt].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,c),c[mt]=f;const p=s.reduce((w,N)=>(N in w||(w[N]={}),w[N]),t),b=p[u];p[u]=c[wt],ar(p)?b!=null?p[u]=b:p[u]=c[rt]:b!=null?p[u].value=b:p[u].value=c[rt]}else!(c instanceof l)&&!ge(c)&&!n.includes(c)&&(typeof c.type=="symbol"&&n.push(c),i(c,[...s,u])&&(Ge(c)&&!Ge(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.",dt in r?r[dt]:r,u):a=!0))}),a};i(e[dt]),gt[e.id].forEach(r=>{r[on]||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[an])}),gt[e.id].clear()});const In=Symbol("RegisterNode"),En=Symbol("UnregisterNode"),Tn=Symbol("Nodes"),Pn=Symbol("Bounds"),$e=dn({});window.layers=$e;const gt={},Ie=[];function jt(e,t){return ue(()=>{const n={},i=n.emitter=fi();if(n.on=i.on.bind(i),n.emit=i.emit.bind(i),n.nodes=q({}),n.id=e,Ie.push(e),gt[e]=new Set,n.minimized=he(!1,!1),Object.assign(n,t.call(n)),Ie[Ie.length-1]==null||Ie[Ie.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen
Stack: ${Ie}
Trying to pop ${n.id}`;Ie.pop(),_(n,"color"),_(n,"display"),_(n,"classes"),_(n,"style"),_(n,"name"),z(n,"name",n.id),_(n,"minWidth"),z(n,"minWidth",600),_(n,"minimizable"),z(n,"minimizable",!0),_(n,"minimizedDisplay");const r=n.style;return n.style=I(()=>{var a,u;let s=o(n.minWidth);return(typeof s=="number"||!Number.isNaN(parseInt(s)))&&(s=s+"px"),[(a=o(r))!=null?a:"",(u=n.minimized)!=null&&u.value?{flexGrow:"0",flexShrink:"0",width:"60px",minWidth:"",flexBasis:"",margin:"0"}:{flexGrow:"",flexShrink:"",width:"",minWidth:s,flexBasis:s,margin:""}]}),n})}function Ti(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}z(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),$e[e.id]=e,pe.emit("addLayer",e,t.layers[e.id])}function Us(e){return $e[e]}function Pi(e){console.info("Removing layer",e.id),pe.emit("removeLayer",e),$e[e.id]=void 0}function zs(e){Pi(e),Ti(e,D)}function Fi(e){const t=q(!1);return{openModal:()=>t.value=!0,modal:R(()=>d(at,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>d("h2",null,[o(e.name)]),body:o(e.display)}))}}pe.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 Gs=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:In,UnregisterNodeInjectionKey:En,NodesInjectionKey:Tn,BoundsInjectionKey:Pn,layers:$e,persistentRefs:gt,addingLayers:Ie,createLayer:jt,addLayer:Ti,getLayer:Us,removeLayer:Pi,reloadLayer:zs,setupLayerModal:Fi},Symbol.toStringTag,{value:"Module"}));const Hs=x({components:{Context:Ei},props:{index:{type:Number,required:!0},display:{type:k(Object,String,Function),required:!0},minimizedDisplay:k(Object,String,Function),minimized:{type:Object,required:!0},name:{type:k(String),required:!0},color:k(String),minimizable:k(Boolean),nodes:{type:Object,required:!0}},emits:["setMinimized"],setup(e){const{display:t,index:n,minimized:i,minimizedDisplay:r}=le(e),s=Ct(t),a=st(r),u=I(()=>ie.allowGoBack&&n.value>0&&!oe(i));function c(){D.tabs.splice(o(e.index),1/0)}function f(p){e.nodes.value=p}return{component:s,minimizedComponent:a,showGoBack:u,updateNodes:f,unref:o,goBack:c}}}),Ws={key:1};function Ys(e,t,n,i,r,s){const a=be("Context");return h(),S("div",{class:"layer-container",style:te({"--layer-color":e.unref(e.color)})},[e.showGoBack?(h(),S("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...u)=>e.goBack&&e.goBack(...u))},"\u274C")):V("",!0),e.unref(e.minimized)?(h(),S("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=u=>e.$emit("setMinimized",!1))},[e.minimizedComponent?(h(),O(re(e.minimizedComponent),{key:0})):(h(),S("div",Ws,X(e.unref(e.name)),1))])):(h(),S("div",{key:2,class:ne(["layer-tab",{showGoBack:e.showGoBack}])},[d(a,{onUpdateNodes:e.updateNodes},{default:A(()=>[(h(),O(re(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(h(),S("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=u=>e.$emit("setMinimized",!0))}," \u25BC ")):V("",!0)],4)}var Ks=G(Hs,[["render",Ys],["__scopeId","data-v-a592996e"]]);const Vi=e=>(We("data-v-4b4bda40"),e=e(),Ye(),e),Zs=Vi(()=>g("h2",null,"Changelog",-1)),Js=Vi(()=>g("details",{open:""},[g("summary",null,[C("v0.0 Initial Commit - "),g("time",null,"2021-09-04")]),C(" This is the first release :D "),g("ul",null,[g("li",{class:"feature"},"Did everything"),g("li",{class:"fix"},"Had some fun"),g("li",{class:"breaking"},"Removed everything"),g("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),Xs=x({__name:"Changelog",setup(e,{expose:t}){const n=q(!1);return t({open(){n.value=!0}}),(i,r)=>(h(),O(at,{modelValue:n.value,"onUpdate:modelValue":r[0]||(r[0]=s=>n.value=s)},{header:A(()=>[Zs]),body:A(()=>[Js]),_:1},8,["modelValue"]))}});var Qs=G(Xs,[["__scopeId","data-v-4b4bda40"]]),ea=x({props:{element:Object,display:{type:k(Object,String,Function),required:!0},style:k(Object,String,Array),classes:k(Object),direction:k(
${Z}
${F}`)}}return f[P]}Le(n,P=>{P&&Object.keys(f).forEach(F=>delete f[F])});const b=I(()=>Q.saves.reduce((P,F)=>(P[F]=p(F),P),{}));function w(P){let F;switch(D.id===P?F=Ci(D):F=JSON.stringify(b.value[P]),ie.exportEncoding){default:console.warn(`Unknown save encoding: ${ie.exportEncoding}. Defaulting to lz`);case"lz":F=tt.compressToUTF16(F);break;case"base64":F=btoa(unescape(encodeURIComponent(F)));break;case"plain":break}const Z=document.createElement("textarea");Z.value=F,document.body.appendChild(Z),Z.select(),Z.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(Z)}function N(P){D.id===P&&Pe();const F={...b.value[P],id:Xt()};Pe(F),Q.saves.push(F.id)}function E(P){Q.saves=Q.saves.filter(F=>F!==P),localStorage.removeItem(P),f[P]=void 0}function T(P){b.value[D.id].time=D.time,Pe(),f[D.id]=void 0,pt(b.value[P]),f[P]=void 0}function K(P){if(a.value=P,Je(()=>{a.value=null}),P[0]!=="{")if(P[0]==="e")P=decodeURIComponent(escape(atob(P)));else if(P[0]==="\u1BE1")P=tt.decompressFromUTF16(P);else{console.warn("Unable to determine preset encoding",P);return}const F=JSON.parse(P);F.id=Xt(),Pe(F),Q.saves.push(F.id),T(F.id)}function se(P,F){const Z=b.value[P];Z!=null&&(Z.name=F,D.id===P?(D.name=F,Pe()):(Pe(Z),f[P]=void 0))}return(P,F)=>(h(),O(at,{modelValue:n.value,"onUpdate:modelValue":F[4]||(F[4]=Z=>n.value=Z),ref_key:"modal",ref:i},{header:A(()=>[oo]),body:A(({shown:Z})=>[Z?(h(),O(o(mr),{key:0,list:o(Q).saves,handle:".handle",itemKey:Ce=>Ce},{item:A(({element:Ce})=>[d(ao,{save:o(b)[Ce],onOpen:fe=>T(Ce),onExport:fe=>w(Ce),onEditName:fe=>se(Ce,fe),onDuplicate:fe=>N(Ce),onDelete:fe=>E(Ce)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):V("",!0)]),footer:A(()=>[g("div",lo,[d(Vn,{modelValue:s.value,"onUpdate:modelValue":F[0]||(F[0]=Z=>s.value=Z),title:"Import Save",placeholder:"Paste your save here!",class:ne({importingFailed:r.value})},null,8,["modelValue","class"]),g("div",uo,[co,g("div",fo,[g("button",{class:"button",onClick:F[1]||(F[1]=Z=>T(o(_t)().id))},"New Game"),Object.keys(o(c)).length>0?(h(),O(Fn,{key:0,options:o(c),modelValue:a.value,"onUpdate:modelValue":F[2]||(F[2]=Z=>K(Z)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):V("",!0)])]),g("div",po,[mo,g("button",{class:"button modal-default-button",onClick:F[3]||(F[3]=Z=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Oi=G(go,[["__scopeId","data-v-5b5b1604"]]);const Ve=e=>(We("data-v-b0896196"),e=e(),Ye(),e),ho=["src","alt"],vo={key:1,class:"title"},bo=Ve(()=>g("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),yo={class:"discord"},_o={class:"discord-links"},wo={key:0},No=["href"],Co=Ve(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),ko=Ve(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),So={href:"https://forums.moddingtree.com/",target:"_blank"},$o=Ve(()=>g("span",{class:"material-icons"},"forum",-1)),Mo=Ve(()=>g("span",{class:"material-icons"},"info",-1)),Io=Ve(()=>g("span",{class:"material-icons"},"library_books",-1)),Eo=Ve(()=>g("span",{class:"material-icons"},"settings",-1)),To=Ve(()=>g("span",{class:"material-icons"},"library_books",-1)),Po=Ve(()=>g("span",{class:"material-icons"},"settings",-1)),Fo=Ve(()=>g("span",{class:"material-icons"},"info",-1)),Vo={href:"https://forums.moddingtree.com/",target:"_blank"},qo=Ve(()=>g("span",{class:"material-icons"},"forum",-1)),Oo={class:"discord"},xo={class:"discord-links"},Do={key:0},Ro=["href"],Ao=Ve(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Bo=Ve(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Lo=x({__name:"Nav",setup(e){const t=q(null),n=q(null),i=q(null),r=q(null),{useHeader:s,banner:a,title:u,discordName:c,discordLink:f,versionNumber:p}=ie;function b(){window.open(f,"mywindow")}return(w,N)=>(h(),S(U,null,[o(s)?(h(),S("div",ze({key:0,class:"nav
Reward: The dinosaur is now your friend (you can max Farm Points).`,direction:W.Down});const u=[r,s,a],c=Zu(()=>({rows:2,cols:2,getStartState(p){return p},getStyle(p,b){return{backgroundColor:`#${Number(b)*1234%999999}`}},getTitle(p){let b="";return p==="101"?b="top":p==="102"?b="bottom":p==="201"?b="left":p==="202"&&(b="right"),R(()=>d(ce,ze({display:JSON.stringify(this.cells[p].style)},{[b]:!0}),{default:()=>[d("h3",null,[C("Gridable #"),p])]}))},getDisplay(p,b){return String(b)},getCanClick(){return l.eq(ee.points.value,10)},onClick(p,b){this.cells[p].state=Number(b)+1}})),f=R(()=>d(U,null,[Oe(...u),Oe(c)]));return{id:si,color:e,name:t,points:n,achievements:u,grid:c,treeNode:i,display:f}});const uc={class:"field"},cc={key:0,class:"field-title"},dc=["min","max"],fc=x({__name:"Slider",props:{title:null,modelValue:null,min:null,max:null},emits:["update:modelValue"],setup(e,{emit:t}){const i=le(e),r=I({get(){var s;return String((s=o(i.modelValue))!=null?s:0)},set(s){t("update:modelValue",Number(s))}});return(s,a)=>(h(),S("div",uc,[e.title?(h(),S("span",cc,X(e.title),1)):V("",!0),d(ce,{display:`${o(r)}`,class:ne({fullWidth:!e.title}),direction:o(W).Down},{default:A(()=>[un(g("input",{type:"range","onUpdate:modelValue":a[0]||(a[0]=u=>ge(r)?r.value=u:null),min:e.min,max:e.max},null,8,dc),[[di,o(r)]])]),_:1},8,["display","class","direction"])]))}});var pc=G(fc,[["__scopeId","data-v-267283ff"]]);const mc=x({__name:"Sticky",setup(e){const t=q("0"),n=new ResizeObserver(r),i=we(null);function r(){let s=i.value;if(s==null)return;let a=0;for(;s.previousSibling;){const u=s.previousSibling;u.dataset&&"vSticky"in u.dataset&&(a+=u.offsetHeight),s=u}t.value=a+"px"}return Je(r),document.fonts.ready.then(r),Lt(()=>{var a;const s=(a=i.value)==null?void 0:a.parentElement;s&&n.observe(s)}),(s,a)=>(h(),S("div",{class:"sticky",style:te({top:t.value}),ref_key:"element",ref:i,"data-v-sticky":""},[Ue(s.$slots,"default",{},void 0,!0)],4))}});var ln=G(mc,[["__scopeId","data-v-cccac690"]]);const gc=x({__name:"VerticalRule",props:{height:null},setup(e){return(t,n)=>(h(),S("div",{class:"vr",style:te({height:e.height})},null,4))}});var hc=G(gc,[["__scopeId","data-v-5e0a978a"]]);var vc=x({props:{display:{type:k(Object,String,Function),required:!0},visibility:{type:k(Number,Boolean),required:!0},style:k(Object,String,Array),classes:k(Object),onClick:Function,onHold:Function,canClick:{type:k(Boolean),required:!0},small:Boolean,mark:k(Boolean,String),id:{type:String,required:!0}},components:{Node:ot,MarkNode:kt},setup(e){const{display:t,onClick:n,onHold:i}=le(e),r=we("");Fe(()=>{var p;const u=oe(t);if(u==null){r.value="";return}if(De(u)){r.value=j(u);return}const c=j((p=u.title)!=null?p:"","h3"),f=j(u.description,"div");r.value=j(R(()=>d("span",null,[u.title!=null?d("div",null,[d(c,null,null)]):null,d(f,null,null)])))});const{start:s,stop:a}=Mn(n,i);return{start:s,stop:a,comp:r,Visibility:Y,isVisible:Se,isHidden:je,unref:o}}});function bc(e,t,n,i,r,s){var c;const a=be("MarkNode"),u=be("Node");return e.isVisible(e.visibility)?(h(),S("button",{key:0,style:te([{visibility:e.isHidden(e.visibility)?"hidden":void 0},(c=e.unref(e.style))!=null?c:[]]),onClick:t[0]||(t[0]=(...f)=>e.onClick&&e.onClick(...f)),onMousedown:t[1]||(t[1]=(...f)=>e.start&&e.start(...f)),onMouseleave:t[2]||(t[2]=(...f)=>e.stop&&e.stop(...f)),onMouseup:t[3]||(t[3]=(...f)=>e.stop&&e.stop(...f)),onTouchstartPassive:t[4]||(t[4]=(...f)=>e.start&&e.start(...f)),onTouchendPassive:t[5]||(t[5]=(...f)=>e.stop&&e.stop(...f)),onTouchcancelPassive:t[6]||(t[6]=(...f)=>e.stop&&e.stop(...f)),class:ne({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?(h(),O(re(e.unref(e.comp)),{key:0})):V("",!0),d(a,{mark:e.unref(e.mark)},null,8,["mark"]),d(u,{id:e.id},null,8,["id"])],38)):V("",!0)}var Ui=G(vc,[["render",bc],["__scopeId","data-v-211328c0"]]);const yc=Symbol("Clickable");function At(e){return ue(()=>{var n;const t=(n=e==null?void 0:e())!=null?n:{};if(t.id=Te("clickable-"),t.type=yc,t[ve]=Ui,_(t,"visibility"),z(t,"visibility",
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 Ns();const{globalBus:e}=await rn(()=>Promise.resolve().then(function(){return _s}),void 0),{startGameLoop:t}=await rn(()=>import("./gameLoop.ebdc9739.js"),["assets/gameLoop.ebdc9739.js","assets/@fontsource.f66d05e7.css","assets/vue.35fd3bc4.js","assets/earcut.b6f90e68.js","assets/@vue.41db58fd.js","assets/nanoevents.1080beb7.js","assets/lz-string.f2f3b7cf.js","assets/@ivanv.f5f393ce.js","assets/vue-next-select.b7da6f19.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.2a65e8c7.js","assets/sortablejs.4c7e7419.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-toastification.1c45a88e.js","assets/vue-toastification.4b5f8ac8.css","assets/@pixi.13a16b18.js","assets/ismobilejs.5c6954b9.js","assets/eventemitter3.dc5195d7.js","assets/url.6dd57c6c.js","assets/querystring.776b9ab3.js","assets/workbox-window.8d14e8b7.js"]),n=window.vue=dr(df);e.emit("setupVue",n),n.mount("#app"),Je(()=>{const i=pi(),{updateServiceWorker:r}=pf({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{l as D,rn as _,ye as a,ie as b,Dd as c,pe as g,$n as l,D as p,Q as s};