pages/advent/assets/index.a00ed2b1.js

20 lines
178 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.92681fcb.js";import{Z as N,l as Fe,aa as Q,t as O,ay as An,ar as Kt,aE as y,a0 as M,aK as _t,a1 as f,O as B,aG as yn,A as je,_ as G,a8 as u,b6 as L,b8 as In,bs as Sl,C as o,aq as Wt,bu as on,bb as En,T as wi,a7 as p,u as Bn,j as ki,bv as ul,q as dn,b1 as yt,G as Ie,aC as Ml,w as rt,b2 as at,ao as Ci,I as Te,J as W,$ as P,aH as Mt,aF as At,z as bt,aN as be,al as kn,aL as Rt,H as Ni,aJ as Al,bn as Si,br as Mi,be as Ai}from"./@vue.4ce677c2.js";import{c as Il}from"./nanoevents.1080beb7.js";import{L as Tt}from"./lz-string.731cedc5.js";import{i as Ii}from"./is-plain-object.906d88e8.js";import{Y as Ei}from"./vue-next-select.a2bfab1d.js";import{s as Bi,u as El}from"./vue-toastification.6f567382.js";import{D as xi}from"./vuedraggable.7949458c.js";import{p as Pi}from"./vue-textarea-autosize.35804eaf.js";import{v as Fi,n as Ti}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const Di=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))l(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const r of s.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&l(r)}).observe(document,{childList:!0,subtree:!0});function n(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 l(a){if(a.ep)return;a.ep=!0;const s=n(a);fetch(a.href,s)}};Di();const $i="modulepreload",cl={},Ri="./",Cn=function(t,n){return!n||n.length===0?t():Promise.all(n.map(l=>{if(l=`${Ri}${l}`,l in cl)return;cl[l]=!0;const a=l.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${s}`))return;const r=document.createElement("link");if(r.rel=a?"stylesheet":$i,a||(r.as="script",r.crossOrigin=""),r.href=l,document.head.appendChild(r),a)return new Promise((c,m)=>{r.addEventListener("load",c),r.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>t())},Oi="./projInfo-schema.json",Ui="Advent Incremental",qi="An incremental game you play a day at a time, leading up to Christmas!",Vi="advent-incremental",Li="thepaperpilot and friends",Gi="",Hi="",Qi="0.3",zi="Initial Commit",ji=!0,Ki=!1,Wi=2,Ji=!0,Xi=null,Yi="",Zi=["main"],ea=3600,ta=0,na=!0,la="base64";var re={$schema:Oi,title:Ui,description:qi,id:Vi,author:Li,discordName:Gi,discordLink:Hi,versionNumber:Qi,versionTitle:zi,allowGoBack:ji,defaultShowSmall:Ki,defaultDecimalsShown:Wi,useHeader:Ji,banner:Xi,logo:Yi,initialTabs:Zi,maxTickLength:ea,offlineLimit:ta,enablePausing:na,exportEncoding:la};const Un=17,ia=9e15,aa=Math.log10(9e15),sa=1/9e15,oa=308,ra=-324,dl=5,ua=function(){const e=[];for(let n=ra+1;n<=oa;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),Ht=[2,Math.E,3,4,5,6,7,8,9,10],ca=[[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
Stack: ${ht}
Trying to pop ${n.id}`;return ht.pop(),$(n,"color"),$(n,"display"),$(n,"name"),ze(n,"name",n.id),$(n,"minWidth"),ze(n,"minWidth",600),$(n,"minimizable"),ze(n,"minimizable",!0),n})}function Vl(e,t){if(console.info("Adding layer",e.id),Xe[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,Xe[e.id]);return}ze(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),Xe[e.id]=e,Ee.emit("addLayer",e,t.layers[e.id])}function Va(e){return Xe[e]}function Ll(e){console.info("Removing layer",e.id),Ee.emit("removeLayer",e),Xe[e.id]=void 0}function La(e){Ll(e),Vl(e,V)}function Ga(e){const t=O(!1);return{openModal:()=>t.value=!0,modal:x(()=>u(ct,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>u("h2",null,[o(e.name)]),body:o(e.display)}))}}Ee.on("update",function(t){Object.values(Xe).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(Xe).forEach(n=>{n==null||n.emit("update",t)}),Object.values(Xe).forEach(n=>{n==null||n.emit("postUpdate",t)})});var Ha=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:zn,UnregisterNodeInjectionKey:jn,NodesInjectionKey:Kn,BoundsInjectionKey:Wn,layers:Xe,persistentRefs:Yt,addingLayers:ht,createLayer:It,addLayer:Vl,getLayer:Va,removeLayer:Ll,reloadLayer:La,setupLayerModal:Ga},Symbol.toStringTag,{value:"Module"}));const Jn=Symbol("PersistentState"),$t=Symbol("DefaultValue"),Sn=Symbol("StackTrace"),Gl=Symbol("Deleted"),un=Symbol("NonPersistent"),sn=Symbol("SaveDataPath");function Qa(){var e;return((e=new Error().stack)==null?void 0:e.split(`
`).slice(3,5).map(t=>t.trim()).join(`
`))||""}function _e(e){const t=Fe(e)?e:O(e);t[Jn]=t,t[$t]=Fe(e)?e.value:e,t[Sn]=Qa(),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,`
Created at:
`+t[Sn]):Yt[ht[ht.length-1]].add(t),t}function za(e){return e&&typeof e=="object"&&Jn in e}function K(e){return e[un]}Ee.on("addLayer",(e,t)=>{const n=[],l=(a,s=[])=>{let r=!1;return Object.keys(a).forEach(c=>{let m=a[c];if(m&&typeof m=="object")if(ke in m&&(m=m[ke]),za(m)){if(r=!0,m[Gl]){console.warn("Deleted persistent ref present in returned object. Ignoring...",m,`
Created at:
`+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(`Persistent ref is being saved to \`${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;const v=s.reduce((_,g)=>(g in _||(_[g]={}),_[g]),t),b=v[c];v[c]=m[Jn],ki(v)?b!=null?v[c]=b:v[c]=m[$t]:b!=null?v[c].value=b:v[c].value=m[$t]}else!(m instanceof i)&&!Fe(m)&&!n.includes(m)&&(typeof m.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.",ke in a?a[ke]:a,c):r=!0))}),r};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,`
Created at:
`+a[Sn])}),Yt[e.id].clear()});const ke=Symbol("ProxyState"),Xt=Symbol("ProxyPath");function lt(e,t={}){const n=t;let l=!1;function a(){return l||(Object.assign(n,e(n)),l=!0),n}return new Proxy(n,{get(s,r){if(r===ke)return a();const c=a()[r];return c&&typeof c=="object"&&un in c?c[un]:c},set(s,r,c){return a()[r]=c,!0},has(s,r){return r===ke?!0:Reflect.has(a(),r)},ownKeys(){return Reflect.ownKeys(a())},getOwnPropertyDescriptor(s,r){return l||(Object.assign(n,e(n)),l=!0),Object.getOwnPropertyDescriptor(s,r)}})}var Me=window.state=Bn({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Hl=dn({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function Ql(e){return JSON.stringify(e,(t,n)=>o(n))}const zl={get(e,t){var l;if(t===ke||t===Xt)return e[t];const n=e[ke][t];if(t!=="value"&&(Ii(n)||Array.isArray(n))){if(n!==((l=e[t])==null?void 0:l[ke])){const a=[...e[Xt],t];e[t]=new Proxy({[ke]:n,[Xt]:a},zl)}return e[t]}return n},set(e,t,n,l){if(!Me.hasNaN&&(typeof n=="number"&&isNaN(n)||n instanceof i&&(isNaN(n.sign)||isNaN(n.layer)||isNaN(n.mag)))){const a=e[ke][t];if(!(typeof a=="number"&&isNaN(a)||a instanceof i&&(isNaN(a.sign)||isNaN(a.layer)||isNaN(a.mag))))throw Hl.autosave=!1,Me.hasNaN=!0,Me.NaNPath=[...e[Xt],t],Me.NaNReceiver=l,console.error("Attempted to set NaN value",[...e[Xt],t],e[ke]),"Attempted to set NaN value. See above for details"}return e[ke][t]=n,!0},ownKeys(e){return Reflect.ownKeys(e[ke])},has(e,t){return Reflect.has(e[ke],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[ke],t)}};var V=window.player=new Proxy({[ke]:Hl,[Xt]:["player"]},zl);function jl(e={}){return Object.assign({id:`${re.id}-0`,name:"Default Save",tabs:re.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:re.id,modVersion:re.versionNumber,layers:{}},e)}function gt(e){const t=Tt.compressToUTF16(Ql(e!=null?e:V[ke]));return localStorage.setItem((e!=null?e:V[ke]).id,t),t}async function ja(){Wa();try{let e=localStorage.getItem(Ce.active);if(e==null){await zt(Zt());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Tt.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==re.id){await zt(Zt());return}t.id=Ce.active,await zt(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
`,e),await zt(Zt())}}function Zt(){const e=_n(),t=jl({id:e});return gt(t),Ce.saves.push(e),t}function _n(){let e,t=0;do e=`${re.id}-${t++}`;while(localStorage.getItem(e));return e}async function zt(e){console.info("Loading save",e);const{layers:t,removeLayer:n,addLayer:l}=await Cn(()=>Promise.resolve().then(function(){return Ha}),void 0),{fixOldSave:a,getInitialLayers:s}=await Cn(()=>Promise.resolve().then(function(){return Bo}),void 0);for(const r in t){const c=t[r];c&&n(c)}s(e).forEach(r=>l(r,e)),e=jl(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,re.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==re.versionNumber&&a(e.modVersion,e),Object.assign(V,e),Ce.active=V.id,Ee.emit("onLoad")}setInterval(()=>{V.autosave&&gt()},1e3);window.onbeforeunload=()=>{V.autosave&&gt()};window.save=gt;const Ka=window.hardReset=async()=>{await zt(Zt())},cn=dn({active:"",saves:[],showTPS:!0,theme:Qn.Nordic,unthrottled:!1});yt(cn,e=>{const t=Tt.compressToUTF16(JSON.stringify(e));localStorage.setItem(re.id,t)},{deep:!0});var Ce=window.settings=cn;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Qn.Nordic};Ee.emit("loadSettings",e),Object.assign(cn,e),Ka()};function Wa(){try{let e=localStorage.getItem(re.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Tt.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(cn,t)}Ee.emit("loadSettings",cn)}catch{}}const Kl=dn([]);function Ja(e){Kl.push(e)}const Wl=dn([]);function Xa(e){Wl.push(e)}const Ya=dn([]),Za={class:"table"},jt=Q({__name:"Column",setup(e){const t=N(()=>mn[Ce.theme].mergeAdjacent);return(n,l)=>(y(),M("div",Za,[f("div",{class:Ie(["col",{mergeAdjacent:o(t)}])},[_t(n.$slots,"default")],2)]))}}),es={class:"table"},Jl=Q({__name:"Row",setup(e){const t=N(()=>mn[Ce.theme].mergeAdjacent);return(n,l)=>(y(),M("div",es,[f("div",{class:Ie(["row",{mergeAdjacent:o(t)}])},[_t(n.$slots,"default")],2)]))}});function Xn(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Ci(e)}function ie(e,t="span"){return typeof e=="function"?Q({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),Q({template:e})):Q({render:()=>({})}):e}function he(e){if(St(e))return typeof e=="function"?e():ie(e);const t=e[Ut];return u(t,e[qt](),null)}function xe(...e){let t;return u(Jl,null,Xn(t=e.map(he))?t:{default:()=>[t]})}function Xl(...e){let t;return u(jt,null,Xn(t=e.map(he))?t:{default:()=>[t]})}function vt(e){if(St(e))return typeof e=="function"?e():typeof e=="string"?u(B,null,[e]):u(e,null,null);const t=e[Ut];return u(t,e[qt](),null)}function ts(...e){let t;return u(jt,null,Xn(t=e.map(vt))?t:{default:()=>[t]})}function St(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[rn]===!0}function Yl(e,t,n){const l=O(null),a=O(void 0);function s(m){l.value||(l.value=setInterval(c,250)),a.value=m,n&&(n.value=!0)}function r(){l.value&&(clearInterval(l.value),l.value=null),n&&(n.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(a.value)}return Ml(r),{start:s,stop:r,handleHolding:c}}function ns(e,t){const n=N(()=>e.filter(l=>o(l.visibility)===Ue.Visible&&t(l)));return{firstFeature:N(()=>n.value[0]),collapsedContent:x(()=>Xl(...n.value.slice(1))),hasCollapsedContent:N(()=>n.value.length>1)}}function Mn(e,t="div"){const n=rt();return at(()=>{n.value=ie(qe(e),t)}),n}function Ot(e,t="div"){const n=rt(null);return at(()=>{const l=qe(e);n.value=l==null?null:ie(l,t)}),n}function ls(e){return N(()=>qe(e))}function qe(e){return o(o(e))}function R(...e){return e.includes(Object)||e.push(Object),e}const fe=Q({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(y(),M("div",{style:Te({width:e.width,height:e.height})},null,4))}});const is={},as={class:"notif"};function ss(
<br/>
<br/>
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:r,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)]))}}),So="coal",kl=3,U=It(So,function(){const e="Coal",t="#151716",n="#B2BeB5",l="var(--foreground)",a=ut(0,"coal"),s=ut(0,"ash"),r=_e(0),c=N(()=>i.times(r.value,1e3)),m=N(()=>i.times(r.value,.1)),d=N(()=>i.times(r.value,50)),v=He(()=>({resource:ee.logs,cost(){let E=i.times(T.amount.value,o(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(o(v.cost)),p(" "),v.resource.displayName])),onPurcha
margin: 10px 0;"/>${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=o((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=[r(()=>({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!"})),r(()=>({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'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:si,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:oi,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:ri,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:ui,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:Ao,story:"",completedStory:""})),r(()=>({day:8,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:9,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:10,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),r(()=>({day:11,shouldNotify:
${T}
${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(`Unknown save encoding: ${re.exportEncoding}. Defaulting to lz`);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&&gt();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(r.value=A,Kt(()=>{r.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(()=>[Wr]),body:L(({shown:T})=>[T?(y(),G(o(xi),{key:0,list:o(Ce).saves,handle:".handle",itemKey:ge=>ge},{item:L(({element:ge})=>[u(Kr,{save:o(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",Jr,[u(mi,{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",Xr,[Yr,f("div",Zr,[f("button",{class:"button",onClick:C[1]||(C[1]=T=>S(o(Zt)().id))},"New Game"),Object.keys(o(m)).length>0?(y(),G(el,{key:0,options:o(m),modelValue:r.value,"onUpdate:modelValue":C[2]||(C[2]=T=>I(T)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):P("",!0)])]),f("div",eu,[tu,f("button",{class:"button modal-default-button",onClick:C[3]||(C[3]=T=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var pi=ue(nu,[["__scopeId","data-v-3b9991aa"]]);const st=e=>(Mt("data-v-4a3f8425"),e=e(),At(),e),lu=["src","alt"],iu={key:1,class:"title"},au=st(()=>f("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),su={class:"discord"},ou={class:"discord-links"},ru={key:0},uu=["href"],cu=st(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),du=st(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),mu={href:"https://forums.moddingtree.com/",target:"_blank"},pu=st(()=>f("span",{class:"material-icons"},"forum",-1)),fu=st(()=>f("span",{class:"material-icons"},"info",-1)),hu=st(()=>f("span",{class:"material-icons"},"library_books",-1)),gu=st(()=>f("span",{class:"material-icons"},"settings",-1)),vu=st(()=>f("span",{class:"material-icons"},"library_books",-1)),yu=st(()=>f("span",{class:"material-icons"},"settings",-1)),bu=st(()=>f("span",{class:"material-icons"},"info",-1)),_u={href:"https://forums.moddingtree.com/",target:"_blank"},wu=st(()=>f("span",{class:"material-icons"},"forum",-1)),ku={class:"discord"},Cu={class:"discord-links"},Nu={key:0},Su=["href"],Mu=st(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Au=st(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Iu=Q({__name:"Nav",setup(e){const t=O(null),n=O(null),l=O(null),a=O(null),{useHeader:s,banner:r,title:c,discordName:m,discordLink:d,versionNumber:v}=re;function b(){window.open(d,"mywindow")}return(_,g)=>(y(),M(B,null,[o(s)?(y(),M("div",Wt({key:0,class
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 ja();const{globalBus:e}=await Cn(()=>Promise.resolve().then(function(){return Ba}),void 0),{startGameLoop:t}=await Cn(()=>import("./gameLoop.78dd604c.js"),["assets/gameLoop.78dd604c.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=Ai(cc);e.emit("setupVue",n),n.mount("#app"),Kt(()=>{const l=El(),{updateServiceWorker:a}=mc({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};