From cfa2be9bfa8038fe2cb1c92800cb121ace106efd Mon Sep 17 00:00:00 2001 From: ducdat0507 <62660527+ducdat0507@users.noreply.github.com> Date: Tue, 6 Dec 2022 16:42:13 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20thepaper?= =?UTF-8?q?pilot/Advent-Incremental@7856d6f5e8945cad0ec074de03d01bb92ff926?= =?UTF-8?q?09=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...gameLoop.dea3629b.js => gameLoop.ca13fa80.js} | 2 +- assets/index.191323f0.css | 1 - assets/index.9a9641f6.js | 16 ++++++++++++++++ assets/index.d72582b0.css | 1 + assets/index.e52f0501.js | 16 ---------------- index.html | 4 ++-- sw.js | 2 +- 7 files changed, 21 insertions(+), 21 deletions(-) rename assets/{gameLoop.dea3629b.js => gameLoop.ca13fa80.js} (88%) delete mode 100644 assets/index.191323f0.css create mode 100644 assets/index.9a9641f6.js create mode 100644 assets/index.d72582b0.css delete mode 100644 assets/index.e52f0501.js diff --git a/assets/gameLoop.dea3629b.js b/assets/gameLoop.ca13fa80.js similarity index 88% rename from assets/gameLoop.dea3629b.js rename to assets/gameLoop.ca13fa80.js index 473363e..1f2f099 100644 --- a/assets/gameLoop.dea3629b.js +++ b/assets/gameLoop.ca13fa80.js @@ -1 +1 @@ -import{_ as d,s as p,p as e,a as f,D as o,b as m,g as u}from"./index.e52f0501.js";import"./vue.92681fcb.js";import{b1 as T}from"./@vue.4ce677c2.js";/* empty css */import"./nanoevents.1080beb7.js";import"./lz-string.731cedc5.js";import"./is-plain-object.906d88e8.js";import"./vue-next-select.a2bfab1d.js";import"./vue-toastification.6f567382.js";import"./vuedraggable.7949458c.js";import"./sortablejs.29100d8a.js";import"./vue-textarea-autosize.35804eaf.js";import"./workbox-window.8d14e8b7.js";let n=null,l=null;function a(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const r=i;if(f.lastTenTicks.push(r),f.lastTenTicks.length>10&&(f.lastTenTicks=f.lastTenTicks.slice(1)),!((l==null?void 0:l.value)&&!e.keepGoing)&&!f.hasNaN&&(i=Math.max(i,0),e.devSpeed!==0)){if(e.offlineTime!=null){if(o.gt(e.offlineTime,m.offlineLimit*3600)&&(e.offlineTime=m.offlineLimit*3600),o.gt(e.offlineTime,0)&&e.devSpeed!==0){const s=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-s,i+=s}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||o.lt(e.offlineTime,0))&&(e.offlineTime=null)}i=Math.min(i,m.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),!o.eq(i,0)&&(e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308),u.emit("update",i,r),p.unthrottled?(requestAnimationFrame(a),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(a,50)))}}async function w(){l=(await d(()=>import("./index.e52f0501.js").then(function(t){return t.c}),["assets/index.e52f0501.js","assets/index.191323f0.css","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"])).hasWon,T(l,t=>{t&&u.emit("gameWon")}),p.unthrottled?requestAnimationFrame(a):n=setInterval(a,50)}export{w as startGameLoop}; +import{_ as d,s as p,p as e,a as f,D as o,b as m,g as u}from"./index.9a9641f6.js";import"./vue.92681fcb.js";import{b1 as T}from"./@vue.4ce677c2.js";/* empty css */import"./nanoevents.1080beb7.js";import"./lz-string.731cedc5.js";import"./is-plain-object.906d88e8.js";import"./vue-next-select.a2bfab1d.js";import"./vue-toastification.6f567382.js";import"./vuedraggable.7949458c.js";import"./sortablejs.29100d8a.js";import"./vue-textarea-autosize.35804eaf.js";import"./workbox-window.8d14e8b7.js";let n=null,l=null;function a(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const r=i;if(f.lastTenTicks.push(r),f.lastTenTicks.length>10&&(f.lastTenTicks=f.lastTenTicks.slice(1)),!((l==null?void 0:l.value)&&!e.keepGoing)&&!f.hasNaN&&(i=Math.max(i,0),e.devSpeed!==0)){if(e.offlineTime!=null){if(o.gt(e.offlineTime,m.offlineLimit*3600)&&(e.offlineTime=m.offlineLimit*3600),o.gt(e.offlineTime,0)&&e.devSpeed!==0){const s=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-s,i+=s}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||o.lt(e.offlineTime,0))&&(e.offlineTime=null)}i=Math.min(i,m.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),!o.eq(i,0)&&(e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308),u.emit("update",i,r),p.unthrottled?(requestAnimationFrame(a),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(a,50)))}}async function w(){l=(await d(()=>import("./index.9a9641f6.js").then(function(t){return t.c}),["assets/index.9a9641f6.js","assets/index.d72582b0.css","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"])).hasWon,T(l,t=>{t&&u.emit("gameWon")}),p.unthrottled?requestAnimationFrame(a):n=setInterval(a,50)}export{w as startGameLoop}; diff --git a/assets/index.191323f0.css b/assets/index.191323f0.css deleted file mode 100644 index a5d3987..0000000 --- a/assets/index.191323f0.css +++ /dev/null @@ -1 +0,0 @@ -.table{display:flex;flex-flow:column wrap;justify-content:center;align-items:center;max-width:100%;margin:0 auto}.table+.table{margin-top:10px}.row{display:flex;flex-flow:row wrap;justify-content:center;align-items:stretch;max-width:100%;margin:0 10px}.row>:not(.feature){margin:0;display:flex}.col{display:flex;flex-flow:column wrap;justify-content:center;align-items:center;height:100%;margin:10px 0}.row.mergeAdjacent>.feature:not(.dontMerge),.row.mergeAdjacent>.tooltip-container>.feature:not(.dontMerge){margin-left:0;margin-right:0;border-radius:0}.row.mergeAdjacent>.feature:not(.dontMerge):first-child,.row.mergeAdjacent>.tooltip-container:first-child>.feature:not(.dontMerge){border-radius:var(--border-radius) 0 0 var(--border-radius)}.row.mergeAdjacent>.feature:not(.dontMerge):last-child,.row.mergeAdjacent>.tooltip-container:last-child>.feature:not(.dontMerge){border-radius:0 var(--border-radius) var(--border-radius) 0}.row.mergeAdjacent>.feature:not(.dontMerge):first-child:last-child,.row.mergeAdjacent>.tooltip-container:first-child:last-child>.feature:not(.dontMerge){border-radius:var(--border-radius)}.col.mergeAdjacent .feature:not(.dontMerge){margin-top:0;margin-bottom:0;border-radius:0}.col.mergeAdjacent .feature:not(.dontMerge):first-child{border-radius:var(--border-radius) var(--border-radius) 0 0}.col.mergeAdjacent .feature:not(.dontMerge):last-child{border-radius:0 0 var(--border-radius) var(--border-radius)}.col.mergeAdjacent .feature:not(.dontMerge):first-child:last-child{border-radius:var(--border-radius)}.resize-listener[data-v-2b1dc1bc]{position:absolute;top:0px;left:0;right:-4px;bottom:5px;z-index:-10;pointer-events:none}.modal-mask{position:fixed;z-index:9998;top:0;left:0;bottom:0;right:0;background-color:#00000080;transition:opacity .3s ease}.modal-wrapper{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.modal-container{width:640px;max-width:95vw;max-height:95vh;background-color:var(--background);padding:20px;border-radius:5px;transition:all .3s ease;text-align:left;border:var(--modal-border);box-sizing:border-box;display:flex;flex-direction:column}.modal-header{width:100%}.modal-body{margin:20px 0;width:100%;overflow-y:auto;overflow-x:hidden}.modal-footer{width:100%}.modal-default-footer{display:flex}.modal-default-flex-grow{flex-grow:1}.modal-enter-from,.modal-leave-active{opacity:0}.modal-enter-from .modal-container,.modal-leave-active .modal-container{-webkit-transform:scale(1.1);transform:scale(1.1)}.advent{width:80%;max-width:700px;background:url(./adventCalendarGameJamCalandar.0fdeb6b8.png);background-size:contain;display:flex;flex-direction:column;padding-top:28%;padding-left:10%;padding-right:10%;background-repeat:no-repeat;aspect-ratio:3151 / 4190}.advent>.table{width:100%}.advent>.table>.row{width:100%;margin:0 0 -5%;justify-content:space-around}.notif[data-v-66323fd4]{position:absolute;top:0;left:5px;z-index:10;pointer-events:none;user-select:none;color:var(--accent3);font-size:x-large;animation:1s linear infinite bounce-66323fd4;border-radius:var(--border-radius);background:var(--locked)}@keyframes bounce-66323fd4{0%{animation-timing-function:cubic-bezier(.1361,.2514,.2175,.8786);transform:translate(0) scaleY(1)}37%{animation-timing-function:cubic-bezier(.7674,.1844,.8382,.7157);transform:translateY(-20px) scaleY(1)}72%{animation-timing-function:cubic-bezier(.1118,.2149,.2172,.941);transform:translate(0) scaleY(1)}87%{animation-timing-function:cubic-bezier(.7494,.2259,.8209,.6963);transform:translateY(10px) scaleY(.602)}to{transform:translate(0) scaleY(1)}}.day[data-v-1a86f696]{flex:13% 0 0;position:relative;display:flex;background-color:var(--raised-background);aspect-ratio:1;margin:5%}.door-enter-from[data-v-1a86f696]:before,.door-enter-from[data-v-1a86f696]:after,.door-leave-to[data-v-1a86f696]:before,.door-leave-to[data-v-1a86f696]:after{transform:perspective(150px) rotateY(0)!important}.door-enter-from .date[data-v-1a86f696],.door-leave-to .date[data-v-1a86f696]{transform:translate(-50%,-50%) perspective(150px) rotateY(0)!important}.door-enter-active[data-v-1a86f696]:before,.door-enter-active[data-v-1a86f696]:after,.door-leave-active[data-v-1a86f696]:before,.door-leave-active[data-v-1a86f696]:after{z-index:2}.door-enter-active .date[data-v-1a86f696],.door-leave-active .date[data-v-1a86f696]{z-index:3}.day.opened .doors[data-v-1a86f696]:before,.day.opened .doors[data-v-1a86f696]:after,.day.opened .doors .date[data-v-1a86f696]{transition:1s}.day.opened .doors[data-v-1a86f696]:before{transform-origin:left;transform:perspective(150px) rotateY(-135deg)}.day.opened .doors[data-v-1a86f696]:after{transform-origin:right;transform:perspective(150px) rotateY(135deg)}.day.opened .doors .date[data-v-1a86f696]:first-child{transform-origin:left;transform:translate(-50%,-50%) perspective(150px) rotateY(-135deg);clip-path:polygon(0 0,50% 0,50% 100%,0 100%)}.day.opened .doors .date[data-v-1a86f696]:last-child{transform-origin:right;transform:translate(-50%,-50%) perspective(150px) rotateY(135deg);clip-path:polygon(100% 0,50% 0,50% 100%,100% 100%)}.doors[data-v-1a86f696]{position:absolute;width:100%;height:100%;top:0;left:0}.day.opened .doors[data-v-1a86f696]{cursor:pointer}.doors[data-v-1a86f696]:before,.doors[data-v-1a86f696]:after{content:"";position:absolute;background-color:var(--locked);width:50%;height:100%;pointer-events:none}.doors[data-v-1a86f696]:before{top:0;left:0}.doors[data-v-1a86f696]:after{top:0;right:0}.date[data-v-1a86f696]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:2;font-size:large;pointer-events:none;user-select:none;backface-visibility:hidden;width:100%}.icon[data-v-1a86f696]{pointer-events:none;background-size:contain;width:100%;height:100%}.lore[data-v-1a86f696]{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;border-radius:50%;cursor:pointer;background-color:var(--highlighted);user-select:none}.lore[data-v-1a86f696]:hover{box-shadow:0 0 10px var(--points)}.lock[data-v-1a86f696]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);opacity:.2;font-size:400%}.collapsible-container[data-v-a72c16aa]{width:calc(100% - 10px)}.collapsible-toggle[data-v-a72c16aa]{max-width:unset;width:calc(100% + 0px);margin:0 0 0 -5px;background:var(--raised-background);padding:var(--feature-margin);color:var(--foreground);cursor:pointer;transition-duration:0s}.collapsible-toggle[data-v-a72c16aa]:last-child{margin-left:unset}[data-v-a72c16aa] .collapsible-toggle+.table{max-width:unset;width:calc(100% + 10px);margin-left:-5px}[data-v-a72c16aa] .col{margin-top:0;margin-bottom:0;width:100%}.mergeAdjacent .collapsible-toggle[data-v-a72c16aa]{border:0;border-top-left-radius:0!important;border-top-right-radius:0!important}[data-v-a72c16aa] .mergeAdjacent .feature:not(.dontMerge):first-child{border-top-left-radius:0!important;border-top-right-radius:0!important}.mark[data-v-2207999f]{position:absolute;left:-25px;top:-10px;width:30px;height:30px;z-index:1;pointer-events:none;margin-left:.9em;margin-right:.9em;margin-bottom:1.2em;border-right:.3em solid transparent;border-bottom:.7em solid transparent;border-left:.3em solid transparent;font-size:10px}.star[data-v-2207999f]{left:-10px;width:0;height:0;margin-left:.9em;margin-right:.9em;margin-bottom:1.2em;border-right:.3em solid transparent;border-bottom:.7em solid #ffcc00;border-left:.3em solid transparent;font-size:10px;pointer-events:none}.star[data-v-2207999f]:before,.star[data-v-2207999f]:after{content:"";width:0;height:0;position:absolute;top:.6em;left:-1em;border-right:1em solid transparent;border-bottom:.7em solid #ffcc00;border-left:1em solid transparent;transform:rotate(-35deg)}.star[data-v-2207999f]:after{transform:rotate(35deg)}.node[data-v-a48cb382]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.bar[data-v-02d0d7b2]{position:relative;display:table}.overlayTextContainer[data-v-02d0d7b2]{position:absolute;border-radius:10px;vertical-align:middle;display:flex;justify-content:center;z-index:3}.overlayText[data-v-02d0d7b2]{z-index:6}.border[data-v-02d0d7b2]{border:2px solid;border-radius:10px;border-color:var(--foreground);overflow:hidden;mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC);margin:0}.fill[data-v-02d0d7b2]{position:absolute;background-color:var(--foreground);overflow:hidden;margin-left:-.5px;transition-duration:.2s;z-index:2}.feature:not(li),.feature:not(li) button{position:relative;padding:5px;border-radius:var(--border-radius);border:2px solid rgba(0,0,0,.125);margin:var(--feature-margin);box-sizing:border-box;color:var(--feature-foreground);z-index:0;transition:all .5s,z-index 0s .5s}.can,.can button{background-color:var(--layer-color);cursor:pointer}.can:hover,.can:hover button{transform:scale(1.15);box-shadow:0 0 20px var(--points);z-index:1;transition:all .5s,z-index 0s}.locked,.locked button{background-color:var(--locked);cursor:not-allowed}.bought,.bought button{background-color:var(--bought);cursor:default}.clickable[data-v-8cedd7da]{min-height:120px;width:120px;font-size:10px}.clickable.small[data-v-8cedd7da]{min-height:unset}.clickable>*[data-v-8cedd7da]{pointer-events:none}.resize-listener[data-v-063f6d6b]{position:absolute;top:0px;left:0;right:-4px;bottom:5px;z-index:-10;pointer-events:none}svg[data-v-063f6d6b]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:-10;pointer-events:none}.left-side-nodes[data-v-39ca96d0]{position:absolute;left:15px;top:65px}.side-nodes[data-v-39ca96d0]{position:absolute;right:15px;top:65px}.left-side-nodes[data-v-39ca96d0] .treeNode,.side-nodes[data-v-39ca96d0] .treeNode{margin:20px auto}.small[data-v-39ca96d0] .treeNode{height:60px;width:60px}.small[data-v-39ca96d0] .treeNode>*:first-child{font-size:30px}.treeNode[data-v-1c0c107d]{height:100px;width:100px;border-radius:50%;padding:0;margin:0 10px}.treeNode>*[data-v-1c0c107d]:first-child{width:100%;height:100%;border:2px solid rgba(0,0,0,.125);border-radius:inherit;font-size:40px;color:#00000080;text-shadow:2px 2px 4px rgba(0,0,0,.25);box-shadow:-4px -4px 4px #00000040 inset,0 0 20px var(--background);text-transform:capitalize;display:flex}.treeNode>*:first-child>*[data-v-1c0c107d]{pointer-events:none}.modifier-toggle{padding-right:10px;transform:translateY(-1px);display:inline-block}.modifier-toggle.collapsed{transform:translate(-5px,-5px) rotate(-90deg)}.sticky[data-v-cccac690]{position:sticky;background:var(--background);width:calc(100% - 2px);z-index:3}.main-display-container{vertical-align:middle;margin-bottom:20px;display:flex;transition-duration:0s}.upgrade[data-v-7f411ac8]{min-height:120px;width:120px;font-size:10px}.upgrade>*[data-v-7f411ac8]{pointer-events:none}.modifier-container{display:flex}.modifier-container:nth-child(2n){background:var(--raised-background)}.modifier-amount{flex-basis:100px;flex-shrink:0}.modifier-description{flex-grow:1}.field{display:flex;position:relative;min-height:2em;margin:10px 0;user-select:none;justify-content:space-between;align-items:center}.field>*{margin:0}.field[data-v-33d57459]{cursor:pointer;pointer-events:all}input[data-v-33d57459]{appearance:none;pointer-events:none}span[data-v-33d57459]{width:100%;position:relative}input+span[data-v-33d57459]:before{content:"";float:right;margin:5px 0 5px 10px;border-radius:7px;width:36px;height:14px;background-color:var(--outline);opacity:.38;vertical-align:top;transition:background-color .2s,opacity .2s;border:solid 1px var(--feature-foreground)}input+span[data-v-33d57459]:after{content:"";position:absolute;top:2px;right:16px;border-radius:50%;width:20px;height:20px;background-color:var(--locked);box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f;transition:background-color .2s,transform .2s;border:solid 1px var(--feature-foreground)}input:checked+span[data-v-33d57459]:before{background-color:var(--link);opacity:.6}input:checked+span[data-v-33d57459]:after{background-color:var(--link);transform:translate(16px)}input:active+span[data-v-33d57459]:before{background-color:var(--link);opacity:.6}input:checked:active+span[data-v-33d57459]:before{background-color:var(--outline);opacity:.38}input:disabled+span[data-v-33d57459]{color:#000;opacity:.38;cursor:default}input:disabled+span[data-v-33d57459]:before{background-color:var(--outline);opacity:.38}input:checked:disabled+span[data-v-33d57459]:before{background-color:var(--link);opacity:.6}.vue-select{width:50%;border-radius:var(--border-radius)}.field-buttons .vue-select{width:unset}.vue-select,.vue-dropdown{border-color:var(--outline)}.vue-dropdown{background:var(--raised-background)}.vue-dropdown-item{color:var(--foreground)}.vue-dropdown-item,.vue-dropdown-item *{transition-duration:0s}.vue-dropdown-item.highlighted{background-color:var(--highlighted)}.vue-dropdown-item.selected,.vue-dropdown-item.highlighted.selected{background-color:var(--bought)}.vue-input input::placeholder{color:var(--link)}.milestone[data-v-f4e8794e]{width:calc(100% - 10px);min-width:120px;padding-left:5px;padding-right:5px;background-color:var(--locked);border-width:4px;border-radius:5px;color:#00000080}.milestone.done[data-v-f4e8794e]{background-color:var(--bought);cursor:default}.milestone[data-v-f4e8794e] .equal-spaced{display:flex;justify-content:center}.milestone[data-v-f4e8794e] .equal-spaced>*{margin:auto}.scene[data-v-36663c1c]{width:600px;height:300px;position:relative}.scene[data-v-36663c1c]:after{content:"";position:absolute;width:100%;height:20%;border-radius:50% 50% 0 0/100% 100% 0 0;bottom:0;background:white}.scene-item[data-v-36663c1c]{width:80px;height:80px;position:absolute;z-index:1}.scene-bubble[data-v-36663c1c]{position:absolute;background:white;height:60px;padding:5px;border-radius:10px}.scene-bubble[data-v-36663c1c]:after{content:"";position:absolute;width:0;height:0;top:100%;left:20px;border-left:10px solid transparent;border-right:10px solid transparent;border-top:15px solid white}.scene-bubble .scene-item[data-v-36663c1c]{height:60px;width:60px;position:static}.layer-container[data-v-0158bec3]{min-width:100%;min-height:100%;margin:0;flex-grow:1;display:flex;isolation:isolate}.layer-tab[data-v-0158bec3]:not(.minimized){padding-top:20px;padding-bottom:20px;min-height:100%;flex-grow:1;text-align:center;position:relative}.inner-tab>.layer-container>.layer-tab[data-v-0158bec3]:not(.minimized){padding-top:50px}.layer-tab.minimized[data-v-0158bec3]{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;padding:55px 0 0;margin:0;cursor:pointer;font-size:40px;color:var(--foreground);border:none;background-color:transparent}.layer-tab.minimized div[data-v-0158bec3]{margin:0;writing-mode:vertical-rl;padding-left:10px;width:50px}.inner-tab>.layer-container>.layer-tab[data-v-0158bec3]:not(.minimized){margin:-50px -10px;padding:50px 10px}.modal-body .layer-tab[data-v-0158bec3]{padding-bottom:0}.modal-body .layer-tab[data-v-0158bec3]:not(.hasSubtabs){padding-top:0}.minimize[data-v-0158bec3]{position:sticky;top:6px;right:9px;z-index:7;line-height:30px;border:none;background:var(--background);box-shadow:var(--background) 0 2px 3px 5px;border-radius:50%;color:var(--foreground);font-size:40px;cursor:pointer;margin-top:-44px;margin-right:-30px}.minimized+.minimize[data-v-0158bec3]{transform:rotate(-90deg);top:10px;right:18px;pointer-events:none}.goBack[data-v-0158bec3]{position:sticky;top:10px;left:10px;line-height:30px;margin-top:-50px;margin-left:-35px;border:none;background:var(--background);box-shadow:var(--background) 0 2px 3px 5px;border-radius:50%;color:var(--foreground);font-size:30px;cursor:pointer;z-index:7}.goBack[data-v-0158bec3]:hover{transform:scale(1.1);text-shadow:0 0 7px var(--foreground)}details[data-v-4b4bda40]{margin:10px 0;padding-left:18px}summary[data-v-4b4bda40]{cursor:pointer;margin-bottom:10px;margin-left:-18px}ul[data-v-4b4bda40]{margin:var(--feature-margin) 0;background:var(--raised-background);border:2px solid rgba(0,0,0,.125);padding:5px 5px 5px 15px;list-style:inside}li[data-v-4b4bda40]{margin:8px 0}li[data-v-4b4bda40]:before{padding:2px 8px;margin-right:8px;border-radius:var(--border-radius)}.feature[data-v-4b4bda40]:before{content:"Feature";background:var(--accent1)}.fix[data-v-4b4bda40]:before{content:"Fix";background:var(--accent2)}.balancing[data-v-4b4bda40]:before{content:"Balancing";background:var(--accent3)}.breaking[data-v-4b4bda40]:before{content:"Breaking";background:var(--danger)}.tooltip-container[data-v-6102fa3a]{position:relative;--xoffset: 0px;--yoffset: 0px;text-shadow:none!important}.tooltip[data-v-6102fa3a],.tooltip[data-v-6102fa3a]:after{pointer-events:none;position:absolute}.tooltip[data-v-6102fa3a]{text-align:center;width:150px;font-size:14px;line-height:1.2;bottom:calc(100% + var(--yoffset));left:calc(50% + var(--xoffset));margin-bottom:5px;transform:translate(-50%);padding:7px;border-radius:3px;background-color:var(--tooltip-background);color:var(--points);z-index:100!important;word-break:break-word}.tooltip[data-v-6102fa3a] hr{margin:var(--feature-margin) 0}.shown[data-v-6102fa3a]{z-index:10}.fade-enter-from[data-v-6102fa3a],.fade-leave-to[data-v-6102fa3a]{opacity:0}.tooltip[data-v-6102fa3a]:after{content:" ";position:absolute;top:100%;bottom:100%;left:calc(50% - var(--xoffset));width:0;margin-left:-5px;border-width:5px;border-style:solid;border-color:var(--tooltip-background) transparent transparent transparent}.tooltip.left[data-v-6102fa3a],.side-nodes .tooltip[data-v-6102fa3a]:not(.right):not(.bottom):not(.top){bottom:calc(50% + var(--yoffset));left:unset;right:calc(100% + var(--xoffset));margin-bottom:unset;margin-right:5px;transform:translateY(50%)}.tooltip.left[data-v-6102fa3a]:after,.side-nodes .tooltip[data-v-6102fa3a]:not(.right):not(.bottom):not(.top):after{top:calc(50% + var(--yoffset));bottom:unset;left:100%;right:100%;margin-left:unset;margin-top:-5px;border-color:transparent transparent transparent var(--tooltip-background)}.tooltip.right[data-v-6102fa3a]{bottom:calc(50% + var(--yoffset));left:calc(100% + var(--xoffset));margin-bottom:unset;margin-left:5px;transform:translateY(50%)}.tooltip.right[data-v-6102fa3a]:after{top:calc(50% + var(--yoffset));left:0;right:100%;margin-left:-10px;margin-top:-5px;border-color:transparent var(--tooltip-background) transparent transparent}.tooltip.bottom[data-v-6102fa3a]{top:calc(100% + var(--yoffset));bottom:unset;left:calc(50% + var(--xoffset));margin-bottom:unset;margin-top:5px;transform:translate(-50%)}.tooltip.bottom[data-v-6102fa3a]:after{top:0;margin-top:-10px;border-color:transparent transparent var(--tooltip-background) transparent}.pinned[data-v-6102fa3a]{position:absolute;right:-5px;top:-5px;transform:rotate(45deg)}.info-modal-header{display:flex;margin:-20px -20px 0;background:var(--raised-background);align-items:center}.info-modal-header *{margin:0}.info-modal-logo{height:4em;width:4em}.info-modal-title{display:flex;flex-direction:column;padding:10px 0;margin-left:10px}.info-modal-discord-link{display:flex;align-items:center}.info-modal-discord{margin:0 4px 0 0}.header[data-v-a03c577c]{margin-bottom:-10px}*[data-v-a03c577c] .tooltip-container{display:inline;margin-left:5px}form[data-v-67b44a54]{margin:0;width:100%}.field>*[data-v-67b44a54]{margin:0}input[data-v-67b44a54]{width:50%;outline:none;border:solid 1px var(--outline);background-color:unset;border-radius:var(--border-radius)}.fullWidth[data-v-67b44a54]{width:100%}.container[data-v-2f8ef34c]{display:flex;align-items:center;background:var(--raised-background);box-shadow:var(--raised-background) 0 2px 3px 5px}.container.confirming button[data-v-2f8ef34c]{font-size:1em}.container>*[data-v-2f8ef34c]{margin:0 4px}.danger,.button.danger{position:relative;border:solid 2px var(--danger);border-right-width:16px}.danger:after{position:absolute;content:"!";color:#fff;right:-13px}.feedback[data-v-01a1b95c]{position:relative}.feedback[data-v-01a1b95c]:after{position:absolute;left:calc(100% + 5px);top:50%;transform:translateY(-50%);content:"\2714";opacity:0;pointer-events:none;box-shadow:inset 0 0 0 35px #6f94b600;text-shadow:none}.feedback.left[data-v-01a1b95c]:after{left:unset;right:calc(100% + 5px)}.feedback.activated[data-v-01a1b95c]:after{animation:feedback-01a1b95c .5s ease-out forwards}@keyframes feedback-01a1b95c{0%{opacity:1;transform:scale3d(.4,.4,1),translateY(-50%)}80%{opacity:.1}to{opacity:0;transform:scale3d(1.2,1.2,1),translateY(-50%)}}.save[data-v-5285ac49]{position:relative;border:solid 4px var(--outline);padding:4px;background:var(--raised-background);margin:var(--feature-margin);display:flex;align-items:center;min-height:30px}.save.active[data-v-5285ac49]{border-color:var(--bought)}.open[data-v-5285ac49]{display:inline;margin:0;padding-left:0}.handle[data-v-5285ac49]{flex-grow:0;margin-right:8px;margin-left:0;cursor:pointer}.details[data-v-5285ac49]{margin:0 80px 0 0;flex-grow:1}.error[data-v-5285ac49]{font-size:.8em;color:var(--danger)}.save-version[data-v-5285ac49]{margin-left:4px;font-size:.7em;opacity:.7}.actions[data-v-5285ac49]{position:absolute;top:0;bottom:0;right:4px;display:flex;padding:4px;z-index:1}.editname[data-v-5285ac49]{margin:0}.save button{transition-duration:0s}.save .actions button{display:flex;font-size:1.2em}.save .actions button .material-icons{font-size:unset}.save .button.danger{display:flex;align-items:center;padding:4px}.save .field,.field form[data-v-3b9991aa],.field .field-title[data-v-3b9991aa],.field .field-buttons[data-v-3b9991aa]{margin:0}.field-buttons[data-v-3b9991aa]{display:flex}.field-buttons .field[data-v-3b9991aa]{margin:0 0 0 8px}.modal-footer[data-v-3b9991aa]{margin-top:-20px}.footer[data-v-3b9991aa]{display:flex;margin-top:20px}.importingFailed input{color:red}.field-buttons .v-select{width:220px}.presets .vue-select[aria-expanded=true] vue-dropdown{visibility:hidden}.nav[data-v-4a3f8425]{background-color:var(--raised-background);display:flex;left:0;right:0;top:0;height:46px;width:100%;border-bottom:4px solid var(--outline)}.nav>*[data-v-4a3f8425]{height:46px;width:46px;display:flex;cursor:pointer;flex-shrink:0}.nav>.banner[data-v-4a3f8425]{height:100%;width:unset}.overlay-nav[data-v-4a3f8425]{position:fixed;top:10px;left:10px;display:flex;flex-direction:column;z-index:2}.overlay-nav>*[data-v-4a3f8425]{height:50px;width:50px;display:flex;cursor:pointer;margin:0;align-items:center;justify-content:center}.title[data-v-4a3f8425]{font-size:36px;text-align:left;margin-left:12px;cursor:unset}.nav>.title[data-v-4a3f8425]{width:unset;flex-shrink:1;overflow:hidden;white-space:nowrap}.nav .saves[data-v-4a3f8425],.nav .info[data-v-4a3f8425]{display:flex}.tooltip-container[data-v-4a3f8425]{width:100%;height:100%;display:flex}.overlay-nav .discord[data-v-4a3f8425]{position:relative}.discord img[data-v-4a3f8425]{width:100%;height:100%}.discord-links[data-v-4a3f8425]{position:fixed;top:45px;padding:20px;right:-280px;width:200px;transition:right .25s ease;background:var(--raised-background);z-index:10}.overlay-nav .discord-links[data-v-4a3f8425]{position:absolute;left:-280px;right:unset;transition:left .25s ease}.overlay-nav .discord:hover .discord-links[data-v-4a3f8425]{left:-10px}.discord-links li[data-v-4a3f8425]{margin-bottom:4px}.discord-links li[data-v-4a3f8425]:first-child{font-size:1.2em}*:not(.overlay-nav) .discord:hover .discord-links[data-v-4a3f8425]{right:0}.material-icons[data-v-4a3f8425]{font-size:36px}.material-icons[data-v-4a3f8425]:hover{text-shadow:5px 0 10px var(--link),-3px 0 12px var(--foreground)}.nav .version-container[data-v-4a3f8425]{display:flex;height:25px;margin-bottom:0;margin-left:10px}.overlay-nav .version-container[data-v-4a3f8425]{width:unset;height:25px}.version[data-v-4a3f8425]{color:var(--points)}.version:hover span[data-v-4a3f8425]{text-shadow:5px 0 10px var(--points),-3px 0 12px var(--points)}.nav>div>a[data-v-4a3f8425],.overlay-nav>div>a[data-v-4a3f8425]{color:var(--foreground);text-shadow:none}.tabs-container[data-v-248e2ebb]{width:100vw;flex-grow:1;overflow-x:auto;overflow-y:hidden;display:flex}.tabs-container[data-v-248e2ebb]:not(.useHeader){width:calc(100vw - 50px);margin-left:50px}.tab[data-v-248e2ebb]{position:relative;height:100%;flex-grow:1;transition-duration:0s;overflow-y:auto;overflow-x:hidden}.inner-tab[data-v-248e2ebb]{padding:50px 10px;min-height:calc(100% - 100px);display:flex;flex-direction:column;margin:0;flex-grow:1}.tab+.tab>.inner-tab[data-v-248e2ebb]{border-left:solid 4px var(--outline)}.tab hr{height:4px;border:none;background:var(--outline);margin:var(--feature-margin) 0}.tab .modal-body hr{margin:7px 0}.game-over-modal-header[data-v-4a50ce42]{display:flex;margin:-20px -20px 0;background:var(--raised-background);align-items:center}.game-over-modal-header *[data-v-4a50ce42]{margin:0}.game-over-modal-logo[data-v-4a50ce42]{height:4em;width:4em}.game-over-modal-title[data-v-4a50ce42]{display:flex;flex-direction:column;padding:10px 0;margin-left:10px}.game-over-footer[data-v-4a50ce42]{display:flex;justify-content:flex-end}.game-over-footer button[data-v-4a50ce42]{margin:0 10px}.game-over-modal-discord-link[data-v-4a50ce42]{display:flex;align-items:center}.game-over-modal-discord[data-v-4a50ce42]{margin:0 4px 0 0}.nan-modal-header[data-v-3de07c06]{padding:10px 0;margin-left:10px}.nan-footer[data-v-3de07c06]{display:flex;justify-content:flex-end}.nan-footer button[data-v-3de07c06]{margin:0 10px}.nan-modal-discord-link[data-v-3de07c06]{display:flex;align-items:center}.nan-modal-discord[data-v-3de07c06]{margin:0 4px 0 0}.tpsDisplay[data-v-46a3ed5b]{position:absolute;left:10px;bottom:10px;z-index:100}.low[data-v-46a3ed5b]{color:var(--danger)}.fade-leave-to[data-v-46a3ed5b]{opacity:0}:root{color-scheme:dark}*{transition-duration:.5s;font-family:Roboto Mono,monospace;font-weight:700;margin:auto;text-size-adjust:none}*:focus{outline:none}body{overflow:hidden;transition:none;text-align:center}html,body,#app{min-height:100%;height:100%}h1,h2,h3,b,input{display:inline}button{color:#000}a,.button,.link{display:block;color:var(--link);background:none;border:none;cursor:pointer;text-decoration:none}a:hover,.button:hover,.link:hover{text-shadow:5px 0 10px var(--link),-3px 0 12px var(--link)}.button:disabled{opacity:.5;cursor:not-allowed}.button:disabled:hover{text-shadow:none}ul{list-style-type:none}.Vue-Toastification__toast{margin:unset}.app[data-v-7c41425b]{background-color:var(--background);color:var(--foreground);display:flex;flex-flow:column;min-height:100%;height:100%}#modal-root[data-v-7c41425b]{position:absolute;min-height:100%;height:100%} diff --git a/assets/index.9a9641f6.js b/assets/index.9a9641f6.js new file mode 100644 index 0000000..4d2f8ee --- /dev/null +++ b/assets/index.9a9641f6.js @@ -0,0 +1,16 @@ +/* empty css */import"./vue.92681fcb.js";import{Z as N,l as _e,aa as L,t as O,ay as Nn,ar as Qt,aE as y,a0 as M,aK as pt,a1 as f,O as F,aG as gn,A as $e,_ as G,a8 as u,b6 as q,b8 as Sn,bs as ps,C as r,aq as zt,bu as an,bb as Mn,T as oi,a7 as h,u as An,j as ri,bv as ts,q as cn,b1 as gt,G as we,aC as hs,w as it,b2 as Ze,ao as ui,I as Ae,J as W,$ as B,aH as wt,aF as kt,z as ut,aN as ve,al as bn,aL as Ft,H as ci,aJ as gs,bn as di,br as mi,be as fi}from"./@vue.4ce677c2.js";import{c as vs}from"./nanoevents.1080beb7.js";import{L as Et}from"./lz-string.731cedc5.js";import{i as pi}from"./is-plain-object.906d88e8.js";import{Y as hi}from"./vue-next-select.a2bfab1d.js";import{s as gi,u as ys}from"./vue-toastification.6f567382.js";import{D as vi}from"./vuedraggable.7949458c.js";import{p as yi}from"./vue-textarea-autosize.35804eaf.js";import{v as bi,n as _i}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const wi=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerpolicy&&(l.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?l.credentials="include":i.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}};wi();const ki="modulepreload",ns={},Ci="./",_n=function(t,n){return!n||n.length===0?t():Promise.all(n.map(s=>{if(s=`${Ci}${s}`,s in ns)return;ns[s]=!0;const i=s.endsWith(".css"),l=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${l}`))return;const o=document.createElement("link");if(o.rel=i?"stylesheet":ki,i||(o.as="script",o.crossOrigin=""),o.href=s,document.head.appendChild(o),i)return new Promise((c,m)=>{o.addEventListener("load",c),o.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t())},Ni="./projInfo-schema.json",Si="Advent Incremental",Mi="An incremental game you play a day at a time, leading up to Christmas!",Ai="advent-incremental",Ii="thepaperpilot and friends",Ei="",Bi="",Pi="0.3",xi="Initial Commit",Fi=!0,Ti=!1,Ri=2,$i=!0,Di=null,Oi="",Ui=["main"],qi=3600,Vi=0,Li=!0,Gi="base64";var ne={$schema:Ni,title:Si,description:Mi,id:Ai,author:Ii,discordName:Ei,discordLink:Bi,versionNumber:Pi,versionTitle:xi,allowGoBack:Fi,defaultShowSmall:Ti,defaultDecimalsShown:Ri,useHeader:$i,banner:Di,logo:Oi,initialTabs:Ui,maxTickLength:qi,offlineLimit:Vi,enablePausing:Li,exportEncoding:Gi};const Rn=17,Hi=9e15,Qi=Math.log10(9e15),zi=1/9e15,ji=308,Ki=-324,ss=5,Wi=function(){const e=[];for(let n=Ki+1;n<=ji;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),Vt=[2,Math.E,3,4,5,6,7,8,9,10],Ji=[[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.1670905356972596,1.3632807444991446,1.5979222279405536,1.8842640123816674,2.2416069644878687,2.69893426559423,3.3012632110403577,4.121250340630164,5.281493033448316,7],[1,1.1736630594087796,1.379783782386201,1.6292821855668218,1.9378971836180754,2.3289975651071977,2.8384347394720835,3.5232708454565906,4.478242031114584,5.868592169644505,8],[1,1.1793017514670474,1.394054150657457,1.65664127441059,1.985170999970283,2.4069682290577457,2.9647310119960752,3.7278665320924946,4.814462547283592,6.436522247411611,9],[1,1.18422737399915,1.4066113788546144,1.680911177655277,2.027492094355525,2.4775152854601967,3.080455730250329,3.918234505962507,5.1332705696484595,6.9878696918072905,10]],Xi=[[-1,-.9194161097107025,-.8335625019330468,-.7425599821143978,-.6466611521029437,-.5462617907227869,-.4419033816638769,-.3342645487554494,-.224140440909962,-.11241087890006762,0],[-1,-.90603157029014,-.80786507256596,-.7064666939634,-.60294836853664,-.49849837513117,-.39430303318768,-.29147201034755,-.19097820800866,-.09361896280296,0],[-1,-.9021579584316141,-.8005762598234203,-.6964780623319391,-.5911906810998454,-.486050182576545,-.3823089430815083,-.28106046722897615,-.1831906535795894,-.08935809204418144,0],[-1,-.8917227442365535,-.781258746326964,-.6705130326902455,-.5612813129406509,-.4551067709033134,-.35319256652135966,-.2563741554088552,-.1651412821106526,-.0796919581982668,0],[-1,-.8843387974366064,-.7678744063886243,-.6529563724510552,-.5415870994657841,-.4352842206588936,-.33504449124791424,-.24138853420685147,-.15445285440944467,-.07409659641336663,0],[-1,-.8786709358426346,-.7577735191184886,-.6399546189952064,-.527284921869926,-.4211627631006314,-.3223479611761232,-.23107655627789858,-.1472057700818259,-.07035171210706326,0],[-1,-.8740862815291583,-.7497032990976209,-.6297119746181752,-.5161838335958787,-.41036238255751956,-.31277212146489963,-.2233976621705518,-.1418697367979619,-.06762117662323441,0],[-1,-.8702632331800649,-.7430366914122081,-.6213373075161548,-.5072025698095242,-.40171437727184167,-.30517930701410456,-.21736343968190863,-.137710238299109,-.06550774483471955,0],[-1,-.8670016295947213,-.7373984232432306,-.6143173985094293,-.49973884395492807,-.394584953527678,-.2989649949848695,-.21245647317021688,-.13434688362382652,-.0638072667348083,0],[-1,-.8641642839543857,-.732534623168535,-.6083127477059322,-.4934049257184696,-.3885773075899922,-.29376029055315767,-.2083678561173622,-.13155653399373268,-.062401588652553186,0]],p=function(t){return a.fromValue_noAlloc(t)},V=function(e,t,n){return a.fromComponents(e,t,n)},K=function(t,n,s){return a.fromComponents_noNormalize(t,n,s)},It=function(t,n){const s=n+1,i=Math.ceil(Math.log10(Math.abs(t))),l=Math.round(t*Math.pow(10,s-i))*Math.pow(10,i-s);return parseFloat(l.toFixed(Math.max(s-i,0)))},$n=function(e){return Math.sign(e)*Math.log10(Math.abs(e))},Yi=function(e){if(!isFinite(e))return e;if(e<-50)return e===Math.trunc(e)?Number.NEGATIVE_INFINITY:0;let t=1;for(;e<10;)t=t*e,++e;e-=1;let n=.9189385332046727;n=n+(e+.5)*Math.log(e),n=n-e;const s=e*e;let i=e;return n=n+1/(12*i),i=i*s,n=n+1/(360*i),i=i*s,n=n+1/(1260*i),i=i*s,n=n+1/(1680*i),i=i*s,n=n+1/(1188*i),i=i*s,n=n+691/(360360*i),i=i*s,n=n+7/(1092*i),i=i*s,n=n+3617/(122400*i),Math.exp(n)/t},bs=.5671432904097838,is=function(e,t=1e-10){let n,s;if(!Number.isFinite(e)||e===0)return e;if(e===1)return bs;e<10?n=0:n=Math.log(e)-Math.log(Math.log(e));for(let i=0;i<100;++i){if(s=(e*Math.exp(-n)+n*n)/(n+1),Math.abs(s-n).5?1:-1;if(Math.random()*20<1)return K(t,0,1);const n=Math.floor(Math.random()*(e+1));let s=n===0?Math.random()*616-308:Math.random()*16;Math.random()>.9&&(s=Math.trunc(s));let i=Math.pow(10,s);return Math.random()>.9&&(i=Math.trunc(i)),V(t,n,i)}static affordGeometricSeries_core(e,t,n,s){const i=t.mul(n.pow(s));return k.floor(e.div(i).mul(n.sub(1)).add(1).log10().div(n.log10()))}static sumGeometricSeries_core(e,t,n,s){return t.mul(n.pow(s)).mul(k.sub(1,n.pow(e))).div(k.sub(1,n))}static affordArithmeticSeries_core(e,t,n,s){const l=t.add(s.mul(n)).sub(n.div(2)),o=l.pow(2);return l.neg().add(o.add(n.mul(e).mul(2)).sqrt()).div(n).floor()}static sumArithmeticSeries_core(e,t,n,s){const i=t.add(s.mul(n));return e.div(2).mul(i.mul(2).plus(e.sub(1).mul(n)))}static efficiencyOfPurchase_core(e,t,n){return e.div(t).add(e.div(n))}normalize(){if(this.sign===0||this.mag===0&&this.layer===0)return this.sign=0,this.mag=0,this.layer=0,this;if(this.layer===0&&this.mag<0&&(this.mag=-this.mag,this.sign=-this.sign),this.layer===0&&this.mag=Hi)return this.layer+=1,this.mag=t*Math.log10(e),this;for(;e0;)this.layer-=1,this.layer===0?this.mag=Math.pow(10,this.mag):(this.mag=t*Math.pow(10,e),e=Math.abs(this.mag),t=Math.sign(this.mag));return this.layer===0&&(this.mag<0?(this.mag=-this.mag,this.sign=-this.sign):this.mag===0&&(this.sign=0)),this}fromComponents(e,t,n){return this.sign=e,this.layer=t,this.mag=n,this.normalize(),this}fromComponents_noNormalize(e,t,n){return this.sign=e,this.layer=t,this.mag=n,this}fromMantissaExponent(e,t){return this.layer=1,this.sign=Math.sign(e),e=Math.abs(e),this.mag=t+Math.log10(e),this.normalize(),this}fromMantissaExponent_noNormalize(e,t){return this.fromMantissaExponent(e,t),this}fromDecimal(e){return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}fromNumber(e){return this.mag=Math.abs(e),this.sign=Math.sign(e),this.layer=0,this.normalize(),this}fromString(e){e=e.replace(",","");const t=e.split("^^^");if(t.length===2){const b=parseFloat(t[0]),g=parseFloat(t[1]),w=t[1].split(";");let S=1;if(w.length===2&&(S=parseFloat(w[1]),isFinite(S)||(S=1)),isFinite(b)&&isFinite(g)){const I=k.pentate(b,g,S);return this.sign=I.sign,this.layer=I.layer,this.mag=I.mag,this}}const n=e.split("^^");if(n.length===2){const b=parseFloat(n[0]),g=parseFloat(n[1]),w=n[1].split(";");let S=1;if(w.length===2&&(S=parseFloat(w[1]),isFinite(S)||(S=1)),isFinite(b)&&isFinite(g)){const I=k.tetrate(b,g,S);return this.sign=I.sign,this.layer=I.layer,this.mag=I.mag,this}}const s=e.split("^");if(s.length===2){const b=parseFloat(s[0]),g=parseFloat(s[1]);if(isFinite(b)&&isFinite(g)){const w=k.pow(b,g);return this.sign=w.sign,this.layer=w.layer,this.mag=w.mag,this}}e=e.trim().toLowerCase();let i,l,o=e.split("pt");if(o.length===2){i=10,l=parseFloat(o[0]),o[1]=o[1].replace("(",""),o[1]=o[1].replace(")","");let b=parseFloat(o[1]);if(isFinite(b)||(b=1),isFinite(i)&&isFinite(l)){const g=k.tetrate(i,l,b);return this.sign=g.sign,this.layer=g.layer,this.mag=g.mag,this}}if(o=e.split("p"),o.length===2){i=10,l=parseFloat(o[0]),o[1]=o[1].replace("(",""),o[1]=o[1].replace(")","");let b=parseFloat(o[1]);if(isFinite(b)||(b=1),isFinite(i)&&isFinite(l)){const g=k.tetrate(i,l,b);return this.sign=g.sign,this.layer=g.layer,this.mag=g.mag,this}}const c=e.split("e"),m=c.length-1;if(m===0){const b=parseFloat(e);if(isFinite(b))return this.fromNumber(b)}else if(m===1){const b=parseFloat(e);if(isFinite(b)&&b!==0)return this.fromNumber(b)}const d=e.split("e^");if(d.length===2){this.sign=1,d[0].charAt(0)=="-"&&(this.sign=-1);let b="";for(let g=0;g=43&&w<=57||w===101)b+=d[1].charAt(g);else return this.layer=parseFloat(b),this.mag=parseFloat(d[1].substr(g+1)),this.normalize(),this}}if(m<1)return this.sign=0,this.layer=0,this.mag=0,this;const v=parseFloat(c[0]);if(v===0)return this.sign=0,this.layer=0,this.mag=0,this;let _=parseFloat(c[c.length-1]);if(m>=2){const b=parseFloat(c[c.length-2]);isFinite(b)&&(_*=Math.sign(b),_+=$n(b))}if(!isFinite(v))this.sign=c[0]==="-"?-1:1,this.layer=m,this.mag=_;else if(m===1)this.sign=Math.sign(v),this.layer=1,this.mag=_+Math.log10(Math.abs(v));else if(this.sign=Math.sign(v),this.layer=m,m===2){const b=k.mul(V(1,2,_),p(v));return this.sign=b.sign,this.layer=b.layer,this.mag=b.mag,this}else this.mag=_;return this.normalize(),this}fromValue(e){return e instanceof k||e!=null&&typeof e=="object"&&"sign"in e&&"mag"in e&&"layer"in e?this.fromDecimal(e):typeof e=="number"?this.fromNumber(e):typeof e=="string"?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0,this)}toNumber(){return Number.isFinite(this.layer)?this.layer===0?this.sign*this.mag:this.layer===1?this.sign*Math.pow(10,this.mag):this.mag>0?this.sign>0?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0:Number.NaN}mantissaWithDecimalPlaces(e){return isNaN(this.m)?Number.NaN:this.m===0?0:It(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:this.mag===0?0:It(this.mag,e)}toString(){return isNaN(this.layer)||isNaN(this.sign)||isNaN(this.mag)?"NaN":this.mag===Number.POSITIVE_INFINITY||this.layer===Number.POSITIVE_INFINITY?this.sign===1?"Infinity":"-Infinity":this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toString():this.m+"e"+this.e:this.layer===1?this.m+"e"+this.e:this.layer<=ss?(this.sign===-1?"-":"")+"e".repeat(this.layer)+this.mag:(this.sign===-1?"-":"")+"(e^"+this.layer+")"+this.mag}toExponential(e){return this.layer===0?(this.sign*this.mag).toExponential(e):this.toStringWithDecimalPlaces(e)}toFixed(e){return this.layer===0?(this.sign*this.mag).toFixed(e):this.toStringWithDecimalPlaces(e)}toPrecision(e){return this.e<=-7?this.toExponential(e-1):e>this.e?this.toFixed(e-this.exponent-1):this.toExponential(e-1)}valueOf(){return this.toString()}toJSON(){return this.toString()}toStringWithDecimalPlaces(e){return this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toFixed(e):It(this.m,e)+"e"+It(this.e,e):this.layer===1?It(this.m,e)+"e"+It(this.e,e):this.layer<=ss?(this.sign===-1?"-":"")+"e".repeat(this.layer)+It(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+It(this.mag,e)}abs(){return K(this.sign===0?0:1,this.layer,this.mag)}neg(){return K(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?k.dZero:this.layer===0?V(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?k.dZero:this.layer===0?V(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?k.dZero:this.layer===0?V(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?k.dZero:this.layer===0?V(this.sign,0,Math.trunc(this.mag)):this}add(e){const t=p(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer)||this.sign===0)return t;if(t.sign===0)return this;if(this.sign===-t.sign&&this.layer===t.layer&&this.mag===t.mag)return K(0,0,0);let n,s;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(k.cmpabs(this,t)>0?(n=this,s=t):(n=t,s=this),n.layer===0&&s.layer===0)return p(n.sign*n.mag+s.sign*s.mag);const i=n.layer*Math.sign(n.mag),l=s.layer*Math.sign(s.mag);if(i-l>=2)return n;if(i===0&&l===-1){if(Math.abs(s.mag-Math.log10(n.mag))>Rn)return n;{const o=Math.pow(10,Math.log10(n.mag)-s.mag),c=s.sign+n.sign*o;return V(Math.sign(c),1,s.mag+Math.log10(Math.abs(c)))}}if(i===1&&l===0){if(Math.abs(n.mag-Math.log10(s.mag))>Rn)return n;{const o=Math.pow(10,n.mag-Math.log10(s.mag)),c=s.sign+n.sign*o;return V(Math.sign(c),1,Math.log10(s.mag)+Math.log10(Math.abs(c)))}}if(Math.abs(n.mag-s.mag)>Rn)return n;{const o=Math.pow(10,n.mag-s.mag),c=s.sign+n.sign*o;return V(Math.sign(c),1,s.mag+Math.log10(Math.abs(c)))}}plus(e){return this.add(e)}sub(e){return this.add(p(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const t=p(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer))return t;if(this.sign===0||t.sign===0)return K(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return K(this.sign*t.sign,0,1);let n,s;if(this.layer>t.layer||this.layer==t.layer&&Math.abs(this.mag)>Math.abs(t.mag)?(n=this,s=t):(n=t,s=this),n.layer===0&&s.layer===0)return p(n.sign*s.sign*n.mag*s.mag);if(n.layer>=3||n.layer-s.layer>=2)return V(n.sign*s.sign,n.layer,n.mag);if(n.layer===1&&s.layer===0)return V(n.sign*s.sign,1,n.mag+Math.log10(s.mag));if(n.layer===1&&s.layer===1)return V(n.sign*s.sign,1,n.mag+s.mag);if(n.layer===2&&s.layer===1){const i=V(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)).add(V(Math.sign(s.mag),s.layer-1,Math.abs(s.mag)));return V(n.sign*s.sign,i.layer+1,i.sign*i.mag)}if(n.layer===2&&s.layer===2){const i=V(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)).add(V(Math.sign(s.mag),s.layer-1,Math.abs(s.mag)));return V(n.sign*s.sign,i.layer+1,i.sign*i.mag)}throw Error("Bad arguments to mul: "+this+", "+e)}multiply(e){return this.mul(e)}times(e){return this.mul(e)}div(e){const t=p(e);return this.mul(t.recip())}divide(e){return this.div(e)}divideBy(e){return this.div(e)}dividedBy(e){return this.div(e)}recip(){return this.mag===0?k.dNaN:this.layer===0?V(this.sign,0,1/this.mag):V(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const t=p(e);return this.sign>t.sign?1:this.sign0?this.layer:-this.layer,s=t.mag>0?t.layer:-t.layer;return n>s?1:nt.mag?1:this.mag0?t:this}clamp(e,t){return this.max(e).min(t)}clampMin(e){return this.max(e)}clampMax(e){return this.min(e)}cmp_tolerance(e,t){const n=p(e);return this.eq_tolerance(n,t)?0:this.cmp(n)}compare_tolerance(e,t){return this.cmp_tolerance(e,t)}eq_tolerance(e,t){const n=p(e);if(t==null&&(t=1e-7),this.sign!==n.sign||Math.abs(this.layer-n.layer)>1)return!1;let s=this.mag,i=n.mag;return this.layer>n.layer&&(i=$n(i)),this.layer0?V(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):V(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?k.dNaN:this.layer>0?V(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):V(this.sign,0,Math.log10(this.mag))}log(e){return e=p(e),this.sign<=0||e.sign<=0||e.sign===1&&e.layer===0&&e.mag===1?k.dNaN:this.layer===0&&e.layer===0?V(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):k.div(this.log10(),e.log10())}log2(){return this.sign<=0?k.dNaN:this.layer===0?V(this.sign,0,Math.log2(this.mag)):this.layer===1?V(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?V(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):V(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?k.dNaN:this.layer===0?V(this.sign,0,Math.log(this.mag)):this.layer===1?V(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?V(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):V(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const t=p(e),n=this,s=t;if(n.sign===0)return s.eq(0)?K(1,0,1):n;if(n.sign===1&&n.layer===0&&n.mag===1)return n;if(s.sign===0)return K(1,0,1);if(s.sign===1&&s.layer===0&&s.mag===1)return n;const i=n.absLog10().mul(s).pow10();return this.sign===-1?Math.abs(s.toNumber()%2)%2===1?i.neg():Math.abs(s.toNumber()%2)%2===0?i:k.dNaN:i}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return k.dNaN;let e=this;if(e.layer===0){const t=Math.pow(10,e.sign*e.mag);if(Number.isFinite(t)&&Math.abs(t)>=.1)return V(1,0,t);if(e.sign===0)return k.dOne;e=K(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?V(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?V(-e.sign,e.layer+1,-e.mag):k.dOne}pow_base(e){return p(e).pow(this)}root(e){const t=p(e);return this.pow(t.recip())}factorial(){return this.mag<0?this.add(1).gamma():this.layer===0?this.add(1).gamma():this.layer===1?k.exp(k.mul(this,k.ln(this).sub(1))):k.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(K(1,0,24)))return p(Yi(this.sign*this.mag));const e=this.mag-1;let t=.9189385332046727;t=t+(e+.5)*Math.log(e),t=t-e;const n=e*e;let s=e,i=12*s,l=1/i,o=t+l;if(o===t||(t=o,s=s*n,i=360*s,l=1/i,o=t-l,o===t))return k.exp(t);t=o,s=s*n,i=1260*s;let c=1/i;return t=t+c,s=s*n,i=1680*s,c=1/i,t=t-c,k.exp(t)}else return this.layer===1?k.exp(k.mul(this,k.ln(this).sub(1))):k.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?k.dOne:this.layer===0&&this.mag<=709.7?p(Math.exp(this.sign*this.mag)):this.layer===0?V(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?V(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):V(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return p(Math.sqrt(this.sign*this.mag));if(this.layer===1)return V(1,2,Math.log10(this.mag)-.3010299956639812);{const e=k.div(K(this.sign,this.layer-1,this.mag),K(1,0,2));return e.layer+=1,e.normalize(),e}}cube(){return this.pow(3)}cbrt(){return this.pow(1/3)}tetrate(e=2,t=K(1,0,1)){if(e===1)return k.pow(this,t);if(e===0)return new k(t);if(this.eq(k.dOne))return k.dOne;if(this.eq(-1))return k.pow(this,t);if(e===Number.POSITIVE_INFINITY){const i=this.toNumber();if(i<=1.444667861009766&&i>=.06598803584531254){if(i>1.444667861009099)return new k(Math.E);const l=k.ln(this).neg();return l.lambertw().div(l)}else return i>1.444667861009766?new k(Number.POSITIVE_INFINITY):k.dNaN}if(this.eq(k.dZero)){let i=Math.abs((e+1)%2);return i>1&&(i=2-i),new k(i)}if(e<0)return k.iteratedlog(t,this,-e);t=p(t);const n=e;e=Math.trunc(e);const s=n-e;if(this.gt(k.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let i=0;i3)return K(t.sign,t.layer+(e-i-1),t.mag);if(i>1e4)return t}return t}iteratedexp(e=2,t=K(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return k.tetrate(e,-t,this);e=p(e);let n=p(this);const s=t;t=Math.trunc(t);const i=s-t;if(n.layer-e.layer>3){const l=Math.min(t,n.layer-e.layer-3);t-=l,n.layer-=l}for(let l=0;l1e4)return n}return i>0&&i<1&&(e.eq(10)?n=n.layeradd10(-i):n=n.layeradd(-i,e)),n}slog(e=10){if(e=p(e),e.lte(k.dZero)||e.eq(k.dOne))return k.dNaN;if(e.lt(k.dOne))return this.eq(k.dOne)?k.dZero:this.eq(k.dZero)?k.dNegOne:k.dNaN;if(this.mag<0||this.eq(k.dZero))return k.dNegOne;let t=0,n=p(this);if(n.layer-e.layer>3){const s=n.layer-e.layer-3;t+=s,n.layer-=s}for(let s=0;s<100;++s)if(n.lt(k.dZero))n=k.pow(e,n),t-=1;else{if(n.lte(k.dOne))return p(t+k.slog_critical(e.toNumber(),n.toNumber()));t+=1,n=k.log(n,e)}return p(t)}static slog_critical(e,t){return e>10?t-1:k.critical_section(e,t,Xi)}static tetrate_critical(e,t){return k.critical_section(e,t,Ji)}static critical_section(e,t,n){t*=10,t<0&&(t=0),t>10&&(t=10),e<2&&(e=2),e>10&&(e=10);let s=0,i=0;for(let c=0;ce){const m=(e-Vt[c])/(Vt[c+1]-Vt[c]);s=n[c][Math.floor(t)]*(1-m)+n[c+1][Math.floor(t)]*m,i=n[c][Math.ceil(t)]*(1-m)+n[c+1][Math.ceil(t)]*m;break}const l=t-Math.floor(t);return s*(1-l)+i*l}layeradd10(e){e=k.fromValue_noAlloc(e).toNumber();const t=p(this);if(e>=1){t.mag<0&&t.layer>0?(t.sign=0,t.mag=0,t.layer=0):t.sign===-1&&t.layer==0&&(t.sign=1,t.mag=-t.mag);const n=Math.trunc(e);e-=n,t.layer+=n}if(e<=-1){const n=Math.trunc(e);if(e-=n,t.layer+=n,t.layer<0)for(let s=0;s<100;++s){if(t.layer++,t.mag=Math.log10(t.mag),!isFinite(t.mag))return t.sign===0&&(t.sign=1),t.layer<0&&(t.layer=0),t.normalize();if(t.layer>=0)break}}for(;t.layer<0;)t.layer++,t.mag=Math.log10(t.mag);return t.sign===0&&(t.sign=1,t.mag===0&&t.layer>=1&&(t.layer-=1,t.mag=1)),t.normalize(),e!==0?t.layeradd(e,10):t}layeradd(e,t){const s=this.slog(t).toNumber()+e;return s>=0?k.tetrate(t,s):Number.isFinite(s)?s>=-1?k.log(k.tetrate(t,s+1),t):k.log(k.log(k.tetrate(t,s+2),t),t):k.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return p(is(this.toNumber()));if(this.layer===0)return p(is(this.sign*this.mag));if(this.layer===1)return as(this);if(this.layer===2)return as(this);if(this.layer>=3)return K(this.sign,this.layer-1,this.mag);throw"Unhandled behavior in lambertw()"}ssqrt(){if(this.sign==1&&this.layer>=3)return K(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=K(1,0,1)){t=p(t);const n=e;e=Math.trunc(e);const s=n-e;s!==0&&(t.eq(k.dOne)?(++e,t=new k(s)):this.eq(10)?t=t.layeradd10(s):t=t.layeradd(s,this));for(let i=0;i10)return t}return t}sin(){return this.mag<0?this:this.layer===0?p(Math.sin(this.sign*this.mag)):K(0,0,0)}cos(){return this.mag<0?k.dOne:this.layer===0?p(Math.cos(this.sign*this.mag)):K(0,0,0)}tan(){return this.mag<0?this:this.layer===0?p(Math.tan(this.sign*this.mag)):K(0,0,0)}asin(){return this.mag<0?this:this.layer===0?p(Math.asin(this.sign*this.mag)):K(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?p(Math.acos(this.toNumber())):this.layer===0?p(Math.acos(this.sign*this.mag)):K(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?p(Math.atan(this.sign*this.mag)):p(Math.atan(this.sign*(1/0)))}sinh(){return this.exp().sub(this.negate().exp()).div(2)}cosh(){return this.exp().add(this.negate().exp()).div(2)}tanh(){return this.sinh().div(this.cosh())}asinh(){return k.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return k.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?K(Number.NaN,Number.NaN,Number.NaN):k.ln(this.add(1).div(p(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(k.pow(10,e))}egg(){return this.add(9)}lessThanOrEqualTo(e){return this.cmp(e)<1}lessThan(e){return this.cmp(e)<0}greaterThanOrEqualTo(e){return this.cmp(e)>-1}greaterThan(e){return this.cmp(e)>0}};let a=k;a.dZero=K(0,0,0);a.dOne=K(1,0,1);a.dNegOne=K(-1,0,1);a.dTwo=K(1,0,2);a.dTen=K(1,0,10);a.dNaN=K(Number.NaN,Number.NaN,Number.NaN);a.dInf=K(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);a.dNegInf=K(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);a.dNumberMax=V(1,0,Number.MAX_VALUE);a.dNumberMin=V(1,0,Number.MIN_VALUE);const Zi=new a(1);function nn(e,t,n=!0){let s=a.log10(e).floor(),i=a.div(e,a.pow(10,s));i.toStringWithDecimalPlaces(t)==="10"&&(i=Zi,s=s.add(1));const l=s.gte(1e9)?et(s,Math.max(Math.max(t,3),ne.defaultDecimalsShown)):s.gte(1e4)?wn(s,0):s.toStringWithDecimalPlaces(0);return n?i.toStringWithDecimalPlaces(t)+"e"+l:"e"+l}function wn(e,t){if(e==null)return"NaN";if(e=new a(e),e.mag<.001)return 0 .toFixed(t);const s=e.toStringWithDecimalPlaces(t).split(".");return s[0]=s[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),s.length==1?s[0]:s[0]+"."+s[1]}function _s(e,t){return e==null?"NaN":(e=new a(e),e.mag<1e-4?0 .toFixed(t):(e.mag<.1&&t!==0&&(t=Math.max(Math.max(t,e.log10().negate().ceil().toNumber()),ne.defaultDecimalsShown)),e.toStringWithDecimalPlaces(t)))}const ea=new a("eeee1000"),ta=new a("e100000"),ls=new a("e1000"),ws=new a(1e9),na=new a(1e6),sa=new a(1e3),ia=new a(.98),aa=new a(.001),ks=new a(0);function et(e,t,n){if(t==null&&(t=ne.defaultDecimalsShown),n=n!=null?n:ne.defaultShowSmall,e=new a(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if(e.sign<0)return"-"+et(e.neg(),t);if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(ea)){const s=e.slog();return s.gte(na)?"F"+et(s.floor()):a.pow(10,s.sub(s.floor())).toStringWithDecimalPlaces(3)+"F"+wn(s.floor(),0)}else{if(e.gte(ta))return nn(e,0,!1);if(e.gte(ls))return nn(e,0);if(e.gte(ws))return nn(e,t);if(e.gte(sa))return wn(e,0);if(e.gte(aa)||!n)return _s(e,t);if(e.eq(ks))return 0 .toFixed(t)}return e=Cs(e),e.lt(ls)?nn(e,t).replace(/([^(?:e|F)]*)$/,"-$1"):et(e,t)+"\u207B\xB9"}function He(e){return e=new a(e),e.sign<0?"-"+He(e.neg()):e.gte(ws)||e.lte(ia)&&!e.eq(ks)?et(e):et(e,0)}function Un(e,t){return t==null&&(t=ne.defaultDecimalsShown),a.lt(e,0)?"-"+Un(a.neg(e),t):a.gt(e,2**51)?et(a.div(e,31536e3))+"y":(e=new a(e).toNumber(),e<60?et(e)+"s":e<3600?He(Math.floor(e/60))+"m "+et(e%60,t)+"s":e<86400?He(Math.floor(e/3600))+"h "+He(Math.floor(e/60)%60)+"m "+He(e%60)+"s":e<31536e3?He(Math.floor(e/84600)%365)+"d "+He(Math.floor(e/3600)%24)+"h "+He(Math.floor(e/60)%60)+"m":He(Math.floor(e/31536e3))+"y "+He(Math.floor(e/84600)%365)+"d "+He(Math.floor(e/3600)%24)+"h")}function la(e,t,n){e=new a(e);let s=e.toStringWithDecimalPlaces(t);return new a(s).gte(n)&&(s=a.sub(n,Math.pow(.1,t)).toStringWithDecimalPlaces(t)),s}function oa(e,t){return et(e,t,!0)}function Cs(e){let t=a.log10(e).ceil();const n=a.div(e,a.pow(10,t));return t=t.neg(),e=new a(10).pow(t).times(n),e}function ra(e,t){let n=e[0][0],s=e[0][1];for(let i=1;i(e.Up="Up",e.Down="Down",e.Left="Left",e.Right="Right",e.Default="Up",e))(ae||{});const ln=Symbol("DoNotCache");function T(e,t){const n=e[t];Dn(n)&&n.length===0&&!n[ln]?e[t]=N(n.bind(e)):Dn(n)&&(e[t]=n.bind(e),e[t][ln]=!0)}function Te(e){return Dn(e)&&!e[ln]&&(e=N(e)),e}const Rt=Symbol("Component"),$t=Symbol("GatherProps");let ga=0;function Yt(e="feature-"){return e+ga++}var Ie=(e=>(e[e.Visible=0]="Visible",e[e.Hidden=1]="Hidden",e[e.None=2]="None",e))(Ie||{});function R(e){return e[ln]=!0,e}function H(e,t=2){return e?0:t}function Re(e,t,n){e[t]===void 0&&n!=null&&(e[t]=n)}function Ms(e,...t){const n=[],s=i=>{Object.keys(i).forEach(l=>{const o=i[l];o&&typeof o=="object"&&(t.includes(o.type)?n.push(o):!(o instanceof a)&&!_e(o)&&s(o))})};return s(e),n}const Lt={variables:{"--foreground":"#dfdfdf","--background":"#0f0f0f","--feature-foreground":"#0f0f0f","--tooltip-background":"rgba(0, 0, 0, 0.75)","--raised-background":"#0f0f0f","--points":"#ffffff","--locked":"#bf8f8f","--highlighted":"#333","--bought":"#77bf5f","--danger":"rgb(220, 53, 69)","--link":"#02f2f2","--outline":"#dfdfdf","--accent1":"#627a82","--accent2":"#658262","--accent3":"#7c6282","--border-radius":"15px","--modal-border":"solid 2px var(--color)","--feature-margin":"0px"},floatingTabs:!0,mergeAdjacent:!0,showPin:!0};var qn=(e=>(e.Classic="classic",e.Paper="paper",e.Nordic="nordic",e.Aqua="aqua",e))(qn||{}),dn={classic:Lt,paper:{...Lt,variables:{...Lt.variables,"--background":"#2a323d","--feature-foreground":"#000","--raised-background":"#333c4a","--locked":"#3a3e45","--bought":"#5C8A58","--outline":"#333c4a","--border-radius":"4px","--modal-border":"","--feature-margin":"5px"},floatingTabs:!1},nordic:{...Lt,variables:{...Lt.variables,"--foreground":"#D8DEE9","--background":"#2E3440","--feature-foreground":"#000","--raised-background":"#3B4252","--points":"#E5E9F0","--locked":"#4c566a","--highlighted":"#434c5e","--bought":"#8FBCBB","--danger":"#D08770","--link":"#88C0D0","--outline":"#3B4252","--accent1":"#B48EAD","--accent2":"#A3BE8C","--accent3":"#EBCB8B","--border-radius":"4px","--modal-border":"solid 2px #3B4252","--feature-margin":"5px"},floatingTabs:!1},aqua:{...Lt,variables:{...Lt.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}};const ke=vs();document.fonts.onloadingdone=()=>ke.emit("fontsLoaded");var va=Object.freeze(Object.defineProperty({__proto__:null,globalBus:ke},Symbol.toStringTag,{value:"Module"}));var se=(e,t)=>{const n=e.__vccOpts||e;for(const[s,i]of t)n[s]=i;return n};const ya=L({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var v;const n=O({}),s=new ResizeObserver(c),i=O(null);Nn(()=>{const _=i.value;_!=null&&s.observe(_)});let l=!0,o=O((v=i.value)==null?void 0:v.getBoundingClientRect());function c(){l&&(l=!1,Qt(()=>{var _;o.value=(_=i.value)==null?void 0:_.getBoundingClientRect(),Object.values(n.value).filter(b=>b).forEach(b=>b.rect=b.element.getBoundingClientRect()),t("updateNodes",n.value),l=!0}))}ke.on("fontsLoaded",c);const m={attributes:!1,childList:!0,subtree:!1};gn(Vn,(_,b)=>{const g=new MutationObserver(()=>d(_));g.observe(b,m),n.value[_]={element:b,observer:g,rect:b.getBoundingClientRect()},c()}),gn(Ln,_=>{var b;(b=n.value[_])==null||b.observer.disconnect(),n.value[_]=void 0,c()}),gn(Gn,n),gn(Hn,o);function d(_){const b=n.value[_];b!=null&&(b.rect=b.element.getBoundingClientRect(),t("updateNodes",n.value))}return(_,b)=>(y(),M(F,null,[pt(_.$slots,"default",{},void 0,!0),f("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var As=se(ya,[["__scopeId","data-v-2b1dc1bc"]]);const ba=["onPointerdown"],_a={class:"modal-wrapper"},wa={class:"modal-container"},ka={class:"modal-header"},Ca=h(" default header "),Na={class:"modal-body"},Sa=h(" default body "),Ma={class:"modal-footer"},Aa=f("div",{class:"modal-default-flex-grow"},null,-1),ct=L({__name:"Modal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){const i=$e(e),l=N(()=>i.modelValue||c.value);function o(){n("update:modelValue",!1)}const c=O(!1),m=O(null),d=N(()=>{var v,_;return(_=(v=m.value)==null?void 0:v.nodes)!=null?_:null});return t({isOpen:l,nodes:d}),(v,_)=>(y(),G(oi,{to:"#modal-root"},[u(Mn,{name:"modal",onBeforeEnter:_[0]||(_[0]=b=>c.value=!0),onAfterLeave:_[1]||(_[1]=b=>c.value=!1)},{default:q(()=>[Sn(f("div",zt({class:"modal-mask",onPointerdown:an(o,["self"])},v.$attrs),[f("div",_a,[f("div",wa,[f("div",ka,[pt(v.$slots,"header",{shown:r(l)},()=>[Ca])]),f("div",Na,[u(As,{ref_key:"contextRef",ref:m},{default:q(()=>[pt(v.$slots,"body",{shown:r(l)},()=>[Sa])]),_:3},512)]),f("div",Ma,[pt(v.$slots,"footer",{shown:r(l)},()=>[f("div",{class:"modal-default-footer"},[Aa,f("button",{class:"button modal-default-button",onClick:o}," Close ")])])])])])],16,ba),[[ps,e.modelValue]])]),_:3})]))}}),Vn=Symbol("RegisterNode"),Ln=Symbol("UnregisterNode"),Gn=Symbol("Nodes"),Hn=Symbol("Bounds"),qe=An({});window.layers=qe;const Wt={},lt=[];function Dt(e,t){return je(()=>{const n={},s=n.emitter=vs();if(n.on=s.on.bind(s),n.emit=s.emit.bind(s),n.nodes=O({}),n.id=e,lt.push(e),Wt[e]=new Set,n.minimized=Be(!1),Object.assign(n,t.call(n)),lt[lt.length-1]==null||lt[lt.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen +Stack: ${lt} +Trying to pop ${n.id}`;return lt.pop(),T(n,"color"),T(n,"display"),T(n,"name"),Re(n,"name",n.id),T(n,"minWidth"),Re(n,"minWidth",600),T(n,"minimizable"),Re(n,"minimizable",!0),n})}function Is(e,t){if(console.info("Adding layer",e.id),qe[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,qe[e.id]);return}Re(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),qe[e.id]=e,ke.emit("addLayer",e,t.layers[e.id])}function Ia(e){return qe[e]}function Es(e){console.info("Removing layer",e.id),ke.emit("removeLayer",e),qe[e.id]=void 0}function Ea(e){Es(e),Is(e,U)}function Ba(e){const t=O(!1);return{openModal:()=>t.value=!0,modal:R(()=>u(ct,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>u("h2",null,[r(e.name)]),body:r(e.display)}))}}ke.on("update",function(t){Object.values(qe).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(qe).forEach(n=>{n==null||n.emit("update",t)}),Object.values(qe).forEach(n=>{n==null||n.emit("postUpdate",t)})});var Pa=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Vn,UnregisterNodeInjectionKey:Ln,NodesInjectionKey:Gn,BoundsInjectionKey:Hn,layers:qe,persistentRefs:Wt,addingLayers:lt,createLayer:Dt,addLayer:Is,getLayer:Ia,removeLayer:Es,reloadLayer:Ea,setupLayerModal:Ba},Symbol.toStringTag,{value:"Module"}));const Qn=Symbol("PersistentState"),xt=Symbol("DefaultValue"),kn=Symbol("StackTrace"),Bs=Symbol("Deleted"),on=Symbol("NonPersistent"),sn=Symbol("SaveDataPath");function xa(){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=_e(e)?e:O(e);t[Qn]=t,t[xt]=_e(e)?e.value:e,t[kn]=xa(),t[Bs]=!1;const n=N({get(){return t.value},set(s){t.value=s}});return n[xt]=t[xt],t[on]=n,t[sn]=void 0,lt.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,` +Created at: +`+t[kn]):Wt[lt[lt.length-1]].add(t),t}function Fa(e){return e&&typeof e=="object"&&Qn in e}function Z(e){return e[on]}ke.on("addLayer",(e,t)=>{const n=[],s=(i,l=[])=>{let o=!1;return Object.keys(i).forEach(c=>{let m=i[c];if(m&&typeof m=="object")if(de in m&&(m=m[de]),Fa(m)){if(o=!0,m[Bs]){console.warn("Deleted persistent ref present in returned object. Ignoring...",m,` +Created at: +`+m[kn]);return}Wt[e.id].delete(m);const d=[e.id,...l,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=l.reduce((b,g)=>(g in b||(b[g]={}),b[g]),t),_=v[c];v[c]=m[Qn],ri(v)?_!=null?v[c]=_:v[c]=m[xt]:_!=null?v[c].value=_:v[c].value=m[xt]}else!(m instanceof a)&&!_e(m)&&!n.includes(m)&&(typeof m.type=="symbol"&&n.push(m),s(m,[...l,c])&&(ts(m)&&!ts(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.",de in i?i[de]:i,c):o=!0))}),o};s(e[de]),Wt[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[kn])}),Wt[e.id].clear()});const de=Symbol("ProxyState"),Kt=Symbol("ProxyPath");function je(e,t={}){const n=t;let s=!1;function i(){return s||(Object.assign(n,e(n)),s=!0),n}return new Proxy(n,{get(l,o){if(o===de)return i();const c=i()[o];return c&&typeof c=="object"&&on in c?c[on]:c},set(l,o,c){return i()[o]=c,!0},has(l,o){return o===de?!0:Reflect.has(i(),o)},ownKeys(){return Reflect.ownKeys(i())},getOwnPropertyDescriptor(l,o){return s||(Object.assign(n,e(n)),s=!0),Object.getOwnPropertyDescriptor(l,o)}})}var he=window.state=An({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Ps=cn({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function xs(e){return JSON.stringify(e,(t,n)=>r(n))}const Fs={get(e,t){var s;if(t===de||t===Kt)return e[t];const n=e[de][t];if(t!=="value"&&(pi(n)||Array.isArray(n))){if(n!==((s=e[t])==null?void 0:s[de])){const i=[...e[Kt],t];e[t]=new Proxy({[de]:n,[Kt]:i},Fs)}return e[t]}return n},set(e,t,n,s){if(!he.hasNaN&&(typeof n=="number"&&isNaN(n)||n instanceof a&&(isNaN(n.sign)||isNaN(n.layer)||isNaN(n.mag)))){const i=e[de][t];if(!(typeof i=="number"&&isNaN(i)||i instanceof a&&(isNaN(i.sign)||isNaN(i.layer)||isNaN(i.mag))))throw Ps.autosave=!1,he.hasNaN=!0,he.NaNPath=[...e[Kt],t],he.NaNReceiver=s,console.error("Attempted to set NaN value",[...e[Kt],t],e[de]),"Attempted to set NaN value. See above for details"}return e[de][t]=n,!0},ownKeys(e){return Reflect.ownKeys(e[de])},has(e,t){return Reflect.has(e[de],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[de],t)}};var U=window.player=new Proxy({[de]:Ps,[Kt]:["player"]},Fs);function Ts(e={}){return Object.assign({id:`${ne.id}-0`,name:"Default Save",tabs:ne.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:ne.id,modVersion:ne.versionNumber,layers:{}},e)}function ot(e){const t=Et.compressToUTF16(xs(e!=null?e:U[de]));return localStorage.setItem((e!=null?e:U[de]).id,t),t}async function Ta(){$a();try{let e=localStorage.getItem(me.active);if(e==null){await Gt(Jt());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Et.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==ne.id){await Gt(Jt());return}t.id=me.active,await Gt(t)}catch(e){console.error(`Failed to load save. Falling back to new save. +`,e),await Gt(Jt())}}function Jt(){const e=yn(),t=Ts({id:e});return ot(t),me.saves.push(e),t}function yn(){let e,t=0;do e=`${ne.id}-${t++}`;while(localStorage.getItem(e));return e}async function Gt(e){console.info("Loading save",e);const{layers:t,removeLayer:n,addLayer:s}=await _n(()=>Promise.resolve().then(function(){return Pa}),void 0),{fixOldSave:i,getInitialLayers:l}=await _n(()=>Promise.resolve().then(function(){return uo}),void 0);for(const o in t){const c=t[o];c&&n(c)}l(e).forEach(o=>s(o,e)),e=Ts(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,ne.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==ne.versionNumber&&i(e.modVersion,e),Object.assign(U,e),me.active=U.id,ke.emit("onLoad")}setInterval(()=>{U.autosave&&ot()},1e3);window.onbeforeunload=()=>{U.autosave&&ot()};window.save=ot;const Ra=window.hardReset=async()=>{await Gt(Jt())},rn=cn({active:"",saves:[],showTPS:!0,theme:qn.Nordic,unthrottled:!1});gt(rn,e=>{const t=Et.compressToUTF16(JSON.stringify(e));localStorage.setItem(ne.id,t)},{deep:!0});var me=window.settings=rn;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:qn.Nordic};ke.emit("loadSettings",e),Object.assign(rn,e),Ra()};function $a(){try{let e=localStorage.getItem(ne.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Et.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(rn,t)}ke.emit("loadSettings",rn)}catch{}}const Rs=cn([]);function Da(e){Rs.push(e)}const $s=cn([]);function Oa(e){$s.push(e)}const Ua=cn([]),qa={class:"table"},Xt=L({__name:"Column",setup(e){const t=N(()=>dn[me.theme].mergeAdjacent);return(n,s)=>(y(),M("div",qa,[f("div",{class:we(["col",{mergeAdjacent:r(t)}])},[pt(n.$slots,"default")],2)]))}}),Va={class:"table"},Ds=L({__name:"Row",setup(e){const t=N(()=>dn[me.theme].mergeAdjacent);return(n,s)=>(y(),M("div",Va,[f("div",{class:we(["row",{mergeAdjacent:r(t)}])},[pt(n.$slots,"default")],2)]))}});function zn(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!ui(e)}function ee(e,t="span"){return typeof e=="function"?L({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}`),L({template:e})):L({render:()=>({})}):e}function ce(e){if(_t(e))return typeof e=="function"?e():ee(e);const t=e[Rt];return u(t,e[$t](),null)}function Ue(...e){let t;return u(Ds,null,zn(t=e.map(ce))?t:{default:()=>[t]})}function Os(...e){let t;return u(Xt,null,zn(t=e.map(ce))?t:{default:()=>[t]})}function rt(e){if(_t(e))return typeof e=="function"?e():typeof e=="string"?u(F,null,[e]):u(e,null,null);const t=e[Rt];return u(t,e[$t](),null)}function La(...e){let t;return u(Xt,null,zn(t=e.map(rt))?t:{default:()=>[t]})}function _t(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[ln]===!0}function Us(e,t,n){const s=O(null),i=O(void 0);function l(m){s.value||(s.value=setInterval(c,250)),i.value=m,n&&(n.value=!0)}function o(){s.value&&(clearInterval(s.value),s.value=null),n&&(n.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(i.value)}return hs(o),{start:l,stop:o,handleHolding:c}}function Ga(e,t){const n=N(()=>e.filter(s=>r(s.visibility)===Ie.Visible&&t(s)));return{firstFeature:N(()=>n.value[0]),collapsedContent:R(()=>Os(...n.value.slice(1))),hasCollapsedContent:N(()=>n.value.length>1)}}function Cn(e,t="div"){const n=it();return Ze(()=>{n.value=ee(Ee(e),t)}),n}function Tt(e,t="div"){const n=it(null);return Ze(()=>{const s=Ee(e);n.value=s==null?null:ee(s,t)}),n}function Ha(e){return N(()=>Ee(e))}function Ee(e){return r(r(e))}function $(...e){return e.includes(Object)||e.push(Object),e}const ge=L({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(y(),M("div",{style:Ae({width:e.width,height:e.height})},null,4))}});const Qa={},za={class:"notif"};function ja(e,t){return y(),M("div",za,"!")}var os=se(Qa,[["render",ja],["__scopeId","data-v-66323fd4"]]);const En=e=>(wt("data-v-d953df70"),e=e(),kt(),e),Ka={key:0,class:"day feature dontMerge opened"},Wa={class:"date"},Ja=h("Dec"),Xa=En(()=>f("br",null,null,-1)),Ya={class:"date"},Za=h("Dec"),el=En(()=>f("br",null,null,-1)),tl=En(()=>f("div",{class:"doors"},null,-1)),nl={class:"date"},sl=h("Dec"),il=En(()=>f("br",null,null,-1)),al={key:0,class:"material-icons lock"},ll={key:1,class:"timer"},ol=L({__name:"Day",props:{day:null,symbol:null,opened:null,recentlyUpdated:null,shouldNotify:null},emits:["openLore","openLayer","unlockLayer"],setup(e,{emit:t}){const n=e,s=N(()=>a.gte(Q.day.value,n.day)&&new Date().getMonth()===11&&new Date().getDate()>=n.day);function i(){s.value&&t("unlockLayer")}return(l,o)=>e.opened.value?(y(),M("div",Ka,[u(Mn,{appear:"",name:"door"},{default:q(()=>[f("div",{class:"doors",onClick:o[0]||(o[0]=c=>t("openLayer"))},[f("div",Wa,[Ja,Xa,h(W(e.day),1)]),f("div",Ya,[Za,el,h(W(e.day),1)])])]),_:1}),f("div",{class:"icon",style:Ae({backgroundImage:`url(${e.symbol})`})},null,4),f("div",{class:"lore",onClick:o[1]||(o[1]=c=>t("openLore"))},"?"),r(e.shouldNotify)?(y(),G(os,{key:0})):B("",!0)])):(y(),M("div",{key:1,class:we(["day feature dontMerge",{can:r(s),locked:!r(s),canOpen:r(s)}]),onClick:i},[tl,f("div",nl,[sl,il,h(W(e.day),1)]),r(s)?B("",!0):(y(),M("div",al,"lock")),r(Q).day.value===e.day&&!r(s)?(y(),M("div",ll,W(r(Un)(r(Q).timeUntilNewDay.value,0)),1)):B("",!0),r(s)?(y(),G(os,{key:2})):B("",!0)],2))}});var rl=se(ol,[["__scopeId","data-v-d953df70"]]);const ul=L({__name:"Collapsible",props:{collapsed:null,display:null,content:null},setup(e){const t=e,n=Cn(ut(t,"display")),s=Cn(ut(t,"content"));return(i,l)=>(y(),G(Xt,{class:"collapsible-container"},{default:q(()=>[f("button",{onClick:l[0]||(l[0]=o=>e.collapsed.value=!e.collapsed.value),class:"feature collapsible-toggle"},[(y(),G(ve(r(n))))]),e.collapsed.value?B("",!0):(y(),G(ve(r(s)),{key:0}))]),_:1}))}});var cl=se(ul,[["__scopeId","data-v-a72c16aa"]]);const dl={key:0},ml={key:0,class:"mark star"},fl=["src"],pl=L({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(y(),M("div",dl,[e.mark===!0?(y(),M("div",ml)):(y(),M("img",{key:1,class:"mark",src:e.mark},null,8,fl))])):B("",!0)}});var Bn=se(pl,[["__scopeId","data-v-2207999f"]]);const hl=L({__name:"Node",props:{id:null},setup(e){const n=$e(e),s=bn(Vn,()=>{}),i=bn(Ln,()=>{}),l=it(null),o=N(()=>l.value&&l.value.parentElement);return gt([o,n.id],([c,m],[d,v])=>{d&&i(r(v)),c&&s(m,c)}),hs(()=>i(r(n.id))),(c,m)=>(y(),M("div",{class:"node",ref_key:"node",ref:l},null,512))}});var mn=se(hl,[["__scopeId","data-v-a48cb382"]]);const gl=L({props:{progress:{type:$(String,Object,Number),required:!0},width:{type:$(Number),required:!0},height:{type:$(Number),required:!0},direction:{type:$(String),required:!0},display:$(Object,String,Function),visibility:{type:$(Number),required:!0},style:$(Object,String,Array),classes:$(Object),borderStyle:$(Object,String,Array),textStyle:$(Object,String,Array),baseStyle:$(Object,String,Array),fillStyle:$(Object,String,Array),mark:$(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Bn,Node:mn},setup(e){const{progress:t,width:n,height:s,direction:i,display:l}=$e(e),o=N(()=>{let d=t.value instanceof a?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(d,0),1))*100}),c=N(()=>{const d={width:Ee(n)+.5+"px",height:Ee(s)+.5+"px"};switch(r(i)){case ae.Up:d.clipPath=`inset(${o.value}% 0% 0% 0%)`,d.width=Ee(n)+1+"px";break;case ae.Down:d.clipPath=`inset(0% 0% ${o.value}% 0%)`,d.width=Ee(n)+1+"px";break;case ae.Right:d.clipPath=`inset(0% ${o.value}% 0% 0%)`;break;case ae.Left:d.clipPath=`inset(0% 0% 0% ${o.value} + '%)`;break;case ae.Default:d.clipPath="inset(0% 50% 0% 0%)";break}return d}),m=Tt(l);return{normalizedProgress:o,barStyle:c,component:m,unref:r,Visibility:Ie}}});function vl(e,t,n,s,i,l){var m,d,v,_,b,g,w;const o=Ft("MarkNode"),c=Ft("Node");return e.unref(e.visibility)!==e.Visibility.None?(y(),M("div",{key:0,style:Ae([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px",visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(m=e.unref(e.style))!=null?m:{}]),class:we({bar:!0,...e.unref(e.classes)})},[f("div",{class:"overlayTextContainer border",style:Ae([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(d=e.unref(e.borderStyle))!=null?d:{}])},[e.component?(y(),M("span",{key:0,class:"overlayText",style:Ae(e.unref(e.textStyle))},[(y(),G(ve(e.component)))],4)):B("",!0)],4),f("div",{class:"border",style:Ae([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(v=e.unref(e.style))!=null?v:{},(_=e.unref(e.baseStyle))!=null?_:{},(b=e.unref(e.borderStyle))!=null?b:{}])},[f("div",{class:"fill",style:Ae([e.barStyle,(g=e.unref(e.style))!=null?g:{},(w=e.unref(e.fillStyle))!=null?w:{}])},null,4)],4),u(o,{mark:e.unref(e.mark)},null,8,["mark"]),u(c,{id:e.id},null,8,["id"])],6)):B("",!0)}var yl=se(gl,[["render",vl],["__scopeId","data-v-02d0d7b2"]]);const bl=Symbol("Bar");function un(e){return je(()=>{const t=e();return t.id=Yt("bar-"),t.type=bl,t[Rt]=yl,T(t,"visibility"),Re(t,"visibility",Ie.Visible),T(t,"width"),T(t,"height"),T(t,"direction"),T(t,"style"),T(t,"classes"),T(t,"borderStyle"),T(t,"baseStyle"),T(t,"textStyle"),T(t,"fillStyle"),T(t,"progress"),T(t,"display"),T(t,"mark"),t[$t]=function(){const{progress:n,width:s,height:i,direction:l,display:o,visibility:c,style:m,classes:d,borderStyle:v,textStyle:_,baseStyle:b,fillStyle:g,mark:w,id:S}=this;return{progress:n,width:s,height:i,direction:l,display:o,visibility:c,style:r(m),classes:d,borderStyle:v,textStyle:_,baseStyle:b,fillStyle:g,mark:w,id:S}},t})}var _l=L({props:{display:{type:$(Object,String,Function),required:!0},visibility:{type:$(Number),required:!0},style:$(Object,String,Array),classes:$(Object),onClick:Function,onHold:Function,canClick:{type:$(Boolean),required:!0},small:Boolean,mark:$(Boolean,String),id:{type:String,required:!0},isHolding:Object},components:{Node:mn,MarkNode:Bn},setup(e){const{display:t,onClick:n,onHold:s}=$e(e),i=it("");Ze(()=>{const c=Ee(t);if(c==null){i.value="";return}if(_t(c)){i.value=ee(c);return}const m=ee(c.title||"","h3"),d=ee(c.description,"div");i.value=ee(R(()=>u("span",null,[c.title?u("div",null,[u(m,null,null)]):null,u(d,null,null)])))});const{start:l,stop:o}=Us(n,s,e.isHolding);return{start:l,stop:o,comp:i,Visibility:Ie,unref:r}}});function wl(e,t,n,s,i,l){var m;const o=Ft("MarkNode"),c=Ft("Node");return e.unref(e.visibility)!==e.Visibility.None?(y(),M("button",{key:0,style:Ae([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(m=e.unref(e.style))!=null?m:[]]),onClick:t[0]||(t[0]=(...d)=>e.onClick&&e.onClick(...d)),onMousedown:t[1]||(t[1]=(...d)=>e.start&&e.start(...d)),onMouseleave:t[2]||(t[2]=(...d)=>e.stop&&e.stop(...d)),onMouseup:t[3]||(t[3]=(...d)=>e.stop&&e.stop(...d)),onTouchstartPassive:t[4]||(t[4]=(...d)=>e.start&&e.start(...d)),onTouchendPassive:t[5]||(t[5]=(...d)=>e.stop&&e.stop(...d)),onTouchcancelPassive:t[6]||(t[6]=(...d)=>e.stop&&e.stop(...d)),class:we({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?(y(),G(ve(e.unref(e.comp)),{key:0})):B("",!0),u(o,{mark:e.unref(e.mark)},null,8,["mark"]),u(c,{id:e.id},null,8,["id"])],38)):B("",!0)}var qs=se(_l,[["render",wl],["__scopeId","data-v-8cedd7da"]]);const kl=Symbol("Clickable");function xe(e){return je(()=>{var n;const t=(n=e==null?void 0:e())!=null?n:{};if(t.id=Yt("clickable-"),t.type=kl,t[Rt]=qs,t.isHolding=O(!1),T(t,"visibility"),Re(t,"visibility",Ie.Visible),T(t,"canClick"),Re(t,"canClick",!0),T(t,"classes"),T(t,"style"),T(t,"mark"),T(t,"display"),t.onClick){const s=t.onClick.bind(t);t.onClick=function(i){r(t.canClick)&&s(i)}}if(t.onHold){const s=t.onHold.bind(t);t.onHold=function(){r(t.canClick)&&s()}}return t[$t]=function(){const{display:s,visibility:i,style:l,classes:o,onClick:c,onHold:m,isHolding:d,canClick:v,small:_,mark:b,id:g}=this;return{display:s,visibility:i,style:r(l),classes:o,onClick:c,onHold:m,isHolding:d,canClick:v,small:_,mark:b,id:g}},t})}function ht(e,t="points",n=0,s=void 0){const i=_e(e)?e:Be(e);if(i.displayName=t,i.precision=n,i.small=s,!_e(e)){const l=i[on];l.displayName=t,l.precision=n,l.small=s}return i}function Cl(e){const t=Be(e.value);return gt(e,(n,s)=>{a.gt(n,s)&&(t.value=a.add(t.value,a.sub(n,s)))}),t}new a("10^^8");new a("1e100");function fn(e,t){const n=t!=null?t:e.value;return a.eq(e.precision,0)?J(e.small?n:a.floor(n)):te(n,e.precision,e.small)}const Nl=["x1","y1","x2","y2"],Sl=L({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const n=$e(e),s=N(()=>{const l=n.startNode.value.rect,o=n.boundingRect.value,c=o?{x:l.x+l.width/2-o.x,y:l.y+l.height/2-o.y}:{x:0,y:0};return n.link.value.offsetStart&&(c.x+=n.link.value.offsetStart.x,c.y+=n.link.value.offsetStart.y),c}),i=N(()=>{const l=n.endNode.value.rect,o=n.boundingRect.value,c=o?{x:l.x+l.width/2-o.x,y:l.y+l.height/2-o.y}:{x:0,y:0};return n.link.value.offsetEnd&&(c.x+=n.link.value.offsetEnd.x,c.y+=n.link.value.offsetEnd.y),c});return(l,o)=>(y(),M("line",zt({"stroke-width":"15px",stroke:"white"},e.link,{x1:r(s).x,y1:r(s).y,x2:r(i).x,y2:r(i).y}),null,16,Nl))}});const Ml=L({__name:"Links",props:{links:null},setup(e){var m;const n=ut(e,"links"),s=O(null),i=bn(Gn,O({})),l=bn(Hn,O(void 0)),o=O((m=s.value)==null?void 0:m.getBoundingClientRect());gt(l,()=>{var d;return o.value=(d=s.value)==null?void 0:d.getBoundingClientRect()}),Nn(()=>{var d;return o.value=(d=s.value)==null?void 0:d.getBoundingClientRect()});const c=N(()=>{var v,_;const d=i.value;return(_=(v=n.value)==null?void 0:v.filter(b=>{var g,w;return((g=d[b.startNode.id])==null?void 0:g.rect)&&((w=d[b.startNode.id])==null?void 0:w.rect)}))!=null?_:[]});return(d,v)=>(y(),M(F,null,[r(c)?(y(),M("svg",ci(zt({key:0},d.$attrs)),[(y(!0),M(F,null,gs(r(c),(_,b)=>(y(),G(Sl,{key:b,link:_,boundingRect:o.value,startNode:r(i)[_.startNode.id],endNode:r(i)[_.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):B("",!0),f("div",{ref_key:"resizeListener",ref:s,class:"resize-listener"},null,512)],64))}});var Al=se(Ml,[["__scopeId","data-v-063f6d6b"]]);L({props:{nodes:{type:$(Array),required:!0},leftSideNodes:$(Array),rightSideNodes:$(Array),branches:$(Array)},components:{Links:Al},setup(e){const{nodes:t,leftSideNodes:n,rightSideNodes:s}=$e(e),i=it();Ze(()=>{const c=Ee(t);i.value=ee(R(()=>u(F,null,[c.map(m=>u("span",{class:"row tree-row",style:"margin: 50px auto;"},[m.map(rt)]))])))});const l=it();Ze(()=>{const c=Ee(n);l.value=c?ee(R(()=>u("span",{class:"left-side-nodes small"},[c.map(rt)]))):""});const o=it();return Ze(()=>{const c=Ee(s);o.value=c?ee(R(()=>u("span",{class:"side-nodes small"},[c.map(rt)]))):""}),{unref:r,nodesComp:i,leftNodesComp:l,rightNodesComp:o}}});L({props:{display:$(Object,String,Function),visibility:{type:$(Number),required:!0},style:$(String,Object,Array),classes:$(Object),onClick:Function,onHold:Function,color:$(String),glowColor:$(String),canClick:{type:$(Boolean),required:!0},mark:$(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Bn,Node:mn},setup(e){const{onClick:t,onHold:n,display:s}=$e(e),i=Tt(s),{start:l,stop:o}=Us(t,n);return{start:l,stop:o,comp:i,unref:r,Visibility:Ie,isCoercableComponent:_t}}});function jn(e){const t=[],n={};let s=!1;function i(){return s||(t.push(...e()),n.base=t.map(c=>Te(c.base)),n.baseText=t.map(c=>Te(c.baseText)),n.visible=t.map(c=>Te(c.visible)),s=!0),t}const l=Be({});return[R(()=>{const c=i();let m=!0;const d=c.map((v,_)=>{var S,I,le;if(r(n.visible[_])===!1)return null;const b=u("h3",{onClick:()=>l.value[_]=!l.value[_],style:"cursor: pointer"},[u("span",{class:"modifier-toggle"+(r(l.value[_])?" collapsed":"")},[h("\u25BC")]),v.title,v.subtitle?u("span",{class:"subtitle"},[h(" ("),v.subtitle,h(")")]):null]),g=r(l.value[_])?null:u(F,null,[u("div",{class:"modifier-container"},[u("span",{class:"modifier-amount"},[te((S=r(n.base[_]))!=null?S:1),v.unit]),u("span",{class:"modifier-description"},[rt((I=r(n.baseText[_]))!=null?I:"Base")])]),rt(r(v.modifier.description))]),w=!m;return m=!1,u(F,null,[w?u("br",null,null):null,u("div",null,[b,u("br",null,null),g,u("hr",null,null),h("Total: "),te(v.modifier.apply((le=r(n.base[_]))!=null?le:1)),v.unit])])});return u(F,null,[d])}),l]}function Vs(e){const t=Object.values(e).reverse(),n=Be(!0),s=N(()=>t.filter(m=>m.earned.value===!1)),{firstFeature:i,collapsedContent:l,hasCollapsedContent:o}=Ga(t,m=>m.earned.value),c=R(()=>{const m=[...s.value];return i.value&&m.push(i.value),La(...m,R(()=>Sn(u(cl,{collapsed:n,content:l,display:n.value?"Show other completed milestones":"Hide other completed milestones"},null),[[ps,r(o)]])))});return{collapseMilestones:n,display:c}}function Pn(e){const t=Cl(e.resource),n=()=>{var c,m;if(Q.day.value!==e.day)return 1;let l=a.add(t.value,1),o=e.goal;return((m=(c=e.usingLog)==null?void 0:c.value)!=null?m:U.usingLog)&&(l=l.log10(),o=a.log10(o)),a.div(l,o)},s=un(()=>({direction:ae.Right,width:600,height:25,fillStyle:{backgroundColor:e.color},textStyle:e.textColor?{color:e.textColor}:void 0,progress:n,display:R(()=>Q.day.value===e.day?u(F,null,[He(t.value),h("/"),He(e.goal)]):"")})),i=R(()=>u(F,null,[u("div",null,[Q.day.value===e.day?u(F,null,[h("Reach "),He(e.goal),h(" total "),e.resource.displayName,h(" to complete the day")]):u(F,null,[e.name,h(" Complete!")]),e.modal?u(F,null,[" ",h("-")," ",u("button",{class:"button",style:"display: inline-block;",onClick:()=>e.modal.show.value=!0},[h("Check Modifiers")])]):void 0]),ce(s),e.modal?ce(e.modal.display):void 0]));return Ze(()=>{Q.day.value===e.day&&a.gte(t.value,e.goal)&&Q.completeDay()}),{total:t,trackerDisplay:i}}const Il=Symbol("Buyable");function Xe(e){const t=Be(0);return je(()=>{var l,o,c;const n=e();if(n.canPurchase==null&&(n.resource==null||n.cost==null))throw console.warn("Cannot create buyable without a canPurchase property or a resource and cost property",n),"Cannot create buyable without a canPurchase property or a resource and cost property";n.id=Yt("buyable-"),n.type=Il,n[Rt]=qs,n.amount=t,n.amount[xt]=(l=n.initialValue)!=null?l:0,n.canAfford=N(()=>{const m=n,d=r(m.cost);return m.resource!=null&&d!=null&&a.gte(m.resource.value,d)}),n.canPurchase==null&&(n.canPurchase=N(()=>r(n.visibility)===Ie.Visible&&r(n.canAfford)&&a.lt(n.amount.value,r(n.purchaseLimit)))),n.maxed=N(()=>a.gte(n.amount.value,r(n.purchaseLimit))),T(n,"classes");const s=n.classes;n.classes=N(()=>{const m=r(s)||{};return n.maxed.value&&(m.bought=!0),m}),T(n,"canPurchase"),n.canClick=n.canPurchase,n.onClick=n.purchase=(c=(o=n.onClick)!=null?o:n.purchase)!=null?c:function(){var v;const m=n;if(!r(m.canPurchase))return;const d=r(m.cost);m.cost!=null&&m.resource!=null&&(m.resource.value=a.sub(m.resource.value,d),m.amount.value=a.add(m.amount.value,1)),(v=m.onPurchase)==null||v.call(m,d)},T(n,"display");const i=n.display;return n.display=R(()=>{const m=r(i);if(_t(m)){const d=ee(m);return u(d,null,null)}if(m!=null&&n.cost!=null&&n.resource!=null){const d=n,v=ee(m.title||"","h3"),_=ee(m.description||""),b=ee(m.effectDisplay||"");return u("span",null,[m.title?u("div",null,[u(v,null,null)]):null,m.description?u(_,null,null):null,m.showAmount===!1?null:u("div",null,[u("br",null,null),r(d.purchaseLimit)===a.dInf?u(F,null,[h("Amount: "),J(d.amount.value)]):u(F,null,[h("Amount: "),J(d.amount.value),h(" /")," ",J(r(d.purchaseLimit))])]),m.effectDisplay?u("div",null,[u("br",null,null),h("Currently: "),u(b,null,null)]):null,d.cost&&!d.maxed.value?u("div",null,[h("Cost: "),te(r(d.cost)||0)," ",n.resource.displayName]):null])}return""}),T(n,"visibility"),Re(n,"visibility",Ie.Visible),T(n,"cost"),T(n,"resource"),T(n,"purchaseLimit"),Re(n,"purchaseLimit",a.dInf),T(n,"style"),T(n,"mark"),T(n,"small"),n[$t]=function(){const{display:m,visibility:d,style:v,classes:_,onClick:b,canClick:g,small:w,mark:S,id:I}=this;return{display:m,visibility:d,style:r(v),classes:_,onClick:b,canClick:g,small:w,mark:S,id:I}},n})}const xn=An({}),Kn=Symbol("Hotkey");function On(e){return je(()=>{const t=e();return t.type=Kn,T(t,"enabled"),Re(t,"enabled",!0),T(t,"description"),t})}ke.on("addLayer",e=>{Ms(e,Kn).forEach(t=>{xn[t.key]=t})});ke.on("removeLayer",e=>{Ms(e,Kn).forEach(t=>{xn[t.key]=void 0})});document.onkeydown=function(e){var s;if(((s=e.target)==null?void 0:s.tagName)==="INPUT"||Xn.value&&!U.keepGoing)return;let t=e.key;e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const n=xn[t];n&&r(n.enabled)&&(e.preventDefault(),n.onPress())};Oa(R(()=>{const e=Object.values(xn).filter(t=>r(t==null?void 0:t.enabled));return e.length===0?"":u("div",null,[u("br",null,null),u("h4",null,[h("Hotkeys")]),e.map(t=>u("div",null,[t==null?void 0:t.key,h(": "),t==null?void 0:t.description]))])}));const El=L({__name:"Sticky",setup(e){const t=O("0"),n=new ResizeObserver(i),s=it(null);function i(){let l=s.value;if(l==null)return;let o=0;for(;l.previousSibling;){const c=l.previousSibling;c.dataset&&"vSticky"in c.dataset&&(o+=c.offsetHeight),l=c}t.value=o+"px"}return Qt(i),document.fonts.ready.then(i),Nn(()=>{var o;const l=(o=s.value)==null?void 0:o.parentElement;l&&n.observe(l)}),(l,o)=>(y(),M("div",{class:"sticky",style:Ae({top:t.value}),ref_key:"element",ref:s,"data-v-sticky":""},[pt(l.$slots,"default",{},void 0,!0)],4))}});var Bl=se(El,[["__scopeId","data-v-cccac690"]]);const Pl=L({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,n=N(()=>fn(t.resource));return(s,i)=>(y(),M("h2",{style:Ae({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},W(r(n)),5))}});const xl={class:"main-display"},Fl={key:0},Tl={key:1},Rl=h(", "),$l={key:2},Dl=f("br",null,null,-1),Ht=L({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null,productionDisplay:null},setup(e){const n=$e(e),s=O(null),i=Tt(n.effectDisplay),l=Tt(n.productionDisplay),o=N(()=>a.lt(n.resource.value,"1e1000"));return(c,m)=>(y(),G(Bl,null,{default:q(()=>{var d,v,_,b;return[f("div",{class:we(["main-display-container",(d=e.classes)!=null?d:{}]),style:Ae([{height:`${((_=(v=s.value)==null?void 0:v.$el.clientHeight)!=null?_:0)+50}px`},(b=e.style)!=null?b:{}])},[f("div",xl,[r(o)?(y(),M("span",Fl,"You have ")):B("",!0),u(Pl,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),h(" "+W(e.resource.displayName),1),r(i)?(y(),M("span",Tl,[Rl,(y(),G(ve(r(i)),{ref_key:"effectRef",ref:s},null,512))])):B("",!0),r(l)?(y(),M("span",$l,[Dl,(y(),G(ve(r(l)),{ref_key:"effectRef",ref:s},null,512))])):B("",!0)])],6)]}),_:1}))}});var Ol=L({props:{display:{type:$(String,Object,Function),required:!0},visibility:{type:$(Number),required:!0},style:$(String,Object,Array),classes:$(Object),resource:Object,cost:$(String,Object,Number),canPurchase:{type:$(Boolean),required:!0},bought:{type:$(Boolean),required:!0},mark:$(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:mn,MarkNode:Bn},setup(e){const{display:t,cost:n}=$e(e),s=it("");return Ze(()=>{const i=Ee(t);if(i==null){s.value="";return}if(_t(i)){s.value=ee(i);return}const l=Ee(n),o=ee(i.title||"","h3"),c=ee(i.description,"div"),m=ee(i.effectDisplay||"");s.value=ee(R(()=>{var d;return u("span",null,[i.title?u("div",null,[u(o,null,null)]):null,u(c,null,null),i.effectDisplay?u("div",null,[h("Currently: "),u(m,null,null)]):null,e.resource!=null&&i.showCost!==!1?u(F,null,[u("br",null,null),h("Cost: "),e.resource&&fn(e.resource,l)," ",(d=e.resource)==null?void 0:d.displayName]):null])}))}),{component:s,unref:r,Visibility:Ie}}});const Ul=["disabled"];function ql(e,t,n,s,i,l){var m;const o=Ft("MarkNode"),c=Ft("Node");return e.unref(e.visibility)!==e.Visibility.None?(y(),M("button",{key:0,style:Ae([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(m=e.unref(e.style))!=null?m:{}]),onClick:t[0]||(t[0]=(...d)=>e.purchase&&e.purchase(...d)),class:we({feature:!0,upgrade:!0,can:e.unref(e.canPurchase),locked:!e.unref(e.canPurchase),bought:e.unref(e.bought),...e.unref(e.classes)}),disabled:!e.unref(e.canPurchase)},[e.unref(e.component)?(y(),G(ve(e.unref(e.component)),{key:0})):B("",!0),u(o,{mark:e.unref(e.mark)},null,8,["mark"]),u(c,{id:e.id},null,8,["id"])],14,Ul)):B("",!0)}var Vl=se(Ol,[["render",ql],["__scopeId","data-v-7f411ac8"]]);const Ll=Symbol("Upgrade");function ue(e){const t=Be(!1);return je(()=>{const n=e();return n.id=Yt("upgrade-"),n.type=Ll,n[Rt]=Vl,n.canAfford==null&&(n.resource==null||n.cost==null)&&console.warn("Error: can't create upgrade without a canAfford property or a resource and cost property",n),n.bought=t,n.canAfford==null?n.canAfford=N(()=>{const s=n;return s.resource!=null&&s.cost!=null&&a.gte(s.resource.value,r(s.cost))}):T(n,"canAfford"),n.canPurchase=N(()=>r(n.visibility)===Ie.Visible&&r(n.canAfford)&&!r(n.bought)),n.purchase=function(){var i;const s=n;!r(s.canPurchase)||(s.resource!=null&&s.cost!=null&&(s.resource.value=a.sub(s.resource.value,r(s.cost))),t.value=!0,(i=s.onPurchase)==null||i.call(s))},T(n,"visibility"),Re(n,"visibility",Ie.Visible),T(n,"classes"),T(n,"style"),T(n,"display"),T(n,"mark"),T(n,"cost"),T(n,"resource"),n[$t]=function(){const{display:s,visibility:i,style:l,classes:o,resource:c,cost:m,canPurchase:d,bought:v,mark:_,id:b,purchase:g}=this;return{display:s,visibility:i,style:r(l),classes:o,resource:c,cost:m,canPurchase:d,bought:v,mark:_,id:b,purchase:g}},n})}function oe(e){return je(()=>{const{addend:t,description:n,enabled:s}=e(),i=Te(t),l=Te(n),o=s==null?void 0:Te(s);return{apply:c=>a.add(c,r(i)),revert:c=>a.sub(c,r(i)),enabled:o,description:n==null?void 0:R(()=>u("div",{class:"modifier-container"},[u("span",{class:"modifier-amount"},[a.gte(r(i),0)?"+":"",te(r(i))]),r(l)?u("span",{class:"modifier-description"},[rt(r(l))]):null]))}})}function D(e){return je(()=>{const{multiplier:t,description:n,enabled:s}=e(),i=Te(t),l=Te(n),o=s==null?void 0:Te(s);return{apply:c=>a.times(c,r(i)),revert:c=>a.div(c,r(i)),enabled:o,description:n==null?void 0:R(()=>u("div",{class:"modifier-container"},[u("span",{class:"modifier-amount"},[h("x"),te(r(i))]),r(l)?u("span",{class:"modifier-description"},[rt(r(l))]):null]))}})}function Ls(e){return je(()=>{const{exponent:t,description:n,enabled:s,supportLowNumbers:i}=e(),l=Te(t),o=Te(n),c=s==null?void 0:Te(s);return{apply:m=>{let d=m;return i&&(d=a.add(d,1)),d=a.pow(d,r(l)),i&&(d=a.sub(d,1)),d},revert:m=>{let d=m;return i&&(d=a.add(d,1)),d=a.root(d,r(l)),i&&(d=a.sub(d,1)),d},enabled:c,description:n==null?void 0:R(()=>u("div",{class:"modifier-container"},[u("span",{class:"modifier-amount"},[h("^"),te(r(l))]),r(o)?u("span",{class:"modifier-description"},[rt(r(o)),i?" (+1 effective)":null]):null]))}})}function re(e){return je(()=>{const t=e();return{apply:n=>t.filter(s=>r(s.enabled)!==!1).reduce((s,i)=>i.apply(s),n),revert:t.every(n=>n.revert!=null)?n=>t.filter(s=>r(s.enabled)!==!1).reduceRight((s,i)=>i.revert(s),n):void 0,enabled:N(()=>t.filter(n=>r(n.enabled)!==!1).length>0),description:R(()=>u(F,null,[t.filter(n=>r(n.enabled)!==!1).map(n=>r(n.description)).filter(n=>n).map(rt)]))}})}function Gs(e){return je(()=>{const t=e();return t.currentGain==null&&(t.currentGain=N(()=>{let n=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return n=a.floor(n).max(0),r(t.buyMax)||(n=n.min(1)),n})),t.actualGain==null&&(t.actualGain=t.currentGain),t.currentAt==null&&(t.currentAt=N(()=>{let n=t.scaling.currentAt(t);return t.roundUpCost&&(n=a.ceil(n)),n})),t.nextAt==null&&(t.nextAt=N(()=>{let n=t.scaling.nextAt(t);return t.roundUpCost&&(n=a.ceil(n)),n})),t.convert==null&&(t.convert=function(){var i;const n=r(t.currentGain),s=r(t.currentAt);t.gainResource.value=a.add(t.gainResource.value,n),t.spend(n,s),(i=t.onConvert)==null||i.call(t,n)}),t.spend==null&&(t.spend=function(){t.baseResource.value=0}),T(t,"currentGain"),T(t,"actualGain"),T(t,"currentAt"),T(t,"nextAt"),T(t,"buyMax"),Re(t,"buyMax",!0),T(t,"roundUpCost"),Re(t,"roundUpCost",!0),t})}function Wn(e,t){const n=Te(e),s=Te(t);return{currentGain(i){let l=r(i.baseResource.value);if(i.costModifier&&(l=i.costModifier.apply(l)),a.lt(l,r(n)))return 0;const o=a.div(l,r(n)).pow(r(s));return o.isNan()?new a(0):o},currentAt(i){let l=r(i.currentGain);return i.gainModifier&&(l=i.gainModifier.revert(l)),l=a.max(0,l).root(r(s)).times(r(n)),i.costModifier&&(l=i.costModifier.revert(l)),l},nextAt(i){let l=a.add(r(i.currentGain),1).floor();return i.gainModifier&&(l=i.gainModifier.revert(l)),l=a.max(0,l).root(r(s)).times(r(n)).max(r(n)),i.costModifier&&(l=i.costModifier.revert(l)),l}}}function Hs(e){return Gs(e)}function Gl(e){return Gs(()=>{const t=e();return Re(t,"buyMax",!1),t.currentGain==null&&(t.currentGain=N(()=>{let n=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return n=a.floor(n).max(t.gainResource.value),r(t.buyMax)||(n=n.min(a.add(t.gainResource.value,1))),n})),t.actualGain==null&&(t.actualGain=N(()=>{let n=a.sub(a.floor(t.scaling.currentGain(t)),t.gainResource.value).max(0);return r(t.buyMax)||(n=n.min(1)),n})),Re(t,"convert",function(){var i;const n=r(t.actualGain),s=r(t.currentAt);t.gainResource.value=t.gainModifier?t.gainModifier.apply(r(t.currentGain)):r(t.currentGain),t.spend(n,s),(i=t.onConvert)==null||i.call(t,n)}),t})}const Hl="boxes",rs=6,Ye=Dt(Hl,function(){const e="Boxes",t="#964B00",n=ht(0,"boxes"),s=Hs(()=>({scaling:Wn(1e10,1),baseResource:Y.logs,gainResource:Z(n),roundUpCost:!0})),i=xe(()=>({display:R(()=>u(F,null,[u("span",{style:"font-size: large"},[h("Create "),J(s.currentGain.value),h(" "),n.displayName]),u("br",null,null),u("span",{style:"font-size: large"},[h("Cost:")," ",fn(Y.logs,a.gte(s.actualGain.value,1)?s.currentAt.value:s.nextAt.value)," ",Y.logs.displayName])])),canClick:()=>a.gte(s.actualGain.value,1),onClick(){!r(this.canClick)||s.convert()},style:"width: 600px; min-height: unset"})),l=ue(()=>({display:{title:"Carry logs in boxes",description:"Double log gain and unlock a new elf for training"},onPurchase(){Q.days[3].recentlyUpdated.value=!0},resource:Z(n),cost:100})),o=ue(()=>({display:{title:"Carry ash in boxes",description:"Double ash gain and unlock a new elf for training"},onPurchase(){Q.days[3].recentlyUpdated.value=!0},resource:Z(n),cost:1e3})),c=ue(()=>({display:{title:"Carry coal in boxes",description:"Double coal gain and unlock a new elf for training"},onPurchase(){Q.days[3].recentlyUpdated.value=!0},resource:Z(n),cost:4e3})),m={logsUpgrade:l,ashUpgrade:o,coalUpgrade:c},d=Xe(()=>({display:{title:"Carry more logs",description:"Use boxes to carry even more logs, boosting their gain",effectDisplay:R(()=>u(F,null,[te(a.div(d.amount.value,2).add(1)),h("x")]))},resource:Z(n),cost(){return a.pow(3,d.amount.value).times(100)},visibility:()=>H(l.bought.value)})),v=Xe(()=>({display:{title:"Carry more ash",description:"Use boxes to carry even more ash, boosting its gain",effectDisplay:R(()=>u(F,null,[te(a.div(v.amount.value,2).add(1)),h("x")]))},resource:Z(n),cost(){return a.pow(5,v.amount.value).times(1e3)},visibility:()=>H(o.bought.value)})),_=Xe(()=>({display:{title:"Carry more coal",description:"Use boxes to carry even more coal, boosting its gain",effectDisplay:R(()=>u(F,null,[te(a.div(_.amount.value,2).add(1)),h("x")]))},resource:Z(n),cost(){return a.pow(7,_.amount.value).times(1e3)},visibility:()=>H(c.bought.value)})),b={logBoxesBuyable:d,ashBoxesBuyable:v,coalBoxesBuyable:_},{total:g,trackerDisplay:w}=Pn({resource:n,goal:5e4,name:e,day:rs,color:t});return{name:e,day:rs,color:t,boxes:n,totalBoxes:g,boxesConversion:s,upgrades:m,buyables:b,minWidth:700,display:R(()=>u(F,null,[ce(w),u(ge,null,null),u(Ht,{resource:n,color:t,style:"margin-bottom: 0"},null),u(ge,null,null),ce(i),u(ge,null,null),Ue(...Object.values(m)),Ue(...Object.values(b))]))}});const Ql={class:"field"},zl=L({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,s=N(()=>ee(r(n.title)||"","span")),i=N({get(){return!!n.modelValue},set(l){t("update:modelValue",l)}});return(l,o)=>(y(),M("label",Ql,[Sn(f("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":o[0]||(o[0]=c=>_e(i)?i.value=c:null)},null,512),[[di,r(i)]]),(y(),G(ve(r(s))))]))}});var Bt=se(zl,[["__scopeId","data-v-33d57459"]]);const jl={class:"field"},Kl={key:0,class:"field-title"},Jn=L({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var o;const n=e,s=Tt(ut(n,"title"),"span"),i=O((o=n.options.find(c=>c.value===n.modelValue))!=null?o:null);gt(ut(n,"modelValue"),c=>{var m;Ee(i)!==c&&(i.value=(m=n.options.find(d=>d.value===c))!=null?m:null)});function l(c){t("update:modelValue",c.value)}return(c,m)=>(y(),M("div",jl,[r(s)?(y(),M("span",Kl,[(y(),G(ve(r(s))))])):B("",!0),u(r(hi),{options:e.options,modelValue:i.value,"onUpdate:modelValue":[m[0]||(m[0]=d=>i.value=d),l],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});var Wl=L({props:{visibility:{type:$(Number),required:!0},display:{type:$(String,Object,Function),required:!0},style:$(String,Object,Array),classes:$(Object),earned:{type:$(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:mn},setup(e){const{display:t}=$e(e),n=it("");return Ze(()=>{const s=Ee(t);if(s==null){n.value="";return}if(_t(s)){n.value=ee(s);return}const i=ee(s.requirement,"h3"),l=ee(s.effectDisplay||"","b"),o=ee(s.optionsDisplay||"","span");n.value=ee(R(()=>u("span",null,[u(i,null,null),s.effectDisplay?u("div",null,[u(l,null,null)]):null,s.optionsDisplay?u("div",{class:"equal-spaced"},[u(o,null,null)]):null])))}),{comp:n,unref:r,Visibility:Ie}}});function Jl(e,t,n,s,i,l){var c;const o=Ft("Node");return e.unref(e.visibility)!==e.Visibility.None?(y(),M("div",{key:0,style:Ae([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(c=e.unref(e.style))!=null?c:{}]),class:we({feature:!0,milestone:!0,done:e.unref(e.earned),...e.unref(e.classes)})},[(y(),G(ve(e.unref(e.comp)))),u(o,{id:e.id},null,8,["id"])],6)):B("",!0)}var Xl=se(Wl,[["render",Jl],["__scopeId","data-v-f4e8794e"]]);ke.on("setupVue",e=>e.use(gi));const us=ys(),Yl=Symbol("Milestone");let Pt;(function(e){e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none"})(Pt||(Pt={}));function Fe(e){const t=Be(!1);return je(()=>{var i;const n=(i=e==null?void 0:e())!=null?i:{};n.id=Yt("milestone-"),n.type=Yl,n[Rt]=Xl,n.earned=t,n.complete=function(){var o;const l=n;if(t.value=!0,(o=l.onComplete)==null||o.call(l),l.display&&r(l.showPopups)===!0){const c=r(l.display),m=ee(_t(c)?c:c.requirement);us(u(F,null,[u("h3",null,[h("Milestone earned!")]),u("div",null,[u(m,null,null)])]))}},T(n,"visibility"),Re(n,"visibility",Ie.Visible);const s=n.visibility;if(n.visibility=N(()=>{const l=r(n.display);switch(me.msDisplay){default:case Pt.All:return r(s);case Pt.Configurable:return r(n.earned)&&!(l!=null&&typeof l=="object"&&"optionsDisplay"in l)?Ie.None:r(s);case Pt.Incomplete:return r(n.earned)?Ie.None:r(s);case Pt.None:return Ie.None}}),T(n,"style"),T(n,"classes"),T(n,"display"),T(n,"showPopups"),n[$t]=function(){const{visibility:l,display:o,style:c,classes:m,earned:d,id:v}=this;return{visibility:l,display:o,style:r(c),classes:m,earned:d,id:v}},n.shouldEarn){const l=n;Ze(()=>{var o,c;if(me.active===U.id&&!l.earned.value&&r(l.visibility)===Ie.Visible&&((o=l.shouldEarn)==null?void 0:o.call(l))&&(l.earned.value=!0,(c=l.onComplete)==null||c.call(l),l.display&&r(l.showPopups)===!0)){const m=r(l.display),d=ee(_t(m)?m:m.requirement);us(u(F,null,[u("h3",null,[h("Milestone earned!")]),u("div",null,[u(d,null,null)])]))}})}return n})}ke.on("loadSettings",e=>{Re(e,"msDisplay",Pt.All)});const Zl=Object.values(Pt).map(e=>({label:Ss(e),value:e}));Da(R(()=>u(Jn,{title:"Show Milestones",options:Zl,"onUpdate:modelValue":e=>me.msDisplay=e,modelValue:me.msDisplay},null)));const eo=Symbol("Reset");function to(e){return je(()=>{const t=e();return t.id=Yt("reset-"),t.type=eo,t.reset=function(){var s;const n=i=>{if(i&&typeof i=="object")if(xt in i){const l=i;l.value=l[xt]}else!(i instanceof a)&&!_e(i)&&Object.values(i).forEach(l=>n(l))};r(t.thingsToReset).forEach(n),ke.emit("reset",t),(s=t.onReset)==null||s.call(t)},T(t,"thingsToReset"),t})}const vn={};ke.on("removeLayer",e=>{var t;(t=vn[e.id])==null||t.call(vn),vn[e.id]=void 0});const no="paper",cs=5,ie=Dt(no,function(){const e="Paper",t="#E8DCB8",n=ht(0,"paper"),s=ht(N(()=>a.min(a.div(Y.logs.value,1e9),a.div(z.ash.value,1e6))),"pulp"),i=Hs(()=>({scaling:Wn(1,1.2),baseResource:s,gainResource:Z(n),roundUpCost:!0,spend(C,x){Y.logs.value=a.sub(Y.logs.value,a.times(x,1e9)),z.ash.value=a.sub(z.ash.value,a.times(x,1e6))}})),l=xe(()=>({display:R(()=>{const C=a.gte(i.actualGain.value,1)?i.currentAt.value:i.nextAt.value;return u(F,null,[u("span",{style:"font-size: large"},[h("Create "),J(i.currentGain.value),h(" "),n.displayName]),u("br",null,null),u("span",{style:"font-size: large"},[h("Cost: "),fn(Y.logs,C),h(" "),s.displayName,h(" ("),J(a.times(C,1e9)),h(" "),Y.logs.displayName,h(";")," ",J(a.times(C,1e6)),h(" "),z.ash.displayName,h(")")])])}),canClick:()=>a.gte(i.actualGain.value,1),onClick(){!r(this.canClick)||i.convert()},style:"width: 600px; min-height: unset"}));function o(C){const x=Xe(()=>({...C,display:{title:C.name,description:`Print a copy of "${C.name}", which ${C.elfName} will use to improve their skills! Each copy printed will reduce the "${C.buyableName}" price scaling by 0.95x and make ${C.elfName} purchase +10% faster!`,effectDisplay:R(()=>u(F,null,[te(a.pow(.95,x.amount.value)),h("x price scaling,")," ",te(a.div(x.amount.value,10).add(1)),h("x auto-purchase speed")])),showAmount:!1},resource:Z(n),cost:()=>a.pow(5,x.amount.value).times(10),style:"width: 600px"}));return x}const c=o({name:"Now You're Logging!",elfName:"Holly",buyableName:"Generic Cutters"}),m=o({name:"The Man Who Planted Trees",elfName:"Ivy",buyableName:"Generic Planters"}),d=o({name:"Logjam",elfName:"Hope",buyableName:"Expand Forest"}),v=o({name:"Fahrenheit 451",elfName:"Jack",buyableName:"Heated Cutters"}),_=o({name:"Tillamook Burn Country",elfName:"Mary",buyableName:"Heated Planters"}),b=o({name:"The Garden Tree's Handbook",elfName:"Noel",buyableName:"Fertilized Soil"}),g=o({name:"Firestarter",elfName:"Joy",buyableName:"Small Fire",visibility:()=>H(be.elves.smallFireElf.bought.value)}),w=o({name:"An Arsonist's Guide to Writer's Homes in New England",elfName:"Faith",buyableName:"Bonfire",visibility:()=>H(be.elves.bonfireElf.bought.value)}),S=o({name:"Little Fires Everywhere",elfName:"Snowball",buyableName:"Kiln",visibility:()=>H(be.elves.kilnElf.bought.value)}),I={cuttersBook:c,plantersBook:m,expandersBook:d,heatedCuttersBook:v,heatedPlantersBook:_,fertilizerBook:b,smallFireBook:g,bonfireBook:w,kilnBook:S},{total:le,trackerDisplay:A}=Pn({resource:n,goal:5e3,name:e,day:cs,color:t,textColor:"var(--feature-foreground)"});return{name:e,day:cs,color:t,paper:n,totalPaper:le,paperConversion:i,books:I,minWidth:700,display:R(()=>u(F,null,[ce(A),u(ge,null,null),u(Ht,{resource:n,color:t,style:"margin-bottom: 0"},null),u(ge,null,null),ce(l),u(ge,null,null),Os(...Object.values(I))]))}}),so="workshop",en=2,Ge=Dt(so,function(){const e="Workshop",t="#D66B02",n="#D66B02",s=ht(0,"foundation progress"),i=Gl(()=>({scaling:Wn(250,1.5),baseResource:Y.logs,gainResource:Z(s),roundUpCost:!0,buyMax:!1,spend(x,fe){Y.logs.value=a.sub(Y.logs.value,fe)}})),l=xe(()=>({display:R(()=>u(F,null,[u("b",{style:"font-size: x-large"},[h("Build part of the foundation")]),u("br",null,null),u("br",null,null),u("span",{style:"font-size: large"},[h("Cost:")," ",fn(Y.logs,a.gte(i.actualGain.value,1)?i.currentAt.value:i.nextAt.value)," ",Y.logs.displayName])])),visibility:()=>H(a.lt(s.value,100)),canClick:()=>a.gte(i.actualGain.value,1)&&a.lt(s.value,100),onClick(){!r(this.canClick)||i.convert()},style:"width: 600px; min-height: unset"})),o=On(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{l.canClick.value&&l.onClick()}})),c=N(()=>!be.milestones[6].earned.value),m=Fe(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>a.gte(s.value,1),showPopups:c})),d=Fe(()=>({display:{requirement:"10% Foundation Completed",effectDisplay:"Cut an additional tree per second for each 5% of foundation completed"},shouldEarn:()=>a.gte(s.value,10),visibility:()=>H(m.earned.value),showPopups:c})),v=Fe(()=>({display:{requirement:"20% Foundation Completed",effectDisplay:"Plant an additional tree per second for each 10% of foundation completed"},shouldEarn:()=>a.gte(s.value,20),visibility:()=>H(d.earned.value),showPopups:c})),_=Fe(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>a.gte(s.value,30),visibility:()=>H(v.earned.value),showPopups:c})),b=Fe(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>a.gte(s.value,40),visibility:()=>H(_.earned.value),showPopups:c})),g=Fe(()=>({display:{requirement:"50% Foundation Completed",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte(s.value,50),visibility:()=>H(b.earned.value),showPopups:c})),w=Fe(()=>({display:{requirement:"75% Foundation Completed",effectDisplay:"The forest gains an extra tree for every 2% of foundation completed"},shouldEarn:()=>a.gte(s.value,75),visibility:()=>H(g.earned.value),showPopups:c})),S=Fe(()=>({display:{requirement:"100% Foundation Completed",effectDisplay:"Log per tree is raised to the 1.2th power"},shouldEarn:()=>a.gte(s.value,100),visibility:()=>H(w.earned.value),showPopups:c})),I={logGainMilestone1:m,autoCutMilestone1:d,autoPlantMilestone1:v,autoCutMilestone2:_,autoPlantMilestone2:b,logGainMilestone2:g,morePlantsMilestone1:w,logGainMilestone3:S},{collapseMilestones:le,display:A}=Vs(I),C=un(()=>({direction:ae.Right,width:600,height:25,fillStyle:`backgroundColor: ${n}`,progress:()=>Q.day.value===en?a.div(s.value,100):1,display:R(()=>Q.day.value===en?u(F,null,[J(s.value),h("%")]):"")}));return Ze(()=>{Q.day.value===en&&a.gte(s.value,100)&&Q.completeDay()}),{name:e,day:en,color:t,foundationProgress:s,foundationConversion:i,milestones:I,collapseMilestones:le,minWidth:700,buildFoundationHK:o,display:R(()=>u(F,null,[u("div",null,[Q.day.value===en?"Complete the foundation to complete the day":`${e} Complete!`]),ce(C),u(ge,null,null),u("div",null,[u("span",null,[h("The foundation is ")]),u("h2",{style:`color: ${t}; text-shadow: 0 0 10px ${t}`},[J(s.value)]),h("% completed")]),a.lt(s.value,100)?u(ge,null,null):null,ce(l),u(ge,null,null),A()]))}}),io="elves",tn=4,be=Dt(io,function(){const e="Elves",t="red",n="#911D21",i=un(()=>({direction:ae.Right,width:600,height:25,fillStyle:`backgroundColor: ${n}`,progress:()=>Q.day.value===tn?a.div(pe.value,6).times(.8333333333333334).add(a.div(a.add(z.coal.value,1).log10(),a.log10(1e9)).clamp(0,1).div(6)):1,display:R(()=>Q.day.value===tn?a.lt(pe.value,6)?u(F,null,[J(pe.value),h("/6 elves")]):u(F,null,[J(z.coal.value),h("/"),J(1e9),h(" coal")]):"")})),l=to(()=>({thingsToReset:[Y,Ge,z],onReset(){setTimeout(()=>{vt.earned.value?(Y.row1Upgrades.forEach(j=>j.bought.value=!0),Y.row2Upgrades.forEach(j=>j.bought.value=!0)):at.earned.value&&(Y.row1Upgrades[4].bought.value=!0,Y.row2Upgrades[4].bought.value=!0),Le.earned.value&&(Ge.foundationProgress.value=100)})}})),o=re(()=>[D(()=>({multiplier:2,description:"6 Elves Trained",enabled:Se.earned})),D(()=>({multiplier:()=>a.times(ie.books.cuttersBook.amount.value,.1).add(1),description:"Now You're Logging!",enabled:()=>a.gt(ie.books.cuttersBook.amount.value,0)}))]),c=re(()=>[D(()=>({multiplier:2,description:"6 Elves Trained",enabled:Se.earned})),D(()=>({multiplier:()=>a.times(ie.books.plantersBook.amount.value,.1).add(1),description:"The Man Who Planted Trees",enabled:()=>a.gt(ie.books.plantersBook.amount.value,0)}))]),m=re(()=>[D(()=>({multiplier:2,description:"6 Elves Trained",enabled:Se.earned})),D(()=>({multiplier:()=>a.times(ie.books.expandersBook.amount.value,.1).add(1),description:"Logjam",enabled:()=>a.gt(ie.books.expandersBook.amount.value,0)}))]),d=re(()=>[D(()=>({multiplier:2,description:"6 Elves Trained",enabled:Se.earned})),D(()=>({multiplier:()=>a.times(ie.books.heatedCuttersBook.amount.value,.1).add(1),description:"Fahrenheit 451",enabled:()=>a.gt(ie.books.heatedCuttersBook.amount.value,0)}))]),v=re(()=>[D(()=>({multiplier:2,description:"6 Elves Trained",enabled:Se.earned})),D(()=>({multiplier:()=>a.times(ie.books.heatedPlantersBook.amount.value,.1).add(1),description:"Tillamook Burn Country",enabled:()=>a.gt(ie.books.heatedPlantersBook.amount.value,0)}))]),_=re(()=>[D(()=>({multiplier:2,description:"6 Elves Trained",enabled:Se.earned})),D(()=>({multiplier:()=>a.times(ie.books.fertilizerBook.amount.value,.1).add(1),description:"The Garden Tree's Handbook",enabled:()=>a.gt(ie.books.fertilizerBook.amount.value,0)}))]),b=re(()=>[D(()=>({multiplier:2,description:"6 Elves Trained",enabled:Se.earned})),D(()=>({multiplier:()=>a.times(ie.books.smallFireBook.amount.value,.1).add(1),description:"Firestarter",enabled:()=>a.gt(ie.books.smallFireBook.amount.value,0)}))]),g=re(()=>[D(()=>({multiplier:2,description:"6 Elves Trained",enabled:Se.earned})),D(()=>({multiplier:()=>a.times(ie.books.bonfireBook.amount.value,.1).add(1),description:"An Arsonist's Guide to Writer's Homes in New England",enabled:()=>a.gt(ie.books.bonfireBook.amount.value,0)}))]),w=re(()=>[D(()=>({multiplier:2,description:"6 Elves Trained",enabled:Se.earned})),D(()=>({multiplier:()=>a.times(ie.books.kilnBook.amount.value,.1).add(1),description:"Little Fires Everywhere",enabled:()=>a.gt(ie.books.kilnBook.amount.value,0)}))]),[S,I]=jn(()=>[{title:"Holly Auto-Buy Frequency",modifier:o,base:10,unit:"/s",visible:Ce.cuttersElf.bought},{title:"Ivy Auto-Buy Frequency",modifier:c,base:10,unit:"/s",visible:Ce.plantersElf.bought},{title:"Hope Auto-Buy Frequency",modifier:m,base:10,unit:"/s",visible:Ce.expandersElf.bought},{title:"Jack Auto-Buy Frequency",modifier:d,base:10,unit:"/s",visible:Ce.heatedCuttersElf.bought},{title:"Mary Auto-Buy Frequency",modifier:v,base:10,unit:"/s",visible:Ce.heatedPlantersElf.bought},{title:"Noel Auto-Buy Frequency",modifier:_,base:10,unit:"/s",visible:Ce.fertilizerElf.bought},{title:"Joy Auto-Buy Frequency",modifier:b,base:10,unit:"/s",visible:Ce.smallFireElf.bought},{title:"Faith Auto-Buy Frequency",modifier:g,base:10,unit:"/s",visible:Ce.bonfireElf.bought},{title:"Snowball Auto-Buy Frequency",modifier:w,base:10,unit:"/s",visible:Ce.kilnElf.bought}]),le=O(!1),A=R(()=>u(ct,{modelValue:le.value,"onUpdate:modelValue":j=>le.value=j},{header:()=>u("h2",null,[e,h(" Modifiers")]),body:S}));function C(j){const yt=N(()=>a.pow(4,pe.value).times(1e6)),ze=Be(0),Ut=j.hasToggle?Be(!1):O(!0),qt=N(()=>j.cooldownModifier.apply(10));function Zt(P){var At;const Mt=j.canBuy?r(Te(j.canBuy)):!0;if(ft.bought.value&&Mt){ze.value=a.add(ze.value,P);const bt=a.recip(qt.value);for(;a.gte(ze.value,bt);)if(j.customCost==null?r(j.buyable.canPurchase):a.gte(j.buyable.resource.value,j.customCost(j.buyable.amount.value)))j.buyable.amount.value=a.add(j.buyable.amount.value,1),ze.value=a.sub(ze.value,bt),(At=j.onAutoPurchase)==null||At.call(j);else{ze.value=bt;break}}}const ft=ue(()=>({...j,buyable:void 0,toggle:Ut,buyProgress:ze,update:Zt,resource:z.coal,cost:yt,computedAutoBuyCooldown:qt,display:()=>({title:j.name,description:R(()=>u(F,null,[j.description,ft.bought.value?null:u(F,null,[" ",h("Training this elf will require resetting all your progress from days 1-3.")]),ft.bought.value&&j.hasToggle===!0?u(F,null,[u(Bt,{title:j.toggleDesc,"onUpdate:modelValue":P=>Ut.value=P,modelValue:Ut.value},null)]):null])),showCost:!ft.bought.value}),style:"width: 190px",onPurchase(){var P;(P=j.onPurchase)==null||P.call(j),l.reset()}}));return ft}const x=C({name:"Holly",description:"Holly will automatically purchase cutters you can afford, without actually spending any logs.",buyable:Y.row1Buyables[0],cooldownModifier:o}),fe=C({name:"Ivy",description:"Ivy will automatically purchase planters you can afford, without actually spending any logs.",buyable:Y.row1Buyables[1],cooldownModifier:c}),De=C({name:"Hope",description:"Hope will automatically purchase forest expanders you can afford, without actually spending any logs.",buyable:Y.row1Buyables[2],cooldownModifier:m}),Ve=[x,fe,De],Ke=C({name:"Jack",description:"Jack will automatically purchase heated cutters you can afford, without actually spending any coal.",buyable:z.heatedCutters,cooldownModifier:d}),X=C({name:"Mary",description:"Mary will automatically purchase heated planters you can afford, without actually spending any coal.",buyable:z.heatedPlanters,cooldownModifier:v}),nt=C({name:"Noel",description:"Noel will automatically purchase fertilized soil you can afford, without actually spending any ash.",buyable:z.moreFertilizer,cooldownModifier:_}),Ot=[Ke,X,nt],We=C({name:"Joy",description:"Joy will automatically purchase small fires you can afford, without actually spending any logs. You can toggle whether or not to enable the purchased small fires automatically. Small fires will start giving a boost to ash and coal gain.",buyable:z.buildFire,cooldownModifier:b,visibility:()=>H(Ye.upgrades.logsUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased small fires",onAutoPurchase(){We.toggle.value&&(z.activeFires.value=a.add(z.activeFires.value,1))},onPurchase(){Q.days[4].recentlyUpdated.value=!0}}),Pe=C({name:"Faith",description:"Faith will automatically purchase bonfires you can afford. You can toggle whether or not to enable the purchased bonfires automatically. Bonfires will start giving a boost to ash and coal gain.",buyable:z.buildBonfire,cooldownModifier:g,visibility:()=>H(Ye.upgrades.ashUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased bonfires",onAutoPurchase(){Pe.toggle.value&&(z.activeBonfires.value=a.add(z.activeBonfires.value,1),z.buildFire.amount.value=a.sub(z.buildFire.amount.value,r(this.buyable.cost)),z.activeFires.value=a.sub(z.activeFires.value,r(this.buyable.cost)))},onPurchase(){Q.days[4].recentlyUpdated.value=!0},canBuy:z.unlockBonfire.bought}),st=C({name:"Snowball",description:"Snowball will automatically purchase kilns you can afford, without actually spending any logs. You can toggle whether or not to enable the purchased kilns automatically. Kilns will start giving a boost to ash and coal gain.",buyable:z.buildKiln,cooldownModifier:w,visibility:()=>H(Ye.upgrades.coalUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased kilns",onAutoPurchase(){st.toggle.value&&(z.activeKilns.value=a.add(z.activeKilns.value,1))},onPurchase(){Q.days[4].recentlyUpdated.value=!0},canBuy:z.unlockKiln.bought}),jt=[We,Pe,st],Ce={cuttersElf:x,plantersElf:fe,expandersElf:De,heatedCuttersElf:Ke,heatedPlantersElf:X,fertilizerElf:nt,smallFireElf:We,bonfireElf:Pe,kilnElf:st},pe=N(()=>Object.values(Ce).filter(j=>j.bought.value).length),Qe=Fe(()=>({display:{requirement:"1 Elf Trained",effectDisplay:"Manual cutting and planting can happen twice as often for each trained elf"},shouldEarn:()=>a.gte(pe.value,1)})),at=Fe(()=>({display:{requirement:"2 Elves Trained",effectDisplay:"Research I & II aren't reset after training"},shouldEarn:()=>a.gte(pe.value,2),visibility:()=>H(Qe.earned.value)})),Je=Fe(()=>({display:{requirement:"3 Elves Trained",effectDisplay:"Coal gain is raised to the 1.25"},shouldEarn:()=>a.gte(pe.value,3),visibility:()=>H(at.earned.value)})),Ne=Fe(()=>({display:{requirement:"4 Elves Trained",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte(pe.value,4),visibility:()=>H(Je.earned.value)})),Oe=Fe(()=>({display:{requirement:"5 Elves Trained",effectDisplay:"Forest is twice as large"},shouldEarn:()=>a.gte(pe.value,5),visibility:()=>H(Ne.earned.value)})),Se=Fe(()=>({display:{requirement:"6 Elves Trained",effectDisplay:"Elves work twice as fast"},shouldEarn:()=>a.gte(pe.value,6),visibility:()=>H(Oe.earned.value)})),Le=Fe(()=>({display:{requirement:"7 Elves Trained",effectDisplay:"Workshop Foundation starts at 100% complete after training"},shouldEarn:()=>a.gte(pe.value,7),visibility:()=>H(Se.earned.value&&Q.day.value>5)})),Me=Fe(()=>({display:{requirement:"8 Elves Trained",effectDisplay:"Forest is twice as large (again)"},shouldEarn:()=>a.gte(pe.value,8),visibility:()=>H(Le.earned.value)})),vt=Fe(()=>({display:{requirement:"9 Elves Trained",effectDisplay:"Trees upgrades aren't reset after training"},shouldEarn:()=>a.gte(pe.value,9),visibility:()=>H(Me.earned.value)})),dt=[Qe,at,Je,Ne,Oe,Se,Le,Me,vt],Nt={manualMilestone:Qe,researchMilestone:at,coalGainMilestone:Je,logGainMilestone:Ne,forestMilestone:Oe,elvesMilestone:Se,foundationMilestone:Le,forestMilestone2:Me,treeUpgradesMilestone:vt},{collapseMilestones:St,display:mt}=Vs(Nt);return ke.on("update",j=>{a.lt(Q.day.value,tn)||Object.values(Ce).forEach(yt=>yt.update(j))}),Ze(()=>{Q.day.value===tn&&a.gte(pe.value,6)&&a.gte(z.coal.value,1e9)&&Q.completeDay()}),{name:e,color:t,elves:Ce,totalElves:pe,milestones:dt,collapseMilestones:St,generalTabCollapsed:I,minWidth:700,display:R(()=>u(F,null,[u("div",null,[Q.day.value===tn?`Reach ${J(6)} trained elves and ${J(1e9)} ${z.coal.displayName} to complete the day`:`${e} Complete!`," ",h("-")," ",u("button",{class:"button",style:"display: inline-block;",onClick:()=>le.value=!0},[h("Check Modifiers")])]),ce(i),ce(A),u(ge,null,null),u("div",{style:"width: 600px"},[Ue(...Ve),Ue(...Ot),Ue(...jt)]),mt()]))}}),ao="coal",ds=3,z=Dt(ao,function(){const e="Coal",t="#151716",n="#B2BeB5",s="var(--foreground)",i=ht(0,"coal"),l=ht(0,"ash"),o=Be(0),c=N(()=>a.times(o.value,1e3)),m=N(()=>a.times(o.value,.1)),d=N(()=>a.times(o.value,50)),v=Xe(()=>({resource:Y.logs,cost(){let E=a.times(x.amount.value,r(x.cost)).plus(this.amount.value);return a.gte(E,100)&&(E=a.pow(E,2).div(100)),a.gte(E,1e4)&&(E=a.pow(E,2).div(1e4)),E=a.pow(.95,ie.books.smallFireBook.amount.value).times(E),E.pow(1.5).times(1e4)},display:R(()=>u(F,null,[u("h3",null,[h("Small Fire")]),u("br",null,null),h("Burn 1000 logs for 0.1 coal and 50 ash"),u("br",null,null),u("br",null,null),h("Currently:"),u("br",null,null),h("-"),te(c.value),h(" logs/sec"),u("br",null,null),h("+"),te(m.value),h(" coal/sec"),u("br",null,null),h("+"),te(d.value),h(" ash/sec"),u("br",null,null),u("br",null,null),h("Cost: "),J(r(v.cost)),h(" "),v.resource.displayName])),onPurchase(){o.value=a.add(o.value,1)},style:{color:s,width:"160px"}})),_=xe(()=>({display:"0",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.gt(o.value,0)},onClick(){o.value=0}})),b=xe(()=>({display:"-",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.gt(o.value,0)},onClick(){o.value=a.sub(o.value,1)}})),g=xe(()=>({display:"+",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.lt(o.value,v.amount.value)},onClick(){o.value=a.add(o.value,1)}})),w=xe(()=>({display:"Max",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.lt(o.value,v.amount.value)},onClick(){o.value=v.amount.value}})),S=ht(v.amount,"small fires"),I=Be(0),le=N(()=>a.times(I.value,1e4)),A=N(()=>a.times(I.value,10)),C=N(()=>a.times(I.value,1e3)),x=Xe(()=>({resource:S,cost(){return a.pow(.95,ie.books.bonfireBook.amount.value).times(10)},display:R(()=>u(F,null,[u("h3",null,[h("Bonfire")]),u("br",null,null),h("Burn 10,000 logs for 10 coal and 1000 ash"),u("br",null,null),u("br",null,null),h("Currently:"),u("br",null,null),h("-"),te(le.value),h(" logs/sec"),u("br",null,null),h("+"),te(A.value),h(" coal/sec"),u("br",null,null),h("+"),te(C.value),h(" ash/sec"),u("br",null,null),u("br",null,null),h("Cost: "),J(r(x.cost)),h(" "),x.resource.displayName])),onPurchase(E){o.value=a.sub(o.value,E).max(0),I.value=a.add(I.value,1)},style:{color:s,width:"160px"}})),fe=xe(()=>({display:"0",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.gt(I.value,0)},onClick(){I.value=0}})),De=xe(()=>({display:"-",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.gt(I.value,0)},onClick(){I.value=a.sub(I.value,1)}})),Ve=xe(()=>({display:"+",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.lt(I.value,x.amount.value)},onClick(){I.value=a.add(I.value,1)}})),Ke=xe(()=>({display:"Max",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.lt(I.value,x.amount.value)},onClick(){I.value=x.amount.value}})),X=Be(0),nt=N(()=>a.times(X.value,1e6)),Ot=N(()=>a.times(X.value,1e4)),We=N(()=>a.times(X.value,1e4)),Pe=Xe(()=>({resource:Y.logs,cost(){let E=this.amount.value;return a.gte(E,100)&&(E=a.pow(E,2).div(100)),a.gte(E,1e4)&&(E=a.pow(E,2).div(1e4)),E=a.pow(.95,ie.books.kilnBook.amount.value).times(E),a.pow(1.1,E).times(1e7)},display:R(()=>u(F,null,[u("h3",null,[h("Charcoal Kiln")]),u("br",null,null),h("Burn 1,000,000 logs for 10,000 coal and 10,000 ash"),u("br",null,null),u("br",null,null),h("Currently:"),u("br",null,null),h("-"),te(nt.value),h(" logs/sec"),u("br",null,null),h("+"),te(Ot.value),h(" coal/sec"),u("br",null,null),h("+"),te(We.value),h(" ash/sec"),u("br",null,null),u("br",null,null),h("Cost: "),J(r(Pe.cost)),h(" "),Pe.resource.displayName])),onPurchase(){X.value=a.add(X.value,1)},style:{color:s,width:"160px"}})),st=xe(()=>({display:"0",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.gt(X.value,0)},onClick(){X.value=0}})),jt=xe(()=>({display:"-",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.gt(X.value,0)},onClick(){X.value=a.sub(X.value,1)}})),Ce=xe(()=>({display:"+",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.lt(X.value,Pe.amount.value)},onClick(){X.value=a.add(X.value,1)}})),pe=xe(()=>({display:"Max",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.lt(X.value,Pe.amount.value)},onClick(){X.value=Pe.amount.value}})),Qe=ue(()=>({resource:Z(i),cost:5,display:{title:"Warmer Cutters",description:"Cut down twice as many trees/s"},style:{color:s}})),at=ue(()=>({resource:Z(i),cost:5,display:{title:"Warmer Planters",description:"Plant twice as many trees/s"},style:{color:s}})),Je=ue(()=>({resource:Z(l),cost:5e3,display:{title:"Ashy Soil",description:"Trees give 25% more logs"},style:{color:s}})),Ne=ue(()=>({resource:S,cost:10,display:{title:"Bigger Fires",description:"Put all those fires together into a larger blaze"},onPurchase(){S.value=a.add(S.value,this.cost)},style:{color:s}})),Oe=[Qe,at,Je,Ne],Se=ue(()=>({resource:Z(i),cost:250,display:{title:"Dedicated Cutter Heaters",description:"Double the bonus from Heated Cutters"},style:{color:s},visibility:()=>H(Ne.bought.value)})),Le=ue(()=>({resource:Z(i),cost:250,display:{title:"Dedicated Planter Heaters",description:"Double the bonus from Heated Planters"},style:{color:s},visibility:()=>H(Ne.bought.value)})),Me=ue(()=>({canAfford(){return a.gte(Y.logs.value,1e5)&&a.gte(l.value,1e5)},onPurchase(){Y.logs.value=a.sub(Y.logs.value,1e5),l.value=a.sub(l.value,1e5)},display:R(()=>u(F,null,[u("h3",null,[h("Mulched Soil")]),u("br",null,null),h("Double the bonus from Fertilized Soil"),u("br",null,null),u("br",null,null),h("Cost: "),J(1e5),h(" "),Y.logs.displayName,u("br",null,null),J(1e5),h(" "),l.displayName])),style:{color:s},visibility:()=>H(Ne.bought.value)})),vt=ue(()=>({resource:Y.logs,cost:1e7,display:{title:"Efficient Fires",description:"Move the fires underground to keep the coal from turning to ash"},style:{color:s},visibility:()=>H(Ne.bought.value)})),dt=[Se,Le,Me,vt],Nt=Xe(()=>({resource:Z(i),cost(){let E=this.amount.value;return a.gte(E,50)&&(E=a.pow(E,2).div(50)),a.gte(E,200)&&(E=a.pow(E,2).div(200)),a.gte(E,2e6)&&(E=a.pow(E,2).div(2e6)),E=a.pow(.95,ie.books.heatedCuttersBook.amount.value).times(E),a.add(E,1).pow(2.5).times(10)},display:{title:"Heated Cutters",description:"Even warmer cutters cut down trees faster",effectDisplay:R(()=>u(F,null,[h("Cutters cut down trees "),te(ze.value),h("x faster")]))},style:{color:s},visibility:()=>H(Qe.bought.value)})),St=Xe(()=>({resource:Z(i),cost(){let E=this.amount.value;return a.gte(E,50)&&(E=a.pow(E,2).div(50)),a.gte(E,200)&&(E=a.pow(E,2).div(200)),a.gte(E,2e6)&&(E=a.pow(E,2).div(2e6)),E=a.pow(.95,ie.books.heatedPlantersBook.amount.value).times(E),a.add(E,1).pow(2.5).times(10)},display:{title:"Heated Planters",description:"Even warmer planters plant trees faster",effectDisplay:R(()=>u(F,null,[h("Planters plant trees "),te(qt.value),h("x faster")]))},style:{color:s},visibility:()=>H(at.bought.value)})),mt=Xe(()=>({resource:Z(l),cost(){let E=this.amount.value;return a.gte(E,50)&&(E=a.pow(E,2).div(50)),a.gte(E,200)&&(E=a.pow(E,2).div(200)),a.gte(E,2e6)&&(E=a.pow(E,2).div(2e6)),E=a.pow(.95,ie.books.fertilizerBook.amount.value).times(E),a.add(E,1).pow(1.5).times(5e4)},display:{title:"Fertilized Soil",description:"More fertilizer helps trees grow bigger",effectDisplay:R(()=>u(F,null,[h("Trees give "),te(ft.value),h("x more logs")]))},style:{color:s},visibility:()=>H(Je.bought.value)})),j=[Nt,St,mt],yt=re(()=>[oe(()=>({addend(){return a.times(Nt.amount.value,.25)},description:"Heated Cutters",enabled(){return a.gt(Nt.amount.value,0)}})),D(()=>({multiplier:2,description:"Dedicated Cutter Heaters",enabled:Se.bought}))]),ze=N(()=>yt.apply(1)),Ut=re(()=>[oe(()=>({addend(){return a.times(St.amount.value,.25)},description:"Heated Planters",enabled(){return a.gt(St.amount.value,0)}})),D(()=>({multiplier:2,description:"Dedicated Planter Heaters",enabled:Le.bought}))]),qt=N(()=>Ut.apply(1)),Zt=re(()=>[oe(()=>({addend(){return a.times(mt.amount.value,.25)},description:"Fertilized Soil",enabled(){return a.gt(mt.amount.value,0)}})),D(()=>({multiplier:2,description:"Mulched Soil",enabled:Me.bought}))]),ft=N(()=>Zt.apply(1)),P=re(()=>[oe(()=>({addend(){return m.value},description:"Small Fires",enabled(){return a.gt(o.value,0)}})),oe(()=>({addend(){return A.value},description:"Bonfires",enabled(){return a.gt(I.value,0)}})),oe(()=>({addend(){return Ot.value},description:"Charcoal Kilns",enabled(){return a.gt(X.value,0)}})),D(()=>({multiplier:2,description:"Carry coal in boxes",enabled:Ye.upgrades.coalUpgrade.bought})),D(()=>({multiplier:()=>a.div(Ye.buyables.coalBoxesBuyable.amount.value,2).add(1),description:"Carry more coal",enabled:Ye.upgrades.coalUpgrade.bought})),D(()=>({multiplier:()=>a.div(v.amount.value,1e4).add(1),description:"Small Fires Synergy",enabled:be.elves.smallFireElf.bought})),D(()=>({multiplier:()=>a.div(x.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:be.elves.bonfireElf.bought})),D(()=>({multiplier:()=>a.div(Pe.amount.value,100).add(1),description:"Kiln Synergy",enabled:be.elves.kilnElf.bought})),Ls(()=>({exponent:1.25,description:"3 Elves Trained",enabled:be.milestones[2].earned,supportLowNumbers:!0}))]),Mt=N(()=>P.apply(0)),At=re(()=>[oe(()=>({addend(){return d.value},description:"Small Fires",enabled(){return a.gt(o.value,0)}})),oe(()=>({addend(){return C.value},description:"Bonfires",enabled(){return a.gt(I.value,0)}})),oe(()=>({addend(){return We.value},description:"Charcoal Kilns",enabled(){return a.gt(X.value,0)}})),D(()=>({multiplier:2,description:"Carry ash in boxes",enabled:Ye.upgrades.ashUpgrade.bought})),D(()=>({multiplier:()=>a.div(Ye.buyables.ashBoxesBuyable.amount.value,2).add(1),description:"Carry more ash",enabled:Ye.upgrades.ashUpgrade.bought})),D(()=>({multiplier:()=>a.div(v.amount.value,1e4).add(1),description:"Small Fires Synergy",enabled:be.elves.smallFireElf.bought})),D(()=>({multiplier:()=>a.div(x.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:be.elves.bonfireElf.bought})),D(()=>({multiplier:()=>a.div(Pe.amount.value,100).add(1),description:"Kiln Synergy",enabled:be.elves.kilnElf.bought}))]),bt=N(()=>At.apply(0)),hn=re(()=>[oe(()=>({addend(){return a.negate(c.value)},description:"Small Fires",enabled(){return a.gt(o.value,0)}})),oe(()=>({addend(){return a.negate(le.value)},description:"Bonfires",enabled(){return a.gt(I.value,0)}})),oe(()=>({addend(){return a.negate(nt.value)},description:"Charcoal Kilns",enabled(){return a.gt(X.value,0)}}))]),es=N(()=>hn.apply(0)),[ni,si]=jn(()=>[{title:"Log Consumption",modifier:hn,base:0,visible(){return a.gt(o.value,0)||a.gt(I.value,0)||a.gt(X.value,0)}},{title:"Coal Gain",modifier:P,base:0,visible(){return a.gt(o.value,0)||a.gt(I.value,0)||a.gt(X.value,0)}},{title:"Ash Gain",modifier:At,base:0,visible(){return a.gt(o.value,0)||a.gt(I.value,0)||a.gt(X.value,0)}}]),Tn=O(!1),ii=R(()=>u(ct,{modelValue:Tn.value,"onUpdate:modelValue":E=>Tn.value=E},{header:()=>u("h2",null,[e,h(" Modifiers")]),body:ni}));ke.on("update",E=>{a.lt(Q.day.value,ds)||a.times(E,es.value).negate().gt(Y.logs.value)||(Y.logs.value=a.times(E,es.value).plus(Y.logs.value),i.value=a.times(E,Mt.value).plus(i.value),l.value=a.times(E,bt.value).plus(l.value))});const{total:ai,trackerDisplay:li}=Pn({resource:i,goal:1e7,name:e,day:ds,color:t,modal:{show:Tn,display:ii}});return{name:e,color:t,coal:i,totalCoal:ai,ash:l,activeFires:o,buildFire:v,activeBonfires:I,buildBonfire:x,activeKilns:X,buildKiln:Pe,warmerCutters:Qe,warmerPlanters:at,basicFertilizer:Je,unlockBonfire:Ne,dedicatedCutters:Se,dedicatedPlanters:Le,betterFertilizer:Me,unlockKiln:vt,heatedCutters:Nt,heatedPlanters:St,moreFertilizer:mt,computedHeatedCutterEffect:ze,computedHeatedPlanterEffect:qt,computedFertilizerEffect:ft,generalTabCollapsed:si,minWidth:700,display:R(()=>u(F,null,[ce(li),u(ge,null,null),u(Ht,{resource:i,color:t,style:"margin-bottom: 0",effectDisplay:a.gt(Mt.value,0)?`+${te(Mt.value)}/s`:void 0},null),u(ge,null,null),u(Ht,{resource:l,color:n,style:"margin-bottom: 0",effectDisplay:a.gt(bt.value,0)?`+${te(bt.value)}/s`:void 0},null),u(ge,null,null),u(Ds,null,{default:()=>[u(Xt,null,{default:()=>[ce(v),u("div",null,[J(a.floor(o.value)),h("/"),J(a.floor(v.amount.value))]),Ue(_,b,g,w)]}),Ne.bought.value?u(F,null,[u(ge,null,null),u(Xt,null,{default:()=>[ce(x),u("div",null,[J(I.value),h("/"),J(x.amount.value)]),Ue(fe,De,Ve,Ke)]})]):void 0,vt.bought.value?u(F,null,[u(ge,null,null),u(Xt,null,{default:()=>[ce(Pe),u("div",null,[J(X.value),h("/"),J(Pe.amount.value)]),Ue(st,jt,Ce,pe)]})]):void 0]}),u(ge,null,null),Ue(...Oe),Ue(...dt),Ue(...j)]))}}),lo="trees",ms=1,fs=.1,Y=Dt(lo,function(){const e="Trees",t="#4BDC13",n="green",s=ht(0,"logs"),i=ht(0,"saplings"),l=O(0),o=re(()=>[oe(()=>({addend:()=>a.times(Ve.amount.value,10),description:"Expand Forest",enabled:C.bought})),oe(()=>({addend:()=>a.div(Ge.foundationProgress.value,2),description:"75% Foundation Completed",enabled:Ge.milestones.morePlantsMilestone1.earned})),D(()=>({multiplier:2,description:"5 Elves Trained",enabled:be.milestones[4].earned})),D(()=>({multiplier:2,description:"8 Elves Trained",enabled:be.milestones[7].earned}))]),c=ht(N(()=>a.sub(o.apply(10),i.value)),"trees"),m=N(()=>o.apply(10)),d=ue(()=>({resource:Z(s),cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),v=ue(()=>({resource:Z(s),cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),_=ue(()=>({resource:Z(s),cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),b=ue(()=>({resource:Z(s),cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),g=ue(()=>({resource:Z(s),cost:40,display:{title:"Research I",description:"Trees give 25% more logs, and unlock more upgrades"}})),w=[d,v,_,b,g],S=ue(()=>({resource:Z(s),cost:50,visibility:()=>H(g.bought.value),display:{title:"Sharper Fingers",description:"Manually cut trees twice as often"}})),I=ue(()=>({resource:Z(s),cost:50,visibility:()=>H(g.bought.value),display:{title:"Greener Fingers",description:"Manually Plant trees twice as often"}})),le=ue(()=>({resource:Z(s),cost:150,visibility:()=>H(g.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),A=ue(()=>({resource:Z(s),cost:150,visibility:()=>H(g.bought.value),display:{title:"Smart Spades",description:"Each time you manually plant trees, gain 1s of automatic tree planting production"}})),C=ue(()=>({resource:Z(s),cost:300,visibility:()=>H(g.bought.value),display:{title:"Research II",description:"Trees give 25% more logs, and unlock repeatable purchases"}})),x=[S,I,le,A,C],fe=Xe(()=>({resource:Z(s),cost(){let P=this.amount.value;return a.gte(P,50)&&(P=a.pow(P,2).div(50)),a.gte(P,200)&&(P=a.pow(P,2).div(200)),a.gte(P,2e6)&&(P=a.pow(P,2).div(2e6)),P=a.pow(.95,ie.books.cuttersBook.amount.value).times(P),a.times(100,P).add(200)},display:{title:"Generic Cutters",description:"Each cutter cuts down 1 tree/s"},visibility:()=>H(C.bought.value)})),De=Xe(()=>({resource:Z(s),cost(){let P=this.amount.value;return a.gte(P,50)&&(P=a.pow(P,2).div(50)),a.gte(P,200)&&(P=a.pow(P,2).div(200)),a.gte(P,2e6)&&(P=a.pow(P,2).div(2e6)),P=a.pow(.95,ie.books.plantersBook.amount.value).times(P),a.times(100,P).add(200)},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>H(C.bought.value)})),Ve=Xe(()=>({resource:Z(s),cost(){let P=this.amount.value;return a.gte(P,100)&&(P=a.pow(P,2).div(100)),a.gte(P,1e5)&&(P=a.pow(P,2).div(1e5)),P=a.pow(.95,ie.books.expandersBook.amount.value).times(P),a.pow(a.add(P,1),1.5).times(500)},display:{title:"Expand Forest",description:"Add 10 trees to the forest"},visibility:()=>H(C.bought.value)})),Ke=[fe,De,Ve],X=re(()=>[oe(()=>({addend:1,description:"Wooden Fingers",enabled:d.bought})),oe(()=>({addend:st,description:"Smart Knives",enabled:le.bought}))]),nt=N(()=>X.apply(1)),Ot=re(()=>[D(()=>({multiplier:.5,description:"Sharper Fingers",enabled:S.bought})),D(()=>({multiplier:()=>a.pow(.5,be.totalElves.value),description:"1 Elf Trained",enabled:be.milestones[0].earned}))]),We=N(()=>Ot.apply(1)),Pe=re(()=>[oe(()=>({addend:1,description:"Automated Knives",enabled:_.bought})),oe(()=>({addend:fe.amount,description:"Generic Cutters",enabled:C.bought})),oe(()=>({addend:()=>a.div(Ge.foundationProgress.value,5).floor(),description:"10% Foundation Completed",enabled:Ge.milestones.autoCutMilestone1.earned})),D(()=>({multiplier:2,description:"30% Foundation Completed",enabled:Ge.milestones.autoCutMilestone2.earned})),D(()=>({multiplier:2,description:"Warmer Cutters",enabled:z.warmerCutters.bought})),D(()=>({multiplier:z.computedHeatedCutterEffect,description:"Heated Cutters",enabled:()=>a.gt(z.heatedCutters.amount.value,0)}))]),st=N(()=>Pe.apply(0)),jt=re(()=>[oe(()=>({addend:1,description:"Leafy Fingers",enabled:v.bought})),oe(()=>({addend:Je,description:"Smart Spades",enabled:A.bought}))]),Ce=N(()=>jt.apply(1)),pe=re(()=>[D(()=>({multiplier:.5,description:"Greener Fingers",enabled:I.bought})),D(()=>({multiplier:()=>a.pow(.5,be.totalElves.value),description:"1 Elf Trained",enabled:be.milestones[0].earned}))]),Qe=N(()=>pe.apply(1)),at=re(()=>[oe(()=>({addend:1,description:"Automated Spade",enabled:b.bought})),oe(()=>({addend:()=>a.div(De.amount.value,2),description:"Generic Planters",enabled:C.bought})),oe(()=>({addend:()=>a.div(Ge.foundationProgress.value,10).floor(),description:"20% Foundation Completed",enabled:Ge.milestones.autoPlantMilestone1.earned})),D(()=>({multiplier:2,description:"40% Foundation Completed",enabled:Ge.milestones.autoPlantMilestone2.earned})),D(()=>({multiplier:2,description:"Warmer Planters",enabled:z.warmerPlanters.bought})),D(()=>({multiplier:z.computedHeatedPlanterEffect,description:"Heated Planters",enabled:()=>a.gt(z.heatedPlanters.amount.value,0)}))]),Je=N(()=>at.apply(0)),Ne=re(()=>[D(()=>({multiplier:1.25,description:"Research I",enabled:g.bought})),D(()=>({multiplier:1.25,description:"Research II",enabled:C.bought})),D(()=>({multiplier:()=>a.div(Ge.foundationProgress.value,20).add(1),description:"1% Foundation Completed",enabled:Ge.milestones.logGainMilestone1.earned})),D(()=>({multiplier:2,description:"50% Foundation Completed",enabled:Ge.milestones.logGainMilestone2.earned})),D(()=>({multiplier:1.25,description:"Ashy Soil",enabled:z.basicFertilizer.bought})),D(()=>({multiplier:z.computedFertilizerEffect,description:"Fertilized Soil",enabled:()=>a.gt(z.moreFertilizer.amount.value,0)})),D(()=>({multiplier:2,description:"4 Elves Trained",enabled:be.milestones[3].earned})),D(()=>({multiplier:2,description:"Carry logs in boxes",enabled:Ye.upgrades.logsUpgrade.bought})),D(()=>({multiplier:()=>a.div(Ye.buyables.logBoxesBuyable.amount.value,2).add(1),description:"Carry more logs",enabled:Ye.upgrades.logsUpgrade.bought})),Ls(()=>({exponent:1.2,description:"100% Foundation Completed",enabled:Ge.milestones.logGainMilestone3.earned}))]),Oe=Be(0),Se=un(()=>({direction:ae.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(Oe.value,We.value)})),Le=xe(()=>({display:{title:"Cut trees",description:R(()=>u(F,null,[h("Cut down up to "),J(a.floor(nt.value))," ",h("tree"),a.eq(nt.value,1)?"":"s",h(" at once!"),u("br",null,null),ce(Se)]))},style:{minHeight:"80px"},canClick:()=>a.gte(c.value,1)&&a.gte(Oe.value,We.value),onClick(){if(a.lt(Oe.value,We.value))return;const P=a.floor(a.min(c.value,a.times(nt.value,a.div(Oe.value,We.value).floor())));s.value=a.add(s.value,Ne.apply(P)),i.value=a.add(i.value,P),Oe.value=0}})),Me=Be(0),vt=un(()=>({direction:ae.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(Me.value,Qe.value)})),dt=xe(()=>({display:{title:"Plant trees",description:R(()=>u(F,null,[h("Plant up to "),J(a.floor(Ce.value))," ",h("tree"),a.eq(Ce.value,1)?"":"s",h(" at once!"),u("br",null,null),ce(vt)]))},style:{minHeight:"80px"},canClick:()=>a.gte(i.value,1)&&a.gte(Me.value,Qe.value),onClick(){if(a.lt(Me.value,Qe.value))return;const P=a.floor(a.min(i.value,a.times(Ce.value,a.div(Me.value,Qe.value).floor())));i.value=a.sub(i.value,P),Me.value=0}})),[Nt,St]=jn(()=>[{title:"Logs per Tree",modifier:Ne,base:1,visible:g.bought},{title:"Manual Cutting Amount",modifier:X,base:1,visible:d.bought,unit:"/click"},{title:"Manual Cutting Cooldown",modifier:Ot,base:1,visible:d.bought,unit:"s"},{title:"Manual Planting Amount",modifier:jt,base:1,visible:v.bought,unit:"/click"},{title:"Manual Planting Cooldown",modifier:pe,base:1,visible:v.bought,unit:"s"},{title:"Auto Cutting Amount",modifier:Pe,base:0,visible:_.bought,unit:"/s"},{title:"Auto Planting Amount",modifier:at,base:0,visible:b.bought,unit:"/s"},{title:"Forest Size",modifier:o,base:10,visible:C.bought}]),mt=O(!1),j=R(()=>u(ct,{modelValue:mt.value,"onUpdate:modelValue":P=>mt.value=P},{header:()=>u("h2",null,[e,h(" Modifiers")]),body:Nt}));ke.on("update",P=>{if(a.lt(Q.day.value,ms))return;a.gte(Oe.value,We.value)?Oe.value=We.value:(Oe.value=a.add(Oe.value,P),Le.isHolding.value&&Le.onClick()),a.gte(Me.value,Qe.value)?Me.value=Qe.value:(Me.value=a.add(Me.value,P),dt.isHolding.value&&dt.onClick());const Mt=a.min(c.value,a.times(st.value,P)),At=a.mul(Ne.apply(1),Mt),bt=a.div(At,P);l.value=a.mul(bt,fs).add(a.mul(l.value,a.dOne.sub(fs))),s.value=a.add(s.value,At),i.value=a.add(i.value,Mt);const hn=a.min(i.value,a.times(Je.value,P));i.value=a.sub(i.value,hn)});const yt=N(()=>a.sub(st.value,Je.value)),ze=N(()=>a.sub(Je.value,st.value)),Ut=On(()=>({key:"c",description:'Press the "Cut trees" button.',onPress:()=>{Le.canClick.value&&Le.onClick()}})),qt=On(()=>({key:"p",description:'Press the "Plant trees" button.',onPress:()=>{dt.canClick.value&&dt.onClick()}})),{total:Zt,trackerDisplay:ft}=Pn({resource:s,goal:1e4,name:e,day:ms,color:n,modal:{show:mt,display:j}});return{name:e,color:t,logs:s,totalLogs:Zt,trees:c,saplings:i,cutTree:Le,plantTree:dt,cutTreeHK:Ut,plantTreeHK:qt,row1Upgrades:w,row2Upgrades:x,row1Buyables:Ke,manualCutProgress:Oe,manualPlantProgress:Me,generalTabCollapsed:St,minWidth:700,display:R(()=>u(F,null,[ce(ft),u(ge,null,null),u(Ht,{resource:s,color:t,style:"margin-bottom: 0",productionDisplay:a.gt(st.value,0)?`+${te(l.value)}/s average
equilibrium: +${Ns([[a.mul(Ne.apply(1),st.value),"cutting speed"],[a.mul(Ne.apply(1),Je.value),"planting speed"],[a.mul(Ne.apply(1),a.mul(m.value,20)),"forest cap"]],"/s")}`:void 0},null),u(Ht,{resource:i,color:n,style:"margin-bottom: 0",productionDisplay:{[-1]:`${J(yt.value)}/s`,0:void 0,1:`+${J(yt.value)}/s`}[a.compare(yt.value,0)]},null),u(Ht,{resource:c,color:n,style:"margin-bottom: 0",productionDisplay:{[-1]:`${J(ze.value)}/s`,0:void 0,1:`+${J(ze.value)}/s`}[a.compare(ze.value,0)]},null),u(ge,null,null),Ue(Le,dt),u("div",null,[h("Tip: You can hold down on actions to perform them automatically")]),u(ge,null,null),Ue(...w),Ue(...x),Ue(...Ke)]))}});var Qs="./assets/tree.35808197.png",zs="./assets/sws.714ad454.png",js="data:image/png;base64,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",Ks="./assets/elf.9fbfa563.png",Ws="./assets/paperStacks.4c96ec8c.png",Js="data:image/png;base64,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";const Q=Dt("main",function(){const e=Be(1),t=N(()=>(+new Date(new Date().getFullYear(),11,e.value)-U.time)/1e3),n=O(!1),s=O(-1),i=O(""),l=O();function o(d){const v=Be(!1),_=Be(!1);return je(()=>{const b=d(),g=Te(b.shouldNotify),w=Te(()=>r(g)||r(_));return{...b,opened:v,shouldNotify:w,recentlyUpdated:_,[Rt]:rl,[$t]:function(){const{day:S,layer:I,symbol:le,opened:A,shouldNotify:C,story:x,completedStory:fe,recentlyUpdated:De}=this;return{day:S,symbol:le,opened:A,recentlyUpdated:De,shouldNotify:C,onOpenLore(){var X,nt;const Ve=Q.day.value>S;s.value=Ve?S-1:-1;const Ke=r((nt=(X=qe[I!=null?I:"trees"])==null?void 0:X.name)!=null?nt:"");i.value=Ve?`${Ke} - Completed!`:Ke,l.value=Ve?`${x}
${fe}`:x,n.value=!0},onOpenLayer(){if(De.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(U.tabs.includes(I!=null?I:"trees")){const Ve=U.tabs.lastIndexOf(I!=null?I:"trees");U.tabs.splice(Ve,1)}else U.tabs.push(I!=null?I:"trees"),Q.minimized.value=!0;else U.tabs.splice(1,1/0,I!=null?I:"trees")},onUnlockLayer(){A.value=!0,setTimeout(()=>{var Ve,Ke;s.value=-1,i.value=r((Ke=(Ve=qe[I!=null?I:"trees"])==null?void 0:Ve.name)!=null?Ke:""),l.value=x,U.devSpeed=null,n.value=!0},1e3)}}}}})}const c=[o(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Qs,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!"})),o(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:zs,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!"})),o(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:js,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!"})),o(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:Ks,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!"})),o(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:Ws,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!"})),o(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:Js,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!"})),o(()=>({day:7,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),o(()=>({day:8,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),o(()=>({day:9,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),o(()=>({day:10,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),o(()=>({day:11,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),o(()=>({day:12,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),o(()=>({day:13,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),o(()=>({day:14,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),o(()=>({day:15,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),o(()=>({day:16,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),o(()=>({day:17,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),o(()=>({day:18,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),o(()=>({day:19,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),o(()=>({day:20,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),o(()=>({day:21,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),o(()=>({day:22,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),o(()=>({day:23,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),o(()=>({day:24,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""}))];function m(){s.value=e.value-1,i.value="Day Complete!",l.value=c[e.value-1].completedStory,n.value=!0,e.value++,Q.minimized.value=!1,U.devSpeed=0}return{name:"Calendar",days:c,day:e,timeUntilNewDay:t,loreScene:s,loreTitle:i,loreBody:l,showLoreModal:n,completeDay:m,minWidth:700,display:R(()=>u(F,null,[U.devSpeed===0?u("div",null,[h("Game Paused")]):null,U.devSpeed&&U.devSpeed!==1?u("div",null,[h("Dev Speed: "),te(U.devSpeed),h("x")]):null,U.offlineTime?u("div",null,[h("Offline Time: "),In(U.offlineTime)]):null,u(ge,null,null),u("div",{class:"advent"},[c.reduce((d,v)=>(d[d.length-1].length===4&&d.push([]),d[d.length-1].push(v),d),[[]]).map(d=>Ue(...d))])]))}}),oo=e=>[Q,Y,Ge,z,be,ie,Ye],Xn=N(()=>!1);function ro(e,t){t.offlineProd=!1}var uo=Object.freeze(Object.defineProperty({__proto__:null,main:Q,getInitialLayers:oo,hasWon:Xn,fixOldSave:ro},Symbol.toStringTag,{value:"Module"}));const co={class:"scene"},mo=["src"],fo=["src"],po=["src"],ho=["src"],go={key:4,class:"scene-bubble",style:{left:"50%",bottom:"38%"}},vo=["src"],yo=["src"],bo=L({__name:"Scene",props:{day:null},setup(e){return(t,n)=>(y(),M("div",co,[e.day>=0?(y(),M("img",{key:0,src:r(Qs),class:"scene-item",style:{left:"10%",bottom:"10%"}},null,8,mo)):B("",!0),e.day>=1?(y(),M("img",{key:1,src:r(zs),class:"scene-item",style:{left:"40%",bottom:"12%"}},null,8,fo)):B("",!0),e.day>=2?(y(),M("img",{key:2,src:r(js),class:"scene-item",style:{left:"65%",bottom:"12%",width:"40px",height:"40px"}},null,8,po)):B("",!0),e.day>=3?(y(),M("img",{key:3,src:r(Ks),class:"scene-item",style:{left:"52%",bottom:"12%"}},null,8,ho)):B("",!0),e.day>=4?(y(),M("div",go,[e.day>=4?(y(),M("img",{key:0,src:r(Ws),class:"scene-item"},null,8,vo)):B("",!0),e.day>=5?(y(),M("img",{key:1,src:r(Js),class:"scene-item"},null,8,yo)):B("",!0)])):B("",!0)]))}});var _o=se(bo,[["__scopeId","data-v-36663c1c"]]);const wo=L({components:{Context:As},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:$(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:$(Number,String),required:!0},name:{type:$(String),required:!0},color:$(String),minimizable:$(Boolean),nodes:{type:Object,required:!0}},setup(e){const{display:t,index:n,minimized:s,minWidth:i,tab:l}=$e(e),o=Cn(t),c=N(()=>ne.allowGoBack&&n.value>0&&!s.value);function m(){U.tabs.splice(r(e.index),1)}Qt(()=>v(s.value,r(i.value))),gt([s,Ha(i)],([_,b])=>v(_,b));function d(_){e.nodes.value=_}function v(_,b){const g=typeof b=="number"||Number.isNaN(parseInt(b))?b+"px":b,w=l.value();w!=null&&(_?(w.style.flexGrow="0",w.style.flexShrink="0",w.style.width="60px",w.style.minWidth=w.style.flexBasis="",w.style.margin="0"):(w.style.flexGrow="",w.style.flexShrink="",w.style.width="",w.style.minWidth=w.style.flexBasis=g,w.style.margin=""))}return{component:o,showGoBack:c,updateNodes:d,unref:r,goBack:m}}});function ko(e,t,n,s,i,l){const o=Ft("Context");return y(),M("div",{class:"layer-container",style:Ae({"--layer-color":e.unref(e.color)})},[e.showGoBack?(y(),M("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...c)=>e.goBack&&e.goBack(...c))},"\u274C")):B("",!0),e.minimized.value?(y(),M("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=c=>e.minimized.value=!1)},[f("div",null,W(e.unref(e.name)),1)])):(y(),M("div",{key:2,class:we(["layer-tab",{showGoBack:e.showGoBack}])},[u(o,{onUpdateNodes:e.updateNodes},{default:q(()=>[(y(),G(ve(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(y(),M("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=c=>e.minimized.value=!0)}," \u25BC ")):B("",!0)],4)}var Co=se(wo,[["render",ko],["__scopeId","data-v-0158bec3"]]);const Xs=e=>(wt("data-v-4b4bda40"),e=e(),kt(),e),No=Xs(()=>f("h2",null,"Changelog",-1)),So=Xs(()=>f("details",{open:""},[f("summary",null,[h("v0.0 Initial Commit - "),f("time",null,"2021-09-04")]),h(" This is the first release :D "),f("ul",null,[f("li",{class:"feature"},"Did everything"),f("li",{class:"fix"},"Had some fun"),f("li",{class:"breaking"},"Removed everything"),f("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),Mo=L({__name:"Changelog",setup(e,{expose:t}){const n=O(!1);return t({open(){n.value=!0}}),(s,i)=>(y(),G(ct,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=l=>n.value=l)},{header:q(()=>[No]),body:q(()=>[So]),_:1},8,["modelValue"]))}});var Ao=se(Mo,[["__scopeId","data-v-4b4bda40"]]),Io=L({props:{element:Object,display:{type:$(Object,String,Function),required:!0},style:$(Object,String,Array),classes:$(Object),direction:$(String),xoffset:$(String),yoffset:$(String),pinned:Object},setup(e){const{element:t,display:n,pinned:s}=$e(e),i=O(!1),l=N(()=>(Ee(s)||i.value)&&o.value),o=Tt(n),c=it(ee(R(()=>{const v=Ee(t);return v==null?"":rt(v)})));function m(v){const _=s;v.shiftKey&&_&&(_.value=!_.value,v.stopPropagation(),v.preventDefault())}const d=N(()=>Ee(s)&&dn[me.theme].showPin);return{Direction:ae,isHovered:i,isShown:l,comp:o,elementComp:c,unref:r,togglePinned:m,showPin:d}}});const Eo={key:0,class:"material-icons pinned"};function Bo(e,t,n,s,i,l){return y(),M("div",{class:we(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=o=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=o=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...o)=>e.togglePinned&&e.togglePinned(...o))},[pt(e.$slots,"default",{},void 0,!0),e.elementComp?(y(),G(ve(e.elementComp),{key:0})):B("",!0),u(Mn,{name:"fade"},{default:q(()=>{var o;return[e.isShown?(y(),M("div",{key:0,class:we(["tooltip",{top:e.unref(e.direction)===e.Direction.Up,left:e.unref(e.direction)===e.Direction.Left,right:e.unref(e.direction)===e.Direction.Right,bottom:e.unref(e.direction)===e.Direction.Down,...e.unref(e.classes)}]),style:Ae([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(o=e.unref(e.style))!=null?o:{}])},[e.showPin?(y(),M("span",Eo,"push_pin")):B("",!0),e.comp?(y(),G(ve(e.comp),{key:1})):B("",!0)],6)):B("",!0)]}),_:1})],34)}var ye=se(Io,[["render",Bo],["__scopeId","data-v-6102fa3a"]]);const Po={class:"info-modal-header"},xo=["src","alt"],Fo={class:"info-modal-title"},To={key:0},Ro={key:0},$o={key:0},Do=f("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1),Oo=f("br",null,null,-1),Uo=f("br",null,null,-1),qo=["href"],Vo=f("span",{class:"material-icons info-modal-discord"},"discord",-1),Lo=f("div",null,[f("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[f("span",{class:"material-icons info-modal-discord"},"discord"),h(" The Paper Pilot Community ")])],-1),Go=f("div",null,[f("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link",target:"_blank"},[f("span",{class:"material-icons info-modal-discord"},"discord"),h(" The Modding Tree ")])],-1),Ho=f("br",null,null,-1);var Qo=L({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const n=e,{title:s,logo:i,author:l,discordName:o,discordLink:c,versionNumber:m,versionTitle:d}=ne,v=$e(n),_=O(!1),b=N(()=>In(U.timePlayed)),g=N(()=>ee(R(()=>u(F,null,[$s.map(ce)]))));t({open(){_.value=!0}});function w(){var S;(S=r(v.changelog))==null||S.open()}return(S,I)=>(y(),G(ct,{modelValue:_.value,"onUpdate:modelValue":I[0]||(I[0]=le=>_.value=le)},{header:q(()=>[f("div",Po,[r(i)?(y(),M("img",{key:0,class:"info-modal-logo",src:r(i),alt:r(s)},null,8,xo)):B("",!0),f("div",Fo,[f("h2",null,W(r(s)),1),f("h4",null,[h(" v"+W(r(m)),1),r(d)?(y(),M("span",To,": "+W(r(d)),1)):B("",!0)])])])]),body:q(({shown:le})=>[le?(y(),M("div",Ro,[r(l)?(y(),M("div",$o,"By "+W(r(l)),1)):B("",!0),Do,Oo,f("div",{class:"link",onClick:w},"Changelog"),Uo,f("div",null,[r(c)?(y(),M("a",{key:0,href:r(c),class:"info-modal-discord-link",target:"_blank"},[Vo,h(" "+W(r(o)),1)],8,qo)):B("",!0)]),Lo,Go,Ho,f("div",null,"Time Played: "+W(r(b)),1),(y(),G(ve(r(g))))])):B("",!0)]),_:1},8,["modelValue"]))}});const Ys=e=>(wt("data-v-a03c577c"),e=e(),kt(),e),zo=Ys(()=>f("div",{class:"header"},[f("h2",null,"Options")],-1)),jo=Ys(()=>f("hr",null,null,-1));var Ko=L({__name:"Options",setup(e,{expose:t}){const n=O(!1);t({open(){n.value=!0}});const s=Object.keys(dn).map(g=>({label:Ss(g),value:g})),i=N(()=>ee(R(()=>u(F,null,[Rs.map(ce)])))),{showTPS:l,theme:o}=$e(me),{autosave:c,usingLog:m}=$e(U),d=N({get(){return U.devSpeed===0},set(g){U.devSpeed=g?0:null}}),v=R(()=>u("span",null,[h("Autosave"),u(ye,{display:"Save-specific"},{default:()=>[h("*")]})])),_=R(()=>u("span",null,[h("Pause game"),u(ye,{display:"Save-specific"},{default:()=>[h("*")]})])),b=R(()=>u("span",null,[h("Use log for progress bar"),u(ye,{display:"Save-specific"},{default:()=>[h("*")]})]));return(g,w)=>(y(),G(ct,{modelValue:n.value,"onUpdate:modelValue":w[5]||(w[5]=S=>n.value=S)},{header:q(()=>[zo]),body:q(()=>[u(Jn,{title:"Theme",options:r(s),modelValue:r(o),"onUpdate:modelValue":w[0]||(w[0]=S=>_e(o)?o.value=S:null)},null,8,["options","modelValue"]),(y(),G(ve(r(i)))),u(Bt,{title:"Show TPS",modelValue:r(l),"onUpdate:modelValue":w[1]||(w[1]=S=>_e(l)?l.value=S:null)},null,8,["modelValue"]),jo,u(Bt,{title:r(v),modelValue:r(c),"onUpdate:modelValue":w[2]||(w[2]=S=>_e(c)?c.value=S:null)},null,8,["title","modelValue"]),r(ne).enablePausing?(y(),G(Bt,{key:0,title:r(_),modelValue:r(d),"onUpdate:modelValue":w[3]||(w[3]=S=>_e(d)?d.value=S:null)},null,8,["title","modelValue"])):B("",!0),u(Bt,{title:r(b),modelValue:r(m),"onUpdate:modelValue":w[4]||(w[4]=S=>_e(m)?m.value=S:null)},null,8,["title","modelValue"])]),_:1},8,["modelValue"]))}});var Wo=se(Ko,[["__scopeId","data-v-a03c577c"]]);const Jo=["onSubmit"],Xo={class:"field"},Yo={key:0,class:"field-title"},Zo=["placeholder"],er=L({__name:"Text",props:{title:null,modelValue:null,textArea:{type:Boolean},placeholder:null,maxHeight:null,submitOnBlur:{type:Boolean}},emits:["update:modelValue","submit","cancel"],setup(e,{emit:t}){const n=e,s=Tt(ut(n,"title"),"span"),i=it(null);Nn(()=>{var m;(m=i.value)==null||m.focus()});const l=N({get(){return r(n.modelValue)||""},set(m){t("update:modelValue",m)}});function o(){t("submit")}function c(){n.submitOnBlur!==!1?t("submit"):t("cancel")}return(m,d)=>(y(),M("form",{onSubmit:an(o,["prevent"])},[f("div",Xo,[r(s)?(y(),M("span",Yo,[(y(),G(ve(r(s))))])):B("",!0),e.textArea?(y(),G(r(yi),{key:1,modelValue:r(l),"onUpdate:modelValue":d[0]||(d[0]=v=>_e(l)?l.value=v:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:c,ref_key:"field",ref:i},null,8,["modelValue","placeholder","maxHeight"])):Sn((y(),M("input",{key:2,type:"text","onUpdate:modelValue":d[1]||(d[1]=v=>_e(l)?l.value=v:null),placeholder:e.placeholder,class:we({fullWidth:!e.title}),onBlur:c,ref_key:"field",ref:i},null,42,Zo)),[[mi,r(l)]])])],40,Jo))}});var Zs=se(er,[["__scopeId","data-v-67b44a54"]]);const tr={key:0},nr=["onClick","disabled"],sr={key:0},ir=["onClick"],ar=L({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const s=$e(e),i=O(!1);gt(i,c=>{t("confirmingChanged",c)});function l(){if(r(s.skipConfirm)){t("click");return}i.value&&t("click"),i.value=!i.value}function o(){i.value=!1}return(c,m)=>(y(),M("span",{class:we(["container",{confirming:i.value}])},[i.value?(y(),M("span",tr,"Are you sure?")):B("",!0),f("button",{onClick:an(l,["stop"]),class:"button danger",disabled:e.disabled},[i.value?(y(),M("span",sr,"Yes")):pt(c.$slots,"default",{key:1},void 0,!0)],8,nr),i.value?(y(),M("button",{key:1,class:"button",onClick:an(o,["stop"])},"No",8,ir)):B("",!0)],2))}});var lr=se(ar,[["__scopeId","data-v-2f8ef34c"]]);const or=["onClick"],rr=L({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=O(!1),s=O(null);function i(){t("click"),s.value&&clearTimeout(s.value),n.value=!1,Qt(()=>{n.value=!0,s.value=setTimeout(()=>n.value=!1,500)})}return(l,o)=>(y(),M("button",{onClick:an(i,["stop"]),class:we(["feedback",{activated:n.value,left:e.left}])},[pt(l.$slots,"default",{},void 0,!0)],10,or))}});var ur=se(rr,[["__scopeId","data-v-01a1b95c"]]);const Ct=e=>(wt("data-v-5285ac49"),e=e(),kt(),e),cr=Ct(()=>f("div",{class:"handle material-icons"},"drag_handle",-1)),dr={key:0,class:"actions"},mr=Ct(()=>f("span",{class:"material-icons"},"content_paste",-1)),fr=Ct(()=>f("span",{class:"material-icons"},"content_copy",-1)),pr=Ct(()=>f("span",{class:"material-icons"},"edit",-1)),hr=Ct(()=>f("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),gr={key:1,class:"actions"},vr=Ct(()=>f("span",{class:"material-icons"},"check",-1)),yr=Ct(()=>f("span",{class:"material-icons"},"close",-1)),br={key:2,class:"details"},_r={class:"save-version"},wr=Ct(()=>f("br",null,null,-1)),kr={key:0},Cr={key:1},Nr={key:3,class:"details"},Sr={key:4,class:"details error"},Mr=Ct(()=>f("br",null,null,-1)),Ar=L({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const n=e,{save:s}=$e(n),i=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),l=O(!1),o=O(!1),c=O("");gt(l,()=>c.value=s.value.name||"");const m=N(()=>s.value&&s.value.id===U.id),d=N(()=>m.value?U.time:s.value&&s.value.time||0),v=Cn(N(()=>{var b,g,w,S;return`Day ${(S=(w=(g=(b=s.value)==null?void 0:b.layers)==null?void 0:g.main)==null?void 0:w.day)!=null?S:1}`}));function _(){t("editName",c.value),l.value=!1}return(b,g)=>(y(),M("div",{class:we(["save",{active:r(m)}])},[cr,l.value?(y(),M("div",gr,[f("button",{onClick:_,class:"button"},[u(ye,{display:"Save",direction:r(ae).Left,class:"info"},{default:q(()=>[vr]),_:1},8,["direction"])]),f("button",{onClick:g[5]||(g[5]=w=>l.value=!l.value),class:"button"},[u(ye,{display:"Cancel",direction:r(ae).Left,class:"info"},{default:q(()=>[yr]),_:1},8,["direction"])])])):(y(),M("div",dr,[r(s).error==null&&!o.value?(y(),G(ur,{key:0,onClick:g[0]||(g[0]=w=>t("export")),class:"button",left:""},{default:q(()=>[u(ye,{display:"Export",direction:r(ae).Left,class:"info"},{default:q(()=>[mr]),_:1},8,["direction"])]),_:1})):B("",!0),r(s).error==null&&!o.value?(y(),M("button",{key:1,onClick:g[1]||(g[1]=w=>t("duplicate")),class:"button"},[u(ye,{display:"Duplicate",direction:r(ae).Left,class:"info"},{default:q(()=>[fr]),_:1},8,["direction"])])):B("",!0),r(s).error==null&&!o.value?(y(),M("button",{key:2,onClick:g[2]||(g[2]=w=>l.value=!l.value),class:"button"},[u(ye,{display:"Edit Name",direction:r(ae).Left,class:"info"},{default:q(()=>[pr]),_:1},8,["direction"])])):B("",!0),u(lr,{disabled:r(m),onClick:g[3]||(g[3]=w=>t("delete")),onConfirmingChanged:g[4]||(g[4]=w=>o.value=w)},{default:q(()=>[u(ye,{display:"Delete",direction:r(ae).Left,class:"info"},{default:q(()=>[hr]),_:1},8,["direction"])]),_:1},8,["disabled"])])),r(s).error==null&&!l.value?(y(),M("div",br,[f("button",{class:"button open",onClick:g[6]||(g[6]=w=>t("open"))},[f("h3",null,W(r(s).name),1)]),f("span",_r,"v"+W(r(s).modVersion),1),wr,r(d)?(y(),M("div",kr,"Last played "+W(r(i).format(r(d))),1)):B("",!0),r(v)?(y(),M("div",Cr,[(y(),G(ve(r(v))))])):B("",!0)])):r(s).error==null&&l.value?(y(),M("div",Nr,[u(Zs,{modelValue:c.value,"onUpdate:modelValue":g[7]||(g[7]=w=>c.value=w),class:"editname",onSubmit:_},null,8,["modelValue"])])):(y(),M("div",Sr,[h(" Error: Failed to load save with id "+W(r(s).id),1),Mr,h(W(r(s).error),1)]))],2))}});var Ir=se(Ar,[["__scopeId","data-v-5285ac49"]]);const Yn=e=>(wt("data-v-3b9991aa"),e=e(),kt(),e),Er=Yn(()=>f("h2",null,"Saves Manager",-1)),Br={class:"modal-footer"},Pr={class:"field"},xr=Yn(()=>f("span",{class:"field-title"},"Create Save",-1)),Fr={class:"field-buttons"},Tr={class:"footer"},Rr=Yn(()=>f("div",{style:{"flex-grow":"1"}},null,-1)),$r=L({__name:"SavesManager",setup(e,{expose:t}){const n=O(!1),s=O(null);t({open(){n.value=!0}});const i=O(!1),l=O(""),o=O(null);gt(l,A=>{A?Qt(()=>{try{if(A[0]!=="{")if(A[0]==="e")A=decodeURIComponent(escape(atob(A)));else if(A[0]==="\u1BE1")A=Et.decompressFromUTF16(A);else{console.warn("Unable to determine preset encoding",A),i.value=!0;return}const C=JSON.parse(A);if(typeof C!="object"){i.value=!0;return}const x=yn();C.id=x,ot(C),l.value="",i.value=!1,me.saves.push(x)}catch{i.value=!0}}):i.value=!1});let c={},m=O(Object.keys(c).reduce((A,C)=>(A.push({label:C.split("/").slice(-1)[0].slice(0,-4),value:c[C]}),A),[]));const d=An({});function v(A){if(d[A]==null){let C=localStorage.getItem(A);if(C==null)d[A]={error:"Save doesn't exist in localStorage",id:A};else if(C==="dW5kZWZpbmVk")d[A]={error:"Save is undefined",id:A};else try{if(C[0]!=="{")if(C[0]==="e")C=decodeURIComponent(escape(atob(C)));else if(C[0]==="\u1BE1")C=Et.decompressFromUTF16(C);else return console.warn("Unable to determine preset encoding",C),i.value=!0,d[A]={error:"Unable to determine preset encoding",id:A},d[A];d[A]={...JSON.parse(C),id:A}}catch(x){d[A]={error:x,id:A},console.warn(`SavesManager: Failed to load info about save with id ${A}: +${x} +${C}`)}}return d[A]}gt(n,A=>{A&&Object.keys(d).forEach(C=>delete d[C])});const _=N(()=>me.saves.reduce((A,C)=>(A[C]=v(C),A),{}));function b(A){let C;switch(U.id===A?C=xs(U[de]):C=JSON.stringify(_.value[A]),ne.exportEncoding){default:console.warn(`Unknown save encoding: ${ne.exportEncoding}. Defaulting to lz`);case"lz":C=Et.compressToUTF16(C);break;case"base64":C=btoa(unescape(encodeURIComponent(C)));break;case"plain":break}const x=document.createElement("textarea");x.value=C,document.body.appendChild(x),x.select(),x.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(x)}function g(A){U.id===A&&ot();const C={..._.value[A],id:yn()};ot(C),me.saves.push(C.id)}function w(A){me.saves=me.saves.filter(C=>C!==A),localStorage.removeItem(A),d[A]=void 0}function S(A){_.value[U.id].time=U.time,ot(),d[U.id]=void 0,Gt(_.value[A]),d[A]=void 0}function I(A){if(o.value=A,Qt(()=>{o.value=null}),A[0]!=="{")if(A[0]==="e")A=decodeURIComponent(escape(atob(A)));else if(A[0]==="\u1BE1")A=Et.decompressFromUTF16(A);else{console.warn("Unable to determine preset encoding",A);return}const C=JSON.parse(A);C.id=yn(),ot(C),me.saves.push(C.id),S(C.id)}function le(A,C){const x=_.value[A];x&&(x.name=C,U.id===A?(U.name=C,ot()):(ot(x),d[A]=void 0))}return(A,C)=>(y(),G(ct,{modelValue:n.value,"onUpdate:modelValue":C[4]||(C[4]=x=>n.value=x),ref_key:"modal",ref:s},{header:q(()=>[Er]),body:q(({shown:x})=>[x?(y(),G(r(vi),{key:0,list:r(me).saves,handle:".handle",itemKey:fe=>fe},{item:q(({element:fe})=>[u(Ir,{save:r(_)[fe],onOpen:De=>S(fe),onExport:De=>b(fe),onEditName:De=>le(fe,De),onDuplicate:De=>g(fe),onDelete:De=>w(fe)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):B("",!0)]),footer:q(()=>[f("div",Br,[u(Zs,{modelValue:l.value,"onUpdate:modelValue":C[0]||(C[0]=x=>l.value=x),title:"Import Save",placeholder:"Paste your save here!",class:we({importingFailed:i.value})},null,8,["modelValue","class"]),f("div",Pr,[xr,f("div",Fr,[f("button",{class:"button",onClick:C[1]||(C[1]=x=>S(r(Jt)().id))},"New Game"),Object.keys(r(m)).length>0?(y(),G(Jn,{key:0,options:r(m),modelValue:o.value,"onUpdate:modelValue":C[2]||(C[2]=x=>I(x)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):B("",!0)])]),f("div",Tr,[Rr,f("button",{class:"button modal-default-button",onClick:C[3]||(C[3]=x=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var ei=se($r,[["__scopeId","data-v-3b9991aa"]]);const tt=e=>(wt("data-v-4a3f8425"),e=e(),kt(),e),Dr=["src","alt"],Or={key:1,class:"title"},Ur=tt(()=>f("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),qr={class:"discord"},Vr={class:"discord-links"},Lr={key:0},Gr=["href"],Hr=tt(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Qr=tt(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),zr={href:"https://forums.moddingtree.com/",target:"_blank"},jr=tt(()=>f("span",{class:"material-icons"},"forum",-1)),Kr=tt(()=>f("span",{class:"material-icons"},"info",-1)),Wr=tt(()=>f("span",{class:"material-icons"},"library_books",-1)),Jr=tt(()=>f("span",{class:"material-icons"},"settings",-1)),Xr=tt(()=>f("span",{class:"material-icons"},"library_books",-1)),Yr=tt(()=>f("span",{class:"material-icons"},"settings",-1)),Zr=tt(()=>f("span",{class:"material-icons"},"info",-1)),eu={href:"https://forums.moddingtree.com/",target:"_blank"},tu=tt(()=>f("span",{class:"material-icons"},"forum",-1)),nu={class:"discord"},su={class:"discord-links"},iu={key:0},au=["href"],lu=tt(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),ou=tt(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),ru=L({__name:"Nav",setup(e){const t=O(null),n=O(null),s=O(null),i=O(null),{useHeader:l,banner:o,title:c,discordName:m,discordLink:d,versionNumber:v}=ne;function _(){window.open(d,"mywindow")}return(b,g)=>(y(),M(F,null,[r(l)?(y(),M("div",zt({key:0,class:"nav"},b.$attrs),[r(o)?(y(),M("img",{key:0,src:r(o),class:"banner",alt:r(c)},null,8,Dr)):(y(),M("div",Or,W(r(c)),1)),f("div",{onClick:g[0]||(g[0]=w=>{var S;return(S=i.value)==null?void 0:S.open()}),class:"version-container"},[u(ye,{display:"Changelog",direction:r(ae).Down,class:"version"},{default:q(()=>[f("span",null,"v"+W(r(v)),1)]),_:1},8,["direction"])]),Ur,f("div",qr,[f("span",{onClick:_,class:"material-icons"},"discord"),f("ul",Vr,[r(d)?(y(),M("li",Lr,[f("a",{href:r(d),target:"_blank"},W(r(m)),9,Gr)])):B("",!0),Hr,Qr])]),f("div",null,[f("a",zr,[u(ye,{display:"Forums",direction:r(ae).Down,yoffset:"5px"},{default:q(()=>[jr]),_:1},8,["direction"])])]),f("div",{onClick:g[1]||(g[1]=w=>{var S;return(S=t.value)==null?void 0:S.open()})},[u(ye,{display:"Info",direction:r(ae).Down,class:"info"},{default:q(()=>[Kr]),_:1},8,["direction"])]),f("div",{onClick:g[2]||(g[2]=w=>{var S;return(S=n.value)==null?void 0:S.open()})},[u(ye,{display:"Saves",direction:r(ae).Down,xoffset:"-20px"},{default:q(()=>[Wr]),_:1},8,["direction"])]),f("div",{onClick:g[3]||(g[3]=w=>{var S;return(S=s.value)==null?void 0:S.open()})},[u(ye,{display:"Options",direction:r(ae).Down,xoffset:"-66px"},{default:q(()=>[Jr]),_:1},8,["direction"])])],16)):(y(),M("div",zt({key:1,class:"overlay-nav"},b.$attrs),[f("div",{onClick:g[4]||(g[4]=w=>{var S;return(S=i.value)==null?void 0:S.open()}),class:"version-container"},[u(ye,{display:"Changelog",direction:r(ae).Right,xoffset:"25%",class:"version"},{default:q(()=>[f("span",null,"v"+W(r(v)),1)]),_:1},8,["direction"])]),f("div",{onClick:g[5]||(g[5]=w=>{var S;return(S=n.value)==null?void 0:S.open()})},[u(ye,{display:"Saves",direction:r(ae).Right},{default:q(()=>[Xr]),_:1},8,["direction"])]),f("div",{onClick:g[6]||(g[6]=w=>{var S;return(S=s.value)==null?void 0:S.open()})},[u(ye,{display:"Options",direction:r(ae).Right},{default:q(()=>[Yr]),_:1},8,["direction"])]),f("div",{onClick:g[7]||(g[7]=w=>{var S;return(S=t.value)==null?void 0:S.open()})},[u(ye,{display:"Info",direction:r(ae).Right},{default:q(()=>[Zr]),_:1},8,["direction"])]),f("div",null,[f("a",eu,[u(ye,{display:"Forums",direction:r(ae).Right,xoffset:"7px"},{default:q(()=>[tu]),_:1},8,["direction"])])]),f("div",nu,[f("span",{onClick:_,class:"material-icons"},"discord"),f("ul",su,[r(d)?(y(),M("li",iu,[f("a",{href:r(d),target:"_blank"},W(r(m)),9,au)])):B("",!0),lu,ou])])],16)),u(Qo,{ref_key:"info",ref:t,changelog:i.value},null,8,["changelog"]),u(ei,{ref_key:"savesManager",ref:n},null,512),u(Wo,{ref_key:"options",ref:s},null,512),u(Ao,{ref_key:"changelog",ref:i},null,512)],64))}});var ti=se(ru,[["__scopeId","data-v-4a3f8425"]]);const Zn=e=>(wt("data-v-248e2ebb"),e=e(),kt(),e),uu={class:"inner-tab"},cu={key:1},du=Zn(()=>f("br",null,null,-1)),mu=h(" You can help continue the "),fu=Zn(()=>f("i",null,"advent",-1)),pu=h("ure at: "),hu=Zn(()=>f("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[f("span",{class:"material-icons info-modal-discord"},"discord"),h(" The Paper Pilot Community ")],-1)),gu=L({__name:"Game",setup(e){const t=ut(U,"tabs"),n=N(()=>Object.keys(qe)),s=ne.useHeader,i=Tt(Q.loreBody);function l(o){const{display:c,minimized:m,minWidth:d,name:v,color:_,minimizable:b,nodes:g}=o;return{display:c,minimized:m,minWidth:d,name:v,color:_,minimizable:b,nodes:g}}return(o,c)=>(y(),M("div",{class:we(["tabs-container",{useHeader:r(s)}])},[(y(!0),M(F,null,gs(r(t),(m,d)=>{var v,_;return y(),M("div",{key:d,class:we(["tab",r((v=r(qe)[m])==null?void 0:v.classes)]),ref_for:!0,ref:`tab-${d}`,style:Ae(r((_=r(qe)[m])==null?void 0:_.style))},[d===0&&!r(s)?(y(),G(ti,{key:0})):B("",!0),f("div",uu,[r(n).includes(m)?(y(),G(Co,zt({key:0},l(r(qe)[m]),{index:d,tab:()=>{var b;return(b=o.$refs[`tab-${d}`])==null?void 0:b[0]}}),null,16,["index","tab"])):(y(),G(ve(m),{key:1,index:d},null,8,["index"]))])],6)}),128)),u(ct,{modelValue:r(Q).showLoreModal.value,"onUpdate:modelValue":c[0]||(c[0]=m=>r(Q).showLoreModal.value=m)},{header:q(()=>[f("h2",null,W(r(Q).loreTitle.value),1)]),body:q(()=>[r(i)?(y(),G(ve(r(i)),{key:0})):B("",!0),r(Q).loreScene.value!==-1?(y(),M("div",cu,[u(_o,{day:r(Q).loreScene.value},null,8,["day"]),du,mu,fu,pu,hu])):B("",!0)]),_:1},8,["modelValue"])],2))}});var vu=se(gu,[["__scopeId","data-v-248e2ebb"]]);const pn=e=>(wt("data-v-4a50ce42"),e=e(),kt(),e),yu={class:"game-over-modal-header"},bu=["src","alt"],_u={class:"game-over-modal-title"},wu=pn(()=>f("h2",null,"Congratulations!",-1)),ku={key:0},Cu=pn(()=>f("br",null,null,-1)),Nu=pn(()=>f("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),Su=pn(()=>f("br",null,null,-1)),Mu=["href"],Au=pn(()=>f("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),Iu=L({__name:"GameOverScreen",setup(e){const{title:t,logo:n,discordName:s,discordLink:i,versionNumber:l,versionTitle:o}=ne,c=N(()=>In(U.timePlayed)),m=N(()=>Xn.value&&!U.keepGoing),d=ut(U,"autosave");function v(){U.keepGoing=!0}function _(){Gt(Jt())}return(b,g)=>(y(),G(ct,{"model-value":r(m)},{header:q(()=>[f("div",yu,[r(n)?(y(),M("img",{key:0,class:"game-over-modal-logo",src:r(n),alt:r(t)},null,8,bu)):B("",!0),f("div",_u,[wu,f("h4",null,"You've beaten "+W(r(t))+" v"+W(r(l))+": "+W(r(o)),1)])])]),body:q(({shown:w})=>[w?(y(),M("div",ku,[f("div",null,"It took you "+W(r(c))+" to beat the game.",1),Cu,Nu,Su,f("div",null,[f("a",{href:r(i),class:"game-over-modal-discord-link"},[Au,h(" "+W(r(s)),1)],8,Mu)]),u(Bt,{title:"Autosave",modelValue:r(d),"onUpdate:modelValue":g[0]||(g[0]=S=>_e(d)?d.value=S:null)},null,8,["modelValue"])])):B("",!0)]),footer:q(()=>[f("div",{class:"game-over-footer"},[f("button",{onClick:v,class:"button"},"Keep Going"),f("button",{onClick:_,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var Eu=se(Iu,[["__scopeId","data-v-4a50ce42"]]);const Fn=e=>(wt("data-v-3de07c06"),e=e(),kt(),e),Bu=Fn(()=>f("div",{class:"nan-modal-header"},[f("h2",null,"NaN value detected!")],-1)),Pu={key:0},xu=Fn(()=>f("br",null,null,-1)),Fu=["href"],Tu=Fn(()=>f("span",{class:"material-icons nan-modal-discord"},"discord",-1)),Ru=Fn(()=>f("br",null,null,-1)),$u={class:"nan-footer"},Du=L({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:n}=ne,s=ut(U,"autosave"),i=ut(he,"hasNaN"),l=O(null),o=N(()=>{var g;return(g=he.NaNPath)==null?void 0:g.join(".")}),c=N(()=>{var g;return(g=he.NaNPath)==null?void 0:g.slice(-1)[0]}),m=N(()=>he.NaNReceiver&&c.value?he.NaNReceiver[c.value]:null),d=N({get(){return U.devSpeed===0},set(g){U.devSpeed=g?null:0}});function v(){he.NaNReceiver&&c.value&&(he.NaNReceiver[c.value]=new a(0),he.hasNaN=!1)}function _(){he.NaNReceiver&&c.value&&(he.NaNReceiver[c.value]=new a(1),he.hasNaN=!1)}function b(){he.NaNReceiver&&c.value&&(he.NaNReceiver[c.value]=new a(NaN),he.hasNaN=!1)}return(g,w)=>(y(),M(F,null,[u(ct,zt({modelValue:r(i),"onUpdate:modelValue":w[4]||(w[4]=S=>_e(i)?i.value=S:null)},g.$attrs),{header:q(()=>[Bu]),body:q(()=>[f("div",null,[h(' Attempted to assign "'+W(r(o))+'" to NaN',1),r(m)?(y(),M("span",Pu,W(" ")+"(previously "+W(r(te)(r(m)))+")",1)):B("",!0),h(". Auto-saving has been "+W(r(s)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),xu,f("div",null,[f("a",{href:r(n),class:"nan-modal-discord-link"},[Tu,h(" "+W(r(t)),1)],8,Fu)]),Ru,u(Bt,{title:"Autosave",modelValue:r(s),"onUpdate:modelValue":w[0]||(w[0]=S=>_e(s)?s.value=S:null)},null,8,["modelValue"]),r(ne).enablePausing?(y(),G(Bt,{key:0,title:"Pause game",modelValue:r(d),"onUpdate:modelValue":w[1]||(w[1]=S=>_e(d)?d.value=S:null)},null,8,["modelValue"])):B("",!0)]),footer:q(()=>[f("div",$u,[f("button",{onClick:w[2]||(w[2]=S=>{var I;return(I=l.value)==null?void 0:I.open()}),class:"button"},"Open Saves Manager"),f("button",{onClick:v,class:"button"},"Set to 0"),f("button",{onClick:_,class:"button"},"Set to 1"),r(m)&&r(a).neq(r(m),0)&&r(a).neq(r(m),1)?(y(),M("button",{key:0,onClick:w[3]||(w[3]=S=>i.value=!1),class:"button"}," Set to previous ")):B("",!0),f("button",{onClick:b,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),u(ei,{ref_key:"savesManager",ref:l},null,512)],64))}});var Ou=se(Du,[["__scopeId","data-v-3de07c06"]]);const Uu={key:0,class:"tpsDisplay"},qu={key:0,class:"low"},Vu=L({__name:"TPS",setup(e){const t=N(()=>a.div(he.lastTenTicks.length,he.lastTenTicks.reduce((l,o)=>l+o,0))),n=O([]);Ze(()=>{n.value.push(Math.round(t.value.toNumber())),n.value.length>10&&(n.value=n.value.slice(1))});const s=N(()=>n.value.reduce((l,o)=>a.max(l,o),0)),i=N(()=>a.sub(t.value,s.value).gt(1));return(l,o)=>r(t).isNan()?B("",!0):(y(),M("div",Uu,[h(" TPS: "+W(r(J)(r(t)))+" ",1),u(Mn,{name:"fade"},{default:q(()=>[r(i)?(y(),M("span",qu,W(r(J)(r(s))),1)):B("",!0)]),_:1})]))}});var Lu=se(Vu,[["__scopeId","data-v-46a3ed5b"]]);var Gu=L({__name:"App",setup(e){const t=ne.useHeader,n=N(()=>dn[me.theme].variables),s=ut(me,"showTPS"),i=N(()=>ee(R(()=>u(F,null,[Ua.map(ce)]))));return(l,o)=>(y(),M(F,null,[f("div",{id:"modal-root",style:Ae(r(n))},null,4),f("div",{class:we(["app",{useHeader:r(t)}]),style:Ae(r(n))},[r(t)?(y(),G(ti,{key:0})):B("",!0),u(vu),r(r(s))?(y(),G(Lu,{key:1})):B("",!0),u(Eu),u(Ou),(y(),G(ve(r(i))))],6)],64))}});var Hu=se(Gu,[["__scopeId","data-v-7c41425b"]]);function Qu(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:s,onRegistered:i,onRegisterError:l}=e;let o,c;const m=async(d=!0)=>{d&&(o==null||o.addEventListener("controlling",v=>{v.isUpdate&&window.location.reload()})),c&&c.waiting&&await _i(c.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){o=new bi("./sw.js",{scope:"./",type:"classic"}),o.addEventListener("activated",d=>{d.isUpdate||s==null||s()});{const d=()=>{n==null||n()};o.addEventListener("waiting",d),o.addEventListener("externalwaiting",d)}o.register({immediate:t}).then(d=>{c=d,i==null||i(d)}).catch(d=>{l==null||l(d)})}return m}function zu(e={}){const{immediate:t=!0,onNeedRefresh:n,onOfflineReady:s,onRegistered:i,onRegisterError:l}=e,o=O(!1),c=O(!1);return{updateServiceWorker:Qu({immediate:t,onNeedRefresh(){o.value=!0,n==null||n()},onOfflineReady(){c.value=!0,s==null||s()},onRegistered:i,onRegisterError:l}),offlineReady:c,needRefresh:o}}document.title=ne.title;window.projInfo=ne;if(ne.id==="")throw"Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json";requestAnimationFrame(async()=>{console.log(`%cMade in Profectus%c +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 Ta();const{globalBus:e}=await _n(()=>Promise.resolve().then(function(){return va}),void 0),{startGameLoop:t}=await _n(()=>import("./gameLoop.ca13fa80.js"),["assets/gameLoop.ca13fa80.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=fi(Hu);e.emit("setupVue",n),n.mount("#app"),Qt(()=>{const s=ys(),{updateServiceWorker:i}=zu({onNeedRefresh(){s.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(){s.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(l){l&&setInterval(l.update,60*60*1e3)}})}),t()});export{a as D,_n as _,he as a,ne as b,uo as c,ke as g,U as p,me as s}; diff --git a/assets/index.d72582b0.css b/assets/index.d72582b0.css new file mode 100644 index 0000000..49765c7 --- /dev/null +++ b/assets/index.d72582b0.css @@ -0,0 +1 @@ +.table{display:flex;flex-flow:column wrap;justify-content:center;align-items:center;max-width:100%;margin:0 auto}.table+.table{margin-top:10px}.row{display:flex;flex-flow:row wrap;justify-content:center;align-items:stretch;max-width:100%;margin:0 10px}.row>:not(.feature){margin:0;display:flex}.col{display:flex;flex-flow:column wrap;justify-content:center;align-items:center;height:100%;margin:10px 0}.row.mergeAdjacent>.feature:not(.dontMerge),.row.mergeAdjacent>.tooltip-container>.feature:not(.dontMerge){margin-left:0;margin-right:0;border-radius:0}.row.mergeAdjacent>.feature:not(.dontMerge):first-child,.row.mergeAdjacent>.tooltip-container:first-child>.feature:not(.dontMerge){border-radius:var(--border-radius) 0 0 var(--border-radius)}.row.mergeAdjacent>.feature:not(.dontMerge):last-child,.row.mergeAdjacent>.tooltip-container:last-child>.feature:not(.dontMerge){border-radius:0 var(--border-radius) var(--border-radius) 0}.row.mergeAdjacent>.feature:not(.dontMerge):first-child:last-child,.row.mergeAdjacent>.tooltip-container:first-child:last-child>.feature:not(.dontMerge){border-radius:var(--border-radius)}.col.mergeAdjacent .feature:not(.dontMerge){margin-top:0;margin-bottom:0;border-radius:0}.col.mergeAdjacent .feature:not(.dontMerge):first-child{border-radius:var(--border-radius) var(--border-radius) 0 0}.col.mergeAdjacent .feature:not(.dontMerge):last-child{border-radius:0 0 var(--border-radius) var(--border-radius)}.col.mergeAdjacent .feature:not(.dontMerge):first-child:last-child{border-radius:var(--border-radius)}.resize-listener[data-v-2b1dc1bc]{position:absolute;top:0px;left:0;right:-4px;bottom:5px;z-index:-10;pointer-events:none}.modal-mask{position:fixed;z-index:9998;top:0;left:0;bottom:0;right:0;background-color:#00000080;transition:opacity .3s ease}.modal-wrapper{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.modal-container{width:640px;max-width:95vw;max-height:95vh;background-color:var(--background);padding:20px;border-radius:5px;transition:all .3s ease;text-align:left;border:var(--modal-border);box-sizing:border-box;display:flex;flex-direction:column}.modal-header{width:100%}.modal-body{margin:20px 0;width:100%;overflow-y:auto;overflow-x:hidden}.modal-footer{width:100%}.modal-default-footer{display:flex}.modal-default-flex-grow{flex-grow:1}.modal-enter-from,.modal-leave-active{opacity:0}.modal-enter-from .modal-container,.modal-leave-active .modal-container{-webkit-transform:scale(1.1);transform:scale(1.1)}.advent{width:80%;max-width:700px;background:url(./adventCalendarGameJamCalandar.0fdeb6b8.png);background-size:contain;display:flex;flex-direction:column;padding-top:28%;padding-left:10%;padding-right:10%;background-repeat:no-repeat;aspect-ratio:3151 / 4190}.advent>.table{width:100%}.advent>.table>.row{width:100%;margin:0 0 -5%;justify-content:space-around}.notif[data-v-66323fd4]{position:absolute;top:0;left:5px;z-index:10;pointer-events:none;user-select:none;color:var(--accent3);font-size:x-large;animation:1s linear infinite bounce-66323fd4;border-radius:var(--border-radius);background:var(--locked)}@keyframes bounce-66323fd4{0%{animation-timing-function:cubic-bezier(.1361,.2514,.2175,.8786);transform:translate(0) scaleY(1)}37%{animation-timing-function:cubic-bezier(.7674,.1844,.8382,.7157);transform:translateY(-20px) scaleY(1)}72%{animation-timing-function:cubic-bezier(.1118,.2149,.2172,.941);transform:translate(0) scaleY(1)}87%{animation-timing-function:cubic-bezier(.7494,.2259,.8209,.6963);transform:translateY(10px) scaleY(.602)}to{transform:translate(0) scaleY(1)}}.day[data-v-d953df70]{flex:13% 0 0;position:relative;display:flex;background-color:var(--raised-background);aspect-ratio:1;margin:5%}.door-enter-from[data-v-d953df70]:before,.door-enter-from[data-v-d953df70]:after,.door-leave-to[data-v-d953df70]:before,.door-leave-to[data-v-d953df70]:after{transform:perspective(150px) rotateY(0)!important}.door-enter-from .date[data-v-d953df70],.door-leave-to .date[data-v-d953df70]{transform:translate(-50%,-50%) perspective(150px) rotateY(0)!important}.door-enter-active[data-v-d953df70]:before,.door-enter-active[data-v-d953df70]:after,.door-leave-active[data-v-d953df70]:before,.door-leave-active[data-v-d953df70]:after{z-index:2}.door-enter-active .date[data-v-d953df70],.door-leave-active .date[data-v-d953df70]{z-index:3}.day.opened .doors[data-v-d953df70]:before,.day.opened .doors[data-v-d953df70]:after,.day.opened .doors .date[data-v-d953df70]{transition:1s}.day.opened .doors[data-v-d953df70]:before{transform-origin:left;transform:perspective(150px) rotateY(-135deg)}.day.opened .doors[data-v-d953df70]:after{transform-origin:right;transform:perspective(150px) rotateY(135deg)}.day.opened .doors .date[data-v-d953df70]:first-child{transform-origin:left;transform:translate(-50%,-50%) perspective(150px) rotateY(-135deg);clip-path:polygon(0 0,50% 0,50% 100%,0 100%)}.day.opened .doors .date[data-v-d953df70]:last-child{transform-origin:right;transform:translate(-50%,-50%) perspective(150px) rotateY(135deg);clip-path:polygon(100% 0,50% 0,50% 100%,100% 100%)}.doors[data-v-d953df70]{position:absolute;width:100%;height:100%;top:0;left:0}.day.opened .doors[data-v-d953df70]{cursor:pointer}.doors[data-v-d953df70]:before,.doors[data-v-d953df70]:after{content:"";position:absolute;background-color:var(--locked);width:50%;height:100%;pointer-events:none}.doors[data-v-d953df70]:before{top:0;left:0}.doors[data-v-d953df70]:after{top:0;right:0}.date[data-v-d953df70]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:2;font-size:large;pointer-events:none;user-select:none;backface-visibility:hidden;width:100%}.timer[data-v-d953df70]{position:absolute;bottom:-12px;left:50%;padding:0 3px;transform:translate(-50%);z-index:3;pointer-events:none;user-select:none;white-space:nowrap;font-size:small;border:2px solid rgba(0,0,0,.125);border-radius:var(--border-radius);background:var(--locked)}.icon[data-v-d953df70]{pointer-events:none;background-size:contain;width:100%;height:100%}.lore[data-v-d953df70]{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;border-radius:50%;cursor:pointer;background-color:var(--highlighted);user-select:none}.lore[data-v-d953df70]:hover{box-shadow:0 0 10px var(--points)}.lock[data-v-d953df70]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);opacity:.2;font-size:400%}.collapsible-container[data-v-a72c16aa]{width:calc(100% - 10px)}.collapsible-toggle[data-v-a72c16aa]{max-width:unset;width:calc(100% + 0px);margin:0 0 0 -5px;background:var(--raised-background);padding:var(--feature-margin);color:var(--foreground);cursor:pointer;transition-duration:0s}.collapsible-toggle[data-v-a72c16aa]:last-child{margin-left:unset}[data-v-a72c16aa] .collapsible-toggle+.table{max-width:unset;width:calc(100% + 10px);margin-left:-5px}[data-v-a72c16aa] .col{margin-top:0;margin-bottom:0;width:100%}.mergeAdjacent .collapsible-toggle[data-v-a72c16aa]{border:0;border-top-left-radius:0!important;border-top-right-radius:0!important}[data-v-a72c16aa] .mergeAdjacent .feature:not(.dontMerge):first-child{border-top-left-radius:0!important;border-top-right-radius:0!important}.mark[data-v-2207999f]{position:absolute;left:-25px;top:-10px;width:30px;height:30px;z-index:1;pointer-events:none;margin-left:.9em;margin-right:.9em;margin-bottom:1.2em;border-right:.3em solid transparent;border-bottom:.7em solid transparent;border-left:.3em solid transparent;font-size:10px}.star[data-v-2207999f]{left:-10px;width:0;height:0;margin-left:.9em;margin-right:.9em;margin-bottom:1.2em;border-right:.3em solid transparent;border-bottom:.7em solid #ffcc00;border-left:.3em solid transparent;font-size:10px;pointer-events:none}.star[data-v-2207999f]:before,.star[data-v-2207999f]:after{content:"";width:0;height:0;position:absolute;top:.6em;left:-1em;border-right:1em solid transparent;border-bottom:.7em solid #ffcc00;border-left:1em solid transparent;transform:rotate(-35deg)}.star[data-v-2207999f]:after{transform:rotate(35deg)}.node[data-v-a48cb382]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.bar[data-v-02d0d7b2]{position:relative;display:table}.overlayTextContainer[data-v-02d0d7b2]{position:absolute;border-radius:10px;vertical-align:middle;display:flex;justify-content:center;z-index:3}.overlayText[data-v-02d0d7b2]{z-index:6}.border[data-v-02d0d7b2]{border:2px solid;border-radius:10px;border-color:var(--foreground);overflow:hidden;mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC);margin:0}.fill[data-v-02d0d7b2]{position:absolute;background-color:var(--foreground);overflow:hidden;margin-left:-.5px;transition-duration:.2s;z-index:2}.feature:not(li),.feature:not(li) button{position:relative;padding:5px;border-radius:var(--border-radius);border:2px solid rgba(0,0,0,.125);margin:var(--feature-margin);box-sizing:border-box;color:var(--feature-foreground);z-index:0;transition:all .5s,z-index 0s .5s}.can,.can button{background-color:var(--layer-color);cursor:pointer}.can:hover,.can:hover button{transform:scale(1.15);box-shadow:0 0 20px var(--points);z-index:1;transition:all .5s,z-index 0s}.locked,.locked button{background-color:var(--locked);cursor:not-allowed}.bought,.bought button{background-color:var(--bought);cursor:default}.clickable[data-v-8cedd7da]{min-height:120px;width:120px;font-size:10px}.clickable.small[data-v-8cedd7da]{min-height:unset}.clickable>*[data-v-8cedd7da]{pointer-events:none}.resize-listener[data-v-063f6d6b]{position:absolute;top:0px;left:0;right:-4px;bottom:5px;z-index:-10;pointer-events:none}svg[data-v-063f6d6b]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:-10;pointer-events:none}.left-side-nodes[data-v-39ca96d0]{position:absolute;left:15px;top:65px}.side-nodes[data-v-39ca96d0]{position:absolute;right:15px;top:65px}.left-side-nodes[data-v-39ca96d0] .treeNode,.side-nodes[data-v-39ca96d0] .treeNode{margin:20px auto}.small[data-v-39ca96d0] .treeNode{height:60px;width:60px}.small[data-v-39ca96d0] .treeNode>*:first-child{font-size:30px}.treeNode[data-v-1c0c107d]{height:100px;width:100px;border-radius:50%;padding:0;margin:0 10px}.treeNode>*[data-v-1c0c107d]:first-child{width:100%;height:100%;border:2px solid rgba(0,0,0,.125);border-radius:inherit;font-size:40px;color:#00000080;text-shadow:2px 2px 4px rgba(0,0,0,.25);box-shadow:-4px -4px 4px #00000040 inset,0 0 20px var(--background);text-transform:capitalize;display:flex}.treeNode>*:first-child>*[data-v-1c0c107d]{pointer-events:none}.modifier-toggle{padding-right:10px;transform:translateY(-1px);display:inline-block}.modifier-toggle.collapsed{transform:translate(-5px,-5px) rotate(-90deg)}.sticky[data-v-cccac690]{position:sticky;background:var(--background);width:calc(100% - 2px);z-index:3}.main-display-container{vertical-align:middle;margin-bottom:20px;display:flex;transition-duration:0s}.upgrade[data-v-7f411ac8]{min-height:120px;width:120px;font-size:10px}.upgrade>*[data-v-7f411ac8]{pointer-events:none}.modifier-container{display:flex}.modifier-container:nth-child(2n){background:var(--raised-background)}.modifier-amount{flex-basis:100px;flex-shrink:0}.modifier-description{flex-grow:1}.field{display:flex;position:relative;min-height:2em;margin:10px 0;user-select:none;justify-content:space-between;align-items:center}.field>*{margin:0}.field[data-v-33d57459]{cursor:pointer;pointer-events:all}input[data-v-33d57459]{appearance:none;pointer-events:none}span[data-v-33d57459]{width:100%;position:relative}input+span[data-v-33d57459]:before{content:"";float:right;margin:5px 0 5px 10px;border-radius:7px;width:36px;height:14px;background-color:var(--outline);opacity:.38;vertical-align:top;transition:background-color .2s,opacity .2s;border:solid 1px var(--feature-foreground)}input+span[data-v-33d57459]:after{content:"";position:absolute;top:2px;right:16px;border-radius:50%;width:20px;height:20px;background-color:var(--locked);box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f;transition:background-color .2s,transform .2s;border:solid 1px var(--feature-foreground)}input:checked+span[data-v-33d57459]:before{background-color:var(--link);opacity:.6}input:checked+span[data-v-33d57459]:after{background-color:var(--link);transform:translate(16px)}input:active+span[data-v-33d57459]:before{background-color:var(--link);opacity:.6}input:checked:active+span[data-v-33d57459]:before{background-color:var(--outline);opacity:.38}input:disabled+span[data-v-33d57459]{color:#000;opacity:.38;cursor:default}input:disabled+span[data-v-33d57459]:before{background-color:var(--outline);opacity:.38}input:checked:disabled+span[data-v-33d57459]:before{background-color:var(--link);opacity:.6}.vue-select{width:50%;border-radius:var(--border-radius)}.field-buttons .vue-select{width:unset}.vue-select,.vue-dropdown{border-color:var(--outline)}.vue-dropdown{background:var(--raised-background)}.vue-dropdown-item{color:var(--foreground)}.vue-dropdown-item,.vue-dropdown-item *{transition-duration:0s}.vue-dropdown-item.highlighted{background-color:var(--highlighted)}.vue-dropdown-item.selected,.vue-dropdown-item.highlighted.selected{background-color:var(--bought)}.vue-input input::placeholder{color:var(--link)}.milestone[data-v-f4e8794e]{width:calc(100% - 10px);min-width:120px;padding-left:5px;padding-right:5px;background-color:var(--locked);border-width:4px;border-radius:5px;color:#00000080}.milestone.done[data-v-f4e8794e]{background-color:var(--bought);cursor:default}.milestone[data-v-f4e8794e] .equal-spaced{display:flex;justify-content:center}.milestone[data-v-f4e8794e] .equal-spaced>*{margin:auto}.scene[data-v-36663c1c]{width:600px;height:300px;position:relative}.scene[data-v-36663c1c]:after{content:"";position:absolute;width:100%;height:20%;border-radius:50% 50% 0 0/100% 100% 0 0;bottom:0;background:white}.scene-item[data-v-36663c1c]{width:80px;height:80px;position:absolute;z-index:1}.scene-bubble[data-v-36663c1c]{position:absolute;background:white;height:60px;padding:5px;border-radius:10px}.scene-bubble[data-v-36663c1c]:after{content:"";position:absolute;width:0;height:0;top:100%;left:20px;border-left:10px solid transparent;border-right:10px solid transparent;border-top:15px solid white}.scene-bubble .scene-item[data-v-36663c1c]{height:60px;width:60px;position:static}.layer-container[data-v-0158bec3]{min-width:100%;min-height:100%;margin:0;flex-grow:1;display:flex;isolation:isolate}.layer-tab[data-v-0158bec3]:not(.minimized){padding-top:20px;padding-bottom:20px;min-height:100%;flex-grow:1;text-align:center;position:relative}.inner-tab>.layer-container>.layer-tab[data-v-0158bec3]:not(.minimized){padding-top:50px}.layer-tab.minimized[data-v-0158bec3]{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;padding:55px 0 0;margin:0;cursor:pointer;font-size:40px;color:var(--foreground);border:none;background-color:transparent}.layer-tab.minimized div[data-v-0158bec3]{margin:0;writing-mode:vertical-rl;padding-left:10px;width:50px}.inner-tab>.layer-container>.layer-tab[data-v-0158bec3]:not(.minimized){margin:-50px -10px;padding:50px 10px}.modal-body .layer-tab[data-v-0158bec3]{padding-bottom:0}.modal-body .layer-tab[data-v-0158bec3]:not(.hasSubtabs){padding-top:0}.minimize[data-v-0158bec3]{position:sticky;top:6px;right:9px;z-index:7;line-height:30px;border:none;background:var(--background);box-shadow:var(--background) 0 2px 3px 5px;border-radius:50%;color:var(--foreground);font-size:40px;cursor:pointer;margin-top:-44px;margin-right:-30px}.minimized+.minimize[data-v-0158bec3]{transform:rotate(-90deg);top:10px;right:18px;pointer-events:none}.goBack[data-v-0158bec3]{position:sticky;top:10px;left:10px;line-height:30px;margin-top:-50px;margin-left:-35px;border:none;background:var(--background);box-shadow:var(--background) 0 2px 3px 5px;border-radius:50%;color:var(--foreground);font-size:30px;cursor:pointer;z-index:7}.goBack[data-v-0158bec3]:hover{transform:scale(1.1);text-shadow:0 0 7px var(--foreground)}details[data-v-4b4bda40]{margin:10px 0;padding-left:18px}summary[data-v-4b4bda40]{cursor:pointer;margin-bottom:10px;margin-left:-18px}ul[data-v-4b4bda40]{margin:var(--feature-margin) 0;background:var(--raised-background);border:2px solid rgba(0,0,0,.125);padding:5px 5px 5px 15px;list-style:inside}li[data-v-4b4bda40]{margin:8px 0}li[data-v-4b4bda40]:before{padding:2px 8px;margin-right:8px;border-radius:var(--border-radius)}.feature[data-v-4b4bda40]:before{content:"Feature";background:var(--accent1)}.fix[data-v-4b4bda40]:before{content:"Fix";background:var(--accent2)}.balancing[data-v-4b4bda40]:before{content:"Balancing";background:var(--accent3)}.breaking[data-v-4b4bda40]:before{content:"Breaking";background:var(--danger)}.tooltip-container[data-v-6102fa3a]{position:relative;--xoffset: 0px;--yoffset: 0px;text-shadow:none!important}.tooltip[data-v-6102fa3a],.tooltip[data-v-6102fa3a]:after{pointer-events:none;position:absolute}.tooltip[data-v-6102fa3a]{text-align:center;width:150px;font-size:14px;line-height:1.2;bottom:calc(100% + var(--yoffset));left:calc(50% + var(--xoffset));margin-bottom:5px;transform:translate(-50%);padding:7px;border-radius:3px;background-color:var(--tooltip-background);color:var(--points);z-index:100!important;word-break:break-word}.tooltip[data-v-6102fa3a] hr{margin:var(--feature-margin) 0}.shown[data-v-6102fa3a]{z-index:10}.fade-enter-from[data-v-6102fa3a],.fade-leave-to[data-v-6102fa3a]{opacity:0}.tooltip[data-v-6102fa3a]:after{content:" ";position:absolute;top:100%;bottom:100%;left:calc(50% - var(--xoffset));width:0;margin-left:-5px;border-width:5px;border-style:solid;border-color:var(--tooltip-background) transparent transparent transparent}.tooltip.left[data-v-6102fa3a],.side-nodes .tooltip[data-v-6102fa3a]:not(.right):not(.bottom):not(.top){bottom:calc(50% + var(--yoffset));left:unset;right:calc(100% + var(--xoffset));margin-bottom:unset;margin-right:5px;transform:translateY(50%)}.tooltip.left[data-v-6102fa3a]:after,.side-nodes .tooltip[data-v-6102fa3a]:not(.right):not(.bottom):not(.top):after{top:calc(50% + var(--yoffset));bottom:unset;left:100%;right:100%;margin-left:unset;margin-top:-5px;border-color:transparent transparent transparent var(--tooltip-background)}.tooltip.right[data-v-6102fa3a]{bottom:calc(50% + var(--yoffset));left:calc(100% + var(--xoffset));margin-bottom:unset;margin-left:5px;transform:translateY(50%)}.tooltip.right[data-v-6102fa3a]:after{top:calc(50% + var(--yoffset));left:0;right:100%;margin-left:-10px;margin-top:-5px;border-color:transparent var(--tooltip-background) transparent transparent}.tooltip.bottom[data-v-6102fa3a]{top:calc(100% + var(--yoffset));bottom:unset;left:calc(50% + var(--xoffset));margin-bottom:unset;margin-top:5px;transform:translate(-50%)}.tooltip.bottom[data-v-6102fa3a]:after{top:0;margin-top:-10px;border-color:transparent transparent var(--tooltip-background) transparent}.pinned[data-v-6102fa3a]{position:absolute;right:-5px;top:-5px;transform:rotate(45deg)}.info-modal-header{display:flex;margin:-20px -20px 0;background:var(--raised-background);align-items:center}.info-modal-header *{margin:0}.info-modal-logo{height:4em;width:4em}.info-modal-title{display:flex;flex-direction:column;padding:10px 0;margin-left:10px}.info-modal-discord-link{display:flex;align-items:center}.info-modal-discord{margin:0 4px 0 0}.header[data-v-a03c577c]{margin-bottom:-10px}*[data-v-a03c577c] .tooltip-container{display:inline;margin-left:5px}form[data-v-67b44a54]{margin:0;width:100%}.field>*[data-v-67b44a54]{margin:0}input[data-v-67b44a54]{width:50%;outline:none;border:solid 1px var(--outline);background-color:unset;border-radius:var(--border-radius)}.fullWidth[data-v-67b44a54]{width:100%}.container[data-v-2f8ef34c]{display:flex;align-items:center;background:var(--raised-background);box-shadow:var(--raised-background) 0 2px 3px 5px}.container.confirming button[data-v-2f8ef34c]{font-size:1em}.container>*[data-v-2f8ef34c]{margin:0 4px}.danger,.button.danger{position:relative;border:solid 2px var(--danger);border-right-width:16px}.danger:after{position:absolute;content:"!";color:#fff;right:-13px}.feedback[data-v-01a1b95c]{position:relative}.feedback[data-v-01a1b95c]:after{position:absolute;left:calc(100% + 5px);top:50%;transform:translateY(-50%);content:"\2714";opacity:0;pointer-events:none;box-shadow:inset 0 0 0 35px #6f94b600;text-shadow:none}.feedback.left[data-v-01a1b95c]:after{left:unset;right:calc(100% + 5px)}.feedback.activated[data-v-01a1b95c]:after{animation:feedback-01a1b95c .5s ease-out forwards}@keyframes feedback-01a1b95c{0%{opacity:1;transform:scale3d(.4,.4,1),translateY(-50%)}80%{opacity:.1}to{opacity:0;transform:scale3d(1.2,1.2,1),translateY(-50%)}}.save[data-v-5285ac49]{position:relative;border:solid 4px var(--outline);padding:4px;background:var(--raised-background);margin:var(--feature-margin);display:flex;align-items:center;min-height:30px}.save.active[data-v-5285ac49]{border-color:var(--bought)}.open[data-v-5285ac49]{display:inline;margin:0;padding-left:0}.handle[data-v-5285ac49]{flex-grow:0;margin-right:8px;margin-left:0;cursor:pointer}.details[data-v-5285ac49]{margin:0 80px 0 0;flex-grow:1}.error[data-v-5285ac49]{font-size:.8em;color:var(--danger)}.save-version[data-v-5285ac49]{margin-left:4px;font-size:.7em;opacity:.7}.actions[data-v-5285ac49]{position:absolute;top:0;bottom:0;right:4px;display:flex;padding:4px;z-index:1}.editname[data-v-5285ac49]{margin:0}.save button{transition-duration:0s}.save .actions button{display:flex;font-size:1.2em}.save .actions button .material-icons{font-size:unset}.save .button.danger{display:flex;align-items:center;padding:4px}.save .field,.field form[data-v-3b9991aa],.field .field-title[data-v-3b9991aa],.field .field-buttons[data-v-3b9991aa]{margin:0}.field-buttons[data-v-3b9991aa]{display:flex}.field-buttons .field[data-v-3b9991aa]{margin:0 0 0 8px}.modal-footer[data-v-3b9991aa]{margin-top:-20px}.footer[data-v-3b9991aa]{display:flex;margin-top:20px}.importingFailed input{color:red}.field-buttons .v-select{width:220px}.presets .vue-select[aria-expanded=true] vue-dropdown{visibility:hidden}.nav[data-v-4a3f8425]{background-color:var(--raised-background);display:flex;left:0;right:0;top:0;height:46px;width:100%;border-bottom:4px solid var(--outline)}.nav>*[data-v-4a3f8425]{height:46px;width:46px;display:flex;cursor:pointer;flex-shrink:0}.nav>.banner[data-v-4a3f8425]{height:100%;width:unset}.overlay-nav[data-v-4a3f8425]{position:fixed;top:10px;left:10px;display:flex;flex-direction:column;z-index:2}.overlay-nav>*[data-v-4a3f8425]{height:50px;width:50px;display:flex;cursor:pointer;margin:0;align-items:center;justify-content:center}.title[data-v-4a3f8425]{font-size:36px;text-align:left;margin-left:12px;cursor:unset}.nav>.title[data-v-4a3f8425]{width:unset;flex-shrink:1;overflow:hidden;white-space:nowrap}.nav .saves[data-v-4a3f8425],.nav .info[data-v-4a3f8425]{display:flex}.tooltip-container[data-v-4a3f8425]{width:100%;height:100%;display:flex}.overlay-nav .discord[data-v-4a3f8425]{position:relative}.discord img[data-v-4a3f8425]{width:100%;height:100%}.discord-links[data-v-4a3f8425]{position:fixed;top:45px;padding:20px;right:-280px;width:200px;transition:right .25s ease;background:var(--raised-background);z-index:10}.overlay-nav .discord-links[data-v-4a3f8425]{position:absolute;left:-280px;right:unset;transition:left .25s ease}.overlay-nav .discord:hover .discord-links[data-v-4a3f8425]{left:-10px}.discord-links li[data-v-4a3f8425]{margin-bottom:4px}.discord-links li[data-v-4a3f8425]:first-child{font-size:1.2em}*:not(.overlay-nav) .discord:hover .discord-links[data-v-4a3f8425]{right:0}.material-icons[data-v-4a3f8425]{font-size:36px}.material-icons[data-v-4a3f8425]:hover{text-shadow:5px 0 10px var(--link),-3px 0 12px var(--foreground)}.nav .version-container[data-v-4a3f8425]{display:flex;height:25px;margin-bottom:0;margin-left:10px}.overlay-nav .version-container[data-v-4a3f8425]{width:unset;height:25px}.version[data-v-4a3f8425]{color:var(--points)}.version:hover span[data-v-4a3f8425]{text-shadow:5px 0 10px var(--points),-3px 0 12px var(--points)}.nav>div>a[data-v-4a3f8425],.overlay-nav>div>a[data-v-4a3f8425]{color:var(--foreground);text-shadow:none}.tabs-container[data-v-248e2ebb]{width:100vw;flex-grow:1;overflow-x:auto;overflow-y:hidden;display:flex}.tabs-container[data-v-248e2ebb]:not(.useHeader){width:calc(100vw - 50px);margin-left:50px}.tab[data-v-248e2ebb]{position:relative;height:100%;flex-grow:1;transition-duration:0s;overflow-y:auto;overflow-x:hidden}.inner-tab[data-v-248e2ebb]{padding:50px 10px;min-height:calc(100% - 100px);display:flex;flex-direction:column;margin:0;flex-grow:1}.tab+.tab>.inner-tab[data-v-248e2ebb]{border-left:solid 4px var(--outline)}.tab hr{height:4px;border:none;background:var(--outline);margin:var(--feature-margin) 0}.tab .modal-body hr{margin:7px 0}.game-over-modal-header[data-v-4a50ce42]{display:flex;margin:-20px -20px 0;background:var(--raised-background);align-items:center}.game-over-modal-header *[data-v-4a50ce42]{margin:0}.game-over-modal-logo[data-v-4a50ce42]{height:4em;width:4em}.game-over-modal-title[data-v-4a50ce42]{display:flex;flex-direction:column;padding:10px 0;margin-left:10px}.game-over-footer[data-v-4a50ce42]{display:flex;justify-content:flex-end}.game-over-footer button[data-v-4a50ce42]{margin:0 10px}.game-over-modal-discord-link[data-v-4a50ce42]{display:flex;align-items:center}.game-over-modal-discord[data-v-4a50ce42]{margin:0 4px 0 0}.nan-modal-header[data-v-3de07c06]{padding:10px 0;margin-left:10px}.nan-footer[data-v-3de07c06]{display:flex;justify-content:flex-end}.nan-footer button[data-v-3de07c06]{margin:0 10px}.nan-modal-discord-link[data-v-3de07c06]{display:flex;align-items:center}.nan-modal-discord[data-v-3de07c06]{margin:0 4px 0 0}.tpsDisplay[data-v-46a3ed5b]{position:absolute;left:10px;bottom:10px;z-index:100}.low[data-v-46a3ed5b]{color:var(--danger)}.fade-leave-to[data-v-46a3ed5b]{opacity:0}:root{color-scheme:dark}*{transition-duration:.5s;font-family:Roboto Mono,monospace;font-weight:700;margin:auto;text-size-adjust:none}*:focus{outline:none}body{overflow:hidden;transition:none;text-align:center}html,body,#app{min-height:100%;height:100%}h1,h2,h3,b,input{display:inline}button{color:#000}a,.button,.link{display:block;color:var(--link);background:none;border:none;cursor:pointer;text-decoration:none}a:hover,.button:hover,.link:hover{text-shadow:5px 0 10px var(--link),-3px 0 12px var(--link)}.button:disabled{opacity:.5;cursor:not-allowed}.button:disabled:hover{text-shadow:none}ul{list-style-type:none}.Vue-Toastification__toast{margin:unset}.app[data-v-7c41425b]{background-color:var(--background);color:var(--foreground);display:flex;flex-flow:column;min-height:100%;height:100%}#modal-root[data-v-7c41425b]{position:absolute;min-height:100%;height:100%} diff --git a/assets/index.e52f0501.js b/assets/index.e52f0501.js deleted file mode 100644 index 6e294f0..0000000 --- a/assets/index.e52f0501.js +++ /dev/null @@ -1,16 +0,0 @@ -/* empty css */import"./vue.92681fcb.js";import{Z as S,l as we,aa as L,t as O,ay as Nn,ar as Qt,aE as y,a0 as M,aK as ft,a1 as f,O as x,aG as gn,A as De,_ as G,a8 as u,b6 as U,b8 as Sn,bs as fs,C as o,aq as zt,bu as an,bb as Mn,T as oi,a7 as h,u as An,j as ri,bv as es,q as cn,b1 as ht,G as ke,aC as ps,w as nt,b2 as Xe,ao as ui,I as Ie,J,$ as E,aH as wt,aF as kt,z as ot,aN as ye,al as bn,aL as Ft,H as ci,aJ as hs,bn as di,br as mi,be as fi}from"./@vue.4ce677c2.js";import{c as gs}from"./nanoevents.1080beb7.js";import{L as Et}from"./lz-string.731cedc5.js";import{i as pi}from"./is-plain-object.906d88e8.js";import{Y as hi}from"./vue-next-select.a2bfab1d.js";import{s as gi,u as vs}from"./vue-toastification.6f567382.js";import{D as vi}from"./vuedraggable.7949458c.js";import{p as yi}from"./vue-textarea-autosize.35804eaf.js";import{v as bi,n as _i}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const wi=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const r of l.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerpolicy&&(l.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?l.credentials="include":i.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}};wi();const ki="modulepreload",ts={},Ci="./",_n=function(t,n){return!n||n.length===0?t():Promise.all(n.map(s=>{if(s=`${Ci}${s}`,s in ts)return;ts[s]=!0;const i=s.endsWith(".css"),l=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${l}`))return;const r=document.createElement("link");if(r.rel=i?"stylesheet":ki,i||(r.as="script",r.crossOrigin=""),r.href=s,document.head.appendChild(r),i)return new Promise((c,d)=>{r.addEventListener("load",c),r.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t())},Ni="./projInfo-schema.json",Si="Advent Incremental",Mi="An incremental game you play a day at a time, leading up to Christmas!",Ai="advent-incremental",Ii="thepaperpilot and friends",Ei="",Bi="",Pi="0.3",xi="Initial Commit",Fi=!0,Ti=!1,Ri=2,$i=!0,Di=null,Oi="",qi=["main"],Ui=3600,Vi=0,Li=!0,Gi="base64";var ae={$schema:Ni,title:Si,description:Mi,id:Ai,author:Ii,discordName:Ei,discordLink:Bi,versionNumber:Pi,versionTitle:xi,allowGoBack:Fi,defaultShowSmall:Ti,defaultDecimalsShown:Ri,useHeader:$i,banner:Di,logo:Oi,initialTabs:qi,maxTickLength:Ui,offlineLimit:Vi,enablePausing:Li,exportEncoding:Gi};const Rn=17,Hi=9e15,Qi=Math.log10(9e15),zi=1/9e15,ji=308,Ki=-324,ns=5,Wi=function(){const e=[];for(let n=Ki+1;n<=ji;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),Vt=[2,Math.E,3,4,5,6,7,8,9,10],Ji=[[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.1670905356972596,1.3632807444991446,1.5979222279405536,1.8842640123816674,2.2416069644878687,2.69893426559423,3.3012632110403577,4.121250340630164,5.281493033448316,7],[1,1.1736630594087796,1.379783782386201,1.6292821855668218,1.9378971836180754,2.3289975651071977,2.8384347394720835,3.5232708454565906,4.478242031114584,5.868592169644505,8],[1,1.1793017514670474,1.394054150657457,1.65664127441059,1.985170999970283,2.4069682290577457,2.9647310119960752,3.7278665320924946,4.814462547283592,6.436522247411611,9],[1,1.18422737399915,1.4066113788546144,1.680911177655277,2.027492094355525,2.4775152854601967,3.080455730250329,3.918234505962507,5.1332705696484595,6.9878696918072905,10]],Xi=[[-1,-.9194161097107025,-.8335625019330468,-.7425599821143978,-.6466611521029437,-.5462617907227869,-.4419033816638769,-.3342645487554494,-.224140440909962,-.11241087890006762,0],[-1,-.90603157029014,-.80786507256596,-.7064666939634,-.60294836853664,-.49849837513117,-.39430303318768,-.29147201034755,-.19097820800866,-.09361896280296,0],[-1,-.9021579584316141,-.8005762598234203,-.6964780623319391,-.5911906810998454,-.486050182576545,-.3823089430815083,-.28106046722897615,-.1831906535795894,-.08935809204418144,0],[-1,-.8917227442365535,-.781258746326964,-.6705130326902455,-.5612813129406509,-.4551067709033134,-.35319256652135966,-.2563741554088552,-.1651412821106526,-.0796919581982668,0],[-1,-.8843387974366064,-.7678744063886243,-.6529563724510552,-.5415870994657841,-.4352842206588936,-.33504449124791424,-.24138853420685147,-.15445285440944467,-.07409659641336663,0],[-1,-.8786709358426346,-.7577735191184886,-.6399546189952064,-.527284921869926,-.4211627631006314,-.3223479611761232,-.23107655627789858,-.1472057700818259,-.07035171210706326,0],[-1,-.8740862815291583,-.7497032990976209,-.6297119746181752,-.5161838335958787,-.41036238255751956,-.31277212146489963,-.2233976621705518,-.1418697367979619,-.06762117662323441,0],[-1,-.8702632331800649,-.7430366914122081,-.6213373075161548,-.5072025698095242,-.40171437727184167,-.30517930701410456,-.21736343968190863,-.137710238299109,-.06550774483471955,0],[-1,-.8670016295947213,-.7373984232432306,-.6143173985094293,-.49973884395492807,-.394584953527678,-.2989649949848695,-.21245647317021688,-.13434688362382652,-.0638072667348083,0],[-1,-.8641642839543857,-.732534623168535,-.6083127477059322,-.4934049257184696,-.3885773075899922,-.29376029055315767,-.2083678561173622,-.13155653399373268,-.062401588652553186,0]],p=function(t){return a.fromValue_noAlloc(t)},V=function(e,t,n){return a.fromComponents(e,t,n)},K=function(t,n,s){return a.fromComponents_noNormalize(t,n,s)},It=function(t,n){const s=n+1,i=Math.ceil(Math.log10(Math.abs(t))),l=Math.round(t*Math.pow(10,s-i))*Math.pow(10,i-s);return parseFloat(l.toFixed(Math.max(s-i,0)))},$n=function(e){return Math.sign(e)*Math.log10(Math.abs(e))},Yi=function(e){if(!isFinite(e))return e;if(e<-50)return e===Math.trunc(e)?Number.NEGATIVE_INFINITY:0;let t=1;for(;e<10;)t=t*e,++e;e-=1;let n=.9189385332046727;n=n+(e+.5)*Math.log(e),n=n-e;const s=e*e;let i=e;return n=n+1/(12*i),i=i*s,n=n+1/(360*i),i=i*s,n=n+1/(1260*i),i=i*s,n=n+1/(1680*i),i=i*s,n=n+1/(1188*i),i=i*s,n=n+691/(360360*i),i=i*s,n=n+7/(1092*i),i=i*s,n=n+3617/(122400*i),Math.exp(n)/t},ys=.5671432904097838,ss=function(e,t=1e-10){let n,s;if(!Number.isFinite(e)||e===0)return e;if(e===1)return ys;e<10?n=0:n=Math.log(e)-Math.log(Math.log(e));for(let i=0;i<100;++i){if(s=(e*Math.exp(-n)+n*n)/(n+1),Math.abs(s-n).5?1:-1;if(Math.random()*20<1)return K(t,0,1);const n=Math.floor(Math.random()*(e+1));let s=n===0?Math.random()*616-308:Math.random()*16;Math.random()>.9&&(s=Math.trunc(s));let i=Math.pow(10,s);return Math.random()>.9&&(i=Math.trunc(i)),V(t,n,i)}static affordGeometricSeries_core(e,t,n,s){const i=t.mul(n.pow(s));return C.floor(e.div(i).mul(n.sub(1)).add(1).log10().div(n.log10()))}static sumGeometricSeries_core(e,t,n,s){return t.mul(n.pow(s)).mul(C.sub(1,n.pow(e))).div(C.sub(1,n))}static affordArithmeticSeries_core(e,t,n,s){const l=t.add(s.mul(n)).sub(n.div(2)),r=l.pow(2);return l.neg().add(r.add(n.mul(e).mul(2)).sqrt()).div(n).floor()}static sumArithmeticSeries_core(e,t,n,s){const i=t.add(s.mul(n));return e.div(2).mul(i.mul(2).plus(e.sub(1).mul(n)))}static efficiencyOfPurchase_core(e,t,n){return e.div(t).add(e.div(n))}normalize(){if(this.sign===0||this.mag===0&&this.layer===0)return this.sign=0,this.mag=0,this.layer=0,this;if(this.layer===0&&this.mag<0&&(this.mag=-this.mag,this.sign=-this.sign),this.layer===0&&this.mag=Hi)return this.layer+=1,this.mag=t*Math.log10(e),this;for(;e0;)this.layer-=1,this.layer===0?this.mag=Math.pow(10,this.mag):(this.mag=t*Math.pow(10,e),e=Math.abs(this.mag),t=Math.sign(this.mag));return this.layer===0&&(this.mag<0?(this.mag=-this.mag,this.sign=-this.sign):this.mag===0&&(this.sign=0)),this}fromComponents(e,t,n){return this.sign=e,this.layer=t,this.mag=n,this.normalize(),this}fromComponents_noNormalize(e,t,n){return this.sign=e,this.layer=t,this.mag=n,this}fromMantissaExponent(e,t){return this.layer=1,this.sign=Math.sign(e),e=Math.abs(e),this.mag=t+Math.log10(e),this.normalize(),this}fromMantissaExponent_noNormalize(e,t){return this.fromMantissaExponent(e,t),this}fromDecimal(e){return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}fromNumber(e){return this.mag=Math.abs(e),this.sign=Math.sign(e),this.layer=0,this.normalize(),this}fromString(e){e=e.replace(",","");const t=e.split("^^^");if(t.length===2){const b=parseFloat(t[0]),g=parseFloat(t[1]),w=t[1].split(";");let k=1;if(w.length===2&&(k=parseFloat(w[1]),isFinite(k)||(k=1)),isFinite(b)&&isFinite(g)){const P=C.pentate(b,g,k);return this.sign=P.sign,this.layer=P.layer,this.mag=P.mag,this}}const n=e.split("^^");if(n.length===2){const b=parseFloat(n[0]),g=parseFloat(n[1]),w=n[1].split(";");let k=1;if(w.length===2&&(k=parseFloat(w[1]),isFinite(k)||(k=1)),isFinite(b)&&isFinite(g)){const P=C.tetrate(b,g,k);return this.sign=P.sign,this.layer=P.layer,this.mag=P.mag,this}}const s=e.split("^");if(s.length===2){const b=parseFloat(s[0]),g=parseFloat(s[1]);if(isFinite(b)&&isFinite(g)){const w=C.pow(b,g);return this.sign=w.sign,this.layer=w.layer,this.mag=w.mag,this}}e=e.trim().toLowerCase();let i,l,r=e.split("pt");if(r.length===2){i=10,l=parseFloat(r[0]),r[1]=r[1].replace("(",""),r[1]=r[1].replace(")","");let b=parseFloat(r[1]);if(isFinite(b)||(b=1),isFinite(i)&&isFinite(l)){const g=C.tetrate(i,l,b);return this.sign=g.sign,this.layer=g.layer,this.mag=g.mag,this}}if(r=e.split("p"),r.length===2){i=10,l=parseFloat(r[0]),r[1]=r[1].replace("(",""),r[1]=r[1].replace(")","");let b=parseFloat(r[1]);if(isFinite(b)||(b=1),isFinite(i)&&isFinite(l)){const g=C.tetrate(i,l,b);return this.sign=g.sign,this.layer=g.layer,this.mag=g.mag,this}}const c=e.split("e"),d=c.length-1;if(d===0){const b=parseFloat(e);if(isFinite(b))return this.fromNumber(b)}else if(d===1){const b=parseFloat(e);if(isFinite(b)&&b!==0)return this.fromNumber(b)}const m=e.split("e^");if(m.length===2){this.sign=1,m[0].charAt(0)=="-"&&(this.sign=-1);let b="";for(let g=0;g=43&&w<=57||w===101)b+=m[1].charAt(g);else return this.layer=parseFloat(b),this.mag=parseFloat(m[1].substr(g+1)),this.normalize(),this}}if(d<1)return this.sign=0,this.layer=0,this.mag=0,this;const v=parseFloat(c[0]);if(v===0)return this.sign=0,this.layer=0,this.mag=0,this;let _=parseFloat(c[c.length-1]);if(d>=2){const b=parseFloat(c[c.length-2]);isFinite(b)&&(_*=Math.sign(b),_+=$n(b))}if(!isFinite(v))this.sign=c[0]==="-"?-1:1,this.layer=d,this.mag=_;else if(d===1)this.sign=Math.sign(v),this.layer=1,this.mag=_+Math.log10(Math.abs(v));else if(this.sign=Math.sign(v),this.layer=d,d===2){const b=C.mul(V(1,2,_),p(v));return this.sign=b.sign,this.layer=b.layer,this.mag=b.mag,this}else this.mag=_;return this.normalize(),this}fromValue(e){return e instanceof C||e!=null&&typeof e=="object"&&"sign"in e&&"mag"in e&&"layer"in e?this.fromDecimal(e):typeof e=="number"?this.fromNumber(e):typeof e=="string"?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0,this)}toNumber(){return Number.isFinite(this.layer)?this.layer===0?this.sign*this.mag:this.layer===1?this.sign*Math.pow(10,this.mag):this.mag>0?this.sign>0?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0:Number.NaN}mantissaWithDecimalPlaces(e){return isNaN(this.m)?Number.NaN:this.m===0?0:It(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:this.mag===0?0:It(this.mag,e)}toString(){return isNaN(this.layer)||isNaN(this.sign)||isNaN(this.mag)?"NaN":this.mag===Number.POSITIVE_INFINITY||this.layer===Number.POSITIVE_INFINITY?this.sign===1?"Infinity":"-Infinity":this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toString():this.m+"e"+this.e:this.layer===1?this.m+"e"+this.e:this.layer<=ns?(this.sign===-1?"-":"")+"e".repeat(this.layer)+this.mag:(this.sign===-1?"-":"")+"(e^"+this.layer+")"+this.mag}toExponential(e){return this.layer===0?(this.sign*this.mag).toExponential(e):this.toStringWithDecimalPlaces(e)}toFixed(e){return this.layer===0?(this.sign*this.mag).toFixed(e):this.toStringWithDecimalPlaces(e)}toPrecision(e){return this.e<=-7?this.toExponential(e-1):e>this.e?this.toFixed(e-this.exponent-1):this.toExponential(e-1)}valueOf(){return this.toString()}toJSON(){return this.toString()}toStringWithDecimalPlaces(e){return this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toFixed(e):It(this.m,e)+"e"+It(this.e,e):this.layer===1?It(this.m,e)+"e"+It(this.e,e):this.layer<=ns?(this.sign===-1?"-":"")+"e".repeat(this.layer)+It(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+It(this.mag,e)}abs(){return K(this.sign===0?0:1,this.layer,this.mag)}neg(){return K(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?C.dZero:this.layer===0?V(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?C.dZero:this.layer===0?V(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?C.dZero:this.layer===0?V(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?C.dZero:this.layer===0?V(this.sign,0,Math.trunc(this.mag)):this}add(e){const t=p(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer)||this.sign===0)return t;if(t.sign===0)return this;if(this.sign===-t.sign&&this.layer===t.layer&&this.mag===t.mag)return K(0,0,0);let n,s;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(C.cmpabs(this,t)>0?(n=this,s=t):(n=t,s=this),n.layer===0&&s.layer===0)return p(n.sign*n.mag+s.sign*s.mag);const i=n.layer*Math.sign(n.mag),l=s.layer*Math.sign(s.mag);if(i-l>=2)return n;if(i===0&&l===-1){if(Math.abs(s.mag-Math.log10(n.mag))>Rn)return n;{const r=Math.pow(10,Math.log10(n.mag)-s.mag),c=s.sign+n.sign*r;return V(Math.sign(c),1,s.mag+Math.log10(Math.abs(c)))}}if(i===1&&l===0){if(Math.abs(n.mag-Math.log10(s.mag))>Rn)return n;{const r=Math.pow(10,n.mag-Math.log10(s.mag)),c=s.sign+n.sign*r;return V(Math.sign(c),1,Math.log10(s.mag)+Math.log10(Math.abs(c)))}}if(Math.abs(n.mag-s.mag)>Rn)return n;{const r=Math.pow(10,n.mag-s.mag),c=s.sign+n.sign*r;return V(Math.sign(c),1,s.mag+Math.log10(Math.abs(c)))}}plus(e){return this.add(e)}sub(e){return this.add(p(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const t=p(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer))return t;if(this.sign===0||t.sign===0)return K(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return K(this.sign*t.sign,0,1);let n,s;if(this.layer>t.layer||this.layer==t.layer&&Math.abs(this.mag)>Math.abs(t.mag)?(n=this,s=t):(n=t,s=this),n.layer===0&&s.layer===0)return p(n.sign*s.sign*n.mag*s.mag);if(n.layer>=3||n.layer-s.layer>=2)return V(n.sign*s.sign,n.layer,n.mag);if(n.layer===1&&s.layer===0)return V(n.sign*s.sign,1,n.mag+Math.log10(s.mag));if(n.layer===1&&s.layer===1)return V(n.sign*s.sign,1,n.mag+s.mag);if(n.layer===2&&s.layer===1){const i=V(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)).add(V(Math.sign(s.mag),s.layer-1,Math.abs(s.mag)));return V(n.sign*s.sign,i.layer+1,i.sign*i.mag)}if(n.layer===2&&s.layer===2){const i=V(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)).add(V(Math.sign(s.mag),s.layer-1,Math.abs(s.mag)));return V(n.sign*s.sign,i.layer+1,i.sign*i.mag)}throw Error("Bad arguments to mul: "+this+", "+e)}multiply(e){return this.mul(e)}times(e){return this.mul(e)}div(e){const t=p(e);return this.mul(t.recip())}divide(e){return this.div(e)}divideBy(e){return this.div(e)}dividedBy(e){return this.div(e)}recip(){return this.mag===0?C.dNaN:this.layer===0?V(this.sign,0,1/this.mag):V(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const t=p(e);return this.sign>t.sign?1:this.sign0?this.layer:-this.layer,s=t.mag>0?t.layer:-t.layer;return n>s?1:nt.mag?1:this.mag0?t:this}clamp(e,t){return this.max(e).min(t)}clampMin(e){return this.max(e)}clampMax(e){return this.min(e)}cmp_tolerance(e,t){const n=p(e);return this.eq_tolerance(n,t)?0:this.cmp(n)}compare_tolerance(e,t){return this.cmp_tolerance(e,t)}eq_tolerance(e,t){const n=p(e);if(t==null&&(t=1e-7),this.sign!==n.sign||Math.abs(this.layer-n.layer)>1)return!1;let s=this.mag,i=n.mag;return this.layer>n.layer&&(i=$n(i)),this.layer0?V(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):V(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?C.dNaN:this.layer>0?V(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):V(this.sign,0,Math.log10(this.mag))}log(e){return e=p(e),this.sign<=0||e.sign<=0||e.sign===1&&e.layer===0&&e.mag===1?C.dNaN:this.layer===0&&e.layer===0?V(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):C.div(this.log10(),e.log10())}log2(){return this.sign<=0?C.dNaN:this.layer===0?V(this.sign,0,Math.log2(this.mag)):this.layer===1?V(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?V(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):V(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?C.dNaN:this.layer===0?V(this.sign,0,Math.log(this.mag)):this.layer===1?V(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?V(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):V(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const t=p(e),n=this,s=t;if(n.sign===0)return s.eq(0)?K(1,0,1):n;if(n.sign===1&&n.layer===0&&n.mag===1)return n;if(s.sign===0)return K(1,0,1);if(s.sign===1&&s.layer===0&&s.mag===1)return n;const i=n.absLog10().mul(s).pow10();return this.sign===-1?Math.abs(s.toNumber()%2)%2===1?i.neg():Math.abs(s.toNumber()%2)%2===0?i:C.dNaN:i}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return C.dNaN;let e=this;if(e.layer===0){const t=Math.pow(10,e.sign*e.mag);if(Number.isFinite(t)&&Math.abs(t)>=.1)return V(1,0,t);if(e.sign===0)return C.dOne;e=K(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?V(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?V(-e.sign,e.layer+1,-e.mag):C.dOne}pow_base(e){return p(e).pow(this)}root(e){const t=p(e);return this.pow(t.recip())}factorial(){return this.mag<0?this.add(1).gamma():this.layer===0?this.add(1).gamma():this.layer===1?C.exp(C.mul(this,C.ln(this).sub(1))):C.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(K(1,0,24)))return p(Yi(this.sign*this.mag));const e=this.mag-1;let t=.9189385332046727;t=t+(e+.5)*Math.log(e),t=t-e;const n=e*e;let s=e,i=12*s,l=1/i,r=t+l;if(r===t||(t=r,s=s*n,i=360*s,l=1/i,r=t-l,r===t))return C.exp(t);t=r,s=s*n,i=1260*s;let c=1/i;return t=t+c,s=s*n,i=1680*s,c=1/i,t=t-c,C.exp(t)}else return this.layer===1?C.exp(C.mul(this,C.ln(this).sub(1))):C.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?C.dOne:this.layer===0&&this.mag<=709.7?p(Math.exp(this.sign*this.mag)):this.layer===0?V(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?V(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):V(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return p(Math.sqrt(this.sign*this.mag));if(this.layer===1)return V(1,2,Math.log10(this.mag)-.3010299956639812);{const e=C.div(K(this.sign,this.layer-1,this.mag),K(1,0,2));return e.layer+=1,e.normalize(),e}}cube(){return this.pow(3)}cbrt(){return this.pow(1/3)}tetrate(e=2,t=K(1,0,1)){if(e===1)return C.pow(this,t);if(e===0)return new C(t);if(this.eq(C.dOne))return C.dOne;if(this.eq(-1))return C.pow(this,t);if(e===Number.POSITIVE_INFINITY){const i=this.toNumber();if(i<=1.444667861009766&&i>=.06598803584531254){if(i>1.444667861009099)return new C(Math.E);const l=C.ln(this).neg();return l.lambertw().div(l)}else return i>1.444667861009766?new C(Number.POSITIVE_INFINITY):C.dNaN}if(this.eq(C.dZero)){let i=Math.abs((e+1)%2);return i>1&&(i=2-i),new C(i)}if(e<0)return C.iteratedlog(t,this,-e);t=p(t);const n=e;e=Math.trunc(e);const s=n-e;if(this.gt(C.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let i=0;i3)return K(t.sign,t.layer+(e-i-1),t.mag);if(i>1e4)return t}return t}iteratedexp(e=2,t=K(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return C.tetrate(e,-t,this);e=p(e);let n=p(this);const s=t;t=Math.trunc(t);const i=s-t;if(n.layer-e.layer>3){const l=Math.min(t,n.layer-e.layer-3);t-=l,n.layer-=l}for(let l=0;l1e4)return n}return i>0&&i<1&&(e.eq(10)?n=n.layeradd10(-i):n=n.layeradd(-i,e)),n}slog(e=10){if(e=p(e),e.lte(C.dZero)||e.eq(C.dOne))return C.dNaN;if(e.lt(C.dOne))return this.eq(C.dOne)?C.dZero:this.eq(C.dZero)?C.dNegOne:C.dNaN;if(this.mag<0||this.eq(C.dZero))return C.dNegOne;let t=0,n=p(this);if(n.layer-e.layer>3){const s=n.layer-e.layer-3;t+=s,n.layer-=s}for(let s=0;s<100;++s)if(n.lt(C.dZero))n=C.pow(e,n),t-=1;else{if(n.lte(C.dOne))return p(t+C.slog_critical(e.toNumber(),n.toNumber()));t+=1,n=C.log(n,e)}return p(t)}static slog_critical(e,t){return e>10?t-1:C.critical_section(e,t,Xi)}static tetrate_critical(e,t){return C.critical_section(e,t,Ji)}static critical_section(e,t,n){t*=10,t<0&&(t=0),t>10&&(t=10),e<2&&(e=2),e>10&&(e=10);let s=0,i=0;for(let c=0;ce){const d=(e-Vt[c])/(Vt[c+1]-Vt[c]);s=n[c][Math.floor(t)]*(1-d)+n[c+1][Math.floor(t)]*d,i=n[c][Math.ceil(t)]*(1-d)+n[c+1][Math.ceil(t)]*d;break}const l=t-Math.floor(t);return s*(1-l)+i*l}layeradd10(e){e=C.fromValue_noAlloc(e).toNumber();const t=p(this);if(e>=1){t.mag<0&&t.layer>0?(t.sign=0,t.mag=0,t.layer=0):t.sign===-1&&t.layer==0&&(t.sign=1,t.mag=-t.mag);const n=Math.trunc(e);e-=n,t.layer+=n}if(e<=-1){const n=Math.trunc(e);if(e-=n,t.layer+=n,t.layer<0)for(let s=0;s<100;++s){if(t.layer++,t.mag=Math.log10(t.mag),!isFinite(t.mag))return t.sign===0&&(t.sign=1),t.layer<0&&(t.layer=0),t.normalize();if(t.layer>=0)break}}for(;t.layer<0;)t.layer++,t.mag=Math.log10(t.mag);return t.sign===0&&(t.sign=1,t.mag===0&&t.layer>=1&&(t.layer-=1,t.mag=1)),t.normalize(),e!==0?t.layeradd(e,10):t}layeradd(e,t){const s=this.slog(t).toNumber()+e;return s>=0?C.tetrate(t,s):Number.isFinite(s)?s>=-1?C.log(C.tetrate(t,s+1),t):C.log(C.log(C.tetrate(t,s+2),t),t):C.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return p(ss(this.toNumber()));if(this.layer===0)return p(ss(this.sign*this.mag));if(this.layer===1)return is(this);if(this.layer===2)return is(this);if(this.layer>=3)return K(this.sign,this.layer-1,this.mag);throw"Unhandled behavior in lambertw()"}ssqrt(){if(this.sign==1&&this.layer>=3)return K(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=K(1,0,1)){t=p(t);const n=e;e=Math.trunc(e);const s=n-e;s!==0&&(t.eq(C.dOne)?(++e,t=new C(s)):this.eq(10)?t=t.layeradd10(s):t=t.layeradd(s,this));for(let i=0;i10)return t}return t}sin(){return this.mag<0?this:this.layer===0?p(Math.sin(this.sign*this.mag)):K(0,0,0)}cos(){return this.mag<0?C.dOne:this.layer===0?p(Math.cos(this.sign*this.mag)):K(0,0,0)}tan(){return this.mag<0?this:this.layer===0?p(Math.tan(this.sign*this.mag)):K(0,0,0)}asin(){return this.mag<0?this:this.layer===0?p(Math.asin(this.sign*this.mag)):K(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?p(Math.acos(this.toNumber())):this.layer===0?p(Math.acos(this.sign*this.mag)):K(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?p(Math.atan(this.sign*this.mag)):p(Math.atan(this.sign*(1/0)))}sinh(){return this.exp().sub(this.negate().exp()).div(2)}cosh(){return this.exp().add(this.negate().exp()).div(2)}tanh(){return this.sinh().div(this.cosh())}asinh(){return C.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return C.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?K(Number.NaN,Number.NaN,Number.NaN):C.ln(this.add(1).div(p(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(C.pow(10,e))}egg(){return this.add(9)}lessThanOrEqualTo(e){return this.cmp(e)<1}lessThan(e){return this.cmp(e)<0}greaterThanOrEqualTo(e){return this.cmp(e)>-1}greaterThan(e){return this.cmp(e)>0}};let a=C;a.dZero=K(0,0,0);a.dOne=K(1,0,1);a.dNegOne=K(-1,0,1);a.dTwo=K(1,0,2);a.dTen=K(1,0,10);a.dNaN=K(Number.NaN,Number.NaN,Number.NaN);a.dInf=K(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);a.dNegInf=K(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);a.dNumberMax=V(1,0,Number.MAX_VALUE);a.dNumberMin=V(1,0,Number.MIN_VALUE);const Zi=new a(1);function nn(e,t,n=!0){let s=a.log10(e).floor(),i=a.div(e,a.pow(10,s));i.toStringWithDecimalPlaces(t)==="10"&&(i=Zi,s=s.add(1));const l=s.gte(1e9)?Ye(s,Math.max(Math.max(t,3),ae.defaultDecimalsShown)):s.gte(1e4)?wn(s,0):s.toStringWithDecimalPlaces(0);return n?i.toStringWithDecimalPlaces(t)+"e"+l:"e"+l}function wn(e,t){if(e==null)return"NaN";if(e=new a(e),e.mag<.001)return 0 .toFixed(t);const s=e.toStringWithDecimalPlaces(t).split(".");return s[0]=s[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),s.length==1?s[0]:s[0]+"."+s[1]}function bs(e,t){return e==null?"NaN":(e=new a(e),e.mag<1e-4?0 .toFixed(t):(e.mag<.1&&t!==0&&(t=Math.max(Math.max(t,e.log10().negate().ceil().toNumber()),ae.defaultDecimalsShown)),e.toStringWithDecimalPlaces(t)))}const ea=new a("eeee1000"),ta=new a("e100000"),as=new a("e1000"),_s=new a(1e9),na=new a(1e6),sa=new a(1e3),ia=new a(.98),aa=new a(.001),ws=new a(0);function Ye(e,t,n){if(t==null&&(t=ae.defaultDecimalsShown),n=n!=null?n:ae.defaultShowSmall,e=new a(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if(e.sign<0)return"-"+Ye(e.neg(),t);if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(ea)){const s=e.slog();return s.gte(na)?"F"+Ye(s.floor()):a.pow(10,s.sub(s.floor())).toStringWithDecimalPlaces(3)+"F"+wn(s.floor(),0)}else{if(e.gte(ta))return nn(e,0,!1);if(e.gte(as))return nn(e,0);if(e.gte(_s))return nn(e,t);if(e.gte(sa))return wn(e,0);if(e.gte(aa)||!n)return bs(e,t);if(e.eq(ws))return 0 .toFixed(t)}return e=Cs(e),e.lt(as)?nn(e,t).replace(/([^(?:e|F)]*)$/,"-$1"):Ye(e,t)+"\u207B\xB9"}function Ge(e){return e=new a(e),e.sign<0?"-"+Ge(e.neg()):e.gte(_s)||e.lte(ia)&&!e.eq(ws)?Ye(e):Ye(e,0)}function ks(e){return a.lt(e,0)?"-"+ks(a.neg(e)):a.gt(e,2**51)?Ye(a.div(e,31536e3))+"y":(e=new a(e).toNumber(),e<60?Ye(e)+"s":e<3600?Ge(Math.floor(e/60))+"m "+Ye(e%60)+"s":e<86400?Ge(Math.floor(e/3600))+"h "+Ge(Math.floor(e/60)%60)+"m "+Ge(e%60)+"s":e<31536e3?Ge(Math.floor(e/84600)%365)+"d "+Ge(Math.floor(e/3600)%24)+"h "+Ge(Math.floor(e/60)%60)+"m":Ge(Math.floor(e/31536e3))+"y "+Ge(Math.floor(e/84600)%365)+"d "+Ge(Math.floor(e/3600)%24)+"h")}function la(e,t,n){e=new a(e);let s=e.toStringWithDecimalPlaces(t);return new a(s).gte(n)&&(s=a.sub(n,Math.pow(.1,t)).toStringWithDecimalPlaces(t)),s}function oa(e,t){return Ye(e,t,!0)}function Cs(e){let t=a.log10(e).ceil();const n=a.div(e,a.pow(10,t));return t=t.neg(),e=new a(10).pow(t).times(n),e}function ra(e,t){let n=e[0][0],s=e[0][1];for(let i=1;i(e.Up="Up",e.Down="Down",e.Left="Left",e.Right="Right",e.Default="Up",e))(ie||{});const ln=Symbol("DoNotCache");function F(e,t){const n=e[t];Dn(n)&&n.length===0&&!n[ln]?e[t]=S(n.bind(e)):Dn(n)&&(e[t]=n.bind(e),e[t][ln]=!0)}function Re(e){return Dn(e)&&!e[ln]&&(e=S(e)),e}const Rt=Symbol("Component"),$t=Symbol("GatherProps");let ga=0;function Yt(e="feature-"){return e+ga++}var Ee=(e=>(e[e.Visible=0]="Visible",e[e.Hidden=1]="Hidden",e[e.None=2]="None",e))(Ee||{});function T(e){return e[ln]=!0,e}function H(e,t=2){return e?0:t}function $e(e,t,n){e[t]===void 0&&n!=null&&(e[t]=n)}function Ms(e,...t){const n=[],s=i=>{Object.keys(i).forEach(l=>{const r=i[l];r&&typeof r=="object"&&(t.includes(r.type)?n.push(r):!(r instanceof a)&&!we(r)&&s(r))})};return s(e),n}const Lt={variables:{"--foreground":"#dfdfdf","--background":"#0f0f0f","--feature-foreground":"#0f0f0f","--tooltip-background":"rgba(0, 0, 0, 0.75)","--raised-background":"#0f0f0f","--points":"#ffffff","--locked":"#bf8f8f","--highlighted":"#333","--bought":"#77bf5f","--danger":"rgb(220, 53, 69)","--link":"#02f2f2","--outline":"#dfdfdf","--accent1":"#627a82","--accent2":"#658262","--accent3":"#7c6282","--border-radius":"15px","--modal-border":"solid 2px var(--color)","--feature-margin":"0px"},floatingTabs:!0,mergeAdjacent:!0,showPin:!0};var qn=(e=>(e.Classic="classic",e.Paper="paper",e.Nordic="nordic",e.Aqua="aqua",e))(qn||{}),dn={classic:Lt,paper:{...Lt,variables:{...Lt.variables,"--background":"#2a323d","--feature-foreground":"#000","--raised-background":"#333c4a","--locked":"#3a3e45","--bought":"#5C8A58","--outline":"#333c4a","--border-radius":"4px","--modal-border":"","--feature-margin":"5px"},floatingTabs:!1},nordic:{...Lt,variables:{...Lt.variables,"--foreground":"#D8DEE9","--background":"#2E3440","--feature-foreground":"#000","--raised-background":"#3B4252","--points":"#E5E9F0","--locked":"#4c566a","--highlighted":"#434c5e","--bought":"#8FBCBB","--danger":"#D08770","--link":"#88C0D0","--outline":"#3B4252","--accent1":"#B48EAD","--accent2":"#A3BE8C","--accent3":"#EBCB8B","--border-radius":"4px","--modal-border":"solid 2px #3B4252","--feature-margin":"5px"},floatingTabs:!1},aqua:{...Lt,variables:{...Lt.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}};const Ce=gs();document.fonts.onloadingdone=()=>Ce.emit("fontsLoaded");var va=Object.freeze(Object.defineProperty({__proto__:null,globalBus:Ce},Symbol.toStringTag,{value:"Module"}));var ne=(e,t)=>{const n=e.__vccOpts||e;for(const[s,i]of t)n[s]=i;return n};const ya=L({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var v;const n=O({}),s=new ResizeObserver(c),i=O(null);Nn(()=>{const _=i.value;_!=null&&s.observe(_)});let l=!0,r=O((v=i.value)==null?void 0:v.getBoundingClientRect());function c(){l&&(l=!1,Qt(()=>{var _;r.value=(_=i.value)==null?void 0:_.getBoundingClientRect(),Object.values(n.value).filter(b=>b).forEach(b=>b.rect=b.element.getBoundingClientRect()),t("updateNodes",n.value),l=!0}))}Ce.on("fontsLoaded",c);const d={attributes:!1,childList:!0,subtree:!1};gn(Un,(_,b)=>{const g=new MutationObserver(()=>m(_));g.observe(b,d),n.value[_]={element:b,observer:g,rect:b.getBoundingClientRect()},c()}),gn(Vn,_=>{var b;(b=n.value[_])==null||b.observer.disconnect(),n.value[_]=void 0,c()}),gn(Ln,n),gn(Gn,r);function m(_){const b=n.value[_];b!=null&&(b.rect=b.element.getBoundingClientRect(),t("updateNodes",n.value))}return(_,b)=>(y(),M(x,null,[ft(_.$slots,"default",{},void 0,!0),f("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var As=ne(ya,[["__scopeId","data-v-2b1dc1bc"]]);const ba=["onPointerdown"],_a={class:"modal-wrapper"},wa={class:"modal-container"},ka={class:"modal-header"},Ca=h(" default header "),Na={class:"modal-body"},Sa=h(" default body "),Ma={class:"modal-footer"},Aa=f("div",{class:"modal-default-flex-grow"},null,-1),rt=L({__name:"Modal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){const i=De(e),l=S(()=>i.modelValue||c.value);function r(){n("update:modelValue",!1)}const c=O(!1),d=O(null),m=S(()=>{var v,_;return(_=(v=d.value)==null?void 0:v.nodes)!=null?_:null});return t({isOpen:l,nodes:m}),(v,_)=>(y(),G(oi,{to:"#modal-root"},[u(Mn,{name:"modal",onBeforeEnter:_[0]||(_[0]=b=>c.value=!0),onAfterLeave:_[1]||(_[1]=b=>c.value=!1)},{default:U(()=>[Sn(f("div",zt({class:"modal-mask",onPointerdown:an(r,["self"])},v.$attrs),[f("div",_a,[f("div",wa,[f("div",ka,[ft(v.$slots,"header",{shown:o(l)},()=>[Ca])]),f("div",Na,[u(As,{ref_key:"contextRef",ref:d},{default:U(()=>[ft(v.$slots,"body",{shown:o(l)},()=>[Sa])]),_:3},512)]),f("div",Ma,[ft(v.$slots,"footer",{shown:o(l)},()=>[f("div",{class:"modal-default-footer"},[Aa,f("button",{class:"button modal-default-button",onClick:r}," Close ")])])])])])],16,ba),[[fs,e.modelValue]])]),_:3})]))}}),Un=Symbol("RegisterNode"),Vn=Symbol("UnregisterNode"),Ln=Symbol("Nodes"),Gn=Symbol("Bounds"),Ue=An({});window.layers=Ue;const Wt={},it=[];function Dt(e,t){return ze(()=>{const n={},s=n.emitter=gs();if(n.on=s.on.bind(s),n.emit=s.emit.bind(s),n.nodes=O({}),n.id=e,it.push(e),Wt[e]=new Set,n.minimized=Pe(!1),Object.assign(n,t.call(n)),it[it.length-1]==null||it[it.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen -Stack: ${it} -Trying to pop ${n.id}`;return it.pop(),F(n,"color"),F(n,"display"),F(n,"name"),$e(n,"name",n.id),F(n,"minWidth"),$e(n,"minWidth",600),F(n,"minimizable"),$e(n,"minimizable",!0),n})}function Is(e,t){if(console.info("Adding layer",e.id),Ue[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,Ue[e.id]);return}$e(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),Ue[e.id]=e,Ce.emit("addLayer",e,t.layers[e.id])}function Ia(e){return Ue[e]}function Es(e){console.info("Removing layer",e.id),Ce.emit("removeLayer",e),Ue[e.id]=void 0}function Ea(e){Es(e),Is(e,q)}function Ba(e){const t=O(!1);return{openModal:()=>t.value=!0,modal:T(()=>u(rt,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>u("h2",null,[o(e.name)]),body:o(e.display)}))}}Ce.on("update",function(t){Object.values(Ue).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(Ue).forEach(n=>{n==null||n.emit("update",t)}),Object.values(Ue).forEach(n=>{n==null||n.emit("postUpdate",t)})});var Pa=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Un,UnregisterNodeInjectionKey:Vn,NodesInjectionKey:Ln,BoundsInjectionKey:Gn,layers:Ue,persistentRefs:Wt,addingLayers:it,createLayer:Dt,addLayer:Is,getLayer:Ia,removeLayer:Es,reloadLayer:Ea,setupLayerModal:Ba},Symbol.toStringTag,{value:"Module"}));const Hn=Symbol("PersistentState"),xt=Symbol("DefaultValue"),kn=Symbol("StackTrace"),Bs=Symbol("Deleted"),on=Symbol("NonPersistent"),sn=Symbol("SaveDataPath");function xa(){var e;return((e=new Error().stack)==null?void 0:e.split(` -`).slice(3,5).map(t=>t.trim()).join(` -`))||""}function Pe(e){const t=we(e)?e:O(e);t[Hn]=t,t[xt]=we(e)?e.value:e,t[kn]=xa(),t[Bs]=!1;const n=S({get(){return t.value},set(s){t.value=s}});return n[xt]=t[xt],t[on]=n,t[sn]=void 0,it.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,` -Created at: -`+t[kn]):Wt[it[it.length-1]].add(t),t}function Fa(e){return e&&typeof e=="object"&&Hn in e}function Z(e){return e[on]}Ce.on("addLayer",(e,t)=>{const n=[],s=(i,l=[])=>{let r=!1;return Object.keys(i).forEach(c=>{let d=i[c];if(d&&typeof d=="object")if(fe in d&&(d=d[fe]),Fa(d)){if(r=!0,d[Bs]){console.warn("Deleted persistent ref present in returned object. Ignoring...",d,` -Created at: -`+d[kn]);return}Wt[e.id].delete(d);const m=[e.id,...l,c];d[sn]!=null&&JSON.stringify(m)!==JSON.stringify(d[sn])&&console.error(`Persistent ref is being saved to \`${m.join(".")}\` when it's already present at \`${d[sn].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,d),d[sn]=m;const v=l.reduce((b,g)=>(g in b||(b[g]={}),b[g]),t),_=v[c];v[c]=d[Hn],ri(v)?_!=null?v[c]=_:v[c]=d[xt]:_!=null?v[c].value=_:v[c].value=d[xt]}else!(d instanceof a)&&!we(d)&&!n.includes(d)&&(typeof d.type=="symbol"&&n.push(d),s(d,[...l,c])&&(es(d)&&!es(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.",fe in i?i[fe]:i,c):r=!0))}),r};s(e[fe]),Wt[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[kn])}),Wt[e.id].clear()});const fe=Symbol("ProxyState"),Kt=Symbol("ProxyPath");function ze(e,t={}){const n=t;let s=!1;function i(){return s||(Object.assign(n,e(n)),s=!0),n}return new Proxy(n,{get(l,r){if(r===fe)return i();const c=i()[r];return c&&typeof c=="object"&&on in c?c[on]:c},set(l,r,c){return i()[r]=c,!0},has(l,r){return r===fe?!0:Reflect.has(i(),r)},ownKeys(){return Reflect.ownKeys(i())},getOwnPropertyDescriptor(l,r){return s||(Object.assign(n,e(n)),s=!0),Object.getOwnPropertyDescriptor(l,r)}})}var ge=window.state=An({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Ps=cn({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function xs(e){return JSON.stringify(e,(t,n)=>o(n))}const Fs={get(e,t){var s;if(t===fe||t===Kt)return e[t];const n=e[fe][t];if(t!=="value"&&(pi(n)||Array.isArray(n))){if(n!==((s=e[t])==null?void 0:s[fe])){const i=[...e[Kt],t];e[t]=new Proxy({[fe]:n,[Kt]:i},Fs)}return e[t]}return n},set(e,t,n,s){if(!ge.hasNaN&&(typeof n=="number"&&isNaN(n)||n instanceof a&&(isNaN(n.sign)||isNaN(n.layer)||isNaN(n.mag)))){const i=e[fe][t];if(!(typeof i=="number"&&isNaN(i)||i instanceof a&&(isNaN(i.sign)||isNaN(i.layer)||isNaN(i.mag))))throw Ps.autosave=!1,ge.hasNaN=!0,ge.NaNPath=[...e[Kt],t],ge.NaNReceiver=s,console.error("Attempted to set NaN value",[...e[Kt],t],e[fe]),"Attempted to set NaN value. See above for details"}return e[fe][t]=n,!0},ownKeys(e){return Reflect.ownKeys(e[fe])},has(e,t){return Reflect.has(e[fe],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[fe],t)}};var q=window.player=new Proxy({[fe]:Ps,[Kt]:["player"]},Fs);function Ts(e={}){return Object.assign({id:`${ae.id}-0`,name:"Default Save",tabs:ae.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:ae.id,modVersion:ae.versionNumber,layers:{}},e)}function at(e){const t=Et.compressToUTF16(xs(e!=null?e:q[fe]));return localStorage.setItem((e!=null?e:q[fe]).id,t),t}async function Ta(){$a();try{let e=localStorage.getItem(pe.active);if(e==null){await Gt(Jt());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Et.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==ae.id){await Gt(Jt());return}t.id=pe.active,await Gt(t)}catch(e){console.error(`Failed to load save. Falling back to new save. -`,e),await Gt(Jt())}}function Jt(){const e=yn(),t=Ts({id:e});return at(t),pe.saves.push(e),t}function yn(){let e,t=0;do e=`${ae.id}-${t++}`;while(localStorage.getItem(e));return e}async function Gt(e){console.info("Loading save",e);const{layers:t,removeLayer:n,addLayer:s}=await _n(()=>Promise.resolve().then(function(){return Pa}),void 0),{fixOldSave:i,getInitialLayers:l}=await _n(()=>Promise.resolve().then(function(){return ro}),void 0);for(const r in t){const c=t[r];c&&n(c)}l(e).forEach(r=>s(r,e)),e=Ts(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,ae.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==ae.versionNumber&&i(e.modVersion,e),Object.assign(q,e),pe.active=q.id,Ce.emit("onLoad")}setInterval(()=>{q.autosave&&at()},1e3);window.onbeforeunload=()=>{q.autosave&&at()};window.save=at;const Ra=window.hardReset=async()=>{await Gt(Jt())},rn=cn({active:"",saves:[],showTPS:!0,theme:qn.Nordic,unthrottled:!1});ht(rn,e=>{const t=Et.compressToUTF16(JSON.stringify(e));localStorage.setItem(ae.id,t)},{deep:!0});var pe=window.settings=rn;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:qn.Nordic};Ce.emit("loadSettings",e),Object.assign(rn,e),Ra()};function $a(){try{let e=localStorage.getItem(ae.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Et.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(rn,t)}Ce.emit("loadSettings",rn)}catch{}}const Rs=cn([]);function Da(e){Rs.push(e)}const $s=cn([]);function Oa(e){$s.push(e)}const qa=cn([]),Ua={class:"table"},Xt=L({__name:"Column",setup(e){const t=S(()=>dn[pe.theme].mergeAdjacent);return(n,s)=>(y(),M("div",Ua,[f("div",{class:ke(["col",{mergeAdjacent:o(t)}])},[ft(n.$slots,"default")],2)]))}}),Va={class:"table"},Ds=L({__name:"Row",setup(e){const t=S(()=>dn[pe.theme].mergeAdjacent);return(n,s)=>(y(),M("div",Va,[f("div",{class:ke(["row",{mergeAdjacent:o(t)}])},[ft(n.$slots,"default")],2)]))}});function Qn(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!ui(e)}function ee(e,t="span"){return typeof e=="function"?L({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}`),L({template:e})):L({render:()=>({})}):e}function de(e){if(_t(e))return typeof e=="function"?e():ee(e);const t=e[Rt];return u(t,e[$t](),null)}function qe(...e){let t;return u(Ds,null,Qn(t=e.map(de))?t:{default:()=>[t]})}function Os(...e){let t;return u(Xt,null,Qn(t=e.map(de))?t:{default:()=>[t]})}function lt(e){if(_t(e))return typeof e=="function"?e():typeof e=="string"?u(x,null,[e]):u(e,null,null);const t=e[Rt];return u(t,e[$t](),null)}function La(...e){let t;return u(Xt,null,Qn(t=e.map(lt))?t:{default:()=>[t]})}function _t(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[ln]===!0}function qs(e,t,n){const s=O(null),i=O(void 0);function l(d){s.value||(s.value=setInterval(c,250)),i.value=d,n&&(n.value=!0)}function r(){s.value&&(clearInterval(s.value),s.value=null),n&&(n.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(i.value)}return ps(r),{start:l,stop:r,handleHolding:c}}function Ga(e,t){const n=S(()=>e.filter(s=>o(s.visibility)===Ee.Visible&&t(s)));return{firstFeature:S(()=>n.value[0]),collapsedContent:T(()=>Os(...n.value.slice(1))),hasCollapsedContent:S(()=>n.value.length>1)}}function Cn(e,t="div"){const n=nt();return Xe(()=>{n.value=ee(Be(e),t)}),n}function Tt(e,t="div"){const n=nt(null);return Xe(()=>{const s=Be(e);n.value=s==null?null:ee(s,t)}),n}function Ha(e){return S(()=>Be(e))}function Be(e){return o(o(e))}function $(...e){return e.includes(Object)||e.push(Object),e}const ve=L({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(y(),M("div",{style:Ie({width:e.width,height:e.height})},null,4))}});const Qa={},za={class:"notif"};function ja(e,t){return y(),M("div",za,"!")}var ls=ne(Qa,[["render",ja],["__scopeId","data-v-66323fd4"]]);const En=e=>(wt("data-v-1a86f696"),e=e(),kt(),e),Ka={key:0,class:"day feature dontMerge opened"},Wa={class:"date"},Ja=h("Dec"),Xa=En(()=>f("br",null,null,-1)),Ya={class:"date"},Za=h("Dec"),el=En(()=>f("br",null,null,-1)),tl=En(()=>f("div",{class:"doors"},null,-1)),nl={class:"date"},sl=h("Dec"),il=En(()=>f("br",null,null,-1)),al={key:0,class:"material-icons lock"},ll=L({__name:"Day",props:{day:null,symbol:null,opened:null,recentlyUpdated:null,shouldNotify:null},emits:["openLore","openLayer","unlockLayer"],setup(e,{emit:t}){const n=e,s=S(()=>a.gte(z.day.value,n.day)&&new Date().getMonth()===11&&new Date().getDate()>=n.day);function i(){s.value&&t("unlockLayer")}return(l,r)=>e.opened.value?(y(),M("div",Ka,[u(Mn,{appear:"",name:"door"},{default:U(()=>[f("div",{class:"doors",onClick:r[0]||(r[0]=c=>t("openLayer"))},[f("div",Wa,[Ja,Xa,h(J(e.day),1)]),f("div",Ya,[Za,el,h(J(e.day),1)])])]),_:1}),f("div",{class:"icon",style:Ie({backgroundImage:`url(${e.symbol})`})},null,4),f("div",{class:"lore",onClick:r[1]||(r[1]=c=>t("openLore"))},"?"),o(e.shouldNotify)?(y(),G(ls,{key:0})):E("",!0)])):(y(),M("div",{key:1,class:ke(["day feature dontMerge",{can:o(s),locked:!o(s),canOpen:o(s)}]),onClick:i},[tl,f("div",nl,[sl,il,h(J(e.day),1)]),o(s)?E("",!0):(y(),M("div",al,"lock")),o(s)?(y(),G(ls,{key:1})):E("",!0)],2))}});var ol=ne(ll,[["__scopeId","data-v-1a86f696"]]);const rl=L({__name:"Collapsible",props:{collapsed:null,display:null,content:null},setup(e){const t=e,n=Cn(ot(t,"display")),s=Cn(ot(t,"content"));return(i,l)=>(y(),G(Xt,{class:"collapsible-container"},{default:U(()=>[f("button",{onClick:l[0]||(l[0]=r=>e.collapsed.value=!e.collapsed.value),class:"feature collapsible-toggle"},[(y(),G(ye(o(n))))]),e.collapsed.value?E("",!0):(y(),G(ye(o(s)),{key:0}))]),_:1}))}});var ul=ne(rl,[["__scopeId","data-v-a72c16aa"]]);const cl={key:0},dl={key:0,class:"mark star"},ml=["src"],fl=L({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(y(),M("div",cl,[e.mark===!0?(y(),M("div",dl)):(y(),M("img",{key:1,class:"mark",src:e.mark},null,8,ml))])):E("",!0)}});var Bn=ne(fl,[["__scopeId","data-v-2207999f"]]);const pl=L({__name:"Node",props:{id:null},setup(e){const n=De(e),s=bn(Un,()=>{}),i=bn(Vn,()=>{}),l=nt(null),r=S(()=>l.value&&l.value.parentElement);return ht([r,n.id],([c,d],[m,v])=>{m&&i(o(v)),c&&s(d,c)}),ps(()=>i(o(n.id))),(c,d)=>(y(),M("div",{class:"node",ref_key:"node",ref:l},null,512))}});var mn=ne(pl,[["__scopeId","data-v-a48cb382"]]);const hl=L({props:{progress:{type:$(String,Object,Number),required:!0},width:{type:$(Number),required:!0},height:{type:$(Number),required:!0},direction:{type:$(String),required:!0},display:$(Object,String,Function),visibility:{type:$(Number),required:!0},style:$(Object,String,Array),classes:$(Object),borderStyle:$(Object,String,Array),textStyle:$(Object,String,Array),baseStyle:$(Object,String,Array),fillStyle:$(Object,String,Array),mark:$(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Bn,Node:mn},setup(e){const{progress:t,width:n,height:s,direction:i,display:l}=De(e),r=S(()=>{let m=t.value instanceof a?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(m,0),1))*100}),c=S(()=>{const m={width:Be(n)+.5+"px",height:Be(s)+.5+"px"};switch(o(i)){case ie.Up:m.clipPath=`inset(${r.value}% 0% 0% 0%)`,m.width=Be(n)+1+"px";break;case ie.Down:m.clipPath=`inset(0% 0% ${r.value}% 0%)`,m.width=Be(n)+1+"px";break;case ie.Right:m.clipPath=`inset(0% ${r.value}% 0% 0%)`;break;case ie.Left:m.clipPath=`inset(0% 0% 0% ${r.value} + '%)`;break;case ie.Default:m.clipPath="inset(0% 50% 0% 0%)";break}return m}),d=Tt(l);return{normalizedProgress:r,barStyle:c,component:d,unref:o,Visibility:Ee}}});function gl(e,t,n,s,i,l){var d,m,v,_,b,g,w;const r=Ft("MarkNode"),c=Ft("Node");return e.unref(e.visibility)!==e.Visibility.None?(y(),M("div",{key:0,style:Ie([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px",visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(d=e.unref(e.style))!=null?d:{}]),class:ke({bar:!0,...e.unref(e.classes)})},[f("div",{class:"overlayTextContainer border",style:Ie([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(m=e.unref(e.borderStyle))!=null?m:{}])},[e.component?(y(),M("span",{key:0,class:"overlayText",style:Ie(e.unref(e.textStyle))},[(y(),G(ye(e.component)))],4)):E("",!0)],4),f("div",{class:"border",style:Ie([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(v=e.unref(e.style))!=null?v:{},(_=e.unref(e.baseStyle))!=null?_:{},(b=e.unref(e.borderStyle))!=null?b:{}])},[f("div",{class:"fill",style:Ie([e.barStyle,(g=e.unref(e.style))!=null?g:{},(w=e.unref(e.fillStyle))!=null?w:{}])},null,4)],4),u(r,{mark:e.unref(e.mark)},null,8,["mark"]),u(c,{id:e.id},null,8,["id"])],6)):E("",!0)}var vl=ne(hl,[["render",gl],["__scopeId","data-v-02d0d7b2"]]);const yl=Symbol("Bar");function un(e){return ze(()=>{const t=e();return t.id=Yt("bar-"),t.type=yl,t[Rt]=vl,F(t,"visibility"),$e(t,"visibility",Ee.Visible),F(t,"width"),F(t,"height"),F(t,"direction"),F(t,"style"),F(t,"classes"),F(t,"borderStyle"),F(t,"baseStyle"),F(t,"textStyle"),F(t,"fillStyle"),F(t,"progress"),F(t,"display"),F(t,"mark"),t[$t]=function(){const{progress:n,width:s,height:i,direction:l,display:r,visibility:c,style:d,classes:m,borderStyle:v,textStyle:_,baseStyle:b,fillStyle:g,mark:w,id:k}=this;return{progress:n,width:s,height:i,direction:l,display:r,visibility:c,style:o(d),classes:m,borderStyle:v,textStyle:_,baseStyle:b,fillStyle:g,mark:w,id:k}},t})}var bl=L({props:{display:{type:$(Object,String,Function),required:!0},visibility:{type:$(Number),required:!0},style:$(Object,String,Array),classes:$(Object),onClick:Function,onHold:Function,canClick:{type:$(Boolean),required:!0},small:Boolean,mark:$(Boolean,String),id:{type:String,required:!0},isHolding:Object},components:{Node:mn,MarkNode:Bn},setup(e){const{display:t,onClick:n,onHold:s}=De(e),i=nt("");Xe(()=>{const c=Be(t);if(c==null){i.value="";return}if(_t(c)){i.value=ee(c);return}const d=ee(c.title||"","h3"),m=ee(c.description,"div");i.value=ee(T(()=>u("span",null,[c.title?u("div",null,[u(d,null,null)]):null,u(m,null,null)])))});const{start:l,stop:r}=qs(n,s,e.isHolding);return{start:l,stop:r,comp:i,Visibility:Ee,unref:o}}});function _l(e,t,n,s,i,l){var d;const r=Ft("MarkNode"),c=Ft("Node");return e.unref(e.visibility)!==e.Visibility.None?(y(),M("button",{key:0,style:Ie([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(d=e.unref(e.style))!=null?d:[]]),onClick:t[0]||(t[0]=(...m)=>e.onClick&&e.onClick(...m)),onMousedown:t[1]||(t[1]=(...m)=>e.start&&e.start(...m)),onMouseleave:t[2]||(t[2]=(...m)=>e.stop&&e.stop(...m)),onMouseup:t[3]||(t[3]=(...m)=>e.stop&&e.stop(...m)),onTouchstartPassive:t[4]||(t[4]=(...m)=>e.start&&e.start(...m)),onTouchendPassive:t[5]||(t[5]=(...m)=>e.stop&&e.stop(...m)),onTouchcancelPassive:t[6]||(t[6]=(...m)=>e.stop&&e.stop(...m)),class:ke({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?(y(),G(ye(e.unref(e.comp)),{key:0})):E("",!0),u(r,{mark:e.unref(e.mark)},null,8,["mark"]),u(c,{id:e.id},null,8,["id"])],38)):E("",!0)}var Us=ne(bl,[["render",_l],["__scopeId","data-v-8cedd7da"]]);const wl=Symbol("Clickable");function Fe(e){return ze(()=>{var n;const t=(n=e==null?void 0:e())!=null?n:{};if(t.id=Yt("clickable-"),t.type=wl,t[Rt]=Us,t.isHolding=O(!1),F(t,"visibility"),$e(t,"visibility",Ee.Visible),F(t,"canClick"),$e(t,"canClick",!0),F(t,"classes"),F(t,"style"),F(t,"mark"),F(t,"display"),t.onClick){const s=t.onClick.bind(t);t.onClick=function(i){o(t.canClick)&&s(i)}}if(t.onHold){const s=t.onHold.bind(t);t.onHold=function(){o(t.canClick)&&s()}}return t[$t]=function(){const{display:s,visibility:i,style:l,classes:r,onClick:c,onHold:d,isHolding:m,canClick:v,small:_,mark:b,id:g}=this;return{display:s,visibility:i,style:o(l),classes:r,onClick:c,onHold:d,isHolding:m,canClick:v,small:_,mark:b,id:g}},t})}function pt(e,t="points",n=0,s=void 0){const i=we(e)?e:Pe(e);if(i.displayName=t,i.precision=n,i.small=s,!we(e)){const l=i[on];l.displayName=t,l.precision=n,l.small=s}return i}function kl(e){const t=Pe(e.value);return ht(e,(n,s)=>{a.gt(n,s)&&(t.value=a.add(t.value,a.sub(n,s)))}),t}new a("10^^8");new a("1e100");function fn(e,t){const n=t!=null?t:e.value;return a.eq(e.precision,0)?W(e.small?n:a.floor(n)):te(n,e.precision,e.small)}const Cl=["x1","y1","x2","y2"],Nl=L({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const n=De(e),s=S(()=>{const l=n.startNode.value.rect,r=n.boundingRect.value,c=r?{x:l.x+l.width/2-r.x,y:l.y+l.height/2-r.y}:{x:0,y:0};return n.link.value.offsetStart&&(c.x+=n.link.value.offsetStart.x,c.y+=n.link.value.offsetStart.y),c}),i=S(()=>{const l=n.endNode.value.rect,r=n.boundingRect.value,c=r?{x:l.x+l.width/2-r.x,y:l.y+l.height/2-r.y}:{x:0,y:0};return n.link.value.offsetEnd&&(c.x+=n.link.value.offsetEnd.x,c.y+=n.link.value.offsetEnd.y),c});return(l,r)=>(y(),M("line",zt({"stroke-width":"15px",stroke:"white"},e.link,{x1:o(s).x,y1:o(s).y,x2:o(i).x,y2:o(i).y}),null,16,Cl))}});const Sl=L({__name:"Links",props:{links:null},setup(e){var d;const n=ot(e,"links"),s=O(null),i=bn(Ln,O({})),l=bn(Gn,O(void 0)),r=O((d=s.value)==null?void 0:d.getBoundingClientRect());ht(l,()=>{var m;return r.value=(m=s.value)==null?void 0:m.getBoundingClientRect()}),Nn(()=>{var m;return r.value=(m=s.value)==null?void 0:m.getBoundingClientRect()});const c=S(()=>{var v,_;const m=i.value;return(_=(v=n.value)==null?void 0:v.filter(b=>{var g,w;return((g=m[b.startNode.id])==null?void 0:g.rect)&&((w=m[b.startNode.id])==null?void 0:w.rect)}))!=null?_:[]});return(m,v)=>(y(),M(x,null,[o(c)?(y(),M("svg",ci(zt({key:0},m.$attrs)),[(y(!0),M(x,null,hs(o(c),(_,b)=>(y(),G(Nl,{key:b,link:_,boundingRect:r.value,startNode:o(i)[_.startNode.id],endNode:o(i)[_.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):E("",!0),f("div",{ref_key:"resizeListener",ref:s,class:"resize-listener"},null,512)],64))}});var Ml=ne(Sl,[["__scopeId","data-v-063f6d6b"]]);L({props:{nodes:{type:$(Array),required:!0},leftSideNodes:$(Array),rightSideNodes:$(Array),branches:$(Array)},components:{Links:Ml},setup(e){const{nodes:t,leftSideNodes:n,rightSideNodes:s}=De(e),i=nt();Xe(()=>{const c=Be(t);i.value=ee(T(()=>u(x,null,[c.map(d=>u("span",{class:"row tree-row",style:"margin: 50px auto;"},[d.map(lt)]))])))});const l=nt();Xe(()=>{const c=Be(n);l.value=c?ee(T(()=>u("span",{class:"left-side-nodes small"},[c.map(lt)]))):""});const r=nt();return Xe(()=>{const c=Be(s);r.value=c?ee(T(()=>u("span",{class:"side-nodes small"},[c.map(lt)]))):""}),{unref:o,nodesComp:i,leftNodesComp:l,rightNodesComp:r}}});L({props:{display:$(Object,String,Function),visibility:{type:$(Number),required:!0},style:$(String,Object,Array),classes:$(Object),onClick:Function,onHold:Function,color:$(String),glowColor:$(String),canClick:{type:$(Boolean),required:!0},mark:$(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Bn,Node:mn},setup(e){const{onClick:t,onHold:n,display:s}=De(e),i=Tt(s),{start:l,stop:r}=qs(t,n);return{start:l,stop:r,comp:i,unref:o,Visibility:Ee,isCoercableComponent:_t}}});function zn(e){const t=[],n={};let s=!1;function i(){return s||(t.push(...e()),n.base=t.map(c=>Re(c.base)),n.baseText=t.map(c=>Re(c.baseText)),n.visible=t.map(c=>Re(c.visible)),s=!0),t}const l=Pe({});return[T(()=>{const c=i();let d=!0;const m=c.map((v,_)=>{var k,P,le;if(o(n.visible[_])===!1)return null;const b=u("h3",{onClick:()=>l.value[_]=!l.value[_],style:"cursor: pointer"},[u("span",{class:"modifier-toggle"+(o(l.value[_])?" collapsed":"")},[h("\u25BC")]),v.title,v.subtitle?u("span",{class:"subtitle"},[h(" ("),v.subtitle,h(")")]):null]),g=o(l.value[_])?null:u(x,null,[u("div",{class:"modifier-container"},[u("span",{class:"modifier-amount"},[te((k=o(n.base[_]))!=null?k:1),v.unit]),u("span",{class:"modifier-description"},[lt((P=o(n.baseText[_]))!=null?P:"Base")])]),lt(o(v.modifier.description))]),w=!d;return d=!1,u(x,null,[w?u("br",null,null):null,u("div",null,[b,u("br",null,null),g,u("hr",null,null),h("Total: "),te(v.modifier.apply((le=o(n.base[_]))!=null?le:1)),v.unit])])});return u(x,null,[m])}),l]}function Vs(e){const t=Object.values(e).reverse(),n=Pe(!0),s=S(()=>t.filter(d=>d.earned.value===!1)),{firstFeature:i,collapsedContent:l,hasCollapsedContent:r}=Ga(t,d=>d.earned.value),c=T(()=>{const d=[...s.value];return i.value&&d.push(i.value),La(...d,T(()=>Sn(u(ul,{collapsed:n,content:l,display:n.value?"Show other completed milestones":"Hide other completed milestones"},null),[[fs,o(r)]])))});return{collapseMilestones:n,display:c}}function Pn(e){const t=kl(e.resource),n=()=>{var c,d;if(z.day.value!==e.day)return 1;let l=a.add(t.value,1),r=e.goal;return((d=(c=e.usingLog)==null?void 0:c.value)!=null?d:q.usingLog)&&(l=l.log10(),r=a.log10(r)),a.div(l,r)},s=un(()=>({direction:ie.Right,width:600,height:25,fillStyle:{backgroundColor:e.color},textStyle:e.textColor?{color:e.textColor}:void 0,progress:n,display:T(()=>z.day.value===e.day?u(x,null,[Ge(t.value),h("/"),Ge(e.goal)]):"")})),i=T(()=>u(x,null,[u("div",null,[z.day.value===e.day?u(x,null,[h("Reach "),Ge(e.goal),h(" total "),e.resource.displayName,h(" to complete the day")]):u(x,null,[e.name,h(" Complete!")]),e.modal?u(x,null,[" ",h("-")," ",u("button",{class:"button",style:"display: inline-block;",onClick:()=>e.modal.show.value=!0},[h("Check Modifiers")])]):void 0]),de(s),e.modal?de(e.modal.display):void 0]));return Xe(()=>{z.day.value===e.day&&a.gte(t.value,e.goal)&&z.completeDay()}),{total:t,trackerDisplay:i}}const Al=Symbol("Buyable");function We(e){const t=Pe(0);return ze(()=>{var l,r,c;const n=e();if(n.canPurchase==null&&(n.resource==null||n.cost==null))throw console.warn("Cannot create buyable without a canPurchase property or a resource and cost property",n),"Cannot create buyable without a canPurchase property or a resource and cost property";n.id=Yt("buyable-"),n.type=Al,n[Rt]=Us,n.amount=t,n.amount[xt]=(l=n.initialValue)!=null?l:0,n.canAfford=S(()=>{const d=n,m=o(d.cost);return d.resource!=null&&m!=null&&a.gte(d.resource.value,m)}),n.canPurchase==null&&(n.canPurchase=S(()=>o(n.visibility)===Ee.Visible&&o(n.canAfford)&&a.lt(n.amount.value,o(n.purchaseLimit)))),n.maxed=S(()=>a.gte(n.amount.value,o(n.purchaseLimit))),F(n,"classes");const s=n.classes;n.classes=S(()=>{const d=o(s)||{};return n.maxed.value&&(d.bought=!0),d}),F(n,"canPurchase"),n.canClick=n.canPurchase,n.onClick=n.purchase=(c=(r=n.onClick)!=null?r:n.purchase)!=null?c:function(){var v;const d=n;if(!o(d.canPurchase))return;const m=o(d.cost);d.cost!=null&&d.resource!=null&&(d.resource.value=a.sub(d.resource.value,m),d.amount.value=a.add(d.amount.value,1)),(v=d.onPurchase)==null||v.call(d,m)},F(n,"display");const i=n.display;return n.display=T(()=>{const d=o(i);if(_t(d)){const m=ee(d);return u(m,null,null)}if(d!=null&&n.cost!=null&&n.resource!=null){const m=n,v=ee(d.title||"","h3"),_=ee(d.description||""),b=ee(d.effectDisplay||"");return u("span",null,[d.title?u("div",null,[u(v,null,null)]):null,d.description?u(_,null,null):null,d.showAmount===!1?null:u("div",null,[u("br",null,null),o(m.purchaseLimit)===a.dInf?u(x,null,[h("Amount: "),W(m.amount.value)]):u(x,null,[h("Amount: "),W(m.amount.value),h(" /")," ",W(o(m.purchaseLimit))])]),d.effectDisplay?u("div",null,[u("br",null,null),h("Currently: "),u(b,null,null)]):null,m.cost&&!m.maxed.value?u("div",null,[h("Cost: "),te(o(m.cost)||0)," ",n.resource.displayName]):null])}return""}),F(n,"visibility"),$e(n,"visibility",Ee.Visible),F(n,"cost"),F(n,"resource"),F(n,"purchaseLimit"),$e(n,"purchaseLimit",a.dInf),F(n,"style"),F(n,"mark"),F(n,"small"),n[$t]=function(){const{display:d,visibility:m,style:v,classes:_,onClick:b,canClick:g,small:w,mark:k,id:P}=this;return{display:d,visibility:m,style:o(v),classes:_,onClick:b,canClick:g,small:w,mark:k,id:P}},n})}const xn=An({}),jn=Symbol("Hotkey");function On(e){return ze(()=>{const t=e();return t.type=jn,F(t,"enabled"),$e(t,"enabled",!0),F(t,"description"),t})}Ce.on("addLayer",e=>{Ms(e,jn).forEach(t=>{xn[t.key]=t})});Ce.on("removeLayer",e=>{Ms(e,jn).forEach(t=>{xn[t.key]=void 0})});document.onkeydown=function(e){var s;if(((s=e.target)==null?void 0:s.tagName)==="INPUT"||Jn.value&&!q.keepGoing)return;let t=e.key;e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const n=xn[t];n&&o(n.enabled)&&(e.preventDefault(),n.onPress())};Oa(T(()=>{const e=Object.values(xn).filter(t=>o(t==null?void 0:t.enabled));return e.length===0?"":u("div",null,[u("br",null,null),u("h4",null,[h("Hotkeys")]),e.map(t=>u("div",null,[t==null?void 0:t.key,h(": "),t==null?void 0:t.description]))])}));const Il=L({__name:"Sticky",setup(e){const t=O("0"),n=new ResizeObserver(i),s=nt(null);function i(){let l=s.value;if(l==null)return;let r=0;for(;l.previousSibling;){const c=l.previousSibling;c.dataset&&"vSticky"in c.dataset&&(r+=c.offsetHeight),l=c}t.value=r+"px"}return Qt(i),document.fonts.ready.then(i),Nn(()=>{var r;const l=(r=s.value)==null?void 0:r.parentElement;l&&n.observe(l)}),(l,r)=>(y(),M("div",{class:"sticky",style:Ie({top:t.value}),ref_key:"element",ref:s,"data-v-sticky":""},[ft(l.$slots,"default",{},void 0,!0)],4))}});var El=ne(Il,[["__scopeId","data-v-cccac690"]]);const Bl=L({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,n=S(()=>fn(t.resource));return(s,i)=>(y(),M("h2",{style:Ie({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},J(o(n)),5))}});const Pl={class:"main-display"},xl={key:0},Fl={key:1},Tl=h(", "),Rl={key:2},$l=f("br",null,null,-1),Ht=L({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null,productionDisplay:null},setup(e){const n=De(e),s=O(null),i=Tt(n.effectDisplay),l=Tt(n.productionDisplay),r=S(()=>a.lt(n.resource.value,"1e1000"));return(c,d)=>(y(),G(El,null,{default:U(()=>{var m,v,_,b;return[f("div",{class:ke(["main-display-container",(m=e.classes)!=null?m:{}]),style:Ie([{height:`${((_=(v=s.value)==null?void 0:v.$el.clientHeight)!=null?_:0)+50}px`},(b=e.style)!=null?b:{}])},[f("div",Pl,[o(r)?(y(),M("span",xl,"You have ")):E("",!0),u(Bl,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),h(" "+J(e.resource.displayName),1),o(i)?(y(),M("span",Fl,[Tl,(y(),G(ye(o(i)),{ref_key:"effectRef",ref:s},null,512))])):E("",!0),o(l)?(y(),M("span",Rl,[$l,(y(),G(ye(o(l)),{ref_key:"effectRef",ref:s},null,512))])):E("",!0)])],6)]}),_:1}))}});var Dl=L({props:{display:{type:$(String,Object,Function),required:!0},visibility:{type:$(Number),required:!0},style:$(String,Object,Array),classes:$(Object),resource:Object,cost:$(String,Object,Number),canPurchase:{type:$(Boolean),required:!0},bought:{type:$(Boolean),required:!0},mark:$(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:mn,MarkNode:Bn},setup(e){const{display:t,cost:n}=De(e),s=nt("");return Xe(()=>{const i=Be(t);if(i==null){s.value="";return}if(_t(i)){s.value=ee(i);return}const l=Be(n),r=ee(i.title||"","h3"),c=ee(i.description,"div"),d=ee(i.effectDisplay||"");s.value=ee(T(()=>{var m;return u("span",null,[i.title?u("div",null,[u(r,null,null)]):null,u(c,null,null),i.effectDisplay?u("div",null,[h("Currently: "),u(d,null,null)]):null,e.resource!=null&&i.showCost!==!1?u(x,null,[u("br",null,null),h("Cost: "),e.resource&&fn(e.resource,l)," ",(m=e.resource)==null?void 0:m.displayName]):null])}))}),{component:s,unref:o,Visibility:Ee}}});const Ol=["disabled"];function ql(e,t,n,s,i,l){var d;const r=Ft("MarkNode"),c=Ft("Node");return e.unref(e.visibility)!==e.Visibility.None?(y(),M("button",{key:0,style:Ie([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(d=e.unref(e.style))!=null?d:{}]),onClick:t[0]||(t[0]=(...m)=>e.purchase&&e.purchase(...m)),class:ke({feature:!0,upgrade:!0,can:e.unref(e.canPurchase),locked:!e.unref(e.canPurchase),bought:e.unref(e.bought),...e.unref(e.classes)}),disabled:!e.unref(e.canPurchase)},[e.unref(e.component)?(y(),G(ye(e.unref(e.component)),{key:0})):E("",!0),u(r,{mark:e.unref(e.mark)},null,8,["mark"]),u(c,{id:e.id},null,8,["id"])],14,Ol)):E("",!0)}var Ul=ne(Dl,[["render",ql],["__scopeId","data-v-7f411ac8"]]);const Vl=Symbol("Upgrade");function ce(e){const t=Pe(!1);return ze(()=>{const n=e();return n.id=Yt("upgrade-"),n.type=Vl,n[Rt]=Ul,n.canAfford==null&&(n.resource==null||n.cost==null)&&console.warn("Error: can't create upgrade without a canAfford property or a resource and cost property",n),n.bought=t,n.canAfford==null?n.canAfford=S(()=>{const s=n;return s.resource!=null&&s.cost!=null&&a.gte(s.resource.value,o(s.cost))}):F(n,"canAfford"),n.canPurchase=S(()=>o(n.visibility)===Ee.Visible&&o(n.canAfford)&&!o(n.bought)),n.purchase=function(){var i;const s=n;!o(s.canPurchase)||(s.resource!=null&&s.cost!=null&&(s.resource.value=a.sub(s.resource.value,o(s.cost))),t.value=!0,(i=s.onPurchase)==null||i.call(s))},F(n,"visibility"),$e(n,"visibility",Ee.Visible),F(n,"classes"),F(n,"style"),F(n,"display"),F(n,"mark"),F(n,"cost"),F(n,"resource"),n[$t]=function(){const{display:s,visibility:i,style:l,classes:r,resource:c,cost:d,canPurchase:m,bought:v,mark:_,id:b,purchase:g}=this;return{display:s,visibility:i,style:o(l),classes:r,resource:c,cost:d,canPurchase:m,bought:v,mark:_,id:b,purchase:g}},n})}function oe(e){return ze(()=>{const{addend:t,description:n,enabled:s}=e(),i=Re(t),l=Re(n),r=s==null?void 0:Re(s);return{apply:c=>a.add(c,o(i)),revert:c=>a.sub(c,o(i)),enabled:r,description:n==null?void 0:T(()=>u("div",{class:"modifier-container"},[u("span",{class:"modifier-amount"},[a.gte(o(i),0)?"+":"",te(o(i))]),o(l)?u("span",{class:"modifier-description"},[lt(o(l))]):null]))}})}function D(e){return ze(()=>{const{multiplier:t,description:n,enabled:s}=e(),i=Re(t),l=Re(n),r=s==null?void 0:Re(s);return{apply:c=>a.times(c,o(i)),revert:c=>a.div(c,o(i)),enabled:r,description:n==null?void 0:T(()=>u("div",{class:"modifier-container"},[u("span",{class:"modifier-amount"},[h("x"),te(o(i))]),o(l)?u("span",{class:"modifier-description"},[lt(o(l))]):null]))}})}function Ls(e){return ze(()=>{const{exponent:t,description:n,enabled:s,supportLowNumbers:i}=e(),l=Re(t),r=Re(n),c=s==null?void 0:Re(s);return{apply:d=>{let m=d;return i&&(m=a.add(m,1)),m=a.pow(m,o(l)),i&&(m=a.sub(m,1)),m},revert:d=>{let m=d;return i&&(m=a.add(m,1)),m=a.root(m,o(l)),i&&(m=a.sub(m,1)),m},enabled:c,description:n==null?void 0:T(()=>u("div",{class:"modifier-container"},[u("span",{class:"modifier-amount"},[h("^"),te(o(l))]),o(r)?u("span",{class:"modifier-description"},[lt(o(r)),i?" (+1 effective)":null]):null]))}})}function re(e){return ze(()=>{const t=e();return{apply:n=>t.filter(s=>o(s.enabled)!==!1).reduce((s,i)=>i.apply(s),n),revert:t.every(n=>n.revert!=null)?n=>t.filter(s=>o(s.enabled)!==!1).reduceRight((s,i)=>i.revert(s),n):void 0,enabled:S(()=>t.filter(n=>o(n.enabled)!==!1).length>0),description:T(()=>u(x,null,[t.filter(n=>o(n.enabled)!==!1).map(n=>o(n.description)).filter(n=>n).map(lt)]))}})}function Gs(e){return ze(()=>{const t=e();return t.currentGain==null&&(t.currentGain=S(()=>{let n=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return n=a.floor(n).max(0),o(t.buyMax)||(n=n.min(1)),n})),t.actualGain==null&&(t.actualGain=t.currentGain),t.currentAt==null&&(t.currentAt=S(()=>{let n=t.scaling.currentAt(t);return t.roundUpCost&&(n=a.ceil(n)),n})),t.nextAt==null&&(t.nextAt=S(()=>{let n=t.scaling.nextAt(t);return t.roundUpCost&&(n=a.ceil(n)),n})),t.convert==null&&(t.convert=function(){var i;const n=o(t.currentGain),s=o(t.currentAt);t.gainResource.value=a.add(t.gainResource.value,n),t.spend(n,s),(i=t.onConvert)==null||i.call(t,n)}),t.spend==null&&(t.spend=function(){t.baseResource.value=0}),F(t,"currentGain"),F(t,"actualGain"),F(t,"currentAt"),F(t,"nextAt"),F(t,"buyMax"),$e(t,"buyMax",!0),F(t,"roundUpCost"),$e(t,"roundUpCost",!0),t})}function Kn(e,t){const n=Re(e),s=Re(t);return{currentGain(i){let l=o(i.baseResource.value);if(i.costModifier&&(l=i.costModifier.apply(l)),a.lt(l,o(n)))return 0;const r=a.div(l,o(n)).pow(o(s));return r.isNan()?new a(0):r},currentAt(i){let l=o(i.currentGain);return i.gainModifier&&(l=i.gainModifier.revert(l)),l=a.max(0,l).root(o(s)).times(o(n)),i.costModifier&&(l=i.costModifier.revert(l)),l},nextAt(i){let l=a.add(o(i.currentGain),1).floor();return i.gainModifier&&(l=i.gainModifier.revert(l)),l=a.max(0,l).root(o(s)).times(o(n)).max(o(n)),i.costModifier&&(l=i.costModifier.revert(l)),l}}}function Hs(e){return Gs(e)}function Ll(e){return Gs(()=>{const t=e();return $e(t,"buyMax",!1),t.currentGain==null&&(t.currentGain=S(()=>{let n=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return n=a.floor(n).max(t.gainResource.value),o(t.buyMax)||(n=n.min(a.add(t.gainResource.value,1))),n})),t.actualGain==null&&(t.actualGain=S(()=>{let n=a.sub(a.floor(t.scaling.currentGain(t)),t.gainResource.value).max(0);return o(t.buyMax)||(n=n.min(1)),n})),$e(t,"convert",function(){var i;const n=o(t.actualGain),s=o(t.currentAt);t.gainResource.value=t.gainModifier?t.gainModifier.apply(o(t.currentGain)):o(t.currentGain),t.spend(n,s),(i=t.onConvert)==null||i.call(t,n)}),t})}const Gl="boxes",os=6,Je=Dt(Gl,function(){const e="Boxes",t="#964B00",n=pt(0,"boxes"),s=Hs(()=>({scaling:Kn(1e10,1),baseResource:Y.logs,gainResource:Z(n),roundUpCost:!0})),i=Fe(()=>({display:T(()=>u(x,null,[u("span",{style:"font-size: large"},[h("Create "),W(s.currentGain.value),h(" "),n.displayName]),u("br",null,null),u("span",{style:"font-size: large"},[h("Cost:")," ",fn(Y.logs,a.gte(s.actualGain.value,1)?s.currentAt.value:s.nextAt.value)," ",Y.logs.displayName])])),canClick:()=>a.gte(s.actualGain.value,1),onClick(){!o(this.canClick)||s.convert()},style:"width: 600px; min-height: unset"})),l=ce(()=>({display:{title:"Carry logs in boxes",description:"Double log gain and unlock a new elf for training"},onPurchase(){z.days[3].recentlyUpdated.value=!0},resource:Z(n),cost:100})),r=ce(()=>({display:{title:"Carry ash in boxes",description:"Double ash gain and unlock a new elf for training"},onPurchase(){z.days[3].recentlyUpdated.value=!0},resource:Z(n),cost:1e3})),c=ce(()=>({display:{title:"Carry coal in boxes",description:"Double coal gain and unlock a new elf for training"},onPurchase(){z.days[3].recentlyUpdated.value=!0},resource:Z(n),cost:4e3})),d={logsUpgrade:l,ashUpgrade:r,coalUpgrade:c},m=We(()=>({display:{title:"Carry more logs",description:"Use boxes to carry even more logs, boosting their gain",effectDisplay:T(()=>u(x,null,[te(a.div(m.amount.value,2).add(1)),h("x")]))},resource:Z(n),cost(){return a.pow(3,m.amount.value).times(100)},visibility:()=>H(l.bought.value)})),v=We(()=>({display:{title:"Carry more ash",description:"Use boxes to carry even more ash, boosting its gain",effectDisplay:T(()=>u(x,null,[te(a.div(v.amount.value,2).add(1)),h("x")]))},resource:Z(n),cost(){return a.pow(5,v.amount.value).times(1e3)},visibility:()=>H(r.bought.value)})),_=We(()=>({display:{title:"Carry more coal",description:"Use boxes to carry even more coal, boosting its gain",effectDisplay:T(()=>u(x,null,[te(a.div(_.amount.value,2).add(1)),h("x")]))},resource:Z(n),cost(){return a.pow(7,_.amount.value).times(1e3)},visibility:()=>H(c.bought.value)})),b={logBoxesBuyable:m,ashBoxesBuyable:v,coalBoxesBuyable:_},{total:g,trackerDisplay:w}=Pn({resource:n,goal:5e4,name:e,day:os,color:t});return{name:e,day:os,color:t,boxes:n,totalBoxes:g,boxesConversion:s,upgrades:d,buyables:b,minWidth:700,display:T(()=>u(x,null,[de(w),u(ve,null,null),u(Ht,{resource:n,color:t,style:"margin-bottom: 0"},null),u(ve,null,null),de(i),u(ve,null,null),qe(...Object.values(d)),qe(...Object.values(b))]))}});const Hl={class:"field"},Ql=L({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,s=S(()=>ee(o(n.title)||"","span")),i=S({get(){return!!n.modelValue},set(l){t("update:modelValue",l)}});return(l,r)=>(y(),M("label",Hl,[Sn(f("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":r[0]||(r[0]=c=>we(i)?i.value=c:null)},null,512),[[di,o(i)]]),(y(),G(ye(o(s))))]))}});var Bt=ne(Ql,[["__scopeId","data-v-33d57459"]]);const zl={class:"field"},jl={key:0,class:"field-title"},Wn=L({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var r;const n=e,s=Tt(ot(n,"title"),"span"),i=O((r=n.options.find(c=>c.value===n.modelValue))!=null?r:null);ht(ot(n,"modelValue"),c=>{var d;Be(i)!==c&&(i.value=(d=n.options.find(m=>m.value===c))!=null?d:null)});function l(c){t("update:modelValue",c.value)}return(c,d)=>(y(),M("div",zl,[o(s)?(y(),M("span",jl,[(y(),G(ye(o(s))))])):E("",!0),u(o(hi),{options:e.options,modelValue:i.value,"onUpdate:modelValue":[d[0]||(d[0]=m=>i.value=m),l],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});var Kl=L({props:{visibility:{type:$(Number),required:!0},display:{type:$(String,Object,Function),required:!0},style:$(String,Object,Array),classes:$(Object),earned:{type:$(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:mn},setup(e){const{display:t}=De(e),n=nt("");return Xe(()=>{const s=Be(t);if(s==null){n.value="";return}if(_t(s)){n.value=ee(s);return}const i=ee(s.requirement,"h3"),l=ee(s.effectDisplay||"","b"),r=ee(s.optionsDisplay||"","span");n.value=ee(T(()=>u("span",null,[u(i,null,null),s.effectDisplay?u("div",null,[u(l,null,null)]):null,s.optionsDisplay?u("div",{class:"equal-spaced"},[u(r,null,null)]):null])))}),{comp:n,unref:o,Visibility:Ee}}});function Wl(e,t,n,s,i,l){var c;const r=Ft("Node");return e.unref(e.visibility)!==e.Visibility.None?(y(),M("div",{key:0,style:Ie([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(c=e.unref(e.style))!=null?c:{}]),class:ke({feature:!0,milestone:!0,done:e.unref(e.earned),...e.unref(e.classes)})},[(y(),G(ye(e.unref(e.comp)))),u(r,{id:e.id},null,8,["id"])],6)):E("",!0)}var Jl=ne(Kl,[["render",Wl],["__scopeId","data-v-f4e8794e"]]);Ce.on("setupVue",e=>e.use(gi));const rs=vs(),Xl=Symbol("Milestone");let Pt;(function(e){e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none"})(Pt||(Pt={}));function Te(e){const t=Pe(!1);return ze(()=>{var i;const n=(i=e==null?void 0:e())!=null?i:{};n.id=Yt("milestone-"),n.type=Xl,n[Rt]=Jl,n.earned=t,n.complete=function(){var r;const l=n;if(t.value=!0,(r=l.onComplete)==null||r.call(l),l.display&&o(l.showPopups)===!0){const c=o(l.display),d=ee(_t(c)?c:c.requirement);rs(u(x,null,[u("h3",null,[h("Milestone earned!")]),u("div",null,[u(d,null,null)])]))}},F(n,"visibility"),$e(n,"visibility",Ee.Visible);const s=n.visibility;if(n.visibility=S(()=>{const l=o(n.display);switch(pe.msDisplay){default:case Pt.All:return o(s);case Pt.Configurable:return o(n.earned)&&!(l!=null&&typeof l=="object"&&"optionsDisplay"in l)?Ee.None:o(s);case Pt.Incomplete:return o(n.earned)?Ee.None:o(s);case Pt.None:return Ee.None}}),F(n,"style"),F(n,"classes"),F(n,"display"),F(n,"showPopups"),n[$t]=function(){const{visibility:l,display:r,style:c,classes:d,earned:m,id:v}=this;return{visibility:l,display:r,style:o(c),classes:d,earned:m,id:v}},n.shouldEarn){const l=n;Xe(()=>{var r,c;if(pe.active===q.id&&!l.earned.value&&o(l.visibility)===Ee.Visible&&((r=l.shouldEarn)==null?void 0:r.call(l))&&(l.earned.value=!0,(c=l.onComplete)==null||c.call(l),l.display&&o(l.showPopups)===!0)){const d=o(l.display),m=ee(_t(d)?d:d.requirement);rs(u(x,null,[u("h3",null,[h("Milestone earned!")]),u("div",null,[u(m,null,null)])]))}})}return n})}Ce.on("loadSettings",e=>{$e(e,"msDisplay",Pt.All)});const Yl=Object.values(Pt).map(e=>({label:Ss(e),value:e}));Da(T(()=>u(Wn,{title:"Show Milestones",options:Yl,"onUpdate:modelValue":e=>pe.msDisplay=e,modelValue:pe.msDisplay},null)));const Zl=Symbol("Reset");function eo(e){return ze(()=>{const t=e();return t.id=Yt("reset-"),t.type=Zl,t.reset=function(){var s;const n=i=>{if(i&&typeof i=="object")if(xt in i){const l=i;l.value=l[xt]}else!(i instanceof a)&&!we(i)&&Object.values(i).forEach(l=>n(l))};o(t.thingsToReset).forEach(n),Ce.emit("reset",t),(s=t.onReset)==null||s.call(t)},F(t,"thingsToReset"),t})}const vn={};Ce.on("removeLayer",e=>{var t;(t=vn[e.id])==null||t.call(vn),vn[e.id]=void 0});const to="paper",us=5,se=Dt(to,function(){const e="Paper",t="#E8DCB8",n=pt(0,"paper"),s=pt(S(()=>a.min(a.div(Y.logs.value,1e9),a.div(Q.ash.value,1e6))),"pulp"),i=Hs(()=>({scaling:Kn(1,1.2),baseResource:s,gainResource:Z(n),roundUpCost:!0,spend(N,R){Y.logs.value=a.sub(Y.logs.value,a.times(R,1e9)),Q.ash.value=a.sub(Q.ash.value,a.times(R,1e6))}})),l=Fe(()=>({display:T(()=>{const N=a.gte(i.actualGain.value,1)?i.currentAt.value:i.nextAt.value;return u(x,null,[u("span",{style:"font-size: large"},[h("Create "),W(i.currentGain.value),h(" "),n.displayName]),u("br",null,null),u("span",{style:"font-size: large"},[h("Cost: "),fn(Y.logs,N),h(" "),s.displayName,h(" ("),W(a.times(N,1e9)),h(" "),Y.logs.displayName,h(";")," ",W(a.times(N,1e6)),h(" "),Q.ash.displayName,h(")")])])}),canClick:()=>a.gte(i.actualGain.value,1),onClick(){!o(this.canClick)||i.convert()},style:"width: 600px; min-height: unset"}));function r(N){const R=We(()=>({...N,display:{title:N.name,description:`Print a copy of "${N.name}", which ${N.elfName} will use to improve their skills! Each copy printed will reduce the "${N.buyableName}" price scaling by 0.95x and make ${N.elfName} purchase +10% faster!`,effectDisplay:T(()=>u(x,null,[te(a.pow(.95,R.amount.value)),h("x price scaling,")," ",te(a.div(R.amount.value,10).add(1)),h("x auto-purchase speed")])),showAmount:!1},resource:Z(n),cost:()=>a.pow(5,R.amount.value).times(10),style:"width: 600px"}));return R}const c=r({name:"Now You're Logging!",elfName:"Holly",buyableName:"Generic Cutters"}),d=r({name:"The Man Who Planted Trees",elfName:"Ivy",buyableName:"Generic Planters"}),m=r({name:"Logjam",elfName:"Hope",buyableName:"Expand Forest"}),v=r({name:"Fahrenheit 451",elfName:"Jack",buyableName:"Heated Cutters"}),_=r({name:"Tillamook Burn Country",elfName:"Mary",buyableName:"Heated Planters"}),b=r({name:"The Garden Tree's Handbook",elfName:"Noel",buyableName:"Fertilized Soil"}),g=r({name:"Firestarter",elfName:"Joy",buyableName:"Small Fire",visibility:()=>H(_e.elves.smallFireElf.bought.value)}),w=r({name:"An Arsonist's Guide to Writer's Homes in New England",elfName:"Faith",buyableName:"Bonfire",visibility:()=>H(_e.elves.bonfireElf.bought.value)}),k=r({name:"Little Fires Everywhere",elfName:"Snowball",buyableName:"Kiln",visibility:()=>H(_e.elves.kilnElf.bought.value)}),P={cuttersBook:c,plantersBook:d,expandersBook:m,heatedCuttersBook:v,heatedPlantersBook:_,fertilizerBook:b,smallFireBook:g,bonfireBook:w,kilnBook:k},{total:le,trackerDisplay:A}=Pn({resource:n,goal:5e3,name:e,day:us,color:t,textColor:"var(--feature-foreground)"});return{name:e,day:us,color:t,paper:n,totalPaper:le,paperConversion:i,books:P,minWidth:700,display:T(()=>u(x,null,[de(A),u(ve,null,null),u(Ht,{resource:n,color:t,style:"margin-bottom: 0"},null),u(ve,null,null),de(l),u(ve,null,null),Os(...Object.values(P))]))}}),no="workshop",en=2,Le=Dt(no,function(){const e="Workshop",t="#D66B02",n="#D66B02",s=pt(0,"foundation progress"),i=Ll(()=>({scaling:Kn(250,1.5),baseResource:Y.logs,gainResource:Z(s),roundUpCost:!0,buyMax:!1,spend(R,me){Y.logs.value=a.sub(Y.logs.value,me)}})),l=Fe(()=>({display:T(()=>u(x,null,[u("b",{style:"font-size: x-large"},[h("Build part of the foundation")]),u("br",null,null),u("br",null,null),u("span",{style:"font-size: large"},[h("Cost:")," ",fn(Y.logs,a.gte(i.actualGain.value,1)?i.currentAt.value:i.nextAt.value)," ",Y.logs.displayName])])),visibility:()=>H(a.lt(s.value,100)),canClick:()=>a.gte(i.actualGain.value,1)&&a.lt(s.value,100),onClick(){!o(this.canClick)||i.convert()},style:"width: 600px; min-height: unset"})),r=On(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{l.canClick.value&&l.onClick()}})),c=S(()=>!_e.milestones[6].earned.value),d=Te(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>a.gte(s.value,1),showPopups:c})),m=Te(()=>({display:{requirement:"10% Foundation Completed",effectDisplay:"Cut an additional tree per second for each 5% of foundation completed"},shouldEarn:()=>a.gte(s.value,10),visibility:()=>H(d.earned.value),showPopups:c})),v=Te(()=>({display:{requirement:"20% Foundation Completed",effectDisplay:"Plant an additional tree per second for each 10% of foundation completed"},shouldEarn:()=>a.gte(s.value,20),visibility:()=>H(m.earned.value),showPopups:c})),_=Te(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>a.gte(s.value,30),visibility:()=>H(v.earned.value),showPopups:c})),b=Te(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>a.gte(s.value,40),visibility:()=>H(_.earned.value),showPopups:c})),g=Te(()=>({display:{requirement:"50% Foundation Completed",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte(s.value,50),visibility:()=>H(b.earned.value),showPopups:c})),w=Te(()=>({display:{requirement:"75% Foundation Completed",effectDisplay:"The forest gains an extra tree for every 2% of foundation completed"},shouldEarn:()=>a.gte(s.value,75),visibility:()=>H(g.earned.value),showPopups:c})),k=Te(()=>({display:{requirement:"100% Foundation Completed",effectDisplay:"Log per tree is raised to the 1.2th power"},shouldEarn:()=>a.gte(s.value,100),visibility:()=>H(w.earned.value),showPopups:c})),P={logGainMilestone1:d,autoCutMilestone1:m,autoPlantMilestone1:v,autoCutMilestone2:_,autoPlantMilestone2:b,logGainMilestone2:g,morePlantsMilestone1:w,logGainMilestone3:k},{collapseMilestones:le,display:A}=Vs(P),N=un(()=>({direction:ie.Right,width:600,height:25,fillStyle:`backgroundColor: ${n}`,progress:()=>z.day.value===en?a.div(s.value,100):1,display:T(()=>z.day.value===en?u(x,null,[W(s.value),h("%")]):"")}));return Xe(()=>{z.day.value===en&&a.gte(s.value,100)&&z.completeDay()}),{name:e,day:en,color:t,foundationProgress:s,foundationConversion:i,milestones:P,collapseMilestones:le,minWidth:700,buildFoundationHK:r,display:T(()=>u(x,null,[u("div",null,[z.day.value===en?"Complete the foundation to complete the day":`${e} Complete!`]),de(N),u(ve,null,null),u("div",null,[u("span",null,[h("The foundation is ")]),u("h2",{style:`color: ${t}; text-shadow: 0 0 10px ${t}`},[W(s.value)]),h("% completed")]),a.lt(s.value,100)?u(ve,null,null):null,de(l),u(ve,null,null),A()]))}}),so="elves",tn=4,_e=Dt(so,function(){const e="Elves",t="red",n="#911D21",i=un(()=>({direction:ie.Right,width:600,height:25,fillStyle:`backgroundColor: ${n}`,progress:()=>z.day.value===tn?a.div(he.value,6).times(.8333333333333334).add(a.div(a.add(Q.coal.value,1).log10(),a.log10(1e9)).clamp(0,1).div(6)):1,display:T(()=>z.day.value===tn?a.lt(he.value,6)?u(x,null,[W(he.value),h("/6 elves")]):u(x,null,[W(Q.coal.value),h("/"),W(1e9),h(" coal")]):"")})),l=eo(()=>({thingsToReset:[Y,Le,Q],onReset(){setTimeout(()=>{vt.earned.value?(Y.row1Upgrades.forEach(j=>j.bought.value=!0),Y.row2Upgrades.forEach(j=>j.bought.value=!0)):st.earned.value&&(Y.row1Upgrades[4].bought.value=!0,Y.row2Upgrades[4].bought.value=!0),Ve.earned.value&&(Le.foundationProgress.value=100)})}})),r=re(()=>[D(()=>({multiplier:2,description:"6 Elves Trained",enabled:Me.earned})),D(()=>({multiplier:()=>a.times(se.books.cuttersBook.amount.value,.1).add(1),description:"Now You're Logging!",enabled:()=>a.gt(se.books.cuttersBook.amount.value,0)}))]),c=re(()=>[D(()=>({multiplier:2,description:"6 Elves Trained",enabled:Me.earned})),D(()=>({multiplier:()=>a.times(se.books.plantersBook.amount.value,.1).add(1),description:"The Man Who Planted Trees",enabled:()=>a.gt(se.books.plantersBook.amount.value,0)}))]),d=re(()=>[D(()=>({multiplier:2,description:"6 Elves Trained",enabled:Me.earned})),D(()=>({multiplier:()=>a.times(se.books.expandersBook.amount.value,.1).add(1),description:"Logjam",enabled:()=>a.gt(se.books.expandersBook.amount.value,0)}))]),m=re(()=>[D(()=>({multiplier:2,description:"6 Elves Trained",enabled:Me.earned})),D(()=>({multiplier:()=>a.times(se.books.heatedCuttersBook.amount.value,.1).add(1),description:"Fahrenheit 451",enabled:()=>a.gt(se.books.heatedCuttersBook.amount.value,0)}))]),v=re(()=>[D(()=>({multiplier:2,description:"6 Elves Trained",enabled:Me.earned})),D(()=>({multiplier:()=>a.times(se.books.heatedPlantersBook.amount.value,.1).add(1),description:"Tillamook Burn Country",enabled:()=>a.gt(se.books.heatedPlantersBook.amount.value,0)}))]),_=re(()=>[D(()=>({multiplier:2,description:"6 Elves Trained",enabled:Me.earned})),D(()=>({multiplier:()=>a.times(se.books.fertilizerBook.amount.value,.1).add(1),description:"The Garden Tree's Handbook",enabled:()=>a.gt(se.books.fertilizerBook.amount.value,0)}))]),b=re(()=>[D(()=>({multiplier:2,description:"6 Elves Trained",enabled:Me.earned})),D(()=>({multiplier:()=>a.times(se.books.smallFireBook.amount.value,.1).add(1),description:"Firestarter",enabled:()=>a.gt(se.books.smallFireBook.amount.value,0)}))]),g=re(()=>[D(()=>({multiplier:2,description:"6 Elves Trained",enabled:Me.earned})),D(()=>({multiplier:()=>a.times(se.books.bonfireBook.amount.value,.1).add(1),description:"An Arsonist's Guide to Writer's Homes in New England",enabled:()=>a.gt(se.books.bonfireBook.amount.value,0)}))]),w=re(()=>[D(()=>({multiplier:2,description:"6 Elves Trained",enabled:Me.earned})),D(()=>({multiplier:()=>a.times(se.books.kilnBook.amount.value,.1).add(1),description:"Little Fires Everywhere",enabled:()=>a.gt(se.books.kilnBook.amount.value,0)}))]),[k,P]=zn(()=>[{title:"Holly Auto-Buy Frequency",modifier:r,base:10,unit:"/s",visible:Ne.cuttersElf.bought},{title:"Ivy Auto-Buy Frequency",modifier:c,base:10,unit:"/s",visible:Ne.plantersElf.bought},{title:"Hope Auto-Buy Frequency",modifier:d,base:10,unit:"/s",visible:Ne.expandersElf.bought},{title:"Jack Auto-Buy Frequency",modifier:m,base:10,unit:"/s",visible:Ne.heatedCuttersElf.bought},{title:"Mary Auto-Buy Frequency",modifier:v,base:10,unit:"/s",visible:Ne.heatedPlantersElf.bought},{title:"Noel Auto-Buy Frequency",modifier:_,base:10,unit:"/s",visible:Ne.fertilizerElf.bought},{title:"Joy Auto-Buy Frequency",modifier:b,base:10,unit:"/s",visible:Ne.smallFireElf.bought},{title:"Faith Auto-Buy Frequency",modifier:g,base:10,unit:"/s",visible:Ne.bonfireElf.bought},{title:"Snowball Auto-Buy Frequency",modifier:w,base:10,unit:"/s",visible:Ne.kilnElf.bought}]),le=O(!1),A=T(()=>u(rt,{modelValue:le.value,"onUpdate:modelValue":j=>le.value=j},{header:()=>u("h2",null,[e,h(" Modifiers")]),body:k}));function N(j){const yt=S(()=>a.pow(4,he.value).times(1e6)),Qe=Pe(0),qt=j.hasToggle?Pe(!1):O(!0),Ut=S(()=>j.cooldownModifier.apply(10));function Zt(B){var At;const Mt=j.canBuy?o(Re(j.canBuy)):!0;if(mt.bought.value&&Mt){Qe.value=a.add(Qe.value,B);const bt=a.recip(Ut.value);for(;a.gte(Qe.value,bt);)if(j.customCost==null?o(j.buyable.canPurchase):a.gte(j.buyable.resource.value,j.customCost(j.buyable.amount.value)))j.buyable.amount.value=a.add(j.buyable.amount.value,1),Qe.value=a.sub(Qe.value,bt),(At=j.onAutoPurchase)==null||At.call(j);else{Qe.value=bt;break}}}const mt=ce(()=>({...j,buyable:void 0,toggle:qt,buyProgress:Qe,update:Zt,resource:Q.coal,cost:yt,computedAutoBuyCooldown:Ut,display:()=>({title:j.name,description:T(()=>u(x,null,[j.description,mt.bought.value?null:u(x,null,[" ",h("Training this elf will require resetting all your progress from days 1-3.")]),mt.bought.value&&j.hasToggle===!0?u(x,null,[u(Bt,{title:j.toggleDesc,"onUpdate:modelValue":B=>qt.value=B,modelValue:qt.value},null)]):null])),showCost:!mt.bought.value}),style:"width: 190px",onPurchase(){var B;(B=j.onPurchase)==null||B.call(j),l.reset()}}));return mt}const R=N({name:"Holly",description:"Holly will automatically purchase cutters you can afford, without actually spending any logs.",buyable:Y.row1Buyables[0],cooldownModifier:r}),me=N({name:"Ivy",description:"Ivy will automatically purchase planters you can afford, without actually spending any logs.",buyable:Y.row1Buyables[1],cooldownModifier:c}),ue=N({name:"Hope",description:"Hope will automatically purchase forest expanders you can afford, without actually spending any logs.",buyable:Y.row1Buyables[2],cooldownModifier:d}),et=[R,me,ue],ut=N({name:"Jack",description:"Jack will automatically purchase heated cutters you can afford, without actually spending any coal.",buyable:Q.heatedCutters,cooldownModifier:m}),X=N({name:"Mary",description:"Mary will automatically purchase heated planters you can afford, without actually spending any coal.",buyable:Q.heatedPlanters,cooldownModifier:v}),gt=N({name:"Noel",description:"Noel will automatically purchase fertilized soil you can afford, without actually spending any ash.",buyable:Q.moreFertilizer,cooldownModifier:_}),Ot=[ut,X,gt],je=N({name:"Joy",description:"Joy will automatically purchase small fires you can afford, without actually spending any logs. You can toggle whether or not to enable the purchased small fires automatically. Small fires will start giving a boost to ash and coal gain.",buyable:Q.buildFire,cooldownModifier:b,visibility:()=>H(Je.upgrades.logsUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased small fires",onAutoPurchase(){je.toggle.value&&(Q.activeFires.value=a.add(Q.activeFires.value,1))},onPurchase(){z.days[4].recentlyUpdated.value=!0}}),xe=N({name:"Faith",description:"Faith will automatically purchase bonfires you can afford. You can toggle whether or not to enable the purchased bonfires automatically. Bonfires will start giving a boost to ash and coal gain.",buyable:Q.buildBonfire,cooldownModifier:g,visibility:()=>H(Je.upgrades.ashUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased bonfires",onAutoPurchase(){xe.toggle.value&&(Q.activeBonfires.value=a.add(Q.activeBonfires.value,1),Q.buildFire.amount.value=a.sub(Q.buildFire.amount.value,o(this.buyable.cost)),Q.activeFires.value=a.sub(Q.activeFires.value,o(this.buyable.cost)))},onPurchase(){z.days[4].recentlyUpdated.value=!0},canBuy:Q.unlockBonfire.bought}),tt=N({name:"Snowball",description:"Snowball will automatically purchase kilns you can afford, without actually spending any logs. You can toggle whether or not to enable the purchased kilns automatically. Kilns will start giving a boost to ash and coal gain.",buyable:Q.buildKiln,cooldownModifier:w,visibility:()=>H(Je.upgrades.coalUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased kilns",onAutoPurchase(){tt.toggle.value&&(Q.activeKilns.value=a.add(Q.activeKilns.value,1))},onPurchase(){z.days[4].recentlyUpdated.value=!0},canBuy:Q.unlockKiln.bought}),jt=[je,xe,tt],Ne={cuttersElf:R,plantersElf:me,expandersElf:ue,heatedCuttersElf:ut,heatedPlantersElf:X,fertilizerElf:gt,smallFireElf:je,bonfireElf:xe,kilnElf:tt},he=S(()=>Object.values(Ne).filter(j=>j.bought.value).length),He=Te(()=>({display:{requirement:"1 Elf Trained",effectDisplay:"Manual cutting and planting can happen twice as often for each trained elf"},shouldEarn:()=>a.gte(he.value,1)})),st=Te(()=>({display:{requirement:"2 Elves Trained",effectDisplay:"Research I & II aren't reset after training"},shouldEarn:()=>a.gte(he.value,2),visibility:()=>H(He.earned.value)})),Ke=Te(()=>({display:{requirement:"3 Elves Trained",effectDisplay:"Coal gain is raised to the 1.25"},shouldEarn:()=>a.gte(he.value,3),visibility:()=>H(st.earned.value)})),Se=Te(()=>({display:{requirement:"4 Elves Trained",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte(he.value,4),visibility:()=>H(Ke.earned.value)})),Oe=Te(()=>({display:{requirement:"5 Elves Trained",effectDisplay:"Forest is twice as large"},shouldEarn:()=>a.gte(he.value,5),visibility:()=>H(Se.earned.value)})),Me=Te(()=>({display:{requirement:"6 Elves Trained",effectDisplay:"Elves work twice as fast"},shouldEarn:()=>a.gte(he.value,6),visibility:()=>H(Oe.earned.value)})),Ve=Te(()=>({display:{requirement:"7 Elves Trained",effectDisplay:"Workshop Foundation starts at 100% complete after training"},shouldEarn:()=>a.gte(he.value,7),visibility:()=>H(Me.earned.value&&z.day.value>5)})),Ae=Te(()=>({display:{requirement:"8 Elves Trained",effectDisplay:"Forest is twice as large (again)"},shouldEarn:()=>a.gte(he.value,8),visibility:()=>H(Ve.earned.value)})),vt=Te(()=>({display:{requirement:"9 Elves Trained",effectDisplay:"Trees upgrades aren't reset after training"},shouldEarn:()=>a.gte(he.value,9),visibility:()=>H(Ae.earned.value)})),ct=[He,st,Ke,Se,Oe,Me,Ve,Ae,vt],Nt={manualMilestone:He,researchMilestone:st,coalGainMilestone:Ke,logGainMilestone:Se,forestMilestone:Oe,elvesMilestone:Me,foundationMilestone:Ve,forestMilestone2:Ae,treeUpgradesMilestone:vt},{collapseMilestones:St,display:dt}=Vs(Nt);return Ce.on("update",j=>{a.lt(z.day.value,tn)||Object.values(Ne).forEach(yt=>yt.update(j))}),Xe(()=>{z.day.value===tn&&a.gte(he.value,6)&&a.gte(Q.coal.value,1e9)&&z.completeDay()}),{name:e,color:t,elves:Ne,totalElves:he,milestones:ct,collapseMilestones:St,generalTabCollapsed:P,minWidth:700,display:T(()=>u(x,null,[u("div",null,[z.day.value===tn?`Reach ${W(6)} trained elves and ${W(1e9)} ${Q.coal.displayName} to complete the day`:`${e} Complete!`," ",h("-")," ",u("button",{class:"button",style:"display: inline-block;",onClick:()=>le.value=!0},[h("Check Modifiers")])]),de(i),de(A),u(ve,null,null),u("div",{style:"width: 600px"},[qe(...et),qe(...Ot),qe(...jt)]),dt()]))}}),io="coal",cs=3,Q=Dt(io,function(){const e="Coal",t="#151716",n="#B2BeB5",s="var(--foreground)",i=pt(0,"coal"),l=pt(0,"ash"),r=Pe(0),c=S(()=>a.times(r.value,1e3)),d=S(()=>a.times(r.value,.1)),m=S(()=>a.times(r.value,50)),v=We(()=>({resource:Y.logs,cost(){let I=a.times(R.amount.value,o(R.cost)).plus(this.amount.value);return a.gte(I,100)&&(I=a.pow(I,2).div(100)),a.gte(I,1e4)&&(I=a.pow(I,2).div(1e4)),I=a.pow(.95,se.books.smallFireBook.amount.value).times(I),I.pow(1.5).times(1e4)},display:T(()=>u(x,null,[u("h3",null,[h("Small Fire")]),u("br",null,null),h("Burn 1000 logs for 0.1 coal and 50 ash"),u("br",null,null),u("br",null,null),h("Currently:"),u("br",null,null),h("-"),te(c.value),h(" logs/sec"),u("br",null,null),h("+"),te(d.value),h(" coal/sec"),u("br",null,null),h("+"),te(m.value),h(" ash/sec"),u("br",null,null),u("br",null,null),h("Cost: "),W(o(v.cost)),h(" "),v.resource.displayName])),onPurchase(){r.value=a.add(r.value,1)},style:{color:s,width:"160px"}})),_=Fe(()=>({display:"0",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.gt(r.value,0)},onClick(){r.value=0}})),b=Fe(()=>({display:"-",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.gt(r.value,0)},onClick(){r.value=a.sub(r.value,1)}})),g=Fe(()=>({display:"+",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.lt(r.value,v.amount.value)},onClick(){r.value=a.add(r.value,1)}})),w=Fe(()=>({display:"Max",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.lt(r.value,v.amount.value)},onClick(){r.value=v.amount.value}})),k=pt(v.amount,"small fires"),P=Pe(0),le=S(()=>a.times(P.value,1e4)),A=S(()=>a.times(P.value,10)),N=S(()=>a.times(P.value,1e3)),R=We(()=>({resource:k,cost(){return a.pow(.95,se.books.bonfireBook.amount.value).times(10)},display:T(()=>u(x,null,[u("h3",null,[h("Bonfire")]),u("br",null,null),h("Burn 10,000 logs for 10 coal and 1000 ash"),u("br",null,null),u("br",null,null),h("Currently:"),u("br",null,null),h("-"),te(le.value),h(" logs/sec"),u("br",null,null),h("+"),te(A.value),h(" coal/sec"),u("br",null,null),h("+"),te(N.value),h(" ash/sec"),u("br",null,null),u("br",null,null),h("Cost: "),W(o(R.cost)),h(" "),R.resource.displayName])),onPurchase(I){r.value=a.sub(r.value,I).max(0),P.value=a.add(P.value,1)},style:{color:s,width:"160px"}})),me=Fe(()=>({display:"0",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.gt(P.value,0)},onClick(){P.value=0}})),ue=Fe(()=>({display:"-",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.gt(P.value,0)},onClick(){P.value=a.sub(P.value,1)}})),et=Fe(()=>({display:"+",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.lt(P.value,R.amount.value)},onClick(){P.value=a.add(P.value,1)}})),ut=Fe(()=>({display:"Max",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.lt(P.value,R.amount.value)},onClick(){P.value=R.amount.value}})),X=Pe(0),gt=S(()=>a.times(X.value,1e6)),Ot=S(()=>a.times(X.value,1e4)),je=S(()=>a.times(X.value,1e4)),xe=We(()=>({resource:Y.logs,cost(){let I=this.amount.value;return a.gte(I,100)&&(I=a.pow(I,2).div(100)),a.gte(I,1e4)&&(I=a.pow(I,2).div(1e4)),I=a.pow(.95,se.books.kilnBook.amount.value).times(I),a.pow(1.1,I).times(1e7)},display:T(()=>u(x,null,[u("h3",null,[h("Charcoal Kiln")]),u("br",null,null),h("Burn 1,000,000 logs for 10,000 coal and 10,000 ash"),u("br",null,null),u("br",null,null),h("Currently:"),u("br",null,null),h("-"),te(gt.value),h(" logs/sec"),u("br",null,null),h("+"),te(Ot.value),h(" coal/sec"),u("br",null,null),h("+"),te(je.value),h(" ash/sec"),u("br",null,null),u("br",null,null),h("Cost: "),W(o(xe.cost)),h(" "),xe.resource.displayName])),onPurchase(){X.value=a.add(X.value,1)},style:{color:s,width:"160px"}})),tt=Fe(()=>({display:"0",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.gt(X.value,0)},onClick(){X.value=0}})),jt=Fe(()=>({display:"-",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.gt(X.value,0)},onClick(){X.value=a.sub(X.value,1)}})),Ne=Fe(()=>({display:"+",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.lt(X.value,xe.amount.value)},onClick(){X.value=a.add(X.value,1)}})),he=Fe(()=>({display:"Max",style:{minHeight:"20px",width:"40px",color:s},canClick(){return a.lt(X.value,xe.amount.value)},onClick(){X.value=xe.amount.value}})),He=ce(()=>({resource:Z(i),cost:5,display:{title:"Warmer Cutters",description:"Cut down twice as many trees/s"},style:{color:s}})),st=ce(()=>({resource:Z(i),cost:5,display:{title:"Warmer Planters",description:"Plant twice as many trees/s"},style:{color:s}})),Ke=ce(()=>({resource:Z(l),cost:5e3,display:{title:"Ashy Soil",description:"Trees give 25% more logs"},style:{color:s}})),Se=ce(()=>({resource:k,cost:10,display:{title:"Bigger Fires",description:"Put all those fires together into a larger blaze"},onPurchase(){k.value=a.add(k.value,this.cost)},style:{color:s}})),Oe=[He,st,Ke,Se],Me=ce(()=>({resource:Z(i),cost:250,display:{title:"Dedicated Cutter Heaters",description:"Double the bonus from Heated Cutters"},style:{color:s},visibility:()=>H(Se.bought.value)})),Ve=ce(()=>({resource:Z(i),cost:250,display:{title:"Dedicated Planter Heaters",description:"Double the bonus from Heated Planters"},style:{color:s},visibility:()=>H(Se.bought.value)})),Ae=ce(()=>({canAfford(){return a.gte(Y.logs.value,1e5)&&a.gte(l.value,1e5)},onPurchase(){Y.logs.value=a.sub(Y.logs.value,1e5),l.value=a.sub(l.value,1e5)},display:T(()=>u(x,null,[u("h3",null,[h("Mulched Soil")]),u("br",null,null),h("Double the bonus from Fertilized Soil"),u("br",null,null),u("br",null,null),h("Cost: "),W(1e5),h(" "),Y.logs.displayName,u("br",null,null),W(1e5),h(" "),l.displayName])),style:{color:s},visibility:()=>H(Se.bought.value)})),vt=ce(()=>({resource:Y.logs,cost:1e7,display:{title:"Efficient Fires",description:"Move the fires underground to keep the coal from turning to ash"},style:{color:s},visibility:()=>H(Se.bought.value)})),ct=[Me,Ve,Ae,vt],Nt=We(()=>({resource:Z(i),cost(){let I=this.amount.value;return a.gte(I,50)&&(I=a.pow(I,2).div(50)),a.gte(I,200)&&(I=a.pow(I,2).div(200)),a.gte(I,2e6)&&(I=a.pow(I,2).div(2e6)),I=a.pow(.95,se.books.heatedCuttersBook.amount.value).times(I),a.add(I,1).pow(2.5).times(10)},display:{title:"Heated Cutters",description:"Even warmer cutters cut down trees faster",effectDisplay:T(()=>u(x,null,[h("Cutters cut down trees "),te(Qe.value),h("x faster")]))},style:{color:s},visibility:()=>H(He.bought.value)})),St=We(()=>({resource:Z(i),cost(){let I=this.amount.value;return a.gte(I,50)&&(I=a.pow(I,2).div(50)),a.gte(I,200)&&(I=a.pow(I,2).div(200)),a.gte(I,2e6)&&(I=a.pow(I,2).div(2e6)),I=a.pow(.95,se.books.heatedPlantersBook.amount.value).times(I),a.add(I,1).pow(2.5).times(10)},display:{title:"Heated Planters",description:"Even warmer planters plant trees faster",effectDisplay:T(()=>u(x,null,[h("Planters plant trees "),te(Ut.value),h("x faster")]))},style:{color:s},visibility:()=>H(st.bought.value)})),dt=We(()=>({resource:Z(l),cost(){let I=this.amount.value;return a.gte(I,50)&&(I=a.pow(I,2).div(50)),a.gte(I,200)&&(I=a.pow(I,2).div(200)),a.gte(I,2e6)&&(I=a.pow(I,2).div(2e6)),I=a.pow(.95,se.books.fertilizerBook.amount.value).times(I),a.add(I,1).pow(1.5).times(5e4)},display:{title:"Fertilized Soil",description:"More fertilizer helps trees grow bigger",effectDisplay:T(()=>u(x,null,[h("Trees give "),te(mt.value),h("x more logs")]))},style:{color:s},visibility:()=>H(Ke.bought.value)})),j=[Nt,St,dt],yt=re(()=>[oe(()=>({addend(){return a.times(Nt.amount.value,.25)},description:"Heated Cutters",enabled(){return a.gt(Nt.amount.value,0)}})),D(()=>({multiplier:2,description:"Dedicated Cutter Heaters",enabled:Me.bought}))]),Qe=S(()=>yt.apply(1)),qt=re(()=>[oe(()=>({addend(){return a.times(St.amount.value,.25)},description:"Heated Planters",enabled(){return a.gt(St.amount.value,0)}})),D(()=>({multiplier:2,description:"Dedicated Planter Heaters",enabled:Ve.bought}))]),Ut=S(()=>qt.apply(1)),Zt=re(()=>[oe(()=>({addend(){return a.times(dt.amount.value,.25)},description:"Fertilized Soil",enabled(){return a.gt(dt.amount.value,0)}})),D(()=>({multiplier:2,description:"Mulched Soil",enabled:Ae.bought}))]),mt=S(()=>Zt.apply(1)),B=re(()=>[oe(()=>({addend(){return d.value},description:"Small Fires",enabled(){return a.gt(r.value,0)}})),oe(()=>({addend(){return A.value},description:"Bonfires",enabled(){return a.gt(P.value,0)}})),oe(()=>({addend(){return Ot.value},description:"Charcoal Kilns",enabled(){return a.gt(X.value,0)}})),D(()=>({multiplier:2,description:"Carry coal in boxes",enabled:Je.upgrades.coalUpgrade.bought})),D(()=>({multiplier:()=>a.div(Je.buyables.coalBoxesBuyable.amount.value,2).add(1),description:"Carry more coal",enabled:Je.upgrades.coalUpgrade.bought})),D(()=>({multiplier:()=>a.div(v.amount.value,1e4).add(1),description:"Small Fires Synergy",enabled:_e.elves.smallFireElf.bought})),D(()=>({multiplier:()=>a.div(R.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:_e.elves.bonfireElf.bought})),D(()=>({multiplier:()=>a.div(xe.amount.value,100).add(1),description:"Kiln Synergy",enabled:_e.elves.kilnElf.bought})),Ls(()=>({exponent:1.25,description:"3 Elves Trained",enabled:_e.milestones[2].earned,supportLowNumbers:!0}))]),Mt=S(()=>B.apply(0)),At=re(()=>[oe(()=>({addend(){return m.value},description:"Small Fires",enabled(){return a.gt(r.value,0)}})),oe(()=>({addend(){return N.value},description:"Bonfires",enabled(){return a.gt(P.value,0)}})),oe(()=>({addend(){return je.value},description:"Charcoal Kilns",enabled(){return a.gt(X.value,0)}})),D(()=>({multiplier:2,description:"Carry ash in boxes",enabled:Je.upgrades.ashUpgrade.bought})),D(()=>({multiplier:()=>a.div(Je.buyables.ashBoxesBuyable.amount.value,2).add(1),description:"Carry more ash",enabled:Je.upgrades.ashUpgrade.bought})),D(()=>({multiplier:()=>a.div(v.amount.value,1e4).add(1),description:"Small Fires Synergy",enabled:_e.elves.smallFireElf.bought})),D(()=>({multiplier:()=>a.div(R.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:_e.elves.bonfireElf.bought})),D(()=>({multiplier:()=>a.div(xe.amount.value,100).add(1),description:"Kiln Synergy",enabled:_e.elves.kilnElf.bought}))]),bt=S(()=>At.apply(0)),hn=re(()=>[oe(()=>({addend(){return a.negate(c.value)},description:"Small Fires",enabled(){return a.gt(r.value,0)}})),oe(()=>({addend(){return a.negate(le.value)},description:"Bonfires",enabled(){return a.gt(P.value,0)}})),oe(()=>({addend(){return a.negate(gt.value)},description:"Charcoal Kilns",enabled(){return a.gt(X.value,0)}}))]),Zn=S(()=>hn.apply(0)),[ni,si]=zn(()=>[{title:"Log Consumption",modifier:hn,base:0,visible(){return a.gt(r.value,0)||a.gt(P.value,0)||a.gt(X.value,0)}},{title:"Coal Gain",modifier:B,base:0,visible(){return a.gt(r.value,0)||a.gt(P.value,0)||a.gt(X.value,0)}},{title:"Ash Gain",modifier:At,base:0,visible(){return a.gt(r.value,0)||a.gt(P.value,0)||a.gt(X.value,0)}}]),Tn=O(!1),ii=T(()=>u(rt,{modelValue:Tn.value,"onUpdate:modelValue":I=>Tn.value=I},{header:()=>u("h2",null,[e,h(" Modifiers")]),body:ni}));Ce.on("update",I=>{a.lt(z.day.value,cs)||a.times(I,Zn.value).negate().gt(Y.logs.value)||(Y.logs.value=a.times(I,Zn.value).plus(Y.logs.value),i.value=a.times(I,Mt.value).plus(i.value),l.value=a.times(I,bt.value).plus(l.value))});const{total:ai,trackerDisplay:li}=Pn({resource:i,goal:1e7,name:e,day:cs,color:t,modal:{show:Tn,display:ii}});return{name:e,color:t,coal:i,totalCoal:ai,ash:l,activeFires:r,buildFire:v,activeBonfires:P,buildBonfire:R,activeKilns:X,buildKiln:xe,warmerCutters:He,warmerPlanters:st,basicFertilizer:Ke,unlockBonfire:Se,dedicatedCutters:Me,dedicatedPlanters:Ve,betterFertilizer:Ae,unlockKiln:vt,heatedCutters:Nt,heatedPlanters:St,moreFertilizer:dt,computedHeatedCutterEffect:Qe,computedHeatedPlanterEffect:Ut,computedFertilizerEffect:mt,generalTabCollapsed:si,minWidth:700,display:T(()=>u(x,null,[de(li),u(ve,null,null),u(Ht,{resource:i,color:t,style:"margin-bottom: 0",effectDisplay:a.gt(Mt.value,0)?`+${te(Mt.value)}/s`:void 0},null),u(ve,null,null),u(Ht,{resource:l,color:n,style:"margin-bottom: 0",effectDisplay:a.gt(bt.value,0)?`+${te(bt.value)}/s`:void 0},null),u(ve,null,null),u(Ds,null,{default:()=>[u(Xt,null,{default:()=>[de(v),u("div",null,[W(a.floor(r.value)),h("/"),W(a.floor(v.amount.value))]),qe(_,b,g,w)]}),Se.bought.value?u(x,null,[u(ve,null,null),u(Xt,null,{default:()=>[de(R),u("div",null,[W(P.value),h("/"),W(R.amount.value)]),qe(me,ue,et,ut)]})]):void 0,vt.bought.value?u(x,null,[u(ve,null,null),u(Xt,null,{default:()=>[de(xe),u("div",null,[W(X.value),h("/"),W(xe.amount.value)]),qe(tt,jt,Ne,he)]})]):void 0]}),u(ve,null,null),qe(...Oe),qe(...ct),qe(...j)]))}}),ao="trees",ds=1,ms=.1,Y=Dt(ao,function(){const e="Trees",t="#4BDC13",n="green",s=pt(0,"logs"),i=pt(0,"saplings"),l=O(0),r=re(()=>[oe(()=>({addend:()=>a.times(et.amount.value,10),description:"Expand Forest",enabled:N.bought})),oe(()=>({addend:()=>a.div(Le.foundationProgress.value,2),description:"75% Foundation Completed",enabled:Le.milestones.morePlantsMilestone1.earned})),D(()=>({multiplier:2,description:"5 Elves Trained",enabled:_e.milestones[4].earned})),D(()=>({multiplier:2,description:"8 Elves Trained",enabled:_e.milestones[7].earned}))]),c=pt(S(()=>a.sub(r.apply(10),i.value)),"trees"),d=S(()=>r.apply(10)),m=ce(()=>({resource:Z(s),cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),v=ce(()=>({resource:Z(s),cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),_=ce(()=>({resource:Z(s),cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),b=ce(()=>({resource:Z(s),cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),g=ce(()=>({resource:Z(s),cost:40,display:{title:"Research I",description:"Trees give 25% more logs, and unlock more upgrades"}})),w=[m,v,_,b,g],k=ce(()=>({resource:Z(s),cost:50,visibility:()=>H(g.bought.value),display:{title:"Sharper Fingers",description:"Manually cut trees twice as often"}})),P=ce(()=>({resource:Z(s),cost:50,visibility:()=>H(g.bought.value),display:{title:"Greener Fingers",description:"Manually Plant trees twice as often"}})),le=ce(()=>({resource:Z(s),cost:150,visibility:()=>H(g.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),A=ce(()=>({resource:Z(s),cost:150,visibility:()=>H(g.bought.value),display:{title:"Smart Spades",description:"Each time you manually plant trees, gain 1s of automatic tree planting production"}})),N=ce(()=>({resource:Z(s),cost:300,visibility:()=>H(g.bought.value),display:{title:"Research II",description:"Trees give 25% more logs, and unlock repeatable purchases"}})),R=[k,P,le,A,N],me=We(()=>({resource:Z(s),cost(){let B=this.amount.value;return a.gte(B,50)&&(B=a.pow(B,2).div(50)),a.gte(B,200)&&(B=a.pow(B,2).div(200)),a.gte(B,2e6)&&(B=a.pow(B,2).div(2e6)),B=a.pow(.95,se.books.cuttersBook.amount.value).times(B),a.times(100,B).add(200)},display:{title:"Generic Cutters",description:"Each cutter cuts down 1 tree/s"},visibility:()=>H(N.bought.value)})),ue=We(()=>({resource:Z(s),cost(){let B=this.amount.value;return a.gte(B,50)&&(B=a.pow(B,2).div(50)),a.gte(B,200)&&(B=a.pow(B,2).div(200)),a.gte(B,2e6)&&(B=a.pow(B,2).div(2e6)),B=a.pow(.95,se.books.plantersBook.amount.value).times(B),a.times(100,B).add(200)},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>H(N.bought.value)})),et=We(()=>({resource:Z(s),cost(){let B=this.amount.value;return a.gte(B,100)&&(B=a.pow(B,2).div(100)),a.gte(B,1e5)&&(B=a.pow(B,2).div(1e5)),B=a.pow(.95,se.books.expandersBook.amount.value).times(B),a.pow(a.add(B,1),1.5).times(500)},display:{title:"Expand Forest",description:"Add 10 trees to the forest"},visibility:()=>H(N.bought.value)})),ut=[me,ue,et],X=re(()=>[oe(()=>({addend:1,description:"Wooden Fingers",enabled:m.bought})),oe(()=>({addend:tt,description:"Smart Knives",enabled:le.bought}))]),gt=S(()=>X.apply(1)),Ot=re(()=>[D(()=>({multiplier:.5,description:"Sharper Fingers",enabled:k.bought})),D(()=>({multiplier:()=>a.pow(.5,_e.totalElves.value),description:"1 Elf Trained",enabled:_e.milestones[0].earned}))]),je=S(()=>Ot.apply(1)),xe=re(()=>[oe(()=>({addend:1,description:"Automated Knives",enabled:_.bought})),oe(()=>({addend:me.amount,description:"Generic Cutters",enabled:N.bought})),oe(()=>({addend:()=>a.div(Le.foundationProgress.value,5).floor(),description:"10% Foundation Completed",enabled:Le.milestones.autoCutMilestone1.earned})),D(()=>({multiplier:2,description:"30% Foundation Completed",enabled:Le.milestones.autoCutMilestone2.earned})),D(()=>({multiplier:2,description:"Warmer Cutters",enabled:Q.warmerCutters.bought})),D(()=>({multiplier:Q.computedHeatedCutterEffect,description:"Heated Cutters",enabled:()=>a.gt(Q.heatedCutters.amount.value,0)}))]),tt=S(()=>xe.apply(0)),jt=re(()=>[oe(()=>({addend:1,description:"Leafy Fingers",enabled:v.bought})),oe(()=>({addend:Ke,description:"Smart Spades",enabled:A.bought}))]),Ne=S(()=>jt.apply(1)),he=re(()=>[D(()=>({multiplier:.5,description:"Greener Fingers",enabled:P.bought})),D(()=>({multiplier:()=>a.pow(.5,_e.totalElves.value),description:"1 Elf Trained",enabled:_e.milestones[0].earned}))]),He=S(()=>he.apply(1)),st=re(()=>[oe(()=>({addend:1,description:"Automated Spade",enabled:b.bought})),oe(()=>({addend:()=>a.div(ue.amount.value,2),description:"Generic Planters",enabled:N.bought})),oe(()=>({addend:()=>a.div(Le.foundationProgress.value,10).floor(),description:"20% Foundation Completed",enabled:Le.milestones.autoPlantMilestone1.earned})),D(()=>({multiplier:2,description:"40% Foundation Completed",enabled:Le.milestones.autoPlantMilestone2.earned})),D(()=>({multiplier:2,description:"Warmer Planters",enabled:Q.warmerPlanters.bought})),D(()=>({multiplier:Q.computedHeatedPlanterEffect,description:"Heated Planters",enabled:()=>a.gt(Q.heatedPlanters.amount.value,0)}))]),Ke=S(()=>st.apply(0)),Se=re(()=>[D(()=>({multiplier:1.25,description:"Research I",enabled:g.bought})),D(()=>({multiplier:1.25,description:"Research II",enabled:N.bought})),D(()=>({multiplier:()=>a.div(Le.foundationProgress.value,20).add(1),description:"1% Foundation Completed",enabled:Le.milestones.logGainMilestone1.earned})),D(()=>({multiplier:2,description:"50% Foundation Completed",enabled:Le.milestones.logGainMilestone2.earned})),D(()=>({multiplier:1.25,description:"Ashy Soil",enabled:Q.basicFertilizer.bought})),D(()=>({multiplier:Q.computedFertilizerEffect,description:"Fertilized Soil",enabled:()=>a.gt(Q.moreFertilizer.amount.value,0)})),D(()=>({multiplier:2,description:"4 Elves Trained",enabled:_e.milestones[3].earned})),D(()=>({multiplier:2,description:"Carry logs in boxes",enabled:Je.upgrades.logsUpgrade.bought})),D(()=>({multiplier:()=>a.div(Je.buyables.logBoxesBuyable.amount.value,2).add(1),description:"Carry more logs",enabled:Je.upgrades.logsUpgrade.bought})),Ls(()=>({exponent:1.2,description:"100% Foundation Completed",enabled:Le.milestones.logGainMilestone3.earned}))]),Oe=Pe(0),Me=un(()=>({direction:ie.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(Oe.value,je.value)})),Ve=Fe(()=>({display:{title:"Cut trees",description:T(()=>u(x,null,[h("Cut down up to "),W(a.floor(gt.value))," ",h("tree"),a.eq(gt.value,1)?"":"s",h(" at once!"),u("br",null,null),de(Me)]))},style:{minHeight:"80px"},canClick:()=>a.gte(c.value,1)&&a.gte(Oe.value,je.value),onClick(){if(a.lt(Oe.value,je.value))return;const B=a.floor(a.min(c.value,a.times(gt.value,a.div(Oe.value,je.value).floor())));s.value=a.add(s.value,Se.apply(B)),i.value=a.add(i.value,B),Oe.value=0}})),Ae=Pe(0),vt=un(()=>({direction:ie.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(Ae.value,He.value)})),ct=Fe(()=>({display:{title:"Plant trees",description:T(()=>u(x,null,[h("Plant up to "),W(a.floor(Ne.value))," ",h("tree"),a.eq(Ne.value,1)?"":"s",h(" at once!"),u("br",null,null),de(vt)]))},style:{minHeight:"80px"},canClick:()=>a.gte(i.value,1)&&a.gte(Ae.value,He.value),onClick(){if(a.lt(Ae.value,He.value))return;const B=a.floor(a.min(i.value,a.times(Ne.value,a.div(Ae.value,He.value).floor())));i.value=a.sub(i.value,B),Ae.value=0}})),[Nt,St]=zn(()=>[{title:"Logs per Tree",modifier:Se,base:1,visible:g.bought},{title:"Manual Cutting Amount",modifier:X,base:1,visible:m.bought,unit:"/click"},{title:"Manual Cutting Cooldown",modifier:Ot,base:1,visible:m.bought,unit:"s"},{title:"Manual Planting Amount",modifier:jt,base:1,visible:v.bought,unit:"/click"},{title:"Manual Planting Cooldown",modifier:he,base:1,visible:v.bought,unit:"s"},{title:"Auto Cutting Amount",modifier:xe,base:0,visible:_.bought,unit:"/s"},{title:"Auto Planting Amount",modifier:st,base:0,visible:b.bought,unit:"/s"},{title:"Forest Size",modifier:r,base:10,visible:N.bought}]),dt=O(!1),j=T(()=>u(rt,{modelValue:dt.value,"onUpdate:modelValue":B=>dt.value=B},{header:()=>u("h2",null,[e,h(" Modifiers")]),body:Nt}));Ce.on("update",B=>{if(a.lt(z.day.value,ds))return;a.gte(Oe.value,je.value)?Oe.value=je.value:(Oe.value=a.add(Oe.value,B),Ve.isHolding.value&&Ve.onClick()),a.gte(Ae.value,He.value)?Ae.value=He.value:(Ae.value=a.add(Ae.value,B),ct.isHolding.value&&ct.onClick());const Mt=a.min(c.value,a.times(tt.value,B)),At=a.mul(Se.apply(1),Mt),bt=a.div(At,B);l.value=a.mul(bt,ms).add(a.mul(l.value,a.dOne.sub(ms))),s.value=a.add(s.value,At),i.value=a.add(i.value,Mt);const hn=a.min(i.value,a.times(Ke.value,B));i.value=a.sub(i.value,hn)});const yt=S(()=>a.sub(tt.value,Ke.value)),Qe=S(()=>a.sub(Ke.value,tt.value)),qt=On(()=>({key:"c",description:'Press the "Cut trees" button.',onPress:()=>{Ve.canClick.value&&Ve.onClick()}})),Ut=On(()=>({key:"p",description:'Press the "Plant trees" button.',onPress:()=>{ct.canClick.value&&ct.onClick()}})),{total:Zt,trackerDisplay:mt}=Pn({resource:s,goal:1e4,name:e,day:ds,color:n,modal:{show:dt,display:j}});return{name:e,color:t,logs:s,totalLogs:Zt,trees:c,saplings:i,cutTree:Ve,plantTree:ct,cutTreeHK:qt,plantTreeHK:Ut,row1Upgrades:w,row2Upgrades:R,row1Buyables:ut,manualCutProgress:Oe,manualPlantProgress:Ae,generalTabCollapsed:St,minWidth:700,display:T(()=>u(x,null,[de(mt),u(ve,null,null),u(Ht,{resource:s,color:t,style:"margin-bottom: 0",productionDisplay:a.gt(tt.value,0)?`+${te(l.value)}/s average
equilibrium: +${Ns([[a.mul(Se.apply(1),tt.value),"cutting speed"],[a.mul(Se.apply(1),Ke.value),"planting speed"],[a.mul(Se.apply(1),a.mul(d.value,20)),"forest cap"]],"/s")}`:void 0},null),u(Ht,{resource:i,color:n,style:"margin-bottom: 0",productionDisplay:{[-1]:`${W(yt.value)}/s`,0:void 0,1:`+${W(yt.value)}/s`}[a.compare(yt.value,0)]},null),u(Ht,{resource:c,color:n,style:"margin-bottom: 0",productionDisplay:{[-1]:`${W(Qe.value)}/s`,0:void 0,1:`+${W(Qe.value)}/s`}[a.compare(Qe.value,0)]},null),u(ve,null,null),qe(Ve,ct),u("div",null,[h("Tip: You can hold down on actions to perform them automatically")]),u(ve,null,null),qe(...w),qe(...R),qe(...ut)]))}});var Qs="./assets/tree.35808197.png",zs="./assets/sws.714ad454.png",js="data:image/png;base64,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",Ks="./assets/elf.9fbfa563.png",Ws="./assets/paperStacks.4c96ec8c.png",Js="data:image/png;base64,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";const z=Dt("main",function(){const e=Pe(1),t=O(!1),n=O(-1),s=O(""),i=O();function l(d){const m=Pe(!1),v=Pe(!1);return ze(()=>{const _=d(),b=Re(_.shouldNotify),g=Re(()=>o(b)||o(v));return{..._,opened:m,shouldNotify:g,recentlyUpdated:v,[Rt]:ol,[$t]:function(){const{day:w,layer:k,symbol:P,opened:le,shouldNotify:A,story:N,completedStory:R,recentlyUpdated:me}=this;return{day:w,symbol:P,opened:le,recentlyUpdated:me,shouldNotify:A,onOpenLore(){var ut,X;const ue=z.day.value>w;n.value=ue?w-1:-1;const et=o((X=(ut=Ue[k!=null?k:"trees"])==null?void 0:ut.name)!=null?X:"");s.value=ue?`${et} - Completed!`:et,i.value=ue?`${N}
${R}`:N,t.value=!0},onOpenLayer(){if(me.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(q.tabs.includes(k!=null?k:"trees")){const ue=q.tabs.lastIndexOf(k!=null?k:"trees");q.tabs.splice(ue,1)}else q.tabs.push(k!=null?k:"trees"),z.minimized.value=!0;else q.tabs.splice(1,1/0,k!=null?k:"trees")},onUnlockLayer(){le.value=!0,setTimeout(()=>{var ue,et;n.value=-1,s.value=o((et=(ue=Ue[k!=null?k:"trees"])==null?void 0:ue.name)!=null?et:""),i.value=N,q.devSpeed=null,t.value=!0},1e3)}}}}})}const r=[l(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Qs,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!"})),l(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:zs,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!"})),l(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:js,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!"})),l(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:Ks,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!"})),l(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:Ws,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!"})),l(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:Js,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!"})),l(()=>({day:7,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:8,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:9,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:10,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:11,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:12,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:13,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:14,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:15,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:16,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:17,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:18,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:19,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:20,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:21,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:22,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:23,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:24,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""}))];function c(){n.value=e.value-1,s.value="Day Complete!",i.value=r[e.value-1].completedStory,t.value=!0,e.value++,z.minimized.value=!1,q.devSpeed=0}return{name:"Calendar",days:r,day:e,loreScene:n,loreTitle:s,loreBody:i,showLoreModal:t,completeDay:c,minWidth:700,display:T(()=>u(x,null,[q.devSpeed===0?u("div",null,[h("Game Paused")]):null,q.devSpeed&&q.devSpeed!==1?u("div",null,[h("Dev Speed: "),te(q.devSpeed),h("x")]):null,q.offlineTime?u("div",null,[h("Offline Time: "),In(q.offlineTime)]):null,u(ve,null,null),u("div",{class:"advent"},[r.reduce((d,m)=>(d[d.length-1].length===4&&d.push([]),d[d.length-1].push(m),d),[[]]).map(d=>qe(...d))])]))}}),lo=e=>[z,Y,Le,Q,_e,se,Je],Jn=S(()=>!1);function oo(e,t){t.offlineProd=!1}var ro=Object.freeze(Object.defineProperty({__proto__:null,main:z,getInitialLayers:lo,hasWon:Jn,fixOldSave:oo},Symbol.toStringTag,{value:"Module"}));const uo={class:"scene"},co=["src"],mo=["src"],fo=["src"],po=["src"],ho={key:4,class:"scene-bubble",style:{left:"50%",bottom:"38%"}},go=["src"],vo=["src"],yo=L({__name:"Scene",props:{day:null},setup(e){return(t,n)=>(y(),M("div",uo,[e.day>=0?(y(),M("img",{key:0,src:o(Qs),class:"scene-item",style:{left:"10%",bottom:"10%"}},null,8,co)):E("",!0),e.day>=1?(y(),M("img",{key:1,src:o(zs),class:"scene-item",style:{left:"40%",bottom:"12%"}},null,8,mo)):E("",!0),e.day>=2?(y(),M("img",{key:2,src:o(js),class:"scene-item",style:{left:"65%",bottom:"12%",width:"40px",height:"40px"}},null,8,fo)):E("",!0),e.day>=3?(y(),M("img",{key:3,src:o(Ks),class:"scene-item",style:{left:"52%",bottom:"12%"}},null,8,po)):E("",!0),e.day>=4?(y(),M("div",ho,[e.day>=4?(y(),M("img",{key:0,src:o(Ws),class:"scene-item"},null,8,go)):E("",!0),e.day>=5?(y(),M("img",{key:1,src:o(Js),class:"scene-item"},null,8,vo)):E("",!0)])):E("",!0)]))}});var bo=ne(yo,[["__scopeId","data-v-36663c1c"]]);const _o=L({components:{Context:As},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:$(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:$(Number,String),required:!0},name:{type:$(String),required:!0},color:$(String),minimizable:$(Boolean),nodes:{type:Object,required:!0}},setup(e){const{display:t,index:n,minimized:s,minWidth:i,tab:l}=De(e),r=Cn(t),c=S(()=>ae.allowGoBack&&n.value>0&&!s.value);function d(){q.tabs.splice(o(e.index),1)}Qt(()=>v(s.value,o(i.value))),ht([s,Ha(i)],([_,b])=>v(_,b));function m(_){e.nodes.value=_}function v(_,b){const g=typeof b=="number"||Number.isNaN(parseInt(b))?b+"px":b,w=l.value();w!=null&&(_?(w.style.flexGrow="0",w.style.flexShrink="0",w.style.width="60px",w.style.minWidth=w.style.flexBasis="",w.style.margin="0"):(w.style.flexGrow="",w.style.flexShrink="",w.style.width="",w.style.minWidth=w.style.flexBasis=g,w.style.margin=""))}return{component:r,showGoBack:c,updateNodes:m,unref:o,goBack:d}}});function wo(e,t,n,s,i,l){const r=Ft("Context");return y(),M("div",{class:"layer-container",style:Ie({"--layer-color":e.unref(e.color)})},[e.showGoBack?(y(),M("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...c)=>e.goBack&&e.goBack(...c))},"\u274C")):E("",!0),e.minimized.value?(y(),M("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=c=>e.minimized.value=!1)},[f("div",null,J(e.unref(e.name)),1)])):(y(),M("div",{key:2,class:ke(["layer-tab",{showGoBack:e.showGoBack}])},[u(r,{onUpdateNodes:e.updateNodes},{default:U(()=>[(y(),G(ye(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(y(),M("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=c=>e.minimized.value=!0)}," \u25BC ")):E("",!0)],4)}var ko=ne(_o,[["render",wo],["__scopeId","data-v-0158bec3"]]);const Xs=e=>(wt("data-v-4b4bda40"),e=e(),kt(),e),Co=Xs(()=>f("h2",null,"Changelog",-1)),No=Xs(()=>f("details",{open:""},[f("summary",null,[h("v0.0 Initial Commit - "),f("time",null,"2021-09-04")]),h(" This is the first release :D "),f("ul",null,[f("li",{class:"feature"},"Did everything"),f("li",{class:"fix"},"Had some fun"),f("li",{class:"breaking"},"Removed everything"),f("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),So=L({__name:"Changelog",setup(e,{expose:t}){const n=O(!1);return t({open(){n.value=!0}}),(s,i)=>(y(),G(rt,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=l=>n.value=l)},{header:U(()=>[Co]),body:U(()=>[No]),_:1},8,["modelValue"]))}});var Mo=ne(So,[["__scopeId","data-v-4b4bda40"]]),Ao=L({props:{element:Object,display:{type:$(Object,String,Function),required:!0},style:$(Object,String,Array),classes:$(Object),direction:$(String),xoffset:$(String),yoffset:$(String),pinned:Object},setup(e){const{element:t,display:n,pinned:s}=De(e),i=O(!1),l=S(()=>(Be(s)||i.value)&&r.value),r=Tt(n),c=nt(ee(T(()=>{const v=Be(t);return v==null?"":lt(v)})));function d(v){const _=s;v.shiftKey&&_&&(_.value=!_.value,v.stopPropagation(),v.preventDefault())}const m=S(()=>Be(s)&&dn[pe.theme].showPin);return{Direction:ie,isHovered:i,isShown:l,comp:r,elementComp:c,unref:o,togglePinned:d,showPin:m}}});const Io={key:0,class:"material-icons pinned"};function Eo(e,t,n,s,i,l){return y(),M("div",{class:ke(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=r=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=r=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...r)=>e.togglePinned&&e.togglePinned(...r))},[ft(e.$slots,"default",{},void 0,!0),e.elementComp?(y(),G(ye(e.elementComp),{key:0})):E("",!0),u(Mn,{name:"fade"},{default:U(()=>{var r;return[e.isShown?(y(),M("div",{key:0,class:ke(["tooltip",{top:e.unref(e.direction)===e.Direction.Up,left:e.unref(e.direction)===e.Direction.Left,right:e.unref(e.direction)===e.Direction.Right,bottom:e.unref(e.direction)===e.Direction.Down,...e.unref(e.classes)}]),style:Ie([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(r=e.unref(e.style))!=null?r:{}])},[e.showPin?(y(),M("span",Io,"push_pin")):E("",!0),e.comp?(y(),G(ye(e.comp),{key:1})):E("",!0)],6)):E("",!0)]}),_:1})],34)}var be=ne(Ao,[["render",Eo],["__scopeId","data-v-6102fa3a"]]);const Bo={class:"info-modal-header"},Po=["src","alt"],xo={class:"info-modal-title"},Fo={key:0},To={key:0},Ro={key:0},$o=f("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1),Do=f("br",null,null,-1),Oo=f("br",null,null,-1),qo=["href"],Uo=f("span",{class:"material-icons info-modal-discord"},"discord",-1),Vo=f("div",null,[f("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[f("span",{class:"material-icons info-modal-discord"},"discord"),h(" The Paper Pilot Community ")])],-1),Lo=f("div",null,[f("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link",target:"_blank"},[f("span",{class:"material-icons info-modal-discord"},"discord"),h(" The Modding Tree ")])],-1),Go=f("br",null,null,-1);var Ho=L({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const n=e,{title:s,logo:i,author:l,discordName:r,discordLink:c,versionNumber:d,versionTitle:m}=ae,v=De(n),_=O(!1),b=S(()=>In(q.timePlayed)),g=S(()=>ee(T(()=>u(x,null,[$s.map(de)]))));t({open(){_.value=!0}});function w(){var k;(k=o(v.changelog))==null||k.open()}return(k,P)=>(y(),G(rt,{modelValue:_.value,"onUpdate:modelValue":P[0]||(P[0]=le=>_.value=le)},{header:U(()=>[f("div",Bo,[o(i)?(y(),M("img",{key:0,class:"info-modal-logo",src:o(i),alt:o(s)},null,8,Po)):E("",!0),f("div",xo,[f("h2",null,J(o(s)),1),f("h4",null,[h(" v"+J(o(d)),1),o(m)?(y(),M("span",Fo,": "+J(o(m)),1)):E("",!0)])])])]),body:U(({shown:le})=>[le?(y(),M("div",To,[o(l)?(y(),M("div",Ro,"By "+J(o(l)),1)):E("",!0),$o,Do,f("div",{class:"link",onClick:w},"Changelog"),Oo,f("div",null,[o(c)?(y(),M("a",{key:0,href:o(c),class:"info-modal-discord-link",target:"_blank"},[Uo,h(" "+J(o(r)),1)],8,qo)):E("",!0)]),Vo,Lo,Go,f("div",null,"Time Played: "+J(o(b)),1),(y(),G(ye(o(g))))])):E("",!0)]),_:1},8,["modelValue"]))}});const Ys=e=>(wt("data-v-a03c577c"),e=e(),kt(),e),Qo=Ys(()=>f("div",{class:"header"},[f("h2",null,"Options")],-1)),zo=Ys(()=>f("hr",null,null,-1));var jo=L({__name:"Options",setup(e,{expose:t}){const n=O(!1);t({open(){n.value=!0}});const s=Object.keys(dn).map(g=>({label:Ss(g),value:g})),i=S(()=>ee(T(()=>u(x,null,[Rs.map(de)])))),{showTPS:l,theme:r}=De(pe),{autosave:c,usingLog:d}=De(q),m=S({get(){return q.devSpeed===0},set(g){q.devSpeed=g?0:null}}),v=T(()=>u("span",null,[h("Autosave"),u(be,{display:"Save-specific"},{default:()=>[h("*")]})])),_=T(()=>u("span",null,[h("Pause game"),u(be,{display:"Save-specific"},{default:()=>[h("*")]})])),b=T(()=>u("span",null,[h("Use log for progress bar"),u(be,{display:"Save-specific"},{default:()=>[h("*")]})]));return(g,w)=>(y(),G(rt,{modelValue:n.value,"onUpdate:modelValue":w[5]||(w[5]=k=>n.value=k)},{header:U(()=>[Qo]),body:U(()=>[u(Wn,{title:"Theme",options:o(s),modelValue:o(r),"onUpdate:modelValue":w[0]||(w[0]=k=>we(r)?r.value=k:null)},null,8,["options","modelValue"]),(y(),G(ye(o(i)))),u(Bt,{title:"Show TPS",modelValue:o(l),"onUpdate:modelValue":w[1]||(w[1]=k=>we(l)?l.value=k:null)},null,8,["modelValue"]),zo,u(Bt,{title:o(v),modelValue:o(c),"onUpdate:modelValue":w[2]||(w[2]=k=>we(c)?c.value=k:null)},null,8,["title","modelValue"]),o(ae).enablePausing?(y(),G(Bt,{key:0,title:o(_),modelValue:o(m),"onUpdate:modelValue":w[3]||(w[3]=k=>we(m)?m.value=k:null)},null,8,["title","modelValue"])):E("",!0),u(Bt,{title:o(b),modelValue:o(d),"onUpdate:modelValue":w[4]||(w[4]=k=>we(d)?d.value=k:null)},null,8,["title","modelValue"])]),_:1},8,["modelValue"]))}});var Ko=ne(jo,[["__scopeId","data-v-a03c577c"]]);const Wo=["onSubmit"],Jo={class:"field"},Xo={key:0,class:"field-title"},Yo=["placeholder"],Zo=L({__name:"Text",props:{title:null,modelValue:null,textArea:{type:Boolean},placeholder:null,maxHeight:null,submitOnBlur:{type:Boolean}},emits:["update:modelValue","submit","cancel"],setup(e,{emit:t}){const n=e,s=Tt(ot(n,"title"),"span"),i=nt(null);Nn(()=>{var d;(d=i.value)==null||d.focus()});const l=S({get(){return o(n.modelValue)||""},set(d){t("update:modelValue",d)}});function r(){t("submit")}function c(){n.submitOnBlur!==!1?t("submit"):t("cancel")}return(d,m)=>(y(),M("form",{onSubmit:an(r,["prevent"])},[f("div",Jo,[o(s)?(y(),M("span",Xo,[(y(),G(ye(o(s))))])):E("",!0),e.textArea?(y(),G(o(yi),{key:1,modelValue:o(l),"onUpdate:modelValue":m[0]||(m[0]=v=>we(l)?l.value=v:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:c,ref_key:"field",ref:i},null,8,["modelValue","placeholder","maxHeight"])):Sn((y(),M("input",{key:2,type:"text","onUpdate:modelValue":m[1]||(m[1]=v=>we(l)?l.value=v:null),placeholder:e.placeholder,class:ke({fullWidth:!e.title}),onBlur:c,ref_key:"field",ref:i},null,42,Yo)),[[mi,o(l)]])])],40,Wo))}});var Zs=ne(Zo,[["__scopeId","data-v-67b44a54"]]);const er={key:0},tr=["onClick","disabled"],nr={key:0},sr=["onClick"],ir=L({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const s=De(e),i=O(!1);ht(i,c=>{t("confirmingChanged",c)});function l(){if(o(s.skipConfirm)){t("click");return}i.value&&t("click"),i.value=!i.value}function r(){i.value=!1}return(c,d)=>(y(),M("span",{class:ke(["container",{confirming:i.value}])},[i.value?(y(),M("span",er,"Are you sure?")):E("",!0),f("button",{onClick:an(l,["stop"]),class:"button danger",disabled:e.disabled},[i.value?(y(),M("span",nr,"Yes")):ft(c.$slots,"default",{key:1},void 0,!0)],8,tr),i.value?(y(),M("button",{key:1,class:"button",onClick:an(r,["stop"])},"No",8,sr)):E("",!0)],2))}});var ar=ne(ir,[["__scopeId","data-v-2f8ef34c"]]);const lr=["onClick"],or=L({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=O(!1),s=O(null);function i(){t("click"),s.value&&clearTimeout(s.value),n.value=!1,Qt(()=>{n.value=!0,s.value=setTimeout(()=>n.value=!1,500)})}return(l,r)=>(y(),M("button",{onClick:an(i,["stop"]),class:ke(["feedback",{activated:n.value,left:e.left}])},[ft(l.$slots,"default",{},void 0,!0)],10,lr))}});var rr=ne(or,[["__scopeId","data-v-01a1b95c"]]);const Ct=e=>(wt("data-v-5285ac49"),e=e(),kt(),e),ur=Ct(()=>f("div",{class:"handle material-icons"},"drag_handle",-1)),cr={key:0,class:"actions"},dr=Ct(()=>f("span",{class:"material-icons"},"content_paste",-1)),mr=Ct(()=>f("span",{class:"material-icons"},"content_copy",-1)),fr=Ct(()=>f("span",{class:"material-icons"},"edit",-1)),pr=Ct(()=>f("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),hr={key:1,class:"actions"},gr=Ct(()=>f("span",{class:"material-icons"},"check",-1)),vr=Ct(()=>f("span",{class:"material-icons"},"close",-1)),yr={key:2,class:"details"},br={class:"save-version"},_r=Ct(()=>f("br",null,null,-1)),wr={key:0},kr={key:1},Cr={key:3,class:"details"},Nr={key:4,class:"details error"},Sr=Ct(()=>f("br",null,null,-1)),Mr=L({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const n=e,{save:s}=De(n),i=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),l=O(!1),r=O(!1),c=O("");ht(l,()=>c.value=s.value.name||"");const d=S(()=>s.value&&s.value.id===q.id),m=S(()=>d.value?q.time:s.value&&s.value.time||0),v=Cn(S(()=>{var b,g,w,k;return`Day ${(k=(w=(g=(b=s.value)==null?void 0:b.layers)==null?void 0:g.main)==null?void 0:w.day)!=null?k:1}`}));function _(){t("editName",c.value),l.value=!1}return(b,g)=>(y(),M("div",{class:ke(["save",{active:o(d)}])},[ur,l.value?(y(),M("div",hr,[f("button",{onClick:_,class:"button"},[u(be,{display:"Save",direction:o(ie).Left,class:"info"},{default:U(()=>[gr]),_:1},8,["direction"])]),f("button",{onClick:g[5]||(g[5]=w=>l.value=!l.value),class:"button"},[u(be,{display:"Cancel",direction:o(ie).Left,class:"info"},{default:U(()=>[vr]),_:1},8,["direction"])])])):(y(),M("div",cr,[o(s).error==null&&!r.value?(y(),G(rr,{key:0,onClick:g[0]||(g[0]=w=>t("export")),class:"button",left:""},{default:U(()=>[u(be,{display:"Export",direction:o(ie).Left,class:"info"},{default:U(()=>[dr]),_:1},8,["direction"])]),_:1})):E("",!0),o(s).error==null&&!r.value?(y(),M("button",{key:1,onClick:g[1]||(g[1]=w=>t("duplicate")),class:"button"},[u(be,{display:"Duplicate",direction:o(ie).Left,class:"info"},{default:U(()=>[mr]),_:1},8,["direction"])])):E("",!0),o(s).error==null&&!r.value?(y(),M("button",{key:2,onClick:g[2]||(g[2]=w=>l.value=!l.value),class:"button"},[u(be,{display:"Edit Name",direction:o(ie).Left,class:"info"},{default:U(()=>[fr]),_:1},8,["direction"])])):E("",!0),u(ar,{disabled:o(d),onClick:g[3]||(g[3]=w=>t("delete")),onConfirmingChanged:g[4]||(g[4]=w=>r.value=w)},{default:U(()=>[u(be,{display:"Delete",direction:o(ie).Left,class:"info"},{default:U(()=>[pr]),_:1},8,["direction"])]),_:1},8,["disabled"])])),o(s).error==null&&!l.value?(y(),M("div",yr,[f("button",{class:"button open",onClick:g[6]||(g[6]=w=>t("open"))},[f("h3",null,J(o(s).name),1)]),f("span",br,"v"+J(o(s).modVersion),1),_r,o(m)?(y(),M("div",wr,"Last played "+J(o(i).format(o(m))),1)):E("",!0),o(v)?(y(),M("div",kr,[(y(),G(ye(o(v))))])):E("",!0)])):o(s).error==null&&l.value?(y(),M("div",Cr,[u(Zs,{modelValue:c.value,"onUpdate:modelValue":g[7]||(g[7]=w=>c.value=w),class:"editname",onSubmit:_},null,8,["modelValue"])])):(y(),M("div",Nr,[h(" Error: Failed to load save with id "+J(o(s).id),1),Sr,h(J(o(s).error),1)]))],2))}});var Ar=ne(Mr,[["__scopeId","data-v-5285ac49"]]);const Xn=e=>(wt("data-v-3b9991aa"),e=e(),kt(),e),Ir=Xn(()=>f("h2",null,"Saves Manager",-1)),Er={class:"modal-footer"},Br={class:"field"},Pr=Xn(()=>f("span",{class:"field-title"},"Create Save",-1)),xr={class:"field-buttons"},Fr={class:"footer"},Tr=Xn(()=>f("div",{style:{"flex-grow":"1"}},null,-1)),Rr=L({__name:"SavesManager",setup(e,{expose:t}){const n=O(!1),s=O(null);t({open(){n.value=!0}});const i=O(!1),l=O(""),r=O(null);ht(l,A=>{A?Qt(()=>{try{if(A[0]!=="{")if(A[0]==="e")A=decodeURIComponent(escape(atob(A)));else if(A[0]==="\u1BE1")A=Et.decompressFromUTF16(A);else{console.warn("Unable to determine preset encoding",A),i.value=!0;return}const N=JSON.parse(A);if(typeof N!="object"){i.value=!0;return}const R=yn();N.id=R,at(N),l.value="",i.value=!1,pe.saves.push(R)}catch{i.value=!0}}):i.value=!1});let c={},d=O(Object.keys(c).reduce((A,N)=>(A.push({label:N.split("/").slice(-1)[0].slice(0,-4),value:c[N]}),A),[]));const m=An({});function v(A){if(m[A]==null){let N=localStorage.getItem(A);if(N==null)m[A]={error:"Save doesn't exist in localStorage",id:A};else if(N==="dW5kZWZpbmVk")m[A]={error:"Save is undefined",id:A};else try{if(N[0]!=="{")if(N[0]==="e")N=decodeURIComponent(escape(atob(N)));else if(N[0]==="\u1BE1")N=Et.decompressFromUTF16(N);else return console.warn("Unable to determine preset encoding",N),i.value=!0,m[A]={error:"Unable to determine preset encoding",id:A},m[A];m[A]={...JSON.parse(N),id:A}}catch(R){m[A]={error:R,id:A},console.warn(`SavesManager: Failed to load info about save with id ${A}: -${R} -${N}`)}}return m[A]}ht(n,A=>{A&&Object.keys(m).forEach(N=>delete m[N])});const _=S(()=>pe.saves.reduce((A,N)=>(A[N]=v(N),A),{}));function b(A){let N;switch(q.id===A?N=xs(q[fe]):N=JSON.stringify(_.value[A]),ae.exportEncoding){default:console.warn(`Unknown save encoding: ${ae.exportEncoding}. Defaulting to lz`);case"lz":N=Et.compressToUTF16(N);break;case"base64":N=btoa(unescape(encodeURIComponent(N)));break;case"plain":break}const R=document.createElement("textarea");R.value=N,document.body.appendChild(R),R.select(),R.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(R)}function g(A){q.id===A&&at();const N={..._.value[A],id:yn()};at(N),pe.saves.push(N.id)}function w(A){pe.saves=pe.saves.filter(N=>N!==A),localStorage.removeItem(A),m[A]=void 0}function k(A){_.value[q.id].time=q.time,at(),m[q.id]=void 0,Gt(_.value[A]),m[A]=void 0}function P(A){if(r.value=A,Qt(()=>{r.value=null}),A[0]!=="{")if(A[0]==="e")A=decodeURIComponent(escape(atob(A)));else if(A[0]==="\u1BE1")A=Et.decompressFromUTF16(A);else{console.warn("Unable to determine preset encoding",A);return}const N=JSON.parse(A);N.id=yn(),at(N),pe.saves.push(N.id),k(N.id)}function le(A,N){const R=_.value[A];R&&(R.name=N,q.id===A?(q.name=N,at()):(at(R),m[A]=void 0))}return(A,N)=>(y(),G(rt,{modelValue:n.value,"onUpdate:modelValue":N[4]||(N[4]=R=>n.value=R),ref_key:"modal",ref:s},{header:U(()=>[Ir]),body:U(({shown:R})=>[R?(y(),G(o(vi),{key:0,list:o(pe).saves,handle:".handle",itemKey:me=>me},{item:U(({element:me})=>[u(Ar,{save:o(_)[me],onOpen:ue=>k(me),onExport:ue=>b(me),onEditName:ue=>le(me,ue),onDuplicate:ue=>g(me),onDelete:ue=>w(me)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):E("",!0)]),footer:U(()=>[f("div",Er,[u(Zs,{modelValue:l.value,"onUpdate:modelValue":N[0]||(N[0]=R=>l.value=R),title:"Import Save",placeholder:"Paste your save here!",class:ke({importingFailed:i.value})},null,8,["modelValue","class"]),f("div",Br,[Pr,f("div",xr,[f("button",{class:"button",onClick:N[1]||(N[1]=R=>k(o(Jt)().id))},"New Game"),Object.keys(o(d)).length>0?(y(),G(Wn,{key:0,options:o(d),modelValue:r.value,"onUpdate:modelValue":N[2]||(N[2]=R=>P(R)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):E("",!0)])]),f("div",Fr,[Tr,f("button",{class:"button modal-default-button",onClick:N[3]||(N[3]=R=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var ei=ne(Rr,[["__scopeId","data-v-3b9991aa"]]);const Ze=e=>(wt("data-v-4a3f8425"),e=e(),kt(),e),$r=["src","alt"],Dr={key:1,class:"title"},Or=Ze(()=>f("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),qr={class:"discord"},Ur={class:"discord-links"},Vr={key:0},Lr=["href"],Gr=Ze(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Hr=Ze(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Qr={href:"https://forums.moddingtree.com/",target:"_blank"},zr=Ze(()=>f("span",{class:"material-icons"},"forum",-1)),jr=Ze(()=>f("span",{class:"material-icons"},"info",-1)),Kr=Ze(()=>f("span",{class:"material-icons"},"library_books",-1)),Wr=Ze(()=>f("span",{class:"material-icons"},"settings",-1)),Jr=Ze(()=>f("span",{class:"material-icons"},"library_books",-1)),Xr=Ze(()=>f("span",{class:"material-icons"},"settings",-1)),Yr=Ze(()=>f("span",{class:"material-icons"},"info",-1)),Zr={href:"https://forums.moddingtree.com/",target:"_blank"},eu=Ze(()=>f("span",{class:"material-icons"},"forum",-1)),tu={class:"discord"},nu={class:"discord-links"},su={key:0},iu=["href"],au=Ze(()=>f("li",null,[f("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),lu=Ze(()=>f("li",null,[f("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),ou=L({__name:"Nav",setup(e){const t=O(null),n=O(null),s=O(null),i=O(null),{useHeader:l,banner:r,title:c,discordName:d,discordLink:m,versionNumber:v}=ae;function _(){window.open(m,"mywindow")}return(b,g)=>(y(),M(x,null,[o(l)?(y(),M("div",zt({key:0,class:"nav"},b.$attrs),[o(r)?(y(),M("img",{key:0,src:o(r),class:"banner",alt:o(c)},null,8,$r)):(y(),M("div",Dr,J(o(c)),1)),f("div",{onClick:g[0]||(g[0]=w=>{var k;return(k=i.value)==null?void 0:k.open()}),class:"version-container"},[u(be,{display:"Changelog",direction:o(ie).Down,class:"version"},{default:U(()=>[f("span",null,"v"+J(o(v)),1)]),_:1},8,["direction"])]),Or,f("div",qr,[f("span",{onClick:_,class:"material-icons"},"discord"),f("ul",Ur,[o(m)?(y(),M("li",Vr,[f("a",{href:o(m),target:"_blank"},J(o(d)),9,Lr)])):E("",!0),Gr,Hr])]),f("div",null,[f("a",Qr,[u(be,{display:"Forums",direction:o(ie).Down,yoffset:"5px"},{default:U(()=>[zr]),_:1},8,["direction"])])]),f("div",{onClick:g[1]||(g[1]=w=>{var k;return(k=t.value)==null?void 0:k.open()})},[u(be,{display:"Info",direction:o(ie).Down,class:"info"},{default:U(()=>[jr]),_:1},8,["direction"])]),f("div",{onClick:g[2]||(g[2]=w=>{var k;return(k=n.value)==null?void 0:k.open()})},[u(be,{display:"Saves",direction:o(ie).Down,xoffset:"-20px"},{default:U(()=>[Kr]),_:1},8,["direction"])]),f("div",{onClick:g[3]||(g[3]=w=>{var k;return(k=s.value)==null?void 0:k.open()})},[u(be,{display:"Options",direction:o(ie).Down,xoffset:"-66px"},{default:U(()=>[Wr]),_:1},8,["direction"])])],16)):(y(),M("div",zt({key:1,class:"overlay-nav"},b.$attrs),[f("div",{onClick:g[4]||(g[4]=w=>{var k;return(k=i.value)==null?void 0:k.open()}),class:"version-container"},[u(be,{display:"Changelog",direction:o(ie).Right,xoffset:"25%",class:"version"},{default:U(()=>[f("span",null,"v"+J(o(v)),1)]),_:1},8,["direction"])]),f("div",{onClick:g[5]||(g[5]=w=>{var k;return(k=n.value)==null?void 0:k.open()})},[u(be,{display:"Saves",direction:o(ie).Right},{default:U(()=>[Jr]),_:1},8,["direction"])]),f("div",{onClick:g[6]||(g[6]=w=>{var k;return(k=s.value)==null?void 0:k.open()})},[u(be,{display:"Options",direction:o(ie).Right},{default:U(()=>[Xr]),_:1},8,["direction"])]),f("div",{onClick:g[7]||(g[7]=w=>{var k;return(k=t.value)==null?void 0:k.open()})},[u(be,{display:"Info",direction:o(ie).Right},{default:U(()=>[Yr]),_:1},8,["direction"])]),f("div",null,[f("a",Zr,[u(be,{display:"Forums",direction:o(ie).Right,xoffset:"7px"},{default:U(()=>[eu]),_:1},8,["direction"])])]),f("div",tu,[f("span",{onClick:_,class:"material-icons"},"discord"),f("ul",nu,[o(m)?(y(),M("li",su,[f("a",{href:o(m),target:"_blank"},J(o(d)),9,iu)])):E("",!0),au,lu])])],16)),u(Ho,{ref_key:"info",ref:t,changelog:i.value},null,8,["changelog"]),u(ei,{ref_key:"savesManager",ref:n},null,512),u(Ko,{ref_key:"options",ref:s},null,512),u(Mo,{ref_key:"changelog",ref:i},null,512)],64))}});var ti=ne(ou,[["__scopeId","data-v-4a3f8425"]]);const Yn=e=>(wt("data-v-248e2ebb"),e=e(),kt(),e),ru={class:"inner-tab"},uu={key:1},cu=Yn(()=>f("br",null,null,-1)),du=h(" You can help continue the "),mu=Yn(()=>f("i",null,"advent",-1)),fu=h("ure at: "),pu=Yn(()=>f("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[f("span",{class:"material-icons info-modal-discord"},"discord"),h(" The Paper Pilot Community ")],-1)),hu=L({__name:"Game",setup(e){const t=ot(q,"tabs"),n=S(()=>Object.keys(Ue)),s=ae.useHeader,i=Tt(z.loreBody);function l(r){const{display:c,minimized:d,minWidth:m,name:v,color:_,minimizable:b,nodes:g}=r;return{display:c,minimized:d,minWidth:m,name:v,color:_,minimizable:b,nodes:g}}return(r,c)=>(y(),M("div",{class:ke(["tabs-container",{useHeader:o(s)}])},[(y(!0),M(x,null,hs(o(t),(d,m)=>{var v,_;return y(),M("div",{key:m,class:ke(["tab",o((v=o(Ue)[d])==null?void 0:v.classes)]),ref_for:!0,ref:`tab-${m}`,style:Ie(o((_=o(Ue)[d])==null?void 0:_.style))},[m===0&&!o(s)?(y(),G(ti,{key:0})):E("",!0),f("div",ru,[o(n).includes(d)?(y(),G(ko,zt({key:0},l(o(Ue)[d]),{index:m,tab:()=>{var b;return(b=r.$refs[`tab-${m}`])==null?void 0:b[0]}}),null,16,["index","tab"])):(y(),G(ye(d),{key:1,index:m},null,8,["index"]))])],6)}),128)),u(rt,{modelValue:o(z).showLoreModal.value,"onUpdate:modelValue":c[0]||(c[0]=d=>o(z).showLoreModal.value=d)},{header:U(()=>[f("h2",null,J(o(z).loreTitle.value),1)]),body:U(()=>[o(i)?(y(),G(ye(o(i)),{key:0})):E("",!0),o(z).loreScene.value!==-1?(y(),M("div",uu,[u(bo,{day:o(z).loreScene.value},null,8,["day"]),cu,du,mu,fu,pu])):E("",!0)]),_:1},8,["modelValue"])],2))}});var gu=ne(hu,[["__scopeId","data-v-248e2ebb"]]);const pn=e=>(wt("data-v-4a50ce42"),e=e(),kt(),e),vu={class:"game-over-modal-header"},yu=["src","alt"],bu={class:"game-over-modal-title"},_u=pn(()=>f("h2",null,"Congratulations!",-1)),wu={key:0},ku=pn(()=>f("br",null,null,-1)),Cu=pn(()=>f("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),Nu=pn(()=>f("br",null,null,-1)),Su=["href"],Mu=pn(()=>f("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),Au=L({__name:"GameOverScreen",setup(e){const{title:t,logo:n,discordName:s,discordLink:i,versionNumber:l,versionTitle:r}=ae,c=S(()=>In(q.timePlayed)),d=S(()=>Jn.value&&!q.keepGoing),m=ot(q,"autosave");function v(){q.keepGoing=!0}function _(){Gt(Jt())}return(b,g)=>(y(),G(rt,{"model-value":o(d)},{header:U(()=>[f("div",vu,[o(n)?(y(),M("img",{key:0,class:"game-over-modal-logo",src:o(n),alt:o(t)},null,8,yu)):E("",!0),f("div",bu,[_u,f("h4",null,"You've beaten "+J(o(t))+" v"+J(o(l))+": "+J(o(r)),1)])])]),body:U(({shown:w})=>[w?(y(),M("div",wu,[f("div",null,"It took you "+J(o(c))+" to beat the game.",1),ku,Cu,Nu,f("div",null,[f("a",{href:o(i),class:"game-over-modal-discord-link"},[Mu,h(" "+J(o(s)),1)],8,Su)]),u(Bt,{title:"Autosave",modelValue:o(m),"onUpdate:modelValue":g[0]||(g[0]=k=>we(m)?m.value=k:null)},null,8,["modelValue"])])):E("",!0)]),footer:U(()=>[f("div",{class:"game-over-footer"},[f("button",{onClick:v,class:"button"},"Keep Going"),f("button",{onClick:_,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var Iu=ne(Au,[["__scopeId","data-v-4a50ce42"]]);const Fn=e=>(wt("data-v-3de07c06"),e=e(),kt(),e),Eu=Fn(()=>f("div",{class:"nan-modal-header"},[f("h2",null,"NaN value detected!")],-1)),Bu={key:0},Pu=Fn(()=>f("br",null,null,-1)),xu=["href"],Fu=Fn(()=>f("span",{class:"material-icons nan-modal-discord"},"discord",-1)),Tu=Fn(()=>f("br",null,null,-1)),Ru={class:"nan-footer"},$u=L({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:n}=ae,s=ot(q,"autosave"),i=ot(ge,"hasNaN"),l=O(null),r=S(()=>{var g;return(g=ge.NaNPath)==null?void 0:g.join(".")}),c=S(()=>{var g;return(g=ge.NaNPath)==null?void 0:g.slice(-1)[0]}),d=S(()=>ge.NaNReceiver&&c.value?ge.NaNReceiver[c.value]:null),m=S({get(){return q.devSpeed===0},set(g){q.devSpeed=g?null:0}});function v(){ge.NaNReceiver&&c.value&&(ge.NaNReceiver[c.value]=new a(0),ge.hasNaN=!1)}function _(){ge.NaNReceiver&&c.value&&(ge.NaNReceiver[c.value]=new a(1),ge.hasNaN=!1)}function b(){ge.NaNReceiver&&c.value&&(ge.NaNReceiver[c.value]=new a(NaN),ge.hasNaN=!1)}return(g,w)=>(y(),M(x,null,[u(rt,zt({modelValue:o(i),"onUpdate:modelValue":w[4]||(w[4]=k=>we(i)?i.value=k:null)},g.$attrs),{header:U(()=>[Eu]),body:U(()=>[f("div",null,[h(' Attempted to assign "'+J(o(r))+'" to NaN',1),o(d)?(y(),M("span",Bu,J(" ")+"(previously "+J(o(te)(o(d)))+")",1)):E("",!0),h(". Auto-saving has been "+J(o(s)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),Pu,f("div",null,[f("a",{href:o(n),class:"nan-modal-discord-link"},[Fu,h(" "+J(o(t)),1)],8,xu)]),Tu,u(Bt,{title:"Autosave",modelValue:o(s),"onUpdate:modelValue":w[0]||(w[0]=k=>we(s)?s.value=k:null)},null,8,["modelValue"]),o(ae).enablePausing?(y(),G(Bt,{key:0,title:"Pause game",modelValue:o(m),"onUpdate:modelValue":w[1]||(w[1]=k=>we(m)?m.value=k:null)},null,8,["modelValue"])):E("",!0)]),footer:U(()=>[f("div",Ru,[f("button",{onClick:w[2]||(w[2]=k=>{var P;return(P=l.value)==null?void 0:P.open()}),class:"button"},"Open Saves Manager"),f("button",{onClick:v,class:"button"},"Set to 0"),f("button",{onClick:_,class:"button"},"Set to 1"),o(d)&&o(a).neq(o(d),0)&&o(a).neq(o(d),1)?(y(),M("button",{key:0,onClick:w[3]||(w[3]=k=>i.value=!1),class:"button"}," Set to previous ")):E("",!0),f("button",{onClick:b,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),u(ei,{ref_key:"savesManager",ref:l},null,512)],64))}});var Du=ne($u,[["__scopeId","data-v-3de07c06"]]);const Ou={key:0,class:"tpsDisplay"},qu={key:0,class:"low"},Uu=L({__name:"TPS",setup(e){const t=S(()=>a.div(ge.lastTenTicks.length,ge.lastTenTicks.reduce((l,r)=>l+r,0))),n=O([]);Xe(()=>{n.value.push(Math.round(t.value.toNumber())),n.value.length>10&&(n.value=n.value.slice(1))});const s=S(()=>n.value.reduce((l,r)=>a.max(l,r),0)),i=S(()=>a.sub(t.value,s.value).gt(1));return(l,r)=>o(t).isNan()?E("",!0):(y(),M("div",Ou,[h(" TPS: "+J(o(W)(o(t)))+" ",1),u(Mn,{name:"fade"},{default:U(()=>[o(i)?(y(),M("span",qu,J(o(W)(o(s))),1)):E("",!0)]),_:1})]))}});var Vu=ne(Uu,[["__scopeId","data-v-46a3ed5b"]]);var Lu=L({__name:"App",setup(e){const t=ae.useHeader,n=S(()=>dn[pe.theme].variables),s=ot(pe,"showTPS"),i=S(()=>ee(T(()=>u(x,null,[qa.map(de)]))));return(l,r)=>(y(),M(x,null,[f("div",{id:"modal-root",style:Ie(o(n))},null,4),f("div",{class:ke(["app",{useHeader:o(t)}]),style:Ie(o(n))},[o(t)?(y(),G(ti,{key:0})):E("",!0),u(gu),o(o(s))?(y(),G(Vu,{key:1})):E("",!0),u(Iu),u(Du),(y(),G(ye(o(i))))],6)],64))}});var Gu=ne(Lu,[["__scopeId","data-v-7c41425b"]]);function Hu(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:s,onRegistered:i,onRegisterError:l}=e;let r,c;const d=async(m=!0)=>{m&&(r==null||r.addEventListener("controlling",v=>{v.isUpdate&&window.location.reload()})),c&&c.waiting&&await _i(c.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){r=new bi("./sw.js",{scope:"./",type:"classic"}),r.addEventListener("activated",m=>{m.isUpdate||s==null||s()});{const m=()=>{n==null||n()};r.addEventListener("waiting",m),r.addEventListener("externalwaiting",m)}r.register({immediate:t}).then(m=>{c=m,i==null||i(m)}).catch(m=>{l==null||l(m)})}return d}function Qu(e={}){const{immediate:t=!0,onNeedRefresh:n,onOfflineReady:s,onRegistered:i,onRegisterError:l}=e,r=O(!1),c=O(!1);return{updateServiceWorker:Hu({immediate:t,onNeedRefresh(){r.value=!0,n==null||n()},onOfflineReady(){c.value=!0,s==null||s()},onRegistered:i,onRegisterError:l}),offlineReady:c,needRefresh:r}}document.title=ae.title;window.projInfo=ae;if(ae.id==="")throw"Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json";requestAnimationFrame(async()=>{console.log(`%cMade in Profectus%c -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 Ta();const{globalBus:e}=await _n(()=>Promise.resolve().then(function(){return va}),void 0),{startGameLoop:t}=await _n(()=>import("./gameLoop.dea3629b.js"),["assets/gameLoop.dea3629b.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=fi(Gu);e.emit("setupVue",n),n.mount("#app"),Qt(()=>{const s=vs(),{updateServiceWorker:i}=Qu({onNeedRefresh(){s.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(){s.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(l){l&&setInterval(l.update,60*60*1e3)}})}),t()});export{a as D,_n as _,ge as a,ae as b,ro as c,Ce as g,q as p,pe as s}; diff --git a/index.html b/index.html index fa882b4..35a7973 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ Advent Incremental - + @@ -27,7 +27,7 @@ - + diff --git a/sw.js b/sw.js index ded9173..39cff90 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,l)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let t={};const o=e=>i(e,r),u={module:{uri:r},exports:t,require:o};s[r]=Promise.all(n.map((e=>u[e]||o(e)))).then((e=>(l(...e),t)))}}define(["./workbox-958fa2bd"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"assets/@fontsource.f66d05e7.css",revision:null},{url:"assets/@vue.4ce677c2.js",revision:null},{url:"assets/gameLoop.dea3629b.js",revision:null},{url:"assets/index.191323f0.css",revision:null},{url:"assets/index.e52f0501.js",revision:null},{url:"assets/is-plain-object.906d88e8.js",revision:null},{url:"assets/lz-string.731cedc5.js",revision:null},{url:"assets/nanoevents.1080beb7.js",revision:null},{url:"assets/sortablejs.29100d8a.js",revision:null},{url:"assets/vue-next-select.9e6f4164.css",revision:null},{url:"assets/vue-next-select.a2bfab1d.js",revision:null},{url:"assets/vue-textarea-autosize.35804eaf.js",revision:null},{url:"assets/vue-toastification.4b5f8ac8.css",revision:null},{url:"assets/vue-toastification.6f567382.js",revision:null},{url:"assets/vue.92681fcb.js",revision:null},{url:"assets/vuedraggable.7949458c.js",revision:null},{url:"assets/workbox-window.8d14e8b7.js",revision:null},{url:"index.html",revision:"36222eb6359cf641cbfb1becba9002ff"},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"robots.txt",revision:"5e0bd1c281a62a380d7a948085bfe2d1"},{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"5f32ad2a77eb001e1b6a588835dc1efc"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))})); +if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,l)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let t={};const o=e=>i(e,r),u={module:{uri:r},exports:t,require:o};s[r]=Promise.all(n.map((e=>u[e]||o(e)))).then((e=>(l(...e),t)))}}define(["./workbox-958fa2bd"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"assets/@fontsource.f66d05e7.css",revision:null},{url:"assets/@vue.4ce677c2.js",revision:null},{url:"assets/gameLoop.ca13fa80.js",revision:null},{url:"assets/index.9a9641f6.js",revision:null},{url:"assets/index.d72582b0.css",revision:null},{url:"assets/is-plain-object.906d88e8.js",revision:null},{url:"assets/lz-string.731cedc5.js",revision:null},{url:"assets/nanoevents.1080beb7.js",revision:null},{url:"assets/sortablejs.29100d8a.js",revision:null},{url:"assets/vue-next-select.9e6f4164.css",revision:null},{url:"assets/vue-next-select.a2bfab1d.js",revision:null},{url:"assets/vue-textarea-autosize.35804eaf.js",revision:null},{url:"assets/vue-toastification.4b5f8ac8.css",revision:null},{url:"assets/vue-toastification.6f567382.js",revision:null},{url:"assets/vue.92681fcb.js",revision:null},{url:"assets/vuedraggable.7949458c.js",revision:null},{url:"assets/workbox-window.8d14e8b7.js",revision:null},{url:"index.html",revision:"97cef1f1eba45d33c7683806360bbd1f"},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"robots.txt",revision:"5e0bd1c281a62a380d7a948085bfe2d1"},{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"5f32ad2a77eb001e1b6a588835dc1efc"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));