/* empty css */import"./vue.92681fcb.js";import{ZasN,lasFe,aaasQ,tasO,ayasAn,arasKt,aEasy,a0asM,aKas_t,a1asf,OasB,aGasyn,Aasje,_asG,a8asu,b6asL,b8asIn,bsasSl,Casr,aqasWt,buason,bbasEn,Taski,a7asp,uasBn,jasCi,bvasul,qasdn,b1asyt,GasIe,aCasMl,wasrt,b2asat,aoasNi,IasTe,JasW,$asP,aHasMt,aFasAt,zasbt,aNasbe,alaskn,aLasRt,HasSi,aJasAl,bnasMi,brasAi,beasIi}from"./@vue.4ce677c2.js";import{casIl}from"./nanoevents.1080beb7.js";import{LasTt}from"./lz-string.731cedc5.js";import{iasEi}from"./is-plain-object.906d88e8.js";import{YasBi}from"./vue-next-select.a2bfab1d.js";import{sasxi,uasEl}from"./vue-toastification.6f567382.js";import{DasPi}from"./vuedraggable.7949458c.js";import{pasFi}from"./vue-textarea-autosize.35804eaf.js";import{vasTi,nasDi}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const$i=function(){constt=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(constaofdocument.querySelectorAll('link[rel="modulepreload"]'))l(a);newMutationObserver(a=>{for(constsofa)if(s.type==="childList")for(constoofs.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&l(o)}).observe(document,{childList:!0,subtree:!0});functionn(a){consts={};returna.integrity&&(s.integrity=a.integrity),a.referrerpolicy&&(s.referrerPolicy=a.referrerpolicy),a.crossorigin==="use-credentials"?s.credentials="include":a.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}functionl(a){if(a.ep)return;a.ep=!0;consts=n(a);fetch(a.href,s)}};$i();constRi="modulepreload",cl={},Oi="./",Cn=function(t,n){return!n||n.length===0?t():Promise.all(n.map(l=>{if(l=`${Oi}${l}`,lincl)return;cl[l]=!0;consta=l.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${s}`))return;consto=document.createElement("link");if(o.rel=a?"stylesheet":Ri,a||(o.as="script",o.crossOrigin=""),o.href=l,document.head.appendChild(o),a)returnnewPromise((c,m)=>{o.addEventListener("load",c),o.addEventListener("error",()=>m(newError(`Unable to preload CSS for ${l}`)))})})).then(()=>t())},Ui="./projInfo-schema.json",qi="Advent Incremental",Vi="An incremental game you play a day at a time, leading up to Christmas!",Li="advent-incremental",Gi="thepaperpilot and friends",Hi="",Qi="",zi="0.3",ji="Initial Commit",Ki=!0,Wi=!1,Ji=2,Xi=!0,Yi=null,Zi="",ea=["main"],ta=3600,na=0,la=!0,ia="base64";varre={$schema:Ui,title:qi,description:Vi,id:Li,author:Gi,discordName:Hi,discordLink:Qi,versionNumber:zi,versionTitle:ji,allowGoBack:Ki,defaultShowSmall:Wi,defaultDecimalsShown:Ji,useHeader:Xi,banner:Yi,logo:Zi,initialTabs:ea,maxTickLength:ta,offlineLimit:na,enablePausing:la,exportEncoding:ia};constUn=17,aa=9e15,sa=Math.log10(9e15),oa=1/9e15,ra=308,ua=-324,dl=5,ca=function(){conste=[];for(letn=ua+1;n<=ra;n++)e.push(Number("1e"+n));constt=323;returnfunction(n){returne[n+t]}}(),Ht=[2,Math.E,3,4,5,6,7,8,9,10],da=[[1,1.0891168053867777,1.1789745164521264,1.2701428397304229,1.3632066654400328,1.4587804913784246,1.557523817412741,1.660158301473385,1.767487542936873,1.8804205225512542,2],[1,1.1121114330934,1.23103892493161,1.35838369631113,1.49605193039935,1.64635423375119,1.81213853570186,1.99697132461829,2.20538955455724,2.44325744833852,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356972
`))||""}function _e(e){const t=Fe(e)?e:O(e);t[Jn]=t,t[$t]=Fe(e)?e.value:e,t[Sn]=za(),t[Gl]=!1;const n=N({get(){return t.value},set(l){t.value=l}});return n[$t]=t[$t],t[un]=n,t[sn]=void 0,ht.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
`+m[Sn]);return}Yt[e.id].delete(m);const d=[e.id,...s,c];m[sn]!=null&&JSON.stringify(d)!==JSON.stringify(m[sn])&&console.error(`Persistentrefisbeingsavedto\`${d.join(".")}\` when it's already present at \`${m[sn].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,m),m[sn]=d;constv=s.reduce((_,g)=>(gin_||(_[g]={}),_[g]),t),b=v[c];v[c]=m[Jn],Ci(v)?b!=null?v[c]=b:v[c]=m[$t]:b!=null?v[c].value=b:v[c].value=m[$t]}else!(minstanceofi)&&!Fe(m)&&!n.includes(m)&&(typeofm.type=="symbol"&&n.push(m),l(m,[...s,c])&&(ul(m)&&!ul(a)?console.warn("Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.",keina?a[ke]:a,c):o=!0))}),o};l(e[ke]),Yt[e.id].forEach(a=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,a,`
Cost:50${n.displayName}<br/>${De(1e11)}${U.coal.displayName}`}})),ce=He(()=>({resource:K(n),cost(){return i.pow(1.15,this.amount.value).times(10)},display:{title:"Mining Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:x(()=>u(B,null,[p("Mine 2.5x faster. Increase ore mining amount by")," ",Ae(ce.amount.value),p(" ore per operation")]))},visibility:()=>q(i.gte(ce.amount.value,1)||i.div(s.value,c.value).plus(l.value).gte(10)),style:{width:"200px"}})),te=He(()=>({resource:K(n),cost(){return i.pow(1.15,i.times(this.amount.value,10)).times(10)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:x(()=>u(B,null,[p("Automatically smelts")," ",Ae(i.times(te.amount.value,10)),p(" ore per second")]))},visibility:()=>q(i.gte(te.amount.value,1)||i.gte(ce.amount.value,4)||i.gte(s.value,50)),style:{width:"200px"}})),X=_e(!0),Je=He(()=>({resource:U.coal,cost(){return i.pow(10,this.amount.value).times(1e12)},display:{title:"Hotter Forges",description:"More coal makes the fires burn hotter, getting just a little more metal out of each bit of ore",effectDisplay:x(()=>u(B,null,[p("Gain "),Ae(i.times(we.value,100)),p("% more metal per ore")]))},visibility:()=>q(i.gte(Je.amount.value,1)||mt.bought.value),style:{width:"200px"}})),we=N(()=>i.times(Je.amount.value,.25));Ee.on("update",pe=>{A.value=i.times(pe,se.value).plus(A.value);const Le=A.value.div(C).trunc();A.value=A.value.minus(Le.times(C)),a.value=i.add(a.value,i.times(Le,S.value)),X.value&&g(i.min(b.value,i.times(te.amount.value,10).times(pe)))});const[tt,Oe]=Tn(()=>[{title:"Automatic Smelting",modifier:m,base:0,visible(){return i.gt(te.amount.value,0)}},{title:"Metal per Ore",modifier:o,base:.1},{title:"Ore per Mining Operation",modifier:w,base:1},{title:"Mining Speed",modifier:I,base:1}]),Ne=O(!1),Ye=x(()=>u(ct,{modelValue:Ne.value,"onUpdate:modelValue":pe=>Ne.value=pe},{header:()=>u("h2",null,[e,p(" Modifiers")]),body:tt})),{total:Se,trackerDisplay:pt}=hn({resource:n,goal:25e3,name:e,day:wl,color:t,modal:{show:Ne,display:Ye}});return{name:e,day:wl,color:t,ore:a,bestOre:s,oreProgress:A,metal:n,bestMetal:l,totalMetal:Se,simplePickaxe:dt,doublePickaxe:Re,crucible:ve,coalDrill:We,industrialFurnace:mt,oreDrill:ce,industrialCrucible:te,autoSmeltEnabled:X,hotterForge:Je,generalTabCollapsed:Oe,minWidth:700,display:x(()=>u(B,null,[he(pt),u(fe,null,null),u(Nt,{resource:n,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:x(()=>u(B,null,[X.value?`+${Dl([[$e.value,"smelting speed"],[Ke.value,"ore gain"],[i.div(U.computedCoalGain.value,v),"coal gain"]],"/s")}`:void 0]))},null),u(fe,null,null),he(_),i.gte(te.amount.value,1)?u("div",{style:{width:"150px"}},[u(Ct,{title:"Auto Smelt",modelValue:X.value,"onUpdate:modelValue":pe=>X.value=pe},null)]):void 0,u(fe,null,null),u(Nt,{resource:a,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:x(()=>u(B,null,[$l(et.value)]))},null),u(fe,null,null),u("div",null,[p("Currently mining "),De(S.value),p(" ore every")," ",De(i.div(C,se.value)),p(" seconds")]),he(T),u(fe,null,null),xe(dt,Re,ve,We,mt),xe(ce,te,Je)]))}}),Mo="coal",kl=3,U=It(Mo,function(){const e="Coal",t="#151716",n="#B2BeB5",l="var(--foreground)",a=ut(0,"coal"),s=ut(0,"ash"),o=_e(0),c=N(()=>i.times(o.value,1e3)),m=N(()=>i.times(o.value,.1)),d=N(()=>i.times(o.value,50)),v=He(()=>({resource:ee.logs,cost(){let E=i.times(T.amount.value,r(T.cost)).plus(this.amount.value);return i.gte(E,100)&&(E=i.pow(E,2).div(100)),i.gte(E,1e4)&&(E=i.pow(E,2).div(1e4)),E=i.pow(.95,de.books.smallFireBook.amount.value).times(E),E.pow(1.5).times(1e4)},display:x(()=>u(B,null,[u("h3",null,[p("Small Fire")]),u("br",null,null),p("Burn 1000 logs for 0.1 coal and 50 ash"),u("br",null,null),u("br",null,null),p("Currently:"),u("br",null,null),p("-"),ne(c.value),p(" logs/sec"),u("br",null,null),p("+"),ne(m.value),p(" coal/sec"),u("br",null,null),p("+"),ne(d.value),p(" ash/sec"),u("br",null,null),u("br",null,null),p("Cost: "),Z(r(v.cost)),p(" "),v.resource.displayName])),onPurcha
margin:10px0;"/>${ge}`:T,n.value=!0},onOpenLayer(){if($e.value=!1,window.matchMedia("(min-width:1468px)").matches)if(V.tabs.includes(I!=null?I:"trees")){const Ve=V.tabs.lastIndexOf(I!=null?I:"trees");V.tabs.splice(Ve,1)}else V.tabs.push(I!=null?I:"trees"),z.minimized.value=!0;else V.tabs.splice(1,1/0,I!=null?I:"trees")},onUnlockLayer(){A.value=!0,setTimeout(()=>{var Ve,Ke;l.value=-1,a.value=r((Ke=(Ve=Xe[I!=null?I:"trees"])==null?void 0:Ve.name)!=null?Ke:""),s.value=T,V.devSpeed=null,n.value=!0},1e3)}}}}})}const c=[o(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:ii,story:"Ohno!SantaforgotaboutChristmasandit's only 25 days away! He'saskedforyourhelpduetoyourhistorygettinglargequantitiesofthingsinshortamountsoftime.Unfortunatelyyou're really starting from scratch here - let'sstartwithgettingwood,whichyou'll need for everything from building workshops to wrapping paper to many of the toys themselves!",completedStory:"Santa looks at all the wood you'vegatheredandtellsyouyou've done well! He says you should take the rest of the day off so you'rerefreshedfortomorrow's work. Good Job!"})),o(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:ai,story:"Santa looked over your tree farm and was impressed with how much you could accomplish in just one day. Today'sgoalistogetaworkshopbuiltupfortheelvestoworkin-andapparently,theyneedquitealotofspacetowork!",completedStory:"Theworkshopcomplete,Santaonceagaindismissesyoufortheday.Withastrongfoundation,thisworkshopshouldsufficeforsupportingfutureworktowardthisimpossiblemission.GoodJob!"})),o(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:si,story:"Santatellsyouthatunfortunatelytherearequiteafewnaughtychildrenouttherethisyear,andhe's going to need you to gather as much coal as you can for him to give out.",completedStory:"Santa looks at all the coal you'vegatheredandtellsyouyou've done well! He says you should take the rest of the day off so you'rerefreshedfortomorrow's work. Good Job!"})),o(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:oi,story:"Alright, it seems you finally have enough things set up to start bringing in the elves! Unfortunately, it seems they'llneedtoberetrainedonhowtohelp,sincethey've stopped practicing for 11 months!",completedStory:"The workshop now hums with the bustling elves working on everything. They can take it from here - you deserve a break after such a long day! Good Job!"})),o(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:ri,story:"With the elves trained, we'realmostreadytostartworkingonthesepresents!Justacouplemorepre-reqsfirst,startingwithturningallthiswoodintowoodpulpandfinallyintopaper,whichwillberequiredforwrappingpaperlateronbutinthemeantimecanbeusedtohelpwriteguideswhichwillhelptheseelvescontinuetheireducation!",completedStory:"Youlookuponyourriversofbookpulpasyouhandoutstacksofpaperstoelvestoreadthrough.You've continued getting closer and closer to preparing for Christmas, and can go to bed satisfied with your progress. Good Job!"})),o(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:ui,story:"You watch all these elves carrying incredibly large loads just in their open elf-sized hands, and realize there'sprobablyabetterway.Youneedtoputthetoysinboxesanyways,sowhydon'twegetstartedworkingonthosesotheworkerscantakeadvantageaswell?",completedStory:"Wow,thoseboxesarereallyconvenient!Theworkshopfeelsmoreandmoreproperwitheveryday.Youtickanotherrequirementonyourlistandstartlookingtowardstomorrow.GoodJob!"})),o(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:ci,story:"",completedStory:""})),o(()=>({day:8,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),o(()=>({day:9,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),o(()=>({day:10,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),o(()=>({day:11,shouldNotify:
${C}`)}}return d[A]}yt(n,A=>{A&&Object.keys(d).forEach(C=>delete d[C])});const b=N(()=>Ce.saves.reduce((A,C)=>(A[C]=v(C),A),{}));function _(A){let C;switch(V.id===A?C=Ql(V[ke]):C=JSON.stringify(b.value[A]),re.exportEncoding){default:console.warn(`Unknownsaveencoding:${re.exportEncoding}.Defaultingtolz`);case"lz":C=Tt.compressToUTF16(C);break;case"base64":C=btoa(unescape(encodeURIComponent(C)));break;case"plain":break}const T=document.createElement("textarea");T.value=C,document.body.appendChild(T),T.select(),T.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(T)}function g(A){V.id===A&>();const C={...b.value[A],id:_n()};gt(C),Ce.saves.push(C.id)}function w(A){Ce.saves=Ce.saves.filter(C=>C!==A),localStorage.removeItem(A),d[A]=void 0}function S(A){b.value[V.id].time=V.time,gt(),d[V.id]=void 0,zt(b.value[A]),d[A]=void 0}function I(A){if(o.value=A,Kt(()=>{o.value=null}),A[0]!=="{")if(A[0]==="e")A=decodeURIComponent(escape(atob(A)));else if(A[0]==="\u1BE1")A=Tt.decompressFromUTF16(A);else{console.warn("Unable to determine preset encoding",A);return}const C=JSON.parse(A);C.id=_n(),gt(C),Ce.saves.push(C.id),S(C.id)}function se(A,C){const T=b.value[A];T&&(T.name=C,V.id===A?(V.name=C,gt()):(gt(T),d[A]=void 0))}return(A,C)=>(y(),G(ct,{modelValue:n.value,"onUpdate:modelValue":C[4]||(C[4]=T=>n.value=T),ref_key:"modal",ref:l},{header:L(()=>[Jr]),body:L(({shown:T})=>[T?(y(),G(r(Pi),{key:0,list:r(Ce).saves,handle:".handle",itemKey:ge=>ge},{item:L(({element:ge})=>[u(Wr,{save:r(b)[ge],onOpen:$e=>S(ge),onExport:$e=>_(ge),onEditName:$e=>se(ge,$e),onDuplicate:$e=>g(ge),onDelete:$e=>w(ge)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):P("",!0)]),footer:L(()=>[f("div",Xr,[u(pi,{modelValue:s.value,"onUpdate:modelValue":C[0]||(C[0]=T=>s.value=T),title:"Import Save",placeholder:"Paste your save here!",class:Ie({importingFailed:a.value})},null,8,["modelValue","class"]),f("div",Yr,[Zr,f("div",eu,[f("button",{class:"button",onClick:C[1]||(C[1]=T=>S(r(Zt)().id))},"New Game"),Object.keys(r(m)).length>0?(y(),G(el,{key:0,options:r(m),modelValue:o.value,"onUpdate:modelValue":C[2]||(C[2]=T=>I(T)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):P("",!0)])]),f("div",tu,[nu,f("button",{class:"button modal-default-button",onClick:C[3]||(C[3]=T=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var fi=ue(lu,[["__scopeId","data-v-3b9991aa"]]);const st=e=>(Mt("data-v-4a3f8425"),e=e(),At(),e),iu=["src","alt"],au={key:1,class:"title"},su=st(()=>f("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),ou={class:"discord"},ru={class:"discord-links"},uu={key:0},cu=["href"],du=st(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),mu=st(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),pu={href:"https://forums.moddingtree.com/",target:"_blank"},fu=st(()=>f("span",{class:"material-icons"},"forum",-1)),hu=st(()=>f("span",{class:"material-icons"},"info",-1)),gu=st(()=>f("span",{class:"material-icons"},"library_books",-1)),vu=st(()=>f("span",{class:"material-icons"},"settings",-1)),yu=st(()=>f("span",{class:"material-icons"},"library_books",-1)),bu=st(()=>f("span",{class:"material-icons"},"settings",-1)),_u=st(()=>f("span",{class:"material-icons"},"info",-1)),wu={href:"https://forums.moddingtree.com/",target:"_blank"},ku=st(()=>f("span",{class:"material-icons"},"forum",-1)),Cu={class:"discord"},Nu={class:"discord-links"},Su={key:0},Mu=["href"],Au=st(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Iu=st(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Eu=Q({__name:"Nav",setup(e){const t=O(null),n=O(null),l=O(null),a=O(null),{useHeader:s,banner:o,title:c,discordName:m,discordLink:d,versionNumber:v}=re;function b(){window.open(d,"mywindow")}return(_,g)=>(y(),M(B,null,[r(s)?(y(),M("div",Wt({key:0,class
Learnmoreatwww.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await Ka();const{globalBus:e}=await Cn(()=>Promise.resolve().then(function(){return xa}),void 0),{startGameLoop:t}=await Cn(()=>import("./gameLoop.32b7f66a.js"),["assets/gameLoop.32b7f66a.js","assets/@fontsource.f66d05e7.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=Ii(dc);e.emit("setupVue",n),n.mount("#app"),Kt(()=>{const l=El(),{updateServiceWorker:a}=pc({onNeedRefresh(){l.info("New content available, click or reload to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){a()}})},onOfflineReady(){l.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(s.update,60*60*1e3)}})}),t()});export{i as D,Cn as _,Me as a,re as b,Bo as c,Ee as g,V as p,Ce as s};