pages/advent/assets/index.969caccf.js

20 lines
232 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.92681fcb.js";import{Z as f,l as nt,aa as ue,t as Q,ay as aa,ar as wl,aE as C,a0 as I,aK as qt,a1 as g,O as D,aG as Wl,A as vt,_ as ae,a8 as i,b6 as X,b8 as na,bs as tn,C as r,aq as Al,bu as Fl,bb as oa,T as Zn,a7 as c,u as ia,j as eo,bv as wa,q as Ql,b1 as jt,G as lt,aC as ln,w as Tt,b2 as Dt,ao as to,I as ot,J as fe,$ as T,aH as Zt,aF as el,z as Wt,aN as We,al as Jl,aL as cl,H as lo,aJ as an,bn as ao,br as no,be as oo}from"./@vue.4ce677c2.js";import{c as nn}from"./nanoevents.1080beb7.js";import{L as rl}from"./lz-string.731cedc5.js";import{i as io}from"./is-plain-object.906d88e8.js";import{Y as so}from"./vue-next-select.a2bfab1d.js";import{s as ro,u as on}from"./vue-toastification.6f567382.js";import{D as uo}from"./vuedraggable.7949458c.js";import{p as co}from"./vue-textarea-autosize.35804eaf.js";import{v as po,n as mo}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const go=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function l(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerpolicy&&(s.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?s.credentials="include":o.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(o){if(o.ep)return;o.ep=!0;const s=l(o);fetch(o.href,s)}};go();const fo="modulepreload",$a={},vo="./",Yl=function(t,l){return!l||l.length===0?t():Promise.all(l.map(n=>{if(n=`${vo}${n}`,n in $a)return;$a[n]=!0;const o=n.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${s}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":fo,o||(u.as="script",u.crossOrigin=""),u.href=n,document.head.appendChild(u),o)return new Promise((d,p)=>{u.addEventListener("load",d),u.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t())},ho="./projInfo-schema.json",yo="Advent Incremental",bo="An incremental game you play a day at a time, leading up to Christmas!",wo="advent-incremental",Ao="thepaperpilot and friends",Co="",ko="",_o="0.3",So="Initial Commit",Eo=!0,Bo=!1,No=2,Io=!0,Mo=null,Do="",xo=["main"],Po=3600,Uo=0,Fo=!0,Ro="base64";var Ie={$schema:ho,title:yo,description:bo,id:wo,author:Ao,discordName:Co,discordLink:ko,versionNumber:_o,versionTitle:So,allowGoBack:Eo,defaultShowSmall:Bo,defaultDecimalsShown:No,useHeader:Io,banner:Mo,logo:Do,initialTabs:xo,maxTickLength:Po,offlineLimit:Uo,enablePausing:Fo,exportEncoding:Ro};const fa=17,To=9e15,Oo=Math.log10(9e15),Qo=1/9e15,$o=308,Go=-324,Ga=5,Vo=function(){const e=[];for(let l=Go+1;l<=$o;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],qo=[[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"),ft(l,"name",l.id),G(l,"minWidth"),ft(l,"minWidth",600),G(l,"minimizable"),ft(l,"minimizable",!0),l})}function yn(e,t){if(console.info("Adding layer",e.id),wt[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,wt[e.id]);return}ft(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),wt[e.id]=e,Te.emit("addLayer",e,t.layers[e.id])}function wi(e){return wt[e]}function bn(e){console.info("Removing layer",e.id),Te.emit("removeLayer",e),wt[e.id]=void 0}function Ai(e){bn(e),yn(e,z)}function Ci(e){const t=Q(!1);return{openModal:()=>t.value=!0,modal:N(()=>i(ht,{modelValue:t.value,"onUpdate:modelValue":l=>t.value=l},{header:()=>i("h2",null,[r(e.name)]),body:r(e.display)}))}}Te.on("update",function(t){Object.values(wt).forEach(l=>{l==null||l.emit("preUpdate",t)}),Object.values(wt).forEach(l=>{l==null||l.emit("update",t)}),Object.values(wt).forEach(l=>{l==null||l.emit("postUpdate",t)})});var ki=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:_a,UnregisterNodeInjectionKey:Sa,NodesInjectionKey:Ea,BoundsInjectionKey:Ba,layers:wt,persistentRefs:El,addingLayers:$t,createLayer:xt,addLayer:yn,getLayer:wi,removeLayer:bn,reloadLayer:Ai,setupLayerModal:Ci},Symbol.toStringTag,{value:"Module"}));const Na=Symbol("PersistentState"),dl=Symbol("DefaultValue"),ea=Symbol("StackTrace"),wn=Symbol("Deleted"),Tl=Symbol("NonPersistent"),Ul=Symbol("SaveDataPath");function _i(){var e;return((e=new Error().stack)==null?void 0:e.split(`
`).slice(3,5).map(t=>t.trim()).join(`
`))||""}function Ae(e){const t=nt(e)?e:Q(e);t[Na]=t,t[dl]=nt(e)?e.value:e,t[ea]=_i(),t[wn]=!1;const l=f({get(){return t.value},set(n){t.value=n}});return l[dl]=t[dl],t[Tl]=l,t[Ul]=void 0,$t.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
Created at:
`+t[ea]):El[$t[$t.length-1]].add(t),t}function Si(e){return e&&typeof e=="object"&&Na in e}function F(e){return e[Tl]}Te.on("addLayer",(e,t)=>{const l=[],n=(o,s=[])=>{let u=!1;return Object.keys(o).forEach(d=>{let p=o[d];if(p&&typeof p=="object")if(Je in p&&(p=p[Je]),Si(p)){if(u=!0,p[wn]){console.warn("Deleted persistent ref present in returned object. Ignoring...",p,`
Created at:
`+p[ea]);return}El[e.id].delete(p);const m=[e.id,...s,d];p[Ul]!=null&&JSON.stringify(m)!==JSON.stringify(p[Ul])&&console.error(`Persistent ref is being saved to \`${m.join(".")}\` when it's already present at \`${p[Ul].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,p),p[Ul]=m;const w=s.reduce((A,v)=>(v in A||(A[v]={}),A[v]),t),h=w[d];w[d]=p[Na],eo(w)?h!=null?w[d]=h:w[d]=p[dl]:h!=null?w[d].value=h:w[d].value=p[dl]}else!(p instanceof a)&&!nt(p)&&!l.includes(p)&&(typeof p.type=="symbol"&&l.push(p),n(p,[...s,d])&&(wa(p)&&!wa(o)?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 o?o[Je]:o,d):u=!0))}),u};n(e[Je]),El[e.id].forEach(o=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,o,`
Created at:
`+o[ea])}),El[e.id].clear()});const Je=Symbol("ProxyState"),Sl=Symbol("ProxyPath");function _t(e,t={}){const l=t;let n=!1;function o(){return n||(Object.assign(l,e(l)),n=!0),l}return new Proxy(l,{get(s,u){if(u===Je)return o();const d=o()[u];return d&&typeof d=="object"&&Tl in d?d[Tl]:d},set(s,u,d){return o()[u]=d,!0},has(s,u){return u===Je?!0:Reflect.has(o(),u)},ownKeys(){return Reflect.ownKeys(o())},getOwnPropertyDescriptor(s,u){return n||(Object.assign(l,e(l)),n=!0),Object.getOwnPropertyDescriptor(s,u)}})}var et=window.state=ia({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const An=Ql({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function Cn(e){return JSON.stringify(e,(t,l)=>r(l))}const kn={get(e,t){var n;if(t===Je||t===Sl)return e[t];const l=e[Je][t];if(t!=="value"&&(io(l)||Array.isArray(l))){if(l!==((n=e[t])==null?void 0:n[Je])){const o=[...e[Sl],t];e[t]=new Proxy({[Je]:l,[Sl]:o},kn)}return e[t]}return l},set(e,t,l,n){if(!et.hasNaN&&(typeof l=="number"&&isNaN(l)||l instanceof a&&(isNaN(l.sign)||isNaN(l.layer)||isNaN(l.mag)))){const o=e[Je][t];if(!(typeof o=="number"&&isNaN(o)||o instanceof a&&(isNaN(o.sign)||isNaN(o.layer)||isNaN(o.mag))))throw An.autosave=!1,et.hasNaN=!0,et.NaNPath=[...e[Sl],t],et.NaNReceiver=n,console.error("Attempted to set NaN value",[...e[Sl],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]:An,[Sl]:["player"]},kn);function _n(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 Gt(e){const t=rl.compressToUTF16(Cn(e!=null?e:z[Je]));return localStorage.setItem((e!=null?e:z[Je]).id,t),t}async function Ei(){Ni();try{let e=localStorage.getItem(Ye.active);if(e==null){await bl(Bl());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=rl.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==Ie.id){await bl(Bl());return}t.id=Ye.active,await bl(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
`,e),await bl(Bl())}}function Bl(){const e=zl(),t=_n({id:e});return Gt(t),Ye.saves.push(e),t}function zl(){let e,t=0;do e=`${Ie.id}-${t++}`;while(localStorage.getItem(e));return e}const Ia=Q(!1);async function bl(e){console.info("Loading save",e),Ia.value=!0;const{layers:t,removeLayer:l,addLayer:n}=await Yl(()=>Promise.resolve().then(function(){return ki}),void 0),{fixOldSave:o,getInitialLayers:s}=await Yl(()=>Promise.resolve().then(function(){return yr}),void 0);for(const u in t){const d=t[u];d&&l(d)}s(e).forEach(u=>n(u,e)),e=_n(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&&o(e.modVersion,e),Object.assign(z,e),Ye.active=z.id,Te.emit("onLoad")}setInterval(()=>{z.autosave&&Gt()},1e3);window.onbeforeunload=()=>{z.autosave&&Gt()};window.save=Gt;const Bi=window.hardReset=async()=>{await bl(Bl())},Ol=Ql({active:"",saves:[],showTPS:!0,theme:ka.Nordic,unthrottled:!1});jt(Ol,e=>{const t=rl.compressToUTF16(JSON.stringify(e));localStorage.setItem(Ie.id,t)},{deep:!0});var Ye=window.settings=Ol;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:ka.Nordic};Te.emit("loadSettings",e),Object.assign(Ol,e),Bi()};function Ni(){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=rl.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(Ol,t)}Te.emit("loadSettings",Ol)}catch{}}const Sn=Ql([]);function Ii(e){Sn.push(e)}const En=Ql([]);function Mi(e){En.push(e)}const Di=Ql([]),xi={class:"table"},Bt=ue({__name:"Column",setup(e){const t=f(()=>$l[Ye.theme].mergeAdjacent);return(l,n)=>(C(),I("div",xi,[g("div",{class:lt(["col",{mergeAdjacent:r(t)}])},[qt(l.$slots,"default")],2)]))}}),Pi={class:"table"},Il=ue({__name:"Row",setup(e){const t=f(()=>$l[Ye.theme].mergeAdjacent);return(l,n)=>(C(),I("div",Pi,[g("div",{class:lt(["row",{mergeAdjacent:r(t)}])},[qt(l.$slots,"default")],2)]))}});function Ma(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!to(e)}function Ee(e,t="span"){return typeof e=="function"?ue({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),ue({template:e})):ue({render:()=>({})}):e}function Z(e){if(Xt(e))return typeof e=="function"?e():Ee(e);const t=e[ml];return i(t,e[gl](),null)}function ye(...e){let t;return i(Il,null,Ma(t=e.map(Z))?t:{default:()=>[t]})}function Ht(...e){let t;return i(Bt,null,Ma(t=e.map(Z))?t:{default:()=>[t]})}function Lt(e){if(Xt(e))return typeof e=="function"?e():typeof e=="string"?i(D,null,[e]):i(e,null,null);const t=e[ml];return i(t,e[gl](),null)}function Ui(...e){let t;return i(Bt,null,Ma(t=e.map(Lt))?t:{default:()=>[t]})}function Xt(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Rl]===!0}function Bn(e,t,l){const n=Q(null),o=Q(void 0);function s(p){n.value||(n.value=setInterval(d,250)),o.value=p,l&&(l.value=!0)}function u(){n.value&&(clearInterval(n.value),n.value=null),l&&(l.value=!1)}function d(){t&&t.value?t.value():e&&e.value&&e.value(o.value)}return ln(u),{start:s,stop:u,handleHolding:d}}function Fi(e,t){const l=f(()=>e.filter(n=>r(n.visibility)===it.Visible&&t(n)));return{firstFeature:f(()=>l.value[0]),collapsedContent:N(()=>Ht(...l.value.slice(1))),hasCollapsedContent:f(()=>l.value.length>1)}}function ta(e,t="div"){const l=Tt();return Dt(()=>{l.value=Ee(rt(e),t)}),l}function pl(e,t="div"){const l=Tt(null);return Dt(()=>{const n=rt(e);l.value=n==null?null:Ee(n,t)}),l}function Ri(e){return f(()=>rt(e))}function rt(e){return r(r(e))}function V(...e){return e.includes(Object)||e.push(Object),e}const ce=ue({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,l)=>(C(),I("div",{style:ot({width:e.width,height:e.height})},null,4))}});const Ti={},O
<br/>
<br/>
Cost: 50 ${l.displayName}<br/>${de(1e11)} ${O.coal.displayName}`}})),Ce=R(()=>({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:()=>M(Ve.depthMilestones[4].earned.value)})),we=Se(()=>({resource:F(l),cost(){return a.pow(1.15,this.amount.value).times(10)},display:{title:"Mining Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:N(()=>i(D,null,[c("Mine 2.5x faster. Increase ore mining amount by")," ",se(we.amount.value),c(" ore per operation")]))},visibility:()=>M(a.gte(we.amount.value,1)||a.div(s.value,d.value).plus(n.value).gte(10)),style:{width:"200px"}})),be=Se(()=>({resource:F(l),cost(){return a.pow(1.15,a.times(this.amount.value,10)).times(10)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:N(()=>i(D,null,[c("Automatically smelts")," ",se(a.times(be.amount.value,10)),c(" ore per second")]))},visibility:()=>M(a.gte(be.amount.value,1)||a.gte(we.amount.value,4)||a.gte(s.value,50)),style:{width:"200px"}})),Qe=Ae(!0),Ue=Se(()=>({resource:O.coal,cost(){return a.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:N(()=>i(D,null,[c("Gain "),se(a.times(ut.value,100)),c("% more metal per ore")]))},visibility:()=>M(a.gte(Ue.amount.value,1)||L.bought.value),style:{width:"200px"}})),ut=f(()=>a.times(Ue.amount.value,.25));Te.on("update",pe=>{U.value=a.times(pe,_.value).plus(U.value);const dt=U.value.trunc();U.value=U.value.minus(dt),o.value=a.add(o.value,a.times(dt,W.value)),Qe.value&&S(a.min(v.value,a.times(m.value,pe)),h.value)});const[Re,Ut]=tl(()=>[{title:"Auto Smelt Speed",modifier:p,base:0,unit:"/s",visible(){return a.gt(be.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:w,base:1,visible(){return a.gt(h.value,1)}},{title:"Metal per Ore",modifier:u,base:.1},{title:"Ore per Mining Operation",modifier:x,base:1},{title:"Mining Speed",modifier:E,base:.1,unit:"/s"}]),ne=Q(!1),oe=N(()=>i(ht,{modelValue:ne.value,"onUpdate:modelValue":pe=>ne.value=pe},{header:()=>i("h2",null,[e,c(" Modifiers")]),body:Re})),{total:Ze,trackerDisplay:je}=ll({resource:l,goal:25e3,name:e,day:Ya,color:t,modal:{show:ne,display:oe}});return{name:e,day:Ya,color:t,ore:o,bestOre:s,oreProgress:U,metal:l,bestMetal:n,totalMetal:Ze,simplePickaxe:De,doublePickaxe:Pe,crucible:Me,coalDrill:Fe,industrialFurnace:L,efficientDrill:Ce,oreDrill:we,industrialCrucible:be,autoSmeltEnabled:Qe,hotterForge:Ue,generalTabCollapsed:Ut,minWidth:700,display:N(()=>i(D,null,[Z(je),i(ce,null,null),i(kt,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:N(()=>i(D,null,[Qe.value&&a.gte(be.amount.value,1)?`+${pn([[m.value,"smelting speed"],[Ne.value,"ore gain"],[a.div(O.computedCoalGain.value,A),"coal gain"]],"/s",a.mul(d.value,h.value))}`:void 0]))},null),i(ce,null,null),Z(y),a.gte(be.amount.value,1)?i("div",{style:{width:"150px"}},[i(Jt,{title:"Auto Smelt",modelValue:Qe.value,"onUpdate:modelValue":pe=>Qe.value=pe},null)]):void 0,i(ce,null,null),i(kt,{resource:o,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:N(()=>i(D,null,[mn(Oe.value)]))},null),i(ce,null,null),i("div",null,[c("Currently mining "),de(W.value),c(" ore every")," ",de(a.recip(_.value)),c(" seconds")]),Z(me),i(ce,null,null),ye(De,Pe,Me,Fe,L,Ce),ye(we,be,Ue)]))}}),pr="cloth",Xa=8,mt=xt(pr,function(){const e="Cloth",t="white",l=tt(0,"cloth"),n=tt(0,"wool"),o=tt(10,"sheep"),s=Ae(0),u=Yt(()=>({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:()=>a.div(s.value,Re.value)})),d=Mt(()=>({display:{title:"Breed sheep",description:N(()=>i(D,null,[c("Breed "),se(a.floor(Ue.value)),c(" sheep"),i("br",null,null),Z(u)]))},style:{minHeight:"80px"},can
margin: 10px 0;"/>${ee}`:U,l.value=!0},onOpenLayer(){if(me.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(z.tabs.includes(x!=null?x:"trees")){const q=z.tabs.lastIndexOf(x!=null?x:"trees");z.tabs.splice(q,1)}else z.tabs.push(x!=null?x:"trees"),j.minimized.value=!0;else z.tabs.splice(1,1/0,x!=null?x:"trees")},onUnlockLayer(){x&&(E.value=!0,setTimeout(()=>{var q,Ne;n.value=-1,o.value=r((Ne=(q=wt[x!=null?x:"trees"])==null?void 0:q.name)!=null?Ne:""),s.value=U,z.devSpeed=null,l.value=!0},1e3))}}}}})}const d=[u(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Pn,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:Un,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:Fn,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:Rn,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:Tn,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:On,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:Qn,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
${U}
${_}`)}}return m[E]}jt(l,E=>{E&&Object.keys(m).forEach(_=>delete m[_])});const h=f(()=>Ye.saves.reduce((E,_)=>(E[_]=w(_),E),{}));function A(E){let _;switch(z.id===E?_=Cn(z[Je]):_=JSON.stringify(h.value[E]),Ie.exportEncoding){default:console.warn(`Unknown save encoding: ${Ie.exportEncoding}. Defaulting to lz`);case"lz":_=rl.compressToUTF16(_);break;case"base64":_=btoa(unescape(encodeURIComponent(_)));break;case"plain":break}const U=document.createElement("textarea");U.value=_,document.body.appendChild(U),U.select(),U.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(U)}function v(E){z.id===E&&Gt();const _={...h.value[E],id:zl()};Gt(_),Ye.saves.push(_.id)}function y(E){Ye.saves=Ye.saves.filter(_=>_!==E),localStorage.removeItem(E),m[E]=void 0}function S(E){h.value[z.id].time=z.time,Gt(),m[z.id]=void 0,bl(h.value[E]),m[E]=void 0}function x(E){if(u.value=E,wl(()=>{u.value=null}),E[0]!=="{")if(E[0]==="e")E=decodeURIComponent(escape(atob(E)));else if(E[0]==="\u1BE1")E=rl.decompressFromUTF16(E);else{console.warn("Unable to determine preset encoding",E);return}const _=JSON.parse(E);_.id=zl(),Gt(_),Ye.saves.push(_.id),S(_.id)}function W(E,_){const U=h.value[E];U&&(U.name=_,z.id===E?(z.name=_,Gt()):(Gt(U),m[E]=void 0))}return(E,_)=>(C(),ae(ht,{modelValue:l.value,"onUpdate:modelValue":_[4]||(_[4]=U=>l.value=U),ref_key:"modal",ref:n},{header:X(()=>[qu]),body:X(({shown:U})=>[U?(C(),ae(r(uo),{key:0,list:r(Ye).saves,handle:".handle",itemKey:ee=>ee},{item:X(({element:ee})=>[i(Vu,{save:r(h)[ee],onOpen:me=>S(ee),onExport:me=>A(ee),onEditName:me=>W(ee,me),onDuplicate:me=>v(ee),onDelete:me=>y(ee)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):T("",!0)]),footer:X(()=>[g("div",Hu,[i(jn,{modelValue:s.value,"onUpdate:modelValue":_[0]||(_[0]=U=>s.value=U),title:"Import Save",placeholder:"Paste your save here!",class:lt({importingFailed:o.value})},null,8,["modelValue","class"]),g("div",Lu,[ju,g("div",Wu,[g("button",{class:"button",onClick:_[1]||(_[1]=U=>S(r(Bl)().id))},"New Game"),Object.keys(r(p)).length>0?(C(),ae(Pa,{key:0,options:r(p),modelValue:u.value,"onUpdate:modelValue":_[2]||(_[2]=U=>x(U)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):T("",!0)])]),g("div",Ku,[zu,g("button",{class:"button modal-default-button",onClick:_[3]||(_[3]=U=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Wn=Be(Ju,[["__scopeId","data-v-3b9991aa"]]);const Pt=e=>(Zt("data-v-8495e562"),e=e(),el(),e),Yu=["src","alt"],Xu={key:1,class:"title"},Zu=Pt(()=>g("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),ed={class:"discord"},td={class:"discord-links"},ld={key:0},ad=["href"],nd=Pt(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),od=Pt(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),id={href:"https://forums.moddingtree.com/",target:"_blank"},sd=Pt(()=>g("span",{class:"material-icons"},"forum",-1)),rd=Pt(()=>g("span",{class:"material-icons"},"info",-1)),ud=Pt(()=>g("span",{class:"material-icons"},"library_books",-1)),dd=Pt(()=>g("span",{class:"material-icons"},"settings",-1)),cd=Pt(()=>g("span",{class:"material-icons"},"library_books",-1)),pd=Pt(()=>g("span",{class:"material-icons"},"settings",-1)),md=Pt(()=>g("span",{class:"material-icons"},"info",-1)),gd={href:"https://forums.moddingtree.com/",target:"_blank"},fd=Pt(()=>g("span",{class:"material-icons"},"forum",-1)),vd={class:"discord"},hd={class:"discord-links"},yd={key:0},bd=["href"],wd=Pt(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Ad=Pt(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Cd=ue({__name:"Nav",setup(e){const t=Q(null),l=Q(null),n=Q(null),o=Q(null),{useHeader:s,banner:u,title:d,discordName:p,discordLink:m,versionNumber:w}=Ie;function h(){window.open(m,"mywindow")}return(A,v)=>(C(),I(D,null,[r(s)?(C(),I("div",Al({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 Ei();const{globalBus:e}=await Yl(()=>Promise.resolve().then(function(){return ui}),void 0),{startGameLoop:t}=await Yl(()=>import("./gameLoop.f07ccbd2.js"),["assets/gameLoop.f07ccbd2.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=oo(nc);e.emit("setupVue",l),l.mount("#app"),wl(()=>{const n=on(),{updateServiceWorker:o}=ic({onNeedRefresh(){n.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){o()}})},onOfflineReady(){n.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{a as D,Yl as _,et as a,Ie as b,yr as c,Te as g,Ia as l,z as p,Ye as s};