Advent-Incremental/assets/index.ef687d1b.js

20 lines
219 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.92681fcb.js";import{Z as C,l as lt,aa as ae,t as $,ay as ln,ar as bl,aE as y,a0 as E,aK as Vt,a1 as g,O as I,aG as jl,A as gt,_ as ee,a8 as o,b6 as J,b8 as nn,bs as Zn,C as r,aq as wl,bu as Fl,bb as an,T as Wi,a7 as d,u as on,j as Ki,bv as wn,q as Ol,b1 as Qt,G as et,aC as ei,w as Tt,b2 as Bt,ao as Ji,I as nt,J as ce,$ as U,aH as Yt,aF as Xt,z as Ht,aN as je,al as Kl,aL as rl,H as Yi,aJ as ti,bn as Xi,br as Zi,be as ea}from"./@vue.4ce677c2.js";import{c as li}from"./nanoevents.1080beb7.js";import{L as il}from"./lz-string.731cedc5.js";import{i as ta}from"./is-plain-object.906d88e8.js";import{Y as la}from"./vue-next-select.a2bfab1d.js";import{s as na,u as ni}from"./vue-toastification.6f567382.js";import{D as ia}from"./vuedraggable.7949458c.js";import{p as aa}from"./vue-textarea-autosize.35804eaf.js";import{v as oa,n as sa}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const ra=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function l(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerpolicy&&(s.referrerPolicy=a.referrerpolicy),a.crossorigin==="use-credentials"?s.credentials="include":a.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(a){if(a.ep)return;a.ep=!0;const s=l(a);fetch(a.href,s)}};ra();const ua="modulepreload",On={},da="./",Jl=function(t,l){return!l||l.length===0?t():Promise.all(l.map(i=>{if(i=`${da}${i}`,i in On)return;On[i]=!0;const a=i.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${s}`))return;const u=document.createElement("link");if(u.rel=a?"stylesheet":ua,a||(u.as="script",u.crossOrigin=""),u.href=i,document.head.appendChild(u),a)return new Promise((c,p)=>{u.addEventListener("load",c),u.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},ca="./projInfo-schema.json",pa="Advent Incremental",ma="An incremental game you play a day at a time, leading up to Christmas!",ga="advent-incremental",fa="thepaperpilot and friends",ha="",va="",ya="0.3",ba="Initial Commit",wa=!0,Ca=!1,ka=2,_a=!0,Aa=null,Sa="",Na=["main"],Ea=3600,Ma=0,Ia=!0,Ba="base64";var Me={$schema:ca,title:pa,description:ma,id:ga,author:fa,discordName:ha,discordLink:va,versionNumber:ya,versionTitle:ba,allowGoBack:wa,defaultShowSmall:Ca,defaultDecimalsShown:ka,useHeader:_a,banner:Aa,logo:Sa,initialTabs:Na,maxTickLength:Ea,offlineLimit:Ma,enablePausing:Ia,exportEncoding:Ba};const fn=17,xa=9e15,Pa=Math.log10(9e15),Da=1/9e15,Fa=308,Ta=-324,$n=5,Ua=function(){const e=[];for(let l=Ta+1;l<=Fa;l++)e.push(Number("1e"+l));const t=323;return function(l){return e[l+t]}}(),hl=[2,Math.E,3,4,5,6,7,8,9,10],Ra=[[1,1.0891168053867777,1.1789745164521264,1.2701428397304229,1.3632066654400328,1.4587804913784246,1.557523817412741,1.660158301473385,1.767487542936873,1.8804205225512542,2],[1,1.1121114330934,1.23103892493161,1.35838369631113,1.49605193039935,1.64635423375119,1.81213853570186,1.99697132461829,2.20538955455724,2.44325744833852,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356
Stack: ${$t}
Trying to pop ${l.id}`;return $t.pop(),G(l,"color"),G(l,"display"),G(l,"name"),mt(l,"name",l.id),G(l,"minWidth"),mt(l,"minWidth",600),G(l,"minimizable"),mt(l,"minimizable",!0),l})}function fi(e,t){if(console.info("Adding layer",e.id),vt[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,vt[e.id]);return}mt(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),vt[e.id]=e,Ue.emit("addLayer",e,t.layers[e.id])}function fo(e){return vt[e]}function hi(e){console.info("Removing layer",e.id),Ue.emit("removeLayer",e),vt[e.id]=void 0}function ho(e){hi(e),fi(e,z)}function vo(e){const t=$(!1);return{openModal:()=>t.value=!0,modal:B(()=>o(bt,{modelValue:t.value,"onUpdate:modelValue":l=>t.value=l},{header:()=>o("h2",null,[r(e.name)]),body:r(e.display)}))}}Ue.on("update",function(t){Object.values(vt).forEach(l=>{l==null||l.emit("preUpdate",t)}),Object.values(vt).forEach(l=>{l==null||l.emit("update",t)}),Object.values(vt).forEach(l=>{l==null||l.emit("postUpdate",t)})});var yo=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:An,UnregisterNodeInjectionKey:Sn,NodesInjectionKey:Nn,BoundsInjectionKey:En,layers:vt,persistentRefs:Sl,addingLayers:$t,createLayer:Ut,addLayer:fi,getLayer:fo,removeLayer:hi,reloadLayer:ho,setupLayerModal:vo},Symbol.toStringTag,{value:"Module"}));const Mn=Symbol("PersistentState"),ol=Symbol("DefaultValue"),Zl=Symbol("StackTrace"),vi=Symbol("Deleted"),Ul=Symbol("NonPersistent"),Dl=Symbol("SaveDataPath");function bo(){var e;return((e=new Error().stack)==null?void 0:e.split(`
`).slice(3,5).map(t=>t.trim()).join(`
`))||""}function we(e){const t=lt(e)?e:$(e);t[Mn]=t,t[ol]=lt(e)?e.value:e,t[Zl]=bo(),t[vi]=!1;const l=C({get(){return t.value},set(i){t.value=i}});return l[ol]=t[ol],t[Ul]=l,t[Dl]=void 0,$t.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
Created at:
`+t[Zl]):Sl[$t[$t.length-1]].add(t),t}function wo(e){return e&&typeof e=="object"&&Mn in e}function F(e){return e[Ul]}Ue.on("addLayer",(e,t)=>{const l=[],i=(a,s=[])=>{let u=!1;return Object.keys(a).forEach(c=>{let p=a[c];if(p&&typeof p=="object")if(Je in p&&(p=p[Je]),wo(p)){if(u=!0,p[vi]){console.warn("Deleted persistent ref present in returned object. Ignoring...",p,`
Created at:
`+p[Zl]);return}Sl[e.id].delete(p);const m=[e.id,...s,c];p[Dl]!=null&&JSON.stringify(m)!==JSON.stringify(p[Dl])&&console.error(`Persistent ref is being saved to \`${m.join(".")}\` when it's already present at \`${p[Dl].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,p),p[Dl]=m;const b=s.reduce((w,f)=>(f in w||(w[f]={}),w[f]),t),h=b[c];b[c]=p[Mn],Ki(b)?h!=null?b[c]=h:b[c]=p[ol]:h!=null?b[c].value=h:b[c].value=p[ol]}else!(p instanceof n)&&!lt(p)&&!l.includes(p)&&(typeof p.type=="symbol"&&l.push(p),i(p,[...s,c])&&(wn(p)&&!wn(a)?console.warn("Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.",Je in a?a[Je]:a,c):u=!0))}),u};i(e[Je]),Sl[e.id].forEach(a=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,a,`
Created at:
`+a[Zl])}),Sl[e.id].clear()});const Je=Symbol("ProxyState"),Al=Symbol("ProxyPath");function Nt(e,t={}){const l=t;let i=!1;function a(){return i||(Object.assign(l,e(l)),i=!0),l}return new Proxy(l,{get(s,u){if(u===Je)return a();const c=a()[u];return c&&typeof c=="object"&&Ul in c?c[Ul]:c},set(s,u,c){return a()[u]=c,!0},has(s,u){return u===Je?!0:Reflect.has(a(),u)},ownKeys(){return Reflect.ownKeys(a())},getOwnPropertyDescriptor(s,u){return i||(Object.assign(l,e(l)),i=!0),Object.getOwnPropertyDescriptor(s,u)}})}var Ze=window.state=on({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const yi=Ol({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function bi(e){return JSON.stringify(e,(t,l)=>r(l))}const wi={get(e,t){var i;if(t===Je||t===Al)return e[t];const l=e[Je][t];if(t!=="value"&&(ta(l)||Array.isArray(l))){if(l!==((i=e[t])==null?void 0:i[Je])){const a=[...e[Al],t];e[t]=new Proxy({[Je]:l,[Al]:a},wi)}return e[t]}return l},set(e,t,l,i){if(!Ze.hasNaN&&(typeof l=="number"&&isNaN(l)||l instanceof n&&(isNaN(l.sign)||isNaN(l.layer)||isNaN(l.mag)))){const a=e[Je][t];if(!(typeof a=="number"&&isNaN(a)||a instanceof n&&(isNaN(a.sign)||isNaN(a.layer)||isNaN(a.mag))))throw yi.autosave=!1,Ze.hasNaN=!0,Ze.NaNPath=[...e[Al],t],Ze.NaNReceiver=i,console.error("Attempted to set NaN value",[...e[Al],t],e[Je]),"Attempted to set NaN value. See above for details"}return e[Je][t]=l,!0},ownKeys(e){return Reflect.ownKeys(e[Je])},has(e,t){return Reflect.has(e[Je],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[Je],t)}};var z=window.player=new Proxy({[Je]:yi,[Al]:["player"]},wi);function Ci(e={}){return Object.assign({id:`${Me.id}-0`,name:"Default Save",tabs:Me.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:Me.id,modVersion:Me.versionNumber,layers:{}},e)}function qt(e){const t=il.compressToUTF16(bi(e!=null?e:z[Je]));return localStorage.setItem((e!=null?e:z[Je]).id,t),t}async function Co(){_o();try{let e=localStorage.getItem(Ye.active);if(e==null){await yl(Nl());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=il.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==Me.id){await yl(Nl());return}t.id=Ye.active,await yl(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
`,e),await yl(Nl())}}function Nl(){const e=Wl(),t=Ci({id:e});return qt(t),Ye.saves.push(e),t}function Wl(){let e,t=0;do e=`${Me.id}-${t++}`;while(localStorage.getItem(e));return e}const In=$(!1);async function yl(e){console.info("Loading save",e),In.value=!0;const{layers:t,removeLayer:l,addLayer:i}=await Jl(()=>Promise.resolve().then(function(){return yo}),void 0),{fixOldSave:a,getInitialLayers:s}=await Jl(()=>Promise.resolve().then(function(){return pr}),void 0);for(const u in t){const c=t[u];c&&l(c)}s(e).forEach(u=>i(u,e)),e=Ci(e),e.offlineProd&&e.time&&e.devSpeed!==0&&(e.offlineTime==null&&(e.offlineTime=0),e.offlineTime+=Math.min(e.offlineTime+(Date.now()-e.time)/1e3,Me.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==Me.versionNumber&&a(e.modVersion,e),Object.assign(z,e),Ye.active=z.id,Ue.emit("onLoad")}setInterval(()=>{z.autosave&&qt()},1e3);window.onbeforeunload=()=>{z.autosave&&qt()};window.save=qt;const ko=window.hardReset=async()=>{await yl(Nl())},Rl=Ol({active:"",saves:[],showTPS:!0,theme:_n.Nordic,unthrottled:!1});Qt(Rl,e=>{const t=il.compressToUTF16(JSON.stringify(e));localStorage.setItem(Me.id,t)},{deep:!0});var Ye=window.settings=Rl;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:_n.Nordic};Ue.emit("loadSettings",e),Object.assign(Rl,e),ko()};function _o(){try{let e=localStorage.getItem(Me.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=il.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(Rl,t)}Ue.emit("loadSettings",Rl)}catch{}}const ki=Ol([]);function Ao(e){ki.push(e)}const _i=Ol([]);function So(e){_i.push(e)}const No=Ol([]),Eo={class:"table"},At=ae({__name:"Column",setup(e){const t=C(()=>$l[Ye.theme].mergeAdjacent);return(l,i)=>(y(),E("div",Eo,[g("div",{class:et(["col",{mergeAdjacent:r(t)}])},[Vt(l.$slots,"default")],2)]))}}),Mo={class:"table"},Ml=ae({__name:"Row",setup(e){const t=C(()=>$l[Ye.theme].mergeAdjacent);return(l,i)=>(y(),E("div",Mo,[g("div",{class:et(["row",{mergeAdjacent:r(t)}])},[Vt(l.$slots,"default")],2)]))}});function Bn(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Ji(e)}function Ae(e,t="span"){return typeof e=="function"?ae({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),ae({template:e})):ae({render:()=>({})}):e}function re(e){if(Jt(e))return typeof e=="function"?e():Ae(e);const t=e[dl];return o(t,e[cl](),null)}function ye(...e){let t;return o(Ml,null,Bn(t=e.map(re))?t:{default:()=>[t]})}function sl(...e){let t;return o(At,null,Bn(t=e.map(re))?t:{default:()=>[t]})}function Lt(e){if(Jt(e))return typeof e=="function"?e():typeof e=="string"?o(I,null,[e]):o(e,null,null);const t=e[dl];return o(t,e[cl](),null)}function Io(...e){let t;return o(At,null,Bn(t=e.map(Lt))?t:{default:()=>[t]})}function Jt(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Tl]===!0}function Ai(e,t,l){const i=$(null),a=$(void 0);function s(p){i.value||(i.value=setInterval(c,250)),a.value=p,l&&(l.value=!0)}function u(){i.value&&(clearInterval(i.value),i.value=null),l&&(l.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(a.value)}return ei(u),{start:s,stop:u,handleHolding:c}}function Bo(e,t){const l=C(()=>e.filter(i=>r(i.visibility)===at.Visible&&t(i)));return{firstFeature:C(()=>l.value[0]),collapsedContent:B(()=>sl(...l.value.slice(1))),hasCollapsedContent:C(()=>l.value.length>1)}}function en(e,t="div"){const l=Tt();return Bt(()=>{l.value=Ae(ot(e),t)}),l}function ul(e,t="div"){const l=Tt(null);return Bt(()=>{const i=ot(e);l.value=i==null?null:Ae(i,t)}),l}function xo(e){return C(()=>ot(e))}function ot(e){return r(r(e))}function V(...e){return e.includes(Object)||e.push(Object),e}const ge=ae({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,l)=>(y(),E("div",{style:nt({width:e.width,height:e.height})},null,4))}});const Po={
<br/>
<br/>
Cost: 50 ${l.displayName}<br/>${oe(1e11)} ${R.coal.displayName}`}})),Ce=O(()=>({resource:F(l),cost:1e5,display:{title:"Efficient Drills",description:"Use metal and a bunch of R&D to make drilling stuff faster. Double coal and ore mining speed."},visibility:()=>x(Ke.depthMilestones[4].earned.value)})),he=Se(()=>({resource:F(l),cost(){return n.pow(1.15,this.amount.value).times(10)},display:{title:"Mining Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:B(()=>o(I,null,[d("Mine 2.5x faster. Increase ore mining amount by")," ",ie(he.amount.value),d(" ore per operation")]))},visibility:()=>x(n.gte(he.amount.value,1)||n.div(s.value,c.value).plus(i.value).gte(10)),style:{width:"200px"}})),me=Se(()=>({resource:F(l),cost(){return n.pow(1.15,n.times(this.amount.value,10)).times(10)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:B(()=>o(I,null,[d("Automatically smelts")," ",ie(n.times(me.amount.value,10)),d(" ore per second")]))},visibility:()=>x(n.gte(me.amount.value,1)||n.gte(he.amount.value,4)||n.gte(s.value,50)),style:{width:"200px"}})),$e=we(!0),Fe=Se(()=>({resource:R.coal,cost(){return n.pow(10,this.amount.value).times(1e12)},display:{title:"Hotter Forges",description:"More coal makes the fires burn hotter, getting just a little more metal out of each bit of ore",effectDisplay:B(()=>o(I,null,[d("Gain "),ie(n.times(rt.value,100)),d("% more metal per ore")]))},visibility:()=>x(n.gte(Fe.amount.value,1)||L.bought.value),style:{width:"200px"}})),rt=C(()=>n.times(Fe.amount.value,.25));Ue.on("update",ue=>{T.value=n.times(ue,S.value).plus(T.value);const ut=T.value.trunc();T.value=T.value.minus(ut),a.value=n.add(a.value,n.times(ut,Y.value)),$e.value&&A(n.min(f.value,n.times(m.value,ue)),h.value)});const[Te,Pt]=pl(()=>[{title:"Auto Smelt Speed",modifier:p,base:0,unit:"/s",visible(){return n.gt(me.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:b,base:1,visible(){return n.gt(h.value,1)}},{title:"Metal per Ore",modifier:u,base:.1},{title:"Ore per Mining Operation",modifier:P,base:1},{title:"Mining Speed",modifier:M,base:.1,unit:"/s"}]),te=$(!1),le=B(()=>o(bt,{modelValue:te.value,"onUpdate:modelValue":ue=>te.value=ue},{header:()=>o("h2",null,[e,d(" Modifiers")]),body:Te})),{total:Xe,trackerDisplay:He}=ml({resource:l,goal:25e3,name:e,day:Kn,color:t,modal:{show:te,display:le}});return{name:e,day:Kn,color:t,ore:a,bestOre:s,oreProgress:T,metal:l,bestMetal:i,totalMetal:Xe,simplePickaxe:Be,doublePickaxe:De,crucible:Ie,coalDrill:Oe,industrialFurnace:L,efficientDrill:Ce,oreDrill:he,industrialCrucible:me,autoSmeltEnabled:$e,hotterForge:Fe,generalTabCollapsed:Pt,minWidth:700,display:B(()=>o(I,null,[re(He),o(ge,null,null),o(St,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>o(I,null,[$e.value&&n.gte(me.amount.value,1)?`+${ui([[m.value,"smelting speed"],[Ee.value,"ore gain"],[n.div(R.computedCoalGain.value,w),"coal gain"]],"/s",n.mul(c.value,h.value))}`:void 0]))},null),o(ge,null,null),re(_),n.gte(me.amount.value,1)?o("div",{style:{width:"150px"}},[o(Wt,{title:"Auto Smelt",modelValue:$e.value,"onUpdate:modelValue":ue=>$e.value=ue},null)]):void 0,o(ge,null,null),o(St,{resource:a,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>o(I,null,[di(Re.value)]))},null),o(ge,null,null),o("div",null,[d("Currently mining "),oe(Y.value),d(" ore every")," ",oe(n.recip(S.value)),d(" seconds")]),re(Pe),o(ge,null,null),ye(Be,De,Ie,Oe,L,Ce),ye(he,me,Fe)]))}}),or="cloth",Jn=8,yt=Ut(or,function(){const e="Cloth",t="white",l=st(0,"cloth"),i=st(0,"wool"),a=st(10,"sheep"),s=we(0),u=Kt(()=>({direction:ke.Right,width:100,height:10,style:"margin-top: 8px",borderStyle:"border-color: black",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s; background: black",progress:()=>n.div(s.value,Te.value)})),c=It(()=>({display:{title:"Breed sheep",description:B(()=>o(I,null,[d("Breed "),ie(n.floor(Fe.value)),d(" sheep"),o("br",null,null),re(u)]))},style:{minHeight:"80px"}
margin: 10px 0;"/>${fe}`:T,l.value=!0},onOpenLayer(){if(Pe.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(z.tabs.includes(P!=null?P:"trees")){const H=z.tabs.lastIndexOf(P!=null?P:"trees");z.tabs.splice(H,1)}else z.tabs.push(P!=null?P:"trees"),Q.minimized.value=!0;else z.tabs.splice(1,1/0,P!=null?P:"trees")},onUnlockLayer(){P&&(M.value=!0,setTimeout(()=>{var H,Ee;i.value=-1,a.value=r((Ee=(H=vt[P!=null?P:"trees"])==null?void 0:H.name)!=null?Ee:""),s.value=T,z.devSpeed=null,l.value=!0},1e3))}}}}})}const c=[u(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Ii,story:"Oh no! Santa forgot about Christmas and it's only 25 days away! He's asked for your help due to your history getting large quantities of things in short amounts of time. Unfortunately you're really starting from scratch here - let's start with getting wood, which you'll need for everything from building workshops to wrapping paper to many of the toys themselves!",completedStory:"Santa looks at all the wood you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),u(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:Bi,story:"Santa looked over your tree farm and was impressed with how much you could accomplish in just one day. Today's goal is to get a workshop built up for the elves to work in - and apparently, they need quite a lot of space to work!",completedStory:"The workshop complete, Santa once again dismisses you for the day. With a strong foundation, this workshop should suffice for supporting future work toward this impossible mission. Good Job!"})),u(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:xi,story:"Santa tells you that unfortunately there are quite a few naughty children out there this year, and he's going to need you to gather as much coal as you can for him to give out.",completedStory:"Santa looks at all the coal you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),u(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:Pi,story:"Alright, it seems you finally have enough things set up to start bringing in the elves! Unfortunately, it seems they'll need to be retrained on how to help, since they've stopped practicing for 11 months!",completedStory:"The workshop now hums with the bustling elves working on everything. They can take it from here - you deserve a break after such a long day! Good Job!"})),u(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:Di,story:"With the elves trained, we're almost ready to start working on these presents! Just a couple more pre-reqs first, starting with turning all this wood into wood pulp and finally into paper, which will be required for wrapping paper later on but in the meantime can be used to help write guides which will help these elves continue their education!",completedStory:"You look upon your rivers of book pulp as you hand out stacks of papers to elves to read through. You've continued getting closer and closer to preparing for Christmas, and can go to bed satisfied with your progress. Good Job!"})),u(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:Fi,story:"You watch all these elves carrying incredibly large loads just in their open elf-sized hands, and realize there's probably a better way. You need to put the toys in boxes anyways, so why don't we get started working on those so the workers can take advantage as well?",completedStory:"Wow, those boxes are really convenient! The workshop feels more and more proper with every day. You tick another requirement on your list and start looking towards tomorrow. Good Job!"})),u(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:Ti,story:"You woke up ready to make some toys, before realizing most toys these days are made out of more than just wood! You're sure you're close to really getting to work, but there's a few more materials you're going to need - like metal! Lots of things need metal!",completedStory:"The sounds of drill
${T}
${S}`)}}return m[M]}Qt(l,M=>{M&&Object.keys(m).forEach(S=>delete m[S])});const h=C(()=>Ye.saves.reduce((M,S)=>(M[S]=b(S),M),{}));function w(M){let S;switch(z.id===M?S=bi(z[Je]):S=JSON.stringify(h.value[M]),Me.exportEncoding){default:console.warn(`Unknown save encoding: ${Me.exportEncoding}. Defaulting to lz`);case"lz":S=il.compressToUTF16(S);break;case"base64":S=btoa(unescape(encodeURIComponent(S)));break;case"plain":break}const T=document.createElement("textarea");T.value=S,document.body.appendChild(T),T.select(),T.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(T)}function f(M){z.id===M&&qt();const S={...h.value[M],id:Wl()};qt(S),Ye.saves.push(S.id)}function _(M){Ye.saves=Ye.saves.filter(S=>S!==M),localStorage.removeItem(M),m[M]=void 0}function A(M){h.value[z.id].time=z.time,qt(),m[z.id]=void 0,yl(h.value[M]),m[M]=void 0}function P(M){if(u.value=M,bl(()=>{u.value=null}),M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=il.decompressFromUTF16(M);else{console.warn("Unable to determine preset encoding",M);return}const S=JSON.parse(M);S.id=Wl(),qt(S),Ye.saves.push(S.id),A(S.id)}function Y(M,S){const T=h.value[M];T&&(T.name=S,z.id===M?(z.name=S,qt()):(qt(T),m[M]=void 0))}return(M,S)=>(y(),ee(bt,{modelValue:l.value,"onUpdate:modelValue":S[4]||(S[4]=T=>l.value=T),ref_key:"modal",ref:i},{header:J(()=>[Uu]),body:J(({shown:T})=>[T?(y(),ee(r(ia),{key:0,list:r(Ye).saves,handle:".handle",itemKey:fe=>fe},{item:J(({element:fe})=>[o(Tu,{save:r(h)[fe],onOpen:Pe=>A(fe),onExport:Pe=>w(fe),onEditName:Pe=>Y(fe,Pe),onDuplicate:Pe=>f(fe),onDelete:Pe=>_(fe)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):U("",!0)]),footer:J(()=>[g("div",Ru,[o(Gi,{modelValue:s.value,"onUpdate:modelValue":S[0]||(S[0]=T=>s.value=T),title:"Import Save",placeholder:"Paste your save here!",class:et({importingFailed:a.value})},null,8,["modelValue","class"]),g("div",Ou,[$u,g("div",qu,[g("button",{class:"button",onClick:S[1]||(S[1]=T=>A(r(Nl)().id))},"New Game"),Object.keys(r(p)).length>0?(y(),ee(Dn,{key:0,options:r(p),modelValue:u.value,"onUpdate:modelValue":S[2]||(S[2]=T=>P(T)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):U("",!0)])]),g("div",Gu,[Vu,g("button",{class:"button modal-default-button",onClick:S[3]||(S[3]=T=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Vi=Ne(Lu,[["__scopeId","data-v-3b9991aa"]]);const xt=e=>(Yt("data-v-8495e562"),e=e(),Xt(),e),Qu=["src","alt"],Hu={key:1,class:"title"},ju=xt(()=>g("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),zu={class:"discord"},Wu={class:"discord-links"},Ku={key:0},Ju=["href"],Yu=xt(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Xu=xt(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Zu={href:"https://forums.moddingtree.com/",target:"_blank"},ed=xt(()=>g("span",{class:"material-icons"},"forum",-1)),td=xt(()=>g("span",{class:"material-icons"},"info",-1)),ld=xt(()=>g("span",{class:"material-icons"},"library_books",-1)),nd=xt(()=>g("span",{class:"material-icons"},"settings",-1)),id=xt(()=>g("span",{class:"material-icons"},"library_books",-1)),ad=xt(()=>g("span",{class:"material-icons"},"settings",-1)),od=xt(()=>g("span",{class:"material-icons"},"info",-1)),sd={href:"https://forums.moddingtree.com/",target:"_blank"},rd=xt(()=>g("span",{class:"material-icons"},"forum",-1)),ud={class:"discord"},dd={class:"discord-links"},cd={key:0},pd=["href"],md=xt(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),gd=xt(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),fd=ae({__name:"Nav",setup(e){const t=$(null),l=$(null),i=$(null),a=$(null),{useHeader:s,banner:u,title:c,discordName:p,discordLink:m,versionNumber:b}=Me;function h(){window.open(m,"mywindow")}return(w,f)=>(y(),E(I,null,[r(s)?(y(),E("div",wl({key:0,cla
Learn more at www.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await Co();const{globalBus:e}=await Jl(()=>Promise.resolve().then(function(){return no}),void 0),{startGameLoop:t}=await Jl(()=>import("./gameLoop.4130e80e.js"),["assets/gameLoop.4130e80e.js","assets/@fontsource.c175eac8.css","assets/vue.92681fcb.js","assets/lz-string.731cedc5.js","assets/@vue.4ce677c2.js","assets/nanoevents.1080beb7.js","assets/is-plain-object.906d88e8.js","assets/vue-next-select.a2bfab1d.js","assets/vue-next-select.9e6f4164.css","assets/vue-toastification.6f567382.js","assets/vue-toastification.4b5f8ac8.css","assets/vuedraggable.7949458c.js","assets/sortablejs.29100d8a.js","assets/vue-textarea-autosize.35804eaf.js","assets/workbox-window.8d14e8b7.js"]),l=window.vue=ea(Yd);e.emit("setupVue",l),l.mount("#app"),bl(()=>{const i=ni(),{updateServiceWorker:a}=Zd({onNeedRefresh(){i.info("New content available, click or reload to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){a()}})},onOfflineReady(){i.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{n as D,Jl as _,Ze as a,Me as b,pr as c,Ue as g,In as l,z as p,Ye as s};