/* empty css */import"./vue.92681fcb.js";import{Z as C,l as lt,aa as ae,t as $,ay as ln,ar as bl,aE as y,a0 as E,aK as Vt,a1 as g,O as I,aG as jl,A as gt,_ as ee,a8 as o,b6 as J,b8 as nn,bs as Zn,C as r,aq as wl,bu as Fl,bb as an,T as Wi,a7 as d,u as on,j as Ki,bv as wn,q as Ol,b1 as Qt,G as et,aC as ei,w as Tt,b2 as Bt,ao as Ji,I as nt,J as ce,$ as U,aH as Yt,aF as Xt,z as Ht,aN as je,al as Kl,aL as rl,H as Yi,aJ as ti,bn as Xi,br as Zi,be as ea}from"./@vue.4ce677c2.js";import{c as li}from"./nanoevents.1080beb7.js";import{L as il}from"./lz-string.731cedc5.js";import{i as ta}from"./is-plain-object.906d88e8.js";import{Y as la}from"./vue-next-select.a2bfab1d.js";import{s as na,u as ni}from"./vue-toastification.6f567382.js";import{D as ia}from"./vuedraggable.7949458c.js";import{p as aa}from"./vue-textarea-autosize.35804eaf.js";import{v as oa,n as sa}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const ra=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function l(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerpolicy&&(s.referrerPolicy=a.referrerpolicy),a.crossorigin==="use-credentials"?s.credentials="include":a.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(a){if(a.ep)return;a.ep=!0;const s=l(a);fetch(a.href,s)}};ra();const ua="modulepreload",On={},da="./",Jl=function(t,l){return!l||l.length===0?t():Promise.all(l.map(i=>{if(i=`${da}${i}`,i in On)return;On[i]=!0;const a=i.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${s}`))return;const u=document.createElement("link");if(u.rel=a?"stylesheet":ua,a||(u.as="script",u.crossOrigin=""),u.href=i,document.head.appendChild(u),a)return new Promise((c,p)=>{u.addEventListener("load",c),u.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},ca="./projInfo-schema.json",pa="Advent Incremental",ma="An incremental game you play a day at a time, leading up to Christmas!",ga="advent-incremental",fa="thepaperpilot and friends",ha="",va="",ya="0.3",ba="Initial Commit",wa=!0,Ca=!1,ka=2,_a=!0,Aa=null,Sa="",Na=["main"],Ea=3600,Ma=0,Ia=!0,Ba="base64";var Me={$schema:ca,title:pa,description:ma,id:ga,author:fa,discordName:ha,discordLink:va,versionNumber:ya,versionTitle:ba,allowGoBack:wa,defaultShowSmall:Ca,defaultDecimalsShown:ka,useHeader:_a,banner:Aa,logo:Sa,initialTabs:Na,maxTickLength:Ea,offlineLimit:Ma,enablePausing:Ia,exportEncoding:Ba};const fn=17,xa=9e15,Pa=Math.log10(9e15),Da=1/9e15,Fa=308,Ta=-324,$n=5,Ua=function(){const e=[];for(let l=Ta+1;l<=Fa;l++)e.push(Number("1e"+l));const t=323;return function(l){return e[l+t]}}(),hl=[2,Math.E,3,4,5,6,7,8,9,10],Ra=[[1,1.0891168053867777,1.1789745164521264,1.2701428397304229,1.3632066654400328,1.4587804913784246,1.557523817412741,1.660158301473385,1.767487542936873,1.8804205225512542,2],[1,1.1121114330934,1.23103892493161,1.35838369631113,1.49605193039935,1.64635423375119,1.81213853570186,1.99697132461829,2.20538955455724,2.44325744833852,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356972596,1.3632807444991446,1.5979222279405536,1.8842640123816674,2.2416069644878687,2.69893426559423,3.3012632110403577,4.121250340630164,5.281493033448316,7],[1,1.1736630594087796,1.379783782386201,1.6292821855668218,1.9378971836180754,2.3289975651071977,2.8384347394720835,3.5232708454565906,4.478242031114584,5.868592169644505,8],[1,1.1793017514670474,1.394054150657457,1.65664127441059,1.985170999970283,2.4069682290577457,2.9647310119960752,3.7278665320924946,4.814462547283592,6.436522247411611,9],[1,1.18422737399915,1.4066113788546144,1.680911177655277,2.027492094355525,2.4775152854601967,3.080455730250329,3.918234505962507,5.1332705696484595,6.9878696918072905,10]],Oa=[[-1,-.9194161097107025,-.8335625019330468,-.7425599821143978,-.6466611521029437,-.5462617907227869,-.4419033816638769,-.3342645487554494,-.224140440909962,-.11241087890006762,0],[-1,-.90603157029014,-.80786507256596,-.7064666939634,-.60294836853664,-.49849837513117,-.39430303318768,-.29147201034755,-.19097820800866,-.09361896280296,0],[-1,-.9021579584316141,-.8005762598234203,-.6964780623319391,-.5911906810998454,-.486050182576545,-.3823089430815083,-.28106046722897615,-.1831906535795894,-.08935809204418144,0],[-1,-.8917227442365535,-.781258746326964,-.6705130326902455,-.5612813129406509,-.4551067709033134,-.35319256652135966,-.2563741554088552,-.1651412821106526,-.0796919581982668,0],[-1,-.8843387974366064,-.7678744063886243,-.6529563724510552,-.5415870994657841,-.4352842206588936,-.33504449124791424,-.24138853420685147,-.15445285440944467,-.07409659641336663,0],[-1,-.8786709358426346,-.7577735191184886,-.6399546189952064,-.527284921869926,-.4211627631006314,-.3223479611761232,-.23107655627789858,-.1472057700818259,-.07035171210706326,0],[-1,-.8740862815291583,-.7497032990976209,-.6297119746181752,-.5161838335958787,-.41036238255751956,-.31277212146489963,-.2233976621705518,-.1418697367979619,-.06762117662323441,0],[-1,-.8702632331800649,-.7430366914122081,-.6213373075161548,-.5072025698095242,-.40171437727184167,-.30517930701410456,-.21736343968190863,-.137710238299109,-.06550774483471955,0],[-1,-.8670016295947213,-.7373984232432306,-.6143173985094293,-.49973884395492807,-.394584953527678,-.2989649949848695,-.21245647317021688,-.13434688362382652,-.0638072667348083,0],[-1,-.8641642839543857,-.732534623168535,-.6083127477059322,-.4934049257184696,-.3885773075899922,-.29376029055315767,-.2083678561173622,-.13155653399373268,-.062401588652553186,0]],v=function(t){return n.fromValue_noAlloc(t)},ne=function(e,t,l){return n.fromComponents(e,t,l)},pe=function(t,l,i){return n.fromComponents_noNormalize(t,l,i)},nl=function(t,l){const i=l+1,a=Math.ceil(Math.log10(Math.abs(t))),s=Math.round(t*Math.pow(10,i-a))*Math.pow(10,a-i);return parseFloat(s.toFixed(Math.max(i-a,0)))},hn=function(e){return Math.sign(e)*Math.log10(Math.abs(e))},$a=function(e){if(!isFinite(e))return e;if(e<-50)return e===Math.trunc(e)?Number.NEGATIVE_INFINITY:0;let t=1;for(;e<10;)t=t*e,++e;e-=1;let l=.9189385332046727;l=l+(e+.5)*Math.log(e),l=l-e;const i=e*e;let a=e;return l=l+1/(12*a),a=a*i,l=l+1/(360*a),a=a*i,l=l+1/(1260*a),a=a*i,l=l+1/(1680*a),a=a*i,l=l+1/(1188*a),a=a*i,l=l+691/(360360*a),a=a*i,l=l+7/(1092*a),a=a*i,l=l+3617/(122400*a),Math.exp(l)/t},ii=.5671432904097838,qn=function(e,t=1e-10){let l,i;if(!Number.isFinite(e)||e===0)return e;if(e===1)return ii;e<10?l=0:l=Math.log(e)-Math.log(Math.log(e));for(let a=0;a<100;++a){if(i=(e*Math.exp(-l)+l*l)/(l+1),Math.abs(i-l).5?1:-1;if(Math.random()*20<1)return pe(t,0,1);const l=Math.floor(Math.random()*(e+1));let i=l===0?Math.random()*616-308:Math.random()*16;Math.random()>.9&&(i=Math.trunc(i));let a=Math.pow(10,i);return Math.random()>.9&&(a=Math.trunc(a)),ne(t,l,a)}static affordGeometricSeries_core(e,t,l,i){const a=t.mul(l.pow(i));return N.floor(e.div(a).mul(l.sub(1)).add(1).log10().div(l.log10()))}static sumGeometricSeries_core(e,t,l,i){return t.mul(l.pow(i)).mul(N.sub(1,l.pow(e))).div(N.sub(1,l))}static affordArithmeticSeries_core(e,t,l,i){const s=t.add(i.mul(l)).sub(l.div(2)),u=s.pow(2);return s.neg().add(u.add(l.mul(e).mul(2)).sqrt()).div(l).floor()}static sumArithmeticSeries_core(e,t,l,i){const a=t.add(i.mul(l));return e.div(2).mul(a.mul(2).plus(e.sub(1).mul(l)))}static efficiencyOfPurchase_core(e,t,l){return e.div(t).add(e.div(l))}normalize(){if(this.sign===0||this.mag===0&&this.layer===0)return this.sign=0,this.mag=0,this.layer=0,this;if(this.layer===0&&this.mag<0&&(this.mag=-this.mag,this.sign=-this.sign),this.layer===0&&this.mag=xa)return this.layer+=1,this.mag=t*Math.log10(e),this;for(;e0;)this.layer-=1,this.layer===0?this.mag=Math.pow(10,this.mag):(this.mag=t*Math.pow(10,e),e=Math.abs(this.mag),t=Math.sign(this.mag));return this.layer===0&&(this.mag<0?(this.mag=-this.mag,this.sign=-this.sign):this.mag===0&&(this.sign=0)),this}fromComponents(e,t,l){return this.sign=e,this.layer=t,this.mag=l,this.normalize(),this}fromComponents_noNormalize(e,t,l){return this.sign=e,this.layer=t,this.mag=l,this}fromMantissaExponent(e,t){return this.layer=1,this.sign=Math.sign(e),e=Math.abs(e),this.mag=t+Math.log10(e),this.normalize(),this}fromMantissaExponent_noNormalize(e,t){return this.fromMantissaExponent(e,t),this}fromDecimal(e){return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}fromNumber(e){return this.mag=Math.abs(e),this.sign=Math.sign(e),this.layer=0,this.normalize(),this}fromString(e){e=e.replace(",","");const t=e.split("^^^");if(t.length===2){const w=parseFloat(t[0]),f=parseFloat(t[1]),_=t[1].split(";");let A=1;if(_.length===2&&(A=parseFloat(_[1]),isFinite(A)||(A=1)),isFinite(w)&&isFinite(f)){const P=N.pentate(w,f,A);return this.sign=P.sign,this.layer=P.layer,this.mag=P.mag,this}}const l=e.split("^^");if(l.length===2){const w=parseFloat(l[0]),f=parseFloat(l[1]),_=l[1].split(";");let A=1;if(_.length===2&&(A=parseFloat(_[1]),isFinite(A)||(A=1)),isFinite(w)&&isFinite(f)){const P=N.tetrate(w,f,A);return this.sign=P.sign,this.layer=P.layer,this.mag=P.mag,this}}const i=e.split("^");if(i.length===2){const w=parseFloat(i[0]),f=parseFloat(i[1]);if(isFinite(w)&&isFinite(f)){const _=N.pow(w,f);return this.sign=_.sign,this.layer=_.layer,this.mag=_.mag,this}}e=e.trim().toLowerCase();let a,s,u=e.split("pt");if(u.length===2){a=10,s=parseFloat(u[0]),u[1]=u[1].replace("(",""),u[1]=u[1].replace(")","");let w=parseFloat(u[1]);if(isFinite(w)||(w=1),isFinite(a)&&isFinite(s)){const f=N.tetrate(a,s,w);return this.sign=f.sign,this.layer=f.layer,this.mag=f.mag,this}}if(u=e.split("p"),u.length===2){a=10,s=parseFloat(u[0]),u[1]=u[1].replace("(",""),u[1]=u[1].replace(")","");let w=parseFloat(u[1]);if(isFinite(w)||(w=1),isFinite(a)&&isFinite(s)){const f=N.tetrate(a,s,w);return this.sign=f.sign,this.layer=f.layer,this.mag=f.mag,this}}const c=e.split("e"),p=c.length-1;if(p===0){const w=parseFloat(e);if(isFinite(w))return this.fromNumber(w)}else if(p===1){const w=parseFloat(e);if(isFinite(w)&&w!==0)return this.fromNumber(w)}const m=e.split("e^");if(m.length===2){this.sign=1,m[0].charAt(0)=="-"&&(this.sign=-1);let w="";for(let f=0;f=43&&_<=57||_===101)w+=m[1].charAt(f);else return this.layer=parseFloat(w),this.mag=parseFloat(m[1].substr(f+1)),this.normalize(),this}}if(p<1)return this.sign=0,this.layer=0,this.mag=0,this;const b=parseFloat(c[0]);if(b===0)return this.sign=0,this.layer=0,this.mag=0,this;let h=parseFloat(c[c.length-1]);if(p>=2){const w=parseFloat(c[c.length-2]);isFinite(w)&&(h*=Math.sign(w),h+=hn(w))}if(!isFinite(b))this.sign=c[0]==="-"?-1:1,this.layer=p,this.mag=h;else if(p===1)this.sign=Math.sign(b),this.layer=1,this.mag=h+Math.log10(Math.abs(b));else if(this.sign=Math.sign(b),this.layer=p,p===2){const w=N.mul(ne(1,2,h),v(b));return this.sign=w.sign,this.layer=w.layer,this.mag=w.mag,this}else this.mag=h;return this.normalize(),this}fromValue(e){return e instanceof N||e!=null&&typeof e=="object"&&"sign"in e&&"mag"in e&&"layer"in e?this.fromDecimal(e):typeof e=="number"?this.fromNumber(e):typeof e=="string"?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0,this)}toNumber(){return Number.isFinite(this.layer)?this.layer===0?this.sign*this.mag:this.layer===1?this.sign*Math.pow(10,this.mag):this.mag>0?this.sign>0?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0:Number.NaN}mantissaWithDecimalPlaces(e){return isNaN(this.m)?Number.NaN:this.m===0?0:nl(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:this.mag===0?0:nl(this.mag,e)}toString(){return isNaN(this.layer)||isNaN(this.sign)||isNaN(this.mag)?"NaN":this.mag===Number.POSITIVE_INFINITY||this.layer===Number.POSITIVE_INFINITY?this.sign===1?"Infinity":"-Infinity":this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toString():this.m+"e"+this.e:this.layer===1?this.m+"e"+this.e:this.layer<=$n?(this.sign===-1?"-":"")+"e".repeat(this.layer)+this.mag:(this.sign===-1?"-":"")+"(e^"+this.layer+")"+this.mag}toExponential(e){return this.layer===0?(this.sign*this.mag).toExponential(e):this.toStringWithDecimalPlaces(e)}toFixed(e){return this.layer===0?(this.sign*this.mag).toFixed(e):this.toStringWithDecimalPlaces(e)}toPrecision(e){return this.e<=-7?this.toExponential(e-1):e>this.e?this.toFixed(e-this.exponent-1):this.toExponential(e-1)}valueOf(){return this.toString()}toJSON(){return this.toString()}toStringWithDecimalPlaces(e){return this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toFixed(e):nl(this.m,e)+"e"+nl(this.e,e):this.layer===1?nl(this.m,e)+"e"+nl(this.e,e):this.layer<=$n?(this.sign===-1?"-":"")+"e".repeat(this.layer)+nl(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+nl(this.mag,e)}abs(){return pe(this.sign===0?0:1,this.layer,this.mag)}neg(){return pe(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?N.dZero:this.layer===0?ne(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?N.dZero:this.layer===0?ne(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?N.dZero:this.layer===0?ne(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?N.dZero:this.layer===0?ne(this.sign,0,Math.trunc(this.mag)):this}add(e){const t=v(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer)||this.sign===0)return t;if(t.sign===0)return this;if(this.sign===-t.sign&&this.layer===t.layer&&this.mag===t.mag)return pe(0,0,0);let l,i;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(N.cmpabs(this,t)>0?(l=this,i=t):(l=t,i=this),l.layer===0&&i.layer===0)return v(l.sign*l.mag+i.sign*i.mag);const a=l.layer*Math.sign(l.mag),s=i.layer*Math.sign(i.mag);if(a-s>=2)return l;if(a===0&&s===-1){if(Math.abs(i.mag-Math.log10(l.mag))>fn)return l;{const u=Math.pow(10,Math.log10(l.mag)-i.mag),c=i.sign+l.sign*u;return ne(Math.sign(c),1,i.mag+Math.log10(Math.abs(c)))}}if(a===1&&s===0){if(Math.abs(l.mag-Math.log10(i.mag))>fn)return l;{const u=Math.pow(10,l.mag-Math.log10(i.mag)),c=i.sign+l.sign*u;return ne(Math.sign(c),1,Math.log10(i.mag)+Math.log10(Math.abs(c)))}}if(Math.abs(l.mag-i.mag)>fn)return l;{const u=Math.pow(10,l.mag-i.mag),c=i.sign+l.sign*u;return ne(Math.sign(c),1,i.mag+Math.log10(Math.abs(c)))}}plus(e){return this.add(e)}sub(e){return this.add(v(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const t=v(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer))return t;if(this.sign===0||t.sign===0)return pe(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return pe(this.sign*t.sign,0,1);let l,i;if(this.layer>t.layer||this.layer==t.layer&&Math.abs(this.mag)>Math.abs(t.mag)?(l=this,i=t):(l=t,i=this),l.layer===0&&i.layer===0)return v(l.sign*i.sign*l.mag*i.mag);if(l.layer>=3||l.layer-i.layer>=2)return ne(l.sign*i.sign,l.layer,l.mag);if(l.layer===1&&i.layer===0)return ne(l.sign*i.sign,1,l.mag+Math.log10(i.mag));if(l.layer===1&&i.layer===1)return ne(l.sign*i.sign,1,l.mag+i.mag);if(l.layer===2&&i.layer===1){const a=ne(Math.sign(l.mag),l.layer-1,Math.abs(l.mag)).add(ne(Math.sign(i.mag),i.layer-1,Math.abs(i.mag)));return ne(l.sign*i.sign,a.layer+1,a.sign*a.mag)}if(l.layer===2&&i.layer===2){const a=ne(Math.sign(l.mag),l.layer-1,Math.abs(l.mag)).add(ne(Math.sign(i.mag),i.layer-1,Math.abs(i.mag)));return ne(l.sign*i.sign,a.layer+1,a.sign*a.mag)}throw Error("Bad arguments to mul: "+this+", "+e)}multiply(e){return this.mul(e)}times(e){return this.mul(e)}div(e){const t=v(e);return this.mul(t.recip())}divide(e){return this.div(e)}divideBy(e){return this.div(e)}dividedBy(e){return this.div(e)}recip(){return this.mag===0?N.dNaN:this.layer===0?ne(this.sign,0,1/this.mag):ne(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const t=v(e);return this.sign>t.sign?1:this.sign0?this.layer:-this.layer,i=t.mag>0?t.layer:-t.layer;return l>i?1:lt.mag?1:this.mag0?t:this}clamp(e,t){return this.max(e).min(t)}clampMin(e){return this.max(e)}clampMax(e){return this.min(e)}cmp_tolerance(e,t){const l=v(e);return this.eq_tolerance(l,t)?0:this.cmp(l)}compare_tolerance(e,t){return this.cmp_tolerance(e,t)}eq_tolerance(e,t){const l=v(e);if(t==null&&(t=1e-7),this.sign!==l.sign||Math.abs(this.layer-l.layer)>1)return!1;let i=this.mag,a=l.mag;return this.layer>l.layer&&(a=hn(a)),this.layer0?ne(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):ne(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?N.dNaN:this.layer>0?ne(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):ne(this.sign,0,Math.log10(this.mag))}log(e){return e=v(e),this.sign<=0||e.sign<=0||e.sign===1&&e.layer===0&&e.mag===1?N.dNaN:this.layer===0&&e.layer===0?ne(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):N.div(this.log10(),e.log10())}log2(){return this.sign<=0?N.dNaN:this.layer===0?ne(this.sign,0,Math.log2(this.mag)):this.layer===1?ne(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?ne(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):ne(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?N.dNaN:this.layer===0?ne(this.sign,0,Math.log(this.mag)):this.layer===1?ne(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?ne(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):ne(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const t=v(e),l=this,i=t;if(l.sign===0)return i.eq(0)?pe(1,0,1):l;if(l.sign===1&&l.layer===0&&l.mag===1)return l;if(i.sign===0)return pe(1,0,1);if(i.sign===1&&i.layer===0&&i.mag===1)return l;const a=l.absLog10().mul(i).pow10();return this.sign===-1?Math.abs(i.toNumber()%2)%2===1?a.neg():Math.abs(i.toNumber()%2)%2===0?a:N.dNaN:a}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return N.dNaN;let e=this;if(e.layer===0){const t=Math.pow(10,e.sign*e.mag);if(Number.isFinite(t)&&Math.abs(t)>=.1)return ne(1,0,t);if(e.sign===0)return N.dOne;e=pe(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?ne(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?ne(-e.sign,e.layer+1,-e.mag):N.dOne}pow_base(e){return v(e).pow(this)}root(e){const t=v(e);return this.pow(t.recip())}factorial(){return this.mag<0?this.add(1).gamma():this.layer===0?this.add(1).gamma():this.layer===1?N.exp(N.mul(this,N.ln(this).sub(1))):N.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(pe(1,0,24)))return v($a(this.sign*this.mag));const e=this.mag-1;let t=.9189385332046727;t=t+(e+.5)*Math.log(e),t=t-e;const l=e*e;let i=e,a=12*i,s=1/a,u=t+s;if(u===t||(t=u,i=i*l,a=360*i,s=1/a,u=t-s,u===t))return N.exp(t);t=u,i=i*l,a=1260*i;let c=1/a;return t=t+c,i=i*l,a=1680*i,c=1/a,t=t-c,N.exp(t)}else return this.layer===1?N.exp(N.mul(this,N.ln(this).sub(1))):N.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?N.dOne:this.layer===0&&this.mag<=709.7?v(Math.exp(this.sign*this.mag)):this.layer===0?ne(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?ne(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):ne(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return v(Math.sqrt(this.sign*this.mag));if(this.layer===1)return ne(1,2,Math.log10(this.mag)-.3010299956639812);{const e=N.div(pe(this.sign,this.layer-1,this.mag),pe(1,0,2));return e.layer+=1,e.normalize(),e}}cube(){return this.pow(3)}cbrt(){return this.pow(1/3)}tetrate(e=2,t=pe(1,0,1)){if(e===1)return N.pow(this,t);if(e===0)return new N(t);if(this.eq(N.dOne))return N.dOne;if(this.eq(-1))return N.pow(this,t);if(e===Number.POSITIVE_INFINITY){const a=this.toNumber();if(a<=1.444667861009766&&a>=.06598803584531254){if(a>1.444667861009099)return new N(Math.E);const s=N.ln(this).neg();return s.lambertw().div(s)}else return a>1.444667861009766?new N(Number.POSITIVE_INFINITY):N.dNaN}if(this.eq(N.dZero)){let a=Math.abs((e+1)%2);return a>1&&(a=2-a),new N(a)}if(e<0)return N.iteratedlog(t,this,-e);t=v(t);const l=e;e=Math.trunc(e);const i=l-e;if(this.gt(N.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let a=0;a3)return pe(t.sign,t.layer+(e-a-1),t.mag);if(a>1e4)return t}return t}iteratedexp(e=2,t=pe(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return N.tetrate(e,-t,this);e=v(e);let l=v(this);const i=t;t=Math.trunc(t);const a=i-t;if(l.layer-e.layer>3){const s=Math.min(t,l.layer-e.layer-3);t-=s,l.layer-=s}for(let s=0;s1e4)return l}return a>0&&a<1&&(e.eq(10)?l=l.layeradd10(-a):l=l.layeradd(-a,e)),l}slog(e=10){if(e=v(e),e.lte(N.dZero)||e.eq(N.dOne))return N.dNaN;if(e.lt(N.dOne))return this.eq(N.dOne)?N.dZero:this.eq(N.dZero)?N.dNegOne:N.dNaN;if(this.mag<0||this.eq(N.dZero))return N.dNegOne;let t=0,l=v(this);if(l.layer-e.layer>3){const i=l.layer-e.layer-3;t+=i,l.layer-=i}for(let i=0;i<100;++i)if(l.lt(N.dZero))l=N.pow(e,l),t-=1;else{if(l.lte(N.dOne))return v(t+N.slog_critical(e.toNumber(),l.toNumber()));t+=1,l=N.log(l,e)}return v(t)}static slog_critical(e,t){return e>10?t-1:N.critical_section(e,t,Oa)}static tetrate_critical(e,t){return N.critical_section(e,t,Ra)}static critical_section(e,t,l){t*=10,t<0&&(t=0),t>10&&(t=10),e<2&&(e=2),e>10&&(e=10);let i=0,a=0;for(let c=0;ce){const p=(e-hl[c])/(hl[c+1]-hl[c]);i=l[c][Math.floor(t)]*(1-p)+l[c+1][Math.floor(t)]*p,a=l[c][Math.ceil(t)]*(1-p)+l[c+1][Math.ceil(t)]*p;break}const s=t-Math.floor(t);return i*(1-s)+a*s}layeradd10(e){e=N.fromValue_noAlloc(e).toNumber();const t=v(this);if(e>=1){t.mag<0&&t.layer>0?(t.sign=0,t.mag=0,t.layer=0):t.sign===-1&&t.layer==0&&(t.sign=1,t.mag=-t.mag);const l=Math.trunc(e);e-=l,t.layer+=l}if(e<=-1){const l=Math.trunc(e);if(e-=l,t.layer+=l,t.layer<0)for(let i=0;i<100;++i){if(t.layer++,t.mag=Math.log10(t.mag),!isFinite(t.mag))return t.sign===0&&(t.sign=1),t.layer<0&&(t.layer=0),t.normalize();if(t.layer>=0)break}}for(;t.layer<0;)t.layer++,t.mag=Math.log10(t.mag);return t.sign===0&&(t.sign=1,t.mag===0&&t.layer>=1&&(t.layer-=1,t.mag=1)),t.normalize(),e!==0?t.layeradd(e,10):t}layeradd(e,t){const i=this.slog(t).toNumber()+e;return i>=0?N.tetrate(t,i):Number.isFinite(i)?i>=-1?N.log(N.tetrate(t,i+1),t):N.log(N.log(N.tetrate(t,i+2),t),t):N.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return v(qn(this.toNumber()));if(this.layer===0)return v(qn(this.sign*this.mag));if(this.layer===1)return Gn(this);if(this.layer===2)return Gn(this);if(this.layer>=3)return pe(this.sign,this.layer-1,this.mag);throw"Unhandled behavior in lambertw()"}ssqrt(){if(this.sign==1&&this.layer>=3)return pe(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=pe(1,0,1)){t=v(t);const l=e;e=Math.trunc(e);const i=l-e;i!==0&&(t.eq(N.dOne)?(++e,t=new N(i)):this.eq(10)?t=t.layeradd10(i):t=t.layeradd(i,this));for(let a=0;a10)return t}return t}sin(){return this.mag<0?this:this.layer===0?v(Math.sin(this.sign*this.mag)):pe(0,0,0)}cos(){return this.mag<0?N.dOne:this.layer===0?v(Math.cos(this.sign*this.mag)):pe(0,0,0)}tan(){return this.mag<0?this:this.layer===0?v(Math.tan(this.sign*this.mag)):pe(0,0,0)}asin(){return this.mag<0?this:this.layer===0?v(Math.asin(this.sign*this.mag)):pe(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?v(Math.acos(this.toNumber())):this.layer===0?v(Math.acos(this.sign*this.mag)):pe(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?v(Math.atan(this.sign*this.mag)):v(Math.atan(this.sign*(1/0)))}sinh(){return this.exp().sub(this.negate().exp()).div(2)}cosh(){return this.exp().add(this.negate().exp()).div(2)}tanh(){return this.sinh().div(this.cosh())}asinh(){return N.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return N.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?pe(Number.NaN,Number.NaN,Number.NaN):N.ln(this.add(1).div(v(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(N.pow(10,e))}egg(){return this.add(9)}lessThanOrEqualTo(e){return this.cmp(e)<1}lessThan(e){return this.cmp(e)<0}greaterThanOrEqualTo(e){return this.cmp(e)>-1}greaterThan(e){return this.cmp(e)>0}};let n=N;n.dZero=pe(0,0,0);n.dOne=pe(1,0,1);n.dNegOne=pe(-1,0,1);n.dTwo=pe(1,0,2);n.dTen=pe(1,0,10);n.dNaN=pe(Number.NaN,Number.NaN,Number.NaN);n.dInf=pe(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);n.dNegInf=pe(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);n.dNumberMax=ne(1,0,Number.MAX_VALUE);n.dNumberMin=ne(1,0,Number.MIN_VALUE);const qa=new n(1);function Pl(e,t,l=!0){let i=n.log10(e).floor(),a=n.div(e,n.pow(10,i));a.toStringWithDecimalPlaces(t)==="10"&&(a=qa,i=i.add(1));const s=i.gte(1e9)?oe(i,Math.max(Math.max(t,3),Me.defaultDecimalsShown)):i.gte(1e4)?Yl(i,0):i.toStringWithDecimalPlaces(0);return l?a.toStringWithDecimalPlaces(t)+"e"+s:"e"+s}function Yl(e,t){if(e==null)return"NaN";if(e=new n(e),e.mag<.001)return 0 .toFixed(t);const i=e.toStringWithDecimalPlaces(t).split(".");return i[0]=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),i.length==1?i[0]:i[0]+"."+i[1]}function ai(e,t){return e==null?"NaN":(e=new n(e),e.mag<1e-4?0 .toFixed(t):(e.mag<.1&&t!==0&&(t=Math.max(Math.max(t,e.log10().negate().ceil().toNumber()),Me.defaultDecimalsShown)),e.toStringWithDecimalPlaces(t)))}const Ga=new n("eeee1000"),Va=new n("e100000"),Vn=new n("e1000"),oi=new n(1e9),La=new n(1e6),Qa=new n(1e3),Ha=new n(.98),ja=new n(.001),si=new n(0);function oe(e,t,l){if(t==null&&(t=Me.defaultDecimalsShown),l=l!=null?l:Me.defaultShowSmall,e=new n(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if(e.sign<0)return"-"+oe(e.neg(),t);if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(Ga)){const i=e.slog();return i.gte(La)?"F"+oe(i.floor()):n.pow(10,i.sub(i.floor())).toStringWithDecimalPlaces(3)+"F"+Yl(i.floor(),0)}else{if(e.gte(Va))return Pl(e,0,!1);if(e.gte(Vn))return Pl(e,0);if(e.gte(oi))return Pl(e,t);if(e.gte(Qa))return Yl(e,0);if(e.gte(ja)||!l)return ai(e,t);if(e.eq(si))return 0 .toFixed(t)}return e=ri(e),e.lt(Vn)?Pl(e,t).replace(/([^(?:e|F)]*)$/,"-$1"):oe(e,t)+"\u207B\xB9"}function ie(e){return e=new n(e),e.sign<0?"-"+ie(e.neg()):e.gte(oi)||e.lte(Ha)&&!e.eq(si)?oe(e):oe(e,0)}function kn(e,t){return t==null&&(t=Me.defaultDecimalsShown),n.lt(e,0)?"-"+kn(n.neg(e),t):n.gt(e,2**51)?oe(n.div(e,31536e3))+"y":(e=new n(e).toNumber(),e<60?oe(e)+"s":e<3600?ie(Math.floor(e/60))+"m "+oe(e%60,t)+"s":e<86400?ie(Math.floor(e/3600))+"h "+ie(Math.floor(e/60)%60)+"m "+ie(e%60)+"s":e<31536e3?ie(Math.floor(e/84600)%365)+"d "+ie(Math.floor(e/3600)%24)+"h "+ie(Math.floor(e/60)%60)+"m":ie(Math.floor(e/31536e3))+"y "+ie(Math.floor(e/84600)%365)+"d "+ie(Math.floor(e/3600)%24)+"h")}function za(e,t,l){e=new n(e);let i=e.toStringWithDecimalPlaces(t);return new n(i).gte(l)&&(i=n.sub(l,Math.pow(.1,t)).toStringWithDecimalPlaces(t)),i}function Wa(e,t){return oe(e,t,!0)}function ri(e){let t=n.log10(e).ceil();const l=n.div(e,n.pow(10,t));return t=t.neg(),e=new n(10).pow(t).times(l),e}function ui(e,t,l=n.dOne){let i=e[0][0],a=e[0][1];for(let s=1;s(e.Up="Up",e.Down="Down",e.Left="Left",e.Right="Right",e.Default="Up",e))(ke||{});const Tl=Symbol("DoNotCache");function G(e,t){const l=e[t];Cn(l)&&l.length===0&&!l[Tl]?e[t]=C(l.bind(e)):Cn(l)&&(e[t]=l.bind(e),e[t][Tl]=!0)}function pt(e){return Cn(e)&&!e[Tl]&&(e=C(e)),e}const dl=Symbol("Component"),cl=Symbol("GatherProps");let lo=0;function Il(e="feature-"){return e+lo++}var at=(e=>(e[e.Visible=0]="Visible",e[e.Hidden=1]="Hidden",e[e.None=2]="None",e))(at||{});function B(e){return e[Tl]=!0,e}function x(e,t=2){return e?0:t}function mt(e,t,l){e[t]===void 0&&l!=null&&(e[t]=l)}function mi(e,...t){const l=[],i=a=>{Object.keys(a).forEach(s=>{const u=a[s];u&&typeof u=="object"&&(t.includes(u.type)?l.push(u):!(u instanceof n)&&!lt(u)&&i(u))})};return i(e),l}const vl={variables:{"--foreground":"#dfdfdf","--background":"#0f0f0f","--feature-foreground":"#0f0f0f","--tooltip-background":"rgba(0, 0, 0, 0.75)","--raised-background":"#0f0f0f","--points":"#ffffff","--locked":"#bf8f8f","--highlighted":"#333","--bought":"#77bf5f","--danger":"rgb(220, 53, 69)","--link":"#02f2f2","--outline":"#dfdfdf","--accent1":"#627a82","--accent2":"#658262","--accent3":"#7c6282","--border-radius":"15px","--modal-border":"solid 2px var(--color)","--feature-margin":"0px"},floatingTabs:!0,mergeAdjacent:!0,showPin:!0};var _n=(e=>(e.Classic="classic",e.Paper="paper",e.Nordic="nordic",e.Aqua="aqua",e))(_n||{}),$l={classic:vl,paper:{...vl,variables:{...vl.variables,"--background":"#2a323d","--feature-foreground":"#000","--raised-background":"#333c4a","--locked":"#3a3e45","--bought":"#5C8A58","--outline":"#333c4a","--border-radius":"4px","--modal-border":"","--feature-margin":"5px"},floatingTabs:!1},nordic:{...vl,variables:{...vl.variables,"--foreground":"#D8DEE9","--background":"#2E3440","--feature-foreground":"#000","--raised-background":"#3B4252","--points":"#E5E9F0","--locked":"#4c566a","--highlighted":"#434c5e","--bought":"#8FBCBB","--danger":"#D08770","--link":"#88C0D0","--outline":"#3B4252","--accent1":"#B48EAD","--accent2":"#A3BE8C","--accent3":"#EBCB8B","--border-radius":"4px","--modal-border":"solid 2px #3B4252","--feature-margin":"5px"},floatingTabs:!1},aqua:{...vl,variables:{...vl.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}};const Ue=li();document.fonts.onloadingdone=()=>Ue.emit("fontsLoaded");var no=Object.freeze(Object.defineProperty({__proto__:null,globalBus:Ue},Symbol.toStringTag,{value:"Module"}));var Ne=(e,t)=>{const l=e.__vccOpts||e;for(const[i,a]of t)l[i]=a;return l};const io=ae({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var b;const l=$({}),i=new ResizeObserver(c),a=$(null);ln(()=>{const h=a.value;h!=null&&i.observe(h)});let s=!0,u=$((b=a.value)==null?void 0:b.getBoundingClientRect());function c(){s&&(s=!1,bl(()=>{var h;u.value=(h=a.value)==null?void 0:h.getBoundingClientRect(),Object.values(l.value).filter(w=>w).forEach(w=>w.rect=w.element.getBoundingClientRect()),t("updateNodes",l.value),s=!0}))}Ue.on("fontsLoaded",c);const p={attributes:!1,childList:!0,subtree:!1};jl(An,(h,w)=>{const f=new MutationObserver(()=>m(h));f.observe(w,p),l.value[h]={element:w,observer:f,rect:w.getBoundingClientRect()},c()}),jl(Sn,h=>{var w;(w=l.value[h])==null||w.observer.disconnect(),l.value[h]=void 0,c()}),jl(Nn,l),jl(En,u);function m(h){const w=l.value[h];w!=null&&(w.rect=w.element.getBoundingClientRect(),t("updateNodes",l.value))}return(h,w)=>(y(),E(I,null,[Vt(h.$slots,"default",{},void 0,!0),g("div",{ref_key:"resizeListener",ref:a,class:"resize-listener"},null,512)],64))}});var gi=Ne(io,[["__scopeId","data-v-2b1dc1bc"]]);const ao=["onPointerdown"],oo={class:"modal-wrapper"},so={class:"modal-container"},ro={class:"modal-header"},uo=d(" default header "),co={class:"modal-body"},po=d(" default body "),mo={class:"modal-footer"},go=g("div",{class:"modal-default-flex-grow"},null,-1),bt=ae({__name:"Modal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:l}){const a=gt(e),s=C(()=>a.modelValue||c.value);function u(){l("update:modelValue",!1)}const c=$(!1),p=$(null),m=C(()=>{var b,h;return(h=(b=p.value)==null?void 0:b.nodes)!=null?h:null});return t({isOpen:s,nodes:m}),(b,h)=>(y(),ee(Wi,{to:"#modal-root"},[o(an,{name:"modal",onBeforeEnter:h[0]||(h[0]=w=>c.value=!0),onAfterLeave:h[1]||(h[1]=w=>c.value=!1)},{default:J(()=>[nn(g("div",wl({class:"modal-mask",onPointerdown:Fl(u,["self"])},b.$attrs),[g("div",oo,[g("div",so,[g("div",ro,[Vt(b.$slots,"header",{shown:r(s)},()=>[uo])]),g("div",co,[o(gi,{ref_key:"contextRef",ref:p},{default:J(()=>[Vt(b.$slots,"body",{shown:r(s)},()=>[po])]),_:3},512)]),g("div",mo,[Vt(b.$slots,"footer",{shown:r(s)},()=>[g("div",{class:"modal-default-footer"},[go,g("button",{class:"button modal-default-button",onClick:u}," Close ")])])])])])],16,ao),[[Zn,e.modelValue]])]),_:3})]))}}),An=Symbol("RegisterNode"),Sn=Symbol("UnregisterNode"),Nn=Symbol("Nodes"),En=Symbol("Bounds"),vt=on({});window.layers=vt;const Sl={},$t=[];function Ut(e,t){return Nt(()=>{const l={},i=l.emitter=li();if(l.on=i.on.bind(i),l.emit=i.emit.bind(i),l.nodes=$({}),l.id=e,$t.push(e),Sl[e]=new Set,l.minimized=we(!1),Object.assign(l,t.call(l)),$t[$t.length-1]==null||$t[$t.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen Stack: ${$t} Trying to pop ${l.id}`;return $t.pop(),G(l,"color"),G(l,"display"),G(l,"name"),mt(l,"name",l.id),G(l,"minWidth"),mt(l,"minWidth",600),G(l,"minimizable"),mt(l,"minimizable",!0),l})}function fi(e,t){if(console.info("Adding layer",e.id),vt[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,vt[e.id]);return}mt(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),vt[e.id]=e,Ue.emit("addLayer",e,t.layers[e.id])}function fo(e){return vt[e]}function hi(e){console.info("Removing layer",e.id),Ue.emit("removeLayer",e),vt[e.id]=void 0}function ho(e){hi(e),fi(e,z)}function vo(e){const t=$(!1);return{openModal:()=>t.value=!0,modal:B(()=>o(bt,{modelValue:t.value,"onUpdate:modelValue":l=>t.value=l},{header:()=>o("h2",null,[r(e.name)]),body:r(e.display)}))}}Ue.on("update",function(t){Object.values(vt).forEach(l=>{l==null||l.emit("preUpdate",t)}),Object.values(vt).forEach(l=>{l==null||l.emit("update",t)}),Object.values(vt).forEach(l=>{l==null||l.emit("postUpdate",t)})});var yo=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:An,UnregisterNodeInjectionKey:Sn,NodesInjectionKey:Nn,BoundsInjectionKey:En,layers:vt,persistentRefs:Sl,addingLayers:$t,createLayer:Ut,addLayer:fi,getLayer:fo,removeLayer:hi,reloadLayer:ho,setupLayerModal:vo},Symbol.toStringTag,{value:"Module"}));const Mn=Symbol("PersistentState"),ol=Symbol("DefaultValue"),Zl=Symbol("StackTrace"),vi=Symbol("Deleted"),Ul=Symbol("NonPersistent"),Dl=Symbol("SaveDataPath");function bo(){var e;return((e=new Error().stack)==null?void 0:e.split(` `).slice(3,5).map(t=>t.trim()).join(` `))||""}function we(e){const t=lt(e)?e:$(e);t[Mn]=t,t[ol]=lt(e)?e.value:e,t[Zl]=bo(),t[vi]=!1;const l=C({get(){return t.value},set(i){t.value=i}});return l[ol]=t[ol],t[Ul]=l,t[Dl]=void 0,$t.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,` Created at: `+t[Zl]):Sl[$t[$t.length-1]].add(t),t}function wo(e){return e&&typeof e=="object"&&Mn in e}function F(e){return e[Ul]}Ue.on("addLayer",(e,t)=>{const l=[],i=(a,s=[])=>{let u=!1;return Object.keys(a).forEach(c=>{let p=a[c];if(p&&typeof p=="object")if(Je in p&&(p=p[Je]),wo(p)){if(u=!0,p[vi]){console.warn("Deleted persistent ref present in returned object. Ignoring...",p,` Created at: `+p[Zl]);return}Sl[e.id].delete(p);const m=[e.id,...s,c];p[Dl]!=null&&JSON.stringify(m)!==JSON.stringify(p[Dl])&&console.error(`Persistent ref is being saved to \`${m.join(".")}\` when it's already present at \`${p[Dl].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,p),p[Dl]=m;const b=s.reduce((w,f)=>(f in w||(w[f]={}),w[f]),t),h=b[c];b[c]=p[Mn],Ki(b)?h!=null?b[c]=h:b[c]=p[ol]:h!=null?b[c].value=h:b[c].value=p[ol]}else!(p instanceof n)&&!lt(p)&&!l.includes(p)&&(typeof p.type=="symbol"&&l.push(p),i(p,[...s,c])&&(wn(p)&&!wn(a)?console.warn("Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.",Je in a?a[Je]:a,c):u=!0))}),u};i(e[Je]),Sl[e.id].forEach(a=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,a,` Created at: `+a[Zl])}),Sl[e.id].clear()});const Je=Symbol("ProxyState"),Al=Symbol("ProxyPath");function Nt(e,t={}){const l=t;let i=!1;function a(){return i||(Object.assign(l,e(l)),i=!0),l}return new Proxy(l,{get(s,u){if(u===Je)return a();const c=a()[u];return c&&typeof c=="object"&&Ul in c?c[Ul]:c},set(s,u,c){return a()[u]=c,!0},has(s,u){return u===Je?!0:Reflect.has(a(),u)},ownKeys(){return Reflect.ownKeys(a())},getOwnPropertyDescriptor(s,u){return i||(Object.assign(l,e(l)),i=!0),Object.getOwnPropertyDescriptor(s,u)}})}var Ze=window.state=on({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const yi=Ol({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function bi(e){return JSON.stringify(e,(t,l)=>r(l))}const wi={get(e,t){var i;if(t===Je||t===Al)return e[t];const l=e[Je][t];if(t!=="value"&&(ta(l)||Array.isArray(l))){if(l!==((i=e[t])==null?void 0:i[Je])){const a=[...e[Al],t];e[t]=new Proxy({[Je]:l,[Al]:a},wi)}return e[t]}return l},set(e,t,l,i){if(!Ze.hasNaN&&(typeof l=="number"&&isNaN(l)||l instanceof n&&(isNaN(l.sign)||isNaN(l.layer)||isNaN(l.mag)))){const a=e[Je][t];if(!(typeof a=="number"&&isNaN(a)||a instanceof n&&(isNaN(a.sign)||isNaN(a.layer)||isNaN(a.mag))))throw yi.autosave=!1,Ze.hasNaN=!0,Ze.NaNPath=[...e[Al],t],Ze.NaNReceiver=i,console.error("Attempted to set NaN value",[...e[Al],t],e[Je]),"Attempted to set NaN value. See above for details"}return e[Je][t]=l,!0},ownKeys(e){return Reflect.ownKeys(e[Je])},has(e,t){return Reflect.has(e[Je],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[Je],t)}};var z=window.player=new Proxy({[Je]:yi,[Al]:["player"]},wi);function Ci(e={}){return Object.assign({id:`${Me.id}-0`,name:"Default Save",tabs:Me.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:Me.id,modVersion:Me.versionNumber,layers:{}},e)}function qt(e){const t=il.compressToUTF16(bi(e!=null?e:z[Je]));return localStorage.setItem((e!=null?e:z[Je]).id,t),t}async function Co(){_o();try{let e=localStorage.getItem(Ye.active);if(e==null){await yl(Nl());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=il.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==Me.id){await yl(Nl());return}t.id=Ye.active,await yl(t)}catch(e){console.error(`Failed to load save. Falling back to new save. `,e),await yl(Nl())}}function Nl(){const e=Wl(),t=Ci({id:e});return qt(t),Ye.saves.push(e),t}function Wl(){let e,t=0;do e=`${Me.id}-${t++}`;while(localStorage.getItem(e));return e}const In=$(!1);async function yl(e){console.info("Loading save",e),In.value=!0;const{layers:t,removeLayer:l,addLayer:i}=await Jl(()=>Promise.resolve().then(function(){return yo}),void 0),{fixOldSave:a,getInitialLayers:s}=await Jl(()=>Promise.resolve().then(function(){return pr}),void 0);for(const u in t){const c=t[u];c&&l(c)}s(e).forEach(u=>i(u,e)),e=Ci(e),e.offlineProd&&e.time&&e.devSpeed!==0&&(e.offlineTime==null&&(e.offlineTime=0),e.offlineTime+=Math.min(e.offlineTime+(Date.now()-e.time)/1e3,Me.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==Me.versionNumber&&a(e.modVersion,e),Object.assign(z,e),Ye.active=z.id,Ue.emit("onLoad")}setInterval(()=>{z.autosave&&qt()},1e3);window.onbeforeunload=()=>{z.autosave&&qt()};window.save=qt;const ko=window.hardReset=async()=>{await yl(Nl())},Rl=Ol({active:"",saves:[],showTPS:!0,theme:_n.Nordic,unthrottled:!1});Qt(Rl,e=>{const t=il.compressToUTF16(JSON.stringify(e));localStorage.setItem(Me.id,t)},{deep:!0});var Ye=window.settings=Rl;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:_n.Nordic};Ue.emit("loadSettings",e),Object.assign(Rl,e),ko()};function _o(){try{let e=localStorage.getItem(Me.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=il.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(Rl,t)}Ue.emit("loadSettings",Rl)}catch{}}const ki=Ol([]);function Ao(e){ki.push(e)}const _i=Ol([]);function So(e){_i.push(e)}const No=Ol([]),Eo={class:"table"},At=ae({__name:"Column",setup(e){const t=C(()=>$l[Ye.theme].mergeAdjacent);return(l,i)=>(y(),E("div",Eo,[g("div",{class:et(["col",{mergeAdjacent:r(t)}])},[Vt(l.$slots,"default")],2)]))}}),Mo={class:"table"},Ml=ae({__name:"Row",setup(e){const t=C(()=>$l[Ye.theme].mergeAdjacent);return(l,i)=>(y(),E("div",Mo,[g("div",{class:et(["row",{mergeAdjacent:r(t)}])},[Vt(l.$slots,"default")],2)]))}});function Bn(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Ji(e)}function Ae(e,t="span"){return typeof e=="function"?ae({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}`),ae({template:e})):ae({render:()=>({})}):e}function re(e){if(Jt(e))return typeof e=="function"?e():Ae(e);const t=e[dl];return o(t,e[cl](),null)}function ye(...e){let t;return o(Ml,null,Bn(t=e.map(re))?t:{default:()=>[t]})}function sl(...e){let t;return o(At,null,Bn(t=e.map(re))?t:{default:()=>[t]})}function Lt(e){if(Jt(e))return typeof e=="function"?e():typeof e=="string"?o(I,null,[e]):o(e,null,null);const t=e[dl];return o(t,e[cl](),null)}function Io(...e){let t;return o(At,null,Bn(t=e.map(Lt))?t:{default:()=>[t]})}function Jt(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Tl]===!0}function Ai(e,t,l){const i=$(null),a=$(void 0);function s(p){i.value||(i.value=setInterval(c,250)),a.value=p,l&&(l.value=!0)}function u(){i.value&&(clearInterval(i.value),i.value=null),l&&(l.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(a.value)}return ei(u),{start:s,stop:u,handleHolding:c}}function Bo(e,t){const l=C(()=>e.filter(i=>r(i.visibility)===at.Visible&&t(i)));return{firstFeature:C(()=>l.value[0]),collapsedContent:B(()=>sl(...l.value.slice(1))),hasCollapsedContent:C(()=>l.value.length>1)}}function en(e,t="div"){const l=Tt();return Bt(()=>{l.value=Ae(ot(e),t)}),l}function ul(e,t="div"){const l=Tt(null);return Bt(()=>{const i=ot(e);l.value=i==null?null:Ae(i,t)}),l}function xo(e){return C(()=>ot(e))}function ot(e){return r(r(e))}function V(...e){return e.includes(Object)||e.push(Object),e}const ge=ae({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,l)=>(y(),E("div",{style:nt({width:e.width,height:e.height})},null,4))}});const Po={},Do={class:"notif"};function Fo(e,t){return y(),E("div",Do,"!")}var Ln=Ne(Po,[["render",Fo],["__scopeId","data-v-66323fd4"]]);const rn=e=>(Yt("data-v-9de19f28"),e=e(),Xt(),e),To={key:0,class:"day feature dontMerge opened"},Uo={class:"date"},Ro=d("Dec"),Oo=rn(()=>g("br",null,null,-1)),$o={class:"date"},qo=d("Dec"),Go=rn(()=>g("br",null,null,-1)),Vo=rn(()=>g("div",{class:"doors"},null,-1)),Lo={class:"date"},Qo=d("Dec"),Ho=rn(()=>g("br",null,null,-1)),jo={key:0,class:"material-icons lock"},zo={key:1,class:"timer"},Wo={key:2,class:"timer"},Ko=ae({__name:"Day",props:{day:null,symbol:null,layer:null,opened:null,recentlyUpdated:null,shouldNotify:null},emits:["openLore","openLayer","unlockLayer"],setup(e,{emit:t}){const l=e,i=C(()=>l.layer&&n.gte(Q.day.value,l.day)&&new Date().getMonth()===11&&new Date().getDate()>=l.day);function a(){i.value&&t("unlockLayer")}return(s,u)=>e.opened.value?(y(),E("div",To,[o(an,{appear:"",name:"door"},{default:J(()=>[g("div",{class:"doors",onClick:u[0]||(u[0]=c=>t("openLayer"))},[g("div",Uo,[Ro,Oo,d(ce(e.day),1)]),g("div",$o,[qo,Go,d(ce(e.day),1)])])]),_:1}),g("div",{class:"icon",style:nt({backgroundImage:`url(${e.symbol})`})},null,4),g("div",{class:"lore",onClick:u[1]||(u[1]=c=>t("openLore"))},"?"),r(e.shouldNotify)?(y(),ee(Ln,{key:0})):U("",!0)])):(y(),E("div",{key:1,class:et(["day feature dontMerge",{can:r(i),locked:!r(i),canOpen:r(i)}]),onClick:a},[Vo,g("div",Lo,[Qo,Ho,d(ce(e.day),1)]),r(i)?U("",!0):(y(),E("div",jo,"lock")),r(Q).day.value===e.day&&!r(i)?(y(),E("div",zo,ce(r(kn)(r(Q).timeUntilNewDay.value,0)),1)):r(Q).day.value===e.day&&e.layer==null?(y(),E("div",Wo,"NYI")):U("",!0),r(i)?(y(),ee(Ln,{key:3})):U("",!0)],2))}});var Jo=Ne(Ko,[["__scopeId","data-v-9de19f28"]]);const Yo=ae({__name:"Collapsible",props:{collapsed:null,display:null,content:null},setup(e){const t=e,l=en(Ht(t,"display")),i=en(Ht(t,"content"));return(a,s)=>(y(),ee(At,{class:"collapsible-container"},{default:J(()=>[g("button",{onClick:s[0]||(s[0]=u=>e.collapsed.value=!e.collapsed.value),class:"feature collapsible-toggle"},[(y(),ee(je(r(l))))]),e.collapsed.value?U("",!0):(y(),ee(je(r(i)),{key:0}))]),_:1}))}});var Xo=Ne(Yo,[["__scopeId","data-v-a72c16aa"]]);const Zo={key:0},es={key:0,class:"mark star"},ts=["src"],ls=ae({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,l)=>e.mark?(y(),E("div",Zo,[e.mark===!0?(y(),E("div",es)):(y(),E("img",{key:1,class:"mark",src:e.mark},null,8,ts))])):U("",!0)}});var un=Ne(ls,[["__scopeId","data-v-2207999f"]]);const ns=ae({__name:"Node",props:{id:null},setup(e){const l=gt(e),i=Kl(An,()=>{}),a=Kl(Sn,()=>{}),s=Tt(null),u=C(()=>s.value&&s.value.parentElement);return Qt([u,l.id],([c,p],[m,b])=>{m&&a(r(b)),c&&i(p,c)}),ei(()=>a(r(l.id))),(c,p)=>(y(),E("div",{class:"node",ref_key:"node",ref:s},null,512))}});var ql=Ne(ns,[["__scopeId","data-v-a48cb382"]]);const is=ae({props:{progress:{type:V(String,Object,Number),required:!0},width:{type:V(Number),required:!0},height:{type:V(Number),required:!0},direction:{type:V(String),required:!0},display:V(Object,String,Function),visibility:{type:V(Number),required:!0},style:V(Object,String,Array),classes:V(Object),borderStyle:V(Object,String,Array),textStyle:V(Object,String,Array),baseStyle:V(Object,String,Array),fillStyle:V(Object,String,Array),mark:V(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:un,Node:ql},setup(e){const{progress:t,width:l,height:i,direction:a,display:s}=gt(e),u=C(()=>{let m=t.value instanceof n?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(m,0),1))*100}),c=C(()=>{const m={width:ot(l)+.5+"px",height:ot(i)+.5+"px"};switch(r(a)){case ke.Up:m.clipPath=`inset(${u.value}% 0% 0% 0%)`,m.width=ot(l)+1+"px";break;case ke.Down:m.clipPath=`inset(0% 0% ${u.value}% 0%)`,m.width=ot(l)+1+"px";break;case ke.Right:m.clipPath=`inset(0% ${u.value}% 0% 0%)`;break;case ke.Left:m.clipPath=`inset(0% 0% 0% ${u.value} + '%)`;break;case ke.Default:m.clipPath="inset(0% 50% 0% 0%)";break}return m}),p=ul(s);return{normalizedProgress:u,barStyle:c,component:p,unref:r,Visibility:at}}});function as(e,t,l,i,a,s){var p,m,b,h,w,f,_;const u=rl("MarkNode"),c=rl("Node");return e.unref(e.visibility)!==e.Visibility.None?(y(),E("div",{key:0,style:nt([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px",visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(p=e.unref(e.style))!=null?p:{}]),class:et({bar:!0,...e.unref(e.classes)})},[g("div",{class:"overlayTextContainer border",style:nt([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(m=e.unref(e.borderStyle))!=null?m:{}])},[e.component?(y(),E("span",{key:0,class:"overlayText",style:nt(e.unref(e.textStyle))},[(y(),ee(je(e.component)))],4)):U("",!0)],4),g("div",{class:"border",style:nt([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(b=e.unref(e.style))!=null?b:{},(h=e.unref(e.baseStyle))!=null?h:{},(w=e.unref(e.borderStyle))!=null?w:{}])},[g("div",{class:"fill",style:nt([e.barStyle,(f=e.unref(e.style))!=null?f:{},(_=e.unref(e.fillStyle))!=null?_:{}])},null,4)],4),o(u,{mark:e.unref(e.mark)},null,8,["mark"]),o(c,{id:e.id},null,8,["id"])],6)):U("",!0)}var os=Ne(is,[["render",as],["__scopeId","data-v-02d0d7b2"]]);const ss=Symbol("Bar");function Kt(e){return Nt(()=>{const t=e();return t.id=Il("bar-"),t.type=ss,t[dl]=os,G(t,"visibility"),mt(t,"visibility",at.Visible),G(t,"width"),G(t,"height"),G(t,"direction"),G(t,"style"),G(t,"classes"),G(t,"borderStyle"),G(t,"baseStyle"),G(t,"textStyle"),G(t,"fillStyle"),G(t,"progress"),G(t,"display"),G(t,"mark"),t[cl]=function(){const{progress:l,width:i,height:a,direction:s,display:u,visibility:c,style:p,classes:m,borderStyle:b,textStyle:h,baseStyle:w,fillStyle:f,mark:_,id:A}=this;return{progress:l,width:i,height:a,direction:s,display:u,visibility:c,style:r(p),classes:m,borderStyle:b,textStyle:h,baseStyle:w,fillStyle:f,mark:_,id:A}},t})}var rs=ae({props:{display:{type:V(Object,String,Function),required:!0},visibility:{type:V(Number),required:!0},style:V(Object,String,Array),classes:V(Object),onClick:Function,onHold:Function,canClick:{type:V(Boolean),required:!0},small:Boolean,mark:V(Boolean,String),id:{type:String,required:!0},isHolding:Object},components:{Node:ql,MarkNode:un},setup(e){const{display:t,onClick:l,onHold:i}=gt(e),a=Tt("");Bt(()=>{const c=ot(t);if(c==null){a.value="";return}if(Jt(c)){a.value=Ae(c);return}const p=Ae(c.title||"","h3"),m=Ae(c.description,"div");a.value=Ae(B(()=>o("span",null,[c.title?o("div",null,[o(p,null,null)]):null,o(m,null,null)])))});const{start:s,stop:u}=Ai(l,i,e.isHolding);return{start:s,stop:u,comp:a,Visibility:at,unref:r}}});function us(e,t,l,i,a,s){var p;const u=rl("MarkNode"),c=rl("Node");return e.unref(e.visibility)!==e.Visibility.None?(y(),E("button",{key:0,style:nt([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(p=e.unref(e.style))!=null?p:[]]),onClick:t[0]||(t[0]=(...m)=>e.onClick&&e.onClick(...m)),onMousedown:t[1]||(t[1]=(...m)=>e.start&&e.start(...m)),onMouseleave:t[2]||(t[2]=(...m)=>e.stop&&e.stop(...m)),onMouseup:t[3]||(t[3]=(...m)=>e.stop&&e.stop(...m)),onTouchstartPassive:t[4]||(t[4]=(...m)=>e.start&&e.start(...m)),onTouchendPassive:t[5]||(t[5]=(...m)=>e.stop&&e.stop(...m)),onTouchcancelPassive:t[6]||(t[6]=(...m)=>e.stop&&e.stop(...m)),class:et({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)?(y(),ee(je(e.unref(e.comp)),{key:0})):U("",!0),o(u,{mark:e.unref(e.mark)},null,8,["mark"]),o(c,{id:e.id},null,8,["id"])],38)):U("",!0)}var Si=Ne(rs,[["render",us],["__scopeId","data-v-8cedd7da"]]);const ds=Symbol("Clickable");function It(e){return Nt(()=>{var l;const t=(l=e==null?void 0:e())!=null?l:{};if(t.id=Il("clickable-"),t.type=ds,t[dl]=Si,t.isHolding=$(!1),G(t,"visibility"),mt(t,"visibility",at.Visible),G(t,"canClick"),mt(t,"canClick",!0),G(t,"classes"),G(t,"style"),G(t,"mark"),G(t,"display"),t.onClick){const i=t.onClick.bind(t);t.onClick=function(a){r(t.canClick)&&i(a)}}if(t.onHold){const i=t.onHold.bind(t);t.onHold=function(){r(t.canClick)&&i()}}return t[cl]=function(){const{display:i,visibility:a,style:s,classes:u,onClick:c,onHold:p,isHolding:m,canClick:b,small:h,mark:w,id:f}=this;return{display:i,visibility:a,style:r(s),classes:u,onClick:c,onHold:p,isHolding:m,canClick:b,small:h,mark:w,id:f}},t})}function st(e,t="points",l=0,i=void 0){const a=lt(e)?e:we(e);if(a.displayName=t,a.precision=l,a.small=i,!lt(e)){const s=a[Ul];s.displayName=t,s.precision=l,s.small=i}return a}function Qn(e){const t=we(e.value);return Qt(e,l=>{In.value||n.gt(l,t.value)&&(t.value=l)}),t}function cs(e){const t=we(e.value);return Qt(e,(l,i)=>{In.value||n.gt(l,i)&&(t.value=n.add(t.value,n.sub(l,i)))}),t}new n("10^^8");new n("1e100");function Gl(e,t){const l=t!=null?t:e.value;return n.eq(e.precision,0)?se(e.small?l:n.floor(l)):ve(l,e.precision,e.small)}const ps=["x1","y1","x2","y2"],ms=ae({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const l=gt(e),i=C(()=>{const s=l.startNode.value.rect,u=l.boundingRect.value,c=u?{x:s.x+s.width/2-u.x,y:s.y+s.height/2-u.y}:{x:0,y:0};return l.link.value.offsetStart&&(c.x+=l.link.value.offsetStart.x,c.y+=l.link.value.offsetStart.y),c}),a=C(()=>{const s=l.endNode.value.rect,u=l.boundingRect.value,c=u?{x:s.x+s.width/2-u.x,y:s.y+s.height/2-u.y}:{x:0,y:0};return l.link.value.offsetEnd&&(c.x+=l.link.value.offsetEnd.x,c.y+=l.link.value.offsetEnd.y),c});return(s,u)=>(y(),E("line",wl({"stroke-width":"15px",stroke:"white"},e.link,{x1:r(i).x,y1:r(i).y,x2:r(a).x,y2:r(a).y}),null,16,ps))}});const gs=ae({__name:"Links",props:{links:null},setup(e){var p;const l=Ht(e,"links"),i=$(null),a=Kl(Nn,$({})),s=Kl(En,$(void 0)),u=$((p=i.value)==null?void 0:p.getBoundingClientRect());Qt(s,()=>{var m;return u.value=(m=i.value)==null?void 0:m.getBoundingClientRect()}),ln(()=>{var m;return u.value=(m=i.value)==null?void 0:m.getBoundingClientRect()});const c=C(()=>{var b,h;const m=a.value;return(h=(b=l.value)==null?void 0:b.filter(w=>{var f,_;return((f=m[w.startNode.id])==null?void 0:f.rect)&&((_=m[w.startNode.id])==null?void 0:_.rect)}))!=null?h:[]});return(m,b)=>(y(),E(I,null,[r(c)?(y(),E("svg",Yi(wl({key:0},m.$attrs)),[(y(!0),E(I,null,ti(r(c),(h,w)=>(y(),ee(ms,{key:w,link:h,boundingRect:u.value,startNode:r(a)[h.startNode.id],endNode:r(a)[h.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):U("",!0),g("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var fs=Ne(gs,[["__scopeId","data-v-063f6d6b"]]);ae({props:{nodes:{type:V(Array),required:!0},leftSideNodes:V(Array),rightSideNodes:V(Array),branches:V(Array)},components:{Links:fs},setup(e){const{nodes:t,leftSideNodes:l,rightSideNodes:i}=gt(e),a=Tt();Bt(()=>{const c=ot(t);a.value=Ae(B(()=>o(I,null,[c.map(p=>o("span",{class:"row tree-row",style:"margin: 50px auto;"},[p.map(Lt)]))])))});const s=Tt();Bt(()=>{const c=ot(l);s.value=c?Ae(B(()=>o("span",{class:"left-side-nodes small"},[c.map(Lt)]))):""});const u=Tt();return Bt(()=>{const c=ot(i);u.value=c?Ae(B(()=>o("span",{class:"side-nodes small"},[c.map(Lt)]))):""}),{unref:r,nodesComp:a,leftNodesComp:s,rightNodesComp:u}}});ae({props:{display:V(Object,String,Function),visibility:{type:V(Number),required:!0},style:V(String,Object,Array),classes:V(Object),onClick:Function,onHold:Function,color:V(String),glowColor:V(String),canClick:{type:V(Boolean),required:!0},mark:V(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:un,Node:ql},setup(e){const{onClick:t,onHold:l,display:i}=gt(e),a=ul(i),{start:s,stop:u}=Ai(t,l);return{start:s,stop:u,comp:a,unref:r,Visibility:at,isCoercableComponent:Jt}}});function pl(e){const t=[],l={};let i=!1;function a(){return i||(t.push(...e()),l.base=t.map(c=>pt(c.base)),l.baseText=t.map(c=>pt(c.baseText)),l.visible=t.map(c=>pt(c.visible)),i=!0),t}const s=we({});return[B(()=>{const c=a();let p=!0;const m=c.map((b,h)=>{var A,P,Y;if(r(l.visible[h])===!1)return null;const w=o("h3",{onClick:()=>s.value[h]=!s.value[h],style:"cursor: pointer"},[o("span",{class:"modifier-toggle"+(r(s.value[h])?" collapsed":"")},[d("\u25BC")]),b.title,b.subtitle?o("span",{class:"subtitle"},[d(" ("),b.subtitle,d(")")]):null]),f=r(s.value[h])?null:o(I,null,[o("div",{class:"modifier-container"},[o("span",{class:"modifier-description"},[Lt((A=r(l.baseText[h]))!=null?A:"Base")]),o("span",{class:"modifier-amount"},[ve((P=r(l.base[h]))!=null?P:1),b.unit])]),Lt(r(b.modifier.description))]),_=!p;return p=!1,o(I,null,[_?o("br",null,null):null,o("div",null,[w,o("br",null,null),f,o("hr",null,null),o("div",{class:"modifier-container"},[o("span",{class:"modifier-description"},[d("Total")]),o("span",{class:"modifier-amount"},[ve(b.modifier.apply((Y=r(l.base[h]))!=null?Y:1)),b.unit])])])])});return o(I,null,[m])}),s]}function tn(e){const t=Object.values(e).reverse(),l=we(!0),i=C(()=>t.filter(p=>p.earned.value===!1)),{firstFeature:a,collapsedContent:s,hasCollapsedContent:u}=Bo(t,p=>p.earned.value),c=B(()=>{const p=[...i.value];return a.value&&p.push(a.value),Io(...p,B(()=>nn(o(Xo,{collapsed:l,content:s,display:l.value?"Show other completed milestones":"Hide other completed milestones"},null),[[Zn,r(u)]])))});return{collapseMilestones:l,display:c}}function ml(e){const t=cs(e.resource),l=()=>{var c,p;if(Q.day.value!==e.day)return 1;let s=n.add(t.value,1),u=e.goal;return((p=(c=e.usingLog)==null?void 0:c.value)!=null?p:z.usingLog)&&(s=s.log10(),u=n.log10(u)),n.div(s,u)},i=Kt(()=>({direction:ke.Right,width:600,height:25,fillStyle:{backgroundColor:e.color},textStyle:e.textColor?{color:e.textColor}:void 0,progress:l,display:B(()=>Q.day.value===e.day?o(I,null,[ie(t.value),d("/"),ie(e.goal)]):"")})),a=B(()=>o(I,null,[o("div",null,[Q.day.value===e.day?o(I,null,[d("Reach "),ie(e.goal),d(" total "),e.resource.displayName,d(" to complete the day")]):o(I,null,[e.name,d(" Complete!")]),e.modal?o(I,null,[" ",d("-")," ",o("button",{class:"button",style:"display: inline-block;",onClick:()=>e.modal.show.value=!0},[d("Check Modifiers")])]):void 0]),re(i),e.modal?re(e.modal.display):void 0]));return Bt(()=>{Q.day.value===e.day&&n.gte(t.value,e.goal)&&Q.completeDay()}),{total:t,trackerDisplay:a}}function Gt(e){var u;const t=(u=e.style)!=null?u:{minHeight:"20px",width:"40px",color:"var(--foreground)"},l=It(()=>({display:"0",style:t,canClick(){return n.gt(e.active.value,0)},onClick(){e.active.value=0}})),i=It(()=>({display:"-",style:t,canClick(){return n.gt(e.active.value,0)},onClick(){e.active.value=n.sub(e.active.value,1)}})),a=It(()=>({display:"+",style:t,canClick(){return n.lt(e.active.value,e.buyable.amount.value)},onClick(){e.active.value=n.add(e.active.value,1)}})),s=It(()=>({display:"Max",style:t,canClick(){return n.lt(e.active.value,e.buyable.amount.value)},onClick(){e.active.value=e.buyable.amount.value}}));return{min:l,remove:i,add:a,max:s}}const hs=Symbol("Buyable");function Se(e){const t=we(0);return Nt(()=>{var s,u,c;const l=e();if(l.canPurchase==null&&(l.resource==null||l.cost==null))throw console.warn("Cannot create buyable without a canPurchase property or a resource and cost property",l),"Cannot create buyable without a canPurchase property or a resource and cost property";l.id=Il("buyable-"),l.type=hs,l[dl]=Si,l.amount=t,l.amount[ol]=(s=l.initialValue)!=null?s:0,l.canAfford=C(()=>{const p=l,m=r(p.cost);return p.resource!=null&&m!=null&&n.gte(p.resource.value,m)}),l.canPurchase==null&&(l.canPurchase=C(()=>r(l.visibility)===at.Visible&&r(l.canAfford)&&n.lt(l.amount.value,r(l.purchaseLimit)))),l.maxed=C(()=>n.gte(l.amount.value,r(l.purchaseLimit))),G(l,"classes");const i=l.classes;l.classes=C(()=>{const p=r(i)||{};return l.maxed.value&&(p.bought=!0),p}),G(l,"canPurchase"),l.canClick=l.canPurchase,l.onClick=l.purchase=(c=(u=l.onClick)!=null?u:l.purchase)!=null?c:function(){var b;const p=l;if(!r(p.canPurchase))return;const m=r(p.cost);p.cost!=null&&p.resource!=null&&(p.resource.value=n.sub(p.resource.value,m),p.amount.value=n.add(p.amount.value,1)),(b=p.onPurchase)==null||b.call(p,m)},G(l,"display");const a=l.display;return l.display=B(()=>{const p=r(a);if(Jt(p)){const m=Ae(p);return o(m,null,null)}if(p!=null&&l.cost!=null&&l.resource!=null){const m=l,b=Ae(p.title||"","h3"),h=Ae(p.description||""),w=Ae(p.effectDisplay||"");return o("span",null,[p.title?o("div",null,[o(b,null,null)]):null,p.description?o(h,null,null):null,p.showAmount===!1?null:o("div",null,[o("br",null,null),r(m.purchaseLimit)===n.dInf?o(I,null,[d("Amount: "),se(m.amount.value)]):o(I,null,[d("Amount: "),se(m.amount.value),d(" /")," ",se(r(m.purchaseLimit))])]),p.effectDisplay?o("div",null,[o("br",null,null),d("Currently: "),o(w,null,null)]):null,m.cost&&!m.maxed.value?o("div",null,[d("Cost: "),ve(r(m.cost)||0)," ",l.resource.displayName]):null])}return""}),G(l,"visibility"),mt(l,"visibility",at.Visible),G(l,"cost"),G(l,"resource"),G(l,"purchaseLimit"),mt(l,"purchaseLimit",n.dInf),G(l,"style"),G(l,"mark"),G(l,"small"),l[cl]=function(){const{display:p,visibility:m,style:b,classes:h,onClick:w,canClick:f,small:_,mark:A,id:P}=this;return{display:p,visibility:m,style:r(b),classes:h,onClick:w,canClick:f,small:_,mark:A,id:P}},l})}const dn=on({}),xn=Symbol("Hotkey");function El(e){return Nt(()=>{const t=e();return t.type=xn,G(t,"enabled"),mt(t,"enabled",!0),G(t,"description"),t})}Ue.on("addLayer",e=>{mi(e,xn).forEach(t=>{dn[t.key]=t})});Ue.on("removeLayer",e=>{mi(e,xn).forEach(t=>{dn[t.key]=void 0})});document.onkeydown=function(e){var i;if(((i=e.target)==null?void 0:i.tagName)==="INPUT"||Fn.value&&!z.keepGoing)return;let t=e.key;e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const l=dn[t];l&&r(l.enabled)&&(e.preventDefault(),l.onPress())};So(B(()=>{const e=Object.values(dn).filter(t=>r(t==null?void 0:t.enabled));return e.length===0?"":o("div",null,[o("br",null,null),o("h4",null,[d("Hotkeys")]),e.map(t=>o("div",null,[t==null?void 0:t.key,d(": "),t==null?void 0:t.description]))])}));const vs=ae({__name:"Sticky",setup(e){const t=$("0"),l=new ResizeObserver(a),i=Tt(null);function a(){let s=i.value;if(s==null)return;let u=0;for(;s.previousSibling;){const c=s.previousSibling;c.dataset&&"vSticky"in c.dataset&&(u+=c.offsetHeight),s=c}t.value=u+"px"}return bl(a),document.fonts.ready.then(a),ln(()=>{var u;const s=(u=i.value)==null?void 0:u.parentElement;s&&l.observe(s)}),(s,u)=>(y(),E("div",{class:"sticky",style:nt({top:t.value}),ref_key:"element",ref:i,"data-v-sticky":""},[Vt(s.$slots,"default",{},void 0,!0)],4))}});var ys=Ne(vs,[["__scopeId","data-v-cccac690"]]);const Hn=ae({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,l=C(()=>Gl(t.resource));return(i,a)=>(y(),E("h2",{style:nt({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},ce(r(l)),5))}});const bs={class:"main-display"},ws={key:0},Cs={key:1},ks=d(", "),_s={key:2},As=g("br",null,null,-1),Ss={class:"main-display"},Ns={key:0},Es={key:1},Ms=d(", "),Is={key:2},Bs=g("br",null,null,-1),St=ae({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null,productionDisplay:null,sticky:{type:Boolean,default:!0}},setup(e){const l=gt(e),i=$(null),a=ul(l.effectDisplay),s=$(null),u=ul(l.productionDisplay),c=C(()=>n.lt(l.resource.value,"1e1000"));return(p,m)=>{var b,h;return e.sticky?(y(),ee(ys,{key:0},{default:J(()=>{var w,f,_,A;return[g("div",{class:et(["main-display-container",(w=e.classes)!=null?w:{}]),style:nt([{height:`${((_=(f=i.value)==null?void 0:f.$el.clientHeight)!=null?_:0)+50}px`},(A=e.style)!=null?A:{}])},[g("div",bs,[r(c)?(y(),E("span",ws,"You have ")):U("",!0),o(Hn,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),d(" "+ce(e.resource.displayName),1),r(a)?(y(),E("span",Cs,[ks,(y(),ee(je(r(a)),{ref_key:"effectRef",ref:i},null,512))])):U("",!0),r(u)?(y(),E("span",_s,[As,(y(),ee(je(r(u)),{ref_key:"productionRef",ref:s},null,512))])):U("",!0)])],6)]}),_:1})):(y(),E("div",{key:1,class:et(["main-display-container",(b=e.classes)!=null?b:{}]),style:nt([{height:"50px"},(h=e.style)!=null?h:{}])},[g("div",Ss,[r(c)?(y(),E("span",Ns,"You have ")):U("",!0),o(Hn,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),d(" "+ce(e.resource.displayName),1),r(a)?(y(),E("span",Es,[Ms,(y(),ee(je(r(a)),{ref_key:"effectRef",ref:i},null,512))])):U("",!0),r(u)?(y(),E("span",Is,[Bs,(y(),ee(je(r(u)),{ref_key:"productionRef",ref:s},null,512))])):U("",!0)])],6))}}});var xs=ae({props:{display:{type:V(String,Object,Function),required:!0},visibility:{type:V(Number),required:!0},style:V(String,Object,Array),classes:V(Object),resource:Object,cost:V(String,Object,Number),canPurchase:{type:V(Boolean),required:!0},bought:{type:V(Boolean),required:!0},mark:V(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:ql,MarkNode:un},setup(e){const{display:t,cost:l}=gt(e),i=Tt("");return Bt(()=>{const a=ot(t);if(a==null){i.value="";return}if(Jt(a)){i.value=Ae(a);return}const s=ot(l),u=Ae(a.title||"","h3"),c=Ae(a.description,"div"),p=Ae(a.effectDisplay||"");i.value=Ae(B(()=>{var m;return o("span",null,[a.title?o("div",null,[o(u,null,null)]):null,o(c,null,null),a.effectDisplay?o("div",null,[d("Currently: "),o(p,null,null)]):null,e.resource!=null&&a.showCost!==!1?o(I,null,[o("br",null,null),d("Cost: "),e.resource&&Gl(e.resource,s)," ",(m=e.resource)==null?void 0:m.displayName]):null])}))}),{component:i,unref:r,Visibility:at}}});const Ps=["disabled"];function Ds(e,t,l,i,a,s){var p;const u=rl("MarkNode"),c=rl("Node");return e.unref(e.visibility)!==e.Visibility.None?(y(),E("button",{key:0,style:nt([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(p=e.unref(e.style))!=null?p:{}]),onClick:t[0]||(t[0]=(...m)=>e.purchase&&e.purchase(...m)),class:et({feature:!0,upgrade:!0,can:e.unref(e.canPurchase),locked:!e.unref(e.canPurchase),bought:e.unref(e.bought),...e.unref(e.classes)}),disabled:!e.unref(e.canPurchase)},[e.unref(e.component)?(y(),ee(je(e.unref(e.component)),{key:0})):U("",!0),o(u,{mark:e.unref(e.mark)},null,8,["mark"]),o(c,{id:e.id},null,8,["id"])],14,Ps)):U("",!0)}var Fs=Ne(xs,[["render",Ds],["__scopeId","data-v-7f411ac8"]]);const Ts=Symbol("Upgrade");function O(e){const t=we(!1);return Nt(()=>{const l=e();return l.id=Il("upgrade-"),l.type=Ts,l[dl]=Fs,l.canAfford==null&&(l.resource==null||l.cost==null)&&console.warn("Error: can't create upgrade without a canAfford property or a resource and cost property",l),l.bought=t,l.canAfford==null?l.canAfford=C(()=>{const i=l;return i.resource!=null&&i.cost!=null&&n.gte(i.resource.value,r(i.cost))}):G(l,"canAfford"),l.canPurchase=C(()=>r(l.visibility)===at.Visible&&r(l.canAfford)&&!r(l.bought)),l.purchase=function(){var a;const i=l;!r(i.canPurchase)||(i.resource!=null&&i.cost!=null&&(i.resource.value=n.sub(i.resource.value,r(i.cost))),t.value=!0,(a=i.onPurchase)==null||a.call(i))},G(l,"visibility"),mt(l,"visibility",at.Visible),G(l,"classes"),G(l,"style"),G(l,"display"),G(l,"mark"),G(l,"cost"),G(l,"resource"),l[cl]=function(){const{display:i,visibility:a,style:s,classes:u,resource:c,cost:p,canPurchase:m,bought:b,mark:h,id:w,purchase:f}=this;return{display:i,visibility:a,style:r(s),classes:u,resource:c,cost:p,canPurchase:m,bought:b,mark:h,id:w,purchase:f}},l})}function Z(e){return Nt(()=>{const{addend:t,description:l,enabled:i}=e(),a=pt(t),s=pt(l),u=i==null?void 0:pt(i);return{apply:c=>n.add(c,r(a)),revert:c=>n.sub(c,r(a)),enabled:u,description:l==null?void 0:B(()=>o("div",{class:"modifier-container"},[r(s)?o("span",{class:"modifier-description"},[Lt(r(s))]):null,o("span",{class:"modifier-amount"},[n.gte(r(a),0)?"+":"",ve(r(a))])]))}})}function k(e){return Nt(()=>{const{multiplier:t,description:l,enabled:i}=e(),a=pt(t),s=pt(l),u=i==null?void 0:pt(i);return{apply:c=>n.times(c,r(a)),revert:c=>n.div(c,r(a)),enabled:u,description:l==null?void 0:B(()=>o("div",{class:"modifier-container"},[r(s)?o("span",{class:"modifier-description"},[Lt(r(s))]):null,o("span",{class:"modifier-amount"},[d("\xD7"),ve(r(a))])]))}})}function Ni(e){return Nt(()=>{const{exponent:t,description:l,enabled:i,supportLowNumbers:a}=e(),s=pt(t),u=pt(l),c=i==null?void 0:pt(i);return{apply:p=>{let m=p;return a&&(m=n.add(m,1)),m=n.pow(m,r(s)),a&&(m=n.sub(m,1)),m},revert:p=>{let m=p;return a&&(m=n.add(m,1)),m=n.root(m,r(s)),a&&(m=n.sub(m,1)),m},enabled:c,description:l==null?void 0:B(()=>o("div",{class:"modifier-container"},[r(u)?o("span",{class:"modifier-description"},[Lt(r(u)),a?" (+1 effective)":null]):null,o("span",{class:"modifier-amount"},[d("^"),ve(r(s))])]))}})}function W(e){return Nt(()=>{const t=e();return{apply:l=>t.filter(i=>r(i.enabled)!==!1).reduce((i,a)=>a.apply(i),l),revert:t.every(l=>l.revert!=null)?l=>t.filter(i=>r(i.enabled)!==!1).reduceRight((i,a)=>a.revert(i),l):void 0,enabled:C(()=>t.filter(l=>r(l.enabled)!==!1).length>0),description:B(()=>o(I,null,[t.filter(l=>r(l.enabled)!==!1).map(l=>r(l.description)).filter(l=>l).map(Lt)]))}})}function Ei(e){return Nt(()=>{const t=e();return t.currentGain==null&&(t.currentGain=C(()=>{let l=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return l=n.floor(l).max(0),r(t.buyMax)||(l=l.min(1)),l})),t.actualGain==null&&(t.actualGain=t.currentGain),t.currentAt==null&&(t.currentAt=C(()=>{let l=t.scaling.currentAt(t);return t.roundUpCost&&(l=n.ceil(l)),l})),t.nextAt==null&&(t.nextAt=C(()=>{let l=t.scaling.nextAt(t);return t.roundUpCost&&(l=n.ceil(l)),l})),t.convert==null&&(t.convert=function(){var a;const l=r(t.currentGain),i=r(t.currentAt);t.gainResource.value=n.add(t.gainResource.value,l),t.spend(l,i),(a=t.onConvert)==null||a.call(t,l)}),t.spend==null&&(t.spend=function(){t.baseResource.value=0}),G(t,"currentGain"),G(t,"actualGain"),G(t,"currentAt"),G(t,"nextAt"),G(t,"buyMax"),mt(t,"buyMax",!0),G(t,"roundUpCost"),mt(t,"roundUpCost",!0),t})}function Pn(e,t){const l=pt(e),i=pt(t);return{currentGain(a){let s=r(a.baseResource.value);if(a.costModifier&&(s=a.costModifier.apply(s)),n.lt(s,r(l)))return 0;const u=n.div(s,r(l)).pow(r(i));return u.isNan()?new n(0):u},currentAt(a){let s=r(a.currentGain);return a.gainModifier&&(s=a.gainModifier.revert(s)),s=n.max(0,s).root(r(i)).times(r(l)),a.costModifier&&(s=a.costModifier.revert(s)),s},nextAt(a){let s=n.add(r(a.currentGain),1).floor();return a.gainModifier&&(s=a.gainModifier.revert(s)),s=n.max(0,s).root(r(i)).times(r(l)).max(r(l)),a.costModifier&&(s=a.costModifier.revert(s)),s}}}function Mi(e){return Ei(e)}function Us(e){return Ei(()=>{const t=e();return mt(t,"buyMax",!1),t.currentGain==null&&(t.currentGain=C(()=>{let l=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return l=n.floor(l).max(t.gainResource.value),r(t.buyMax)||(l=l.min(n.add(t.gainResource.value,1))),l})),t.actualGain==null&&(t.actualGain=C(()=>{let l=n.sub(n.floor(t.scaling.currentGain(t)),t.gainResource.value).max(0);return r(t.buyMax)||(l=l.min(1)),l})),mt(t,"convert",function(){var a;const l=r(t.actualGain),i=r(t.currentAt);t.gainResource.value=t.gainModifier?t.gainModifier.apply(r(t.currentGain)):r(t.currentGain),t.spend(l,i),(a=t.onConvert)==null||a.call(t,l)}),t})}const Rs={class:"field"},Os=ae({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,i=C(()=>Ae(r(l.title)||"","span")),a=C({get(){return!!l.modelValue},set(s){t("update:modelValue",s)}});return(s,u)=>(y(),E("label",Rs,[nn(g("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":u[0]||(u[0]=c=>lt(a)?a.value=c:null)},null,512),[[Xi,r(a)]]),(y(),ee(je(r(i))))]))}});var Wt=Ne(Os,[["__scopeId","data-v-33d57459"]]);const $s={class:"field"},qs={key:0,class:"field-title"},Dn=ae({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var u;const l=e,i=ul(Ht(l,"title"),"span"),a=$((u=l.options.find(c=>c.value===l.modelValue))!=null?u:null);Qt(Ht(l,"modelValue"),c=>{var p;ot(a)!==c&&(a.value=(p=l.options.find(m=>m.value===c))!=null?p:null)});function s(c){t("update:modelValue",c.value)}return(c,p)=>(y(),E("div",$s,[r(i)?(y(),E("span",qs,[(y(),ee(je(r(i))))])):U("",!0),o(r(la),{options:e.options,modelValue:a.value,"onUpdate:modelValue":[p[0]||(p[0]=m=>a.value=m),s],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});var Gs=ae({props:{visibility:{type:V(Number),required:!0},display:{type:V(String,Object,Function),required:!0},style:V(String,Object,Array),classes:V(Object),earned:{type:V(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:ql},setup(e){const{display:t}=gt(e),l=Tt("");return Bt(()=>{const i=ot(t);if(i==null){l.value="";return}if(Jt(i)){l.value=Ae(i);return}const a=Ae(i.requirement,"h3"),s=Ae(i.effectDisplay||"","b"),u=Ae(i.optionsDisplay||"","span");l.value=Ae(B(()=>o("span",null,[o(a,null,null),i.effectDisplay?o("div",null,[o(s,null,null)]):null,i.optionsDisplay?o("div",{class:"equal-spaced"},[o(u,null,null)]):null])))}),{comp:l,unref:r,Visibility:at}}});function Vs(e,t,l,i,a,s){var c;const u=rl("Node");return e.unref(e.visibility)!==e.Visibility.None?(y(),E("div",{key:0,style:nt([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(c=e.unref(e.style))!=null?c:{}]),class:et({feature:!0,milestone:!0,done:e.unref(e.earned),...e.unref(e.classes)})},[(y(),ee(je(e.unref(e.comp)))),o(u,{id:e.id},null,8,["id"])],6)):U("",!0)}var Ls=Ne(Gs,[["render",Vs],["__scopeId","data-v-f4e8794e"]]);Ue.on("setupVue",e=>e.use(na));const jn=ni(),Qs=Symbol("Milestone");let al;(function(e){e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none"})(al||(al={}));function _e(e){const t=we(!1);return Nt(()=>{var a;const l=(a=e==null?void 0:e())!=null?a:{};l.id=Il("milestone-"),l.type=Qs,l[dl]=Ls,l.earned=t,l.complete=function(){var u;const s=l;if(t.value=!0,(u=s.onComplete)==null||u.call(s),s.display&&r(s.showPopups)===!0){const c=r(s.display),p=Ae(Jt(c)?c:c.requirement);jn(o(I,null,[o("h3",null,[d("Milestone earned!")]),o("div",null,[o(p,null,null)])]))}},G(l,"visibility"),mt(l,"visibility",at.Visible);const i=l.visibility;if(l.visibility=C(()=>{const s=r(l.display);switch(Ye.msDisplay){default:case al.All:return r(i);case al.Configurable:return r(l.earned)&&!(s!=null&&typeof s=="object"&&"optionsDisplay"in s)?at.None:r(i);case al.Incomplete:return r(l.earned)?at.None:r(i);case al.None:return at.None}}),G(l,"style"),G(l,"classes"),G(l,"display"),G(l,"showPopups"),l[cl]=function(){const{visibility:s,display:u,style:c,classes:p,earned:m,id:b}=this;return{visibility:s,display:u,style:r(c),classes:p,earned:m,id:b}},l.shouldEarn){const s=l;Bt(()=>{var u,c;if(Ye.active===z.id&&!s.earned.value&&r(s.visibility)===at.Visible&&((u=s.shouldEarn)==null?void 0:u.call(s))&&(s.earned.value=!0,(c=s.onComplete)==null||c.call(s),s.display&&r(s.showPopups)===!0)){const p=r(s.display),m=Ae(Jt(p)?p:p.requirement);jn(o(I,null,[o("h3",null,[d("Milestone earned!")]),o("div",null,[o(m,null,null)])]))}})}return l})}Ue.on("loadSettings",e=>{mt(e,"msDisplay",al.All)});const Hs=Object.values(al).map(e=>({label:pi(e),value:e}));Ao(B(()=>o(Dn,{title:"Show Milestones",options:Hs,"onUpdate:modelValue":e=>Ye.msDisplay=e,modelValue:Ye.msDisplay},null)));const js=Symbol("Reset");function zs(e){return Nt(()=>{const t=e();return t.id=Il("reset-"),t.type=js,t.reset=function(){var i;const l=a=>{if(a&&typeof a=="object")if(ol in a){const s=a;s.value=s[ol]}else!(a instanceof n)&&!lt(a)&&Object.values(a).forEach(s=>l(s))};r(t.thingsToReset).forEach(l),Ue.emit("reset",t),(i=t.onReset)==null||i.call(t)},G(t,"thingsToReset"),t})}const zl={};Ue.on("removeLayer",e=>{var t;(t=zl[e.id])==null||t.call(zl),zl[e.id]=void 0});const Ws={},Ks={style:{"white-space":"nowrap"}},Js=g("span",{style:{"font-size":"larger","font-family":"initial"}},"\u221A",-1),Ys={style:{"text-decoration":"overline"}};function Xs(e,t){return y(),E("span",Ks,[Js,g("span",Ys,[Vt(e.$slots,"default")])])}var Zs=Ne(Ws,[["render",Xs]]);const er="oil",vn=9,Ke=Ut(er,function(){const e="Oil",t="#000000",l="var(--foreground)",i=st(0,"oil"),a=st(0,"depth"),s=we(0),u=C(()=>n.lt(a.value,990)?n.add(10,a.value):n.pow(1.001,n.sub(a.value,990)).mul(1e3));function c(){if(n.lt(a.value,990)){const Ge=n.min(n.affordArithmeticSeries(s.value,10,1,a.value),n.sub(990,a.value)),wt=n.sumArithmeticSeries(Ge,10,1,a.value);s.value=n.sub(s.value,wt),a.value=n.add(a.value,Ge)}if(n.gte(a.value,990)){const Ge=n.affordGeometricSeries(s.value,1e3,1.001,n.sub(a.value,990)),wt=n.sumGeometricSeries(Ge,1e3,1.001,n.sub(a.value,990));s.value=n.sub(s.value,wt),a.value=n.add(a.value,Ge)}}const p=we(0),m=C(()=>n.times(n.pow(p.value,Y.value).pow(2),1e14)),b=C(()=>n.times(n.pow(p.value,Y.value),1)),h=Se(()=>({resource:ht.metal,cost(){const Ge=new n(this.amount.value);return n.pow(1.3,Ge).times(25e3)},display:B(()=>o(I,null,[o("h3",null,[d("Heavy Drill")]),o("br",null,null),d("A large drill specialized at deep mining."),o("br",null,null),d("Consumes 1e14*(Heavy Drills amount)"),o("sup",null,[d("2")]),d(" coal/sec for (Heavy Drills amount) drill power."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("-"),oe(m.value),d(" coal/sec"),o("br",null,null),d("+"),oe(b.value),d(" drill power"),o("br",null,null),o("br",null,null),d("Cost: "),ie(r(h.cost)),d(" "),h.resource.displayName])),onPurchase(){p.value=n.add(p.value,1)},style:{color:l,width:"160px"}})),{min:w,max:f,add:_,remove:A}=Gt({buyable:h,active:p}),P=we(0),Y=C(()=>n.add(P.value,Math.E).ln()),M=Se(()=>({resource:ht.metal,cost(){const Ge=new n(this.amount.value);return n.pow(2,Ge).times(1e5)},display:B(()=>o(I,null,[o("h3",null,[d("Heavy Drill Drill")]),o("br",null,null),d("Attach extra drills to Heavy Drills to make them faster"),o("br",null,null),d("Raise amount of effective Heavy Drills by ^ln(Heavy Drill Drill amount + e)."),o("br",null,null),d("(also affects coal consumption)."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("^"),oe(Y.value),d(" Heavy Drill amount"),o("br",null,null),o("br",null,null),d("Cost: "),ie(r(M.cost)),d(" "),M.resource.displayName])),onPurchase(){P.value=n.add(P.value,1)},style:{color:l,width:"160px"}})),{min:S,max:T,add:fe,remove:Pe}=Gt({buyable:M,active:P}),H=we(0),Ee=C(()=>n.pow(1/3,H.value)),de=C(()=>n.pow(2,H.value)),Re=C(()=>n.pow(1.2,H.value)),Be=Se(()=>({resource:ht.metal,cost(){const Ge=new n(this.amount.value);return n.pow(8,Ge).times(2e5)},display:B(()=>o(I,null,[o("h3",null,[d("Heavy Extractor")]),o("br",null,null),d("Attach extractors to the drill to mine coal and ore, but with a price."),o("br",null,null),d("Divides drill power by 3 to multiply coal gain by 2 and ore gain by 1.2."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("\xD7"),oe(Ee.value),d(" drill power"),o("br",null,null),d("\xD7"),oe(de.value),d(" coal/sec"),o("br",null,null),d("\xD7"),oe(Re.value),d(" ore/sec"),o("br",null,null),o("br",null,null),d("Cost: "),ie(r(Be.cost))," ",Be.resource.displayName])),onPurchase(){H.value=n.add(H.value,1)},style:{color:l,width:"160px"}})),{min:De,max:Ie,add:Oe,remove:L}=Gt({buyable:Be,active:H}),Ce=we(0),he=C(()=>n.pow(_t[3].bought.value?4:5,Ce.value)),me=C(()=>n.pow(Ce.value,2).mul(p.value).mul(n.add(P.value,1)).mul(H.value).mul(a.value).div(1e5)),$e=Se(()=>({resource:ht.metal,cost(){const Ge=new n(this.amount.value);let wt=n.pow(16,Ge).times(2e6);return _t[4].bought.value&&(wt=wt.div(n.add(fl.value,1).root(6))),wt},display:B(()=>o(I,null,[o("h3",null,[d("Oil Pump")]),o("br",null,null),d("Pump that oil from the ground."),o("br",null,null),d("Gain oil based on the number of Heavy Drills and Heavy Drill Drills active and well depth, but coal usage is multiplied by "),_t[3].bought.value?4:5,d("\xD7."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("\xD7"),oe(he.value),d(" coal usage"),o("br",null,null),d("+"),oe(me.value),d(" oil/sec"),o("br",null,null),o("br",null,null),d("Cost: "),ie(r($e.cost)),d(" "),$e.resource.displayName])),onPurchase(){Ce.value=n.add(Ce.value,1)},style:{color:l,width:"160px"}})),{max:Fe,min:rt,add:Te,remove:Pt}=Gt({buyable:$e,active:Ce}),te=we(0),le=C(()=>n.pow(te.value,2)),Xe=C(()=>n.pow(te.value,3).mul(1e19)),He=C(()=>n.add(te.value,1)),ue=Se(()=>({resource:F(i),cost(){const Ge=new n(this.amount.value);return n.pow(2,Ge).times(50)},display:B(()=>o(I,null,[o("h3",null,[d("Oil Burner")]),o("br",null,null),d("Burn oil as fuel."),o("br",null,null),d("(Oil Burner Amount)"),o("sup",null,[d("2")]),d(" unit of oil can give 1e19*(Oil Burner Amount)"),o("sup",null,[d("3")]),d(" units of coal."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("-"),oe(le.value),d(" oil/sec"),o("br",null,null),d("-"),oe(Xe.value),d(" coal consumption"),_t[2].bought.value?o(I,null,[o("br",null,null),d("\xD7"),oe(He.value),d(" to auto smelting multi")]):"",o("br",null,null),o("br",null,null),d("Cost: "),ie(r(ue.cost)),d(" "),ue.resource.displayName])),onPurchase(){te.value=n.add(te.value,1)},style:{color:l,width:"160px"}})),{max:ut,min:ze,add:xe,remove:ft}=Gt({buyable:ue,active:te}),Ve=we(0),Dt=C(()=>n.pow(Ve.value,2).mul(100)),qe=C(()=>n.add(Ve.value,1)),dt=Se(()=>({resource:ht.metal,cost(){const Ge=new n(this.amount.value);let wt=n.pow(10,Ge).times(1e7);return _t[4].bought.value&&(wt=wt.div(n.add(fl.value,1).root(6))),wt},display:B(()=>o(I,null,[o("h3",null,[d("Oil Smelter")]),o("br",null,null),d("Use oil as a crucible fuel."),o("br",null,null),d("Burn 100x"),o("sup",null,[d("2")]),d(" oil to smelt +100% faster."),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("-"),oe(Dt.value),d(" oil/sec"),o("br",null,null),d("\xD7"),oe(qe.value),d(" smelting speed"),o("br",null,null),o("br",null,null),d("Cost: "),ie(r(dt.cost)),d(" "),dt.resource.displayName])),onPurchase(){Ve.value=n.add(Ve.value,1)},style:{color:l,width:"160px"}})),{max:K,min:q,add:Rt,remove:el}=Gt({buyable:dt,active:Ve}),it=[_e(()=>({display:{requirement:"5m Well Depth",effectDisplay:"Gain 25% more coal for each metre of well depth (after the 3 elf milestone)."},shouldEarn:()=>n.gte(a.value,5)})),_e(()=>({display:{requirement:"10m Well Depth",effectDisplay:"Drill too slow? Unlock some drill upgrades!"},shouldEarn:()=>n.gte(a.value,10),visibility:()=>x(it[0].earned.value)})),_e(()=>({display:{requirement:"25m Well Depth",effectDisplay:"Gain 5% more ore for each metre of well depth."},shouldEarn:()=>n.gte(a.value,25),visibility:()=>x(it[1].earned.value)})),_e(()=>({display:{requirement:"60m Well Depth",effectDisplay:"Drill still too slow? Try unlocking another drill!"},shouldEarn:()=>n.gte(a.value,60),visibility:()=>x(it[2].earned.value)})),_e(()=>({display:{requirement:"150m Well Depth",effectDisplay:"It appears that coal and metal appear a lot more when you go this deep! Unlock more coal and metal upgrades!"},shouldEarn:()=>n.gte(a.value,150),visibility:()=>x(it[3].earned.value)})),_e(()=>({display:{requirement:"350m Well Depth",effectDisplay:"There is even more coal and metal than you thought. Why don't you utilize your heavy drill to mine them? Unlock a new drill upgrade!"},shouldEarn:()=>n.gte(a.value,350),visibility:()=>x(it[4].earned.value)})),_e(()=>({display:{requirement:"1,000m Well Depth",effectDisplay:"You've finally found oil! Maybe it's time to make those oil useful! Unfortunately extracting them would use more coal, and also it's becoming much harder to mine deeper due to the thermal heat and pressure."},shouldEarn:()=>n.gte(a.value,1e3),visibility:()=>x(n.gte(a.value,1e3))})),_e(()=>({display:{requirement:"3,000m Well Depth",effectDisplay:"You found a large oil spot! Double oil gain!"},shouldEarn:()=>n.gte(a.value,3e3),visibility:()=>x(n.gte(a.value,2e3))}))],{collapseMilestones:X,display:Et}=tn(it),kt=[_e(()=>({display:{requirement:"100 total oil",effectDisplay:"Hmm, these oil pumps are really expensive. Maybe you should find a way to solve this problem... maybe you can use oil as fuel instead of coal?"},shouldEarn:()=>n.gte(fl.value,100)})),_e(()=>({display:{requirement:"500 total oil",effectDisplay:"Unlocks oil upgrades! These can be bought with oil."},shouldEarn:()=>n.gte(fl.value,500),visibility:()=>x(kt[0].earned.value)})),_e(()=>({display:{requirement:"10,000 total oil",effectDisplay:"Wow, this is really bright when you burn it. Maybe it can be helpful to use them to smelt metal?"},shouldEarn:()=>n.gte(fl.value,1e4),visibility:()=>x(kt[1].earned.value)}))],{collapseMilestones:Cl,display:kl}=tn(kt),Ft=[O(()=>({resource:R.coal,cost:1e18,display:{title:"Coal Drill Synergy",description:"Increase drill power by +4% per coal Mining Drill owned.",effectDisplay:B(()=>o(I,null,[d("x"),oe(We[0].value)]))},style:{color:l}})),O(()=>({resource:ht.metal,cost:15e4,display:{title:"Metal Drill Synergy",description:"Increase drill power by +4% per ore Mining Drill owned.",effectDisplay:B(()=>o(I,null,[d("x"),oe(We[1].value)]))},style:{color:l}})),O(()=>({resource:R.coal,cost:1e20,display:{title:"Coal Drill Upgrade",description:"Increase drill power by +6% per OoM of coal owned.",effectDisplay:B(()=>o(I,null,[d("x"),oe(We[2].value)]))},style:{color:l}})),O(()=>({resource:ht.metal,cost:15e5,display:{title:"Metal Drill Upgrade",description:"Increase drill power by +10% per OoM of metal ingot owned.",effectDisplay:B(()=>o(I,null,[d("x"),oe(We[3].value)]))},style:{color:l}})),O(()=>({resource:F(i),cost:100,display:{title:"Drill Oil",description:"Increase previous upgrades' effect by +0.1% per Heavy Drill owned.",effectDisplay:B(()=>o(I,null,[d("+"),oe(n.mul(We[4].value,100)),d("%")]))},style:{color:l}}))],We=[C(()=>n.mul(R.buildDrill.amount.value,n.add(.04,zt.value)).add(1)),C(()=>n.mul(ht.oreDrill.amount.value,n.add(.04,zt.value)).add(1)),C(()=>n.mul(n.max(R.coal.value,1).log10().floor(),n.add(.06,zt.value)).add(1)),C(()=>n.mul(n.max(ht.metal.value,1).log10().floor(),n.add(.1,zt.value)).add(1)),C(()=>n.mul(h.amount.value,.001))],_t=[O(()=>({resource:F(i),cost:100,display:{title:"Oil the Oil Pump",description:"Double oil gain."},style:{color:l}})),O(()=>({resource:F(i),cost:500,display:{title:"Oil the Mining Drills",description:"Double ore mining speed and square the coal drill amount in its effect."},style:{color:l}})),O(()=>({resource:F(i),cost:1500,display:{title:"Blaster Burner",description:"The Oil Burner can now increase your metal gain."},style:{color:l}})),O(()=>({resource:F(i),cost:25e3,display:{title:"Oil Integration",description:"Reduce Oil Pump's coal consumption multipler from 5 to 4"},style:{color:l}})),O(()=>({resource:F(i),cost:5e4,display:{title:"Be One with the Oil",description:B(()=>o(I,null,[d("Divide metal ingot prices of oil buildings by "),o("sup",null,[d("6")]),o(Zs,null,{default:()=>[d("total oil + 1")]})]))},style:{color:l}}))],Mt=W(()=>[Z(()=>({addend:()=>n.negate(m.value),description:"Heavy Drill",enabled:()=>n.gt(p.value,0)})),k(()=>({multiplier:he,description:"Oil Pump",enabled:()=>n.gt(Ce.value,0)})),Z(()=>({addend:pn,description:"Oil to Coal Substitution",enabled:()=>n.gt(pn.value,0)}))]),tl=C(()=>Mt.apply(0)),Ot=W(()=>[Z(()=>({addend:b,description:"Heavy Drill",enabled:()=>n.gt(p.value,0)})),k(()=>({multiplier:Ee,description:"Heavy Extractor",enabled:()=>n.gt(H.value,0)})),k(()=>({multiplier:We[0],description:"Coal Drill Synergy",enabled:Ft[0].bought})),k(()=>({multiplier:We[1],description:"Metal Drill Synergy",enabled:Ft[1].bought})),k(()=>({multiplier:We[2],description:"Coal Drill Upgrade",enabled:Ft[2].bought})),k(()=>({multiplier:We[3],description:"Metal Drill Upgrade",enabled:Ft[3].bought})),k(()=>({multiplier:2,description:"Guide to drilling",enabled:j.upgrades.drillingUpgrade.bought})),k(()=>({multiplier:()=>jt.value,description:"Effectiveness",enabled:()=>n.lt(jt.value,1)}))]),gl=C(()=>Ot.apply(0)),Ll=W(()=>[Z(()=>({addend:We[4],description:"Drill Oil",enabled:Ft[4].bought}))]),zt=C(()=>Ll.apply(0)),Ql=W(()=>[Z(()=>({addend:me,description:"Oil Pump",enabled:()=>n.gt(Ce.value,0)})),k(()=>({multiplier:2,description:"Oil the Oil Pump",enabled:_t[0].bought})),k(()=>({multiplier:2,description:"3000m Well Depth",enabled:it[7].earned})),k(()=>({multiplier:2,description:"Oil and where to find it",enabled:j.upgrades.oilUpgrade.bought})),k(()=>({multiplier:()=>jt.value,description:"Effectiveness",enabled:()=>n.lt(jt.value,1)}))]),_l=C(()=>Ql.apply(0)),Hl=W(()=>[Z(()=>({addend:()=>n.negate(le.value),description:"Oil Burner",enabled:()=>n.gt(te.value,0)})),Z(()=>({addend:()=>n.negate(Dt.value),description:"Oil Smelter",enabled:()=>n.gt(Ve.value,0)})),Z(()=>({addend:()=>n.negate(Le.oilCost.value),description:"Oil Refinery",enabled:()=>n.gt(Le.activeRefinery.value,0)}))]),D=C(()=>Hl.apply(0)),Rn=W(()=>[Z(()=>({addend:Xe,description:"Oil Burner",enabled:()=>n.gt(te.value,0)})),k(()=>({multiplier:()=>ll.value,description:"Effectiveness",enabled:()=>n.lt(ll.value,1)}))]),pn=C(()=>Rn.apply(0)),[Qi,Hi]=pl(()=>[{title:"Coal Consumption",modifier:Mt,unit:"/s",base:0},{title:"Drill Power",modifier:Ot,base:0},{title:"Upgrade Bonus",modifier:Ll,base:0,visible(){return n.gt(zt.value,0)}},{title:"Oil Speed",modifier:Ql,unit:"/s",base:0,visible(){return n.gt(_l.value,0)}},{title:"Oil Consumption",modifier:Hl,unit:"/s",base:0,visible(){return n.lt(D.value,0)}},{title:"Oil to Coal Substitution",modifier:Rn,unit:"/s",base:0,visible(){return n.gt(pn.value,0)}}]),mn=$(!1),ji=B(()=>o(bt,{modelValue:mn.value,"onUpdate:modelValue":Ge=>mn.value=Ge},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:Qi})),jt=$(n.dOne),ll=$(n.dOne);Ue.on("update",Ge=>{if(n.lt(Q.day.value,vn))return;const wt=n.negate(tl.value);n.gt(wt,0)?(jt.value=n.min(n.div(R.coal.value,wt),1),R.coal.value=n.sub(R.coal.value,n.mul(wt,jt.value).mul(Ge))):jt.value=n.dOne,s.value=n.add(s.value,n.mul(gl.value,Ge)),i.value=n.add(i.value,n.mul(_l.value,Ge)),c();const gn=n.negate(D.value);n.gt(gn,0)?(ll.value=n.min(n.div(i.value,gn),1),i.value=n.sub(i.value,n.mul(gn,ll.value).mul(Ge)).max(0)):ll.value=n.dOne});const{total:fl,trackerDisplay:zi}=ml({resource:i,goal:25e4,name:e,day:vn,color:t,modal:{show:mn,display:ji}});return{name:e,day:vn,color:t,oil:i,totalOil:fl,depth:a,drillProgress:s,activeHeavy:p,buildHeavy:h,activeHeavy2:P,buildHeavy2:M,activeExtractor:H,buildExtractor:Be,activePump:Ce,buildPump:$e,activeBurner:te,buildBurner:ue,activeSmelter:Ve,buildSmelter:dt,extractorCoal:de,extractorOre:Re,coalEffectiveness:jt,oilEffectiveness:ll,depthMilestones:it,collapsedDepthMilestones:X,row1Upgrades:Ft,row2Upgrades:_t,minWidth:700,oilMilestones:kt,collapsedOilMilestones:Cl,generalTabCollapsed:Hi,display:B(()=>o(I,null,[re(zi),o(ge,null,null),n.lt(jt.value,1)?o("div",null,[d("Coal efficiency: "),oe(n.mul(jt.value,100)),d("%")]):null,n.lt(ll.value,1)?o("div",null,[d("Oil efficiency: "),oe(n.mul(ll.value,100)),d("%")]):null,o(St,{resource:i,color:t,sticky:!0,productionDisplay:B(()=>o(I,null,[n.lt(a.value,1e3)?"Reach 1000m to start gaining oil":o(I,null,[Xl(n.add(_l.value,D.value))])]))},null),n.eq(_l.value,0)?o(I,null,[d("(Need at least 1 Oil Pump, 1 Heavy Drill and 1 Heavy Extractor active to gain oil)"),o("br",null,null)]):"",o(Ml,null,{default:()=>[it[6].earned.value?o(At,null,{default:()=>[re($e),o("div",null,[ie(n.floor(Ce.value)),d("/"),ie(n.floor($e.amount.value))]),ye(rt,Pt,Te,Fe)]}):null,kt[0].earned.value?o(At,null,{default:()=>[re(ue),o("div",null,[ie(n.floor(te.value)),d("/"),ie(n.floor(ue.amount.value))]),ye(ze,ft,xe,ut)]}):null,kt[2].earned.value?o(At,null,{default:()=>[re(dt),o("div",null,[ie(n.floor(Ve.value)),d("/"),ie(n.floor(dt.amount.value))]),ye(q,el,Rt,K)]}):null]}),o("br",null,null),o("div",null,[o("span",null,[d("The well is ")]),o("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[ie(a.value)]),d("m deep"),o("br",null,null),d("Next at "),oe(n.sub(u.value,s.value)),d(" drill power seconds")]),o("div",null,[o("span",null,[d("Your drill power is ")]),o("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[oe(gl.value)])]),o(ge,null,null),o(Ml,null,{default:()=>[o(At,null,{default:()=>[re(h),o("div",null,[ie(n.floor(p.value)),d("/"),ie(n.floor(h.amount.value))]),ye(w,A,_,f)]}),it[3].earned.value?o(At,null,{default:()=>[re(M),o("div",null,[ie(n.floor(P.value)),d("/"),ie(n.floor(M.amount.value))]),ye(S,Pe,fe,T)]}):null,it[5].earned.value?o(At,null,{default:()=>[re(Be),o("div",null,[ie(n.floor(H.value)),d("/"),ie(n.floor(Be.amount.value))]),ye(De,L,Oe,Ie)]}):null]}),o(ge,null,null),it[1].earned.value?ye(...Ft):null,kt[1].earned.value?ye(..._t):null,o(ge,null,null),Et(),n.gte(fl.value,50)?kl():""]))}}),tr="plastic",zn=10,Le=Ut(tr,function(){const e="Plastic",t="#DCD9CD",l=st(0,"plastic"),[i,a]=pl(()=>[{title:"Plastic Gain",modifier:Be,base:0}]),s=$(!1),u=B(()=>o(bt,{modelValue:s.value,"onUpdate:modelValue":L=>s.value=L},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:i})),c=we(0),p=C(()=>n.times(c.value,100)),m=Se(()=>({resource:ht.metal,cost(){const L=new n(this.amount.value);return n.pow(1.2,L).times(1e7)},display:B(()=>o(I,null,[o("h3",null,[d("Refinery")]),o("br",null,null),d("Refines oil into plastic pellets"),o("br",null,null),d("Consumes 100 oil/s to create 1 plastic/s"),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("-"),ve(p.value),d(" oil/sec"),o("br",null,null),d("+"),ve(c.value),d(" plastic/sec"),o("br",null,null),o("br",null,null),d("Cost: "),se(r(m.cost))," ",m.resource.displayName])),onPurchase(){c.value=n.add(c.value,1)},style:{width:"300px"}})),{min:b,max:h,add:w,remove:f}=Gt({buyable:m,active:c,style:{minHeight:"20px",width:"40px",color:"var(--feature-foreground)"}}),_=C(()=>n.pow(5,n.add([...Object.values(M),...Object.values(Pe)].filter(L=>L.bought.value).length,2))),A=O(()=>({resource:F(l),cost:_,display:()=>({title:"Plastic Scissors",description:"Unlock paper upgrades",showCost:!A.bought.value})})),P=O(()=>({resource:F(l),cost:_,display:()=>({title:"Plastic Level",description:"Unlock box upgrades",showCost:!P.bought.value})})),Y=O(()=>({resource:F(l),cost:_,display:()=>({title:"Plastic Cane",description:"Unlock cloth upgrades",showCost:!Y.bought.value})})),M={paperTools:A,boxTools:P,clothTools:Y},S=O(()=>({resource:F(l),cost:_,visibility:()=>x(A.bought.value),display:()=>({title:"Paper Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!S.bought.value})})),T=O(()=>({resource:F(l),cost:_,visibility:()=>x(P.bought.value),display:()=>({title:"Box Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!T.bought.value})})),fe=O(()=>({resource:F(l),cost:_,visibility:()=>x(Y.bought.value),display:()=>({title:"Cloth Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!fe.bought.value})})),Pe={paperElf:S,boxElf:T,clothElf:fe},H=Se(()=>({resource:F(l),cost(){const L=this.amount.value;return n.pow(1.3,L).times(100)},visibility:()=>x(S.bought.value),display:{title:"Plastic Printing Press",description:"Gain +1% of your paper gain per second",effectDisplay:B(()=>o(I,null,[se(H.amount.value),d("%")])),showAmount:!1}})),Ee=Se(()=>({resource:F(l),cost(){const L=this.amount.value;return n.pow(1.3,L).times(100)},visibility:()=>x(T.bought.value),display:{title:"Plastic Box Folder",description:"Gain +1% of your box gain per second",effectDisplay:B(()=>o(I,null,[se(Ee.amount.value),d("%")])),showAmount:!1}})),de=Se(()=>({resource:F(l),cost(){const L=this.amount.value;return n.pow(1.3,L).times(100)},visibility:()=>x(fe.bought.value),display:{title:"Plastic Shepherd",description:"All cloth actions are +10% more efficient",effectDisplay:B(()=>o(I,null,[se(n.times(de.amount.value,10)),d("%")])),showAmount:!1}})),Re={passivePaper:H,passiveBoxes:Ee,clothGains:de},Be=W(()=>[Z(()=>({addend:c,description:"Oil Refinery",enabled:()=>n.gt(c.value,0)})),k(()=>({multiplier:2,description:"Paper Elf Recruitment",enabled:S.bought})),k(()=>({multiplier:2,description:"Box Elf Recruitment",enabled:T.bought})),k(()=>({multiplier:2,description:"Cloth Elf Recruitment",enabled:fe.bought})),k(()=>({multiplier:2,description:"Carry plastic in boxes",enabled:ct.row2Upgrades.plasticUpgrade.bought})),k(()=>({multiplier:()=>Ke.oilEffectiveness.value,description:"Effectiveness",enabled:()=>n.lt(Ke.oilEffectiveness.value,1)}))]),De=C(()=>Be.apply(0));Ue.on("update",L=>{n.lt(Q.day.value,zn)||(l.value=n.times(L,De.value).add(l.value))});const{total:Ie,trackerDisplay:Oe}=ml({resource:l,goal:25e4,name:e,day:zn,color:t,textColor:"var(--feature-foreground)",modal:{show:s,display:u}});return{name:e,color:t,plastic:l,totalPlastic:Ie,buildRefinery:m,activeRefinery:c,oilCost:p,upgrades:M,elfUpgrades:Pe,buyables:Re,generalTabCollapsed:a,minWidth:700,display:B(()=>o(I,null,[re(Oe),o(ge,null,null),o(St,{resource:l,color:t,style:"margin-bottom: 0",effectDisplay:n.gt(De.value,0)?`+${ve(De.value)}/s`:void 0},null),o(ge,null,null),o(At,null,{default:()=>[re(m),o("div",null,[se(n.floor(c.value)),d("/"),se(n.floor(m.amount.value))]),ye(b,f,w,h)]}),o(Ml,null,{default:()=>[sl(A,S,H),sl(P,T,Ee),sl(Y,fe,de)]})]))}}),lr="workshop",Bl=2,Ct=Ut(lr,function(){const e="Workshop",t="#D66B02",l="#D66B02",i=st(0,"foundation progress"),a=Us(()=>({scaling:Pn(250,1.5),baseResource:be.logs,gainResource:F(i),roundUpCost:!0,buyMax:!1,spend(T,fe){be.logs.value=n.sub(be.logs.value,fe)}})),s=It(()=>({display:B(()=>o(I,null,[o("b",{style:"font-size: x-large"},[d("Build part of the foundation")]),o("br",null,null),o("br",null,null),o("span",{style:"font-size: large"},[d("Cost:")," ",Gl(be.logs,n.gte(a.actualGain.value,1)?a.currentAt.value:a.nextAt.value)," ",be.logs.displayName])])),visibility:()=>x(n.lt(i.value,100)),canClick:()=>n.gte(a.actualGain.value,1)&&n.lt(i.value,100),onClick(){!r(this.canClick)||a.convert()},style:"width: 600px; min-height: unset"})),u=El(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{s.canClick.value&&s.onClick()}})),c=C(()=>!Qe.milestones[6].earned.value),p=_e(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>n.gte(i.value,1),showPopups:c})),m=_e(()=>({display:{requirement:"10% Foundation Completed",effectDisplay:"Cut an additional tree per second for each 5% of foundation completed"},shouldEarn:()=>n.gte(i.value,10),visibility:()=>x(p.earned.value),showPopups:c})),b=_e(()=>({display:{requirement:"20% Foundation Completed",effectDisplay:"Plant an additional tree per second for each 10% of foundation completed"},shouldEarn:()=>n.gte(i.value,20),visibility:()=>x(m.earned.value),showPopups:c})),h=_e(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>n.gte(i.value,30),visibility:()=>x(b.earned.value),showPopups:c})),w=_e(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>n.gte(i.value,40),visibility:()=>x(h.earned.value),showPopups:c})),f=_e(()=>({display:{requirement:"50% Foundation Completed",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>n.gte(i.value,50),visibility:()=>x(w.earned.value),showPopups:c})),_=_e(()=>({display:{requirement:"75% Foundation Completed",effectDisplay:"The forest gains an extra tree for every 2% of foundation completed"},shouldEarn:()=>n.gte(i.value,75),visibility:()=>x(f.earned.value),showPopups:c})),A=_e(()=>({display:{requirement:"100% Foundation Completed",effectDisplay:"Log per tree is raised to the 1.2th power"},shouldEarn:()=>n.gte(i.value,100),visibility:()=>x(_.earned.value),showPopups:c})),P={logGainMilestone1:p,autoCutMilestone1:m,autoPlantMilestone1:b,autoCutMilestone2:h,autoPlantMilestone2:w,logGainMilestone2:f,morePlantsMilestone1:_,logGainMilestone3:A},{collapseMilestones:Y,display:M}=tn(P),S=Kt(()=>({direction:ke.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>Q.day.value===Bl?n.div(i.value,100):1,display:B(()=>Q.day.value===Bl?o(I,null,[se(i.value),d("%")]):"")}));return Bt(()=>{Q.day.value===Bl&&n.gte(i.value,100)&&Q.completeDay()}),{name:e,day:Bl,color:t,foundationProgress:i,foundationConversion:a,milestones:P,collapseMilestones:Y,minWidth:700,buildFoundationHK:u,display:B(()=>o(I,null,[o("div",null,[Q.day.value===Bl?"Complete the foundation to complete the day":`${e} Complete!`]),re(S),o(ge,null,null),o("div",null,[o("span",null,[d("The foundation is ")]),o("h2",{style:`color: ${t}; text-shadow: 0 0 10px ${t}`},[se(i.value)]),d("% completed")]),n.lt(i.value,100)?o(ge,null,null):null,re(s),o(ge,null,null),M()]))}}),nr="elves",xl=4,Qe=Ut(nr,function(){const e="Elves",t="red",l="#911D21",a=Kt(()=>({direction:ke.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>Q.day.value===xl?n.div(le.value,6).times(.8333333333333334).add(n.div(n.add(R.coal.value,1).log10(),n.log10(1e9)).clamp(0,1).div(6)):1,display:B(()=>Q.day.value===xl?n.lt(le.value,6)?o(I,null,[se(le.value),d("/6 elves")]):o(I,null,[se(R.coal.value),d("/"),se(1e9),d(" coal")]):"")})),s=zs(()=>({thingsToReset:[be,Ct,R],onReset(){setTimeout(()=>{Dt.earned.value?(be.row1Upgrades.forEach(X=>X.bought.value=!0),be.row2Upgrades.forEach(X=>X.bought.value=!0)):He.earned.value&&(be.row1Upgrades[4].bought.value=!0,be.row2Upgrades[4].bought.value=!0),ft.earned.value&&(Ct.foundationProgress.value=100),dt.earned.value&&(R.warmerCutters.bought.value=!0,R.warmerPlanters.bought.value=!0,R.basicFertilizer.bought.value=!0,R.unlockBonfire.bought.value=!0,R.dedicatedCutters.bought.value=!0,R.dedicatedPlanters.bought.value=!0,R.betterFertilizer.bought.value=!0,R.unlockKiln.bought.value=!0,R.efficientSmelther.bought.value=!0)})}})),u=W(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(j.books.cuttersBook.amount.value,.1).add(1),description:"Now You're Logging!",enabled:()=>n.gt(j.books.cuttersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),c=W(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(j.books.plantersBook.amount.value,.1).add(1),description:"The Man Who Planted Trees",enabled:()=>n.gt(j.books.plantersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),p=W(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(j.books.expandersBook.amount.value,.1).add(1),description:"Logjam",enabled:()=>n.gt(j.books.expandersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),m=W(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(j.books.heatedCuttersBook.amount.value,.1).add(1),description:"Fahrenheit 451",enabled:()=>n.gt(j.books.heatedCuttersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),b=W(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(j.books.heatedPlantersBook.amount.value,.1).add(1),description:"Tillamook Burn Country",enabled:()=>n.gt(j.books.heatedPlantersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),h=W(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(j.books.fertilizerBook.amount.value,.1).add(1),description:"The Garden Tree's Handbook",enabled:()=>n.gt(j.books.fertilizerBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),w=W(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(j.books.smallFireBook.amount.value,.1).add(1),description:"Firestarter",enabled:()=>n.gt(j.books.smallFireBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),f=W(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(j.books.bonfireBook.amount.value,.1).add(1),description:"An Arsonist's Guide to Writer's Homes in New England",enabled:()=>n.gt(j.books.bonfireBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),_=W(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(j.books.kilnBook.amount.value,.1).add(1),description:"Little Fires Everywhere",enabled:()=>n.gt(j.books.kilnBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),A=W(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(j.books.paperBook.amount.value,.1).add(1),description:"The Book Thief",enabled:()=>n.gt(j.books.paperBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),P=W(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(j.books.boxBook.amount.value,.1).add(1),description:"Not a box",enabled:()=>n.gt(j.books.boxBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),Y=W(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>n.times(j.books.clothBook.amount.value,.1).add(1),description:"Fuzzy Bee and Friends",enabled:()=>n.gt(j.books.clothBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:qe.earned}))]),[M,S]=pl(()=>[{title:"Holly Auto-Buy Frequency",modifier:u,base:10,unit:"/s",visible:te.cuttersElf.bought},{title:"Ivy Auto-Buy Frequency",modifier:c,base:10,unit:"/s",visible:te.plantersElf.bought},{title:"Hope Auto-Buy Frequency",modifier:p,base:10,unit:"/s",visible:te.expandersElf.bought},{title:"Jack Auto-Buy Frequency",modifier:m,base:10,unit:"/s",visible:te.heatedCuttersElf.bought},{title:"Mary Auto-Buy Frequency",modifier:b,base:10,unit:"/s",visible:te.heatedPlantersElf.bought},{title:"Noel Auto-Buy Frequency",modifier:h,base:10,unit:"/s",visible:te.fertilizerElf.bought},{title:"Joy Auto-Buy Frequency",modifier:w,base:10,unit:"/s",visible:te.smallFireElf.bought},{title:"Faith Auto-Buy Frequency",modifier:f,base:10,unit:"/s",visible:te.bonfireElf.bought},{title:"Snowball Auto-Buy Frequency",modifier:_,base:10,unit:"/s",visible:te.kilnElf.bought},{title:"Star Auto-Buy Frequency",modifier:A,base:10,unit:"/s",visible:te.paperElf.bought},{title:"Bell Auto-Buy Frequency",modifier:P,base:10,unit:"/s",visible:te.boxElf.bought},{title:"Gingersnap Auto-Buy Frequency",modifier:Y,base:10,unit:"/s",visible:te.clothElf.bought}]),T=$(!1),fe=B(()=>o(bt,{modelValue:T.value,"onUpdate:modelValue":X=>T.value=X},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:M})),Pe=C(()=>{let X=n.pow(4,le.value).times(1e6);return n.gte(le.value,9)&&(X=n.times(X,1e15)),X});function H(X){var _t;const Et=we(0),kt=X.hasToggle?we(!1):$(!0),Cl=C(()=>X.cooldownModifier.apply(10)),kl=pt((_t=X.canBuy)!=null?_t:!0);function Ft(Mt){if(We.bought.value&&r(kl)){Et.value=n.add(Et.value,Mt);const tl=n.recip(Cl.value);(wn(X.buyable)?X.buyable:[X.buyable]).forEach(Ot=>{var gl;for(;n.gte(Et.value,tl);)if(X.customCost==null?r(Ot.canPurchase):n.gte(Ot.resource.value,X.customCost(Ot.amount.value)))Ot.amount.value=n.add(Ot.amount.value,1),Et.value=n.sub(Et.value,tl),(gl=X.onAutoPurchase)==null||gl.call(X);else{Et.value=tl;break}})}}const We=O(()=>({...X,buyable:void 0,toggle:kt,buyProgress:Et,update:Ft,resource:R.coal,cost:Pe,computedAutoBuyCooldown:Cl,display:()=>({title:X.name,description:B(()=>o(I,null,[X.description,We.bought.value?null:o(I,null,[" ",d("Training this elf will require resetting all your progress from days 1-3.")]),We.bought.value&&X.hasToggle===!0?o(I,null,[o(Wt,{title:X.toggleDesc,"onUpdate:modelValue":Mt=>kt.value=Mt,modelValue:kt.value},null)]):null])),showCost:!We.bought.value}),style:"width: 190px",onPurchase(){var Mt;(Mt=X.onPurchase)==null||Mt.call(X),s.reset()}}));return We}const Ee=H({name:"Holly",description:"Holly will automatically purchase cutters you can afford, without actually spending any logs.",buyable:be.row1Buyables[0],cooldownModifier:u}),de=H({name:"Ivy",description:"Ivy will automatically purchase planters you can afford, without actually spending any logs.",buyable:be.row1Buyables[1],cooldownModifier:c}),Re=H({name:"Hope",description:"Hope will automatically purchase forest expanders you can afford, without actually spending any logs.",buyable:be.row1Buyables[2],cooldownModifier:p}),Be=[Ee,de,Re],De=H({name:"Jack",description:"Jack will automatically purchase heated cutters you can afford, without actually spending any coal.",buyable:R.heatedCutters,cooldownModifier:m}),Ie=H({name:"Mary",description:"Mary will automatically purchase heated planters you can afford, without actually spending any coal.",buyable:R.heatedPlanters,cooldownModifier:b}),Oe=H({name:"Noel",description:"Noel will automatically purchase fertilized soil you can afford, without actually spending any ash.",buyable:R.moreFertilizer,cooldownModifier:h}),L=[De,Ie,Oe],Ce=H({name:"Joy",description:"Joy will automatically purchase small fires you can afford, without actually spending any logs. You can toggle whether or not to enable the purchased small fires automatically. Small fires will start giving a boost to ash and coal gain.",buyable:R.buildFire,cooldownModifier:w,visibility:()=>x(ct.upgrades.logsUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased small fires",onAutoPurchase(){Ce.toggle.value&&(R.activeFires.value=n.add(R.activeFires.value,1))},onPurchase(){Q.days[4].recentlyUpdated.value=!0}}),he=H({name:"Faith",description:"Faith will automatically purchase bonfires you can afford. You can toggle whether or not to enable the purchased bonfires automatically. Bonfires will start giving a boost to ash and coal gain.",buyable:R.buildBonfire,cooldownModifier:f,visibility:()=>x(ct.upgrades.ashUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased bonfires",onAutoPurchase(){const X=r(this.buyable.cost);R.activeFires.value=n.sub(R.activeFires.value,X).max(0),R.buildFire.amount.value=n.sub(R.buildFire.amount.value,X).max(0),he.toggle.value&&(R.activeBonfires.value=n.add(R.activeBonfires.value,1))},onPurchase(){Q.days[4].recentlyUpdated.value=!0},canBuy:R.unlockBonfire.bought}),me=H({name:"Snowball",description:"Snowball will automatically purchase kilns you can afford, without actually spending any logs. You can toggle whether or not to enable the purchased kilns automatically. Kilns will start giving a boost to ash and coal gain.",buyable:R.buildKiln,cooldownModifier:_,visibility:()=>x(ct.upgrades.coalUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased kilns",onAutoPurchase(){me.toggle.value&&(R.activeKilns.value=n.add(R.activeKilns.value,1))},onPurchase(){Q.days[4].recentlyUpdated.value=!0},canBuy:R.unlockKiln.bought}),$e=[Ce,he,me],Fe=H({name:"Star",description:"Star will automatically purchase all books you can afford, without actually spending any paper.",buyable:Object.values(j.books),cooldownModifier:A,visibility:()=>x(Le.elfUpgrades.paperElf.bought.value)}),rt=H({name:"Bell",description:"Bell will automatically purchase all box buyables you can afford, without actually spending any boxes.",buyable:Object.values(ct.buyables),cooldownModifier:P,visibility:()=>x(Le.elfUpgrades.boxElf.bought.value)}),Te=H({name:"Gingersnap",description:"Gingersnap will automatically purchase all cloth buyables you can afford, without actually spending any resources.",buyable:[yt.buildPens,yt.betterShears,yt.fasterSpinning],cooldownModifier:Y,visibility:()=>x(Le.elfUpgrades.clothElf.bought.value)}),Pt=[Fe,rt,Te],te={cuttersElf:Ee,plantersElf:de,expandersElf:Re,heatedCuttersElf:De,heatedPlantersElf:Ie,fertilizerElf:Oe,smallFireElf:Ce,bonfireElf:he,kilnElf:me,paperElf:Fe,boxElf:rt,clothElf:Te},le=C(()=>Object.values(te).filter(X=>X.bought.value).length),Xe=_e(()=>({display:{requirement:"1 Elf Trained",effectDisplay:"Manual cutting and planting can happen twice as often for each trained elf"},shouldEarn:()=>n.gte(le.value,1)})),He=_e(()=>({display:{requirement:"2 Elves Trained",effectDisplay:"Research I & II aren't reset after training"},shouldEarn:()=>n.gte(le.value,2),visibility:()=>x(Xe.earned.value)})),ue=_e(()=>({display:{requirement:"3 Elves Trained",effectDisplay:"Coal gain is raised to the 1.25"},shouldEarn:()=>n.gte(le.value,3),visibility:()=>x(He.earned.value)})),ut=_e(()=>({display:{requirement:"4 Elves Trained",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>n.gte(le.value,4),visibility:()=>x(ue.earned.value)})),ze=_e(()=>({display:{requirement:"5 Elves Trained",effectDisplay:"Forest is twice as large"},shouldEarn:()=>n.gte(le.value,5),visibility:()=>x(ut.earned.value)})),xe=_e(()=>({display:{requirement:"6 Elves Trained",effectDisplay:"Elves work twice as fast"},shouldEarn:()=>n.gte(le.value,6),visibility:()=>x(ze.earned.value)})),ft=_e(()=>({display:{requirement:"7 Elves Trained",effectDisplay:"Workshop Foundation starts at 100% complete after training"},shouldEarn:()=>n.gte(le.value,7),visibility:()=>x(xe.earned.value&&Q.day.value>5)})),Ve=_e(()=>({display:{requirement:"8 Elves Trained",effectDisplay:"Forest is twice as large (again)"},shouldEarn:()=>n.gte(le.value,8),visibility:()=>x(ft.earned.value)})),Dt=_e(()=>({display:{requirement:"9 Elves Trained",effectDisplay:"Trees upgrades aren't reset after training"},shouldEarn:()=>n.gte(le.value,9),visibility:()=>x(Ve.earned.value)})),qe=_e(()=>({display:{requirement:"10 Elves Trained",effectDisplay:"Elves work twice as fast (again)"},shouldEarn:()=>n.gte(le.value,10),visibility:()=>x(Q.day.value>=10)})),dt=_e(()=>({display:{requirement:"11 Elves Trained",effectDisplay:"Coal upgrades aren't reset after training"},shouldEarn:()=>n.gte(le.value,11),visibility:()=>x(qe.earned.value)})),K=_e(()=>({display:{requirement:"12 Elves Trained",effectDisplay:"Double coal gain"},shouldEarn:()=>n.gte(le.value,12),visibility:()=>x(dt.earned.value)})),q=[Xe,He,ue,ut,ze,xe,ft,Ve,Dt,qe,dt,K],Rt={manualMilestone:Xe,researchMilestone:He,coalGainMilestone:ue,logGainMilestone:ut,forestMilestone:ze,elvesMilestone:xe,foundationMilestone:ft,forestMilestone2:Ve,treeUpgradesMilestone:Dt,elvesMilestone2:qe,coalUpgradesMilestone:dt,coalGainMilestone2:K},{collapseMilestones:el,display:it}=tn(Rt);return Ue.on("update",X=>{n.lt(Q.day.value,xl)||Object.values(te).forEach(Et=>Et.update(X))}),Bt(()=>{Q.day.value===xl&&n.gte(le.value,6)&&n.gte(R.coal.value,1e9)&&Q.completeDay()}),{name:e,color:t,elves:te,totalElves:le,milestones:q,collapseMilestones:el,generalTabCollapsed:S,minWidth:700,display:B(()=>o(I,null,[o("div",null,[Q.day.value===xl?`Reach ${se(6)} trained elves and ${se(1e9)} ${R.coal.displayName} to complete the day`:`${e} Complete!`," ",d("-")," ",o("button",{class:"button",style:"display: inline-block;",onClick:()=>T.value=!0},[d("Check Modifiers")])]),re(a),re(fe),o(ge,null,null),o("div",{style:"width: 600px"},[ye(...Be),ye(...L),ye(...$e),ye(...Pt)]),it()]))}}),ir="coal",Wn=3,R=Ut(ir,function(){const e="Coal",t="#151716",l="#B2BeB5",i="var(--foreground)",a=st(0,"coal"),s=st(0,"ash"),u=we(0),c=C(()=>n.times(u.value,1e3)),p=C(()=>n.times(u.value,.1)),m=C(()=>n.times(u.value,50)),b=Se(()=>({resource:be.logs,cost(){let D=n.times(T.amount.value,r(T.cost)).plus(this.amount.value);return n.gte(D,100)&&(D=n.pow(D,2).div(100)),n.gte(D,1e4)&&(D=n.pow(D,2).div(1e4)),D=n.pow(.95,j.books.smallFireBook.amount.value).times(D),D.pow(1.5).times(1e4)},display:B(()=>o(I,null,[o("h3",null,[d("Small Fire")]),o("br",null,null),d("Burn 1000 logs for 0.1 coal and 50 ash"),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("-"),ve(c.value),d(" logs/sec"),o("br",null,null),d("+"),ve(p.value),d(" coal/sec"),o("br",null,null),d("+"),ve(m.value),d(" ash/sec"),o("br",null,null),o("br",null,null),d("Cost: "),se(r(b.cost)),d(" "),b.resource.displayName])),onPurchase(){u.value=n.add(u.value,1)},style:{color:i,width:"160px"}})),{min:h,max:w,add:f,remove:_}=Gt({active:u,buyable:b}),A=st(b.amount,"small fires"),P=we(0),Y=C(()=>n.times(P.value,1e4)),M=C(()=>n.times(P.value,10)),S=C(()=>n.times(P.value,1e3)),T=Se(()=>({resource:A,cost(){return n.pow(.95,j.books.bonfireBook.amount.value).times(10)},display:B(()=>o(I,null,[o("h3",null,[d("Bonfire")]),o("br",null,null),d("Burn 10,000 logs for 10 coal and 1000 ash"),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("-"),ve(Y.value),d(" logs/sec"),o("br",null,null),d("+"),ve(M.value),d(" coal/sec"),o("br",null,null),d("+"),ve(S.value),d(" ash/sec"),o("br",null,null),o("br",null,null),d("Cost: "),se(r(T.cost)),d(" "),T.resource.displayName])),onPurchase(D){u.value=n.sub(u.value,D).max(0),P.value=n.add(P.value,1)},style:{color:i,width:"160px"},visibility:()=>x(ue.bought.value)})),{min:fe,max:Pe,add:H,remove:Ee}=Gt({buyable:T,active:P}),de=we(0),Re=C(()=>n.times(de.value,1e6)),Be=C(()=>n.times(de.value,1e4)),De=C(()=>n.times(de.value,1e4)),Ie=Se(()=>({resource:be.logs,cost(){let D=this.amount.value;return n.gte(D,100)&&(D=n.pow(D,2).div(100)),n.gte(D,1e4)&&(D=n.pow(D,2).div(1e4)),D=n.pow(.95,j.books.kilnBook.amount.value).times(D),n.pow(1.1,D).times(1e7)},display:B(()=>o(I,null,[o("h3",null,[d("Charcoal Kiln")]),o("br",null,null),d("Burn 1,000,000 logs for 10,000 coal and 10,000 ash"),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("-"),ve(Re.value),d(" logs/sec"),o("br",null,null),d("+"),ve(Be.value),d(" coal/sec"),o("br",null,null),d("+"),ve(De.value),d(" ash/sec"),o("br",null,null),o("br",null,null),d("Cost: "),se(r(Ie.cost)),d(" "),Ie.resource.displayName])),onPurchase(){de.value=n.add(de.value,1)},style:{color:i,width:"160px"},visibility:()=>x(Ve.bought.value)})),{min:Oe,max:L,add:Ce,remove:he}=Gt({buyable:Ie,active:de}),me=we(0),$e=C(()=>n.times(n.pow(me.value,Ke.row2Upgrades[1].bought.value?2:1),5e7).times(ht.efficientDrill.bought.value?2:1)),Fe=Se(()=>({resource:ht.metal,cost(){let D=this.amount.value;return n.gte(D,100)&&(D=n.pow(D,2).div(100)),n.gte(D,1e4)&&(D=n.pow(D,2).div(1e4)),n.pow(1.15,D).times(10)},display:B(()=>o(I,null,[o("h3",null,[d("Mining Drill")]),o("br",null,null),d("Dig through the ground to find 50,000,000 coal"),o("br",null,null),o("br",null,null),d("Currently:"),o("br",null,null),d("+"),ve($e.value),d(" coal/sec"),o("br",null,null),o("br",null,null),d("Cost: "),se(r(Fe.cost)),d(" "),Fe.resource.displayName])),onPurchase(){me.value=n.add(me.value,1)},style:{color:i,width:"160px"},visibility:()=>x(ht.coalDrill.bought.value)})),{max:rt,min:Te,add:Pt,remove:te}=Gt({buyable:Fe,active:me}),le=O(()=>({resource:F(a),cost:5,display:{title:"Warmer Cutters",description:"Cut down twice as many trees/s"},style:{color:i}})),Xe=O(()=>({resource:F(a),cost:5,display:{title:"Warmer Planters",description:"Plant twice as many trees/s"},style:{color:i}})),He=O(()=>({resource:F(s),cost:5e3,display:{title:"Ashy Soil",description:"Trees give 25% more logs"},style:{color:i}})),ue=O(()=>({resource:A,cost:10,display:{title:"Bigger Fires",description:"Put all those fires together into a larger blaze"},onPurchase(){A.value=n.add(A.value,this.cost)},style:{color:i}})),ut=[le,Xe,He,ue],ze=O(()=>({resource:F(a),cost:250,display:{title:"Dedicated Cutter Heaters",description:"Double the bonus from Heated Cutters"},style:{color:i},visibility:()=>x(ue.bought.value)})),xe=O(()=>({resource:F(a),cost:250,display:{title:"Dedicated Planter Heaters",description:"Double the bonus from Heated Planters"},style:{color:i},visibility:()=>x(ue.bought.value)})),ft=O(()=>({canAfford(){return n.gte(be.logs.value,1e5)&&n.gte(s.value,1e5)},onPurchase(){be.logs.value=n.sub(be.logs.value,1e5),s.value=n.sub(s.value,1e5)},display:B(()=>o(I,null,[o("h3",null,[d("Mulched Soil")]),o("br",null,null),d("Double the bonus from Fertilized Soil"),o("br",null,null),o("br",null,null),d("Cost: "),se(1e5),d(" "),be.logs.displayName,o("br",null,null),se(1e5),d(" "),s.displayName])),style:{color:i},visibility:()=>x(ue.bought.value)})),Ve=O(()=>({resource:be.logs,cost:1e7,display:{title:"Efficient Fires",description:"Move the fires underground to keep the coal from turning to ash"},style:{color:i},visibility:()=>x(ue.bought.value)})),Dt=[ze,xe,ft,Ve],qe=O(()=>({resource:F(a),cost:1e19,display:{title:"Efficient Crucibles",description:"Double auto smelting speed and triple metal gain from auto smelting"},style:{color:i},visibility:()=>x(Ke.depthMilestones[4].earned.value)})),dt=[qe],K=Se(()=>({resource:F(a),cost(){let D=this.amount.value;return n.gte(D,50)&&(D=n.pow(D,2).div(50)),n.gte(D,200)&&(D=n.pow(D,2).div(200)),n.gte(D,2e6)&&(D=n.pow(D,2).div(2e6)),D=n.pow(.95,j.books.heatedCuttersBook.amount.value).times(D),n.add(D,1).pow(2.5).times(10)},display:{title:"Heated Cutters",description:"Even warmer cutters cut down trees faster",effectDisplay:B(()=>o(I,null,[d("Cutters cut down trees "),ve(X.value),d("x faster")]))},style:{color:i},visibility:()=>x(le.bought.value)})),q=Se(()=>({resource:F(a),cost(){let D=this.amount.value;return n.gte(D,50)&&(D=n.pow(D,2).div(50)),n.gte(D,200)&&(D=n.pow(D,2).div(200)),n.gte(D,2e6)&&(D=n.pow(D,2).div(2e6)),D=n.pow(.95,j.books.heatedPlantersBook.amount.value).times(D),n.add(D,1).pow(2.5).times(10)},display:{title:"Heated Planters",description:"Even warmer planters plant trees faster",effectDisplay:B(()=>o(I,null,[d("Planters plant trees "),ve(kt.value),d("x faster")]))},style:{color:i},visibility:()=>x(Xe.bought.value)})),Rt=Se(()=>({resource:F(s),cost(){let D=this.amount.value;return n.gte(D,50)&&(D=n.pow(D,2).div(50)),n.gte(D,200)&&(D=n.pow(D,2).div(200)),n.gte(D,2e6)&&(D=n.pow(D,2).div(2e6)),D=n.pow(.95,j.books.fertilizerBook.amount.value).times(D),n.add(D,1).pow(1.5).times(5e4)},display:{title:"Fertilized Soil",description:"More fertilizer helps trees grow bigger",effectDisplay:B(()=>o(I,null,[d("Trees give "),ve(kl.value),d("x more logs")]))},style:{color:i},visibility:()=>x(He.bought.value)})),el=[K,q,Rt],it=W(()=>[Z(()=>({addend(){return n.times(K.amount.value,.25)},description:"Heated Cutters",enabled(){return n.gt(K.amount.value,0)}})),k(()=>({multiplier:2,description:"Dedicated Cutter Heaters",enabled:ze.bought}))]),X=C(()=>it.apply(1)),Et=W(()=>[Z(()=>({addend(){return n.times(q.amount.value,.25)},description:"Heated Planters",enabled(){return n.gt(q.amount.value,0)}})),k(()=>({multiplier:2,description:"Dedicated Planter Heaters",enabled:xe.bought}))]),kt=C(()=>Et.apply(1)),Cl=W(()=>[Z(()=>({addend(){return n.times(Rt.amount.value,.25)},description:"Fertilized Soil",enabled(){return n.gt(Rt.amount.value,0)}})),k(()=>({multiplier:2,description:"Mulched Soil",enabled:ft.bought}))]),kl=C(()=>Cl.apply(1)),Ft=W(()=>[Z(()=>({addend(){return p.value},description:"Small Fires",enabled(){return n.gt(u.value,0)}})),Z(()=>({addend(){return M.value},description:"Bonfires",enabled(){return n.gt(P.value,0)}})),Z(()=>({addend(){return Be.value},description:"Charcoal Kilns",enabled(){return n.gt(de.value,0)}})),Z(()=>({addend(){return $e.value},description:"Mining Drills",enabled(){return n.gt(me.value,0)}})),k(()=>({multiplier:2,description:"Carry coal in boxes",enabled:ct.upgrades.coalUpgrade.bought})),k(()=>({multiplier:()=>n.div(ct.buyables.coalBoxesBuyable.amount.value,2).add(1),description:"Carry more coal",enabled:ct.upgrades.coalUpgrade.bought})),k(()=>({multiplier:()=>n.div(b.amount.value,1e4).add(1),description:"Small Fires Synergy",enabled:Qe.elves.smallFireElf.bought})),k(()=>({multiplier:()=>n.div(T.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Qe.elves.bonfireElf.bought})),k(()=>({multiplier:()=>n.div(Ie.amount.value,100).add(1),description:"Kiln Synergy",enabled:Qe.elves.kilnElf.bought})),k(()=>({multiplier:2,description:"Mining overalls",enabled:yt.metalUpgrades.metalUpgrade2.bought})),k(()=>({multiplier:3,description:"Mining helmet",enabled:yt.metalUpgrades.metalUpgrade3.bought})),k(()=>({multiplier:4,description:"Felt-Gripped Pick",enabled:yt.metalUpgrades.metalUpgrade4.bought})),k(()=>({multiplier:2,description:"12 Elves Trained",enabled:Qe.milestones[11].earned})),Ni(()=>({exponent:1.25,description:"3 Elves Trained",enabled:Qe.milestones[2].earned,supportLowNumbers:!0})),k(()=>({multiplier:()=>n.mul(Ke.depth.value,.25).add(1),description:"5m Well Depth",enabled:Ke.depthMilestones[0].earned})),k(()=>({multiplier:Ke.extractorCoal,description:"Heavy Extractor",enabled:()=>n.gt(Ke.activeExtractor.value,0)}))]),We=C(()=>Ft.apply(0)),_t=W(()=>[Z(()=>({addend(){return m.value},description:"Small Fires",enabled(){return n.gt(u.value,0)}})),Z(()=>({addend(){return S.value},description:"Bonfires",enabled(){return n.gt(P.value,0)}})),Z(()=>({addend(){return De.value},description:"Charcoal Kilns",enabled(){return n.gt(de.value,0)}})),k(()=>({multiplier:2,description:"Carry ash in boxes",enabled:ct.upgrades.ashUpgrade.bought})),k(()=>({multiplier:()=>n.div(ct.buyables.ashBoxesBuyable.amount.value,2).add(1),description:"Carry more ash",enabled:ct.upgrades.ashUpgrade.bought})),k(()=>({multiplier:()=>n.div(b.amount.value,1e3).add(1),description:"Small Fires Synergy",enabled:Qe.elves.smallFireElf.bought})),k(()=>({multiplier:()=>n.div(T.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Qe.elves.bonfireElf.bought})),k(()=>({multiplier:()=>n.div(Ie.amount.value,100).add(1),description:"Kiln Synergy",enabled:Qe.elves.kilnElf.bought})),k(()=>({multiplier:4,description:"Mining boots",enabled:yt.metalUpgrades.metalUpgrade1.bought}))]),Mt=C(()=>_t.apply(0)),tl=W(()=>[Z(()=>({addend(){return n.negate(c.value)},description:"Small Fires",enabled(){return n.gt(u.value,0)}})),Z(()=>({addend(){return n.negate(Y.value)},description:"Bonfires",enabled(){return n.gt(P.value,0)}})),Z(()=>({addend(){return n.negate(Re.value)},description:"Charcoal Kilns",enabled(){return n.gt(de.value,0)}}))]),Ot=C(()=>tl.apply(0)),[gl,Ll]=pl(()=>[{title:"Log Consumption",modifier:tl,base:0,visible(){return n.gt(u.value,0)||n.gt(P.value,0)||n.gt(de.value,0)}},{title:"Coal Gain",modifier:Ft,base:0,visible(){return n.gt(u.value,0)||n.gt(P.value,0)||n.gt(de.value,0)}},{title:"Ash Gain",modifier:_t,base:0,visible(){return n.gt(u.value,0)||n.gt(P.value,0)||n.gt(de.value,0)}}]),zt=$(!1),Ql=B(()=>o(bt,{modelValue:zt.value,"onUpdate:modelValue":D=>zt.value=D},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:gl}));Ue.on("update",D=>{n.lt(Q.day.value,Wn)||n.times(D,Ot.value).negate().gt(be.logs.value)||(be.logs.value=n.times(D,Ot.value).plus(be.logs.value),a.value=n.times(D,We.value).plus(a.value),s.value=n.times(D,Mt.value).plus(s.value),u.value=n.max(u.value,0))});const{total:_l,trackerDisplay:Hl}=ml({resource:a,goal:1e7,name:e,day:Wn,color:t,modal:{show:zt,display:Ql}});return{name:e,color:t,coal:a,totalCoal:_l,computedCoalGain:We,ash:s,activeFires:u,buildFire:b,activeBonfires:P,buildBonfire:T,activeKilns:de,buildKiln:Ie,activeDrills:me,buildDrill:Fe,warmerCutters:le,warmerPlanters:Xe,basicFertilizer:He,unlockBonfire:ue,dedicatedCutters:ze,dedicatedPlanters:xe,betterFertilizer:ft,unlockKiln:Ve,efficientSmelther:qe,heatedCutters:K,heatedPlanters:q,moreFertilizer:Rt,computedHeatedCutterEffect:X,computedHeatedPlanterEffect:kt,computedFertilizerEffect:kl,generalTabCollapsed:Ll,minWidth:700,display:B(()=>o(I,null,[re(Hl),o(ge,null,null),o(St,{resource:a,color:t,style:"margin-bottom: 0",effectDisplay:n.gt(We.value,0)?`+${ve(We.value)}/s`:void 0},null),o(ge,null,null),o(St,{resource:s,color:l,style:"margin-bottom: 0",effectDisplay:n.gt(Mt.value,0)?`+${ve(Mt.value)}/s`:void 0},null),o(ge,null,null),o(Ml,null,{default:()=>[o(At,null,{default:()=>[re(b),o("div",null,[se(n.floor(u.value)),d("/"),se(n.floor(b.amount.value))]),ye(h,_,f,w)]}),ue.bought.value?o(I,null,[o(ge,null,null),o(At,null,{default:()=>[re(T),o("div",null,[se(P.value),d("/"),se(T.amount.value)]),ye(fe,Ee,H,Pe)]})]):void 0,Ve.bought.value?o(I,null,[o(ge,null,null),o(At,null,{default:()=>[re(Ie),o("div",null,[se(de.value),d("/"),se(Ie.amount.value)]),ye(Oe,he,Ce,L)]})]):void 0,ht.coalDrill.bought.value?o(I,null,[o(ge,null,null),o(At,null,{default:()=>[re(Fe),o("div",null,[se(me.value),d("/"),se(Fe.amount.value)]),ye(Te,te,Pt,rt)]})]):void 0]}),o(ge,null,null),ye(...ut),ye(...Dt),ye(...dt),ye(...el)]))}}),ar="metal",Kn=7,ht=Ut(ar,function(){const e="Metal",t="#888B8D",l=st(0,"metal ingots",void 0,!0),i=Qn(l),a=st(0,"ore"),s=Qn(a),u=W(()=>[k(()=>({multiplier:5,description:"Crucible",enabled:Ie.bought})),k(()=>({multiplier:1.5,description:"Industrial Crucible",enabled:()=>n.gte(me.amount.value,1)})),k(()=>({multiplier:2,description:"Industrial Furnace",enabled:L.bought})),k(()=>({multiplier:()=>n.add(rt.value,1),description:"Hotter Forges",enabled:()=>n.gte(Fe.amount.value,1)})),k(()=>({multiplier:2,description:"Carry metal in boxes",enabled:ct.row2Upgrades.metalUpgrade.bought}))]),c=C(()=>u.apply(.1)),p=W(()=>[Z(()=>({addend:()=>n.times(me.amount.value,10),description:"Industrial Crucibles",enabled:()=>n.gte(me.amount.value,1)})),k(()=>({multiplier:2,description:"Efficient Crucibles",enabled:R.efficientSmelther.bought})),k(()=>({multiplier:()=>n.mul(Ke.activeSmelter.value,Ke.oilEffectiveness.value).add(1),description:"Oil Smelter",enabled:()=>n.gt(Ke.activeSmelter.value,0)}))]),m=C(()=>p.apply(0)),b=W(()=>[k(()=>({multiplier:3,description:"Efficient Crucibles",enabled:R.efficientSmelther.bought})),k(()=>({multiplier:()=>n.add(Ke.activeBurner.value,1).mul(Ke.oilEffectiveness.value),description:"Blaster Burner",enabled:Ke.row2Upgrades[2].bought}))]),h=C(()=>b.apply(1)),w=1e10,f=C(()=>n.min(a.value,n.div(R.coal.value,w)).floor().max(0)),_=It(()=>({display:B(()=>{const ue=n.gte(f.value,1)?f.value:n.add(f.value,1);return o(I,null,[o("span",{style:"font-size: large"},[d("Smelt "),oe(n.times(f.value,c.value))," ",l.displayName]),o("br",null,null),o("span",{style:"font-size: large"},[d("Cost: "),ie(ue),d(" "),a.displayName,d(";")," ",ie(n.times(ue,w)),d(" "),R.coal.displayName])])}),canClick:()=>n.gte(f.value,1),onClick(){!r(this.canClick)||A(f.value)},style:{width:"600px",minHeight:"unset"}}));function A(ue,ut=1){const[ze,xe,ft]=[n.times(ue,c.value).times(ut),ue,n.times(ue,w)];l.value=n.add(l.value,ze),a.value=n.sub(a.value,xe),R.coal.value=n.sub(R.coal.value,ft)}const P=W(()=>[Z(()=>({addend:()=>he.amount.value,description:"Mining Drills",enabled:()=>n.gte(he.amount.value,1)})),k(()=>({multiplier:()=>n.mul(Ke.depth.value,.05).add(1),description:"25m Well Depth",enabled:Ke.depthMilestones[2].earned})),k(()=>({multiplier:Ke.extractorOre,description:"Heavy Extractor",enabled:()=>n.gt(Ke.activeExtractor.value,0)})),k(()=>({multiplier:2,description:"Carry ore in boxes",enabled:ct.row2Upgrades.oreUpgrade.bought}))]),Y=C(()=>P.apply(1)),M=W(()=>[k(()=>({multiplier:2,description:"A Simple Pickaxe",enabled:Be.bought})),k(()=>({multiplier:2,description:"Double Pickaxe",enabled:De.bought})),k(()=>({multiplier:2.5,description:"Mining Drills",enabled:()=>n.gte(he.amount.value,1)})),k(()=>({multiplier:2,description:"Efficient Drills",enabled:Ce.bought})),k(()=>({multiplier:2,description:"Oil the Mining Drills",enabled:Ke.row2Upgrades[1].bought}))]),S=C(()=>M.apply(n.recip(fe))),T=we(0),fe=10,Pe=Kt(()=>({width:400,height:25,direction:ke.Right,fillStyle:{backgroundColor:t},progress:()=>T.value})),H=W(()=>[Z(()=>({addend:Y})),k(()=>({multiplier:S}))]),Ee=C(()=>H.apply(0)),de=W(()=>[Z(()=>({addend:Ee})),Z(()=>({addend:()=>n.negate(m.value),enabled:$e}))]),Re=C(()=>de.apply(0)),Be=O(()=>({resource:F(l),cost:.1,display:{title:"A Simple Pickaxe",description:"Make a simple pickaxe to help mine faster.

Halve the time to mine more ore"}})),De=O(()=>({resource:F(l),cost:.1,display:{title:"Double Pickaxe",description:"This is too slow. What if you swung two pickaxes at once?

Halve the time to mine ore, again"},visibility:()=>x(De.bought.value)})),Ie=O(()=>({resource:F(l),cost:1,display:{title:"Crucible",description:"Smelting this all by hand is rather painful, and a lot of the metal is left in the slag. A small crucible should help a lot!

Increase the metal extracted per ore by 5x"},visibility:()=>x(Ie.bought.value||n.div(s.value,c.value).plus(i.value).gte(1))})),Oe=O(()=>({resource:F(l),cost:0,display:{title:"Coal Drilling",description:"These mining drills are pretty powerful, mining more ore than you can actually smelt. Could be worth making some to mine coal instead"},visibility:()=>x(n.gte(he.amount.value,1)&&(Oe.bought.value||Q.days[7].opened.value||n.lt(R.computedCoalGain.value,n.times(Y.value,S.value).times(w)))),onPurchase(){Q.days[2].recentlyUpdated.value=!0}})),L=O(()=>({canAfford(){return n.gte(l.value,50)&&n.gte(R.coal.value,1e11)},onPurchase(){l.value=n.sub(l.value,50),R.coal.value=n.sub(R.coal.value,1e11)},display:{title:"Industrial Furnace",description:`Moving smelting out of the open air and into a dedicated furnace should make efficiency even better. Double metal gained per ore

Cost: 50 ${l.displayName}
${oe(1e11)} ${R.coal.displayName}`}})),Ce=O(()=>({resource:F(l),cost:1e5,display:{title:"Efficient Drills",description:"Use metal and a bunch of R&D to make drilling stuff faster. Double coal and ore mining speed."},visibility:()=>x(Ke.depthMilestones[4].earned.value)})),he=Se(()=>({resource:F(l),cost(){return n.pow(1.15,this.amount.value).times(10)},display:{title:"Mining Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:B(()=>o(I,null,[d("Mine 2.5x faster. Increase ore mining amount by")," ",ie(he.amount.value),d(" ore per operation")]))},visibility:()=>x(n.gte(he.amount.value,1)||n.div(s.value,c.value).plus(i.value).gte(10)),style:{width:"200px"}})),me=Se(()=>({resource:F(l),cost(){return n.pow(1.15,n.times(this.amount.value,10)).times(10)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:B(()=>o(I,null,[d("Automatically smelts")," ",ie(n.times(me.amount.value,10)),d(" ore per second")]))},visibility:()=>x(n.gte(me.amount.value,1)||n.gte(he.amount.value,4)||n.gte(s.value,50)),style:{width:"200px"}})),$e=we(!0),Fe=Se(()=>({resource:R.coal,cost(){return n.pow(10,this.amount.value).times(1e12)},display:{title:"Hotter Forges",description:"More coal makes the fires burn hotter, getting just a little more metal out of each bit of ore",effectDisplay:B(()=>o(I,null,[d("Gain "),ie(n.times(rt.value,100)),d("% more metal per ore")]))},visibility:()=>x(n.gte(Fe.amount.value,1)||L.bought.value),style:{width:"200px"}})),rt=C(()=>n.times(Fe.amount.value,.25));Ue.on("update",ue=>{T.value=n.times(ue,S.value).plus(T.value);const ut=T.value.trunc();T.value=T.value.minus(ut),a.value=n.add(a.value,n.times(ut,Y.value)),$e.value&&A(n.min(f.value,n.times(m.value,ue)),h.value)});const[Te,Pt]=pl(()=>[{title:"Auto Smelt Speed",modifier:p,base:0,unit:"/s",visible(){return n.gt(me.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:b,base:1,visible(){return n.gt(h.value,1)}},{title:"Metal per Ore",modifier:u,base:.1},{title:"Ore per Mining Operation",modifier:P,base:1},{title:"Mining Speed",modifier:M,base:.1,unit:"/s"}]),te=$(!1),le=B(()=>o(bt,{modelValue:te.value,"onUpdate:modelValue":ue=>te.value=ue},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:Te})),{total:Xe,trackerDisplay:He}=ml({resource:l,goal:25e3,name:e,day:Kn,color:t,modal:{show:te,display:le}});return{name:e,day:Kn,color:t,ore:a,bestOre:s,oreProgress:T,metal:l,bestMetal:i,totalMetal:Xe,simplePickaxe:Be,doublePickaxe:De,crucible:Ie,coalDrill:Oe,industrialFurnace:L,efficientDrill:Ce,oreDrill:he,industrialCrucible:me,autoSmeltEnabled:$e,hotterForge:Fe,generalTabCollapsed:Pt,minWidth:700,display:B(()=>o(I,null,[re(He),o(ge,null,null),o(St,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>o(I,null,[$e.value&&n.gte(me.amount.value,1)?`+${ui([[m.value,"smelting speed"],[Ee.value,"ore gain"],[n.div(R.computedCoalGain.value,w),"coal gain"]],"/s",n.mul(c.value,h.value))}`:void 0]))},null),o(ge,null,null),re(_),n.gte(me.amount.value,1)?o("div",{style:{width:"150px"}},[o(Wt,{title:"Auto Smelt",modelValue:$e.value,"onUpdate:modelValue":ue=>$e.value=ue},null)]):void 0,o(ge,null,null),o(St,{resource:a,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>o(I,null,[di(Re.value)]))},null),o(ge,null,null),o("div",null,[d("Currently mining "),oe(Y.value),d(" ore every")," ",oe(n.recip(S.value)),d(" seconds")]),re(Pe),o(ge,null,null),ye(Be,De,Ie,Oe,L,Ce),ye(he,me,Fe)]))}}),or="cloth",Jn=8,yt=Ut(or,function(){const e="Cloth",t="white",l=st(0,"cloth"),i=st(0,"wool"),a=st(10,"sheep"),s=we(0),u=Kt(()=>({direction:ke.Right,width:100,height:10,style:"margin-top: 8px",borderStyle:"border-color: black",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s; background: black",progress:()=>n.div(s.value,Te.value)})),c=It(()=>({display:{title:"Breed sheep",description:B(()=>o(I,null,[d("Breed "),ie(n.floor(Fe.value)),d(" sheep"),o("br",null,null),re(u)]))},style:{minHeight:"80px"},canClick:()=>n.gte(s.value,Te.value),onClick(){if(n.lt(s.value,Te.value))return;const K=n.floor(Fe.value);a.value=n.add(a.value,K),s.value=0}})),p=we(0),m=Kt(()=>({direction:ke.Right,width:100,height:10,style:"margin-top: 8px",borderStyle:"border-color: black",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s; background: black",progress:()=>n.div(p.value,Xe.value)})),b=It(()=>({display:{title:"Shear sheep",description:B(()=>o(I,null,[d("Shear up to "),ie(n.floor(te.value)),d(" sheep"),o("br",null,null),re(m)]))},style:{minHeight:"80px"},canClick:()=>n.gte(p.value,Xe.value),onClick(){if(n.lt(p.value,Xe.value))return;const K=n.min(a.value,te.value).floor();i.value=n.add(i.value,K),p.value=0}})),h=we(0),w=Kt(()=>({direction:ke.Right,width:100,height:10,style:"margin-top: 8px",borderStyle:"border-color: black",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s; background: black",progress:()=>n.div(h.value,ze.value)})),f=It(()=>({display:{title:"Spinning wool",description:B(()=>o(I,null,[d("Spin "),ie(n.floor(ue.value)),d(" wool"),o("br",null,null),re(w)]))},style:{minHeight:"80px"},canClick:()=>n.gte(h.value,ze.value),onClick(){if(n.lt(h.value,ze.value))return;const K=n.min(i.value,ue.value).floor();l.value=n.add(l.value,K),i.value=n.sub(i.value,K),h.value=0}})),_=El(()=>({key:"b",description:'Press the "Breed Sheep" button',onPress:()=>{c.canClick.value&&c.onClick()}})),A=El(()=>({key:"h",description:'Press the "Shear Sheep" button',onPress:()=>{b.canClick.value&&b.onClick()}})),P=El(()=>({key:"s",description:'Press the "Spin Wool" button',onPress:()=>{f.canClick.value&&f.onClick()}})),Y=Se(()=>({resource:be.logs,cost(){let K=this.amount.value;return n.gte(K,100)&&(K=n.pow(K,2).div(100)),K=n.pow(.95,j.books.clothBook.amount.value).times(K),n.pow(1.5,K).times(1e14)},display:{title:"Build more pens",description:"Breed +1 sheep at once"}})),M=Se(()=>({resource:ht.metal,cost(){let K=this.amount.value;return n.gte(K,100)&&(K=n.pow(K,2).div(100)),K=n.pow(.95,j.books.clothBook.amount.value).times(K),n.pow(1.4,K).times(1e4)},display:{title:"Make stronger shears",description:"Shear +1 sheep at once"}})),S=Se(()=>({resource:j.paper,cost(){let K=this.amount.value;return n.gte(K,100)&&(K=n.pow(K,2).div(100)),K=n.pow(.95,j.books.clothBook.amount.value).times(K),n.pow(1.3,K).times(1e6)},display:{title:"Learn how to spin",description:"Spin +1 wool at once"}})),T=O(()=>({resource:F(l),cost:100,display:{title:"Lumberjack Boots",description:"Quadruple log gain"}})),fe=O(()=>({resource:F(i),cost:150,visibility:()=>x(T.bought.value),display:{title:"Lumberjack Jeans",description:"Quadruple trees cut"}})),Pe=O(()=>({resource:F(a),cost:200,visibility:()=>x(fe.bought.value),display:{title:"Lumberjack Plaid",description:"Quadruple trees planted"}})),Ee={treesUpgrade4:O(()=>({resource:F(l),cost:1e3,visibility:()=>x(Le.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Axe",description:"10x log gain"}})),treesUpgrade3:Pe,treesUpgrade2:fe,treesUpgrade1:T},de=O(()=>({resource:F(l),cost:150,display:{title:"Mining boots",description:"Quadruple ash gain"}})),Re=O(()=>({resource:F(i),cost:225,visibility:()=>x(de.bought.value),display:{title:"Mining overalls",description:"Double coal gain"}})),Be=O(()=>({resource:F(a),cost:300,visibility:()=>x(Re.bought.value),display:{title:"Mining helmet",description:"Triple coal gain"}})),Ie={metalUpgrade4:O(()=>({resource:F(l),cost:2e3,visibility:()=>x(Le.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Pick",description:"Quadruple coal gain"}})),metalUpgrade3:Be,metalUpgrade2:Re,metalUpgrade1:de},Oe=O(()=>({resource:F(l),cost:200,display:{title:"Scholar's shoes",description:"Double paper gain"}})),L=O(()=>({resource:F(i),cost:200,visibility:()=>x(Oe.bought.value),display:{title:"Scholar's slacks",description:"Double paper gain"}})),Ce=O(()=>({resource:F(a),cost:400,visibility:()=>x(L.bought.value),display:{title:"Scholar's jacket",description:"Double paper gain"}})),me={paperUpgrade4:O(()=>({resource:F(l),cost:4e3,visibility:()=>x(Le.upgrades.clothTools.bought.value),display:{title:"Felt Elbow Pads",description:"10x paper gain"}})),paperUpgrade3:Ce,paperUpgrade2:L,paperUpgrade1:Oe},$e=W(()=>[Z(()=>({addend:Y.amount,description:"Build more pens"})),k(()=>({multiplier:()=>n.div(Le.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>n.gte(Le.buyables.clothGains.amount.value,1)})),k(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:j.upgrades.clothUpgrade.bought}))]),Fe=C(()=>$e.apply(1)),rt=W(()=>[]),Te=C(()=>rt.apply(1)),Pt=W(()=>[Z(()=>({addend:M.amount,description:"Make stronger shears"})),k(()=>({multiplier:()=>n.div(Le.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>n.gte(Le.buyables.clothGains.amount.value,1)})),k(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:j.upgrades.clothUpgrade.bought}))]),te=C(()=>Pt.apply(1)),le=W(()=>[]),Xe=C(()=>le.apply(1)),He=W(()=>[Z(()=>({addend:S.amount,description:"Learn how to spin"})),k(()=>({multiplier:()=>n.div(Le.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>n.gte(Le.buyables.clothGains.amount.value,1)})),k(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:j.upgrades.clothUpgrade.bought}))]),ue=C(()=>He.apply(1)),ut=W(()=>[]),ze=C(()=>ut.apply(1)),[xe,ft]=pl(()=>[{title:"Sheep Gain",modifier:$e,base:1},{title:"Sheep Breeding Cooldown",modifier:rt,base:1,visible:!1,unit:"s"},{title:"Shearing Amount",modifier:Pt,base:1},{title:"Shearing Cooldown",modifier:le,base:1,visible:!1,unit:"s"},{title:"Spinning Amount",modifier:He,base:1},{title:"Spinning Cooldown",modifier:ut,base:1,visible:!1,unit:"s"}]),Ve=$(!1),Dt=B(()=>o(bt,{modelValue:Ve.value,"onUpdate:modelValue":K=>Ve.value=K},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:xe}));Ue.on("update",K=>{n.lt(Q.day.value,Jn)||(n.gte(s.value,Te.value)?s.value=Te.value:(s.value=n.add(s.value,K),c.isHolding.value&&c.onClick()),n.gte(p.value,Xe.value)?p.value=Xe.value:(p.value=n.add(p.value,K),b.isHolding.value&&b.onClick()),n.gte(h.value,ze.value)?h.value=ze.value:(h.value=n.add(h.value,K),f.isHolding.value&&f.onClick()))});const{total:qe,trackerDisplay:dt}=ml({resource:l,goal:1e3,name:e,day:Jn,color:t,textColor:"var(--feature-foreground)",modal:{show:Ve,display:Dt}});return{name:e,color:t,cloth:l,totalCloth:qe,wool:i,sheep:a,buildPens:Y,betterShears:M,fasterSpinning:S,treesUpgrades:Ee,metalUpgrades:Ie,paperUpgrades:me,generalTabCollapsed:ft,breedingProgress:s,shearingProgress:p,spinningProgress:h,breedSheepHK:_,shearSheepHK:A,spinWoolHK:P,minWidth:700,display:B(()=>o(I,null,[re(dt),o(ge,null,null),o(St,{resource:l,style:"margin-bottom: 0"},null),o(St,{resource:i,style:"margin-bottom: 0"},null),o(St,{resource:a,style:"margin-bottom: 0"},null),ye(c,b,f),ye(Y,M,S),o(ge,null,null),o(Ml,null,{default:()=>[sl(...Object.values(Ee)),sl(...Object.values(Ie)),sl(...Object.values(me))]})]))}}),sr="paper",yn=5,j=Ut(sr,function(){const e="Paper",t="#E8DCB8",l=st(0,"paper"),i=st(C(()=>n.min(n.div(be.logs.value,1e9),n.div(R.ash.value,1e6))),"pulp"),a=Mi(()=>({scaling:Pn(1,1.2),baseResource:i,gainResource:F(l),roundUpCost:!0,spend(L,Ce){be.logs.value=n.sub(be.logs.value,n.times(Ce,1e9)),R.ash.value=n.sub(R.ash.value,n.times(Ce,1e6))},gainModifier:Ee})),s=It(()=>({display:B(()=>{const L=n.gte(a.actualGain.value,1)?a.currentAt.value:a.nextAt.value;return o(I,null,[o("span",{style:"font-size: large"},[d("Create "),se(a.currentGain.value),d(" "),l.displayName]),o("br",null,null),o("span",{style:"font-size: large"},[d("Cost: "),Gl(be.logs,L),d(" "),i.displayName,d(" ("),se(n.times(L,1e9)),d(" "),be.logs.displayName,d(";")," ",se(n.times(L,1e6)),d(" "),R.ash.displayName,d(")")])])}),canClick:()=>n.gte(a.actualGain.value,1),onClick(){!r(this.canClick)||a.convert()},style:"width: 600px; min-height: unset"}));function u(L){const Ce=Se(()=>({...L,display:{title:L.name,description:`Print a copy of "${L.name}", which ${L.elfName} will use to improve their skills! Each copy printed will reduce the "${L.buyableName}" price scaling by 0.95x and make ${L.elfName} purchase +10% faster!`,effectDisplay:B(()=>o(I,null,[ve(n.pow(.95,Ce.amount.value)),d("x price scaling,")," ",ve(n.div(Ce.amount.value,10).add(1)),d("x auto-purchase speed")])),showAmount:!1},resource:F(l),cost(){let he=this.amount.value;return(L.elfName==="Star"||L.elfName==="Bell")&&(he=n.pow(he,2)),n.gte(he,100)&&(he=n.pow(he,2).div(100)),n.gte(he,1e4)&&(he=n.pow(he,2).div(1e4)),he=n.pow(.95,P.amount.value).times(he),n.pow(5,he).times(10)},style:"width: 600px"}));return Ce}const c=u({name:"Now You're Logging!",elfName:"Holly",buyableName:"Generic Cutters"}),p=u({name:"The Man Who Planted Trees",elfName:"Ivy",buyableName:"Generic Planters"}),m=u({name:"Logjam",elfName:"Hope",buyableName:"Expand Forest"}),b=u({name:"Fahrenheit 451",elfName:"Jack",buyableName:"Heated Cutters"}),h=u({name:"Tillamook Burn Country",elfName:"Mary",buyableName:"Heated Planters"}),w=u({name:"The Garden Tree's Handbook",elfName:"Noel",buyableName:"Fertilized Soil"}),f=u({name:"Firestarter",elfName:"Joy",buyableName:"Small Fire",visibility:()=>x(Qe.elves.smallFireElf.bought.value)}),_=u({name:"An Arsonist's Guide to Writer's Homes in New England",elfName:"Faith",buyableName:"Bonfire",visibility:()=>x(Qe.elves.bonfireElf.bought.value)}),A=u({name:"Little Fires Everywhere",elfName:"Snowball",buyableName:"Kiln",visibility:()=>x(Qe.elves.kilnElf.bought.value)}),P=u({name:"The Book Thief",elfName:"Star",buyableName:"Paper Buyables",visibility:()=>x(Qe.elves.paperElf.bought.value)}),Y=u({name:"Not a box",elfName:"Bell",buyableName:"Box Buyables",visibility:()=>x(Qe.elves.boxElf.bought.value)}),M=u({name:"Fuzzy Bee and Friends",elfName:"Gingersnap",buyableName:"Cloth Buyables",visibility:()=>x(Qe.elves.clothElf.bought.value)}),S={cuttersBook:c,plantersBook:p,expandersBook:m,heatedCuttersBook:b,heatedPlantersBook:h,fertilizerBook:w,smallFireBook:f,bonfireBook:_,kilnBook:A,paperBook:P,boxBook:Y,clothBook:M},T=O(()=>({resource:F(l),cost:1e8,visibility:()=>x(Le.upgrades.paperTools.bought.value),display:{title:"Shepherding for Dummies",description:"Double effectiveness of all cloth actions"}})),fe=O(()=>({resource:F(l),cost:1e9,visibility:()=>x(Le.upgrades.paperTools.bought.value),display:{title:"Guide to drilling",description:"Double drilling power"}})),Pe=O(()=>({resource:F(l),cost:1e10,visibility:()=>x(Le.upgrades.paperTools.bought.value),display:{title:"Oil and where to find it",description:"Double oil gain"}})),H={clothUpgrade:T,drillingUpgrade:fe,oilUpgrade:Pe},Ee=W(()=>[k(()=>({multiplier:2,description:"Scholar's shoes",enabled:yt.paperUpgrades.paperUpgrade1.bought})),k(()=>({multiplier:2,description:"Scholar's slacks",enabled:yt.paperUpgrades.paperUpgrade2.bought})),k(()=>({multiplier:2,description:"Scholar's jacket",enabled:yt.paperUpgrades.paperUpgrade3.bought})),k(()=>({multiplier:10,description:"Felt Elbow Pads",enabled:yt.paperUpgrades.paperUpgrade4.bought}))]),[de,Re]=pl(()=>[{title:"Paper Gain",modifier:Ee,base:1}]),Be=$(!1),De=B(()=>o(bt,{modelValue:Be.value,"onUpdate:modelValue":L=>Be.value=L},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:de}));Ue.on("update",L=>{n.lt(Q.day.value,yn)||(l.value=n.times(L,Le.buyables.passivePaper.amount.value).times(a.currentGain.value).div(100).add(l.value))});const{total:Ie,trackerDisplay:Oe}=ml({resource:l,goal:5e3,name:e,day:yn,color:t,textColor:"var(--feature-foreground)",modal:{show:Be,display:De}});return{name:e,day:yn,color:t,paper:l,totalPaper:Ie,paperConversion:a,books:S,upgrades:H,generalTabCollapsed:Re,minWidth:700,display:B(()=>o(I,null,[re(Oe),o(ge,null,null),o(St,{resource:l,color:t,style:"margin-bottom: 0"},null),o(ge,null,null),re(s),o(ge,null,null),ye(...Object.values(H)),o(ge,null,null),sl(...Object.values(S))]))}}),rr="boxes",bn=6,ct=Ut(rr,function(){const e="Boxes",t="#964B00",l=st(0,"boxes"),i=Mi(()=>({scaling:Pn(1e10,1),baseResource:be.logs,gainResource:F(l),roundUpCost:!0})),a=It(()=>({display:B(()=>o(I,null,[o("span",{style:"font-size: large"},[d("Create "),se(i.currentGain.value),d(" "),l.displayName]),o("br",null,null),o("span",{style:"font-size: large"},[d("Cost:")," ",Gl(be.logs,n.gte(i.actualGain.value,1)?i.currentAt.value:i.nextAt.value)," ",be.logs.displayName])])),canClick:()=>n.gte(i.actualGain.value,1),onClick(){!r(this.canClick)||i.convert()},style:"width: 600px; min-height: unset"})),s=O(()=>({display:{title:"Carry logs in boxes",description:"Double log gain and unlock a new elf for training"},onPurchase(){Q.days[3].recentlyUpdated.value=!0},resource:F(l),cost:100})),u=O(()=>({display:{title:"Carry ash in boxes",description:"Double ash gain and unlock a new elf for training"},onPurchase(){Q.days[3].recentlyUpdated.value=!0},resource:F(l),cost:1e3})),c=O(()=>({display:{title:"Carry coal in boxes",description:"Double coal gain and unlock a new elf for training"},onPurchase(){Q.days[3].recentlyUpdated.value=!0},resource:F(l),cost:4e3})),p={logsUpgrade:s,ashUpgrade:u,coalUpgrade:c},m=O(()=>({resource:F(l),cost:1e8,visibility:()=>x(Le.upgrades.boxTools.bought.value),display:{title:"Carry ore in boxes",description:"Double ore per mining op"}})),b=O(()=>({resource:F(l),cost:1e9,visibility:()=>x(Le.upgrades.boxTools.bought.value),display:{title:"Carry metal in boxes",description:"Double ore purity"}})),h=O(()=>({resource:F(l),cost:1e10,visibility:()=>x(Le.upgrades.boxTools.bought.value),display:{title:"Carry plastic in boxes",description:"Double plastic gain"}})),w={oreUpgrade:m,metalUpgrade:b,plasticUpgrade:h},f=Se(()=>({display:{title:"Carry more logs",description:"Use boxes to carry even more logs, boosting their gain",effectDisplay:B(()=>o(I,null,[ve(n.div(f.amount.value,2).add(1)),d("x")]))},resource:F(l),cost(){let S=this.amount.value;return S=n.pow(.95,j.books.boxBook.amount.value).times(S),n.pow(3,S).times(100)},visibility:()=>x(s.bought.value)})),_=Se(()=>({display:{title:"Carry more ash",description:"Use boxes to carry even more ash, boosting its gain",effectDisplay:B(()=>o(I,null,[ve(n.div(_.amount.value,2).add(1)),d("x")]))},resource:F(l),cost(){let S=this.amount.value;return S=n.pow(.95,j.books.boxBook.amount.value).times(S),n.pow(5,S).times(1e3)},visibility:()=>x(u.bought.value)})),A=Se(()=>({display:{title:"Carry more coal",description:"Use boxes to carry even more coal, boosting its gain",effectDisplay:B(()=>o(I,null,[ve(n.div(A.amount.value,2).add(1)),d("x")]))},resource:F(l),cost(){let S=this.amount.value;return S=n.pow(.95,j.books.boxBook.amount.value).times(S),n.pow(7,S).times(1e3)},visibility:()=>x(c.bought.value)})),P={logBoxesBuyable:f,ashBoxesBuyable:_,coalBoxesBuyable:A};Ue.on("update",S=>{n.lt(Q.day.value,bn)||(l.value=n.times(S,Le.buyables.passiveBoxes.amount.value).times(i.currentGain.value).div(100).add(l.value))});const{total:Y,trackerDisplay:M}=ml({resource:l,goal:5e4,name:e,day:bn,color:t});return{name:e,day:bn,color:t,boxes:l,totalBoxes:Y,boxesConversion:i,upgrades:p,row2Upgrades:w,buyables:P,minWidth:700,display:B(()=>o(I,null,[re(M),o(ge,null,null),o(St,{resource:l,color:t,style:"margin-bottom: 0"},null),o(ge,null,null),re(a),o(ge,null,null),ye(...Object.values(p)),ye(...Object.values(w)),ye(...Object.values(P))]))}}),ur="trees",Yn=1,Xn=.1,be=Ut(ur,function(){const e="Trees",t="#4BDC13",l="green",i=st(0,"logs"),a=st(0,"saplings"),s=$(0),u=W(()=>[Z(()=>({addend:()=>n.times(H.amount.value,10),description:"Expand Forest",enabled:S.bought})),Z(()=>({addend:()=>n.div(Ct.foundationProgress.value,2),description:"75% Foundation Completed",enabled:Ct.milestones.morePlantsMilestone1.earned})),k(()=>({multiplier:2,description:"5 Elves Trained",enabled:Qe.milestones[4].earned})),k(()=>({multiplier:2,description:"8 Elves Trained",enabled:Qe.milestones[7].earned})),k(()=>({multiplier:4,description:"Lumberjack Boots",enabled:yt.treesUpgrades.treesUpgrade1.bought}))]),c=st(C(()=>n.sub(u.apply(10),a.value)),"trees"),p=C(()=>u.apply(10)),m=O(()=>({resource:F(i),cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),b=O(()=>({resource:F(i),cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),h=O(()=>({resource:F(i),cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),w=O(()=>({resource:F(i),cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),f=O(()=>({resource:F(i),cost:40,display:{title:"Research I",description:"Trees give 25% more logs, and unlock more upgrades"}})),_=[m,b,h,w,f],A=O(()=>({resource:F(i),cost:50,visibility:()=>x(f.bought.value),display:{title:"Sharper Fingers",description:"Manually cut trees twice as often"}})),P=O(()=>({resource:F(i),cost:50,visibility:()=>x(f.bought.value),display:{title:"Greener Fingers",description:"Manually Plant trees twice as often"}})),Y=O(()=>({resource:F(i),cost:150,visibility:()=>x(f.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),M=O(()=>({resource:F(i),cost:150,visibility:()=>x(f.bought.value),display:{title:"Smart Spades",description:"Each time you manually plant trees, gain 1s of automatic tree planting production"}})),S=O(()=>({resource:F(i),cost:300,visibility:()=>x(f.bought.value),display:{title:"Research II",description:"Trees give 25% more logs, and unlock repeatable purchases"}})),T=[A,P,Y,M,S],fe=Se(()=>({resource:F(i),cost(){let q=this.amount.value;return n.gte(q,50)&&(q=n.pow(q,2).div(50)),n.gte(q,200)&&(q=n.pow(q,2).div(200)),n.gte(q,2e6)&&(q=n.pow(q,2).div(2e6)),q=n.pow(.95,j.books.cuttersBook.amount.value).times(q),n.times(100,q).add(200)},display:{title:"Generic Cutters",description:"Each cutter cuts down 1 tree/s"},visibility:()=>x(S.bought.value)})),Pe=Se(()=>({resource:F(i),cost(){let q=this.amount.value;return n.gte(q,50)&&(q=n.pow(q,2).div(50)),n.gte(q,200)&&(q=n.pow(q,2).div(200)),n.gte(q,2e6)&&(q=n.pow(q,2).div(2e6)),q=n.pow(.95,j.books.plantersBook.amount.value).times(q),n.times(100,q).add(200)},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>x(S.bought.value)})),H=Se(()=>({resource:F(i),cost(){let q=this.amount.value;return n.gte(q,100)&&(q=n.pow(q,2).div(100)),n.gte(q,1e5)&&(q=n.pow(q,2).div(1e5)),q=n.pow(.95,j.books.expandersBook.amount.value).times(q),n.pow(n.add(q,1),1.5).times(500)},display:{title:"Expand Forest",description:"Add 10 trees to the forest"},visibility:()=>x(S.bought.value)})),Ee=[fe,Pe,H],de=W(()=>[Z(()=>({addend:1,description:"Wooden Fingers",enabled:m.bought})),Z(()=>({addend:Oe,description:"Smart Knives",enabled:Y.bought}))]),Re=C(()=>de.apply(1)),Be=W(()=>[k(()=>({multiplier:.5,description:"Sharper Fingers",enabled:A.bought})),k(()=>({multiplier:()=>n.pow(.5,Qe.totalElves.value),description:"1 Elf Trained",enabled:Qe.milestones[0].earned}))]),De=C(()=>Be.apply(1)),Ie=W(()=>[Z(()=>({addend:1,description:"Automated Knives",enabled:h.bought})),Z(()=>({addend:fe.amount,description:"Generic Cutters",enabled:S.bought})),Z(()=>({addend:()=>n.div(Ct.foundationProgress.value,5).floor(),description:"10% Foundation Completed",enabled:Ct.milestones.autoCutMilestone1.earned})),k(()=>({multiplier:2,description:"30% Foundation Completed",enabled:Ct.milestones.autoCutMilestone2.earned})),k(()=>({multiplier:2,description:"Warmer Cutters",enabled:R.warmerCutters.bought})),k(()=>({multiplier:R.computedHeatedCutterEffect,description:"Heated Cutters",enabled:()=>n.gt(R.heatedCutters.amount.value,0)})),k(()=>({multiplier:4,description:"Lumberjack Jeans",enabled:yt.treesUpgrades.treesUpgrade2.bought}))]),Oe=C(()=>Ie.apply(0)),L=W(()=>[Z(()=>({addend:1,description:"Leafy Fingers",enabled:b.bought})),Z(()=>({addend:Fe,description:"Smart Spades",enabled:M.bought}))]),Ce=C(()=>L.apply(1)),he=W(()=>[k(()=>({multiplier:.5,description:"Greener Fingers",enabled:P.bought})),k(()=>({multiplier:()=>n.pow(.5,Qe.totalElves.value),description:"1 Elf Trained",enabled:Qe.milestones[0].earned}))]),me=C(()=>he.apply(1)),$e=W(()=>[Z(()=>({addend:1,description:"Automated Spade",enabled:w.bought})),Z(()=>({addend:()=>n.div(Pe.amount.value,2),description:"Generic Planters",enabled:S.bought})),Z(()=>({addend:()=>n.div(Ct.foundationProgress.value,10).floor(),description:"20% Foundation Completed",enabled:Ct.milestones.autoPlantMilestone1.earned})),k(()=>({multiplier:2,description:"40% Foundation Completed",enabled:Ct.milestones.autoPlantMilestone2.earned})),k(()=>({multiplier:2,description:"Warmer Planters",enabled:R.warmerPlanters.bought})),k(()=>({multiplier:R.computedHeatedPlanterEffect,description:"Heated Planters",enabled:()=>n.gt(R.heatedPlanters.amount.value,0)})),k(()=>({multiplier:4,description:"Lumberjack Plaid",enabled:yt.treesUpgrades.treesUpgrade3.bought}))]),Fe=C(()=>$e.apply(0)),rt=W(()=>[k(()=>({multiplier:1.25,description:"Research I",enabled:f.bought})),k(()=>({multiplier:1.25,description:"Research II",enabled:S.bought})),k(()=>({multiplier:()=>n.div(Ct.foundationProgress.value,20).add(1),description:"1% Foundation Completed",enabled:Ct.milestones.logGainMilestone1.earned})),k(()=>({multiplier:2,description:"50% Foundation Completed",enabled:Ct.milestones.logGainMilestone2.earned})),k(()=>({multiplier:1.25,description:"Ashy Soil",enabled:R.basicFertilizer.bought})),k(()=>({multiplier:R.computedFertilizerEffect,description:"Fertilized Soil",enabled:()=>n.gt(R.moreFertilizer.amount.value,0)})),k(()=>({multiplier:2,description:"4 Elves Trained",enabled:Qe.milestones[3].earned})),k(()=>({multiplier:2,description:"Carry logs in boxes",enabled:ct.upgrades.logsUpgrade.bought})),k(()=>({multiplier:()=>n.div(ct.buyables.logBoxesBuyable.amount.value,2).add(1),description:"Carry more logs",enabled:ct.upgrades.logsUpgrade.bought})),k(()=>({multiplier:10,description:"Felt-Gripped Axe",enabled:yt.treesUpgrades.treesUpgrade4.bought})),Ni(()=>({exponent:1.2,description:"100% Foundation Completed",enabled:Ct.milestones.logGainMilestone3.earned}))]),Te=we(0),Pt=Kt(()=>({direction:ke.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>n.div(Te.value,De.value)})),te=It(()=>({display:{title:"Cut trees",description:B(()=>o(I,null,[d("Cut down up to "),se(n.floor(Re.value))," ",d("tree"),n.eq(Re.value,1)?"":"s",d(" at once!"),o("br",null,null),re(Pt)]))},style:{minHeight:"80px"},canClick:()=>n.gte(c.value,1)&&n.gte(Te.value,De.value),onClick(){if(n.lt(Te.value,De.value))return;const q=n.floor(n.min(c.value,n.times(Re.value,n.div(Te.value,De.value).floor())));i.value=n.add(i.value,n.times(rt.apply(1),q)),a.value=n.add(a.value,q),Te.value=0}})),le=we(0),Xe=Kt(()=>({direction:ke.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>n.div(le.value,me.value)})),He=It(()=>({display:{title:"Plant trees",description:B(()=>o(I,null,[d("Plant up to "),se(n.floor(Ce.value))," ",d("tree"),n.eq(Ce.value,1)?"":"s",d(" at once!"),o("br",null,null),re(Xe)]))},style:{minHeight:"80px"},canClick:()=>n.gte(a.value,1)&&n.gte(le.value,me.value),onClick(){if(n.lt(le.value,me.value))return;const q=n.floor(n.min(a.value,n.times(Ce.value,n.div(le.value,me.value).floor())));a.value=n.sub(a.value,q),le.value=0}})),[ue,ut]=pl(()=>[{title:"Logs per Tree",modifier:rt,base:1,visible:f.bought},{title:"Manual Cutting Amount",modifier:de,base:1,visible:m.bought,unit:"/click"},{title:"Manual Cutting Cooldown",modifier:Be,base:1,visible:m.bought,unit:"s"},{title:"Manual Planting Amount",modifier:L,base:1,visible:b.bought,unit:"/click"},{title:"Manual Planting Cooldown",modifier:he,base:1,visible:b.bought,unit:"s"},{title:"Auto Cutting Amount",modifier:Ie,base:0,visible:h.bought,unit:"/s"},{title:"Auto Planting Amount",modifier:$e,base:0,visible:w.bought,unit:"/s"},{title:"Forest Size",modifier:u,base:10,visible:S.bought}]),ze=$(!1),xe=B(()=>o(bt,{modelValue:ze.value,"onUpdate:modelValue":q=>ze.value=q},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:ue}));Ue.on("update",q=>{if(n.lt(Q.day.value,Yn))return;n.gte(Te.value,De.value)?Te.value=De.value:(Te.value=n.add(Te.value,q),te.isHolding.value&&te.onClick()),n.gte(le.value,me.value)?le.value=me.value:(le.value=n.add(le.value,q),He.isHolding.value&&He.onClick());const Rt=n.min(c.value,n.times(Oe.value,q)),el=n.mul(rt.apply(1),Rt),it=n.div(el,q);s.value=n.mul(it,Xn).add(n.mul(s.value,n.dOne.sub(Xn))),i.value=n.add(i.value,el),a.value=n.add(a.value,Rt);const X=n.min(a.value,n.times(Fe.value,q));a.value=n.sub(a.value,X)});const ft=C(()=>n.sub(Oe.value,Fe.value)),Ve=C(()=>n.sub(Fe.value,Oe.value)),Dt=El(()=>({key:"c",description:'Press the "Cut trees" button.',onPress:()=>{te.canClick.value&&te.onClick()}})),qe=El(()=>({key:"p",description:'Press the "Plant trees" button.',onPress:()=>{He.canClick.value&&He.onClick()}})),{total:dt,trackerDisplay:K}=ml({resource:i,goal:1e4,name:e,day:Yn,color:l,modal:{show:ze,display:xe}});return{name:e,color:t,logs:i,totalLogs:dt,trees:c,saplings:a,cutTree:te,plantTree:He,cutTreeHK:Dt,plantTreeHK:qe,row1Upgrades:_,row2Upgrades:T,row1Buyables:Ee,manualCutProgress:Te,manualPlantProgress:le,generalTabCollapsed:ut,minWidth:700,display:B(()=>o(I,null,[re(K),o(ge,null,null),o(St,{resource:i,color:t,style:"margin-bottom: 0",productionDisplay:n.gt(Oe.value,0)?`+${ve(s.value)}/s average
equilibrium: +${ci([[Oe.value,"cutting speed"],[Fe.value,"planting speed"],[n.mul(p.value,20),"forest cap"]],"/s",rt.apply(1))}`:void 0},null),o(St,{resource:a,color:l,style:"margin-bottom: 0",productionDisplay:Xl(ft.value)},null),o(St,{resource:c,color:l,style:"margin-bottom: 0",productionDisplay:Xl(Ve.value)},null),o(ge,null,null),ye(te,He),o("div",null,[d("Tip: You can hold down on actions to perform them automatically")]),o(ge,null,null),ye(..._),ye(...T),ye(...Ee)]))}});var Ii="./assets/tree.35808197.png",Bi="./assets/sws.714ad454.png",xi="data:image/png;base64,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",Pi="./assets/elf.9fbfa563.png",Di="./assets/paperStacks.4c96ec8c.png",Fi="data:image/png;base64,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",Ti="./assets/metal.7407f5d1.png",Ui="./assets/cloth.7bcd7f37.png",Ri="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAFxGAABcRgEUlENBAAAAG3RFWHRTb2Z0d2FyZQBDZWxzeXMgU3R1ZGlvIFRvb2zBp+F8AAAE/ElEQVR42u3dW3baMBRAURhzO4x2zO5P25WPPAhIuq99JhAsayNwbHG/rusm6f3ugEiASIBIgEiASIBIgEiASIBIgNQ+mPv9/8Fc13V3ejUeyFsUnwWMRgF5FAYoGgXkWRiQqD2QFThAUUsgq3FAIkAgESCQCJDtQCARIJAIEEAECCQCJArISSQfHRekgIxG4h4yQCBZdAyQADLi+0jlGyw/e+2dAY+7mzdqgr76ek9OQjeENgBSDUl2IO51awjkJJRXTnTWd2T/WxoCJDOSla9r1UQ7faGjMpKWmzZk+riQCUgEjOpIWu9qsmNCfOckZ3nAKxpGZSRjtv2JeCePXj0ywQBkEJZHTnLk6pERBiDDsHx1oqOAZMZREYmdFZ+YYBlXkAowABmAJuqd/LO/WwkHIDqGoxoM30F0DEhFHIBoO5CqMADRFiBwAALIA5MKDkCWTbTIk7Hj41V1HIAknmCnT06HyQxHUiDVd0+EoxeOVEA6PKMASC8caYBkmFjVn7WAoymQrBPr7ZfjTvdBwVEISPVbJcDojQMQwQGI4ABEcAAiMAARMIAAAgwggKg8FEAECSACBBBB0gsIJIAAAogAgUS+gwAiQCARHAmBQAIIIJCoGKCU+2JBAgwgkKgAFiuIQPElXZAUBgKGsiJxq4kgyQgEDFVAEgIEDlVBchwIHAIEDDVBcgQIHAIEDgEChwABRJDsBgKHAIFDgAAiQOAQIIAIEEAECCASIBIgUk4cgAgQQAQHIAKkBhBI1AXHNiCgqAOO7UAgUWUcR4DAooowQoAAo0o4woFAoqwwrCACAxCBURQIHMoMIxQIHLKCAKIGWGxeLVCyAIFD1ZAAIlAyAInG8dXgwgvJWCDfHVRYIDkKJGLCrRhEUABpB2T14EEyG0mr50F2DRokgJQHsn13C0hGImnxyO2RgSoI5N+4dMUNSLblNvlEm3a1rjSQbjiyT6iJV+0ASQYk8yRaOQ5VoACSEMjfY/t1u91+JJknv6/r+ukNoRCQDpd2AckNBRBAUgHJhgWQpDgSvpseBxI9FuVvNekOJNEqEooj4ryXv5u3+8crQOLmQYvnQSasHoCcnxdtth4FpAaQj85T0EWPK9O5BaTPl/WngDzyujPvVQVIkZMXDGT56gELIIC88NonQgFkKBBImgLJdoICkSy5gvXs658Cpdw/CgFZC+TVY+gOpRSQlJsbNwACCSDdgGz5ByEkh4DsmDhZT0AnIJAcBLJyAmUf+AAkKYF0RAIIIJBEApmwbAPSF0nqnz+oMsiAAHJ08CsO7uG7e0ts1NABSaqfga48oAeBbH8GZOWKWB1JKJBOdQEy5fI8IH2/h5RaQcp/MgAEkN3HAYhOfsyyggACSCcglZEAAggggAACCCCAAAIIIDV3cwdEp5AAAgggnYC4zKt2QFYiAUQtgaxA4l4stQbyChK3u2sEkGeRAKIxQL4DxTPpikSS5kdz3sNiVxMB8g4UG8cJkInnEhBABAggAgQQAQIIIIAAAgggkAACCCCAACJAABEggAgQAQKIAAFEgAAiQACBBBBAAAEEEEAAESCACBBABAggRqEeEEgAAQQQQAABBBBAAAFEp4FAAggggAACCCCAAAIJIAIEECXCAQgggEACCCCAAAIIIIAoAggkgAACCCBwAAIIIJAAAggggCgZEEgAgQMQQACBBBBAAAEEDkgK9wfV+oLa+LwMvQAAAABJRU5ErkJggg==",Oi="./assets/plastic.b8ac74ff.png";const Q=Ut("main",function(){const e=we(1),t=C(()=>(+new Date(new Date().getFullYear(),11,e.value)-z.time)/1e3),l=$(!1),i=$(-1),a=$(""),s=$();function u(m){const b=we(!1),h=we(!1);return Nt(()=>{const w=m(),f=pt(w.shouldNotify),_=pt(()=>r(f)||r(h));return{...w,opened:b,shouldNotify:_,recentlyUpdated:h,[dl]:Jo,[cl]:function(){const{day:A,layer:P,symbol:Y,opened:M,shouldNotify:S,story:T,completedStory:fe,recentlyUpdated:Pe}=this;return{day:A,symbol:Y,layer:P,opened:M,recentlyUpdated:Pe,shouldNotify:S,onOpenLore(){var de,Re;const H=Q.day.value>A;i.value=H?A-1:-1;const Ee=r((Re=(de=vt[P!=null?P:"trees"])==null?void 0:de.name)!=null?Re:"");a.value=H?`${Ee} - Completed!`:Ee,s.value=H?`${T}
${fe}`:T,l.value=!0},onOpenLayer(){if(Pe.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(z.tabs.includes(P!=null?P:"trees")){const H=z.tabs.lastIndexOf(P!=null?P:"trees");z.tabs.splice(H,1)}else z.tabs.push(P!=null?P:"trees"),Q.minimized.value=!0;else z.tabs.splice(1,1/0,P!=null?P:"trees")},onUnlockLayer(){P&&(M.value=!0,setTimeout(()=>{var H,Ee;i.value=-1,a.value=r((Ee=(H=vt[P!=null?P:"trees"])==null?void 0:H.name)!=null?Ee:""),s.value=T,z.devSpeed=null,l.value=!0},1e3))}}}}})}const c=[u(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Ii,story:"Oh no! Santa forgot about Christmas and it's only 25 days away! He's asked for your help due to your history getting large quantities of things in short amounts of time. Unfortunately you're really starting from scratch here - let's start with getting wood, which you'll need for everything from building workshops to wrapping paper to many of the toys themselves!",completedStory:"Santa looks at all the wood you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),u(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:Bi,story:"Santa looked over your tree farm and was impressed with how much you could accomplish in just one day. Today's goal is to get a workshop built up for the elves to work in - and apparently, they need quite a lot of space to work!",completedStory:"The workshop complete, Santa once again dismisses you for the day. With a strong foundation, this workshop should suffice for supporting future work toward this impossible mission. Good Job!"})),u(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:xi,story:"Santa tells you that unfortunately there are quite a few naughty children out there this year, and he's going to need you to gather as much coal as you can for him to give out.",completedStory:"Santa looks at all the coal you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),u(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:Pi,story:"Alright, it seems you finally have enough things set up to start bringing in the elves! Unfortunately, it seems they'll need to be retrained on how to help, since they've stopped practicing for 11 months!",completedStory:"The workshop now hums with the bustling elves working on everything. They can take it from here - you deserve a break after such a long day! Good Job!"})),u(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:Di,story:"With the elves trained, we're almost ready to start working on these presents! Just a couple more pre-reqs first, starting with turning all this wood into wood pulp and finally into paper, which will be required for wrapping paper later on but in the meantime can be used to help write guides which will help these elves continue their education!",completedStory:"You look upon your rivers of book pulp as you hand out stacks of papers to elves to read through. You've continued getting closer and closer to preparing for Christmas, and can go to bed satisfied with your progress. Good Job!"})),u(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:Fi,story:"You watch all these elves carrying incredibly large loads just in their open elf-sized hands, and realize there's probably a better way. You need to put the toys in boxes anyways, so why don't we get started working on those so the workers can take advantage as well?",completedStory:"Wow, those boxes are really convenient! The workshop feels more and more proper with every day. You tick another requirement on your list and start looking towards tomorrow. Good Job!"})),u(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:Ti,story:"You woke up ready to make some toys, before realizing most toys these days are made out of more than just wood! You're sure you're close to really getting to work, but there's a few more materials you're going to need - like metal! Lots of things need metal!",completedStory:"The sounds of drills and metal clanging join the already loud din as yet another piece of the puzzle fits into place. You're making solid progress, Good Job!"})),u(()=>({day:8,shouldNotify:!1,layer:"cloth",symbol:Ui,story:"Another resource you're going to need for gifts is cloth! Fortunately you think this should be pretty easy to prepare using a sheep farm - and as you've already proven with the tree farm, that's something you can handle!",completedStory:"You fall into a pile of wool, sighing contentedly as you look at all the progress you've made today. Good Job!"})),u(()=>({day:9,shouldNotify:!1,layer:"oil",symbol:Ri,story:"Looks like you just need one more thing before the toy factory can start running: plastic! Every toy nowadays is made with plastic! But wait, how are you going to get plastic? What can make plastic? Wait that's right, oil! You figured out you might as well repurpose your coal and ore drills into something that can get you oil, but unfortunately you'll need to mine much deeper that you're currently doing, so let's get to work!",completedStory:"It took a while, but you finally got enough oil for the next step! You deserve a good rest after all this digging work - tomorrow will be a busy day! Good Job!"})),u(()=>({day:10,shouldNotify:!1,layer:"plastic",symbol:Oi,story:"Now that plenty of oil has been prepared, it's time to start refining it into plastic! This should be incredibly useful not only for toys, but making tools and other items!",completedStory:"You've started refining massive amounts of oil into slightly less massive amounts of plastic. You have a slight pang of regret thinking of the environmental impact, but ultimately decide Christmas is worth it. Good Job!"})),u(()=>({day:11,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:12,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:13,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:14,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:15,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:16,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:17,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:18,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:19,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:20,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:21,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:22,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:23,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:24,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""}))];function p(){i.value=e.value-1,a.value="Day Complete!",s.value=c[e.value-1].completedStory,l.value=!0,e.value++,Q.minimized.value=!1,z.devSpeed=0}return{name:"Calendar",days:c,day:e,timeUntilNewDay:t,loreScene:i,loreTitle:a,loreBody:s,showLoreModal:l,completeDay:p,minWidth:700,display:B(()=>o(I,null,[z.devSpeed===0?o("div",null,[d("Game Paused")]):null,z.devSpeed&&z.devSpeed!==1?o("div",null,[d("Dev Speed: "),ve(z.devSpeed),d("x")]):null,z.offlineTime?o("div",null,[d("Offline Time: "),sn(z.offlineTime)]):null,o(ge,null,null),o("div",{class:"advent"},[c.reduce((m,b)=>(m[m.length-1].length===4&&m.push([]),m[m.length-1].push(b),m),[[]]).map(m=>ye(...m))])]))}}),dr=e=>[Q,be,Ct,R,Qe,j,ct,ht,yt,Ke,Le],Fn=C(()=>!1);function cr(e,t){t.offlineProd=!1}var pr=Object.freeze(Object.defineProperty({__proto__:null,main:Q,getInitialLayers:dr,hasWon:Fn,fixOldSave:cr},Symbol.toStringTag,{value:"Module"}));const mr={class:"scene"},gr=["src"],fr=["src"],hr=["src"],vr=["src"],yr=["src"],br=["src"],wr=["src"],Cr={key:7,class:"scene-bubble",style:{left:"50%",bottom:"38%"}},kr=["src"],_r=["src"],Ar=["src"],Sr=ae({__name:"Scene",props:{day:null},setup(e){return(t,l)=>(y(),E("div",mr,[e.day>=7?(y(),E("img",{key:0,src:r(Ui),class:"scene-item",style:{left:"4%",bottom:"3%",width:"40px",height:"40px"}},null,8,gr)):U("",!0),e.day>=0?(y(),E("img",{key:1,src:r(Ii),class:"scene-item",style:{left:"10%",bottom:"10%"}},null,8,fr)):U("",!0),e.day>=1?(y(),E("img",{key:2,src:r(Bi),class:"scene-item",style:{left:"40%",bottom:"12%"}},null,8,hr)):U("",!0),e.day>=2?(y(),E("img",{key:3,src:r(xi),class:"scene-item",style:{left:"65%",bottom:"12%",width:"40px",height:"40px"}},null,8,vr)):U("",!0),e.day>=6?(y(),E("img",{key:4,src:r(Ti),class:"scene-item",style:{left:"72%",bottom:"8%",width:"40px",height:"40px"}},null,8,yr)):U("",!0),e.day>=8?(y(),E("img",{key:5,src:r(Ri),class:"scene-item",style:{left:"80%",bottom:"6%"}},null,8,br)):U("",!0),e.day>=3?(y(),E("img",{key:6,src:r(Pi),class:"scene-item",style:{left:"52%",bottom:"12%"}},null,8,wr)):U("",!0),e.day>=4?(y(),E("div",Cr,[e.day>=4?(y(),E("img",{key:0,src:r(Di),class:"scene-item"},null,8,kr)):U("",!0),e.day>=5?(y(),E("img",{key:1,src:r(Fi),class:"scene-item"},null,8,_r)):U("",!0),e.day>=9?(y(),E("img",{key:2,src:r(Oi),class:"scene-item"},null,8,Ar)):U("",!0)])):U("",!0)]))}});var Nr=Ne(Sr,[["__scopeId","data-v-3bd95ce8"]]);const Er=ae({components:{Context:gi},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:V(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:V(Number,String),required:!0},name:{type:V(String),required:!0},color:V(String),minimizable:V(Boolean),nodes:{type:Object,required:!0}},setup(e){const{display:t,index:l,minimized:i,minWidth:a,tab:s}=gt(e),u=en(t),c=C(()=>Me.allowGoBack&&l.value>0&&!i.value);function p(){z.tabs.splice(r(e.index),1)}bl(()=>b(i.value,r(a.value))),Qt([i,xo(a)],([h,w])=>b(h,w));function m(h){e.nodes.value=h}function b(h,w){const f=typeof w=="number"||Number.isNaN(parseInt(w))?w+"px":w,_=s.value();_!=null&&(h?(_.style.flexGrow="0",_.style.flexShrink="0",_.style.width="60px",_.style.minWidth=_.style.flexBasis="",_.style.margin="0"):(_.style.flexGrow="",_.style.flexShrink="",_.style.width="",_.style.minWidth=_.style.flexBasis=f,_.style.margin=""))}return{component:u,showGoBack:c,updateNodes:m,unref:r,goBack:p}}});function Mr(e,t,l,i,a,s){const u=rl("Context");return y(),E("div",{class:"layer-container",style:nt({"--layer-color":e.unref(e.color)})},[e.showGoBack?(y(),E("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...c)=>e.goBack&&e.goBack(...c))},"\u274C")):U("",!0),e.minimized.value?(y(),E("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=c=>e.minimized.value=!1)},[g("div",null,ce(e.unref(e.name)),1)])):(y(),E("div",{key:2,class:et(["layer-tab",{showGoBack:e.showGoBack}])},[o(u,{onUpdateNodes:e.updateNodes},{default:J(()=>[(y(),ee(je(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(y(),E("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=c=>e.minimized.value=!0)}," \u25BC ")):U("",!0)],4)}var Ir=Ne(Er,[["render",Mr],["__scopeId","data-v-0158bec3"]]);const $i=e=>(Yt("data-v-4b4bda40"),e=e(),Xt(),e),Br=$i(()=>g("h2",null,"Changelog",-1)),xr=$i(()=>g("details",{open:""},[g("summary",null,[d("v0.0 Initial Commit - "),g("time",null,"2021-09-04")]),d(" This is the first release :D "),g("ul",null,[g("li",{class:"feature"},"Did everything"),g("li",{class:"fix"},"Had some fun"),g("li",{class:"breaking"},"Removed everything"),g("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),Pr=ae({__name:"Changelog",setup(e,{expose:t}){const l=$(!1);return t({open(){l.value=!0}}),(i,a)=>(y(),ee(bt,{modelValue:l.value,"onUpdate:modelValue":a[0]||(a[0]=s=>l.value=s)},{header:J(()=>[Br]),body:J(()=>[xr]),_:1},8,["modelValue"]))}});var Dr=Ne(Pr,[["__scopeId","data-v-4b4bda40"]]),Fr=ae({props:{element:Object,display:{type:V(Object,String,Function),required:!0},style:V(Object,String,Array),classes:V(Object),direction:V(String),xoffset:V(String),yoffset:V(String),pinned:Object},setup(e){const{element:t,display:l,pinned:i}=gt(e),a=$(!1),s=C(()=>(ot(i)||a.value)&&u.value),u=ul(l),c=Tt(Ae(B(()=>{const b=ot(t);return b==null?"":Lt(b)})));function p(b){const h=i;b.shiftKey&&h&&(h.value=!h.value,b.stopPropagation(),b.preventDefault())}const m=C(()=>ot(i)&&$l[Ye.theme].showPin);return{Direction:ke,isHovered:a,isShown:s,comp:u,elementComp:c,unref:r,togglePinned:p,showPin:m}}});const Tr={key:0,class:"material-icons pinned"};function Ur(e,t,l,i,a,s){return y(),E("div",{class:et(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=u=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=u=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...u)=>e.togglePinned&&e.togglePinned(...u))},[Vt(e.$slots,"default",{},void 0,!0),e.elementComp?(y(),ee(je(e.elementComp),{key:0})):U("",!0),o(an,{name:"fade"},{default:J(()=>{var u;return[e.isShown?(y(),E("div",{key:0,class:et(["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:nt([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(u=e.unref(e.style))!=null?u:{}])},[e.showPin?(y(),E("span",Tr,"push_pin")):U("",!0),e.comp?(y(),ee(je(e.comp),{key:1})):U("",!0)],6)):U("",!0)]}),_:1})],34)}var tt=Ne(Fr,[["render",Ur],["__scopeId","data-v-6102fa3a"]]);const Rr={class:"info-modal-header"},Or=["src","alt"],$r={class:"info-modal-title"},qr={key:0},Gr=d(" - "),Vr={key:0},Lr={key:0},Qr=g("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1),Hr=g("br",null,null,-1),jr=g("br",null,null,-1),zr=["href"],Wr=g("span",{class:"material-icons info-modal-discord"},"discord",-1),Kr=g("div",null,[g("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[g("span",{class:"material-icons info-modal-discord"},"discord"),d(" The Paper Pilot Community ")])],-1),Jr=g("div",null,[g("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link",target:"_blank"},[g("span",{class:"material-icons info-modal-discord"},"discord"),d(" The Modding Tree ")])],-1),Yr=g("br",null,null,-1);var Xr=ae({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const l=e,{title:i,logo:a,author:s,discordName:u,discordLink:c,versionNumber:p,versionTitle:m}=Me,b=gt(l),h=$(!1),w=C(()=>sn(z.timePlayed)),f=C(()=>Ae(B(()=>o(I,null,[_i.map(re)]))));t({open(){h.value=!0}});function _(){var A;(A=r(b.changelog))==null||A.open()}return(A,P)=>(y(),ee(bt,{class:"info-modal",modelValue:h.value,"onUpdate:modelValue":P[0]||(P[0]=Y=>h.value=Y)},{header:J(()=>[g("div",Rr,[r(a)?(y(),E("img",{key:0,class:"info-modal-logo",src:r(a),alt:r(i)},null,8,Or)):U("",!0),g("div",$r,[g("h2",null,"- "+ce(r(i))+" -",1),g("h4",null,[d(" - v"+ce(r(p)),1),r(m)?(y(),E("span",qr,": "+ce(r(m)),1)):U("",!0),Gr])])])]),body:J(({shown:Y})=>[Y?(y(),E("div",Vr,[r(s)?(y(),E("div",Lr,"By "+ce(r(s)),1)):U("",!0),Qr,Hr,g("div",{class:"link",onClick:_},"Changelog"),jr,g("div",null,[r(c)?(y(),E("a",{key:0,href:r(c),class:"info-modal-discord-link",target:"_blank"},[Wr,d(" "+ce(r(u)),1)],8,zr)):U("",!0)]),Kr,Jr,Yr,g("div",null,"Time Played: "+ce(r(w)),1),(y(),ee(je(r(f))))])):U("",!0)]),_:1},8,["modelValue"]))}});const qi=e=>(Yt("data-v-0d685451"),e=e(),Xt(),e),Zr=qi(()=>g("h2",null,"Options",-1)),eu=qi(()=>g("hr",null,null,-1));var tu=ae({__name:"Options",setup(e,{expose:t}){const l=$(!1);t({open(){l.value=!0}});const i=Object.keys($l).map(f=>({label:pi(f),value:f})),a=C(()=>Ae(B(()=>o(I,null,[ki.map(re)])))),{showTPS:s,theme:u}=gt(Ye),{autosave:c,usingLog:p}=gt(z),m=C({get(){return z.devSpeed===0},set(f){z.devSpeed=f?0:null}}),b=B(()=>o("span",null,[d("Autosave"),o(tt,{display:"Save-specific"},{default:()=>[d("*")]})])),h=B(()=>o("span",null,[d("Pause game"),o(tt,{display:"Save-specific"},{default:()=>[d("*")]})])),w=B(()=>o("span",null,[d("Use log for progress bar"),o(tt,{display:"Save-specific"},{default:()=>[d("*")]})]));return(f,_)=>(y(),ee(bt,{modelValue:l.value,"onUpdate:modelValue":_[5]||(_[5]=A=>l.value=A)},{header:J(()=>[Zr]),body:J(()=>[o(Dn,{title:"Theme",options:r(i),modelValue:r(u),"onUpdate:modelValue":_[0]||(_[0]=A=>lt(u)?u.value=A:null)},null,8,["options","modelValue"]),(y(),ee(je(r(a)))),o(Wt,{title:"Show TPS",modelValue:r(s),"onUpdate:modelValue":_[1]||(_[1]=A=>lt(s)?s.value=A:null)},null,8,["modelValue"]),eu,o(Wt,{title:r(b),modelValue:r(c),"onUpdate:modelValue":_[2]||(_[2]=A=>lt(c)?c.value=A:null)},null,8,["title","modelValue"]),r(Me).enablePausing?(y(),ee(Wt,{key:0,title:r(h),modelValue:r(m),"onUpdate:modelValue":_[3]||(_[3]=A=>lt(m)?m.value=A:null)},null,8,["title","modelValue"])):U("",!0),o(Wt,{title:r(w),modelValue:r(p),"onUpdate:modelValue":_[4]||(_[4]=A=>lt(p)?p.value=A:null)},null,8,["title","modelValue"])]),_:1},8,["modelValue"]))}});var lu=Ne(tu,[["__scopeId","data-v-0d685451"]]);const nu=["onSubmit"],iu={class:"field"},au={key:0,class:"field-title"},ou=["placeholder"],su=ae({__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 l=e,i=ul(Ht(l,"title"),"span"),a=Tt(null);ln(()=>{var p;(p=a.value)==null||p.focus()});const s=C({get(){return r(l.modelValue)||""},set(p){t("update:modelValue",p)}});function u(){t("submit")}function c(){l.submitOnBlur!==!1?t("submit"):t("cancel")}return(p,m)=>(y(),E("form",{onSubmit:Fl(u,["prevent"])},[g("div",iu,[r(i)?(y(),E("span",au,[(y(),ee(je(r(i))))])):U("",!0),e.textArea?(y(),ee(r(aa),{key:1,modelValue:r(s),"onUpdate:modelValue":m[0]||(m[0]=b=>lt(s)?s.value=b:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:c,ref_key:"field",ref:a},null,8,["modelValue","placeholder","maxHeight"])):nn((y(),E("input",{key:2,type:"text","onUpdate:modelValue":m[1]||(m[1]=b=>lt(s)?s.value=b:null),placeholder:e.placeholder,class:et({fullWidth:!e.title}),onBlur:c,ref_key:"field",ref:a},null,42,ou)),[[Zi,r(s)]])])],40,nu))}});var Gi=Ne(su,[["__scopeId","data-v-67b44a54"]]);const ru={key:0},uu=["onClick","disabled"],du={key:0},cu=["onClick"],pu=ae({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const i=gt(e),a=$(!1);Qt(a,c=>{t("confirmingChanged",c)});function s(){if(r(i.skipConfirm)){t("click");return}a.value&&t("click"),a.value=!a.value}function u(){a.value=!1}return(c,p)=>(y(),E("span",{class:et(["container",{confirming:a.value}])},[a.value?(y(),E("span",ru,"Are you sure?")):U("",!0),g("button",{onClick:Fl(s,["stop"]),class:"button danger",disabled:e.disabled},[a.value?(y(),E("span",du,"Yes")):Vt(c.$slots,"default",{key:1},void 0,!0)],8,uu),a.value?(y(),E("button",{key:1,class:"button",onClick:Fl(u,["stop"])},"No",8,cu)):U("",!0)],2))}});var mu=Ne(pu,[["__scopeId","data-v-2f8ef34c"]]);const gu=["onClick"],fu=ae({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const l=$(!1),i=$(null);function a(){t("click"),i.value&&clearTimeout(i.value),l.value=!1,bl(()=>{l.value=!0,i.value=setTimeout(()=>l.value=!1,500)})}return(s,u)=>(y(),E("button",{onClick:Fl(a,["stop"]),class:et(["feedback",{activated:l.value,left:e.left}])},[Vt(s.$slots,"default",{},void 0,!0)],10,gu))}});var hu=Ne(fu,[["__scopeId","data-v-01a1b95c"]]);const Zt=e=>(Yt("data-v-5285ac49"),e=e(),Xt(),e),vu=Zt(()=>g("div",{class:"handle material-icons"},"drag_handle",-1)),yu={key:0,class:"actions"},bu=Zt(()=>g("span",{class:"material-icons"},"content_paste",-1)),wu=Zt(()=>g("span",{class:"material-icons"},"content_copy",-1)),Cu=Zt(()=>g("span",{class:"material-icons"},"edit",-1)),ku=Zt(()=>g("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),_u={key:1,class:"actions"},Au=Zt(()=>g("span",{class:"material-icons"},"check",-1)),Su=Zt(()=>g("span",{class:"material-icons"},"close",-1)),Nu={key:2,class:"details"},Eu={class:"save-version"},Mu=Zt(()=>g("br",null,null,-1)),Iu={key:0},Bu={key:1},xu={key:3,class:"details"},Pu={key:4,class:"details error"},Du=Zt(()=>g("br",null,null,-1)),Fu=ae({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const l=e,{save:i}=gt(l),a=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),s=$(!1),u=$(!1),c=$("");Qt(s,()=>c.value=i.value.name||"");const p=C(()=>i.value&&i.value.id===z.id),m=C(()=>p.value?z.time:i.value&&i.value.time||0),b=en(C(()=>{var w,f,_,A;return`Day ${(A=(_=(f=(w=i.value)==null?void 0:w.layers)==null?void 0:f.main)==null?void 0:_.day)!=null?A:1}`}));function h(){t("editName",c.value),s.value=!1}return(w,f)=>(y(),E("div",{class:et(["save",{active:r(p)}])},[vu,s.value?(y(),E("div",_u,[g("button",{onClick:h,class:"button"},[o(tt,{display:"Save",direction:r(ke).Left,class:"info"},{default:J(()=>[Au]),_:1},8,["direction"])]),g("button",{onClick:f[5]||(f[5]=_=>s.value=!s.value),class:"button"},[o(tt,{display:"Cancel",direction:r(ke).Left,class:"info"},{default:J(()=>[Su]),_:1},8,["direction"])])])):(y(),E("div",yu,[r(i).error==null&&!u.value?(y(),ee(hu,{key:0,onClick:f[0]||(f[0]=_=>t("export")),class:"button",left:""},{default:J(()=>[o(tt,{display:"Export",direction:r(ke).Left,class:"info"},{default:J(()=>[bu]),_:1},8,["direction"])]),_:1})):U("",!0),r(i).error==null&&!u.value?(y(),E("button",{key:1,onClick:f[1]||(f[1]=_=>t("duplicate")),class:"button"},[o(tt,{display:"Duplicate",direction:r(ke).Left,class:"info"},{default:J(()=>[wu]),_:1},8,["direction"])])):U("",!0),r(i).error==null&&!u.value?(y(),E("button",{key:2,onClick:f[2]||(f[2]=_=>s.value=!s.value),class:"button"},[o(tt,{display:"Edit Name",direction:r(ke).Left,class:"info"},{default:J(()=>[Cu]),_:1},8,["direction"])])):U("",!0),o(mu,{disabled:r(p),onClick:f[3]||(f[3]=_=>t("delete")),onConfirmingChanged:f[4]||(f[4]=_=>u.value=_)},{default:J(()=>[o(tt,{display:"Delete",direction:r(ke).Left,class:"info"},{default:J(()=>[ku]),_:1},8,["direction"])]),_:1},8,["disabled"])])),r(i).error==null&&!s.value?(y(),E("div",Nu,[g("button",{class:"button open",onClick:f[6]||(f[6]=_=>t("open"))},[g("h3",null,ce(r(i).name),1)]),g("span",Eu,"v"+ce(r(i).modVersion),1),Mu,r(m)?(y(),E("div",Iu,"Last played "+ce(r(a).format(r(m))),1)):U("",!0),r(b)?(y(),E("div",Bu,[(y(),ee(je(r(b))))])):U("",!0)])):r(i).error==null&&s.value?(y(),E("div",xu,[o(Gi,{modelValue:c.value,"onUpdate:modelValue":f[7]||(f[7]=_=>c.value=_),class:"editname",onSubmit:h},null,8,["modelValue"])])):(y(),E("div",Pu,[d(" Error: Failed to load save with id "+ce(r(i).id),1),Du,d(ce(r(i).error),1)]))],2))}});var Tu=Ne(Fu,[["__scopeId","data-v-5285ac49"]]);const Tn=e=>(Yt("data-v-3b9991aa"),e=e(),Xt(),e),Uu=Tn(()=>g("h2",null,"Saves Manager",-1)),Ru={class:"modal-footer"},Ou={class:"field"},$u=Tn(()=>g("span",{class:"field-title"},"Create Save",-1)),qu={class:"field-buttons"},Gu={class:"footer"},Vu=Tn(()=>g("div",{style:{"flex-grow":"1"}},null,-1)),Lu=ae({__name:"SavesManager",setup(e,{expose:t}){const l=$(!1),i=$(null);t({open(){l.value=!0}});const a=$(!1),s=$(""),u=$(null);Qt(s,M=>{M?bl(()=>{try{if(M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=il.decompressFromUTF16(M);else{console.warn("Unable to determine preset encoding",M),a.value=!0;return}const S=JSON.parse(M);if(typeof S!="object"){a.value=!0;return}const T=Wl();S.id=T,qt(S),s.value="",a.value=!1,Ye.saves.push(T)}catch{a.value=!0}}):a.value=!1});let c={},p=$(Object.keys(c).reduce((M,S)=>(M.push({label:S.split("/").slice(-1)[0].slice(0,-4),value:c[S]}),M),[]));const m=on({});function b(M){if(m[M]==null){let S=localStorage.getItem(M);if(S==null)m[M]={error:"Save doesn't exist in localStorage",id:M};else if(S==="dW5kZWZpbmVk")m[M]={error:"Save is undefined",id:M};else try{if(S[0]!=="{")if(S[0]==="e")S=decodeURIComponent(escape(atob(S)));else if(S[0]==="\u1BE1")S=il.decompressFromUTF16(S);else return console.warn("Unable to determine preset encoding",S),a.value=!0,m[M]={error:"Unable to determine preset encoding",id:M},m[M];m[M]={...JSON.parse(S),id:M}}catch(T){m[M]={error:T,id:M},console.warn(`SavesManager: Failed to load info about save with id ${M}: ${T} ${S}`)}}return m[M]}Qt(l,M=>{M&&Object.keys(m).forEach(S=>delete m[S])});const h=C(()=>Ye.saves.reduce((M,S)=>(M[S]=b(S),M),{}));function w(M){let S;switch(z.id===M?S=bi(z[Je]):S=JSON.stringify(h.value[M]),Me.exportEncoding){default:console.warn(`Unknown save encoding: ${Me.exportEncoding}. Defaulting to lz`);case"lz":S=il.compressToUTF16(S);break;case"base64":S=btoa(unescape(encodeURIComponent(S)));break;case"plain":break}const T=document.createElement("textarea");T.value=S,document.body.appendChild(T),T.select(),T.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(T)}function f(M){z.id===M&&qt();const S={...h.value[M],id:Wl()};qt(S),Ye.saves.push(S.id)}function _(M){Ye.saves=Ye.saves.filter(S=>S!==M),localStorage.removeItem(M),m[M]=void 0}function A(M){h.value[z.id].time=z.time,qt(),m[z.id]=void 0,yl(h.value[M]),m[M]=void 0}function P(M){if(u.value=M,bl(()=>{u.value=null}),M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=il.decompressFromUTF16(M);else{console.warn("Unable to determine preset encoding",M);return}const S=JSON.parse(M);S.id=Wl(),qt(S),Ye.saves.push(S.id),A(S.id)}function Y(M,S){const T=h.value[M];T&&(T.name=S,z.id===M?(z.name=S,qt()):(qt(T),m[M]=void 0))}return(M,S)=>(y(),ee(bt,{modelValue:l.value,"onUpdate:modelValue":S[4]||(S[4]=T=>l.value=T),ref_key:"modal",ref:i},{header:J(()=>[Uu]),body:J(({shown:T})=>[T?(y(),ee(r(ia),{key:0,list:r(Ye).saves,handle:".handle",itemKey:fe=>fe},{item:J(({element:fe})=>[o(Tu,{save:r(h)[fe],onOpen:Pe=>A(fe),onExport:Pe=>w(fe),onEditName:Pe=>Y(fe,Pe),onDuplicate:Pe=>f(fe),onDelete:Pe=>_(fe)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):U("",!0)]),footer:J(()=>[g("div",Ru,[o(Gi,{modelValue:s.value,"onUpdate:modelValue":S[0]||(S[0]=T=>s.value=T),title:"Import Save",placeholder:"Paste your save here!",class:et({importingFailed:a.value})},null,8,["modelValue","class"]),g("div",Ou,[$u,g("div",qu,[g("button",{class:"button",onClick:S[1]||(S[1]=T=>A(r(Nl)().id))},"New Game"),Object.keys(r(p)).length>0?(y(),ee(Dn,{key:0,options:r(p),modelValue:u.value,"onUpdate:modelValue":S[2]||(S[2]=T=>P(T)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):U("",!0)])]),g("div",Gu,[Vu,g("button",{class:"button modal-default-button",onClick:S[3]||(S[3]=T=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Vi=Ne(Lu,[["__scopeId","data-v-3b9991aa"]]);const xt=e=>(Yt("data-v-8495e562"),e=e(),Xt(),e),Qu=["src","alt"],Hu={key:1,class:"title"},ju=xt(()=>g("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),zu={class:"discord"},Wu={class:"discord-links"},Ku={key:0},Ju=["href"],Yu=xt(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Xu=xt(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Zu={href:"https://forums.moddingtree.com/",target:"_blank"},ed=xt(()=>g("span",{class:"material-icons"},"forum",-1)),td=xt(()=>g("span",{class:"material-icons"},"info",-1)),ld=xt(()=>g("span",{class:"material-icons"},"library_books",-1)),nd=xt(()=>g("span",{class:"material-icons"},"settings",-1)),id=xt(()=>g("span",{class:"material-icons"},"library_books",-1)),ad=xt(()=>g("span",{class:"material-icons"},"settings",-1)),od=xt(()=>g("span",{class:"material-icons"},"info",-1)),sd={href:"https://forums.moddingtree.com/",target:"_blank"},rd=xt(()=>g("span",{class:"material-icons"},"forum",-1)),ud={class:"discord"},dd={class:"discord-links"},cd={key:0},pd=["href"],md=xt(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),gd=xt(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),fd=ae({__name:"Nav",setup(e){const t=$(null),l=$(null),i=$(null),a=$(null),{useHeader:s,banner:u,title:c,discordName:p,discordLink:m,versionNumber:b}=Me;function h(){window.open(m,"mywindow")}return(w,f)=>(y(),E(I,null,[r(s)?(y(),E("div",wl({key:0,class:"nav"},w.$attrs),[r(u)?(y(),E("img",{key:0,src:r(u),class:"banner",alt:r(c)},null,8,Qu)):(y(),E("div",Hu,ce(r(c)),1)),g("div",{onClick:f[0]||(f[0]=_=>{var A;return(A=a.value)==null?void 0:A.open()}),class:"version-container"},[o(tt,{display:"Changelog",direction:r(ke).Down,class:"version"},{default:J(()=>[g("span",null,"v"+ce(r(b)),1)]),_:1},8,["direction"])]),ju,g("div",zu,[g("span",{onClick:h,class:"material-icons"},"discord"),g("ul",Wu,[r(m)?(y(),E("li",Ku,[g("a",{href:r(m),target:"_blank"},ce(r(p)),9,Ju)])):U("",!0),Yu,Xu])]),g("div",null,[g("a",Zu,[o(tt,{display:"Forums",direction:r(ke).Down,yoffset:"5px"},{default:J(()=>[ed]),_:1},8,["direction"])])]),g("div",{onClick:f[1]||(f[1]=_=>{var A;return(A=t.value)==null?void 0:A.open()})},[o(tt,{display:"Info",direction:r(ke).Down,class:"info"},{default:J(()=>[td]),_:1},8,["direction"])]),g("div",{onClick:f[2]||(f[2]=_=>{var A;return(A=l.value)==null?void 0:A.open()})},[o(tt,{display:"Saves",direction:r(ke).Down,xoffset:"-20px"},{default:J(()=>[ld]),_:1},8,["direction"])]),g("div",{onClick:f[3]||(f[3]=_=>{var A;return(A=i.value)==null?void 0:A.open()})},[o(tt,{display:"Options",direction:r(ke).Down,xoffset:"-66px"},{default:J(()=>[nd]),_:1},8,["direction"])])],16)):(y(),E("div",wl({key:1,class:"overlay-nav"},w.$attrs),[g("div",{onClick:f[4]||(f[4]=_=>{var A;return(A=a.value)==null?void 0:A.open()}),class:"version-container"},[o(tt,{display:"Changelog",direction:r(ke).Right,xoffset:"25%",class:"version"},{default:J(()=>[g("span",null,"v"+ce(r(b)),1)]),_:1},8,["direction"])]),g("div",{onClick:f[5]||(f[5]=_=>{var A;return(A=l.value)==null?void 0:A.open()})},[o(tt,{display:"Saves",direction:r(ke).Right},{default:J(()=>[id]),_:1},8,["direction"])]),g("div",{onClick:f[6]||(f[6]=_=>{var A;return(A=i.value)==null?void 0:A.open()})},[o(tt,{display:"Options",direction:r(ke).Right},{default:J(()=>[ad]),_:1},8,["direction"])]),g("div",{onClick:f[7]||(f[7]=_=>{var A;return(A=t.value)==null?void 0:A.open()})},[o(tt,{display:"Info",direction:r(ke).Right},{default:J(()=>[od]),_:1},8,["direction"])]),g("div",null,[g("a",sd,[o(tt,{display:"Forums",direction:r(ke).Right,xoffset:"7px"},{default:J(()=>[rd]),_:1},8,["direction"])])]),g("div",ud,[g("span",{onClick:h,class:"material-icons"},"discord"),g("ul",dd,[r(m)?(y(),E("li",cd,[g("a",{href:r(m),target:"_blank"},ce(r(p)),9,pd)])):U("",!0),md,gd])])],16)),o(Xr,{ref_key:"info",ref:t,changelog:a.value},null,8,["changelog"]),o(Vi,{ref_key:"savesManager",ref:l},null,512),o(lu,{ref_key:"options",ref:i},null,512),o(Dr,{ref_key:"changelog",ref:a},null,512)],64))}});var Li=Ne(fd,[["__scopeId","data-v-8495e562"]]);const Un=e=>(Yt("data-v-248e2ebb"),e=e(),Xt(),e),hd={class:"inner-tab"},vd={key:1},yd=Un(()=>g("br",null,null,-1)),bd=d(" You can help continue the "),wd=Un(()=>g("i",null,"advent",-1)),Cd=d("ure at: "),kd=Un(()=>g("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[g("span",{class:"material-icons info-modal-discord"},"discord"),d(" The Paper Pilot Community ")],-1)),_d=ae({__name:"Game",setup(e){const t=Ht(z,"tabs"),l=C(()=>Object.keys(vt)),i=Me.useHeader,a=ul(Q.loreBody);function s(u){const{display:c,minimized:p,minWidth:m,name:b,color:h,minimizable:w,nodes:f}=u;return{display:c,minimized:p,minWidth:m,name:b,color:h,minimizable:w,nodes:f}}return(u,c)=>(y(),E("div",{class:et(["tabs-container",{useHeader:r(i)}])},[(y(!0),E(I,null,ti(r(t),(p,m)=>{var b,h;return y(),E("div",{key:m,class:et(["tab",r((b=r(vt)[p])==null?void 0:b.classes)]),ref_for:!0,ref:`tab-${m}`,style:nt(r((h=r(vt)[p])==null?void 0:h.style))},[m===0&&!r(i)?(y(),ee(Li,{key:0})):U("",!0),g("div",hd,[r(l).includes(p)?(y(),ee(Ir,wl({key:0},s(r(vt)[p]),{index:m,tab:()=>{var w;return(w=u.$refs[`tab-${m}`])==null?void 0:w[0]}}),null,16,["index","tab"])):(y(),ee(je(p),{key:1,index:m},null,8,["index"]))])],6)}),128)),o(bt,{modelValue:r(Q).showLoreModal.value,"onUpdate:modelValue":c[0]||(c[0]=p=>r(Q).showLoreModal.value=p)},{header:J(()=>[g("h2",null,ce(r(Q).loreTitle.value),1)]),body:J(()=>[r(a)?(y(),ee(je(r(a)),{key:0})):U("",!0),r(Q).loreScene.value!==-1?(y(),E("div",vd,[o(Nr,{day:r(Q).loreScene.value},null,8,["day"]),yd,bd,wd,Cd,kd])):U("",!0)]),_:1},8,["modelValue"])],2))}});var Ad=Ne(_d,[["__scopeId","data-v-248e2ebb"]]);const Vl=e=>(Yt("data-v-4a50ce42"),e=e(),Xt(),e),Sd={class:"game-over-modal-header"},Nd=["src","alt"],Ed={class:"game-over-modal-title"},Md=Vl(()=>g("h2",null,"Congratulations!",-1)),Id={key:0},Bd=Vl(()=>g("br",null,null,-1)),xd=Vl(()=>g("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),Pd=Vl(()=>g("br",null,null,-1)),Dd=["href"],Fd=Vl(()=>g("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),Td=ae({__name:"GameOverScreen",setup(e){const{title:t,logo:l,discordName:i,discordLink:a,versionNumber:s,versionTitle:u}=Me,c=C(()=>sn(z.timePlayed)),p=C(()=>Fn.value&&!z.keepGoing),m=Ht(z,"autosave");function b(){z.keepGoing=!0}function h(){yl(Nl())}return(w,f)=>(y(),ee(bt,{"model-value":r(p)},{header:J(()=>[g("div",Sd,[r(l)?(y(),E("img",{key:0,class:"game-over-modal-logo",src:r(l),alt:r(t)},null,8,Nd)):U("",!0),g("div",Ed,[Md,g("h4",null,"You've beaten "+ce(r(t))+" v"+ce(r(s))+": "+ce(r(u)),1)])])]),body:J(({shown:_})=>[_?(y(),E("div",Id,[g("div",null,"It took you "+ce(r(c))+" to beat the game.",1),Bd,xd,Pd,g("div",null,[g("a",{href:r(a),class:"game-over-modal-discord-link"},[Fd,d(" "+ce(r(i)),1)],8,Dd)]),o(Wt,{title:"Autosave",modelValue:r(m),"onUpdate:modelValue":f[0]||(f[0]=A=>lt(m)?m.value=A:null)},null,8,["modelValue"])])):U("",!0)]),footer:J(()=>[g("div",{class:"game-over-footer"},[g("button",{onClick:b,class:"button"},"Keep Going"),g("button",{onClick:h,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var Ud=Ne(Td,[["__scopeId","data-v-4a50ce42"]]);const cn=e=>(Yt("data-v-3de07c06"),e=e(),Xt(),e),Rd=cn(()=>g("div",{class:"nan-modal-header"},[g("h2",null,"NaN value detected!")],-1)),Od={key:0},$d=cn(()=>g("br",null,null,-1)),qd=["href"],Gd=cn(()=>g("span",{class:"material-icons nan-modal-discord"},"discord",-1)),Vd=cn(()=>g("br",null,null,-1)),Ld={class:"nan-footer"},Qd=ae({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:l}=Me,i=Ht(z,"autosave"),a=Ht(Ze,"hasNaN"),s=$(null),u=C(()=>{var f;return(f=Ze.NaNPath)==null?void 0:f.join(".")}),c=C(()=>{var f;return(f=Ze.NaNPath)==null?void 0:f.slice(-1)[0]}),p=C(()=>Ze.NaNReceiver&&c.value?Ze.NaNReceiver[c.value]:null),m=C({get(){return z.devSpeed===0},set(f){z.devSpeed=f?null:0}});function b(){Ze.NaNReceiver&&c.value&&(Ze.NaNReceiver[c.value]=new n(0),Ze.hasNaN=!1)}function h(){Ze.NaNReceiver&&c.value&&(Ze.NaNReceiver[c.value]=new n(1),Ze.hasNaN=!1)}function w(){Ze.NaNReceiver&&c.value&&(Ze.NaNReceiver[c.value]=new n(NaN),Ze.hasNaN=!1)}return(f,_)=>(y(),E(I,null,[o(bt,wl({modelValue:r(a),"onUpdate:modelValue":_[4]||(_[4]=A=>lt(a)?a.value=A:null)},f.$attrs),{header:J(()=>[Rd]),body:J(()=>[g("div",null,[d(' Attempted to assign "'+ce(r(u))+'" to NaN',1),r(p)?(y(),E("span",Od,ce(" ")+"(previously "+ce(r(ve)(r(p)))+")",1)):U("",!0),d(". Auto-saving has been "+ce(r(i)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),$d,g("div",null,[g("a",{href:r(l),class:"nan-modal-discord-link"},[Gd,d(" "+ce(r(t)),1)],8,qd)]),Vd,o(Wt,{title:"Autosave",modelValue:r(i),"onUpdate:modelValue":_[0]||(_[0]=A=>lt(i)?i.value=A:null)},null,8,["modelValue"]),r(Me).enablePausing?(y(),ee(Wt,{key:0,title:"Pause game",modelValue:r(m),"onUpdate:modelValue":_[1]||(_[1]=A=>lt(m)?m.value=A:null)},null,8,["modelValue"])):U("",!0)]),footer:J(()=>[g("div",Ld,[g("button",{onClick:_[2]||(_[2]=A=>{var P;return(P=s.value)==null?void 0:P.open()}),class:"button"},"Open Saves Manager"),g("button",{onClick:b,class:"button"},"Set to 0"),g("button",{onClick:h,class:"button"},"Set to 1"),r(p)&&r(n).neq(r(p),0)&&r(n).neq(r(p),1)?(y(),E("button",{key:0,onClick:_[3]||(_[3]=A=>a.value=!1),class:"button"}," Set to previous ")):U("",!0),g("button",{onClick:w,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),o(Vi,{ref_key:"savesManager",ref:s},null,512)],64))}});var Hd=Ne(Qd,[["__scopeId","data-v-3de07c06"]]);const jd={key:0,class:"tpsDisplay"},zd={key:0,class:"low"},Wd=ae({__name:"TPS",setup(e){const t=C(()=>n.div(Ze.lastTenTicks.length,Ze.lastTenTicks.reduce((s,u)=>s+u,0))),l=$([]);Bt(()=>{l.value.push(Math.round(t.value.toNumber())),l.value.length>10&&(l.value=l.value.slice(1))});const i=C(()=>l.value.reduce((s,u)=>n.max(s,u),0)),a=C(()=>n.sub(t.value,i.value).gt(1));return(s,u)=>r(t).isNan()?U("",!0):(y(),E("div",jd,[d(" TPS: "+ce(r(se)(r(t)))+" ",1),o(an,{name:"fade"},{default:J(()=>[r(a)?(y(),E("span",zd,ce(r(se)(r(i))),1)):U("",!0)]),_:1})]))}});var Kd=Ne(Wd,[["__scopeId","data-v-46a3ed5b"]]);var Jd=ae({__name:"App",setup(e){const t=Me.useHeader,l=C(()=>$l[Ye.theme].variables),i=Ht(Ye,"showTPS"),a=C(()=>Ae(B(()=>o(I,null,[No.map(re)]))));return(s,u)=>(y(),E(I,null,[g("div",{id:"modal-root",style:nt(r(l))},null,4),g("div",{class:et(["app",{useHeader:r(t)}]),style:nt(r(l))},[r(t)?(y(),ee(Li,{key:0})):U("",!0),o(Ad),r(r(i))?(y(),ee(Kd,{key:1})):U("",!0),o(Ud),o(Hd),(y(),ee(je(r(a))))],6)],64))}});var Yd=Ne(Jd,[["__scopeId","data-v-580927bb"]]);function Xd(e={}){const{immediate:t=!1,onNeedRefresh:l,onOfflineReady:i,onRegistered:a,onRegisterError:s}=e;let u,c;const p=async(m=!0)=>{m&&(u==null||u.addEventListener("controlling",b=>{b.isUpdate&&window.location.reload()})),c&&c.waiting&&await sa(c.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){u=new oa("./sw.js",{scope:"./",type:"classic"}),u.addEventListener("activated",m=>{m.isUpdate||i==null||i()});{const m=()=>{l==null||l()};u.addEventListener("waiting",m),u.addEventListener("externalwaiting",m)}u.register({immediate:t}).then(m=>{c=m,a==null||a(m)}).catch(m=>{s==null||s(m)})}return p}function Zd(e={}){const{immediate:t=!0,onNeedRefresh:l,onOfflineReady:i,onRegistered:a,onRegisterError:s}=e,u=$(!1),c=$(!1);return{updateServiceWorker:Xd({immediate:t,onNeedRefresh(){u.value=!0,l==null||l()},onOfflineReady(){c.value=!0,i==null||i()},onRegistered:a,onRegisterError:s}),offlineReady:c,needRefresh:u}}document.title=Me.title;window.projInfo=Me;if(Me.id==="")throw"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 Co();const{globalBus:e}=await Jl(()=>Promise.resolve().then(function(){return no}),void 0),{startGameLoop:t}=await Jl(()=>import("./gameLoop.ac182093.js"),["assets/gameLoop.ac182093.js","assets/@fontsource.c175eac8.css","assets/vue.92681fcb.js","assets/lz-string.731cedc5.js","assets/@vue.4ce677c2.js","assets/nanoevents.1080beb7.js","assets/is-plain-object.906d88e8.js","assets/vue-next-select.a2bfab1d.js","assets/vue-next-select.9e6f4164.css","assets/vue-toastification.6f567382.js","assets/vue-toastification.4b5f8ac8.css","assets/vuedraggable.7949458c.js","assets/sortablejs.29100d8a.js","assets/vue-textarea-autosize.35804eaf.js","assets/workbox-window.8d14e8b7.js"]),l=window.vue=ea(Yd);e.emit("setupVue",l),l.mount("#app"),bl(()=>{const i=ni(),{updateServiceWorker:a}=Zd({onNeedRefresh(){i.info("New content available, click or reload to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){a()}})},onOfflineReady(){i.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{n as D,Jl as _,Ze as a,Me as b,pr as c,Ue as g,In as l,z as p,Ye as s};