From 87e2310f9f621ebeebc7de42b5f8b23b9f3b7308 Mon Sep 17 00:00:00 2001 From: nif Date: Wed, 14 Feb 2024 15:57:28 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20pages=20from=20@=20nif/Profect?= =?UTF-8?q?us-Niffix@263c951cf85a0c1e156ff9c77f04e58e63dc47a1=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/{gameLoop.71ff8eae.js => gameLoop.c4942976.js} | 2 +- assets/{index.a18c86c0.js => index.36a1200e.js} | 4 ++-- index.html | 2 +- sw.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename assets/{gameLoop.71ff8eae.js => gameLoop.c4942976.js} (90%) rename assets/{index.a18c86c0.js => index.36a1200e.js} (87%) diff --git a/assets/gameLoop.71ff8eae.js b/assets/gameLoop.c4942976.js similarity index 90% rename from assets/gameLoop.71ff8eae.js rename to assets/gameLoop.c4942976.js index 79a33d4..a3f86fd 100644 --- a/assets/gameLoop.71ff8eae.js +++ b/assets/gameLoop.c4942976.js @@ -1 +1 @@ -import{_ as d,s as u,p as e,a as f,l as T,D as a,b as m,g as p}from"./index.a18c86c0.js";import"./vue.a1abd053.js";import{b2 as c}from"./@vue.6f8187b0.js";/* empty css */import"./lz-string.bfbf8ec3.js";import"./nanoevents.1080beb7.js";import"./vue-next-select.dc61a6b4.js";import"./vuedraggable.a6e9addf.js";import"./sortablejs.c0c43fa8.js";import"./vue-textarea-autosize.35804eaf.js";import"./vue-toastification.6c7eee09.js";let n=null,l=null;function o(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const r=i;if(f.lastTenTicks.push(r),f.lastTenTicks.length>10&&(f.lastTenTicks=f.lastTenTicks.slice(1)),!((l==null?void 0:l.value)&&!e.keepGoing)&&!f.hasNaN&&(i=Math.max(i,0),e.devSpeed!==0)){if(T.value=!1,e.offlineTime!=null){if(a.gt(e.offlineTime,m.offlineLimit*3600)&&(e.offlineTime=m.offlineLimit*3600),a.gt(e.offlineTime,0)&&e.devSpeed!==0){const s=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-s,i+=s}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||a.lt(e.offlineTime,0))&&(e.offlineTime=null)}i=Math.min(i,m.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),!a.eq(i,0)&&(e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308),p.emit("update",i,r),u.unthrottled?(requestAnimationFrame(o),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(o,50)))}}async function L(){l=(await d(()=>import("./index.a18c86c0.js").then(function(t){return t.c}),["assets/index.a18c86c0.js","assets/index.0082bab1.css","assets/@fontsource.f66d05e7.css","assets/vue.a1abd053.js","assets/lz-string.bfbf8ec3.js","assets/@vue.6f8187b0.js","assets/nanoevents.1080beb7.js","assets/vue-next-select.dc61a6b4.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.a6e9addf.js","assets/sortablejs.c0c43fa8.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-toastification.6c7eee09.js","assets/vue-toastification.4b5f8ac8.css"])).hasWon,c(l,t=>{t&&p.emit("gameWon")}),u.unthrottled?requestAnimationFrame(o):n=setInterval(o,50)}export{L as startGameLoop}; +import{_ as d,s as u,p as e,a as f,l as T,D as a,b as m,g as p}from"./index.36a1200e.js";import"./vue.a1abd053.js";import{b2 as c}from"./@vue.6f8187b0.js";/* empty css */import"./lz-string.bfbf8ec3.js";import"./nanoevents.1080beb7.js";import"./vue-next-select.dc61a6b4.js";import"./vuedraggable.a6e9addf.js";import"./sortablejs.c0c43fa8.js";import"./vue-textarea-autosize.35804eaf.js";import"./vue-toastification.6c7eee09.js";let n=null,l=null;function o(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const r=i;if(f.lastTenTicks.push(r),f.lastTenTicks.length>10&&(f.lastTenTicks=f.lastTenTicks.slice(1)),!((l==null?void 0:l.value)&&!e.keepGoing)&&!f.hasNaN&&(i=Math.max(i,0),e.devSpeed!==0)){if(T.value=!1,e.offlineTime!=null){if(a.gt(e.offlineTime,m.offlineLimit*3600)&&(e.offlineTime=m.offlineLimit*3600),a.gt(e.offlineTime,0)&&e.devSpeed!==0){const s=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-s,i+=s}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||a.lt(e.offlineTime,0))&&(e.offlineTime=null)}i=Math.min(i,m.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),!a.eq(i,0)&&(e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308),p.emit("update",i,r),u.unthrottled?(requestAnimationFrame(o),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(o,50)))}}async function L(){l=(await d(()=>import("./index.36a1200e.js").then(function(t){return t.c}),["assets/index.36a1200e.js","assets/index.0082bab1.css","assets/@fontsource.f66d05e7.css","assets/vue.a1abd053.js","assets/lz-string.bfbf8ec3.js","assets/@vue.6f8187b0.js","assets/nanoevents.1080beb7.js","assets/vue-next-select.dc61a6b4.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.a6e9addf.js","assets/sortablejs.c0c43fa8.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-toastification.6c7eee09.js","assets/vue-toastification.4b5f8ac8.css"])).hasWon,c(l,t=>{t&&p.emit("gameWon")}),u.unthrottled?requestAnimationFrame(o):n=setInterval(o,50)}export{L as startGameLoop}; diff --git a/assets/index.a18c86c0.js b/assets/index.36a1200e.js similarity index 87% rename from assets/index.a18c86c0.js rename to assets/index.36a1200e.js index 6c117f7..39836b0 100644 --- a/assets/index.a18c86c0.js +++ b/assets/index.36a1200e.js @@ -14,5 +14,5 @@ Created at: Stack: ${ve} Trying to pop ${n.id}`);ve.pop(),E(n,"color"),E(n,"display"),E(n,"classes"),E(n,"style"),E(n,"name"),ce(n,"name",n.id),E(n,"minWidth"),ce(n,"minWidth",600),E(n,"minimizable"),ce(n,"minimizable",!0),E(n,"minimizedDisplay");const i=n.style;return n.style=P(()=>{var o,c;let s=u(n.minWidth);return(typeof s=="number"||!Number.isNaN(parseInt(s)))&&(s=s+"px"),[(o=u(i))!=null?o:"",(c=n.minimized)!=null&&c.value?{flexGrow:"0",flexShrink:"0",width:"60px",minWidth:"",flexBasis:"",margin:"0"}:{flexGrow:"",flexShrink:"",width:"",minWidth:s,flexBasis:s,margin:""}]}),n})}function Mn(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,se.emit("addLayer",e,t.layers[e.id])}function oa(e){return le[e]}function $n(e){console.info("Removing layer",e.id),se.emit("removeLayer",e),le[e.id]=void 0}function la(e){$n(e),Mn(e,x)}function ua(e){const t=F(!1);return{openModal:()=>t.value=!0,modal:ee(()=>y(je,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>y("h2",null,[u(e.name)]),body:u(e.display)}))}}se.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 ca=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Ut,UnregisterNodeInjectionKey:zt,NodesInjectionKey:Gt,BoundsInjectionKey:jt,layers:le,persistentRefs:Ke,addingLayers:ve,createLayer:Ht,addLayer:Mn,getLayer:oa,removeLayer:$n,reloadLayer:la,setupLayerModal:ua},Symbol.toStringTag,{value:"Module"}));const da=q({components:{Context:Sn,ErrorVue:dn},props:{index:{type:Number,required:!0},display:{type:B(Object,String,Function),required:!0},minimizedDisplay:B(Object,String,Function),minimized:{type:Object,required:!0},name:{type:B(String),required:!0},color:B(String),minimizable:B(Boolean),nodes:{type:Object,required:!0}},emits:["setMinimized"],setup(e){const{display:t,index:n,minimized:r,minimizedDisplay:i}=de(e),s=wi(t),o=Qe(i),c=P(()=>A.allowGoBack&&n.value>0&&!ye(r));function d(){x.tabs.splice(u(e.index),1/0)}function g(v){e.nodes.value=v}const b=F([]);return Bn((v,N,k)=>(console.warn(`Error caught in "${e.name}" layer`,v,N,k),b.value.push(v instanceof Error?v:new Error(JSON.stringify(v))),!1)),{component:s,minimizedComponent:o,showGoBack:c,updateNodes:g,unref:u,goBack:d,errors:b}}}),fa={key:1};function ga(e,t,n,r,i,s){const o=ze("ErrorVue"),c=ze("Context");return e.errors.length>0?(p(),L(o,{key:0,errors:e.errors},null,8,["errors"])):(p(),_("div",Oe({key:1,class:"layer-container",style:{"--layer-color":e.unref(e.color)}},e.$attrs),[e.showGoBack?(p(),_("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...d)=>e.goBack&&e.goBack(...d))},"\u274C")):$("",!0),e.unref(e.minimized)?(p(),_("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=d=>e.$emit("setMinimized",!1))},[e.minimizedComponent?(p(),L(ie(e.minimizedComponent),{key:0})):(p(),_("div",fa,D(e.unref(e.name)),1))])):(p(),_("div",{key:2,class:ae(["layer-tab",{showGoBack:e.showGoBack}])},[y(c,{onUpdateNodes:e.updateNodes},{default:V(()=>[(p(),L(ie(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(p(),_("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=d=>e.$emit("setMinimized",!0))}," \u25BC ")):$("",!0)],16))}var ma=z(da,[["render",ga],["__scopeId","data-v-a9f5b1da"]]);const xn=e=>(Ie("data-v-4b4bda40"),e=e(),Me(),e),ha=xn(()=>m("h2",null,"Changelog",-1)),pa=xn(()=>m("details",{open:""},[m("summary",null,[T("v0.0 Initial Commit - "),m("time",null,"2021-09-04")]),T(" 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)),va=q({__name:"Changelog",setup(e,{expose:t}){const n=F(!1);return t({open(){n.value=!0}}),(r,i)=>(p(),L(je,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=s=>n.value=s)},{header:V(()=>[ha]),body:V(()=>[pa]),_:1},8,["modelValue"]))}});var ba=z(va,[["__scopeId","data-v-4b4bda40"]]),ya=q({props:{element:Object,display:{type:B(Object,String,Function),required:!0},style:B(Object,String,Array),classes:B(Object),direction:B(String),xoffset:B(String),yoffset:B(String),pinned:Object},setup(e){const{element:t,display:n,pinned:r}=de(e),i=F(!1),s=P(()=>(ye(r)||i.value)&&o.value),o=Qe(n),c=be(ue(ee(()=>{const b=ye(t);return b==null?"":ht(b)})));function d(b){const v=r;b.shiftKey&&v&&(v.value=!v.value,b.stopPropagation(),b.preventDefault())}const g=P(()=>ye(r)&&At[ne.theme].showPin);return{Direction:Z,isHovered:i,isShown:s,comp:o,elementComp:c,unref:u,togglePinned:d,showPin:g}}});const _a={key:0,class:"material-icons pinned"};function Na(e,t,n,r,i,s){return p(),_("div",{class:ae(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=o=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=o=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...o)=>e.togglePinned&&e.togglePinned(...o))},[Te(e.$slots,"default",{},void 0,!0),e.elementComp?(p(),L(ie(e.elementComp),{key:0})):$("",!0),y(un,{name:"fade"},{default:V(()=>{var o;return[e.isShown?(p(),_("div",{key:0,class:ae(["tooltip",{top:e.unref(e.direction)===e.Direction.Up,left:e.unref(e.direction)===e.Direction.Left,right:e.unref(e.direction)===e.Direction.Right,bottom:e.unref(e.direction)===e.Direction.Down,...e.unref(e.classes)}]),style:ge([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(o=e.unref(e.style))!=null?o:{}])},[e.showPin?(p(),_("span",_a,"push_pin")):$("",!0),e.comp?(p(),L(ie(e.comp),{key:1})):$("",!0)],6)):$("",!0)]}),_:1})],34)}var Q=z(ya,[["render",Na],["__scopeId","data-v-6102fa3a"]]);const We=e=>(Ie("data-v-10effbe8"),e=e(),Me(),e),wa={class:"info-modal-header"},Ca=["src","alt"],ka={class:"info-modal-title"},Sa={key:0},Ia={key:0},Ma={key:0},$a=We(()=>m("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1)),xa=We(()=>m("br",null,null,-1)),Fa=We(()=>m("br",null,null,-1)),Ta=["href"],Pa=We(()=>m("span",{class:"material-icons info-modal-discord"},"discord",-1)),Ea=We(()=>m("div",null,[m("a",{href:"https://discord.gg/yJ4fjnjU54",class:"info-modal-discord-link",target:"_blank"},[m("span",{class:"material-icons info-modal-discord"},"discord"),T(" Profectus & Friends ")])],-1)),Oa=We(()=>m("div",null,[m("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link",target:"_blank"},[m("span",{class:"material-icons info-modal-discord"},"discord"),T(" The Modding Tree ")])],-1)),Va=We(()=>m("br",null,null,-1));var Da=q({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const n=e,{title:r,logo:i,author:s,discordName:o,discordLink:c,versionNumber:d,versionTitle:g}=A,b=de(n),v=F(!1),N=P(()=>St(x.timePlayed)),k=P(()=>ue(ee(()=>y(j,null,[Cn.map(ut)]))));t({open(){v.value=!0}});function I(){var C;(C=u(b.changelog))==null||C.open()}return(C,G)=>(p(),L(je,{modelValue:v.value,"onUpdate:modelValue":G[0]||(G[0]=Y=>v.value=Y)},{header:V(()=>[m("div",wa,[u(i)?(p(),_("img",{key:0,class:"info-modal-logo",src:u(i),alt:u(r)},null,8,Ca)):$("",!0),m("div",ka,[m("h2",null,D(u(r)),1),m("h4",null,[T(" v"+D(u(d)),1),u(g)?(p(),_("span",Sa,": "+D(u(g)),1)):$("",!0)])])])]),body:V(({shown:Y})=>[Y?(p(),_("div",Ia,[u(s)?(p(),_("div",Ma,"By "+D(u(s)),1)):$("",!0),$a,xa,m("div",{class:"link",onClick:I},"Changelog"),Fa,m("div",null,[u(c)?(p(),_("a",{key:0,href:u(c),class:"info-modal-discord-link",target:"_blank"},[Pa,T(" "+D(u(o)),1)],8,Ta)):$("",!0)]),Ea,Oa,Va,m("div",null,"Time Played: "+D(u(N)),1),(p(),L(ie(u(k))))])):$("",!0)]),_:1},8,["modelValue"]))}});var La=z(Da,[["__scopeId","data-v-10effbe8"]]);const Ra={class:"field"},qa={key:0,class:"field-title"},Fn=q({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var o;const n=e,r=Qe(ke(n,"title"),"span"),i=F((o=n.options.find(c=>c.value===n.modelValue))!=null?o:null);_e(ke(n,"modelValue"),c=>{var d;ye(i)!==c&&(i.value=(d=n.options.find(g=>g.value===c))!=null?d:null)});function s(c){t("update:modelValue",c.value)}return(c,d)=>(p(),_("div",Ra,[u(r)?(p(),_("span",qa,[(p(),L(ie(u(r))))])):$("",!0),y(u(Hn),{options:e.options,modelValue:i.value,"onUpdate:modelValue":[d[0]||(d[0]=g=>i.value=g),s],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});const Aa={class:"field"},Ba=q({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=P(()=>{var s;return ue((s=u(n.title))!=null?s:"","span")}),i=P({get(){return!!n.modelValue},set(s){t("update:modelValue",s)}});return(s,o)=>(p(),_("label",Aa,[Dt(m("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":o[0]||(o[0]=c=>te(i)?i.value=c:null)},null,512),[[Un,u(i)]]),(p(),L(ie(u(r))))]))}});var we=z(Ba,[["__scopeId","data-v-11046116"]]);const Ua={class:"header"},za=m("h2",null,"Settings",-1),Ga={class:"option-tabs"},ja={key:0},Ha={key:1};var Wa=q({__name:"Options",setup(e,{expose:t}){const n=F(!1),r=F("behaviour");function i(oe){return oe==r.value}function s(oe){r.value=oe}t({isTab:i,setTab:s,save:fe,open(){n.value=!0}});const o=Object.keys(At).map(oe=>({label:bn(oe),value:oe})),c=P(()=>ue(ee(()=>y(j,null,[yi.map(ut)])))),{showTPS:d,theme:g,unthrottled:b,alignUnits:v}=de(ne),{autosave:N,offlineProd:k}=de(x),I=P({get(){return x.devSpeed===0},set(oe){x.devSpeed=oe?0:null}}),C=ee(()=>y("span",{class:"option-title"},[T("Unthrottled"),y("desc",null,[T("Allow the game to run as fast as possible. Not battery friendly.")])])),G=ee(()=>y("span",{class:"option-title"},[T("Offline Production"),y(Q,{display:"Save-specific",direction:Z.Right},{default:()=>[T("*")]}),y("desc",null,[T("Simulate production that occurs while the game is closed.")])])),Y=ee(()=>y("span",{class:"option-title"},[T("Autosave"),y(Q,{display:"Save-specific",direction:Z.Right},{default:()=>[T("*")]}),y("desc",null,[T("Automatically save the game every second or when the game is closed.")])])),S=ee(()=>y("span",{class:"option-title"},[T("Pause game"),y(Q,{display:"Save-specific",direction:Z.Right},{default:()=>[T("*")]}),y("desc",null,[T("Stop everything from moving.")])])),M=ee(()=>y("span",{class:"option-title"},[T("Theme"),y("desc",null,[T("How the game looks.")])])),U=ee(()=>y("span",{class:"option-title"},[T("Show TPS"),y("desc",null,[T("Show TPS meter at the bottom-left corner of the page.")])])),Ne=ee(()=>y("span",{class:"option-title"},[T("Align modifier units"),y("desc",null,[T("Align numbers to the beginning of the unit in modifier view.")])]));return(oe,W)=>(p(),L(je,{modelValue:n.value,"onUpdate:modelValue":W[10]||(W[10]=re=>n.value=re)},{header:V(()=>[m("div",Ua,[za,m("div",Ga,[m("button",{class:ae({selected:i("behaviour")}),onClick:W[0]||(W[0]=re=>s("behaviour"))},"Behaviour",2),m("button",{class:ae({selected:i("appearance")}),onClick:W[1]||(W[1]=re=>s("appearance"))},"Appearance",2)])])]),body:V(()=>[i("behaviour")?(p(),_("div",ja,[y(we,{title:u(C),modelValue:u(b),"onUpdate:modelValue":W[2]||(W[2]=re=>te(b)?b.value=re:null)},null,8,["title","modelValue"]),u(A).enablePausing?(p(),L(we,{key:0,title:u(S),modelValue:u(I),"onUpdate:modelValue":W[3]||(W[3]=re=>te(I)?I.value=re:null)},null,8,["title","modelValue"])):$("",!0),y(we,{title:u(G),modelValue:u(k),"onUpdate:modelValue":W[4]||(W[4]=re=>te(k)?k.value=re:null)},null,8,["title","modelValue"]),y(we,{title:u(Y),modelValue:u(N),"onUpdate:modelValue":W[5]||(W[5]=re=>te(N)?N.value=re:null)},null,8,["title","modelValue"]),u(N)?$("",!0):(p(),L(Rt,{key:1,class:"button save-button",onClick:W[6]||(W[6]=re=>u(fe)())},{default:V(()=>[T("Manually save")]),_:1}))])):$("",!0),i("appearance")?(p(),_("div",Ha,[y(Fn,{title:u(M),options:u(o),modelValue:u(g),"onUpdate:modelValue":W[7]||(W[7]=re=>te(g)?g.value=re:null)},null,8,["title","options","modelValue"]),(p(),L(ie(u(c)))),y(we,{title:u(U),modelValue:u(d),"onUpdate:modelValue":W[8]||(W[8]=re=>te(d)?d.value=re:null)},null,8,["title","modelValue"]),y(we,{title:u(Ne),modelValue:u(v),"onUpdate:modelValue":W[9]||(W[9]=re=>te(v)?v.value=re:null)},null,8,["title","modelValue"])])):$("",!0)]),_:1},8,["modelValue"]))}});const Ja=["onSubmit"],Za={class:"field"},Ka={key:0,class:"field-title"},Ya=["placeholder"],Xa=q({__name:"Text",props:{title:null,modelValue:null,textArea:{type:Boolean},placeholder:null,maxHeight:null,submitOnBlur:{type:Boolean}},emits:["update:modelValue","submit","cancel"],setup(e,{emit:t}){const n=e,r=Qe(ke(n,"title"),"span"),i=be(null);lt(()=>{var d;(d=i.value)==null||d.focus()});const s=P({get(){var d;return(d=u(n.modelValue))!=null?d:""},set(d){t("update:modelValue",d)}});function o(){t("submit")}function c(){n.submitOnBlur!==!1?t("submit"):t("cancel")}return(d,g)=>(p(),_("form",{onSubmit:rt(o,["prevent"])},[m("div",Za,[u(r)?(p(),_("span",Ka,[(p(),L(ie(u(r))))])):$("",!0),e.textArea?(p(),L(u(Jn),{key:1,modelValue:u(s),"onUpdate:modelValue":g[0]||(g[0]=b=>te(s)?s.value=b:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:c,ref_key:"field",ref:i},null,8,["modelValue","placeholder","maxHeight"])):Dt((p(),_("input",{key:2,type:"text","onUpdate:modelValue":g[1]||(g[1]=b=>te(s)?s.value=b:null),placeholder:e.placeholder,class:ae({fullWidth:!e.title}),onBlur:c,ref_key:"field",ref:i},null,42,Ya)),[[zn,u(s)]])])],40,Ja))}});var Tn=z(Xa,[["__scopeId","data-v-90bd4994"]]);const Qa={key:0},eo=["onClick","disabled"],to={key:0},no=["onClick"],ro=q({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const r=de(e),i=F(!1);_e(i,c=>{t("confirmingChanged",c)});function s(){if(u(r.skipConfirm)){t("click");return}i.value&&t("click"),i.value=!i.value}function o(){i.value=!1}return(c,d)=>(p(),_("span",{class:ae(["container",{confirming:i.value}])},[i.value?(p(),_("span",Qa,"Are you sure?")):$("",!0),m("button",{onClick:rt(s,["stop"]),class:"button danger",disabled:e.disabled},[i.value?(p(),_("span",to,"Yes")):Te(c.$slots,"default",{key:1},void 0,!0)],8,eo),i.value?(p(),_("button",{key:1,class:"button",onClick:rt(o,["stop"])},"No",8,no)):$("",!0)],2))}});var io=z(ro,[["__scopeId","data-v-2f8ef34c"]]);const $e=e=>(Ie("data-v-32313015"),e=e(),Me(),e),so=$e(()=>m("div",{class:"handle material-icons"},"drag_handle",-1)),ao={key:0,class:"actions"},oo=$e(()=>m("span",{class:"material-icons"},"content_paste",-1)),lo=$e(()=>m("span",{class:"material-icons"},"content_copy",-1)),uo=$e(()=>m("span",{class:"material-icons"},"edit",-1)),co=$e(()=>m("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),fo={key:1,class:"actions"},go=$e(()=>m("span",{class:"material-icons"},"check",-1)),mo=$e(()=>m("span",{class:"material-icons"},"close",-1)),ho={key:2,class:"details"},po={class:"save-version"},vo=$e(()=>m("br",null,null,-1)),bo={key:0},yo={key:3,class:"details"},_o={key:4,class:"details error"},No=$e(()=>m("br",null,null,-1)),wo=q({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const n=e,{save:r}=de(n),i=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),s=F(!1),o=F(!1),c=F("");_e(s,()=>{var v;return c.value=(v=r.value.name)!=null?v:""});const d=P(()=>r.value!=null&&r.value.id===x.id),g=P(()=>{var v;return d.value?x.time:(v=r.value!=null&&r.value.time)!=null?v:0});function b(){t("editName",c.value),s.value=!1}return(v,N)=>(p(),_("div",{class:ae(["save",{active:u(d)}])},[so,s.value?(p(),_("div",fo,[m("button",{onClick:b,class:"button"},[y(Q,{display:"Save",direction:u(Z).Left,class:"info"},{default:V(()=>[go]),_:1},8,["direction"])]),m("button",{onClick:N[5]||(N[5]=k=>s.value=!s.value),class:"button"},[y(Q,{display:"Cancel",direction:u(Z).Left,class:"info"},{default:V(()=>[mo]),_:1},8,["direction"])])])):(p(),_("div",ao,[u(r).error==null&&!o.value?(p(),L(Rt,{key:0,onClick:N[0]||(N[0]=k=>t("export")),class:"button",left:""},{default:V(()=>[y(Q,{display:"Export",direction:u(Z).Left,class:"info"},{default:V(()=>[oo]),_:1},8,["direction"])]),_:1})):$("",!0),u(r).error==null&&!o.value?(p(),_("button",{key:1,onClick:N[1]||(N[1]=k=>t("duplicate")),class:"button"},[y(Q,{display:"Duplicate",direction:u(Z).Left,class:"info"},{default:V(()=>[lo]),_:1},8,["direction"])])):$("",!0),u(r).error==null&&!o.value?(p(),_("button",{key:2,onClick:N[2]||(N[2]=k=>s.value=!s.value),class:"button"},[y(Q,{display:"Edit Name",direction:u(Z).Left,class:"info"},{default:V(()=>[uo]),_:1},8,["direction"])])):$("",!0),y(io,{disabled:u(d),onClick:N[3]||(N[3]=k=>t("delete")),onConfirmingChanged:N[4]||(N[4]=k=>o.value=k)},{default:V(()=>[y(Q,{display:"Delete",direction:u(Z).Left,class:"info"},{default:V(()=>[co]),_:1},8,["direction"])]),_:1},8,["disabled"])])),u(r).error==null&&!s.value?(p(),_("div",ho,[m("button",{class:"button open",onClick:N[6]||(N[6]=k=>t("open"))},[m("h3",null,D(u(r).name),1)]),m("span",po,"v"+D(u(r).modVersion),1),vo,u(g)?(p(),_("div",bo,"Last played "+D(u(i).format(u(g))),1)):$("",!0)])):u(r).error==null&&s.value?(p(),_("div",yo,[y(Tn,{modelValue:c.value,"onUpdate:modelValue":N[7]||(N[7]=k=>c.value=k),class:"editname",onSubmit:b},null,8,["modelValue"])])):(p(),_("div",_o,[T(" Error: Failed to load save with id "+D(u(r).id),1),No,T(D(u(r).error),1)]))],2))}});var Co=z(wo,[["__scopeId","data-v-32313015"]]);const Wt=e=>(Ie("data-v-2a4275be"),e=e(),Me(),e),ko=Wt(()=>m("h2",null,"Saves Manager",-1)),So={class:"modal-footer"},Io={class:"field"},Mo=Wt(()=>m("span",{class:"field-title"},"Create Save",-1)),$o={class:"field-buttons"},xo={class:"footer"},Fo=Wt(()=>m("div",{style:{"flex-grow":"1"}},null,-1)),To=q({__name:"SavesManager",setup(e,{expose:t}){const n=F(!1),r=F(null);t({open(){n.value=!0}});const i=F(!1),s=F(""),o=F(null);_e(s,S=>{S?Ue(()=>{try{if(S[0]!=="{")if(S[0]==="e")S=decodeURIComponent(escape(atob(S)));else if(S[0]==="\u1BE1")S=Ce.decompressFromUTF16(S);else{console.warn("Unable to determine preset encoding",S),i.value=!0;return}const M=JSON.parse(S);if(typeof M!="object"){i.value=!0;return}const U=mt();M.id=U,fe(M),s.value="",i.value=!1,ne.saves.push(U)}catch{i.value=!0}}):i.value=!1});let c={},d=F(Object.keys(c).reduce((S,M)=>(S.push({label:M.split("/").slice(-1)[0].slice(0,-4),value:c[M]}),S),[]));const g=Ct({});function b(S){if(g[S]==null){let M=localStorage.getItem(S);if(M==null)g[S]={error:"Save doesn't exist in localStorage",id:S};else if(M==="dW5kZWZpbmVk")g[S]={error:"Save is undefined",id:S};else try{if(M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=Ce.decompressFromUTF16(M);else return console.warn("Unable to determine preset encoding",M),i.value=!0,g[S]={error:"Unable to determine preset encoding",id:S},g[S];g[S]={...JSON.parse(M),id:S}}catch(U){g[S]={error:U,id:S},console.warn(`SavesManager: Failed to load info about save with id ${S}: ${U} -${M}`)}}return g[S]}_e(n,S=>{S&&Object.keys(g).forEach(M=>delete g[M])});const v=P(()=>ne.saves.reduce((S,M)=>(S[M]=b(M),S),{}));function N(S){let M;switch(x.id===S?M=Lt(x):M=JSON.stringify(v.value[S]),A.exportEncoding){default:console.warn(`Unknown save encoding: ${A.exportEncoding}. Defaulting to lz`);case"lz":M=Ce.compressToUTF16(M);break;case"base64":M=btoa(unescape(encodeURIComponent(M)));break;case"plain":break}const U=document.createElement("textarea");U.value=M,document.body.appendChild(U),U.select(),U.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(U)}function k(S){x.id===S&&fe();const M={...v.value[S],id:mt()};fe(M),ne.saves.push(M.id)}function I(S){ne.saves=ne.saves.filter(M=>M!==S),localStorage.removeItem(S),g[S]=void 0}function C(S){v.value[x.id].time=x.time,fe(),g[x.id]=void 0,qe(v.value[S]),g[S]=void 0}function G(S){if(o.value=S,Ue(()=>{o.value=null}),S[0]!=="{")if(S[0]==="e")S=decodeURIComponent(escape(atob(S)));else if(S[0]==="\u1BE1")S=Ce.decompressFromUTF16(S);else{console.warn("Unable to determine preset encoding",S);return}const M=JSON.parse(S);M.id=mt(),fe(M),ne.saves.push(M.id),C(M.id)}function Y(S,M){const U=v.value[S];U!=null&&(U.name=M,x.id===S?(x.name=M,fe()):(fe(U),g[S]=void 0))}return(S,M)=>(p(),L(je,{modelValue:n.value,"onUpdate:modelValue":M[4]||(M[4]=U=>n.value=U),ref_key:"modal",ref:r},{header:V(()=>[ko]),body:V(({shown:U})=>[U?(p(),L(u(Wn),{key:0,list:u(ne).saves,handle:".handle",itemKey:Ne=>Ne},{item:V(({element:Ne})=>[y(Co,{save:u(v)[Ne],onOpen:oe=>C(Ne),onExport:oe=>N(Ne),onEditName:oe=>Y(Ne,oe),onDuplicate:oe=>k(Ne),onDelete:oe=>I(Ne)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):$("",!0)]),footer:V(()=>[m("div",So,[y(Tn,{modelValue:s.value,"onUpdate:modelValue":M[0]||(M[0]=U=>s.value=U),title:"Import Save",placeholder:"Paste your save here!",class:ae({importingFailed:i.value})},null,8,["modelValue","class"]),m("div",Io,[Mo,m("div",$o,[m("button",{class:"button",onClick:M[1]||(M[1]=U=>C(u(Je)().id))},"New Game"),Object.keys(u(d)).length>0?(p(),L(Fn,{key:0,options:u(d),modelValue:o.value,"onUpdate:modelValue":M[2]||(M[2]=U=>G(U)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):$("",!0)])]),m("div",xo,[Fo,m("button",{class:"button modal-default-button",onClick:M[3]||(M[3]=U=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Pn=z(To,[["__scopeId","data-v-2a4275be"]]);const me=e=>(Ie("data-v-47c54e31"),e=e(),Me(),e),Po=["src","alt"],Eo={key:1,class:"title"},Oo=me(()=>m("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),Vo={class:"discord"},Do={class:"discord-links"},Lo={key:0},Ro=["href"],qo=me(()=>m("li",null,[m("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"Profectus & Friends")],-1)),Ao=me(()=>m("li",null,[m("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Bo={href:"https://forums.moddingtree.com/",target:"_blank"},Uo=me(()=>m("span",{class:"material-icons"},"forum",-1)),zo=me(()=>m("span",{class:"material-icons"},"info",-1)),Go=me(()=>m("span",{class:"material-icons"},"library_books",-1)),jo=me(()=>m("span",{class:"material-icons"},"settings",-1)),Ho=me(()=>m("span",{class:"material-icons"},"library_books",-1)),Wo=me(()=>m("span",{class:"material-icons"},"settings",-1)),Jo=me(()=>m("span",{class:"material-icons"},"info",-1)),Zo={href:"https://forums.moddingtree.com/",target:"_blank"},Ko=me(()=>m("span",{class:"material-icons"},"forum",-1)),Yo={class:"discord"},Xo={class:"discord-links"},Qo={key:0},el=["href"],tl=me(()=>m("li",null,[m("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"Profectus & Friends")],-1)),nl=me(()=>m("li",null,[m("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),rl=q({__name:"Nav",setup(e){const t=F(null),n=F(null),r=F(null),i=F(null),{useHeader:s,banner:o,title:c,discordName:d,discordLink:g,versionNumber:b}=A;function v(){window.open(g,"mywindow")}return(N,k)=>(p(),_(j,null,[u(s)?(p(),_("div",Oe({key:0,class:"nav"},N.$attrs),[u(o)?(p(),_("img",{key:0,src:u(o),class:"banner",alt:u(c)},null,8,Po)):(p(),_("div",Eo,D(u(c)),1)),m("div",{onClick:k[0]||(k[0]=I=>{var C;return(C=i.value)==null?void 0:C.open()}),class:"version-container"},[y(Q,{display:"Changelog",direction:u(Z).Down,class:"version"},{default:V(()=>[m("span",null,"v"+D(u(b)),1)]),_:1},8,["direction"])]),Oo,m("div",Vo,[m("span",{onClick:v,class:"material-icons"},"discord"),m("ul",Do,[u(g)?(p(),_("li",Lo,[m("a",{href:u(g),target:"_blank"},D(u(d)),9,Ro)])):$("",!0),qo,Ao])]),m("div",null,[m("a",Bo,[y(Q,{display:"Forums",direction:u(Z).Down,yoffset:"5px"},{default:V(()=>[Uo]),_:1},8,["direction"])])]),m("div",{onClick:k[1]||(k[1]=I=>{var C;return(C=t.value)==null?void 0:C.open()})},[y(Q,{display:"Info",direction:u(Z).Down,class:"info"},{default:V(()=>[zo]),_:1},8,["direction"])]),m("div",{onClick:k[2]||(k[2]=I=>{var C;return(C=n.value)==null?void 0:C.open()})},[y(Q,{display:"Saves",direction:u(Z).Down,xoffset:"-20px"},{default:V(()=>[Go]),_:1},8,["direction"])]),m("div",{onClick:k[3]||(k[3]=I=>{var C;return(C=r.value)==null?void 0:C.open()})},[y(Q,{display:"Settings",direction:u(Z).Down,xoffset:"-66px"},{default:V(()=>[jo]),_:1},8,["direction"])])],16)):(p(),_("div",Oe({key:1,class:"overlay-nav"},N.$attrs),[m("div",{onClick:k[4]||(k[4]=I=>{var C;return(C=i.value)==null?void 0:C.open()}),class:"version-container"},[y(Q,{display:"Changelog",direction:u(Z).Right,xoffset:"25%",class:"version"},{default:V(()=>[m("span",null,"v"+D(u(b)),1)]),_:1},8,["direction"])]),m("div",{onClick:k[5]||(k[5]=I=>{var C;return(C=n.value)==null?void 0:C.open()})},[y(Q,{display:"Saves",direction:u(Z).Right},{default:V(()=>[Ho]),_:1},8,["direction"])]),m("div",{onClick:k[6]||(k[6]=I=>{var C;return(C=r.value)==null?void 0:C.open()})},[y(Q,{display:"Settings",direction:u(Z).Right},{default:V(()=>[Wo]),_:1},8,["direction"])]),m("div",{onClick:k[7]||(k[7]=I=>{var C;return(C=t.value)==null?void 0:C.open()})},[y(Q,{display:"Info",direction:u(Z).Right},{default:V(()=>[Jo]),_:1},8,["direction"])]),m("div",null,[m("a",Zo,[y(Q,{display:"Forums",direction:u(Z).Right,xoffset:"7px"},{default:V(()=>[Ko]),_:1},8,["direction"])])]),m("div",Yo,[m("span",{onClick:v,class:"material-icons"},"discord"),m("ul",Xo,[u(g)?(p(),_("li",Qo,[m("a",{href:u(g),target:"_blank"},D(u(d)),9,el)])):$("",!0),tl,nl])])],16)),y(La,{ref_key:"info",ref:t,changelog:i.value},null,8,["changelog"]),y(Pn,{ref_key:"savesManager",ref:n},null,512),y(Wa,{ref_key:"options",ref:r},null,512),y(ba,{ref_key:"changelog",ref:i},null,512)],64))}});var En=z(rl,[["__scopeId","data-v-47c54e31"]]);const il={class:"inner-tab"},sl=q({__name:"Game",setup(e){const t=ke(x,"tabs"),n=P(()=>Object.keys(le)),r=A.useHeader;function i(s){const{display:o,minimized:c,name:d,color:g,minimizable:b,nodes:v,minimizedDisplay:N}=s;return{display:o,minimized:c,name:d,color:g,minimizable:b,nodes:v,minimizedDisplay:N}}return(s,o)=>(p(),_("div",{class:ae(["tabs-container",{useHeader:u(r)}])},[(p(!0),_(j,null,Le(u(t),(c,d)=>{var g,b;return p(),_("div",{key:d,class:ae(["tab",u((g=u(le)[c])==null?void 0:g.classes)]),style:ge(u((b=u(le)[c])==null?void 0:b.style))},[d===0&&!u(r)?(p(),L(En,{key:0})):$("",!0),m("div",il,[u(n).includes(c)?(p(),L(ma,Oe({key:0},i(u(le)[c]),{index:d,onSetMinimized:v=>u(le)[c].minimized.value=v}),null,16,["index","onSetMinimized"])):(p(),L(ie(c),{key:1,index:d},null,8,["index"]))])],6)}),128))],2))}});var al=z(sl,[["__scopeId","data-v-dcd207b4"]]);const ol=q({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(p(),_("div",{style:ge({width:e.width,height:e.height})},null,4))}});function On(e,t="points",n=0,r=void 0){const i=te(e)?e:ct(e);if(i.displayName=t,i.precision=n,i.small=r,!te(e)){const s=i[Fe];s.displayName=t,s.precision=n,s.small=r}return i}function ll(e){const t=ct(e.value);return _e(e,n=>{Bt.value||l.gt(n,t.value)&&(t.value=n)}),t}function ul(e){const t=ct(e.value);return _e(e,(n,r)=>{Bt.value||l.gt(n,r)&&(t.value=l.add(t.value,l.sub(n,r)))}),t}const cl=new l("10^^8"),dl=new l("1e100");function fl(e,t){const n=F(0),r=F(0),i=F(0);return se.on("update",o=>{if(r.value=0,l.lte(e.value,dl)){i.value=e.value;return}let c=e.value,d=i.value;if(i.value=c,l.gt(c,d))if(l.gte(c,cl))c=l.slog(c,1e10),d=l.slog(d,1e10),n.value=c.sub(d).div(o),r.value=-1;else for(;l.div(c,d).log(10).div(o).gte("100")&&r.value<=5&&l.gt(d,0);)c=l.log10(c),d=l.log10(d),n.value=c.sub(d).div(o),r.value++}),P(()=>r.value===0?t?Se(t.value,e.precision,e.small)+" "+e.displayName+"/s":"":Se(n.value)+" OOM"+(r.value<0?"^OOM":"^"+r.value)+"s/sec")}function _t(e,t){const n=t!=null?t:e.value;return l.eq(e.precision,0)?st(e.small?n:l.floor(n)):Se(n,e.precision,e.small)}const gl=["x1","y1","x2","y2"],ml=q({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const t=e,n=de(t),r=P(()=>{const o=n.startNode.value.rect,c=n.boundingRect.value,d=c?{x:o.x+o.width/2-c.x,y:o.y+o.height/2-c.y}:{x:0,y:0};return n.link.value.offsetStart&&(d.x+=n.link.value.offsetStart.x,d.y+=n.link.value.offsetStart.y),d}),i=P(()=>{const o=n.endNode.value.rect,c=n.boundingRect.value,d=c?{x:o.x+o.width/2-c.x,y:o.y+o.height/2-c.y}:{x:0,y:0};return n.link.value.offsetEnd&&(d.x+=n.link.value.offsetEnd.x,d.y+=n.link.value.offsetEnd.y),d}),s=P(()=>Ci(t.link));return(o,c)=>(p(),_("line",Oe({"stroke-width":"15px",stroke:"white"},u(s),{x1:u(r).x,y1:u(r).y,x2:u(i).x,y2:u(i).y}),null,16,gl))}});const hl=q({__name:"Links",props:{links:null},setup(e){var d;const n=ke(e,"links"),r=F(null),i=vt(Gt,F({})),s=vt(jt,F(void 0)),o=F((d=r.value)==null?void 0:d.getBoundingClientRect());_e(s,()=>{var g;return o.value=(g=r.value)==null?void 0:g.getBoundingClientRect()}),lt(()=>{var g;return o.value=(g=r.value)==null?void 0:g.getBoundingClientRect()});const c=P(()=>{var b,v;const g=i.value;return(v=(b=n.value)==null?void 0:b.filter(N=>{var k,I;return((k=g[N.startNode.id])==null?void 0:k.rect)&&((I=g[N.startNode.id])==null?void 0:I.rect)}))!=null?v:[]});return(g,b)=>(p(),_(j,null,[u(c)?(p(),_("svg",Gn(Oe({key:0},g.$attrs)),[(p(!0),_(j,null,Le(u(c),(v,N)=>(p(),L(ml,{key:N,link:v,boundingRect:o.value,startNode:u(i)[v.startNode.id],endNode:u(i)[v.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):$("",!0),m("div",{ref_key:"resizeListener",ref:r,class:"resize-listener"},null,512)],64))}});var pl=z(hl,[["__scopeId","data-v-063f6d6b"]]),vl=q({props:{nodes:{type:B(Array),required:!0},leftSideNodes:B(Array),rightSideNodes:B(Array),branches:B(Array)},components:{Links:pl},setup(e){const{nodes:t,leftSideNodes:n,rightSideNodes:r}=de(e),i=be();Be(()=>{const c=ye(t);i.value=ue(ee(()=>y(j,null,[c.map(d=>y("span",{class:"row tree-row",style:"margin: 50px auto;"},[d.map(ht)]))])))});const s=be();Be(()=>{const c=ye(n);s.value=c?ue(ee(()=>y("span",{class:"left-side-nodes small"},[c.map(ht)]))):""});const o=be();return Be(()=>{const c=ye(r);o.value=c?ue(ee(()=>y("span",{class:"side-nodes small"},[c.map(ht)]))):""}),{unref:u,nodesComp:i,leftNodesComp:s,rightNodesComp:o}}});function bl(e,t,n,r,i,s){const o=ze("Links");return p(),_(j,null,[(p(),L(ie(e.nodesComp))),e.leftNodesComp?(p(),L(ie(e.leftNodesComp),{key:0})):$("",!0),e.rightNodesComp?(p(),L(ie(e.rightNodesComp),{key:1})):$("",!0),e.branches?(p(),L(o,{key:2,links:e.unref(e.branches)},null,8,["links"])):$("",!0)],64)}var yl=z(vl,[["render",bl],["__scopeId","data-v-39ca96d0"]]);const _l={key:0},Nl={key:0,class:"mark star"},wl=["src"],Cl=q({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(p(),_("div",_l,[e.mark===!0?(p(),_("div",Nl)):(p(),_("img",{key:1,class:"mark",src:e.mark},null,8,wl))])):$("",!0)}});var Vn=z(Cl,[["__scopeId","data-v-2207999f"]]);const kl=q({__name:"Node",props:{id:null},setup(e){const n=de(e),r=vt(Ut,()=>{}),i=vt(zt,()=>{}),s=be(null),o=P(()=>s.value&&s.value.parentElement);return _e([o,n.id],([c,d],[g,b])=>{g&&i(u(b)),c&&r(d,c)}),ln(()=>i(u(n.id))),(c,d)=>(p(),_("div",{class:"node",ref_key:"node",ref:s},null,512))}});var Dn=z(kl,[["__scopeId","data-v-a48cb382"]]);const Sl=q({props:{display:B(Object,String,Function),visibility:{type:B(Number,Boolean),required:!0},style:B(String,Object,Array),classes:B(Object),onClick:Function,onHold:Function,color:B(String),glowColor:B(String),canClick:{type:B(Boolean),required:!0},mark:B(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Vn,Node:Dn},setup(e){const{onClick:t,onHold:n,display:r}=de(e),i=Qe(r),{start:s,stop:o}=kn(t,n);return{start:s,stop:o,comp:i,unref:u,Visibility:Xe,isCoercableComponent:Mt,isVisible:yn,isHidden:_n}}});function Il(e,t,n,r,i,s){var d;const o=ze("MarkNode"),c=ze("Node");return e.isVisible(e.visibility)?(p(),_("div",{key:0,style:ge({visibility:e.isHidden(e.visibility)?"hidden":void 0}),class:ae({treeNode:!0,can:e.unref(e.canClick),...e.unref(e.classes)}),onClick:t[0]||(t[0]=(...g)=>e.onClick&&e.onClick(...g)),onMousedown:t[1]||(t[1]=(...g)=>e.start&&e.start(...g)),onMouseleave:t[2]||(t[2]=(...g)=>e.stop&&e.stop(...g)),onMouseup:t[3]||(t[3]=(...g)=>e.stop&&e.stop(...g)),onTouchstartPassive:t[4]||(t[4]=(...g)=>e.start&&e.start(...g)),onTouchendPassive:t[5]||(t[5]=(...g)=>e.stop&&e.stop(...g)),onTouchcancelPassive:t[6]||(t[6]=(...g)=>e.stop&&e.stop(...g))},[m("div",{style:ge([{backgroundColor:e.unref(e.color),boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ${e.unref(e.glowColor)}`},(d=e.unref(e.style))!=null?d:[]])},[(p(),L(ie(e.unref(e.comp))))],4),y(o,{mark:e.unref(e.mark)},null,8,["mark"]),y(c,{id:e.id},null,8,["id"])],38)):$("",!0)}var Ml=z(Sl,[["render",Il],["__scopeId","data-v-727230a6"]]);const $l=Symbol("TreeNode"),xl=Symbol("Tree");function Fl(e,...t){const n=t.reduce((r,i)=>{var s;return Object.assign(r,(s=i.getPersistentData)==null?void 0:s.call(i))},{});return He(r=>{var o,c,d;const i=(o=e==null?void 0:e.call(r,r))!=null?o:{};i.id=It("treeNode-"),i.type=$l,i[Pe]=Ml;for(const g of t)(c=g.preConstruct)==null||c.call(g,i);Object.assign(n),E(i,"visibility"),ce(i,"visibility",Xe.Visible),E(i,"canClick"),ce(i,"canClick",!0),E(i,"color"),E(i,"display"),E(i,"glowColor"),E(i,"classes"),E(i,"style"),E(i,"mark");for(const g of t)(d=g.postConstruct)==null||d.call(g,i);if(i.onClick){const g=i.onClick.bind(i);i.onClick=function(b){u(i.canClick)!==!1&&g(b)}}if(i.onHold){const g=i.onHold.bind(i);i.onHold=function(){u(i.canClick)!==!1&&g()}}const s=t.reduce((g,b)=>{var v;return Object.assign(g,(v=b.getGatheredProps)==null?void 0:v.call(b,i))},{});return i[Ee]=function(){const{display:g,visibility:b,style:v,classes:N,onClick:k,onHold:I,color:C,glowColor:G,canClick:Y,mark:S,id:M}=this;return{display:g,visibility:b,style:v,classes:N,onClick:k,onHold:I,color:C,glowColor:G,canClick:Y,mark:S,id:M,...s}},i})}function Tl(e){return He(t=>{const n=e.call(t,t);return n.id=It("tree-"),n.type=xl,n[Pe]=yl,n.isResetting=F(!1),n.resettingNode=be(null),n.reset=function(r){var s,o;const i=n;i.isResetting.value=!0,i.resettingNode.value=r,(s=i.resetPropagation)==null||s.call(i,i,r),(o=i.onReset)==null||o.call(i,r),i.isResetting.value=!1,i.resettingNode.value=null},n.links=P(()=>{var i;return(i=u(n.branches))!=null?i:[]}),E(n,"visibility"),ce(n,"visibility",Xe.Visible),E(n,"nodes"),E(n,"leftSideNodes"),E(n,"rightSideNodes"),E(n,"branches"),n[Ee]=function(){const{nodes:r,leftSideNodes:i,rightSideNodes:s,branches:o}=this;return{nodes:r,leftSideNodes:i,rightSideNodes:s,branches:o}},n})}const Pl=function(e,t){var s;const n=u(e.branches);if(n===void 0)return;let r=[],i=[t];for(;i.length!=0;){let o=[];for(let c of i)for(let d of n.filter(g=>g.startNode===c))[...r,...i].includes(d.endNode)||(o.push(d.endNode),(s=d.endNode.reset)==null||s.reset());r=r.concat(i),i=o}};function El(e,t=null,n=0){const r=Et(n);return P(()=>t==null||l.gte(e.value,u(r))?_t(e)+" "+e.displayName:`Reach ${l.eq(t.precision,0)?st(u(r)):Se(u(r),t.precision)} ${t.displayName} to unlock (You have ${l.eq(t.precision,0)?st(t.value):Se(t.value,t.precision)})`)}function Ol(e,...t){return He(n=>{var i,s;const r=e.call(n,n);for(const o of t)(i=o.preConstruct)==null||i.call(o,r);r.formula=r.formula(a.variable(r.baseResource)),r.currentGain==null&&(r.currentGain=P(()=>{let o=l.floor(r.formula.evaluate(r.baseResource.value)).max(0);return u(r.buyMax)===!1&&(o=o.min(1)),o})),r.actualGain==null&&(r.actualGain=r.currentGain),r.currentAt==null&&(r.currentAt=P(()=>r.formula.invert(l.floor(u(r.currentGain))))),r.nextAt==null&&(r.nextAt=P(()=>r.formula.invert(l.floor(u(r.currentGain)).add(1)))),r.convert==null&&(r.convert=function(){var c;const o=u(r.currentGain);r.gainResource.value=l.add(r.gainResource.value,o),r.spend(o),(c=r.onConvert)==null||c.call(r,o)}),r.spend==null&&(r.spend=function(){r.baseResource.value=0}),E(r,"currentGain"),E(r,"actualGain"),E(r,"currentAt"),E(r,"nextAt"),E(r,"buyMax"),ce(r,"buyMax",!0);for(const o of t)(s=o.postConstruct)==null||s.call(o,r);return r})}function Vl(e){return Ol(e)}const Ln=e=>(Ie("data-v-5e2d38ce"),e=e(),Me(),e),Dl=Ln(()=>m("div",{class:"key"},"Ctrl",-1)),Ll=Ln(()=>m("div",{class:"key"},"Shift",-1)),Rl={class:"key"},ql=q({__name:"Hotkey",props:{hotkey:null},setup(e){const t=e;let n="",r=!1,i=!1,s=!1;return Be(()=>{n=t.hotkey.key,r=n.startsWith("ctrl+"),r&&(n=n.slice(5)),i=n.startsWith("shift+"),i&&(n=n.slice(6)),s=n.length==1&&n.toLowerCase()!=n.toUpperCase(),s&&(n=n.toUpperCase())}),(o,c)=>(p(),_(j,null,[u(r)?(p(),_(j,{key:0},[Dl,T("+")],64)):$("",!0),u(i)?(p(),_(j,{key:1},[Ll,T("+")],64)):$("",!0),m("div",Rl,D(u(n)),1)],64))}});var Al=z(ql,[["__scopeId","data-v-5e2d38ce"]]);const $t=Ct({}),Jt=Symbol("Hotkey"),an=[")","!","@","#","$","%","^","&","*","("];function Bl(e){return He(t=>{const n=e.call(t,t);return n.type=Jt,E(n,"enabled"),ce(n,"enabled",!0),E(n,"description"),n})}se.on("addLayer",e=>{Nn(e,Jt).forEach(t=>{$t[t.key]=t})});se.on("removeLayer",e=>{Nn(e,Jt).forEach(t=>{$t[t.key]=void 0})});document.onkeydown=function(e){var r;if(((r=e.target)==null?void 0:r.tagName)==="INPUT"||Zt.value&&!x.keepGoing)return;let t=e.key;an.includes(t)?t="shift+"+an.indexOf(t):e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const n=$t[t];n&&u(n.enabled)&&(e.preventDefault(),n.onPress())};_i(ee(()=>{const e=Object.values($t).filter(t=>u(t==null?void 0:t.enabled));return e.length===0?"":y("div",null,[y("br",null,null),y("h4",null,[T("Hotkeys")]),y("div",{style:"column-count: 2"},[e.map(t=>y("div",null,[y(Al,{hotkey:t},null),T(" "),t==null?void 0:t.description]))])])}));const Ul=Symbol("Reset");function zl(e){return He(t=>{const n=e.call(t,t);return n.id=It("reset-"),n.type=Ul,n.reset=function(){var i;const r=s=>{if(s!=null&&typeof s=="object"&&!(s instanceof l)&&!(s instanceof a)){if(Vt in s&&s[Vt]===!0)return;if(Ge in s){const o=s;o.value=o[Ge]}else!(s instanceof l)&&!te(s)&&Object.values(s).forEach(o=>r(o))}};u(n.thingsToReset).forEach(r),se.emit("reset",n),(i=n.onReset)==null||i.call(n)},E(n,"thingsToReset"),n})}const gt={};se.on("removeLayer",e=>{var t;(t=gt[e.id])==null||t.call(gt),gt[e.id]=void 0});const Gl=q({__name:"Sticky",setup(e){const t=F("0"),n=new ResizeObserver(i),r=be(null);function i(){let s=r.value;if(s==null)return;let o=0;for(;s.previousSibling;){const c=s.previousSibling;c.dataset&&"vSticky"in c.dataset&&(o+=c.offsetHeight),s=c}t.value=o+"px"}return Ue(i),document.fonts.ready.then(i),lt(()=>{var o;const s=(o=r.value)==null?void 0:o.parentElement;s&&n.observe(s)}),(s,o)=>(p(),_("div",{class:"sticky",style:ge({top:t.value}),ref_key:"element",ref:r,"data-v-sticky":""},[Te(s.$slots,"default",{},void 0,!0)],4))}});var jl=z(Gl,[["__scopeId","data-v-cccac690"]]);const Hl=q({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,n=P(()=>_t(t.resource));return(r,i)=>(p(),_("h2",{style:ge({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},D(u(n)),5))}});const Wl={class:"main-display"},Jl={key:0},Zl={key:1},Kl=q({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null},setup(e){const n=de(e),r=F(null),i=Qe(n.effectDisplay),s=P(()=>l.lt(n.resource.value,"1e1000"));return(o,c)=>(p(),L(jl,null,{default:V(()=>{var d,g,b,v;return[m("div",{class:ae(["main-display-container",(d=e.classes)!=null?d:{}]),style:ge([{height:`${((b=(g=r.value)==null?void 0:g.$el.clientHeight)!=null?b:0)+50}px`},(v=e.style)!=null?v:{}])},[m("div",Wl,[u(s)?(p(),_("span",Jl,"You have ")):$("",!0),y(Hl,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),T(" "+D(e.resource.displayName),1),u(i)?(p(),_("span",Zl,[T(", "),(p(),L(ie(u(i)),{ref_key:"effectRef",ref:r},null,512))])):$("",!0)])],6)]}),_:1}))}});function Yl(e,t){return E(t,"display"),E(t,"classes"),E(t,"style"),E(t,"direction"),ce(t,"direction",Z.Up),E(t,"xoffset"),E(t,"yoffset"),t.pinnable&&(t.pinned=ct(!1,!1)),Ue(()=>{const n=e[Pe];e[Pe]=Q;const r=e[Ee].bind(e);e[Ee]=function(){const{display:s,classes:o,style:c,direction:d,xoffset:g,yoffset:b,pinned:v}=this;return{element:{[Pe]:n,[Ee]:r},display:s,classes:o,style:u(c),direction:d,xoffset:g,yoffset:b,pinned:v}}.bind(t)}),t}var Xl=q({props:{display:{type:B(Object,String,Function),required:!0},visibility:{type:B(Number,Boolean),required:!0},style:B(Object,String,Array),classes:B(Object),onClick:Function,onHold:Function,canClick:{type:B(Boolean),required:!0},small:Boolean,mark:B(Boolean,String),id:{type:String,required:!0}},components:{Node:Dn,MarkNode:Vn},setup(e){const{display:t,onClick:n,onHold:r}=de(e),i=be("");Be(()=>{var b;const c=ye(t);if(c==null){i.value="";return}if(Mt(c)){i.value=ue(c);return}const d=ue((b=c.title)!=null?b:"","h3"),g=ue(c.description,"div");i.value=ue(ee(()=>y("span",null,[c.title!=null?y("div",null,[y(d,null,null)]):null,y(g,null,null)])))});const{start:s,stop:o}=kn(n,r);return{start:s,stop:o,comp:i,Visibility:Xe,isVisible:yn,isHidden:_n,unref:u}}});function Ql(e,t,n,r,i,s){var d;const o=ze("MarkNode"),c=ze("Node");return e.isVisible(e.visibility)?(p(),_("button",{key:0,style:ge([{visibility:e.isHidden(e.visibility)?"hidden":void 0},(d=e.unref(e.style))!=null?d:[]]),onClick:t[0]||(t[0]=(...g)=>e.onClick&&e.onClick(...g)),onMousedown:t[1]||(t[1]=(...g)=>e.start&&e.start(...g)),onMouseleave:t[2]||(t[2]=(...g)=>e.stop&&e.stop(...g)),onMouseup:t[3]||(t[3]=(...g)=>e.stop&&e.stop(...g)),onTouchstartPassive:t[4]||(t[4]=(...g)=>e.start&&e.start(...g)),onTouchendPassive:t[5]||(t[5]=(...g)=>e.stop&&e.stop(...g)),onTouchcancelPassive:t[6]||(t[6]=(...g)=>e.stop&&e.stop(...g)),class:ae({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)?(p(),L(ie(e.unref(e.comp)),{key:0})):$("",!0),y(o,{mark:e.unref(e.mark)},null,8,["mark"]),y(c,{id:e.id},null,8,["id"])],38)):$("",!0)}var eu=z(Xl,[["render",Ql],["__scopeId","data-v-211328c0"]]);const tu=Symbol("Clickable");function nu(e,...t){const n=t.reduce((r,i)=>{var s;return Object.assign(r,(s=i.getPersistentData)==null?void 0:s.call(i))},{});return He(r=>{var o,c,d;const i=(o=e==null?void 0:e.call(r,r))!=null?o:{};i.id=It("clickable-"),i.type=tu,i[Pe]=eu;for(const g of t)(c=g.preConstruct)==null||c.call(g,i);if(Object.assign(i,n),E(i,"visibility"),ce(i,"visibility",Xe.Visible),E(i,"canClick"),ce(i,"canClick",!0),E(i,"classes"),E(i,"style"),E(i,"mark"),E(i,"display"),i.onClick){const g=i.onClick.bind(i);i.onClick=function(b){u(i.canClick)!==!1&&g(b)}}if(i.onHold){const g=i.onHold.bind(i);i.onHold=function(){u(i.canClick)!==!1&&g()}}for(const g of t)(d=g.postConstruct)==null||d.call(g,i);const s=t.reduce((g,b)=>{var v;return Object.assign(g,(v=b.getGatheredProps)==null?void 0:v.call(b,i))},{});return i[Ee]=function(){const{display:g,visibility:b,style:v,classes:N,onClick:k,onHold:I,canClick:C,small:G,mark:Y,id:S}=this;return{display:g,visibility:b,style:u(v),classes:N,onClick:k,onHold:I,canClick:C,small:G,mark:Y,id:S,...s}},i})}function ru(e){return nu(t=>{const n=e.call(t,t);E(n,"showNextAt"),ce(n,"showNextAt",!0),ce(n,"minimumGain",1),n.resetDescription==null?n.resetDescription=P(()=>l.lt(n.conversion.gainResource.value,1e3)?"Reset for ":""):E(n,"resetDescription"),n.display==null&&(n.display=ee(()=>y("span",null,[u(n.resetDescription),y("b",null,[_t(n.conversion.gainResource,l.max(u(n.conversion.actualGain),u(n.minimumGain)))])," ",n.conversion.gainResource.displayName,u(n.showNextAt)!=null?y("div",null,[y("br",null,null),u(n.conversion.buyMax)?"Next:":"Req:"," ",_t(n.conversion.baseResource,!u(n.conversion.buyMax)&&l.gte(u(n.conversion.actualGain),1)?u(n.conversion.currentAt):u(n.conversion.nextAt))," ",n.conversion.baseResource.displayName]):null]))),n.canClick==null&&(n.canClick=P(()=>l.gte(u(n.conversion.actualGain),u(n.minimumGain))));const r=n.onClick;return n.onClick=function(i){u(n.canClick)!==!1&&(n.conversion.convert(),n.tree.reset(n.treeNode),n.resetTime&&(n.resetTime.value=n.resetTime[Ge]),r==null||r(i))},n})}function iu(e){return Fl(t=>{const n=e.call(t,t);return ce(n,"display",bn(n.layerID)),E(n,"append"),{...n,onClick:u(n.append)?function(){if(x.tabs.includes(n.layerID)){const r=x.tabs.lastIndexOf(n.layerID);x.tabs.splice(r,1)}else x.tabs.push(n.layerID)}:function(){x.tabs.splice(1,1,n.layerID)}}})}const on="p",Nt=Ht(on,function(){const e="Prestige",t="#4BDC13",n=On(0,"prestige points"),r=Vl(()=>({formula:g=>g.div(10).sqrt(),baseResource:wt.points,gainResource:n})),i=zl(()=>({thingsToReset:()=>[Nt]})),s=iu(()=>({layerID:on,color:t,reset:i})),o=Yl(s,{display:El(n),pinnable:!0}),c=ru(()=>({conversion:r,tree:wt.tree,treeNode:s})),d=Bl(()=>({description:"Reset for prestige points",key:"p",onPress:c.onClick}));return{name:e,color:t,points:n,tooltip:o,display:ee(()=>y(j,null,[y(Kl,{resource:n,color:t},null),ut(c)])),treeNode:s,hotkey:d}}),wt=Ht("main",function(){const e=On(10),t=ll(e),n=ul(e),r=P(()=>new l(1));se.on("update",o=>{e.value=l.add(e.value,l.times(r.value,o))});const i=fl(e,r),s=Tl(()=>({nodes:[[Nt.treeNode]],branches:[],onReset(){e.value=Xt(this.resettingNode.value)===Xt(Nt.treeNode)?0:10,t.value=e.value,n.value=e.value},resetPropagation:Pl}));return{name:"Tree",links:s.links,display:ee(()=>y(j,null,[x.devSpeed===0?y("div",null,[T("Game Paused")]):null,x.devSpeed!=null&&x.devSpeed!==0&&x.devSpeed!==1?y("div",null,[T("Dev Speed: "),Se(x.devSpeed),T("x")]):null,x.offlineTime!=null&&x.offlineTime!==0?y("div",null,[T("Offline Time: "),St(x.offlineTime)]):null,y("div",null,[l.lt(e.value,"1e1000")?y("span",null,[T("You have ")]):null,y("h2",null,[Se(e.value)]),l.lt(e.value,"1e1e6")?y("span",null,[T(" points")]):null]),l.gt(r.value,0)?y("div",null,[T("("),i.value,T(")")]):null,y(ol,null,null),ut(s)])),points:e,best:t,total:n,oomps:i,tree:s}}),su=e=>[wt,Nt],Zt=P(()=>!1);function au(e,t){}var ou=Object.freeze(Object.defineProperty({__proto__:null,main:wt,getInitialLayers:su,hasWon:Zt,fixOldSave:au},Symbol.toStringTag,{value:"Module"}));const dt=e=>(Ie("data-v-4a50ce42"),e=e(),Me(),e),lu={class:"game-over-modal-header"},uu=["src","alt"],cu={class:"game-over-modal-title"},du=dt(()=>m("h2",null,"Congratulations!",-1)),fu={key:0},gu=dt(()=>m("br",null,null,-1)),mu=dt(()=>m("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),hu=dt(()=>m("br",null,null,-1)),pu=["href"],vu=dt(()=>m("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),bu=q({__name:"GameOverScreen",setup(e){const{title:t,logo:n,discordName:r,discordLink:i,versionNumber:s,versionTitle:o}=A,c=P(()=>St(x.timePlayed)),d=P(()=>Zt.value&&!x.keepGoing),g=ke(x,"autosave");function b(){x.keepGoing=!0}function v(){qe(Je())}return(N,k)=>(p(),L(je,{"model-value":u(d)},{header:V(()=>[m("div",lu,[u(n)?(p(),_("img",{key:0,class:"game-over-modal-logo",src:u(n),alt:u(t)},null,8,uu)):$("",!0),m("div",cu,[du,m("h4",null,"You've beaten "+D(u(t))+" v"+D(u(s))+": "+D(u(o)),1)])])]),body:V(({shown:I})=>[I?(p(),_("div",fu,[m("div",null,"It took you "+D(u(c))+" to beat the game.",1),gu,mu,hu,m("div",null,[m("a",{href:u(i),class:"game-over-modal-discord-link"},[vu,T(" "+D(u(r)),1)],8,pu)]),y(we,{title:"Autosave",modelValue:u(g),"onUpdate:modelValue":k[0]||(k[0]=C=>te(g)?g.value=C:null)},null,8,["modelValue"])])):$("",!0)]),footer:V(()=>[m("div",{class:"game-over-footer"},[m("button",{onClick:b,class:"button"},"Keep Going"),m("button",{onClick:v,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var yu=z(bu,[["__scopeId","data-v-4a50ce42"]]);const xt=e=>(Ie("data-v-d3bb0716"),e=e(),Me(),e),_u=xt(()=>m("div",{class:"nan-modal-header"},[m("h2",null,"NaN value detected!")],-1)),Nu={key:0},wu=xt(()=>m("br",null,null,-1)),Cu=["href"],ku=xt(()=>m("span",{class:"material-icons nan-modal-discord"},"discord",-1)),Su=xt(()=>m("br",null,null,-1)),Iu={class:"nan-footer"},Mu=q({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:n}=A,r=F(!0),i=F(!0),s=ke(J,"hasNaN"),o=F(null);_e(s,N=>{N?(r.value=x.autosave,i.value=x.devSpeed===0):(x.autosave=r.value,x.devSpeed=i.value?0:null)});const c=P(()=>{var N;return(N=J.NaNPath)==null?void 0:N.join(".")}),d=P(()=>J.NaNPersistent!=null?J.NaNPersistent.value:null);function g(){J.NaNPersistent!=null&&(J.NaNPersistent.value=new l(0),J.hasNaN=!1)}function b(){J.NaNPersistent&&(J.NaNPersistent.value=new l(1),J.hasNaN=!1)}function v(){J.NaNPersistent&&(J.NaNPersistent.value=new l(NaN),J.hasNaN=!1)}return(N,k)=>(p(),_(j,null,[y(je,Oe({modelValue:u(s),"onUpdate:modelValue":k[4]||(k[4]=I=>te(s)?s.value=I:null)},N.$attrs),{header:V(()=>[_u]),body:V(()=>[m("div",null,[T(' Attempted to assign "'+D(u(c))+'" to NaN',1),u(d)?(p(),_("span",Nu,D(" ")+"(previously "+D(u(Se)(u(d)))+")",1)):$("",!0),T(". Auto-saving has been "+D(r.value?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),wu,m("div",null,[m("a",{href:u(n)||"https://discord.gg/yJ4fjnjU54",class:"nan-modal-discord-link"},[ku,T(" "+D(u(t)||"Profectus & Friends"),1)],8,Cu)]),Su,y(we,{title:"Autosave",modelValue:r.value,"onUpdate:modelValue":k[0]||(k[0]=I=>r.value=I)},null,8,["modelValue"]),u(A).enablePausing?(p(),L(we,{key:0,title:"Pause game",modelValue:i.value,"onUpdate:modelValue":k[1]||(k[1]=I=>i.value=I)},null,8,["modelValue"])):$("",!0)]),footer:V(()=>[m("div",Iu,[m("button",{onClick:k[2]||(k[2]=I=>{var C;return(C=o.value)==null?void 0:C.open()}),class:"button"},"Open Saves Manager"),m("button",{onClick:g,class:"button"},"Set to 0"),m("button",{onClick:b,class:"button"},"Set to 1"),u(d)&&u(l).neq(u(d),0)&&u(l).neq(u(d),1)?(p(),_("button",{key:0,onClick:k[3]||(k[3]=I=>s.value=!1),class:"button"}," Set to previous ")):$("",!0),m("button",{onClick:v,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),y(Pn,{ref_key:"savesManager",ref:o},null,512)],64))}});var $u=z(Mu,[["__scopeId","data-v-d3bb0716"]]);const xu={key:0,class:"tpsDisplay"},Fu=q({__name:"TPS",setup(e){const t=P(()=>l.div(J.lastTenTicks.length,J.lastTenTicks.reduce((n,r)=>n+r,0)));return(n,r)=>u(t).isNan()?$("",!0):(p(),_("div",xu,"TPS: "+D(u(st)(u(t))),1))}});var Tu=z(Fu,[["__scopeId","data-v-89b89152"]]);var Pu=q({__name:"App",setup(e){const t=A.useHeader,n=P(()=>At[ne.theme].variables),r=ke(ne,"showTPS"),i=ke(J,"errors"),s=P(()=>ue(ee(()=>y(j,null,[Ni.map(ut)]))));return(o,c)=>u(i).length>0?(p(),_("div",{key:0,class:"error-container",style:ge(u(n))},[y(dn,{errors:u(i)},null,8,["errors"])],4)):(p(),_(j,{key:1},[m("div",{id:"modal-root",style:ge(u(n))},null,4),m("div",{class:ae(["app",{useHeader:u(t)}]),style:ge(u(n))},[u(t)?(p(),L(En,{key:0})):$("",!0),y(al),u(u(r))?(p(),L(Tu,{key:1})):$("",!0),y(yu),y($u),(p(),L(ie(u(s))))],6)],64))}});var Eu=z(Pu,[["__scopeId","data-v-bf4e22ac"]]);se.on("setupVue",e=>e.use(Zn));function Ou(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:r,onRegistered:i,onRegisteredSW:s,onRegisterError:o}=e;let c,d,g,b;const v=async(k=!0)=>{await g,k&&(c==null||c.addEventListener("controlling",I=>{I.isUpdate&&window.location.reload()})),await(b==null?void 0:b())};async function N(){if("serviceWorker"in navigator){const{Workbox:k,messageSW:I}=await it(()=>import("./workbox-window.4a8794bb.js"),[]);b=async()=>{d&&d.waiting&&await I(d.waiting,{type:"SKIP_WAITING"})},c=new k("./sw.js",{scope:"./",type:"classic"}),c.addEventListener("activated",C=>{C.isUpdate||r==null||r()});{const C=()=>{n==null||n()};c.addEventListener("waiting",C),c.addEventListener("externalwaiting",C)}c.register({immediate:t}).then(C=>{d=C,s?s("./sw.js",C):i==null||i(C)}).catch(C=>{o==null||o(C)})}}return g=N(),v}function Vu(e={}){const{immediate:t=!0,onNeedRefresh:n,onOfflineReady:r,onRegistered:i,onRegisteredSW:s,onRegisterError:o}=e,c=F(!1),d=F(!1);return{updateServiceWorker:Ou({immediate:t,onNeedRefresh(){c.value=!0,n==null||n()},onOfflineReady(){d.value=!0,r==null||r()},onRegistered:i,onRegisteredSW:s,onRegisterError:o}),offlineReady:d,needRefresh:c}}const Kt=console.error;console.error=function(...e){Kt(...e)};window.onerror=function(e,t,n,r,i){return J.errors.push(i instanceof Error?i:new Error(JSON.stringify(i))),Kt(i),!0};window.onunhandledrejection=function(e){J.errors.push(e.reason instanceof Error?e.reason:new Error(JSON.stringify(e.reason))),Kt(e.reason)};document.title=A.title;window.projInfo=A;A.id===""&&console.error("Project ID is empty!","Please select a unique ID for this project in /src/data/projInfo.json");requestAnimationFrame(async()=>{console.log(`%cMade in Profectus%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 pi();const{globalBus:e}=await it(()=>Promise.resolve().then(function(){return hi}),void 0),{startGameLoop:t}=await it(()=>import("./gameLoop.71ff8eae.js"),["assets/gameLoop.71ff8eae.js","assets/@fontsource.f66d05e7.css","assets/vue.a1abd053.js","assets/lz-string.bfbf8ec3.js","assets/@vue.6f8187b0.js","assets/nanoevents.1080beb7.js","assets/vue-next-select.dc61a6b4.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.a6e9addf.js","assets/sortablejs.c0c43fa8.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-toastification.6c7eee09.js","assets/vue-toastification.4b5f8ac8.css"]),n=window.vue=jn(Eu);n.config.errorHandler=function(r,i,s){console.error(r,s,i)},e.emit("setupVue",n),n.mount("#app"),Ue(()=>{const r=Kn(),{updateServiceWorker:i}=Vu({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(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{l as D,it as _,J as a,A as b,ou as c,se as g,Bt as l,x as p,ne as s}; +${M}`)}}return g[S]}_e(n,S=>{S&&Object.keys(g).forEach(M=>delete g[M])});const v=P(()=>ne.saves.reduce((S,M)=>(S[M]=b(M),S),{}));function N(S){let M;switch(x.id===S?M=Lt(x):M=JSON.stringify(v.value[S]),A.exportEncoding){default:console.warn(`Unknown save encoding: ${A.exportEncoding}. Defaulting to lz`);case"lz":M=Ce.compressToUTF16(M);break;case"base64":M=btoa(unescape(encodeURIComponent(M)));break;case"plain":break}const U=document.createElement("textarea");U.value=M,document.body.appendChild(U),U.select(),U.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(U)}function k(S){x.id===S&&fe();const M={...v.value[S],id:mt()};fe(M),ne.saves.push(M.id)}function I(S){ne.saves=ne.saves.filter(M=>M!==S),localStorage.removeItem(S),g[S]=void 0}function C(S){v.value[x.id].time=x.time,fe(),g[x.id]=void 0,qe(v.value[S]),g[S]=void 0}function G(S){if(o.value=S,Ue(()=>{o.value=null}),S[0]!=="{")if(S[0]==="e")S=decodeURIComponent(escape(atob(S)));else if(S[0]==="\u1BE1")S=Ce.decompressFromUTF16(S);else{console.warn("Unable to determine preset encoding",S);return}const M=JSON.parse(S);M.id=mt(),fe(M),ne.saves.push(M.id),C(M.id)}function Y(S,M){const U=v.value[S];U!=null&&(U.name=M,x.id===S?(x.name=M,fe()):(fe(U),g[S]=void 0))}return(S,M)=>(p(),L(je,{modelValue:n.value,"onUpdate:modelValue":M[4]||(M[4]=U=>n.value=U),ref_key:"modal",ref:r},{header:V(()=>[ko]),body:V(({shown:U})=>[U?(p(),L(u(Wn),{key:0,list:u(ne).saves,handle:".handle",itemKey:Ne=>Ne},{item:V(({element:Ne})=>[y(Co,{save:u(v)[Ne],onOpen:oe=>C(Ne),onExport:oe=>N(Ne),onEditName:oe=>Y(Ne,oe),onDuplicate:oe=>k(Ne),onDelete:oe=>I(Ne)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):$("",!0)]),footer:V(()=>[m("div",So,[y(Tn,{modelValue:s.value,"onUpdate:modelValue":M[0]||(M[0]=U=>s.value=U),title:"Import Save",placeholder:"Paste your save here!",class:ae({importingFailed:i.value})},null,8,["modelValue","class"]),m("div",Io,[Mo,m("div",$o,[m("button",{class:"button",onClick:M[1]||(M[1]=U=>C(u(Je)().id))},"New Game"),Object.keys(u(d)).length>0?(p(),L(Fn,{key:0,options:u(d),modelValue:o.value,"onUpdate:modelValue":M[2]||(M[2]=U=>G(U)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):$("",!0)])]),m("div",xo,[Fo,m("button",{class:"button modal-default-button",onClick:M[3]||(M[3]=U=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Pn=z(To,[["__scopeId","data-v-2a4275be"]]);const me=e=>(Ie("data-v-47c54e31"),e=e(),Me(),e),Po=["src","alt"],Eo={key:1,class:"title"},Oo=me(()=>m("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),Vo={class:"discord"},Do={class:"discord-links"},Lo={key:0},Ro=["href"],qo=me(()=>m("li",null,[m("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"Profectus & Friends")],-1)),Ao=me(()=>m("li",null,[m("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Bo={href:"https://forums.moddingtree.com/",target:"_blank"},Uo=me(()=>m("span",{class:"material-icons"},"forum",-1)),zo=me(()=>m("span",{class:"material-icons"},"info",-1)),Go=me(()=>m("span",{class:"material-icons"},"library_books",-1)),jo=me(()=>m("span",{class:"material-icons"},"settings",-1)),Ho=me(()=>m("span",{class:"material-icons"},"library_books",-1)),Wo=me(()=>m("span",{class:"material-icons"},"settings",-1)),Jo=me(()=>m("span",{class:"material-icons"},"info",-1)),Zo={href:"https://forums.moddingtree.com/",target:"_blank"},Ko=me(()=>m("span",{class:"material-icons"},"forum",-1)),Yo={class:"discord"},Xo={class:"discord-links"},Qo={key:0},el=["href"],tl=me(()=>m("li",null,[m("a",{href:"https://discord.gg/yJ4fjnjU54",target:"_blank"},"Profectus & Friends")],-1)),nl=me(()=>m("li",null,[m("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),rl=q({__name:"Nav",setup(e){const t=F(null),n=F(null),r=F(null),i=F(null),{useHeader:s,banner:o,title:c,discordName:d,discordLink:g,versionNumber:b}=A;function v(){window.open(g,"mywindow")}return(N,k)=>(p(),_(j,null,[u(s)?(p(),_("div",Oe({key:0,class:"nav"},N.$attrs),[u(o)?(p(),_("img",{key:0,src:u(o),class:"banner",alt:u(c)},null,8,Po)):(p(),_("div",Eo,D(u(c)),1)),m("div",{onClick:k[0]||(k[0]=I=>{var C;return(C=i.value)==null?void 0:C.open()}),class:"version-container"},[y(Q,{display:"Changelog",direction:u(Z).Down,class:"version"},{default:V(()=>[m("span",null,"v"+D(u(b)),1)]),_:1},8,["direction"])]),Oo,m("div",Vo,[m("span",{onClick:v,class:"material-icons"},"discord"),m("ul",Do,[u(g)?(p(),_("li",Lo,[m("a",{href:u(g),target:"_blank"},D(u(d)),9,Ro)])):$("",!0),qo,Ao])]),m("div",null,[m("a",Bo,[y(Q,{display:"Forums",direction:u(Z).Down,yoffset:"5px"},{default:V(()=>[Uo]),_:1},8,["direction"])])]),m("div",{onClick:k[1]||(k[1]=I=>{var C;return(C=t.value)==null?void 0:C.open()})},[y(Q,{display:"Info",direction:u(Z).Down,class:"info"},{default:V(()=>[zo]),_:1},8,["direction"])]),m("div",{onClick:k[2]||(k[2]=I=>{var C;return(C=n.value)==null?void 0:C.open()})},[y(Q,{display:"Saves",direction:u(Z).Down,xoffset:"-20px"},{default:V(()=>[Go]),_:1},8,["direction"])]),m("div",{onClick:k[3]||(k[3]=I=>{var C;return(C=r.value)==null?void 0:C.open()})},[y(Q,{display:"Settings",direction:u(Z).Down,xoffset:"-66px"},{default:V(()=>[jo]),_:1},8,["direction"])])],16)):(p(),_("div",Oe({key:1,class:"overlay-nav"},N.$attrs),[m("div",{onClick:k[4]||(k[4]=I=>{var C;return(C=i.value)==null?void 0:C.open()}),class:"version-container"},[y(Q,{display:"Changelog",direction:u(Z).Right,xoffset:"25%",class:"version"},{default:V(()=>[m("span",null,"v"+D(u(b)),1)]),_:1},8,["direction"])]),m("div",{onClick:k[5]||(k[5]=I=>{var C;return(C=n.value)==null?void 0:C.open()})},[y(Q,{display:"Saves",direction:u(Z).Right},{default:V(()=>[Ho]),_:1},8,["direction"])]),m("div",{onClick:k[6]||(k[6]=I=>{var C;return(C=r.value)==null?void 0:C.open()})},[y(Q,{display:"Settings",direction:u(Z).Right},{default:V(()=>[Wo]),_:1},8,["direction"])]),m("div",{onClick:k[7]||(k[7]=I=>{var C;return(C=t.value)==null?void 0:C.open()})},[y(Q,{display:"Info",direction:u(Z).Right},{default:V(()=>[Jo]),_:1},8,["direction"])]),m("div",null,[m("a",Zo,[y(Q,{display:"Forums",direction:u(Z).Right,xoffset:"7px"},{default:V(()=>[Ko]),_:1},8,["direction"])])]),m("div",Yo,[m("span",{onClick:v,class:"material-icons"},"discord"),m("ul",Xo,[u(g)?(p(),_("li",Qo,[m("a",{href:u(g),target:"_blank"},D(u(d)),9,el)])):$("",!0),tl,nl])])],16)),y(La,{ref_key:"info",ref:t,changelog:i.value},null,8,["changelog"]),y(Pn,{ref_key:"savesManager",ref:n},null,512),y(Wa,{ref_key:"options",ref:r},null,512),y(ba,{ref_key:"changelog",ref:i},null,512)],64))}});var En=z(rl,[["__scopeId","data-v-47c54e31"]]);const il={class:"inner-tab"},sl=q({__name:"Game",setup(e){const t=ke(x,"tabs"),n=P(()=>Object.keys(le)),r=A.useHeader;function i(s){const{display:o,minimized:c,name:d,color:g,minimizable:b,nodes:v,minimizedDisplay:N}=s;return{display:o,minimized:c,name:d,color:g,minimizable:b,nodes:v,minimizedDisplay:N}}return(s,o)=>(p(),_("div",{class:ae(["tabs-container",{useHeader:u(r)}])},[(p(!0),_(j,null,Le(u(t),(c,d)=>{var g,b;return p(),_("div",{key:d,class:ae(["tab",u((g=u(le)[c])==null?void 0:g.classes)]),style:ge(u((b=u(le)[c])==null?void 0:b.style))},[d===0&&!u(r)?(p(),L(En,{key:0})):$("",!0),m("div",il,[u(n).includes(c)?(p(),L(ma,Oe({key:0},i(u(le)[c]),{index:d,onSetMinimized:v=>u(le)[c].minimized.value=v}),null,16,["index","onSetMinimized"])):(p(),L(ie(c),{key:1,index:d},null,8,["index"]))])],6)}),128))],2))}});var al=z(sl,[["__scopeId","data-v-dcd207b4"]]);const ol=q({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(p(),_("div",{style:ge({width:e.width,height:e.height})},null,4))}});function On(e,t="points",n=0,r=void 0){const i=te(e)?e:ct(e);if(i.displayName=t,i.precision=n,i.small=r,!te(e)){const s=i[Fe];s.displayName=t,s.precision=n,s.small=r}return i}function ll(e){const t=ct(e.value);return _e(e,n=>{Bt.value||l.gt(n,t.value)&&(t.value=n)}),t}function ul(e){const t=ct(e.value);return _e(e,(n,r)=>{Bt.value||l.gt(n,r)&&(t.value=l.add(t.value,l.sub(n,r)))}),t}const cl=new l("10^^8"),dl=new l("1e100");function fl(e,t){const n=F(0),r=F(0),i=F(0);return se.on("update",o=>{if(r.value=0,l.lte(e.value,dl)){i.value=e.value;return}let c=e.value,d=i.value;if(i.value=c,l.gt(c,d))if(l.gte(c,cl))c=l.slog(c,1e10),d=l.slog(d,1e10),n.value=c.sub(d).div(o),r.value=-1;else for(;l.div(c,d).log(10).div(o).gte("100")&&r.value<=5&&l.gt(d,0);)c=l.log10(c),d=l.log10(d),n.value=c.sub(d).div(o),r.value++}),P(()=>r.value===0?t?Se(t.value,e.precision,e.small)+" "+e.displayName+"/s":"":Se(n.value)+" OOM"+(r.value<0?"^OOM":"^"+r.value)+"s/sec")}function _t(e,t){const n=t!=null?t:e.value;return l.eq(e.precision,0)?st(e.small?n:l.floor(n)):Se(n,e.precision,e.small)}const gl=["x1","y1","x2","y2"],ml=q({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const t=e,n=de(t),r=P(()=>{const o=n.startNode.value.rect,c=n.boundingRect.value,d=c?{x:o.x+o.width/2-c.x,y:o.y+o.height/2-c.y}:{x:0,y:0};return n.link.value.offsetStart&&(d.x+=n.link.value.offsetStart.x,d.y+=n.link.value.offsetStart.y),d}),i=P(()=>{const o=n.endNode.value.rect,c=n.boundingRect.value,d=c?{x:o.x+o.width/2-c.x,y:o.y+o.height/2-c.y}:{x:0,y:0};return n.link.value.offsetEnd&&(d.x+=n.link.value.offsetEnd.x,d.y+=n.link.value.offsetEnd.y),d}),s=P(()=>Ci(t.link));return(o,c)=>(p(),_("line",Oe({"stroke-width":"15px",stroke:"white"},u(s),{x1:u(r).x,y1:u(r).y,x2:u(i).x,y2:u(i).y}),null,16,gl))}});const hl=q({__name:"Links",props:{links:null},setup(e){var d;const n=ke(e,"links"),r=F(null),i=vt(Gt,F({})),s=vt(jt,F(void 0)),o=F((d=r.value)==null?void 0:d.getBoundingClientRect());_e(s,()=>{var g;return o.value=(g=r.value)==null?void 0:g.getBoundingClientRect()}),lt(()=>{var g;return o.value=(g=r.value)==null?void 0:g.getBoundingClientRect()});const c=P(()=>{var b,v;const g=i.value;return(v=(b=n.value)==null?void 0:b.filter(N=>{var k,I;return((k=g[N.startNode.id])==null?void 0:k.rect)&&((I=g[N.startNode.id])==null?void 0:I.rect)}))!=null?v:[]});return(g,b)=>(p(),_(j,null,[u(c)?(p(),_("svg",Gn(Oe({key:0},g.$attrs)),[(p(!0),_(j,null,Le(u(c),(v,N)=>(p(),L(ml,{key:N,link:v,boundingRect:o.value,startNode:u(i)[v.startNode.id],endNode:u(i)[v.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):$("",!0),m("div",{ref_key:"resizeListener",ref:r,class:"resize-listener"},null,512)],64))}});var pl=z(hl,[["__scopeId","data-v-063f6d6b"]]),vl=q({props:{nodes:{type:B(Array),required:!0},leftSideNodes:B(Array),rightSideNodes:B(Array),branches:B(Array)},components:{Links:pl},setup(e){const{nodes:t,leftSideNodes:n,rightSideNodes:r}=de(e),i=be();Be(()=>{const c=ye(t);i.value=ue(ee(()=>y(j,null,[c.map(d=>y("span",{class:"row tree-row",style:"margin: 50px auto;"},[d.map(ht)]))])))});const s=be();Be(()=>{const c=ye(n);s.value=c?ue(ee(()=>y("span",{class:"left-side-nodes small"},[c.map(ht)]))):""});const o=be();return Be(()=>{const c=ye(r);o.value=c?ue(ee(()=>y("span",{class:"side-nodes small"},[c.map(ht)]))):""}),{unref:u,nodesComp:i,leftNodesComp:s,rightNodesComp:o}}});function bl(e,t,n,r,i,s){const o=ze("Links");return p(),_(j,null,[(p(),L(ie(e.nodesComp))),e.leftNodesComp?(p(),L(ie(e.leftNodesComp),{key:0})):$("",!0),e.rightNodesComp?(p(),L(ie(e.rightNodesComp),{key:1})):$("",!0),e.branches?(p(),L(o,{key:2,links:e.unref(e.branches)},null,8,["links"])):$("",!0)],64)}var yl=z(vl,[["render",bl],["__scopeId","data-v-39ca96d0"]]);const _l={key:0},Nl={key:0,class:"mark star"},wl=["src"],Cl=q({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(p(),_("div",_l,[e.mark===!0?(p(),_("div",Nl)):(p(),_("img",{key:1,class:"mark",src:e.mark},null,8,wl))])):$("",!0)}});var Vn=z(Cl,[["__scopeId","data-v-2207999f"]]);const kl=q({__name:"Node",props:{id:null},setup(e){const n=de(e),r=vt(Ut,()=>{}),i=vt(zt,()=>{}),s=be(null),o=P(()=>s.value&&s.value.parentElement);return _e([o,n.id],([c,d],[g,b])=>{g&&i(u(b)),c&&r(d,c)}),ln(()=>i(u(n.id))),(c,d)=>(p(),_("div",{class:"node",ref_key:"node",ref:s},null,512))}});var Dn=z(kl,[["__scopeId","data-v-a48cb382"]]);const Sl=q({props:{display:B(Object,String,Function),visibility:{type:B(Number,Boolean),required:!0},style:B(String,Object,Array),classes:B(Object),onClick:Function,onHold:Function,color:B(String),glowColor:B(String),canClick:{type:B(Boolean),required:!0},mark:B(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Vn,Node:Dn},setup(e){const{onClick:t,onHold:n,display:r}=de(e),i=Qe(r),{start:s,stop:o}=kn(t,n);return{start:s,stop:o,comp:i,unref:u,Visibility:Xe,isCoercableComponent:Mt,isVisible:yn,isHidden:_n}}});function Il(e,t,n,r,i,s){var d;const o=ze("MarkNode"),c=ze("Node");return e.isVisible(e.visibility)?(p(),_("div",{key:0,style:ge({visibility:e.isHidden(e.visibility)?"hidden":void 0}),class:ae({treeNode:!0,can:e.unref(e.canClick),...e.unref(e.classes)}),onClick:t[0]||(t[0]=(...g)=>e.onClick&&e.onClick(...g)),onMousedown:t[1]||(t[1]=(...g)=>e.start&&e.start(...g)),onMouseleave:t[2]||(t[2]=(...g)=>e.stop&&e.stop(...g)),onMouseup:t[3]||(t[3]=(...g)=>e.stop&&e.stop(...g)),onTouchstartPassive:t[4]||(t[4]=(...g)=>e.start&&e.start(...g)),onTouchendPassive:t[5]||(t[5]=(...g)=>e.stop&&e.stop(...g)),onTouchcancelPassive:t[6]||(t[6]=(...g)=>e.stop&&e.stop(...g))},[m("div",{style:ge([{backgroundColor:e.unref(e.color),boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ${e.unref(e.glowColor)}`},(d=e.unref(e.style))!=null?d:[]])},[(p(),L(ie(e.unref(e.comp))))],4),y(o,{mark:e.unref(e.mark)},null,8,["mark"]),y(c,{id:e.id},null,8,["id"])],38)):$("",!0)}var Ml=z(Sl,[["render",Il],["__scopeId","data-v-727230a6"]]);const $l=Symbol("TreeNode"),xl=Symbol("Tree");function Fl(e,...t){const n=t.reduce((r,i)=>{var s;return Object.assign(r,(s=i.getPersistentData)==null?void 0:s.call(i))},{});return He(r=>{var o,c,d;const i=(o=e==null?void 0:e.call(r,r))!=null?o:{};i.id=It("treeNode-"),i.type=$l,i[Pe]=Ml;for(const g of t)(c=g.preConstruct)==null||c.call(g,i);Object.assign(n),E(i,"visibility"),ce(i,"visibility",Xe.Visible),E(i,"canClick"),ce(i,"canClick",!0),E(i,"color"),E(i,"display"),E(i,"glowColor"),E(i,"classes"),E(i,"style"),E(i,"mark");for(const g of t)(d=g.postConstruct)==null||d.call(g,i);if(i.onClick){const g=i.onClick.bind(i);i.onClick=function(b){u(i.canClick)!==!1&&g(b)}}if(i.onHold){const g=i.onHold.bind(i);i.onHold=function(){u(i.canClick)!==!1&&g()}}const s=t.reduce((g,b)=>{var v;return Object.assign(g,(v=b.getGatheredProps)==null?void 0:v.call(b,i))},{});return i[Ee]=function(){const{display:g,visibility:b,style:v,classes:N,onClick:k,onHold:I,color:C,glowColor:G,canClick:Y,mark:S,id:M}=this;return{display:g,visibility:b,style:v,classes:N,onClick:k,onHold:I,color:C,glowColor:G,canClick:Y,mark:S,id:M,...s}},i})}function Tl(e){return He(t=>{const n=e.call(t,t);return n.id=It("tree-"),n.type=xl,n[Pe]=yl,n.isResetting=F(!1),n.resettingNode=be(null),n.reset=function(r){var s,o;const i=n;i.isResetting.value=!0,i.resettingNode.value=r,(s=i.resetPropagation)==null||s.call(i,i,r),(o=i.onReset)==null||o.call(i,r),i.isResetting.value=!1,i.resettingNode.value=null},n.links=P(()=>{var i;return(i=u(n.branches))!=null?i:[]}),E(n,"visibility"),ce(n,"visibility",Xe.Visible),E(n,"nodes"),E(n,"leftSideNodes"),E(n,"rightSideNodes"),E(n,"branches"),n[Ee]=function(){const{nodes:r,leftSideNodes:i,rightSideNodes:s,branches:o}=this;return{nodes:r,leftSideNodes:i,rightSideNodes:s,branches:o}},n})}const Pl=function(e,t){var s;const n=u(e.branches);if(n==null)return;const r=[];let i=[t];for(;i.length!=0;){const o=[];for(const c of i)for(const d of n.filter(g=>g.startNode===c))[...r,...i].includes(d.endNode)||(o.push(d.endNode),(s=d.endNode.reset)==null||s.reset());r.push(...i),i=o}};function El(e,t=null,n=0){const r=Et(n);return P(()=>t==null||l.gte(e.value,u(r))?_t(e)+" "+e.displayName:`Reach ${l.eq(t.precision,0)?st(u(r)):Se(u(r),t.precision)} ${t.displayName} to unlock (You have ${l.eq(t.precision,0)?st(t.value):Se(t.value,t.precision)})`)}function Ol(e,...t){return He(n=>{var i,s;const r=e.call(n,n);for(const o of t)(i=o.preConstruct)==null||i.call(o,r);r.formula=r.formula(a.variable(r.baseResource)),r.currentGain==null&&(r.currentGain=P(()=>{let o=l.floor(r.formula.evaluate(r.baseResource.value)).max(0);return u(r.buyMax)===!1&&(o=o.min(1)),o})),r.actualGain==null&&(r.actualGain=r.currentGain),r.currentAt==null&&(r.currentAt=P(()=>r.formula.invert(l.floor(u(r.currentGain))))),r.nextAt==null&&(r.nextAt=P(()=>r.formula.invert(l.floor(u(r.currentGain)).add(1)))),r.convert==null&&(r.convert=function(){var c;const o=u(r.currentGain);r.gainResource.value=l.add(r.gainResource.value,o),r.spend(o),(c=r.onConvert)==null||c.call(r,o)}),r.spend==null&&(r.spend=function(){r.baseResource.value=0}),E(r,"currentGain"),E(r,"actualGain"),E(r,"currentAt"),E(r,"nextAt"),E(r,"buyMax"),ce(r,"buyMax",!0);for(const o of t)(s=o.postConstruct)==null||s.call(o,r);return r})}function Vl(e){return Ol(e)}const Ln=e=>(Ie("data-v-5e2d38ce"),e=e(),Me(),e),Dl=Ln(()=>m("div",{class:"key"},"Ctrl",-1)),Ll=Ln(()=>m("div",{class:"key"},"Shift",-1)),Rl={class:"key"},ql=q({__name:"Hotkey",props:{hotkey:null},setup(e){const t=e;let n="",r=!1,i=!1,s=!1;return Be(()=>{n=t.hotkey.key,r=n.startsWith("ctrl+"),r&&(n=n.slice(5)),i=n.startsWith("shift+"),i&&(n=n.slice(6)),s=n.length==1&&n.toLowerCase()!=n.toUpperCase(),s&&(n=n.toUpperCase())}),(o,c)=>(p(),_(j,null,[u(r)?(p(),_(j,{key:0},[Dl,T("+")],64)):$("",!0),u(i)?(p(),_(j,{key:1},[Ll,T("+")],64)):$("",!0),m("div",Rl,D(u(n)),1)],64))}});var Al=z(ql,[["__scopeId","data-v-5e2d38ce"]]);const $t=Ct({}),Jt=Symbol("Hotkey"),an=[")","!","@","#","$","%","^","&","*","("];function Bl(e){return He(t=>{const n=e.call(t,t);return n.type=Jt,E(n,"enabled"),ce(n,"enabled",!0),E(n,"description"),n})}se.on("addLayer",e=>{Nn(e,Jt).forEach(t=>{$t[t.key]=t})});se.on("removeLayer",e=>{Nn(e,Jt).forEach(t=>{$t[t.key]=void 0})});document.onkeydown=function(e){var r;if(((r=e.target)==null?void 0:r.tagName)==="INPUT"||Zt.value&&!x.keepGoing)return;let t=e.key;an.includes(t)?t="shift+"+an.indexOf(t):e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const n=$t[t];n&&u(n.enabled)&&(e.preventDefault(),n.onPress())};_i(ee(()=>{const e=Object.values($t).filter(t=>u(t==null?void 0:t.enabled));return e.length===0?"":y("div",null,[y("br",null,null),y("h4",null,[T("Hotkeys")]),y("div",{style:"column-count: 2"},[e.map(t=>y("div",null,[y(Al,{hotkey:t},null),T(" "),t==null?void 0:t.description]))])])}));const Ul=Symbol("Reset");function zl(e){return He(t=>{const n=e.call(t,t);return n.id=It("reset-"),n.type=Ul,n.reset=function(){var i;const r=s=>{if(s!=null&&typeof s=="object"&&!(s instanceof l)&&!(s instanceof a)){if(Vt in s&&s[Vt]===!0)return;if(Ge in s){const o=s;o.value=o[Ge]}else!(s instanceof l)&&!te(s)&&Object.values(s).forEach(o=>r(o))}};u(n.thingsToReset).forEach(r),se.emit("reset",n),(i=n.onReset)==null||i.call(n)},E(n,"thingsToReset"),n})}const gt={};se.on("removeLayer",e=>{var t;(t=gt[e.id])==null||t.call(gt),gt[e.id]=void 0});const Gl=q({__name:"Sticky",setup(e){const t=F("0"),n=new ResizeObserver(i),r=be(null);function i(){let s=r.value;if(s==null)return;let o=0;for(;s.previousSibling;){const c=s.previousSibling;c.dataset&&"vSticky"in c.dataset&&(o+=c.offsetHeight),s=c}t.value=o+"px"}return Ue(i),document.fonts.ready.then(i),lt(()=>{var o;const s=(o=r.value)==null?void 0:o.parentElement;s&&n.observe(s)}),(s,o)=>(p(),_("div",{class:"sticky",style:ge({top:t.value}),ref_key:"element",ref:r,"data-v-sticky":""},[Te(s.$slots,"default",{},void 0,!0)],4))}});var jl=z(Gl,[["__scopeId","data-v-cccac690"]]);const Hl=q({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,n=P(()=>_t(t.resource));return(r,i)=>(p(),_("h2",{style:ge({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},D(u(n)),5))}});const Wl={class:"main-display"},Jl={key:0},Zl={key:1},Kl=q({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null},setup(e){const n=de(e),r=F(null),i=Qe(n.effectDisplay),s=P(()=>l.lt(n.resource.value,"1e1000"));return(o,c)=>(p(),L(jl,null,{default:V(()=>{var d,g,b,v;return[m("div",{class:ae(["main-display-container",(d=e.classes)!=null?d:{}]),style:ge([{height:`${((b=(g=r.value)==null?void 0:g.$el.clientHeight)!=null?b:0)+50}px`},(v=e.style)!=null?v:{}])},[m("div",Wl,[u(s)?(p(),_("span",Jl,"You have ")):$("",!0),y(Hl,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),T(" "+D(e.resource.displayName),1),u(i)?(p(),_("span",Zl,[T(", "),(p(),L(ie(u(i)),{ref_key:"effectRef",ref:r},null,512))])):$("",!0)])],6)]}),_:1}))}});function Yl(e,t){return E(t,"display"),E(t,"classes"),E(t,"style"),E(t,"direction"),ce(t,"direction",Z.Up),E(t,"xoffset"),E(t,"yoffset"),t.pinnable&&(t.pinned=ct(!1,!1)),Ue(()=>{const n=e[Pe];e[Pe]=Q;const r=e[Ee].bind(e);e[Ee]=function(){const{display:s,classes:o,style:c,direction:d,xoffset:g,yoffset:b,pinned:v}=this;return{element:{[Pe]:n,[Ee]:r},display:s,classes:o,style:u(c),direction:d,xoffset:g,yoffset:b,pinned:v}}.bind(t)}),t}var Xl=q({props:{display:{type:B(Object,String,Function),required:!0},visibility:{type:B(Number,Boolean),required:!0},style:B(Object,String,Array),classes:B(Object),onClick:Function,onHold:Function,canClick:{type:B(Boolean),required:!0},small:Boolean,mark:B(Boolean,String),id:{type:String,required:!0}},components:{Node:Dn,MarkNode:Vn},setup(e){const{display:t,onClick:n,onHold:r}=de(e),i=be("");Be(()=>{var b;const c=ye(t);if(c==null){i.value="";return}if(Mt(c)){i.value=ue(c);return}const d=ue((b=c.title)!=null?b:"","h3"),g=ue(c.description,"div");i.value=ue(ee(()=>y("span",null,[c.title!=null?y("div",null,[y(d,null,null)]):null,y(g,null,null)])))});const{start:s,stop:o}=kn(n,r);return{start:s,stop:o,comp:i,Visibility:Xe,isVisible:yn,isHidden:_n,unref:u}}});function Ql(e,t,n,r,i,s){var d;const o=ze("MarkNode"),c=ze("Node");return e.isVisible(e.visibility)?(p(),_("button",{key:0,style:ge([{visibility:e.isHidden(e.visibility)?"hidden":void 0},(d=e.unref(e.style))!=null?d:[]]),onClick:t[0]||(t[0]=(...g)=>e.onClick&&e.onClick(...g)),onMousedown:t[1]||(t[1]=(...g)=>e.start&&e.start(...g)),onMouseleave:t[2]||(t[2]=(...g)=>e.stop&&e.stop(...g)),onMouseup:t[3]||(t[3]=(...g)=>e.stop&&e.stop(...g)),onTouchstartPassive:t[4]||(t[4]=(...g)=>e.start&&e.start(...g)),onTouchendPassive:t[5]||(t[5]=(...g)=>e.stop&&e.stop(...g)),onTouchcancelPassive:t[6]||(t[6]=(...g)=>e.stop&&e.stop(...g)),class:ae({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)?(p(),L(ie(e.unref(e.comp)),{key:0})):$("",!0),y(o,{mark:e.unref(e.mark)},null,8,["mark"]),y(c,{id:e.id},null,8,["id"])],38)):$("",!0)}var eu=z(Xl,[["render",Ql],["__scopeId","data-v-211328c0"]]);const tu=Symbol("Clickable");function nu(e,...t){const n=t.reduce((r,i)=>{var s;return Object.assign(r,(s=i.getPersistentData)==null?void 0:s.call(i))},{});return He(r=>{var o,c,d;const i=(o=e==null?void 0:e.call(r,r))!=null?o:{};i.id=It("clickable-"),i.type=tu,i[Pe]=eu;for(const g of t)(c=g.preConstruct)==null||c.call(g,i);if(Object.assign(i,n),E(i,"visibility"),ce(i,"visibility",Xe.Visible),E(i,"canClick"),ce(i,"canClick",!0),E(i,"classes"),E(i,"style"),E(i,"mark"),E(i,"display"),i.onClick){const g=i.onClick.bind(i);i.onClick=function(b){u(i.canClick)!==!1&&g(b)}}if(i.onHold){const g=i.onHold.bind(i);i.onHold=function(){u(i.canClick)!==!1&&g()}}for(const g of t)(d=g.postConstruct)==null||d.call(g,i);const s=t.reduce((g,b)=>{var v;return Object.assign(g,(v=b.getGatheredProps)==null?void 0:v.call(b,i))},{});return i[Ee]=function(){const{display:g,visibility:b,style:v,classes:N,onClick:k,onHold:I,canClick:C,small:G,mark:Y,id:S}=this;return{display:g,visibility:b,style:u(v),classes:N,onClick:k,onHold:I,canClick:C,small:G,mark:Y,id:S,...s}},i})}function ru(e){return nu(t=>{const n=e.call(t,t);E(n,"showNextAt"),ce(n,"showNextAt",!0),ce(n,"minimumGain",1),n.resetDescription==null?n.resetDescription=P(()=>l.lt(n.conversion.gainResource.value,1e3)?"Reset for ":""):E(n,"resetDescription"),n.display==null&&(n.display=ee(()=>y("span",null,[u(n.resetDescription),y("b",null,[_t(n.conversion.gainResource,l.max(u(n.conversion.actualGain),u(n.minimumGain)))])," ",n.conversion.gainResource.displayName,u(n.showNextAt)!=null?y("div",null,[y("br",null,null),u(n.conversion.buyMax)?"Next:":"Req:"," ",_t(n.conversion.baseResource,!u(n.conversion.buyMax)&&l.gte(u(n.conversion.actualGain),1)?u(n.conversion.currentAt):u(n.conversion.nextAt))," ",n.conversion.baseResource.displayName]):null]))),n.canClick==null&&(n.canClick=P(()=>l.gte(u(n.conversion.actualGain),u(n.minimumGain))));const r=n.onClick;return n.onClick=function(i){u(n.canClick)!==!1&&(n.conversion.convert(),n.tree.reset(n.treeNode),n.resetTime&&(n.resetTime.value=n.resetTime[Ge]),r==null||r(i))},n})}function iu(e){return Fl(t=>{const n=e.call(t,t);return ce(n,"display",bn(n.layerID)),E(n,"append"),{...n,onClick:u(n.append)?function(){if(x.tabs.includes(n.layerID)){const r=x.tabs.lastIndexOf(n.layerID);x.tabs.splice(r,1)}else x.tabs.push(n.layerID)}:function(){x.tabs.splice(1,1,n.layerID)}}})}const on="p",Nt=Ht(on,function(){const e="Prestige",t="#4BDC13",n=On(0,"prestige points"),r=Vl(()=>({formula:g=>g.div(10).sqrt(),baseResource:wt.points,gainResource:n})),i=zl(()=>({thingsToReset:()=>[Nt]})),s=iu(()=>({layerID:on,color:t,reset:i})),o=Yl(s,{display:El(n),pinnable:!0}),c=ru(()=>({conversion:r,tree:wt.tree,treeNode:s})),d=Bl(()=>({description:"Reset for prestige points",key:"p",onPress:c.onClick}));return{name:e,color:t,points:n,tooltip:o,display:ee(()=>y(j,null,[y(Kl,{resource:n,color:t},null),ut(c)])),treeNode:s,hotkey:d}}),wt=Ht("main",function(){const e=On(10),t=ll(e),n=ul(e),r=P(()=>new l(1));se.on("update",o=>{e.value=l.add(e.value,l.times(r.value,o))});const i=fl(e,r),s=Tl(()=>({nodes:[[Nt.treeNode]],branches:[],onReset(){e.value=Xt(this.resettingNode.value)===Xt(Nt.treeNode)?0:10,t.value=e.value,n.value=e.value},resetPropagation:Pl}));return{name:"Tree",links:s.links,display:ee(()=>y(j,null,[x.devSpeed===0?y("div",null,[T("Game Paused")]):null,x.devSpeed!=null&&x.devSpeed!==0&&x.devSpeed!==1?y("div",null,[T("Dev Speed: "),Se(x.devSpeed),T("x")]):null,x.offlineTime!=null&&x.offlineTime!==0?y("div",null,[T("Offline Time: "),St(x.offlineTime)]):null,y("div",null,[l.lt(e.value,"1e1000")?y("span",null,[T("You have ")]):null,y("h2",null,[Se(e.value)]),l.lt(e.value,"1e1e6")?y("span",null,[T(" points")]):null]),l.gt(r.value,0)?y("div",null,[T("("),i.value,T(")")]):null,y(ol,null,null),ut(s)])),points:e,best:t,total:n,oomps:i,tree:s}}),su=e=>[wt,Nt],Zt=P(()=>!1);function au(e,t){}var ou=Object.freeze(Object.defineProperty({__proto__:null,main:wt,getInitialLayers:su,hasWon:Zt,fixOldSave:au},Symbol.toStringTag,{value:"Module"}));const dt=e=>(Ie("data-v-4a50ce42"),e=e(),Me(),e),lu={class:"game-over-modal-header"},uu=["src","alt"],cu={class:"game-over-modal-title"},du=dt(()=>m("h2",null,"Congratulations!",-1)),fu={key:0},gu=dt(()=>m("br",null,null,-1)),mu=dt(()=>m("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),hu=dt(()=>m("br",null,null,-1)),pu=["href"],vu=dt(()=>m("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),bu=q({__name:"GameOverScreen",setup(e){const{title:t,logo:n,discordName:r,discordLink:i,versionNumber:s,versionTitle:o}=A,c=P(()=>St(x.timePlayed)),d=P(()=>Zt.value&&!x.keepGoing),g=ke(x,"autosave");function b(){x.keepGoing=!0}function v(){qe(Je())}return(N,k)=>(p(),L(je,{"model-value":u(d)},{header:V(()=>[m("div",lu,[u(n)?(p(),_("img",{key:0,class:"game-over-modal-logo",src:u(n),alt:u(t)},null,8,uu)):$("",!0),m("div",cu,[du,m("h4",null,"You've beaten "+D(u(t))+" v"+D(u(s))+": "+D(u(o)),1)])])]),body:V(({shown:I})=>[I?(p(),_("div",fu,[m("div",null,"It took you "+D(u(c))+" to beat the game.",1),gu,mu,hu,m("div",null,[m("a",{href:u(i),class:"game-over-modal-discord-link"},[vu,T(" "+D(u(r)),1)],8,pu)]),y(we,{title:"Autosave",modelValue:u(g),"onUpdate:modelValue":k[0]||(k[0]=C=>te(g)?g.value=C:null)},null,8,["modelValue"])])):$("",!0)]),footer:V(()=>[m("div",{class:"game-over-footer"},[m("button",{onClick:b,class:"button"},"Keep Going"),m("button",{onClick:v,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var yu=z(bu,[["__scopeId","data-v-4a50ce42"]]);const xt=e=>(Ie("data-v-d3bb0716"),e=e(),Me(),e),_u=xt(()=>m("div",{class:"nan-modal-header"},[m("h2",null,"NaN value detected!")],-1)),Nu={key:0},wu=xt(()=>m("br",null,null,-1)),Cu=["href"],ku=xt(()=>m("span",{class:"material-icons nan-modal-discord"},"discord",-1)),Su=xt(()=>m("br",null,null,-1)),Iu={class:"nan-footer"},Mu=q({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:n}=A,r=F(!0),i=F(!0),s=ke(J,"hasNaN"),o=F(null);_e(s,N=>{N?(r.value=x.autosave,i.value=x.devSpeed===0):(x.autosave=r.value,x.devSpeed=i.value?0:null)});const c=P(()=>{var N;return(N=J.NaNPath)==null?void 0:N.join(".")}),d=P(()=>J.NaNPersistent!=null?J.NaNPersistent.value:null);function g(){J.NaNPersistent!=null&&(J.NaNPersistent.value=new l(0),J.hasNaN=!1)}function b(){J.NaNPersistent&&(J.NaNPersistent.value=new l(1),J.hasNaN=!1)}function v(){J.NaNPersistent&&(J.NaNPersistent.value=new l(NaN),J.hasNaN=!1)}return(N,k)=>(p(),_(j,null,[y(je,Oe({modelValue:u(s),"onUpdate:modelValue":k[4]||(k[4]=I=>te(s)?s.value=I:null)},N.$attrs),{header:V(()=>[_u]),body:V(()=>[m("div",null,[T(' Attempted to assign "'+D(u(c))+'" to NaN',1),u(d)?(p(),_("span",Nu,D(" ")+"(previously "+D(u(Se)(u(d)))+")",1)):$("",!0),T(". Auto-saving has been "+D(r.value?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),wu,m("div",null,[m("a",{href:u(n)||"https://discord.gg/yJ4fjnjU54",class:"nan-modal-discord-link"},[ku,T(" "+D(u(t)||"Profectus & Friends"),1)],8,Cu)]),Su,y(we,{title:"Autosave",modelValue:r.value,"onUpdate:modelValue":k[0]||(k[0]=I=>r.value=I)},null,8,["modelValue"]),u(A).enablePausing?(p(),L(we,{key:0,title:"Pause game",modelValue:i.value,"onUpdate:modelValue":k[1]||(k[1]=I=>i.value=I)},null,8,["modelValue"])):$("",!0)]),footer:V(()=>[m("div",Iu,[m("button",{onClick:k[2]||(k[2]=I=>{var C;return(C=o.value)==null?void 0:C.open()}),class:"button"},"Open Saves Manager"),m("button",{onClick:g,class:"button"},"Set to 0"),m("button",{onClick:b,class:"button"},"Set to 1"),u(d)&&u(l).neq(u(d),0)&&u(l).neq(u(d),1)?(p(),_("button",{key:0,onClick:k[3]||(k[3]=I=>s.value=!1),class:"button"}," Set to previous ")):$("",!0),m("button",{onClick:v,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),y(Pn,{ref_key:"savesManager",ref:o},null,512)],64))}});var $u=z(Mu,[["__scopeId","data-v-d3bb0716"]]);const xu={key:0,class:"tpsDisplay"},Fu=q({__name:"TPS",setup(e){const t=P(()=>l.div(J.lastTenTicks.length,J.lastTenTicks.reduce((n,r)=>n+r,0)));return(n,r)=>u(t).isNan()?$("",!0):(p(),_("div",xu,"TPS: "+D(u(st)(u(t))),1))}});var Tu=z(Fu,[["__scopeId","data-v-89b89152"]]);var Pu=q({__name:"App",setup(e){const t=A.useHeader,n=P(()=>At[ne.theme].variables),r=ke(ne,"showTPS"),i=ke(J,"errors"),s=P(()=>ue(ee(()=>y(j,null,[Ni.map(ut)]))));return(o,c)=>u(i).length>0?(p(),_("div",{key:0,class:"error-container",style:ge(u(n))},[y(dn,{errors:u(i)},null,8,["errors"])],4)):(p(),_(j,{key:1},[m("div",{id:"modal-root",style:ge(u(n))},null,4),m("div",{class:ae(["app",{useHeader:u(t)}]),style:ge(u(n))},[u(t)?(p(),L(En,{key:0})):$("",!0),y(al),u(u(r))?(p(),L(Tu,{key:1})):$("",!0),y(yu),y($u),(p(),L(ie(u(s))))],6)],64))}});var Eu=z(Pu,[["__scopeId","data-v-bf4e22ac"]]);se.on("setupVue",e=>e.use(Zn));function Ou(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:r,onRegistered:i,onRegisteredSW:s,onRegisterError:o}=e;let c,d,g,b;const v=async(k=!0)=>{await g,k&&(c==null||c.addEventListener("controlling",I=>{I.isUpdate&&window.location.reload()})),await(b==null?void 0:b())};async function N(){if("serviceWorker"in navigator){const{Workbox:k,messageSW:I}=await it(()=>import("./workbox-window.4a8794bb.js"),[]);b=async()=>{d&&d.waiting&&await I(d.waiting,{type:"SKIP_WAITING"})},c=new k("./sw.js",{scope:"./",type:"classic"}),c.addEventListener("activated",C=>{C.isUpdate||r==null||r()});{const C=()=>{n==null||n()};c.addEventListener("waiting",C),c.addEventListener("externalwaiting",C)}c.register({immediate:t}).then(C=>{d=C,s?s("./sw.js",C):i==null||i(C)}).catch(C=>{o==null||o(C)})}}return g=N(),v}function Vu(e={}){const{immediate:t=!0,onNeedRefresh:n,onOfflineReady:r,onRegistered:i,onRegisteredSW:s,onRegisterError:o}=e,c=F(!1),d=F(!1);return{updateServiceWorker:Ou({immediate:t,onNeedRefresh(){c.value=!0,n==null||n()},onOfflineReady(){d.value=!0,r==null||r()},onRegistered:i,onRegisteredSW:s,onRegisterError:o}),offlineReady:d,needRefresh:c}}const Kt=console.error;console.error=function(...e){Kt(...e)};window.onerror=function(e,t,n,r,i){return J.errors.push(i instanceof Error?i:new Error(JSON.stringify(i))),Kt(i),!0};window.onunhandledrejection=function(e){J.errors.push(e.reason instanceof Error?e.reason:new Error(JSON.stringify(e.reason))),Kt(e.reason)};document.title=A.title;window.projInfo=A;A.id===""&&console.error("Project ID is empty!","Please select a unique ID for this project in /src/data/projInfo.json");requestAnimationFrame(async()=>{console.log(`%cMade in Profectus%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 pi();const{globalBus:e}=await it(()=>Promise.resolve().then(function(){return hi}),void 0),{startGameLoop:t}=await it(()=>import("./gameLoop.c4942976.js"),["assets/gameLoop.c4942976.js","assets/@fontsource.f66d05e7.css","assets/vue.a1abd053.js","assets/lz-string.bfbf8ec3.js","assets/@vue.6f8187b0.js","assets/nanoevents.1080beb7.js","assets/vue-next-select.dc61a6b4.js","assets/vue-next-select.9e6f4164.css","assets/vuedraggable.a6e9addf.js","assets/sortablejs.c0c43fa8.js","assets/vue-textarea-autosize.35804eaf.js","assets/vue-toastification.6c7eee09.js","assets/vue-toastification.4b5f8ac8.css"]),n=window.vue=jn(Eu);n.config.errorHandler=function(r,i,s){console.error(r,s,i)},e.emit("setupVue",n),n.mount("#app"),Ue(()=>{const r=Kn(),{updateServiceWorker:i}=Vu({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(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{l as D,it as _,J as a,A as b,ou as c,se as g,Bt as l,x as p,ne as s}; diff --git a/index.html b/index.html index 1dd7411..3803e6a 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ Profectus - + diff --git a/sw.js b/sw.js index 063ae94..f0bbbe7 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,r)=>{const l=e||("document"in self?document.currentScript.src:"")||location.href;if(s[l])return;let a={};const o=e=>i(e,l),u={module:{uri:l},exports:a,require:o};s[l]=Promise.all(n.map((e=>u[e]||o(e)))).then((e=>(r(...e),a)))}}define(["./workbox-7369c0e1"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"assets/@fontsource.f66d05e7.css",revision:null},{url:"assets/@vue.6f8187b0.js",revision:null},{url:"assets/gameLoop.71ff8eae.js",revision:null},{url:"assets/index.0082bab1.css",revision:null},{url:"assets/index.a18c86c0.js",revision:null},{url:"assets/lz-string.bfbf8ec3.js",revision:null},{url:"assets/nanoevents.1080beb7.js",revision:null},{url:"assets/sortablejs.c0c43fa8.js",revision:null},{url:"assets/vue-next-select.9e6f4164.css",revision:null},{url:"assets/vue-next-select.dc61a6b4.js",revision:null},{url:"assets/vue-textarea-autosize.35804eaf.js",revision:null},{url:"assets/vue-toastification.4b5f8ac8.css",revision:null},{url:"assets/vue-toastification.6c7eee09.js",revision:null},{url:"assets/vue.a1abd053.js",revision:null},{url:"assets/vuedraggable.a6e9addf.js",revision:null},{url:"assets/workbox-window.4a8794bb.js",revision:null},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"favicon.svg",revision:"c8dd2748f1fedd25449164d7dda6aecb"},{url:"index.html",revision:"2b79a9fbd9b80450076dedc9d369badf"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"robots.txt",revision:"5e0bd1c281a62a380d7a948085bfe2d1"},{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"49b9cd04ee2139bfe785f8100ba3f74f"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))})); +if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,r)=>{const l=e||("document"in self?document.currentScript.src:"")||location.href;if(s[l])return;let a={};const o=e=>i(e,l),u={module:{uri:l},exports:a,require:o};s[l]=Promise.all(n.map((e=>u[e]||o(e)))).then((e=>(r(...e),a)))}}define(["./workbox-7369c0e1"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"assets/@fontsource.f66d05e7.css",revision:null},{url:"assets/@vue.6f8187b0.js",revision:null},{url:"assets/gameLoop.c4942976.js",revision:null},{url:"assets/index.0082bab1.css",revision:null},{url:"assets/index.36a1200e.js",revision:null},{url:"assets/lz-string.bfbf8ec3.js",revision:null},{url:"assets/nanoevents.1080beb7.js",revision:null},{url:"assets/sortablejs.c0c43fa8.js",revision:null},{url:"assets/vue-next-select.9e6f4164.css",revision:null},{url:"assets/vue-next-select.dc61a6b4.js",revision:null},{url:"assets/vue-textarea-autosize.35804eaf.js",revision:null},{url:"assets/vue-toastification.4b5f8ac8.css",revision:null},{url:"assets/vue-toastification.6c7eee09.js",revision:null},{url:"assets/vue.a1abd053.js",revision:null},{url:"assets/vuedraggable.a6e9addf.js",revision:null},{url:"assets/workbox-window.4a8794bb.js",revision:null},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"favicon.svg",revision:"c8dd2748f1fedd25449164d7dda6aecb"},{url:"index.html",revision:"a3fc5819caeced857559aeb4e45b8dc5"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"robots.txt",revision:"5e0bd1c281a62a380d7a948085bfe2d1"},{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"49b9cd04ee2139bfe785f8100ba3f74f"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));