From aa9aa93de13ef78206f31e2e8294beef18b19bb4 Mon Sep 17 00:00:00 2001
From: ducdat0507 <62660527+ducdat0507@users.noreply.github.com>
Date: Thu, 15 Dec 2022 03:46:46 +0000
Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20thepaper?=
=?UTF-8?q?pilot/Advent-Incremental@f1797beb2f4c023d897256604c55e9b0f674f2?=
=?UTF-8?q?64=20=F0=9F=9A=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
assets/{gameLoop.ee411b18.js => gameLoop.6b8a410b.js} | 2 +-
assets/{index.65f09059.js => index.9d6a97f6.js} | 4 ++--
index.html | 2 +-
sw.js | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
rename assets/{gameLoop.ee411b18.js => gameLoop.6b8a410b.js} (91%)
rename assets/{index.65f09059.js => index.9d6a97f6.js} (95%)
diff --git a/assets/gameLoop.ee411b18.js b/assets/gameLoop.6b8a410b.js
similarity index 91%
rename from assets/gameLoop.ee411b18.js
rename to assets/gameLoop.6b8a410b.js
index acb0e2b..355add1 100644
--- a/assets/gameLoop.ee411b18.js
+++ b/assets/gameLoop.6b8a410b.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.65f09059.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.65f09059.js").then(function(t){return t.c}),["assets/index.65f09059.js","assets/index.efcf3a7b.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.9d6a97f6.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.9d6a97f6.js").then(function(t){return t.c}),["assets/index.9d6a97f6.js","assets/index.efcf3a7b.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.65f09059.js b/assets/index.9d6a97f6.js
similarity index 95%
rename from assets/index.65f09059.js
rename to assets/index.9d6a97f6.js
index 96668b3..5f4c084 100644
--- a/assets/index.65f09059.js
+++ b/assets/index.9d6a97f6.js
@@ -21,7 +21,7 @@ Created at:
/${K(m(a.ocean1))} to box buyable cost
`)}]}),beach:n({name:"Beach Wrapping Paper",id:"beach",ratio:{yellow:{base:Cl*3,exponent:gl},blue:{base:Cl*3,exponent:gl}},background:"radial-gradient(circle at 80% 10%, rgba(255,255,76,1) 8%, rgba(0,0,0,0) 21%), linear-gradient(180deg, rgba(0,255,246,1) 60%, rgba(0,255,246,0) 61%), linear-gradient(215deg, rgba(0,93,255,0) 0%, rgba(0,93,255,0) 66%, rgba(255,255,76,1) 68%), linear-gradient(180deg, rgba(0,0,0,0) 68%, rgba(0,93,255,1) 70%), linear-gradient(205deg, rgba(0,255,246,1) 0%, rgba(0,255,246,1) 100%)",listedBoosts:[{desc:b(()=>`
/${K(m(a.beach1))} to workshop cost
- `)}]})},a={christmas1:b(()=>i.add(s.christmas.buyable.amount.value,1)),rainbow1:b(()=>i.pow(2,s.rainbow.buyable.amount.value)),jazzy1:b(()=>i.ln(i.add(i.ln(i.add(s.jazzy.buyable.amount.value,1)),1))),sunshine1:b(()=>i.add(s.sunshine.buyable.amount.value,1)),ocean1:b(()=>i.pow(1.5,s.ocean.buyable.amount.value)),beach1:b(()=>i.add(s.beach.buyable.amount.value,1))},I=fi(b(()=>Object.values(s).map(E=>E.buyable.amount.value).reduce(i.add,0)),"Total Wrapping Paper"),r=se(!1),d=f(()=>t(Gi,{modelValue:r.value,"onUpdate:modelValue":E=>r.value=E},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:u})),[u,c]=ol(()=>[]),{total:j,trackerDisplay:h}=Jl({resource:I,goal:1e20,name:e,day:Om,color:l,textColor:"var(--feature-foreground)",modal:{show:r,display:d},ignoreTotal:!0}),W=[6,12,18,24,30,36],y=X(()=>({display:{requirement:W[0]+" Total Wrapping Paper",effectDisplay:"Double primary colour dye gain"},shouldEarn:()=>i.gte(j.value,W[0]),visibility:()=>p(!0)})),N=X(()=>({display:{requirement:W[1]+" Total Wrapping Paper",effectDisplay:"Double secondary colour dye gain"},shouldEarn:()=>i.gte(j.value,W[1]),visibility:()=>p(y.earned.value)})),x=X(()=>({display:{requirement:W[2]+" Total Wrapping Paper",effectDisplay:"Buy maximum primary colour dyes"},shouldEarn:()=>i.gte(j.value,W[2]),visibility:()=>p(N.earned.value)})),M=X(()=>({display:{requirement:W[3]+" Total Wrapping Paper",effectDisplay:"Secondary colour dyes don't spend primary colour dyes"},shouldEarn:()=>i.gte(j.value,W[3]),visibility:()=>p(x.earned.value)})),ne=X(()=>({display:{requirement:W[4]+" Total Wrapping Paper",effectDisplay:"Buy maximum secondary colour dyes"},shouldEarn:()=>i.gte(j.value,W[4]),visibility:()=>p(M.earned.value)})),Y=X(()=>({display:{requirement:W[5]+" Total Wrapping Paper",effectDisplay:"Unlock a new elf to help with dyes"},shouldEarn:()=>i.gte(j.value,W[5]),visibility:()=>p(ne.earned.value)})),g={primaryBoost:y,secondaryBoost:N,buyMaxPrimary:x,secondaryNoReset:M,buyMaxSecondary:ne,unlockDyeElf:Y},{collapseMilestones:G,display:P}=sn(g);return{name:e,display:f(()=>t("div",{style:"width: 620px"},[We(h),t(Qi,{resource:I},null),di(s.christmas.display,s.rainbow.display,s.jazzy.display),di(s.christmas.buyable,s.rainbow.buyable,s.jazzy.buyable),t(ge,null,null),di(s.sunshine.display,s.ocean.display,s.beach.display),di(s.sunshine.buyable,s.ocean.buyable,s.beach.buyable),t(ge,null,null),o("button goes here"),t(ge,null,null),P()])),wrappingPaper:s,totalWrappingPaper:j,generalTabCollapsed:c,boosts:a,milestones:g,collapseMilestones:G}}),Ym="paper",Hn=5,F=Ai(Ym,function(){const e="Paper",l="#E8DCB8",n=fi(0,"paper"),s=fi(b(()=>i.min(i.div(he.logs.value,1e9),i.div(_.ash.value,Ne.value))),"pulp"),a=Ks(()=>({scaling:es(1,1.2),baseResource:s,gainResource:Q(n),roundUpCost:!0,spend(te,A){he.logs.value=i.sub(he.logs.value,i.times(A,1e9)),_.ash.value=i.sub(_.ash.value,i.times(A,Ne.value))},gainModifier:$})),I=Ei(()=>({display:f(()=>{const te=i.gte(a.actualGain.value,1)?a.currentAt.value:a.nextAt.value;return t(O,null,[t("span",{style:"font-size: large"},[o("Create "),me(a.currentGain.value),o(" "),n.displayName]),t("br",null,null),t("span",{style:"font-size: large"},[o("Cost: "),hn(he.logs,te),o(" "),s.displayName,o(" ("),me(i.times(te,1e9)),o(" "),he.logs.displayName,o(";")," ",me(i.times(te,Ne.value))," ",_.ash.displayName,o(")")])])}),canClick:()=>i.gte(a.actualGain.value,1),onClick(){!m(this.canClick)||a.convert()},style:"width: 600px; min-height: unset"}));function r(te){const A=He(()=>({...te,display:{title:te.name,description:`Print a copy of "${te.name}", which ${te.elfName} will use to improve their skills! Each copy printed will reduce the "${te.buyableName}" price scaling by 0.95x and make ${te.elfName} purchase +10% faster!`,effectDisplay:f(()=>t(O,null,[tn(i.pow(.95,A.totalAmount.value)),o("x price scaling,")," ",K(i.div(A.totalAmount.value,10).add(1)),o("x auto-purchase speed")])),showAmount:!1},resource:Q(n),cost(){let B=A.amount.value;te.elfName==="Star"&&i.gte(B,10)&&(B=i.pow(10,i.div(B,10))),(te.elfName==="Star"||te.elfName==="Bell")&&(B=i.pow(B,2)),i.gte(B,100)&&(B=i.pow(B,2).div(100)),i.gte(B,1e4)&&(B=i.pow(B,2).div(1e4)),B=i.pow(.95,M.totalAmount.value).times(B);let Ee=5;v.elfTraining.paperElfTraining.milestones[2].earned.value&&Ee--;let pe=i.pow(Ee,B).times(10);return["Peppermint","Twinkle","Cocoa","Frosty"].includes(te.elfName)&&(pe=pe.mul(1e31)),v.elfTraining.paperElfTraining.milestones[0].earned.value&&(pe=i.div(pe,Ve.value.max(1))),je.bought.value&&(pe=pe.div(10)),pe},inverseCost(B){je.bought.value&&(B=i.mul(B,10)),v.elfTraining.paperElfTraining.milestones[0].earned.value&&(B=i.mul(B,Ve.value.max(1)));let Ee=5;v.elfTraining.paperElfTraining.milestones[2].earned.value&&Ee--;let pe=i.div(B,10);return["Peppermint","Twinkle","Cocoa","Frosty"].includes(te.elfName)&&(pe=pe.div(1e31)),pe=pe.log(Ee),pe=pe.div(i.pow(.95,M.totalAmount.value)),i.gte(pe,1e4)&&(pe=i.mul(pe,1e4).root(2)),i.gte(pe,100)&&(pe=i.mul(pe,100).root(2)),(te.elfName==="Star"||te.elfName==="Bell")&&(pe=i.root(pe,2)),te.elfName==="Star"&&i.gte(pe,10)&&(pe=pe.log10().mul(10)),i.isNaN(pe)?i.dZero:pe.floor().max(0)},style:"width: 600px",freeLevels:b(()=>{var B,Ee;return v.elfTraining.paperElfTraining.milestones[4].earned.value&&i.gte((Ee=(B=Object.values(v.elfTraining).find(pe=>pe.name===te.elfName))==null?void 0:B.level.value)!=null?Ee:0,5)&&!["Star","Bell","Gingersnap","Peppermint","Twinkle","Cocoa","Frosty"].includes(te.elfName)?5:0}),totalAmount:b(()=>i.add(A.amount.value,A.freeLevels.value))}));return A}const d=r({name:"Now You're Logging!",elfName:"Holly",buyableName:"Generic Cutters"}),u=r({name:"The Man Who Planted Trees",elfName:"Ivy",buyableName:"Generic Planters"}),c=r({name:"Logjam",elfName:"Hope",buyableName:"Expand Forest"}),j=r({name:"Fahrenheit 451",elfName:"Jack",buyableName:"Heated Cutters"}),h=r({name:"Tillamook Burn Country",elfName:"Mary",buyableName:"Heated Planters"}),W=r({name:"The Garden Tree's Handbook",elfName:"Noel",buyableName:"Fertilized Soil"}),y=r({name:"Firestarter",elfName:"Joy",buyableName:"Small Fire",visibility:()=>p(Ye.elves.smallFireElf.bought.value)}),N=r({name:"An Arsonist's Guide to Writer's Homes in New England",elfName:"Faith",buyableName:"Bonfire",visibility:()=>p(Ye.elves.bonfireElf.bought.value)}),x=r({name:"Little Fires Everywhere",elfName:"Snowball",buyableName:"Kiln",visibility:()=>p(Ye.elves.kilnElf.bought.value)}),M=r({name:"The Book Thief",elfName:"Star",buyableName:"Paper Buyables",visibility:()=>p(Ye.elves.paperElf.bought.value)}),ne=r({name:"Not a box",elfName:"Bell",buyableName:"Box Buyables",visibility:()=>p(Ye.elves.boxElf.bought.value)}),Y=r({name:"Fuzzy Bee and Friends",elfName:"Gingersnap",buyableName:"Cloth Buyables",visibility:()=>p(Ye.elves.clothElf.bought.value)}),g=r({name:"Drills and Mills",elfName:"Peppermint",buyableName:"Coal Drill",visibility:()=>p(Ye.elves.coalDrillElf.bought.value)}),G=r({name:"Deep in the Earth",elfName:"Frosty",buyableName:"Oil Drills",visibility:()=>p(Ye.elves.heavyDrillElf.bought.value)}),P=r({name:"Burning the Midnight Oil",elfName:"Cocoa",buyableName:"Oil-Consuming Machines",visibility:()=>p(Ye.elves.oilElf.bought.value)}),E=r({name:"Physical Metallurgy",elfName:"Twinkle",buyableName:"Metal Buyables",visibility:()=>p(Ye.elves.metalElf.bought.value)}),D=r({name:"Arts and Crafts",elfName:"Carol",buyableName:"Dye Buyables",visibility:()=>p(Ye.elves.dyeElf.bought.value)}),Ze={cuttersBook:d,plantersBook:u,expandersBook:c,heatedCuttersBook:j,heatedPlantersBook:h,fertilizerBook:W,smallFireBook:y,bonfireBook:N,kilnBook:x,paperBook:M,boxBook:ne,clothBook:Y,coalDrillBook:g,heavyDrillBook:G,oilBook:P,metalBook:E,dyeBook:D},Ve=b(()=>Object.values(Ze).reduce((te,A)=>te.add(A.amount.value),new i(0))),Fe=T(()=>({resource:Q(n),cost:1e8,visibility:()=>p(ri.upgrades.paperTools.bought.value),display:{title:"Shepherding for Dummies",description:"Double effectiveness of all cloth actions"}})),ke=T(()=>({resource:Q(n),cost:1e9,visibility:()=>p(ri.upgrades.paperTools.bought.value),display:{title:"Guide to drilling",description:"Double drilling power"}})),ce=T(()=>({resource:Q(n),cost:1e10,visibility:()=>p(ri.upgrades.paperTools.bought.value),display:{title:"Oil and where to find it",description:"Double oil gain"}})),Pe={clothUpgrade:Fe,drillingUpgrade:ke,oilUpgrade:ce},Re=T(()=>({resource:Q(n),cost:1e36,visibility:()=>p(v.elfTraining.heavyDrillElfTraining.milestones[4].earned.value),display:{title:"Paper Burning",description:"Paper adds to ash gain after all other modifiers"}})),je=T(()=>({resource:Q(n),cost:1e40,visibility:()=>p(v.elfTraining.heavyDrillElfTraining.milestones[4].earned.value),display:{title:"Book Cheapener",description:"Books are less expensive"}})),U=T(()=>({resource:Q(n),cost:1e44,visibility:()=>p(v.elfTraining.heavyDrillElfTraining.milestones[4].earned.value),display:{title:"Classroom Supplies",description:"Classrooms' effect is raised to the 1.1"}})),Ie={ashUpgrade:Re,bookUpgrade:je,classroomUpgrade:U},$=oe(()=>[Z(()=>({multiplier:2,description:"Scholar's shoes",enabled:gi.paperUpgrades.paperUpgrade1.bought})),Z(()=>({multiplier:2,description:"Scholar's slacks",enabled:gi.paperUpgrades.paperUpgrade2.bought})),Z(()=>({multiplier:2,description:"Scholar's jacket",enabled:gi.paperUpgrades.paperUpgrade3.bought})),Z(()=>({multiplier:10,description:"Felt Elbow Pads",enabled:gi.paperUpgrades.paperUpgrade4.bought})),Z(()=>({multiplier:ve.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>i.gte(ve.dyes.yellow.amount.value,1)})),Z(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:Ii.milestones.extraExpansionMilestone5.earned})),Z(()=>({multiplier:ji.boosts.sunshine1,description:"Sunshine Wrapping Paper",enabled:()=>i.gte(ji.boosts.sunshine1.value,2)}))]),ze=oe(()=>[Z(()=>({multiplier:.1,description:"Star Level 2",enabled:v.elfTraining.paperElfTraining.milestones[1].earned}))]),Ne=b(()=>ze.apply(1e6)),[Oi,qe]=ol(()=>[{title:"Paper Gain",modifier:$,base:1},{title:"Ash Cost",modifier:ze,base:1e6,unit:" ash/pulp"}]),$e=se(!1),Ce=f(()=>t(Gi,{modelValue:$e.value,"onUpdate:modelValue":te=>$e.value=te},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:Oi}));ui.on("update",te=>{i.lt(L.day.value,Hn)||(n.value=i.times(te,ri.buyables.passivePaper.amount.value).times(a.currentGain.value).div(100).add(n.value))});const{total:Vi,trackerDisplay:Be}=Jl({resource:n,goal:5e3,name:e,day:Hn,color:l,textColor:"var(--feature-foreground)",modal:{show:$e,display:Ce}});return{name:e,day:Hn,color:l,paper:n,totalPaper:Vi,paperConversion:a,books:Ze,upgrades:Pe,upgrades2:Ie,generalTabCollapsed:qe,minWidth:700,display:f(()=>t(O,null,[We(Be),t(ge,null,null),t(Qi,{resource:n,color:l,style:"margin-bottom: 0"},null),t(ge,null,null),We(I),t(ge,null,null),di(...Object.values(Pe)),t(ge,null,null),tl(...Object.values(Ze))])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),K(n.value),o(" "),n.displayName]))}}),Nm="trees",Vs=1,Ws=.1,he=Ai(Nm,function(){const e="Trees",l="#4BDC13",n="green",s=fi(0,"logs"),a=fi(0,"saplings"),I=se(0),r=se(0),d=se(0),u=oe(()=>[ye(()=>({addend:()=>i.times(Ve.amount.value,10),description:"Expand Forest",enabled:P.bought})),ye(()=>({addend:()=>i.div(Ii.foundationProgress.value,2),description:"75% Foundation Completed",enabled:Ii.milestones.morePlantsMilestone1.earned})),Z(()=>({multiplier:2,description:"5 Elves Trained",enabled:Ye.milestones[4].earned})),Z(()=>({multiplier:2,description:"8 Elves Trained",enabled:Ye.milestones[7].earned})),Z(()=>({multiplier:4,description:"Lumberjack Boots",enabled:gi.treesUpgrades.treesUpgrade1.bought})),ye(()=>({addend:ve.boosts.blue1,description:"Blue Dye Boost 1",enabled:()=>i.gte(ve.dyes.blue.amount.value,1)})),ye(()=>({addend:()=>i.pow(ce.value,.99),description:"Hope Level 1",enabled:v.elfTraining.expandersElfTraining.milestones[0].earned}))]),c=fi(b(()=>i.sub(u.apply(10),a.value)),"trees"),j=b(()=>u.apply(10)),h=T(()=>({resource:Q(s),cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),W=T(()=>({resource:Q(s),cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),y=T(()=>({resource:Q(s),cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),N=T(()=>({resource:Q(s),cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),x=T(()=>({resource:Q(s),cost:40,display:{title:"Research I",description:"Trees give 25% more logs, and unlock more upgrades"}})),M=[h,W,y,N,x],ne=T(()=>({resource:Q(s),cost:50,visibility:()=>p(x.bought.value),display:{title:"Sharper Fingers",description:"Manually cut trees twice as often"}})),Y=T(()=>({resource:Q(s),cost:50,visibility:()=>p(x.bought.value),display:{title:"Greener Fingers",description:"Manually Plant trees twice as often"}})),g=T(()=>({resource:Q(s),cost:150,visibility:()=>p(x.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),G=T(()=>({resource:Q(s),cost:150,visibility:()=>p(x.bought.value),display:{title:"Smart Spades",description:"Each time you manually plant trees, gain 1s of automatic tree planting production"}})),P=T(()=>({resource:Q(s),cost:300,visibility:()=>p(x.bought.value),display:{title:"Research II",description:"Trees give 25% more logs, and unlock repeatable purchases"}})),E=[ne,Y,g,G,P],D=He(()=>({resource:Q(s),cost(){let k=this.amount.value;return i.gte(k,50)&&(k=i.pow(k,2).div(50)),i.gte(k,200)&&(k=i.pow(k,2).div(200)),i.gte(k,2e6)&&(k=i.pow(k,2).div(2e6)),i.gte(k,2e30)&&(k=i.pow(k,10).div(i.pow(2e30,9))),k=i.pow(.95,F.books.cuttersBook.totalAmount.value).times(k),i.times(100,k).add(200)},inverseCost(k){let ie=i.sub(k,200).div(100);return ie=ie.div(i.pow(.95,F.books.cuttersBook.totalAmount.value)),i.gte(ie,2e30)&&(ie=i.mul(ie,i.pow(2e30,9)).root(10)),i.gte(ie,2e6)&&(ie=i.mul(ie,2e6).root(2)),i.gte(ie,200)&&(ie=i.mul(ie,200).root(2)),i.gte(ie,50)&&(ie=i.mul(ie,50).root(2)),i.isNaN(ie)?i.dZero:ie.floor().max(0)},display:{title:"Generic Cutters",description:"Each cutter cuts down 1 tree/s"},visibility:()=>p(P.bought.value)})),Ze=He(()=>({resource:Q(s),cost(){let k=this.amount.value;i.gte(k,50)&&(k=i.pow(k,2).div(50)),i.gte(k,200)&&(k=i.pow(k,2).div(200)),i.gte(k,2e6)&&(k=i.pow(k,2).div(2e6)),i.gte(k,2e30)&&(k=i.pow(k,10).div(i.pow(2e30,9))),k=i.pow(.95,F.books.plantersBook.totalAmount.value).times(k);let ie=i.times(100,k).add(200);return v.elfTraining.planterElfTraining.milestones[3].earned.value&&(ie=i.div(ie,10)),ie},inverseCost(k){v.elfTraining.planterElfTraining.milestones[3].earned.value&&(k=i.mul(k,10));let ie=i.sub(k,200).div(100);return ie=ie.div(i.pow(.95,F.books.plantersBook.totalAmount.value)),i.gte(ie,2e30)&&(ie=i.mul(ie,i.pow(2e30,9)).root(10)),i.gte(ie,2e6)&&(ie=i.mul(ie,2e6).root(2)),i.gte(ie,200)&&(ie=i.mul(ie,200).root(2)),i.gte(ie,50)&&(ie=i.mul(ie,50).root(2)),i.isNaN(ie)?i.dZero:ie.floor().max(0)},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>p(P.bought.value)})),Ve=He(()=>({resource:Q(s),cost(){let k=this.amount.value;return i.gte(k,100)&&(k=i.pow(k,2).div(100)),i.gte(k,1e5)&&(k=i.pow(k,2).div(1e5)),i.gte(k,1e15)&&(k=i.pow(k,10).div(1e135)),k=i.pow(.95,F.books.expandersBook.totalAmount.value).times(k),i.pow(i.add(k,1),1.5).times(500)},inverseCost(k){let ie=i.div(k,500).root(1.5).sub(1);return ie=ie.div(i.pow(.95,F.books.expandersBook.totalAmount.value)),i.gte(ie,1e15)&&(ie=i.mul(ie,1e135).root(10)),i.gte(ie,1e5)&&(ie=i.mul(ie,1e5).root(2)),i.gte(ie,100)&&(ie=i.mul(ie,100).root(2)),i.isNaN(ie)?i.dZero:ie.floor().max(0)},display:{title:"Expand Forest",description:"Add 10 trees to the forest"},visibility:()=>p(P.bought.value)})),Fe=[D,Ze,Ve],ke=oe(()=>[ye(()=>({addend:1,description:"Wooden Fingers",enabled:h.bought})),ye(()=>({addend:U,description:"Smart Knives",enabled:g.bought}))]),ce=b(()=>ke.apply(1)),Pe=oe(()=>[Z(()=>({multiplier:.5,description:"Sharper Fingers",enabled:ne.bought})),Z(()=>({multiplier:()=>i.pow(.5,Ye.totalElves.value),description:"1 Elf Trained",enabled:Ye.milestones[0].earned}))]),Re=b(()=>Pe.apply(1)),je=oe(()=>[ye(()=>({addend:1,description:"Automated Knives",enabled:y.bought})),ye(()=>({addend:D.amount,description:"Generic Cutters",enabled:P.bought})),ye(()=>({addend:()=>i.div(Ii.foundationProgress.value,5).floor(),description:"10% Foundation Completed",enabled:Ii.milestones.autoCutMilestone1.earned})),Z(()=>({multiplier:2,description:"30% Foundation Completed",enabled:Ii.milestones.autoCutMilestone2.earned})),Z(()=>({multiplier:2,description:"Warmer Cutters",enabled:_.warmerCutters.bought})),Z(()=>({multiplier:_.computedHeatedCutterEffect,description:"Heated Cutters",enabled:()=>i.gt(_.heatedCutters.amount.value,0)})),Z(()=>({multiplier:4,description:"Lumberjack Jeans",enabled:gi.treesUpgrades.treesUpgrade2.bought})),Z(()=>({multiplier:()=>i.pow(1.1,L.day.value),description:"Holly Level 4",enabled:v.elfTraining.cutterElfTraining.milestones[3].earned})),ye(()=>({addend:()=>i.sub(d.value,r.value).max(0),description:"Ivy Level 5",enabled:v.elfTraining.planterElfTraining.milestones[4].earned}))]),U=b(()=>je.apply(0)),Ie=oe(()=>[ye(()=>({addend:1,description:"Leafy Fingers",enabled:W.bought})),ye(()=>({addend:qe,description:"Smart Spades",enabled:G.bought}))]),$=b(()=>Ie.apply(1)),ze=oe(()=>[Z(()=>({multiplier:.5,description:"Greener Fingers",enabled:Y.bought})),Z(()=>({multiplier:()=>i.pow(.5,Ye.totalElves.value),description:"1 Elf Trained",enabled:Ye.milestones[0].earned}))]),Ne=b(()=>ze.apply(1)),Oi=oe(()=>[ye(()=>({addend:1,description:"Automated Spade",enabled:N.bought})),ye(()=>({addend:()=>i.div(Ze.amount.value,2),description:"Generic Planters",enabled:P.bought})),ye(()=>({addend:()=>i.div(Ii.foundationProgress.value,10).floor(),description:"20% Foundation Completed",enabled:Ii.milestones.autoPlantMilestone1.earned})),Z(()=>({multiplier:2,description:"40% Foundation Completed",enabled:Ii.milestones.autoPlantMilestone2.earned})),Z(()=>({multiplier:2,description:"Warmer Planters",enabled:_.warmerPlanters.bought})),Z(()=>({multiplier:_.computedHeatedPlanterEffect,description:"Heated Planters",enabled:()=>i.gt(_.heatedPlanters.amount.value,0)})),Z(()=>({multiplier:4,description:"Lumberjack Plaid",enabled:gi.treesUpgrades.treesUpgrade3.bought})),Z(()=>({multiplier:2,description:"Ivy Level 1",enabled:v.elfTraining.planterElfTraining.milestones[0].earned})),Z(()=>({multiplier:()=>i.pow(c.value,.2).log10().pow_base(2),description:"Ivy Level 3",enabled:v.elfTraining.planterElfTraining.milestones[2].earned})),Z(()=>({multiplier:2,description:"Mary Level 4",enabled:v.elfTraining.heatedPlanterElfTraining.milestones[3].earned})),ye(()=>({addend:()=>i.sub(r.value,d.value).max(0),description:"Ivy Level 5",enabled:v.elfTraining.planterElfTraining.milestones[4].earned}))]),qe=b(()=>Oi.apply(0)),$e=oe(()=>[Z(()=>({multiplier:1.25,description:"Research I",enabled:x.bought})),Z(()=>({multiplier:1.25,description:"Research II",enabled:P.bought})),Z(()=>({multiplier:()=>Ii.milestones.extraExpansionMilestone1.earned.value?i.pow(1.02,Ii.foundationProgress.value):i.div(Ii.foundationProgress.value,20).add(1),description:"1% Foundation Completed",enabled:Ii.milestones.logGainMilestone1.earned})),Z(()=>({multiplier:2,description:"50% Foundation Completed",enabled:Ii.milestones.logGainMilestone2.earned})),Z(()=>({multiplier:1.25,description:"Ashy Soil",enabled:_.basicFertilizer.bought})),Z(()=>({multiplier:_.computedFertilizerEffect,description:"Fertilized Soil",enabled:()=>i.gt(_.moreFertilizer.amount.value,0)})),Z(()=>({multiplier:2,description:"4 Elves Trained",enabled:Ye.milestones[3].earned})),Z(()=>({multiplier:2,description:"Carry logs in boxes",enabled:ii.upgrades.logsUpgrade.bought})),Z(()=>({multiplier:()=>i.div(ii.buyables.logBoxesBuyable.amount.value,2).add(1),description:"Carry more logs",enabled:ii.upgrades.logsUpgrade.bought})),Z(()=>({multiplier:10,description:"Felt-Gripped Axe",enabled:gi.treesUpgrades.treesUpgrade4.bought})),Z(()=>({multiplier:b(()=>i.add(U.value,1).log10().plus(1)),description:"Is Blue Dye just Water?",enabled:ve.upgrades.blueDyeUpg.bought})),Z(()=>({multiplier:b(()=>i.add(U.value,1).root(9)),description:"Holly Level 1",enabled:v.elfTraining.cutterElfTraining.milestones[0].earned})),Z(()=>({multiplier:()=>i.sqrt(v.totalElfLevels.value),description:"Noel Level 1",enabled:v.elfTraining.fertilizerElfTraining.milestones[0].earned})),Z(()=>({multiplier:ji.boosts.christmas1,description:"Christmas Wrapping Paper",enabled:b(()=>i.gt(ji.boosts.christmas1.value,1))})),nl(()=>({exponent:1.2,description:"100% Foundation Completed",enabled:Ii.milestones.logGainMilestone3.earned}))]),Ce=Se(0),Vi=al(()=>({direction:Ue.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>i.div(Ce.value,Re.value)})),Be=Ei(()=>({display:{title:"Cut trees",description:f(()=>t(O,null,[o("Cut down up to "),me(i.floor(ce.value))," ",o("tree"),i.eq(ce.value,1)?"":"s",o(" at once!"),t("br",null,null),We(Vi)]))},style:{minHeight:"80px"},canClick:()=>i.gte(c.value,1)&&i.gte(Ce.value,Re.value),onClick(){if(i.lt(Ce.value,Re.value))return;const k=i.floor(i.min(c.value,i.times(ce.value,i.div(Ce.value,Re.value).floor())));s.value=i.add(s.value,i.times($e.apply(1),k)),a.value=i.add(a.value,k),Ce.value=0}})),te=Se(0),A=al(()=>({direction:Ue.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>i.div(te.value,Ne.value)})),B=Ei(()=>({display:{title:"Plant trees",description:f(()=>t(O,null,[o("Plant up to "),me(i.floor($.value))," ",o("tree"),i.eq($.value,1)?"":"s",o(" at once!"),t("br",null,null),We(A)]))},style:{minHeight:"80px"},canClick:()=>i.gte(a.value,1)&&i.gte(te.value,Ne.value),onClick(){if(i.lt(te.value,Ne.value))return;const k=i.floor(i.min(a.value,i.times($.value,i.div(te.value,Ne.value).floor())));a.value=i.sub(a.value,k),te.value=0}})),[Ee,pe]=ol(()=>[{title:"Logs per Tree",modifier:$e,base:1,visible:x.bought},{title:"Manual Cutting Amount",modifier:ke,base:1,visible:h.bought,unit:"/click"},{title:"Manual Cutting Cooldown",modifier:Pe,base:1,visible:h.bought,unit:"s"},{title:"Manual Planting Amount",modifier:Ie,base:1,visible:W.bought,unit:"/click"},{title:"Manual Planting Cooldown",modifier:ze,base:1,visible:W.bought,unit:"s"},{title:"Auto Cutting Amount",modifier:je,base:0,visible:y.bought,unit:"/s"},{title:"Auto Planting Amount",modifier:Oi,base:0,visible:N.bought,unit:"/s"},{title:"Forest Size",modifier:u,base:10,visible:P.bought}]),oi=se(!1),Wi=f(()=>t(Gi,{modelValue:oi.value,"onUpdate:modelValue":k=>oi.value=k},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:Ee}));ui.on("update",k=>{if(i.lt(L.day.value,Vs))return;i.gte(Ce.value,Re.value)?Ce.value=Re.value:(Ce.value=i.add(Ce.value,k),Be.isHolding.value&&Be.onClick()),i.gte(te.value,Ne.value)?te.value=Ne.value:(te.value=i.add(te.value,k),B.isHolding.value&&B.onClick());const ie=i.sub(qe.value,i.sub(r.value,d.value).max(0)),Qe=i.sub(U.value,i.sub(d.value,r.value).max(0));d.value=ie,r.value=Qe;const Pi=i.min(c.value,i.times(U.value,k)),si=i.mul($e.apply(1),Pi),Yi=i.div(si,k);I.value=i.mul(Yi,Ws).add(i.mul(I.value,i.dOne.sub(Ws))),s.value=i.add(s.value,si),a.value=i.add(a.value,Pi);const qi=i.min(a.value,i.times(qe.value,k));a.value=i.sub(a.value,qi)});const ki=b(()=>i.sub(U.value,qe.value)),Ui=b(()=>i.sub(qe.value,U.value)),pi=en(()=>({key:"c",description:'Press the "Cut trees" button.',onPress:()=>{Be.canClick.value&&Be.onClick()}})),De=en(()=>({key:"p",description:'Press the "Plant trees" button.',onPress:()=>{B.canClick.value&&B.onClick()}})),{total:_e,trackerDisplay:be}=Jl({resource:s,goal:1e4,name:e,day:Vs,color:n,modal:{show:oi,display:Wi}});return{name:e,color:l,logs:s,totalLogs:_e,trees:c,saplings:a,cutTree:Be,plantTree:B,cutTreeHK:pi,plantTreeHK:De,row1Upgrades:M,row2Upgrades:E,row1Buyables:Fe,manualCutProgress:Ce,manualPlantProgress:te,generalTabCollapsed:pe,computedAutoCuttingAmount:U,minWidth:700,display:f(()=>t(O,null,[We(be),t(ge,null,null),t(Qi,{resource:s,color:l,style:"margin-bottom: 0",productionDisplay:i.gt(U.value,0)?`+${K(I.value)}/s average equilibrium: +${zs([[U.value,"cutting speed"],[qe.value,"planting speed"],[i.mul(j.value,20),"forest cap"]],"/s",$e.apply(1))}`:void 0},null),t(Qi,{resource:a,color:n,style:"margin-bottom: 0",productionDisplay:wn(ki.value)},null),t(Qi,{resource:c,color:n,style:"margin-bottom: 0",productionDisplay:wn(Ui.value)},null),t(ge,null,null),di(Be,B),t("div",null,[o("Tip: You can hold down on actions to perform them automatically")]),t(ge,null,null),Yl(M,E),t(ge,null,null),di(...Fe)])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),K(s.value),o(" "),s.displayName]))}}),Xm="workshop",mn=2,Ii=Ai(Xm,function(){const e="Workshop",l="#D66B02",n="#D66B02",s=fi(0,"foundation progress"),a=Eo(()=>({scaling:ps(ps(es(250,1.5),5387,1/1e10),1e20,3e8),baseResource:he.logs,gainResource:Q(s),roundUpCost:!0,spend(Ve,Fe){he.logs.value=i.sub(he.logs.value,Fe)},costModifier:oe(()=>[Z(()=>({multiplier:b(()=>ji.boosts.beach1.value),description:"Beach Wrapping Paper",enabled:b(()=>i.gt(ji.boosts.beach1.value,1))})),nl(()=>({exponent:1/.99,description:"Hope Level 5",enabled:v.elfTraining.expandersElfTraining.milestones[4].earned}))])})),I=Ei(()=>({display:f(()=>t(O,null,[t("b",{style:"font-size: x-large"},[o("Build "),me(a.actualGain.value),o("% of the foundation")]),t("br",null,null),t("br",null,null),t("span",{style:"font-size: large"},[o("Cost:")," ",hn(he.logs,i.gte(a.actualGain.value,1)?a.currentAt.value:a.nextAt.value)," ",he.logs.displayName])])),visibility:()=>p(i.lt(s.value,100)||v.elfTraining.expandersElfTraining.milestones[2].earned.value),canClick:()=>i.gte(he.logs.value,a.nextAt.value)&&(i.lt(s.value,100)||v.elfTraining.expandersElfTraining.milestones[2].earned.value),onClick(){!m(this.canClick)||a.convert()},style:"width: 600px; min-height: unset"})),r=en(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{I.canClick.value&&I.onClick()}})),d=b(()=>!Ye.milestones[6].earned.value),u=X(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>i.gte(s.value,1),showPopups:d})),c=X(()=>({display:{requirement:"10% Foundation Completed",effectDisplay:"Cut an additional tree per second for each 5% of foundation completed"},shouldEarn:()=>i.gte(s.value,10),visibility:()=>p(u.earned.value),showPopups:d})),j=X(()=>({display:{requirement:"20% Foundation Completed",effectDisplay:"Plant an additional tree per second for each 10% of foundation completed"},shouldEarn:()=>i.gte(s.value,20),visibility:()=>p(c.earned.value),showPopups:d})),h=X(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>i.gte(s.value,30),visibility:()=>p(j.earned.value),showPopups:d})),W=X(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>i.gte(s.value,40),visibility:()=>p(h.earned.value),showPopups:d})),y=X(()=>({display:{requirement:"50% Foundation Completed",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>i.gte(s.value,50),visibility:()=>p(W.earned.value),showPopups:d})),N=X(()=>({display:{requirement:"75% Foundation Completed",effectDisplay:"The forest gains an extra tree for every 2% of foundation completed"},shouldEarn:()=>i.gte(s.value,75),visibility:()=>p(y.earned.value),showPopups:d})),x=X(()=>({display:{requirement:"100% Foundation Completed",effectDisplay:"Log per tree is raised to the 1.2th power"},shouldEarn:()=>i.gte(s.value,100),visibility:()=>p(N.earned.value),showPopups:d})),M=X(()=>({display:{requirement:"200% Foundation Completed",effectDisplay:"The 1% milestone is now +2% and multiplicative"},shouldEarn:()=>i.gte(s.value,200),visibility:()=>p(x.earned.value&&v.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),ne=X(()=>({display:{requirement:"400% Foundation Completed",effectDisplay:"Gain +10% metal for every 10% foundation completed"},shouldEarn:()=>i.gte(s.value,400),visibility:()=>p(M.earned.value&&v.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),Y=X(()=>({display:{requirement:"600% Foundation Completed",effectDisplay:"Gain +10% oil for every 10% foundation completed"},shouldEarn:()=>i.gte(s.value,600),visibility:()=>p(ne.earned.value&&v.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),g=X(()=>({display:{requirement:"800% Foundation Completed",effectDisplay:"Gain +10% plastic for every 10% foundation completed"},shouldEarn:()=>i.gte(s.value,800),visibility:()=>p(Y.earned.value&&v.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),G=X(()=>({display:{requirement:"1000% Foundation Completed",effectDisplay:"Double paper, boxes, and all cloth actions"},shouldEarn:()=>i.gte(s.value,1e3),visibility:()=>p(g.earned.value&&v.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),P={logGainMilestone1:u,autoCutMilestone1:c,autoPlantMilestone1:j,autoCutMilestone2:h,autoPlantMilestone2:W,logGainMilestone2:y,morePlantsMilestone1:N,logGainMilestone3:x,extraExpansionMilestone1:M,extraExpansionMilestone2:ne,extraExpansionMilestone3:Y,extraExpansionMilestone4:g,extraExpansionMilestone5:G},{collapseMilestones:E,display:D}=sn(P),Ze=al(()=>({direction:Ue.Right,width:600,height:25,fillStyle:`backgroundColor: ${n}`,progress:()=>L.day.value===mn?i.div(s.value,100):1,display:f(()=>L.day.value===mn?t(O,null,[me(s.value),o("%")]):"")}));return Di(()=>{L.day.value===mn&&i.gte(s.value,100)&&L.completeDay()}),{name:e,day:mn,color:l,foundationProgress:s,foundationConversion:a,milestones:P,collapseMilestones:E,minWidth:700,buildFoundationHK:r,display:f(()=>t(O,null,[t("div",null,[L.day.value===mn?"Complete the foundation to complete the day":`${e} Complete!`]),We(Ze),t(ge,null,null),t("div",null,[t("span",null,[o("The foundation is ")]),t("h2",{style:`color: ${l}; text-shadow: 0 0 10px ${l}`},[me(s.value)]),o("% completed")]),i.lt(s.value,100)||v.elfTraining.expandersElfTraining.milestones[2].earned.value?t(ge,null,null):null,We(I),t(ge,null,null),D()])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),K(s.value),o(" "),s.displayName]))}}),Mm="plastic",vs=10,ri=Ai(Mm,function(){const e="Plastic",l="#DCD9CD",n=fi(0,"plastic"),[s,a]=ol(()=>[{title:"Plastic Gain",modifier:ke,base:0}]),I=se(!1),r=f(()=>t(Gi,{modelValue:I.value,"onUpdate:modelValue":je=>I.value=je},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:s})),d=Se(0),u=b(()=>i.times(d.value,100).times(v.elfTraining.oilElfTraining.milestones[3].earned.value?5:1)),c=He(()=>({resource:ci.metal,cost(){const je=new i(this.amount.value);let U=i.pow(1.2,je).times(1e7);return v.elfTraining.fertilizerElfTraining.milestones[3].earned.value&&(U=i.sub(U,i.pow(n.value,2)).max(0)),U},display:f(()=>t(O,null,[t("h3",null,[o("Refinery")]),t("br",null,null),o("Refines oil into plastic pellets"),t("br",null,null),o("Consumes 100 oil/s to create 1 plastic/s"),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),K(u.value),o(" oil/sec"),t("br",null,null),o("+"),K(d.value),o(" plastic/sec"),t("br",null,null),t("br",null,null),o("Cost: "),me(m(c.cost))," ",c.resource.displayName])),onPurchase(){d.value=i.add(d.value,1)},style:{width:"300px"}})),{min:j,max:h,add:W,remove:y}=bl({buyable:c,active:d,style:{minHeight:"20px",width:"40px",color:"var(--feature-foreground)"}}),N=b(()=>i.pow(5,i.add([...Object.values(Y),...Object.values(E)].filter(je=>je.bought.value).length,2))),x=T(()=>({resource:Q(n),cost:N,display:()=>({title:"Plastic Scissors",description:"Unlock paper upgrades",showCost:!x.bought.value})})),M=T(()=>({resource:Q(n),cost:N,display:()=>({title:"Plastic Level",description:"Unlock box upgrades",showCost:!M.bought.value})})),ne=T(()=>({resource:Q(n),cost:N,display:()=>({title:"Plastic Cane",description:"Unlock cloth upgrades",showCost:!ne.bought.value})})),Y={paperTools:x,boxTools:M,clothTools:ne},g=T(()=>({resource:Q(n),cost:N,visibility:()=>p(x.bought.value),display:()=>({title:"Paper Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!g.bought.value})})),G=T(()=>({resource:Q(n),cost:N,visibility:()=>p(M.bought.value),display:()=>({title:"Box Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!G.bought.value})})),P=T(()=>({resource:Q(n),cost:N,visibility:()=>p(ne.bought.value),display:()=>({title:"Cloth Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!P.bought.value})})),E={paperElf:g,boxElf:G,clothElf:P},D=He(()=>({resource:Q(n),cost(){const je=this.amount.value;return i.pow(1.3,je).times(100)},visibility:()=>p(g.bought.value),display:{title:"Plastic Printing Press",description:"Gain +1% of your paper gain per second",effectDisplay:f(()=>t(O,null,[me(D.amount.value),o("%")])),showAmount:!1}})),Ze=He(()=>({resource:Q(n),cost(){const je=this.amount.value;return i.pow(1.3,je).times(100)},visibility:()=>p(G.bought.value),display:{title:"Plastic Box Folder",description:"Gain +1% of your box gain per second",effectDisplay:f(()=>t(O,null,[me(Ze.amount.value),o("%")])),showAmount:!1}})),Ve=He(()=>({resource:Q(n),cost(){const je=this.amount.value;return i.pow(1.3,je).times(100)},visibility:()=>p(P.bought.value),display:{title:"Plastic Shepherd",description:"All cloth actions are +10% more efficient",effectDisplay:f(()=>t(O,null,[me(i.times(Ve.amount.value,10)),o("%")])),showAmount:!1}})),Fe={passivePaper:D,passiveBoxes:Ze,clothGains:Ve},ke=oe(()=>[ye(()=>({addend:()=>v.elfTraining.oilElfTraining.milestones[3].earned.value?i.times(d.value,5):d.value,description:"Oil Refinery",enabled:()=>i.gt(d.value,0)})),Z(()=>({multiplier:2,description:"Paper Elf Recruitment",enabled:g.bought})),Z(()=>({multiplier:2,description:"Box Elf Recruitment",enabled:G.bought})),Z(()=>({multiplier:2,description:"Cloth Elf Recruitment",enabled:P.bought})),Z(()=>({multiplier:2,description:"Carry plastic in boxes",enabled:ii.row2Upgrades.plasticUpgrade.bought})),Z(()=>({multiplier:()=>ae.oilEffectiveness.value,description:"Effectiveness",enabled:()=>i.lt(ae.oilEffectiveness.value,1)})),Z(()=>({multiplier:ve.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>i.gte(ve.dyes.yellow.amount.value,1)})),Z(()=>({multiplier:()=>i.div(Ii.foundationProgress.value,10).floor().div(10).add(1),description:"800% Foundation Completed",enabled:Ii.milestones.extraExpansionMilestone4.earned})),Z(()=>({multiplier:()=>i.add(ae.buildExtractor.amount.value,1).pow(1.25),description:"Snowball Level 4",enabled:v.elfTraining.kilnElfTraining.milestones[3].earned}))]),ce=b(()=>ke.apply(0));ui.on("update",je=>{i.lt(L.day.value,vs)||(n.value=i.times(je,ce.value).add(n.value))});const{total:Pe,trackerDisplay:Re}=Jl({resource:n,goal:25e4,name:e,day:vs,color:l,textColor:"var(--feature-foreground)",modal:{show:I,display:r}});return{name:e,color:l,plastic:n,totalPlastic:Pe,buildRefinery:c,activeRefinery:d,oilCost:u,upgrades:Y,elfUpgrades:E,buyables:Fe,generalTabCollapsed:a,minWidth:700,display:f(()=>t(O,null,[We(Re),t(ge,null,null),t(Qi,{resource:n,color:l,style:"margin-bottom: 0",effectDisplay:i.gt(ce.value,0)?`+${K(ce.value)}/s`:void 0},null),t(ge,null,null),t(Bi,null,{default:()=>[We(c),t("div",null,[me(i.floor(d.value)),o("/"),me(i.floor(c.amount.value))]),di(j,y,W,h)]}),t(nn,null,{default:()=>[tl(x,g,D),tl(M,G,Ze),tl(ne,P,Ve)]})])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),K(n.value),o(" "),n.displayName]))}}),xm="oil",Ln=9,ae=Ai(xm,function(){const e="Oil",l="#000000",n="var(--foreground)",s=fi(0,"oil"),a=fi(0,"depth"),I=Se(0),r=b(()=>i.lt(a.value,990)?i.add(10,a.value):i.pow(1.001,i.sub(a.value,990)).mul(1e3));function d(){if(i.lt(a.value,990)){const H=i.min(i.affordArithmeticSeries(I.value,10,1,a.value),i.sub(990,a.value)),le=i.sumArithmeticSeries(H,10,1,a.value);I.value=i.sub(I.value,le),a.value=i.add(a.value,H)}if(i.gte(a.value,990)){const H=i.affordGeometricSeries(I.value,1e3,1.001,i.sub(a.value,990)),le=i.sumGeometricSeries(H,1e3,1.001,i.sub(a.value,990));I.value=i.sub(I.value,le),a.value=i.add(a.value,H)}}const u=Se(0),c=b(()=>i.times(i.pow(u.value,ne.value).pow(v.elfTraining.coalDrillElfTraining.milestones[0].earned.value?2.5:2),1e14)),j=b(()=>i.times(i.pow(u.value,ne.value),1)),h=He(()=>({resource:ci.metal,cost(){let H=new i(this.amount.value);return i.gte(H,100)&&(H=i.pow(H,4).div(100**3)),H=i.pow(.95,F.books.heavyDrillBook.totalAmount.value).times(H),i.pow(1.3,H).times(25e3)},inverseCost(H){let le=i.div(H,25e3).log(1.3);return le=le.div(i.pow(.95,F.books.heavyDrillBook.totalAmount.value)),i.gte(le,100)&&(le=i.mul(le,100**3).root(4)),i.isNaN(le)?i.dZero:le.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Heavy Drill")]),t("br",null,null),o("A large drill specialized at deep mining."),t("br",null,null),o("Consumes 1e14*(Heavy Drills amount)"),t("sup",null,[v.elfTraining.coalDrillElfTraining.milestones[0].earned.value?2.5:2])," ",o("coal/sec for (Heavy Drills amount) drill power."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),Me(c.value),o(" coal/sec"),t("br",null,null),o("+"),Me(j.value),o(" drill power"),t("br",null,null),t("br",null,null),o("Cost: "),xe(m(h.cost)),o(" "),h.resource.displayName])),onPurchase(){u.value=i.add(u.value,1)},style:{color:n,width:"160px",flexGrow:1}})),{min:W,max:y,add:N,remove:x}=bl({buyable:h,active:u}),M=Se(0),ne=b(()=>{let H=i.add(M.value,Math.E);return v.elfTraining.heavyDrillElfTraining.milestones[3].earned.value?H=H.log(2.5):H=H.ln(),H}),Y=He(()=>({resource:ci.metal,cost(){let H=new i(this.amount.value);return i.gte(H,50)&&(H=i.pow(H,4).div(50**3)),H=i.pow(.95,F.books.heavyDrillBook.totalAmount.value).times(H),i.pow(2,H).times(1e5)},inverseCost(H){let le=i.div(H,1e5).log(2);return le=le.div(i.pow(.95,F.books.heavyDrillBook.totalAmount.value)),i.gte(le,50)&&(le=i.mul(le,50**3).root(4)),i.isNaN(le)?i.dZero:le.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Heavy Drill Drill")]),t("br",null,null),o("Attach extra drills to Heavy Drills to make them faster"),t("br",null,null),o("Raise amount of effective Heavy Drills by ^"),v.elfTraining.heavyDrillElfTraining.milestones[3].earned.value?t(O,null,[o("log"),t("sub",null,[o("2.5")])]):t(O,null,[o("ln")]),o("(Heavy Drill Drill amount + e)."),t("br",null,null),o("(also affects coal consumption)."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("^"),Me(ne.value),o(" Heavy Drill amount"),t("br",null,null),t("br",null,null),o("Cost: "),xe(m(Y.cost)),o(" "),Y.resource.displayName])),onPurchase(){M.value=i.add(M.value,1)},style:{color:n,width:"160px",flexGrow:1}})),{min:g,max:G,add:P,remove:E}=bl({buyable:Y,active:M}),D=Se(0),Ze=b(()=>i.pow(1/3,D.value)),Ve=b(()=>i.pow(2,D.value)),Fe=b(()=>i.pow(1.2,D.value)),ke=He(()=>({resource:ci.metal,cost(){let H=new i(this.amount.value);return i.gte(H,10)&&(H=i.pow(H,4).div(10**3)),H=i.pow(.95,F.books.heavyDrillBook.totalAmount.value).times(H),i.pow(8,H).times(2e5)},inverseCost(H){let le=i.div(H,2e5).log(8);return le=le.div(i.pow(.95,F.books.heavyDrillBook.totalAmount.value)),i.gte(le,10)&&(le=i.mul(le,10**3).root(4)),i.isNaN(le)?i.dZero:le.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Heavy Extractor")]),t("br",null,null),o("Attach extractors to the drill to mine coal and ore, but with a price."),t("br",null,null),o("Divides drill power by 3 to multiply coal gain by 2 and ore gain by 1.2."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("\xD7"),tn(Ze.value),o(" drill power"),t("br",null,null),o("\xD7"),Me(Ve.value),o(" coal/sec"),t("br",null,null),o("\xD7"),Me(Fe.value),o(" ore/sec"),t("br",null,null),t("br",null,null),o("Cost: "),xe(m(ke.cost))," ",ke.resource.displayName])),onPurchase(){D.value=i.add(D.value,1)},style:{color:n,width:"160px",flexGrow:1}})),{min:ce,max:Pe,add:Re,remove:je}=bl({buyable:ke,active:D}),U=Se(0),Ie=b(()=>i.pow(zi[3].bought.value?4:5,U.value)),$=b(()=>i.add(U.value,Tl.value).pow(2).mul(u.value).mul(i.add(M.value,1)).mul(D.value).mul(i.pow(a.value,v.elfTraining.oilElfTraining.milestones[0].earned.value?1.2:1)).div(1e5)),ze=He(()=>({resource:ci.metal,cost(){let H=new i(this.amount.value);i.gte(H,10)&&(H=i.pow(H,4).div(10**3)),H=i.pow(.95,F.books.oilBook.totalAmount.value).times(H);let le=i.pow(16,H).times(2e6);return zi[4].bought.value&&(le=le.div(i.add(vi.value,1).root(6))),v.elfTraining.heavyDrillElfTraining.milestones[1].earned.value&&(le=le.div(10)),le},inverseCost(H){v.elfTraining.heavyDrillElfTraining.milestones[1].earned.value&&(H=i.mul(H,10)),zi[4].bought.value&&(H=i.mul(H,i.add(vi.value,1).root(6)));let le=i.div(H,2e6).log(16);return le=le.div(i.pow(.95,F.books.heavyDrillBook.totalAmount.value)),i.gte(le,10)&&(le=i.mul(le,10**3).root(4)),i.isNaN(le)?i.dZero:le.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Oil Pump")]),t("br",null,null),o("Pump that oil from the ground."),t("br",null,null),o("Gain oil based on the number of Heavy buildings active and well depth, but coal usage is multiplied by "),zi[3].bought.value?4:5,o("\xD7."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("\xD7"),Me(Ie.value),o(" coal usage"),t("br",null,null),o("+"),Me($.value),o(" oil/sec"),t("br",null,null),t("br",null,null),o("Cost: "),xe(m(ze.cost)),o(" "),ze.resource.displayName])),onPurchase(){U.value=i.add(U.value,1)},style:{color:n,width:"160px",flexGrow:1}})),{max:Ne,min:Oi,add:qe,remove:$e}=bl({buyable:ze,active:U}),Ce=Se(0),Vi=b(()=>{let H=Ce.value;return v.elfTraining.heavyDrillElfTraining.milestones[2].earned.value&&(H=i.pow(H,1.5)),H}),Be=b(()=>i.pow(Vi.value,2)),te=b(()=>i.pow(Vi.value,3).mul(1e19)),A=b(()=>i.add(Vi.value,1)),B=He(()=>({resource:Q(s),cost(){let H=new i(this.amount.value);return i.gte(H,100)&&(H=i.pow(H,4).div(100**3)),H=i.pow(.95,F.books.oilBook.totalAmount.value).times(H),i.pow(2,H).times(50)},inverseCost(H){let le=i.div(H,50).log(2);return le=le.div(i.pow(.95,F.books.oilBook.totalAmount.value)),i.gte(le,100)&&(le=i.mul(le,100**3).root(4)),i.isNaN(le)?i.dZero:le.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Oil Burner")]),t("br",null,null),o("Burn oil as fuel."),t("br",null,null),o("(Oil Burner Amount)"),t("sup",null,[o("2")]),o(" unit of oil can give 1e19*(Oil Burner Amount)"),t("sup",null,[o("3")]),o(" units of coal."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),Me(Be.value),o(" oil/sec"),t("br",null,null),o("-"),Me(te.value),o(" coal consumption"),zi[2].bought.value?t(O,null,[t("br",null,null),o("\xD7"),Me(A.value),o(" to auto smelting multi")]):"",t("br",null,null),t("br",null,null),o("Cost: "),xe(m(B.cost)),o(" "),B.resource.displayName])),onPurchase(){Ce.value=i.add(Ce.value,1)},style:{color:n,width:"160px",flexGrow:1}})),{max:Ee,min:pe,add:oi,remove:Wi}=bl({buyable:B,active:Ce}),ki=Se(0),Ui=b(()=>i.pow(ki.value,2).mul(100)),pi=b(()=>i.add(ki.value,1)),De=He(()=>({resource:ci.metal,cost(){let H=new i(this.amount.value);i.gte(H,50)&&(H=i.pow(H,2).div(50)),i.gte(H,200)&&(H=i.pow(H,2).div(200)),i.gte(H,1e4)&&(H=i.pow(H,2).div(1e4)),H=i.pow(.95,F.books.oilBook.totalAmount.value).times(H);let le=i.pow(10,H).times(1e7);return zi[4].bought.value&&(le=le.div(i.add(vi.value,1).root(6))),le},inverseCost(H){zi[4].bought.value&&(H=i.mul(H,i.add(vi.value,1).root(6)));let le=i.div(H,1e7).log(10);return le=le.div(i.pow(.95,F.books.oilBook.totalAmount.value)),i.gte(le,100)&&(le=i.mul(le,100).root(4)),i.isNaN(le)?i.dZero:le.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Oil Smelter")]),t("br",null,null),o("Use oil as a crucible fuel."),t("br",null,null),o("Burn 100*(Oil Smelter amount)"),t("sup",null,[o("2")]),o(" oil to smelt +100% faster."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),Me(Ui.value),o(" oil/sec"),t("br",null,null),o("\xD7"),Me(pi.value),o(" smelting speed"),t("br",null,null),t("br",null,null),o("Cost: "),xe(m(De.cost)),o(" "),De.resource.displayName])),onPurchase(){ki.value=i.add(ki.value,1)},style:{color:n,width:"160px",flexGrow:1}})),{max:_e,min:be,add:k,remove:ie}=bl({buyable:De,active:ki}),Qe=[X(()=>({display:{requirement:"5m Well Depth",effectDisplay:"Gain 25% more coal for each metre of well depth (after the 3 elf milestone)."},shouldEarn:()=>i.gte(a.value,5)})),X(()=>({display:{requirement:"10m Well Depth",effectDisplay:"Drill too slow? Unlock some drill upgrades!"},shouldEarn:()=>i.gte(a.value,10),visibility:()=>p(Qe[0].earned.value)})),X(()=>({display:{requirement:"25m Well Depth",effectDisplay:"Gain 5% more ore for each metre of well depth."},shouldEarn:()=>i.gte(a.value,25),visibility:()=>p(Qe[1].earned.value)})),X(()=>({display:{requirement:"60m Well Depth",effectDisplay:"Drill still too slow? Try unlocking another drill!"},shouldEarn:()=>i.gte(a.value,60),visibility:()=>p(Qe[2].earned.value)})),X(()=>({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:()=>i.gte(a.value,150),visibility:()=>p(Qe[3].earned.value)})),X(()=>({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:()=>i.gte(a.value,350),visibility:()=>p(Qe[4].earned.value)})),X(()=>({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:()=>i.gte(a.value,1e3),visibility:()=>p(i.gte(a.value,1e3))})),X(()=>({display:{requirement:"3,000m Well Depth",effectDisplay:"You found a large oil spot! Double oil gain!"},shouldEarn:()=>i.gte(a.value,3e3),visibility:()=>p(i.gte(a.value,2e3))}))],{collapseMilestones:Pi,display:si}=sn(Qe),Yi=[X(()=>({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:()=>i.gte(vi.value,100)})),X(()=>({display:{requirement:"500 total oil",effectDisplay:"Unlocks oil upgrades! These can be bought with oil."},shouldEarn:()=>i.gte(vi.value,500),visibility:()=>p(Yi[0].earned.value)})),X(()=>({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:()=>i.gte(vi.value,1e4),visibility:()=>p(Yi[1].earned.value)}))],{collapseMilestones:qi,display:ml}=sn(Yi),ei=[T(()=>({resource:_.coal,cost:1e18,display:{title:"Coal Drill Synergy",description:"Increase drill power by +4% per Coal Drill owned.",effectDisplay:f(()=>t(O,null,[o("x"),Me(Ni[0].value)]))},style:{color:n}})),T(()=>({resource:ci.metal,cost:15e4,display:{title:"Metal Drill Synergy",description:"Increase drill power by +4% per Metal Drill owned.",effectDisplay:f(()=>t(O,null,[o("x"),Me(Ni[1].value)]))},style:{color:n}})),T(()=>({resource:_.coal,cost:1e20,display:{title:"Coal Drill Upgrade",description:"Increase drill power by +6% per OoM of coal owned.",effectDisplay:f(()=>t(O,null,[o("x"),Me(Ni[2].value)]))},style:{color:n}})),T(()=>({resource:ci.metal,cost:15e5,display:{title:"Metal Drill Upgrade",description:"Increase drill power by +10% per OoM of metal ingot owned.",effectDisplay:f(()=>t(O,null,[o("x"),Me(Ni[3].value)]))},style:{color:n}})),T(()=>({resource:Q(s),cost:100,display:{title:"Drill Oil",description:"Increase previous upgrades' effect by +0.1% per Heavy Drill owned.",effectDisplay:f(()=>t(O,null,[o("+"),Me(i.mul(Ni[4].value,100)),o("%")]))},style:{color:n}}))],Ni=[b(()=>i.mul(_.buildDrill.amount.value,i.add(.04,bi.value)).add(1)),b(()=>i.mul(ci.oreDrill.amount.value,i.add(.04,bi.value)).add(1)),b(()=>i.mul(i.max(_.coal.value,1).log10().floor(),i.add(.06,bi.value)).add(1)),b(()=>i.mul(i.max(ci.metal.value,1).log10().floor(),i.add(.1,bi.value)).add(1)),b(()=>i.mul(h.amount.value,.001))],zi=[T(()=>({resource:Q(s),cost:100,display:{title:"Oil the Oil Pump",description:"Double oil gain."},style:{color:n}})),T(()=>({resource:Q(s),cost:500,display:{title:"Oil the Metal Drills",description:"Double ore mining speed and square the coal drill amount in its effect."},style:{color:n}})),T(()=>({resource:Q(s),cost:1500,display:{title:"Blaster Burner",description:"The Oil Burner can now increase your auto smelting multi."},style:{color:n}})),T(()=>({resource:Q(s),cost:25e3,display:{title:"Oil Integration",description:"Reduce Oil Pump's coal consumption multipler from 5 to 4"},style:{color:n}})),T(()=>({resource:Q(s),cost:5e4,display:{title:"Be One with the Oil",description:f(()=>t(O,null,[o("Divide metal ingot prices of oil buildings by "),t("sup",null,[o("6")]),t(Gl,null,{default:()=>[o("total oil + 1")]})]))},style:{color:n}}))],Il=[T(()=>({resource:Q(s),cost:1e11,display:{title:"Dye Synergy I",description:"Red dye boosts yellow dye gain *(log(x)^0.75)"},visibility:()=>p(v.elfTraining.oilElfTraining.milestones[4].earned.value),style:{color:n}})),T(()=>({resource:Q(s),cost:1e12,display:{title:"Orange-colored boxes",description:"Orange dye's 2nd effect is raised to the 2.5"},visibility:()=>p(v.elfTraining.oilElfTraining.milestones[4].earned.value),style:{color:n}})),T(()=>({resource:Q(s),cost:1e13,display:{title:"Colorful Focus",description:"Sum of secondary dyes increases max focus multiplier by cbrt(x)"},visibility:()=>p(v.elfTraining.oilElfTraining.milestones[4].earned.value),style:{color:n}})),T(()=>({resource:Q(s),cost:1e14,display:{title:"Dye Synergy II",description:"Blue dye boosts red dye gain *log(x)"},visibility:()=>p(v.elfTraining.oilElfTraining.milestones[4].earned.value),style:{color:n}})),T(()=>({resource:Q(s),cost:1e15,display:{title:"The Ultimate Metal Dye",description:"Sum of primary dyes boosts auto smelt speed"},visibility:()=>p(v.elfTraining.oilElfTraining.milestones[4].earned.value),style:{color:n}}))],Vl=oe(()=>[ye(()=>({addend:()=>i.negate(c.value),description:"Heavy Drill",enabled:()=>i.gt(u.value,0)})),Z(()=>({multiplier:Ie,description:"Oil Pump",enabled:()=>i.gt(U.value,0)})),ye(()=>({addend:z,description:"Oil to Coal Substitution",enabled:()=>i.gt(z.value,0)}))]),Wl=b(()=>Vl.apply(0)),vl=oe(()=>[ye(()=>({addend:j,description:"Heavy Drill",enabled:()=>i.gt(u.value,0)})),Z(()=>({multiplier:Ze,description:"Heavy Extractor",enabled:()=>i.gt(D.value,0)})),Z(()=>({multiplier:Ni[0],description:"Coal Drill Synergy",enabled:ei[0].bought})),Z(()=>({multiplier:Ni[1],description:"Metal Drill Synergy",enabled:ei[1].bought})),Z(()=>({multiplier:Ni[2],description:"Coal Drill Upgrade",enabled:ei[2].bought})),Z(()=>({multiplier:Ni[3],description:"Metal Drill Upgrade",enabled:ei[3].bought})),Z(()=>({multiplier:2,description:"Guide to drilling",enabled:F.upgrades.drillingUpgrade.bought})),Z(()=>({multiplier:()=>i.add(vi.value,1).log10().add(1),description:"Cocoa Level 2",enabled:v.elfTraining.oilElfTraining.milestones[1].earned})),Z(()=>({multiplier:2,description:"Cocoa Level 3",enabled:v.elfTraining.oilElfTraining.milestones[2].earned})),Z(()=>({multiplier:()=>fe.value,description:"Effectiveness",enabled:()=>i.lt(fe.value,1)}))]),re=b(()=>vl.apply(0)),Ae=oe(()=>[ye(()=>({addend:Ni[4],description:"Drill Oil",enabled:ei[4].bought}))]),bi=b(()=>Ae.apply(0)),Si=oe(()=>[ye(()=>({addend:$,description:"Oil Pump",enabled:()=>i.gt(U.value,0)})),Z(()=>({multiplier:2,description:"Oil the Oil Pump",enabled:zi[0].bought})),Z(()=>({multiplier:2,description:"3000m Well Depth",enabled:Qe[7].earned})),Z(()=>({multiplier:2,description:"Oil and where to find it",enabled:F.upgrades.oilUpgrade.bought})),Z(()=>({multiplier:()=>fe.value,description:"Effectiveness",enabled:()=>i.lt(fe.value,1)})),Z(()=>({multiplier:()=>i.div(Ii.foundationProgress.value,10).floor().div(10).add(1),description:"600% Foundation Completed",enabled:Ii.milestones.extraExpansionMilestone3.earned})),Z(()=>({multiplier:()=>i.sqrt(v.totalElfLevels.value),description:"Jack Level 4",enabled:v.elfTraining.heatedCutterElfTraining.milestones[3].earned})),Z(()=>({multiplier:()=>i.add(Y.amount.value,1).sqrt(),description:"Faith Level 4",enabled:v.elfTraining.bonfireElfTraining.milestones[3].earned})),Z(()=>({multiplier:2,description:"Cocoa Level 3",enabled:v.elfTraining.oilElfTraining.milestones[2].earned}))]),il=b(()=>Si.apply(0)),Ke=oe(()=>[ye(()=>({addend:()=>i.negate(Be.value),description:"Oil Burner",enabled:()=>i.gt(Ce.value,0)})),ye(()=>({addend:()=>i.negate(Ui.value),description:"Oil Smelter",enabled:()=>i.gt(ki.value,0)})),ye(()=>({addend:()=>i.negate(ri.oilCost.value),description:"Oil Refinery",enabled:()=>i.gt(ri.activeRefinery.value,0)}))]),mi=b(()=>Ke.apply(0)),J=oe(()=>[ye(()=>({addend:te,description:"Oil Burner",enabled:()=>i.gt(Ce.value,0)})),Z(()=>({multiplier:()=>ti.value,description:"Effectiveness",enabled:()=>i.lt(ti.value,1)}))]),z=b(()=>J.apply(0)),rl=oe(()=>[ye(()=>({addend:ve.boosts.red1,description:"Red Dye Boost 1",enabled:()=>i.gte(ve.dyes.red.amount.value,1)}))]),Tl=b(()=>rl.apply(0)),[dl,fl]=ol(()=>[{title:"Coal Consumption",modifier:Vl,unit:"/s",base:0},{title:"Drill Power",modifier:vl,base:0},{title:"Upgrade Bonus",modifier:Ae,base:0,visible(){return i.gt(bi.value,0)}},{title:"Oil Speed",modifier:Si,unit:"/s",base:0,visible(){return i.gt(il.value,0)}},{title:"Oil Consumption",modifier:Ke,unit:"/s",base:0,visible(){return i.lt(mi.value,0)}},{title:"Oil to Coal Substitution",modifier:J,unit:"/s",base:0,visible(){return i.gt(z.value,0)}},{title:"Extra Oil Pumps",modifier:rl,base:0,visible(){return i.gt(Tl.value,0)}}]),ll=se(!1),q=f(()=>t(Gi,{modelValue:ll.value,"onUpdate:modelValue":H=>ll.value=H},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:dl})),fe=se(i.dOne),ti=se(i.dOne);ui.on("update",H=>{if(i.lt(L.day.value,Ln))return;const le=i.negate(Wl.value);i.gt(le,0)?(fe.value=i.min(i.div(_.coal.value,le),1),_.coal.value=i.sub(_.coal.value,i.mul(le,fe.value).mul(H))):fe.value=i.dOne,I.value=i.add(I.value,i.mul(re.value,H)),s.value=i.add(s.value,i.mul(il.value,H)),d();const ul=i.negate(mi.value);i.gt(ul,0)?(ti.value=i.min(i.div(s.value,ul),1),s.value=i.sub(s.value,i.mul(ul,ti.value).mul(H)).max(0)):ti.value=i.dOne});const{total:vi,trackerDisplay:Ul}=Jl({resource:s,goal:25e4,name:e,day:Ln,color:l,modal:{show:ll,display:q}});return{name:e,day:Ln,color:l,oil:s,totalOil:vi,depth:a,drillProgress:I,activeHeavy:u,buildHeavy:h,activeHeavy2:M,buildHeavy2:Y,activeExtractor:D,buildExtractor:ke,activePump:U,buildPump:ze,activeBurner:Ce,effectiveBurners:Vi,buildBurner:B,activeSmelter:ki,buildSmelter:De,extractorCoal:Ve,extractorOre:Fe,coalEffectiveness:fe,oilEffectiveness:ti,depthMilestones:Qe,collapsedDepthMilestones:Pi,row1Upgrades:ei,row2Upgrades:zi,row3Upgrades:Il,minWidth:700,oilMilestones:Yi,collapsedOilMilestones:qi,generalTabCollapsed:fl,display:f(()=>{const H=[];return Qe[1].earned.value&&H.push(ei),Yi[1].earned.value&&H.push(zi),v.elfTraining.oilElfTraining.milestones[4].earned.value&&H.push(Il),t(O,null,[We(Ul),t(ge,null,null),i.lt(fe.value,1)?t("div",null,[o("Coal efficiency: "),Me(i.mul(fe.value,100)),o("%")]):null,i.lt(ti.value,1)?t("div",null,[o("Oil efficiency: "),Me(i.mul(ti.value,100)),o("%")]):null,t(Qi,{resource:s,color:l,resourceStyle:{textShadow:"grey 0px 0px 10px"},sticky:!0,productionDisplay:f(()=>t(O,null,[i.lt(a.value,1e3)?"Reach 1000m to start gaining oil":t(O,null,[wn(i.add(il.value,mi.value))])]))},null),i.eq(il.value,0)?t(O,null,[o("(Need at least 1 Oil Pump, 1 Heavy Drill and 1 Heavy Extractor active to gain oil)"),t("br",null,null)]):"",t(nn,null,{default:()=>[Qe[6].earned.value?t(Bi,null,{default:()=>[We(ze),t("div",null,[xe(i.floor(U.value)),o("/"),xe(i.floor(ze.amount.value))]),di(Oi,$e,qe,Ne)]}):null,Yi[0].earned.value?t(Bi,null,{default:()=>[We(B),t("div",null,[xe(i.floor(Ce.value)),o("/"),xe(i.floor(B.amount.value))]),di(pe,Wi,oi,Ee)]}):null,Yi[2].earned.value?t(Bi,null,{default:()=>[We(De),t("div",null,[xe(i.floor(ki.value)),o("/"),xe(i.floor(De.amount.value))]),di(be,ie,k,_e)]}):null]}),t("br",null,null),t("div",null,[t("span",null,[o("The well is ")]),t("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[xe(a.value)]),o("m deep"),t("br",null,null),o("Next at "),Me(i.sub(r.value,I.value))," ",o("drill power seconds")]),t("div",null,[t("span",null,[o("Your drill power is ")]),t("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[Me(re.value)])]),t(ge,null,null),t(nn,null,{default:()=>[t(Bi,null,{default:()=>[We(h),t("div",null,[xe(i.floor(u.value)),o("/"),xe(i.floor(h.amount.value))]),di(W,x,N,y)]}),Qe[3].earned.value?t(Bi,null,{default:()=>[We(Y),t("div",null,[xe(i.floor(M.value)),o("/"),xe(i.floor(Y.amount.value))]),di(g,E,P,G)]}):null,Qe[5].earned.value?t(Bi,null,{default:()=>[We(ke),t("div",null,[xe(i.floor(D.value)),o("/"),xe(i.floor(ke.amount.value))]),di(ce,je,Re,Pe)]}):null]}),t(ge,null,null),Yl(...H),t(ge,null,null),si(),i.gte(vi.value,50)?ml():""])}),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),Me(s.value),o(" "),s.displayName]))}}),Gm="metal",js=7,ci=Ai(Gm,function(){const e="Metal",l="#888B8D",n=fi(0,"metal ingots",void 0,!0),s=Zs(n),a=fi(0,"ore"),I=Zs(a),r=oe(()=>[Z(()=>({multiplier:5,description:"Crucible",enabled:Pe.bought})),Z(()=>({multiplier:1.5,description:"Industrial Crucible",enabled:()=>i.gte($.amount.value,1)})),Z(()=>({multiplier:2,description:"Industrial Furnace",enabled:je.bought})),Z(()=>({multiplier:()=>i.add(Oi.value,1),description:"Hotter Forges",enabled:()=>i.gte(Ne.amount.value,1)})),Z(()=>({multiplier:2,description:"Carry metal in boxes",enabled:ii.row2Upgrades.metalUpgrade.bought})),Z(()=>({multiplier:ve.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>i.gte(ve.dyes.purple.amount.value,1)})),Z(()=>({multiplier:()=>i.add(gi.cloth.value,1).log10().plus(1),description:"Glistening Paint",enabled:ve.upgrades.redDyeUpg.bought})),Z(()=>({multiplier:()=>i.div(Ii.foundationProgress.value,10).floor().div(10).add(1),description:"400% Foundation Completed",enabled:Ii.milestones.extraExpansionMilestone2.earned})),Z(()=>({multiplier:()=>i.add(ae.buildHeavy.amount.value,1).sqrt(),description:"Joy Level 4",enabled:v.elfTraining.smallfireElfTraining.milestones[3].earned})),Z(()=>({multiplier:()=>i.add(v.schools.amount.value,1),description:"Twinkle Level 1",enabled:v.elfTraining.metalElfTraining.milestones[0].earned})),nl(()=>({exponent:1.1,description:"Mary Level 2",enabled:v.elfTraining.heatedPlanterElfTraining.milestones[1].earned}))]),d=b(()=>r.apply(.1)),u=oe(()=>[ye(()=>({addend:()=>i.times($.amount.value,10),description:"Industrial Crucibles",enabled:()=>i.gte($.amount.value,1)})),nl(()=>({exponent:1.1,description:"Joy Level 5",enabled:v.elfTraining.smallfireElfTraining.milestones[4].earned})),nl(()=>({exponent:1.1,description:"Faith Level 5",enabled:v.elfTraining.bonfireElfTraining.milestones[4].earned})),nl(()=>({exponent:1.1,description:"Snowball Level 5",enabled:v.elfTraining.kilnElfTraining.milestones[4].earned})),Z(()=>({multiplier:2,description:"Efficient Crucibles",enabled:_.efficientSmelther.bought})),Z(()=>({multiplier:()=>i.mul(ae.activeSmelter.value,ae.oilEffectiveness.value).add(1),description:"Oil Smelter",enabled:()=>i.gt(ae.activeSmelter.value,0)})),Z(()=>({multiplier:ve.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>i.gte(ve.dyes.purple.amount.value,1)})),Z(()=>({multiplier:()=>i.add(ri.activeRefinery.value,1).sqrt(),description:"De Louvre",enabled:ve.upgrades.redDyeUpg2.bought})),Z(()=>({multiplier:()=>i.div(v.totalElfExp.value,1e6).add(1).sqrt(),description:"Mary Level 5",enabled:v.elfTraining.heatedPlanterElfTraining.milestones[4].earned})),Z(()=>({multiplier:()=>i.pow(1.25,v.elfTraining.metalElfTraining.level.value),description:"Twinkle Level 2",enabled:v.elfTraining.metalElfTraining.milestones[1].earned})),Z(()=>({multiplier:()=>i.add(ve.dyes.red.amount.value,ve.dyes.blue.amount.value).add(ve.dyes.yellow.amount.value).add(1).log10(),description:"The Ultimate Metal Dye",enabled:ae.row3Upgrades[4].bought}))]),c=b(()=>u.apply(0)),j=oe(()=>[Z(()=>({multiplier:3,description:"Efficient Crucibles",enabled:_.efficientSmelther.bought})),Z(()=>({multiplier:()=>i.add(ae.effectiveBurners.value,1).mul(ae.oilEffectiveness.value),description:"Oil Burner",enabled:ae.row2Upgrades[2].bought})),Z(()=>({multiplier:3,description:"Twinkle Level 3",enabled:v.elfTraining.metalElfTraining.milestones[2].earned}))]),h=b(()=>j.apply(1)),W=1e10,y=b(()=>i.min(a.value,i.div(_.coal.value,W)).floor().max(0)),N=Ei(()=>({display:f(()=>{const A=i.gte(y.value,1)?y.value:i.add(y.value,1);return t(O,null,[t("span",{style:"font-size: large"},[o("Smelt "),Me(i.times(y.value,d.value))," ",n.displayName]),t("br",null,null),t("span",{style:"font-size: large"},[o("Cost: "),xe(A),o(" "),a.displayName,o(";")," ",xe(i.times(A,W)),o(" "),_.coal.displayName])])}),canClick:()=>i.gte(y.value,1),onClick(){!m(this.canClick)||x(y.value)},style:{width:"600px",minHeight:"unset"}}));function x(A,B=1){const[Ee,pe,oi]=[i.times(A,d.value).times(B),A,i.times(A,W)];n.value=i.add(n.value,Ee),a.value=i.sub(a.value,pe),_.coal.value=i.sub(_.coal.value,oi)}const M=oe(()=>[ye(()=>({addend:()=>Ie.amount.value,description:"Metal Drills",enabled:()=>i.gte(Ie.amount.value,1)})),Z(()=>({multiplier:()=>i.mul(ae.depth.value,.05).add(1),description:"25m Well Depth",enabled:ae.depthMilestones[2].earned})),Z(()=>({multiplier:ae.extractorOre,description:"Heavy Extractor",enabled:()=>i.gt(ae.activeExtractor.value,0)})),Z(()=>({multiplier:2,description:"Carry ore in boxes",enabled:ii.row2Upgrades.oreUpgrade.bought}))]),ne=b(()=>M.apply(1)),Y=oe(()=>[Z(()=>({multiplier:2,description:"A Simple Pickaxe",enabled:ke.bought})),Z(()=>({multiplier:2,description:"Double Pickaxe",enabled:ce.bought})),Z(()=>({multiplier:2.5,description:"Metal Drills",enabled:()=>i.gte(Ie.amount.value,1)})),Z(()=>({multiplier:2,description:"Efficient Drills",enabled:U.bought})),Z(()=>({multiplier:2,description:"Oil the Metal Drills",enabled:ae.row2Upgrades[1].bought}))]),g=b(()=>Y.apply(i.recip(P))),G=Se(0),P=10,E=al(()=>({width:400,height:25,direction:Ue.Right,fillStyle:{backgroundColor:l},progress:()=>G.value})),D=oe(()=>[ye(()=>({addend:ne})),Z(()=>({multiplier:g}))]),Ze=b(()=>D.apply(0)),Ve=oe(()=>[ye(()=>({addend:Ze})),ye(()=>({addend:()=>i.negate(c.value),enabled:ze}))]),Fe=b(()=>Ve.apply(0)),ke=T(()=>({resource:Q(n),cost:.1,display:{title:"A Simple Pickaxe",description:"Make a simple pickaxe to help mine faster.
Halve the time to mine more ore"}})),ce=T(()=>({resource:Q(n),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:()=>p(ce.bought.value)})),Pe=T(()=>({resource:Q(n),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:()=>p(Pe.bought.value||i.div(I.value,d.value).plus(s.value).gte(1))})),Re=T(()=>({resource:Q(n),cost:0,display:{title:"Coal Drilling",description:"These metal drills are pretty powerful, mining more ore than you can actually smelt. Could be worth making some to mine coal instead"},visibility:()=>p(i.gte(Ie.amount.value,1)&&(Re.bought.value||L.days[7].opened.value||i.lt(_.computedCoalGain.value,i.times(ne.value,g.value).times(W)))),onPurchase(){L.days[2].recentlyUpdated.value=!0}})),je=T(()=>({canAfford(){return i.gte(n.value,50)&&i.gte(_.coal.value,1e11)},onPurchase(){n.value=i.sub(n.value,50),_.coal.value=i.sub(_.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
+ `)}]})},a={christmas1:b(()=>i.add(s.christmas.buyable.amount.value,1)),rainbow1:b(()=>i.pow(2,s.rainbow.buyable.amount.value)),jazzy1:b(()=>i.ln(i.add(i.ln(i.add(s.jazzy.buyable.amount.value,1)),1))),sunshine1:b(()=>i.add(s.sunshine.buyable.amount.value,1)),ocean1:b(()=>i.pow(1.5,s.ocean.buyable.amount.value)),beach1:b(()=>i.add(s.beach.buyable.amount.value,1))},I=fi(b(()=>Object.values(s).map(E=>E.buyable.amount.value).reduce(i.add,0)),"Total Wrapping Paper"),r=se(!1),d=f(()=>t(Gi,{modelValue:r.value,"onUpdate:modelValue":E=>r.value=E},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:u})),[u,c]=ol(()=>[]),{total:j,trackerDisplay:h}=Jl({resource:I,goal:1e20,name:e,day:Om,color:l,textColor:"var(--feature-foreground)",modal:{show:r,display:d},ignoreTotal:!0}),W=[6,12,18,24,30,36],y=X(()=>({display:{requirement:W[0]+" Total Wrapping Paper",effectDisplay:"Double primary colour dye gain"},shouldEarn:()=>i.gte(j.value,W[0]),visibility:()=>p(!0)})),N=X(()=>({display:{requirement:W[1]+" Total Wrapping Paper",effectDisplay:"Double secondary colour dye gain"},shouldEarn:()=>i.gte(j.value,W[1]),visibility:()=>p(y.earned.value)})),x=X(()=>({display:{requirement:W[2]+" Total Wrapping Paper",effectDisplay:"Buy maximum primary colour dyes"},shouldEarn:()=>i.gte(j.value,W[2]),visibility:()=>p(N.earned.value)})),M=X(()=>({display:{requirement:W[3]+" Total Wrapping Paper",effectDisplay:"Secondary colour dyes don't spend primary colour dyes"},shouldEarn:()=>i.gte(j.value,W[3]),visibility:()=>p(x.earned.value)})),ne=X(()=>({display:{requirement:W[4]+" Total Wrapping Paper",effectDisplay:"Buy maximum secondary colour dyes"},shouldEarn:()=>i.gte(j.value,W[4]),visibility:()=>p(M.earned.value)})),Y=X(()=>({display:{requirement:W[5]+" Total Wrapping Paper",effectDisplay:"Unlock a new elf to help with dyes"},shouldEarn:()=>i.gte(j.value,W[5]),visibility:()=>p(ne.earned.value)})),g={primaryBoost:y,secondaryBoost:N,buyMaxPrimary:x,secondaryNoReset:M,buyMaxSecondary:ne,unlockDyeElf:Y},{collapseMilestones:G,display:P}=sn(g);return{name:e,display:f(()=>t("div",{style:"width: 620px"},[We(h),t(Qi,{resource:I},null),di(s.christmas.display,s.rainbow.display,s.jazzy.display),di(s.christmas.buyable,s.rainbow.buyable,s.jazzy.buyable),t(ge,null,null),di(s.sunshine.display,s.ocean.display,s.beach.display),di(s.sunshine.buyable,s.ocean.buyable,s.beach.buyable),t(ge,null,null),o("button goes here"),t(ge,null,null),P()])),wrappingPaper:s,totalWrappingPaper:j,generalTabCollapsed:c,boosts:a,milestones:g,collapseMilestones:G}}),Ym="paper",Hn=5,F=Ai(Ym,function(){const e="Paper",l="#E8DCB8",n=fi(0,"paper"),s=fi(b(()=>i.min(i.div(he.logs.value,1e9),i.div(_.ash.value,Ne.value))),"pulp"),a=Ks(()=>({scaling:es(1,1.2),baseResource:s,gainResource:Q(n),roundUpCost:!0,spend(te,A){he.logs.value=i.sub(he.logs.value,i.times(A,1e9)),_.ash.value=i.sub(_.ash.value,i.times(A,Ne.value))},gainModifier:$})),I=Ei(()=>({display:f(()=>{const te=i.gte(a.actualGain.value,1)?a.currentAt.value:a.nextAt.value;return t(O,null,[t("span",{style:"font-size: large"},[o("Create "),me(a.currentGain.value),o(" "),n.displayName]),t("br",null,null),t("span",{style:"font-size: large"},[o("Cost: "),hn(he.logs,te),o(" "),s.displayName,o(" ("),me(i.times(te,1e9)),o(" "),he.logs.displayName,o(";")," ",me(i.times(te,Ne.value))," ",_.ash.displayName,o(")")])])}),canClick:()=>i.gte(a.actualGain.value,1),onClick(){!m(this.canClick)||a.convert()},style:"width: 600px; min-height: unset"}));function r(te){const A=He(()=>({...te,display:{title:te.name,description:`Print a copy of "${te.name}", which ${te.elfName} will use to improve their skills! Each copy printed will reduce the "${te.buyableName}" price scaling by 0.95x and make ${te.elfName} purchase +10% faster!`,effectDisplay:f(()=>t(O,null,[tn(i.pow(.95,A.totalAmount.value)),o("x price scaling,")," ",K(i.div(A.totalAmount.value,10).add(1)),o("x auto-purchase speed")])),showAmount:!1},resource:Q(n),cost(){let B=A.amount.value;te.elfName==="Star"&&i.gte(B,10)&&(B=i.pow(10,i.div(B,10))),(te.elfName==="Star"||te.elfName==="Bell")&&(B=i.pow(B,2)),i.gte(B,100)&&(B=i.pow(B,2).div(100)),i.gte(B,1e4)&&(B=i.pow(B,2).div(1e4)),B=i.pow(.95,M.totalAmount.value).times(B);let Ee=5;v.elfTraining.paperElfTraining.milestones[2].earned.value&&Ee--;let pe=i.pow(Ee,B).times(10);return["Peppermint","Twinkle","Cocoa","Frosty"].includes(te.elfName)&&(pe=pe.mul(1e31)),v.elfTraining.paperElfTraining.milestones[0].earned.value&&(pe=i.div(pe,Ve.value.max(1))),je.bought.value&&(pe=pe.div(10)),pe},inverseCost(B){je.bought.value&&(B=i.mul(B,10)),v.elfTraining.paperElfTraining.milestones[0].earned.value&&(B=i.mul(B,Ve.value.max(1)));let Ee=5;v.elfTraining.paperElfTraining.milestones[2].earned.value&&Ee--;let pe=i.div(B,10);return["Peppermint","Twinkle","Cocoa","Frosty"].includes(te.elfName)&&(pe=pe.div(1e31)),pe=pe.log(Ee),pe=pe.div(i.pow(.95,M.totalAmount.value)),i.gte(pe,1e4)&&(pe=i.mul(pe,1e4).root(2)),i.gte(pe,100)&&(pe=i.mul(pe,100).root(2)),(te.elfName==="Star"||te.elfName==="Bell")&&(pe=i.root(pe,2)),te.elfName==="Star"&&i.gte(pe,10)&&(pe=pe.log10().mul(10)),i.isNaN(pe)?i.dZero:pe.floor().max(0)},style:"width: 600px",freeLevels:b(()=>{var B,Ee;return v.elfTraining.paperElfTraining.milestones[4].earned.value&&i.gte((Ee=(B=Object.values(v.elfTraining).find(pe=>pe.name===te.elfName))==null?void 0:B.level.value)!=null?Ee:0,5)&&!["Star","Bell","Gingersnap","Peppermint","Twinkle","Cocoa","Frosty"].includes(te.elfName)?5:0}),totalAmount:b(()=>i.add(A.amount.value,A.freeLevels.value))}));return A}const d=r({name:"Now You're Logging!",elfName:"Holly",buyableName:"Generic Cutters"}),u=r({name:"The Man Who Planted Trees",elfName:"Ivy",buyableName:"Generic Planters"}),c=r({name:"Logjam",elfName:"Hope",buyableName:"Expand Forest"}),j=r({name:"Fahrenheit 451",elfName:"Jack",buyableName:"Heated Cutters"}),h=r({name:"Tillamook Burn Country",elfName:"Mary",buyableName:"Heated Planters"}),W=r({name:"The Garden Tree's Handbook",elfName:"Noel",buyableName:"Fertilized Soil"}),y=r({name:"Firestarter",elfName:"Joy",buyableName:"Small Fire",visibility:()=>p(Ye.elves.smallFireElf.bought.value)}),N=r({name:"An Arsonist's Guide to Writer's Homes in New England",elfName:"Faith",buyableName:"Bonfire",visibility:()=>p(Ye.elves.bonfireElf.bought.value)}),x=r({name:"Little Fires Everywhere",elfName:"Snowball",buyableName:"Kiln",visibility:()=>p(Ye.elves.kilnElf.bought.value)}),M=r({name:"The Book Thief",elfName:"Star",buyableName:"Paper Buyables",visibility:()=>p(Ye.elves.paperElf.bought.value)}),ne=r({name:"Not a box",elfName:"Bell",buyableName:"Box Buyables",visibility:()=>p(Ye.elves.boxElf.bought.value)}),Y=r({name:"Fuzzy Bee and Friends",elfName:"Gingersnap",buyableName:"Cloth Buyables",visibility:()=>p(Ye.elves.clothElf.bought.value)}),g=r({name:"Drills and Mills",elfName:"Peppermint",buyableName:"Coal Drill",visibility:()=>p(Ye.elves.coalDrillElf.bought.value)}),G=r({name:"Deep in the Earth",elfName:"Frosty",buyableName:"Oil Drills",visibility:()=>p(Ye.elves.heavyDrillElf.bought.value)}),P=r({name:"Burning the Midnight Oil",elfName:"Cocoa",buyableName:"Oil-Consuming Machines",visibility:()=>p(Ye.elves.oilElf.bought.value)}),E=r({name:"Physical Metallurgy",elfName:"Twinkle",buyableName:"Metal Buyables",visibility:()=>p(Ye.elves.metalElf.bought.value)}),D=r({name:"Arts and Crafts",elfName:"Carol",buyableName:"Dye Buyables",visibility:()=>p(Ye.elves.dyeElf.bought.value)}),Ze={cuttersBook:d,plantersBook:u,expandersBook:c,heatedCuttersBook:j,heatedPlantersBook:h,fertilizerBook:W,smallFireBook:y,bonfireBook:N,kilnBook:x,paperBook:M,boxBook:ne,clothBook:Y,coalDrillBook:g,heavyDrillBook:G,oilBook:P,metalBook:E,dyeBook:D},Ve=b(()=>Object.values(Ze).reduce((te,A)=>te.add(A.amount.value),new i(0))),Fe=T(()=>({resource:Q(n),cost:1e8,visibility:()=>p(ri.upgrades.paperTools.bought.value),display:{title:"Shepherding for Dummies",description:"Double effectiveness of all cloth actions"}})),ke=T(()=>({resource:Q(n),cost:1e9,visibility:()=>p(ri.upgrades.paperTools.bought.value),display:{title:"Guide to drilling",description:"Double drilling power"}})),ce=T(()=>({resource:Q(n),cost:1e10,visibility:()=>p(ri.upgrades.paperTools.bought.value),display:{title:"Oil and where to find it",description:"Double oil gain"}})),Pe={clothUpgrade:Fe,drillingUpgrade:ke,oilUpgrade:ce},Re=T(()=>({resource:Q(n),cost:1e36,visibility:()=>p(v.elfTraining.heavyDrillElfTraining.milestones[4].earned.value),display:{title:"Paper Burning",description:"Paper adds to ash gain after all other modifiers"}})),je=T(()=>({resource:Q(n),cost:1e40,visibility:()=>p(v.elfTraining.heavyDrillElfTraining.milestones[4].earned.value),display:{title:"Book Cheapener",description:"Books are less expensive"}})),U=T(()=>({resource:Q(n),cost:1e44,visibility:()=>p(v.elfTraining.heavyDrillElfTraining.milestones[4].earned.value),display:{title:"Classroom Supplies",description:"Classrooms' effect is raised to the 1.1"}})),Ie={ashUpgrade:Re,bookUpgrade:je,classroomUpgrade:U},$=oe(()=>[Z(()=>({multiplier:2,description:"Scholar's shoes",enabled:gi.paperUpgrades.paperUpgrade1.bought})),Z(()=>({multiplier:2,description:"Scholar's slacks",enabled:gi.paperUpgrades.paperUpgrade2.bought})),Z(()=>({multiplier:2,description:"Scholar's jacket",enabled:gi.paperUpgrades.paperUpgrade3.bought})),Z(()=>({multiplier:10,description:"Felt Elbow Pads",enabled:gi.paperUpgrades.paperUpgrade4.bought})),Z(()=>({multiplier:ve.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>i.gte(ve.dyes.yellow.amount.value,1)})),Z(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:Ii.milestones.extraExpansionMilestone5.earned})),Z(()=>({multiplier:ji.boosts.sunshine1,description:"Sunshine Wrapping Paper",enabled:()=>i.gte(ji.boosts.sunshine1.value,2)}))]),ze=oe(()=>[Z(()=>({multiplier:.1,description:"Star Level 2",enabled:v.elfTraining.paperElfTraining.milestones[1].earned}))]),Ne=b(()=>ze.apply(1e6)),[Oi,qe]=ol(()=>[{title:"Paper Gain",modifier:$,base:1},{title:"Ash Cost",modifier:ze,base:1e6,unit:" ash/pulp"}]),$e=se(!1),Ce=f(()=>t(Gi,{modelValue:$e.value,"onUpdate:modelValue":te=>$e.value=te},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:Oi}));ui.on("update",te=>{i.lt(L.day.value,Hn)||(n.value=i.times(te,ri.buyables.passivePaper.amount.value).times(a.currentGain.value).div(100).add(n.value))});const{total:Vi,trackerDisplay:Be}=Jl({resource:n,goal:5e3,name:e,day:Hn,color:l,textColor:"var(--feature-foreground)",modal:{show:$e,display:Ce}});return{name:e,day:Hn,color:l,paper:n,totalPaper:Vi,paperConversion:a,books:Ze,upgrades:Pe,upgrades2:Ie,generalTabCollapsed:qe,minWidth:700,display:f(()=>t(O,null,[We(Be),t(ge,null,null),t(Qi,{resource:n,color:l,style:"margin-bottom: 0"},null),t(ge,null,null),We(I),t(ge,null,null),di(...Object.values(Pe)),t(ge,null,null),tl(...Object.values(Ze))])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),K(n.value),o(" "),n.displayName]))}}),Nm="trees",Vs=1,Ws=.1,he=Ai(Nm,function(){const e="Trees",l="#4BDC13",n="green",s=fi(0,"logs"),a=fi(0,"saplings"),I=se(0),r=se(0),d=se(0),u=oe(()=>[ye(()=>({addend:()=>i.times(Ve.amount.value,10),description:"Expand Forest",enabled:P.bought})),ye(()=>({addend:()=>i.div(Ii.foundationProgress.value,2),description:"75% Foundation Completed",enabled:Ii.milestones.morePlantsMilestone1.earned})),Z(()=>({multiplier:2,description:"5 Elves Trained",enabled:Ye.milestones[4].earned})),Z(()=>({multiplier:2,description:"8 Elves Trained",enabled:Ye.milestones[7].earned})),Z(()=>({multiplier:4,description:"Lumberjack Boots",enabled:gi.treesUpgrades.treesUpgrade1.bought})),ye(()=>({addend:ve.boosts.blue1,description:"Blue Dye Boost 1",enabled:()=>i.gte(ve.dyes.blue.amount.value,1)})),ye(()=>({addend:()=>i.pow(ce.value,.99),description:"Hope Level 1",enabled:v.elfTraining.expandersElfTraining.milestones[0].earned}))]),c=fi(b(()=>i.sub(u.apply(10),a.value)),"trees"),j=b(()=>u.apply(10)),h=T(()=>({resource:Q(s),cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),W=T(()=>({resource:Q(s),cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),y=T(()=>({resource:Q(s),cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),N=T(()=>({resource:Q(s),cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),x=T(()=>({resource:Q(s),cost:40,display:{title:"Research I",description:"Trees give 25% more logs, and unlock more upgrades"}})),M=[h,W,y,N,x],ne=T(()=>({resource:Q(s),cost:50,visibility:()=>p(x.bought.value),display:{title:"Sharper Fingers",description:"Manually cut trees twice as often"}})),Y=T(()=>({resource:Q(s),cost:50,visibility:()=>p(x.bought.value),display:{title:"Greener Fingers",description:"Manually Plant trees twice as often"}})),g=T(()=>({resource:Q(s),cost:150,visibility:()=>p(x.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),G=T(()=>({resource:Q(s),cost:150,visibility:()=>p(x.bought.value),display:{title:"Smart Spades",description:"Each time you manually plant trees, gain 1s of automatic tree planting production"}})),P=T(()=>({resource:Q(s),cost:300,visibility:()=>p(x.bought.value),display:{title:"Research II",description:"Trees give 25% more logs, and unlock repeatable purchases"}})),E=[ne,Y,g,G,P],D=He(()=>({resource:Q(s),cost(){let k=this.amount.value;return i.gte(k,50)&&(k=i.pow(k,2).div(50)),i.gte(k,200)&&(k=i.pow(k,2).div(200)),i.gte(k,2e6)&&(k=i.pow(k,2).div(2e6)),i.gte(k,2e30)&&(k=i.pow(k,10).div(i.pow(2e30,9))),k=i.pow(.95,F.books.cuttersBook.totalAmount.value).times(k),i.times(100,k).add(200)},inverseCost(k){let ie=i.sub(k,200).div(100);return ie=ie.div(i.pow(.95,F.books.cuttersBook.totalAmount.value)),i.gte(ie,2e30)&&(ie=i.mul(ie,i.pow(2e30,9)).root(10)),i.gte(ie,2e6)&&(ie=i.mul(ie,2e6).root(2)),i.gte(ie,200)&&(ie=i.mul(ie,200).root(2)),i.gte(ie,50)&&(ie=i.mul(ie,50).root(2)),i.isNaN(ie)?i.dZero:ie.floor().max(0)},display:{title:"Generic Cutters",description:"Each cutter cuts down 1 tree/s"},visibility:()=>p(P.bought.value)})),Ze=He(()=>({resource:Q(s),cost(){let k=this.amount.value;i.gte(k,50)&&(k=i.pow(k,2).div(50)),i.gte(k,200)&&(k=i.pow(k,2).div(200)),i.gte(k,2e6)&&(k=i.pow(k,2).div(2e6)),i.gte(k,2e30)&&(k=i.pow(k,10).div(i.pow(2e30,9))),k=i.pow(.95,F.books.plantersBook.totalAmount.value).times(k);let ie=i.times(100,k).add(200);return v.elfTraining.planterElfTraining.milestones[3].earned.value&&(ie=i.div(ie,10)),ie},inverseCost(k){v.elfTraining.planterElfTraining.milestones[3].earned.value&&(k=i.mul(k,10));let ie=i.sub(k,200).div(100);return ie=ie.div(i.pow(.95,F.books.plantersBook.totalAmount.value)),i.gte(ie,2e30)&&(ie=i.mul(ie,i.pow(2e30,9)).root(10)),i.gte(ie,2e6)&&(ie=i.mul(ie,2e6).root(2)),i.gte(ie,200)&&(ie=i.mul(ie,200).root(2)),i.gte(ie,50)&&(ie=i.mul(ie,50).root(2)),i.isNaN(ie)?i.dZero:ie.floor().max(0)},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>p(P.bought.value)})),Ve=He(()=>({resource:Q(s),cost(){let k=this.amount.value;return i.gte(k,100)&&(k=i.pow(k,2).div(100)),i.gte(k,1e5)&&(k=i.pow(k,2).div(1e5)),i.gte(k,1e15)&&(k=i.pow(k,10).div(1e135)),k=i.pow(.95,F.books.expandersBook.totalAmount.value).times(k),i.pow(i.add(k,1),1.5).times(500)},inverseCost(k){let ie=i.div(k,500).root(1.5).sub(1);return ie=ie.div(i.pow(.95,F.books.expandersBook.totalAmount.value)),i.gte(ie,1e15)&&(ie=i.mul(ie,1e135).root(10)),i.gte(ie,1e5)&&(ie=i.mul(ie,1e5).root(2)),i.gte(ie,100)&&(ie=i.mul(ie,100).root(2)),i.isNaN(ie)?i.dZero:ie.floor().max(0)},display:{title:"Expand Forest",description:"Add 10 trees to the forest"},visibility:()=>p(P.bought.value)})),Fe=[D,Ze,Ve],ke=oe(()=>[ye(()=>({addend:1,description:"Wooden Fingers",enabled:h.bought})),ye(()=>({addend:U,description:"Smart Knives",enabled:g.bought}))]),ce=b(()=>ke.apply(1)),Pe=oe(()=>[Z(()=>({multiplier:.5,description:"Sharper Fingers",enabled:ne.bought})),Z(()=>({multiplier:()=>i.pow(.5,Ye.totalElves.value),description:"1 Elf Trained",enabled:Ye.milestones[0].earned}))]),Re=b(()=>Pe.apply(1)),je=oe(()=>[ye(()=>({addend:1,description:"Automated Knives",enabled:y.bought})),ye(()=>({addend:D.amount,description:"Generic Cutters",enabled:P.bought})),ye(()=>({addend:()=>i.div(Ii.foundationProgress.value,5).floor(),description:"10% Foundation Completed",enabled:Ii.milestones.autoCutMilestone1.earned})),Z(()=>({multiplier:2,description:"30% Foundation Completed",enabled:Ii.milestones.autoCutMilestone2.earned})),Z(()=>({multiplier:2,description:"Warmer Cutters",enabled:_.warmerCutters.bought})),Z(()=>({multiplier:_.computedHeatedCutterEffect,description:"Heated Cutters",enabled:()=>i.gt(_.heatedCutters.amount.value,0)})),Z(()=>({multiplier:4,description:"Lumberjack Jeans",enabled:gi.treesUpgrades.treesUpgrade2.bought})),Z(()=>({multiplier:()=>i.pow(1.1,L.day.value),description:"Holly Level 4",enabled:v.elfTraining.cutterElfTraining.milestones[3].earned})),ye(()=>({addend:()=>i.sub(d.value,r.value).max(0),description:"Ivy Level 5",enabled:v.elfTraining.planterElfTraining.milestones[4].earned}))]),U=b(()=>je.apply(0)),Ie=oe(()=>[ye(()=>({addend:1,description:"Leafy Fingers",enabled:W.bought})),ye(()=>({addend:qe,description:"Smart Spades",enabled:G.bought}))]),$=b(()=>Ie.apply(1)),ze=oe(()=>[Z(()=>({multiplier:.5,description:"Greener Fingers",enabled:Y.bought})),Z(()=>({multiplier:()=>i.pow(.5,Ye.totalElves.value),description:"1 Elf Trained",enabled:Ye.milestones[0].earned}))]),Ne=b(()=>ze.apply(1)),Oi=oe(()=>[ye(()=>({addend:1,description:"Automated Spade",enabled:N.bought})),ye(()=>({addend:()=>i.div(Ze.amount.value,2),description:"Generic Planters",enabled:P.bought})),ye(()=>({addend:()=>i.div(Ii.foundationProgress.value,10).floor(),description:"20% Foundation Completed",enabled:Ii.milestones.autoPlantMilestone1.earned})),Z(()=>({multiplier:2,description:"40% Foundation Completed",enabled:Ii.milestones.autoPlantMilestone2.earned})),Z(()=>({multiplier:2,description:"Warmer Planters",enabled:_.warmerPlanters.bought})),Z(()=>({multiplier:_.computedHeatedPlanterEffect,description:"Heated Planters",enabled:()=>i.gt(_.heatedPlanters.amount.value,0)})),Z(()=>({multiplier:4,description:"Lumberjack Plaid",enabled:gi.treesUpgrades.treesUpgrade3.bought})),Z(()=>({multiplier:2,description:"Ivy Level 1",enabled:v.elfTraining.planterElfTraining.milestones[0].earned})),Z(()=>({multiplier:()=>i.pow(c.value,.2).log10().pow_base(2),description:"Ivy Level 3",enabled:v.elfTraining.planterElfTraining.milestones[2].earned})),Z(()=>({multiplier:2,description:"Mary Level 4",enabled:v.elfTraining.heatedPlanterElfTraining.milestones[3].earned})),ye(()=>({addend:()=>i.sub(r.value,d.value).max(0),description:"Ivy Level 5",enabled:v.elfTraining.planterElfTraining.milestones[4].earned}))]),qe=b(()=>Oi.apply(0)),$e=oe(()=>[Z(()=>({multiplier:1.25,description:"Research I",enabled:x.bought})),Z(()=>({multiplier:1.25,description:"Research II",enabled:P.bought})),Z(()=>({multiplier:()=>Ii.milestones.extraExpansionMilestone1.earned.value?i.pow(1.02,Ii.foundationProgress.value):i.div(Ii.foundationProgress.value,20).add(1),description:"1% Foundation Completed",enabled:Ii.milestones.logGainMilestone1.earned})),Z(()=>({multiplier:2,description:"50% Foundation Completed",enabled:Ii.milestones.logGainMilestone2.earned})),Z(()=>({multiplier:1.25,description:"Ashy Soil",enabled:_.basicFertilizer.bought})),Z(()=>({multiplier:_.computedFertilizerEffect,description:"Fertilized Soil",enabled:()=>i.gt(_.moreFertilizer.amount.value,0)})),Z(()=>({multiplier:2,description:"4 Elves Trained",enabled:Ye.milestones[3].earned})),Z(()=>({multiplier:2,description:"Carry logs in boxes",enabled:ii.upgrades.logsUpgrade.bought})),Z(()=>({multiplier:()=>i.div(ii.buyables.logBoxesBuyable.amount.value,2).add(1),description:"Carry more logs",enabled:ii.upgrades.logsUpgrade.bought})),Z(()=>({multiplier:10,description:"Felt-Gripped Axe",enabled:gi.treesUpgrades.treesUpgrade4.bought})),Z(()=>({multiplier:b(()=>i.add(U.value,1).log10().plus(1)),description:"Is Blue Dye just Water?",enabled:ve.upgrades.blueDyeUpg.bought})),Z(()=>({multiplier:b(()=>i.add(U.value,1).root(9)),description:"Holly Level 1",enabled:v.elfTraining.cutterElfTraining.milestones[0].earned})),Z(()=>({multiplier:()=>i.sqrt(v.totalElfLevels.value),description:"Noel Level 1",enabled:v.elfTraining.fertilizerElfTraining.milestones[0].earned})),Z(()=>({multiplier:ji.boosts.christmas1,description:"Christmas Wrapping Paper",enabled:b(()=>i.gt(ji.boosts.christmas1.value,1))})),nl(()=>({exponent:1.2,description:"100% Foundation Completed",enabled:Ii.milestones.logGainMilestone3.earned}))]),Ce=Se(0),Vi=al(()=>({direction:Ue.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>i.div(Ce.value,Re.value)})),Be=Ei(()=>({display:{title:"Cut trees",description:f(()=>t(O,null,[o("Cut down up to "),me(i.floor(ce.value))," ",o("tree"),i.eq(ce.value,1)?"":"s",o(" at once!"),t("br",null,null),We(Vi)]))},style:{minHeight:"80px"},canClick:()=>i.gte(c.value,1)&&i.gte(Ce.value,Re.value),onClick(){if(i.lt(Ce.value,Re.value))return;const k=i.floor(i.min(c.value,i.times(ce.value,i.div(Ce.value,Re.value).floor())));s.value=i.add(s.value,i.times($e.apply(1),k)),a.value=i.add(a.value,k),Ce.value=0}})),te=Se(0),A=al(()=>({direction:Ue.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>i.div(te.value,Ne.value)})),B=Ei(()=>({display:{title:"Plant trees",description:f(()=>t(O,null,[o("Plant up to "),me(i.floor($.value))," ",o("tree"),i.eq($.value,1)?"":"s",o(" at once!"),t("br",null,null),We(A)]))},style:{minHeight:"80px"},canClick:()=>i.gte(a.value,1)&&i.gte(te.value,Ne.value),onClick(){if(i.lt(te.value,Ne.value))return;const k=i.floor(i.min(a.value,i.times($.value,i.div(te.value,Ne.value).floor())));a.value=i.sub(a.value,k),te.value=0}})),[Ee,pe]=ol(()=>[{title:"Logs per Tree",modifier:$e,base:1,visible:x.bought},{title:"Manual Cutting Amount",modifier:ke,base:1,visible:h.bought,unit:"/click"},{title:"Manual Cutting Cooldown",modifier:Pe,base:1,visible:h.bought,unit:"s"},{title:"Manual Planting Amount",modifier:Ie,base:1,visible:W.bought,unit:"/click"},{title:"Manual Planting Cooldown",modifier:ze,base:1,visible:W.bought,unit:"s"},{title:"Auto Cutting Amount",modifier:je,base:0,visible:y.bought,unit:"/s"},{title:"Auto Planting Amount",modifier:Oi,base:0,visible:N.bought,unit:"/s"},{title:"Forest Size",modifier:u,base:10,visible:P.bought}]),oi=se(!1),Wi=f(()=>t(Gi,{modelValue:oi.value,"onUpdate:modelValue":k=>oi.value=k},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:Ee}));ui.on("update",k=>{if(i.lt(L.day.value,Vs))return;i.gte(Ce.value,Re.value)?Ce.value=Re.value:(Ce.value=i.add(Ce.value,k),Be.isHolding.value&&Be.onClick()),i.gte(te.value,Ne.value)?te.value=Ne.value:(te.value=i.add(te.value,k),B.isHolding.value&&B.onClick());const ie=i.sub(qe.value,i.sub(r.value,d.value).max(0)),Qe=i.sub(U.value,i.sub(d.value,r.value).max(0));d.value=ie,r.value=Qe;const Pi=i.min(c.value,i.times(U.value,k)),si=i.mul($e.apply(1),Pi),Yi=i.div(si,k);I.value=i.mul(Yi,Ws).add(i.mul(I.value,i.dOne.sub(Ws))),s.value=i.add(s.value,si),a.value=i.add(a.value,Pi);const qi=i.min(a.value,i.times(qe.value,k));a.value=i.sub(a.value,qi)});const ki=b(()=>i.sub(U.value,qe.value)),Ui=b(()=>i.sub(qe.value,U.value)),pi=en(()=>({key:"c",description:'Press the "Cut trees" button.',onPress:()=>{Be.canClick.value&&Be.onClick()}})),De=en(()=>({key:"p",description:'Press the "Plant trees" button.',onPress:()=>{B.canClick.value&&B.onClick()}})),{total:_e,trackerDisplay:be}=Jl({resource:s,goal:1e4,name:e,day:Vs,color:n,modal:{show:oi,display:Wi}});return{name:e,color:l,logs:s,totalLogs:_e,trees:c,saplings:a,cutTree:Be,plantTree:B,cutTreeHK:pi,plantTreeHK:De,row1Upgrades:M,row2Upgrades:E,row1Buyables:Fe,manualCutProgress:Ce,manualPlantProgress:te,generalTabCollapsed:pe,computedAutoCuttingAmount:U,minWidth:700,display:f(()=>t(O,null,[We(be),t(ge,null,null),t(Qi,{resource:s,color:l,style:"margin-bottom: 0",productionDisplay:i.gt(U.value,0)?`+${K(I.value)}/s average equilibrium: +${zs([[U.value,"cutting speed"],[qe.value,"planting speed"],[i.mul(j.value,20),"forest cap"]],"/s",$e.apply(1))}`:void 0},null),t(Qi,{resource:a,color:n,style:"margin-bottom: 0",productionDisplay:wn(ki.value)},null),t(Qi,{resource:c,color:n,style:"margin-bottom: 0",productionDisplay:wn(Ui.value)},null),t(ge,null,null),di(Be,B),t("div",null,[o("Tip: You can hold down on actions to perform them automatically")]),t(ge,null,null),Yl(M,E),t(ge,null,null),di(...Fe)])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),K(s.value),o(" "),s.displayName]))}}),Xm="workshop",mn=2,Ii=Ai(Xm,function(){const e="Workshop",l="#D66B02",n="#D66B02",s=fi(0,"foundation progress"),a=Eo(()=>({scaling:ps(ps(es(250,1.5),5387,1/1e10),1e20,3e8),baseResource:he.logs,gainResource:Q(s),roundUpCost:!0,spend(Ve,Fe){he.logs.value=i.sub(he.logs.value,Fe)},costModifier:oe(()=>[Z(()=>({multiplier:b(()=>ji.boosts.beach1.value),description:"Beach Wrapping Paper",enabled:b(()=>i.gt(ji.boosts.beach1.value,1))})),nl(()=>({exponent:1/.99,description:"Hope Level 5",enabled:v.elfTraining.expandersElfTraining.milestones[4].earned}))])})),I=Ei(()=>({display:f(()=>t(O,null,[t("b",{style:"font-size: x-large"},[o("Build "),me(a.actualGain.value),o("% of the foundation")]),t("br",null,null),t("br",null,null),t("span",{style:"font-size: large"},[o("Cost:")," ",hn(he.logs,i.gte(a.actualGain.value,1)?a.currentAt.value:a.nextAt.value)," ",he.logs.displayName])])),visibility:()=>p(i.lt(s.value,100)||v.elfTraining.expandersElfTraining.milestones[2].earned.value),canClick:()=>i.gte(he.logs.value,a.nextAt.value)&&(i.lt(s.value,100)||v.elfTraining.expandersElfTraining.milestones[2].earned.value),onClick(){!m(this.canClick)||a.convert()},style:"width: 600px; min-height: unset"})),r=en(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{I.canClick.value&&I.onClick()}})),d=b(()=>!Ye.milestones[6].earned.value),u=X(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>i.gte(s.value,1),showPopups:d})),c=X(()=>({display:{requirement:"10% Foundation Completed",effectDisplay:"Cut an additional tree per second for each 5% of foundation completed"},shouldEarn:()=>i.gte(s.value,10),visibility:()=>p(u.earned.value),showPopups:d})),j=X(()=>({display:{requirement:"20% Foundation Completed",effectDisplay:"Plant an additional tree per second for each 10% of foundation completed"},shouldEarn:()=>i.gte(s.value,20),visibility:()=>p(c.earned.value),showPopups:d})),h=X(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>i.gte(s.value,30),visibility:()=>p(j.earned.value),showPopups:d})),W=X(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>i.gte(s.value,40),visibility:()=>p(h.earned.value),showPopups:d})),y=X(()=>({display:{requirement:"50% Foundation Completed",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>i.gte(s.value,50),visibility:()=>p(W.earned.value),showPopups:d})),N=X(()=>({display:{requirement:"75% Foundation Completed",effectDisplay:"The forest gains an extra tree for every 2% of foundation completed"},shouldEarn:()=>i.gte(s.value,75),visibility:()=>p(y.earned.value),showPopups:d})),x=X(()=>({display:{requirement:"100% Foundation Completed",effectDisplay:"Log per tree is raised to the 1.2th power"},shouldEarn:()=>i.gte(s.value,100),visibility:()=>p(N.earned.value),showPopups:d})),M=X(()=>({display:{requirement:"200% Foundation Completed",effectDisplay:"The 1% milestone is now +2% and multiplicative"},shouldEarn:()=>i.gte(s.value,200),visibility:()=>p(x.earned.value&&v.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),ne=X(()=>({display:{requirement:"400% Foundation Completed",effectDisplay:"Gain +10% metal for every 10% foundation completed"},shouldEarn:()=>i.gte(s.value,400),visibility:()=>p(M.earned.value&&v.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),Y=X(()=>({display:{requirement:"600% Foundation Completed",effectDisplay:"Gain +10% oil for every 10% foundation completed"},shouldEarn:()=>i.gte(s.value,600),visibility:()=>p(ne.earned.value&&v.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),g=X(()=>({display:{requirement:"800% Foundation Completed",effectDisplay:"Gain +10% plastic for every 10% foundation completed"},shouldEarn:()=>i.gte(s.value,800),visibility:()=>p(Y.earned.value&&v.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),G=X(()=>({display:{requirement:"1000% Foundation Completed",effectDisplay:"Double paper, boxes, and all cloth actions"},shouldEarn:()=>i.gte(s.value,1e3),visibility:()=>p(g.earned.value&&v.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),P={logGainMilestone1:u,autoCutMilestone1:c,autoPlantMilestone1:j,autoCutMilestone2:h,autoPlantMilestone2:W,logGainMilestone2:y,morePlantsMilestone1:N,logGainMilestone3:x,extraExpansionMilestone1:M,extraExpansionMilestone2:ne,extraExpansionMilestone3:Y,extraExpansionMilestone4:g,extraExpansionMilestone5:G},{collapseMilestones:E,display:D}=sn(P),Ze=al(()=>({direction:Ue.Right,width:600,height:25,fillStyle:`backgroundColor: ${n}`,progress:()=>L.day.value===mn?i.div(s.value,100):1,display:f(()=>L.day.value===mn?t(O,null,[me(s.value),o("%")]):"")}));return Di(()=>{L.day.value===mn&&i.gte(s.value,100)&&L.completeDay()}),{name:e,day:mn,color:l,foundationProgress:s,foundationConversion:a,milestones:P,collapseMilestones:E,minWidth:700,buildFoundationHK:r,display:f(()=>t(O,null,[t("div",null,[L.day.value===mn?"Complete the foundation to complete the day":`${e} Complete!`]),We(Ze),t(ge,null,null),t("div",null,[t("span",null,[o("The foundation is ")]),t("h2",{style:`color: ${l}; text-shadow: 0 0 10px ${l}`},[me(s.value)]),o("% completed")]),i.lt(s.value,100)||v.elfTraining.expandersElfTraining.milestones[2].earned.value?t(ge,null,null):null,We(I),t(ge,null,null),D()])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),K(s.value),o(" "),s.displayName]))}}),Mm="plastic",vs=10,ri=Ai(Mm,function(){const e="Plastic",l="#DCD9CD",n=fi(0,"plastic"),[s,a]=ol(()=>[{title:"Plastic Gain",modifier:ke,base:0}]),I=se(!1),r=f(()=>t(Gi,{modelValue:I.value,"onUpdate:modelValue":je=>I.value=je},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:s})),d=Se(0),u=b(()=>i.times(d.value,100).times(v.elfTraining.oilElfTraining.milestones[3].earned.value?5:1)),c=He(()=>({resource:ci.metal,cost(){const je=new i(this.amount.value);let U=i.pow(1.2,je).times(1e7);return v.elfTraining.fertilizerElfTraining.milestones[3].earned.value&&(U=i.sub(U,i.pow(n.value,2)).max(0)),U},display:f(()=>t(O,null,[t("h3",null,[o("Refinery")]),t("br",null,null),o("Refines oil into plastic pellets"),t("br",null,null),o("Consumes 100 oil/s to create 1 plastic/s"),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),K(u.value),o(" oil/sec"),t("br",null,null),o("+"),K(d.value),o(" plastic/sec"),t("br",null,null),t("br",null,null),o("Cost: "),me(m(c.cost))," ",c.resource.displayName])),onPurchase(){d.value=i.add(d.value,1)},style:{width:"300px"}})),{min:j,max:h,add:W,remove:y}=bl({buyable:c,active:d,style:{minHeight:"20px",width:"40px",color:"var(--feature-foreground)"}}),N=b(()=>i.pow(5,i.add([...Object.values(Y),...Object.values(E)].filter(je=>je.bought.value).length,2))),x=T(()=>({resource:Q(n),cost:N,display:()=>({title:"Plastic Scissors",description:"Unlock paper upgrades",showCost:!x.bought.value})})),M=T(()=>({resource:Q(n),cost:N,display:()=>({title:"Plastic Level",description:"Unlock box upgrades",showCost:!M.bought.value})})),ne=T(()=>({resource:Q(n),cost:N,display:()=>({title:"Plastic Cane",description:"Unlock cloth upgrades",showCost:!ne.bought.value})})),Y={paperTools:x,boxTools:M,clothTools:ne},g=T(()=>({resource:Q(n),cost:N,visibility:()=>p(x.bought.value),display:()=>({title:"Paper Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!g.bought.value})})),G=T(()=>({resource:Q(n),cost:N,visibility:()=>p(M.bought.value),display:()=>({title:"Box Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!G.bought.value})})),P=T(()=>({resource:Q(n),cost:N,visibility:()=>p(ne.bought.value),display:()=>({title:"Cloth Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!P.bought.value})})),E={paperElf:g,boxElf:G,clothElf:P},D=He(()=>({resource:Q(n),cost(){const je=this.amount.value;return i.pow(1.3,je).times(100)},visibility:()=>p(g.bought.value),display:{title:"Plastic Printing Press",description:"Gain +1% of your paper gain per second",effectDisplay:f(()=>t(O,null,[me(D.amount.value),o("%")])),showAmount:!1}})),Ze=He(()=>({resource:Q(n),cost(){const je=this.amount.value;return i.pow(1.3,je).times(100)},visibility:()=>p(G.bought.value),display:{title:"Plastic Box Folder",description:"Gain +1% of your box gain per second",effectDisplay:f(()=>t(O,null,[me(Ze.amount.value),o("%")])),showAmount:!1}})),Ve=He(()=>({resource:Q(n),cost(){const je=this.amount.value;return i.pow(1.3,je).times(100)},visibility:()=>p(P.bought.value),display:{title:"Plastic Shepherd",description:"All cloth actions are +10% more efficient",effectDisplay:f(()=>t(O,null,[me(i.times(Ve.amount.value,10)),o("%")])),showAmount:!1}})),Fe={passivePaper:D,passiveBoxes:Ze,clothGains:Ve},ke=oe(()=>[ye(()=>({addend:()=>v.elfTraining.oilElfTraining.milestones[3].earned.value?i.times(d.value,5):d.value,description:"Oil Refinery",enabled:()=>i.gt(d.value,0)})),Z(()=>({multiplier:2,description:"Paper Elf Recruitment",enabled:g.bought})),Z(()=>({multiplier:2,description:"Box Elf Recruitment",enabled:G.bought})),Z(()=>({multiplier:2,description:"Cloth Elf Recruitment",enabled:P.bought})),Z(()=>({multiplier:2,description:"Carry plastic in boxes",enabled:ii.row2Upgrades.plasticUpgrade.bought})),Z(()=>({multiplier:()=>ae.oilEffectiveness.value,description:"Effectiveness",enabled:()=>i.lt(ae.oilEffectiveness.value,1)})),Z(()=>({multiplier:ve.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>i.gte(ve.dyes.yellow.amount.value,1)})),Z(()=>({multiplier:()=>i.div(Ii.foundationProgress.value,10).floor().div(10).add(1),description:"800% Foundation Completed",enabled:Ii.milestones.extraExpansionMilestone4.earned})),Z(()=>({multiplier:()=>i.add(ae.buildExtractor.amount.value,1).pow(1.25),description:"Snowball Level 4",enabled:v.elfTraining.kilnElfTraining.milestones[3].earned}))]),ce=b(()=>ke.apply(0));ui.on("update",je=>{i.lt(L.day.value,vs)||(n.value=i.times(je,ce.value).add(n.value))});const{total:Pe,trackerDisplay:Re}=Jl({resource:n,goal:25e4,name:e,day:vs,color:l,textColor:"var(--feature-foreground)",modal:{show:I,display:r}});return{name:e,color:l,plastic:n,totalPlastic:Pe,buildRefinery:c,activeRefinery:d,oilCost:u,upgrades:Y,elfUpgrades:E,buyables:Fe,generalTabCollapsed:a,minWidth:700,display:f(()=>t(O,null,[We(Re),t(ge,null,null),t(Qi,{resource:n,color:l,style:"margin-bottom: 0",effectDisplay:i.gt(ce.value,0)?`+${K(ce.value)}/s`:void 0},null),t(ge,null,null),t(Bi,null,{default:()=>[We(c),t("div",null,[me(i.floor(d.value)),o("/"),me(i.floor(c.amount.value))]),di(j,y,W,h)]}),t(nn,null,{default:()=>[tl(x,g,D),tl(M,G,Ze),tl(ne,P,Ve)]})])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),K(n.value),o(" "),n.displayName]))}}),xm="oil",Ln=9,ae=Ai(xm,function(){const e="Oil",l="#000000",n="var(--foreground)",s=fi(0,"oil"),a=fi(0,"depth"),I=Se(0),r=b(()=>i.lt(a.value,990)?i.add(10,a.value):i.pow(1.001,i.sub(a.value,990)).mul(1e3));function d(){if(i.lt(a.value,990)){const H=i.min(i.affordArithmeticSeries(I.value,10,1,a.value),i.sub(990,a.value)),le=i.sumArithmeticSeries(H,10,1,a.value);I.value=i.sub(I.value,le),a.value=i.add(a.value,H)}if(i.gte(a.value,990)){const H=i.affordGeometricSeries(I.value,1e3,1.001,i.sub(a.value,990)),le=i.sumGeometricSeries(H,1e3,1.001,i.sub(a.value,990));I.value=i.sub(I.value,le),a.value=i.add(a.value,H)}}const u=Se(0),c=b(()=>i.times(i.pow(u.value,ne.value).pow(v.elfTraining.coalDrillElfTraining.milestones[0].earned.value?2.5:2),1e14)),j=b(()=>i.times(i.pow(u.value,ne.value),1)),h=He(()=>({resource:ci.metal,cost(){let H=new i(this.amount.value);return i.gte(H,100)&&(H=i.pow(H,4).div(100**3)),H=i.pow(.95,F.books.heavyDrillBook.totalAmount.value).times(H),i.pow(1.3,H).times(25e3)},inverseCost(H){let le=i.div(H,25e3).log(1.3);return le=le.div(i.pow(.95,F.books.heavyDrillBook.totalAmount.value)),i.gte(le,100)&&(le=i.mul(le,100**3).root(4)),i.isNaN(le)?i.dZero:le.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Heavy Drill")]),t("br",null,null),o("A large drill specialized at deep mining."),t("br",null,null),o("Consumes 1e14*(Heavy Drills amount)"),t("sup",null,[v.elfTraining.coalDrillElfTraining.milestones[0].earned.value?2.5:2])," ",o("coal/sec for (Heavy Drills amount) drill power."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),Me(c.value),o(" coal/sec"),t("br",null,null),o("+"),Me(j.value),o(" drill power"),t("br",null,null),t("br",null,null),o("Cost: "),xe(m(h.cost)),o(" "),h.resource.displayName])),onPurchase(){u.value=i.add(u.value,1)},style:{color:n,width:"160px",flexGrow:1}})),{min:W,max:y,add:N,remove:x}=bl({buyable:h,active:u}),M=Se(0),ne=b(()=>{let H=i.add(M.value,Math.E);return v.elfTraining.heavyDrillElfTraining.milestones[3].earned.value?H=H.log(2.5):H=H.ln(),H}),Y=He(()=>({resource:ci.metal,cost(){let H=new i(this.amount.value);return i.gte(H,50)&&(H=i.pow(H,4).div(50**3)),H=i.pow(.95,F.books.heavyDrillBook.totalAmount.value).times(H),i.pow(2,H).times(1e5)},inverseCost(H){let le=i.div(H,1e5).log(2);return le=le.div(i.pow(.95,F.books.heavyDrillBook.totalAmount.value)),i.gte(le,50)&&(le=i.mul(le,50**3).root(4)),i.isNaN(le)?i.dZero:le.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Heavy Drill Drill")]),t("br",null,null),o("Attach extra drills to Heavy Drills to make them faster"),t("br",null,null),o("Raise amount of effective Heavy Drills by ^"),v.elfTraining.heavyDrillElfTraining.milestones[3].earned.value?t(O,null,[o("log"),t("sub",null,[o("2.5")])]):t(O,null,[o("ln")]),o("(Heavy Drill Drill amount + e)."),t("br",null,null),o("(also affects coal consumption)."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("^"),Me(ne.value),o(" Heavy Drill amount"),t("br",null,null),t("br",null,null),o("Cost: "),xe(m(Y.cost)),o(" "),Y.resource.displayName])),onPurchase(){M.value=i.add(M.value,1)},style:{color:n,width:"160px",flexGrow:1}})),{min:g,max:G,add:P,remove:E}=bl({buyable:Y,active:M}),D=Se(0),Ze=b(()=>i.pow(1/3,D.value)),Ve=b(()=>i.pow(2,D.value)),Fe=b(()=>i.pow(1.2,D.value)),ke=He(()=>({resource:ci.metal,cost(){let H=new i(this.amount.value);return i.gte(H,10)&&(H=i.pow(H,4).div(10**3)),H=i.pow(.95,F.books.heavyDrillBook.totalAmount.value).times(H),i.pow(8,H).times(2e5)},inverseCost(H){let le=i.div(H,2e5).log(8);return le=le.div(i.pow(.95,F.books.heavyDrillBook.totalAmount.value)),i.gte(le,10)&&(le=i.mul(le,10**3).root(4)),i.isNaN(le)?i.dZero:le.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Heavy Extractor")]),t("br",null,null),o("Attach extractors to the drill to mine coal and ore, but with a price."),t("br",null,null),o("Divides drill power by 3 to multiply coal gain by 2 and ore gain by 1.2."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("\xD7"),tn(Ze.value),o(" drill power"),t("br",null,null),o("\xD7"),Me(Ve.value),o(" coal/sec"),t("br",null,null),o("\xD7"),Me(Fe.value),o(" ore/sec"),t("br",null,null),t("br",null,null),o("Cost: "),xe(m(ke.cost))," ",ke.resource.displayName])),onPurchase(){D.value=i.add(D.value,1)},style:{color:n,width:"160px",flexGrow:1}})),{min:ce,max:Pe,add:Re,remove:je}=bl({buyable:ke,active:D}),U=Se(0),Ie=b(()=>i.pow(zi[3].bought.value?4:5,U.value)),$=b(()=>i.add(U.value,Tl.value).pow(2).mul(u.value).mul(i.add(M.value,1)).mul(D.value).mul(i.pow(a.value,v.elfTraining.oilElfTraining.milestones[0].earned.value?1.2:1)).div(1e5)),ze=He(()=>({resource:ci.metal,cost(){let H=new i(this.amount.value);i.gte(H,10)&&(H=i.pow(H,4).div(10**3)),H=i.pow(.95,F.books.oilBook.totalAmount.value).times(H);let le=i.pow(16,H).times(2e6);return zi[4].bought.value&&(le=le.div(i.add(vi.value,1).root(6))),v.elfTraining.heavyDrillElfTraining.milestones[1].earned.value&&(le=le.div(10)),le},inverseCost(H){v.elfTraining.heavyDrillElfTraining.milestones[1].earned.value&&(H=i.mul(H,10)),zi[4].bought.value&&(H=i.mul(H,i.add(vi.value,1).root(6)));let le=i.div(H,2e6).log(16);return le=le.div(i.pow(.95,F.books.oilBook.totalAmount.value)),i.gte(le,10)&&(le=i.mul(le,10**3).root(4)),i.isNaN(le)?i.dZero:le.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Oil Pump")]),t("br",null,null),o("Pump that oil from the ground."),t("br",null,null),o("Gain oil based on the number of Heavy buildings active and well depth, but coal usage is multiplied by "),zi[3].bought.value?4:5,o("\xD7."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("\xD7"),Me(Ie.value),o(" coal usage"),t("br",null,null),o("+"),Me($.value),o(" oil/sec"),t("br",null,null),t("br",null,null),o("Cost: "),xe(m(ze.cost)),o(" "),ze.resource.displayName])),onPurchase(){U.value=i.add(U.value,1)},style:{color:n,width:"160px",flexGrow:1}})),{max:Ne,min:Oi,add:qe,remove:$e}=bl({buyable:ze,active:U}),Ce=Se(0),Vi=b(()=>{let H=Ce.value;return v.elfTraining.heavyDrillElfTraining.milestones[2].earned.value&&(H=i.pow(H,1.5)),H}),Be=b(()=>i.pow(Vi.value,2)),te=b(()=>i.pow(Vi.value,3).mul(1e19)),A=b(()=>i.add(Vi.value,1)),B=He(()=>({resource:Q(s),cost(){let H=new i(this.amount.value);return i.gte(H,100)&&(H=i.pow(H,4).div(100**3)),H=i.pow(.95,F.books.oilBook.totalAmount.value).times(H),i.pow(2,H).times(50)},inverseCost(H){let le=i.div(H,50).log(2);return le=le.div(i.pow(.95,F.books.oilBook.totalAmount.value)),i.gte(le,100)&&(le=i.mul(le,100**3).root(4)),i.isNaN(le)?i.dZero:le.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Oil Burner")]),t("br",null,null),o("Burn oil as fuel."),t("br",null,null),o("(Oil Burner Amount)"),t("sup",null,[o("2")]),o(" unit of oil can give 1e19*(Oil Burner Amount)"),t("sup",null,[o("3")]),o(" units of coal."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),Me(Be.value),o(" oil/sec"),t("br",null,null),o("-"),Me(te.value),o(" coal consumption"),zi[2].bought.value?t(O,null,[t("br",null,null),o("\xD7"),Me(A.value),o(" to auto smelting multi")]):"",t("br",null,null),t("br",null,null),o("Cost: "),xe(m(B.cost)),o(" "),B.resource.displayName])),onPurchase(){Ce.value=i.add(Ce.value,1)},style:{color:n,width:"160px",flexGrow:1}})),{max:Ee,min:pe,add:oi,remove:Wi}=bl({buyable:B,active:Ce}),ki=Se(0),Ui=b(()=>i.pow(ki.value,2).mul(100)),pi=b(()=>i.add(ki.value,1)),De=He(()=>({resource:ci.metal,cost(){let H=new i(this.amount.value);i.gte(H,50)&&(H=i.pow(H,2).div(50)),i.gte(H,200)&&(H=i.pow(H,2).div(200)),i.gte(H,1e4)&&(H=i.pow(H,2).div(1e4)),H=i.pow(.95,F.books.oilBook.totalAmount.value).times(H);let le=i.pow(10,H).times(1e7);return zi[4].bought.value&&(le=le.div(i.add(vi.value,1).root(6))),le},inverseCost(H){zi[4].bought.value&&(H=i.mul(H,i.add(vi.value,1).root(6)));let le=i.div(H,1e7).log(10);return le=le.div(i.pow(.95,F.books.oilBook.totalAmount.value)),i.gte(le,100)&&(le=i.mul(le,100).root(4)),i.isNaN(le)?i.dZero:le.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Oil Smelter")]),t("br",null,null),o("Use oil as a crucible fuel."),t("br",null,null),o("Burn 100*(Oil Smelter amount)"),t("sup",null,[o("2")]),o(" oil to smelt +100% faster."),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),Me(Ui.value),o(" oil/sec"),t("br",null,null),o("\xD7"),Me(pi.value),o(" smelting speed"),t("br",null,null),t("br",null,null),o("Cost: "),xe(m(De.cost)),o(" "),De.resource.displayName])),onPurchase(){ki.value=i.add(ki.value,1)},style:{color:n,width:"160px",flexGrow:1}})),{max:_e,min:be,add:k,remove:ie}=bl({buyable:De,active:ki}),Qe=[X(()=>({display:{requirement:"5m Well Depth",effectDisplay:"Gain 25% more coal for each metre of well depth (after the 3 elf milestone)."},shouldEarn:()=>i.gte(a.value,5)})),X(()=>({display:{requirement:"10m Well Depth",effectDisplay:"Drill too slow? Unlock some drill upgrades!"},shouldEarn:()=>i.gte(a.value,10),visibility:()=>p(Qe[0].earned.value)})),X(()=>({display:{requirement:"25m Well Depth",effectDisplay:"Gain 5% more ore for each metre of well depth."},shouldEarn:()=>i.gte(a.value,25),visibility:()=>p(Qe[1].earned.value)})),X(()=>({display:{requirement:"60m Well Depth",effectDisplay:"Drill still too slow? Try unlocking another drill!"},shouldEarn:()=>i.gte(a.value,60),visibility:()=>p(Qe[2].earned.value)})),X(()=>({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:()=>i.gte(a.value,150),visibility:()=>p(Qe[3].earned.value)})),X(()=>({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:()=>i.gte(a.value,350),visibility:()=>p(Qe[4].earned.value)})),X(()=>({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:()=>i.gte(a.value,1e3),visibility:()=>p(i.gte(a.value,1e3))})),X(()=>({display:{requirement:"3,000m Well Depth",effectDisplay:"You found a large oil spot! Double oil gain!"},shouldEarn:()=>i.gte(a.value,3e3),visibility:()=>p(i.gte(a.value,2e3))}))],{collapseMilestones:Pi,display:si}=sn(Qe),Yi=[X(()=>({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:()=>i.gte(vi.value,100)})),X(()=>({display:{requirement:"500 total oil",effectDisplay:"Unlocks oil upgrades! These can be bought with oil."},shouldEarn:()=>i.gte(vi.value,500),visibility:()=>p(Yi[0].earned.value)})),X(()=>({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:()=>i.gte(vi.value,1e4),visibility:()=>p(Yi[1].earned.value)}))],{collapseMilestones:qi,display:ml}=sn(Yi),ei=[T(()=>({resource:_.coal,cost:1e18,display:{title:"Coal Drill Synergy",description:"Increase drill power by +4% per Coal Drill owned.",effectDisplay:f(()=>t(O,null,[o("x"),Me(Ni[0].value)]))},style:{color:n}})),T(()=>({resource:ci.metal,cost:15e4,display:{title:"Metal Drill Synergy",description:"Increase drill power by +4% per Metal Drill owned.",effectDisplay:f(()=>t(O,null,[o("x"),Me(Ni[1].value)]))},style:{color:n}})),T(()=>({resource:_.coal,cost:1e20,display:{title:"Coal Drill Upgrade",description:"Increase drill power by +6% per OoM of coal owned.",effectDisplay:f(()=>t(O,null,[o("x"),Me(Ni[2].value)]))},style:{color:n}})),T(()=>({resource:ci.metal,cost:15e5,display:{title:"Metal Drill Upgrade",description:"Increase drill power by +10% per OoM of metal ingot owned.",effectDisplay:f(()=>t(O,null,[o("x"),Me(Ni[3].value)]))},style:{color:n}})),T(()=>({resource:Q(s),cost:100,display:{title:"Drill Oil",description:"Increase previous upgrades' effect by +0.1% per Heavy Drill owned.",effectDisplay:f(()=>t(O,null,[o("+"),Me(i.mul(Ni[4].value,100)),o("%")]))},style:{color:n}}))],Ni=[b(()=>i.mul(_.buildDrill.amount.value,i.add(.04,bi.value)).add(1)),b(()=>i.mul(ci.oreDrill.amount.value,i.add(.04,bi.value)).add(1)),b(()=>i.mul(i.max(_.coal.value,1).log10().floor(),i.add(.06,bi.value)).add(1)),b(()=>i.mul(i.max(ci.metal.value,1).log10().floor(),i.add(.1,bi.value)).add(1)),b(()=>i.mul(h.amount.value,.001))],zi=[T(()=>({resource:Q(s),cost:100,display:{title:"Oil the Oil Pump",description:"Double oil gain."},style:{color:n}})),T(()=>({resource:Q(s),cost:500,display:{title:"Oil the Metal Drills",description:"Double ore mining speed and square the coal drill amount in its effect."},style:{color:n}})),T(()=>({resource:Q(s),cost:1500,display:{title:"Blaster Burner",description:"The Oil Burner can now increase your auto smelting multi."},style:{color:n}})),T(()=>({resource:Q(s),cost:25e3,display:{title:"Oil Integration",description:"Reduce Oil Pump's coal consumption multipler from 5 to 4"},style:{color:n}})),T(()=>({resource:Q(s),cost:5e4,display:{title:"Be One with the Oil",description:f(()=>t(O,null,[o("Divide metal ingot prices of oil buildings by "),t("sup",null,[o("6")]),t(Gl,null,{default:()=>[o("total oil + 1")]})]))},style:{color:n}}))],Il=[T(()=>({resource:Q(s),cost:1e11,display:{title:"Dye Synergy I",description:"Red dye boosts yellow dye gain *(log(x)^0.75)"},visibility:()=>p(v.elfTraining.oilElfTraining.milestones[4].earned.value),style:{color:n}})),T(()=>({resource:Q(s),cost:1e12,display:{title:"Orange-colored boxes",description:"Orange dye's 2nd effect is raised to the 2.5"},visibility:()=>p(v.elfTraining.oilElfTraining.milestones[4].earned.value),style:{color:n}})),T(()=>({resource:Q(s),cost:1e13,display:{title:"Colorful Focus",description:"Sum of secondary dyes increases max focus multiplier by cbrt(x)"},visibility:()=>p(v.elfTraining.oilElfTraining.milestones[4].earned.value),style:{color:n}})),T(()=>({resource:Q(s),cost:1e14,display:{title:"Dye Synergy II",description:"Blue dye boosts red dye gain *log(x)"},visibility:()=>p(v.elfTraining.oilElfTraining.milestones[4].earned.value),style:{color:n}})),T(()=>({resource:Q(s),cost:1e15,display:{title:"The Ultimate Metal Dye",description:"Sum of primary dyes boosts auto smelt speed"},visibility:()=>p(v.elfTraining.oilElfTraining.milestones[4].earned.value),style:{color:n}}))],Vl=oe(()=>[ye(()=>({addend:()=>i.negate(c.value),description:"Heavy Drill",enabled:()=>i.gt(u.value,0)})),Z(()=>({multiplier:Ie,description:"Oil Pump",enabled:()=>i.gt(U.value,0)})),ye(()=>({addend:z,description:"Oil to Coal Substitution",enabled:()=>i.gt(z.value,0)}))]),Wl=b(()=>Vl.apply(0)),vl=oe(()=>[ye(()=>({addend:j,description:"Heavy Drill",enabled:()=>i.gt(u.value,0)})),Z(()=>({multiplier:Ze,description:"Heavy Extractor",enabled:()=>i.gt(D.value,0)})),Z(()=>({multiplier:Ni[0],description:"Coal Drill Synergy",enabled:ei[0].bought})),Z(()=>({multiplier:Ni[1],description:"Metal Drill Synergy",enabled:ei[1].bought})),Z(()=>({multiplier:Ni[2],description:"Coal Drill Upgrade",enabled:ei[2].bought})),Z(()=>({multiplier:Ni[3],description:"Metal Drill Upgrade",enabled:ei[3].bought})),Z(()=>({multiplier:2,description:"Guide to drilling",enabled:F.upgrades.drillingUpgrade.bought})),Z(()=>({multiplier:()=>i.add(vi.value,1).log10().add(1),description:"Cocoa Level 2",enabled:v.elfTraining.oilElfTraining.milestones[1].earned})),Z(()=>({multiplier:2,description:"Cocoa Level 3",enabled:v.elfTraining.oilElfTraining.milestones[2].earned})),Z(()=>({multiplier:()=>fe.value,description:"Effectiveness",enabled:()=>i.lt(fe.value,1)}))]),re=b(()=>vl.apply(0)),Ae=oe(()=>[ye(()=>({addend:Ni[4],description:"Drill Oil",enabled:ei[4].bought}))]),bi=b(()=>Ae.apply(0)),Si=oe(()=>[ye(()=>({addend:$,description:"Oil Pump",enabled:()=>i.gt(U.value,0)})),Z(()=>({multiplier:2,description:"Oil the Oil Pump",enabled:zi[0].bought})),Z(()=>({multiplier:2,description:"3000m Well Depth",enabled:Qe[7].earned})),Z(()=>({multiplier:2,description:"Oil and where to find it",enabled:F.upgrades.oilUpgrade.bought})),Z(()=>({multiplier:()=>fe.value,description:"Effectiveness",enabled:()=>i.lt(fe.value,1)})),Z(()=>({multiplier:()=>i.div(Ii.foundationProgress.value,10).floor().div(10).add(1),description:"600% Foundation Completed",enabled:Ii.milestones.extraExpansionMilestone3.earned})),Z(()=>({multiplier:()=>i.sqrt(v.totalElfLevels.value),description:"Jack Level 4",enabled:v.elfTraining.heatedCutterElfTraining.milestones[3].earned})),Z(()=>({multiplier:()=>i.add(Y.amount.value,1).sqrt(),description:"Faith Level 4",enabled:v.elfTraining.bonfireElfTraining.milestones[3].earned})),Z(()=>({multiplier:2,description:"Cocoa Level 3",enabled:v.elfTraining.oilElfTraining.milestones[2].earned}))]),il=b(()=>Si.apply(0)),Ke=oe(()=>[ye(()=>({addend:()=>i.negate(Be.value),description:"Oil Burner",enabled:()=>i.gt(Ce.value,0)})),ye(()=>({addend:()=>i.negate(Ui.value),description:"Oil Smelter",enabled:()=>i.gt(ki.value,0)})),ye(()=>({addend:()=>i.negate(ri.oilCost.value),description:"Oil Refinery",enabled:()=>i.gt(ri.activeRefinery.value,0)}))]),mi=b(()=>Ke.apply(0)),J=oe(()=>[ye(()=>({addend:te,description:"Oil Burner",enabled:()=>i.gt(Ce.value,0)})),Z(()=>({multiplier:()=>ti.value,description:"Effectiveness",enabled:()=>i.lt(ti.value,1)}))]),z=b(()=>J.apply(0)),rl=oe(()=>[ye(()=>({addend:ve.boosts.red1,description:"Red Dye Boost 1",enabled:()=>i.gte(ve.dyes.red.amount.value,1)}))]),Tl=b(()=>rl.apply(0)),[dl,fl]=ol(()=>[{title:"Coal Consumption",modifier:Vl,unit:"/s",base:0},{title:"Drill Power",modifier:vl,base:0},{title:"Upgrade Bonus",modifier:Ae,base:0,visible(){return i.gt(bi.value,0)}},{title:"Oil Speed",modifier:Si,unit:"/s",base:0,visible(){return i.gt(il.value,0)}},{title:"Oil Consumption",modifier:Ke,unit:"/s",base:0,visible(){return i.lt(mi.value,0)}},{title:"Oil to Coal Substitution",modifier:J,unit:"/s",base:0,visible(){return i.gt(z.value,0)}},{title:"Extra Oil Pumps",modifier:rl,base:0,visible(){return i.gt(Tl.value,0)}}]),ll=se(!1),q=f(()=>t(Gi,{modelValue:ll.value,"onUpdate:modelValue":H=>ll.value=H},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:dl})),fe=se(i.dOne),ti=se(i.dOne);ui.on("update",H=>{if(i.lt(L.day.value,Ln))return;const le=i.negate(Wl.value);i.gt(le,0)?(fe.value=i.min(i.div(_.coal.value,le),1),_.coal.value=i.sub(_.coal.value,i.mul(le,fe.value).mul(H))):fe.value=i.dOne,I.value=i.add(I.value,i.mul(re.value,H)),s.value=i.add(s.value,i.mul(il.value,H)),d();const ul=i.negate(mi.value);i.gt(ul,0)?(ti.value=i.min(i.div(s.value,ul),1),s.value=i.sub(s.value,i.mul(ul,ti.value).mul(H)).max(0)):ti.value=i.dOne});const{total:vi,trackerDisplay:Ul}=Jl({resource:s,goal:25e4,name:e,day:Ln,color:l,modal:{show:ll,display:q}});return{name:e,day:Ln,color:l,oil:s,totalOil:vi,depth:a,drillProgress:I,activeHeavy:u,buildHeavy:h,activeHeavy2:M,buildHeavy2:Y,activeExtractor:D,buildExtractor:ke,activePump:U,buildPump:ze,activeBurner:Ce,effectiveBurners:Vi,buildBurner:B,activeSmelter:ki,buildSmelter:De,extractorCoal:Ve,extractorOre:Fe,coalEffectiveness:fe,oilEffectiveness:ti,depthMilestones:Qe,collapsedDepthMilestones:Pi,row1Upgrades:ei,row2Upgrades:zi,row3Upgrades:Il,minWidth:700,oilMilestones:Yi,collapsedOilMilestones:qi,generalTabCollapsed:fl,display:f(()=>{const H=[];return Qe[1].earned.value&&H.push(ei),Yi[1].earned.value&&H.push(zi),v.elfTraining.oilElfTraining.milestones[4].earned.value&&H.push(Il),t(O,null,[We(Ul),t(ge,null,null),i.lt(fe.value,1)?t("div",null,[o("Coal efficiency: "),Me(i.mul(fe.value,100)),o("%")]):null,i.lt(ti.value,1)?t("div",null,[o("Oil efficiency: "),Me(i.mul(ti.value,100)),o("%")]):null,t(Qi,{resource:s,color:l,resourceStyle:{textShadow:"grey 0px 0px 10px"},sticky:!0,productionDisplay:f(()=>t(O,null,[i.lt(a.value,1e3)?"Reach 1000m to start gaining oil":t(O,null,[wn(i.add(il.value,mi.value))])]))},null),i.eq(il.value,0)?t(O,null,[o("(Need at least 1 Oil Pump, 1 Heavy Drill and 1 Heavy Extractor active to gain oil)"),t("br",null,null)]):"",t(nn,null,{default:()=>[Qe[6].earned.value?t(Bi,null,{default:()=>[We(ze),t("div",null,[xe(i.floor(U.value)),o("/"),xe(i.floor(ze.amount.value))]),di(Oi,$e,qe,Ne)]}):null,Yi[0].earned.value?t(Bi,null,{default:()=>[We(B),t("div",null,[xe(i.floor(Ce.value)),o("/"),xe(i.floor(B.amount.value))]),di(pe,Wi,oi,Ee)]}):null,Yi[2].earned.value?t(Bi,null,{default:()=>[We(De),t("div",null,[xe(i.floor(ki.value)),o("/"),xe(i.floor(De.amount.value))]),di(be,ie,k,_e)]}):null]}),t("br",null,null),t("div",null,[t("span",null,[o("The well is ")]),t("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[xe(a.value)]),o("m deep"),t("br",null,null),o("Next at "),Me(i.sub(r.value,I.value))," ",o("drill power seconds")]),t("div",null,[t("span",null,[o("Your drill power is ")]),t("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[Me(re.value)])]),t(ge,null,null),t(nn,null,{default:()=>[t(Bi,null,{default:()=>[We(h),t("div",null,[xe(i.floor(u.value)),o("/"),xe(i.floor(h.amount.value))]),di(W,x,N,y)]}),Qe[3].earned.value?t(Bi,null,{default:()=>[We(Y),t("div",null,[xe(i.floor(M.value)),o("/"),xe(i.floor(Y.amount.value))]),di(g,E,P,G)]}):null,Qe[5].earned.value?t(Bi,null,{default:()=>[We(ke),t("div",null,[xe(i.floor(D.value)),o("/"),xe(i.floor(ke.amount.value))]),di(ce,je,Re,Pe)]}):null]}),t(ge,null,null),Yl(...H),t(ge,null,null),si(),i.gte(vi.value,50)?ml():""])}),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),Me(s.value),o(" "),s.displayName]))}}),Gm="metal",js=7,ci=Ai(Gm,function(){const e="Metal",l="#888B8D",n=fi(0,"metal ingots",void 0,!0),s=Zs(n),a=fi(0,"ore"),I=Zs(a),r=oe(()=>[Z(()=>({multiplier:5,description:"Crucible",enabled:Pe.bought})),Z(()=>({multiplier:1.5,description:"Industrial Crucible",enabled:()=>i.gte($.amount.value,1)})),Z(()=>({multiplier:2,description:"Industrial Furnace",enabled:je.bought})),Z(()=>({multiplier:()=>i.add(Oi.value,1),description:"Hotter Forges",enabled:()=>i.gte(Ne.amount.value,1)})),Z(()=>({multiplier:2,description:"Carry metal in boxes",enabled:ii.row2Upgrades.metalUpgrade.bought})),Z(()=>({multiplier:ve.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>i.gte(ve.dyes.purple.amount.value,1)})),Z(()=>({multiplier:()=>i.add(gi.cloth.value,1).log10().plus(1),description:"Glistening Paint",enabled:ve.upgrades.redDyeUpg.bought})),Z(()=>({multiplier:()=>i.div(Ii.foundationProgress.value,10).floor().div(10).add(1),description:"400% Foundation Completed",enabled:Ii.milestones.extraExpansionMilestone2.earned})),Z(()=>({multiplier:()=>i.add(ae.buildHeavy.amount.value,1).sqrt(),description:"Joy Level 4",enabled:v.elfTraining.smallfireElfTraining.milestones[3].earned})),Z(()=>({multiplier:()=>i.add(v.schools.amount.value,1),description:"Twinkle Level 1",enabled:v.elfTraining.metalElfTraining.milestones[0].earned})),nl(()=>({exponent:1.1,description:"Mary Level 2",enabled:v.elfTraining.heatedPlanterElfTraining.milestones[1].earned}))]),d=b(()=>r.apply(.1)),u=oe(()=>[ye(()=>({addend:()=>i.times($.amount.value,10),description:"Industrial Crucibles",enabled:()=>i.gte($.amount.value,1)})),nl(()=>({exponent:1.1,description:"Joy Level 5",enabled:v.elfTraining.smallfireElfTraining.milestones[4].earned})),nl(()=>({exponent:1.1,description:"Faith Level 5",enabled:v.elfTraining.bonfireElfTraining.milestones[4].earned})),nl(()=>({exponent:1.1,description:"Snowball Level 5",enabled:v.elfTraining.kilnElfTraining.milestones[4].earned})),Z(()=>({multiplier:2,description:"Efficient Crucibles",enabled:_.efficientSmelther.bought})),Z(()=>({multiplier:()=>i.mul(ae.activeSmelter.value,ae.oilEffectiveness.value).add(1),description:"Oil Smelter",enabled:()=>i.gt(ae.activeSmelter.value,0)})),Z(()=>({multiplier:ve.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>i.gte(ve.dyes.purple.amount.value,1)})),Z(()=>({multiplier:()=>i.add(ri.activeRefinery.value,1).sqrt(),description:"De Louvre",enabled:ve.upgrades.redDyeUpg2.bought})),Z(()=>({multiplier:()=>i.div(v.totalElfExp.value,1e6).add(1).sqrt(),description:"Mary Level 5",enabled:v.elfTraining.heatedPlanterElfTraining.milestones[4].earned})),Z(()=>({multiplier:()=>i.pow(1.25,v.elfTraining.metalElfTraining.level.value),description:"Twinkle Level 2",enabled:v.elfTraining.metalElfTraining.milestones[1].earned})),Z(()=>({multiplier:()=>i.add(ve.dyes.red.amount.value,ve.dyes.blue.amount.value).add(ve.dyes.yellow.amount.value).add(1).log10(),description:"The Ultimate Metal Dye",enabled:ae.row3Upgrades[4].bought}))]),c=b(()=>u.apply(0)),j=oe(()=>[Z(()=>({multiplier:3,description:"Efficient Crucibles",enabled:_.efficientSmelther.bought})),Z(()=>({multiplier:()=>i.add(ae.effectiveBurners.value,1).mul(ae.oilEffectiveness.value),description:"Oil Burner",enabled:ae.row2Upgrades[2].bought})),Z(()=>({multiplier:3,description:"Twinkle Level 3",enabled:v.elfTraining.metalElfTraining.milestones[2].earned}))]),h=b(()=>j.apply(1)),W=1e10,y=b(()=>i.min(a.value,i.div(_.coal.value,W)).floor().max(0)),N=Ei(()=>({display:f(()=>{const A=i.gte(y.value,1)?y.value:i.add(y.value,1);return t(O,null,[t("span",{style:"font-size: large"},[o("Smelt "),Me(i.times(y.value,d.value))," ",n.displayName]),t("br",null,null),t("span",{style:"font-size: large"},[o("Cost: "),xe(A),o(" "),a.displayName,o(";")," ",xe(i.times(A,W)),o(" "),_.coal.displayName])])}),canClick:()=>i.gte(y.value,1),onClick(){!m(this.canClick)||x(y.value)},style:{width:"600px",minHeight:"unset"}}));function x(A,B=1){const[Ee,pe,oi]=[i.times(A,d.value).times(B),A,i.times(A,W)];n.value=i.add(n.value,Ee),a.value=i.sub(a.value,pe),_.coal.value=i.sub(_.coal.value,oi)}const M=oe(()=>[ye(()=>({addend:()=>Ie.amount.value,description:"Metal Drills",enabled:()=>i.gte(Ie.amount.value,1)})),Z(()=>({multiplier:()=>i.mul(ae.depth.value,.05).add(1),description:"25m Well Depth",enabled:ae.depthMilestones[2].earned})),Z(()=>({multiplier:ae.extractorOre,description:"Heavy Extractor",enabled:()=>i.gt(ae.activeExtractor.value,0)})),Z(()=>({multiplier:2,description:"Carry ore in boxes",enabled:ii.row2Upgrades.oreUpgrade.bought}))]),ne=b(()=>M.apply(1)),Y=oe(()=>[Z(()=>({multiplier:2,description:"A Simple Pickaxe",enabled:ke.bought})),Z(()=>({multiplier:2,description:"Double Pickaxe",enabled:ce.bought})),Z(()=>({multiplier:2.5,description:"Metal Drills",enabled:()=>i.gte(Ie.amount.value,1)})),Z(()=>({multiplier:2,description:"Efficient Drills",enabled:U.bought})),Z(()=>({multiplier:2,description:"Oil the Metal Drills",enabled:ae.row2Upgrades[1].bought}))]),g=b(()=>Y.apply(i.recip(P))),G=Se(0),P=10,E=al(()=>({width:400,height:25,direction:Ue.Right,fillStyle:{backgroundColor:l},progress:()=>G.value})),D=oe(()=>[ye(()=>({addend:ne})),Z(()=>({multiplier:g}))]),Ze=b(()=>D.apply(0)),Ve=oe(()=>[ye(()=>({addend:Ze})),ye(()=>({addend:()=>i.negate(c.value),enabled:ze}))]),Fe=b(()=>Ve.apply(0)),ke=T(()=>({resource:Q(n),cost:.1,display:{title:"A Simple Pickaxe",description:"Make a simple pickaxe to help mine faster.
Halve the time to mine more ore"}})),ce=T(()=>({resource:Q(n),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:()=>p(ce.bought.value)})),Pe=T(()=>({resource:Q(n),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:()=>p(Pe.bought.value||i.div(I.value,d.value).plus(s.value).gte(1))})),Re=T(()=>({resource:Q(n),cost:0,display:{title:"Coal Drilling",description:"These metal drills are pretty powerful, mining more ore than you can actually smelt. Could be worth making some to mine coal instead"},visibility:()=>p(i.gte(Ie.amount.value,1)&&(Re.bought.value||L.days[7].opened.value||i.lt(_.computedCoalGain.value,i.times(ne.value,g.value).times(W)))),onPurchase(){L.days[2].recentlyUpdated.value=!0}})),je=T(()=>({canAfford(){return i.gte(n.value,50)&&i.gte(_.coal.value,1e11)},onPurchase(){n.value=i.sub(n.value,50),_.coal.value=i.sub(_.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 ${n.displayName} ${Me(1e11)} ${_.coal.displayName}`}})),U=T(()=>({resource:Q(n),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:()=>p(ae.depthMilestones[4].earned.value)})),Ie=He(()=>({resource:Q(n),cost(){let A=new i(this.amount.value);A=i.pow(.95,F.books.metalBook.totalAmount.value).times(A);let B=i.pow(1.15,A).times(10);return v.elfTraining.metalElfTraining.milestones[4].earned.value&&(B=i.div(B,i.add(ae.depth.value,1).sqrt())),v.elfTraining.metalElfTraining.milestones[3].earned.value&&(B=i.div(B,10)),B},inverseCost(A){v.elfTraining.metalElfTraining.milestones[3].earned.value&&(A=i.mul(A,10)),v.elfTraining.metalElfTraining.milestones[4].earned.value&&(A=i.mul(A,i.add(ae.depth.value,1).sqrt()));let B=i.div(A,10).log(1.15);return B=B.div(i.pow(.95,F.books.metalBook.totalAmount.value)),i.isNaN(B)?i.dZero:B.floor().max(0)},display:{title:"Metal Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:f(()=>t(O,null,[o("Mine 2.5x faster. Increase ore mining amount by")," ",xe(Ie.amount.value),o(" ore per operation")]))},visibility:()=>p(i.gte(Ie.amount.value,1)||i.div(I.value,d.value).plus(s.value).gte(10)),style:{width:"200px"}})),$=He(()=>({resource:Q(n),cost(){let A=new i(this.amount.value);A=i.pow(.95,F.books.metalBook.totalAmount.value).times(A);let B=i.pow(1.15,i.times(A,10)).times(10);return v.elfTraining.metalElfTraining.milestones[4].earned.value&&(B=i.div(B,i.add(ae.depth.value,1).sqrt())),v.elfTraining.metalElfTraining.milestones[3].earned.value&&(B=i.div(B,10)),B},inverseCost(A){v.elfTraining.metalElfTraining.milestones[3].earned.value&&(A=i.mul(A,10)),v.elfTraining.metalElfTraining.milestones[4].earned.value&&(A=i.mul(A,i.add(ae.depth.value,1).sqrt()));let B=i.div(A,10).log(1.15).div(10);return B=B.div(i.pow(.95,F.books.metalBook.totalAmount.value)),i.isNaN(B)?i.dZero:B.floor().max(0)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:f(()=>t(O,null,[o("Automatically smelts")," ",xe(i.times($.amount.value,10)),o(" ore per second")]))},visibility:()=>p(i.gte($.amount.value,1)||i.gte(Ie.amount.value,4)||i.gte(I.value,50)),style:{width:"200px"}})),ze=Se(!0),Ne=He(()=>({resource:_.coal,cost(){let A=new i(this.amount.value);A=i.pow(.95,F.books.metalBook.totalAmount.value).times(A);let B=i.pow(10,A).times(1e12);return v.elfTraining.metalElfTraining.milestones[4].earned.value&&(B=i.div(B,i.add(ae.depth.value,1).sqrt())),v.elfTraining.metalElfTraining.milestones[3].earned.value&&(B=i.div(B,10)),B},inverseCost(A){v.elfTraining.metalElfTraining.milestones[3].earned.value&&(A=i.mul(A,10)),v.elfTraining.metalElfTraining.milestones[4].earned.value&&(A=i.mul(A,i.add(ae.depth.value,1).sqrt()));let B=i.div(A,1e12).log(10);return B=B.div(i.pow(.95,F.books.metalBook.totalAmount.value)),i.isNaN(B)?i.dZero:B.floor().max(0)},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:f(()=>t(O,null,[o("Gain "),xe(i.times(Oi.value,100)),o("% more metal per ore")]))},visibility:()=>p(i.gte(Ne.amount.value,1)||je.bought.value),style:{width:"200px"}})),Oi=b(()=>i.times(Ne.amount.value,.25));ui.on("update",A=>{G.value=i.times(A,g.value).plus(G.value);const B=G.value.trunc();G.value=G.value.minus(B),a.value=i.add(a.value,i.times(B,ne.value)),ze.value&&x(i.min(y.value,i.times(c.value,A)),h.value)});const[qe,$e]=ol(()=>[{title:"Auto Smelt Speed",modifier:u,base:0,unit:"/s",visible(){return i.gt($.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:j,base:1,visible(){return i.gt(h.value,1)}},{title:"Metal per Ore",modifier:r,base:.1},{title:"Ore per Mining Operation",modifier:M,base:1},{title:"Mining Speed",modifier:Y,base:.1,unit:"/s"}]),Ce=se(!1),Vi=f(()=>t(Gi,{modelValue:Ce.value,"onUpdate:modelValue":A=>Ce.value=A},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:qe})),{total:Be,trackerDisplay:te}=Jl({resource:n,goal:25e3,name:e,day:js,color:l,modal:{show:Ce,display:Vi}});return{name:e,day:js,color:l,ore:a,bestOre:I,oreProgress:G,metal:n,bestMetal:s,totalMetal:Be,simplePickaxe:ke,doublePickaxe:ce,crucible:Pe,coalDrill:Re,industrialFurnace:je,efficientDrill:U,oreDrill:Ie,industrialCrucible:$,autoSmeltEnabled:ze,hotterForge:Ne,generalTabCollapsed:$e,minWidth:700,display:f(()=>t(O,null,[We(te),t(ge,null,null),t(Qi,{resource:n,color:l,style:"margin-bottom: 0",sticky:!1,productionDisplay:f(()=>t(O,null,[ze.value&&i.gte($.amount.value,1)?`+${Fs([[c.value,"smelting speed"],[Ze.value,"ore gain"],[i.div(_.computedCoalGain.value,W),"coal gain"]],"/s",i.mul(d.value,h.value))}`:void 0]))},null),t(ge,null,null),We(N),i.gte($.amount.value,1)?t("div",{style:{width:"150px"}},[t(jl,{title:"Auto Smelt",modelValue:ze.value,"onUpdate:modelValue":A=>ze.value=A},null)]):void 0,t(ge,null,null),t(Qi,{resource:a,color:l,style:"margin-bottom: 0",sticky:!1,productionDisplay:f(()=>t(O,null,[ks(Fe.value)]))},null),t(ge,null,null),t("div",null,[o("Currently mining "),Me(ne.value),o(" ore every")," ",Me(i.recip(g.value)),o(" seconds")]),We(E),t(ge,null,null),di(ke,ce,Pe,Re,je,U),di(Ie,$,Ne)])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),Me(n.value),o(" "),n.displayName]))}}),Fm="elves",In=4,Ye=Ai(Fm,function(){const e="Elves",l="red",n="#911D21",a=al(()=>({direction:Ue.Right,width:600,height:25,fillStyle:`backgroundColor: ${n}`,progress:()=>L.day.value===In?i.div(_e.value,6).times(.8333333333333334).add(i.div(i.add(_.coal.value,1).log10(),i.log10(1e9)).clamp(0,1).div(6)):1,display:f(()=>L.day.value===In?i.lt(_e.value,6)?t(O,null,[me(_e.value),o("/6 elves")]):t(O,null,[me(_.coal.value),o("/"),me(1e9),o(" coal")]):"")})),I=wm(()=>({thingsToReset:[he,Ii,_],onReset(){const re=["warmerCutters","warmerPlanters","basicFertilizer","unlockBonfire","dedicatedCutters","dedicatedPlanters","betterFertilizer","unlockKiln","efficientSmelther","arsonistAssistance","refinedCoal","coloredFire"],Ae=re.map(bi=>_[bi].bought.value);setTimeout(()=>{ml.earned.value?(he.row1Upgrades.forEach(bi=>bi.bought.value=!0),he.row2Upgrades.forEach(bi=>bi.bought.value=!0)):k.earned.value&&(he.row1Upgrades[4].bought.value=!0,he.row2Upgrades[4].bought.value=!0),Yi.earned.value&&(Ii.foundationProgress.value=100),Ni.earned.value&&(re.forEach((bi,Si)=>_[bi].bought.value=Ae[Si]),_.warmerCutters.bought.value=!0,_.warmerPlanters.bought.value=!0,_.basicFertilizer.bought.value=!0,_.unlockBonfire.bought.value=!0,_.dedicatedCutters.bought.value=!0,_.dedicatedPlanters.bought.value=!0,_.betterFertilizer.bought.value=!0,_.unlockKiln.bought.value=!0,_.efficientSmelther.bought.value=!0,_.arsonistAssistance.bought.value=!0,_.refinedCoal.bought.value=!0,_.coloredFire.bought.value=!0)})}})),r=oe(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.cuttersBook.totalAmount.value,.1).add(1),description:"Now You're Logging!",enabled:()=>i.gt(F.books.cuttersBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),d=oe(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.plantersBook.totalAmount.value,.1).add(1),description:"The Man Who Planted Trees",enabled:()=>i.gt(F.books.plantersBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),u=oe(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.expandersBook.totalAmount.value,.1).add(1),description:"Logjam",enabled:()=>i.gt(F.books.expandersBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),c=oe(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.heatedCuttersBook.totalAmount.value,.1).add(1),description:"Fahrenheit 451",enabled:()=>i.gt(F.books.heatedCuttersBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),j=oe(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.heatedPlantersBook.totalAmount.value,.1).add(1),description:"Tillamook Burn Country",enabled:()=>i.gt(F.books.heatedPlantersBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),h=oe(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.fertilizerBook.totalAmount.value,.1).add(1),description:"The Garden Tree's Handbook",enabled:()=>i.gt(F.books.fertilizerBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),W=oe(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.smallFireBook.totalAmount.value,.1).add(1),description:"Firestarter",enabled:()=>i.gt(F.books.smallFireBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),y=oe(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.bonfireBook.totalAmount.value,.1).add(1),description:"An Arsonist's Guide to Writer's Homes in New England",enabled:()=>i.gt(F.books.bonfireBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),N=oe(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.kilnBook.totalAmount.value,.1).add(1),description:"Little Fires Everywhere",enabled:()=>i.gt(F.books.kilnBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),x=oe(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.paperBook.totalAmount.value,.1).add(1),description:"The Book Thief",enabled:()=>i.gt(F.books.paperBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),M=oe(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.boxBook.totalAmount.value,.1).add(1),description:"Not a box",enabled:()=>i.gt(F.books.boxBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),ne=oe(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.clothBook.totalAmount.value,.1).add(1),description:"Fuzzy Bee and Friends",enabled:()=>i.gt(F.books.clothBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),Y=oe(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.coalDrillBook.totalAmount.value,.1).add(1),description:"Drills and Mills",enabled:()=>i.gt(F.books.coalDrillBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),g=oe(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.heavyDrillBook.totalAmount.value,.1).add(1),description:"Deep in the Earth",enabled:()=>i.gt(F.books.heavyDrillBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),G=oe(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.oilBook.totalAmount.value,.1).add(1),description:"Burning the Midnight Oil",enabled:()=>i.gt(F.books.oilBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),P=oe(()=>[Z(()=>({multiplier:2,description:"6 Elves Trained",enabled:si.earned})),Z(()=>({multiplier:()=>i.times(F.books.metalBook.totalAmount.value,.1).add(1),description:"Physical Metallurgy",enabled:()=>i.gt(F.books.metalBook.totalAmount.value,0)})),Z(()=>({multiplier:2,description:"10 Elves Trained",enabled:ei.earned}))]),E=oe(()=>[Z(()=>({multiplier:1/0,description:"Dye",enabled:()=>!0}))]),[D,Ze]=ol(()=>[{title:"Holly Auto-Buy Frequency",modifier:r,base:10,unit:"/s",visible:De.cuttersElf.bought},{title:"Ivy Auto-Buy Frequency",modifier:d,base:10,unit:"/s",visible:De.plantersElf.bought},{title:"Hope Auto-Buy Frequency",modifier:u,base:10,unit:"/s",visible:De.expandersElf.bought},{title:"Jack Auto-Buy Frequency",modifier:c,base:10,unit:"/s",visible:De.heatedCuttersElf.bought},{title:"Mary Auto-Buy Frequency",modifier:j,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:W,base:10,unit:"/s",visible:De.smallFireElf.bought},{title:"Faith Auto-Buy Frequency",modifier:y,base:10,unit:"/s",visible:De.bonfireElf.bought},{title:"Snowball Auto-Buy Frequency",modifier:N,base:10,unit:"/s",visible:De.kilnElf.bought},{title:"Star Auto-Buy Frequency",modifier:x,base:10,unit:"/s",visible:De.paperElf.bought},{title:"Bell Auto-Buy Frequency",modifier:M,base:10,unit:"/s",visible:De.boxElf.bought},{title:"Gingersnap Auto-Buy Frequency",modifier:ne,base:10,unit:"/s",visible:De.clothElf.bought},{title:"Peppermint Auto-Buy Frequency",modifier:Y,base:10,unit:"/s",visible:v.elfTraining.expandersElfTraining.milestones[3].earned},{title:"Frosty Auto-Buy Frequency",modifier:g,base:10,unit:"/s",visible:v.elfTraining.cutterElfTraining.milestones[4].earned.value},{title:"Cocoa Auto-Buy Frequency",modifier:G,base:10,unit:"/s",visible:v.elfTraining.heatedCutterElfTraining.milestones[4].earned.value},{title:"Twinkle Auto-Buy Frequency",modifier:P,base:10,unit:"/s",visible:v.elfTraining.fertilizerElfTraining.milestones[4].earned}]),Ve=se(!1),Fe=f(()=>t(Gi,{modelValue:Ve.value,"onUpdate:modelValue":re=>Ve.value=re},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:D})),ke=b(()=>{let re=i.pow(i.sub(4,ji.boosts.jazzy1.value),_e.value).times(1e6);return i.gte(_e.value,9)&&(re=i.times(re,1e15)),i.gte(_e.value,12)&&(re=i.times(re,1e15)),re});function ce(re){var rl,Tl;const Ae=Se(0),bi=Se(0),Si=re.hasToggle?Se(!1):se(!0),il=b(()=>re.cooldownModifier.apply(10)),Ke=Fi((rl=re.canBuy)!=null?rl:!0),mi=Fi((Tl=re.buyMax)!=null?Tl:!1);function J(dl){if(z.bought.value&&m(Ke)){Ae.value=i.add(Ae.value,dl);const fl=i.recip(il.value);bi.value+=dl/fl.toNumber();let ll=i.div(Ae.value,fl).floor();Ae.value=i.sub(Ae.value,ll.mul(fl)),m(mi)&&(ll=i.dInf),(Tn(re.buyable)?re.buyable:[re.buyable]).forEach(q=>{var ti,vi;if(m(q.visibility)!==yi.Visible)return;const fe=i.min(i.sub(q.inverseCost((ti=q.resource)==null?void 0:ti.value),q.amount.value).add(1),ll);fe.lte(0)||(q.amount.value=i.add(q.amount.value,fe),ll=i.sub(ll,fe),(vi=re.onAutoPurchase)==null||vi.call(re,q,fe),ll.lte(0))})}}const z=T(()=>({...re,buyable:void 0,toggle:Si,buyProgress:Ae,update:J,resource:_.coal,cost:ke,computedAutoBuyCooldown:il,amountOfTimesDone:bi,name:re.name,display:()=>({title:re.name,description:f(()=>t(O,null,[re.description,z.bought.value||["Peppermint","Twinkle","Cocoa","Frosty"].includes(re.name)?null:t(O,null,[" ",o("Training this elf will require resetting all your progress from days 1-3.")]),z.bought.value&&re.hasToggle===!0?t(O,null,[t(jl,{title:re.toggleDesc,"onUpdate:modelValue":dl=>Si.value=dl,modelValue:Si.value},null)]):null])),showCost:!z.bought.value}),style:"width: 190px",onPurchase(){var dl;(dl=re.onPurchase)==null||dl.call(re),["Peppermint","Twinkle","Cocoa","Frosty"].includes(re.name)||I.reset()}}));return z}const Pe=ce({name:"Holly",description:"Holly will automatically purchase cutters you can afford, without actually spending any logs.",buyable:he.row1Buyables[0],cooldownModifier:r,buyMax:()=>v.elfTraining.cutterElfTraining.milestones[1].earned.value}),Re=ce({name:"Ivy",description:"Ivy will automatically purchase planters you can afford, without actually spending any logs.",buyable:he.row1Buyables[1],cooldownModifier:d,buyMax:()=>v.elfTraining.planterElfTraining.milestones[1].earned.value}),je=ce({name:"Hope",description:"Hope will automatically purchase forest expanders you can afford, without actually spending any logs.",buyable:he.row1Buyables[2],cooldownModifier:u,buyMax:()=>v.elfTraining.expandersElfTraining.milestones[1].earned.value}),U=[Pe,Re,je],Ie=ce({name:"Jack",description:"Jack will automatically purchase heated cutters you can afford, without actually spending any coal.",buyable:_.heatedCutters,cooldownModifier:c,buyMax:()=>v.elfTraining.heatedCutterElfTraining.milestones[2].earned.value}),$=ce({name:"Mary",description:"Mary will automatically purchase heated planters you can afford, without actually spending any coal.",buyable:_.heatedPlanters,cooldownModifier:j,buyMax:()=>v.elfTraining.heatedPlanterElfTraining.milestones[2].earned.value}),ze=ce({name:"Noel",description:"Noel will automatically purchase fertilized soil you can afford, without actually spending any ash.",buyable:_.moreFertilizer,cooldownModifier:h}),Ne=[Ie,$,ze],Oi=ce({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:_.buildFire,cooldownModifier:W,visibility:()=>p(ii.upgrades.logsUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased small fires",onAutoPurchase(re,Ae){Oi.toggle.value&&(_.activeFires.value=i.add(_.activeFires.value,Ae))},onPurchase(){L.days[4].recentlyUpdated.value=!0}}),qe=ce({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:_.buildBonfire,cooldownModifier:y,visibility:()=>p(ii.upgrades.ashUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased bonfires",onAutoPurchase(re,Ae){var Si;const bi=i.mul(m((Si=re.cost)!=null?Si:0),Ae);_.activeFires.value=i.sub(_.activeFires.value,bi).max(0),_.buildFire.amount.value=i.sub(_.buildFire.amount.value,bi).max(0),qe.toggle.value&&(_.activeBonfires.value=i.add(_.activeBonfires.value,Ae))},onPurchase(){L.days[4].recentlyUpdated.value=!0},canBuy:_.unlockBonfire.bought}),$e=ce({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:_.buildKiln,cooldownModifier:N,visibility:()=>p(ii.upgrades.coalUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased kilns",onAutoPurchase(re,Ae){$e.toggle.value&&(_.activeKilns.value=i.add(_.activeKilns.value,Ae))},onPurchase(){L.days[4].recentlyUpdated.value=!0},canBuy:_.unlockKiln.bought}),Ce=[Oi,qe,$e],Vi=ce({name:"Star",description:"Star will automatically purchase all books you can afford, without actually spending any paper.",buyable:Object.values(F.books),cooldownModifier:x,visibility:()=>p(ri.elfUpgrades.paperElf.bought.value)}),Be=ce({name:"Bell",description:"Bell will automatically purchase all box buyables you can afford, without actually spending any boxes.",buyable:[...Object.values(ii.buyables),...Object.values(ii.buyables2)],cooldownModifier:M,visibility:()=>p(ri.elfUpgrades.boxElf.bought.value)}),te=ce({name:"Gingersnap",description:"Gingersnap will automatically purchase all cloth buyables you can afford, without actually spending any resources.",buyable:[gi.buildPens,gi.betterShears,gi.fasterSpinning],cooldownModifier:ne,visibility:()=>p(ri.elfUpgrades.clothElf.bought.value)}),A=[Vi,Be,te],B=ce({name:"Peppermint",description:"Peppermint will automatically purchase all coal drills you can afford, without actually spending any resources.",buyable:_.buildDrill,cooldownModifier:Y,visibility:()=>p(v.elfTraining.expandersElfTraining.milestones[3].earned.value),hasToggle:!0,toggleDesc:"Activate auto-purchased coal drills",onAutoPurchase(re,Ae){B.toggle.value&&(_.activeDrills.value=i.add(_.activeDrills.value,Ae))}}),Ee=ce({name:"Frosty",description:"Frosty will automatically purchase all drill types in the oil section, without actually spending any resources.",buyable:[ae.buildHeavy,ae.buildHeavy2,ae.buildExtractor],cooldownModifier:g,visibility:()=>p(v.elfTraining.cutterElfTraining.milestones[4].earned.value),hasToggle:!0,toggleDesc:"Activate auto-purchased oil drills",onAutoPurchase(re,Ae){Ee.toggle.value&&(re===ae.buildHeavy?ae.activeHeavy.value=i.add(ae.activeHeavy.value,Ae):re===ae.buildHeavy2?ae.activeHeavy2.value=i.add(ae.activeHeavy2.value,Ae):re===ae.buildExtractor&&(ae.activeExtractor.value=i.add(ae.activeExtractor.value,Ae)))}}),pe=ce({name:"Cocoa",description:"Cocoa will automatically purchase all oil-using machines you can afford, without actually spending any resources.",buyable:[ae.buildPump,ae.buildBurner,ae.buildSmelter],cooldownModifier:G,visibility:()=>p(v.elfTraining.heatedCutterElfTraining.milestones[4].earned.value),hasToggle:!0,toggleDesc:"Activate auto-purchased oil-using machines",onAutoPurchase(re,Ae){Ee.toggle.value&&(re===ae.buildPump?ae.activePump.value=i.add(ae.activePump.value,Ae):re===ae.buildBurner?ae.activeBurner.value=i.add(ae.activeBurner.value,Ae):re===ae.buildSmelter&&(ae.activeSmelter.value=i.add(ae.activeSmelter.value,Ae)))}}),oi=[B,Ee,pe],Wi=ce({name:"Twinkle",description:"Twinkle will automatically purchase all metal buyables you can afford, without actually spending any resources.",buyable:[ci.oreDrill,ci.industrialCrucible,ci.hotterForge],cooldownModifier:P,visibility:()=>p(v.elfTraining.fertilizerElfTraining.milestones[4].earned.value)}),ki=[Wi],Ui=ce({name:"Carol",description:"Carol will automatically purchase all dyes you can afford, without actually spending any resources.",buyable:Object.values(ve.dyes).map(re=>re.buyable),cooldownModifier:E,visibility:()=>p(ji.milestones.unlockDyeElf.earned.value)}),pi=[Ui],De={cuttersElf:Pe,plantersElf:Re,expandersElf:je,heatedCuttersElf:Ie,heatedPlantersElf:$,fertilizerElf:ze,smallFireElf:Oi,bonfireElf:qe,kilnElf:$e,paperElf:Vi,boxElf:Be,clothElf:te,coalDrillElf:B,heavyDrillElf:Ee,oilElf:pe,metalElf:Wi,dyeElf:Ui},_e=b(()=>Object.values(De).filter(re=>re.bought.value).length),be=X(()=>({display:{requirement:"1 Elf Trained",effectDisplay:"Manual cutting and planting can happen twice as often for each trained elf"},shouldEarn:()=>i.gte(_e.value,1)})),k=X(()=>({display:{requirement:"2 Elves Trained",effectDisplay:"Research I & II aren't reset after training"},shouldEarn:()=>i.gte(_e.value,2),visibility:()=>p(be.earned.value)})),ie=X(()=>({display:{requirement:"3 Elves Trained",effectDisplay:"Coal gain is raised to the 1.25"},shouldEarn:()=>i.gte(_e.value,3),visibility:()=>p(k.earned.value)})),Qe=X(()=>({display:{requirement:"4 Elves Trained",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>i.gte(_e.value,4),visibility:()=>p(ie.earned.value)})),Pi=X(()=>({display:{requirement:"5 Elves Trained",effectDisplay:"Forest is twice as large"},shouldEarn:()=>i.gte(_e.value,5),visibility:()=>p(Qe.earned.value)})),si=X(()=>({display:{requirement:"6 Elves Trained",effectDisplay:"Elves work twice as fast"},shouldEarn:()=>i.gte(_e.value,6),visibility:()=>p(Pi.earned.value)})),Yi=X(()=>({display:{requirement:"7 Elves Trained",effectDisplay:"Workshop Foundation starts at 100% complete after training"},shouldEarn:()=>i.gte(_e.value,7),visibility:()=>p(si.earned.value&&L.day.value>5)})),qi=X(()=>({display:{requirement:"8 Elves Trained",effectDisplay:"Forest is twice as large (again)"},shouldEarn:()=>i.gte(_e.value,8),visibility:()=>p(Yi.earned.value)})),ml=X(()=>({display:{requirement:"9 Elves Trained",effectDisplay:"Trees upgrades aren't reset after training"},shouldEarn:()=>i.gte(_e.value,9),visibility:()=>p(qi.earned.value)})),ei=X(()=>({display:{requirement:"10 Elves Trained",effectDisplay:"Elves work twice as fast (again)"},shouldEarn:()=>i.gte(_e.value,10),visibility:()=>p(L.day.value>=10)})),Ni=X(()=>({display:{requirement:"11 Elves Trained",effectDisplay:"Coal upgrades aren't reset after training"},shouldEarn:()=>i.gte(_e.value,11),visibility:()=>p(ei.earned.value)})),zi=X(()=>({display:{requirement:"12 Elves Trained",effectDisplay:"Double coal gain"},shouldEarn:()=>i.gte(_e.value,12),visibility:()=>p(Ni.earned.value)})),Il=[be,k,ie,Qe,Pi,si,Yi,qi,ml,ei,Ni,zi],Vl={manualMilestone:be,researchMilestone:k,coalGainMilestone:ie,logGainMilestone:Qe,forestMilestone:Pi,elvesMilestone:si,foundationMilestone:Yi,forestMilestone2:qi,treeUpgradesMilestone:ml,elvesMilestone2:ei,coalUpgradesMilestone:Ni,coalGainMilestone2:zi},{collapseMilestones:Wl,display:vl}=sn(Vl);return ui.on("update",re=>{i.lt(L.day.value,In)||Object.values(De).forEach(Ae=>Ae.update(re))}),Di(()=>{L.day.value===In&&i.gte(_e.value,6)&&i.gte(_.coal.value,1e9)&&L.completeDay()}),{name:e,color:l,elves:De,totalElves:_e,milestones:Il,collapseMilestones:Wl,generalTabCollapsed:Ze,minWidth:700,display:f(()=>t(O,null,[t("div",null,[L.day.value===In?`Reach ${me(6)} trained elves and ${me(1e9)} ${_.coal.displayName} to complete the day`:`${e} Complete!`," ",o("-")," ",t("button",{class:"button",style:"display: inline-block;",onClick:()=>Ve.value=!0},[o("Check Modifiers")])]),We(a),We(Fe),t(ge,null,null),t("div",{style:"width: 600px"},[Yl(U,Ne,Ce,A,oi,ki.concat(pi))]),vl()]))}}),km="coal",Js=3,_=Ai(km,function(){const e="Coal",l="#151716",n="#B2BeB5",s="var(--foreground)",a=fi(0,"coal"),I=fi(0,"ash"),r=Se(0),d=b(()=>i.times(r.value,1e3)),u=b(()=>i.times(r.value,.1)),c=b(()=>{let J=i.times(r.value,50);return v.elfTraining.smallfireElfTraining.milestones[0].earned.value&&(J=J.times(5)),J}),j=He(()=>({resource:he.logs,cost(){let J=i.times(G.amount.value,m(G.cost)).plus(this.amount.value);return i.gte(J,100)&&(J=i.pow(J,2).div(100)),i.gte(J,1e4)&&(J=i.pow(J,2).div(1e4)),J=i.pow(.95,F.books.smallFireBook.totalAmount.value).times(J),J.pow(1.5).times(1e4)},inverseCost(J){let z=i.div(J,1e4).root(1.5);return z=z.div(i.pow(.95,F.books.smallFireBook.totalAmount.value)),i.gte(z,1e4)&&(z=i.mul(z,1e4).root(2)),i.gte(z,100)&&(z=i.mul(z,100).root(2)),z=z.sub(i.times(G.amount.value,m(G.cost))),i.isNaN(z)?i.dZero:z.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Small Fire")]),t("br",null,null),o("Burn 1000 logs for 0.1 coal and 50 ash"),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),K(d.value),o(" logs/sec"),t("br",null,null),o("+"),K(u.value),o(" coal/sec"),t("br",null,null),o("+"),K(c.value),o(" ash/sec"),t("br",null,null),t("br",null,null),o("Cost: "),me(m(j.cost)),o(" "),j.resource.displayName])),onPurchase(){r.value=i.add(r.value,1)},style:{color:s,width:"160px"}})),{min:h,max:W,add:y,remove:N}=bl({active:r,buyable:j}),x=fi(j.amount,"small fires"),M=Se(0),ne=b(()=>i.times(M.value,1e4)),Y=b(()=>{let J=i.times(M.value,10);return v.elfTraining.bonfireElfTraining.milestones[0].earned.value&&(J=J.times(5)),J}),g=b(()=>{let J=i.times(M.value,1e3);return v.elfTraining.bonfireElfTraining.milestones[0].earned.value&&(J=J.times(5)),J}),G=He(()=>({resource:x,cost(){return i.pow(.95,F.books.bonfireBook.totalAmount.value).times(10)},inverseCost(J){return i.div(J,i.pow(.95,F.books.bonfireBook.totalAmount.value).times(10)).floor()},display:f(()=>t(O,null,[t("h3",null,[o("Bonfire")]),t("br",null,null),o("Burn 10,000 logs for 10 coal and 1000 ash"),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),K(ne.value),o(" logs/sec"),t("br",null,null),o("+"),K(Y.value),o(" coal/sec"),t("br",null,null),o("+"),K(g.value),o(" ash/sec"),t("br",null,null),t("br",null,null),o("Cost: "),me(m(G.cost)),o(" "),G.resource.displayName])),onPurchase(J){r.value=i.sub(r.value,J).max(0),M.value=i.add(M.value,1)},style:{color:s,width:"160px"},visibility:()=>p(A.bought.value)})),{min:P,max:E,add:D,remove:Ze}=bl({buyable:G,active:M}),Ve=Se(0),Fe=b(()=>i.times(Ve.value,1e6)),ke=b(()=>{let J=i.times(Ve.value,1e4);return v.elfTraining.kilnElfTraining.milestones[0].earned.value&&(J=J.times(5)),J}),ce=b(()=>{let J=i.times(Ve.value,1e4);return v.elfTraining.kilnElfTraining.milestones[0].earned.value&&(J=J.times(5)),J}),Pe=He(()=>({resource:he.logs,cost(){let J=this.amount.value;return i.gte(J,100)&&(J=i.pow(J,2).div(100)),i.gte(J,1e4)&&(J=i.pow(J,2).div(1e4)),J=i.pow(.95,F.books.kilnBook.totalAmount.value).times(J),i.pow(1.1,J).times(1e7)},inverseCost(J){let z=i.div(J,1e7).log(1.1);return z=z.div(i.pow(.95,F.books.kilnBook.totalAmount.value)),i.gte(z,1e4)&&(z=i.mul(z,1e4).root(2)),i.gte(z,100)&&(z=i.mul(z,100).root(2)),i.isNaN(z)?i.dZero:z.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Charcoal Kiln")]),t("br",null,null),o("Burn 1,000,000 logs for 10,000 coal and 10,000 ash"),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("-"),K(Fe.value),o(" logs/sec"),t("br",null,null),o("+"),K(ke.value),o(" coal/sec"),t("br",null,null),o("+"),K(ce.value),o(" ash/sec"),t("br",null,null),t("br",null,null),o("Cost: "),me(m(Pe.cost)),o(" "),Pe.resource.displayName])),onPurchase(){Ve.value=i.add(Ve.value,1)},style:{color:s,width:"160px"},visibility:()=>p(Wi.bought.value)})),{min:Re,max:je,add:U,remove:Ie}=bl({buyable:Pe,active:Ve}),$=Se(0),ze=b(()=>i.times(i.pow($.value,ae.row2Upgrades[1].bought.value?2:1),5e7).times(ci.efficientDrill.bought.value?2:1).times(v.elfTraining.smallfireElfTraining.milestones[2].earned.value?2:1).times(v.elfTraining.bonfireElfTraining.milestones[2].earned.value?2:1).times(v.elfTraining.kilnElfTraining.milestones[2].earned.value?2:1)),Ne=He(()=>({resource:ci.metal,cost(){let J=this.amount.value;i.gte(J,100)&&(J=i.pow(J,2).div(100)),i.gte(J,1e4)&&(J=i.pow(J,2).div(1e4)),J=i.pow(.95,F.books.coalDrillBook.totalAmount.value).times(J);let z=i.pow(1.15,J).times(10);return v.elfTraining.fertilizerElfTraining.milestones[2].earned.value&&(z=z.div(i.add(he.totalLogs.value,Math.E).ln())),v.elfTraining.coalDrillElfTraining.milestones[2].earned.value&&(z=z.div(10)),z},inverseCost(J){v.elfTraining.coalDrillElfTraining.milestones[2].earned.value&&(J=i.mul(J,10)),v.elfTraining.fertilizerElfTraining.milestones[2].earned.value&&(J=i.mul(J,i.add(he.totalLogs.value,Math.E).ln()));let z=i.div(J,10).log(1.15);return z=z.div(i.pow(.95,F.books.coalDrillBook.totalAmount.value)),i.gte(z,1e4)&&(z=i.mul(z,1e4).root(2)),i.gte(z,100)&&(z=i.mul(z,100).root(2)),i.isNaN(z)?i.dZero:z.floor().max(0)},display:f(()=>t(O,null,[t("h3",null,[o("Coal Drill")]),t("br",null,null),o("Dig through the ground to find 50,000,000 coal"),t("br",null,null),t("br",null,null),o("Currently:"),t("br",null,null),o("+"),K(ze.value),o(" coal/sec"),t("br",null,null),t("br",null,null),o("Cost: "),me(m(Ne.cost)),o(" "),Ne.resource.displayName])),onPurchase(){$.value=i.add($.value,1)},style:{color:s,width:"160px"},visibility:()=>p(ci.coalDrill.bought.value)})),{max:Oi,min:qe,add:$e,remove:Ce}=bl({buyable:Ne,active:$}),Vi=T(()=>({resource:Q(a),cost:5,display:{title:"Warmer Cutters",description:"Cut down twice as many trees/s"},style:{color:s}})),Be=T(()=>({resource:Q(a),cost:5,display:{title:"Warmer Planters",description:"Plant twice as many trees/s"},style:{color:s}})),te=T(()=>({resource:Q(I),cost:5e3,display:{title:"Ashy Soil",description:"Trees give 25% more logs"},style:{color:s}})),A=T(()=>({resource:x,cost:10,display:{title:"Bigger Fires",description:"Put all those fires together into a larger blaze"},onPurchase(){x.value=i.add(x.value,this.cost)},style:{color:s}})),B=[Vi,Be,te,A],Ee=T(()=>({resource:Q(a),cost:250,display:{title:"Dedicated Cutter Heaters",description:"Double the bonus from Heated Cutters"},style:{color:s},visibility:()=>p(A.bought.value)})),pe=T(()=>({resource:Q(a),cost:250,display:{title:"Dedicated Planter Heaters",description:"Double the bonus from Heated Planters"},style:{color:s},visibility:()=>p(A.bought.value)})),oi=T(()=>({canAfford(){return i.gte(he.logs.value,1e5)&&i.gte(I.value,1e5)},onPurchase(){he.logs.value=i.sub(he.logs.value,1e5),I.value=i.sub(I.value,1e5)},display:f(()=>t(O,null,[t("h3",null,[o("Mulched Soil")]),t("br",null,null),o("Double the bonus from Fertilized Soil"),t("br",null,null),t("br",null,null),o("Cost: "),me(1e5),o(" "),he.logs.displayName,t("br",null,null),me(1e5),o(" "),I.displayName])),style:{color:s},visibility:()=>p(A.bought.value)})),Wi=T(()=>({resource:he.logs,cost:1e7,display:{title:"Efficient Fires",description:"Move the fires underground to keep the coal from turning to ash"},style:{color:s},visibility:()=>p(A.bought.value)})),ki=[Ee,pe,oi,Wi],Ui=T(()=>({resource:Q(a),cost:1e19,display:{title:"Efficient Crucibles",description:"Double auto smelting speed and triple metal gain from auto smelting"},style:{color:s},visibility:()=>p(ae.depthMilestones[4].earned.value)})),pi=T(()=>({resource:Q(a),cost:1e45,display:{title:"Arsonist Assistance",description:"Every elf at or above level 5 doubles ash gain"},style:{color:s},visibility:()=>p(v.elfTraining.coalDrillElfTraining.milestones[3].earned.value)})),De=T(()=>({resource:Q(a),cost:1e50,display:{title:"Refined Coal",description:"Refineries boost coal gain"},style:{color:s},visibility:()=>p(v.elfTraining.coalDrillElfTraining.milestones[3].earned.value)})),_e=T(()=>({resource:Q(a),cost:1e55,display:{title:"Colored Fire",description:"Green dye also affects small fire synergy"},style:{color:s},visibility:()=>p(v.elfTraining.coalDrillElfTraining.milestones[3].earned.value)})),be=[Ui,pi,De,_e],k=He(()=>({resource:Q(a),cost(){let J=this.amount.value;return i.gte(J,50)&&(J=i.pow(J,2).div(50)),i.gte(J,200)&&(J=i.pow(J,2).div(200)),i.gte(J,2e6)&&(J=i.pow(J,2).div(2e6)),J=i.pow(.95,F.books.heatedCuttersBook.totalAmount.value).times(J),v.elfTraining.heatedCutterElfTraining.milestones[0].earned.value&&(J=i.pow(.95,F.books.heatedCuttersBook.totalAmount.value).times(J)),J=J.div(ji.boosts.rainbow1.value),i.add(J,1).pow(2.5).times(10)},inverseCost(J){let z=i.div(J,10).root(2.5).sub(1);return z=z.mul(ji.boosts.rainbow1.value),v.elfTraining.heatedCutterElfTraining.milestones[0].earned.value&&(z=z.div(i.pow(.95,F.books.heatedCuttersBook.totalAmount.value))),z=z.div(i.pow(.95,F.books.heatedCuttersBook.totalAmount.value)),i.gte(z,2e6)&&(z=i.mul(z,2e6).root(2)),i.gte(z,200)&&(z=i.mul(z,200).root(2)),i.gte(z,50)&&(z=i.mul(z,50).root(2)),i.isNaN(z)?i.dZero:z.floor().max(0)},display:{title:"Heated Cutters",description:"Even warmer cutters cut down trees faster",effectDisplay:f(()=>t(O,null,[o("Cutters cut down trees "),K(Yi.value),o("x faster")]))},style:{color:s},visibility:()=>p(Vi.bought.value)})),ie=He(()=>({resource:Q(a),cost(){let J=this.amount.value;return i.gte(J,50)&&(J=i.pow(J,2).div(50)),i.gte(J,200)&&(J=i.pow(J,2).div(200)),i.gte(J,2e6)&&(J=i.pow(J,2).div(2e6)),J=i.pow(.95,F.books.heatedPlantersBook.totalAmount.value).times(J),v.elfTraining.heatedPlanterElfTraining.milestones[0].earned.value&&(J=i.pow(.95,F.books.heatedPlantersBook.totalAmount.value).times(J)),J=J.div(ji.boosts.rainbow1.value),i.add(J,1).pow(2.5).times(10)},inverseCost(J){let z=i.div(J,10).root(2.5).sub(1);return z=z.mul(ji.boosts.rainbow1.value),v.elfTraining.heatedPlanterElfTraining.milestones[0].earned.value&&(z=z.div(i.pow(.95,F.books.heatedPlantersBook.totalAmount.value))),z=z.div(i.pow(.95,F.books.heatedPlantersBook.totalAmount.value)),i.gte(z,2e6)&&(z=i.mul(z,2e6).root(2)),i.gte(z,200)&&(z=i.mul(z,200).root(2)),i.gte(z,50)&&(z=i.mul(z,50).root(2)),i.isNaN(z)?i.dZero:z.floor().max(0)},display:{title:"Heated Planters",description:"Even warmer planters plant trees faster",effectDisplay:f(()=>t(O,null,[o("Planters plant trees "),K(ml.value),o("x faster")]))},style:{color:s},visibility:()=>p(Be.bought.value)})),Qe=He(()=>({resource:Q(I),cost(){let J=this.amount.value;return i.gte(J,50)&&(J=i.pow(J,2).div(50)),i.gte(J,200)&&(J=i.pow(J,2).div(200)),i.gte(J,2e6)&&(J=i.pow(J,2).div(2e6)),J=i.pow(.95,F.books.fertilizerBook.totalAmount.value).times(J),v.elfTraining.fertilizerElfTraining.milestones[1].earned.value&&(J=i.pow(.95,F.books.fertilizerBook.totalAmount.value).times(J)),J=J.div(ji.boosts.rainbow1.value),i.add(J,1).pow(1.5).times(5e4)},inverseCost(J){let z=i.div(J,5e4).root(1.5).sub(1);return z=z.mul(ji.boosts.rainbow1.value),v.elfTraining.fertilizerElfTraining.milestones[0].earned.value&&(z=z.div(i.pow(.95,F.books.fertilizerBook.totalAmount.value))),z=z.div(i.pow(.95,F.books.fertilizerBook.totalAmount.value)),i.gte(z,2e6)&&(z=i.mul(z,2e6).root(2)),i.gte(z,200)&&(z=i.mul(z,200).root(2)),i.gte(z,50)&&(z=i.mul(z,50).root(2)),i.isNaN(z)?i.dZero:z.floor().max(0)},display:{title:"Fertilized Soil",description:"More fertilizer helps trees grow bigger",effectDisplay:f(()=>t(O,null,[o("Trees give "),K(Ni.value),o("x more logs")]))},style:{color:s},visibility:()=>p(te.bought.value)})),Pi=[k,ie,Qe],si=oe(()=>[ye(()=>({addend(){return i.times(k.amount.value,.25)},description:"Heated Cutters",enabled(){return i.gt(k.amount.value,0)}})),Z(()=>({multiplier:2,description:"Dedicated Cutter Heaters",enabled:Ee.bought}))]),Yi=b(()=>si.apply(1)),qi=oe(()=>[ye(()=>({addend(){return i.times(ie.amount.value,.25)},description:"Heated Planters",enabled(){return i.gt(ie.amount.value,0)}})),Z(()=>({multiplier:2,description:"Dedicated Planter Heaters",enabled:pe.bought}))]),ml=b(()=>qi.apply(1)),ei=oe(()=>[ye(()=>({addend(){return i.times(Qe.amount.value,.25)},description:"Fertilized Soil",enabled(){return i.gt(Qe.amount.value,0)}})),Z(()=>({multiplier:2,description:"Mulched Soil",enabled:oi.bought}))]),Ni=b(()=>ei.apply(1)),zi=oe(()=>[ye(()=>({addend(){return u.value},description:"Small Fires",enabled(){return i.gt(r.value,0)}})),ye(()=>({addend(){return Y.value},description:"Bonfires",enabled(){return i.gt(M.value,0)}})),ye(()=>({addend(){return ke.value},description:"Charcoal Kilns",enabled(){return i.gt(Ve.value,0)}})),ye(()=>({addend(){return ze.value},description:"Coal Drills",enabled(){return i.gt($.value,0)}})),Z(()=>({multiplier:2,description:"Carry coal in boxes",enabled:ii.upgrades.coalUpgrade.bought})),Z(()=>({multiplier:()=>i.div(ii.buyables.coalBoxesBuyable.amount.value,2).add(1),description:"Carry more coal",enabled:ii.upgrades.coalUpgrade.bought})),Z(()=>({multiplier:()=>{let J=j.amount.value;v.elfTraining.smallfireElfTraining.milestones[0].earned.value&&(J=i.div(G.amount.value,10).add(J));let z=i.div(J,1e4).add(1);return _e.bought.value&&(z=i.add(z,ve.dyes.green.amount.value)),z},description:"Small Fires Synergy",enabled:Ye.elves.smallFireElf.bought})),Z(()=>({multiplier:()=>i.div(G.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Ye.elves.bonfireElf.bought})),Z(()=>({multiplier:()=>i.div(Pe.amount.value,100).times(ve.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:Ye.elves.kilnElf.bought})),Z(()=>({multiplier:2,description:"Mining overalls",enabled:gi.metalUpgrades.metalUpgrade2.bought})),Z(()=>({multiplier:3,description:"Mining helmet",enabled:gi.metalUpgrades.metalUpgrade3.bought})),Z(()=>({multiplier:4,description:"Felt-Gripped Pick",enabled:gi.metalUpgrades.metalUpgrade4.bought})),Z(()=>({multiplier:2,description:"12 Elves Trained",enabled:Ye.milestones[11].earned})),nl(()=>({exponent:1.25,description:"3 Elves Trained",enabled:Ye.milestones[2].earned,supportLowNumbers:!0})),Z(()=>({multiplier:()=>i.mul(ae.depth.value,.25).pow(v.elfTraining.coalDrillElfTraining.milestones[4].earned.value?1.5:1).add(1),description:"5m Well Depth",enabled:ae.depthMilestones[0].earned})),Z(()=>({multiplier:ae.extractorCoal,description:"Heavy Extractor",enabled:()=>i.gt(ae.activeExtractor.value,0)})),Z(()=>({multiplier:i.add(a.value,1).log10().add(1).sqrt(),description:"Peppermint Level 2",enabled:v.elfTraining.coalDrillElfTraining.milestones[1].earned})),Z(()=>({multiplier:i.add(ri.buildRefinery.amount.value,1).sqrt(),description:"Refined Coal",enabled:De.bought})),nl(()=>({exponent:1.05,description:"Jack Level 2",enabled:v.elfTraining.heatedCutterElfTraining.milestones[1].earned}))]),Il=b(()=>zi.apply(0)),Vl=oe(()=>[ye(()=>({addend(){return c.value},description:"Small Fires",enabled(){return i.gt(r.value,0)}})),ye(()=>({addend(){return g.value},description:"Bonfires",enabled(){return i.gt(M.value,0)}})),ye(()=>({addend(){return ce.value},description:"Charcoal Kilns",enabled(){return i.gt(Ve.value,0)}})),Z(()=>({multiplier:2,description:"Carry ash in boxes",enabled:ii.upgrades.ashUpgrade.bought})),Z(()=>({multiplier:()=>i.div(ii.buyables.ashBoxesBuyable.amount.value,2).add(1),description:"Carry more ash",enabled:ii.upgrades.ashUpgrade.bought})),Z(()=>({multiplier:()=>{let J=j.amount.value;return v.elfTraining.smallfireElfTraining.milestones[0].earned.value&&(J=i.div(G.amount.value,100).add(J)),i.div(J,1e3).add(1)},description:"Small Fires Synergy",enabled:Ye.elves.smallFireElf.bought})),Z(()=>({multiplier:()=>i.div(G.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Ye.elves.bonfireElf.bought})),Z(()=>({multiplier:()=>i.div(Pe.amount.value,100).times(ve.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:Ye.elves.kilnElf.bought})),Z(()=>({multiplier:4,description:"Mining boots",enabled:gi.metalUpgrades.metalUpgrade1.bought})),Z(()=>({multiplier:()=>i.pow(2,v.level5Elves.value),description:"Arson Assistance",enabled:pi.bought})),nl(()=>({exponent:1.1,description:"Joy Level 2",enabled:v.elfTraining.smallfireElfTraining.milestones[1].earned})),nl(()=>({exponent:1.1,description:"Faith Level 2",enabled:v.elfTraining.bonfireElfTraining.milestones[1].earned})),nl(()=>({exponent:1.1,description:"Snowball Level 2",enabled:v.elfTraining.kilnElfTraining.milestones[1].earned})),ye(()=>({addend:F.paper,description:"Paper Burning",enabled:F.upgrades2.ashUpgrade.bought}))]),Wl=b(()=>Vl.apply(0)),vl=oe(()=>[ye(()=>({addend(){return i.negate(d.value)},description:"Small Fires",enabled(){return i.gt(r.value,0)}})),ye(()=>({addend(){return i.negate(ne.value)},description:"Bonfires",enabled(){return i.gt(M.value,0)}})),ye(()=>({addend(){return i.negate(Fe.value)},description:"Charcoal Kilns",enabled(){return i.gt(Ve.value,0)}}))]),re=b(()=>vl.apply(0)),[Ae,bi]=ol(()=>[{title:"Log Consumption",modifier:vl,base:0,visible(){return i.gt(r.value,0)||i.gt(M.value,0)||i.gt(Ve.value,0)}},{title:"Coal Gain",modifier:zi,base:0,visible(){return i.gt(r.value,0)||i.gt(M.value,0)||i.gt(Ve.value,0)}},{title:"Ash Gain",modifier:Vl,base:0,visible(){return i.gt(r.value,0)||i.gt(M.value,0)||i.gt(Ve.value,0)}}]),Si=se(!1),il=f(()=>t(Gi,{modelValue:Si.value,"onUpdate:modelValue":J=>Si.value=J},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:Ae}));ui.on("update",J=>{i.lt(L.day.value,Js)||i.times(J,re.value).negate().gt(he.logs.value)||(he.logs.value=i.times(J,re.value).plus(he.logs.value),a.value=i.times(J,Il.value).plus(a.value),I.value=i.times(J,Wl.value).plus(I.value),r.value=i.max(r.value,0))});const{total:Ke,trackerDisplay:mi}=Jl({resource:a,goal:1e7,name:e,day:Js,color:l,modal:{show:Si,display:il}});return{name:e,color:l,coal:a,totalCoal:Ke,computedCoalGain:Il,ash:I,activeFires:r,buildFire:j,activeBonfires:M,buildBonfire:G,activeKilns:Ve,buildKiln:Pe,activeDrills:$,buildDrill:Ne,warmerCutters:Vi,warmerPlanters:Be,basicFertilizer:te,unlockBonfire:A,dedicatedCutters:Ee,dedicatedPlanters:pe,betterFertilizer:oi,unlockKiln:Wi,efficientSmelther:Ui,arsonistAssistance:pi,refinedCoal:De,coloredFire:_e,heatedCutters:k,heatedPlanters:ie,moreFertilizer:Qe,computedHeatedCutterEffect:Yi,computedHeatedPlanterEffect:ml,computedFertilizerEffect:Ni,generalTabCollapsed:bi,minWidth:700,display:f(()=>t(O,null,[We(mi),t(ge,null,null),t(Qi,{resource:a,color:l,style:{marginBottom:0},resourceStyle:{textShadow:"grey 0px 0px 10px"},effectDisplay:i.gt(Il.value,0)?`+${K(Il.value)}/s`:void 0},null),t(ge,null,null),t(Qi,{resource:I,color:n,style:"margin-bottom: 0",effectDisplay:i.gt(Wl.value,0)?`+${K(Wl.value)}/s`:void 0},null),t(ge,null,null),t(nn,null,{default:()=>[t(Bi,null,{default:()=>[We(j),t("div",null,[me(i.floor(r.value)),o("/"),me(i.floor(j.amount.value))]),di(h,N,y,W)]}),A.bought.value?t(O,null,[t(ge,null,null),t(Bi,null,{default:()=>[We(G),t("div",null,[me(M.value),o("/"),me(G.amount.value)]),di(P,Ze,D,E)]})]):void 0,Wi.bought.value?t(O,null,[t(ge,null,null),t(Bi,null,{default:()=>[We(Pe),t("div",null,[me(Ve.value),o("/"),me(Pe.amount.value)]),di(Re,Ie,U,je)]})]):void 0,ci.coalDrill.bought.value?t(O,null,[t(ge,null,null),t(Bi,null,{default:()=>[We(Ne),t("div",null,[me($.value),o("/"),me(Ne.amount.value)]),di(qe,Ce,$e,Oi)]})]):void 0]}),t(ge,null,null),Yl(B,ki,be),di(...Pi)])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),K(a.value),o(" "),a.displayName]))}});const zm="management",Pl=12,$i=13,v=Ai(zm,()=>{const e="Management",l="green",n=al(()=>({direction:Ue.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>L.day.value===Pl?De.reduce((q,fe)=>q+Math.min(1,fe.level.value/3),0)/De.length:L.day.value===$i&&L.days[$i-1].opened.value?_e.reduce((q,fe)=>q+Math.min(1,fe.level.value/5),0)/_e.length:1,display:f(()=>L.day.value===Pl||L.day.value===$i&&L.days[$i-1].opened.value?t(O,null,[me(i.times(m(n.progress),L.day.value===$i?80:36)),o("/"),L.day.value===$i?80:36,o(" elf levels")]):"")})),s=b(()=>{let q=0;for(const fe of Object.values(pi))q+=fe.level.value;return q}),a=b(()=>Object.values(pi).reduce((q,fe)=>q.add(fe.exp.value),new i(0))),I=b(()=>Object.values(pi).filter(q=>q.level.value>=5).length),r=T(()=>({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:he.logs,cost:1e21})),d=T(()=>({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?"},visibility:()=>p(r.bought.value),resource:ii.boxes,style:"width: 150px",cost:1e13})),u=T(()=>({display:{title:"Advanced Training",description:"Time for some advanced training! Now that all the elves know the basics, you have a foundation you can truly build off of. Everyone seems to be learning twice as quickly!"},visibility:()=>p(L.day.value>=$i&&L.days[$i-1].opened.value),resource:ii.boxes,style:"width: 150px",cost:1e25})),c=oe(()=>[Z(()=>({multiplier:z,description:"Classroom Effect",enabled:d.bought})),Z(()=>({multiplier:2,description:"Advanced Training",enabled:u.bought})),Z(()=>({multiplier:2,description:"Star Level 4",enabled:P[3].earned.value})),Z(()=>({multiplier:2,description:"Carry experience in boxes???",enabled:ii.row3Upgrades.xpUpgrade.bought}))]),j=b(()=>c.apply(1));function h(q,fe,...ti){const vi=Se(0);let Ul=["Holly","Ivy","Hope","Jack","Mary","Noel","Joy","Faith","Snowball","Star","Bell","Gingersnap","Peppermint","Frosty","Cocoa","Twinkle","Carol"].indexOf(q.name)+1;(q.name=="Star"||q.name=="Bell")&&(Ul/=3);const H=4e3*Ul,le=b(()=>i.pow(5,ul.value).mul(H)),ul=b(()=>i.affordGeometricSeries(vi.value,H,5,0).min(mi.amount.value).toNumber()),as=b(()=>i.sub(vi.value,i.sumGeometricSeries(ul.value,H,5,0))),ht=al(()=>({direction:Ue.Right,width:160,height:14,style:()=>({"margin-top":"8px",background:l,"box-shadow":ce.value==q.name?"0 0 12px black":k.value[q.name]?"0 0 12px white":""}),baseStyle:"margin-top: -1px",fillStyle:()=>({"margin-top":"-1px","transition-duration":"0s",background:"white",animation:k.value[q.name]?".5s focused-xp-bar linear infinite":""}),borderStyle:()=>i.gte(ul.value,mi.amount.value)?"border-color: red":"",progress:()=>i.div(as.value,le.value),display:f(()=>i.gte(ul.value,mi.amount.value)?t(O,null,[o("Limit reached")]):t(O,null,[K(as.value),o("/"),K(le.value),o(" XP")]))})),{collapseMilestones:Vt,display:Wt}=sn(fe),os=oe(()=>[Z(()=>({multiplier:j,description:"Global XP Multiplier"})),Z(()=>({multiplier:be,description:"Focus Multiplier",enabled:()=>i.gt(Qe.value,0)&&k.value[q.name]==!0})),...ti]),ms=b(()=>os.apply(.1));return Ei(()=>({display:{title:f(()=>t(O,null,[q.name,o(" - LV "),me(ul.value)])),description:f(()=>t(O,null,[q.name,o(" can buy buyables "),me(q.computedAutoBuyCooldown.value)," ",o("times per second, gaining")," ",i.gte(ul.value,mi.amount.value)?0:K(i.mul(ms.value,q.computedAutoBuyCooldown.value))," ",o("XP/sec."),We(ht)]))},style:()=>({width:"190px",background:ce.value==q.name?"var(--accent2)":""}),onClick(){ce.value=q.name},canClick(){return ce.value!==q.name},visibility:()=>p(q.bought.value),name:q.name,state:Vt,displayMilestone:Wt,level:ul,exp:vi,milestones:fe,timeForExp:q.computedAutoBuyCooldown,amountOfTimesDone:q.amountOfTimesDone,elfXPGainComputed:ms,elfXPGain:os}))}const W=[X(()=>({display:{requirement:"Holly Level 1",effectDisplay:f(()=>t(O,null,[o("Multiply log gain by "),t("sup",null,[o("9")]),t(Gl,null,{default:()=>[o("Cutter amount")]}),o(".")]))},shouldEarn:()=>Re.level.value>=1})),X(()=>({display:{requirement:"Holly Level 2",effectDisplay:"Holly now buys max."},visibility:()=>p(W[0].earned.value),shouldEarn:()=>Re.level.value>=2})),X(()=>({display:{requirement:"Holly Level 3",effectDisplay:f(()=>t(O,null,[o("Multiply all cloth actions' effectiveness by log"),t("sub",null,[o("10")]),o("(Cutter amount).")]))},visibility:()=>p(W[1].earned.value),shouldEarn:()=>Re.level.value>=3})),X(()=>({display:{requirement:"Holly Level 4",effectDisplay:"Multiply auto cutting amount by 1.1 per day completed"},visibility:()=>p(W[2].earned.value&&L.day.value>=13),shouldEarn:()=>Re.level.value>=4})),X(()=>({display:{requirement:"Holly Level 5",effectDisplay:"Unlock an elf that autobuys oil drills and extractors."},visibility:()=>p(W[3].earned.value&&L.day.value>=13),shouldEarn:()=>Re.level.value>=5}))],y=[X(()=>({display:{requirement:"Ivy Level 1",effectDisplay:"Planters are now twice as efficent."},shouldEarn:()=>je.level.value>=1})),X(()=>({display:{requirement:"Ivy Level 2",effectDisplay:"Ivy now buys max."},visibility:()=>p(y[0].earned.value),shouldEarn:()=>je.level.value>=2})),X(()=>({display:{requirement:"Ivy Level 3",effectDisplay:f(()=>t(O,null,[o("Auto planting speed is multiplied by 2"),t("sup",null,[o("(log"),t("sub",null,[o("10")]),o("(logs)"),t("sup",null,[o("0.2")]),o(")")])]))},visibility:()=>p(y[1].earned.value),shouldEarn:()=>je.level.value>=3})),X(()=>({display:{requirement:"Ivy Level 4",effectDisplay:"Divide planter cost by 10"},visibility:()=>p(y[2].earned.value&&L.day.value>=13),shouldEarn:()=>je.level.value>=4})),X(()=>({display:{requirement:"Ivy Level 5",effectDisplay:"The lesser of auto planting and cutting amounts is increased to match the greater"},visibility:()=>p(y[3].earned.value&&L.day.value>=13),shouldEarn:()=>je.level.value>=5}))],N=[X(()=>({display:{requirement:"Hope Level 1",effectDisplay:"Forest size grows by trees planted per second raised to ^0.99"},shouldEarn:()=>U.level.value>=1})),X(()=>({display:{requirement:"Hope Level 2",effectDisplay:"Hope now buys max."},visibility:()=>p(N[0].earned.value),shouldEarn:()=>U.level.value>=2})),X(()=>({display:{requirement:"Hope Level 3",effectDisplay:"The workshop can be expanded past 100%, but costs scale faster. It also buys max now."},visibility:()=>p(N[1].earned.value),shouldEarn:()=>U.level.value>=3})),X(()=>({display:{requirement:"Hope Level 4",effectDisplay:"Unlock an elf that autobuys coal drills."},visibility:()=>p(N[2].earned.value&&L.day.value>=13),shouldEarn:()=>U.level.value>=4})),X(()=>({display:{requirement:"Hope Level 5",effectDisplay:"Raise workshop expansion cost by 0.99"},visibility:()=>p(N[3].earned.value&&L.day.value>=13),shouldEarn:()=>U.level.value>=5}))],x=[X(()=>({display:{requirement:"Jack Level 1",effectDisplay:'"Fahrenheit 451" affects "Heated Cutters" twice.'},shouldEarn:()=>$.level.value>=1})),X(()=>({display:{requirement:"Jack Level 2",effectDisplay:"Coal gain is raised to the ^1.05"},visibility:()=>p(x[0].earned.value),shouldEarn:()=>$.level.value>=2})),X(()=>({display:{requirement:"Jack Level 3",effectDisplay:"Jack now buys max."},visibility:()=>p(x[1].earned.value),shouldEarn:()=>$.level.value>=3})),X(()=>({display:{requirement:"Jack Level 4",effectDisplay:f(()=>t(O,null,[o("Oil gain is multiplied by "),t(Gl,null,{default:()=>[o("total elf levels")]}),o(".")]))},visibility:()=>p(x[2].earned.value&&L.day.value>=13),shouldEarn:()=>$.level.value>=4})),X(()=>({display:{requirement:"Jack Level 5",effectDisplay:"Unlock an elf that autobuys oil-using machines."},visibility:()=>p(x[3].earned.value&&L.day.value>=13),shouldEarn:()=>$.level.value>=5}))],M=[X(()=>({display:{requirement:"Mary Level 1",effectDisplay:'"Tillamook Burn Country" affects "Heated Planters" twice.'},shouldEarn:()=>ze.level.value>=1})),X(()=>({display:{requirement:"Mary Level 2",effectDisplay:"Metal gain is raised to the 1.1."},visibility:()=>p(M[0].earned.value),shouldEarn:()=>ze.level.value>=2})),X(()=>({display:{requirement:"Mary Level 3",effectDisplay:"Mary now buys max."},visibility:()=>p(M[1].earned.value),shouldEarn:()=>ze.level.value>=3})),X(()=>({display:{requirement:"Mary Level 4",effectDisplay:"Double automatic tree planting speed"},visibility:()=>p(M[2].earned.value&&L.day.value>=13),shouldEarn:()=>ze.level.value>=4})),X(()=>({display:{requirement:"Mary Level 5",effectDisplay:f(()=>t(O,null,[o("Auto smelting speed is multiplied by "),t(Gl,null,{default:()=>[o("total XP/1e6")]}),o(".")]))},visibility:()=>p(M[3].earned.value&&L.day.value>=13),shouldEarn:()=>ze.level.value>=5}))],ne=[X(()=>({display:{requirement:"Noel Level 1",effectDisplay:f(()=>t(O,null,[o("Log gain is multiplied by "),t(Gl,null,{default:()=>[o("total elf levels")]}),o(".")]))},shouldEarn:()=>Ne.level.value>=1})),X(()=>({display:{requirement:"Noel Level 2",effectDisplay:`"The Garden Tree's Handbook" affects "Fertilized Soil" twice`},visibility:()=>p(ne[0].earned.value),shouldEarn:()=>Ne.level.value>=2})),X(()=>({display:{requirement:"Noel Level 3",effectDisplay:"Divide the coal drill cost by ln(Total logs + e)"},visibility:()=>p(ne[1].earned.value),shouldEarn:()=>Ne.level.value>=3})),X(()=>({display:{requirement:"Noel Level 4",effectDisplay:f(()=>t(O,null,[o("Reduce oil refinery cost by (Plastic amount)"),t("sup",null,[o("2")])]))},visibility:()=>p(ne[2].earned.value&&L.day.value>=13),shouldEarn:()=>Ne.level.value>=4})),X(()=>({display:{requirement:"Noel Level 5",effectDisplay:"Unlock an elf that autobuys metal buyables"},visibility:()=>p(ne[3].earned.value&&L.day.value>=13),shouldEarn:()=>Ne.level.value>=5}))],Y=[X(()=>({display:{requirement:"Joy Level 1",effectDisplay:"Small Fire synergy counts bonfires at reduced rate."},shouldEarn:()=>qe.level.value>=1})),X(()=>({display:{requirement:"Joy Level 2",effectDisplay:"Raise ash gain to the 1.1"},visibility:()=>p(Y[0].earned.value),shouldEarn:()=>qe.level.value>=2})),X(()=>({display:{requirement:"Joy Level 3",effectDisplay:"Coal drill is 2x more powerful"},visibility:()=>p(Y[1].earned.value),shouldEarn:()=>qe.level.value>=3})),X(()=>({display:{requirement:"Joy Level 4",effectDisplay:"Metal gain is boosted by heavy drills"},visibility:()=>p(Y[2].earned.value&&L.day.value>=13),shouldEarn:()=>qe.level.value>=4})),X(()=>({display:{requirement:"Joy Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},visibility:()=>p(Y[3].earned.value&&L.day.value>=13),shouldEarn:()=>qe.level.value>=5}))],g=[X(()=>({display:{requirement:"Faith Level 1",effectDisplay:"Multiply bonfire efficiency by 5."},shouldEarn:()=>$e.level.value>=1})),X(()=>({display:{requirement:"Faith Level 2",effectDisplay:"Raise ash gain to the 1.1"},visibility:()=>p(g[0].earned.value),shouldEarn:()=>$e.level.value>=2})),X(()=>({display:{requirement:"Faith Level 3",effectDisplay:"Coal drill is 2x more powerful"},visibility:()=>p(g[1].earned.value),shouldEarn:()=>$e.level.value>=3})),X(()=>({display:{requirement:"Faith Level 4",effectDisplay:"Oil gain is boosted by heavy drill drills"},visibility:()=>p(g[2].earned.value&&L.day.value>=13),shouldEarn:()=>$e.level.value>=4})),X(()=>({display:{requirement:"Faith Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},visibility:()=>p(g[3].earned.value&&L.day.value>=13),shouldEarn:()=>$e.level.value>=5}))],G=[X(()=>({display:{requirement:"Snowball Level 1",effectDisplay:"Multiply kiln efficiency by 5."},shouldEarn:()=>Ce.level.value>=1})),X(()=>({display:{requirement:"Snowball Level 2",effectDisplay:"Raise ash gain to the 1.1"},visibility:()=>p(G[0].earned.value),shouldEarn:()=>Ce.level.value>=2})),X(()=>({display:{requirement:"Snowball Level 3",effectDisplay:"Coal drill is 2x more powerful"},visibility:()=>p(G[1].earned.value),shouldEarn:()=>Ce.level.value>=3})),X(()=>({display:{requirement:"Snowball Level 4",effectDisplay:"Plastic gain is boosted by heavy extractors"},visibility:()=>p(G[2].earned.value&&L.day.value>=13),shouldEarn:()=>Ce.level.value>=4})),X(()=>({display:{requirement:"Snowball Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},visibility:()=>p(G[3].earned.value&&L.day.value>=13),shouldEarn:()=>Ce.level.value>=5}))],P=[X(()=>({display:{requirement:"Star Level 1",effectDisplay:"Book cost is divided by total books bought."},shouldEarn:()=>Be.level.value>=1})),X(()=>({display:{requirement:"Star Level 2",effectDisplay:"Pulp requires 10x less ash"},visibility:()=>p(P[0].earned.value),shouldEarn:()=>Be.level.value>=2})),X(()=>({display:{requirement:"Star Level 3",effectDisplay:"Book cost scaling 5x -> 4x"},visibility:()=>p(P[1].earned.value),shouldEarn:()=>Be.level.value>=3})),X(()=>({display:{requirement:"Star Level 4",effectDisplay:"Double all elf xp gain"},visibility:()=>p(P[2].earned.value&&L.day.value>=13),shouldEarn:()=>Be.level.value>=4})),X(()=>({display:{requirement:"Star Level 5",effectDisplay:"Gain 5 free books for all prior elves that are at level 5 or above."},visibility:()=>p(P[3].earned.value&&L.day.value>=13),shouldEarn:()=>Be.level.value>=5}))],E=[X(()=>({display:{requirement:"Bell Level 1",effectDisplay:f(()=>t(O,null,[o("Every box buyable adds "),t(Gl,null,{default:()=>[o("level")]}),o(" levels to same-row box buyables.")]))},shouldEarn:()=>te.level.value>=1})),X(()=>({display:{requirement:"Bell Level 2",effectDisplay:"Box gain ^1.1"},visibility:()=>p(E[0].earned.value),shouldEarn:()=>te.level.value>=2})),X(()=>({display:{requirement:"Bell Level 3",effectDisplay:"All box buyables scaling bases -1"},visibility:()=>p(E[1].earned.value),shouldEarn:()=>te.level.value>=3})),X(()=>({display:{requirement:"Bell Level 4",effectDisplay:"Unlock a second row of box buyables"},visibility:()=>p(E[2].earned.value&&L.day.value>=13),shouldEarn:()=>te.level.value>=4})),X(()=>({display:{requirement:"Bell Level 5",effectDisplay:"Unlock another row of box upgrades"},visibility:()=>p(E[3].earned.value&&L.day.value>=13),shouldEarn:()=>te.level.value>=5}))],D=[X(()=>({display:{requirement:"Gingersnap Level 1",effectDisplay:"Multiply all primary dye colors by ln(cloth + e)."},shouldEarn:()=>A.level.value>=1})),X(()=>({display:{requirement:"Gingersnap Level 2",effectDisplay:f(()=>t(O,null,[o("Multiply all cloth actions' effectiveness by log"),t("sub",null,[o("10")]),o("(dye sum + 10)")]))},visibility:()=>p(D[0].earned.value),shouldEarn:()=>A.level.value>=2})),X(()=>({display:{requirement:"Gingersnap Level 3",effectDisplay:"Double all dye colors and cloth actions, but reset all dyes."},visibility:()=>p(D[1].earned.value),shouldEarn:()=>A.level.value>=3,onComplete(){["red","yellow","blue","orange","green","purple"].forEach(q=>{ve.dyes[q].amount.value=0,ve.dyes[q].buyable.amount.value=0})}})),X(()=>({display:{requirement:"Gingersnap Level 4",effectDisplay:"Raise secondary dyes' first effects to the 1.1 but reset primary dyes"},visibility:()=>p(D[2].earned.value&&L.day.value>=13),shouldEarn:()=>A.level.value>=4,onComplete(){["red","yellow","blue"].forEach(q=>{ve.dyes[q].amount.value=0,ve.dyes[q].buyable.amount.value=0})}})),X(()=>({display:{requirement:"Gingersnap Level 5",effectDisplay:"Unlock another row of focus upgrades"},visibility:()=>p(D[3].earned.value&&L.day.value>=13),shouldEarn:()=>A.level.value>=5}))],Ze=[X(()=>({display:{requirement:"Peppermint Level 1",effectDisplay:"The coal drill exponent is increased from 2 to 2.5"},shouldEarn:()=>Ee.level.value>=1})),X(()=>({display:{requirement:"Peppermint Level 2",effectDisplay:"Coal boosts its own gain"},visibility:()=>p(Ze[0].earned.value),shouldEarn:()=>Ee.level.value>=2})),X(()=>({display:{requirement:"Peppermint Level 3",effectDisplay:"The coal drill cost is 10x cheaper"},visibility:()=>p(Ze[1].earned.value),shouldEarn:()=>Ee.level.value>=3})),X(()=>({display:{requirement:"Peppermint Level 4",effectDisplay:"Unlock 3 coal upgrades"},visibility:()=>p(Ze[2].earned.value&&L.day.value>=13),shouldEarn:()=>Ee.level.value>=4})),X(()=>({display:{requirement:"Peppermint Level 5",effectDisplay:"Well depth boosts coal gain an additional half time"},visibility:()=>p(Ze[3].earned.value&&L.day.value>=13),shouldEarn:()=>Ee.level.value>=5}))],Ve=[X(()=>({display:{requirement:"Twinkle Level 1",effectDisplay:"Schools multiply metal gain per ore"},shouldEarn:()=>pe.level.value>=1})),X(()=>({display:{requirement:"Twinkle Level 2",effectDisplay:"Each Twinkle level multiplies auto smelting speed by 1.25"},visibility:()=>p(Ve[0].earned.value),shouldEarn:()=>pe.level.value>=2})),X(()=>({display:{requirement:"Twinkle Level 3",effectDisplay:"Auto smelting multi is tripled."},visibility:()=>p(Ve[1].earned.value),shouldEarn:()=>pe.level.value>=3})),X(()=>({display:{requirement:"Twinkle Level 4",effectDisplay:"All metal machines are 10x cheaper"},visibility:()=>p(Ve[2].earned.value&&L.day.value>=13),shouldEarn:()=>pe.level.value>=4})),X(()=>({display:{requirement:"Twinkle Level 5",effectDisplay:f(()=>t(O,null,[t(Gl,null,{default:()=>[o("Well depth")]}),o(" divides metal machine costs")]))},visibility:()=>p(Ve[3].earned.value&&L.day.value>=13),shouldEarn:()=>pe.level.value>=5}))],Fe=[X(()=>({display:{requirement:"Cocoa Level 1",effectDisplay:"The depth boost to oil gain is better"},shouldEarn:()=>oi.level.value>=1})),X(()=>({display:{requirement:"Cocoa Level 2",effectDisplay:"Total oil gained boosts drill power"},visibility:()=>p(Fe[0].earned.value),shouldEarn:()=>oi.level.value>=2})),X(()=>({display:{requirement:"Cocoa Level 3",effectDisplay:"Double drill power and oil gain"},visibility:()=>p(Fe[1].earned.value),shouldEarn:()=>oi.level.value>=3})),X(()=>({display:{requirement:"Cocoa Level 4",effectDisplay:"Plastics are produced 5x faster but cost 5x as much oil"},visibility:()=>p(Fe[2].earned.value&&L.day.value>=13),shouldEarn:()=>oi.level.value>=4})),X(()=>({display:{requirement:"Cocoa Level 5",effectDisplay:"Unlock another row of oil upgrades"},visibility:()=>p(Fe[3].earned.value&&L.day.value>=13),shouldEarn:()=>oi.level.value>=5}))],ke=[X(()=>({display:{requirement:"Frosty Level 1",effectDisplay:"Oil boosts Star and Bell's xp gain"},shouldEarn:()=>Wi.level.value>=1})),X(()=>({display:{requirement:"Frosty Level 2",effectDisplay:"Oil pumps are 10x cheaper"},visibility:()=>p(ke[0].earned.value),shouldEarn:()=>Wi.level.value>=2})),X(()=>({display:{requirement:"Frosty Level 3",effectDisplay:"Oil burners act like there are ^1.5 of them"},visibility:()=>p(ke[1].earned.value),shouldEarn:()=>Wi.level.value>=3})),X(()=>({display:{requirement:"Frosty Level 4",effectDisplay:f(()=>t(O,null,[o("Heavy drill drill's ln is now log"),t("sub",null,[o("2.5")])]))},visibility:()=>p(ke[2].earned.value&&L.day.value>=13),shouldEarn:()=>Wi.level.value>=4})),X(()=>({display:{requirement:"Frosty Level 5",effectDisplay:"Unlock another row of paper upgrades"},visibility:()=>p(ke[3].earned.value&&L.day.value>=13),shouldEarn:()=>Wi.level.value>=5}))],ce=Se("Holly"),Pe=f(()=>{const q=Object.values(pi).find(fe=>fe.name===ce.value);return q==null?(console.warn("This should not happen.",ce.value),""):t(O,null,[ce.value,o("'s milestones: "),q.displayMilestone()])}),Re=h(Ye.elves.cuttersElf,W),je=h(Ye.elves.plantersElf,y),U=h(Ye.elves.expandersElf,N),Ie=[Re,je,U],$=h(Ye.elves.heatedCuttersElf,x),ze=h(Ye.elves.heatedPlantersElf,M),Ne=h(Ye.elves.fertilizerElf,ne),Oi=[$,ze,Ne],qe=h(Ye.elves.smallFireElf,Y),$e=h(Ye.elves.bonfireElf,g),Ce=h(Ye.elves.kilnElf,G),Vi=[qe,$e,Ce],Be=h(Ye.elves.paperElf,P,Z(()=>({multiplier:()=>i.add(ae.oil.value,1).log10(),description:"Frosty Level 1",enabled:ke[0].earned}))),te=h(Ye.elves.boxElf,E,Z(()=>({multiplier:()=>i.add(ae.oil.value,1).log10(),description:"Frosty Level 1",enabled:ke[0].earned}))),A=h(Ye.elves.clothElf,D),B=[Be,te,A],Ee=h(Ye.elves.coalDrillElf,Ze),pe=h(Ye.elves.metalElf,Ve),oi=h(Ye.elves.oilElf,Fe),Wi=h(Ye.elves.heavyDrillElf,ke),ki=[Ee,Wi,oi],Ui=[pe],pi={cutterElfTraining:Re,planterElfTraining:je,expandersElfTraining:U,heatedCutterElfTraining:$,heatedPlanterElfTraining:ze,fertilizerElfTraining:Ne,smallfireElfTraining:qe,bonfireElfTraining:$e,kilnElfTraining:Ce,paperElfTraining:Be,boxElfTraining:te,clothElfTraining:A,coalDrillElfTraining:Ee,metalElfTraining:pe,oilElfTraining:oi,heavyDrillElfTraining:Wi},De=[Re,je,U,$,ze,Ne,qe,$e,Ce,Be,te,A],_e=[Re,je,U,$,ze,Ne,qe,$e,Ce,Be,te,A,Ee,pe,oi,Wi];ui.on("update",q=>{if(!(L.day.value=1&&(fe.amountOfTimesDone.value-=ti,i.lt(fe.level.value,mi.amount.value)&&(fe.exp.value=i.mul(fe.elfXPGainComputed.value,ti).add(fe.exp.value)))}if(Qe.value=Math.max(Qe.value-q,0),ie.value=Math.max(ie.value-q,0),i.eq(Qe.value,0)){k.value={};const fe=bi.bought.value?2e3:1e3;let ti=1-Math.abs(Math.sin(Date.now()/fe*2));Ae.bought.value&&(ti=1-(1-ti)**2),be.value=i.pow(qi.value,ti)}}});const be=Se(1),k=Se({}),ie=Se(0),Qe=Se(0),Pi=oe(()=>[Z(()=>({multiplier:2,description:"Focus Upgrade 1",enabled:Vl.bought})),ye(()=>({addend(){return i.add(ve.dyes.orange.amount.value,ve.dyes.purple.amount.value).add(ve.dyes.green.amount.value).add(1).cbrt()},description:"Colorful Focus",enabled:ae.row3Upgrades[2].bought}))]),si=oe(()=>[ye(()=>({addend:1,description:"Focus Upgrade 2",enabled:Wl.bought})),ye(()=>({addend:1,description:"Focus Upgrade 6",enabled:Si.bought}))]),Yi=oe(()=>[ye(()=>({addend:-5,description:"Focus Upgrade 3",enabled:vl.bought}))]),qi=b(()=>Pi.apply(10)),ml=b(()=>si.apply(3)),ei=b(()=>Yi.apply(15)),Ni=al(()=>({direction:Ue.Right,width:566,height:50,style:"border-radius: 4px 4px 0 0",borderStyle:"border-radius: 4px 4px 0 0",fillStyle:()=>({background:Qe.value>0?l:"#7f7f00",animation:Qe.value>0?"1s focused-focus-bar linear infinite":"",opacity:Qe.value>0?Qe.value/10:1,transition:"none"}),progress:()=>i.sub(be.value,1).div(i.sub(qi.value,1)).toNumber(),display:f(()=>t(O,null,[K(be.value),o("x"),Qe.value>0?t(O,null,[" ",o("to "),Object.keys(k.value).join(", "),o(" for")," ",ln(Qe.value)]):""]))})),zi=Ei(()=>({display:{title:"Focus",description:f(()=>t(O,null,[o("Motivate elves to focus, multiplying "),me(ml.value),o(" random elves' XP gain by up to "),K(qi.value),o("x for 10 seconds, equal to the focus bar's effect."),i.gte(ie.value,0)?t(O,null,[t("br",null,null),o("Reroll cooldown: "),ln(ie.value)]):""]))},style:{width:"300px"},canClick:()=>i.eq(ie.value,0),onClick(){ie.value=i.fromValue(ei.value).toNumber(),Qe.value=10,Il(Object.values(pi).filter(q=>m(q.visibility)===yi.Visible).length,ml.value)}}));function Il(q,fe){var Ul;let ti=0;k.value={};const vi=i.min(fe,q);for(;vi.gt(ti);){const H=Object.values(pi)[Math.floor(Math.random()*q)],le=(Ul=H==null?void 0:H.name)!=null?Ul:"";!k.value[le]&&m(H.visibility)===yi.Visible&&(k.value[le]=!0,ti++)}}const Vl=T(()=>({display:{title:"Focus Booster",description:"Multiplies the maximum experience multiplier from focus by 2"},resource:he.logs,cost:1e25})),Wl=T(()=>({display:{title:"Focus Buffer",description:"Increase elves affected by focus by 1"},resource:he.logs,cost:1e30})),vl=T(()=>({display:{title:"Focus Upgrader",description:"Focus can now be rerolled every 10 seconds"},resource:he.logs,cost:1e35})),re=[Vl,Wl,vl],Ae=T(()=>({display:{title:"Focus Improver",description:"The bar moves slower when it's closer to the right and faster when it's closer to the left"},resource:he.logs,visibility:()=>p(pi.clothElfTraining.milestones[4].earned.value),cost:1e40})),bi=T(()=>({display:{title:"Focus Focuser",description:"The bar moves 2x slower"},resource:he.logs,visibility:()=>p(pi.clothElfTraining.milestones[4].earned.value),cost:1e45})),Si=T(()=>({display:{title:"Focus Doubler",description:"Focus now applies to 6 elves."},resource:he.logs,visibility:()=>p(pi.clothElfTraining.milestones[4].earned.value),cost:1e50})),il=[Ae,bi,Si],Ke=b(()=>{const q=i.pow(10,mi.amount.value),fe=i.pow(4,mi.amount.value);let ti=i.pow(2e4,i.pow(mi.amount.value,.75));i.gte(mi.amount.value,4)&&(ti=ti.div(1e3));const vi=i.pow(2e3,mi.amount.value);return{wood:ti.mul(1e21),coal:vi.mul(1e32),paper:vi.mul(1e18),boxes:ti.mul(1e13),metalIngots:fe.mul(1e12),cloth:q.mul(1e4),plastic:fe.mul(1e6),dye:i.add(mi.amount.value,1).mul(1e4)}}),mi=He(()=>({display:f(()=>t(O,null,[t("h3",null,[o("Build a School")]),t("div",null,[o("You gotta start somewhere, right? Each school increases the maximum level for elves by 1, maximum of "),L.days[$i-1].opened.value?5:3," ",o("schools.")]),t("div",null,[o("You have "),me(mi.amount.value),o(" schools, which are currently letting elves learn up to level "),me(mi.amount.value),o(".")]),i.lt(mi.amount.value,m(mi.purchaseLimit))?t("div",null,[o("Costs "),K(Ke.value.wood),o(" logs, "),K(Ke.value.coal)," ",o("coal, "),K(Ke.value.paper),o(" paper,")," ",K(Ke.value.boxes),o(" boxes,")," ",K(Ke.value.metalIngots),o(" metal ingots,")," ",K(Ke.value.cloth),o(" cloth, "),K(Ke.value.plastic)," ",o("plastic, and requires "),K(Ke.value.dye),o(" of red, yellow, and blue dye")]):null])),canPurchase(){return Ke.value.wood.lte(he.logs.value)&&Ke.value.coal.lte(_.coal.value)&&Ke.value.paper.lte(F.paper.value)&&Ke.value.boxes.lte(ii.boxes.value)&&Ke.value.metalIngots.lte(ci.metal.value)&&Ke.value.cloth.lte(gi.cloth.value)&&Ke.value.plastic.lte(ri.plastic.value)&&Ke.value.dye.lte(ve.dyes.blue.amount.value)&&Ke.value.dye.lte(ve.dyes.red.amount.value)&&Ke.value.dye.lte(ve.dyes.yellow.amount.value)&&i.lt(mi.amount.value,m(mi.purchaseLimit))},onPurchase(){he.logs.value=i.sub(he.logs.value,Ke.value.wood),_.coal.value=i.sub(_.coal.value,Ke.value.coal),F.paper.value=i.sub(F.paper.value,Ke.value.paper),ii.boxes.value=i.sub(ii.boxes.value,Ke.value.boxes),ci.metal.value=i.sub(ci.metal.value,Ke.value.metalIngots),gi.cloth.value=i.sub(gi.cloth.value,Ke.value.cloth),ri.plastic.value=i.sub(ri.plastic.value,Ke.value.plastic),this.amount.value=i.add(this.amount.value,1)},purchaseLimit(){return L.days[$i-1].opened.value?5:3},visibility:b(()=>p(r.bought.value)),style:"width: 600px"})),J=b(()=>{let q=rl.amount.value;i.gte(q,50)&&(q=i.pow(q,2).div(50)),i.gte(q,200)&&(q=i.pow(q,2).div(200));const fe=i.add(q,1).pow(1.5);return{wood:fe.mul(1e21),paper:fe.mul(1e18),boxes:fe.mul(1e13),metalIngots:fe.mul(1e12)}}),z=b(()=>{var q=i.add(rl.amount.value,1).pow(.9).pow(F.upgrades2.classroomUpgrade.bought.value?1.1:1);return q.gte(100)&&(q=q.sqrt().mul(10)),q}),rl=He(()=>({display:f(()=>t(O,null,[t("h3",null,[o("Build a Classroom")]),t("div",null,[o("Hopefully it makes the school a bit less boring. Multiplies elves' XP gain by")," ",o("(Classrooms + 1)"),t("sup",null,[o("0.9")]),o(".")]),t("div",null,[o("You have "),me(rl.amount.value),o(" classrooms, which are currently multiplying elves' XP gain by "),K(z.value)]),t("div",null,[o("Costs "),K(J.value.wood),o(" logs,"),K(J.value.paper),o(" paper, "),K(J.value.boxes)," ",o("boxes, "),K(J.value.metalIngots),o(" metal ingots")])])),canPurchase(){return J.value.wood.lte(he.logs.value)&&J.value.paper.lte(F.paper.value)&&J.value.boxes.lte(ii.boxes.value)&&J.value.metalIngots.lte(ci.metal.value)},onPurchase(){he.logs.value=i.sub(he.logs.value,J.value.wood),F.paper.value=i.sub(F.paper.value,J.value.paper),ii.boxes.value=i.sub(ii.boxes.value,J.value.boxes),ci.metal.value=i.sub(ci.metal.value,J.value.metalIngots),this.amount.value=i.add(this.amount.value,1)},visibility:b(()=>p(d.bought.value)),style:"width: 600px"})),[Tl,dl]=ol(()=>[{title:"Elves affected by Focus",modifier:si,base:3},{title:"Maximum Focus Effect",modifier:Pi,base:10},{title:"Focus Cooldown",modifier:Yi,unit:" secs",base:15},{title:"Global XP Gain",modifier:c,unit:" XP"},{title:"Holly XP Gain per Action",modifier:Re.elfXPGain,base:.1,unit:" XP"},{title:"Ivy XP Gain per Action",modifier:je.elfXPGain,base:.1,unit:" XP"},{title:"Hope XP Gain per Action",modifier:U.elfXPGain,base:.1,unit:" XP"},{title:"Jack XP Gain per Action",modifier:$.elfXPGain,base:.1,unit:" XP"},{title:"Mary XP Gain per Action",modifier:ze.elfXPGain,base:.1,unit:" XP"},{title:"Noel XP Gain per Action",modifier:Ne.elfXPGain,base:.1,unit:" XP"},{title:"Joy XP Gain per Action",modifier:qe.elfXPGain,base:.1,unit:" XP"},{title:"Faith XP Gain per Action",modifier:$e.elfXPGain,base:.1,unit:" XP"},{title:"Snowball XP Gain per Action",modifier:Ce.elfXPGain,base:.1,unit:" XP"},{title:"Star XP Gain per Action",modifier:Be.elfXPGain,base:.1,unit:" XP"},{title:"Bell XP Gain per Action",modifier:te.elfXPGain,base:.1,unit:" XP"},{title:"Gingersnap XP Gain per Action",modifier:A.elfXPGain,base:.1,unit:" XP"}]),fl=se(!1),ll=f(()=>t(Gi,{modelValue:fl.value,"onUpdate:modelValue":q=>fl.value=q},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:Tl}));return Di(()=>{(L.day.value===Pl&&De.every(q=>q.level.value>=3)||L.day.value===$i&&_e.every(q=>q.level.value>=5))&&L.completeDay()}),{name:e,day:Pl,color:l,minWidth:700,elfTraining:pi,totalElfLevels:s,totalElfExp:a,level5Elves:I,currentShown:ce,generalTabCollapsed:dl,teaching:r,schools:mi,classrooms:rl,classroomUpgrade:d,advancedUpgrade:u,focusMultiplier:be,upgrades:re,upgrades2:il,focusTargets:k,focusCooldown:ie,focusTime:Qe,display:f(()=>t(O,null,[L.day.value===Pl?"Get all elves to level 3.":L.day.value===$i&&L.days[$i-1].opened.value?"Get all elves to level 5.":`${e} Complete!`," ",o("-"),t("button",{class:"button",style:"display: inline-block;",onClick:()=>fl.value=!0},[o("Check Modifiers")]),We(ll),We(n),t("br",null,null),tl(mi,rl),Yl([r,d,u]),t(ge,null,null),i.gt(mi.amount.value,0)?t(O,null,[t("br",null,null),o("Click on an elf to see their milestones."),t("br",null,null),t("br",null,null),We(zi),Yl(re,il),t("br",null,null),Yl([Ni],Ie,Oi,Vi,B,ki,Ui),t(ge,null,null),Pe()]):""]))}}),Sm="cloth",fs=8,gi=Ai(Sm,function(){const e="Cloth",l="white",n=fi(0,"cloth"),s=fi(0,"wool"),a=fi(10,"sheep"),I=Se(0),r=al(()=>({direction:Ue.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:()=>i.div(I.value,Ce.value)})),d=Ei(()=>({display:{title:"Breed sheep",description:f(()=>t(O,null,[o("Breed "),xe(i.floor(qe.value)),o(" sheep"),t("br",null,null),We(r)]))},style:{minHeight:"80px"},canClick:()=>i.gte(I.value,Ce.value),onClick(){if(i.lt(I.value,Ce.value))return;const be=i.floor(qe.value);a.value=i.add(a.value,be),I.value=0}})),u=Se(0),c=al(()=>({direction:Ue.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:()=>i.div(u.value,A.value)})),j=Ei(()=>({display:{title:"Shear sheep",description:f(()=>t(O,null,[o("Shear up to "),xe(i.floor(Be.value)),o(" sheep"),t("br",null,null),We(c)]))},style:{minHeight:"80px"},canClick:()=>i.gte(u.value,A.value),onClick(){if(i.lt(u.value,A.value))return;const be=i.min(a.value,Be.value).floor();s.value=i.add(s.value,be),u.value=0}})),h=Se(0),W=al(()=>({direction:Ue.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:()=>i.div(h.value,oi.value)})),y=Ei(()=>({display:{title:"Spinning wool",description:f(()=>t(O,null,[o("Spin "),xe(i.floor(Ee.value)),o(" wool"),t("br",null,null),We(W)]))},style:{minHeight:"80px"},canClick:()=>i.gte(h.value,oi.value),onClick(){if(i.lt(h.value,oi.value))return;const be=i.min(s.value,Ee.value).floor();n.value=i.add(n.value,be),s.value=i.sub(s.value,be),h.value=0}})),N=en(()=>({key:"b",description:'Press the "Breed Sheep" button',onPress:()=>{d.canClick.value&&d.onClick()}})),x=en(()=>({key:"h",description:'Press the "Shear Sheep" button',onPress:()=>{j.canClick.value&&j.onClick()}})),M=en(()=>({key:"s",description:'Press the "Spin Wool" button',onPress:()=>{y.canClick.value&&y.onClick()}})),ne=He(()=>({resource:he.logs,cost(){let be=this.amount.value;return i.gte(be,100)&&(be=i.pow(be,2).div(100)),be=i.pow(.95,F.books.clothBook.totalAmount.value).times(be),i.pow(1.5,be).times(1e14)},inverseCost(be){let k=i.div(be,1e14).log(1.5);return k=k.div(i.pow(.95,F.books.clothBook.totalAmount.value)),i.gte(k,100)&&(k=i.mul(k,100).root(2)),i.isNaN(k)?i.dZero:k.floor().max(0)},display:{title:"Build more pens",description:"Breed +1 sheep at once"}})),Y=He(()=>({resource:ci.metal,cost(){let be=this.amount.value;return i.gte(be,100)&&(be=i.pow(be,2).div(100)),be=i.pow(.95,F.books.clothBook.totalAmount.value).times(be),i.pow(1.4,be).times(1e4)},inverseCost(be){let k=i.div(be,1e4).log(1.4);return k=k.div(i.pow(.95,F.books.clothBook.totalAmount.value)),i.gte(k,100)&&(k=i.mul(k,100).root(2)),i.isNaN(k)?i.dZero:k.floor().max(0)},display:{title:"Make stronger shears",description:"Shear +1 sheep at once"}})),g=He(()=>({resource:F.paper,cost(){let be=this.amount.value;return i.gte(be,100)&&(be=i.pow(be,2).div(100)),be=i.pow(.95,F.books.clothBook.totalAmount.value).times(be),i.pow(1.3,be).times(1e6)},inverseCost(be){let k=i.div(be,1e6).log(1.3);return k=k.div(i.pow(.95,F.books.clothBook.totalAmount.value)),i.gte(k,100)&&(k=i.mul(k,100).root(2)),i.isNaN(k)?i.dZero:k.floor().max(0)},display:{title:"Learn how to spin",description:"Spin +1 wool at once"}})),G=T(()=>({resource:Q(n),cost:100,display:{title:"Lumberjack Boots",description:"Quadruple log gain"}})),P=T(()=>({resource:Q(s),cost:150,visibility:()=>p(G.bought.value),display:{title:"Lumberjack Jeans",description:"Quadruple trees cut"}})),E=T(()=>({resource:Q(a),cost:200,visibility:()=>p(P.bought.value),display:{title:"Lumberjack Plaid",description:"Quadruple trees planted"}})),Ze={treesUpgrade4:T(()=>({resource:Q(n),cost:1e3,visibility:()=>p(ri.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Axe",description:"10x log gain"}})),treesUpgrade3:E,treesUpgrade2:P,treesUpgrade1:G},Ve=T(()=>({resource:Q(n),cost:150,display:{title:"Mining boots",description:"Quadruple ash gain"}})),Fe=T(()=>({resource:Q(s),cost:225,visibility:()=>p(Ve.bought.value),display:{title:"Mining overalls",description:"Double coal gain"}})),ke=T(()=>({resource:Q(a),cost:300,visibility:()=>p(Fe.bought.value),display:{title:"Mining helmet",description:"Triple coal gain"}})),Pe={metalUpgrade4:T(()=>({resource:Q(n),cost:2e3,visibility:()=>p(ri.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Pick",description:"Quadruple coal gain"}})),metalUpgrade3:ke,metalUpgrade2:Fe,metalUpgrade1:Ve},Re=T(()=>({resource:Q(n),cost:200,display:{title:"Scholar's shoes",description:"Double paper gain"}})),je=T(()=>({resource:Q(s),cost:200,visibility:()=>p(Re.bought.value),display:{title:"Scholar's slacks",description:"Double paper gain"}})),U=T(()=>({resource:Q(a),cost:400,visibility:()=>p(je.bought.value),display:{title:"Scholar's jacket",description:"Double paper gain"}})),$={paperUpgrade4:T(()=>({resource:Q(n),cost:4e3,visibility:()=>p(ri.upgrades.clothTools.bought.value),display:{title:"Felt Elbow Pads",description:"10x paper gain"}})),paperUpgrade3:U,paperUpgrade2:je,paperUpgrade1:Re},ze=b(()=>i.add(he.computedAutoCuttingAmount.value,1).root(9)),Ne=b(()=>i.add(ve.dyeSum.value,10).log10()),Oi=oe(()=>[ye(()=>({addend:ne.amount,description:"Build more pens"})),Z(()=>({multiplier:()=>i.div(ri.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>i.gte(ri.buyables.clothGains.amount.value,1)})),Z(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:F.upgrades.clothUpgrade.bought})),Z(()=>({multiplier:Ne,description:"Gingersnap Level 2",enabled:v.elfTraining.clothElfTraining.milestones[1].earned})),Z(()=>({multiplier:ze,description:"Holly Level 3",enabled:v.elfTraining.cutterElfTraining.milestones[2].earned})),Z(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:Ii.milestones.extraExpansionMilestone5.earned})),Z(()=>({multiplier:2,description:"Carry cloth in boxes",enabled:ii.row3Upgrades.clothUpgrade.bought}))]),qe=b(()=>Oi.apply(1)),$e=oe(()=>[]),Ce=b(()=>$e.apply(1)),Vi=oe(()=>[ye(()=>({addend:Y.amount,description:"Make stronger shears"})),Z(()=>({multiplier:()=>i.div(ri.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>i.gte(ri.buyables.clothGains.amount.value,1)})),Z(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:F.upgrades.clothUpgrade.bought})),Z(()=>({multiplier:Ne,description:"Gingersnap Level 2",enabled:v.elfTraining.clothElfTraining.milestones[1].earned})),Z(()=>({multiplier:ze,description:"Holly Level 3",enabled:v.elfTraining.cutterElfTraining.milestones[2].earned})),Z(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:Ii.milestones.extraExpansionMilestone5.earned})),Z(()=>({multiplier:2,description:"Carry cloth in boxes",enabled:ii.row3Upgrades.clothUpgrade.bought}))]),Be=b(()=>Vi.apply(1)),te=oe(()=>[]),A=b(()=>te.apply(1)),B=oe(()=>[ye(()=>({addend:g.amount,description:"Learn how to spin"})),Z(()=>({multiplier:()=>i.div(ri.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>i.gte(ri.buyables.clothGains.amount.value,1)})),Z(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:F.upgrades.clothUpgrade.bought})),Z(()=>({multiplier:Ne,description:"Gingersnap Level 2",enabled:v.elfTraining.clothElfTraining.milestones[1].earned})),Z(()=>({multiplier:ze,description:"Holly Level 3",enabled:v.elfTraining.cutterElfTraining.milestones[2].earned})),Z(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:Ii.milestones.extraExpansionMilestone5.earned})),Z(()=>({multiplier:2,description:"Carry cloth in boxes",enabled:ii.row3Upgrades.clothUpgrade.bought}))]),Ee=b(()=>B.apply(1)),pe=oe(()=>[]),oi=b(()=>pe.apply(1)),[Wi,ki]=ol(()=>[{title:"Sheep Gain",modifier:Oi,base:1},{title:"Sheep Breeding Cooldown",modifier:$e,base:1,visible:!1,unit:"s"},{title:"Shearing Amount",modifier:Vi,base:1},{title:"Shearing Cooldown",modifier:te,base:1,visible:!1,unit:"s"},{title:"Spinning Amount",modifier:B,base:1},{title:"Spinning Cooldown",modifier:pe,base:1,visible:!1,unit:"s"}]),Ui=se(!1),pi=f(()=>t(Gi,{modelValue:Ui.value,"onUpdate:modelValue":be=>Ui.value=be},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:Wi}));ui.on("update",be=>{i.lt(L.day.value,fs)||(i.gte(I.value,Ce.value)?I.value=Ce.value:(I.value=i.add(I.value,be),d.isHolding.value&&d.onClick()),i.gte(u.value,A.value)?u.value=A.value:(u.value=i.add(u.value,be),j.isHolding.value&&j.onClick()),i.gte(h.value,oi.value)?h.value=oi.value:(h.value=i.add(h.value,be),y.isHolding.value&&y.onClick()))});const{total:De,trackerDisplay:_e}=Jl({resource:n,goal:1e3,name:e,day:fs,color:l,textColor:"var(--feature-foreground)",modal:{show:Ui,display:pi}});return{name:e,color:l,cloth:n,totalCloth:De,wool:s,sheep:a,buildPens:ne,betterShears:Y,fasterSpinning:g,treesUpgrades:Ze,metalUpgrades:Pe,paperUpgrades:$,generalTabCollapsed:ki,breedingProgress:I,shearingProgress:u,spinningProgress:h,breedSheepHK:N,shearSheepHK:x,spinWoolHK:M,minWidth:700,display:f(()=>t(O,null,[We(_e),t(ge,null,null),t(Qi,{resource:n,style:"margin-bottom: 0"},null),t(Qi,{resource:s,style:"margin-bottom: 0"},null),t(Qi,{resource:a,style:"margin-bottom: 0"},null),di(d,j,y),di(ne,Y,g),t(ge,null,null),t(nn,null,{default:()=>[tl(...Object.values(Ze)),tl(...Object.values(Pe)),tl(...Object.values($))]})])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),K(n.value),o(" "),n.displayName]))}}),Rm="dyes",Hm=11,ve=Ai(Rm,function(){const e="Dyes",l="#D4D4F4";function n(y){const N=fi(0,y.name),x=oe(()=>{const Y=[ye(()=>({addend:()=>i.add(ne.amount.value,1),description:`${y.name} Chambers`}))];return y.color==="yellow"&&ae.row3Upgrades[0].bought.value&&Y.push(Z(()=>({multiplier(){return i.add(s.red.amount.value,1).log10().pow(.75)},description:"Dye Synergy I"}))),y.color==="red"&&ae.row3Upgrades[3].bought.value&&Y.push(Z(()=>({multiplier(){return i.add(s.blue.amount.value,1).log10()},description:"Dye Synergy II"}))),(y.color==="red"||y.color==="yellow")&&Y.push(Z(()=>({multiplier:a.orange1,description:"Orange Dye Boost 1"}))),(y.color=="yellow"||y.color=="blue")&&Y.push(Z(()=>({multiplier:a.green1,description:"Green Dye Boost 1"}))),(y.color=="red"||y.color=="blue")&&Y.push(Z(()=>({multiplier:a.purple1,description:"Purple Dye Boost 1"}))),(y.color=="red"||y.color=="yellow"||y.color=="blue")&&(Y.push(Z(()=>({multiplier:2,description:"Wetter Dyes",enabled:d.yellowDyeUpg.bought}))),Y.push(Z(()=>({multiplier:()=>i.add(gi.cloth.value,Math.E).ln(),description:"Gingersnap Level 1",enabled:v.elfTraining.clothElfTraining.milestones[0].earned}))),Y.push(Z(()=>({multiplier:2,description:"Wrapping Paper Milestone 1",enabled:ji.milestones.primaryBoost.earned})))),(y.color=="orange"||y.color=="green"||y.color=="purple")&&Y.push(Z(()=>({multiplier:2,description:"Wrapping Paper Milestone 2",enabled:ji.milestones.secondaryBoost.earned}))),Y.push(Z(()=>({multiplier:2,description:"Gingersnap Level 3",enabled:v.elfTraining.clothElfTraining.milestones[2].earned}))),Y.push(Z(()=>({multiplier:2,description:"Carry dye in boxes",enabled:ii.row3Upgrades.dyeUpgrade.bought}))),Y}),M=b(()=>x.apply(0)),ne=He(()=>{const Y=Fi(y.costs);return{...y,style:()=>({backgroundColor:m(ne.canPurchase)?l:"#545454",minWidth:"200px"}),display:f(()=>t("span",null,[t("h3",null,[y.name,o(" Chambers")]),t("br",null,null),o("Create "),K(M.value),o(" "),y.name,y.dyesToReset.length>0?", but reset "+y.dyesToReset.map(g=>g.name).join(", "):"",o("."),t("br",null,null),t("br",null,null),t("span",{class:"white-space: pre-wrap"},[o("Currently:")," ",y.listedBoosts.filter(g=>m(g.visible)).map(g=>We(f(()=>t("div",null,[m(g.desc)]))))]),t("br",null,null),t("div",null,[o("Cost:")," ",m(Y).map(g=>We(f(()=>{var G,P;return t("div",null,[K(m(i.pow((G=m(ne.cost))!=null?G:i.dInf,m((P=g.root)!=null?P:1)).times(m(g.base))))," ",g.res.displayName,t("br",null,null)])})))])])),cost(){let g=ne.amount.value;return i.gte(g,25)&&(g=i.pow(g,2).div(20)),i.gte(g,10)&&(g=i.pow(g,2).div(5)),g=i.mul(g,i.pow(.95,F.books.dyeBook.totalAmount.value)),i.div(g,10).plus(1)},inverseCostPre(g){let G=i.sub(g,1).mul(10);return G=G.div(i.pow(.95,F.books.dyeBook.totalAmount.value)),i.gte(G,10)&&(G=i.mul(G,5).root(2)),i.gte(G,25)&&(G=i.mul(G,20).root(2)),i.isNaN(G)?i.dZero:G.floor().max(0)},inverseCost(){return m(ne.visibility)!=yi.Visible?i.dZero:m(Y).reduce((g,G)=>{var P;return i.min(this.inverseCostPre(i.div(G.res.value,m(G.base)).root(m((P=G.root)!=null?P:1))),g)},i.dInf)},canPurchase:b(g=>{var P;if(m(ne.visibility)!=yi.Visible)return!1;const G=(P=g!=null?g:m(ne.cost))!=null?P:i.dInf;return m(Y).every(E=>{var D;return i.div(E.res.value,m(E.base)).root(m((D=E.root)!=null?D:1)).gte(G)})}),onPurchase(g){var P;const G=(P=g!=null?g:m(ne.cost))!=null?P:i.dInf;N.value=i.add(N.value,M.value),ne.amount.value=i.add(ne.amount.value,1),ji.milestones.secondaryNoReset.earned.value||(m(Y).forEach(E=>{var D;E.res.value=i.sub(E.res.value,i.pow(G,m((D=E.root)!=null?D:1)).times(m(E.base)))}),y.dyesToReset.forEach(E=>E.reset()))}}});return{name:y.name,amount:N,buyable:ne,toGenerate:x,computedToGenerate:M,display:f(()=>t(Qi,{resource:N,color:y.color,style:"margin: 0; width: 200px; width: 180px; padding: 10px;",sticky:!1},null))}}const s={red:n({name:"Red Dye",color:"red",costs:()=>[{base:"2e18",root:5,res:he.logs},{base:b(()=>d.yellowDyeUpg2.bought.value?"2.5e5":"5e5"),root:2,res:ae.oil}],listedBoosts:[{visible:!0,desc:b(()=>`+${K(a.red1.value)} effective Oil Pumps (does not impact coal consumption)`)}],dyesToReset:[]}),yellow:n({name:"Yellow Dye",color:"yellow",costs:()=>[{base:"1e18",root:5,res:he.logs},{base:b(()=>d.yellowDyeUpg2.bought.value?"5e5":"1e6"),root:2,res:ae.oil}],listedBoosts:[{visible:!0,desc:b(()=>`x${K(a.yellow1.value)} Paper & Plastic gain`)}],dyesToReset:[]}),blue:n({name:"Blue Dye",color:"blue",costs:()=>[{base:"5e17",root:5,res:he.logs},{base:b(()=>d.yellowDyeUpg2.bought.value?"1e6":"2e6"),root:2,res:ae.oil}],listedBoosts:[{visible:!0,desc:b(()=>`+${me(a.blue1.value)} forest size (after all other modifiers).`)}],dyesToReset:[]}),orange:n({name:"Orange Dye",color:"orange",costs:()=>[{base:15,root:2,res:s.red.amount},{base:10,root:2,res:s.yellow.amount}],listedBoosts:[{visible:!0,desc:b(()=>`x${K(a.orange1.value)} Red and Yellow Dye gain`)},{visible:!0,desc:b(()=>`/${K(a.orange2.value)} Box buyable costs.`)}],dyesToReset:[{name:"Red Dye",reset(){s.red.amount.value=0,s.red.buyable.amount.value=0}},{name:"Yellow Dye",reset(){s.yellow.amount.value=0,s.yellow.buyable.amount.value=0}}]}),green:n({name:"Green Dye",color:"green",costs:()=>[{base:15,root:2,res:s.yellow.amount},{base:10,root:2,res:s.blue.amount}],listedBoosts:[{visible:!0,desc:b(()=>`x${K(a.green1.value)} Yellow and Blue Dye gain`)},{visible:!0,desc:b(()=>`+${me(i.sub(a.green2.value,1).times(100))}% Kiln synergy effect.`)}],dyesToReset:[{name:"Yellow Dye",reset(){s.yellow.amount.value=0,s.yellow.buyable.amount.value=0}},{name:"Blue Dye",reset(){s.blue.amount.value=0,s.blue.buyable.amount.value=0}}]}),purple:n({name:"Purple Dye",color:"purple",costs:()=>[{base:15,root:2,res:s.blue.amount},{base:10,root:2,res:s.red.amount}],listedBoosts:[{visible:!0,desc:b(()=>`x${K(a.purple1.value)} Red and Blue Dye gain`)},{visible:!0,desc:b(()=>`x${K(a.purple2.value)} Smelting Speed and Ore Purity`)}],dyesToReset:[{name:"Blue Dye",reset(){s.blue.amount.value=0,s.blue.buyable.amount.value=0}},{name:"Red Dye",reset(){s.red.amount.value=0,s.red.buyable.amount.value=0}}]})},a={red1:b(()=>i.pow(i.add(s.red.amount.value,1).log2().plus(1).log2().div(2),d.blueDyeUpg2.bought.value?1.5:1)),yellow1:b(()=>i.add(s.yellow.amount.value,1).log2().plus(1)),blue1:b(()=>i.add(s.blue.amount.value,1).log2().sqrt().times(5e6)),orange1:b(()=>i.pow(2,i.add(s.orange.amount.value,1).log2().sqrt()).pow(d.coalUpg.bought.value?1.2:1).pow(v.elfTraining.clothElfTraining.milestones[3].earned.value?1.1:1)),orange2:b(()=>i.add(s.orange.amount.value,1).log2().plus(1).pow(ae.row3Upgrades[1].bought.value?2.5:1)),green1:b(()=>i.pow(2,i.add(s.green.amount.value,1).log2().sqrt()).pow(d.coalUpg.bought.value?1.2:1).pow(v.elfTraining.clothElfTraining.milestones[3].earned.value?1.1:1)),green2:b(()=>i.add(s.green.amount.value,1).log2().plus(1).pow(d.coalUpg.bought.value?2:1)),purple1:b(()=>i.pow(2,i.add(s.purple.amount.value,1).log2().sqrt()).pow(d.coalUpg.bought.value?1.2:1).pow(v.elfTraining.clothElfTraining.milestones[3].earned.value?1.1:1)),purple2:b(()=>i.add(s.purple.amount.value,1).log2().plus(1))},[I,r]=ol(()=>[{title:"Red Dye Creation",modifier:s.red.toGenerate,base:0},{title:"Yellow Dye Creation",modifier:s.yellow.toGenerate,base:0},{title:"Blue Dye Creation",modifier:s.blue.toGenerate,base:0},{title:"Orange Dye Creation",modifier:s.orange.toGenerate,base:0},{title:"Green Dye Creation",modifier:s.green.toGenerate,base:0},{title:"Purple Dye Creation",modifier:s.purple.toGenerate,base:0}]),d={blueDyeUpg:T(()=>({visibility:()=>p(i.add(s.orange.amount.value,s.green.amount.value).add(s.purple.amount.value).gte(1)||d.blueDyeUpg.bought.value),display:{title:"Is Blue Dye just Water?",description:f(()=>t(O,null,[o("Multiply Log gain by log"),t("sub",null,[o("10")]),o("(Auto Cutting Amount)+1.")]))},cost:1e3,resource:Q(s.blue.amount),onPurchase(){s.blue.amount.value=0,s.blue.buyable.amount.value=0}})),redDyeUpg:T(()=>({visibility:()=>p(i.add(s.orange.amount.value,s.green.amount.value).add(s.purple.amount.value).gte(10)||d.redDyeUpg.bought.value),display:{title:"Glistening Paint",description:f(()=>t(O,null,[o("Multiply Ore Purity by log"),t("sub",null,[o("10")]),o("(Cloth)+1.")]))},cost:1500,resource:Q(s.red.amount),onPurchase(){s.red.amount.value=0,s.red.buyable.amount.value=0}})),yellowDyeUpg:T(()=>({visibility:()=>p(i.add(s.orange.amount.value,s.green.amount.value).add(s.purple.amount.value).gte(100)||d.yellowDyeUpg.bought.value),display:{title:"Wetter Dyes",description:"Double Red, Yellow, and Blue Dye gain, but reset their amounts."},cost:2e3,resource:Q(s.yellow.amount),onPurchase(){s.red.amount.value=0,s.red.buyable.amount.value=0,s.yellow.amount.value=0,s.yellow.buyable.amount.value=0,s.blue.amount.value=0,s.blue.buyable.amount.value=0}})),yellowDyeUpg2:T(()=>({visibility:()=>p(d.yellowDyeUpg.bought.value),display:{title:"Golden Wash",description:"Halve the Oil cost of Red, Yellow, and Blue Dyes."},cost:5e3,resource:Q(s.yellow.amount),onPurchase(){s.yellow.amount.value=0,s.yellow.buyable.amount.value=0}})),redDyeUpg2:T(()=>({visibility:()=>p(d.redDyeUpg.bought.value),display:{title:"De Louvre",description:f(()=>t(O,null,[o("Multiply Smelting Speed by "),t(Gl,null,{default:()=>[o("Refineries+1")]}),o(".")]))},cost:6e3,resource:Q(s.red.amount),onPurchase(){s.red.amount.value=0,s.red.buyable.amount.value=0}})),blueDyeUpg2:T(()=>({visibility:()=>p(d.blueDyeUpg.bought.value),display:{title:"Hydrophobia",description:"Raise Red Dye's effect ^1.5."},cost:7500,resource:Q(s.blue.amount),onPurchase(){s.blue.amount.value=0,s.blue.buyable.amount.value=0}})),coalUpg:T(()=>({visibility:()=>p(d.blueDyeUpg2.bought.value&&d.redDyeUpg2.bought.value&&d.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:_.coal,onPurchase(){s.red.amount.value=0,s.red.buyable.amount.value=0,s.yellow.amount.value=0,s.yellow.buyable.amount.value=0,s.blue.amount.value=0,s.blue.buyable.amount.value=0}}))},u=se(!1),c=f(()=>t(Gi,{modelValue:u.value,"onUpdate:modelValue":y=>u.value=y},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:I})),j=fi(b(()=>Object.values(s).reduce((y,N)=>i.add(y,N.amount.value),0)),"Sum of Dyes"),{total:h,trackerDisplay:W}=Jl({resource:j,goal:6e4,name:e,day:Hm,color:l,textColor:"var(--feature-foreground)",modal:{show:u,display:c},ignoreTotal:!0});return{name:e,color:l,dyes:s,dyeSum:j,boosts:a,totalDyeSum:h,minWidth:700,generalTabCollapsed:r,upgrades:d,display:f(()=>t(O,null,[We(W),t(ge,null,null),t("div",{style:"width: 620px"},[di(s.red.display,s.yellow.display,s.blue.display),di(s.red.buyable,s.yellow.buyable,s.blue.buyable),t(ge,null,null),di(s.orange.display,s.green.display,s.purple.display),di(s.orange.buyable,s.green.buyable,s.purple.buyable)]),t(ge,null,null),t("div",{class:"row",style:"vertical-align: top"},[tl(d.redDyeUpg,d.redDyeUpg2),tl(d.yellowDyeUpg,d.yellowDyeUpg2),tl(d.blueDyeUpg,d.blueDyeUpg2)]),We(d.coalUpg)]))}}),Lm="boxes",Qn=6,ii=Ai(Lm,function(){const e="Boxes",l="#964B00",n=fi(0,"boxes"),s=oe(()=>[Z(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:Ii.milestones.extraExpansionMilestone5.earned})),nl(()=>({exponent:1.1,description:"Bell Level 2",enabled:v.elfTraining.boxElfTraining.milestones[1].earned}))]),a=Ks(()=>({scaling:es(1e10,1),baseResource:he.logs,gainResource:Q(n),roundUpCost:!0,gainModifier:s})),I=Ei(()=>({display:f(()=>t(O,null,[t("span",{style:"font-size: large"},[o("Create "),me(a.currentGain.value),o(" "),n.displayName]),t("br",null,null),t("span",{style:"font-size: large"},[o("Cost:")," ",hn(he.logs,i.gte(a.actualGain.value,1)?a.currentAt.value:a.nextAt.value)," ",he.logs.displayName])])),canClick:()=>i.gte(a.actualGain.value,1),onClick(){!m(this.canClick)||a.convert()},style:"width: 600px; min-height: unset"})),r=T(()=>({display:{title:"Carry logs in boxes",description:"Double log gain and unlock a new elf for training"},onPurchase(){L.days[3].recentlyUpdated.value=!0},resource:Q(n),cost:100})),d=T(()=>({display:{title:"Carry ash in boxes",description:"Double ash gain and unlock a new elf for training"},onPurchase(){L.days[3].recentlyUpdated.value=!0},resource:Q(n),cost:1e3})),u=T(()=>({display:{title:"Carry coal in boxes",description:"Double coal gain and unlock a new elf for training"},onPurchase(){L.days[3].recentlyUpdated.value=!0},resource:Q(n),cost:4e3})),c={logsUpgrade:r,ashUpgrade:d,coalUpgrade:u},j=T(()=>({resource:Q(n),cost:1e8,visibility:()=>p(ri.upgrades.boxTools.bought.value),display:{title:"Carry ore in boxes",description:"Double ore per mining op"}})),h=T(()=>({resource:Q(n),cost:1e9,visibility:()=>p(ri.upgrades.boxTools.bought.value),display:{title:"Carry metal in boxes",description:"Double ore purity"}})),W=T(()=>({resource:Q(n),cost:1e10,visibility:()=>p(ri.upgrades.boxTools.bought.value),display:{title:"Carry plastic in boxes",description:"Double plastic gain"}})),y={oreUpgrade:j,metalUpgrade:h,plasticUpgrade:W},N=T(()=>({resource:Q(n),cost:1e28,visibility:()=>p(v.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry cloth in boxes",description:"Double all cloth actions"}})),x=T(()=>({resource:Q(n),cost:1e29,visibility:()=>p(v.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry dye in boxes",description:"Double all dye gain but reset all dyes"},onPurchase(){["red","yellow","blue","orange","green","purple"].forEach(U=>{ve.dyes[U].amount.value=0,ve.dyes[U].buyable.amount.value=0})}})),M=T(()=>({resource:Q(n),cost:1e30,visibility:()=>p(v.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry experience in boxes???",description:"Double xp gain"}})),ne={clothUpgrade:N,dyeUpgrade:x,xpUpgrade:M},Y=He(()=>({display:{title:"Carry more logs",description:f(()=>t(O,null,[o("Use boxes to carry even more logs, boosting their gain"),t("br",null,null),t("br",null,null),t("div",null,[o("Amount: "),me(Y.amount.value),i.gt(Y.freeLevels.value,0)?t(O,null,[o(" (+"),me(Y.freeLevels.value),o(")")]):null])])),effectDisplay:f(()=>t(O,null,[K(i.div(Y.totalAmount.value,2).add(1)),o("x")])),showAmount:!1},resource:Q(n),cost(){let U=this.amount.value;U=i.pow(.95,F.books.boxBook.totalAmount.value).times(U);let Ie=3;return v.elfTraining.boxElfTraining.milestones[2].earned.value&&Ie--,i.pow(Ie,U).times(100).div(ve.boosts.orange2.value).div(ji.boosts.ocean1.value)},inverseCost(U){let Ie=3;v.elfTraining.boxElfTraining.milestones[2].earned.value&&Ie--;let $=i.mul(U,ji.boosts.ocean1.value).mul(ve.boosts.orange2.value).div(100).log(Ie);return $=$.div(i.pow(.95,F.books.boxBook.totalAmount.value)),i.isNaN($)?i.dZero:$.floor().max(0)},visibility:()=>p(r.bought.value),freeLevels:b(()=>v.elfTraining.boxElfTraining.milestones[0].earned.value?i.max(g.amount.value,1).sqrt().floor().add(i.max(G.amount.value,1).sqrt().floor()):0),totalAmount:b(()=>i.add(Y.amount.value,Y.freeLevels.value))})),g=He(()=>({display:{title:"Carry more ash",description:f(()=>t(O,null,[o("Use boxes to carry even more ash, boosting its gain"),t("br",null,null),t("br",null,null),t("div",null,[o("Amount: "),me(g.amount.value),i.gt(g.freeLevels.value,0)?t(O,null,[o(" (+"),me(g.freeLevels.value),o(")")]):null])])),effectDisplay:f(()=>t(O,null,[K(i.div(g.totalAmount.value,2).add(1)),o("x")])),showAmount:!1},resource:Q(n),cost(){let U=this.amount.value;U=i.pow(.95,F.books.boxBook.totalAmount.value).times(U);let Ie=5;return v.elfTraining.boxElfTraining.milestones[2].earned.value&&Ie--,i.pow(Ie,U).times(1e3).div(ve.boosts.orange2.value)},inverseCost(U){let Ie=5;v.elfTraining.boxElfTraining.milestones[2].earned.value&&Ie--;let $=i.mul(U,ve.boosts.orange2.value).div(1e3).log(Ie);return $=$.div(i.pow(.95,F.books.boxBook.totalAmount.value)),i.isNaN($)?i.dZero:$.floor().max(0)},visibility:()=>p(d.bought.value),freeLevels:b(()=>v.elfTraining.boxElfTraining.milestones[0].earned.value?i.max(Y.amount.value,1).sqrt().floor().add(i.max(G.amount.value,1).sqrt().floor()):0),totalAmount:b(()=>i.add(g.amount.value,g.freeLevels.value))})),G=He(()=>({display:{title:"Carry more coal",description:f(()=>t(O,null,[o("Use boxes to carry even more coal, boosting its gain"),t("br",null,null),t("br",null,null),t("div",null,[o("Amount: "),me(G.amount.value),i.gt(G.freeLevels.value,0)?t(O,null,[o(" (+"),me(G.freeLevels.value),o(")")]):null])])),effectDisplay:f(()=>t(O,null,[K(i.div(G.totalAmount.value,2).add(1)),o("x")])),showAmount:!1},resource:Q(n),cost(){let U=this.amount.value;U=i.pow(.95,F.books.boxBook.totalAmount.value).times(U);let Ie=7;return v.elfTraining.boxElfTraining.milestones[2].earned.value&&Ie--,i.pow(Ie,U).times(1e3).div(ve.boosts.orange2.value)},inverseCost(U){let Ie=7;v.elfTraining.boxElfTraining.milestones[2].earned.value&&Ie--;let $=i.mul(U,ve.boosts.orange2.value).div(1e3).log(Ie);return $=$.div(i.pow(.95,F.books.boxBook.totalAmount.value)),i.isNaN($)?i.dZero:$.floor().max(0)},visibility:()=>p(u.bought.value),freeLevels:b(()=>v.elfTraining.boxElfTraining.milestones[0].earned.value?i.max(Y.amount.value,1).sqrt().floor().add(i.max(g.amount.value,1).sqrt().floor()):0),totalAmount:b(()=>i.add(G.amount.value,G.freeLevels.value))})),P={logBoxesBuyable:Y,ashBoxesBuyable:g,coalBoxesBuyable:G},E=He(()=>({display:{title:"Carry more ore",description:f(()=>t(O,null,[o("Use boxes to carry even more ore, boosting their gain"),t("br",null,null),t("br",null,null),t("div",null,[o("Amount: "),me(E.amount.value),i.gt(E.freeLevels.value,0)?t(O,null,[o(" (+"),me(E.freeLevels.value),o(")")]):null])])),effectDisplay:f(()=>t(O,null,[K(i.div(E.totalAmount.value,2).add(1)),o("x")])),showAmount:!1},resource:Q(n),cost(){let U=this.amount.value;U=i.pow(.95,F.books.boxBook.amount.value).times(U);let Ie=10;return v.elfTraining.boxElfTraining.milestones[2].earned.value&&Ie--,i.pow(Ie,U).times(1e25).div(ve.boosts.orange2.value).div(ji.boosts.ocean1.value)},inverseCost(U){let Ie=10;v.elfTraining.boxElfTraining.milestones[2].earned.value&&Ie--;let $=i.mul(U,ji.boosts.ocean1.value).mul(ve.boosts.orange2.value).div(1e25).log(Ie);return $=$.div(i.pow(.95,F.books.boxBook.totalAmount.value)),i.isNaN($)?i.dZero:$.floor().max(0)},visibility:()=>p(v.elfTraining.boxElfTraining.milestones[3].earned.value),freeLevels:b(()=>v.elfTraining.boxElfTraining.milestones[0].earned.value?i.max(D.amount.value,1).sqrt().floor().add(i.max(Ze.amount.value,1).sqrt().floor()):0),totalAmount:b(()=>i.add(E.amount.value,E.freeLevels.value))})),D=He(()=>({display:{title:"Carry more metal",description:f(()=>t(O,null,[o("Use boxes to carry even more metal, boosting its gain"),t("br",null,null),t("br",null,null),t("div",null,[o("Amount: "),me(D.amount.value),i.gt(D.freeLevels.value,0)?t(O,null,[o(" (+"),me(D.freeLevels.value),o(")")]):null])])),effectDisplay:f(()=>t(O,null,[K(i.div(D.totalAmount.value,2).add(1)),o("x")])),showAmount:!1},resource:Q(n),cost(){let U=this.amount.value;U=i.pow(.95,F.books.boxBook.amount.value).times(U);let Ie=15;return v.elfTraining.boxElfTraining.milestones[2].earned.value&&Ie--,i.pow(Ie,U).times(1e28).div(ve.boosts.orange2.value)},inverseCost(U){let Ie=15;v.elfTraining.boxElfTraining.milestones[2].earned.value&&Ie--;let $=i.mul(U,ve.boosts.orange2.value).div(1e28).log(Ie);return $=$.div(i.pow(.95,F.books.boxBook.totalAmount.value)),i.isNaN($)?i.dZero:$.floor().max(0)},visibility:()=>p(v.elfTraining.boxElfTraining.milestones[3].earned.value),freeLevels:b(()=>v.elfTraining.boxElfTraining.milestones[0].earned.value?i.max(E.amount.value,1).sqrt().floor().add(i.max(Ze.amount.value,1).sqrt().floor()):0),totalAmount:b(()=>i.add(D.amount.value,D.freeLevels.value))})),Ze=He(()=>({display:{title:"Carry more plastic",description:f(()=>t(O,null,[o("Use boxes to carry even more plastic, boosting its gain"),t("br",null,null),t("br",null,null),t("div",null,[o("Amount: "),me(Ze.amount.value),i.gt(Ze.freeLevels.value,0)?t(O,null,[o(" (+"),me(Ze.freeLevels.value),o(")")]):null])])),effectDisplay:f(()=>t(O,null,[K(i.div(Ze.totalAmount.value,2).add(1)),o("x")])),showAmount:!1},resource:Q(n),cost(){let U=this.amount.value;U=i.pow(.95,F.books.boxBook.amount.value).times(U);let Ie=20;return v.elfTraining.boxElfTraining.milestones[2].earned.value&&Ie--,i.pow(Ie,U).times(1e31).div(ve.boosts.orange2.value)},inverseCost(U){let Ie=20;v.elfTraining.boxElfTraining.milestones[2].earned.value&&Ie--;let $=i.mul(U,ve.boosts.orange2.value).div(1e31).log(Ie);return $=$.div(i.pow(.95,F.books.boxBook.totalAmount.value)),i.isNaN($)?i.dZero:$.floor().max(0)},visibility:()=>p(v.elfTraining.boxElfTraining.milestones[3].earned.value),freeLevels:b(()=>v.elfTraining.boxElfTraining.milestones[0].earned.value?i.max(E.amount.value,1).sqrt().floor().add(i.max(D.amount.value,1).sqrt().floor()):0),totalAmount:b(()=>i.add(Ze.amount.value,Ze.freeLevels.value))})),Ve={oreBoxesBuyable:E,metalBoxesBuyable:D,plasticBoxesBuyable:Ze};ui.on("update",U=>{i.lt(L.day.value,Qn)||(n.value=i.times(U,ri.buyables.passiveBoxes.amount.value).times(a.currentGain.value).div(100).add(n.value))});const[Fe,ke]=ol(()=>[{title:"Boxes Gain",modifier:s,base:()=>a.scaling.currentGain(a)}]),ce=se(!1),Pe=f(()=>t(Gi,{modelValue:ce.value,"onUpdate:modelValue":U=>ce.value=U},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:Fe})),{total:Re,trackerDisplay:je}=Jl({resource:n,goal:5e4,name:e,day:Qn,color:l,modal:{display:Pe,show:ce}});return{name:e,day:Qn,color:l,boxes:n,totalBoxes:Re,boxesConversion:a,upgrades:c,row2Upgrades:y,row3Upgrades:ne,buyables:P,buyables2:Ve,minWidth:700,generalTabCollapsed:ke,display:f(()=>t(O,null,[We(je),t(ge,null,null),t(Qi,{resource:n,color:l,style:"margin-bottom: 0"},null),t(ge,null,null),We(I),t(ge,null,null),Yl(Object.values(c),Object.values(y),Object.values(ne)),t(ge,null,null),Yl(Object.values(P),Object.values(Ve))])),minimizedDisplay:f(()=>t("div",null,[e,o(" - "),K(n.value),o(" "),n.displayName]))}});var et="data:image/png;base64,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",it="./assets/cloth.7bcd7f37.png",lt="data:image/png;base64,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",nt="data:image/png;base64,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",st="./assets/elf.9fbfa563.png",tt="./assets/elfManagement.436c8744.png",at="./assets/metal.7407f5d1.png",ot="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAFxGAABcRgEUlENBAAAAG3RFWHRTb2Z0d2FyZQBDZWxzeXMgU3R1ZGlvIFRvb2zBp+F8AAAE/ElEQVR42u3dW3baMBRAURhzO4x2zO5P25WPPAhIuq99JhAsayNwbHG/rusm6f3ugEiASIBIgEiASIBIgEiASIBIgNQ+mPv9/8Fc13V3ejUeyFsUnwWMRgF5FAYoGgXkWRiQqD2QFThAUUsgq3FAIkAgESCQCJDtQCARIJAIEEAECCQCJArISSQfHRekgIxG4h4yQCBZdAyQADLi+0jlGyw/e+2dAY+7mzdqgr76ek9OQjeENgBSDUl2IO51awjkJJRXTnTWd2T/WxoCJDOSla9r1UQ7faGjMpKWmzZk+riQCUgEjOpIWu9qsmNCfOckZ3nAKxpGZSRjtv2JeCePXj0ywQBkEJZHTnLk6pERBiDDsHx1oqOAZMZREYmdFZ+YYBlXkAowABmAJuqd/LO/WwkHIDqGoxoM30F0DEhFHIBoO5CqMADRFiBwAALIA5MKDkCWTbTIk7Hj41V1HIAknmCnT06HyQxHUiDVd0+EoxeOVEA6PKMASC8caYBkmFjVn7WAoymQrBPr7ZfjTvdBwVEISPVbJcDojQMQwQGI4ABEcAAiMAARMIAAAgwggKg8FEAECSACBBBB0gsIJIAAAogAgUS+gwAiQCARHAmBQAIIIJCoGKCU+2JBAgwgkKgAFiuIQPElXZAUBgKGsiJxq4kgyQgEDFVAEgIEDlVBchwIHAIEDDVBcgQIHAIEDgEChwABRJDsBgKHAIFDgAAiQOAQIIAIEEAECCASIBIgUk4cgAgQQAQHIAKkBhBI1AXHNiCgqAOO7UAgUWUcR4DAooowQoAAo0o4woFAoqwwrCACAxCBURQIHMoMIxQIHLKCAKIGWGxeLVCyAIFD1ZAAIlAyAInG8dXgwgvJWCDfHVRYIDkKJGLCrRhEUABpB2T14EEyG0mr50F2DRokgJQHsn13C0hGImnxyO2RgSoI5N+4dMUNSLblNvlEm3a1rjSQbjiyT6iJV+0ASQYk8yRaOQ5VoACSEMjfY/t1u91+JJknv6/r+ukNoRCQDpd2AckNBRBAUgHJhgWQpDgSvpseBxI9FuVvNekOJNEqEooj4ryXv5u3+8crQOLmQYvnQSasHoCcnxdtth4FpAaQj85T0EWPK9O5BaTPl/WngDzyujPvVQVIkZMXDGT56gELIIC88NonQgFkKBBImgLJdoICkSy5gvXs658Cpdw/CgFZC+TVY+gOpRSQlJsbNwACCSDdgGz5ByEkh4DsmDhZT0AnIJAcBLJyAmUf+AAkKYF0RAIIIJBEApmwbAPSF0nqnz+oMsiAAHJ08CsO7uG7e0ts1NABSaqfga48oAeBbH8GZOWKWB1JKJBOdQEy5fI8IH2/h5RaQcp/MgAEkN3HAYhOfsyyggACSCcglZEAAggggAACCCCAAAIIIDV3cwdEp5AAAgggnYC4zKt2QFYiAUQtgaxA4l4stQbyChK3u2sEkGeRAKIxQL4DxTPpikSS5kdz3sNiVxMB8g4UG8cJkInnEhBABAggAgQQAQIIIIAAAgggkAACCCCAACJAABEggAgQAQKIAAFEgAAiQACBBBBAAAEEEEAAESCACBBABAggRqEeEEgAAQQQQAABBBBAAAFEp4FAAggggAACCCCAAAIJIAIEECXCAQgggEACCCCAAAIIIIAoAggkgAACCCBwAAIIIJAAAggggCgZEEgAgQMQQACBBBBAAAEEDkgK9wfV+oLa+LwMvQAAAABJRU5ErkJggg==",mt="./assets/paperStacks.4c96ec8c.png",It="./assets/plastic.b8ac74ff.png",rt="./assets/sws.714ad454.png",dt="./assets/tree.35808197.png",ut="./assets/workshopMansion.f5e58b53.png",Qm="./assets/wrappingPaper.7d754375.png";const L=Ai("main",function(){const e=Se(1),l=b(()=>(+new Date(new Date().getFullYear(),11,e.value)-Je.time)/1e3),n=se(!1),s=se(-1),a=se(""),I=se();function r(c){const j=Se(!1),h=Se(!1);return _i(()=>{const W=c(),y=Fi(W.shouldNotify),N=Fi(()=>m(y)||m(h));return{...W,opened:j,shouldNotify:N,recentlyUpdated:h,[Ll]:fo,[Ql]:function(){const{day:x,layer:M,symbol:ne,opened:Y,shouldNotify:g,story:G,completedStory:P,recentlyUpdated:E}=this;return{day:x,symbol:ne,layer:M,opened:Y,recentlyUpdated:E,shouldNotify:g,onOpenLore(){var Ve,Fe;const D=L.day.value>x;s.value=D?x-1:-1;const Ze=m((Fe=(Ve=Ri[M!=null?M:"trees"])==null?void 0:Ve.name)!=null?Fe:"");a.value=D?`${Ze} - Completed!`:Ze,I.value=D?`${G}(Y.push({label:g.split("/").slice(-1)[0].slice(0,-4),value:d[g]}),Y),[]));const c=Mn({});function j(Y){if(c[Y]==null){let g=localStorage.getItem(Y);if(g==null)c[Y]={error:"Save doesn't exist in localStorage",id:Y};else if(g==="dW5kZWZpbmVk")c[Y]={error:"Save is undefined",id:Y};else try{if(g[0]!=="{")if(g[0]==="e")g=decodeURIComponent(escape(atob(g)));else if(g[0]==="\u1BE1")g=Fl.decompressFromUTF16(g);else return console.warn("Unable to determine preset encoding",g),a.value=!0,c[Y]={error:"Unable to determine preset encoding",id:Y},c[Y];c[Y]={...JSON.parse(g),id:Y}}catch(G){c[Y]={error:G,id:Y},console.warn(`SavesManager: Failed to load info about save with id ${Y}:
${G}
${g}`)}}return c[Y]}yl(n,Y=>{Y&&Object.keys(c).forEach(g=>delete c[g])});const h=b(()=>Zi.saves.reduce((Y,g)=>(Y[g]=j(g),Y),{}));function W(Y){let g;switch(Je.id===Y?g=Es(Je[wi]):g=JSON.stringify(h.value[Y]),ni.exportEncoding){default:console.warn(`Unknown save encoding: ${ni.exportEncoding}. Defaulting to lz`);case"lz":g=Fl.compressToUTF16(g);break;case"base64":g=btoa(unescape(encodeURIComponent(g)));break;case"plain":break}const G=document.createElement("textarea");G.value=g,document.body.appendChild(G),G.select(),G.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(G)}function y(Y){Je.id===Y&&Ki();const g={...h.value[Y],id:jn()};Ki(g),Zi.saves.push(g.id)}function N(Y){Zi.saves=Zi.saves.filter(g=>g!==Y),localStorage.removeItem(Y),c[Y]=void 0}function x(Y){h.value[Je.id].time=Je.time,Ki(),c[Je.id]=void 0,Bl(h.value[Y]),c[Y]=void 0}function M(Y){if(r.value=Y,Dl(()=>{r.value=null}),Y[0]!=="{")if(Y[0]==="e")Y=decodeURIComponent(escape(atob(Y)));else if(Y[0]==="\u1BE1")Y=Fl.decompressFromUTF16(Y);else{console.warn("Unable to determine preset encoding",Y);return}const g=JSON.parse(Y);g.id=jn(),Ki(g),Zi.saves.push(g.id),x(g.id)}function ne(Y,g){const G=h.value[Y];G&&(G.name=g,Je.id===Y?(Je.name=g,Ki()):(Ki(G),c[Y]=void 0))}return(Y,g)=>(C(),Oe(Gi,{modelValue:n.value,"onUpdate:modelValue":g[4]||(g[4]=G=>n.value=G),ref_key:"modal",ref:s},{header:we(()=>[pr]),body:we(({shown:G})=>[G?(C(),Oe(m(Xt),{key:0,list:m(Zi).saves,handle:".handle",itemKey:P=>P},{item:we(({element:P})=>[t(Zr,{save:m(h)[P],onOpen:E=>x(P),onExport:E=>W(P),onEditName:E=>ne(P,E),onDuplicate:E=>y(P),onDelete:E=>N(P)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):ee("",!0)]),footer:we(()=>[V("div",yr,[t(Zt,{modelValue:I.value,"onUpdate:modelValue":g[0]||(g[0]=G=>I.value=G),title:"Import Save",placeholder:"Paste your save here!",class:Ci({importingFailed:a.value})},null,8,["modelValue","class"]),V("div",hr,[Vr,V("div",Wr,[V("button",{class:"button",onClick:g[1]||(g[1]=G=>x(m(Kl)().id))},"New Game"),Object.keys(m(u)).length>0?(C(),Oe(ls,{key:0,options:m(u),modelValue:r.value,"onUpdate:modelValue":g[2]||(g[2]=G=>M(G)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):ee("",!0)])]),V("div",vr,[jr,V("button",{class:"button modal-default-button",onClick:g[3]||(g[3]=G=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var pt=ai(Jr,[["__scopeId","data-v-3b9991aa"]]);const el=e=>(Rl("data-v-8495e562"),e=e(),Hl(),e),fr=["src","alt"],Cr={key:1,class:"title"},wr=el(()=>V("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),gr={class:"discord"},Or={class:"discord-links"},Yr={key:0},Nr=["href"],Xr=el(()=>V("li",null,[V("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Mr=el(()=>V("li",null,[V("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),xr={href:"https://forums.moddingtree.com/",target:"_blank"},Gr=el(()=>V("span",{class:"material-icons"},"forum",-1)),Fr=el(()=>V("span",{class:"material-icons"},"info",-1)),kr=el(()=>V("span",{class:"material-icons"},"library_books",-1)),zr=el(()=>V("span",{class:"material-icons"},"settings",-1)),Sr=el(()=>V("span",{class:"material-icons"},"library_books",-1)),Rr=el(()=>V("span",{class:"material-icons"},"settings",-1)),Hr=el(()=>V("span",{class:"material-icons"},"info",-1)),Lr={href:"https://forums.moddingtree.com/",target:"_blank"},Qr=el(()=>V("span",{class:"material-icons"},"forum",-1)),Tr={class:"discord"},Ur={class:"discord-links"},Er={key:0},Ar=["href"],Br=el(()=>V("li",null,[V("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Dr=el(()=>V("li",null,[V("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),_r=Ge({__name:"Nav",setup(e){const l=se(null),n=se(null),s=se(null),a=se(null),{useHeader:I,banner:r,title:d,discordName:u,discordLink:c,versionNumber:j}=ni;function h(){window.open(c,"mywindow")}return(W,y)=>(C(),R(O,null,[m(I)?(C(),R("div",_l({key:0,class:"nav"},W.$attrs),[m(r)?(C(),R("img",{key:0,src:m(r),class:"banner",alt:m(d)},null,8,fr)):(C(),R("div",Cr,Le(m(d)),1)),V("div",{onClick:y[0]||(y[0]=N=>{var x;return(x=a.value)==null?void 0:x.open()}),class:"version-container"},[t(Mi,{display:"Changelog",direction:m(Ue).Down,class:"version"},{default:we(()=>[V("span",null,"v"+Le(m(j)),1)]),_:1},8,["direction"])]),wr,V("div",gr,[V("span",{onClick:h,class:"material-icons"},"discord"),V("ul",Or,[m(c)?(C(),R("li",Yr,[V("a",{href:m(c),target:"_blank"},Le(m(u)),9,Nr)])):ee("",!0),Xr,Mr])]),V("div",null,[V("a",xr,[t(Mi,{display:"Forums",direction:m(Ue).Down,yoffset:"5px"},{default:we(()=>[Gr]),_:1},8,["direction"])])]),V("div",{onClick:y[1]||(y[1]=N=>{var x;return(x=l.value)==null?void 0:x.open()})},[t(Mi,{display:"Info",direction:m(Ue).Down,class:"info"},{default:we(()=>[Fr]),_:1},8,["direction"])]),V("div",{onClick:y[2]||(y[2]=N=>{var x;return(x=n.value)==null?void 0:x.open()})},[t(Mi,{display:"Saves",direction:m(Ue).Down,xoffset:"-20px"},{default:we(()=>[kr]),_:1},8,["direction"])]),V("div",{onClick:y[3]||(y[3]=N=>{var x;return(x=s.value)==null?void 0:x.open()})},[t(Mi,{display:"Options",direction:m(Ue).Down,xoffset:"-66px"},{default:we(()=>[zr]),_:1},8,["direction"])])],16)):(C(),R("div",_l({key:1,class:"overlay-nav"},W.$attrs),[V("div",{onClick:y[4]||(y[4]=N=>{var x;return(x=a.value)==null?void 0:x.open()}),class:"version-container"},[t(Mi,{display:"Changelog",direction:m(Ue).Right,xoffset:"25%",class:"version"},{default:we(()=>[V("span",null,"v"+Le(m(j)),1)]),_:1},8,["direction"])]),V("div",{onClick:y[5]||(y[5]=N=>{var x;return(x=n.value)==null?void 0:x.open()})},[t(Mi,{display:"Saves",direction:m(Ue).Right},{default:we(()=>[Sr]),_:1},8,["direction"])]),V("div",{onClick:y[6]||(y[6]=N=>{var x;return(x=s.value)==null?void 0:x.open()})},[t(Mi,{display:"Options",direction:m(Ue).Right},{default:we(()=>[Rr]),_:1},8,["direction"])]),V("div",{onClick:y[7]||(y[7]=N=>{var x;return(x=l.value)==null?void 0:x.open()})},[t(Mi,{display:"Info",direction:m(Ue).Right},{default:we(()=>[Hr]),_:1},8,["direction"])]),V("div",null,[V("a",Lr,[t(Mi,{display:"Forums",direction:m(Ue).Right,xoffset:"7px"},{default:we(()=>[Qr]),_:1},8,["direction"])])]),V("div",Tr,[V("span",{onClick:h,class:"material-icons"},"discord"),V("ul",Ur,[m(c)?(C(),R("li",Er,[V("a",{href:m(c),target:"_blank"},Le(m(u)),9,Ar)])):ee("",!0),Br,Dr])])],16)),t(XI,{ref_key:"info",ref:l,changelog:a.value},null,8,["changelog"]),t(pt,{ref_key:"savesManager",ref:n},null,512),t(RI,{ref_key:"options",ref:s},null,512),t(ZI,{ref_key:"changelog",ref:a},null,512)],64))}});var yt=ai(_r,[["__scopeId","data-v-8495e562"]]);const ts=e=>(Rl("data-v-e251e576"),e=e(),Hl(),e),Pr={class:"inner-tab"},qr={key:1},$r=ts(()=>V("br",null,null,-1)),Kr=o(" You can help continue the "),ed=ts(()=>V("i",null,"advent",-1)),id=o("ure at: "),ld=ts(()=>V("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[V("span",{class:"material-icons info-modal-discord"},"discord"),o(" The Paper Pilot Community ")],-1)),nd=Ge({__name:"Game",setup(e){const l=hl(Je,"tabs"),n=b(()=>Object.keys(Ri)),s=ni.useHeader,a=Xl(L.loreBody);function I(r){const{display:d,minimized:u,minWidth:c,name:j,color:h,minimizable:W,nodes:y,minimizedDisplay:N}=r;return{display:d,minimized:u,minWidth:c,name:j,color:h,minimizable:W,nodes:y,minimizedDisplay:N}}return(r,d)=>(C(),R("div",{class:Ci(["tabs-container",{useHeader:m(s)}])},[(C(!0),R(O,null,gs(m(l),(u,c)=>{var j,h;return C(),R("div",{key:c,class:Ci(["tab",m((j=m(Ri)[u])==null?void 0:j.classes)]),ref_for:!0,ref:`tab-${c}`,style:Ji(m((h=m(Ri)[u])==null?void 0:h.style))},[c===0&&!m(s)?(C(),Oe(yt,{key:0})):ee("",!0),V("div",Pr,[m(n).includes(u)?(C(),Oe(dI,_l({key:0},I(m(Ri)[u]),{index:c,tab:()=>{var W;return(W=r.$refs[`tab-${c}`])==null?void 0:W[0]}}),null,16,["index","tab"])):(C(),Oe(hi(u),{key:1,index:c},null,8,["index"]))])],6)}),128)),t(Gi,{modelValue:m(L).showLoreModal.value,"onUpdate:modelValue":d[0]||(d[0]=u=>m(L).showLoreModal.value=u)},{header:we(()=>[V("h2",null,Le(m(L).loreTitle.value),1)]),body:we(()=>[m(a)?(C(),Oe(hi(m(a)),{key:0})):ee("",!0),m(L).loreScene.value!==-1?(C(),R("div",qr,[t(oI,{day:m(L).loreScene.value},null,8,["day"]),$r,Kr,ed,id,ld])):ee("",!0)]),_:1},8,["modelValue"])],2))}});var sd=ai(nd,[["__scopeId","data-v-e251e576"]]);const Vn=e=>(Rl("data-v-4a50ce42"),e=e(),Hl(),e),td={class:"game-over-modal-header"},ad=["src","alt"],od={class:"game-over-modal-title"},md=Vn(()=>V("h2",null,"Congratulations!",-1)),Id={key:0},rd=Vn(()=>V("br",null,null,-1)),dd=Vn(()=>V("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),ud=Vn(()=>V("br",null,null,-1)),cd=["href"],bd=Vn(()=>V("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),Zd=Ge({__name:"GameOverScreen",setup(e){const{title:l,logo:n,discordName:s,discordLink:a,versionNumber:I,versionTitle:r}=ni,d=b(()=>ln(Je.timePlayed)),u=b(()=>ns.value&&!Je.keepGoing),c=hl(Je,"autosave");function j(){Je.keepGoing=!0}function h(){Bl(Kl())}return(W,y)=>(C(),Oe(Gi,{"model-value":m(u)},{header:we(()=>[V("div",td,[m(n)?(C(),R("img",{key:0,class:"game-over-modal-logo",src:m(n),alt:m(l)},null,8,ad)):ee("",!0),V("div",od,[md,V("h4",null,"You've beaten "+Le(m(l))+" v"+Le(m(I))+": "+Le(m(r)),1)])])]),body:we(({shown:N})=>[N?(C(),R("div",Id,[V("div",null,"It took you "+Le(m(d))+" to beat the game.",1),rd,dd,ud,V("div",null,[V("a",{href:m(a),class:"game-over-modal-discord-link"},[bd,o(" "+Le(m(s)),1)],8,cd)]),t(jl,{title:"Autosave",modelValue:m(c),"onUpdate:modelValue":y[0]||(y[0]=x=>xi(c)?c.value=x:null)},null,8,["modelValue"])])):ee("",!0)]),footer:we(()=>[V("div",{class:"game-over-footer"},[V("button",{onClick:j,class:"button"},"Keep Going"),V("button",{onClick:h,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var pd=ai(Zd,[["__scopeId","data-v-4a50ce42"]]);const kn=e=>(Rl("data-v-3de07c06"),e=e(),Hl(),e),yd=kn(()=>V("div",{class:"nan-modal-header"},[V("h2",null,"NaN value detected!")],-1)),hd={key:0},Vd=kn(()=>V("br",null,null,-1)),Wd=["href"],vd=kn(()=>V("span",{class:"material-icons nan-modal-discord"},"discord",-1)),jd=kn(()=>V("br",null,null,-1)),Jd={class:"nan-footer"},fd=Ge({__name:"NaNScreen",setup(e){const{discordName:l,discordLink:n}=ni,s=hl(Je,"autosave"),a=hl(Xi,"hasNaN"),I=se(null),r=b(()=>{var y;return(y=Xi.NaNPath)==null?void 0:y.join(".")}),d=b(()=>{var y;return(y=Xi.NaNPath)==null?void 0:y.slice(-1)[0]}),u=b(()=>Xi.NaNReceiver&&d.value?Xi.NaNReceiver[d.value]:null),c=b({get(){return Je.devSpeed===0},set(y){Je.devSpeed=y?null:0}});function j(){Xi.NaNReceiver&&d.value&&(Xi.NaNReceiver[d.value]=new i(0),Xi.hasNaN=!1)}function h(){Xi.NaNReceiver&&d.value&&(Xi.NaNReceiver[d.value]=new i(1),Xi.hasNaN=!1)}function W(){Xi.NaNReceiver&&d.value&&(Xi.NaNReceiver[d.value]=new i(NaN),Xi.hasNaN=!1)}return(y,N)=>(C(),R(O,null,[t(Gi,_l({modelValue:m(a),"onUpdate:modelValue":N[4]||(N[4]=x=>xi(a)?a.value=x:null)},y.$attrs),{header:we(()=>[yd]),body:we(()=>[V("div",null,[o(' Attempted to assign "'+Le(m(r))+'" to NaN',1),m(u)?(C(),R("span",hd,Le(" ")+"(previously "+Le(m(K)(m(u)))+")",1)):ee("",!0),o(". Auto-saving has been "+Le(m(s)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),Vd,V("div",null,[V("a",{href:m(n),class:"nan-modal-discord-link"},[vd,o(" "+Le(m(l)),1)],8,Wd)]),jd,t(jl,{title:"Autosave",modelValue:m(s),"onUpdate:modelValue":N[0]||(N[0]=x=>xi(s)?s.value=x:null)},null,8,["modelValue"]),m(ni).enablePausing?(C(),Oe(jl,{key:0,title:"Pause game",modelValue:m(c),"onUpdate:modelValue":N[1]||(N[1]=x=>xi(c)?c.value=x:null)},null,8,["modelValue"])):ee("",!0)]),footer:we(()=>[V("div",Jd,[V("button",{onClick:N[2]||(N[2]=x=>{var M;return(M=I.value)==null?void 0:M.open()}),class:"button"},"Open Saves Manager"),V("button",{onClick:j,class:"button"},"Set to 0"),V("button",{onClick:h,class:"button"},"Set to 1"),m(u)&&m(i).neq(m(u),0)&&m(i).neq(m(u),1)?(C(),R("button",{key:0,onClick:N[3]||(N[3]=x=>a.value=!1),class:"button"}," Set to previous ")):ee("",!0),V("button",{onClick:W,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),t(pt,{ref_key:"savesManager",ref:I},null,512)],64))}});var Cd=ai(fd,[["__scopeId","data-v-3de07c06"]]);const wd={key:0,class:"tpsDisplay"},gd={key:0,class:"low"},Od=Ge({__name:"TPS",setup(e){const l=b(()=>i.div(Xi.lastTenTicks.length,Xi.lastTenTicks.reduce((I,r)=>I+r,0))),n=se([]);Di(()=>{n.value.push(Math.round(l.value.toNumber())),n.value.length>10&&(n.value=n.value.slice(1))});const s=b(()=>n.value.reduce((I,r)=>i.max(I,r),0)),a=b(()=>i.sub(l.value,s.value).gt(1));return(I,r)=>m(l).isNan()?ee("",!0):(C(),R("div",wd,[o(" TPS: "+Le(m(me)(m(l)))+" ",1),t(Xn,{name:"fade"},{default:we(()=>[m(a)?(C(),R("span",gd,Le(m(me)(m(s))),1)):ee("",!0)]),_:1})]))}});var Yd=ai(Od,[["__scopeId","data-v-46a3ed5b"]]);var Nd=Ge({__name:"App",setup(e){const l=ni.useHeader,n=b(()=>on[Zi.theme].variables),s=hl(Zi,"showTPS"),a=b(()=>li(f(()=>t(O,null,[qa.map(We)]))));return(I,r)=>(C(),R(O,null,[V("div",{id:"modal-root",style:Ji(m(n))},null,4),V("div",{class:Ci(["app",{useHeader:m(l)}]),style:Ji(m(n))},[m(l)?(C(),Oe(yt,{key:0})):ee("",!0),t(sd),m(m(s))?(C(),Oe(Yd,{key:1})):ee("",!0),t(pd),t(Cd),(C(),Oe(hi(m(a))))],6)],64))}});var Xd=ai(Nd,[["__scopeId","data-v-580927bb"]]);function Md(e={}){const{immediate:l=!1,onNeedRefresh:n,onOfflineReady:s,onRegistered:a,onRegisterError:I}=e;let r,d;const u=async(c=!0)=>{c&&(r==null||r.addEventListener("controlling",j=>{j.isUpdate&&window.location.reload()})),d&&d.waiting&&await Gt(d.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){r=new xt("./sw.js",{scope:"./",type:"classic"}),r.addEventListener("activated",c=>{c.isUpdate||s==null||s()});{const c=()=>{n==null||n()};r.addEventListener("waiting",c),r.addEventListener("externalwaiting",c)}r.register({immediate:l}).then(c=>{d=c,a==null||a(c)}).catch(c=>{I==null||I(c)})}return u}function xd(e={}){const{immediate:l=!0,onNeedRefresh:n,onOfflineReady:s,onRegistered:a,onRegisterError:I}=e,r=se(!1),d=se(!1);return{updateServiceWorker:Md({immediate:l,onNeedRefresh(){r.value=!0,n==null||n()},onOfflineReady(){d.value=!0,s==null||s()},onRegistered:a,onRegisterError:I}),offlineReady:d,needRefresh:r}}document.title=ni.title;window.projInfo=ni;if(ni.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 Aa();const{globalBus:e}=await fn(()=>Promise.resolve().then(function(){return Ya}),void 0),{startGameLoop:l}=await fn(()=>import("./gameLoop.ee411b18.js"),["assets/gameLoop.ee411b18.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"]),n=window.vue=gt(Xd);e.emit("setupVue",n),n.mount("#app"),Dl(()=>{const s=Ys(),{updateServiceWorker:a}=xd({onNeedRefresh(){s.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(){a()}})},onOfflineReady(){s.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(I){I&&setInterval(()=>I.update(),60*60*1e3)}})}),l()});export{i as D,fn as _,Xi as a,ni as b,Em as c,ui as g,$n as l,Je as p,Zi 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 Aa();const{globalBus:e}=await fn(()=>Promise.resolve().then(function(){return Ya}),void 0),{startGameLoop:l}=await fn(()=>import("./gameLoop.6b8a410b.js"),["assets/gameLoop.6b8a410b.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"]),n=window.vue=gt(Xd);e.emit("setupVue",n),n.mount("#app"),Dl(()=>{const s=Ys(),{updateServiceWorker:a}=xd({onNeedRefresh(){s.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(){a()}})},onOfflineReady(){s.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(I){I&&setInterval(()=>I.update(),60*60*1e3)}})}),l()});export{i as D,fn as _,Xi as a,ni as b,Em as c,ui as g,$n as l,Je as p,Zi as s};
diff --git a/index.html b/index.html
index c58e19b..7d7b7c2 100644
--- a/index.html
+++ b/index.html
@@ -13,7 +13,7 @@
Advent Incremental
-
+
diff --git a/sw.js b/sw.js
index 1154af7..cd4d271 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.ee411b18.js",revision:null},{url:"assets/index.65f09059.js",revision:null},{url:"assets/index.efcf3a7b.css",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:"40553ba1cf8cdfdaa43786f63c1e5c10"},{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.6b8a410b.js",revision:null},{url:"assets/index.9d6a97f6.js",revision:null},{url:"assets/index.efcf3a7b.css",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:"1ab29842b786bca311990de80f166442"},{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")))}));