Advent-Incremental/assets/index.a4736e0a.js

20 lines
210 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.92681fcb.js";import{Z as C,l as Xe,aa as le,t as O,ay as Yl,ar as ul,aE as b,a0 as M,aK as Bt,a1 as g,O as E,aG as Vl,A as rt,_ as Y,a8 as o,b6 as K,b8 as Zl,bs as Jn,C as u,aq as cl,bu as Nl,bb as en,T as La,a7 as d,u as tn,j as Qa,bv as Dn,q as Bl,b1 as Dt,G as Qe,aC as Xn,w as Mt,b2 as _t,ao as ja,I as Ye,J as ce,$ as D,aH as Wt,aF as zt,z as Ft,aN as He,al as Ql,aL as tl,H as Wa,aJ as Yn,bn as za,br as Ka,be as Ja}from"./@vue.4ce677c2.js";import{c as Zn}from"./nanoevents.1080beb7.js";import{L as Yt}from"./lz-string.731cedc5.js";import{i as Xa}from"./is-plain-object.906d88e8.js";import{Y as Ya}from"./vue-next-select.a2bfab1d.js";import{s as Za,u as ea}from"./vue-toastification.6f567382.js";import{D as ei}from"./vuedraggable.7949458c.js";import{p as ti}from"./vue-textarea-autosize.35804eaf.js";import{v as li,n as ni}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const ai=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))a(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const r of s.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&a(r)}).observe(document,{childList:!0,subtree:!0});function l(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function a(i){if(i.ep)return;i.ep=!0;const s=l(i);fetch(i.href,s)}};ai();const ii="modulepreload",Fn={},oi="./",jl=function(t,l){return!l||l.length===0?t():Promise.all(l.map(a=>{if(a=`${oi}${a}`,a in Fn)return;Fn[a]=!0;const i=a.endsWith(".css"),s=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${s}`))return;const r=document.createElement("link");if(r.rel=i?"stylesheet":ii,i||(r.as="script",r.crossOrigin=""),r.href=a,document.head.appendChild(r),i)return new Promise((c,p)=>{r.addEventListener("load",c),r.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>t())},si="./projInfo-schema.json",ri="Advent Incremental",ui="An incremental game you play a day at a time, leading up to Christmas!",ci="advent-incremental",di="thepaperpilot and friends",pi="",mi="",gi="0.3",hi="Initial Commit",fi=!0,vi=!1,yi=2,bi=!0,wi=null,Ci="",ki=["main"],_i=3600,Ai=0,Si=!0,Ni="base64";var Ie={$schema:si,title:ri,description:ui,id:ci,author:di,discordName:pi,discordLink:mi,versionNumber:gi,versionTitle:hi,allowGoBack:fi,defaultShowSmall:vi,defaultDecimalsShown:yi,useHeader:bi,banner:wi,logo:Ci,initialTabs:ki,maxTickLength:_i,offlineLimit:Ai,enablePausing:Si,exportEncoding:Ni};const mn=17,Mi=9e15,Ii=Math.log10(9e15),xi=1/9e15,Ei=308,Bi=-324,Tn=5,Pi=function(){const e=[];for(let l=Bi+1;l<=Ei;l++)e.push(Number("1e"+l));const t=323;return function(l){return e[l+t]}}(),ol=[2,Math.E,3,4,5,6,7,8,9,10],Di=[[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.16709053569
Stack: ${xt}
Trying to pop ${l.id}`;return xt.pop(),$(l,"color"),$(l,"display"),$(l,"name"),ot(l,"name",l.id),$(l,"minWidth"),ot(l,"minWidth",600),$(l,"minimizable"),ot(l,"minimizable",!0),l})}function pa(e,t){if(console.info("Adding layer",e.id),ct[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,ct[e.id]);return}ot(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),ct[e.id]=e,qe.emit("addLayer",e,t.layers[e.id])}function co(e){return ct[e]}function ma(e){console.info("Removing layer",e.id),qe.emit("removeLayer",e),ct[e.id]=void 0}function po(e){ma(e),pa(e,Q)}function mo(e){const t=O(!1);return{openModal:()=>t.value=!0,modal:B(()=>o(ft,{modelValue:t.value,"onUpdate:modelValue":l=>t.value=l},{header:()=>o("h2",null,[u(e.name)]),body:u(e.display)}))}}qe.on("update",function(t){Object.values(ct).forEach(l=>{l==null||l.emit("preUpdate",t)}),Object.values(ct).forEach(l=>{l==null||l.emit("update",t)}),Object.values(ct).forEach(l=>{l==null||l.emit("postUpdate",t)})});var go=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:bn,UnregisterNodeInjectionKey:wn,NodesInjectionKey:Cn,BoundsInjectionKey:kn,layers:ct,persistentRefs:fl,addingLayers:xt,createLayer:Tt,addLayer:pa,getLayer:co,removeLayer:ma,reloadLayer:po,setupLayerModal:mo},Symbol.toStringTag,{value:"Module"}));const _n=Symbol("PersistentState"),el=Symbol("DefaultValue"),Kl=Symbol("StackTrace"),ga=Symbol("Deleted"),Il=Symbol("NonPersistent"),Al=Symbol("SaveDataPath");function ho(){var e;return((e=new Error().stack)==null?void 0:e.split(`
`).slice(3,5).map(t=>t.trim()).join(`
`))||""}function be(e){const t=Xe(e)?e:O(e);t[_n]=t,t[el]=Xe(e)?e.value:e,t[Kl]=ho(),t[ga]=!1;const l=C({get(){return t.value},set(a){t.value=a}});return l[el]=t[el],t[Il]=l,t[Al]=void 0,xt.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
Created at:
`+t[Kl]):fl[xt[xt.length-1]].add(t),t}function fo(e){return e&&typeof e=="object"&&_n in e}function H(e){return e[Il]}qe.on("addLayer",(e,t)=>{const l=[],a=(i,s=[])=>{let r=!1;return Object.keys(i).forEach(c=>{let p=i[c];if(p&&typeof p=="object")if(Ve in p&&(p=p[Ve]),fo(p)){if(r=!0,p[ga]){console.warn("Deleted persistent ref present in returned object. Ignoring...",p,`
Created at:
`+p[Kl]);return}fl[e.id].delete(p);const m=[e.id,...s,c];p[Al]!=null&&JSON.stringify(m)!==JSON.stringify(p[Al])&&console.error(`Persistent ref is being saved to \`${m.join(".")}\` when it's already present at \`${p[Al].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,p),p[Al]=m;const y=s.reduce((w,h)=>(h in w||(w[h]={}),w[h]),t),f=y[c];y[c]=p[_n],Qa(y)?f!=null?y[c]=f:y[c]=p[el]:f!=null?y[c].value=f:y[c].value=p[el]}else!(p instanceof n)&&!Xe(p)&&!l.includes(p)&&(typeof p.type=="symbol"&&l.push(p),a(p,[...s,c])&&(Dn(p)&&!Dn(i)?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.",Ve in i?i[Ve]:i,c):r=!0))}),r};a(e[Ve]),fl[e.id].forEach(i=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,i,`
Created at:
`+i[Kl])}),fl[e.id].clear()});const Ve=Symbol("ProxyState"),hl=Symbol("ProxyPath");function bt(e,t={}){const l=t;let a=!1;function i(){return a||(Object.assign(l,e(l)),a=!0),l}return new Proxy(l,{get(s,r){if(r===Ve)return i();const c=i()[r];return c&&typeof c=="object"&&Il in c?c[Il]:c},set(s,r,c){return i()[r]=c,!0},has(s,r){return r===Ve?!0:Reflect.has(i(),r)},ownKeys(){return Reflect.ownKeys(i())},getOwnPropertyDescriptor(s,r){return a||(Object.assign(l,e(l)),a=!0),Object.getOwnPropertyDescriptor(s,r)}})}var Le=window.state=tn({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const ha=Bl({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function fa(e){return JSON.stringify(e,(t,l)=>u(l))}const va={get(e,t){var a;if(t===Ve||t===hl)return e[t];const l=e[Ve][t];if(t!=="value"&&(Xa(l)||Array.isArray(l))){if(l!==((a=e[t])==null?void 0:a[Ve])){const i=[...e[hl],t];e[t]=new Proxy({[Ve]:l,[hl]:i},va)}return e[t]}return l},set(e,t,l,a){if(!Le.hasNaN&&(typeof l=="number"&&isNaN(l)||l instanceof n&&(isNaN(l.sign)||isNaN(l.layer)||isNaN(l.mag)))){const i=e[Ve][t];if(!(typeof i=="number"&&isNaN(i)||i instanceof n&&(isNaN(i.sign)||isNaN(i.layer)||isNaN(i.mag))))throw ha.autosave=!1,Le.hasNaN=!0,Le.NaNPath=[...e[hl],t],Le.NaNReceiver=a,console.error("Attempted to set NaN value",[...e[hl],t],e[Ve]),"Attempted to set NaN value. See above for details"}return e[Ve][t]=l,!0},ownKeys(e){return Reflect.ownKeys(e[Ve])},has(e,t){return Reflect.has(e[Ve],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[Ve],t)}};var Q=window.player=new Proxy({[Ve]:ha,[hl]:["player"]},va);function ya(e={}){return Object.assign({id:`${Ie.id}-0`,name:"Default Save",tabs:Ie.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:Ie.id,modVersion:Ie.versionNumber,layers:{}},e)}function Et(e){const t=Yt.compressToUTF16(fa(e!=null?e:Q[Ve]));return localStorage.setItem((e!=null?e:Q[Ve]).id,t),t}async function vo(){bo();try{let e=localStorage.getItem(Ge.active);if(e==null){await rl(vl());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Yt.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==Ie.id){await rl(vl());return}t.id=Ge.active,await rl(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
`,e),await rl(vl())}}function vl(){const e=Ll(),t=ya({id:e});return Et(t),Ge.saves.push(e),t}function Ll(){let e,t=0;do e=`${Ie.id}-${t++}`;while(localStorage.getItem(e));return e}const An=O(!1);async function rl(e){console.info("Loading save",e),An.value=!0;const{layers:t,removeLayer:l,addLayer:a}=await jl(()=>Promise.resolve().then(function(){return go}),void 0),{fixOldSave:i,getInitialLayers:s}=await jl(()=>Promise.resolve().then(function(){return sr}),void 0);for(const r in t){const c=t[r];c&&l(c)}s(e).forEach(r=>a(r,e)),e=ya(e),e.offlineProd&&e.time&&e.devSpeed!==0&&(e.offlineTime==null&&(e.offlineTime=0),e.offlineTime+=Math.min(e.offlineTime+(Date.now()-e.time)/1e3,Ie.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==Ie.versionNumber&&i(e.modVersion,e),Object.assign(Q,e),Ge.active=Q.id,qe.emit("onLoad")}setInterval(()=>{Q.autosave&&Et()},1e3);window.onbeforeunload=()=>{Q.autosave&&Et()};window.save=Et;const yo=window.hardReset=async()=>{await rl(vl())},xl=Bl({active:"",saves:[],showTPS:!0,theme:yn.Nordic,unthrottled:!1});Dt(xl,e=>{const t=Yt.compressToUTF16(JSON.stringify(e));localStorage.setItem(Ie.id,t)},{deep:!0});var Ge=window.settings=xl;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:yn.Nordic};qe.emit("loadSettings",e),Object.assign(xl,e),yo()};function bo(){try{let e=localStorage.getItem(Ie.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Yt.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(xl,t)}qe.emit("loadSettings",xl)}catch{}}const ba=Bl([]);function wo(e){ba.push(e)}const wa=Bl([]);function Co(e){wa.push(e)}const ko=Bl([]),_o={class:"table"},Ct=le({__name:"Column",setup(e){const t=C(()=>Pl[Ge.theme].mergeAdjacent);return(l,a)=>(b(),M("div",_o,[g("div",{class:Qe(["col",{mergeAdjacent:u(t)}])},[Bt(l.$slots,"default")],2)]))}}),Ao={class:"table"},El=le({__name:"Row",setup(e){const t=C(()=>Pl[Ge.theme].mergeAdjacent);return(l,a)=>(b(),M("div",Ao,[g("div",{class:Qe(["row",{mergeAdjacent:u(t)}])},[Bt(l.$slots,"default")],2)]))}});function Sn(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!ja(e)}function ke(e,t="span"){return typeof e=="function"?le({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),le({template:e})):le({render:()=>({})}):e}function ue(e){if(jt(e))return typeof e=="function"?e():ke(e);const t=e[nl];return o(t,e[al](),null)}function _e(...e){let t;return o(El,null,Sn(t=e.map(ue))?t:{default:()=>[t]})}function Sl(...e){let t;return o(Ct,null,Sn(t=e.map(ue))?t:{default:()=>[t]})}function Pt(e){if(jt(e))return typeof e=="function"?e():typeof e=="string"?o(E,null,[e]):o(e,null,null);const t=e[nl];return o(t,e[al](),null)}function So(...e){let t;return o(Ct,null,Sn(t=e.map(Pt))?t:{default:()=>[t]})}function jt(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Ml]===!0}function Ca(e,t,l){const a=O(null),i=O(void 0);function s(p){a.value||(a.value=setInterval(c,250)),i.value=p,l&&(l.value=!0)}function r(){a.value&&(clearInterval(a.value),a.value=null),l&&(l.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(i.value)}return Xn(r),{start:s,stop:r,handleHolding:c}}function No(e,t){const l=C(()=>e.filter(a=>u(a.visibility)===tt.Visible&&t(a)));return{firstFeature:C(()=>l.value[0]),collapsedContent:B(()=>Sl(...l.value.slice(1))),hasCollapsedContent:C(()=>l.value.length>1)}}function Jl(e,t="div"){const l=Mt();return _t(()=>{l.value=ke(lt(e),t)}),l}function ll(e,t="div"){const l=Mt(null);return _t(()=>{const a=lt(e);l.value=a==null?null:ke(a,t)}),l}function Mo(e){return C(()=>lt(e))}function lt(e){return u(u(e))}function q(...e){return e.includes(Object)||e.push(Object),e}const we=le({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,l)=>(b(),M("div",{style:Ye({width:e.width,height:e.height})},null,4))}});const Io={
<br/>
<br/>
Cost: 50 ${l.displayName}<br/>${ne(1e11)} ${U.coal.displayName}`}})),W=L(()=>({resource:H(l),cost:1e5,display:{title:"Efficient Drills",description:"Use metal and a bunch of R&D to make drilling stuff faster. Double coal and ore mining speed."},visibilty:()=>T(ze.depthMilestones[4].earned.value)})),pe=De(()=>({resource:H(l),cost(){return n.pow(1.15,this.amount.value).times(10)},display:{title:"Mining Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:B(()=>o(E,null,[d("Mine 2.5x faster. Increase ore mining amount by")," ",te(pe.amount.value),d(" ore per operation")]))},visibility:()=>T(n.gte(pe.amount.value,1)||n.div(s.value,c.value).plus(a.value).gte(10)),style:{width:"200px"}})),z=De(()=>({resource:H(l),cost(){return n.pow(1.15,n.times(this.amount.value,10)).times(10)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:B(()=>o(E,null,[d("Automatically smelts")," ",te(n.times(z.amount.value,10)),d(" ore per second")]))},visibility:()=>T(n.gte(z.amount.value,1)||n.gte(pe.amount.value,4)||n.gte(s.value,50)),style:{width:"200px"}})),ve=be(!0),Ne=De(()=>({resource:U.coal,cost(){return n.pow(10,this.amount.value).times(1e12)},display:{title:"Hotter Forges",description:"More coal makes the fires burn hotter, getting just a little more metal out of each bit of ore",effectDisplay:B(()=>o(E,null,[d("Gain "),te(n.times(et.value,100)),d("% more metal per ore")]))},visibility:()=>T(n.gte(Ne.amount.value,1)||ut.bought.value),style:{width:"200px"}})),et=C(()=>n.times(Ne.amount.value,.25));qe.on("update",re=>{F.value=n.times(re,N.value).plus(F.value);const vt=F.value.trunc();F.value=F.value.minus(vt),i.value=n.add(i.value,n.times(vt,oe.value)),ve.value&&A(n.min(h.value,n.times(m.value,re)),f.value)});const[Ue,Be]=dl(()=>[{title:"Auto Smelt Speed",modifier:p,base:0,unit:"/s",visible(){return n.gt(z.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:y,base:1,visible(){return n.gt(f.value,1)}},{title:"Metal per Ore",modifier:r,base:.1},{title:"Ore per Mining Operation",modifier:S,base:1},{title:"Mining Speed",modifier:I,base:.1,unit:"/s"}]),ie=O(!1),Pe=B(()=>o(ft,{modelValue:ie.value,"onUpdate:modelValue":re=>ie.value=re},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:Ue})),{total:nt,trackerDisplay:$e}=pl({resource:l,goal:25e3,name:e,day:jn,color:t,modal:{show:ie,display:Pe}});return{name:e,day:jn,color:t,ore:i,bestOre:s,oreProgress:F,metal:l,bestMetal:a,totalMetal:nt,simplePickaxe:Re,doublePickaxe:Oe,crucible:Ee,coalDrill:je,industrialFurnace:ut,efficientDrill:W,oreDrill:pe,industrialCrucible:z,autoSmeltEnabled:ve,hotterForge:Ne,generalTabCollapsed:Be,minWidth:700,display:B(()=>o(E,null,[ue($e),o(we,null,null),o(At,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>o(E,null,[ve.value&&n.gte(z.amount.value,1)?`+${oa([[m.value,"smelting speed"],[de.value,"ore gain"],[n.div(U.computedCoalGain.value,w),"coal gain"]],"/s",n.mul(c.value,f.value))}`:void 0]))},null),o(we,null,null),ue(k),n.gte(z.amount.value,1)?o("div",{style:{width:"150px"}},[o(Lt,{title:"Auto Smelt",modelValue:ve.value,"onUpdate:modelValue":re=>ve.value=re},null)]):void 0,o(we,null,null),o(At,{resource:i,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>o(E,null,[sa(Ze.value)]))},null),o(we,null,null),o("div",null,[d("Currently mining "),ne(oe.value),d(" ore every")," ",ne(n.recip(N.value)),d(" seconds")]),ue(Te),o(we,null,null),_e(Re,Oe,Ee,je,ut,W),_e(pe,z,Ne)]))}}),nr="cloth",Wn=8,qt=Tt(nr,function(){const e="Cloth",t="white",l=st(0,"cloth"),a=st(0,"wool"),i=st(10,"sheep"),s=be(0),r=Qt(()=>({direction:ye.Right,width:100,height:10,style:"margin-top: 8px",borderStyle:"border-color: black",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s; background: black",progress:()=>n.div(s.value,ve.value)})),c=V(()=>({display:{title:"Breed sheep",description:B(()=>o(E,null,[d("Breed "),te(n.floor(pe.value)),d(" sheep"),o("br",null,null),ue(r)]))},style:{minHeight:"80px"},canClic
margin: 10px 0;"/>${Se}`:F,l.value=!0},onOpenLayer(){if(Te.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(Q.tabs.includes(S!=null?S:"trees")){const Z=Q.tabs.lastIndexOf(S!=null?S:"trees");Q.tabs.splice(Z,1)}else Q.tabs.push(S!=null?S:"trees"),J.minimized.value=!0;else Q.tabs.splice(1,1/0,S!=null?S:"trees")},onUnlockLayer(){S&&(I.value=!0,setTimeout(()=>{var Z,de;a.value=-1,i.value=u((de=(Z=ct[S!=null?S:"trees"])==null?void 0:Z.name)!=null?de:""),s.value=F,Q.devSpeed=null,l.value=!0},1e3))}}}}})}const c=[r(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Na,story:"Oh no! Santa forgot about Christmas and it's only 25 days away! He's asked for your help due to your history getting large quantities of things in short amounts of time. Unfortunately you're really starting from scratch here - let's start with getting wood, which you'll need for everything from building workshops to wrapping paper to many of the toys themselves!",completedStory:"Santa looks at all the wood you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),r(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:Ma,story:"Santa looked over your tree farm and was impressed with how much you could accomplish in just one day. Today's goal is to get a workshop built up for the elves to work in - and apparently, they need quite a lot of space to work!",completedStory:"The workshop complete, Santa once again dismisses you for the day. With a strong foundation, this workshop should suffice for supporting future work toward this impossible mission. Good Job!"})),r(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:Ia,story:"Santa tells you that unfortunately there are quite a few naughty children out there this year, and he's going to need you to gather as much coal as you can for him to give out.",completedStory:"Santa looks at all the coal you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),r(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:xa,story:"Alright, it seems you finally have enough things set up to start bringing in the elves! Unfortunately, it seems they'll need to be retrained on how to help, since they've stopped practicing for 11 months!",completedStory:"The workshop now hums with the bustling elves working on everything. They can take it from here - you deserve a break after such a long day! Good Job!"})),r(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:Ea,story:"With the elves trained, we're almost ready to start working on these presents! Just a couple more pre-reqs first, starting with turning all this wood into wood pulp and finally into paper, which will be required for wrapping paper later on but in the meantime can be used to help write guides which will help these elves continue their education!",completedStory:"You look upon your rivers of book pulp as you hand out stacks of papers to elves to read through. You've continued getting closer and closer to preparing for Christmas, and can go to bed satisfied with your progress. Good Job!"})),r(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:Ba,story:"You watch all these elves carrying incredibly large loads just in their open elf-sized hands, and realize there's probably a better way. You need to put the toys in boxes anyways, so why don't we get started working on those so the workers can take advantage as well?",completedStory:"Wow, those boxes are really convenient! The workshop feels more and more proper with every day. You tick another requirement on your list and start looking towards tomorrow. Good Job!"})),r(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:Pa,story:"You woke up ready to make some toys, before realizing most toys these days are made out of more than just wood! You're sure you're close to really getting to work, but there's a few more materials you're going to need - like metal! Lots of things need metal!",completedStory:"The sounds of drill
${F}
${N}`)}}return m[I]}Dt(l,I=>{I&&Object.keys(m).forEach(N=>delete m[N])});const f=C(()=>Ge.saves.reduce((I,N)=>(I[N]=y(N),I),{}));function w(I){let N;switch(Q.id===I?N=fa(Q[Ve]):N=JSON.stringify(f.value[I]),Ie.exportEncoding){default:console.warn(`Unknown save encoding: ${Ie.exportEncoding}. Defaulting to lz`);case"lz":N=Yt.compressToUTF16(N);break;case"base64":N=btoa(unescape(encodeURIComponent(N)));break;case"plain":break}const F=document.createElement("textarea");F.value=N,document.body.appendChild(F),F.select(),F.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(F)}function h(I){Q.id===I&&Et();const N={...f.value[I],id:Ll()};Et(N),Ge.saves.push(N.id)}function k(I){Ge.saves=Ge.saves.filter(N=>N!==I),localStorage.removeItem(I),m[I]=void 0}function A(I){f.value[Q.id].time=Q.time,Et(),m[Q.id]=void 0,rl(f.value[I]),m[I]=void 0}function S(I){if(r.value=I,ul(()=>{r.value=null}),I[0]!=="{")if(I[0]==="e")I=decodeURIComponent(escape(atob(I)));else if(I[0]==="\u1BE1")I=Yt.decompressFromUTF16(I);else{console.warn("Unable to determine preset encoding",I);return}const N=JSON.parse(I);N.id=Ll(),Et(N),Ge.saves.push(N.id),A(N.id)}function oe(I,N){const F=f.value[I];F&&(F.name=N,Q.id===I?(Q.name=N,Et()):(Et(F),m[I]=void 0))}return(I,N)=>(b(),Y(ft,{modelValue:l.value,"onUpdate:modelValue":N[4]||(N[4]=F=>l.value=F),ref_key:"modal",ref:a},{header:K(()=>[Eu]),body:K(({shown:F})=>[F?(b(),Y(u(ei),{key:0,list:u(Ge).saves,handle:".handle",itemKey:Se=>Se},{item:K(({element:Se})=>[o(xu,{save:u(f)[Se],onOpen:Te=>A(Se),onExport:Te=>w(Se),onEditName:Te=>oe(Se,Te),onDuplicate:Te=>h(Se),onDelete:Te=>k(Se)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):D("",!0)]),footer:K(()=>[g("div",Bu,[o(Oa,{modelValue:s.value,"onUpdate:modelValue":N[0]||(N[0]=F=>s.value=F),title:"Import Save",placeholder:"Paste your save here!",class:Qe({importingFailed:i.value})},null,8,["modelValue","class"]),g("div",Pu,[Du,g("div",Fu,[g("button",{class:"button",onClick:N[1]||(N[1]=F=>A(u(vl)().id))},"New Game"),Object.keys(u(p)).length>0?(b(),Y(In,{key:0,options:u(p),modelValue:r.value,"onUpdate:modelValue":N[2]||(N[2]=F=>S(F)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):D("",!0)])]),g("div",Tu,[Ru,g("button",{class:"button modal-default-button",onClick:N[3]||(N[3]=F=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Ua=Ae(Ou,[["__scopeId","data-v-3b9991aa"]]);const St=e=>(Wt("data-v-8495e562"),e=e(),zt(),e),Uu=["src","alt"],$u={key:1,class:"title"},Hu=St(()=>g("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),qu={class:"discord"},Vu={class:"discord-links"},Gu={key:0},Lu=["href"],Qu=St(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),ju=St(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Wu={href:"https://forums.moddingtree.com/",target:"_blank"},zu=St(()=>g("span",{class:"material-icons"},"forum",-1)),Ku=St(()=>g("span",{class:"material-icons"},"info",-1)),Ju=St(()=>g("span",{class:"material-icons"},"library_books",-1)),Xu=St(()=>g("span",{class:"material-icons"},"settings",-1)),Yu=St(()=>g("span",{class:"material-icons"},"library_books",-1)),Zu=St(()=>g("span",{class:"material-icons"},"settings",-1)),ec=St(()=>g("span",{class:"material-icons"},"info",-1)),tc={href:"https://forums.moddingtree.com/",target:"_blank"},lc=St(()=>g("span",{class:"material-icons"},"forum",-1)),nc={class:"discord"},ac={class:"discord-links"},ic={key:0},oc=["href"],sc=St(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),rc=St(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),uc=le({__name:"Nav",setup(e){const t=O(null),l=O(null),a=O(null),i=O(null),{useHeader:s,banner:r,title:c,discordName:p,discordLink:m,versionNumber:y}=Ie;function f(){window.open(m,"mywindow")}return(w,h)=>(b(),M(E,null,[u(s)?(b(),M("div",cl({key:0,clas
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 vo();const{globalBus:e}=await jl(()=>Promise.resolve().then(function(){return Zi}),void 0),{startGameLoop:t}=await jl(()=>import("./gameLoop.7d32e367.js"),["assets/gameLoop.7d32e367.js","assets/@fontsource.c175eac8.css","assets/vue.92681fcb.js","assets/lz-string.731cedc5.js","assets/@vue.4ce677c2.js","assets/nanoevents.1080beb7.js","assets/is-plain-object.906d88e8.js","assets/vue-next-select.a2bfab1d.js","assets/vue-next-select.9e6f4164.css","assets/vue-toastification.6f567382.js","assets/vue-toastification.4b5f8ac8.css","assets/vuedraggable.7949458c.js","assets/sortablejs.29100d8a.js","assets/vue-textarea-autosize.35804eaf.js","assets/workbox-window.8d14e8b7.js"]),l=window.vue=Ja(Qc);e.emit("setupVue",l),l.mount("#app"),ul(()=>{const a=ea(),{updateServiceWorker:i}=Wc({onNeedRefresh(){a.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(){i()}})},onOfflineReady(){a.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(s.update,60*1e3)}})}),t()});export{n as D,jl as _,Le as a,Ie as b,sr as c,qe as g,An as l,Q as p,Ge as s};