diff --git a/assets/gameLoop.c803c83a.js b/assets/gameLoop.934d6e22.js similarity index 91% rename from assets/gameLoop.c803c83a.js rename to assets/gameLoop.934d6e22.js index f06acb1..512e59c 100644 --- a/assets/gameLoop.c803c83a.js +++ b/assets/gameLoop.934d6e22.js @@ -1 +1 @@ -import{_ as T,s as d,p as e,a as l,l as c,D as m,b as s,g as u}from"./index.ddcf8844.js";import"./vue.92681fcb.js";import{b1 as v}from"./@vue.4ce677c2.js";/* empty css */import"./nanoevents.1080beb7.js";import"./lz-string.731cedc5.js";import"./is-plain-object.906d88e8.js";import"./vue-next-select.a2bfab1d.js";import"./vue-toastification.6f567382.js";import"./vuedraggable.7949458c.js";import"./sortablejs.29100d8a.js";import"./vue-textarea-autosize.35804eaf.js";import"./workbox-window.8d14e8b7.js";let n=null,f=null;function r(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const o=i;if(l.lastTenTicks.push(o),l.lastTenTicks.length>10&&(l.lastTenTicks=l.lastTenTicks.slice(1)),(f==null?void 0:f.value)&&!e.keepGoing||l.hasNaN||(i=Math.max(i,0),e.devSpeed===0))return;if(c.value=!1,e.offlineTime!=null){if(m.gt(e.offlineTime,s.offlineLimit*3600)&&(e.offlineTime=s.offlineLimit*3600),m.gt(e.offlineTime,0)&&e.devSpeed!==0){const p=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-p,i+=p}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||m.lt(e.offlineTime,0))&&(e.offlineTime=null)}if(i=Math.min(i,s.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),m.eq(i,0))return;e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308);let a=o;for(;a>1;)u.emit("update",i/o,1),a--;u.emit("update",i*a/o,a),d.unthrottled?(requestAnimationFrame(r),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(r,50))}async function F(){f=(await T(()=>import("./index.ddcf8844.js").then(function(t){return t.c}),["assets/index.ddcf8844.js","assets/index.734848bb.css","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"])).hasWon,v(f,t=>{t&&u.emit("gameWon")}),d.unthrottled?requestAnimationFrame(r):n=setInterval(r,50)}export{F as startGameLoop}; +import{_ as T,s as d,p as e,a as l,l as c,D as m,b as s,g as u}from"./index.d4328663.js";import"./vue.92681fcb.js";import{b1 as v}from"./@vue.4ce677c2.js";/* empty css */import"./nanoevents.1080beb7.js";import"./lz-string.731cedc5.js";import"./is-plain-object.906d88e8.js";import"./vue-next-select.a2bfab1d.js";import"./vue-toastification.6f567382.js";import"./vuedraggable.7949458c.js";import"./sortablejs.29100d8a.js";import"./vue-textarea-autosize.35804eaf.js";import"./workbox-window.8d14e8b7.js";let n=null,f=null;function r(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const o=i;if(l.lastTenTicks.push(o),l.lastTenTicks.length>10&&(l.lastTenTicks=l.lastTenTicks.slice(1)),(f==null?void 0:f.value)&&!e.keepGoing||l.hasNaN||(i=Math.max(i,0),e.devSpeed===0))return;if(c.value=!1,e.offlineTime!=null){if(m.gt(e.offlineTime,s.offlineLimit*3600)&&(e.offlineTime=s.offlineLimit*3600),m.gt(e.offlineTime,0)&&e.devSpeed!==0){const p=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-p,i+=p}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||m.lt(e.offlineTime,0))&&(e.offlineTime=null)}if(i=Math.min(i,s.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),m.eq(i,0))return;e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308);let a=o;for(;a>1;)u.emit("update",i/o,1),a--;u.emit("update",i*a/o,a),d.unthrottled?(requestAnimationFrame(r),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(r,50))}async function F(){f=(await T(()=>import("./index.d4328663.js").then(function(t){return t.c}),["assets/index.d4328663.js","assets/index.734848bb.css","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"])).hasWon,v(f,t=>{t&&u.emit("gameWon")}),d.unthrottled?requestAnimationFrame(r):n=setInterval(r,50)}export{F as startGameLoop}; diff --git a/assets/index.ddcf8844.js b/assets/index.d4328663.js similarity index 79% rename from assets/index.ddcf8844.js rename to assets/index.d4328663.js index 80ed4f8..d572e0d 100644 --- a/assets/index.ddcf8844.js +++ b/assets/index.d4328663.js @@ -12,8 +12,8 @@ Created at: `,e),await _l(Dl())}}function Dl(){const e=ea(),t=In({id:e});return qt(t),tt.saves.push(e),t}function ea(){let e,t=0;do e=`${$e.id}-${t++}`;while(localStorage.getItem(e));return e}const Ta=L(!1);async function _l(e){console.info("Loading save",e),Ta.value=!0;const{layers:t,removeLayer:l,addLayer:n}=await la(()=>Promise.resolve().then(function(){return Ii}),void 0),{fixOldSave:i,getInitialLayers:s}=await la(()=>Promise.resolve().then(function(){return Ur}),void 0);for(const d in t){const c=t[d];c&&l(c)}s(e).forEach(d=>n(d,e)),e=In(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,$e.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==$e.versionNumber&&i(e.modVersion,e),Object.assign(ae,e),tt.active=ae.id,je.emit("onLoad")}setInterval(()=>{ae.autosave&&qt()},1e3);window.onbeforeunload=()=>{ae.autosave&&qt()};window.save=qt;const Pi=window.hardReset=async()=>{await _l(Dl())},Vl=jl({active:"",saves:[],showTPS:!0,theme:Na.Nordic,unthrottled:!1});Kt(Vl,e=>{const t=gl.compressToUTF16(JSON.stringify(e));localStorage.setItem($e.id,t)},{deep:!0});var tt=window.settings=Vl;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Na.Nordic};je.emit("loadSettings",e),Object.assign(Vl,e),Pi()};function Ti(){try{let e=localStorage.getItem($e.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=gl.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(Vl,t)}je.emit("loadSettings",Vl)}catch{}}const Mn=jl([]);function Fi(e){Mn.push(e)}const Dn=jl([]);function Ui(e){Dn.push(e)}const Ri=jl([]),Oi={class:"table"},Pt=ue({__name:"Column",setup(e){const t=v(()=>Bl[tt.theme].mergeAdjacent);return(l,n)=>(w(),D("div",Oi,[f("div",{class:et(["col",{mergeAdjacent:r(t)}])},[Ht(l.$slots,"default")],2)]))}}),Gi={class:"table"},Pl=ue({__name:"Row",setup(e){const t=v(()=>Bl[tt.theme].mergeAdjacent);return(l,n)=>(w(),D("div",Gi,[f("div",{class:et(["row",{mergeAdjacent:r(t)}])},[Ht(l.$slots,"default")],2)]))}});function Fa(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!so(e)}function De(e,t="span"){return typeof e=="function"?ue({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}`),ue({template:e})):ue({render:()=>({})}):e}function Z(e){if($t(e))return typeof e=="function"?e():De(e);const t=e[Jt];return o(t,e[al](),null)}function We(...e){let t;return o(Pl,null,Fa(t=e.map(Z))?t:{default:()=>[t]})}function Lt(...e){let t;return o(Pt,null,Fa(t=e.map(Z))?t:{default:()=>[t]})}function El(...e){return o("div",{class:"table-grid"},[e.map(t=>o("div",{class:{["row-grid"]:!0,mergeAdjacent:Bl[tt.theme].mergeAdjacent}},[t.map(Z)]))])}function jt(e){if($t(e))return typeof e=="function"?e():typeof e=="string"?o(B,null,[e]):o(e,null,null);const t=e[Jt];return o(t,e[al](),null)}function $i(...e){let t;return o(Pt,null,Fa(t=e.map(jt))?t:{default:()=>[t]})}function $t(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Ql]===!0}function xn(e,t,l){const n=L(null),i=L(void 0);function s(p){n.value||(n.value=setInterval(c,250)),i.value=p,l&&(l.value=!0)}function d(){n.value&&(clearInterval(n.value),n.value=null),l&&(l.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(i.value)}return un(d),{start:s,stop:d,handleHolding:c}}function Qi(e,t){const l=v(()=>e.filter(n=>r(n.visibility)===Ke.Visible&&t(n)));return{firstFeature:v(()=>l.value[0]),collapsedContent:E(()=>Lt(...l.value.slice(1))),hasCollapsedContent:v(()=>l.value.length>1)}}function Tl(e,t="div"){const l=Rt();return Ft(()=>{l.value=De(it(e),t)}),l}function yl(e,t="div"){const l=Rt(null);return Ft(()=>{const n=it(e);l.value=n==null?null:De(n,t)}),l}function qi(e){return v(()=>it(e))}function it(e){return r(r(e))}function q(...e){return e.includes(Object)||e.push(Object),e}const fe=ue({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,l)=>(w(),D("div",{style:ot({width:e.width,height:e.height})},null,4))}});const Vi={},Hi={class:"notif"};function Li(e,t){return w(),D("div",Hi,"!")}var Xa=Pe(Vi,[["render",Li],["__scopeId","data-v-66323fd4"]]);const ca=e=>(rl("data-v-9de19f28"),e=e(),ul(),e),ji={key:0,class:"day feature dontMerge opened"},Wi={class:"date"},Ki=u("Dec"),zi=ca(()=>f("br",null,null,-1)),Ji={class:"date"},Xi=u("Dec"),Yi=ca(()=>f("br",null,null,-1)),Zi=ca(()=>f("div",{class:"doors"},null,-1)),es={class:"date"},ts=u("Dec"),ls=ca(()=>f("br",null,null,-1)),as={key:0,class:"material-icons lock"},ns={key:1,class:"timer"},os={key:2,class:"timer"},is=ue({__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,n=v(()=>l.layer&&a.gte(J.day.value,l.day)&&new Date().getMonth()===11&&new Date().getDate()>=l.day);function i(){n.value&&t("unlockLayer")}return(s,d)=>e.opened.value?(w(),D("div",ji,[o(ra,{appear:"",name:"door"},{default:se(()=>[f("div",{class:"doors",onClick:d[0]||(d[0]=c=>t("openLayer"))},[f("div",Wi,[Ki,zi,u(Se(e.day),1)]),f("div",Ji,[Xi,Yi,u(Se(e.day),1)])])]),_:1}),f("div",{class:"icon",style:ot({backgroundImage:`url(${e.symbol})`})},null,4),f("div",{class:"lore",onClick:d[1]||(d[1]=c=>t("openLore"))},"?"),r(e.shouldNotify)?(w(),ne(Xa,{key:0})):O("",!0)])):(w(),D("div",{key:1,class:et(["day feature dontMerge",{can:r(n),locked:!r(n),canOpen:r(n)}]),onClick:i},[Zi,f("div",es,[ts,ls,u(Se(e.day),1)]),r(n)?O("",!0):(w(),D("div",as,"lock")),r(J).day.value===e.day&&!r(n)?(w(),D("div",ns,Se(r(Ba)(r(J).timeUntilNewDay.value,0)),1)):r(J).day.value===e.day&&e.layer==null?(w(),D("div",os,"NYI")):O("",!0),r(n)?(w(),ne(Xa,{key:3})):O("",!0)],2))}});var ss=Pe(is,[["__scopeId","data-v-9de19f28"]]);const rs=ue({__name:"Collapsible",props:{collapsed:null,display:null,content:null},setup(e){const t=e,l=Tl(zt(t,"display")),n=Tl(zt(t,"content"));return(i,s)=>(w(),ne(Pt,{class:"collapsible-container"},{default:se(()=>[f("button",{onClick:s[0]||(s[0]=d=>e.collapsed.value=!e.collapsed.value),class:"feature collapsible-toggle"},[(w(),ne(ze(r(l))))]),e.collapsed.value?O("",!0):(w(),ne(ze(r(n)),{key:0}))]),_:1}))}});var us=Pe(rs,[["__scopeId","data-v-a72c16aa"]]);const ds={key:0},cs={key:0,class:"mark star"},ps=["src"],ms=ue({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,l)=>e.mark?(w(),D("div",ds,[e.mark===!0?(w(),D("div",cs)):(w(),D("img",{key:1,class:"mark",src:e.mark},null,8,ps))])):O("",!0)}});var pa=Pe(ms,[["__scopeId","data-v-2207999f"]]);const gs=ue({__name:"Node",props:{id:null},setup(e){const l=pt(e),n=ta(Ia,()=>{}),i=ta(Ma,()=>{}),s=Rt(null),d=v(()=>s.value&&s.value.parentElement);return Kt([d,l.id],([c,p],[m,y])=>{m&&i(r(y)),c&&n(p,c)}),un(()=>i(r(l.id))),(c,p)=>(w(),D("div",{class:"node",ref_key:"node",ref:s},null,512))}});var Wl=Pe(gs,[["__scopeId","data-v-a48cb382"]]);const vs=ue({props:{progress:{type:q(String,Object,Number),required:!0},width:{type:q(Number),required:!0},height:{type:q(Number),required:!0},direction:{type:q(String),required:!0},display:q(Object,String,Function),visibility:{type:q(Number),required:!0},style:q(Object,String,Array),classes:q(Object),borderStyle:q(Object,String,Array),textStyle:q(Object,String,Array),baseStyle:q(Object,String,Array),fillStyle:q(Object,String,Array),mark:q(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:pa,Node:Wl},setup(e){const{progress:t,width:l,height:n,direction:i,display:s}=pt(e),d=v(()=>{let m=t.value instanceof a?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(m,0),1))*100}),c=v(()=>{const m={width:it(l)+.5+"px",height:it(n)+.5+"px"};switch(r(i)){case Be.Up:m.clipPath=`inset(${d.value}% -2px -2px -2px)`,m.width=it(l)+2+"px";break;case Be.Down:m.clipPath=`inset(-2px -2px ${d.value}% -2px)`,m.width=it(l)+2+"px";break;case Be.Right:m.clipPath=`inset(-2px ${d.value}% -2px -2px)`;break;case Be.Left:m.clipPath=`inset(-2px -2px -2px ${d.value} + '%)`;break;case Be.Default:m.clipPath="inset(-2px 50% -2px -2px)";break}return m}),p=yl(s);return{normalizedProgress:d,barStyle:c,component:p,unref:r,Visibility:Ke}}});function fs(e,t,l,n,i,s){var p,m,y,h,b,g,_;const d=ll("MarkNode"),c=ll("Node");return e.unref(e.visibility)!==e.Visibility.None?(w(),D("div",{key:0,style:ot([{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)})},[f("div",{class:"overlayTextContainer border",style:ot([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(m=e.unref(e.borderStyle))!=null?m:{}])},[e.component?(w(),D("span",{key:0,class:"overlayText",style:ot(e.unref(e.textStyle))},[(w(),ne(ze(e.component)))],4)):O("",!0)],4),f("div",{class:"border",style:ot([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(y=e.unref(e.style))!=null?y:{},(h=e.unref(e.baseStyle))!=null?h:{},(b=e.unref(e.borderStyle))!=null?b:{}])},[f("div",{class:"fill",style:ot([e.barStyle,(g=e.unref(e.style))!=null?g:{},(_=e.unref(e.fillStyle))!=null?_:{}])},null,4)],4),o(d,{mark:e.unref(e.mark)},null,8,["mark"]),o(c,{id:e.id},null,8,["id"])],6)):O("",!0)}var hs=Pe(vs,[["render",fs],["__scopeId","data-v-730cc7a0"]]);const ys=Symbol("Bar");function Wt(e){return kt(()=>{const t=e();return t.id=bl("bar-"),t.type=ys,t[Jt]=hs,Q(t,"visibility"),vt(t,"visibility",Ke.Visible),Q(t,"width"),Q(t,"height"),Q(t,"direction"),Q(t,"style"),Q(t,"classes"),Q(t,"borderStyle"),Q(t,"baseStyle"),Q(t,"textStyle"),Q(t,"fillStyle"),Q(t,"progress"),Q(t,"display"),Q(t,"mark"),t[al]=function(){const{progress:l,width:n,height:i,direction:s,display:d,visibility:c,style:p,classes:m,borderStyle:y,textStyle:h,baseStyle:b,fillStyle:g,mark:_,id:S}=this;return{progress:l,width:n,height:i,direction:s,display:d,visibility:c,style:r(p),classes:m,borderStyle:y,textStyle:h,baseStyle:b,fillStyle:g,mark:_,id:S}},t})}var bs=ue({props:{display:{type:q(Object,String,Function),required:!0},visibility:{type:q(Number),required:!0},style:q(Object,String,Array),classes:q(Object),onClick:Function,onHold:Function,canClick:{type:q(Boolean),required:!0},small:Boolean,mark:q(Boolean,String),id:{type:String,required:!0},isHolding:Object},components:{Node:Wl,MarkNode:pa},setup(e){const{display:t,onClick:l,onHold:n}=pt(e),i=Rt("");Ft(()=>{const c=it(t);if(c==null){i.value="";return}if($t(c)){i.value=De(c);return}const p=De(c.title||"","h3"),m=De(c.description,"div");i.value=De(E(()=>o("span",null,[c.title?o("div",null,[o(p,null,null)]):null,o(m,null,null)])))});const{start:s,stop:d}=xn(l,n,e.isHolding);return{start:s,stop:d,comp:i,Visibility:Ke,unref:r}}});function ws(e,t,l,n,i,s){var p;const d=ll("MarkNode"),c=ll("Node");return e.unref(e.visibility)!==e.Visibility.None?(w(),D("button",{key:0,style:ot([{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)?(w(),ne(ze(e.unref(e.comp)),{key:0})):O("",!0),o(d,{mark:e.unref(e.mark)},null,8,["mark"]),o(c,{id:e.id},null,8,["id"])],38)):O("",!0)}var Pn=Pe(bs,[["render",ws],["__scopeId","data-v-8cedd7da"]]);const As=Symbol("Clickable");function Tt(e){return kt(()=>{var l;const t=(l=e==null?void 0:e())!=null?l:{};if(t.id=bl("clickable-"),t.type=As,t[Jt]=Pn,t.isHolding=L(!1),Q(t,"visibility"),vt(t,"visibility",Ke.Visible),Q(t,"canClick"),vt(t,"canClick",!0),Q(t,"classes"),Q(t,"style"),Q(t,"mark"),Q(t,"display"),t.onClick){const n=t.onClick.bind(t);t.onClick=function(i){r(t.canClick)&&n(i)}}if(t.onHold){const n=t.onHold.bind(t);t.onHold=function(){r(t.canClick)&&n()}}return t[al]=function(){const{display:n,visibility:i,style:s,classes:d,onClick:c,onHold:p,isHolding:m,canClick:y,small:h,mark:b,id:g}=this;return{display:n,visibility:i,style:r(s),classes:d,onClick:c,onHold:p,isHolding:m,canClick:y,small:h,mark:b,id:g}},t})}function ct(e,t="points",l=0,n=void 0){const i=gt(e)?e:_e(e);if(i.displayName=t,i.precision=l,i.small=n,!gt(e)){const s=i[ql];s.displayName=t,s.precision=l,s.small=n}return i}function Ya(e){const t=_e(e.value);return Kt(e,l=>{Ta.value||a.gt(l,t.value)&&(t.value=l)}),t}function Cs(e){const t=_e(e.value);return Kt(e,(l,n)=>{Ta.value||a.gt(l,n)&&(t.value=a.add(t.value,a.sub(l,n)))}),t}new a("10^^8");new a("1e100");function Kl(e,t){const l=t!=null?t:e.value;return a.eq(e.precision,0)?ee(e.small?l:a.floor(l)):V(l,e.precision,e.small)}const ks=["x1","y1","x2","y2"],_s=ue({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const l=pt(e),n=v(()=>{const s=l.startNode.value.rect,d=l.boundingRect.value,c=d?{x:s.x+s.width/2-d.x,y:s.y+s.height/2-d.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}),i=v(()=>{const s=l.endNode.value.rect,d=l.boundingRect.value,c=d?{x:s.x+s.width/2-d.x,y:s.y+s.height/2-d.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,d)=>(w(),D("line",hl({"stroke-width":"15px",stroke:"white"},e.link,{x1:r(n).x,y1:r(n).y,x2:r(i).x,y2:r(i).y}),null,16,ks))}});const Ss=ue({__name:"Links",props:{links:null},setup(e){var p;const l=zt(e,"links"),n=L(null),i=ta(Da,L({})),s=ta(xa,L(void 0)),d=L((p=n.value)==null?void 0:p.getBoundingClientRect());Kt(s,()=>{var m;return d.value=(m=n.value)==null?void 0:m.getBoundingClientRect()}),ia(()=>{var m;return d.value=(m=n.value)==null?void 0:m.getBoundingClientRect()});const c=v(()=>{var y,h;const m=i.value;return(h=(y=l.value)==null?void 0:y.filter(b=>{var g,_;return((g=m[b.startNode.id])==null?void 0:g.rect)&&((_=m[b.startNode.id])==null?void 0:_.rect)}))!=null?h:[]});return(m,y)=>(w(),D(B,null,[r(c)?(w(),D("svg",ro(hl({key:0},m.$attrs)),[(w(!0),D(B,null,Ea(r(c),(h,b)=>(w(),ne(_s,{key:b,link:h,boundingRect:d.value,startNode:r(i)[h.startNode.id],endNode:r(i)[h.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):O("",!0),f("div",{ref_key:"resizeListener",ref:n,class:"resize-listener"},null,512)],64))}});var Es=Pe(Ss,[["__scopeId","data-v-063f6d6b"]]);ue({props:{nodes:{type:q(Array),required:!0},leftSideNodes:q(Array),rightSideNodes:q(Array),branches:q(Array)},components:{Links:Es},setup(e){const{nodes:t,leftSideNodes:l,rightSideNodes:n}=pt(e),i=Rt();Ft(()=>{const c=it(t);i.value=De(E(()=>o(B,null,[c.map(p=>o("span",{class:"row tree-row",style:"margin: 50px auto;"},[p.map(jt)]))])))});const s=Rt();Ft(()=>{const c=it(l);s.value=c?De(E(()=>o("span",{class:"left-side-nodes small"},[c.map(jt)]))):""});const d=Rt();return Ft(()=>{const c=it(n);d.value=c?De(E(()=>o("span",{class:"side-nodes small"},[c.map(jt)]))):""}),{unref:r,nodesComp:i,leftNodesComp:s,rightNodesComp:d}}});ue({props:{display:q(Object,String,Function),visibility:{type:q(Number),required:!0},style:q(String,Object,Array),classes:q(Object),onClick:Function,onHold:Function,color:q(String),glowColor:q(String),canClick:{type:q(Boolean),required:!0},mark:q(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:pa,Node:Wl},setup(e){const{onClick:t,onHold:l,display:n}=pt(e),i=yl(n),{start:s,stop:d}=xn(t,l);return{start:s,stop:d,comp:i,unref:r,Visibility:Ke,isCoercableComponent:$t}}});function nl(e){const t=[],l={};let n=!1;function i(){return n||(t.push(...e()),l.base=t.map(c=>ht(c.base)),l.baseText=t.map(c=>ht(c.baseText)),l.visible=t.map(c=>ht(c.visible)),n=!0),t}const s=_e({});return[E(()=>{const c=i();let p=!0;const m=c.map((y,h)=>{var S,x,W;if(r(l.visible[h])===!1)return null;const b=o("h3",{onClick:()=>s.value[h]=!s.value[h],style:"cursor: pointer"},[o("span",{class:"modifier-toggle"+(r(s.value[h])?" collapsed":"")},[u("\u25BC")]),y.title,y.subtitle?o("span",{class:"subtitle"},[u(" ("),y.subtitle,u(")")]):null]),g=r(s.value[h])?null:o(B,null,[o("div",{class:"modifier-container"},[o("span",{class:"modifier-description"},[jt((S=r(l.baseText[h]))!=null?S:"Base")]),o("span",{class:"modifier-amount"},[V((x=r(l.base[h]))!=null?x:1),y.unit])]),jt(r(y.modifier.description))]),_=!p;return p=!1,o(B,null,[_?o("br",null,null):null,o("div",null,[b,o("br",null,null),g,o("hr",null,null),o("div",{class:"modifier-container"},[o("span",{class:"modifier-description"},[u("Total")]),o("span",{class:"modifier-amount"},[V(y.modifier.apply((W=r(l.base[h]))!=null?W:1)),y.unit])])])])});return o(B,null,[m])}),s]}function Hl(e){const t=Object.values(e).reverse(),l=_e(!0),n=v(()=>t.filter(p=>p.earned.value===!1)),{firstFeature:i,collapsedContent:s,hasCollapsedContent:d}=Qi(t,p=>p.earned.value),c=E(()=>{const p=[...n.value];return i.value&&p.push(i.value),$i(...p,E(()=>sa(o(us,{collapsed:l,content:s,display:l.value?"Show other completed milestones":"Hide other completed milestones"},null),[[rn,r(d)]])))});return{collapseMilestones:l,display:c}}function dl(e){const t=e.ignoreTotal?e.resource:Cs(e.resource),l=()=>{var c,p;if(J.day.value!==e.day)return 1;let s=a.add(t.value,1),d=e.goal;return((p=(c=e.usingLog)==null?void 0:c.value)!=null?p:ae.usingLog)&&(s=s.log10(),d=a.log10(d)),a.div(s,d)},n=Wt(()=>({direction:Be.Right,width:600,height:25,fillStyle:{backgroundColor:e.color},textStyle:e.textColor?{color:e.textColor}:void 0,progress:l,display:E(()=>J.day.value===e.day?o(B,null,[me(t.value),u("/"),me(e.goal)]):"")})),i=E(()=>o(B,null,[o("div",null,[J.day.value===e.day?o(B,null,[u("Reach "),me(e.goal),u(" "),e.ignoreTotal?"":"total ",e.resource.displayName,u(" to complete the day")]):o(B,null,[e.name,u(" Complete!")]),e.modal?o(B,null,[" ",u("-")," ",o("button",{class:"button",style:"display: inline-block;",onClick:()=>e.modal.show.value=!0},[u("Check Modifiers")])]):void 0]),Z(n),e.modal?Z(e.modal.display):void 0]));return Ft(()=>{J.day.value===e.day&&a.gte(t.value,e.goal)&&J.completeDay()}),{total:t,trackerDisplay:i}}function Vt(e){var d;const t=(d=e.style)!=null?d:{minHeight:"20px",width:"40px",color:"var(--foreground)"},l=Tt(()=>({display:"0",style:t,canClick(){return a.gt(e.active.value,0)},onClick(){e.active.value=0}})),n=Tt(()=>({display:"-",style:t,canClick(){return a.gt(e.active.value,0)},onClick(){e.active.value=a.sub(e.active.value,1)}})),i=Tt(()=>({display:"+",style:t,canClick(){return a.lt(e.active.value,e.buyable.amount.value)},onClick(){e.active.value=a.add(e.active.value,1)}})),s=Tt(()=>({display:"Max",style:t,canClick(){return a.lt(e.active.value,e.buyable.amount.value)},onClick(){e.active.value=e.buyable.amount.value}}));return{min:l,remove:n,add:i,max:s}}const Bs=Symbol("Buyable");function Me(e){const t=_e(0);return kt(()=>{var s,d,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=bl("buyable-"),l.type=Bs,l[Jt]=Pn,l.amount=t,l.amount[fl]=(s=l.initialValue)!=null?s:0,l.canAfford=v(()=>{const p=l,m=r(p.cost);return p.resource!=null&&m!=null&&a.gte(p.resource.value,m)}),l.canPurchase==null&&(l.canPurchase=v(()=>r(l.visibility)===Ke.Visible&&r(l.canAfford)&&a.lt(l.amount.value,r(l.purchaseLimit)))),l.maxed=v(()=>a.gte(l.amount.value,r(l.purchaseLimit))),Q(l,"classes");const n=l.classes;l.classes=v(()=>{const p=r(n)||{};return l.maxed.value&&(p.bought=!0),p}),Q(l,"canPurchase"),l.canClick=l.canPurchase,l.onClick=l.purchase=(c=(d=l.onClick)!=null?d:l.purchase)!=null?c:function(){var y;const p=l;if(!r(p.canPurchase))return;const m=r(p.cost);p.cost!=null&&p.resource!=null&&(p.resource.value=a.sub(p.resource.value,m),p.amount.value=a.add(p.amount.value,1)),(y=p.onPurchase)==null||y.call(p,m)},Q(l,"display");const i=l.display;return l.display=E(()=>{const p=r(i);if($t(p)){const m=De(p);return o(m,null,null)}if(p!=null&&l.cost!=null&&l.resource!=null){const m=l,y=De(p.title||"","h3"),h=De(p.description||""),b=De(p.effectDisplay||"");return o("span",null,[p.title?o("div",null,[o(y,null,null)]):null,p.description?o(h,null,null):null,p.showAmount===!1?null:o("div",null,[o("br",null,null),r(m.purchaseLimit)===a.dInf?o(B,null,[u("Amount: "),ee(m.amount.value)]):o(B,null,[u("Amount: "),ee(m.amount.value),u(" /")," ",ee(r(m.purchaseLimit))])]),p.effectDisplay?o("div",null,[o("br",null,null),u("Currently: "),o(b,null,null)]):null,m.cost&&!m.maxed.value?o("div",null,[u("Cost: "),V(r(m.cost)||0)," ",l.resource.displayName]):null])}return""}),Q(l,"visibility"),vt(l,"visibility",Ke.Visible),Q(l,"cost"),Q(l,"resource"),Q(l,"purchaseLimit"),vt(l,"purchaseLimit",a.dInf),Q(l,"style"),Q(l,"mark"),Q(l,"small"),l[al]=function(){const{display:p,visibility:m,style:y,classes:h,onClick:b,canClick:g,small:_,mark:S,id:x}=this;return{display:p,visibility:m,style:r(y),classes:h,onClick:b,canClick:g,small:_,mark:S,id:x}},l})}const ma=ua({}),Ua=Symbol("Hotkey");function xl(e){return kt(()=>{const t=e();return t.type=Ua,Q(t,"enabled"),vt(t,"enabled",!0),Q(t,"description"),t})}je.on("addLayer",e=>{An(e,Ua).forEach(t=>{ma[t.key]=t})});je.on("removeLayer",e=>{An(e,Ua).forEach(t=>{ma[t.key]=void 0})});document.onkeydown=function(e){var n;if(((n=e.target)==null?void 0:n.tagName)==="INPUT"||$a.value&&!ae.keepGoing)return;let t=e.key;e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const l=ma[t];l&&r(l.enabled)&&(e.preventDefault(),l.onPress())};Ui(E(()=>{const e=Object.values(ma).filter(t=>r(t==null?void 0:t.enabled));return e.length===0?"":o("div",null,[o("br",null,null),o("h4",null,[u("Hotkeys")]),e.map(t=>o("div",null,[t==null?void 0:t.key,u(": "),t==null?void 0:t.description]))])}));const Ns=ue({__name:"Sticky",setup(e){const t=L("0"),l=new ResizeObserver(i),n=Rt(null);function i(){let s=n.value;if(s==null)return;let d=0;for(;s.previousSibling;){const c=s.previousSibling;c.dataset&&"vSticky"in c.dataset&&(d+=c.offsetHeight),s=c}t.value=d+"px"}return Sl(i),document.fonts.ready.then(i),ia(()=>{var d;const s=(d=n.value)==null?void 0:d.parentElement;s&&l.observe(s)}),(s,d)=>(w(),D("div",{class:"sticky",style:ot({top:t.value}),ref_key:"element",ref:n,"data-v-sticky":""},[Ht(s.$slots,"default",{},void 0,!0)],4))}});var Tn=Pe(Ns,[["__scopeId","data-v-cccac690"]]);const Za=ue({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,l=v(()=>Kl(t.resource));return(n,i)=>(w(),D("h2",{style:ot({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},Se(r(l)),5))}});const Is={class:"main-display"},Ms={key:0},Ds={key:1},xs=u(", "),Ps={key:2},Ts=f("br",null,null,-1),Fs={class:"main-display"},Us={key:0},Rs={key:1},Os=u(", "),Gs={key:2},$s=f("br",null,null,-1),It=ue({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null,productionDisplay:null,sticky:{type:Boolean,default:!0}},setup(e){const l=pt(e),n=L(null),i=yl(l.effectDisplay),s=L(null),d=yl(l.productionDisplay),c=v(()=>a.lt(l.resource.value,"1e1000"));return(p,m)=>{var y,h;return e.sticky?(w(),ne(Tn,{key:0},{default:se(()=>{var b,g,_,S;return[f("div",{class:et(["main-display-container",(b=e.classes)!=null?b:{}]),style:ot([{"min-height":`${((_=(g=n.value)==null?void 0:g.$el.clientHeight)!=null?_:0)+50}px`},(S=e.style)!=null?S:{}])},[f("div",Is,[r(c)?(w(),D("span",Ms,"You have ")):O("",!0),o(Za,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),u(" "+Se(e.resource.displayName),1),r(i)?(w(),D("span",Ds,[xs,(w(),ne(ze(r(i)),{ref_key:"effectRef",ref:n},null,512))])):O("",!0),r(d)?(w(),D("span",Ps,[Ts,(w(),ne(ze(r(d)),{ref_key:"productionRef",ref:s},null,512))])):O("",!0)])],6)]}),_:1})):(w(),D("div",{key:1,class:et(["main-display-container",(y=e.classes)!=null?y:{}]),style:ot([{"min-height":"50px"},(h=e.style)!=null?h:{}])},[f("div",Fs,[r(c)?(w(),D("span",Us,"You have ")):O("",!0),o(Za,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),u(" "+Se(e.resource.displayName),1),r(i)?(w(),D("span",Rs,[Os,(w(),ne(ze(r(i)),{ref_key:"effectRef",ref:n},null,512))])):O("",!0),r(d)?(w(),D("span",Gs,[$s,(w(),ne(ze(r(d)),{ref_key:"productionRef",ref:s},null,512))])):O("",!0)])],6))}}});var Qs=ue({props:{display:{type:q(String,Object,Function),required:!0},visibility:{type:q(Number),required:!0},style:q(String,Object,Array),classes:q(Object),resource:Object,cost:q(String,Object,Number),canPurchase:{type:q(Boolean),required:!0},bought:{type:q(Boolean),required:!0},mark:q(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:Wl,MarkNode:pa},setup(e){const{display:t,cost:l}=pt(e),n=Rt("");return Ft(()=>{const i=it(t);if(i==null){n.value="";return}if($t(i)){n.value=De(i);return}const s=it(l),d=De(i.title||"","h3"),c=De(i.description,"div"),p=De(i.effectDisplay||"");n.value=De(E(()=>{var m;return o("span",null,[i.title?o("div",null,[o(d,null,null)]):null,o(c,null,null),i.effectDisplay?o("div",null,[u("Currently: "),o(p,null,null)]):null,e.resource!=null&&i.showCost!==!1?o(B,null,[o("br",null,null),u("Cost: "),e.resource&&Kl(e.resource,s)," ",(m=e.resource)==null?void 0:m.displayName]):null])}))}),{component:n,unref:r,Visibility:Ke}}});const qs=["disabled"];function Vs(e,t,l,n,i,s){var p;const d=ll("MarkNode"),c=ll("Node");return e.unref(e.visibility)!==e.Visibility.None?(w(),D("button",{key:0,style:ot([{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)?(w(),ne(ze(e.unref(e.component)),{key:0})):O("",!0),o(d,{mark:e.unref(e.mark)},null,8,["mark"]),o(c,{id:e.id},null,8,["id"])],14,qs)):O("",!0)}var Hs=Pe(Qs,[["render",Vs],["__scopeId","data-v-7f411ac8"]]);const Ls=Symbol("Upgrade");function G(e){const t=_e(!1);return kt(()=>{const l=e();return l.id=bl("upgrade-"),l.type=Ls,l[Jt]=Hs,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=v(()=>{const n=l;return n.resource!=null&&n.cost!=null&&a.gte(n.resource.value,r(n.cost))}):Q(l,"canAfford"),l.canPurchase=v(()=>r(l.visibility)===Ke.Visible&&r(l.canAfford)&&!r(l.bought)),l.purchase=function(){var i;const n=l;!r(n.canPurchase)||(n.resource!=null&&n.cost!=null&&(n.resource.value=a.sub(n.resource.value,r(n.cost))),t.value=!0,(i=n.onPurchase)==null||i.call(n))},Q(l,"visibility"),vt(l,"visibility",Ke.Visible),Q(l,"classes"),Q(l,"style"),Q(l,"display"),Q(l,"mark"),Q(l,"cost"),Q(l,"resource"),l[al]=function(){const{display:n,visibility:i,style:s,classes:d,resource:c,cost:p,canPurchase:m,bought:y,mark:h,id:b,purchase:g}=this;return{display:n,visibility:i,style:r(s),classes:d,resource:c,cost:p,canPurchase:m,bought:y,mark:h,id:b,purchase:g}},l})}function ie(e){return kt(()=>{const{addend:t,description:l,enabled:n}=e(),i=ht(t),s=ht(l),d=n==null?void 0:ht(n);return{apply:c=>a.add(c,r(i)),revert:c=>a.sub(c,r(i)),enabled:d,description:l==null?void 0:E(()=>o("div",{class:"modifier-container"},[r(s)?o("span",{class:"modifier-description"},[jt(r(s))]):null,o("span",{class:"modifier-amount"},[a.gte(r(i),0)?"+":"",V(r(i))])]))}})}function C(e){return kt(()=>{const{multiplier:t,description:l,enabled:n}=e(),i=ht(t),s=ht(l),d=n==null?void 0:ht(n);return{apply:c=>a.times(c,r(i)),revert:c=>a.div(c,r(i)),enabled:d,description:l==null?void 0:E(()=>o("div",{class:"modifier-container"},[r(s)?o("span",{class:"modifier-description"},[jt(r(s))]):null,o("span",{class:"modifier-amount"},[u("\xD7"),V(r(i))])]))}})}function Fn(e){return kt(()=>{const{exponent:t,description:l,enabled:n,supportLowNumbers:i}=e(),s=ht(t),d=ht(l),c=n==null?void 0:ht(n);return{apply:p=>{let m=p;return i&&(m=a.add(m,1)),m=a.pow(m,r(s)),i&&(m=a.sub(m,1)),m},revert:p=>{let m=p;return i&&(m=a.add(m,1)),m=a.root(m,r(s)),i&&(m=a.sub(m,1)),m},enabled:c,description:l==null?void 0:E(()=>o("div",{class:"modifier-container"},[r(d)?o("span",{class:"modifier-description"},[jt(r(d)),i?" (+1 effective)":null]):null,o("span",{class:"modifier-amount"},[u("^"),V(r(s))])]))}})}function Y(e){return kt(()=>{const t=e();return{apply:l=>t.filter(n=>r(n.enabled)!==!1).reduce((n,i)=>i.apply(n),l),revert:t.every(l=>l.revert!=null)?l=>t.filter(n=>r(n.enabled)!==!1).reduceRight((n,i)=>i.revert(n),l):void 0,enabled:v(()=>t.filter(l=>r(l.enabled)!==!1).length>0),description:E(()=>o(B,null,[t.filter(l=>r(l.enabled)!==!1).map(l=>r(l.description)).filter(l=>l).map(jt)]))}})}function Un(e){return kt(()=>{const t=e();return t.currentGain==null&&(t.currentGain=v(()=>{let l=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return l=a.floor(l).max(0),r(t.buyMax)||(l=l.min(1)),l})),t.actualGain==null&&(t.actualGain=t.currentGain),t.currentAt==null&&(t.currentAt=v(()=>{let l=t.scaling.currentAt(t);return t.roundUpCost&&(l=a.ceil(l)),l})),t.nextAt==null&&(t.nextAt=v(()=>{let l=t.scaling.nextAt(t);return t.roundUpCost&&(l=a.ceil(l)),l})),t.convert==null&&(t.convert=function(){var i;const l=r(t.currentGain),n=r(t.currentAt);t.gainResource.value=a.add(t.gainResource.value,l),t.spend(l,n),(i=t.onConvert)==null||i.call(t,l)}),t.spend==null&&(t.spend=function(){t.baseResource.value=0}),Q(t,"currentGain"),Q(t,"actualGain"),Q(t,"currentAt"),Q(t,"nextAt"),Q(t,"buyMax"),vt(t,"buyMax",!0),Q(t,"roundUpCost"),vt(t,"roundUpCost",!0),t})}function Ra(e,t){const l=ht(e),n=ht(t);return{currentGain(i){let s=r(i.baseResource.value);if(i.costModifier&&(s=i.costModifier.apply(s)),a.lt(s,r(l)))return 0;const d=a.div(s,r(l)).pow(r(n));return d.isNan()?new a(0):d},currentAt(i){let s=r(i.currentGain);return i.gainModifier&&(s=i.gainModifier.revert(s)),s=a.max(0,s).root(r(n)).times(r(l)),i.costModifier&&(s=i.costModifier.revert(s)),s},nextAt(i){let s=a.add(r(i.currentGain),1).floor();return i.gainModifier&&(s=i.gainModifier.revert(s)),s=a.max(0,s).root(r(n)).times(r(l)).max(r(l)),i.costModifier&&(s=i.costModifier.revert(s)),s}}}function Rn(e){return Un(e)}function js(e){return Un(()=>{const t=e();return vt(t,"buyMax",!1),t.currentGain==null&&(t.currentGain=v(()=>{let l=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return l=a.floor(l).max(t.gainResource.value),r(t.buyMax)||(l=l.min(a.add(t.gainResource.value,1))),l})),t.actualGain==null&&(t.actualGain=v(()=>{let l=a.sub(a.floor(t.scaling.currentGain(t)),t.gainResource.value).max(0);return r(t.buyMax)||(l=l.min(1)),l})),vt(t,"convert",function(){var i;const l=r(t.actualGain),n=r(t.currentAt);t.gainResource.value=t.gainModifier?t.gainModifier.apply(r(t.currentGain)):r(t.currentGain),t.spend(l,n),(i=t.onConvert)==null||i.call(t,l)}),t})}const Ws={},Ks={style:{"white-space":"nowrap"}},zs=f("span",{style:{"font-size":"larger","font-family":"initial"}},"\u221A",-1),Js={style:{"text-decoration":"overline"}};function Xs(e,t){return w(),D("span",Ks,[zs,f("span",Js,[Ht(e.$slots,"default")])])}var Oa=Pe(Ws,[["render",Xs]]);const Ys={class:"field"},Zs={key:0,class:"field-title"},Ga=ue({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var d;const l=e,n=yl(zt(l,"title"),"span"),i=L((d=l.options.find(c=>c.value===l.modelValue))!=null?d:null);Kt(zt(l,"modelValue"),c=>{var p;it(i)!==c&&(i.value=(p=l.options.find(m=>m.value===c))!=null?p:null)});function s(c){t("update:modelValue",c.value)}return(c,p)=>(w(),D("div",Ys,[r(n)?(w(),D("span",Zs,[(w(),ne(ze(r(n))))])):O("",!0),o(r(go),{options:e.options,modelValue:i.value,"onUpdate:modelValue":[p[0]||(p[0]=m=>i.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 er=ue({props:{visibility:{type:q(Number),required:!0},display:{type:q(String,Object,Function),required:!0},style:q(String,Object,Array),classes:q(Object),earned:{type:q(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:Wl},setup(e){const{display:t}=pt(e),l=Rt("");return Ft(()=>{const n=it(t);if(n==null){l.value="";return}if($t(n)){l.value=De(n);return}const i=De(n.requirement,"h3"),s=De(n.effectDisplay||"","b"),d=De(n.optionsDisplay||"","span");l.value=De(E(()=>o("span",null,[o(i,null,null),n.effectDisplay?o("div",null,[o(s,null,null)]):null,n.optionsDisplay?o("div",{class:"equal-spaced"},[o(d,null,null)]):null])))}),{comp:l,unref:r,Visibility:Ke}}});function tr(e,t,l,n,i,s){var c;const d=ll("Node");return e.unref(e.visibility)!==e.Visibility.None?(w(),D("div",{key:0,style:ot([{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)})},[(w(),ne(ze(e.unref(e.comp)))),o(d,{id:e.id},null,8,["id"])],6)):O("",!0)}var lr=Pe(er,[["render",tr],["__scopeId","data-v-f4e8794e"]]);je.on("setupVue",e=>e.use(vo));function ar(e="white",t="8px"){return{transform:"scale(1.05, 1.05)",borderColor:"rgba(0, 0, 0, 0.125)",boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 ${t} ${e}`,zIndex:1}}const en=cn(),nr=Symbol("Milestone");let vl;(function(e){e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none"})(vl||(vl={}));function ye(e){const t=_e(!1);return kt(()=>{var i;const l=(i=e==null?void 0:e())!=null?i:{};l.id=bl("milestone-"),l.type=nr,l[Jt]=lr,l.earned=t,l.complete=function(){var d;const s=l;if(t.value=!0,(d=s.onComplete)==null||d.call(s),s.display&&r(s.showPopups)===!0){const c=r(s.display),p=De($t(c)?c:c.requirement);en(o(B,null,[o("h3",null,[u("Milestone earned!")]),o("div",null,[o(p,null,null)])]))}},Q(l,"visibility"),vt(l,"visibility",Ke.Visible);const n=l.visibility;if(l.visibility=v(()=>{const s=r(l.display);switch(tt.msDisplay){default:case vl.All:return r(n);case vl.Configurable:return r(l.earned)&&!(s!=null&&typeof s=="object"&&"optionsDisplay"in s)?Ke.None:r(n);case vl.Incomplete:return r(l.earned)?Ke.None:r(n);case vl.None:return Ke.None}}),Q(l,"style"),Q(l,"classes"),Q(l,"display"),Q(l,"showPopups"),l[al]=function(){const{visibility:s,display:d,style:c,classes:p,earned:m,id:y}=this;return{visibility:s,display:d,style:r(c),classes:p,earned:m,id:y}},l.shouldEarn){const s=l;Ft(()=>{var d,c;if(tt.active===ae.id&&!s.earned.value&&r(s.visibility)===Ke.Visible&&((d=s.shouldEarn)==null?void 0:d.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=De($t(p)?p:p.requirement);en(o(B,null,[o("h3",null,[u("Milestone earned!")]),o("div",null,[o(m,null,null)])]))}})}return l})}je.on("loadSettings",e=>{vt(e,"msDisplay",vl.All)});const or=Object.values(vl).map(e=>({label:wn(e),value:e}));Fi(E(()=>o(Ga,{title:"Show Milestones",options:or,"onUpdate:modelValue":e=>tt.msDisplay=e,modelValue:tt.msDisplay},null)));const ir=ue({props:{visibility:{type:q(Number),required:!0},display:{type:q(Object,String,Function),required:!0},style:q(String,Object,Array),classes:q(Object),glowColor:q(String),active:Boolean,floating:Boolean},emits:["selectTab"],setup(e,{emit:t}){const{display:l,glowColor:n,floating:i}=pt(e),s=Tl(l),d=v(()=>{const p=it(n);return p?r(i)?ar(p):{boxShadow:`0px 9px 5px -6px ${p}`}:{}});function c(){t("selectTab")}return{selectTab:c,component:s,glowColorStyle:d,unref:r,Visibility:Ke}}});function sr(e,t,l,n,i,s){var d;return e.unref(e.visibility)!==e.Visibility.None?(w(),D("button",{key:0,onClick:t[0]||(t[0]=(...c)=>e.selectTab&&e.selectTab(...c)),class:et(["tabButton",{active:e.active,...e.unref(e.classes)}]),style:ot([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.glowColorStyle,(d=e.unref(e.style))!=null?d:{}])},[(w(),ne(ze(e.component)))],6)):O("",!0)}var On=Pe(ir,[["render",sr],["__scopeId","data-v-610a2549"]]);const rr=ue({props:{visibility:{type:q(Number),required:!0},activeTab:{type:q(Object),required:!0},selected:{type:Object,required:!0},tabs:{type:q(Object),required:!0},style:q(String,Object,Array),classes:q(Object),buttonContainerStyle:q(String,Object,Array),buttonContainerClasses:q(Object)},components:{Sticky:Tn,TabButton:On},setup(e){const{activeTab:t}=pt(e),l=v(()=>Bl[tt.theme].floatingTabs),n=Rt("");Ft(()=>{const c=it(t);if(c==null){n.value="";return}if($t(c)){n.value=De(c);return}n.value=De(r(c.display))});const i=v(()=>{const c=it(t);return $t(c)||!c?void 0:r(c.classes)}),s=v(()=>{const c=it(t);return $t(c)||!c?void 0:r(c.style)});function d(c){const{display:p,style:m,classes:y,glowColor:h,visibility:b}=c;return{display:p,style:r(m),classes:y,glowColor:h,visibility:b}}return{floating:l,tabClasses:i,tabStyle:s,Visibility:Ke,component:n,gatherButtonProps:d,unref:r}}});function ur(e,t,l,n,i,s){var p,m;const d=ll("TabButton"),c=ll("Sticky");return e.unref(e.visibility)!==e.Visibility.None?(w(),D("div",{key:0,class:et(["tab-family-container",{...e.unref(e.classes),...e.tabClasses}]),style:ot([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(p=e.unref(e.style))!=null?p:[],(m=e.tabStyle)!=null?m:[]])},[o(c,{class:et(["tab-buttons-container",e.unref(e.buttonContainerClasses)]),style:ot(e.unref(e.buttonContainerStyle))},{default:se(()=>[f("div",{class:et(["tab-buttons",{floating:e.floating}])},[(w(!0),D(B,null,Ea(e.unref(e.tabs),(y,h)=>(w(),ne(d,hl({onSelectTab:b=>e.selected.value=h,floating:e.floating,key:h,active:e.unref(y.tab)===e.unref(e.activeTab)},e.gatherButtonProps(y)),null,16,["onSelectTab","floating","active"]))),128))],2)]),_:1},8,["class","style"]),e.unref(e.activeTab)?(w(),ne(ze(e.unref(e.component)),{key:0})):O("",!0)],6)):O("",!0)}var dr=Pe(rr,[["render",ur],["__scopeId","data-v-11575f45"]]);const cr=Symbol("TabButton"),pr=Symbol("TabFamily");function mr(e,t){if(Object.keys(e).length===0)throw console.warn("Cannot create tab family with 0 tabs"),"Cannot create tab family with 0 tabs";const l=_e(Object.keys(e)[0]);return kt(()=>{var s;const n=(s=t==null?void 0:t())!=null?s:{};n.id=bl("tabFamily-"),n.type=pr,n[Jt]=dr,n.tabs=Object.keys(e).reduce((d,c)=>{const p=e[c]();return p.type=cr,p[Jt]=On,Q(p,"visibility"),vt(p,"visibility",Ke.Visible),Q(p,"tab"),Q(p,"display"),Q(p,"classes"),Q(p,"style"),Q(p,"glowColor"),d[c]=p,d},{}),n.selected=l,n.activeTab=v(()=>{const d=r(i.tabs);if(l.value in d&&r(d[l.value].visibility)===Ke.Visible)return r(d[l.value].tab);const c=Object.values(d).find(p=>r(p.visibility)===Ke.Visible);return c?r(c.tab):null}),Q(n,"visibility"),vt(n,"visibility",Ke.Visible),Q(n,"classes"),Q(n,"style"),Q(n,"buttonContainerClasses"),Q(n,"buttonContainerStyle"),n[al]=function(){const{visibility:d,activeTab:c,selected:p,tabs:m,style:y,classes:h,buttonContainerClasses:b,buttonContainerStyle:g}=this;return{visibility:d,activeTab:c,selected:p,tabs:m,style:r(y),classes:h,buttonContainerClasses:b,buttonContainerStyle:g}};const i=n;return i})}const gr=ue({__name:"Tab",props:{display:null},setup(e){const t=e,{display:l}=pt(t),n=Tl(l);return(i,s)=>(w(),ne(ze(r(n))))}}),vr=Symbol("Tab");function wa(e){return kt(()=>{const t=e();return t.id=bl("tab-"),t.type=vr,t[Jt]=gr,t[al]=function(){const{display:l}=this;return{display:l}},t})}const fr={class:"field"},hr=ue({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,n=v(()=>De(r(l.title)||"","span")),i=v({get(){return!!l.modelValue},set(s){t("update:modelValue",s)}});return(s,d)=>(w(),D("label",fr,[sa(f("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":d[0]||(d[0]=c=>gt(i)?i.value=c:null)},null,512),[[uo,r(i)]]),(w(),ne(ze(r(n))))]))}});var sl=Pe(hr,[["__scopeId","data-v-33d57459"]]);const yr=Symbol("Reset");function br(e){return kt(()=>{const t=e();return t.id=bl("reset-"),t.type=yr,t.reset=function(){var n;const l=i=>{if(i&&typeof i=="object")if(fl in i){const s=i;s.value=s[fl]}else!(i instanceof a)&&!gt(i)&&Object.values(i).forEach(s=>l(s))};r(t.thingsToReset).forEach(l),je.emit("reset",t),(n=t.onReset)==null||n.call(t)},Q(t,"thingsToReset"),t})}const Zl={};je.on("removeLayer",e=>{var t;(t=Zl[e.id])==null||t.call(Zl),Zl[e.id]=void 0});const wr="dyes",Ar=11,Ve=Ut(wr,function(){const e="Dyes",t="#D4D4F4";function l(g){const _=ct(0,g.name),S=Y(()=>[ie(()=>({addend:()=>a.add(W.amount.value,1),description:`${g.name} Chambers`})),C(()=>({multiplier:i.orange1,description:"Orange Dye Boost 1",enabled:g.color=="red"||g.color=="yellow"})),C(()=>({multiplier:i.green1,description:"Green Dye Boost 1",enabled:g.color=="yellow"||g.color=="blue"})),C(()=>({multiplier:i.purple1,description:"Purple Dye Boost 1",enabled:g.color=="red"||g.color=="blue"})),C(()=>({multiplier:2,description:"Wetter Dyes",enabled:()=>c.yellowDyeUpg.bought.value&&(g.color=="red"||g.color=="yellow"||g.color=="blue")}))]),x=v(()=>S.apply(0)),W=Me(()=>{const M=ht(g.costs);return{...g,style:()=>({backgroundColor:r(W.canPurchase)?t:"#545454",minWidth:"200px"}),display:E(()=>o("span",null,[o("h3",null,[g.name,u(" Chambers")]),o("br",null,null),u("Create "),V(x.value),u(" "),g.name,g.dyesToReset.length>0?", but reset "+g.dyesToReset.map(k=>k.name).join(", "):"",u("."),o("br",null,null),o("br",null,null),o("span",{class:"white-space: pre-wrap"},[u("Currently:")," ",g.listedBoosts.filter(k=>r(k.visible)).map(k=>Z(E(()=>o("div",null,[r(k.desc)]))))]),o("br",null,null),o("div",null,[u("Cost:")," ",r(M).map(k=>Z(E(()=>{var F,X;return o("div",null,[V(r(a.pow((F=r(W.cost))!=null?F:a.dInf,r((X=k.root)!=null?X:1)).times(r(k.base))))," ",k.res.displayName,o("br",null,null)])})))])])),cost(){let k=W.amount.value;return a.gte(k,25)&&(k=a.pow(k,2).div(20)),a.gte(k,10)&&(k=a.pow(k,2).div(5)),a.div(k,10).plus(1)},canPurchase:v(k=>{var X;if(r(W.visibility)!=Ke.Visible)return!1;const F=(X=k!=null?k:r(W.cost))!=null?X:a.dInf;return r(M).every(he=>{var j;return a.div(he.res.value,r(he.base)).root(r((j=he.root)!=null?j:1)).gte(F)})}),onPurchase(k){var X;const F=(X=k!=null?k:r(W.cost))!=null?X:a.dInf;r(M).forEach(he=>{var j;he.res.value=a.sub(he.res.value,a.pow(F,r((j=he.root)!=null?j:1)).times(r(he.base)))}),_.value=a.add(_.value,x.value),W.amount.value=a.add(W.amount.value,1),g.dyesToReset.forEach(he=>he.reset())}}});return{name:g.name,amount:_,buyable:W,toGenerate:S,computedToGenerate:x,display:E(()=>o(It,{resource:_,color:g.color,style:"margin: 0; width: 200px; width: 180px; padding: 10px;",sticky:!1},null))}}const n={red:l({name:"Red Dye",color:"red",costs:()=>[{base:"2e18",root:5,res:re.logs},{base:v(()=>c.yellowDyeUpg2.bought.value?"2.5e5":"5e5"),root:2,res:Ye.oil}],listedBoosts:[{visible:!0,desc:v(()=>`+${V(i.red1.value)} effective Oil Pumps (does not impact coal consumption)`)}],dyesToReset:[]}),yellow:l({name:"Yellow Dye",color:"yellow",costs:()=>[{base:"1e18",root:5,res:re.logs},{base:v(()=>c.yellowDyeUpg2.bought.value?"5e5":"1e6"),root:2,res:Ye.oil}],listedBoosts:[{visible:!0,desc:v(()=>`x${V(i.yellow1.value)} Paper & Plastic gain`)}],dyesToReset:[]}),blue:l({name:"Blue Dye",color:"blue",costs:()=>[{base:"5e17",root:5,res:re.logs},{base:v(()=>c.yellowDyeUpg2.bought.value?"1e6":"2e6"),root:2,res:Ye.oil}],listedBoosts:[{visible:!0,desc:v(()=>`+${ee(i.blue1.value)} forest size (after all other modifiers).`)}],dyesToReset:[]}),orange:l({name:"Orange Dye",color:"orange",costs:()=>[{base:15,root:2,res:n.red.amount},{base:10,root:2,res:n.yellow.amount}],listedBoosts:[{visible:!0,desc:v(()=>`x${V(i.orange1.value)} Red and Yellow Dye gain`)},{visible:!0,desc:v(()=>`/${V(i.orange2.value)} Box buyable costs.`)}],dyesToReset:[{name:"Red Dye",reset(){n.red.amount.value=0,n.red.buyable.amount.value=0}},{name:"Yellow Dye",reset(){n.yellow.amount.value=0,n.yellow.buyable.amount.value=0}}]}),green:l({name:"Green Dye",color:"green",costs:()=>[{base:15,root:2,res:n.yellow.amount},{base:10,root:2,res:n.blue.amount}],listedBoosts:[{visible:!0,desc:v(()=>`x${V(i.green1.value)} Yellow and Blue Dye gain`)},{visible:!0,desc:v(()=>`+${ee(a.sub(i.green2.value,1).times(100))}% Kiln synergy effect.`)}],dyesToReset:[{name:"Yellow Dye",reset(){n.yellow.amount.value=0,n.yellow.buyable.amount.value=0}},{name:"Blue Dye",reset(){n.blue.amount.value=0,n.blue.buyable.amount.value=0}}]}),purple:l({name:"Purple Dye",color:"purple",costs:()=>[{base:15,root:2,res:n.blue.amount},{base:10,root:2,res:n.red.amount}],listedBoosts:[{visible:!0,desc:v(()=>`x${V(i.purple1.value)} Red and Blue Dye gain`)},{visible:!0,desc:v(()=>`x${V(i.purple2.value)} Smelting Speed and Ore Purity`)}],dyesToReset:[{name:"Blue Dye",reset(){n.blue.amount.value=0,n.blue.buyable.amount.value=0}},{name:"Red Dye",reset(){n.red.amount.value=0,n.red.buyable.amount.value=0}}]})},i={red1:v(()=>a.pow(a.add(n.red.amount.value,1).log2().plus(1).log2().div(2),c.blueDyeUpg2.bought.value?1.5:1)),yellow1:v(()=>a.add(n.yellow.amount.value,1).log2().plus(1)),blue1:v(()=>a.add(n.blue.amount.value,1).log2().sqrt().times(5e6)),orange1:v(()=>a.pow(2,a.add(n.orange.amount.value,1).log2().sqrt()).pow(c.coalUpg.bought.value?1.2:1)),orange2:v(()=>a.add(n.orange.amount.value,1).log2().plus(1)),green1:v(()=>a.pow(2,a.add(n.green.amount.value,1).log2().sqrt()).pow(c.coalUpg.bought.value?1.2:1)),green2:v(()=>a.add(n.green.amount.value,1).log2().plus(1).pow(c.coalUpg.bought.value?2:1)),purple1:v(()=>a.pow(2,a.add(n.purple.amount.value,1).log2().sqrt()).pow(c.coalUpg.bought.value?1.2:1)),purple2:v(()=>a.add(n.purple.amount.value,1).log2().plus(1))},[s,d]=nl(()=>[{title:"Red Dye Creation",modifier:n.red.toGenerate,base:0},{title:"Yellow Dye Creation",modifier:n.yellow.toGenerate,base:0},{title:"Blue Dye Creation",modifier:n.blue.toGenerate,base:0},{title:"Orange Dye Creation",modifier:n.orange.toGenerate,base:0},{title:"Green Dye Creation",modifier:n.green.toGenerate,base:0},{title:"Purple Dye Creation",modifier:n.purple.toGenerate,base:0}]),c={blueDyeUpg:G(()=>({visibility:()=>I(a.add(n.orange.amount.value,n.green.amount.value).add(n.purple.amount.value).gte(1)||c.blueDyeUpg.bought.value),display:{title:"Is Blue Dye just Water?",description:E(()=>o(B,null,[u("Multiply Log gain by log"),o("sub",null,[u("10")]),u("(Auto Cutting Amount)+1.")]))},cost:1e3,resource:T(n.blue.amount),onPurchase(){n.blue.amount.value=0,n.blue.buyable.amount.value=0}})),redDyeUpg:G(()=>({visibility:()=>I(a.add(n.orange.amount.value,n.green.amount.value).add(n.purple.amount.value).gte(10)||c.redDyeUpg.bought.value),display:{title:"Glistening Paint",description:E(()=>o(B,null,[u("Multiply Ore Purity by log"),o("sub",null,[u("10")]),u("(Cloth)+1.")]))},cost:1500,resource:T(n.red.amount),onPurchase(){n.red.amount.value=0,n.red.buyable.amount.value=0}})),yellowDyeUpg:G(()=>({visibility:()=>I(a.add(n.orange.amount.value,n.green.amount.value).add(n.purple.amount.value).gte(100)||c.yellowDyeUpg.bought.value),display:{title:"Wetter Dyes",description:"Double Red, Yellow, and Blue Dye gain, but reset their amounts."},cost:2e3,resource:T(n.yellow.amount),onPurchase(){n.red.amount.value=0,n.red.buyable.amount.value=0,n.yellow.amount.value=0,n.yellow.buyable.amount.value=0,n.blue.amount.value=0,n.blue.buyable.amount.value=0}})),yellowDyeUpg2:G(()=>({visibility:()=>I(c.yellowDyeUpg.bought.value),display:{title:"Golden Wash",description:"Halve the Oil cost of Red, Yellow, and Blue Dyes."},cost:5e3,resource:T(n.yellow.amount),onPurchase(){n.yellow.amount.value=0,n.yellow.buyable.amount.value=0}})),redDyeUpg2:G(()=>({visibility:()=>I(c.redDyeUpg.bought.value),display:{title:"De Louvre",description:E(()=>o(B,null,[u("Multiply Smelting Speed by "),o(Oa,null,{default:()=>[u("Refineries+1")]}),u(".")]))},cost:6e3,resource:T(n.red.amount),onPurchase(){n.red.amount.value=0,n.red.buyable.amount.value=0}})),blueDyeUpg2:G(()=>({visibility:()=>I(c.blueDyeUpg.bought.value),display:{title:"Hydrophobia",description:"Raise Red Dye's effect ^1.5."},cost:7500,resource:T(n.blue.amount),onPurchase(){n.blue.amount.value=0,n.blue.buyable.amount.value=0}})),coalUpg:G(()=>({visibility:()=>I(c.blueDyeUpg2.bought.value&&c.redDyeUpg2.bought.value&&c.yellowDyeUpg2.bought.value),display:{title:"Denser Spectrum",description:"Orange, Green, and Purple Dyes' first effect is raised ^1.2, and Green Dye's second effect is squared. Buying this resets Red, Yellow, and Blue Dyes."},cost:"5e30",resource:R.coal,onPurchase(){n.red.amount.value=0,n.red.buyable.amount.value=0,n.yellow.amount.value=0,n.yellow.buyable.amount.value=0,n.blue.amount.value=0,n.blue.buyable.amount.value=0}}))},p=L(!1),m=E(()=>o(yt,{modelValue:p.value,"onUpdate:modelValue":g=>p.value=g},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:s})),y=ct(v(()=>Object.values(n).reduce((g,_)=>a.add(g,_.amount.value),0)),"Sum of Dyes"),{total:h,trackerDisplay:b}=dl({resource:y,goal:6e4,name:e,day:Ar,color:t,textColor:"var(--feature-foreground)",modal:{show:p,display:m},ignoreTotal:!0});return{name:e,color:t,dyes:n,dyeSum:y,boosts:i,totalDyeSum:h,minWidth:700,generalTabCollapsed:d,upgrades:c,display:E(()=>o(B,null,[Z(b),o(fe,null,null),o("div",{style:"width: 620px"},[We(n.red.display,n.yellow.display,n.blue.display),We(n.red.buyable,n.yellow.buyable,n.blue.buyable),o(fe,null,null),We(n.orange.display,n.green.display,n.purple.display),We(n.orange.buyable,n.green.buyable,n.purple.buyable)]),o(fe,null,null),o("div",{class:"row",style:"vertical-align: top"},[Lt(c.redDyeUpg,c.redDyeUpg2),Lt(c.yellowDyeUpg,c.yellowDyeUpg2),Lt(c.blueDyeUpg,c.blueDyeUpg2)]),Z(c.coalUpg)]))}}),Cr="plastic",tn=10,Ue=Ut(Cr,function(){const e="Plastic",t="#DCD9CD",l=ct(0,"plastic"),[n,i]=nl(()=>[{title:"Plastic Gain",modifier:xe,base:0}]),s=L(!1),d=E(()=>o(yt,{modelValue:s.value,"onUpdate:modelValue":K=>s.value=K},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:n})),c=_e(0),p=v(()=>a.times(c.value,100)),m=Me(()=>({resource:nt.metal,cost(){const K=new a(this.amount.value);return a.pow(1.2,K).times(1e7)},display:E(()=>o(B,null,[o("h3",null,[u("Refinery")]),o("br",null,null),u("Refines oil into plastic pellets"),o("br",null,null),u("Consumes 100 oil/s to create 1 plastic/s"),o("br",null,null),o("br",null,null),u("Currently:"),o("br",null,null),u("-"),V(p.value),u(" oil/sec"),o("br",null,null),u("+"),V(c.value),u(" plastic/sec"),o("br",null,null),o("br",null,null),u("Cost: "),ee(r(m.cost))," ",m.resource.displayName])),onPurchase(){c.value=a.add(c.value,1)},style:{width:"300px"}})),{min:y,max:h,add:b,remove:g}=Vt({buyable:m,active:c,style:{minHeight:"20px",width:"40px",color:"var(--feature-foreground)"}}),_=v(()=>a.pow(5,a.add([...Object.values(M),...Object.values(he)].filter(K=>K.bought.value).length,2))),S=G(()=>({resource:T(l),cost:_,display:()=>({title:"Plastic Scissors",description:"Unlock paper upgrades",showCost:!S.bought.value})})),x=G(()=>({resource:T(l),cost:_,display:()=>({title:"Plastic Level",description:"Unlock box upgrades",showCost:!x.bought.value})})),W=G(()=>({resource:T(l),cost:_,display:()=>({title:"Plastic Cane",description:"Unlock cloth upgrades",showCost:!W.bought.value})})),M={paperTools:S,boxTools:x,clothTools:W},k=G(()=>({resource:T(l),cost:_,visibility:()=>I(S.bought.value),display:()=>({title:"Paper Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!k.bought.value})})),F=G(()=>({resource:T(l),cost:_,visibility:()=>I(x.bought.value),display:()=>({title:"Box Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!F.bought.value})})),X=G(()=>({resource:T(l),cost:_,visibility:()=>I(W.bought.value),display:()=>({title:"Cloth Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!X.bought.value})})),he={paperElf:k,boxElf:F,clothElf:X},j=Me(()=>({resource:T(l),cost(){const K=this.amount.value;return a.pow(1.3,K).times(100)},visibility:()=>I(k.bought.value),display:{title:"Plastic Printing Press",description:"Gain +1% of your paper gain per second",effectDisplay:E(()=>o(B,null,[ee(j.amount.value),u("%")])),showAmount:!1}})),be=Me(()=>({resource:T(l),cost(){const K=this.amount.value;return a.pow(1.3,K).times(100)},visibility:()=>I(F.bought.value),display:{title:"Plastic Box Folder",description:"Gain +1% of your box gain per second",effectDisplay:E(()=>o(B,null,[ee(be.amount.value),u("%")])),showAmount:!1}})),ce=Me(()=>({resource:T(l),cost(){const K=this.amount.value;return a.pow(1.3,K).times(100)},visibility:()=>I(X.bought.value),display:{title:"Plastic Shepherd",description:"All cloth actions are +10% more efficient",effectDisplay:E(()=>o(B,null,[ee(a.times(ce.amount.value,10)),u("%")])),showAmount:!1}})),He={passivePaper:j,passiveBoxes:be,clothGains:ce},xe=Y(()=>[ie(()=>({addend:c,description:"Oil Refinery",enabled:()=>a.gt(c.value,0)})),C(()=>({multiplier:2,description:"Paper Elf Recruitment",enabled:k.bought})),C(()=>({multiplier:2,description:"Box Elf Recruitment",enabled:F.bought})),C(()=>({multiplier:2,description:"Cloth Elf Recruitment",enabled:X.bought})),C(()=>({multiplier:2,description:"Carry plastic in boxes",enabled:Ze.row2Upgrades.plasticUpgrade.bought})),C(()=>({multiplier:()=>Ye.oilEffectiveness.value,description:"Effectiveness",enabled:()=>a.lt(Ye.oilEffectiveness.value,1)})),C(()=>({multiplier:Ve.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>a.gte(Ve.dyes.yellow.amount.value,1)}))]),Te=v(()=>xe.apply(0));je.on("update",K=>{a.lt(J.day.value,tn)||(l.value=a.times(K,Te.value).add(l.value))});const{total:Ne,trackerDisplay:Re}=dl({resource:l,goal:25e4,name:e,day:tn,color:t,textColor:"var(--feature-foreground)",modal:{show:s,display:d}});return{name:e,color:t,plastic:l,totalPlastic:Ne,buildRefinery:m,activeRefinery:c,oilCost:p,upgrades:M,elfUpgrades:he,buyables:He,generalTabCollapsed:i,minWidth:700,display:E(()=>o(B,null,[Z(Re),o(fe,null,null),o(It,{resource:l,color:t,style:"margin-bottom: 0",effectDisplay:a.gt(Te.value,0)?`+${V(Te.value)}/s`:void 0},null),o(fe,null,null),o(Pt,null,{default:()=>[Z(m),o("div",null,[ee(a.floor(c.value)),u("/"),ee(a.floor(m.amount.value))]),We(y,g,b,h)]}),o(Pl,null,{default:()=>[Lt(S,k,j),Lt(x,F,be),Lt(W,X,ce)]})]))}}),kr="oil",Aa=9,Ye=Ut(kr,function(){const e="Oil",t="#000000",l="var(--foreground)",n=ct(0,"oil"),i=ct(0,"depth"),s=_e(0),d=v(()=>a.lt(i.value,990)?a.add(10,i.value):a.pow(1.001,a.sub(i.value,990)).mul(1e3));function c(){if(a.lt(i.value,990)){const Xe=a.min(a.affordArithmeticSeries(s.value,10,1,i.value),a.sub(990,i.value)),Bt=a.sumArithmeticSeries(Xe,10,1,i.value);s.value=a.sub(s.value,Bt),i.value=a.add(i.value,Xe)}if(a.gte(i.value,990)){const Xe=a.affordGeometricSeries(s.value,1e3,1.001,a.sub(i.value,990)),Bt=a.sumGeometricSeries(Xe,1e3,1.001,a.sub(i.value,990));s.value=a.sub(s.value,Bt),i.value=a.add(i.value,Xe)}}const p=_e(0),m=v(()=>a.times(a.pow(p.value,W.value).pow(2),1e14)),y=v(()=>a.times(a.pow(p.value,W.value),1)),h=Me(()=>({resource:nt.metal,cost(){const Xe=new a(this.amount.value);return a.pow(1.3,Xe).times(25e3)},display:E(()=>o(B,null,[o("h3",null,[u("Heavy Drill")]),o("br",null,null),u("A large drill specialized at deep mining."),o("br",null,null),u("Consumes 1e14*(Heavy Drills amount)"),o("sup",null,[u("2")]),u(" coal/sec for (Heavy Drills amount) drill power."),o("br",null,null),o("br",null,null),u("Currently:"),o("br",null,null),u("-"),ve(m.value),u(" coal/sec"),o("br",null,null),u("+"),ve(y.value),u(" drill power"),o("br",null,null),o("br",null,null),u("Cost: "),me(r(h.cost)),u(" "),h.resource.displayName])),onPurchase(){p.value=a.add(p.value,1)},style:{color:l,width:"160px"}})),{min:b,max:g,add:_,remove:S}=Vt({buyable:h,active:p}),x=_e(0),W=v(()=>a.add(x.value,Math.E).ln()),M=Me(()=>({resource:nt.metal,cost(){const Xe=new a(this.amount.value);return a.pow(2,Xe).times(1e5)},display:E(()=>o(B,null,[o("h3",null,[u("Heavy Drill Drill")]),o("br",null,null),u("Attach extra drills to Heavy Drills to make them faster"),o("br",null,null),u("Raise amount of effective Heavy Drills by ^ln(Heavy Drill Drill amount + e)."),o("br",null,null),u("(also affects coal consumption)."),o("br",null,null),o("br",null,null),u("Currently:"),o("br",null,null),u("^"),ve(W.value),u(" Heavy Drill amount"),o("br",null,null),o("br",null,null),u("Cost: "),me(r(M.cost)),u(" "),M.resource.displayName])),onPurchase(){x.value=a.add(x.value,1)},style:{color:l,width:"160px"}})),{min:k,max:F,add:X,remove:he}=Vt({buyable:M,active:x}),j=_e(0),be=v(()=>a.pow(1/3,j.value)),ce=v(()=>a.pow(2,j.value)),He=v(()=>a.pow(1.2,j.value)),xe=Me(()=>({resource:nt.metal,cost(){const Xe=new a(this.amount.value);return a.pow(8,Xe).times(2e5)},display:E(()=>o(B,null,[o("h3",null,[u("Heavy Extractor")]),o("br",null,null),u("Attach extractors to the drill to mine coal and ore, but with a price."),o("br",null,null),u("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),u("Currently:"),o("br",null,null),u("\xD7"),ve(be.value),u(" drill power"),o("br",null,null),u("\xD7"),ve(ce.value),u(" coal/sec"),o("br",null,null),u("\xD7"),ve(He.value),u(" ore/sec"),o("br",null,null),o("br",null,null),u("Cost: "),me(r(xe.cost))," ",xe.resource.displayName])),onPurchase(){j.value=a.add(j.value,1)},style:{color:l,width:"160px"}})),{min:Te,max:Ne,add:Re,remove:K}=Vt({buyable:xe,active:j}),Ae=_e(0),we=v(()=>a.pow(wt[3].bought.value?4:5,Ae.value)),Ce=v(()=>a.add(Ae.value,La.value).pow(2).mul(p.value).mul(a.add(x.value,1)).mul(j.value).mul(i.value).div(1e5)),Oe=Me(()=>({resource:nt.metal,cost(){const Xe=new a(this.amount.value);let Bt=a.pow(16,Xe).times(2e6);return wt[4].bought.value&&(Bt=Bt.div(a.add(Al.value,1).root(6))),Bt},display:E(()=>o(B,null,[o("h3",null,[u("Oil Pump")]),o("br",null,null),u("Pump that oil from the ground."),o("br",null,null),u("Gain oil based on the number of Heavy Drills and Heavy Drill Drills active and well depth, but coal usage is multiplied by "),wt[3].bought.value?4:5,u("\xD7."),o("br",null,null),o("br",null,null),u("Currently:"),o("br",null,null),u("\xD7"),ve(we.value),u(" coal usage"),o("br",null,null),u("+"),ve(Ce.value),u(" oil/sec"),o("br",null,null),o("br",null,null),u("Cost: "),me(r(Oe.cost)),u(" "),Oe.resource.displayName])),onPurchase(){Ae.value=a.add(Ae.value,1)},style:{color:l,width:"160px"}})),{max:Fe,min:at,add:Qe,remove:At}=Vt({buyable:Oe,active:Ae}),de=_e(0),$=v(()=>a.pow(de.value,2)),Ie=v(()=>a.pow(de.value,3).mul(1e19)),te=v(()=>a.add(de.value,1)),ge=Me(()=>({resource:T(n),cost(){const Xe=new a(this.amount.value);return a.pow(2,Xe).times(50)},display:E(()=>o(B,null,[o("h3",null,[u("Oil Burner")]),o("br",null,null),u("Burn oil as fuel."),o("br",null,null),u("(Oil Burner Amount)"),o("sup",null,[u("2")]),u(" unit of oil can give 1e19*(Oil Burner Amount)"),o("sup",null,[u("3")]),u(" units of coal."),o("br",null,null),o("br",null,null),u("Currently:"),o("br",null,null),u("-"),ve($.value),u(" oil/sec"),o("br",null,null),u("-"),ve(Ie.value),u(" coal consumption"),wt[2].bought.value?o(B,null,[o("br",null,null),u("\xD7"),ve(te.value),u(" to auto smelting multi")]):"",o("br",null,null),o("br",null,null),u("Cost: "),me(r(ge.cost)),u(" "),ge.resource.displayName])),onPurchase(){de.value=a.add(de.value,1)},style:{color:l,width:"160px"}})),{max:st,min:Je,add:Ge,remove:ft}=Vt({buyable:ge,active:de}),qe=_e(0),Mt=v(()=>a.pow(qe.value,2).mul(100)),U=v(()=>a.add(qe.value,1)),Le=Me(()=>({resource:nt.metal,cost(){const Xe=new a(this.amount.value);let Bt=a.pow(10,Xe).times(1e7);return wt[4].bought.value&&(Bt=Bt.div(a.add(Al.value,1).root(6))),Bt},display:E(()=>o(B,null,[o("h3",null,[u("Oil Smelter")]),o("br",null,null),u("Use oil as a crucible fuel."),o("br",null,null),u("Burn 100x"),o("sup",null,[u("2")]),u(" oil to smelt +100% faster."),o("br",null,null),o("br",null,null),u("Currently:"),o("br",null,null),u("-"),ve(Mt.value),u(" oil/sec"),o("br",null,null),u("\xD7"),ve(U.value),u(" smelting speed"),o("br",null,null),o("br",null,null),u("Cost: "),me(r(Le.cost)),u(" "),Le.resource.displayName])),onPurchase(){qe.value=a.add(qe.value,1)},style:{color:l,width:"160px"}})),{max:le,min:H,add:Dt,remove:_t}=Vt({buyable:Le,active:qe}),rt=[ye(()=>({display:{requirement:"5m Well Depth",effectDisplay:"Gain 25% more coal for each metre of well depth (after the 3 elf milestone)."},shouldEarn:()=>a.gte(i.value,5)})),ye(()=>({display:{requirement:"10m Well Depth",effectDisplay:"Drill too slow? Unlock some drill upgrades!"},shouldEarn:()=>a.gte(i.value,10),visibility:()=>I(rt[0].earned.value)})),ye(()=>({display:{requirement:"25m Well Depth",effectDisplay:"Gain 5% more ore for each metre of well depth."},shouldEarn:()=>a.gte(i.value,25),visibility:()=>I(rt[1].earned.value)})),ye(()=>({display:{requirement:"60m Well Depth",effectDisplay:"Drill still too slow? Try unlocking another drill!"},shouldEarn:()=>a.gte(i.value,60),visibility:()=>I(rt[2].earned.value)})),ye(()=>({display:{requirement:"150m Well Depth",effectDisplay:"It appears that coal and metal appear a lot more when you go this deep! Unlock an upgrade apiece for coal and metal!"},shouldEarn:()=>a.gte(i.value,150),visibility:()=>I(rt[3].earned.value)})),ye(()=>({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:()=>a.gte(i.value,350),visibility:()=>I(rt[4].earned.value)})),ye(()=>({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:()=>a.gte(i.value,1e3),visibility:()=>I(a.gte(i.value,1e3))})),ye(()=>({display:{requirement:"3,000m Well Depth",effectDisplay:"You found a large oil spot! Double oil gain!"},shouldEarn:()=>a.gte(i.value,3e3),visibility:()=>I(a.gte(i.value,2e3))}))],{collapseMilestones:oe,display:St}=Hl(rt),Et=[ye(()=>({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:()=>a.gte(Al.value,100)})),ye(()=>({display:{requirement:"500 total oil",effectDisplay:"Unlocks oil upgrades! These can be bought with oil."},shouldEarn:()=>a.gte(Al.value,500),visibility:()=>I(Et[0].earned.value)})),ye(()=>({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:()=>a.gte(Al.value,1e4),visibility:()=>I(Et[1].earned.value)}))],{collapseMilestones:Xt,display:Yt}=Hl(Et),xt=[G(()=>({resource:R.coal,cost:1e18,display:{title:"Coal Drill Synergy",description:"Increase drill power by +4% per coal Mining Drill owned.",effectDisplay:E(()=>o(B,null,[u("x"),ve(bt[0].value)]))},style:{color:l}})),G(()=>({resource:nt.metal,cost:15e4,display:{title:"Metal Drill Synergy",description:"Increase drill power by +4% per ore Mining Drill owned.",effectDisplay:E(()=>o(B,null,[u("x"),ve(bt[1].value)]))},style:{color:l}})),G(()=>({resource:R.coal,cost:1e20,display:{title:"Coal Drill Upgrade",description:"Increase drill power by +6% per OoM of coal owned.",effectDisplay:E(()=>o(B,null,[u("x"),ve(bt[2].value)]))},style:{color:l}})),G(()=>({resource:nt.metal,cost:15e5,display:{title:"Metal Drill Upgrade",description:"Increase drill power by +10% per OoM of metal ingot owned.",effectDisplay:E(()=>o(B,null,[u("x"),ve(bt[3].value)]))},style:{color:l}})),G(()=>({resource:T(n),cost:100,display:{title:"Drill Oil",description:"Increase previous upgrades' effect by +0.1% per Heavy Drill owned.",effectDisplay:E(()=>o(B,null,[u("+"),ve(a.mul(bt[4].value,100)),u("%")]))},style:{color:l}}))],bt=[v(()=>a.mul(R.buildDrill.amount.value,a.add(.04,il.value)).add(1)),v(()=>a.mul(nt.oreDrill.amount.value,a.add(.04,il.value)).add(1)),v(()=>a.mul(a.max(R.coal.value,1).log10().floor(),a.add(.06,il.value)).add(1)),v(()=>a.mul(a.max(nt.metal.value,1).log10().floor(),a.add(.1,il.value)).add(1)),v(()=>a.mul(h.amount.value,.001))],wt=[G(()=>({resource:T(n),cost:100,display:{title:"Oil the Oil Pump",description:"Double oil gain."},style:{color:l}})),G(()=>({resource:T(n),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}})),G(()=>({resource:T(n),cost:1500,display:{title:"Blaster Burner",description:"The Oil Burner can now increase your metal gain."},style:{color:l}})),G(()=>({resource:T(n),cost:25e3,display:{title:"Oil Integration",description:"Reduce Oil Pump's coal consumption multipler from 5 to 4"},style:{color:l}})),G(()=>({resource:T(n),cost:5e4,display:{title:"Be One with the Oil",description:E(()=>o(B,null,[u("Divide metal ingot prices of oil buildings by "),o("sup",null,[u("6")]),o(Oa,null,{default:()=>[u("total oil + 1")]})]))},style:{color:l}}))],ol=Y(()=>[ie(()=>({addend:()=>a.negate(m.value),description:"Heavy Drill",enabled:()=>a.gt(p.value,0)})),C(()=>({multiplier:we,description:"Oil Pump",enabled:()=>a.gt(Ae.value,0)})),ie(()=>({addend:va,description:"Oil to Coal Substitution",enabled:()=>a.gt(va.value,0)}))]),Gt=v(()=>ol.apply(0)),Zt=Y(()=>[ie(()=>({addend:y,description:"Heavy Drill",enabled:()=>a.gt(p.value,0)})),C(()=>({multiplier:be,description:"Heavy Extractor",enabled:()=>a.gt(j.value,0)})),C(()=>({multiplier:bt[0],description:"Coal Drill Synergy",enabled:xt[0].bought})),C(()=>({multiplier:bt[1],description:"Metal Drill Synergy",enabled:xt[1].bought})),C(()=>({multiplier:bt[2],description:"Coal Drill Upgrade",enabled:xt[2].bought})),C(()=>({multiplier:bt[3],description:"Metal Drill Upgrade",enabled:xt[3].bought})),C(()=>({multiplier:2,description:"Guide to drilling",enabled:z.upgrades.drillingUpgrade.bought})),C(()=>({multiplier:()=>tl.value,description:"Effectiveness",enabled:()=>a.lt(tl.value,1)}))]),el=v(()=>Zt.apply(0)),wl=Y(()=>[ie(()=>({addend:bt[4],description:"Drill Oil",enabled:xt[4].bought}))]),il=v(()=>wl.apply(0)),Jl=Y(()=>[ie(()=>({addend:Ce,description:"Oil Pump",enabled:()=>a.gt(Ae.value,0)})),C(()=>({multiplier:2,description:"Oil the Oil Pump",enabled:wt[0].bought})),C(()=>({multiplier:2,description:"3000m Well Depth",enabled:rt[7].earned})),C(()=>({multiplier:2,description:"Oil and where to find it",enabled:z.upgrades.oilUpgrade.bought})),C(()=>({multiplier:()=>tl.value,description:"Effectiveness",enabled:()=>a.lt(tl.value,1)}))]),Nl=v(()=>Jl.apply(0)),Xl=Y(()=>[ie(()=>({addend:()=>a.negate($.value),description:"Oil Burner",enabled:()=>a.gt(de.value,0)})),ie(()=>({addend:()=>a.negate(Mt.value),description:"Oil Smelter",enabled:()=>a.gt(qe.value,0)})),ie(()=>({addend:()=>a.negate(Ue.oilCost.value),description:"Oil Refinery",enabled:()=>a.gt(Ue.activeRefinery.value,0)}))]),P=v(()=>Xl.apply(0)),Va=Y(()=>[ie(()=>({addend:Ie,description:"Oil Burner",enabled:()=>a.gt(de.value,0)})),C(()=>({multiplier:()=>pl.value,description:"Effectiveness",enabled:()=>a.lt(pl.value,1)}))]),va=v(()=>Va.apply(0)),Ha=Y(()=>[ie(()=>({addend:Ve.boosts.red1,description:"Red Dye Boost 1",enabled:()=>a.gte(Ve.dyes.red.amount.value,1)}))]),La=v(()=>Ha.apply(0)),[to,lo]=nl(()=>[{title:"Coal Consumption",modifier:ol,unit:"/s",base:0},{title:"Drill Power",modifier:Zt,base:0},{title:"Upgrade Bonus",modifier:wl,base:0,visible(){return a.gt(il.value,0)}},{title:"Oil Speed",modifier:Jl,unit:"/s",base:0,visible(){return a.gt(Nl.value,0)}},{title:"Oil Consumption",modifier:Xl,unit:"/s",base:0,visible(){return a.lt(P.value,0)}},{title:"Oil to Coal Substitution",modifier:Va,unit:"/s",base:0,visible(){return a.gt(va.value,0)}},{title:"Extra Oil Pumps",modifier:Ha,base:0,visible(){return a.gt(La.value,0)}}]),fa=L(!1),ao=E(()=>o(yt,{modelValue:fa.value,"onUpdate:modelValue":Xe=>fa.value=Xe},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:to})),tl=L(a.dOne),pl=L(a.dOne);je.on("update",Xe=>{if(a.lt(J.day.value,Aa))return;const Bt=a.negate(Gt.value);a.gt(Bt,0)?(tl.value=a.min(a.div(R.coal.value,Bt),1),R.coal.value=a.sub(R.coal.value,a.mul(Bt,tl.value).mul(Xe))):tl.value=a.dOne,s.value=a.add(s.value,a.mul(el.value,Xe)),n.value=a.add(n.value,a.mul(Nl.value,Xe)),c();const ha=a.negate(P.value);a.gt(ha,0)?(pl.value=a.min(a.div(n.value,ha),1),n.value=a.sub(n.value,a.mul(ha,pl.value).mul(Xe)).max(0)):pl.value=a.dOne});const{total:Al,trackerDisplay:no}=dl({resource:n,goal:25e4,name:e,day:Aa,color:t,modal:{show:fa,display:ao}});return{name:e,day:Aa,color:t,oil:n,totalOil:Al,depth:i,drillProgress:s,activeHeavy:p,buildHeavy:h,activeHeavy2:x,buildHeavy2:M,activeExtractor:j,buildExtractor:xe,activePump:Ae,buildPump:Oe,activeBurner:de,buildBurner:ge,activeSmelter:qe,buildSmelter:Le,extractorCoal:ce,extractorOre:He,coalEffectiveness:tl,oilEffectiveness:pl,depthMilestones:rt,collapsedDepthMilestones:oe,row1Upgrades:xt,row2Upgrades:wt,minWidth:700,oilMilestones:Et,collapsedOilMilestones:Xt,generalTabCollapsed:lo,display:E(()=>o(B,null,[Z(no),o(fe,null,null),a.lt(tl.value,1)?o("div",null,[u("Coal efficiency: "),ve(a.mul(tl.value,100)),u("%")]):null,a.lt(pl.value,1)?o("div",null,[u("Oil efficiency: "),ve(a.mul(pl.value,100)),u("%")]):null,o(It,{resource:n,color:t,sticky:!0,productionDisplay:E(()=>o(B,null,[a.lt(i.value,1e3)?"Reach 1000m to start gaining oil":o(B,null,[na(a.add(Nl.value,P.value))])]))},null),a.eq(Nl.value,0)?o(B,null,[u("(Need at least 1 Oil Pump, 1 Heavy Drill and 1 Heavy Extractor active to gain oil)"),o("br",null,null)]):"",o(Pl,null,{default:()=>[rt[6].earned.value?o(Pt,null,{default:()=>[Z(Oe),o("div",null,[me(a.floor(Ae.value)),u("/"),me(a.floor(Oe.amount.value))]),We(at,At,Qe,Fe)]}):null,Et[0].earned.value?o(Pt,null,{default:()=>[Z(ge),o("div",null,[me(a.floor(de.value)),u("/"),me(a.floor(ge.amount.value))]),We(Je,ft,Ge,st)]}):null,Et[2].earned.value?o(Pt,null,{default:()=>[Z(Le),o("div",null,[me(a.floor(qe.value)),u("/"),me(a.floor(Le.amount.value))]),We(H,_t,Dt,le)]}):null]}),o("br",null,null),o("div",null,[o("span",null,[u("The well is ")]),o("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[me(i.value)]),u("m deep"),o("br",null,null),u("Next at "),ve(a.sub(d.value,s.value)),u(" drill power seconds")]),o("div",null,[o("span",null,[u("Your drill power is ")]),o("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[ve(el.value)])]),o(fe,null,null),o(Pl,null,{default:()=>[o(Pt,null,{default:()=>[Z(h),o("div",null,[me(a.floor(p.value)),u("/"),me(a.floor(h.amount.value))]),We(b,S,_,g)]}),rt[3].earned.value?o(Pt,null,{default:()=>[Z(M),o("div",null,[me(a.floor(x.value)),u("/"),me(a.floor(M.amount.value))]),We(k,he,X,F)]}):null,rt[5].earned.value?o(Pt,null,{default:()=>[Z(xe),o("div",null,[me(a.floor(j.value)),u("/"),me(a.floor(xe.amount.value))]),We(Te,K,Re,Ne)]}):null]}),o(fe,null,null),El(...Et[1].earned.value?rt[1].earned.value?[xt,wt]:[xt]:[]),o(fe,null,null),St(),a.gte(Al.value,50)?Yt():""]))}}),_r="metal",ln=7,nt=Ut(_r,function(){const e="Metal",t="#888B8D",l=ct(0,"metal ingots",void 0,!0),n=Ya(l),i=ct(0,"ore"),s=Ya(i),d=Y(()=>[C(()=>({multiplier:5,description:"Crucible",enabled:Ne.bought})),C(()=>({multiplier:1.5,description:"Industrial Crucible",enabled:()=>a.gte(Ce.amount.value,1)})),C(()=>({multiplier:2,description:"Industrial Furnace",enabled:K.bought})),C(()=>({multiplier:()=>a.add(at.value,1),description:"Hotter Forges",enabled:()=>a.gte(Fe.amount.value,1)})),C(()=>({multiplier:2,description:"Carry metal in boxes",enabled:Ze.row2Upgrades.metalUpgrade.bought})),C(()=>({multiplier:Ve.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>a.gte(Ve.dyes.purple.amount.value,1)})),C(()=>({multiplier:()=>a.add(lt.cloth.value,1).log10().plus(1),description:"Glistening Paint",enabled:Ve.upgrades.redDyeUpg.bought}))]),c=v(()=>d.apply(.1)),p=Y(()=>[ie(()=>({addend:()=>a.times(Ce.amount.value,10),description:"Industrial Crucibles",enabled:()=>a.gte(Ce.amount.value,1)})),C(()=>({multiplier:2,description:"Efficient Crucibles",enabled:R.efficientSmelther.bought})),C(()=>({multiplier:()=>a.mul(Ye.activeSmelter.value,Ye.oilEffectiveness.value).add(1),description:"Oil Smelter",enabled:()=>a.gt(Ye.activeSmelter.value,0)})),C(()=>({multiplier:Ve.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>a.gte(Ve.dyes.purple.amount.value,1)})),C(()=>({multiplier:()=>a.add(Ue.activeRefinery.value,1).sqrt(),description:"De Louvre",enabled:Ve.upgrades.redDyeUpg2.bought}))]),m=v(()=>p.apply(0)),y=Y(()=>[C(()=>({multiplier:3,description:"Efficient Crucibles",enabled:R.efficientSmelther.bought})),C(()=>({multiplier:()=>a.add(Ye.activeBurner.value,1).mul(Ye.oilEffectiveness.value),description:"Blaster Burner",enabled:Ye.row2Upgrades[2].bought}))]),h=v(()=>y.apply(1)),b=1e10,g=v(()=>a.min(i.value,a.div(R.coal.value,b)).floor().max(0)),_=Tt(()=>({display:E(()=>{const ge=a.gte(g.value,1)?g.value:a.add(g.value,1);return o(B,null,[o("span",{style:"font-size: large"},[u("Smelt "),ve(a.times(g.value,c.value))," ",l.displayName]),o("br",null,null),o("span",{style:"font-size: large"},[u("Cost: "),me(ge),u(" "),i.displayName,u(";")," ",me(a.times(ge,b)),u(" "),R.coal.displayName])])}),canClick:()=>a.gte(g.value,1),onClick(){!r(this.canClick)||S(g.value)},style:{width:"600px",minHeight:"unset"}}));function S(ge,st=1){const[Je,Ge,ft]=[a.times(ge,c.value).times(st),ge,a.times(ge,b)];l.value=a.add(l.value,Je),i.value=a.sub(i.value,Ge),R.coal.value=a.sub(R.coal.value,ft)}const x=Y(()=>[ie(()=>({addend:()=>we.amount.value,description:"Mining Drills",enabled:()=>a.gte(we.amount.value,1)})),C(()=>({multiplier:()=>a.mul(Ye.depth.value,.05).add(1),description:"25m Well Depth",enabled:Ye.depthMilestones[2].earned})),C(()=>({multiplier:Ye.extractorOre,description:"Heavy Extractor",enabled:()=>a.gt(Ye.activeExtractor.value,0)})),C(()=>({multiplier:2,description:"Carry ore in boxes",enabled:Ze.row2Upgrades.oreUpgrade.bought}))]),W=v(()=>x.apply(1)),M=Y(()=>[C(()=>({multiplier:2,description:"A Simple Pickaxe",enabled:xe.bought})),C(()=>({multiplier:2,description:"Double Pickaxe",enabled:Te.bought})),C(()=>({multiplier:2.5,description:"Mining Drills",enabled:()=>a.gte(we.amount.value,1)})),C(()=>({multiplier:2,description:"Efficient Drills",enabled:Ae.bought})),C(()=>({multiplier:2,description:"Oil the Mining Drills",enabled:Ye.row2Upgrades[1].bought}))]),k=v(()=>M.apply(a.recip(X))),F=_e(0),X=10,he=Wt(()=>({width:400,height:25,direction:Be.Right,fillStyle:{backgroundColor:t},progress:()=>F.value})),j=Y(()=>[ie(()=>({addend:W})),C(()=>({multiplier:k}))]),be=v(()=>j.apply(0)),ce=Y(()=>[ie(()=>({addend:be})),ie(()=>({addend:()=>a.negate(m.value),enabled:Oe}))]),He=v(()=>ce.apply(0)),xe=G(()=>({resource:T(l),cost:.1,display:{title:"A Simple Pickaxe",description:"Make a simple pickaxe to help mine faster.

Halve the time to mine more ore"}})),Te=G(()=>({resource:T(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:()=>I(Te.bought.value)})),Ne=G(()=>({resource:T(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:()=>I(Ne.bought.value||a.div(s.value,c.value).plus(n.value).gte(1))})),Re=G(()=>({resource:T(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:()=>I(a.gte(we.amount.value,1)&&(Re.bought.value||J.days[7].opened.value||a.lt(R.computedCoalGain.value,a.times(W.value,k.value).times(b)))),onPurchase(){J.days[2].recentlyUpdated.value=!0}})),K=G(()=>({canAfford(){return a.gte(l.value,50)&&a.gte(R.coal.value,1e11)},onPurchase(){l.value=a.sub(l.value,50),R.coal.value=a.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}
${ve(1e11)} ${R.coal.displayName}`}})),Ae=G(()=>({resource:T(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:()=>I(Ye.depthMilestones[4].earned.value)})),we=Me(()=>({resource:T(l),cost(){return a.pow(1.15,this.amount.value).times(10)},display:{title:"Mining Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:E(()=>o(B,null,[u("Mine 2.5x faster. Increase ore mining amount by")," ",me(we.amount.value),u(" ore per operation")]))},visibility:()=>I(a.gte(we.amount.value,1)||a.div(s.value,c.value).plus(n.value).gte(10)),style:{width:"200px"}})),Ce=Me(()=>({resource:T(l),cost(){return a.pow(1.15,a.times(this.amount.value,10)).times(10)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:E(()=>o(B,null,[u("Automatically smelts")," ",me(a.times(Ce.amount.value,10)),u(" ore per second")]))},visibility:()=>I(a.gte(Ce.amount.value,1)||a.gte(we.amount.value,4)||a.gte(s.value,50)),style:{width:"200px"}})),Oe=_e(!0),Fe=Me(()=>({resource:R.coal,cost(){return a.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:E(()=>o(B,null,[u("Gain "),me(a.times(at.value,100)),u("% more metal per ore")]))},visibility:()=>I(a.gte(Fe.amount.value,1)||K.bought.value),style:{width:"200px"}})),at=v(()=>a.times(Fe.amount.value,.25));je.on("update",ge=>{F.value=a.times(ge,k.value).plus(F.value);const st=F.value.trunc();F.value=F.value.minus(st),i.value=a.add(i.value,a.times(st,W.value)),Oe.value&&S(a.min(g.value,a.times(m.value,ge)),h.value)});const[Qe,At]=nl(()=>[{title:"Auto Smelt Speed",modifier:p,base:0,unit:"/s",visible(){return a.gt(Ce.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:y,base:1,visible(){return a.gt(h.value,1)}},{title:"Metal per Ore",modifier:d,base:.1},{title:"Ore per Mining Operation",modifier:x,base:1},{title:"Mining Speed",modifier:M,base:.1,unit:"/s"}]),de=L(!1),$=E(()=>o(yt,{modelValue:de.value,"onUpdate:modelValue":ge=>de.value=ge},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:Qe})),{total:Ie,trackerDisplay:te}=dl({resource:l,goal:25e3,name:e,day:ln,color:t,modal:{show:de,display:$}});return{name:e,day:ln,color:t,ore:i,bestOre:s,oreProgress:F,metal:l,bestMetal:n,totalMetal:Ie,simplePickaxe:xe,doublePickaxe:Te,crucible:Ne,coalDrill:Re,industrialFurnace:K,efficientDrill:Ae,oreDrill:we,industrialCrucible:Ce,autoSmeltEnabled:Oe,hotterForge:Fe,generalTabCollapsed:At,minWidth:700,display:E(()=>o(B,null,[Z(te),o(fe,null,null),o(It,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:E(()=>o(B,null,[Oe.value&&a.gte(Ce.amount.value,1)?`+${hn([[m.value,"smelting speed"],[be.value,"ore gain"],[a.div(R.computedCoalGain.value,b),"coal gain"]],"/s",a.mul(c.value,h.value))}`:void 0]))},null),o(fe,null,null),Z(_),a.gte(Ce.amount.value,1)?o("div",{style:{width:"150px"}},[o(sl,{title:"Auto Smelt",modelValue:Oe.value,"onUpdate:modelValue":ge=>Oe.value=ge},null)]):void 0,o(fe,null,null),o(It,{resource:i,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:E(()=>o(B,null,[yn(He.value)]))},null),o(fe,null,null),o("div",null,[u("Currently mining "),ve(W.value),u(" ore every")," ",ve(a.recip(k.value)),u(" seconds")]),Z(he),o(fe,null,null),We(xe,Te,Ne,Re,K,Ae),We(we,Ce,Fe)]))}}),Sr="coal",an=3,R=Ut(Sr,function(){const e="Coal",t="#151716",l="#B2BeB5",n="var(--foreground)",i=ct(0,"coal"),s=ct(0,"ash"),d=_e(0),c=v(()=>a.times(d.value,1e3)),p=v(()=>a.times(d.value,.1)),m=v(()=>a.times(d.value,50)),y=Me(()=>({resource:re.logs,cost(){let P=a.times(F.amount.value,r(F.cost)).plus(this.amount.value);return a.gte(P,100)&&(P=a.pow(P,2).div(100)),a.gte(P,1e4)&&(P=a.pow(P,2).div(1e4)),P=a.pow(.95,z.books.smallFireBook.amount.value).times(P),P.pow(1.5).times(1e4)},display:E(()=>o(B,null,[o("h3",null,[u("Small Fire")]),o("br",null,null),u("Burn 1000 logs for 0.1 coal and 50 ash"),o("br",null,null),o("br",null,null),u("Currently:"),o("br",null,null),u("-"),V(c.value),u(" logs/sec"),o("br",null,null),u("+"),V(p.value),u(" coal/sec"),o("br",null,null),u("+"),V(m.value),u(" ash/sec"),o("br",null,null),o("br",null,null),u("Cost: "),ee(r(y.cost)),u(" "),y.resource.displayName])),onPurchase(){d.value=a.add(d.value,1)},style:{color:n,width:"160px"}})),{min:h,max:b,add:g,remove:_}=Vt({active:d,buyable:y}),S=ct(y.amount,"small fires"),x=_e(0),W=v(()=>a.times(x.value,1e4)),M=v(()=>a.times(x.value,10)),k=v(()=>a.times(x.value,1e3)),F=Me(()=>({resource:S,cost(){return a.pow(.95,z.books.bonfireBook.amount.value).times(10)},display:E(()=>o(B,null,[o("h3",null,[u("Bonfire")]),o("br",null,null),u("Burn 10,000 logs for 10 coal and 1000 ash"),o("br",null,null),o("br",null,null),u("Currently:"),o("br",null,null),u("-"),V(W.value),u(" logs/sec"),o("br",null,null),u("+"),V(M.value),u(" coal/sec"),o("br",null,null),u("+"),V(k.value),u(" ash/sec"),o("br",null,null),o("br",null,null),u("Cost: "),ee(r(F.cost)),u(" "),F.resource.displayName])),onPurchase(P){d.value=a.sub(d.value,P).max(0),x.value=a.add(x.value,1)},style:{color:n,width:"160px"},visibility:()=>I(ge.bought.value)})),{min:X,max:he,add:j,remove:be}=Vt({buyable:F,active:x}),ce=_e(0),He=v(()=>a.times(ce.value,1e6)),xe=v(()=>a.times(ce.value,1e4)),Te=v(()=>a.times(ce.value,1e4)),Ne=Me(()=>({resource:re.logs,cost(){let P=this.amount.value;return a.gte(P,100)&&(P=a.pow(P,2).div(100)),a.gte(P,1e4)&&(P=a.pow(P,2).div(1e4)),P=a.pow(.95,z.books.kilnBook.amount.value).times(P),a.pow(1.1,P).times(1e7)},display:E(()=>o(B,null,[o("h3",null,[u("Charcoal Kiln")]),o("br",null,null),u("Burn 1,000,000 logs for 10,000 coal and 10,000 ash"),o("br",null,null),o("br",null,null),u("Currently:"),o("br",null,null),u("-"),V(He.value),u(" logs/sec"),o("br",null,null),u("+"),V(xe.value),u(" coal/sec"),o("br",null,null),u("+"),V(Te.value),u(" ash/sec"),o("br",null,null),o("br",null,null),u("Cost: "),ee(r(Ne.cost)),u(" "),Ne.resource.displayName])),onPurchase(){ce.value=a.add(ce.value,1)},style:{color:n,width:"160px"},visibility:()=>I(qe.bought.value)})),{min:Re,max:K,add:Ae,remove:we}=Vt({buyable:Ne,active:ce}),Ce=_e(0),Oe=v(()=>a.times(a.pow(Ce.value,Ye.row2Upgrades[1].bought.value?2:1),5e7).times(nt.efficientDrill.bought.value?2:1)),Fe=Me(()=>({resource:nt.metal,cost(){let P=this.amount.value;return a.gte(P,100)&&(P=a.pow(P,2).div(100)),a.gte(P,1e4)&&(P=a.pow(P,2).div(1e4)),a.pow(1.15,P).times(10)},display:E(()=>o(B,null,[o("h3",null,[u("Mining Drill")]),o("br",null,null),u("Dig through the ground to find 50,000,000 coal"),o("br",null,null),o("br",null,null),u("Currently:"),o("br",null,null),u("+"),V(Oe.value),u(" coal/sec"),o("br",null,null),o("br",null,null),u("Cost: "),ee(r(Fe.cost)),u(" "),Fe.resource.displayName])),onPurchase(){Ce.value=a.add(Ce.value,1)},style:{color:n,width:"160px"},visibility:()=>I(nt.coalDrill.bought.value)})),{max:at,min:Qe,add:At,remove:de}=Vt({buyable:Fe,active:Ce}),$=G(()=>({resource:T(i),cost:5,display:{title:"Warmer Cutters",description:"Cut down twice as many trees/s"},style:{color:n}})),Ie=G(()=>({resource:T(i),cost:5,display:{title:"Warmer Planters",description:"Plant twice as many trees/s"},style:{color:n}})),te=G(()=>({resource:T(s),cost:5e3,display:{title:"Ashy Soil",description:"Trees give 25% more logs"},style:{color:n}})),ge=G(()=>({resource:S,cost:10,display:{title:"Bigger Fires",description:"Put all those fires together into a larger blaze"},onPurchase(){S.value=a.add(S.value,this.cost)},style:{color:n}})),st=[$,Ie,te,ge],Je=G(()=>({resource:T(i),cost:250,display:{title:"Dedicated Cutter Heaters",description:"Double the bonus from Heated Cutters"},style:{color:n},visibility:()=>I(ge.bought.value)})),Ge=G(()=>({resource:T(i),cost:250,display:{title:"Dedicated Planter Heaters",description:"Double the bonus from Heated Planters"},style:{color:n},visibility:()=>I(ge.bought.value)})),ft=G(()=>({canAfford(){return a.gte(re.logs.value,1e5)&&a.gte(s.value,1e5)},onPurchase(){re.logs.value=a.sub(re.logs.value,1e5),s.value=a.sub(s.value,1e5)},display:E(()=>o(B,null,[o("h3",null,[u("Mulched Soil")]),o("br",null,null),u("Double the bonus from Fertilized Soil"),o("br",null,null),o("br",null,null),u("Cost: "),ee(1e5),u(" "),re.logs.displayName,o("br",null,null),ee(1e5),u(" "),s.displayName])),style:{color:n},visibility:()=>I(ge.bought.value)})),qe=G(()=>({resource:re.logs,cost:1e7,display:{title:"Efficient Fires",description:"Move the fires underground to keep the coal from turning to ash"},style:{color:n},visibility:()=>I(ge.bought.value)})),Mt=[Je,Ge,ft,qe],U=G(()=>({resource:T(i),cost:1e19,display:{title:"Efficient Crucibles",description:"Double auto smelting speed and triple metal gain from auto smelting"},style:{color:n},visibility:()=>I(Ye.depthMilestones[4].earned.value)})),Le=[U],le=Me(()=>({resource:T(i),cost(){let P=this.amount.value;return a.gte(P,50)&&(P=a.pow(P,2).div(50)),a.gte(P,200)&&(P=a.pow(P,2).div(200)),a.gte(P,2e6)&&(P=a.pow(P,2).div(2e6)),P=a.pow(.95,z.books.heatedCuttersBook.amount.value).times(P),a.add(P,1).pow(2.5).times(10)},display:{title:"Heated Cutters",description:"Even warmer cutters cut down trees faster",effectDisplay:E(()=>o(B,null,[u("Cutters cut down trees "),V(oe.value),u("x faster")]))},style:{color:n},visibility:()=>I($.bought.value)})),H=Me(()=>({resource:T(i),cost(){let P=this.amount.value;return a.gte(P,50)&&(P=a.pow(P,2).div(50)),a.gte(P,200)&&(P=a.pow(P,2).div(200)),a.gte(P,2e6)&&(P=a.pow(P,2).div(2e6)),P=a.pow(.95,z.books.heatedPlantersBook.amount.value).times(P),a.add(P,1).pow(2.5).times(10)},display:{title:"Heated Planters",description:"Even warmer planters plant trees faster",effectDisplay:E(()=>o(B,null,[u("Planters plant trees "),V(Et.value),u("x faster")]))},style:{color:n},visibility:()=>I(Ie.bought.value)})),Dt=Me(()=>({resource:T(s),cost(){let P=this.amount.value;return a.gte(P,50)&&(P=a.pow(P,2).div(50)),a.gte(P,200)&&(P=a.pow(P,2).div(200)),a.gte(P,2e6)&&(P=a.pow(P,2).div(2e6)),P=a.pow(.95,z.books.fertilizerBook.amount.value).times(P),a.add(P,1).pow(1.5).times(5e4)},display:{title:"Fertilized Soil",description:"More fertilizer helps trees grow bigger",effectDisplay:E(()=>o(B,null,[u("Trees give "),V(Yt.value),u("x more logs")]))},style:{color:n},visibility:()=>I(te.bought.value)})),_t=[le,H,Dt],rt=Y(()=>[ie(()=>({addend(){return a.times(le.amount.value,.25)},description:"Heated Cutters",enabled(){return a.gt(le.amount.value,0)}})),C(()=>({multiplier:2,description:"Dedicated Cutter Heaters",enabled:Je.bought}))]),oe=v(()=>rt.apply(1)),St=Y(()=>[ie(()=>({addend(){return a.times(H.amount.value,.25)},description:"Heated Planters",enabled(){return a.gt(H.amount.value,0)}})),C(()=>({multiplier:2,description:"Dedicated Planter Heaters",enabled:Ge.bought}))]),Et=v(()=>St.apply(1)),Xt=Y(()=>[ie(()=>({addend(){return a.times(Dt.amount.value,.25)},description:"Fertilized Soil",enabled(){return a.gt(Dt.amount.value,0)}})),C(()=>({multiplier:2,description:"Mulched Soil",enabled:ft.bought}))]),Yt=v(()=>Xt.apply(1)),xt=Y(()=>[ie(()=>({addend(){return p.value},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),ie(()=>({addend(){return M.value},description:"Bonfires",enabled(){return a.gt(x.value,0)}})),ie(()=>({addend(){return xe.value},description:"Charcoal Kilns",enabled(){return a.gt(ce.value,0)}})),ie(()=>({addend(){return Oe.value},description:"Mining Drills",enabled(){return a.gt(Ce.value,0)}})),C(()=>({multiplier:2,description:"Carry coal in boxes",enabled:Ze.upgrades.coalUpgrade.bought})),C(()=>({multiplier:()=>a.div(Ze.buyables.coalBoxesBuyable.amount.value,2).add(1),description:"Carry more coal",enabled:Ze.upgrades.coalUpgrade.bought})),C(()=>({multiplier:()=>a.div(y.amount.value,1e4).add(1),description:"Small Fires Synergy",enabled:ke.elves.smallFireElf.bought})),C(()=>({multiplier:()=>a.div(F.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:ke.elves.bonfireElf.bought})),C(()=>({multiplier:()=>a.div(Ne.amount.value,100).times(Ve.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:ke.elves.kilnElf.bought})),C(()=>({multiplier:2,description:"Mining overalls",enabled:lt.metalUpgrades.metalUpgrade2.bought})),C(()=>({multiplier:3,description:"Mining helmet",enabled:lt.metalUpgrades.metalUpgrade3.bought})),C(()=>({multiplier:4,description:"Felt-Gripped Pick",enabled:lt.metalUpgrades.metalUpgrade4.bought})),C(()=>({multiplier:2,description:"12 Elves Trained",enabled:ke.milestones[11].earned})),Fn(()=>({exponent:1.25,description:"3 Elves Trained",enabled:ke.milestones[2].earned,supportLowNumbers:!0})),C(()=>({multiplier:()=>a.mul(Ye.depth.value,.25).add(1),description:"5m Well Depth",enabled:Ye.depthMilestones[0].earned})),C(()=>({multiplier:Ye.extractorCoal,description:"Heavy Extractor",enabled:()=>a.gt(Ye.activeExtractor.value,0)}))]),bt=v(()=>xt.apply(0)),wt=Y(()=>[ie(()=>({addend(){return m.value},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),ie(()=>({addend(){return k.value},description:"Bonfires",enabled(){return a.gt(x.value,0)}})),ie(()=>({addend(){return Te.value},description:"Charcoal Kilns",enabled(){return a.gt(ce.value,0)}})),C(()=>({multiplier:2,description:"Carry ash in boxes",enabled:Ze.upgrades.ashUpgrade.bought})),C(()=>({multiplier:()=>a.div(Ze.buyables.ashBoxesBuyable.amount.value,2).add(1),description:"Carry more ash",enabled:Ze.upgrades.ashUpgrade.bought})),C(()=>({multiplier:()=>a.div(y.amount.value,1e3).add(1),description:"Small Fires Synergy",enabled:ke.elves.smallFireElf.bought})),C(()=>({multiplier:()=>a.div(F.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:ke.elves.bonfireElf.bought})),C(()=>({multiplier:()=>a.div(Ne.amount.value,100).times(Ve.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:ke.elves.kilnElf.bought})),C(()=>({multiplier:4,description:"Mining boots",enabled:lt.metalUpgrades.metalUpgrade1.bought}))]),ol=v(()=>wt.apply(0)),Gt=Y(()=>[ie(()=>({addend(){return a.negate(c.value)},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),ie(()=>({addend(){return a.negate(W.value)},description:"Bonfires",enabled(){return a.gt(x.value,0)}})),ie(()=>({addend(){return a.negate(He.value)},description:"Charcoal Kilns",enabled(){return a.gt(ce.value,0)}}))]),Zt=v(()=>Gt.apply(0)),[el,wl]=nl(()=>[{title:"Log Consumption",modifier:Gt,base:0,visible(){return a.gt(d.value,0)||a.gt(x.value,0)||a.gt(ce.value,0)}},{title:"Coal Gain",modifier:xt,base:0,visible(){return a.gt(d.value,0)||a.gt(x.value,0)||a.gt(ce.value,0)}},{title:"Ash Gain",modifier:wt,base:0,visible(){return a.gt(d.value,0)||a.gt(x.value,0)||a.gt(ce.value,0)}}]),il=L(!1),Jl=E(()=>o(yt,{modelValue:il.value,"onUpdate:modelValue":P=>il.value=P},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:el}));je.on("update",P=>{a.lt(J.day.value,an)||a.times(P,Zt.value).negate().gt(re.logs.value)||(re.logs.value=a.times(P,Zt.value).plus(re.logs.value),i.value=a.times(P,bt.value).plus(i.value),s.value=a.times(P,ol.value).plus(s.value),d.value=a.max(d.value,0))});const{total:Nl,trackerDisplay:Xl}=dl({resource:i,goal:1e7,name:e,day:an,color:t,modal:{show:il,display:Jl}});return{name:e,color:t,coal:i,totalCoal:Nl,computedCoalGain:bt,ash:s,activeFires:d,buildFire:y,activeBonfires:x,buildBonfire:F,activeKilns:ce,buildKiln:Ne,activeDrills:Ce,buildDrill:Fe,warmerCutters:$,warmerPlanters:Ie,basicFertilizer:te,unlockBonfire:ge,dedicatedCutters:Je,dedicatedPlanters:Ge,betterFertilizer:ft,unlockKiln:qe,efficientSmelther:U,heatedCutters:le,heatedPlanters:H,moreFertilizer:Dt,computedHeatedCutterEffect:oe,computedHeatedPlanterEffect:Et,computedFertilizerEffect:Yt,generalTabCollapsed:wl,minWidth:700,display:E(()=>o(B,null,[Z(Xl),o(fe,null,null),o(It,{resource:i,color:t,style:"margin-bottom: 0",effectDisplay:a.gt(bt.value,0)?`+${V(bt.value)}/s`:void 0},null),o(fe,null,null),o(It,{resource:s,color:l,style:"margin-bottom: 0",effectDisplay:a.gt(ol.value,0)?`+${V(ol.value)}/s`:void 0},null),o(fe,null,null),o(Pl,null,{default:()=>[o(Pt,null,{default:()=>[Z(y),o("div",null,[ee(a.floor(d.value)),u("/"),ee(a.floor(y.amount.value))]),We(h,_,g,b)]}),ge.bought.value?o(B,null,[o(fe,null,null),o(Pt,null,{default:()=>[Z(F),o("div",null,[ee(x.value),u("/"),ee(F.amount.value)]),We(X,be,j,he)]})]):void 0,qe.bought.value?o(B,null,[o(fe,null,null),o(Pt,null,{default:()=>[Z(Ne),o("div",null,[ee(ce.value),u("/"),ee(Ne.amount.value)]),We(Re,we,Ae,K)]})]):void 0,nt.coalDrill.bought.value?o(B,null,[o(fe,null,null),o(Pt,null,{default:()=>[Z(Fe),o("div",null,[ee(Ce.value),u("/"),ee(Fe.amount.value)]),We(Qe,de,At,at)]})]):void 0]}),o(fe,null,null),El(st,Mt,Le),We(..._t)]))}}),Er="workshop",Fl=2,Nt=Ut(Er,function(){const e="Workshop",t="#D66B02",l="#D66B02",n=ct(0,"foundation progress"),i=js(()=>({scaling:Ra(250,1.5),baseResource:re.logs,gainResource:T(n),roundUpCost:!0,buyMax:!1,spend(F,X){re.logs.value=a.sub(re.logs.value,X)}})),s=Tt(()=>({display:E(()=>o(B,null,[o("b",{style:"font-size: x-large"},[u("Build part of the foundation")]),o("br",null,null),o("br",null,null),o("span",{style:"font-size: large"},[u("Cost:")," ",Kl(re.logs,a.gte(i.actualGain.value,1)?i.currentAt.value:i.nextAt.value)," ",re.logs.displayName])])),visibility:()=>I(a.lt(n.value,100)),canClick:()=>a.gte(i.actualGain.value,1)&&a.lt(n.value,100),onClick(){!r(this.canClick)||i.convert()},style:"width: 600px; min-height: unset"})),d=xl(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{s.canClick.value&&s.onClick()}})),c=v(()=>!ke.milestones[6].earned.value),p=ye(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>a.gte(n.value,1),showPopups:c})),m=ye(()=>({display:{requirement:"10% Foundation Completed",effectDisplay:"Cut an additional tree per second for each 5% of foundation completed"},shouldEarn:()=>a.gte(n.value,10),visibility:()=>I(p.earned.value),showPopups:c})),y=ye(()=>({display:{requirement:"20% Foundation Completed",effectDisplay:"Plant an additional tree per second for each 10% of foundation completed"},shouldEarn:()=>a.gte(n.value,20),visibility:()=>I(m.earned.value),showPopups:c})),h=ye(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>a.gte(n.value,30),visibility:()=>I(y.earned.value),showPopups:c})),b=ye(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>a.gte(n.value,40),visibility:()=>I(h.earned.value),showPopups:c})),g=ye(()=>({display:{requirement:"50% Foundation Completed",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte(n.value,50),visibility:()=>I(b.earned.value),showPopups:c})),_=ye(()=>({display:{requirement:"75% Foundation Completed",effectDisplay:"The forest gains an extra tree for every 2% of foundation completed"},shouldEarn:()=>a.gte(n.value,75),visibility:()=>I(g.earned.value),showPopups:c})),S=ye(()=>({display:{requirement:"100% Foundation Completed",effectDisplay:"Log per tree is raised to the 1.2th power"},shouldEarn:()=>a.gte(n.value,100),visibility:()=>I(_.earned.value),showPopups:c})),x={logGainMilestone1:p,autoCutMilestone1:m,autoPlantMilestone1:y,autoCutMilestone2:h,autoPlantMilestone2:b,logGainMilestone2:g,morePlantsMilestone1:_,logGainMilestone3:S},{collapseMilestones:W,display:M}=Hl(x),k=Wt(()=>({direction:Be.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>J.day.value===Fl?a.div(n.value,100):1,display:E(()=>J.day.value===Fl?o(B,null,[ee(n.value),u("%")]):"")}));return Ft(()=>{J.day.value===Fl&&a.gte(n.value,100)&&J.completeDay()}),{name:e,day:Fl,color:t,foundationProgress:n,foundationConversion:i,milestones:x,collapseMilestones:W,minWidth:700,buildFoundationHK:d,display:E(()=>o(B,null,[o("div",null,[J.day.value===Fl?"Complete the foundation to complete the day":`${e} Complete!`]),Z(k),o(fe,null,null),o("div",null,[o("span",null,[u("The foundation is ")]),o("h2",{style:`color: ${t}; text-shadow: 0 0 10px ${t}`},[ee(n.value)]),u("% completed")]),a.lt(n.value,100)?o(fe,null,null):null,Z(s),o(fe,null,null),M()]))}}),Br="elves",Ul=4,ke=Ut(Br,function(){const e="Elves",t="red",l="#911D21",i=Wt(()=>({direction:Be.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>J.day.value===Ul?a.div($.value,6).times(.8333333333333334).add(a.div(a.add(R.coal.value,1).log10(),a.log10(1e9)).clamp(0,1).div(6)):1,display:E(()=>J.day.value===Ul?a.lt($.value,6)?o(B,null,[ee($.value),u("/6 elves")]):o(B,null,[ee(R.coal.value),u("/"),ee(1e9),u(" coal")]):"")})),s=br(()=>({thingsToReset:[re,Nt,R],onReset(){setTimeout(()=>{Mt.earned.value?(re.row1Upgrades.forEach(oe=>oe.bought.value=!0),re.row2Upgrades.forEach(oe=>oe.bought.value=!0)):te.earned.value&&(re.row1Upgrades[4].bought.value=!0,re.row2Upgrades[4].bought.value=!0),ft.earned.value&&(Nt.foundationProgress.value=100),Le.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)})}})),d=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.cuttersBook.amount.value,.1).add(1),description:"Now You're Logging!",enabled:()=>a.gt(z.books.cuttersBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),c=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.plantersBook.amount.value,.1).add(1),description:"The Man Who Planted Trees",enabled:()=>a.gt(z.books.plantersBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),p=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.expandersBook.amount.value,.1).add(1),description:"Logjam",enabled:()=>a.gt(z.books.expandersBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),m=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.heatedCuttersBook.amount.value,.1).add(1),description:"Fahrenheit 451",enabled:()=>a.gt(z.books.heatedCuttersBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),y=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.heatedPlantersBook.amount.value,.1).add(1),description:"Tillamook Burn Country",enabled:()=>a.gt(z.books.heatedPlantersBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),h=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.fertilizerBook.amount.value,.1).add(1),description:"The Garden Tree's Handbook",enabled:()=>a.gt(z.books.fertilizerBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),b=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.smallFireBook.amount.value,.1).add(1),description:"Firestarter",enabled:()=>a.gt(z.books.smallFireBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),g=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.bonfireBook.amount.value,.1).add(1),description:"An Arsonist's Guide to Writer's Homes in New England",enabled:()=>a.gt(z.books.bonfireBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),_=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.kilnBook.amount.value,.1).add(1),description:"Little Fires Everywhere",enabled:()=>a.gt(z.books.kilnBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),S=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.paperBook.amount.value,.1).add(1),description:"The Book Thief",enabled:()=>a.gt(z.books.paperBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),x=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.boxBook.amount.value,.1).add(1),description:"Not a box",enabled:()=>a.gt(z.books.boxBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),W=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.clothBook.amount.value,.1).add(1),description:"Fuzzy Bee and Friends",enabled:()=>a.gt(z.books.clothBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),[M,k]=nl(()=>[{title:"Holly Auto-Buy Frequency",modifier:d,base:10,unit:"/s",visible:de.cuttersElf.bought},{title:"Ivy Auto-Buy Frequency",modifier:c,base:10,unit:"/s",visible:de.plantersElf.bought},{title:"Hope Auto-Buy Frequency",modifier:p,base:10,unit:"/s",visible:de.expandersElf.bought},{title:"Jack Auto-Buy Frequency",modifier:m,base:10,unit:"/s",visible:de.heatedCuttersElf.bought},{title:"Mary Auto-Buy Frequency",modifier:y,base:10,unit:"/s",visible:de.heatedPlantersElf.bought},{title:"Noel Auto-Buy Frequency",modifier:h,base:10,unit:"/s",visible:de.fertilizerElf.bought},{title:"Joy Auto-Buy Frequency",modifier:b,base:10,unit:"/s",visible:de.smallFireElf.bought},{title:"Faith Auto-Buy Frequency",modifier:g,base:10,unit:"/s",visible:de.bonfireElf.bought},{title:"Snowball Auto-Buy Frequency",modifier:_,base:10,unit:"/s",visible:de.kilnElf.bought},{title:"Star Auto-Buy Frequency",modifier:S,base:10,unit:"/s",visible:de.paperElf.bought},{title:"Bell Auto-Buy Frequency",modifier:x,base:10,unit:"/s",visible:de.boxElf.bought},{title:"Gingersnap Auto-Buy Frequency",modifier:W,base:10,unit:"/s",visible:de.clothElf.bought}]),F=L(!1),X=E(()=>o(yt,{modelValue:F.value,"onUpdate:modelValue":oe=>F.value=oe},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:M})),he=v(()=>{let oe=a.pow(4,$.value).times(1e6);return a.gte($.value,9)&&(oe=a.times(oe,1e15)),oe});function j(oe){var ol;const St=_e(0),Et=_e(0),Xt=oe.hasToggle?_e(!1):L(!0),Yt=v(()=>oe.cooldownModifier.apply(10)),xt=ht((ol=oe.canBuy)!=null?ol:!0);function bt(Gt){if(wt.bought.value&&r(xt)){St.value=a.add(St.value,Gt);const Zt=a.recip(Yt.value);Et.value+=Gt/Zt.toNumber(),(_a(oe.buyable)?oe.buyable:[oe.buyable]).forEach(el=>{var wl;for(;a.gte(St.value,Zt);)if(oe.customCost==null?r(el.canPurchase):a.gte(el.resource.value,oe.customCost(el.amount.value)))el.amount.value=a.add(el.amount.value,1),St.value=a.sub(St.value,Zt),(wl=oe.onAutoPurchase)==null||wl.call(oe);else{St.value=Zt;break}})}}const wt=G(()=>({...oe,buyable:void 0,toggle:Xt,buyProgress:St,update:bt,resource:R.coal,cost:he,computedAutoBuyCooldown:Yt,amountOfTimesDone:Et,name:oe.name,display:()=>({title:oe.name,description:E(()=>o(B,null,[oe.description,wt.bought.value?null:o(B,null,[" ",u("Training this elf will require resetting all your progress from days 1-3.")]),wt.bought.value&&oe.hasToggle===!0?o(B,null,[o(sl,{title:oe.toggleDesc,"onUpdate:modelValue":Gt=>Xt.value=Gt,modelValue:Xt.value},null)]):null])),showCost:!wt.bought.value}),style:"width: 190px",onPurchase(){var Gt;(Gt=oe.onPurchase)==null||Gt.call(oe),s.reset()}}));return wt}const be=j({name:"Holly",description:"Holly will automatically purchase cutters you can afford, without actually spending any logs.",buyable:re.row1Buyables[0],cooldownModifier:d}),ce=j({name:"Ivy",description:"Ivy will automatically purchase planters you can afford, without actually spending any logs.",buyable:re.row1Buyables[1],cooldownModifier:c}),He=j({name:"Hope",description:"Hope will automatically purchase forest expanders you can afford, without actually spending any logs.",buyable:re.row1Buyables[2],cooldownModifier:p}),xe=[be,ce,He],Te=j({name:"Jack",description:"Jack will automatically purchase heated cutters you can afford, without actually spending any coal.",buyable:R.heatedCutters,cooldownModifier:m}),Ne=j({name:"Mary",description:"Mary will automatically purchase heated planters you can afford, without actually spending any coal.",buyable:R.heatedPlanters,cooldownModifier:y}),Re=j({name:"Noel",description:"Noel will automatically purchase fertilized soil you can afford, without actually spending any ash.",buyable:R.moreFertilizer,cooldownModifier:h}),K=[Te,Ne,Re],Ae=j({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:b,visibility:()=>I(Ze.upgrades.logsUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased small fires",onAutoPurchase(){Ae.toggle.value&&(R.activeFires.value=a.add(R.activeFires.value,1))},onPurchase(){J.days[4].recentlyUpdated.value=!0}}),we=j({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:g,visibility:()=>I(Ze.upgrades.ashUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased bonfires",onAutoPurchase(){const oe=r(this.buyable.cost);R.activeFires.value=a.sub(R.activeFires.value,oe).max(0),R.buildFire.amount.value=a.sub(R.buildFire.amount.value,oe).max(0),we.toggle.value&&(R.activeBonfires.value=a.add(R.activeBonfires.value,1))},onPurchase(){J.days[4].recentlyUpdated.value=!0},canBuy:R.unlockBonfire.bought}),Ce=j({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:()=>I(Ze.upgrades.coalUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased kilns",onAutoPurchase(){Ce.toggle.value&&(R.activeKilns.value=a.add(R.activeKilns.value,1))},onPurchase(){J.days[4].recentlyUpdated.value=!0},canBuy:R.unlockKiln.bought}),Oe=[Ae,we,Ce],Fe=j({name:"Star",description:"Star will automatically purchase all books you can afford, without actually spending any paper.",buyable:Object.values(z.books),cooldownModifier:S,visibility:()=>I(Ue.elfUpgrades.paperElf.bought.value)}),at=j({name:"Bell",description:"Bell will automatically purchase all box buyables you can afford, without actually spending any boxes.",buyable:Object.values(Ze.buyables),cooldownModifier:x,visibility:()=>I(Ue.elfUpgrades.boxElf.bought.value)}),Qe=j({name:"Gingersnap",description:"Gingersnap will automatically purchase all cloth buyables you can afford, without actually spending any resources.",buyable:[lt.buildPens,lt.betterShears,lt.fasterSpinning],cooldownModifier:W,visibility:()=>I(Ue.elfUpgrades.clothElf.bought.value)}),At=[Fe,at,Qe],de={cuttersElf:be,plantersElf:ce,expandersElf:He,heatedCuttersElf:Te,heatedPlantersElf:Ne,fertilizerElf:Re,smallFireElf:Ae,bonfireElf:we,kilnElf:Ce,paperElf:Fe,boxElf:at,clothElf:Qe},$=v(()=>Object.values(de).filter(oe=>oe.bought.value).length),Ie=ye(()=>({display:{requirement:"1 Elf Trained",effectDisplay:"Manual cutting and planting can happen twice as often for each trained elf"},shouldEarn:()=>a.gte($.value,1)})),te=ye(()=>({display:{requirement:"2 Elves Trained",effectDisplay:"Research I & II aren't reset after training"},shouldEarn:()=>a.gte($.value,2),visibility:()=>I(Ie.earned.value)})),ge=ye(()=>({display:{requirement:"3 Elves Trained",effectDisplay:"Coal gain is raised to the 1.25"},shouldEarn:()=>a.gte($.value,3),visibility:()=>I(te.earned.value)})),st=ye(()=>({display:{requirement:"4 Elves Trained",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte($.value,4),visibility:()=>I(ge.earned.value)})),Je=ye(()=>({display:{requirement:"5 Elves Trained",effectDisplay:"Forest is twice as large"},shouldEarn:()=>a.gte($.value,5),visibility:()=>I(st.earned.value)})),Ge=ye(()=>({display:{requirement:"6 Elves Trained",effectDisplay:"Elves work twice as fast"},shouldEarn:()=>a.gte($.value,6),visibility:()=>I(Je.earned.value)})),ft=ye(()=>({display:{requirement:"7 Elves Trained",effectDisplay:"Workshop Foundation starts at 100% complete after training"},shouldEarn:()=>a.gte($.value,7),visibility:()=>I(Ge.earned.value&&J.day.value>5)})),qe=ye(()=>({display:{requirement:"8 Elves Trained",effectDisplay:"Forest is twice as large (again)"},shouldEarn:()=>a.gte($.value,8),visibility:()=>I(ft.earned.value)})),Mt=ye(()=>({display:{requirement:"9 Elves Trained",effectDisplay:"Trees upgrades aren't reset after training"},shouldEarn:()=>a.gte($.value,9),visibility:()=>I(qe.earned.value)})),U=ye(()=>({display:{requirement:"10 Elves Trained",effectDisplay:"Elves work twice as fast (again)"},shouldEarn:()=>a.gte($.value,10),visibility:()=>I(J.day.value>=10)})),Le=ye(()=>({display:{requirement:"11 Elves Trained",effectDisplay:"Coal upgrades aren't reset after training"},shouldEarn:()=>a.gte($.value,11),visibility:()=>I(U.earned.value)})),le=ye(()=>({display:{requirement:"12 Elves Trained",effectDisplay:"Double coal gain"},shouldEarn:()=>a.gte($.value,12),visibility:()=>I(Le.earned.value)})),H=[Ie,te,ge,st,Je,Ge,ft,qe,Mt,U,Le,le],Dt={manualMilestone:Ie,researchMilestone:te,coalGainMilestone:ge,logGainMilestone:st,forestMilestone:Je,elvesMilestone:Ge,foundationMilestone:ft,forestMilestone2:qe,treeUpgradesMilestone:Mt,elvesMilestone2:U,coalUpgradesMilestone:Le,coalGainMilestone2:le},{collapseMilestones:_t,display:rt}=Hl(Dt);return je.on("update",oe=>{a.lt(J.day.value,Ul)||Object.values(de).forEach(St=>St.update(oe))}),Ft(()=>{J.day.value===Ul&&a.gte($.value,6)&&a.gte(R.coal.value,1e9)&&J.completeDay()}),{name:e,color:t,elves:de,totalElves:$,milestones:H,collapseMilestones:_t,generalTabCollapsed:k,minWidth:700,display:E(()=>o(B,null,[o("div",null,[J.day.value===Ul?`Reach ${ee(6)} trained elves and ${ee(1e9)} ${R.coal.displayName} to complete the day`:`${e} Complete!`," ",u("-")," ",o("button",{class:"button",style:"display: inline-block;",onClick:()=>F.value=!0},[u("Check Modifiers")])]),Z(i),Z(X),o(fe,null,null),o("div",{style:"width: 600px"},[El(xe,K,Oe,At)]),rt()]))}}),Nr="management",Rl=12,Ll=Ut(Nr,()=>{const e="Management",t="green",l=Wt(()=>({direction:Be.Right,width:600,height:25,fillStyle:`backgroundColor: ${t}`,progress:()=>J.day.value===Rl?n.value/(ke.totalElves.value*5):1,display:E(()=>J.day.value===Rl?o(B,null,[ee(n.value),u("/"),ee(ke.totalElves.value*5)," ",u("elf levels")]):"")})),n=v(()=>{let U=0;for(const Le of Object.values(At))U+=Le.level.value;return U}),i=G(()=>({display:{title:"Teach the Elves",description:"The Elves probably need to be taught if they're to do better. Maybe you'll build a school so you can teach them?"},resource:re.logs,cost:1e21})),s=G(()=>({display:{title:"Add a Classroom?",description:"Yay, you have a school. Too bad it has pretty much nothing in it. Maybe you could add some classrooms to make it less boring and more enticing to the Elves?"},resources:Ze.boxes,cost:1e13})),d=Y(()=>[C(()=>({multiplier:()=>ge.value,description:"Classroom Effect",enabled:()=>s.bought.value}))]),c=d.apply(1);function p(U,Le,...le){const H=_e(0),Dt=v(()=>a.pow(10,_t.value).mul(1e4)),_t=v(()=>a.min(a.mul(9,H.value).div(1e4).add(1).log10().floor().toNumber(),Ie.amount.value).toNumber()),rt=v(()=>a.sub(H.value,a.pow(10,_t.value).sub(1).div(9).mul(1e4))),oe=Wt(()=>({direction:Be.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(rt.value,Dt.value)})),{collapseMilestones:St,display:Et}=Hl(Le),Xt=Y(()=>[C(()=>({multiplier:c,description:"Global XP Multiplier"})),...le]),Yt=v(()=>Xt.apply(1));return Tt(()=>({display:{title:U.name,description:E(()=>o(B,null,[U.name,u(" is currently at level "),ee(_t.value),u("! They have achieved a total of "),V(H.value),u(" XP, and have")," ",V(rt.value),u("/"),V(Dt.value),u(" XP. They buy buyables "),ee(U.computedAutoBuyCooldown.value),u(" times per second, gaining")," ",a.gte(_t.value,Ie.amount.value)?0:V(a.mul(Yt.value,U.computedAutoBuyCooldown.value))," ",u("XP/sec.")," ",a.gte(_t.value,Ie.amount.value)?o("div",{style:"color: red"},[u("This elf cannot gain any XP because it has exceeded the maximum level from schools.")]):void 0,X.value!==U.name?"Click to see this elf's milestones.":void 0,Z(oe)]))},style:"width: 190px",onClick(){X.value=U.name},canClick(){return X.value!==U.name},state:St,displayMilestone:Et,level:_t,exp:H,milestones:Le,timeForExp:U.computedAutoBuyCooldown,amountOfTimesDone:U.amountOfTimesDone,elfXPGainComputed:Yt,elfXPGain:Xt}))}const m=[ye(()=>({display:()=>({requirement:"Holly Level 1",effectDisplay:"Cutting speed multiplies log gain."}),shouldEarn:()=>j.level.value>=1})),ye(()=>({display:{requirement:"Holly Level 2",effectDisplay:"Holly now buys max."},visibility:I(m[0].earned.value),shouldEarn:()=>j.level.value>=2})),ye(()=>({display:{requirement:"Holly Level 3",effectDisplay:"Cutting speed multiplies cloth gain, wool gain (increasing the requirement as well), and sheep gain."},visibility:I(m[1].earned.value),shouldEarn:()=>j.level.value>=3}))],y=[ye(()=>({display:{requirement:"Ivy Level 1",effectDisplay:"Planters are now twice as efficent."},shouldEarn:()=>be.level.value>=1})),ye(()=>({display:{requirement:"Ivy Level 2",effectDisplay:"Ivy now buys max."},visibility:I(y[0].earned.value),shouldEarn:()=>be.level.value>=2})),ye(()=>({display:{requirement:"Ivy Level 3",effectDisplay:"???"},visibility:I(y[1].earned.value),shouldEarn:()=>be.level.value>=3})),ye(()=>({display:{requirement:"Ivy Level 4",effectDisplay:"???"},visibility:I(y[2].earned.value),shouldEarn:()=>be.level.value>=4})),ye(()=>({display:{requirement:"Ivy Level 5",effectDisplay:"???"},visibility:I(y[3].earned.value),shouldEarn:()=>be.level.value>=5}))],h=[ye(()=>({display:{requirement:"Hope Level 1",effectDisplay:"???"},shouldEarn:()=>ce.level.value>=1}))],b=[],g=[],_=[],S=[],x=[],W=[],M=[],k=[],F=[],X=_e("Holly"),he=v(()=>{let U={displayMilestone:E(()=>"")};switch(X.value){case"Holly":U=j;break;case"Ivy":U=be;break;case"Hope":U=ce;break;case"Jack":U=xe;break;case"Mary":U=Te;break;case"Noel":U=Ne;break;case"Joy":U=K;break;case"Faith":U=Ae;break;case"Snowball":U=we;break;case"Star":U=Oe;break;case"Bell":U=Fe;break;case"Gingersnap":U=at;break;default:console.warn("This should not happen.",X.value);break}return{name:X.value,disp:U.displayMilestone}}),j=p(ke.elves.cuttersElf,m),be=p(ke.elves.plantersElf,y),ce=p(ke.elves.expandersElf,h),He=[j,be,ce],xe=p(ke.elves.heatedCuttersElf,b),Te=p(ke.elves.heatedPlantersElf,g),Ne=p(ke.elves.fertilizerElf,_),Re=[xe,Te,Ne],K=p(ke.elves.smallFireElf,S),Ae=p(ke.elves.bonfireElf,x),we=p(ke.elves.kilnElf,W),Ce=[K,Ae,we],Oe=p(ke.elves.paperElf,M),Fe=p(ke.elves.boxElf,k),at=p(ke.elves.clothElf,F),Qe=[Oe,Fe,at],At={cutterElfTraining:j,planterElfTraining:be,expandersElfTraining:ce,heatedCutterElfTraining:xe,heatedPlanterElfTraining:Te,fertilizerElfTraining:Ne,smallfireElfTraining:K,bonfireElfTraining:Ae,kilnElfTraining:we,paperElfTraining:Oe,boxElfTraining:Fe,clothElfTraining:at};je.on("update",()=>{if(!(J.day.value=1&&a.lt(U.level.value,Ie.amount.value)&&(U.amountOfTimesDone.value-=Le,U.exp.value=a.mul(U.elfXPGainComputed.value,Le).add(U.exp.value))}});const de=E(()=>o(B,null,[he.value.name,u("'s milestones: "),he.value.disp()])),$=v(()=>{const U=a.pow(10,Ie.amount.value);return{wood:U.mul(1e21),coal:U.mul(1e32),paper:U.mul(1e19),boxes:U.mul(1e13),metalIngots:U.mul(1e12),cloth:U.mul(1e4),plastic:U.mul(1e6),dye:a.add(Ie.amount.value,1).mul(1e4)}}),Ie=Me(()=>({display:E(()=>o(B,null,[o("h3",null,[u("Build a School")]),o("div",null,[u("You gotta start somewhere, right? Each school increases the maximum level for elves by 1. Maximum of 5.")]),o("div",null,[u("You have "),ee(Ie.amount.value),u(" schools.")]),o("div",null,[u("They are currently letting elves learn up to level")," ",ee(Ie.amount.value),u(".")]),o("div",null,[u("Costs "),V($.value.wood),u(" logs, "),V($.value.coal)," ",u("coal, "),V($.value.paper),u(" paper, "),V($.value.boxes)," ",u("boxes, "),V($.value.metalIngots),u(" metal ingots,")," ",V($.value.cloth),u(" cloth, "),V($.value.plastic)," ",u("plastic, and requires "),V($.value.dye),u(" of red, yellow, and blue dye")])])),canPurchase(){return $.value.wood.lte(re.logs.value)&&$.value.coal.lte(R.coal.value)&&$.value.paper.lte(z.paper.value)&&$.value.boxes.lte(Ze.boxes.value)&&$.value.metalIngots.lte(nt.metal.value)&&$.value.cloth.lte(lt.cloth.value)&&$.value.plastic.lte(Ue.plastic.value)&&$.value.dye.lte(Ve.dyes.blue.amount.value)&&$.value.dye.lte(Ve.dyes.red.amount.value)&&$.value.dye.lte(Ve.dyes.yellow.amount.value)},onPurchase(){re.logs.value=a.sub(re.logs.value,$.value.wood),R.coal.value=a.sub(R.coal.value,$.value.coal),z.paper.value=a.sub(z.paper.value,$.value.paper),Ze.boxes.value=a.sub(Ze.boxes.value,$.value.boxes),nt.metal.value=a.sub(nt.metal.value,$.value.metalIngots),lt.cloth.value=a.sub(lt.cloth.value,$.value.cloth),Ue.plastic.value=a.sub(Ue.plastic.value,$.value.plastic),this.amount.value=a.add(this.amount.value,1)},purchaseLimit:5,visibility:v(()=>I(i.bought.value)),style:"width: 600px"})),te=v(()=>{const U=a.add(Ie.amount.value,1).pow(1.5);return{wood:U.mul(1e21),coal:U.mul(1e32),paper:U.mul(1e19),boxes:U.mul(1e13),metalIngots:U.mul(1e12),cloth:U.mul(1e4),plastic:U.mul(1e6),dye:U.mul(1e4)}}),ge=v(()=>a.add(st.amount.value,1).sqrt()),st=Me(()=>({display:E(()=>o(B,null,[o("h3",null,[u("Build a Classroom")]),o("div",null,[u("Hopefully it makes the school a bit less boring. Multiplies elves' XP gain by")," ",o(Oa,null,{default:()=>[u("Classrooms + 1")]}),u(".")]),o("div",null,[u("You have "),ee(Ie.amount.value),u(" classrooms.")]),o("div",null,[u("They are currently multiplying elves' XP gain by "),V(ge.value)]),o("div",null,[u("Costs "),V(te.value.wood),u(" logs,")," ",V(te.value.coal),u(" coal, "),V(te.value.paper)," ",u("paper, "),V(te.value.boxes),u(" boxes,")," ",V(te.value.metalIngots),u(" metal ingots,")," ",V(te.value.cloth),u(" cloth, "),V(te.value.plastic)," ",u("plastic, and requires "),V(te.value.dye),u(" of red, yellow, and blue dye")])])),canPurchase(){return te.value.wood.lte(re.logs.value)&&te.value.coal.lte(R.coal.value)&&te.value.paper.lte(z.paper.value)&&te.value.boxes.lte(Ze.boxes.value)&&te.value.metalIngots.lte(nt.metal.value)&&te.value.cloth.lte(lt.cloth.value)&&te.value.plastic.lte(Ue.plastic.value)&&te.value.dye.lte(Ve.dyes.blue.amount.value)&&te.value.dye.lte(Ve.dyes.red.amount.value)&&te.value.dye.lte(Ve.dyes.yellow.amount.value)},onPurchase(){re.logs.value=a.sub(re.logs.value,te.value.wood),R.coal.value=a.sub(R.coal.value,te.value.coal),z.paper.value=a.sub(z.paper.value,te.value.paper),Ze.boxes.value=a.sub(Ze.boxes.value,te.value.boxes),nt.metal.value=a.sub(nt.metal.value,te.value.metalIngots),lt.cloth.value=a.sub(lt.cloth.value,te.value.cloth),Ue.plastic.value=a.sub(Ue.plastic.value,te.value.plastic),this.amount.value=a.add(this.amount.value,1)},visibility:v(()=>I(s.bought.value)),style:"width: 600px"})),Je=mr({training:()=>({tab:wa(()=>({display:E(()=>o(B,null,[El(He,Re,Ce,Qe),o(fe,null,null),de()]))})),display:"Elf Training"}),teaching:()=>({tab:wa(()=>({display:E(()=>o(B,null,[Z(Ie),u(" "),Z(st)," ",El([i,s])]))})),display:"The Schools"}),info:()=>({tab:wa(()=>({display:E(()=>o(B,null,[u("Each elf gains experience points (XP) every time they perform their action (they don't have to buy anything though). When they get enough XP, they can level up, granting special rewards.")]))})),display:"Info"})}),[Ge,ft]=nl(()=>[{title:"Global XP Gain",modifier:d,unit:" XP"},{title:"Holly XP Gain per Action",modifier:j.elfXPGain,unit:" XP"},{title:"Ivy XP Gain per Action",modifier:be.elfXPGain,unit:" XP"},{title:"Hope XP Gain per Action",modifier:ce.elfXPGain,unit:" XP"},{title:"Jack XP Gain per Action",modifier:xe.elfXPGain,unit:" XP"},{title:"Mary XP Gain per Action",modifier:Te.elfXPGain,unit:" XP"},{title:"Noel XP Gain per Action",modifier:Ne.elfXPGain,unit:" XP"},{title:"Joy XP Gain per Action",modifier:K.elfXPGain,unit:" XP"},{title:"Faith XP Gain per Action",modifier:Ae.elfXPGain,unit:" XP"},{title:"Snowball XP Gain per Action",modifier:we.elfXPGain,unit:" XP"},{title:"Star XP Gain per Action",modifier:Oe.elfXPGain,unit:" XP"},{title:"Bell XP Gain per Action",modifier:Fe.elfXPGain,unit:" XP"},{title:"Gingersnap XP Gain per Action",modifier:at.elfXPGain,unit:" XP"}]),qe=L(!1),Mt=E(()=>o(yt,{modelValue:qe.value,"onUpdate:modelValue":U=>qe.value=U},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:Ge}));return{name:e,day:Rl,color:t,minWidth:700,elfTraining:At,currentShown:X,tabs:Je,generalTabCollapsed:ft,teaching:i,schools:Ie,classrooms:st,classroomUpgrade:s,display:E(()=>o(B,null,[o(B,null,[J.day.value===Rl?"Get all elves to level 5.":`${e} Complete!`," ",u("-"),o("button",{class:"button",style:"display: inline-block;",onClick:()=>qe.value=!0},[u("Check Modifiers")]),Z(Mt),Z(l),Z(Je)])]))}}),Ir="cloth",nn=8,lt=Ut(Ir,function(){const e="Cloth",t="white",l=ct(0,"cloth"),n=ct(0,"wool"),i=ct(10,"sheep"),s=_e(0),d=Wt(()=>({direction:Be.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:()=>a.div(s.value,Qe.value)})),c=Tt(()=>({display:{title:"Breed sheep",description:E(()=>o(B,null,[u("Breed "),me(a.floor(Fe.value)),u(" sheep"),o("br",null,null),Z(d)]))},style:{minHeight:"80px"},canClick:()=>a.gte(s.value,Qe.value),onClick(){if(a.lt(s.value,Qe.value))return;const le=a.floor(Fe.value);i.value=a.add(i.value,le),s.value=0}})),p=_e(0),m=Wt(()=>({direction:Be.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:()=>a.div(p.value,Ie.value)})),y=Tt(()=>({display:{title:"Shear sheep",description:E(()=>o(B,null,[u("Shear up to "),me(a.floor(de.value)),u(" sheep"),o("br",null,null),Z(m)]))},style:{minHeight:"80px"},canClick:()=>a.gte(p.value,Ie.value),onClick(){if(a.lt(p.value,Ie.value))return;const le=a.min(i.value,de.value).floor();n.value=a.add(n.value,le),p.value=0}})),h=_e(0),b=Wt(()=>({direction:Be.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:()=>a.div(h.value,Je.value)})),g=Tt(()=>({display:{title:"Spinning wool",description:E(()=>o(B,null,[u("Spin "),me(a.floor(ge.value)),u(" wool"),o("br",null,null),Z(b)]))},style:{minHeight:"80px"},canClick:()=>a.gte(h.value,Je.value),onClick(){if(a.lt(h.value,Je.value))return;const le=a.min(n.value,ge.value).floor();l.value=a.add(l.value,le),n.value=a.sub(n.value,le),h.value=0}})),_=xl(()=>({key:"b",description:'Press the "Breed Sheep" button',onPress:()=>{c.canClick.value&&c.onClick()}})),S=xl(()=>({key:"h",description:'Press the "Shear Sheep" button',onPress:()=>{y.canClick.value&&y.onClick()}})),x=xl(()=>({key:"s",description:'Press the "Spin Wool" button',onPress:()=>{g.canClick.value&&g.onClick()}})),W=Me(()=>({resource:re.logs,cost(){let le=this.amount.value;return a.gte(le,100)&&(le=a.pow(le,2).div(100)),le=a.pow(.95,z.books.clothBook.amount.value).times(le),a.pow(1.5,le).times(1e14)},display:{title:"Build more pens",description:"Breed +1 sheep at once"}})),M=Me(()=>({resource:nt.metal,cost(){let le=this.amount.value;return a.gte(le,100)&&(le=a.pow(le,2).div(100)),le=a.pow(.95,z.books.clothBook.amount.value).times(le),a.pow(1.4,le).times(1e4)},display:{title:"Make stronger shears",description:"Shear +1 sheep at once"}})),k=Me(()=>({resource:z.paper,cost(){let le=this.amount.value;return a.gte(le,100)&&(le=a.pow(le,2).div(100)),le=a.pow(.95,z.books.clothBook.amount.value).times(le),a.pow(1.3,le).times(1e6)},display:{title:"Learn how to spin",description:"Spin +1 wool at once"}})),F=G(()=>({resource:T(l),cost:100,display:{title:"Lumberjack Boots",description:"Quadruple log gain"}})),X=G(()=>({resource:T(n),cost:150,visibility:()=>I(F.bought.value),display:{title:"Lumberjack Jeans",description:"Quadruple trees cut"}})),he=G(()=>({resource:T(i),cost:200,visibility:()=>I(X.bought.value),display:{title:"Lumberjack Plaid",description:"Quadruple trees planted"}})),be={treesUpgrade4:G(()=>({resource:T(l),cost:1e3,visibility:()=>I(Ue.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Axe",description:"10x log gain"}})),treesUpgrade3:he,treesUpgrade2:X,treesUpgrade1:F},ce=G(()=>({resource:T(l),cost:150,display:{title:"Mining boots",description:"Quadruple ash gain"}})),He=G(()=>({resource:T(n),cost:225,visibility:()=>I(ce.bought.value),display:{title:"Mining overalls",description:"Double coal gain"}})),xe=G(()=>({resource:T(i),cost:300,visibility:()=>I(He.bought.value),display:{title:"Mining helmet",description:"Triple coal gain"}})),Ne={metalUpgrade4:G(()=>({resource:T(l),cost:2e3,visibility:()=>I(Ue.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Pick",description:"Quadruple coal gain"}})),metalUpgrade3:xe,metalUpgrade2:He,metalUpgrade1:ce},Re=G(()=>({resource:T(l),cost:200,display:{title:"Scholar's shoes",description:"Double paper gain"}})),K=G(()=>({resource:T(n),cost:200,visibility:()=>I(Re.bought.value),display:{title:"Scholar's slacks",description:"Double paper gain"}})),Ae=G(()=>({resource:T(i),cost:400,visibility:()=>I(K.bought.value),display:{title:"Scholar's jacket",description:"Double paper gain"}})),Ce={paperUpgrade4:G(()=>({resource:T(l),cost:4e3,visibility:()=>I(Ue.upgrades.clothTools.bought.value),display:{title:"Felt Elbow Pads",description:"10x paper gain"}})),paperUpgrade3:Ae,paperUpgrade2:K,paperUpgrade1:Re},Oe=Y(()=>[ie(()=>({addend:W.amount,description:"Build more pens"})),C(()=>({multiplier:()=>a.div(Ue.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Ue.buyables.clothGains.amount.value,1)})),C(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:z.upgrades.clothUpgrade.bought}))]),Fe=v(()=>Oe.apply(1)),at=Y(()=>[]),Qe=v(()=>at.apply(1)),At=Y(()=>[ie(()=>({addend:M.amount,description:"Make stronger shears"})),C(()=>({multiplier:()=>a.div(Ue.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Ue.buyables.clothGains.amount.value,1)})),C(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:z.upgrades.clothUpgrade.bought})),C(()=>({multiplier:()=>a.add(re.computedAutoCuttingAmount.value,1).log10().add(1),description:"Holly Level 3",enabled:Ll.elfTraining.cutterElfTraining.milestones[2].earned}))]),de=v(()=>At.apply(1)),$=Y(()=>[]),Ie=v(()=>$.apply(1)),te=Y(()=>[ie(()=>({addend:k.amount,description:"Learn how to spin"})),C(()=>({multiplier:()=>a.div(Ue.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Ue.buyables.clothGains.amount.value,1)})),C(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:z.upgrades.clothUpgrade.bought})),C(()=>({multiplier:()=>a.add(re.computedAutoCuttingAmount.value,1).log10().add(1),description:"Holly Level 3",enabled:Ll.elfTraining.cutterElfTraining.milestones[2].earned}))]),ge=v(()=>te.apply(1)),st=Y(()=>[]),Je=v(()=>st.apply(1)),[Ge,ft]=nl(()=>[{title:"Sheep Gain",modifier:Oe,base:1},{title:"Sheep Breeding Cooldown",modifier:at,base:1,visible:!1,unit:"s"},{title:"Shearing Amount",modifier:At,base:1},{title:"Shearing Cooldown",modifier:$,base:1,visible:!1,unit:"s"},{title:"Spinning Amount",modifier:te,base:1},{title:"Spinning Cooldown",modifier:st,base:1,visible:!1,unit:"s"}]),qe=L(!1),Mt=E(()=>o(yt,{modelValue:qe.value,"onUpdate:modelValue":le=>qe.value=le},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:Ge}));je.on("update",le=>{a.lt(J.day.value,nn)||(a.gte(s.value,Qe.value)?s.value=Qe.value:(s.value=a.add(s.value,le),c.isHolding.value&&c.onClick()),a.gte(p.value,Ie.value)?p.value=Ie.value:(p.value=a.add(p.value,le),y.isHolding.value&&y.onClick()),a.gte(h.value,Je.value)?h.value=Je.value:(h.value=a.add(h.value,le),g.isHolding.value&&g.onClick()))});const{total:U,trackerDisplay:Le}=dl({resource:l,goal:1e3,name:e,day:nn,color:t,textColor:"var(--feature-foreground)",modal:{show:qe,display:Mt}});return{name:e,color:t,cloth:l,totalCloth:U,wool:n,sheep:i,buildPens:W,betterShears:M,fasterSpinning:k,treesUpgrades:be,metalUpgrades:Ne,paperUpgrades:Ce,generalTabCollapsed:ft,breedingProgress:s,shearingProgress:p,spinningProgress:h,breedSheepHK:_,shearSheepHK:S,spinWoolHK:x,minWidth:700,display:E(()=>o(B,null,[Z(Le),o(fe,null,null),o(It,{resource:l,style:"margin-bottom: 0"},null),o(It,{resource:n,style:"margin-bottom: 0"},null),o(It,{resource:i,style:"margin-bottom: 0"},null),We(c,y,g),We(W,M,k),o(fe,null,null),o(Pl,null,{default:()=>[Lt(...Object.values(be)),Lt(...Object.values(Ne)),Lt(...Object.values(Ce))]})]))}}),Mr="paper",Ca=5,z=Ut(Mr,function(){const e="Paper",t="#E8DCB8",l=ct(0,"paper"),n=ct(v(()=>a.min(a.div(re.logs.value,1e9),a.div(R.ash.value,1e6))),"pulp"),i=Rn(()=>({scaling:Ra(1,1.2),baseResource:n,gainResource:T(l),roundUpCost:!0,spend(K,Ae){re.logs.value=a.sub(re.logs.value,a.times(Ae,1e9)),R.ash.value=a.sub(R.ash.value,a.times(Ae,1e6))},gainModifier:be})),s=Tt(()=>({display:E(()=>{const K=a.gte(i.actualGain.value,1)?i.currentAt.value:i.nextAt.value;return o(B,null,[o("span",{style:"font-size: large"},[u("Create "),ee(i.currentGain.value),u(" "),l.displayName]),o("br",null,null),o("span",{style:"font-size: large"},[u("Cost: "),Kl(re.logs,K),u(" "),n.displayName,u(" ("),ee(a.times(K,1e9)),u(" "),re.logs.displayName,u(";")," ",ee(a.times(K,1e6)),u(" "),R.ash.displayName,u(")")])])}),canClick:()=>a.gte(i.actualGain.value,1),onClick(){!r(this.canClick)||i.convert()},style:"width: 600px; min-height: unset"}));function d(K){const Ae=Me(()=>({...K,display:{title:K.name,description:`Print a copy of "${K.name}", which ${K.elfName} will use to improve their skills! Each copy printed will reduce the "${K.buyableName}" price scaling by 0.95x and make ${K.elfName} purchase +10% faster!`,effectDisplay:E(()=>o(B,null,[V(a.pow(.95,Ae.amount.value)),u("x price scaling,")," ",V(a.div(Ae.amount.value,10).add(1)),u("x auto-purchase speed")])),showAmount:!1},resource:T(l),cost(){let we=this.amount.value;return(K.elfName==="Star"||K.elfName==="Bell")&&(we=a.pow(we,2)),a.gte(we,100)&&(we=a.pow(we,2).div(100)),a.gte(we,1e4)&&(we=a.pow(we,2).div(1e4)),we=a.pow(.95,x.amount.value).times(we),a.pow(5,we).times(10)},style:"width: 600px"}));return Ae}const c=d({name:"Now You're Logging!",elfName:"Holly",buyableName:"Generic Cutters"}),p=d({name:"The Man Who Planted Trees",elfName:"Ivy",buyableName:"Generic Planters"}),m=d({name:"Logjam",elfName:"Hope",buyableName:"Expand Forest"}),y=d({name:"Fahrenheit 451",elfName:"Jack",buyableName:"Heated Cutters"}),h=d({name:"Tillamook Burn Country",elfName:"Mary",buyableName:"Heated Planters"}),b=d({name:"The Garden Tree's Handbook",elfName:"Noel",buyableName:"Fertilized Soil"}),g=d({name:"Firestarter",elfName:"Joy",buyableName:"Small Fire",visibility:()=>I(ke.elves.smallFireElf.bought.value)}),_=d({name:"An Arsonist's Guide to Writer's Homes in New England",elfName:"Faith",buyableName:"Bonfire",visibility:()=>I(ke.elves.bonfireElf.bought.value)}),S=d({name:"Little Fires Everywhere",elfName:"Snowball",buyableName:"Kiln",visibility:()=>I(ke.elves.kilnElf.bought.value)}),x=d({name:"The Book Thief",elfName:"Star",buyableName:"Paper Buyables",visibility:()=>I(ke.elves.paperElf.bought.value)}),W=d({name:"Not a box",elfName:"Bell",buyableName:"Box Buyables",visibility:()=>I(ke.elves.boxElf.bought.value)}),M=d({name:"Fuzzy Bee and Friends",elfName:"Gingersnap",buyableName:"Cloth Buyables",visibility:()=>I(ke.elves.clothElf.bought.value)}),k={cuttersBook:c,plantersBook:p,expandersBook:m,heatedCuttersBook:y,heatedPlantersBook:h,fertilizerBook:b,smallFireBook:g,bonfireBook:_,kilnBook:S,paperBook:x,boxBook:W,clothBook:M},F=G(()=>({resource:T(l),cost:1e8,visibility:()=>I(Ue.upgrades.paperTools.bought.value),display:{title:"Shepherding for Dummies",description:"Double effectiveness of all cloth actions"}})),X=G(()=>({resource:T(l),cost:1e9,visibility:()=>I(Ue.upgrades.paperTools.bought.value),display:{title:"Guide to drilling",description:"Double drilling power"}})),he=G(()=>({resource:T(l),cost:1e10,visibility:()=>I(Ue.upgrades.paperTools.bought.value),display:{title:"Oil and where to find it",description:"Double oil gain"}})),j={clothUpgrade:F,drillingUpgrade:X,oilUpgrade:he},be=Y(()=>[C(()=>({multiplier:2,description:"Scholar's shoes",enabled:lt.paperUpgrades.paperUpgrade1.bought})),C(()=>({multiplier:2,description:"Scholar's slacks",enabled:lt.paperUpgrades.paperUpgrade2.bought})),C(()=>({multiplier:2,description:"Scholar's jacket",enabled:lt.paperUpgrades.paperUpgrade3.bought})),C(()=>({multiplier:10,description:"Felt Elbow Pads",enabled:lt.paperUpgrades.paperUpgrade4.bought})),C(()=>({multiplier:Ve.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>a.gte(Ve.dyes.yellow.amount.value,1)}))]),[ce,He]=nl(()=>[{title:"Paper Gain",modifier:be,base:1}]),xe=L(!1),Te=E(()=>o(yt,{modelValue:xe.value,"onUpdate:modelValue":K=>xe.value=K},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:ce}));je.on("update",K=>{a.lt(J.day.value,Ca)||(l.value=a.times(K,Ue.buyables.passivePaper.amount.value).times(i.currentGain.value).div(100).add(l.value))});const{total:Ne,trackerDisplay:Re}=dl({resource:l,goal:5e3,name:e,day:Ca,color:t,textColor:"var(--feature-foreground)",modal:{show:xe,display:Te}});return{name:e,day:Ca,color:t,paper:l,totalPaper:Ne,paperConversion:i,books:k,upgrades:j,generalTabCollapsed:He,minWidth:700,display:E(()=>o(B,null,[Z(Re),o(fe,null,null),o(It,{resource:l,color:t,style:"margin-bottom: 0"},null),o(fe,null,null),Z(s),o(fe,null,null),We(...Object.values(j)),o(fe,null,null),Lt(...Object.values(k))]))}}),Dr="boxes",ka=6,Ze=Ut(Dr,function(){const e="Boxes",t="#964B00",l=ct(0,"boxes"),n=Rn(()=>({scaling:Ra(1e10,1),baseResource:re.logs,gainResource:T(l),roundUpCost:!0})),i=Tt(()=>({display:E(()=>o(B,null,[o("span",{style:"font-size: large"},[u("Create "),ee(n.currentGain.value),u(" "),l.displayName]),o("br",null,null),o("span",{style:"font-size: large"},[u("Cost:")," ",Kl(re.logs,a.gte(n.actualGain.value,1)?n.currentAt.value:n.nextAt.value)," ",re.logs.displayName])])),canClick:()=>a.gte(n.actualGain.value,1),onClick(){!r(this.canClick)||n.convert()},style:"width: 600px; min-height: unset"})),s=G(()=>({display:{title:"Carry logs in boxes",description:"Double log gain and unlock a new elf for training"},onPurchase(){J.days[3].recentlyUpdated.value=!0},resource:T(l),cost:100})),d=G(()=>({display:{title:"Carry ash in boxes",description:"Double ash gain and unlock a new elf for training"},onPurchase(){J.days[3].recentlyUpdated.value=!0},resource:T(l),cost:1e3})),c=G(()=>({display:{title:"Carry coal in boxes",description:"Double coal gain and unlock a new elf for training"},onPurchase(){J.days[3].recentlyUpdated.value=!0},resource:T(l),cost:4e3})),p={logsUpgrade:s,ashUpgrade:d,coalUpgrade:c},m=G(()=>({resource:T(l),cost:1e8,visibility:()=>I(Ue.upgrades.boxTools.bought.value),display:{title:"Carry ore in boxes",description:"Double ore per mining op"}})),y=G(()=>({resource:T(l),cost:1e9,visibility:()=>I(Ue.upgrades.boxTools.bought.value),display:{title:"Carry metal in boxes",description:"Double ore purity"}})),h=G(()=>({resource:T(l),cost:1e10,visibility:()=>I(Ue.upgrades.boxTools.bought.value),display:{title:"Carry plastic in boxes",description:"Double plastic gain"}})),b={oreUpgrade:m,metalUpgrade:y,plasticUpgrade:h},g=Me(()=>({display:{title:"Carry more logs",description:"Use boxes to carry even more logs, boosting their gain",effectDisplay:E(()=>o(B,null,[V(a.div(g.amount.value,2).add(1)),u("x")]))},resource:T(l),cost(){let k=this.amount.value;return k=a.pow(.95,z.books.boxBook.amount.value).times(k),a.pow(3,k).times(100).div(Ve.boosts.orange2.value)},visibility:()=>I(s.bought.value)})),_=Me(()=>({display:{title:"Carry more ash",description:"Use boxes to carry even more ash, boosting its gain",effectDisplay:E(()=>o(B,null,[V(a.div(_.amount.value,2).add(1)),u("x")]))},resource:T(l),cost(){let k=this.amount.value;return k=a.pow(.95,z.books.boxBook.amount.value).times(k),a.pow(5,k).times(1e3).div(Ve.boosts.orange2.value)},visibility:()=>I(d.bought.value)})),S=Me(()=>({display:{title:"Carry more coal",description:"Use boxes to carry even more coal, boosting its gain",effectDisplay:E(()=>o(B,null,[V(a.div(S.amount.value,2).add(1)),u("x")]))},resource:T(l),cost(){let k=this.amount.value;return k=a.pow(.95,z.books.boxBook.amount.value).times(k),a.pow(7,k).times(1e3).div(Ve.boosts.orange2.value)},visibility:()=>I(c.bought.value)})),x={logBoxesBuyable:g,ashBoxesBuyable:_,coalBoxesBuyable:S};je.on("update",k=>{a.lt(J.day.value,ka)||(l.value=a.times(k,Ue.buyables.passiveBoxes.amount.value).times(n.currentGain.value).div(100).add(l.value))});const{total:W,trackerDisplay:M}=dl({resource:l,goal:5e4,name:e,day:ka,color:t});return{name:e,day:ka,color:t,boxes:l,totalBoxes:W,boxesConversion:n,upgrades:p,row2Upgrades:b,buyables:x,minWidth:700,display:E(()=>o(B,null,[Z(M),o(fe,null,null),o(It,{resource:l,color:t,style:"margin-bottom: 0"},null),o(fe,null,null),Z(i),o(fe,null,null),El(Object.values(p),Object.values(b)),o(fe,null,null),We(...Object.values(x))]))}}),xr="trees",on=1,sn=.1,re=Ut(xr,function(){const e="Trees",t="#4BDC13",l="green",n=ct(0,"logs"),i=ct(0,"saplings"),s=L(0),d=Y(()=>[ie(()=>({addend:()=>a.times(j.amount.value,10),description:"Expand Forest",enabled:k.bought})),ie(()=>({addend:()=>a.div(Nt.foundationProgress.value,2),description:"75% Foundation Completed",enabled:Nt.milestones.morePlantsMilestone1.earned})),C(()=>({multiplier:2,description:"5 Elves Trained",enabled:ke.milestones[4].earned})),C(()=>({multiplier:2,description:"8 Elves Trained",enabled:ke.milestones[7].earned})),C(()=>({multiplier:4,description:"Lumberjack Boots",enabled:lt.treesUpgrades.treesUpgrade1.bought})),ie(()=>({addend:Ve.boosts.blue1,description:"Blue Dye Boost 1",enabled:()=>a.gte(Ve.dyes.blue.amount.value,1)}))]),c=ct(v(()=>a.sub(d.apply(10),i.value)),"trees"),p=v(()=>d.apply(10)),m=G(()=>({resource:T(n),cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),y=G(()=>({resource:T(n),cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),h=G(()=>({resource:T(n),cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),b=G(()=>({resource:T(n),cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),g=G(()=>({resource:T(n),cost:40,display:{title:"Research I",description:"Trees give 25% more logs, and unlock more upgrades"}})),_=[m,y,h,b,g],S=G(()=>({resource:T(n),cost:50,visibility:()=>I(g.bought.value),display:{title:"Sharper Fingers",description:"Manually cut trees twice as often"}})),x=G(()=>({resource:T(n),cost:50,visibility:()=>I(g.bought.value),display:{title:"Greener Fingers",description:"Manually Plant trees twice as often"}})),W=G(()=>({resource:T(n),cost:150,visibility:()=>I(g.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),M=G(()=>({resource:T(n),cost:150,visibility:()=>I(g.bought.value),display:{title:"Smart Spades",description:"Each time you manually plant trees, gain 1s of automatic tree planting production"}})),k=G(()=>({resource:T(n),cost:300,visibility:()=>I(g.bought.value),display:{title:"Research II",description:"Trees give 25% more logs, and unlock repeatable purchases"}})),F=[S,x,W,M,k],X=Me(()=>({resource:T(n),cost(){let H=this.amount.value;return a.gte(H,50)&&(H=a.pow(H,2).div(50)),a.gte(H,200)&&(H=a.pow(H,2).div(200)),a.gte(H,2e6)&&(H=a.pow(H,2).div(2e6)),H=a.pow(.95,z.books.cuttersBook.amount.value).times(H),a.times(100,H).add(200)},display:{title:"Generic Cutters",description:"Each cutter cuts down 1 tree/s"},visibility:()=>I(k.bought.value)})),he=Me(()=>({resource:T(n),cost(){let H=this.amount.value;return a.gte(H,50)&&(H=a.pow(H,2).div(50)),a.gte(H,200)&&(H=a.pow(H,2).div(200)),a.gte(H,2e6)&&(H=a.pow(H,2).div(2e6)),H=a.pow(.95,z.books.plantersBook.amount.value).times(H),a.times(100,H).add(200)},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>I(k.bought.value)})),j=Me(()=>({resource:T(n),cost(){let H=this.amount.value;return a.gte(H,100)&&(H=a.pow(H,2).div(100)),a.gte(H,1e5)&&(H=a.pow(H,2).div(1e5)),H=a.pow(.95,z.books.expandersBook.amount.value).times(H),a.pow(a.add(H,1),1.5).times(500)},display:{title:"Expand Forest",description:"Add 10 trees to the forest"},visibility:()=>I(k.bought.value)})),be=[X,he,j],ce=Y(()=>[ie(()=>({addend:1,description:"Wooden Fingers",enabled:m.bought})),ie(()=>({addend:Re,description:"Smart Knives",enabled:W.bought}))]),He=v(()=>ce.apply(1)),xe=Y(()=>[C(()=>({multiplier:.5,description:"Sharper Fingers",enabled:S.bought})),C(()=>({multiplier:()=>a.pow(.5,ke.totalElves.value),description:"1 Elf Trained",enabled:ke.milestones[0].earned}))]),Te=v(()=>xe.apply(1)),Ne=Y(()=>[ie(()=>({addend:1,description:"Automated Knives",enabled:h.bought})),ie(()=>({addend:X.amount,description:"Generic Cutters",enabled:k.bought})),ie(()=>({addend:()=>a.div(Nt.foundationProgress.value,5).floor(),description:"10% Foundation Completed",enabled:Nt.milestones.autoCutMilestone1.earned})),C(()=>({multiplier:2,description:"30% Foundation Completed",enabled:Nt.milestones.autoCutMilestone2.earned})),C(()=>({multiplier:2,description:"Warmer Cutters",enabled:R.warmerCutters.bought})),C(()=>({multiplier:R.computedHeatedCutterEffect,description:"Heated Cutters",enabled:()=>a.gt(R.heatedCutters.amount.value,0)})),C(()=>({multiplier:4,description:"Lumberjack Jeans",enabled:lt.treesUpgrades.treesUpgrade2.bought}))]),Re=v(()=>Ne.apply(0)),K=Y(()=>[ie(()=>({addend:1,description:"Leafy Fingers",enabled:y.bought})),ie(()=>({addend:Fe,description:"Smart Spades",enabled:M.bought}))]),Ae=v(()=>K.apply(1)),we=Y(()=>[C(()=>({multiplier:.5,description:"Greener Fingers",enabled:x.bought})),C(()=>({multiplier:()=>a.pow(.5,ke.totalElves.value),description:"1 Elf Trained",enabled:ke.milestones[0].earned}))]),Ce=v(()=>we.apply(1)),Oe=Y(()=>[ie(()=>({addend:1,description:"Automated Spade",enabled:b.bought})),ie(()=>({addend:()=>a.div(he.amount.value,2),description:"Generic Planters",enabled:k.bought})),ie(()=>({addend:()=>a.div(Nt.foundationProgress.value,10).floor(),description:"20% Foundation Completed",enabled:Nt.milestones.autoPlantMilestone1.earned})),C(()=>({multiplier:2,description:"40% Foundation Completed",enabled:Nt.milestones.autoPlantMilestone2.earned})),C(()=>({multiplier:2,description:"Warmer Planters",enabled:R.warmerPlanters.bought})),C(()=>({multiplier:R.computedHeatedPlanterEffect,description:"Heated Planters",enabled:()=>a.gt(R.heatedPlanters.amount.value,0)})),C(()=>({multiplier:4,description:"Lumberjack Plaid",enabled:lt.treesUpgrades.treesUpgrade3.bought})),C(()=>({multiplier:2,description:"Ivy Level 1",enabled:Ll.elfTraining.planterElfTraining.milestones[0].earned}))]),Fe=v(()=>Oe.apply(0)),at=Y(()=>[C(()=>({multiplier:1.25,description:"Research I",enabled:g.bought})),C(()=>({multiplier:1.25,description:"Research II",enabled:k.bought})),C(()=>({multiplier:()=>a.div(Nt.foundationProgress.value,20).add(1),description:"1% Foundation Completed",enabled:Nt.milestones.logGainMilestone1.earned})),C(()=>({multiplier:2,description:"50% Foundation Completed",enabled:Nt.milestones.logGainMilestone2.earned})),C(()=>({multiplier:1.25,description:"Ashy Soil",enabled:R.basicFertilizer.bought})),C(()=>({multiplier:R.computedFertilizerEffect,description:"Fertilized Soil",enabled:()=>a.gt(R.moreFertilizer.amount.value,0)})),C(()=>({multiplier:2,description:"4 Elves Trained",enabled:ke.milestones[3].earned})),C(()=>({multiplier:2,description:"Carry logs in boxes",enabled:Ze.upgrades.logsUpgrade.bought})),C(()=>({multiplier:()=>a.div(Ze.buyables.logBoxesBuyable.amount.value,2).add(1),description:"Carry more logs",enabled:Ze.upgrades.logsUpgrade.bought})),C(()=>({multiplier:10,description:"Felt-Gripped Axe",enabled:lt.treesUpgrades.treesUpgrade4.bought})),C(()=>({multiplier:v(()=>a.add(Re.value,1).log10().plus(1)),description:"Is Blue Dye just Water?",enabled:Ve.upgrades.blueDyeUpg.bought})),C(()=>({multiplier:v(()=>a.add(Re.value,1).log10().plus(1)),description:"Holly Level 1",enabled:Ll.elfTraining.cutterElfTraining.milestones[0].earned})),Fn(()=>({exponent:1.2,description:"100% Foundation Completed",enabled:Nt.milestones.logGainMilestone3.earned}))]),Qe=_e(0),At=Wt(()=>({direction:Be.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(Qe.value,Te.value)})),de=Tt(()=>({display:{title:"Cut trees",description:E(()=>o(B,null,[u("Cut down up to "),ee(a.floor(He.value))," ",u("tree"),a.eq(He.value,1)?"":"s",u(" at once!"),o("br",null,null),Z(At)]))},style:{minHeight:"80px"},canClick:()=>a.gte(c.value,1)&&a.gte(Qe.value,Te.value),onClick(){if(a.lt(Qe.value,Te.value))return;const H=a.floor(a.min(c.value,a.times(He.value,a.div(Qe.value,Te.value).floor())));n.value=a.add(n.value,a.times(at.apply(1),H)),i.value=a.add(i.value,H),Qe.value=0}})),$=_e(0),Ie=Wt(()=>({direction:Be.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div($.value,Ce.value)})),te=Tt(()=>({display:{title:"Plant trees",description:E(()=>o(B,null,[u("Plant up to "),ee(a.floor(Ae.value))," ",u("tree"),a.eq(Ae.value,1)?"":"s",u(" at once!"),o("br",null,null),Z(Ie)]))},style:{minHeight:"80px"},canClick:()=>a.gte(i.value,1)&&a.gte($.value,Ce.value),onClick(){if(a.lt($.value,Ce.value))return;const H=a.floor(a.min(i.value,a.times(Ae.value,a.div($.value,Ce.value).floor())));i.value=a.sub(i.value,H),$.value=0}})),[ge,st]=nl(()=>[{title:"Logs per Tree",modifier:at,base:1,visible:g.bought},{title:"Manual Cutting Amount",modifier:ce,base:1,visible:m.bought,unit:"/click"},{title:"Manual Cutting Cooldown",modifier:xe,base:1,visible:m.bought,unit:"s"},{title:"Manual Planting Amount",modifier:K,base:1,visible:y.bought,unit:"/click"},{title:"Manual Planting Cooldown",modifier:we,base:1,visible:y.bought,unit:"s"},{title:"Auto Cutting Amount",modifier:Ne,base:0,visible:h.bought,unit:"/s"},{title:"Auto Planting Amount",modifier:Oe,base:0,visible:b.bought,unit:"/s"},{title:"Forest Size",modifier:d,base:10,visible:k.bought}]),Je=L(!1),Ge=E(()=>o(yt,{modelValue:Je.value,"onUpdate:modelValue":H=>Je.value=H},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:ge}));je.on("update",H=>{if(a.lt(J.day.value,on))return;a.gte(Qe.value,Te.value)?Qe.value=Te.value:(Qe.value=a.add(Qe.value,H),de.isHolding.value&&de.onClick()),a.gte($.value,Ce.value)?$.value=Ce.value:($.value=a.add($.value,H),te.isHolding.value&&te.onClick());const Dt=a.min(c.value,a.times(Re.value,H)),_t=a.mul(at.apply(1),Dt),rt=a.div(_t,H);s.value=a.mul(rt,sn).add(a.mul(s.value,a.dOne.sub(sn))),n.value=a.add(n.value,_t),i.value=a.add(i.value,Dt);const oe=a.min(i.value,a.times(Fe.value,H));i.value=a.sub(i.value,oe)});const ft=v(()=>a.sub(Re.value,Fe.value)),qe=v(()=>a.sub(Fe.value,Re.value)),Mt=xl(()=>({key:"c",description:'Press the "Cut trees" button.',onPress:()=>{de.canClick.value&&de.onClick()}})),U=xl(()=>({key:"p",description:'Press the "Plant trees" button.',onPress:()=>{te.canClick.value&&te.onClick()}})),{total:Le,trackerDisplay:le}=dl({resource:n,goal:1e4,name:e,day:on,color:l,modal:{show:Je,display:Ge}});return{name:e,color:t,logs:n,totalLogs:Le,trees:c,saplings:i,cutTree:de,plantTree:te,cutTreeHK:Mt,plantTreeHK:U,row1Upgrades:_,row2Upgrades:F,row1Buyables:be,manualCutProgress:Qe,manualPlantProgress:$,generalTabCollapsed:st,computedAutoCuttingAmount:Re,minWidth:700,display:E(()=>o(B,null,[Z(le),o(fe,null,null),o(It,{resource:n,color:t,style:"margin-bottom: 0",productionDisplay:a.gt(Re.value,0)?`+${V(s.value)}/s average
equilibrium: +${bn([[Re.value,"cutting speed"],[Fe.value,"planting speed"],[a.mul(p.value,20),"forest cap"]],"/s",at.apply(1))}`:void 0},null),o(It,{resource:i,color:l,style:"margin-bottom: 0",productionDisplay:na(ft.value)},null),o(It,{resource:c,color:l,style:"margin-bottom: 0",productionDisplay:na(qe.value)},null),o(fe,null,null),We(de,te),o("div",null,[u("Tip: You can hold down on actions to perform them automatically")]),o(fe,null,null),El(_,F),o(fe,null,null),We(...be)]))}});var Gn="./assets/tree.35808197.png",$n="./assets/sws.714ad454.png",Qn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAFxGAABcRgEUlENBAAAAG3RFWHRTb2Z0d2FyZQBDZWxzeXMgU3R1ZGlvIFRvb2zBp+F8AAAMuElEQVR42u3dO4zkSAEG4L/Kr5me6dl1QkJAjkDiElJISAiO7CQSyCBHQis08QQrXUJISExKxCNBguQICJCIkBAZOqlmH0LbPW27CKa78XjtabddZVeV/z/ZXe12r11V39TDdllorcEwTH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SEUBAKQigIBSEUhIIQCkJBCAWhIISCUBBCQSgIIRSEghAKQkEIBaEghIJQEEJBKAihIBSEUBAKQigIBSEUhIIQCkJBCKEgFIRQEApCKAgFIRSEghAKQkEIBaEghIJQEEJBKAihIBSEEApCCAWhIISC+CwIIUZBQQihIIRQEEIoCA8ZoSAUhFAQCkIoCAUhFISCEApCQQgFsbYghIx1KAghFIQQCkIIBSGEghBCQQihIIRQEEIoCCEUhBBCQQihIIRQEEIoCCEUhBAKQggFIcQ2/BcAB1oWINKo6AAAAABJRU5ErkJggg==",Ln="./assets/metal.7407f5d1.png",jn="./assets/cloth.7bcd7f37.png",Wn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAFxGAABcRgEUlENBAAAAG3RFWHRTb2Z0d2FyZQBDZWxzeXMgU3R1ZGlvIFRvb2zBp+F8AAAE/ElEQVR42u3dW3baMBRAURhzO4x2zO5P25WPPAhIuq99JhAsayNwbHG/rusm6f3ugEiASIBIgEiASIBIgEiASIBIgNQ+mPv9/8Fc13V3ejUeyFsUnwWMRgF5FAYoGgXkWRiQqD2QFThAUUsgq3FAIkAgESCQCJDtQCARIJAIEEAECCQCJArISSQfHRekgIxG4h4yQCBZdAyQADLi+0jlGyw/e+2dAY+7mzdqgr76ek9OQjeENgBSDUl2IO51awjkJJRXTnTWd2T/WxoCJDOSla9r1UQ7faGjMpKWmzZk+riQCUgEjOpIWu9qsmNCfOckZ3nAKxpGZSRjtv2JeCePXj0ywQBkEJZHTnLk6pERBiDDsHx1oqOAZMZREYmdFZ+YYBlXkAowABmAJuqd/LO/WwkHIDqGoxoM30F0DEhFHIBoO5CqMADRFiBwAALIA5MKDkCWTbTIk7Hj41V1HIAknmCnT06HyQxHUiDVd0+EoxeOVEA6PKMASC8caYBkmFjVn7WAoymQrBPr7ZfjTvdBwVEISPVbJcDojQMQwQGI4ABEcAAiMAARMIAAAgwggKg8FEAECSACBBBB0gsIJIAAAogAg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V+oLa+LwMvQAAAABJRU5ErkJggg==",Kn="./assets/plastic.b8ac74ff.png",zn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAFxGAABcRgEUlENBAAAAG3RFWHRTb2Z0d2FyZQBDZWxzeXMgU3R1ZGlvIFRvb2zBp+F8AAAH30lEQVR42u3dMXIdRRAGYOkARBShCmdOCXwH38EXICHhJCQkvgB30B0InJJBOaQc+QAiQriw3u7M7MxO9873R69cKqm8o296Vm/79f3T09OdiLyce0BEABEBRAQQEUBEABEBRAQQEUBEABERQEQAiXvR7++fnp6e7kv/XQBZCsfe10ACCBgFAQUQMEABBIw+AQUQMEABBA5IAIEDEkBkFg5IAIEDEkAAAQQQOCABBBBAABFAABFABBBABBBABJDEQP7++de77375CRBAIBkFBA5ALgtpC4hffECWrzJ7FQQSQJauHv9GFQEEjhs4IAEEjB0ce0hAAWQJHEeAQALI0jggAWRZGKU4SpGAAsiSMEABZBkYR3HUIAEFkDQoeuKoRQILIKFR9IZxFAosgEwHcQaMHlCAAeRUEDNg9IQCDCCXqRgqCiDL319kvU+58sSsZYHU4MiAogeWll/mq0/MCg9k1O7U+jBh9vR6GHKViVmhgYzcnV763leGUQKl5FquNjErJJDRu1NNj8ZqleTWdVx1YlYoIGftTqtXj5oqsvrErBBAzt6dACkDYmLWZCAzdifHq7JjlolZk4HM2p1UjzIksxINyRQgM3cnQGIDiYbkdCCz5/kBAkhYIJE+7BkOSAABBJAsQCLiAAQQQAABBBBAAAEEEEAAASQ3kPfff7j78a8fAAEEkFFAlnwfpAeQT59f3337zR+AnABk75f01npuAdEwNRgJIDGAbK3jXgXJhiRVw9QWEH0g84G8//7D8+urVJFwQLZ2p70K0nIsAKQOSAmOKyFJA+TT59fPr1urCCDtQPaOVbeS/biVouX2SxxHkADSBmTv3rEVSAYk4VtuX8Kxh+TWhddNWIbjy+t3BMcVkEwHsrcArUBqkADy9XUr+YtjCY5SJFGhhO5J38LRiiT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Nx+ieMIEkDagOzdO7YCyYAkfMvtSzj2kNy68LoJy3B8ef2O4LgCkulA9hagFUgNEkC+vm4lf3EswVGKJCqU0D3pWzhakfic4eOpgZEdStiW2xIcpUhqz9QyBkcNkihQwr1RWAOjBYrMxVGLZDaWU4CU7thHcECSA8ZRKGdjGQak9hjTAwckeWD0gHIGmK5AWs72PWH0gJJ+nkWH+6szYfSEMmINDwE5shgjYfSsKOmeHTqwJjNhRK0oVUB6PbI+Kz2OXqHf1GpYn0goIt6nnAZkJowVKkrN2mRA0QPLKVNuo95fuE8pX5/MII6AOQ1IDY4MKHpgCfchyy+s0ZVhlEAJASQziCNgQj0OUdGjsVolObpOzUCuDKMESnQgK+EYWUV2gdT0aKxWScJ8NA0gsYCshCN6FXG8GnvMAuSCQFbEMaqKbAJxvIp/zAIkGJAVcUSuIoAAAggc05AAAgggLUDgiI8EEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEkDFAVkfSu6sQkMRAVJGx1aMayOpIInYVGga0Hw1Ti1YPSMbiaAIisYBYo4kVxALExmGNVBBIIJm6NirIBXDIwI2n96e7wyHLAREBREQAEQFEBBARQEQAEQFEBBARQEQAERFARAARAUQEEBFARAARAUQkef4Ba6BLB9lPZTIAAAAASUVORK5CYII=",Pr="./assets/elfManagement.436c8744.png";const J=Ut("main",function(){const e=_e(1),t=v(()=>(+new Date(new Date().getFullYear(),11,e.value)-ae.time)/1e3),l=L(!1),n=L(-1),i=L(""),s=L();function d(m){const y=_e(!1),h=_e(!1);return kt(()=>{const b=m(),g=ht(b.shouldNotify),_=ht(()=>r(g)||r(h));return{...b,opened:y,shouldNotify:_,recentlyUpdated:h,[Jt]:ss,[al]:function(){const{day:S,layer:x,symbol:W,opened:M,shouldNotify:k,story:F,completedStory:X,recentlyUpdated:he}=this;return{day:S,symbol:W,layer:x,opened:M,recentlyUpdated:he,shouldNotify:k,onOpenLore(){var ce,He;const j=J.day.value>S;n.value=j?S-1:-1;const be=r((He=(ce=Ct[x!=null?x:"trees"])==null?void 0:ce.name)!=null?He:"");i.value=j?`${be} - Completed!`:be,s.value=j?`${F}
I(Ye.depthMilestones[4].earned.value)})),we=Me(()=>({resource:T(l),cost(){return a.pow(1.15,this.amount.value).times(10)},display:{title:"Mining Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:E(()=>o(B,null,[u("Mine 2.5x faster. Increase ore mining amount by")," ",me(we.amount.value),u(" ore per operation")]))},visibility:()=>I(a.gte(we.amount.value,1)||a.div(s.value,c.value).plus(n.value).gte(10)),style:{width:"200px"}})),Ce=Me(()=>({resource:T(l),cost(){return a.pow(1.15,a.times(this.amount.value,10)).times(10)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:E(()=>o(B,null,[u("Automatically smelts")," ",me(a.times(Ce.amount.value,10)),u(" ore per second")]))},visibility:()=>I(a.gte(Ce.amount.value,1)||a.gte(we.amount.value,4)||a.gte(s.value,50)),style:{width:"200px"}})),Oe=_e(!0),Fe=Me(()=>({resource:R.coal,cost(){return a.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:E(()=>o(B,null,[u("Gain "),me(a.times(at.value,100)),u("% more metal per ore")]))},visibility:()=>I(a.gte(Fe.amount.value,1)||K.bought.value),style:{width:"200px"}})),at=v(()=>a.times(Fe.amount.value,.25));je.on("update",ge=>{F.value=a.times(ge,k.value).plus(F.value);const st=F.value.trunc();F.value=F.value.minus(st),i.value=a.add(i.value,a.times(st,W.value)),Oe.value&&S(a.min(g.value,a.times(m.value,ge)),h.value)});const[Qe,At]=nl(()=>[{title:"Auto Smelt Speed",modifier:p,base:0,unit:"/s",visible(){return a.gt(Ce.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:y,base:1,visible(){return a.gt(h.value,1)}},{title:"Metal per Ore",modifier:d,base:.1},{title:"Ore per Mining Operation",modifier:x,base:1},{title:"Mining Speed",modifier:M,base:.1,unit:"/s"}]),de=L(!1),$=E(()=>o(yt,{modelValue:de.value,"onUpdate:modelValue":ge=>de.value=ge},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:Qe})),{total:Ie,trackerDisplay:te}=dl({resource:l,goal:25e3,name:e,day:ln,color:t,modal:{show:de,display:$}});return{name:e,day:ln,color:t,ore:i,bestOre:s,oreProgress:F,metal:l,bestMetal:n,totalMetal:Ie,simplePickaxe:xe,doublePickaxe:Te,crucible:Ne,coalDrill:Re,industrialFurnace:K,efficientDrill:Ae,oreDrill:we,industrialCrucible:Ce,autoSmeltEnabled:Oe,hotterForge:Fe,generalTabCollapsed:At,minWidth:700,display:E(()=>o(B,null,[Z(te),o(fe,null,null),o(It,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:E(()=>o(B,null,[Oe.value&&a.gte(Ce.amount.value,1)?`+${hn([[m.value,"smelting speed"],[be.value,"ore gain"],[a.div(R.computedCoalGain.value,b),"coal gain"]],"/s",a.mul(c.value,h.value))}`:void 0]))},null),o(fe,null,null),Z(_),a.gte(Ce.amount.value,1)?o("div",{style:{width:"150px"}},[o(sl,{title:"Auto Smelt",modelValue:Oe.value,"onUpdate:modelValue":ge=>Oe.value=ge},null)]):void 0,o(fe,null,null),o(It,{resource:i,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:E(()=>o(B,null,[yn(He.value)]))},null),o(fe,null,null),o("div",null,[u("Currently mining "),ve(W.value),u(" ore every")," ",ve(a.recip(k.value)),u(" seconds")]),Z(he),o(fe,null,null),We(xe,Te,Ne,Re,K,Ae),We(we,Ce,Fe)]))}}),Sr="coal",an=3,R=Ut(Sr,function(){const e="Coal",t="#151716",l="#B2BeB5",n="var(--foreground)",i=ct(0,"coal"),s=ct(0,"ash"),d=_e(0),c=v(()=>a.times(d.value,1e3)),p=v(()=>a.times(d.value,.1)),m=v(()=>a.times(d.value,50)),y=Me(()=>({resource:re.logs,cost(){let P=a.times(F.amount.value,r(F.cost)).plus(this.amount.value);return a.gte(P,100)&&(P=a.pow(P,2).div(100)),a.gte(P,1e4)&&(P=a.pow(P,2).div(1e4)),P=a.pow(.95,z.books.smallFireBook.amount.value).times(P),P.pow(1.5).times(1e4)},display:E(()=>o(B,null,[o("h3",null,[u("Small Fire")]),o("br",null,null),u("Burn 1000 logs for 0.1 coal and 50 ash"),o("br",null,null),o("br",null,null),u("Currently:"),o("br",null,null),u("-"),V(c.value),u(" logs/sec"),o("br",null,null),u("+"),V(p.value),u(" coal/sec"),o("br",null,null),u("+"),V(m.value),u(" ash/sec"),o("br",null,null),o("br",null,null),u("Cost: "),ee(r(y.cost)),u(" "),y.resource.displayName])),onPurchase(){d.value=a.add(d.value,1)},style:{color:n,width:"160px"}})),{min:h,max:b,add:g,remove:_}=Vt({active:d,buyable:y}),S=ct(y.amount,"small fires"),x=_e(0),W=v(()=>a.times(x.value,1e4)),M=v(()=>a.times(x.value,10)),k=v(()=>a.times(x.value,1e3)),F=Me(()=>({resource:S,cost(){return a.pow(.95,z.books.bonfireBook.amount.value).times(10)},display:E(()=>o(B,null,[o("h3",null,[u("Bonfire")]),o("br",null,null),u("Burn 10,000 logs for 10 coal and 1000 ash"),o("br",null,null),o("br",null,null),u("Currently:"),o("br",null,null),u("-"),V(W.value),u(" logs/sec"),o("br",null,null),u("+"),V(M.value),u(" coal/sec"),o("br",null,null),u("+"),V(k.value),u(" ash/sec"),o("br",null,null),o("br",null,null),u("Cost: "),ee(r(F.cost)),u(" "),F.resource.displayName])),onPurchase(P){d.value=a.sub(d.value,P).max(0),x.value=a.add(x.value,1)},style:{color:n,width:"160px"},visibility:()=>I(ge.bought.value)})),{min:X,max:he,add:j,remove:be}=Vt({buyable:F,active:x}),ce=_e(0),He=v(()=>a.times(ce.value,1e6)),xe=v(()=>a.times(ce.value,1e4)),Te=v(()=>a.times(ce.value,1e4)),Ne=Me(()=>({resource:re.logs,cost(){let P=this.amount.value;return a.gte(P,100)&&(P=a.pow(P,2).div(100)),a.gte(P,1e4)&&(P=a.pow(P,2).div(1e4)),P=a.pow(.95,z.books.kilnBook.amount.value).times(P),a.pow(1.1,P).times(1e7)},display:E(()=>o(B,null,[o("h3",null,[u("Charcoal Kiln")]),o("br",null,null),u("Burn 1,000,000 logs for 10,000 coal and 10,000 ash"),o("br",null,null),o("br",null,null),u("Currently:"),o("br",null,null),u("-"),V(He.value),u(" logs/sec"),o("br",null,null),u("+"),V(xe.value),u(" coal/sec"),o("br",null,null),u("+"),V(Te.value),u(" ash/sec"),o("br",null,null),o("br",null,null),u("Cost: "),ee(r(Ne.cost)),u(" "),Ne.resource.displayName])),onPurchase(){ce.value=a.add(ce.value,1)},style:{color:n,width:"160px"},visibility:()=>I(qe.bought.value)})),{min:Re,max:K,add:Ae,remove:we}=Vt({buyable:Ne,active:ce}),Ce=_e(0),Oe=v(()=>a.times(a.pow(Ce.value,Ye.row2Upgrades[1].bought.value?2:1),5e7).times(nt.efficientDrill.bought.value?2:1)),Fe=Me(()=>({resource:nt.metal,cost(){let P=this.amount.value;return a.gte(P,100)&&(P=a.pow(P,2).div(100)),a.gte(P,1e4)&&(P=a.pow(P,2).div(1e4)),a.pow(1.15,P).times(10)},display:E(()=>o(B,null,[o("h3",null,[u("Mining Drill")]),o("br",null,null),u("Dig through the ground to find 50,000,000 coal"),o("br",null,null),o("br",null,null),u("Currently:"),o("br",null,null),u("+"),V(Oe.value),u(" coal/sec"),o("br",null,null),o("br",null,null),u("Cost: "),ee(r(Fe.cost)),u(" "),Fe.resource.displayName])),onPurchase(){Ce.value=a.add(Ce.value,1)},style:{color:n,width:"160px"},visibility:()=>I(nt.coalDrill.bought.value)})),{max:at,min:Qe,add:At,remove:de}=Vt({buyable:Fe,active:Ce}),$=G(()=>({resource:T(i),cost:5,display:{title:"Warmer Cutters",description:"Cut down twice as many trees/s"},style:{color:n}})),Ie=G(()=>({resource:T(i),cost:5,display:{title:"Warmer Planters",description:"Plant twice as many trees/s"},style:{color:n}})),te=G(()=>({resource:T(s),cost:5e3,display:{title:"Ashy Soil",description:"Trees give 25% more logs"},style:{color:n}})),ge=G(()=>({resource:S,cost:10,display:{title:"Bigger Fires",description:"Put all those fires together into a larger blaze"},onPurchase(){S.value=a.add(S.value,this.cost)},style:{color:n}})),st=[$,Ie,te,ge],Je=G(()=>({resource:T(i),cost:250,display:{title:"Dedicated Cutter Heaters",description:"Double the bonus from Heated Cutters"},style:{color:n},visibility:()=>I(ge.bought.value)})),Ge=G(()=>({resource:T(i),cost:250,display:{title:"Dedicated Planter Heaters",description:"Double the bonus from Heated Planters"},style:{color:n},visibility:()=>I(ge.bought.value)})),ft=G(()=>({canAfford(){return a.gte(re.logs.value,1e5)&&a.gte(s.value,1e5)},onPurchase(){re.logs.value=a.sub(re.logs.value,1e5),s.value=a.sub(s.value,1e5)},display:E(()=>o(B,null,[o("h3",null,[u("Mulched Soil")]),o("br",null,null),u("Double the bonus from Fertilized Soil"),o("br",null,null),o("br",null,null),u("Cost: "),ee(1e5),u(" "),re.logs.displayName,o("br",null,null),ee(1e5),u(" "),s.displayName])),style:{color:n},visibility:()=>I(ge.bought.value)})),qe=G(()=>({resource:re.logs,cost:1e7,display:{title:"Efficient Fires",description:"Move the fires underground to keep the coal from turning to ash"},style:{color:n},visibility:()=>I(ge.bought.value)})),Mt=[Je,Ge,ft,qe],U=G(()=>({resource:T(i),cost:1e19,display:{title:"Efficient Crucibles",description:"Double auto smelting speed and triple metal gain from auto smelting"},style:{color:n},visibility:()=>I(Ye.depthMilestones[4].earned.value)})),Le=[U],le=Me(()=>({resource:T(i),cost(){let P=this.amount.value;return a.gte(P,50)&&(P=a.pow(P,2).div(50)),a.gte(P,200)&&(P=a.pow(P,2).div(200)),a.gte(P,2e6)&&(P=a.pow(P,2).div(2e6)),P=a.pow(.95,z.books.heatedCuttersBook.amount.value).times(P),a.add(P,1).pow(2.5).times(10)},display:{title:"Heated Cutters",description:"Even warmer cutters cut down trees faster",effectDisplay:E(()=>o(B,null,[u("Cutters cut down trees "),V(oe.value),u("x faster")]))},style:{color:n},visibility:()=>I($.bought.value)})),H=Me(()=>({resource:T(i),cost(){let P=this.amount.value;return a.gte(P,50)&&(P=a.pow(P,2).div(50)),a.gte(P,200)&&(P=a.pow(P,2).div(200)),a.gte(P,2e6)&&(P=a.pow(P,2).div(2e6)),P=a.pow(.95,z.books.heatedPlantersBook.amount.value).times(P),a.add(P,1).pow(2.5).times(10)},display:{title:"Heated Planters",description:"Even warmer planters plant trees faster",effectDisplay:E(()=>o(B,null,[u("Planters plant trees "),V(Et.value),u("x faster")]))},style:{color:n},visibility:()=>I(Ie.bought.value)})),Dt=Me(()=>({resource:T(s),cost(){let P=this.amount.value;return a.gte(P,50)&&(P=a.pow(P,2).div(50)),a.gte(P,200)&&(P=a.pow(P,2).div(200)),a.gte(P,2e6)&&(P=a.pow(P,2).div(2e6)),P=a.pow(.95,z.books.fertilizerBook.amount.value).times(P),a.add(P,1).pow(1.5).times(5e4)},display:{title:"Fertilized Soil",description:"More fertilizer helps trees grow bigger",effectDisplay:E(()=>o(B,null,[u("Trees give "),V(Yt.value),u("x more logs")]))},style:{color:n},visibility:()=>I(te.bought.value)})),_t=[le,H,Dt],rt=Y(()=>[ie(()=>({addend(){return a.times(le.amount.value,.25)},description:"Heated Cutters",enabled(){return a.gt(le.amount.value,0)}})),C(()=>({multiplier:2,description:"Dedicated Cutter Heaters",enabled:Je.bought}))]),oe=v(()=>rt.apply(1)),St=Y(()=>[ie(()=>({addend(){return a.times(H.amount.value,.25)},description:"Heated Planters",enabled(){return a.gt(H.amount.value,0)}})),C(()=>({multiplier:2,description:"Dedicated Planter Heaters",enabled:Ge.bought}))]),Et=v(()=>St.apply(1)),Xt=Y(()=>[ie(()=>({addend(){return a.times(Dt.amount.value,.25)},description:"Fertilized Soil",enabled(){return a.gt(Dt.amount.value,0)}})),C(()=>({multiplier:2,description:"Mulched Soil",enabled:ft.bought}))]),Yt=v(()=>Xt.apply(1)),xt=Y(()=>[ie(()=>({addend(){return p.value},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),ie(()=>({addend(){return M.value},description:"Bonfires",enabled(){return a.gt(x.value,0)}})),ie(()=>({addend(){return xe.value},description:"Charcoal Kilns",enabled(){return a.gt(ce.value,0)}})),ie(()=>({addend(){return Oe.value},description:"Mining Drills",enabled(){return a.gt(Ce.value,0)}})),C(()=>({multiplier:2,description:"Carry coal in boxes",enabled:Ze.upgrades.coalUpgrade.bought})),C(()=>({multiplier:()=>a.div(Ze.buyables.coalBoxesBuyable.amount.value,2).add(1),description:"Carry more coal",enabled:Ze.upgrades.coalUpgrade.bought})),C(()=>({multiplier:()=>a.div(y.amount.value,1e4).add(1),description:"Small Fires Synergy",enabled:ke.elves.smallFireElf.bought})),C(()=>({multiplier:()=>a.div(F.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:ke.elves.bonfireElf.bought})),C(()=>({multiplier:()=>a.div(Ne.amount.value,100).times(Ve.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:ke.elves.kilnElf.bought})),C(()=>({multiplier:2,description:"Mining overalls",enabled:lt.metalUpgrades.metalUpgrade2.bought})),C(()=>({multiplier:3,description:"Mining helmet",enabled:lt.metalUpgrades.metalUpgrade3.bought})),C(()=>({multiplier:4,description:"Felt-Gripped Pick",enabled:lt.metalUpgrades.metalUpgrade4.bought})),C(()=>({multiplier:2,description:"12 Elves Trained",enabled:ke.milestones[11].earned})),Fn(()=>({exponent:1.25,description:"3 Elves Trained",enabled:ke.milestones[2].earned,supportLowNumbers:!0})),C(()=>({multiplier:()=>a.mul(Ye.depth.value,.25).add(1),description:"5m Well Depth",enabled:Ye.depthMilestones[0].earned})),C(()=>({multiplier:Ye.extractorCoal,description:"Heavy Extractor",enabled:()=>a.gt(Ye.activeExtractor.value,0)}))]),bt=v(()=>xt.apply(0)),wt=Y(()=>[ie(()=>({addend(){return m.value},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),ie(()=>({addend(){return k.value},description:"Bonfires",enabled(){return a.gt(x.value,0)}})),ie(()=>({addend(){return Te.value},description:"Charcoal Kilns",enabled(){return a.gt(ce.value,0)}})),C(()=>({multiplier:2,description:"Carry ash in boxes",enabled:Ze.upgrades.ashUpgrade.bought})),C(()=>({multiplier:()=>a.div(Ze.buyables.ashBoxesBuyable.amount.value,2).add(1),description:"Carry more ash",enabled:Ze.upgrades.ashUpgrade.bought})),C(()=>({multiplier:()=>a.div(y.amount.value,1e3).add(1),description:"Small Fires Synergy",enabled:ke.elves.smallFireElf.bought})),C(()=>({multiplier:()=>a.div(F.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:ke.elves.bonfireElf.bought})),C(()=>({multiplier:()=>a.div(Ne.amount.value,100).times(Ve.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:ke.elves.kilnElf.bought})),C(()=>({multiplier:4,description:"Mining boots",enabled:lt.metalUpgrades.metalUpgrade1.bought}))]),ol=v(()=>wt.apply(0)),Gt=Y(()=>[ie(()=>({addend(){return a.negate(c.value)},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),ie(()=>({addend(){return a.negate(W.value)},description:"Bonfires",enabled(){return a.gt(x.value,0)}})),ie(()=>({addend(){return a.negate(He.value)},description:"Charcoal Kilns",enabled(){return a.gt(ce.value,0)}}))]),Zt=v(()=>Gt.apply(0)),[el,wl]=nl(()=>[{title:"Log Consumption",modifier:Gt,base:0,visible(){return a.gt(d.value,0)||a.gt(x.value,0)||a.gt(ce.value,0)}},{title:"Coal Gain",modifier:xt,base:0,visible(){return a.gt(d.value,0)||a.gt(x.value,0)||a.gt(ce.value,0)}},{title:"Ash Gain",modifier:wt,base:0,visible(){return a.gt(d.value,0)||a.gt(x.value,0)||a.gt(ce.value,0)}}]),il=L(!1),Jl=E(()=>o(yt,{modelValue:il.value,"onUpdate:modelValue":P=>il.value=P},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:el}));je.on("update",P=>{a.lt(J.day.value,an)||a.times(P,Zt.value).negate().gt(re.logs.value)||(re.logs.value=a.times(P,Zt.value).plus(re.logs.value),i.value=a.times(P,bt.value).plus(i.value),s.value=a.times(P,ol.value).plus(s.value),d.value=a.max(d.value,0))});const{total:Nl,trackerDisplay:Xl}=dl({resource:i,goal:1e7,name:e,day:an,color:t,modal:{show:il,display:Jl}});return{name:e,color:t,coal:i,totalCoal:Nl,computedCoalGain:bt,ash:s,activeFires:d,buildFire:y,activeBonfires:x,buildBonfire:F,activeKilns:ce,buildKiln:Ne,activeDrills:Ce,buildDrill:Fe,warmerCutters:$,warmerPlanters:Ie,basicFertilizer:te,unlockBonfire:ge,dedicatedCutters:Je,dedicatedPlanters:Ge,betterFertilizer:ft,unlockKiln:qe,efficientSmelther:U,heatedCutters:le,heatedPlanters:H,moreFertilizer:Dt,computedHeatedCutterEffect:oe,computedHeatedPlanterEffect:Et,computedFertilizerEffect:Yt,generalTabCollapsed:wl,minWidth:700,display:E(()=>o(B,null,[Z(Xl),o(fe,null,null),o(It,{resource:i,color:t,style:"margin-bottom: 0",effectDisplay:a.gt(bt.value,0)?`+${V(bt.value)}/s`:void 0},null),o(fe,null,null),o(It,{resource:s,color:l,style:"margin-bottom: 0",effectDisplay:a.gt(ol.value,0)?`+${V(ol.value)}/s`:void 0},null),o(fe,null,null),o(Pl,null,{default:()=>[o(Pt,null,{default:()=>[Z(y),o("div",null,[ee(a.floor(d.value)),u("/"),ee(a.floor(y.amount.value))]),We(h,_,g,b)]}),ge.bought.value?o(B,null,[o(fe,null,null),o(Pt,null,{default:()=>[Z(F),o("div",null,[ee(x.value),u("/"),ee(F.amount.value)]),We(X,be,j,he)]})]):void 0,qe.bought.value?o(B,null,[o(fe,null,null),o(Pt,null,{default:()=>[Z(Ne),o("div",null,[ee(ce.value),u("/"),ee(Ne.amount.value)]),We(Re,we,Ae,K)]})]):void 0,nt.coalDrill.bought.value?o(B,null,[o(fe,null,null),o(Pt,null,{default:()=>[Z(Fe),o("div",null,[ee(Ce.value),u("/"),ee(Fe.amount.value)]),We(Qe,de,At,at)]})]):void 0]}),o(fe,null,null),El(st,Mt,Le),We(..._t)]))}}),Er="workshop",Fl=2,Nt=Ut(Er,function(){const e="Workshop",t="#D66B02",l="#D66B02",n=ct(0,"foundation progress"),i=js(()=>({scaling:Ra(250,1.5),baseResource:re.logs,gainResource:T(n),roundUpCost:!0,buyMax:!1,spend(F,X){re.logs.value=a.sub(re.logs.value,X)}})),s=Tt(()=>({display:E(()=>o(B,null,[o("b",{style:"font-size: x-large"},[u("Build part of the foundation")]),o("br",null,null),o("br",null,null),o("span",{style:"font-size: large"},[u("Cost:")," ",Kl(re.logs,a.gte(i.actualGain.value,1)?i.currentAt.value:i.nextAt.value)," ",re.logs.displayName])])),visibility:()=>I(a.lt(n.value,100)),canClick:()=>a.gte(i.actualGain.value,1)&&a.lt(n.value,100),onClick(){!r(this.canClick)||i.convert()},style:"width: 600px; min-height: unset"})),d=xl(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{s.canClick.value&&s.onClick()}})),c=v(()=>!ke.milestones[6].earned.value),p=ye(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>a.gte(n.value,1),showPopups:c})),m=ye(()=>({display:{requirement:"10% Foundation Completed",effectDisplay:"Cut an additional tree per second for each 5% of foundation completed"},shouldEarn:()=>a.gte(n.value,10),visibility:()=>I(p.earned.value),showPopups:c})),y=ye(()=>({display:{requirement:"20% Foundation Completed",effectDisplay:"Plant an additional tree per second for each 10% of foundation completed"},shouldEarn:()=>a.gte(n.value,20),visibility:()=>I(m.earned.value),showPopups:c})),h=ye(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>a.gte(n.value,30),visibility:()=>I(y.earned.value),showPopups:c})),b=ye(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>a.gte(n.value,40),visibility:()=>I(h.earned.value),showPopups:c})),g=ye(()=>({display:{requirement:"50% Foundation Completed",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte(n.value,50),visibility:()=>I(b.earned.value),showPopups:c})),_=ye(()=>({display:{requirement:"75% Foundation Completed",effectDisplay:"The forest gains an extra tree for every 2% of foundation completed"},shouldEarn:()=>a.gte(n.value,75),visibility:()=>I(g.earned.value),showPopups:c})),S=ye(()=>({display:{requirement:"100% Foundation Completed",effectDisplay:"Log per tree is raised to the 1.2th power"},shouldEarn:()=>a.gte(n.value,100),visibility:()=>I(_.earned.value),showPopups:c})),x={logGainMilestone1:p,autoCutMilestone1:m,autoPlantMilestone1:y,autoCutMilestone2:h,autoPlantMilestone2:b,logGainMilestone2:g,morePlantsMilestone1:_,logGainMilestone3:S},{collapseMilestones:W,display:M}=Hl(x),k=Wt(()=>({direction:Be.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>J.day.value===Fl?a.div(n.value,100):1,display:E(()=>J.day.value===Fl?o(B,null,[ee(n.value),u("%")]):"")}));return Ft(()=>{J.day.value===Fl&&a.gte(n.value,100)&&J.completeDay()}),{name:e,day:Fl,color:t,foundationProgress:n,foundationConversion:i,milestones:x,collapseMilestones:W,minWidth:700,buildFoundationHK:d,display:E(()=>o(B,null,[o("div",null,[J.day.value===Fl?"Complete the foundation to complete the day":`${e} Complete!`]),Z(k),o(fe,null,null),o("div",null,[o("span",null,[u("The foundation is ")]),o("h2",{style:`color: ${t}; text-shadow: 0 0 10px ${t}`},[ee(n.value)]),u("% completed")]),a.lt(n.value,100)?o(fe,null,null):null,Z(s),o(fe,null,null),M()]))}}),Br="elves",Ul=4,ke=Ut(Br,function(){const e="Elves",t="red",l="#911D21",i=Wt(()=>({direction:Be.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>J.day.value===Ul?a.div($.value,6).times(.8333333333333334).add(a.div(a.add(R.coal.value,1).log10(),a.log10(1e9)).clamp(0,1).div(6)):1,display:E(()=>J.day.value===Ul?a.lt($.value,6)?o(B,null,[ee($.value),u("/6 elves")]):o(B,null,[ee(R.coal.value),u("/"),ee(1e9),u(" coal")]):"")})),s=br(()=>({thingsToReset:[re,Nt,R],onReset(){setTimeout(()=>{Mt.earned.value?(re.row1Upgrades.forEach(oe=>oe.bought.value=!0),re.row2Upgrades.forEach(oe=>oe.bought.value=!0)):te.earned.value&&(re.row1Upgrades[4].bought.value=!0,re.row2Upgrades[4].bought.value=!0),ft.earned.value&&(Nt.foundationProgress.value=100),Le.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)})}})),d=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.cuttersBook.amount.value,.1).add(1),description:"Now You're Logging!",enabled:()=>a.gt(z.books.cuttersBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),c=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.plantersBook.amount.value,.1).add(1),description:"The Man Who Planted Trees",enabled:()=>a.gt(z.books.plantersBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),p=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.expandersBook.amount.value,.1).add(1),description:"Logjam",enabled:()=>a.gt(z.books.expandersBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),m=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.heatedCuttersBook.amount.value,.1).add(1),description:"Fahrenheit 451",enabled:()=>a.gt(z.books.heatedCuttersBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),y=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.heatedPlantersBook.amount.value,.1).add(1),description:"Tillamook Burn Country",enabled:()=>a.gt(z.books.heatedPlantersBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),h=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.fertilizerBook.amount.value,.1).add(1),description:"The Garden Tree's Handbook",enabled:()=>a.gt(z.books.fertilizerBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),b=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.smallFireBook.amount.value,.1).add(1),description:"Firestarter",enabled:()=>a.gt(z.books.smallFireBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),g=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.bonfireBook.amount.value,.1).add(1),description:"An Arsonist's Guide to Writer's Homes in New England",enabled:()=>a.gt(z.books.bonfireBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),_=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.kilnBook.amount.value,.1).add(1),description:"Little Fires Everywhere",enabled:()=>a.gt(z.books.kilnBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),S=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.paperBook.amount.value,.1).add(1),description:"The Book Thief",enabled:()=>a.gt(z.books.paperBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),x=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.boxBook.amount.value,.1).add(1),description:"Not a box",enabled:()=>a.gt(z.books.boxBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),W=Y(()=>[C(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),C(()=>({multiplier:()=>a.times(z.books.clothBook.amount.value,.1).add(1),description:"Fuzzy Bee and Friends",enabled:()=>a.gt(z.books.clothBook.amount.value,0)})),C(()=>({multiplier:2,description:"10 Elves Trained",enabled:U.earned}))]),[M,k]=nl(()=>[{title:"Holly Auto-Buy Frequency",modifier:d,base:10,unit:"/s",visible:de.cuttersElf.bought},{title:"Ivy Auto-Buy Frequency",modifier:c,base:10,unit:"/s",visible:de.plantersElf.bought},{title:"Hope Auto-Buy Frequency",modifier:p,base:10,unit:"/s",visible:de.expandersElf.bought},{title:"Jack Auto-Buy Frequency",modifier:m,base:10,unit:"/s",visible:de.heatedCuttersElf.bought},{title:"Mary Auto-Buy Frequency",modifier:y,base:10,unit:"/s",visible:de.heatedPlantersElf.bought},{title:"Noel Auto-Buy Frequency",modifier:h,base:10,unit:"/s",visible:de.fertilizerElf.bought},{title:"Joy Auto-Buy Frequency",modifier:b,base:10,unit:"/s",visible:de.smallFireElf.bought},{title:"Faith Auto-Buy Frequency",modifier:g,base:10,unit:"/s",visible:de.bonfireElf.bought},{title:"Snowball Auto-Buy Frequency",modifier:_,base:10,unit:"/s",visible:de.kilnElf.bought},{title:"Star Auto-Buy Frequency",modifier:S,base:10,unit:"/s",visible:de.paperElf.bought},{title:"Bell Auto-Buy Frequency",modifier:x,base:10,unit:"/s",visible:de.boxElf.bought},{title:"Gingersnap Auto-Buy Frequency",modifier:W,base:10,unit:"/s",visible:de.clothElf.bought}]),F=L(!1),X=E(()=>o(yt,{modelValue:F.value,"onUpdate:modelValue":oe=>F.value=oe},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:M})),he=v(()=>{let oe=a.pow(4,$.value).times(1e6);return a.gte($.value,9)&&(oe=a.times(oe,1e15)),oe});function j(oe){var ol;const St=_e(0),Et=_e(0),Xt=oe.hasToggle?_e(!1):L(!0),Yt=v(()=>oe.cooldownModifier.apply(10)),xt=ht((ol=oe.canBuy)!=null?ol:!0);function bt(Gt){if(wt.bought.value&&r(xt)){St.value=a.add(St.value,Gt);const Zt=a.recip(Yt.value);Et.value+=Gt/Zt.toNumber(),(_a(oe.buyable)?oe.buyable:[oe.buyable]).forEach(el=>{var wl;for(;a.gte(St.value,Zt);)if(oe.customCost==null?r(el.canPurchase):a.gte(el.resource.value,oe.customCost(el.amount.value)))el.amount.value=a.add(el.amount.value,1),St.value=a.sub(St.value,Zt),(wl=oe.onAutoPurchase)==null||wl.call(oe);else{St.value=Zt;break}})}}const wt=G(()=>({...oe,buyable:void 0,toggle:Xt,buyProgress:St,update:bt,resource:R.coal,cost:he,computedAutoBuyCooldown:Yt,amountOfTimesDone:Et,name:oe.name,display:()=>({title:oe.name,description:E(()=>o(B,null,[oe.description,wt.bought.value?null:o(B,null,[" ",u("Training this elf will require resetting all your progress from days 1-3.")]),wt.bought.value&&oe.hasToggle===!0?o(B,null,[o(sl,{title:oe.toggleDesc,"onUpdate:modelValue":Gt=>Xt.value=Gt,modelValue:Xt.value},null)]):null])),showCost:!wt.bought.value}),style:"width: 190px",onPurchase(){var Gt;(Gt=oe.onPurchase)==null||Gt.call(oe),s.reset()}}));return wt}const be=j({name:"Holly",description:"Holly will automatically purchase cutters you can afford, without actually spending any logs.",buyable:re.row1Buyables[0],cooldownModifier:d}),ce=j({name:"Ivy",description:"Ivy will automatically purchase planters you can afford, without actually spending any logs.",buyable:re.row1Buyables[1],cooldownModifier:c}),He=j({name:"Hope",description:"Hope will automatically purchase forest expanders you can afford, without actually spending any logs.",buyable:re.row1Buyables[2],cooldownModifier:p}),xe=[be,ce,He],Te=j({name:"Jack",description:"Jack will automatically purchase heated cutters you can afford, without actually spending any coal.",buyable:R.heatedCutters,cooldownModifier:m}),Ne=j({name:"Mary",description:"Mary will automatically purchase heated planters you can afford, without actually spending any coal.",buyable:R.heatedPlanters,cooldownModifier:y}),Re=j({name:"Noel",description:"Noel will automatically purchase fertilized soil you can afford, without actually spending any ash.",buyable:R.moreFertilizer,cooldownModifier:h}),K=[Te,Ne,Re],Ae=j({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:b,visibility:()=>I(Ze.upgrades.logsUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased small fires",onAutoPurchase(){Ae.toggle.value&&(R.activeFires.value=a.add(R.activeFires.value,1))},onPurchase(){J.days[4].recentlyUpdated.value=!0}}),we=j({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:g,visibility:()=>I(Ze.upgrades.ashUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased bonfires",onAutoPurchase(){const oe=r(this.buyable.cost);R.activeFires.value=a.sub(R.activeFires.value,oe).max(0),R.buildFire.amount.value=a.sub(R.buildFire.amount.value,oe).max(0),we.toggle.value&&(R.activeBonfires.value=a.add(R.activeBonfires.value,1))},onPurchase(){J.days[4].recentlyUpdated.value=!0},canBuy:R.unlockBonfire.bought}),Ce=j({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:()=>I(Ze.upgrades.coalUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased kilns",onAutoPurchase(){Ce.toggle.value&&(R.activeKilns.value=a.add(R.activeKilns.value,1))},onPurchase(){J.days[4].recentlyUpdated.value=!0},canBuy:R.unlockKiln.bought}),Oe=[Ae,we,Ce],Fe=j({name:"Star",description:"Star will automatically purchase all books you can afford, without actually spending any paper.",buyable:Object.values(z.books),cooldownModifier:S,visibility:()=>I(Ue.elfUpgrades.paperElf.bought.value)}),at=j({name:"Bell",description:"Bell will automatically purchase all box buyables you can afford, without actually spending any boxes.",buyable:Object.values(Ze.buyables),cooldownModifier:x,visibility:()=>I(Ue.elfUpgrades.boxElf.bought.value)}),Qe=j({name:"Gingersnap",description:"Gingersnap will automatically purchase all cloth buyables you can afford, without actually spending any resources.",buyable:[lt.buildPens,lt.betterShears,lt.fasterSpinning],cooldownModifier:W,visibility:()=>I(Ue.elfUpgrades.clothElf.bought.value)}),At=[Fe,at,Qe],de={cuttersElf:be,plantersElf:ce,expandersElf:He,heatedCuttersElf:Te,heatedPlantersElf:Ne,fertilizerElf:Re,smallFireElf:Ae,bonfireElf:we,kilnElf:Ce,paperElf:Fe,boxElf:at,clothElf:Qe},$=v(()=>Object.values(de).filter(oe=>oe.bought.value).length),Ie=ye(()=>({display:{requirement:"1 Elf Trained",effectDisplay:"Manual cutting and planting can happen twice as often for each trained elf"},shouldEarn:()=>a.gte($.value,1)})),te=ye(()=>({display:{requirement:"2 Elves Trained",effectDisplay:"Research I & II aren't reset after training"},shouldEarn:()=>a.gte($.value,2),visibility:()=>I(Ie.earned.value)})),ge=ye(()=>({display:{requirement:"3 Elves Trained",effectDisplay:"Coal gain is raised to the 1.25"},shouldEarn:()=>a.gte($.value,3),visibility:()=>I(te.earned.value)})),st=ye(()=>({display:{requirement:"4 Elves Trained",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte($.value,4),visibility:()=>I(ge.earned.value)})),Je=ye(()=>({display:{requirement:"5 Elves Trained",effectDisplay:"Forest is twice as large"},shouldEarn:()=>a.gte($.value,5),visibility:()=>I(st.earned.value)})),Ge=ye(()=>({display:{requirement:"6 Elves Trained",effectDisplay:"Elves work twice as fast"},shouldEarn:()=>a.gte($.value,6),visibility:()=>I(Je.earned.value)})),ft=ye(()=>({display:{requirement:"7 Elves Trained",effectDisplay:"Workshop Foundation starts at 100% complete after training"},shouldEarn:()=>a.gte($.value,7),visibility:()=>I(Ge.earned.value&&J.day.value>5)})),qe=ye(()=>({display:{requirement:"8 Elves Trained",effectDisplay:"Forest is twice as large (again)"},shouldEarn:()=>a.gte($.value,8),visibility:()=>I(ft.earned.value)})),Mt=ye(()=>({display:{requirement:"9 Elves Trained",effectDisplay:"Trees upgrades aren't reset after training"},shouldEarn:()=>a.gte($.value,9),visibility:()=>I(qe.earned.value)})),U=ye(()=>({display:{requirement:"10 Elves Trained",effectDisplay:"Elves work twice as fast (again)"},shouldEarn:()=>a.gte($.value,10),visibility:()=>I(J.day.value>=10)})),Le=ye(()=>({display:{requirement:"11 Elves Trained",effectDisplay:"Coal upgrades aren't reset after training"},shouldEarn:()=>a.gte($.value,11),visibility:()=>I(U.earned.value)})),le=ye(()=>({display:{requirement:"12 Elves Trained",effectDisplay:"Double coal gain"},shouldEarn:()=>a.gte($.value,12),visibility:()=>I(Le.earned.value)})),H=[Ie,te,ge,st,Je,Ge,ft,qe,Mt,U,Le,le],Dt={manualMilestone:Ie,researchMilestone:te,coalGainMilestone:ge,logGainMilestone:st,forestMilestone:Je,elvesMilestone:Ge,foundationMilestone:ft,forestMilestone2:qe,treeUpgradesMilestone:Mt,elvesMilestone2:U,coalUpgradesMilestone:Le,coalGainMilestone2:le},{collapseMilestones:_t,display:rt}=Hl(Dt);return je.on("update",oe=>{a.lt(J.day.value,Ul)||Object.values(de).forEach(St=>St.update(oe))}),Ft(()=>{J.day.value===Ul&&a.gte($.value,6)&&a.gte(R.coal.value,1e9)&&J.completeDay()}),{name:e,color:t,elves:de,totalElves:$,milestones:H,collapseMilestones:_t,generalTabCollapsed:k,minWidth:700,display:E(()=>o(B,null,[o("div",null,[J.day.value===Ul?`Reach ${ee(6)} trained elves and ${ee(1e9)} ${R.coal.displayName} to complete the day`:`${e} Complete!`," ",u("-")," ",o("button",{class:"button",style:"display: inline-block;",onClick:()=>F.value=!0},[u("Check Modifiers")])]),Z(i),Z(X),o(fe,null,null),o("div",{style:"width: 600px"},[El(xe,K,Oe,At)]),rt()]))}}),Nr="management",Rl=12,Ll=Ut(Nr,()=>{const e="Management",t="green",l=Wt(()=>({direction:Be.Right,width:600,height:25,fillStyle:`backgroundColor: ${t}`,progress:()=>J.day.value===Rl?n.value/(ke.totalElves.value*5):1,display:E(()=>J.day.value===Rl?o(B,null,[ee(n.value),u("/"),ee(ke.totalElves.value*5)," ",u("elf levels")]):"")})),n=v(()=>{let U=0;for(const Le of Object.values(At))U+=Le.level.value;return U}),i=G(()=>({display:{title:"Teach the Elves",description:"The Elves probably need to be taught if they're to do better. Maybe you'll build a school so you can teach them?"},resource:re.logs,cost:1e21})),s=G(()=>({display:{title:"Add a Classroom?",description:"Yay, you have a school. Too bad it has pretty much nothing in it. Maybe you could add some classrooms to make it less boring and more enticing to the Elves?"},resource:Ze.boxes,style:"width: 150px",cost:1e13})),d=Y(()=>[C(()=>({multiplier:()=>ge.value,description:"Classroom Effect",enabled:()=>s.bought.value}))]),c=d.apply(1);function p(U,Le,...le){const H=_e(0),Dt=v(()=>a.pow(10,_t.value).mul(1e4)),_t=v(()=>a.min(a.mul(9,H.value).div(1e4).add(1).log10().floor(),Ie.amount.value).toNumber()),rt=v(()=>a.sub(H.value,a.pow(10,_t.value).sub(1).div(9).mul(1e4))),oe=Wt(()=>({direction:Be.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(rt.value,Dt.value)})),{collapseMilestones:St,display:Et}=Hl(Le),Xt=Y(()=>[C(()=>({multiplier:c,description:"Global XP Multiplier"})),...le]),Yt=v(()=>Xt.apply(1));return Tt(()=>({display:{title:U.name,description:E(()=>o(B,null,[U.name,u(" is currently at level "),ee(_t.value),u("! They have achieved a total of "),V(H.value),u(" XP, and have")," ",V(rt.value),u("/"),V(Dt.value),u(" XP. They buy buyables "),ee(U.computedAutoBuyCooldown.value),u(" times per second, gaining")," ",a.gte(_t.value,Ie.amount.value)?0:V(a.mul(Yt.value,U.computedAutoBuyCooldown.value))," ",u("XP/sec.")," ",a.gte(_t.value,Ie.amount.value)?o("div",{style:"color: red"},[u("This elf cannot gain any XP because it has exceeded the maximum level from schools.")]):void 0,X.value!==U.name?"Click to see this elf's milestones.":void 0,Z(oe)]))},style:"width: 190px",onClick(){X.value=U.name},canClick(){return X.value!==U.name},state:St,displayMilestone:Et,level:_t,exp:H,milestones:Le,timeForExp:U.computedAutoBuyCooldown,amountOfTimesDone:U.amountOfTimesDone,elfXPGainComputed:Yt,elfXPGain:Xt}))}const m=[ye(()=>({display:()=>({requirement:"Holly Level 1",effectDisplay:"Cutting speed multiplies log gain."}),shouldEarn:()=>j.level.value>=1})),ye(()=>({display:{requirement:"Holly Level 2",effectDisplay:"Holly now buys max."},visibility:()=>I(m[0].earned.value),shouldEarn:()=>j.level.value>=2})),ye(()=>({display:{requirement:"Holly Level 3",effectDisplay:"Cutting speed multiplies cloth gain, wool gain (increasing the requirement as well), and sheep gain."},visibility:()=>I(m[1].earned.value),shouldEarn:()=>j.level.value>=3}))],y=[ye(()=>({display:{requirement:"Ivy Level 1",effectDisplay:"Planters are now twice as efficent."},shouldEarn:()=>be.level.value>=1})),ye(()=>({display:{requirement:"Ivy Level 2",effectDisplay:"Ivy now buys max."},visibility:()=>I(y[0].earned.value),shouldEarn:()=>be.level.value>=2})),ye(()=>({display:{requirement:"Ivy Level 3",effectDisplay:"???"},visibility:()=>I(y[1].earned.value),shouldEarn:()=>be.level.value>=3})),ye(()=>({display:{requirement:"Ivy Level 4",effectDisplay:"???"},visibility:()=>I(y[2].earned.value),shouldEarn:()=>be.level.value>=4})),ye(()=>({display:{requirement:"Ivy Level 5",effectDisplay:"???"},visibility:()=>I(y[3].earned.value),shouldEarn:()=>be.level.value>=5}))],h=[ye(()=>({display:{requirement:"Hope Level 1",effectDisplay:"???"},shouldEarn:()=>ce.level.value>=1}))],b=[],g=[],_=[],S=[],x=[],W=[],M=[],k=[],F=[],X=_e("Holly"),he=v(()=>{let U={displayMilestone:E(()=>"")};switch(X.value){case"Holly":U=j;break;case"Ivy":U=be;break;case"Hope":U=ce;break;case"Jack":U=xe;break;case"Mary":U=Te;break;case"Noel":U=Ne;break;case"Joy":U=K;break;case"Faith":U=Ae;break;case"Snowball":U=we;break;case"Star":U=Oe;break;case"Bell":U=Fe;break;case"Gingersnap":U=at;break;default:console.warn("This should not happen.",X.value);break}return{name:X.value,disp:U.displayMilestone}}),j=p(ke.elves.cuttersElf,m),be=p(ke.elves.plantersElf,y),ce=p(ke.elves.expandersElf,h),He=[j,be,ce],xe=p(ke.elves.heatedCuttersElf,b),Te=p(ke.elves.heatedPlantersElf,g),Ne=p(ke.elves.fertilizerElf,_),Re=[xe,Te,Ne],K=p(ke.elves.smallFireElf,S),Ae=p(ke.elves.bonfireElf,x),we=p(ke.elves.kilnElf,W),Ce=[K,Ae,we],Oe=p(ke.elves.paperElf,M),Fe=p(ke.elves.boxElf,k),at=p(ke.elves.clothElf,F),Qe=[Oe,Fe,at],At={cutterElfTraining:j,planterElfTraining:be,expandersElfTraining:ce,heatedCutterElfTraining:xe,heatedPlanterElfTraining:Te,fertilizerElfTraining:Ne,smallfireElfTraining:K,bonfireElfTraining:Ae,kilnElfTraining:we,paperElfTraining:Oe,boxElfTraining:Fe,clothElfTraining:at};je.on("update",()=>{if(!(J.day.value=1&&(U.amountOfTimesDone.value-=Le,a.lt(U.level.value,Ie.amount.value)&&(U.exp.value=a.mul(U.elfXPGainComputed.value,Le).add(U.exp.value)))}});const de=E(()=>o(B,null,[he.value.name,u("'s milestones: "),he.value.disp()])),$=v(()=>{const U=a.pow(10,Ie.amount.value);return{wood:U.mul(1e21),coal:U.mul(1e32),paper:U.mul(1e19),boxes:U.mul(1e13),metalIngots:U.mul(1e12),cloth:U.mul(1e4),plastic:U.mul(1e6),dye:a.add(Ie.amount.value,1).mul(1e4)}}),Ie=Me(()=>({display:E(()=>o(B,null,[o("h3",null,[u("Build a School")]),o("div",null,[u("You gotta start somewhere, right? Each school increases the maximum level for elves by 1. Maximum of 5.")]),o("div",null,[u("You have "),ee(Ie.amount.value),u(" schools.")]),o("div",null,[u("They are currently letting elves learn up to level")," ",ee(Ie.amount.value),u(".")]),o("div",null,[u("Costs "),V($.value.wood),u(" logs, "),V($.value.coal)," ",u("coal, "),V($.value.paper),u(" paper, "),V($.value.boxes)," ",u("boxes, "),V($.value.metalIngots),u(" metal ingots,")," ",V($.value.cloth),u(" cloth, "),V($.value.plastic)," ",u("plastic, and requires "),V($.value.dye),u(" of red, yellow, and blue dye")])])),canPurchase(){return $.value.wood.lte(re.logs.value)&&$.value.coal.lte(R.coal.value)&&$.value.paper.lte(z.paper.value)&&$.value.boxes.lte(Ze.boxes.value)&&$.value.metalIngots.lte(nt.metal.value)&&$.value.cloth.lte(lt.cloth.value)&&$.value.plastic.lte(Ue.plastic.value)&&$.value.dye.lte(Ve.dyes.blue.amount.value)&&$.value.dye.lte(Ve.dyes.red.amount.value)&&$.value.dye.lte(Ve.dyes.yellow.amount.value)},onPurchase(){re.logs.value=a.sub(re.logs.value,$.value.wood),R.coal.value=a.sub(R.coal.value,$.value.coal),z.paper.value=a.sub(z.paper.value,$.value.paper),Ze.boxes.value=a.sub(Ze.boxes.value,$.value.boxes),nt.metal.value=a.sub(nt.metal.value,$.value.metalIngots),lt.cloth.value=a.sub(lt.cloth.value,$.value.cloth),Ue.plastic.value=a.sub(Ue.plastic.value,$.value.plastic),this.amount.value=a.add(this.amount.value,1)},purchaseLimit:5,visibility:v(()=>I(i.bought.value)),style:"width: 600px"})),te=v(()=>{const U=a.add(Ie.amount.value,1).pow(1.5);return{wood:U.mul(1e21),coal:U.mul(1e32),paper:U.mul(1e19),boxes:U.mul(1e13),metalIngots:U.mul(1e12),cloth:U.mul(1e4),plastic:U.mul(1e6),dye:U.mul(1e4)}}),ge=v(()=>a.add(st.amount.value,1).sqrt()),st=Me(()=>({display:E(()=>o(B,null,[o("h3",null,[u("Build a Classroom")]),o("div",null,[u("Hopefully it makes the school a bit less boring. Multiplies elves' XP gain by")," ",o(Oa,null,{default:()=>[u("Classrooms + 1")]}),u(".")]),o("div",null,[u("You have "),ee(Ie.amount.value),u(" classrooms.")]),o("div",null,[u("They are currently multiplying elves' XP gain by "),V(ge.value)]),o("div",null,[u("Costs "),V(te.value.wood),u(" logs,")," ",V(te.value.coal),u(" coal, "),V(te.value.paper)," ",u("paper, "),V(te.value.boxes),u(" boxes,")," ",V(te.value.metalIngots),u(" metal ingots,")," ",V(te.value.cloth),u(" cloth, "),V(te.value.plastic)," ",u("plastic, and requires "),V(te.value.dye),u(" of red, yellow, and blue dye")])])),canPurchase(){return te.value.wood.lte(re.logs.value)&&te.value.coal.lte(R.coal.value)&&te.value.paper.lte(z.paper.value)&&te.value.boxes.lte(Ze.boxes.value)&&te.value.metalIngots.lte(nt.metal.value)&&te.value.cloth.lte(lt.cloth.value)&&te.value.plastic.lte(Ue.plastic.value)&&te.value.dye.lte(Ve.dyes.blue.amount.value)&&te.value.dye.lte(Ve.dyes.red.amount.value)&&te.value.dye.lte(Ve.dyes.yellow.amount.value)},onPurchase(){re.logs.value=a.sub(re.logs.value,te.value.wood),R.coal.value=a.sub(R.coal.value,te.value.coal),z.paper.value=a.sub(z.paper.value,te.value.paper),Ze.boxes.value=a.sub(Ze.boxes.value,te.value.boxes),nt.metal.value=a.sub(nt.metal.value,te.value.metalIngots),lt.cloth.value=a.sub(lt.cloth.value,te.value.cloth),Ue.plastic.value=a.sub(Ue.plastic.value,te.value.plastic),this.amount.value=a.add(this.amount.value,1)},visibility:v(()=>I(s.bought.value)),style:"width: 600px"})),Je=mr({training:()=>({tab:wa(()=>({display:E(()=>o(B,null,[El(He,Re,Ce,Qe),o(fe,null,null),de()]))})),display:"Elf Training"}),teaching:()=>({tab:wa(()=>({display:E(()=>o(B,null,[Z(Ie),u(" "),Z(st)," ",El([i,s])]))})),display:"The Schools"}),info:()=>({tab:wa(()=>({display:E(()=>o(B,null,[u("Each elf gains experience points (XP) every time they perform their action (they don't have to buy anything though). When they get enough XP, they can level up, granting special rewards.")]))})),display:"Info"})}),[Ge,ft]=nl(()=>[{title:"Global XP Gain",modifier:d,unit:" XP"},{title:"Holly XP Gain per Action",modifier:j.elfXPGain,unit:" XP"},{title:"Ivy XP Gain per Action",modifier:be.elfXPGain,unit:" XP"},{title:"Hope XP Gain per Action",modifier:ce.elfXPGain,unit:" XP"},{title:"Jack XP Gain per Action",modifier:xe.elfXPGain,unit:" XP"},{title:"Mary XP Gain per Action",modifier:Te.elfXPGain,unit:" XP"},{title:"Noel XP Gain per Action",modifier:Ne.elfXPGain,unit:" XP"},{title:"Joy XP Gain per Action",modifier:K.elfXPGain,unit:" XP"},{title:"Faith XP Gain per Action",modifier:Ae.elfXPGain,unit:" XP"},{title:"Snowball XP Gain per Action",modifier:we.elfXPGain,unit:" XP"},{title:"Star XP Gain per Action",modifier:Oe.elfXPGain,unit:" XP"},{title:"Bell XP Gain per Action",modifier:Fe.elfXPGain,unit:" XP"},{title:"Gingersnap XP Gain per Action",modifier:at.elfXPGain,unit:" XP"}]),qe=L(!1),Mt=E(()=>o(yt,{modelValue:qe.value,"onUpdate:modelValue":U=>qe.value=U},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:Ge}));return{name:e,day:Rl,color:t,minWidth:700,elfTraining:At,currentShown:X,tabs:Je,generalTabCollapsed:ft,teaching:i,schools:Ie,classrooms:st,classroomUpgrade:s,display:E(()=>o(B,null,[J.day.value===Rl?"Get all elves to level 5.":`${e} Complete!`," ",u("-"),o("button",{class:"button",style:"display: inline-block;",onClick:()=>qe.value=!0},[u("Check Modifiers")]),Z(Mt),Z(l),Z(Je)]))}}),Ir="cloth",nn=8,lt=Ut(Ir,function(){const e="Cloth",t="white",l=ct(0,"cloth"),n=ct(0,"wool"),i=ct(10,"sheep"),s=_e(0),d=Wt(()=>({direction:Be.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:()=>a.div(s.value,Qe.value)})),c=Tt(()=>({display:{title:"Breed sheep",description:E(()=>o(B,null,[u("Breed "),me(a.floor(Fe.value)),u(" sheep"),o("br",null,null),Z(d)]))},style:{minHeight:"80px"},canClick:()=>a.gte(s.value,Qe.value),onClick(){if(a.lt(s.value,Qe.value))return;const le=a.floor(Fe.value);i.value=a.add(i.value,le),s.value=0}})),p=_e(0),m=Wt(()=>({direction:Be.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:()=>a.div(p.value,Ie.value)})),y=Tt(()=>({display:{title:"Shear sheep",description:E(()=>o(B,null,[u("Shear up to "),me(a.floor(de.value)),u(" sheep"),o("br",null,null),Z(m)]))},style:{minHeight:"80px"},canClick:()=>a.gte(p.value,Ie.value),onClick(){if(a.lt(p.value,Ie.value))return;const le=a.min(i.value,de.value).floor();n.value=a.add(n.value,le),p.value=0}})),h=_e(0),b=Wt(()=>({direction:Be.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:()=>a.div(h.value,Je.value)})),g=Tt(()=>({display:{title:"Spinning wool",description:E(()=>o(B,null,[u("Spin "),me(a.floor(ge.value)),u(" wool"),o("br",null,null),Z(b)]))},style:{minHeight:"80px"},canClick:()=>a.gte(h.value,Je.value),onClick(){if(a.lt(h.value,Je.value))return;const le=a.min(n.value,ge.value).floor();l.value=a.add(l.value,le),n.value=a.sub(n.value,le),h.value=0}})),_=xl(()=>({key:"b",description:'Press the "Breed Sheep" button',onPress:()=>{c.canClick.value&&c.onClick()}})),S=xl(()=>({key:"h",description:'Press the "Shear Sheep" button',onPress:()=>{y.canClick.value&&y.onClick()}})),x=xl(()=>({key:"s",description:'Press the "Spin Wool" button',onPress:()=>{g.canClick.value&&g.onClick()}})),W=Me(()=>({resource:re.logs,cost(){let le=this.amount.value;return a.gte(le,100)&&(le=a.pow(le,2).div(100)),le=a.pow(.95,z.books.clothBook.amount.value).times(le),a.pow(1.5,le).times(1e14)},display:{title:"Build more pens",description:"Breed +1 sheep at once"}})),M=Me(()=>({resource:nt.metal,cost(){let le=this.amount.value;return a.gte(le,100)&&(le=a.pow(le,2).div(100)),le=a.pow(.95,z.books.clothBook.amount.value).times(le),a.pow(1.4,le).times(1e4)},display:{title:"Make stronger shears",description:"Shear +1 sheep at once"}})),k=Me(()=>({resource:z.paper,cost(){let le=this.amount.value;return a.gte(le,100)&&(le=a.pow(le,2).div(100)),le=a.pow(.95,z.books.clothBook.amount.value).times(le),a.pow(1.3,le).times(1e6)},display:{title:"Learn how to spin",description:"Spin +1 wool at once"}})),F=G(()=>({resource:T(l),cost:100,display:{title:"Lumberjack Boots",description:"Quadruple log gain"}})),X=G(()=>({resource:T(n),cost:150,visibility:()=>I(F.bought.value),display:{title:"Lumberjack Jeans",description:"Quadruple trees cut"}})),he=G(()=>({resource:T(i),cost:200,visibility:()=>I(X.bought.value),display:{title:"Lumberjack Plaid",description:"Quadruple trees planted"}})),be={treesUpgrade4:G(()=>({resource:T(l),cost:1e3,visibility:()=>I(Ue.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Axe",description:"10x log gain"}})),treesUpgrade3:he,treesUpgrade2:X,treesUpgrade1:F},ce=G(()=>({resource:T(l),cost:150,display:{title:"Mining boots",description:"Quadruple ash gain"}})),He=G(()=>({resource:T(n),cost:225,visibility:()=>I(ce.bought.value),display:{title:"Mining overalls",description:"Double coal gain"}})),xe=G(()=>({resource:T(i),cost:300,visibility:()=>I(He.bought.value),display:{title:"Mining helmet",description:"Triple coal gain"}})),Ne={metalUpgrade4:G(()=>({resource:T(l),cost:2e3,visibility:()=>I(Ue.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Pick",description:"Quadruple coal gain"}})),metalUpgrade3:xe,metalUpgrade2:He,metalUpgrade1:ce},Re=G(()=>({resource:T(l),cost:200,display:{title:"Scholar's shoes",description:"Double paper gain"}})),K=G(()=>({resource:T(n),cost:200,visibility:()=>I(Re.bought.value),display:{title:"Scholar's slacks",description:"Double paper gain"}})),Ae=G(()=>({resource:T(i),cost:400,visibility:()=>I(K.bought.value),display:{title:"Scholar's jacket",description:"Double paper gain"}})),Ce={paperUpgrade4:G(()=>({resource:T(l),cost:4e3,visibility:()=>I(Ue.upgrades.clothTools.bought.value),display:{title:"Felt Elbow Pads",description:"10x paper gain"}})),paperUpgrade3:Ae,paperUpgrade2:K,paperUpgrade1:Re},Oe=Y(()=>[ie(()=>({addend:W.amount,description:"Build more pens"})),C(()=>({multiplier:()=>a.div(Ue.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Ue.buyables.clothGains.amount.value,1)})),C(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:z.upgrades.clothUpgrade.bought}))]),Fe=v(()=>Oe.apply(1)),at=Y(()=>[]),Qe=v(()=>at.apply(1)),At=Y(()=>[ie(()=>({addend:M.amount,description:"Make stronger shears"})),C(()=>({multiplier:()=>a.div(Ue.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Ue.buyables.clothGains.amount.value,1)})),C(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:z.upgrades.clothUpgrade.bought})),C(()=>({multiplier:()=>a.add(re.computedAutoCuttingAmount.value,1).log10().add(1),description:"Holly Level 3",enabled:Ll.elfTraining.cutterElfTraining.milestones[2].earned}))]),de=v(()=>At.apply(1)),$=Y(()=>[]),Ie=v(()=>$.apply(1)),te=Y(()=>[ie(()=>({addend:k.amount,description:"Learn how to spin"})),C(()=>({multiplier:()=>a.div(Ue.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Ue.buyables.clothGains.amount.value,1)})),C(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:z.upgrades.clothUpgrade.bought})),C(()=>({multiplier:()=>a.add(re.computedAutoCuttingAmount.value,1).log10().add(1),description:"Holly Level 3",enabled:Ll.elfTraining.cutterElfTraining.milestones[2].earned}))]),ge=v(()=>te.apply(1)),st=Y(()=>[]),Je=v(()=>st.apply(1)),[Ge,ft]=nl(()=>[{title:"Sheep Gain",modifier:Oe,base:1},{title:"Sheep Breeding Cooldown",modifier:at,base:1,visible:!1,unit:"s"},{title:"Shearing Amount",modifier:At,base:1},{title:"Shearing Cooldown",modifier:$,base:1,visible:!1,unit:"s"},{title:"Spinning Amount",modifier:te,base:1},{title:"Spinning Cooldown",modifier:st,base:1,visible:!1,unit:"s"}]),qe=L(!1),Mt=E(()=>o(yt,{modelValue:qe.value,"onUpdate:modelValue":le=>qe.value=le},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:Ge}));je.on("update",le=>{a.lt(J.day.value,nn)||(a.gte(s.value,Qe.value)?s.value=Qe.value:(s.value=a.add(s.value,le),c.isHolding.value&&c.onClick()),a.gte(p.value,Ie.value)?p.value=Ie.value:(p.value=a.add(p.value,le),y.isHolding.value&&y.onClick()),a.gte(h.value,Je.value)?h.value=Je.value:(h.value=a.add(h.value,le),g.isHolding.value&&g.onClick()))});const{total:U,trackerDisplay:Le}=dl({resource:l,goal:1e3,name:e,day:nn,color:t,textColor:"var(--feature-foreground)",modal:{show:qe,display:Mt}});return{name:e,color:t,cloth:l,totalCloth:U,wool:n,sheep:i,buildPens:W,betterShears:M,fasterSpinning:k,treesUpgrades:be,metalUpgrades:Ne,paperUpgrades:Ce,generalTabCollapsed:ft,breedingProgress:s,shearingProgress:p,spinningProgress:h,breedSheepHK:_,shearSheepHK:S,spinWoolHK:x,minWidth:700,display:E(()=>o(B,null,[Z(Le),o(fe,null,null),o(It,{resource:l,style:"margin-bottom: 0"},null),o(It,{resource:n,style:"margin-bottom: 0"},null),o(It,{resource:i,style:"margin-bottom: 0"},null),We(c,y,g),We(W,M,k),o(fe,null,null),o(Pl,null,{default:()=>[Lt(...Object.values(be)),Lt(...Object.values(Ne)),Lt(...Object.values(Ce))]})]))}}),Mr="paper",Ca=5,z=Ut(Mr,function(){const e="Paper",t="#E8DCB8",l=ct(0,"paper"),n=ct(v(()=>a.min(a.div(re.logs.value,1e9),a.div(R.ash.value,1e6))),"pulp"),i=Rn(()=>({scaling:Ra(1,1.2),baseResource:n,gainResource:T(l),roundUpCost:!0,spend(K,Ae){re.logs.value=a.sub(re.logs.value,a.times(Ae,1e9)),R.ash.value=a.sub(R.ash.value,a.times(Ae,1e6))},gainModifier:be})),s=Tt(()=>({display:E(()=>{const K=a.gte(i.actualGain.value,1)?i.currentAt.value:i.nextAt.value;return o(B,null,[o("span",{style:"font-size: large"},[u("Create "),ee(i.currentGain.value),u(" "),l.displayName]),o("br",null,null),o("span",{style:"font-size: large"},[u("Cost: "),Kl(re.logs,K),u(" "),n.displayName,u(" ("),ee(a.times(K,1e9)),u(" "),re.logs.displayName,u(";")," ",ee(a.times(K,1e6)),u(" "),R.ash.displayName,u(")")])])}),canClick:()=>a.gte(i.actualGain.value,1),onClick(){!r(this.canClick)||i.convert()},style:"width: 600px; min-height: unset"}));function d(K){const Ae=Me(()=>({...K,display:{title:K.name,description:`Print a copy of "${K.name}", which ${K.elfName} will use to improve their skills! Each copy printed will reduce the "${K.buyableName}" price scaling by 0.95x and make ${K.elfName} purchase +10% faster!`,effectDisplay:E(()=>o(B,null,[V(a.pow(.95,Ae.amount.value)),u("x price scaling,")," ",V(a.div(Ae.amount.value,10).add(1)),u("x auto-purchase speed")])),showAmount:!1},resource:T(l),cost(){let we=this.amount.value;return(K.elfName==="Star"||K.elfName==="Bell")&&(we=a.pow(we,2)),a.gte(we,100)&&(we=a.pow(we,2).div(100)),a.gte(we,1e4)&&(we=a.pow(we,2).div(1e4)),we=a.pow(.95,x.amount.value).times(we),a.pow(5,we).times(10)},style:"width: 600px"}));return Ae}const c=d({name:"Now You're Logging!",elfName:"Holly",buyableName:"Generic Cutters"}),p=d({name:"The Man Who Planted Trees",elfName:"Ivy",buyableName:"Generic Planters"}),m=d({name:"Logjam",elfName:"Hope",buyableName:"Expand Forest"}),y=d({name:"Fahrenheit 451",elfName:"Jack",buyableName:"Heated Cutters"}),h=d({name:"Tillamook Burn Country",elfName:"Mary",buyableName:"Heated Planters"}),b=d({name:"The Garden Tree's Handbook",elfName:"Noel",buyableName:"Fertilized Soil"}),g=d({name:"Firestarter",elfName:"Joy",buyableName:"Small Fire",visibility:()=>I(ke.elves.smallFireElf.bought.value)}),_=d({name:"An Arsonist's Guide to Writer's Homes in New England",elfName:"Faith",buyableName:"Bonfire",visibility:()=>I(ke.elves.bonfireElf.bought.value)}),S=d({name:"Little Fires Everywhere",elfName:"Snowball",buyableName:"Kiln",visibility:()=>I(ke.elves.kilnElf.bought.value)}),x=d({name:"The Book Thief",elfName:"Star",buyableName:"Paper Buyables",visibility:()=>I(ke.elves.paperElf.bought.value)}),W=d({name:"Not a box",elfName:"Bell",buyableName:"Box Buyables",visibility:()=>I(ke.elves.boxElf.bought.value)}),M=d({name:"Fuzzy Bee and Friends",elfName:"Gingersnap",buyableName:"Cloth Buyables",visibility:()=>I(ke.elves.clothElf.bought.value)}),k={cuttersBook:c,plantersBook:p,expandersBook:m,heatedCuttersBook:y,heatedPlantersBook:h,fertilizerBook:b,smallFireBook:g,bonfireBook:_,kilnBook:S,paperBook:x,boxBook:W,clothBook:M},F=G(()=>({resource:T(l),cost:1e8,visibility:()=>I(Ue.upgrades.paperTools.bought.value),display:{title:"Shepherding for Dummies",description:"Double effectiveness of all cloth actions"}})),X=G(()=>({resource:T(l),cost:1e9,visibility:()=>I(Ue.upgrades.paperTools.bought.value),display:{title:"Guide to drilling",description:"Double drilling power"}})),he=G(()=>({resource:T(l),cost:1e10,visibility:()=>I(Ue.upgrades.paperTools.bought.value),display:{title:"Oil and where to find it",description:"Double oil gain"}})),j={clothUpgrade:F,drillingUpgrade:X,oilUpgrade:he},be=Y(()=>[C(()=>({multiplier:2,description:"Scholar's shoes",enabled:lt.paperUpgrades.paperUpgrade1.bought})),C(()=>({multiplier:2,description:"Scholar's slacks",enabled:lt.paperUpgrades.paperUpgrade2.bought})),C(()=>({multiplier:2,description:"Scholar's jacket",enabled:lt.paperUpgrades.paperUpgrade3.bought})),C(()=>({multiplier:10,description:"Felt Elbow Pads",enabled:lt.paperUpgrades.paperUpgrade4.bought})),C(()=>({multiplier:Ve.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>a.gte(Ve.dyes.yellow.amount.value,1)}))]),[ce,He]=nl(()=>[{title:"Paper Gain",modifier:be,base:1}]),xe=L(!1),Te=E(()=>o(yt,{modelValue:xe.value,"onUpdate:modelValue":K=>xe.value=K},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:ce}));je.on("update",K=>{a.lt(J.day.value,Ca)||(l.value=a.times(K,Ue.buyables.passivePaper.amount.value).times(i.currentGain.value).div(100).add(l.value))});const{total:Ne,trackerDisplay:Re}=dl({resource:l,goal:5e3,name:e,day:Ca,color:t,textColor:"var(--feature-foreground)",modal:{show:xe,display:Te}});return{name:e,day:Ca,color:t,paper:l,totalPaper:Ne,paperConversion:i,books:k,upgrades:j,generalTabCollapsed:He,minWidth:700,display:E(()=>o(B,null,[Z(Re),o(fe,null,null),o(It,{resource:l,color:t,style:"margin-bottom: 0"},null),o(fe,null,null),Z(s),o(fe,null,null),We(...Object.values(j)),o(fe,null,null),Lt(...Object.values(k))]))}}),Dr="boxes",ka=6,Ze=Ut(Dr,function(){const e="Boxes",t="#964B00",l=ct(0,"boxes"),n=Rn(()=>({scaling:Ra(1e10,1),baseResource:re.logs,gainResource:T(l),roundUpCost:!0})),i=Tt(()=>({display:E(()=>o(B,null,[o("span",{style:"font-size: large"},[u("Create "),ee(n.currentGain.value),u(" "),l.displayName]),o("br",null,null),o("span",{style:"font-size: large"},[u("Cost:")," ",Kl(re.logs,a.gte(n.actualGain.value,1)?n.currentAt.value:n.nextAt.value)," ",re.logs.displayName])])),canClick:()=>a.gte(n.actualGain.value,1),onClick(){!r(this.canClick)||n.convert()},style:"width: 600px; min-height: unset"})),s=G(()=>({display:{title:"Carry logs in boxes",description:"Double log gain and unlock a new elf for training"},onPurchase(){J.days[3].recentlyUpdated.value=!0},resource:T(l),cost:100})),d=G(()=>({display:{title:"Carry ash in boxes",description:"Double ash gain and unlock a new elf for training"},onPurchase(){J.days[3].recentlyUpdated.value=!0},resource:T(l),cost:1e3})),c=G(()=>({display:{title:"Carry coal in boxes",description:"Double coal gain and unlock a new elf for training"},onPurchase(){J.days[3].recentlyUpdated.value=!0},resource:T(l),cost:4e3})),p={logsUpgrade:s,ashUpgrade:d,coalUpgrade:c},m=G(()=>({resource:T(l),cost:1e8,visibility:()=>I(Ue.upgrades.boxTools.bought.value),display:{title:"Carry ore in boxes",description:"Double ore per mining op"}})),y=G(()=>({resource:T(l),cost:1e9,visibility:()=>I(Ue.upgrades.boxTools.bought.value),display:{title:"Carry metal in boxes",description:"Double ore purity"}})),h=G(()=>({resource:T(l),cost:1e10,visibility:()=>I(Ue.upgrades.boxTools.bought.value),display:{title:"Carry plastic in boxes",description:"Double plastic gain"}})),b={oreUpgrade:m,metalUpgrade:y,plasticUpgrade:h},g=Me(()=>({display:{title:"Carry more logs",description:"Use boxes to carry even more logs, boosting their gain",effectDisplay:E(()=>o(B,null,[V(a.div(g.amount.value,2).add(1)),u("x")]))},resource:T(l),cost(){let k=this.amount.value;return k=a.pow(.95,z.books.boxBook.amount.value).times(k),a.pow(3,k).times(100).div(Ve.boosts.orange2.value)},visibility:()=>I(s.bought.value)})),_=Me(()=>({display:{title:"Carry more ash",description:"Use boxes to carry even more ash, boosting its gain",effectDisplay:E(()=>o(B,null,[V(a.div(_.amount.value,2).add(1)),u("x")]))},resource:T(l),cost(){let k=this.amount.value;return k=a.pow(.95,z.books.boxBook.amount.value).times(k),a.pow(5,k).times(1e3).div(Ve.boosts.orange2.value)},visibility:()=>I(d.bought.value)})),S=Me(()=>({display:{title:"Carry more coal",description:"Use boxes to carry even more coal, boosting its gain",effectDisplay:E(()=>o(B,null,[V(a.div(S.amount.value,2).add(1)),u("x")]))},resource:T(l),cost(){let k=this.amount.value;return k=a.pow(.95,z.books.boxBook.amount.value).times(k),a.pow(7,k).times(1e3).div(Ve.boosts.orange2.value)},visibility:()=>I(c.bought.value)})),x={logBoxesBuyable:g,ashBoxesBuyable:_,coalBoxesBuyable:S};je.on("update",k=>{a.lt(J.day.value,ka)||(l.value=a.times(k,Ue.buyables.passiveBoxes.amount.value).times(n.currentGain.value).div(100).add(l.value))});const{total:W,trackerDisplay:M}=dl({resource:l,goal:5e4,name:e,day:ka,color:t});return{name:e,day:ka,color:t,boxes:l,totalBoxes:W,boxesConversion:n,upgrades:p,row2Upgrades:b,buyables:x,minWidth:700,display:E(()=>o(B,null,[Z(M),o(fe,null,null),o(It,{resource:l,color:t,style:"margin-bottom: 0"},null),o(fe,null,null),Z(i),o(fe,null,null),El(Object.values(p),Object.values(b)),o(fe,null,null),We(...Object.values(x))]))}}),xr="trees",on=1,sn=.1,re=Ut(xr,function(){const e="Trees",t="#4BDC13",l="green",n=ct(0,"logs"),i=ct(0,"saplings"),s=L(0),d=Y(()=>[ie(()=>({addend:()=>a.times(j.amount.value,10),description:"Expand Forest",enabled:k.bought})),ie(()=>({addend:()=>a.div(Nt.foundationProgress.value,2),description:"75% Foundation Completed",enabled:Nt.milestones.morePlantsMilestone1.earned})),C(()=>({multiplier:2,description:"5 Elves Trained",enabled:ke.milestones[4].earned})),C(()=>({multiplier:2,description:"8 Elves Trained",enabled:ke.milestones[7].earned})),C(()=>({multiplier:4,description:"Lumberjack Boots",enabled:lt.treesUpgrades.treesUpgrade1.bought})),ie(()=>({addend:Ve.boosts.blue1,description:"Blue Dye Boost 1",enabled:()=>a.gte(Ve.dyes.blue.amount.value,1)}))]),c=ct(v(()=>a.sub(d.apply(10),i.value)),"trees"),p=v(()=>d.apply(10)),m=G(()=>({resource:T(n),cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),y=G(()=>({resource:T(n),cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),h=G(()=>({resource:T(n),cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),b=G(()=>({resource:T(n),cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),g=G(()=>({resource:T(n),cost:40,display:{title:"Research I",description:"Trees give 25% more logs, and unlock more upgrades"}})),_=[m,y,h,b,g],S=G(()=>({resource:T(n),cost:50,visibility:()=>I(g.bought.value),display:{title:"Sharper Fingers",description:"Manually cut trees twice as often"}})),x=G(()=>({resource:T(n),cost:50,visibility:()=>I(g.bought.value),display:{title:"Greener Fingers",description:"Manually Plant trees twice as often"}})),W=G(()=>({resource:T(n),cost:150,visibility:()=>I(g.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),M=G(()=>({resource:T(n),cost:150,visibility:()=>I(g.bought.value),display:{title:"Smart Spades",description:"Each time you manually plant trees, gain 1s of automatic tree planting production"}})),k=G(()=>({resource:T(n),cost:300,visibility:()=>I(g.bought.value),display:{title:"Research II",description:"Trees give 25% more logs, and unlock repeatable purchases"}})),F=[S,x,W,M,k],X=Me(()=>({resource:T(n),cost(){let H=this.amount.value;return a.gte(H,50)&&(H=a.pow(H,2).div(50)),a.gte(H,200)&&(H=a.pow(H,2).div(200)),a.gte(H,2e6)&&(H=a.pow(H,2).div(2e6)),H=a.pow(.95,z.books.cuttersBook.amount.value).times(H),a.times(100,H).add(200)},display:{title:"Generic Cutters",description:"Each cutter cuts down 1 tree/s"},visibility:()=>I(k.bought.value)})),he=Me(()=>({resource:T(n),cost(){let H=this.amount.value;return a.gte(H,50)&&(H=a.pow(H,2).div(50)),a.gte(H,200)&&(H=a.pow(H,2).div(200)),a.gte(H,2e6)&&(H=a.pow(H,2).div(2e6)),H=a.pow(.95,z.books.plantersBook.amount.value).times(H),a.times(100,H).add(200)},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>I(k.bought.value)})),j=Me(()=>({resource:T(n),cost(){let H=this.amount.value;return a.gte(H,100)&&(H=a.pow(H,2).div(100)),a.gte(H,1e5)&&(H=a.pow(H,2).div(1e5)),H=a.pow(.95,z.books.expandersBook.amount.value).times(H),a.pow(a.add(H,1),1.5).times(500)},display:{title:"Expand Forest",description:"Add 10 trees to the forest"},visibility:()=>I(k.bought.value)})),be=[X,he,j],ce=Y(()=>[ie(()=>({addend:1,description:"Wooden Fingers",enabled:m.bought})),ie(()=>({addend:Re,description:"Smart Knives",enabled:W.bought}))]),He=v(()=>ce.apply(1)),xe=Y(()=>[C(()=>({multiplier:.5,description:"Sharper Fingers",enabled:S.bought})),C(()=>({multiplier:()=>a.pow(.5,ke.totalElves.value),description:"1 Elf Trained",enabled:ke.milestones[0].earned}))]),Te=v(()=>xe.apply(1)),Ne=Y(()=>[ie(()=>({addend:1,description:"Automated Knives",enabled:h.bought})),ie(()=>({addend:X.amount,description:"Generic Cutters",enabled:k.bought})),ie(()=>({addend:()=>a.div(Nt.foundationProgress.value,5).floor(),description:"10% Foundation Completed",enabled:Nt.milestones.autoCutMilestone1.earned})),C(()=>({multiplier:2,description:"30% Foundation Completed",enabled:Nt.milestones.autoCutMilestone2.earned})),C(()=>({multiplier:2,description:"Warmer Cutters",enabled:R.warmerCutters.bought})),C(()=>({multiplier:R.computedHeatedCutterEffect,description:"Heated Cutters",enabled:()=>a.gt(R.heatedCutters.amount.value,0)})),C(()=>({multiplier:4,description:"Lumberjack Jeans",enabled:lt.treesUpgrades.treesUpgrade2.bought}))]),Re=v(()=>Ne.apply(0)),K=Y(()=>[ie(()=>({addend:1,description:"Leafy Fingers",enabled:y.bought})),ie(()=>({addend:Fe,description:"Smart Spades",enabled:M.bought}))]),Ae=v(()=>K.apply(1)),we=Y(()=>[C(()=>({multiplier:.5,description:"Greener Fingers",enabled:x.bought})),C(()=>({multiplier:()=>a.pow(.5,ke.totalElves.value),description:"1 Elf Trained",enabled:ke.milestones[0].earned}))]),Ce=v(()=>we.apply(1)),Oe=Y(()=>[ie(()=>({addend:1,description:"Automated Spade",enabled:b.bought})),ie(()=>({addend:()=>a.div(he.amount.value,2),description:"Generic Planters",enabled:k.bought})),ie(()=>({addend:()=>a.div(Nt.foundationProgress.value,10).floor(),description:"20% Foundation Completed",enabled:Nt.milestones.autoPlantMilestone1.earned})),C(()=>({multiplier:2,description:"40% Foundation Completed",enabled:Nt.milestones.autoPlantMilestone2.earned})),C(()=>({multiplier:2,description:"Warmer Planters",enabled:R.warmerPlanters.bought})),C(()=>({multiplier:R.computedHeatedPlanterEffect,description:"Heated Planters",enabled:()=>a.gt(R.heatedPlanters.amount.value,0)})),C(()=>({multiplier:4,description:"Lumberjack Plaid",enabled:lt.treesUpgrades.treesUpgrade3.bought})),C(()=>({multiplier:2,description:"Ivy Level 1",enabled:Ll.elfTraining.planterElfTraining.milestones[0].earned}))]),Fe=v(()=>Oe.apply(0)),at=Y(()=>[C(()=>({multiplier:1.25,description:"Research I",enabled:g.bought})),C(()=>({multiplier:1.25,description:"Research II",enabled:k.bought})),C(()=>({multiplier:()=>a.div(Nt.foundationProgress.value,20).add(1),description:"1% Foundation Completed",enabled:Nt.milestones.logGainMilestone1.earned})),C(()=>({multiplier:2,description:"50% Foundation Completed",enabled:Nt.milestones.logGainMilestone2.earned})),C(()=>({multiplier:1.25,description:"Ashy Soil",enabled:R.basicFertilizer.bought})),C(()=>({multiplier:R.computedFertilizerEffect,description:"Fertilized Soil",enabled:()=>a.gt(R.moreFertilizer.amount.value,0)})),C(()=>({multiplier:2,description:"4 Elves Trained",enabled:ke.milestones[3].earned})),C(()=>({multiplier:2,description:"Carry logs in boxes",enabled:Ze.upgrades.logsUpgrade.bought})),C(()=>({multiplier:()=>a.div(Ze.buyables.logBoxesBuyable.amount.value,2).add(1),description:"Carry more logs",enabled:Ze.upgrades.logsUpgrade.bought})),C(()=>({multiplier:10,description:"Felt-Gripped Axe",enabled:lt.treesUpgrades.treesUpgrade4.bought})),C(()=>({multiplier:v(()=>a.add(Re.value,1).log10().plus(1)),description:"Is Blue Dye just Water?",enabled:Ve.upgrades.blueDyeUpg.bought})),C(()=>({multiplier:v(()=>a.add(Re.value,1).log10().plus(1)),description:"Holly Level 1",enabled:Ll.elfTraining.cutterElfTraining.milestones[0].earned})),Fn(()=>({exponent:1.2,description:"100% Foundation Completed",enabled:Nt.milestones.logGainMilestone3.earned}))]),Qe=_e(0),At=Wt(()=>({direction:Be.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(Qe.value,Te.value)})),de=Tt(()=>({display:{title:"Cut trees",description:E(()=>o(B,null,[u("Cut down up to "),ee(a.floor(He.value))," ",u("tree"),a.eq(He.value,1)?"":"s",u(" at once!"),o("br",null,null),Z(At)]))},style:{minHeight:"80px"},canClick:()=>a.gte(c.value,1)&&a.gte(Qe.value,Te.value),onClick(){if(a.lt(Qe.value,Te.value))return;const H=a.floor(a.min(c.value,a.times(He.value,a.div(Qe.value,Te.value).floor())));n.value=a.add(n.value,a.times(at.apply(1),H)),i.value=a.add(i.value,H),Qe.value=0}})),$=_e(0),Ie=Wt(()=>({direction:Be.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div($.value,Ce.value)})),te=Tt(()=>({display:{title:"Plant trees",description:E(()=>o(B,null,[u("Plant up to "),ee(a.floor(Ae.value))," ",u("tree"),a.eq(Ae.value,1)?"":"s",u(" at once!"),o("br",null,null),Z(Ie)]))},style:{minHeight:"80px"},canClick:()=>a.gte(i.value,1)&&a.gte($.value,Ce.value),onClick(){if(a.lt($.value,Ce.value))return;const H=a.floor(a.min(i.value,a.times(Ae.value,a.div($.value,Ce.value).floor())));i.value=a.sub(i.value,H),$.value=0}})),[ge,st]=nl(()=>[{title:"Logs per Tree",modifier:at,base:1,visible:g.bought},{title:"Manual Cutting Amount",modifier:ce,base:1,visible:m.bought,unit:"/click"},{title:"Manual Cutting Cooldown",modifier:xe,base:1,visible:m.bought,unit:"s"},{title:"Manual Planting Amount",modifier:K,base:1,visible:y.bought,unit:"/click"},{title:"Manual Planting Cooldown",modifier:we,base:1,visible:y.bought,unit:"s"},{title:"Auto Cutting Amount",modifier:Ne,base:0,visible:h.bought,unit:"/s"},{title:"Auto Planting Amount",modifier:Oe,base:0,visible:b.bought,unit:"/s"},{title:"Forest Size",modifier:d,base:10,visible:k.bought}]),Je=L(!1),Ge=E(()=>o(yt,{modelValue:Je.value,"onUpdate:modelValue":H=>Je.value=H},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:ge}));je.on("update",H=>{if(a.lt(J.day.value,on))return;a.gte(Qe.value,Te.value)?Qe.value=Te.value:(Qe.value=a.add(Qe.value,H),de.isHolding.value&&de.onClick()),a.gte($.value,Ce.value)?$.value=Ce.value:($.value=a.add($.value,H),te.isHolding.value&&te.onClick());const Dt=a.min(c.value,a.times(Re.value,H)),_t=a.mul(at.apply(1),Dt),rt=a.div(_t,H);s.value=a.mul(rt,sn).add(a.mul(s.value,a.dOne.sub(sn))),n.value=a.add(n.value,_t),i.value=a.add(i.value,Dt);const oe=a.min(i.value,a.times(Fe.value,H));i.value=a.sub(i.value,oe)});const ft=v(()=>a.sub(Re.value,Fe.value)),qe=v(()=>a.sub(Fe.value,Re.value)),Mt=xl(()=>({key:"c",description:'Press the "Cut trees" button.',onPress:()=>{de.canClick.value&&de.onClick()}})),U=xl(()=>({key:"p",description:'Press the "Plant trees" button.',onPress:()=>{te.canClick.value&&te.onClick()}})),{total:Le,trackerDisplay:le}=dl({resource:n,goal:1e4,name:e,day:on,color:l,modal:{show:Je,display:Ge}});return{name:e,color:t,logs:n,totalLogs:Le,trees:c,saplings:i,cutTree:de,plantTree:te,cutTreeHK:Mt,plantTreeHK:U,row1Upgrades:_,row2Upgrades:F,row1Buyables:be,manualCutProgress:Qe,manualPlantProgress:$,generalTabCollapsed:st,computedAutoCuttingAmount:Re,minWidth:700,display:E(()=>o(B,null,[Z(le),o(fe,null,null),o(It,{resource:n,color:t,style:"margin-bottom: 0",productionDisplay:a.gt(Re.value,0)?`+${V(s.value)}/s average
equilibrium: +${bn([[Re.value,"cutting speed"],[Fe.value,"planting speed"],[a.mul(p.value,20),"forest cap"]],"/s",at.apply(1))}`:void 0},null),o(It,{resource:i,color:l,style:"margin-bottom: 0",productionDisplay:na(ft.value)},null),o(It,{resource:c,color:l,style:"margin-bottom: 0",productionDisplay:na(qe.value)},null),o(fe,null,null),We(de,te),o("div",null,[u("Tip: You can hold down on actions to perform them automatically")]),o(fe,null,null),El(_,F),o(fe,null,null),We(...be)]))}});var Gn="./assets/tree.35808197.png",$n="./assets/sws.714ad454.png",Qn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAFxGAABcRgEUlENBAAAAG3RFWHRTb2Z0d2FyZQBDZWxzeXMgU3R1ZGlvIFRvb2zBp+F8AAAMuElEQVR42u3dO4zkSAEG4L/Kr5me6dl1QkJAjkDiElJISAiO7CQSyCBHQis08QQrXUJISExKxCNBguQICJCIkBAZOqlmH0LbPW27CKa78XjtabddZVeV/z/ZXe12r11V39TDdllorcEwTHsEgTAMgTAMgTAMgTAMgTAMgTAMgTz5z4Ro/c+01oJVwSwaSBcOQmEWD6QPDiJhFgnkHBxEwiwKyBAcBMIQCIEwBDIcCJEwBEIgDIEQCEMgBMIQCIEwBOIQECJhggfCXoQhEAJhCIRAGAIhEIbxCQiRMARCIMySgXCYxRAIgTAEQiAMgRAIw/gEhEiY4IGwF2EIhEAYAiEQhkAIhGF8AkIkDIEQCLNkIBxmMQRCIAyBEAhDIATCMD4BIRImeCDsRRgCIRCGQAiEIRACYQjEJyB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CrRhEUABpB2T14EEyG0mr50F2DRokgJQHsn13C0hGImnxyO2RgSoI5N+4dMUNSLblNvlEm3a1rjSQbjiyT6iJV+0ASQYk8yRaOQ5VoACSEMjfY/t1u91+JJknv6/r+ukNoRCQDpd2AckNBRBAUgHJhgWQpDgSvpseBxI9FuVvNekOJNEqEooj4ryXv5u3+8crQOLmQYvnQSasHoCcnxdtth4FpAaQj85T0EWPK9O5BaTPl/WngDzyujPvVQVIkZMXDGT56gELIIC88NonQgFkKBBImgLJdoICkSy5gvXs658Cpdw/CgFZC+TVY+gOpRSQlJsbNwACCSDdgGz5ByEkh4DsmDhZT0AnIJAcBLJyAmUf+AAkKYF0RAIIIJBEApmwbAPSF0nqnz+oMsiAAHJ08CsO7uG7e0ts1NABSaqfga48oAeBbH8GZOWKWB1JKJBOdQEy5fI8IH2/h5RaQcp/MgAEkN3HAYhOfsyyggACSCcglZEAAggggAACCCCAAAIIIDV3cwdEp5AAAgggnYC4zKt2QFYiAUQtgaxA4l4stQbyChK3u2sEkGeRAKIxQL4DxTPpikSS5kdz3sNiVxMB8g4UG8cJkInnEhBABAggAgQQAQIIIIAAAgggkAACCCCAACJAABEggAgQAQKIAAFEgAAiQACBBBBAAAEEEEAAESCACBBABAggRqEeEEgAAQQQQAABBBBAAAFEp4FAAggggAACCCCAAAIJIAIEECXCAQgggEACCCCAAAIIIIAoAggkgAACCCBwAAIIIJAAAggggCgZEEgAgQMQQACBBBBAAAEEDkgK9wfV+oLa+LwMvQAAAABJRU5ErkJggg==",Kn="./assets/plastic.b8ac74ff.png",zn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAFxGAABcRgEUlENBAAAAG3RFWHRTb2Z0d2FyZQBDZWxzeXMgU3R1ZGlvIFRvb2zBp+F8AAAH30lEQVR42u3dMXIdRRAGYOkARBShCmdOCXwH38EXICHhJCQkvgB30B0InJJBOaQc+QAiQriw3u7M7MxO9873R69cKqm8o296Vm/79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N2mRA0QPLKVNuo95fuE8pX5/MII6AOQ1IDY4MKHpgCfchyy+s0ZVhlEAJASQziCNgQj0OUdGjsVolObpOzUCuDKMESnQgK+EYWUV2gdT0aKxWScJ8NA0gsYCshCN6FXG8GnvMAuSCQFbEMaqKbAJxvIp/zAIkGJAVcUSuIoAAAggc05AAAgggLUDgiI8EEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEkDFAVkfSu6sQkMRAVJGx1aMayOpIInYVGga0Hw1Ti1YPSMbiaAIisYBYo4kVxALExmGNVBBIIJm6NirIBXDIwI2n96e7wyHLAREBREQAEQFEBBARQEQAEQFEBBARQEQAERFARAARAUQEEBFARAARAUQkef4Ba6BLB9lPZTIAAAAASUVORK5CYII=",Pr="./assets/elfManagement.436c8744.png";const J=Ut("main",function(){const e=_e(1),t=v(()=>(+new Date(new Date().getFullYear(),11,e.value)-ae.time)/1e3),l=L(!1),n=L(-1),i=L(""),s=L();function d(m){const y=_e(!1),h=_e(!1);return kt(()=>{const b=m(),g=ht(b.shouldNotify),_=ht(()=>r(g)||r(h));return{...b,opened:y,shouldNotify:_,recentlyUpdated:h,[Jt]:ss,[al]:function(){const{day:S,layer:x,symbol:W,opened:M,shouldNotify:k,story:F,completedStory:X,recentlyUpdated:he}=this;return{day:S,symbol:W,layer:x,opened:M,recentlyUpdated:he,shouldNotify:k,onOpenLore(){var ce,He;const j=J.day.value>S;n.value=j?S-1:-1;const be=r((He=(ce=Ct[x!=null?x:"trees"])==null?void 0:ce.name)!=null?He:"");i.value=j?`${be} - Completed!`:be,s.value=j?`${F}
${X}`:F,l.value=!0},onOpenLayer(){if(he.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(ae.tabs.includes(x!=null?x:"trees")){const j=ae.tabs.lastIndexOf(x!=null?x:"trees");ae.tabs.splice(j,1)}else ae.tabs.push(x!=null?x:"trees"),J.minimized.value=!0;else ae.tabs.splice(1,1/0,x!=null?x:"trees")},onUnlockLayer(){x&&(M.value=!0,setTimeout(()=>{var j,be;n.value=-1,i.value=r((be=(j=Ct[x!=null?x:"trees"])==null?void 0:j.name)!=null?be:""),s.value=F,ae.devSpeed=null,l.value=!0},1e3))}}}}})}const c=[d(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Gn,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!"})),d(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:$n,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!"})),d(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:Qn,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!"})),d(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:qn,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!"})),d(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:Vn,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!"})),d(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:Hn,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!"})),d(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:Ln,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!"})),d(()=>({day:8,shouldNotify:!1,layer:"cloth",symbol:jn,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!"})),d(()=>({day:9,shouldNotify:!1,layer:"oil",symbol:Wn,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!"})),d(()=>({day:10,shouldNotify:!1,layer:"plastic",symbol:Kn,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!"})),d(()=>({day:11,shouldNotify:!1,layer:"dyes",symbol:zn,story:"To make toys, we're going to need some color to make them look nice and enticing! We can't just give kids clear toys after all! To add some color to our toys, we'll need some dyes!",completedStory:"After all that effort, you finally have a rainbow of dyes to choose from! Now the children won't be able to resist the toys you have to offer, once you get them made of course..."})),d(()=>({day:12,shouldNotify:!1,layer:"management",symbol:Pr,story:"You watch as the elves work, and you realize that they could probably be trained to help out better. Just then, Santa comes over to check on your progress. You reply that you're doing fine, except that the elves may need a bit of behavior management. Santa offers to help, saying that he doesn't want to leave you to do everything. Unfortunately for you, the behavior problems won't fix themselves, so let's get to work!",completedStory:""})),d(()=>({day:13,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:14,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:15,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:16,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:17,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:18,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:19,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:20,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:21,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:22,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:23,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:24,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""}))];function p(){n.value=e.value-1,i.value="Day Complete!",s.value=c[e.value-1].completedStory,l.value=!0,e.value++,J.minimized.value=!1,ae.devSpeed=0}return{name:"Calendar",days:c,day:e,timeUntilNewDay:t,loreScene:n,loreTitle:i,loreBody:s,showLoreModal:l,completeDay:p,minWidth:700,display:E(()=>o(B,null,[ae.devSpeed===0?o("div",null,[u("Game Paused")]):null,ae.devSpeed&&ae.devSpeed!==1?o("div",null,[u("Dev Speed: "),V(ae.devSpeed),u("x")]):null,ae.offlineTime?o("div",null,[u("Offline Time: "),da(ae.offlineTime)]):null,o(fe,null,null),o("div",{class:"advent"},[c.reduce((m,y)=>(m[m.length-1].length===4&&m.push([]),m[m.length-1].push(y),m),[[]]).map(m=>We(...m))])]))}}),Tr=e=>[J,re,Nt,R,ke,z,Ze,nt,lt,Ye,Ue,Ve,Ll],$a=v(()=>!1);function Fr(e,t){t.offlineProd=!1}var Ur=Object.freeze(Object.defineProperty({__proto__:null,main:J,getInitialLayers:Tr,hasWon:$a,fixOldSave:Fr},Symbol.toStringTag,{value:"Module"}));const Rr={class:"scene"},Or=["src"],Gr=["src"],$r=["src"],Qr=["src"],qr=["src"],Vr=["src"],Hr=["src"],Lr={key:7,class:"scene-bubble",style:{left:"50%",bottom:"38%"}},jr=["src"],Wr=["src"],Kr=["src"],zr=["src"],Jr=ue({__name:"Scene",props:{day:null},setup(e){return(t,l)=>(w(),D("div",Rr,[e.day>=7?(w(),D("img",{key:0,src:r(jn),class:"scene-item",style:{left:"4%",bottom:"3%",width:"40px",height:"40px"}},null,8,Or)):O("",!0),e.day>=0?(w(),D("img",{key:1,src:r(Gn),class:"scene-item",style:{left:"10%",bottom:"10%"}},null,8,Gr)):O("",!0),e.day>=1?(w(),D("img",{key:2,src:r($n),class:"scene-item",style:{left:"40%",bottom:"12%"}},null,8,$r)):O("",!0),e.day>=2?(w(),D("img",{key:3,src:r(Qn),class:"scene-item",style:{left:"65%",bottom:"12%",width:"40px",height:"40px"}},null,8,Qr)):O("",!0),e.day>=6?(w(),D("img",{key:4,src:r(Ln),class:"scene-item",style:{left:"72%",bottom:"8%",width:"40px",height:"40px"}},null,8,qr)):O("",!0),e.day>=8?(w(),D("img",{key:5,src:r(Wn),class:"scene-item",style:{left:"80%",bottom:"6%"}},null,8,Vr)):O("",!0),e.day>=3?(w(),D("img",{key:6,src:r(qn),class:"scene-item",style:{left:"52%",bottom:"12%"}},null,8,Hr)):O("",!0),e.day>=4?(w(),D("div",Lr,[e.day>=4?(w(),D("img",{key:0,src:r(Vn),class:"scene-item"},null,8,jr)):O("",!0),e.day>=5?(w(),D("img",{key:1,src:r(Hn),class:"scene-item"},null,8,Wr)):O("",!0),e.day>=9?(w(),D("img",{key:2,src:r(Kn),class:"scene-item"},null,8,Kr)):O("",!0),e.day>=10?(w(),D("img",{key:3,src:r(zn),class:"scene-item"},null,8,zr)):O("",!0)])):O("",!0)]))}});var Xr=Pe(Jr,[["__scopeId","data-v-47b4d886"]]);const Yr=ue({components:{Context:Cn},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:q(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:q(Number,String),required:!0},name:{type:q(String),required:!0},color:q(String),minimizable:q(Boolean),nodes:{type:Object,required:!0}},setup(e){const{display:t,index:l,minimized:n,minWidth:i,tab:s}=pt(e),d=Tl(t),c=v(()=>$e.allowGoBack&&l.value>0&&!n.value);function p(){ae.tabs.splice(r(e.index),1)}Sl(()=>y(n.value,r(i.value))),Kt([n,qi(i)],([h,b])=>y(h,b));function m(h){e.nodes.value=h}function y(h,b){const g=typeof b=="number"||Number.isNaN(parseInt(b))?b+"px":b,_=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=g,_.style.margin=""))}return{component:d,showGoBack:c,updateNodes:m,unref:r,goBack:p}}});function Zr(e,t,l,n,i,s){const d=ll("Context");return w(),D("div",{class:"layer-container",style:ot({"--layer-color":e.unref(e.color)})},[e.showGoBack?(w(),D("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...c)=>e.goBack&&e.goBack(...c))},"\u274C")):O("",!0),e.minimized.value?(w(),D("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=c=>e.minimized.value=!1)},[f("div",null,Se(e.unref(e.name)),1)])):(w(),D("div",{key:2,class:et(["layer-tab",{showGoBack:e.showGoBack}])},[o(d,{onUpdateNodes:e.updateNodes},{default:se(()=>[(w(),ne(ze(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(w(),D("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=c=>e.minimized.value=!0)}," \u25BC ")):O("",!0)],4)}var eu=Pe(Yr,[["render",Zr],["__scopeId","data-v-0158bec3"]]);const Jn=e=>(rl("data-v-4b4bda40"),e=e(),ul(),e),tu=Jn(()=>f("h2",null,"Changelog",-1)),lu=Jn(()=>f("details",{open:""},[f("summary",null,[u("v0.0 Initial Commit - "),f("time",null,"2021-09-04")]),u(" This is the first release :D "),f("ul",null,[f("li",{class:"feature"},"Did everything"),f("li",{class:"fix"},"Had some fun"),f("li",{class:"breaking"},"Removed everything"),f("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),au=ue({__name:"Changelog",setup(e,{expose:t}){const l=L(!1);return t({open(){l.value=!0}}),(n,i)=>(w(),ne(yt,{modelValue:l.value,"onUpdate:modelValue":i[0]||(i[0]=s=>l.value=s)},{header:se(()=>[tu]),body:se(()=>[lu]),_:1},8,["modelValue"]))}});var nu=Pe(au,[["__scopeId","data-v-4b4bda40"]]),ou=ue({props:{element:Object,display:{type:q(Object,String,Function),required:!0},style:q(Object,String,Array),classes:q(Object),direction:q(String),xoffset:q(String),yoffset:q(String),pinned:Object},setup(e){const{element:t,display:l,pinned:n}=pt(e),i=L(!1),s=v(()=>(it(n)||i.value)&&d.value),d=yl(l),c=Rt(De(E(()=>{const y=it(t);return y==null?"":jt(y)})));function p(y){const h=n;y.shiftKey&&h&&(h.value=!h.value,y.stopPropagation(),y.preventDefault())}const m=v(()=>it(n)&&Bl[tt.theme].showPin);return{Direction:Be,isHovered:i,isShown:s,comp:d,elementComp:c,unref:r,togglePinned:p,showPin:m}}});const iu={key:0,class:"material-icons pinned"};function su(e,t,l,n,i,s){return w(),D("div",{class:et(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=d=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=d=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...d)=>e.togglePinned&&e.togglePinned(...d))},[Ht(e.$slots,"default",{},void 0,!0),e.elementComp?(w(),ne(ze(e.elementComp),{key:0})):O("",!0),o(ra,{name:"fade"},{default:se(()=>{var d;return[e.isShown?(w(),D("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:ot([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(d=e.unref(e.style))!=null?d:{}])},[e.showPin?(w(),D("span",iu,"push_pin")):O("",!0),e.comp?(w(),ne(ze(e.comp),{key:1})):O("",!0)],6)):O("",!0)]}),_:1})],34)}var mt=Pe(ou,[["render",su],["__scopeId","data-v-6102fa3a"]]);const ru={class:"info-modal-header"},uu=["src","alt"],du={class:"info-modal-title"},cu={key:0},pu=u(" - "),mu={key:0},gu={key:0},vu=f("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1),fu=f("br",null,null,-1),hu=f("br",null,null,-1),yu=["href"],bu=f("span",{class:"material-icons info-modal-discord"},"discord",-1),wu=f("div",null,[f("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[f("span",{class:"material-icons info-modal-discord"},"discord"),u(" The Paper Pilot Community ")])],-1),Au=f("div",null,[f("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link",target:"_blank"},[f("span",{class:"material-icons info-modal-discord"},"discord"),u(" The Modding Tree ")])],-1),Cu=f("br",null,null,-1);var ku=ue({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const l=e,{title:n,logo:i,author:s,discordName:d,discordLink:c,versionNumber:p,versionTitle:m}=$e,y=pt(l),h=L(!1),b=v(()=>da(ae.timePlayed)),g=v(()=>De(E(()=>o(B,null,[Dn.map(Z)]))));t({open(){h.value=!0}});function _(){var S;(S=r(y.changelog))==null||S.open()}return(S,x)=>(w(),ne(yt,{class:"info-modal",modelValue:h.value,"onUpdate:modelValue":x[0]||(x[0]=W=>h.value=W)},{header:se(()=>[f("div",ru,[r(i)?(w(),D("img",{key:0,class:"info-modal-logo",src:r(i),alt:r(n)},null,8,uu)):O("",!0),f("div",du,[f("h2",null,"- "+Se(r(n))+" -",1),f("h4",null,[u(" - v"+Se(r(p)),1),r(m)?(w(),D("span",cu,": "+Se(r(m)),1)):O("",!0),pu])])])]),body:se(({shown:W})=>[W?(w(),D("div",mu,[r(s)?(w(),D("div",gu,"By "+Se(r(s)),1)):O("",!0),vu,fu,f("div",{class:"link",onClick:_},"Changelog"),hu,f("div",null,[r(c)?(w(),D("a",{key:0,href:r(c),class:"info-modal-discord-link",target:"_blank"},[bu,u(" "+Se(r(d)),1)],8,yu)):O("",!0)]),wu,Au,Cu,f("div",null,"Time Played: "+Se(r(b)),1),(w(),ne(ze(r(g))))])):O("",!0)]),_:1},8,["modelValue"]))}});const Xn=e=>(rl("data-v-0d685451"),e=e(),ul(),e),_u=Xn(()=>f("h2",null,"Options",-1)),Su=Xn(()=>f("hr",null,null,-1));var Eu=ue({__name:"Options",setup(e,{expose:t}){const l=L(!1);t({open(){l.value=!0}});const n=Object.keys(Bl).map(g=>({label:wn(g),value:g})),i=v(()=>De(E(()=>o(B,null,[Mn.map(Z)])))),{showTPS:s,theme:d}=pt(tt),{autosave:c,usingLog:p}=pt(ae),m=v({get(){return ae.devSpeed===0},set(g){ae.devSpeed=g?0:null}}),y=E(()=>o("span",null,[u("Autosave"),o(mt,{display:"Save-specific"},{default:()=>[u("*")]})])),h=E(()=>o("span",null,[u("Pause game"),o(mt,{display:"Save-specific"},{default:()=>[u("*")]})])),b=E(()=>o("span",null,[u("Use log for progress bar"),o(mt,{display:"Save-specific"},{default:()=>[u("*")]})]));return(g,_)=>(w(),ne(yt,{modelValue:l.value,"onUpdate:modelValue":_[5]||(_[5]=S=>l.value=S)},{header:se(()=>[_u]),body:se(()=>[o(Ga,{title:"Theme",options:r(n),modelValue:r(d),"onUpdate:modelValue":_[0]||(_[0]=S=>gt(d)?d.value=S:null)},null,8,["options","modelValue"]),(w(),ne(ze(r(i)))),o(sl,{title:"Show TPS",modelValue:r(s),"onUpdate:modelValue":_[1]||(_[1]=S=>gt(s)?s.value=S:null)},null,8,["modelValue"]),Su,o(sl,{title:r(y),modelValue:r(c),"onUpdate:modelValue":_[2]||(_[2]=S=>gt(c)?c.value=S:null)},null,8,["title","modelValue"]),r($e).enablePausing?(w(),ne(sl,{key:0,title:r(h),modelValue:r(m),"onUpdate:modelValue":_[3]||(_[3]=S=>gt(m)?m.value=S:null)},null,8,["title","modelValue"])):O("",!0),o(sl,{title:r(b),modelValue:r(p),"onUpdate:modelValue":_[4]||(_[4]=S=>gt(p)?p.value=S:null)},null,8,["title","modelValue"])]),_:1},8,["modelValue"]))}});var Bu=Pe(Eu,[["__scopeId","data-v-0d685451"]]);const Nu=["onSubmit"],Iu={class:"field"},Mu={key:0,class:"field-title"},Du=["placeholder"],xu=ue({__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,n=yl(zt(l,"title"),"span"),i=Rt(null);ia(()=>{var p;(p=i.value)==null||p.focus()});const s=v({get(){return r(l.modelValue)||""},set(p){t("update:modelValue",p)}});function d(){t("submit")}function c(){l.submitOnBlur!==!1?t("submit"):t("cancel")}return(p,m)=>(w(),D("form",{onSubmit:$l(d,["prevent"])},[f("div",Iu,[r(n)?(w(),D("span",Mu,[(w(),ne(ze(r(n))))])):O("",!0),e.textArea?(w(),ne(r(ho),{key:1,modelValue:r(s),"onUpdate:modelValue":m[0]||(m[0]=y=>gt(s)?s.value=y:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:c,ref_key:"field",ref:i},null,8,["modelValue","placeholder","maxHeight"])):sa((w(),D("input",{key:2,type:"text","onUpdate:modelValue":m[1]||(m[1]=y=>gt(s)?s.value=y:null),placeholder:e.placeholder,class:et({fullWidth:!e.title}),onBlur:c,ref_key:"field",ref:i},null,42,Du)),[[co,r(s)]])])],40,Nu))}});var Yn=Pe(xu,[["__scopeId","data-v-67b44a54"]]);const Pu={key:0},Tu=["onClick","disabled"],Fu={key:0},Uu=["onClick"],Ru=ue({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const n=pt(e),i=L(!1);Kt(i,c=>{t("confirmingChanged",c)});function s(){if(r(n.skipConfirm)){t("click");return}i.value&&t("click"),i.value=!i.value}function d(){i.value=!1}return(c,p)=>(w(),D("span",{class:et(["container",{confirming:i.value}])},[i.value?(w(),D("span",Pu,"Are you sure?")):O("",!0),f("button",{onClick:$l(s,["stop"]),class:"button danger",disabled:e.disabled},[i.value?(w(),D("span",Fu,"Yes")):Ht(c.$slots,"default",{key:1},void 0,!0)],8,Tu),i.value?(w(),D("button",{key:1,class:"button",onClick:$l(d,["stop"])},"No",8,Uu)):O("",!0)],2))}});var Ou=Pe(Ru,[["__scopeId","data-v-2f8ef34c"]]);const Gu=["onClick"],$u=ue({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const l=L(!1),n=L(null);function i(){t("click"),n.value&&clearTimeout(n.value),l.value=!1,Sl(()=>{l.value=!0,n.value=setTimeout(()=>l.value=!1,500)})}return(s,d)=>(w(),D("button",{onClick:$l(i,["stop"]),class:et(["feedback",{activated:l.value,left:e.left}])},[Ht(s.$slots,"default",{},void 0,!0)],10,Gu))}});var Qu=Pe($u,[["__scopeId","data-v-01a1b95c"]]);const cl=e=>(rl("data-v-5285ac49"),e=e(),ul(),e),qu=cl(()=>f("div",{class:"handle material-icons"},"drag_handle",-1)),Vu={key:0,class:"actions"},Hu=cl(()=>f("span",{class:"material-icons"},"content_paste",-1)),Lu=cl(()=>f("span",{class:"material-icons"},"content_copy",-1)),ju=cl(()=>f("span",{class:"material-icons"},"edit",-1)),Wu=cl(()=>f("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),Ku={key:1,class:"actions"},zu=cl(()=>f("span",{class:"material-icons"},"check",-1)),Ju=cl(()=>f("span",{class:"material-icons"},"close",-1)),Xu={key:2,class:"details"},Yu={class:"save-version"},Zu=cl(()=>f("br",null,null,-1)),ed={key:0},td={key:1},ld={key:3,class:"details"},ad={key:4,class:"details error"},nd=cl(()=>f("br",null,null,-1)),od=ue({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const l=e,{save:n}=pt(l),i=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),s=L(!1),d=L(!1),c=L("");Kt(s,()=>c.value=n.value.name||"");const p=v(()=>n.value&&n.value.id===ae.id),m=v(()=>p.value?ae.time:n.value&&n.value.time||0),y=Tl(v(()=>{var b,g,_,S;return`Day ${(S=(_=(g=(b=n.value)==null?void 0:b.layers)==null?void 0:g.main)==null?void 0:_.day)!=null?S:1}`}));function h(){t("editName",c.value),s.value=!1}return(b,g)=>(w(),D("div",{class:et(["save",{active:r(p)}])},[qu,s.value?(w(),D("div",Ku,[f("button",{onClick:h,class:"button"},[o(mt,{display:"Save",direction:r(Be).Left,class:"info"},{default:se(()=>[zu]),_:1},8,["direction"])]),f("button",{onClick:g[5]||(g[5]=_=>s.value=!s.value),class:"button"},[o(mt,{display:"Cancel",direction:r(Be).Left,class:"info"},{default:se(()=>[Ju]),_:1},8,["direction"])])])):(w(),D("div",Vu,[r(n).error==null&&!d.value?(w(),ne(Qu,{key:0,onClick:g[0]||(g[0]=_=>t("export")),class:"button",left:""},{default:se(()=>[o(mt,{display:"Export",direction:r(Be).Left,class:"info"},{default:se(()=>[Hu]),_:1},8,["direction"])]),_:1})):O("",!0),r(n).error==null&&!d.value?(w(),D("button",{key:1,onClick:g[1]||(g[1]=_=>t("duplicate")),class:"button"},[o(mt,{display:"Duplicate",direction:r(Be).Left,class:"info"},{default:se(()=>[Lu]),_:1},8,["direction"])])):O("",!0),r(n).error==null&&!d.value?(w(),D("button",{key:2,onClick:g[2]||(g[2]=_=>s.value=!s.value),class:"button"},[o(mt,{display:"Edit Name",direction:r(Be).Left,class:"info"},{default:se(()=>[ju]),_:1},8,["direction"])])):O("",!0),o(Ou,{disabled:r(p),onClick:g[3]||(g[3]=_=>t("delete")),onConfirmingChanged:g[4]||(g[4]=_=>d.value=_)},{default:se(()=>[o(mt,{display:"Delete",direction:r(Be).Left,class:"info"},{default:se(()=>[Wu]),_:1},8,["direction"])]),_:1},8,["disabled"])])),r(n).error==null&&!s.value?(w(),D("div",Xu,[f("button",{class:"button open",onClick:g[6]||(g[6]=_=>t("open"))},[f("h3",null,Se(r(n).name),1)]),f("span",Yu,"v"+Se(r(n).modVersion),1),Zu,r(m)?(w(),D("div",ed,"Last played "+Se(r(i).format(r(m))),1)):O("",!0),r(y)?(w(),D("div",td,[(w(),ne(ze(r(y))))])):O("",!0)])):r(n).error==null&&s.value?(w(),D("div",ld,[o(Yn,{modelValue:c.value,"onUpdate:modelValue":g[7]||(g[7]=_=>c.value=_),class:"editname",onSubmit:h},null,8,["modelValue"])])):(w(),D("div",ad,[u(" Error: Failed to load save with id "+Se(r(n).id),1),nd,u(Se(r(n).error),1)]))],2))}});var id=Pe(od,[["__scopeId","data-v-5285ac49"]]);const Qa=e=>(rl("data-v-3b9991aa"),e=e(),ul(),e),sd=Qa(()=>f("h2",null,"Saves Manager",-1)),rd={class:"modal-footer"},ud={class:"field"},dd=Qa(()=>f("span",{class:"field-title"},"Create Save",-1)),cd={class:"field-buttons"},pd={class:"footer"},md=Qa(()=>f("div",{style:{"flex-grow":"1"}},null,-1)),gd=ue({__name:"SavesManager",setup(e,{expose:t}){const l=L(!1),n=L(null);t({open(){l.value=!0}});const i=L(!1),s=L(""),d=L(null);Kt(s,M=>{M?Sl(()=>{try{if(M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=gl.decompressFromUTF16(M);else{console.warn("Unable to determine preset encoding",M),i.value=!0;return}const k=JSON.parse(M);if(typeof k!="object"){i.value=!0;return}const F=ea();k.id=F,qt(k),s.value="",i.value=!1,tt.saves.push(F)}catch{i.value=!0}}):i.value=!1});let c={},p=L(Object.keys(c).reduce((M,k)=>(M.push({label:k.split("/").slice(-1)[0].slice(0,-4),value:c[k]}),M),[]));const m=ua({});function y(M){if(m[M]==null){let k=localStorage.getItem(M);if(k==null)m[M]={error:"Save doesn't exist in localStorage",id:M};else if(k==="dW5kZWZpbmVk")m[M]={error:"Save is undefined",id:M};else try{if(k[0]!=="{")if(k[0]==="e")k=decodeURIComponent(escape(atob(k)));else if(k[0]==="\u1BE1")k=gl.decompressFromUTF16(k);else return console.warn("Unable to determine preset encoding",k),i.value=!0,m[M]={error:"Unable to determine preset encoding",id:M},m[M];m[M]={...JSON.parse(k),id:M}}catch(F){m[M]={error:F,id:M},console.warn(`SavesManager: Failed to load info about save with id ${M}: ${F} ${k}`)}}return m[M]}Kt(l,M=>{M&&Object.keys(m).forEach(k=>delete m[k])});const h=v(()=>tt.saves.reduce((M,k)=>(M[k]=y(k),M),{}));function b(M){let k;switch(ae.id===M?k=Bn(ae[ut]):k=JSON.stringify(h.value[M]),$e.exportEncoding){default:console.warn(`Unknown save encoding: ${$e.exportEncoding}. Defaulting to lz`);case"lz":k=gl.compressToUTF16(k);break;case"base64":k=btoa(unescape(encodeURIComponent(k)));break;case"plain":break}const F=document.createElement("textarea");F.value=k,document.body.appendChild(F),F.select(),F.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(F)}function g(M){ae.id===M&&qt();const k={...h.value[M],id:ea()};qt(k),tt.saves.push(k.id)}function _(M){tt.saves=tt.saves.filter(k=>k!==M),localStorage.removeItem(M),m[M]=void 0}function S(M){h.value[ae.id].time=ae.time,qt(),m[ae.id]=void 0,_l(h.value[M]),m[M]=void 0}function x(M){if(d.value=M,Sl(()=>{d.value=null}),M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=gl.decompressFromUTF16(M);else{console.warn("Unable to determine preset encoding",M);return}const k=JSON.parse(M);k.id=ea(),qt(k),tt.saves.push(k.id),S(k.id)}function W(M,k){const F=h.value[M];F&&(F.name=k,ae.id===M?(ae.name=k,qt()):(qt(F),m[M]=void 0))}return(M,k)=>(w(),ne(yt,{modelValue:l.value,"onUpdate:modelValue":k[4]||(k[4]=F=>l.value=F),ref_key:"modal",ref:n},{header:se(()=>[sd]),body:se(({shown:F})=>[F?(w(),ne(r(fo),{key:0,list:r(tt).saves,handle:".handle",itemKey:X=>X},{item:se(({element:X})=>[o(id,{save:r(h)[X],onOpen:he=>S(X),onExport:he=>b(X),onEditName:he=>W(X,he),onDuplicate:he=>g(X),onDelete:he=>_(X)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):O("",!0)]),footer:se(()=>[f("div",rd,[o(Yn,{modelValue:s.value,"onUpdate:modelValue":k[0]||(k[0]=F=>s.value=F),title:"Import Save",placeholder:"Paste your save here!",class:et({importingFailed:i.value})},null,8,["modelValue","class"]),f("div",ud,[dd,f("div",cd,[f("button",{class:"button",onClick:k[1]||(k[1]=F=>S(r(Dl)().id))},"New Game"),Object.keys(r(p)).length>0?(w(),ne(Ga,{key:0,options:r(p),modelValue:d.value,"onUpdate:modelValue":k[2]||(k[2]=F=>x(F)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):O("",!0)])]),f("div",pd,[md,f("button",{class:"button modal-default-button",onClick:k[3]||(k[3]=F=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Zn=Pe(gd,[["__scopeId","data-v-3b9991aa"]]);const Ot=e=>(rl("data-v-8495e562"),e=e(),ul(),e),vd=["src","alt"],fd={key:1,class:"title"},hd=Ot(()=>f("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),yd={class:"discord"},bd={class:"discord-links"},wd={key:0},Ad=["href"],Cd=Ot(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),kd=Ot(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),_d={href:"https://forums.moddingtree.com/",target:"_blank"},Sd=Ot(()=>f("span",{class:"material-icons"},"forum",-1)),Ed=Ot(()=>f("span",{class:"material-icons"},"info",-1)),Bd=Ot(()=>f("span",{class:"material-icons"},"library_books",-1)),Nd=Ot(()=>f("span",{class:"material-icons"},"settings",-1)),Id=Ot(()=>f("span",{class:"material-icons"},"library_books",-1)),Md=Ot(()=>f("span",{class:"material-icons"},"settings",-1)),Dd=Ot(()=>f("span",{class:"material-icons"},"info",-1)),xd={href:"https://forums.moddingtree.com/",target:"_blank"},Pd=Ot(()=>f("span",{class:"material-icons"},"forum",-1)),Td={class:"discord"},Fd={class:"discord-links"},Ud={key:0},Rd=["href"],Od=Ot(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Gd=Ot(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),$d=ue({__name:"Nav",setup(e){const t=L(null),l=L(null),n=L(null),i=L(null),{useHeader:s,banner:d,title:c,discordName:p,discordLink:m,versionNumber:y}=$e;function h(){window.open(m,"mywindow")}return(b,g)=>(w(),D(B,null,[r(s)?(w(),D("div",hl({key:0,class:"nav"},b.$attrs),[r(d)?(w(),D("img",{key:0,src:r(d),class:"banner",alt:r(c)},null,8,vd)):(w(),D("div",fd,Se(r(c)),1)),f("div",{onClick:g[0]||(g[0]=_=>{var S;return(S=i.value)==null?void 0:S.open()}),class:"version-container"},[o(mt,{display:"Changelog",direction:r(Be).Down,class:"version"},{default:se(()=>[f("span",null,"v"+Se(r(y)),1)]),_:1},8,["direction"])]),hd,f("div",yd,[f("span",{onClick:h,class:"material-icons"},"discord"),f("ul",bd,[r(m)?(w(),D("li",wd,[f("a",{href:r(m),target:"_blank"},Se(r(p)),9,Ad)])):O("",!0),Cd,kd])]),f("div",null,[f("a",_d,[o(mt,{display:"Forums",direction:r(Be).Down,yoffset:"5px"},{default:se(()=>[Sd]),_:1},8,["direction"])])]),f("div",{onClick:g[1]||(g[1]=_=>{var S;return(S=t.value)==null?void 0:S.open()})},[o(mt,{display:"Info",direction:r(Be).Down,class:"info"},{default:se(()=>[Ed]),_:1},8,["direction"])]),f("div",{onClick:g[2]||(g[2]=_=>{var S;return(S=l.value)==null?void 0:S.open()})},[o(mt,{display:"Saves",direction:r(Be).Down,xoffset:"-20px"},{default:se(()=>[Bd]),_:1},8,["direction"])]),f("div",{onClick:g[3]||(g[3]=_=>{var S;return(S=n.value)==null?void 0:S.open()})},[o(mt,{display:"Options",direction:r(Be).Down,xoffset:"-66px"},{default:se(()=>[Nd]),_:1},8,["direction"])])],16)):(w(),D("div",hl({key:1,class:"overlay-nav"},b.$attrs),[f("div",{onClick:g[4]||(g[4]=_=>{var S;return(S=i.value)==null?void 0:S.open()}),class:"version-container"},[o(mt,{display:"Changelog",direction:r(Be).Right,xoffset:"25%",class:"version"},{default:se(()=>[f("span",null,"v"+Se(r(y)),1)]),_:1},8,["direction"])]),f("div",{onClick:g[5]||(g[5]=_=>{var S;return(S=l.value)==null?void 0:S.open()})},[o(mt,{display:"Saves",direction:r(Be).Right},{default:se(()=>[Id]),_:1},8,["direction"])]),f("div",{onClick:g[6]||(g[6]=_=>{var S;return(S=n.value)==null?void 0:S.open()})},[o(mt,{display:"Options",direction:r(Be).Right},{default:se(()=>[Md]),_:1},8,["direction"])]),f("div",{onClick:g[7]||(g[7]=_=>{var S;return(S=t.value)==null?void 0:S.open()})},[o(mt,{display:"Info",direction:r(Be).Right},{default:se(()=>[Dd]),_:1},8,["direction"])]),f("div",null,[f("a",xd,[o(mt,{display:"Forums",direction:r(Be).Right,xoffset:"7px"},{default:se(()=>[Pd]),_:1},8,["direction"])])]),f("div",Td,[f("span",{onClick:h,class:"material-icons"},"discord"),f("ul",Fd,[r(m)?(w(),D("li",Ud,[f("a",{href:r(m),target:"_blank"},Se(r(p)),9,Rd)])):O("",!0),Od,Gd])])],16)),o(ku,{ref_key:"info",ref:t,changelog:i.value},null,8,["changelog"]),o(Zn,{ref_key:"savesManager",ref:l},null,512),o(Bu,{ref_key:"options",ref:n},null,512),o(nu,{ref_key:"changelog",ref:i},null,512)],64))}});var eo=Pe($d,[["__scopeId","data-v-8495e562"]]);const qa=e=>(rl("data-v-248e2ebb"),e=e(),ul(),e),Qd={class:"inner-tab"},qd={key:1},Vd=qa(()=>f("br",null,null,-1)),Hd=u(" You can help continue the "),Ld=qa(()=>f("i",null,"advent",-1)),jd=u("ure at: "),Wd=qa(()=>f("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[f("span",{class:"material-icons info-modal-discord"},"discord"),u(" The Paper Pilot Community ")],-1)),Kd=ue({__name:"Game",setup(e){const t=zt(ae,"tabs"),l=v(()=>Object.keys(Ct)),n=$e.useHeader,i=yl(J.loreBody);function s(d){const{display:c,minimized:p,minWidth:m,name:y,color:h,minimizable:b,nodes:g}=d;return{display:c,minimized:p,minWidth:m,name:y,color:h,minimizable:b,nodes:g}}return(d,c)=>(w(),D("div",{class:et(["tabs-container",{useHeader:r(n)}])},[(w(!0),D(B,null,Ea(r(t),(p,m)=>{var y,h;return w(),D("div",{key:m,class:et(["tab",r((y=r(Ct)[p])==null?void 0:y.classes)]),ref_for:!0,ref:`tab-${m}`,style:ot(r((h=r(Ct)[p])==null?void 0:h.style))},[m===0&&!r(n)?(w(),ne(eo,{key:0})):O("",!0),f("div",Qd,[r(l).includes(p)?(w(),ne(eu,hl({key:0},s(r(Ct)[p]),{index:m,tab:()=>{var b;return(b=d.$refs[`tab-${m}`])==null?void 0:b[0]}}),null,16,["index","tab"])):(w(),ne(ze(p),{key:1,index:m},null,8,["index"]))])],6)}),128)),o(yt,{modelValue:r(J).showLoreModal.value,"onUpdate:modelValue":c[0]||(c[0]=p=>r(J).showLoreModal.value=p)},{header:se(()=>[f("h2",null,Se(r(J).loreTitle.value),1)]),body:se(()=>[r(i)?(w(),ne(ze(r(i)),{key:0})):O("",!0),r(J).loreScene.value!==-1?(w(),D("div",qd,[o(Xr,{day:r(J).loreScene.value},null,8,["day"]),Vd,Hd,Ld,jd,Wd])):O("",!0)]),_:1},8,["modelValue"])],2))}});var zd=Pe(Kd,[["__scopeId","data-v-248e2ebb"]]);const zl=e=>(rl("data-v-4a50ce42"),e=e(),ul(),e),Jd={class:"game-over-modal-header"},Xd=["src","alt"],Yd={class:"game-over-modal-title"},Zd=zl(()=>f("h2",null,"Congratulations!",-1)),ec={key:0},tc=zl(()=>f("br",null,null,-1)),lc=zl(()=>f("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),ac=zl(()=>f("br",null,null,-1)),nc=["href"],oc=zl(()=>f("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),ic=ue({__name:"GameOverScreen",setup(e){const{title:t,logo:l,discordName:n,discordLink:i,versionNumber:s,versionTitle:d}=$e,c=v(()=>da(ae.timePlayed)),p=v(()=>$a.value&&!ae.keepGoing),m=zt(ae,"autosave");function y(){ae.keepGoing=!0}function h(){_l(Dl())}return(b,g)=>(w(),ne(yt,{"model-value":r(p)},{header:se(()=>[f("div",Jd,[r(l)?(w(),D("img",{key:0,class:"game-over-modal-logo",src:r(l),alt:r(t)},null,8,Xd)):O("",!0),f("div",Yd,[Zd,f("h4",null,"You've beaten "+Se(r(t))+" v"+Se(r(s))+": "+Se(r(d)),1)])])]),body:se(({shown:_})=>[_?(w(),D("div",ec,[f("div",null,"It took you "+Se(r(c))+" to beat the game.",1),tc,lc,ac,f("div",null,[f("a",{href:r(i),class:"game-over-modal-discord-link"},[oc,u(" "+Se(r(n)),1)],8,nc)]),o(sl,{title:"Autosave",modelValue:r(m),"onUpdate:modelValue":g[0]||(g[0]=S=>gt(m)?m.value=S:null)},null,8,["modelValue"])])):O("",!0)]),footer:se(()=>[f("div",{class:"game-over-footer"},[f("button",{onClick:y,class:"button"},"Keep Going"),f("button",{onClick:h,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var sc=Pe(ic,[["__scopeId","data-v-4a50ce42"]]);const ga=e=>(rl("data-v-3de07c06"),e=e(),ul(),e),rc=ga(()=>f("div",{class:"nan-modal-header"},[f("h2",null,"NaN value detected!")],-1)),uc={key:0},dc=ga(()=>f("br",null,null,-1)),cc=["href"],pc=ga(()=>f("span",{class:"material-icons nan-modal-discord"},"discord",-1)),mc=ga(()=>f("br",null,null,-1)),gc={class:"nan-footer"},vc=ue({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:l}=$e,n=zt(ae,"autosave"),i=zt(dt,"hasNaN"),s=L(null),d=v(()=>{var g;return(g=dt.NaNPath)==null?void 0:g.join(".")}),c=v(()=>{var g;return(g=dt.NaNPath)==null?void 0:g.slice(-1)[0]}),p=v(()=>dt.NaNReceiver&&c.value?dt.NaNReceiver[c.value]:null),m=v({get(){return ae.devSpeed===0},set(g){ae.devSpeed=g?null:0}});function y(){dt.NaNReceiver&&c.value&&(dt.NaNReceiver[c.value]=new a(0),dt.hasNaN=!1)}function h(){dt.NaNReceiver&&c.value&&(dt.NaNReceiver[c.value]=new a(1),dt.hasNaN=!1)}function b(){dt.NaNReceiver&&c.value&&(dt.NaNReceiver[c.value]=new a(NaN),dt.hasNaN=!1)}return(g,_)=>(w(),D(B,null,[o(yt,hl({modelValue:r(i),"onUpdate:modelValue":_[4]||(_[4]=S=>gt(i)?i.value=S:null)},g.$attrs),{header:se(()=>[rc]),body:se(()=>[f("div",null,[u(' Attempted to assign "'+Se(r(d))+'" to NaN',1),r(p)?(w(),D("span",uc,Se(" ")+"(previously "+Se(r(V)(r(p)))+")",1)):O("",!0),u(". Auto-saving has been "+Se(r(n)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),dc,f("div",null,[f("a",{href:r(l),class:"nan-modal-discord-link"},[pc,u(" "+Se(r(t)),1)],8,cc)]),mc,o(sl,{title:"Autosave",modelValue:r(n),"onUpdate:modelValue":_[0]||(_[0]=S=>gt(n)?n.value=S:null)},null,8,["modelValue"]),r($e).enablePausing?(w(),ne(sl,{key:0,title:"Pause game",modelValue:r(m),"onUpdate:modelValue":_[1]||(_[1]=S=>gt(m)?m.value=S:null)},null,8,["modelValue"])):O("",!0)]),footer:se(()=>[f("div",gc,[f("button",{onClick:_[2]||(_[2]=S=>{var x;return(x=s.value)==null?void 0:x.open()}),class:"button"},"Open Saves Manager"),f("button",{onClick:y,class:"button"},"Set to 0"),f("button",{onClick:h,class:"button"},"Set to 1"),r(p)&&r(a).neq(r(p),0)&&r(a).neq(r(p),1)?(w(),D("button",{key:0,onClick:_[3]||(_[3]=S=>i.value=!1),class:"button"}," Set to previous ")):O("",!0),f("button",{onClick:b,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),o(Zn,{ref_key:"savesManager",ref:s},null,512)],64))}});var fc=Pe(vc,[["__scopeId","data-v-3de07c06"]]);const hc={key:0,class:"tpsDisplay"},yc={key:0,class:"low"},bc=ue({__name:"TPS",setup(e){const t=v(()=>a.div(dt.lastTenTicks.length,dt.lastTenTicks.reduce((s,d)=>s+d,0))),l=L([]);Ft(()=>{l.value.push(Math.round(t.value.toNumber())),l.value.length>10&&(l.value=l.value.slice(1))});const n=v(()=>l.value.reduce((s,d)=>a.max(s,d),0)),i=v(()=>a.sub(t.value,n.value).gt(1));return(s,d)=>r(t).isNan()?O("",!0):(w(),D("div",hc,[u(" TPS: "+Se(r(ee)(r(t)))+" ",1),o(ra,{name:"fade"},{default:se(()=>[r(i)?(w(),D("span",yc,Se(r(ee)(r(n))),1)):O("",!0)]),_:1})]))}});var wc=Pe(bc,[["__scopeId","data-v-46a3ed5b"]]);var Ac=ue({__name:"App",setup(e){const t=$e.useHeader,l=v(()=>Bl[tt.theme].variables),n=zt(tt,"showTPS"),i=v(()=>De(E(()=>o(B,null,[Ri.map(Z)]))));return(s,d)=>(w(),D(B,null,[f("div",{id:"modal-root",style:ot(r(l))},null,4),f("div",{class:et(["app",{useHeader:r(t)}]),style:ot(r(l))},[r(t)?(w(),ne(eo,{key:0})):O("",!0),o(zd),r(r(n))?(w(),ne(wc,{key:1})):O("",!0),o(sc),o(fc),(w(),ne(ze(r(i))))],6)],64))}});var Cc=Pe(Ac,[["__scopeId","data-v-580927bb"]]);function kc(e={}){const{immediate:t=!1,onNeedRefresh:l,onOfflineReady:n,onRegistered:i,onRegisterError:s}=e;let d,c;const p=async(m=!0)=>{m&&(d==null||d.addEventListener("controlling",y=>{y.isUpdate&&window.location.reload()})),c&&c.waiting&&await bo(c.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){d=new yo("./sw.js",{scope:"./",type:"classic"}),d.addEventListener("activated",m=>{m.isUpdate||n==null||n()});{const m=()=>{l==null||l()};d.addEventListener("waiting",m),d.addEventListener("externalwaiting",m)}d.register({immediate:t}).then(m=>{c=m,i==null||i(m)}).catch(m=>{s==null||s(m)})}return p}function _c(e={}){const{immediate:t=!0,onNeedRefresh:l,onOfflineReady:n,onRegistered:i,onRegisterError:s}=e,d=L(!1),c=L(!1);return{updateServiceWorker:kc({immediate:t,onNeedRefresh(){d.value=!0,l==null||l()},onOfflineReady(){c.value=!0,n==null||n()},onRegistered:i,onRegisterError:s}),offlineReady:c,needRefresh:d}}document.title=$e.title;window.projInfo=$e;if($e.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 xi();const{globalBus:e}=await la(()=>Promise.resolve().then(function(){return vi}),void 0),{startGameLoop:t}=await la(()=>import("./gameLoop.c803c83a.js"),["assets/gameLoop.c803c83a.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=po(Cc);e.emit("setupVue",l),l.mount("#app"),Sl(()=>{const n=cn(),{updateServiceWorker:i}=_c({onNeedRefresh(){n.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){i()}})},onOfflineReady(){n.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{a as D,la as _,dt as a,$e as b,Ur as c,je as g,Ta as l,ae as p,tt as s}; +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 xi();const{globalBus:e}=await la(()=>Promise.resolve().then(function(){return vi}),void 0),{startGameLoop:t}=await la(()=>import("./gameLoop.934d6e22.js"),["assets/gameLoop.934d6e22.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=po(Cc);e.emit("setupVue",l),l.mount("#app"),Sl(()=>{const n=cn(),{updateServiceWorker:i}=_c({onNeedRefresh(){n.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){i()}})},onOfflineReady(){n.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{a as D,la as _,dt as a,$e as b,Ur as c,je as g,Ta as l,ae as p,tt as s}; diff --git a/index.html b/index.html index ee55ca7..0b934b1 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ Advent Incremental - + diff --git a/sw.js b/sw.js index 9feaf75..e3eb476 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,l)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let t={};const o=e=>i(e,r),u={module:{uri:r},exports:t,require:o};s[r]=Promise.all(n.map((e=>u[e]||o(e)))).then((e=>(l(...e),t)))}}define(["./workbox-958fa2bd"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"assets/@fontsource.c175eac8.css",revision:null},{url:"assets/@vue.4ce677c2.js",revision:null},{url:"assets/gameLoop.c803c83a.js",revision:null},{url:"assets/index.734848bb.css",revision:null},{url:"assets/index.ddcf8844.js",revision:null},{url:"assets/is-plain-object.906d88e8.js",revision:null},{url:"assets/lz-string.731cedc5.js",revision:null},{url:"assets/nanoevents.1080beb7.js",revision:null},{url:"assets/sortablejs.29100d8a.js",revision:null},{url:"assets/vue-next-select.9e6f4164.css",revision:null},{url:"assets/vue-next-select.a2bfab1d.js",revision:null},{url:"assets/vue-textarea-autosize.35804eaf.js",revision:null},{url:"assets/vue-toastification.4b5f8ac8.css",revision:null},{url:"assets/vue-toastification.6f567382.js",revision:null},{url:"assets/vue.92681fcb.js",revision:null},{url:"assets/vuedraggable.7949458c.js",revision:null},{url:"assets/workbox-window.8d14e8b7.js",revision:null},{url:"index.html",revision:"fe3a5765918eccaaff414d05c83a27fe"},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"robots.txt",revision:"5e0bd1c281a62a380d7a948085bfe2d1"},{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"5f32ad2a77eb001e1b6a588835dc1efc"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))})); +if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,l)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let t={};const o=e=>i(e,r),u={module:{uri:r},exports:t,require:o};s[r]=Promise.all(n.map((e=>u[e]||o(e)))).then((e=>(l(...e),t)))}}define(["./workbox-958fa2bd"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"assets/@fontsource.c175eac8.css",revision:null},{url:"assets/@vue.4ce677c2.js",revision:null},{url:"assets/gameLoop.934d6e22.js",revision:null},{url:"assets/index.734848bb.css",revision:null},{url:"assets/index.d4328663.js",revision:null},{url:"assets/is-plain-object.906d88e8.js",revision:null},{url:"assets/lz-string.731cedc5.js",revision:null},{url:"assets/nanoevents.1080beb7.js",revision:null},{url:"assets/sortablejs.29100d8a.js",revision:null},{url:"assets/vue-next-select.9e6f4164.css",revision:null},{url:"assets/vue-next-select.a2bfab1d.js",revision:null},{url:"assets/vue-textarea-autosize.35804eaf.js",revision:null},{url:"assets/vue-toastification.4b5f8ac8.css",revision:null},{url:"assets/vue-toastification.6f567382.js",revision:null},{url:"assets/vue.92681fcb.js",revision:null},{url:"assets/vuedraggable.7949458c.js",revision:null},{url:"assets/workbox-window.8d14e8b7.js",revision:null},{url:"index.html",revision:"cf424aae82c3726a2fb37ffdb2c5b8db"},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"robots.txt",revision:"5e0bd1c281a62a380d7a948085bfe2d1"},{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"5f32ad2a77eb001e1b6a588835dc1efc"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));