From 26635c3631b272e9e817c6342b4d11410b4fcd7a Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Thu, 1 Dec 2022 06:08:48 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20thepaper?= =?UTF-8?q?pilot/Advent-Incremental@3825732e2ec7a754d61af4e7b0073657e50003?= =?UTF-8?q?b5=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/{index.87a086c7.js => index.25ba1026.js} | 2 +- index.html | 2 +- sw.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename assets/{index.87a086c7.js => index.25ba1026.js} (83%) diff --git a/assets/index.87a086c7.js b/assets/index.25ba1026.js similarity index 83% rename from assets/index.87a086c7.js rename to assets/index.25ba1026.js index 3847c8e..a12e07c 100644 --- a/assets/index.87a086c7.js +++ b/assets/index.25ba1026.js @@ -9,7 +9,7 @@ Created at: Created at: `+i[Mt])}),Qe[e.id].clear()});const Kt=Symbol("RegisterNode"),Yt=Symbol("UnregisterNode"),En=Symbol("Nodes"),Vn=Symbol("Bounds"),ee=Gt({});window.layers=ee;const Qe={},me=[];function Zt(e,t){return Ce(()=>{const n={},s=n.emitter=_n();if(n.on=s.on.bind(s),n.emit=s.emit.bind(s),n.nodes=E({}),n.id=e,me.push(e),Qe[e]=new Set,n.minimized=we(!1),Object.assign(n,t.call(n)),me[me.length-1]==null||me[me.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen Stack: ${me} -Trying to pop ${n.id}`;return me.pop(),I(n,"color"),I(n,"display"),I(n,"name"),he(n,"name",n.id),I(n,"minWidth"),he(n,"minWidth",600),I(n,"minimizable"),he(n,"minimizable",!0),n})}function xn(e,t){if(console.info("Adding layer",e.id),ee[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,ee[e.id]);return}he(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),ee[e.id]=e,se.emit("addLayer",e,t.layers[e.id])}function Oi(e){return ee[e]}function Ln(e){console.info("Removing layer",e.id),se.emit("removeLayer",e),ee[e.id]=void 0}function Di(e){Ln(e),xn(e,M)}function Ei(e){const t=E(!1);return{openModal:()=>t.value=!0,modal:H(()=>m(qe,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>m("h2",null,[a(e.name)]),body:a(e.display)}))}}se.on("update",function(t){Object.values(ee).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(ee).forEach(n=>{n==null||n.emit("update",t)}),Object.values(ee).forEach(n=>{n==null||n.emit("postUpdate",t)})});var Vi=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Kt,UnregisterNodeInjectionKey:Yt,NodesInjectionKey:En,BoundsInjectionKey:Vn,layers:ee,persistentRefs:Qe,addingLayers:me,createLayer:Zt,addLayer:xn,getLayer:Oi,removeLayer:Ln,reloadLayer:Di,setupLayerModal:Ei},Symbol.toStringTag,{value:"Module"}));const xi={},Li={class:"notif"};function qi(e,t){return v(),k("div",Li,"!")}var pn=j(xi,[["render",qi],["__scopeId","data-v-66323fd4"]]);const Tt=e=>(Me("data-v-0aae340d"),e=e(),$e(),e),Ai={key:0,class:"day feature dontMerge opened"},Bi={class:"date"},Ri=C("Dec"),Ui=Tt(()=>d("br",null,null,-1)),ji={class:"date"},Gi=C("Dec"),Wi=Tt(()=>d("br",null,null,-1)),Hi={key:0,class:"icon"},zi=Tt(()=>d("div",{class:"doors"},null,-1)),Ki={class:"date"},Yi=C("Dec"),Zi=Tt(()=>d("br",null,null,-1)),Ji={key:0,class:"material-icons lock"},Xi=q({__name:"Day",props:{day:null,symbol:null,opened:null,shouldNotify:null},emits:["openLore","openLayer","unlockLayer"],setup(e,{emit:t}){const n=e,s=Fn(Se(n,"symbol")),i=P(()=>h.gte(ie.day.value,n.day)&&new Date().getMonth()===11&&new Date().getDate()>=n.day);function r(){i.value&&t("unlockLayer")}return(l,o)=>e.opened.value?(v(),k("div",Ai,[m($t,{appear:"",name:"door"},{default:O(()=>[d("div",{class:"doors",onClick:o[0]||(o[0]=u=>t("openLayer"))},[d("div",Bi,[Ri,Ui,C(L(e.day),1)]),d("div",ji,[Gi,Wi,C(L(e.day),1)])])]),_:1}),a(s)?(v(),k("div",Hi,[(v(),A(te(a(s))))])):T("",!0),d("div",{class:"lore",onClick:o[1]||(o[1]=u=>t("openLore"))},"?"),a(e.shouldNotify)?(v(),A(pn,{key:1})):T("",!0)])):(v(),k("div",{key:1,class:X(["day feature dontMerge",{can:a(i),locked:!a(i),canOpen:a(i)}]),onClick:r},[zi,d("div",Ki,[Yi,Zi,C(L(e.day),1)]),a(i)?T("",!0):(v(),k("div",Ji,"lock")),a(i)?(v(),A(pn,{key:1})):T("",!0)],2))}});var Qi=j(Xi,[["__scopeId","data-v-0aae340d"]]);const er={key:0},tr={key:0,class:"mark star"},nr=["src"],sr=q({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(v(),k("div",er,[e.mark===!0?(v(),k("div",tr)):(v(),k("img",{key:1,class:"mark",src:e.mark},null,8,nr))])):T("",!0)}});var Jt=j(sr,[["__scopeId","data-v-2207999f"]]);const ir=q({__name:"Node",props:{id:null},setup(e){const n=ae(e),s=ln(Kt,()=>{}),i=ln(Yt,()=>{}),r=Le(null),l=P(()=>r.value&&r.value.parentElement);return _e([l,n.id],([o,u],[c,g])=>{c&&i(a(g)),o&&s(u,o)}),bn(()=>i(a(n.id))),(o,u)=>(v(),k("div",{class:"node",ref_key:"node",ref:r},null,512))}});var Xt=j(ir,[["__scopeId","data-v-a48cb382"]]);const rr=q({props:{progress:{type:V(String,Object,Number),required:!0},width:{type:V(Number),required:!0},height:{type:V(Number),required:!0},direction:{type:V(String),required:!0},display:V(Object,String,Function),visibility:{type:V(Number),required:!0},style:V(Object,String,Array),classes:V(Object),borderStyle:V(Object,String,Array),textStyle:V(Object,String,Array),baseStyle:V(Object,String,Array),fillStyle:V(Object,String,Array),mark:V(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Jt,Node:Xt},setup(e){const{progress:t,width:n,height:s,direction:i,display:r}=ae(e),l=P(()=>{let c=t.value instanceof h?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(c,0),1))*100}),o=P(()=>{const c={width:ne(n)+.5+"px",height:ne(s)+.5+"px"};switch(a(i)){case B.Up:c.clipPath=`inset(${l.value}% 0% 0% 0%)`,c.width=ne(n)+1+"px";break;case B.Down:c.clipPath=`inset(0% 0% ${l.value}% 0%)`,c.width=ne(n)+1+"px";break;case B.Right:c.clipPath=`inset(0% ${l.value}% 0% 0%)`;break;case B.Left:c.clipPath=`inset(0% 0% 0% ${l.value} + '%)`;break;case B.Default:c.clipPath="inset(0% 50% 0% 0%)";break}return c}),u=ht(r);return{normalizedProgress:l,barStyle:o,component:u,unref:a,Visibility:Ne}}});function ar(e,t,n,s,i,r){var u,c,g,b,p,_,w;const l=He("MarkNode"),o=He("Node");return e.unref(e.visibility)!==e.Visibility.None?(v(),k("div",{key:0,style:Q([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px",visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(u=e.unref(e.style))!=null?u:{}]),class:X({bar:!0,...e.unref(e.classes)})},[d("div",{class:"overlayTextContainer border",style:Q([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(c=e.unref(e.borderStyle))!=null?c:{}])},[e.component?(v(),k("span",{key:0,class:"overlayText",style:Q(e.unref(e.textStyle))},[(v(),A(te(e.component)))],4)):T("",!0)],4),d("div",{class:"border",style:Q([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(g=e.unref(e.style))!=null?g:{},(b=e.unref(e.baseStyle))!=null?b:{},(p=e.unref(e.borderStyle))!=null?p:{}])},[d("div",{class:"fill",style:Q([e.barStyle,(_=e.unref(e.style))!=null?_:{},(w=e.unref(e.fillStyle))!=null?w:{}])},null,4)],4),m(l,{mark:e.unref(e.mark)},null,8,["mark"]),m(o,{id:e.id},null,8,["id"])],6)):T("",!0)}var or=j(rr,[["render",ar],["__scopeId","data-v-02d0d7b2"]]);const lr=Symbol("Bar");function gn(e){return Ce(()=>{const t=e();return t.id=Pt("bar-"),t.type=lr,t[ve]=or,I(t,"visibility"),he(t,"visibility",Ne.Visible),I(t,"width"),I(t,"height"),I(t,"direction"),I(t,"style"),I(t,"classes"),I(t,"borderStyle"),I(t,"baseStyle"),I(t,"textStyle"),I(t,"fillStyle"),I(t,"progress"),I(t,"display"),I(t,"mark"),t[be]=function(){const{progress:n,width:s,height:i,direction:r,display:l,visibility:o,style:u,classes:c,borderStyle:g,textStyle:b,baseStyle:p,fillStyle:_,mark:w,id:N}=this;return{progress:n,width:s,height:i,direction:r,display:l,visibility:o,style:a(u),classes:c,borderStyle:g,textStyle:b,baseStyle:p,fillStyle:_,mark:w,id:N}},t})}var ur=q({props:{display:{type:V(Object,String,Function),required:!0},visibility:{type:V(Number),required:!0},style:V(Object,String,Array),classes:V(Object),onClick:Function,onHold:Function,canClick:{type:V(Boolean),required:!0},small:Boolean,mark:V(Boolean,String),id:{type:String,required:!0},isHolding:Object},components:{Node:Xt,MarkNode:Jt},setup(e){const{display:t,onClick:n,onHold:s}=ae(e),i=Le("");nt(()=>{const o=ne(t);if(o==null){i.value="";return}if(mt(o)){i.value=z(o);return}const u=z(o.title||"","h3"),c=z(o.description,"div");i.value=z(H(()=>m("span",null,[o.title?m("div",null,[m(u,null,null)]):null,m(c,null,null)])))});const{start:r,stop:l}=bi(n,s,e.isHolding);return{start:r,stop:l,comp:i,Visibility:Ne,unref:a}}});function cr(e,t,n,s,i,r){var u;const l=He("MarkNode"),o=He("Node");return e.unref(e.visibility)!==e.Visibility.None?(v(),k("button",{key:0,style:Q([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(u=e.unref(e.style))!=null?u:[]]),onClick:t[0]||(t[0]=(...c)=>e.onClick&&e.onClick(...c)),onMousedown:t[1]||(t[1]=(...c)=>e.start&&e.start(...c)),onMouseleave:t[2]||(t[2]=(...c)=>e.stop&&e.stop(...c)),onMouseup:t[3]||(t[3]=(...c)=>e.stop&&e.stop(...c)),onTouchstartPassive:t[4]||(t[4]=(...c)=>e.start&&e.start(...c)),onTouchendPassive:t[5]||(t[5]=(...c)=>e.stop&&e.stop(...c)),onTouchcancelPassive:t[6]||(t[6]=(...c)=>e.stop&&e.stop(...c)),class:X({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)?(v(),A(te(e.unref(e.comp)),{key:0})):T("",!0),m(l,{mark:e.unref(e.mark)},null,8,["mark"]),m(o,{id:e.id},null,8,["id"])],38)):T("",!0)}var qn=j(ur,[["render",cr],["__scopeId","data-v-8cedd7da"]]);const dr=Symbol("Buyable");function qt(e){const t=we(0);return Ce(()=>{var r,l,o;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=Pt("buyable-"),n.type=dr,n[ve]=qn,n.amount=t,n.amount[St]=(r=n.initialValue)!=null?r:0,n.canAfford=P(()=>{const u=n,c=a(u.cost);return u.resource!=null&&c!=null&&h.gte(u.resource.value,c)}),n.canPurchase==null&&(n.canPurchase=P(()=>a(n.visibility)===Ne.Visible&&a(n.canAfford)&&h.lt(n.amount.value,a(n.purchaseLimit)))),n.maxed=P(()=>h.gte(n.amount.value,a(n.purchaseLimit))),I(n,"classes");const s=n.classes;n.classes=P(()=>{const u=a(s)||{};return n.maxed.value&&(u.bought=!0),u}),I(n,"canPurchase"),n.canClick=n.canPurchase,n.onClick=n.purchase=(o=(l=n.onClick)!=null?l:n.purchase)!=null?o:function(){var g;const u=n;if(!a(u.canPurchase))return;const c=a(u.cost);u.cost!=null&&u.resource!=null&&(u.resource.value=h.sub(u.resource.value,c),u.amount.value=h.add(u.amount.value,1)),(g=u.onPurchase)==null||g.call(u,c)},I(n,"display");const i=n.display;return n.display=H(()=>{const u=a(i);if(mt(u)){const c=z(u);return m(c,null,null)}if(u!=null&&n.cost!=null&&n.resource!=null){const c=n,g=z(u.title||"","h3"),b=z(u.description||""),p=z(u.effectDisplay||"");return m("span",null,[u.title?m("div",null,[m(g,null,null)]):null,u.description?m(b,null,null):null,u.showAmount===!1?null:m("div",null,[m("br",null,null),a(c.purchaseLimit)===h.dInf?m(Y,null,[C("Amount: "),Ge(c.amount.value)]):m(Y,null,[C("Amount: "),Ge(c.amount.value),C(" /")," ",Ge(a(c.purchaseLimit))])]),u.effectDisplay?m("div",null,[m("br",null,null),C("Currently: "),m(p,null,null)]):null,c.cost&&!c.maxed.value?m("div",null,[m("br",null,null),C("Cost: "),re(a(c.cost)||0)," ",n.resource.displayName]):null])}return""}),I(n,"visibility"),he(n,"visibility",Ne.Visible),I(n,"cost"),I(n,"resource"),I(n,"purchaseLimit"),he(n,"purchaseLimit",h.dInf),I(n,"style"),I(n,"mark"),I(n,"small"),n[be]=function(){const{display:u,visibility:c,style:g,classes:b,onClick:p,canClick:_,small:w,mark:N,id:F}=this;return{display:u,visibility:c,style:a(g),classes:b,onClick:p,canClick:_,small:w,mark:N,id:F}},n})}const fr=Symbol("Clickable");function yn(e){return Ce(()=>{var n;const t=(n=e==null?void 0:e())!=null?n:{};if(t.id=Pt("clickable-"),t.type=fr,t[ve]=qn,t.isHolding=E(!1),I(t,"visibility"),he(t,"visibility",Ne.Visible),I(t,"canClick"),he(t,"canClick",!0),I(t,"classes"),I(t,"style"),I(t,"mark"),I(t,"display"),t.onClick){const s=t.onClick.bind(t);t.onClick=function(i){a(t.canClick)&&s(i)}}if(t.onHold){const s=t.onHold.bind(t);t.onHold=function(){a(t.canClick)&&s()}}return t[be]=function(){const{display:s,visibility:i,style:r,classes:l,onClick:o,onHold:u,isHolding:c,canClick:g,small:b,mark:p,id:_}=this;return{display:s,visibility:i,style:a(r),classes:l,onClick:o,onHold:u,isHolding:c,canClick:g,small:b,mark:p,id:_}},t})}const mr=q({__name:"Sticky",setup(e){const t=E("0"),n=new ResizeObserver(i),s=Le(null);function i(){let r=s.value;if(r==null)return;let l=0;for(;r.previousSibling;){const o=r.previousSibling;o.dataset&&"vSticky"in o.dataset&&(l+=o.offsetHeight),r=o}t.value=l+"px"}return xe(i),document.fonts.ready.then(i),Wt(()=>{var l;const r=(l=s.value)==null?void 0:l.parentElement;r&&n.observe(r)}),(r,l)=>(v(),k("div",{class:"sticky",style:Q({top:t.value}),ref_key:"element",ref:s,"data-v-sticky":""},[ke(r.$slots,"default",{},void 0,!0)],4))}});var hr=j(mr,[["__scopeId","data-v-cccac690"]]);function At(e,t="points",n=0,s=void 0){const i=J(e)?e:we(e);return i.displayName=t,i.precision=n,i.small=s,i}function pr(e){const t=we(e.value);return _e(e,(n,s)=>{h.gt(n,s)&&(t.value=h.add(t.value,h.sub(n,s)))}),t}new h("10^^8");new h("1e100");function An(e,t){const n=t!=null?t:e.value;return h.eq(e.precision,0)?Ge(n):re(n,e.precision,e.small)}const gr=q({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,n=P(()=>An(t.resource));return(s,i)=>(v(),k("h2",{style:Q({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},L(a(n)),5))}});const yr={class:"main-display"},vr={key:0},br={key:1},_r=C(", "),Bt=q({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null},setup(e){const n=ae(e),s=E(null),i=ht(n.effectDisplay),r=P(()=>h.lt(n.resource.value,"1e1000"));return(l,o)=>(v(),A(hr,null,{default:O(()=>{var u,c,g,b;return[d("div",{class:X(["main-display-container",(u=e.classes)!=null?u:{}]),style:Q([{height:`${((g=(c=s.value)==null?void 0:c.$el.clientHeight)!=null?g:0)+50}px`},(b=e.style)!=null?b:{}])},[d("div",yr,[a(r)?(v(),k("span",vr,"You have ")):T("",!0),m(gr,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),C(" "+L(e.resource.displayName),1),a(i)?(v(),k("span",br,[_r,(v(),A(te(a(i)),{ref_key:"effectRef",ref:s},null,512))])):T("",!0)])],6)]}),_:1}))}});var Nr=q({props:{element:Object,display:{type:V(Object,String,Function),required:!0},style:V(Object,String,Array),classes:V(Object),direction:V(String),xoffset:V(String),yoffset:V(String),pinned:Object},setup(e){const{element:t,display:n,pinned:s}=ae(e),i=E(!1),r=P(()=>(ne(s)||i.value)&&l.value),l=ht(n),o=Le(z(H(()=>{const g=ne(t);return g==null?"":tt(g)})));function u(g){const b=s;g.shiftKey&&b&&(b.value=!b.value,g.stopPropagation(),g.preventDefault())}const c=P(()=>ne(s)&&It[Z.theme].showPin);return{Direction:B,isHovered:i,isShown:r,comp:l,elementComp:o,unref:a,togglePinned:u,showPin:c}}});const wr={key:0,class:"material-icons pinned"};function kr(e,t,n,s,i,r){return v(),k("div",{class:X(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=l=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=l=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...l)=>e.togglePinned&&e.togglePinned(...l))},[ke(e.$slots,"default",{},void 0,!0),e.elementComp?(v(),A(te(e.elementComp),{key:0})):T("",!0),m($t,{name:"fade"},{default:O(()=>{var l;return[e.isShown?(v(),k("div",{key:0,class:X(["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:Q([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(l=e.unref(e.style))!=null?l:{}])},[e.showPin?(v(),k("span",wr,"push_pin")):T("",!0),e.comp?(v(),A(te(e.comp),{key:1})):T("",!0)],6)):T("",!0)]}),_:1})],34)}var W=j(Nr,[["render",kr],["__scopeId","data-v-6102fa3a"]]);function vn(e,t){return I(t,"display"),I(t,"classes"),I(t,"style"),I(t,"direction"),he(t,"direction",B.Up),I(t,"xoffset"),I(t,"yoffset"),t.pinnable&&("pinned"in e?(console.error("Cannot add pinnable tooltip to element that already has a property called 'pinned'"),t.pinnable=!1):e.pinned=t.pinned=we(!1)),xe(()=>{const n=e[ve];e[ve]=W;const s=e[be].bind(e);e[be]=function(){const{display:r,classes:l,style:o,direction:u,xoffset:c,yoffset:g,pinned:b}=this;return{element:{[ve]:n,[be]:s},display:r,classes:l,style:a(o),direction:u,xoffset:c,yoffset:g,pinned:b}}.bind(t)}),t}var Sr=q({props:{display:{type:V(String,Object,Function),required:!0},visibility:{type:V(Number),required:!0},style:V(String,Object,Array),classes:V(Object),resource:Object,cost:V(String,Object,Number),canPurchase:{type:V(Boolean),required:!0},bought:{type:V(Boolean),required:!0},mark:V(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:Xt,MarkNode:Jt},setup(e){const{display:t,cost:n}=ae(e),s=Le("");return nt(()=>{const i=ne(t);if(i==null){s.value="";return}if(mt(i)){s.value=z(i);return}const r=ne(n),l=z(i.title||"","h3"),o=z(i.description,"div"),u=z(i.effectDisplay||"");s.value=z(H(()=>{var c;return m("span",null,[i.title?m("div",null,[m(l,null,null)]):null,m(o,null,null),i.effectDisplay?m("div",null,[C("Currently: "),m(u,null,null)]):null,e.resource!=null?m(Y,null,[m("br",null,null),C("Cost: "),e.resource&&An(e.resource,r)," ",(c=e.resource)==null?void 0:c.displayName]):null])}))}),{component:s,unref:a,Visibility:Ne}}});const Mr=["disabled"];function $r(e,t,n,s,i,r){var u;const l=He("MarkNode"),o=He("Node");return e.unref(e.visibility)!==e.Visibility.None?(v(),k("button",{key:0,style:Q([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(u=e.unref(e.style))!=null?u:{}]),onClick:t[0]||(t[0]=(...c)=>e.purchase&&e.purchase(...c)),class:X({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)?(v(),A(te(e.unref(e.component)),{key:0})):T("",!0),m(l,{mark:e.unref(e.mark)},null,8,["mark"]),m(o,{id:e.id},null,8,["id"])],14,Mr)):T("",!0)}var Cr=j(Sr,[["render",$r],["__scopeId","data-v-7742f590"]]);const Pr=Symbol("Upgrade");function ye(e){const t=we(!1);return Ce(()=>{const n=e();return n.id=Pt("upgrade-"),n.type=Pr,n[ve]=Cr,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=P(()=>{const s=n;return s.resource!=null&&s.cost!=null&&h.gte(s.resource.value,a(s.cost))}):I(n,"canAfford"),n.canPurchase=P(()=>a(n.visibility)===Ne.Visible&&a(n.canAfford)&&!a(n.bought)),n.purchase=function(){var i;const s=n;!a(s.canPurchase)||(s.resource!=null&&s.cost!=null&&(s.resource.value=h.sub(s.resource.value,a(s.cost))),t.value=!0,(i=s.onPurchase)==null||i.call(s))},I(n,"visibility"),he(n,"visibility",Ne.Visible),I(n,"classes"),I(n,"style"),I(n,"display"),I(n,"mark"),I(n,"cost"),I(n,"resource"),n[be]=function(){const{display:s,visibility:i,style:r,classes:l,resource:o,cost:u,canPurchase:c,bought:g,mark:b,id:p,purchase:_}=this;return{display:s,visibility:i,style:a(r),classes:l,resource:o,cost:u,canPurchase:c,bought:g,mark:b,id:p,purchase:_}},n})}function De(e){return Ce(()=>{const{addend:t,description:n,enabled:s}=e(),i=We(t),r=We(n),l=s==null?void 0:We(s);return{apply:o=>h.add(o,a(i)),revert:o=>h.sub(o,a(i)),enabled:l,description:n==null?void 0:H(()=>m("div",{class:"modifier-container"},[m("span",{class:"modifier-amount"},[h.gte(a(i),0)?"+":"",re(a(i))]),a(r)?m("span",{class:"modifier-description"},[tt(a(r))]):null]))}})}function bt(e){return Ce(()=>{const{multiplier:t,description:n,enabled:s}=e(),i=We(t),r=We(n),l=s==null?void 0:We(s);return{apply:o=>h.times(o,a(i)),revert:o=>h.div(o,a(i)),enabled:l,description:n==null?void 0:H(()=>m("div",{class:"modifier-container"},[m("span",{class:"modifier-amount"},[C("x"),re(a(i))]),a(r)?m("span",{class:"modifier-description"},[tt(a(r))]):null]))}})}function Re(e){return Ce(()=>{const t=e();return{apply:n=>t.filter(s=>a(s.enabled)!==!1).reduce((s,i)=>i.apply(s),n),revert:t.every(n=>n.revert!=null)?n=>t.filter(s=>a(s.enabled)!==!1).reduceRight((s,i)=>i.revert(s),n):void 0,enabled:P(()=>t.filter(n=>a(n.enabled)!==!1).length>0),description:H(()=>m(Y,null,[t.filter(n=>a(n.enabled)!==!1).map(n=>a(n.description)).filter(n=>n).map(tt)]))}})}function Ue(e,t,n,s=1,i="",r="Base"){return m("div",null,[m("h3",null,[e,t?m("span",{class:"subtitle"},[C(" ("),t,C(")")]):null]),m("br",null,null),m("div",{class:"modifier-container"},[m("span",{class:"modifier-amount"},[re(s),i]),m("span",{class:"modifier-description"},[tt(r)])]),tt(a(n.description)),m("hr",null,null),C("Total: "),re(n.apply(s)),i])}const Ir="trees",Tr=Zt(Ir,function(){const e="Trees",t="#4BDC13",n=At(0,"logs"),s=pr(n),i=At(10,"trees"),r=At(0,"saplings"),l=ye(()=>({resource:n,cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),o=ye(()=>({resource:r,cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),u=ye(()=>({resource:n,cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),c=ye(()=>({resource:r,cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),g=ye(()=>({resource:n,cost:100,display:{title:"Research I",description:"Get 25% more logs from each tree cut down and unlock more upgrades"}})),b=[l,o,u,c,g],p=ye(()=>({resource:n,cost:100,visibility:()=>Oe(g.bought.value),display:{title:"Sharper Fingers",description:"Cut trees twice as fast"}})),_=ye(()=>({resource:n,cost:100,visibility:()=>Oe(g.bought.value),display:{title:"Greener Fingers",description:"Plant trees twice as fast"}})),w=ye(()=>({resource:n,cost:300,visibility:()=>Oe(g.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),N=ye(()=>({resource:n,cost:300,visibility:()=>Oe(g.bought.value),display:{title:"Smart Spades",description:"Each time you manually plant trees, gain 1s of automatic tree planting production"}})),F=ye(()=>({resource:n,cost:1e3,visibility:()=>Oe(g.bought.value),display:{title:"Research II",description:"Get 25% more logs from each tree cut down and unlock repeatable purchases"}})),Ie=[p,_,w,N,F],S=qt(()=>({resource:n,cost(){return h.times(100,this.amount.value).add(200)},display:{title:"Generic Cutters",description:"Each cutter cuts down 1 tree/s"},visibility:()=>Oe(F.bought.value)})),$=qt(()=>({resource:n,cost(){return h.times(100,this.amount.value).add(200)},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>Oe(F.bought.value)})),U=qt(()=>({resource:n,cost(){return h.pow(h.add(this.amount.value,1),1.5).times(500)},display:{title:"Expand Forest",description:"Add 10 trees to the forest"},visibility:()=>Oe(F.bought.value),onPurchase(){i.value=h.add(i.value,10)}})),ce=[S,$,U],Te=Re(()=>[De(()=>({addend:1,description:"Wooden Fingers",enabled:l.bought})),De(()=>({addend:gt,description:"Smart Knives",enabled:w.bought}))]),Ot=P(()=>Te.apply(1)),en=Re(()=>[bt(()=>({multiplier:.5,description:"Sharper Fingers",enabled:p.bought}))]),Ke=P(()=>en.apply(1)),tn=Re(()=>[De(()=>({addend:1,description:"Automated Knives",enabled:u.bought})),De(()=>({addend:S.amount,description:"Generic Cutters",enabled:F.bought}))]),gt=P(()=>tn.apply(0)),nn=Re(()=>[De(()=>({addend:1,description:"Leafy Fingers",enabled:o.bought})),De(()=>({addend:yt,description:"Smart Spades",enabled:N.bought}))]),Dt=P(()=>nn.apply(1)),sn=Re(()=>[bt(()=>({multiplier:.5,description:"Greener Fingers",enabled:_.bought}))]),Ye=P(()=>sn.apply(1)),rn=Re(()=>[De(()=>({addend:1,description:"Automated Spade",enabled:c.bought})),De(()=>({addend:()=>h.div($.amount.value,2),description:"Generic Planters",enabled:F.bought}))]),yt=P(()=>rn.apply(0)),Et=Re(()=>[bt(()=>({multiplier:1.25,description:"Research I",enabled:g.bought})),bt(()=>({multiplier:1.25,description:"Research II",enabled:F.bought}))]),pe=we(0),Kn=gn(()=>({direction:B.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>h.div(pe.value,Ke.value)})),st=yn(()=>({display:{title:"Cut trees",description:H(()=>m(Y,null,[C("Cut down up to "),re(Ot.value,1),C(" tree"),h.eq(Ot.value,1)?"":"s",C(" at once!"),m("br",null,null),et(Kn)]))},style:{minHeight:"80px"},canClick:()=>h.gt(i.value,0)&&h.gte(pe.value,Ke.value),onClick(){if(h.lt(pe.value,Ke.value))return;const de=h.min(i.value,h.times(Ot.value,h.div(pe.value,Ke.value).floor()));i.value=h.sub(i.value,de),n.value=h.add(n.value,Et.apply(de)),r.value=h.add(r.value,de),pe.value=0}}));vn(st,{display:H(()=>hn([Ue("Trees","",Te,1,"/click"),Ue("Cooldown","",en,1,"s")],m("br",null,null))),direction:B.Down,style:"width: 400px; text-align: left"});const ge=we(0),Yn=gn(()=>({direction:B.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>h.div(ge.value,Ye.value)})),it=yn(()=>({display:{title:"Plant trees",description:H(()=>m(Y,null,[C("Plant up to "),re(Dt.value,1),C(" tree"),h.eq(Dt.value,1)?"":"s",C(" at once!"),m("br",null,null),et(Yn)]))},style:{minHeight:"80px"},canClick:()=>h.gt(r.value,0)&&h.gte(ge.value,Ye.value),onClick(){if(h.lt(ge.value,Ye.value))return;const de=h.min(r.value,h.times(Dt.value,h.div(ge.value,Ye.value).floor()));i.value=h.add(i.value,de),r.value=h.sub(r.value,de),ge.value=0}}));return vn(it,{display:H(()=>hn([Ue("Trees","",nn,1,"/click"),Ue("Cooldown","",sn,1,"s")],m("br",null,null))),direction:B.Down,style:"width: 400px; text-align: left"}),se.on("update",de=>{if(h.lt(ie.day.value,1))return;h.gte(pe.value,Ke.value)?pe.value=Ke.value:(pe.value=h.add(pe.value,de),st.isHolding.value&&st.onClick()),h.gte(ge.value,Ye.value)?ge.value=Ye.value:(ge.value=h.add(ge.value,de),it.isHolding.value&&it.onClick());const Vt=h.min(i.value,h.times(gt.value,de));i.value=h.sub(i.value,Vt),n.value=h.add(n.value,Et.apply(Vt)),r.value=h.add(r.value,Vt);const an=h.min(r.value,h.times(yt.value,de));i.value=h.add(i.value,an),r.value=h.sub(r.value,an)}),nt(()=>{ie.day.value===1&&h.gte(s.value,1e4)&&(ie.loreTitle.value="Day complete!",ie.loreBody.value="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!",ie.day.value=2,ie.minimized.value=!1)}),{name:e,color:t,logs:n,totalLogs:s,trees:i,saplings:r,cutTree:st,plantTree:it,row1Upgrades:b,row2Upgrades:Ie,row1Buyables:ce,manualCutProgress:pe,manualPlantProgress:ge,minWidth:700,display:H(()=>m(Y,null,[m(W,{display:H(()=>Ue("Log Gain","",Et)),direction:B.Down,style:"width: 400px; text-align: left"},{default:()=>[m(Bt,{resource:n,color:t,style:"margin-bottom: 0"},null)]}),m(Bt,{resource:r,color:"green",style:"margin-bottom: 0"},null),m(Bt,{resource:i,color:"green",style:"margin-bottom: 0"},null),m("br",null,null),h.gt(gt.value,0)?m(Y,null,[m(W,{display:H(()=>Ue("Trees","",tn,0,"/s")),direction:B.Down,style:"width: 400px; text-align: left"},{default:()=>[C("You cut down "),re(gt.value),C(" trees/s")]}),m("br",null,null)]):null,h.gt(yt.value,0)?m(Y,null,[m(W,{display:H(()=>Ue("Trees","",rn,0,"/s")),direction:B.Down,style:"width: 400px; text-align: left"},{default:()=>[C("You plant "),re(yt.value),C(" trees/s")]}),m("br",null,null)]):null,m(Ut,null,null),at(st,it),m("div",null,[C("Tip: You can hold down on actions to perform them automatically")]),m(Ut,null,null),at(...b),at(...Ie),at(...ce)]))}}),ie=Zt("main",function(){const e=we(1),t=E(""),n=E("");function s(r){const l=we(!1);return Ce(()=>{const o=r(),u=We(o.shouldNotify);return{...o,opened:l,shouldNotify:u,[ve]:Qi,[be]:function(){const{day:c,layer:g,symbol:b,opened:p,shouldNotify:_,story:w}=this;return{day:c,symbol:b,opened:p,shouldNotify:_,onOpenLore(){var N,F;t.value=a((F=(N=ee[g!=null?g:"trees"])==null?void 0:N.name)!=null?F:""),n.value=w},onOpenLayer(){if(M.tabs.includes(g!=null?g:"trees")){const N=M.tabs.lastIndexOf(g!=null?g:"trees");M.tabs.splice(N,1)}else M.tabs.push(g!=null?g:"trees")},onUnlockLayer(){var N,F;p.value=!0,t.value=a((F=(N=ee[g!=null?g:"trees"])==null?void 0:N.name)!=null?F:""),n.value=w}}}}})}const i=[s(()=>({day:1,shouldNotify:!1,layer:null,symbol:"\u{1F384}",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!"})),s(()=>({day:2,shouldNotify:!1,layer:null,symbol:"cabin",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!"})),s(()=>({day:3,shouldNotify:!1,layer:null,symbol:"\u{1F9DD}",story:"With this unbelievably large workshop complete, it's time to get the elves to work! But it appears they've forgotten how to make toys over the last 11 months - guess it's time to setup training sessions!"})),s(()=>({day:4,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:5,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:6,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:7,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:8,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:9,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:10,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:11,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:12,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:13,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:14,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:15,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:16,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:17,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:18,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:19,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:20,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:21,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:22,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:23,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:24,shouldNotify:!1,layer:null,symbol:"",story:""}))];return{name:"Calendar",days:i,day:e,loreTitle:t,loreBody:n,minWidth:710,display:H(()=>m(Y,null,[M.devSpeed===0?m("div",null,[C("Game Paused")]):null,M.devSpeed&&M.devSpeed!==1?m("div",null,[C("Dev Speed: "),re(M.devSpeed),C("x")]):null,M.offlineTime?m("div",null,[C("Offline Time: "),Ct(M.offlineTime)]):null,m(Ut,null,null),m("div",{class:"advent"},[i.reduce((r,l)=>(r[r.length-1].length===4&&r.push([]),r[r.length-1].push(l),r),[[]]).map(r=>at(...r))])]))}}),Fr=e=>[ie,Tr],Bn=P(()=>!1);function Or(e,t){}var Rn=Object.freeze(Object.defineProperty({__proto__:null,main:ie,getInitialLayers:Fr,hasWon:Bn,fixOldSave:Or},Symbol.toStringTag,{value:"Module"}));const Dr=q({components:{Context:On},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:V(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:V(Number,String),required:!0},name:{type:V(String),required:!0},color:V(String),minimizable:V(Boolean),nodes:{type:Object,required:!0}},setup(e){const{display:t,index:n,minimized:s,minWidth:i,tab:r}=ae(e),l=Fn(t),o=P(()=>R.allowGoBack&&n.value>0&&!s.value);function u(){M.tabs.splice(a(e.index),1/0)}xe(()=>g(s.value,a(i.value))),_e([s,_i(i)],([b,p])=>g(b,p));function c(b){e.nodes.value=b}function g(b,p){const _=typeof p=="number"||Number.isNaN(parseInt(p))?p+"px":p,w=r.value();w!=null&&(b?(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=_,w.style.margin=""))}return{component:l,showGoBack:o,updateNodes:c,unref:a,goBack:u}}});function Er(e,t,n,s,i,r){const l=He("Context");return v(),k("div",{class:"layer-container",style:Q({"--layer-color":e.unref(e.color)})},[e.showGoBack?(v(),k("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...o)=>e.goBack&&e.goBack(...o))},"\u274C")):T("",!0),e.minimized.value?(v(),k("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=o=>e.minimized.value=!1)},[d("div",null,L(e.unref(e.name)),1)])):(v(),k("div",{key:2,class:X(["layer-tab",{showGoBack:e.showGoBack}])},[m(l,{onUpdateNodes:e.updateNodes},{default:O(()=>[(v(),A(te(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(v(),k("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=o=>e.minimized.value=!0)}," \u25BC ")):T("",!0)],4)}var Vr=j(Dr,[["render",Er],["__scopeId","data-v-614f946c"]]);const Un=e=>(Me("data-v-4b4bda40"),e=e(),$e(),e),xr=Un(()=>d("h2",null,"Changelog",-1)),Lr=Un(()=>d("details",{open:""},[d("summary",null,[C("v0.0 Initial Commit - "),d("time",null,"2021-09-04")]),C(" This is the first release :D "),d("ul",null,[d("li",{class:"feature"},"Did everything"),d("li",{class:"fix"},"Had some fun"),d("li",{class:"breaking"},"Removed everything"),d("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),qr=q({__name:"Changelog",setup(e,{expose:t}){const n=E(!1);return t({open(){n.value=!0}}),(s,i)=>(v(),A(qe,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r)},{header:O(()=>[xr]),body:O(()=>[Lr]),_:1},8,["modelValue"]))}});var Ar=j(qr,[["__scopeId","data-v-4b4bda40"]]);const ze=e=>(Me("data-v-7dec2dec"),e=e(),$e(),e),Br={class:"info-modal-header"},Rr=["src","alt"],Ur={class:"info-modal-title"},jr={key:0},Gr={key:0},Wr={key:0},Hr=ze(()=>d("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1)),zr=ze(()=>d("br",null,null,-1)),Kr=ze(()=>d("br",null,null,-1)),Yr=["href"],Zr=ze(()=>d("span",{class:"material-icons info-modal-discord"},"discord",-1)),Jr=ze(()=>d("div",null,[d("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link"},[d("span",{class:"material-icons info-modal-discord"},"discord"),C(" The Paper Pilot Community ")])],-1)),Xr=ze(()=>d("div",null,[d("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link"},[d("span",{class:"material-icons info-modal-discord"},"discord"),C(" The Modding Tree ")])],-1)),Qr=ze(()=>d("br",null,null,-1));var ea=q({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const n=e,{title:s,logo:i,author:r,discordName:l,discordLink:o,versionNumber:u,versionTitle:c}=R,g=ae(n),b=E(!1),p=P(()=>Ct(M.timePlayed)),_=P(()=>z(H(()=>m(Y,null,[hi.map(et)]))));t({open(){b.value=!0}});function w(){var N;(N=a(g.changelog))==null||N.open()}return(N,F)=>(v(),A(qe,{modelValue:b.value,"onUpdate:modelValue":F[0]||(F[0]=Ie=>b.value=Ie)},{header:O(()=>[d("div",Br,[a(i)?(v(),k("img",{key:0,class:"info-modal-logo",src:a(i),alt:a(s)},null,8,Rr)):T("",!0),d("div",Ur,[d("h2",null,L(a(s)),1),d("h4",null,[C(" v"+L(a(u)),1),a(c)?(v(),k("span",jr,": "+L(a(c)),1)):T("",!0)])])])]),body:O(({shown:Ie})=>[Ie?(v(),k("div",Gr,[a(r)?(v(),k("div",Wr,"By "+L(a(r)),1)):T("",!0),Hr,zr,d("div",{class:"link",onClick:w},"Changelog"),Kr,d("div",null,[a(o)?(v(),k("a",{key:0,href:a(o),class:"info-modal-discord-link"},[Zr,C(" "+L(a(l)),1)],8,Yr)):T("",!0)]),Jr,Xr,Qr,d("div",null,"Time Played: "+L(a(p)),1),(v(),A(te(a(_))))])):T("",!0)]),_:1},8,["modelValue"]))}});var ta=j(ea,[["__scopeId","data-v-7dec2dec"]]);const na={class:"field"},sa={key:0,class:"field-title"},jn=q({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var l;const n=e,s=ht(Se(n,"title"),"span"),i=E((l=n.options.find(o=>o.value===n.modelValue))!=null?l:null);_e(Se(n,"modelValue"),o=>{var u;ne(i)!==o&&(i.value=(u=n.options.find(c=>c.value===o))!=null?u:null)});function r(o){t("update:modelValue",o.value)}return(o,u)=>(v(),k("div",na,[a(s)?(v(),k("span",sa,[(v(),A(te(a(s))))])):T("",!0),m(a(rs),{options:e.options,modelValue:i.value,"onUpdate:modelValue":[u[0]||(u[0]=c=>i.value=c),r],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});const ia={class:"field"},ra=q({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,s=P(()=>z(a(n.title)||"","span")),i=P({get(){return!!n.modelValue},set(r){t("update:modelValue",r)}});return(r,l)=>(v(),k("label",ia,[Ht(d("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":l[0]||(l[0]=o=>J(i)?i.value=o:null)},null,512),[[es,a(i)]]),(v(),A(te(a(s))))]))}});var Ee=j(ra,[["__scopeId","data-v-2b109500"]]);const Gn=e=>(Me("data-v-bc13791c"),e=e(),$e(),e),aa=Gn(()=>d("div",{class:"header"},[d("h2",null,"Options")],-1)),oa=Gn(()=>d("hr",null,null,-1));var la=q({__name:"Options",setup(e,{expose:t}){const n=E(!1);t({open(){n.value=!0}});const s=Object.keys(It).map(w=>({label:ai(w),value:w})),i=P(()=>z(H(()=>m(Y,null,[mi.map(et)])))),{showTPS:r,theme:l,unthrottled:o}=ae(Z),{autosave:u,offlineProd:c}=ae(M),g=P({get(){return M.devSpeed===0},set(w){M.devSpeed=w?0:null}}),b=H(()=>m("span",null,[C("Offline Production"),m(W,{display:"Save-specific"},{default:()=>[C("*")]})])),p=H(()=>m("span",null,[C("Autosave"),m(W,{display:"Save-specific"},{default:()=>[C("*")]})])),_=H(()=>m("span",null,[C("Pause game"),m(W,{display:"Save-specific"},{default:()=>[C("*")]})]));return(w,N)=>(v(),A(qe,{modelValue:n.value,"onUpdate:modelValue":N[6]||(N[6]=F=>n.value=F)},{header:O(()=>[aa]),body:O(()=>[m(jn,{title:"Theme",options:a(s),modelValue:a(l),"onUpdate:modelValue":N[0]||(N[0]=F=>J(l)?l.value=F:null)},null,8,["options","modelValue"]),(v(),A(te(a(i)))),m(Ee,{title:"Show TPS",modelValue:a(r),"onUpdate:modelValue":N[1]||(N[1]=F=>J(r)?r.value=F:null)},null,8,["modelValue"]),oa,m(Ee,{title:"Unthrottled",modelValue:a(o),"onUpdate:modelValue":N[2]||(N[2]=F=>J(o)?o.value=F:null)},null,8,["modelValue"]),m(Ee,{title:a(b),modelValue:a(c),"onUpdate:modelValue":N[3]||(N[3]=F=>J(c)?c.value=F:null)},null,8,["title","modelValue"]),m(Ee,{title:a(p),modelValue:a(u),"onUpdate:modelValue":N[4]||(N[4]=F=>J(u)?u.value=F:null)},null,8,["title","modelValue"]),a(R).enablePausing?(v(),A(Ee,{key:0,title:a(_),modelValue:a(g),"onUpdate:modelValue":N[5]||(N[5]=F=>J(g)?g.value=F:null)},null,8,["title","modelValue"])):T("",!0)]),_:1},8,["modelValue"]))}});var ua=j(la,[["__scopeId","data-v-bc13791c"]]);const ca=["onSubmit"],da={class:"field"},fa={key:0,class:"field-title"},ma=["placeholder"],ha=q({__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=ht(Se(n,"title"),"span"),i=Le(null);Wt(()=>{var u;(u=i.value)==null||u.focus()});const r=P({get(){return a(n.modelValue)||""},set(u){t("update:modelValue",u)}});function l(){t("submit")}function o(){n.submitOnBlur!==!1?t("submit"):t("cancel")}return(u,c)=>(v(),k("form",{onSubmit:ut(l,["prevent"])},[d("div",da,[a(s)?(v(),k("span",fa,[(v(),A(te(a(s))))])):T("",!0),e.textArea?(v(),A(a(os),{key:1,modelValue:a(r),"onUpdate:modelValue":c[0]||(c[0]=g=>J(r)?r.value=g:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:o,ref_key:"field",ref:i},null,8,["modelValue","placeholder","maxHeight"])):Ht((v(),k("input",{key:2,type:"text","onUpdate:modelValue":c[1]||(c[1]=g=>J(r)?r.value=g:null),placeholder:e.placeholder,class:X({fullWidth:!e.title}),onBlur:o,ref_key:"field",ref:i},null,42,ma)),[[ts,a(r)]])])],40,ca))}});var Wn=j(ha,[["__scopeId","data-v-67b44a54"]]);const pa={key:0},ga=["onClick","disabled"],ya={key:0},va=["onClick"],ba=q({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const s=ae(e),i=E(!1);_e(i,o=>{t("confirmingChanged",o)});function r(){if(a(s.skipConfirm)){t("click");return}i.value&&t("click"),i.value=!i.value}function l(){i.value=!1}return(o,u)=>(v(),k("span",{class:X(["container",{confirming:i.value}])},[i.value?(v(),k("span",pa,"Are you sure?")):T("",!0),d("button",{onClick:ut(r,["stop"]),class:"button danger",disabled:e.disabled},[i.value?(v(),k("span",ya,"Yes")):ke(o.$slots,"default",{key:1},void 0,!0)],8,ga),i.value?(v(),k("button",{key:1,class:"button",onClick:ut(l,["stop"])},"No",8,va)):T("",!0)],2))}});var _a=j(ba,[["__scopeId","data-v-2f8ef34c"]]);const Na=["onClick"],wa=q({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=E(!1),s=E(null);function i(){t("click"),s.value&&clearTimeout(s.value),n.value=!1,xe(()=>{n.value=!0,s.value=setTimeout(()=>n.value=!1,500)})}return(r,l)=>(v(),k("button",{onClick:ut(i,["stop"]),class:X(["feedback",{activated:n.value,left:e.left}])},[ke(r.$slots,"default",{},void 0,!0)],10,Na))}});var ka=j(wa,[["__scopeId","data-v-01a1b95c"]]);const Pe=e=>(Me("data-v-0136bef4"),e=e(),$e(),e),Sa=Pe(()=>d("div",{class:"handle material-icons"},"drag_handle",-1)),Ma={key:0,class:"actions"},$a=Pe(()=>d("span",{class:"material-icons"},"content_paste",-1)),Ca=Pe(()=>d("span",{class:"material-icons"},"content_copy",-1)),Pa=Pe(()=>d("span",{class:"material-icons"},"edit",-1)),Ia=Pe(()=>d("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),Ta={key:1,class:"actions"},Fa=Pe(()=>d("span",{class:"material-icons"},"check",-1)),Oa=Pe(()=>d("span",{class:"material-icons"},"close",-1)),Da={key:2,class:"details"},Ea={class:"save-version"},Va=Pe(()=>d("br",null,null,-1)),xa={key:0},La={key:3,class:"details"},qa={key:4,class:"details error"},Aa=Pe(()=>d("br",null,null,-1)),Ba=q({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const n=e,{save:s}=ae(n),i=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),r=E(!1),l=E(!1),o=E("");_e(r,()=>o.value=s.value.name||"");const u=P(()=>s.value&&s.value.id===M.id),c=P(()=>u.value?M.time:s.value&&s.value.time||0);function g(){t("editName",o.value),r.value=!1}return(b,p)=>(v(),k("div",{class:X(["save",{active:a(u)}])},[Sa,r.value?(v(),k("div",Ta,[d("button",{onClick:g,class:"button"},[m(W,{display:"Save",direction:a(B).Left,class:"info"},{default:O(()=>[Fa]),_:1},8,["direction"])]),d("button",{onClick:p[5]||(p[5]=_=>r.value=!r.value),class:"button"},[m(W,{display:"Cancel",direction:a(B).Left,class:"info"},{default:O(()=>[Oa]),_:1},8,["direction"])])])):(v(),k("div",Ma,[a(s).error==null&&!l.value?(v(),A(ka,{key:0,onClick:p[0]||(p[0]=_=>t("export")),class:"button",left:""},{default:O(()=>[m(W,{display:"Export",direction:a(B).Left,class:"info"},{default:O(()=>[$a]),_:1},8,["direction"])]),_:1})):T("",!0),a(s).error==null&&!l.value?(v(),k("button",{key:1,onClick:p[1]||(p[1]=_=>t("duplicate")),class:"button"},[m(W,{display:"Duplicate",direction:a(B).Left,class:"info"},{default:O(()=>[Ca]),_:1},8,["direction"])])):T("",!0),a(s).error==null&&!l.value?(v(),k("button",{key:2,onClick:p[2]||(p[2]=_=>r.value=!r.value),class:"button"},[m(W,{display:"Edit Name",direction:a(B).Left,class:"info"},{default:O(()=>[Pa]),_:1},8,["direction"])])):T("",!0),m(_a,{disabled:a(u),onClick:p[3]||(p[3]=_=>t("delete")),onConfirmingChanged:p[4]||(p[4]=_=>l.value=_)},{default:O(()=>[m(W,{display:"Delete",direction:a(B).Left,class:"info"},{default:O(()=>[Ia]),_:1},8,["direction"])]),_:1},8,["disabled"])])),a(s).error==null&&!r.value?(v(),k("div",Da,[d("button",{class:"button open",onClick:p[6]||(p[6]=_=>t("open"))},[d("h3",null,L(a(s).name),1)]),d("span",Ea,"v"+L(a(s).modVersion),1),Va,a(c)?(v(),k("div",xa,"Last played "+L(a(i).format(a(c))),1)):T("",!0)])):a(s).error==null&&r.value?(v(),k("div",La,[m(Wn,{modelValue:o.value,"onUpdate:modelValue":p[7]||(p[7]=_=>o.value=_),class:"editname",onSubmit:g},null,8,["modelValue"])])):(v(),k("div",qa,[C(" Error: Failed to load save with id "+L(a(s).id),1),Aa,C(L(a(s).error),1)]))],2))}});var Ra=j(Ba,[["__scopeId","data-v-0136bef4"]]);const Qt=e=>(Me("data-v-3b9991aa"),e=e(),$e(),e),Ua=Qt(()=>d("h2",null,"Saves Manager",-1)),ja={class:"modal-footer"},Ga={class:"field"},Wa=Qt(()=>d("span",{class:"field-title"},"Create Save",-1)),Ha={class:"field-buttons"},za={class:"footer"},Ka=Qt(()=>d("div",{style:{"flex-grow":"1"}},null,-1)),Ya=q({__name:"SavesManager",setup(e,{expose:t}){const n=E(!1),s=E(null);t({open(){n.value=!0}});const i=E(!1),r=E(""),l=E(null);_e(r,S=>{S?xe(()=>{try{if(S[0]!=="{")if(S[0]==="e")S=decodeURIComponent(escape(atob(S)));else if(S[0]==="\u1BE1")S=Ve.decompressFromUTF16(S);else{console.warn("Unable to determine preset encoding",S),i.value=!0;return}const $=JSON.parse(S);if(typeof $!="object"){i.value=!0;return}const U=_t();$.id=U,fe($),r.value="",i.value=!1,Z.saves.push(U)}catch{i.value=!0}}):i.value=!1});let o={},u=E(Object.keys(o).reduce((S,$)=>(S.push({label:$.split("/").slice(-1)[0].slice(0,-4),value:o[$]}),S),[]));const c=Gt({});function g(S){if(c[S]==null){let $=localStorage.getItem(S);if($==null)c[S]={error:"Save doesn't exist in localStorage",id:S};else if($==="dW5kZWZpbmVk")c[S]={error:"Save is undefined",id:S};else try{if($[0]!=="{")if($[0]==="e")$=decodeURIComponent(escape(atob($)));else if($[0]==="\u1BE1")$=Ve.decompressFromUTF16($);else return console.warn("Unable to determine preset encoding",$),i.value=!0,c[S]={error:"Unable to determine preset encoding",id:S},c[S];c[S]={...JSON.parse($),id:S}}catch(U){c[S]={error:U,id:S},console.warn(`SavesManager: Failed to load info about save with id ${S}: +Trying to pop ${n.id}`;return me.pop(),I(n,"color"),I(n,"display"),I(n,"name"),he(n,"name",n.id),I(n,"minWidth"),he(n,"minWidth",600),I(n,"minimizable"),he(n,"minimizable",!0),n})}function xn(e,t){if(console.info("Adding layer",e.id),ee[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,ee[e.id]);return}he(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),ee[e.id]=e,se.emit("addLayer",e,t.layers[e.id])}function Oi(e){return ee[e]}function Ln(e){console.info("Removing layer",e.id),se.emit("removeLayer",e),ee[e.id]=void 0}function Di(e){Ln(e),xn(e,M)}function Ei(e){const t=E(!1);return{openModal:()=>t.value=!0,modal:H(()=>m(qe,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>m("h2",null,[a(e.name)]),body:a(e.display)}))}}se.on("update",function(t){Object.values(ee).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(ee).forEach(n=>{n==null||n.emit("update",t)}),Object.values(ee).forEach(n=>{n==null||n.emit("postUpdate",t)})});var Vi=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Kt,UnregisterNodeInjectionKey:Yt,NodesInjectionKey:En,BoundsInjectionKey:Vn,layers:ee,persistentRefs:Qe,addingLayers:me,createLayer:Zt,addLayer:xn,getLayer:Oi,removeLayer:Ln,reloadLayer:Di,setupLayerModal:Ei},Symbol.toStringTag,{value:"Module"}));const xi={},Li={class:"notif"};function qi(e,t){return v(),k("div",Li,"!")}var pn=j(xi,[["render",qi],["__scopeId","data-v-66323fd4"]]);const Tt=e=>(Me("data-v-0aae340d"),e=e(),$e(),e),Ai={key:0,class:"day feature dontMerge opened"},Bi={class:"date"},Ri=C("Dec"),Ui=Tt(()=>d("br",null,null,-1)),ji={class:"date"},Gi=C("Dec"),Wi=Tt(()=>d("br",null,null,-1)),Hi={key:0,class:"icon"},zi=Tt(()=>d("div",{class:"doors"},null,-1)),Ki={class:"date"},Yi=C("Dec"),Zi=Tt(()=>d("br",null,null,-1)),Ji={key:0,class:"material-icons lock"},Xi=q({__name:"Day",props:{day:null,symbol:null,opened:null,shouldNotify:null},emits:["openLore","openLayer","unlockLayer"],setup(e,{emit:t}){const n=e,s=Fn(Se(n,"symbol")),i=P(()=>h.gte(ie.day.value,n.day)&&new Date().getMonth()===11&&new Date().getDate()>=n.day);function r(){i.value&&t("unlockLayer")}return(l,o)=>e.opened.value?(v(),k("div",Ai,[m($t,{appear:"",name:"door"},{default:O(()=>[d("div",{class:"doors",onClick:o[0]||(o[0]=u=>t("openLayer"))},[d("div",Bi,[Ri,Ui,C(L(e.day),1)]),d("div",ji,[Gi,Wi,C(L(e.day),1)])])]),_:1}),a(s)?(v(),k("div",Hi,[(v(),A(te(a(s))))])):T("",!0),d("div",{class:"lore",onClick:o[1]||(o[1]=u=>t("openLore"))},"?"),a(e.shouldNotify)?(v(),A(pn,{key:1})):T("",!0)])):(v(),k("div",{key:1,class:X(["day feature dontMerge",{can:a(i),locked:!a(i),canOpen:a(i)}]),onClick:r},[zi,d("div",Ki,[Yi,Zi,C(L(e.day),1)]),a(i)?T("",!0):(v(),k("div",Ji,"lock")),a(i)?(v(),A(pn,{key:1})):T("",!0)],2))}});var Qi=j(Xi,[["__scopeId","data-v-0aae340d"]]);const er={key:0},tr={key:0,class:"mark star"},nr=["src"],sr=q({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(v(),k("div",er,[e.mark===!0?(v(),k("div",tr)):(v(),k("img",{key:1,class:"mark",src:e.mark},null,8,nr))])):T("",!0)}});var Jt=j(sr,[["__scopeId","data-v-2207999f"]]);const ir=q({__name:"Node",props:{id:null},setup(e){const n=ae(e),s=ln(Kt,()=>{}),i=ln(Yt,()=>{}),r=Le(null),l=P(()=>r.value&&r.value.parentElement);return _e([l,n.id],([o,u],[c,g])=>{c&&i(a(g)),o&&s(u,o)}),bn(()=>i(a(n.id))),(o,u)=>(v(),k("div",{class:"node",ref_key:"node",ref:r},null,512))}});var Xt=j(ir,[["__scopeId","data-v-a48cb382"]]);const rr=q({props:{progress:{type:V(String,Object,Number),required:!0},width:{type:V(Number),required:!0},height:{type:V(Number),required:!0},direction:{type:V(String),required:!0},display:V(Object,String,Function),visibility:{type:V(Number),required:!0},style:V(Object,String,Array),classes:V(Object),borderStyle:V(Object,String,Array),textStyle:V(Object,String,Array),baseStyle:V(Object,String,Array),fillStyle:V(Object,String,Array),mark:V(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Jt,Node:Xt},setup(e){const{progress:t,width:n,height:s,direction:i,display:r}=ae(e),l=P(()=>{let c=t.value instanceof h?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(c,0),1))*100}),o=P(()=>{const c={width:ne(n)+.5+"px",height:ne(s)+.5+"px"};switch(a(i)){case B.Up:c.clipPath=`inset(${l.value}% 0% 0% 0%)`,c.width=ne(n)+1+"px";break;case B.Down:c.clipPath=`inset(0% 0% ${l.value}% 0%)`,c.width=ne(n)+1+"px";break;case B.Right:c.clipPath=`inset(0% ${l.value}% 0% 0%)`;break;case B.Left:c.clipPath=`inset(0% 0% 0% ${l.value} + '%)`;break;case B.Default:c.clipPath="inset(0% 50% 0% 0%)";break}return c}),u=ht(r);return{normalizedProgress:l,barStyle:o,component:u,unref:a,Visibility:Ne}}});function ar(e,t,n,s,i,r){var u,c,g,b,p,_,w;const l=He("MarkNode"),o=He("Node");return e.unref(e.visibility)!==e.Visibility.None?(v(),k("div",{key:0,style:Q([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px",visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(u=e.unref(e.style))!=null?u:{}]),class:X({bar:!0,...e.unref(e.classes)})},[d("div",{class:"overlayTextContainer border",style:Q([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(c=e.unref(e.borderStyle))!=null?c:{}])},[e.component?(v(),k("span",{key:0,class:"overlayText",style:Q(e.unref(e.textStyle))},[(v(),A(te(e.component)))],4)):T("",!0)],4),d("div",{class:"border",style:Q([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(g=e.unref(e.style))!=null?g:{},(b=e.unref(e.baseStyle))!=null?b:{},(p=e.unref(e.borderStyle))!=null?p:{}])},[d("div",{class:"fill",style:Q([e.barStyle,(_=e.unref(e.style))!=null?_:{},(w=e.unref(e.fillStyle))!=null?w:{}])},null,4)],4),m(l,{mark:e.unref(e.mark)},null,8,["mark"]),m(o,{id:e.id},null,8,["id"])],6)):T("",!0)}var or=j(rr,[["render",ar],["__scopeId","data-v-02d0d7b2"]]);const lr=Symbol("Bar");function gn(e){return Ce(()=>{const t=e();return t.id=Pt("bar-"),t.type=lr,t[ve]=or,I(t,"visibility"),he(t,"visibility",Ne.Visible),I(t,"width"),I(t,"height"),I(t,"direction"),I(t,"style"),I(t,"classes"),I(t,"borderStyle"),I(t,"baseStyle"),I(t,"textStyle"),I(t,"fillStyle"),I(t,"progress"),I(t,"display"),I(t,"mark"),t[be]=function(){const{progress:n,width:s,height:i,direction:r,display:l,visibility:o,style:u,classes:c,borderStyle:g,textStyle:b,baseStyle:p,fillStyle:_,mark:w,id:N}=this;return{progress:n,width:s,height:i,direction:r,display:l,visibility:o,style:a(u),classes:c,borderStyle:g,textStyle:b,baseStyle:p,fillStyle:_,mark:w,id:N}},t})}var ur=q({props:{display:{type:V(Object,String,Function),required:!0},visibility:{type:V(Number),required:!0},style:V(Object,String,Array),classes:V(Object),onClick:Function,onHold:Function,canClick:{type:V(Boolean),required:!0},small:Boolean,mark:V(Boolean,String),id:{type:String,required:!0},isHolding:Object},components:{Node:Xt,MarkNode:Jt},setup(e){const{display:t,onClick:n,onHold:s}=ae(e),i=Le("");nt(()=>{const o=ne(t);if(o==null){i.value="";return}if(mt(o)){i.value=z(o);return}const u=z(o.title||"","h3"),c=z(o.description,"div");i.value=z(H(()=>m("span",null,[o.title?m("div",null,[m(u,null,null)]):null,m(c,null,null)])))});const{start:r,stop:l}=bi(n,s,e.isHolding);return{start:r,stop:l,comp:i,Visibility:Ne,unref:a}}});function cr(e,t,n,s,i,r){var u;const l=He("MarkNode"),o=He("Node");return e.unref(e.visibility)!==e.Visibility.None?(v(),k("button",{key:0,style:Q([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(u=e.unref(e.style))!=null?u:[]]),onClick:t[0]||(t[0]=(...c)=>e.onClick&&e.onClick(...c)),onMousedown:t[1]||(t[1]=(...c)=>e.start&&e.start(...c)),onMouseleave:t[2]||(t[2]=(...c)=>e.stop&&e.stop(...c)),onMouseup:t[3]||(t[3]=(...c)=>e.stop&&e.stop(...c)),onTouchstartPassive:t[4]||(t[4]=(...c)=>e.start&&e.start(...c)),onTouchendPassive:t[5]||(t[5]=(...c)=>e.stop&&e.stop(...c)),onTouchcancelPassive:t[6]||(t[6]=(...c)=>e.stop&&e.stop(...c)),class:X({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)?(v(),A(te(e.unref(e.comp)),{key:0})):T("",!0),m(l,{mark:e.unref(e.mark)},null,8,["mark"]),m(o,{id:e.id},null,8,["id"])],38)):T("",!0)}var qn=j(ur,[["render",cr],["__scopeId","data-v-8cedd7da"]]);const dr=Symbol("Buyable");function qt(e){const t=we(0);return Ce(()=>{var r,l,o;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=Pt("buyable-"),n.type=dr,n[ve]=qn,n.amount=t,n.amount[St]=(r=n.initialValue)!=null?r:0,n.canAfford=P(()=>{const u=n,c=a(u.cost);return u.resource!=null&&c!=null&&h.gte(u.resource.value,c)}),n.canPurchase==null&&(n.canPurchase=P(()=>a(n.visibility)===Ne.Visible&&a(n.canAfford)&&h.lt(n.amount.value,a(n.purchaseLimit)))),n.maxed=P(()=>h.gte(n.amount.value,a(n.purchaseLimit))),I(n,"classes");const s=n.classes;n.classes=P(()=>{const u=a(s)||{};return n.maxed.value&&(u.bought=!0),u}),I(n,"canPurchase"),n.canClick=n.canPurchase,n.onClick=n.purchase=(o=(l=n.onClick)!=null?l:n.purchase)!=null?o:function(){var g;const u=n;if(!a(u.canPurchase))return;const c=a(u.cost);u.cost!=null&&u.resource!=null&&(u.resource.value=h.sub(u.resource.value,c),u.amount.value=h.add(u.amount.value,1)),(g=u.onPurchase)==null||g.call(u,c)},I(n,"display");const i=n.display;return n.display=H(()=>{const u=a(i);if(mt(u)){const c=z(u);return m(c,null,null)}if(u!=null&&n.cost!=null&&n.resource!=null){const c=n,g=z(u.title||"","h3"),b=z(u.description||""),p=z(u.effectDisplay||"");return m("span",null,[u.title?m("div",null,[m(g,null,null)]):null,u.description?m(b,null,null):null,u.showAmount===!1?null:m("div",null,[m("br",null,null),a(c.purchaseLimit)===h.dInf?m(Y,null,[C("Amount: "),Ge(c.amount.value)]):m(Y,null,[C("Amount: "),Ge(c.amount.value),C(" /")," ",Ge(a(c.purchaseLimit))])]),u.effectDisplay?m("div",null,[m("br",null,null),C("Currently: "),m(p,null,null)]):null,c.cost&&!c.maxed.value?m("div",null,[m("br",null,null),C("Cost: "),re(a(c.cost)||0)," ",n.resource.displayName]):null])}return""}),I(n,"visibility"),he(n,"visibility",Ne.Visible),I(n,"cost"),I(n,"resource"),I(n,"purchaseLimit"),he(n,"purchaseLimit",h.dInf),I(n,"style"),I(n,"mark"),I(n,"small"),n[be]=function(){const{display:u,visibility:c,style:g,classes:b,onClick:p,canClick:_,small:w,mark:N,id:F}=this;return{display:u,visibility:c,style:a(g),classes:b,onClick:p,canClick:_,small:w,mark:N,id:F}},n})}const fr=Symbol("Clickable");function yn(e){return Ce(()=>{var n;const t=(n=e==null?void 0:e())!=null?n:{};if(t.id=Pt("clickable-"),t.type=fr,t[ve]=qn,t.isHolding=E(!1),I(t,"visibility"),he(t,"visibility",Ne.Visible),I(t,"canClick"),he(t,"canClick",!0),I(t,"classes"),I(t,"style"),I(t,"mark"),I(t,"display"),t.onClick){const s=t.onClick.bind(t);t.onClick=function(i){a(t.canClick)&&s(i)}}if(t.onHold){const s=t.onHold.bind(t);t.onHold=function(){a(t.canClick)&&s()}}return t[be]=function(){const{display:s,visibility:i,style:r,classes:l,onClick:o,onHold:u,isHolding:c,canClick:g,small:b,mark:p,id:_}=this;return{display:s,visibility:i,style:a(r),classes:l,onClick:o,onHold:u,isHolding:c,canClick:g,small:b,mark:p,id:_}},t})}const mr=q({__name:"Sticky",setup(e){const t=E("0"),n=new ResizeObserver(i),s=Le(null);function i(){let r=s.value;if(r==null)return;let l=0;for(;r.previousSibling;){const o=r.previousSibling;o.dataset&&"vSticky"in o.dataset&&(l+=o.offsetHeight),r=o}t.value=l+"px"}return xe(i),document.fonts.ready.then(i),Wt(()=>{var l;const r=(l=s.value)==null?void 0:l.parentElement;r&&n.observe(r)}),(r,l)=>(v(),k("div",{class:"sticky",style:Q({top:t.value}),ref_key:"element",ref:s,"data-v-sticky":""},[ke(r.$slots,"default",{},void 0,!0)],4))}});var hr=j(mr,[["__scopeId","data-v-cccac690"]]);function At(e,t="points",n=0,s=void 0){const i=J(e)?e:we(e);return i.displayName=t,i.precision=n,i.small=s,i}function pr(e){const t=we(e.value);return _e(e,(n,s)=>{h.gt(n,s)&&(t.value=h.add(t.value,h.sub(n,s)))}),t}new h("10^^8");new h("1e100");function An(e,t){const n=t!=null?t:e.value;return h.eq(e.precision,0)?Ge(n):re(n,e.precision,e.small)}const gr=q({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,n=P(()=>An(t.resource));return(s,i)=>(v(),k("h2",{style:Q({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},L(a(n)),5))}});const yr={class:"main-display"},vr={key:0},br={key:1},_r=C(", "),Bt=q({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null},setup(e){const n=ae(e),s=E(null),i=ht(n.effectDisplay),r=P(()=>h.lt(n.resource.value,"1e1000"));return(l,o)=>(v(),A(hr,null,{default:O(()=>{var u,c,g,b;return[d("div",{class:X(["main-display-container",(u=e.classes)!=null?u:{}]),style:Q([{height:`${((g=(c=s.value)==null?void 0:c.$el.clientHeight)!=null?g:0)+50}px`},(b=e.style)!=null?b:{}])},[d("div",yr,[a(r)?(v(),k("span",vr,"You have ")):T("",!0),m(gr,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),C(" "+L(e.resource.displayName),1),a(i)?(v(),k("span",br,[_r,(v(),A(te(a(i)),{ref_key:"effectRef",ref:s},null,512))])):T("",!0)])],6)]}),_:1}))}});var Nr=q({props:{element:Object,display:{type:V(Object,String,Function),required:!0},style:V(Object,String,Array),classes:V(Object),direction:V(String),xoffset:V(String),yoffset:V(String),pinned:Object},setup(e){const{element:t,display:n,pinned:s}=ae(e),i=E(!1),r=P(()=>(ne(s)||i.value)&&l.value),l=ht(n),o=Le(z(H(()=>{const g=ne(t);return g==null?"":tt(g)})));function u(g){const b=s;g.shiftKey&&b&&(b.value=!b.value,g.stopPropagation(),g.preventDefault())}const c=P(()=>ne(s)&&It[Z.theme].showPin);return{Direction:B,isHovered:i,isShown:r,comp:l,elementComp:o,unref:a,togglePinned:u,showPin:c}}});const wr={key:0,class:"material-icons pinned"};function kr(e,t,n,s,i,r){return v(),k("div",{class:X(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=l=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=l=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...l)=>e.togglePinned&&e.togglePinned(...l))},[ke(e.$slots,"default",{},void 0,!0),e.elementComp?(v(),A(te(e.elementComp),{key:0})):T("",!0),m($t,{name:"fade"},{default:O(()=>{var l;return[e.isShown?(v(),k("div",{key:0,class:X(["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:Q([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(l=e.unref(e.style))!=null?l:{}])},[e.showPin?(v(),k("span",wr,"push_pin")):T("",!0),e.comp?(v(),A(te(e.comp),{key:1})):T("",!0)],6)):T("",!0)]}),_:1})],34)}var W=j(Nr,[["render",kr],["__scopeId","data-v-6102fa3a"]]);function vn(e,t){return I(t,"display"),I(t,"classes"),I(t,"style"),I(t,"direction"),he(t,"direction",B.Up),I(t,"xoffset"),I(t,"yoffset"),t.pinnable&&("pinned"in e?(console.error("Cannot add pinnable tooltip to element that already has a property called 'pinned'"),t.pinnable=!1):e.pinned=t.pinned=we(!1)),xe(()=>{const n=e[ve];e[ve]=W;const s=e[be].bind(e);e[be]=function(){const{display:r,classes:l,style:o,direction:u,xoffset:c,yoffset:g,pinned:b}=this;return{element:{[ve]:n,[be]:s},display:r,classes:l,style:a(o),direction:u,xoffset:c,yoffset:g,pinned:b}}.bind(t)}),t}var Sr=q({props:{display:{type:V(String,Object,Function),required:!0},visibility:{type:V(Number),required:!0},style:V(String,Object,Array),classes:V(Object),resource:Object,cost:V(String,Object,Number),canPurchase:{type:V(Boolean),required:!0},bought:{type:V(Boolean),required:!0},mark:V(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:Xt,MarkNode:Jt},setup(e){const{display:t,cost:n}=ae(e),s=Le("");return nt(()=>{const i=ne(t);if(i==null){s.value="";return}if(mt(i)){s.value=z(i);return}const r=ne(n),l=z(i.title||"","h3"),o=z(i.description,"div"),u=z(i.effectDisplay||"");s.value=z(H(()=>{var c;return m("span",null,[i.title?m("div",null,[m(l,null,null)]):null,m(o,null,null),i.effectDisplay?m("div",null,[C("Currently: "),m(u,null,null)]):null,e.resource!=null?m(Y,null,[m("br",null,null),C("Cost: "),e.resource&&An(e.resource,r)," ",(c=e.resource)==null?void 0:c.displayName]):null])}))}),{component:s,unref:a,Visibility:Ne}}});const Mr=["disabled"];function $r(e,t,n,s,i,r){var u;const l=He("MarkNode"),o=He("Node");return e.unref(e.visibility)!==e.Visibility.None?(v(),k("button",{key:0,style:Q([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(u=e.unref(e.style))!=null?u:{}]),onClick:t[0]||(t[0]=(...c)=>e.purchase&&e.purchase(...c)),class:X({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)?(v(),A(te(e.unref(e.component)),{key:0})):T("",!0),m(l,{mark:e.unref(e.mark)},null,8,["mark"]),m(o,{id:e.id},null,8,["id"])],14,Mr)):T("",!0)}var Cr=j(Sr,[["render",$r],["__scopeId","data-v-7742f590"]]);const Pr=Symbol("Upgrade");function ye(e){const t=we(!1);return Ce(()=>{const n=e();return n.id=Pt("upgrade-"),n.type=Pr,n[ve]=Cr,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=P(()=>{const s=n;return s.resource!=null&&s.cost!=null&&h.gte(s.resource.value,a(s.cost))}):I(n,"canAfford"),n.canPurchase=P(()=>a(n.visibility)===Ne.Visible&&a(n.canAfford)&&!a(n.bought)),n.purchase=function(){var i;const s=n;!a(s.canPurchase)||(s.resource!=null&&s.cost!=null&&(s.resource.value=h.sub(s.resource.value,a(s.cost))),t.value=!0,(i=s.onPurchase)==null||i.call(s))},I(n,"visibility"),he(n,"visibility",Ne.Visible),I(n,"classes"),I(n,"style"),I(n,"display"),I(n,"mark"),I(n,"cost"),I(n,"resource"),n[be]=function(){const{display:s,visibility:i,style:r,classes:l,resource:o,cost:u,canPurchase:c,bought:g,mark:b,id:p,purchase:_}=this;return{display:s,visibility:i,style:a(r),classes:l,resource:o,cost:u,canPurchase:c,bought:g,mark:b,id:p,purchase:_}},n})}function De(e){return Ce(()=>{const{addend:t,description:n,enabled:s}=e(),i=We(t),r=We(n),l=s==null?void 0:We(s);return{apply:o=>h.add(o,a(i)),revert:o=>h.sub(o,a(i)),enabled:l,description:n==null?void 0:H(()=>m("div",{class:"modifier-container"},[m("span",{class:"modifier-amount"},[h.gte(a(i),0)?"+":"",re(a(i))]),a(r)?m("span",{class:"modifier-description"},[tt(a(r))]):null]))}})}function bt(e){return Ce(()=>{const{multiplier:t,description:n,enabled:s}=e(),i=We(t),r=We(n),l=s==null?void 0:We(s);return{apply:o=>h.times(o,a(i)),revert:o=>h.div(o,a(i)),enabled:l,description:n==null?void 0:H(()=>m("div",{class:"modifier-container"},[m("span",{class:"modifier-amount"},[C("x"),re(a(i))]),a(r)?m("span",{class:"modifier-description"},[tt(a(r))]):null]))}})}function Re(e){return Ce(()=>{const t=e();return{apply:n=>t.filter(s=>a(s.enabled)!==!1).reduce((s,i)=>i.apply(s),n),revert:t.every(n=>n.revert!=null)?n=>t.filter(s=>a(s.enabled)!==!1).reduceRight((s,i)=>i.revert(s),n):void 0,enabled:P(()=>t.filter(n=>a(n.enabled)!==!1).length>0),description:H(()=>m(Y,null,[t.filter(n=>a(n.enabled)!==!1).map(n=>a(n.description)).filter(n=>n).map(tt)]))}})}function Ue(e,t,n,s=1,i="",r="Base"){return m("div",null,[m("h3",null,[e,t?m("span",{class:"subtitle"},[C(" ("),t,C(")")]):null]),m("br",null,null),m("div",{class:"modifier-container"},[m("span",{class:"modifier-amount"},[re(s),i]),m("span",{class:"modifier-description"},[tt(r)])]),tt(a(n.description)),m("hr",null,null),C("Total: "),re(n.apply(s)),i])}const Ir="trees",Tr=Zt(Ir,function(){const e="Trees",t="#4BDC13",n=At(0,"logs"),s=pr(n),i=At(10,"trees"),r=At(0,"saplings"),l=ye(()=>({resource:n,cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),o=ye(()=>({resource:r,cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),u=ye(()=>({resource:n,cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),c=ye(()=>({resource:r,cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),g=ye(()=>({resource:n,cost:100,display:{title:"Research I",description:"Get 25% more logs from each tree cut down and unlock more upgrades"}})),b=[l,o,u,c,g],p=ye(()=>({resource:n,cost:100,visibility:()=>Oe(g.bought.value),display:{title:"Sharper Fingers",description:"Cut trees twice as fast"}})),_=ye(()=>({resource:n,cost:100,visibility:()=>Oe(g.bought.value),display:{title:"Greener Fingers",description:"Plant trees twice as fast"}})),w=ye(()=>({resource:n,cost:300,visibility:()=>Oe(g.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),N=ye(()=>({resource:n,cost:300,visibility:()=>Oe(g.bought.value),display:{title:"Smart Spades",description:"Each time you manually plant trees, gain 1s of automatic tree planting production"}})),F=ye(()=>({resource:n,cost:1e3,visibility:()=>Oe(g.bought.value),display:{title:"Research II",description:"Get 25% more logs from each tree cut down and unlock repeatable purchases"}})),Ie=[p,_,w,N,F],S=qt(()=>({resource:n,cost(){return h.times(100,this.amount.value).add(200)},display:{title:"Generic Cutters",description:"Each cutter cuts down 1 tree/s"},visibility:()=>Oe(F.bought.value)})),$=qt(()=>({resource:n,cost(){return h.times(100,this.amount.value).add(200)},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>Oe(F.bought.value)})),U=qt(()=>({resource:n,cost(){return h.pow(h.add(this.amount.value,1),1.5).times(500)},display:{title:"Expand Forest",description:"Add 10 trees to the forest"},visibility:()=>Oe(F.bought.value),onPurchase(){i.value=h.add(i.value,10)}})),ce=[S,$,U],Te=Re(()=>[De(()=>({addend:1,description:"Wooden Fingers",enabled:l.bought})),De(()=>({addend:gt,description:"Smart Knives",enabled:w.bought}))]),Ot=P(()=>Te.apply(1)),en=Re(()=>[bt(()=>({multiplier:.5,description:"Sharper Fingers",enabled:p.bought}))]),Ke=P(()=>en.apply(1)),tn=Re(()=>[De(()=>({addend:1,description:"Automated Knives",enabled:u.bought})),De(()=>({addend:S.amount,description:"Generic Cutters",enabled:F.bought}))]),gt=P(()=>tn.apply(0)),nn=Re(()=>[De(()=>({addend:1,description:"Leafy Fingers",enabled:o.bought})),De(()=>({addend:yt,description:"Smart Spades",enabled:N.bought}))]),Dt=P(()=>nn.apply(1)),sn=Re(()=>[bt(()=>({multiplier:.5,description:"Greener Fingers",enabled:_.bought}))]),Ye=P(()=>sn.apply(1)),rn=Re(()=>[De(()=>({addend:1,description:"Automated Spade",enabled:c.bought})),De(()=>({addend:()=>h.div($.amount.value,2),description:"Generic Planters",enabled:F.bought}))]),yt=P(()=>rn.apply(0)),Et=Re(()=>[bt(()=>({multiplier:1.25,description:"Research I",enabled:g.bought})),bt(()=>({multiplier:1.25,description:"Research II",enabled:F.bought}))]),pe=we(0),Kn=gn(()=>({direction:B.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>h.div(pe.value,Ke.value)})),st=yn(()=>({display:{title:"Cut trees",description:H(()=>m(Y,null,[C("Cut down up to "),re(Ot.value,1),C(" tree"),h.eq(Ot.value,1)?"":"s",C(" at once!"),m("br",null,null),et(Kn)]))},style:{minHeight:"80px"},canClick:()=>h.gt(i.value,0)&&h.gte(pe.value,Ke.value),onClick(){if(h.lt(pe.value,Ke.value))return;const de=h.min(i.value,h.times(Ot.value,h.div(pe.value,Ke.value).floor()));i.value=h.sub(i.value,de),n.value=h.add(n.value,Et.apply(de)),r.value=h.add(r.value,de),pe.value=0}}));vn(st,{display:H(()=>hn([Ue("Trees","",Te,1,"/click"),Ue("Cooldown","",en,1,"s")],m("br",null,null))),direction:B.Down,style:"width: 400px; text-align: left"});const ge=we(0),Yn=gn(()=>({direction:B.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>h.div(ge.value,Ye.value)})),it=yn(()=>({display:{title:"Plant trees",description:H(()=>m(Y,null,[C("Plant up to "),re(Dt.value,1),C(" tree"),h.eq(Dt.value,1)?"":"s",C(" at once!"),m("br",null,null),et(Yn)]))},style:{minHeight:"80px"},canClick:()=>h.gt(r.value,0)&&h.gte(ge.value,Ye.value),onClick(){if(h.lt(ge.value,Ye.value))return;const de=h.min(r.value,h.times(Dt.value,h.div(ge.value,Ye.value).floor()));i.value=h.add(i.value,de),r.value=h.sub(r.value,de),ge.value=0}}));return vn(it,{display:H(()=>hn([Ue("Trees","",nn,1,"/click"),Ue("Cooldown","",sn,1,"s")],m("br",null,null))),direction:B.Down,style:"width: 400px; text-align: left"}),se.on("update",de=>{if(h.lt(ie.day.value,1))return;h.gte(pe.value,Ke.value)?pe.value=Ke.value:(pe.value=h.add(pe.value,de),st.isHolding.value&&st.onClick()),h.gte(ge.value,Ye.value)?ge.value=Ye.value:(ge.value=h.add(ge.value,de),it.isHolding.value&&it.onClick());const Vt=h.min(i.value,h.times(gt.value,de));i.value=h.sub(i.value,Vt),n.value=h.add(n.value,Et.apply(Vt)),r.value=h.add(r.value,Vt);const an=h.min(r.value,h.times(yt.value,de));i.value=h.add(i.value,an),r.value=h.sub(r.value,an)}),nt(()=>{ie.day.value===1&&h.gte(s.value,1e4)&&(ie.loreTitle.value="Day complete!",ie.loreBody.value="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!",ie.day.value=2,ie.minimized.value=!1)}),{name:e,color:t,logs:n,totalLogs:s,trees:i,saplings:r,cutTree:st,plantTree:it,row1Upgrades:b,row2Upgrades:Ie,row1Buyables:ce,manualCutProgress:pe,manualPlantProgress:ge,minWidth:700,display:H(()=>m(Y,null,[m(W,{display:H(()=>Ue("Log Gain","",Et)),direction:B.Down,style:"width: 400px; text-align: left"},{default:()=>[m(Bt,{resource:n,color:t,style:"margin-bottom: 0"},null)]}),m(Bt,{resource:r,color:"green",style:"margin-bottom: 0"},null),m(Bt,{resource:i,color:"green",style:"margin-bottom: 0"},null),m("br",null,null),h.gt(gt.value,0)?m(Y,null,[m(W,{display:H(()=>Ue("Trees","",tn,0,"/s")),direction:B.Down,style:"width: 400px; text-align: left"},{default:()=>[C("You cut down "),re(gt.value),C(" trees/s")]}),m("br",null,null)]):null,h.gt(yt.value,0)?m(Y,null,[m(W,{display:H(()=>Ue("Trees","",rn,0,"/s")),direction:B.Down,style:"width: 400px; text-align: left"},{default:()=>[C("You plant "),re(yt.value),C(" trees/s")]}),m("br",null,null)]):null,m(Ut,null,null),at(st,it),m("div",null,[C("Tip: You can hold down on actions to perform them automatically")]),m(Ut,null,null),at(...b),at(...Ie),at(...ce)]))}}),ie=Zt("main",function(){const e=we(1),t=E(""),n=E("");function s(r){const l=we(!1);return Ce(()=>{const o=r(),u=We(o.shouldNotify);return{...o,opened:l,shouldNotify:u,[ve]:Qi,[be]:function(){const{day:c,layer:g,symbol:b,opened:p,shouldNotify:_,story:w}=this;return{day:c,symbol:b,opened:p,shouldNotify:_,onOpenLore(){var N,F;t.value=a((F=(N=ee[g!=null?g:"trees"])==null?void 0:N.name)!=null?F:""),n.value=w},onOpenLayer(){if(M.tabs.includes(g!=null?g:"trees")){const N=M.tabs.lastIndexOf(g!=null?g:"trees");M.tabs.splice(N,1)}else M.tabs.push(g!=null?g:"trees")},onUnlockLayer(){p.value=!0,setTimeout(()=>{var N,F;t.value=a((F=(N=ee[g!=null?g:"trees"])==null?void 0:N.name)!=null?F:""),n.value=w},1e3)}}}}})}const i=[s(()=>({day:1,shouldNotify:!1,layer:null,symbol:"\u{1F384}",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!"})),s(()=>({day:2,shouldNotify:!1,layer:null,symbol:"cabin",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!"})),s(()=>({day:3,shouldNotify:!1,layer:null,symbol:"\u{1F9DD}",story:"With this unbelievably large workshop complete, it's time to get the elves to work! But it appears they've forgotten how to make toys over the last 11 months - guess it's time to setup training sessions!"})),s(()=>({day:4,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:5,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:6,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:7,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:8,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:9,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:10,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:11,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:12,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:13,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:14,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:15,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:16,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:17,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:18,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:19,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:20,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:21,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:22,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:23,shouldNotify:!1,layer:null,symbol:"",story:""})),s(()=>({day:24,shouldNotify:!1,layer:null,symbol:"",story:""}))];return{name:"Calendar",days:i,day:e,loreTitle:t,loreBody:n,minWidth:710,display:H(()=>m(Y,null,[M.devSpeed===0?m("div",null,[C("Game Paused")]):null,M.devSpeed&&M.devSpeed!==1?m("div",null,[C("Dev Speed: "),re(M.devSpeed),C("x")]):null,M.offlineTime?m("div",null,[C("Offline Time: "),Ct(M.offlineTime)]):null,m(Ut,null,null),m("div",{class:"advent"},[i.reduce((r,l)=>(r[r.length-1].length===4&&r.push([]),r[r.length-1].push(l),r),[[]]).map(r=>at(...r))])]))}}),Fr=e=>[ie,Tr],Bn=P(()=>!1);function Or(e,t){}var Rn=Object.freeze(Object.defineProperty({__proto__:null,main:ie,getInitialLayers:Fr,hasWon:Bn,fixOldSave:Or},Symbol.toStringTag,{value:"Module"}));const Dr=q({components:{Context:On},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:V(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:V(Number,String),required:!0},name:{type:V(String),required:!0},color:V(String),minimizable:V(Boolean),nodes:{type:Object,required:!0}},setup(e){const{display:t,index:n,minimized:s,minWidth:i,tab:r}=ae(e),l=Fn(t),o=P(()=>R.allowGoBack&&n.value>0&&!s.value);function u(){M.tabs.splice(a(e.index),1/0)}xe(()=>g(s.value,a(i.value))),_e([s,_i(i)],([b,p])=>g(b,p));function c(b){e.nodes.value=b}function g(b,p){const _=typeof p=="number"||Number.isNaN(parseInt(p))?p+"px":p,w=r.value();w!=null&&(b?(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=_,w.style.margin=""))}return{component:l,showGoBack:o,updateNodes:c,unref:a,goBack:u}}});function Er(e,t,n,s,i,r){const l=He("Context");return v(),k("div",{class:"layer-container",style:Q({"--layer-color":e.unref(e.color)})},[e.showGoBack?(v(),k("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...o)=>e.goBack&&e.goBack(...o))},"\u274C")):T("",!0),e.minimized.value?(v(),k("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=o=>e.minimized.value=!1)},[d("div",null,L(e.unref(e.name)),1)])):(v(),k("div",{key:2,class:X(["layer-tab",{showGoBack:e.showGoBack}])},[m(l,{onUpdateNodes:e.updateNodes},{default:O(()=>[(v(),A(te(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(v(),k("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=o=>e.minimized.value=!0)}," \u25BC ")):T("",!0)],4)}var Vr=j(Dr,[["render",Er],["__scopeId","data-v-614f946c"]]);const Un=e=>(Me("data-v-4b4bda40"),e=e(),$e(),e),xr=Un(()=>d("h2",null,"Changelog",-1)),Lr=Un(()=>d("details",{open:""},[d("summary",null,[C("v0.0 Initial Commit - "),d("time",null,"2021-09-04")]),C(" This is the first release :D "),d("ul",null,[d("li",{class:"feature"},"Did everything"),d("li",{class:"fix"},"Had some fun"),d("li",{class:"breaking"},"Removed everything"),d("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),qr=q({__name:"Changelog",setup(e,{expose:t}){const n=E(!1);return t({open(){n.value=!0}}),(s,i)=>(v(),A(qe,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r)},{header:O(()=>[xr]),body:O(()=>[Lr]),_:1},8,["modelValue"]))}});var Ar=j(qr,[["__scopeId","data-v-4b4bda40"]]);const ze=e=>(Me("data-v-7dec2dec"),e=e(),$e(),e),Br={class:"info-modal-header"},Rr=["src","alt"],Ur={class:"info-modal-title"},jr={key:0},Gr={key:0},Wr={key:0},Hr=ze(()=>d("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1)),zr=ze(()=>d("br",null,null,-1)),Kr=ze(()=>d("br",null,null,-1)),Yr=["href"],Zr=ze(()=>d("span",{class:"material-icons info-modal-discord"},"discord",-1)),Jr=ze(()=>d("div",null,[d("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link"},[d("span",{class:"material-icons info-modal-discord"},"discord"),C(" The Paper Pilot Community ")])],-1)),Xr=ze(()=>d("div",null,[d("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link"},[d("span",{class:"material-icons info-modal-discord"},"discord"),C(" The Modding Tree ")])],-1)),Qr=ze(()=>d("br",null,null,-1));var ea=q({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const n=e,{title:s,logo:i,author:r,discordName:l,discordLink:o,versionNumber:u,versionTitle:c}=R,g=ae(n),b=E(!1),p=P(()=>Ct(M.timePlayed)),_=P(()=>z(H(()=>m(Y,null,[hi.map(et)]))));t({open(){b.value=!0}});function w(){var N;(N=a(g.changelog))==null||N.open()}return(N,F)=>(v(),A(qe,{modelValue:b.value,"onUpdate:modelValue":F[0]||(F[0]=Ie=>b.value=Ie)},{header:O(()=>[d("div",Br,[a(i)?(v(),k("img",{key:0,class:"info-modal-logo",src:a(i),alt:a(s)},null,8,Rr)):T("",!0),d("div",Ur,[d("h2",null,L(a(s)),1),d("h4",null,[C(" v"+L(a(u)),1),a(c)?(v(),k("span",jr,": "+L(a(c)),1)):T("",!0)])])])]),body:O(({shown:Ie})=>[Ie?(v(),k("div",Gr,[a(r)?(v(),k("div",Wr,"By "+L(a(r)),1)):T("",!0),Hr,zr,d("div",{class:"link",onClick:w},"Changelog"),Kr,d("div",null,[a(o)?(v(),k("a",{key:0,href:a(o),class:"info-modal-discord-link"},[Zr,C(" "+L(a(l)),1)],8,Yr)):T("",!0)]),Jr,Xr,Qr,d("div",null,"Time Played: "+L(a(p)),1),(v(),A(te(a(_))))])):T("",!0)]),_:1},8,["modelValue"]))}});var ta=j(ea,[["__scopeId","data-v-7dec2dec"]]);const na={class:"field"},sa={key:0,class:"field-title"},jn=q({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var l;const n=e,s=ht(Se(n,"title"),"span"),i=E((l=n.options.find(o=>o.value===n.modelValue))!=null?l:null);_e(Se(n,"modelValue"),o=>{var u;ne(i)!==o&&(i.value=(u=n.options.find(c=>c.value===o))!=null?u:null)});function r(o){t("update:modelValue",o.value)}return(o,u)=>(v(),k("div",na,[a(s)?(v(),k("span",sa,[(v(),A(te(a(s))))])):T("",!0),m(a(rs),{options:e.options,modelValue:i.value,"onUpdate:modelValue":[u[0]||(u[0]=c=>i.value=c),r],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});const ia={class:"field"},ra=q({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,s=P(()=>z(a(n.title)||"","span")),i=P({get(){return!!n.modelValue},set(r){t("update:modelValue",r)}});return(r,l)=>(v(),k("label",ia,[Ht(d("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":l[0]||(l[0]=o=>J(i)?i.value=o:null)},null,512),[[es,a(i)]]),(v(),A(te(a(s))))]))}});var Ee=j(ra,[["__scopeId","data-v-2b109500"]]);const Gn=e=>(Me("data-v-bc13791c"),e=e(),$e(),e),aa=Gn(()=>d("div",{class:"header"},[d("h2",null,"Options")],-1)),oa=Gn(()=>d("hr",null,null,-1));var la=q({__name:"Options",setup(e,{expose:t}){const n=E(!1);t({open(){n.value=!0}});const s=Object.keys(It).map(w=>({label:ai(w),value:w})),i=P(()=>z(H(()=>m(Y,null,[mi.map(et)])))),{showTPS:r,theme:l,unthrottled:o}=ae(Z),{autosave:u,offlineProd:c}=ae(M),g=P({get(){return M.devSpeed===0},set(w){M.devSpeed=w?0:null}}),b=H(()=>m("span",null,[C("Offline Production"),m(W,{display:"Save-specific"},{default:()=>[C("*")]})])),p=H(()=>m("span",null,[C("Autosave"),m(W,{display:"Save-specific"},{default:()=>[C("*")]})])),_=H(()=>m("span",null,[C("Pause game"),m(W,{display:"Save-specific"},{default:()=>[C("*")]})]));return(w,N)=>(v(),A(qe,{modelValue:n.value,"onUpdate:modelValue":N[6]||(N[6]=F=>n.value=F)},{header:O(()=>[aa]),body:O(()=>[m(jn,{title:"Theme",options:a(s),modelValue:a(l),"onUpdate:modelValue":N[0]||(N[0]=F=>J(l)?l.value=F:null)},null,8,["options","modelValue"]),(v(),A(te(a(i)))),m(Ee,{title:"Show TPS",modelValue:a(r),"onUpdate:modelValue":N[1]||(N[1]=F=>J(r)?r.value=F:null)},null,8,["modelValue"]),oa,m(Ee,{title:"Unthrottled",modelValue:a(o),"onUpdate:modelValue":N[2]||(N[2]=F=>J(o)?o.value=F:null)},null,8,["modelValue"]),m(Ee,{title:a(b),modelValue:a(c),"onUpdate:modelValue":N[3]||(N[3]=F=>J(c)?c.value=F:null)},null,8,["title","modelValue"]),m(Ee,{title:a(p),modelValue:a(u),"onUpdate:modelValue":N[4]||(N[4]=F=>J(u)?u.value=F:null)},null,8,["title","modelValue"]),a(R).enablePausing?(v(),A(Ee,{key:0,title:a(_),modelValue:a(g),"onUpdate:modelValue":N[5]||(N[5]=F=>J(g)?g.value=F:null)},null,8,["title","modelValue"])):T("",!0)]),_:1},8,["modelValue"]))}});var ua=j(la,[["__scopeId","data-v-bc13791c"]]);const ca=["onSubmit"],da={class:"field"},fa={key:0,class:"field-title"},ma=["placeholder"],ha=q({__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=ht(Se(n,"title"),"span"),i=Le(null);Wt(()=>{var u;(u=i.value)==null||u.focus()});const r=P({get(){return a(n.modelValue)||""},set(u){t("update:modelValue",u)}});function l(){t("submit")}function o(){n.submitOnBlur!==!1?t("submit"):t("cancel")}return(u,c)=>(v(),k("form",{onSubmit:ut(l,["prevent"])},[d("div",da,[a(s)?(v(),k("span",fa,[(v(),A(te(a(s))))])):T("",!0),e.textArea?(v(),A(a(os),{key:1,modelValue:a(r),"onUpdate:modelValue":c[0]||(c[0]=g=>J(r)?r.value=g:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:o,ref_key:"field",ref:i},null,8,["modelValue","placeholder","maxHeight"])):Ht((v(),k("input",{key:2,type:"text","onUpdate:modelValue":c[1]||(c[1]=g=>J(r)?r.value=g:null),placeholder:e.placeholder,class:X({fullWidth:!e.title}),onBlur:o,ref_key:"field",ref:i},null,42,ma)),[[ts,a(r)]])])],40,ca))}});var Wn=j(ha,[["__scopeId","data-v-67b44a54"]]);const pa={key:0},ga=["onClick","disabled"],ya={key:0},va=["onClick"],ba=q({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const s=ae(e),i=E(!1);_e(i,o=>{t("confirmingChanged",o)});function r(){if(a(s.skipConfirm)){t("click");return}i.value&&t("click"),i.value=!i.value}function l(){i.value=!1}return(o,u)=>(v(),k("span",{class:X(["container",{confirming:i.value}])},[i.value?(v(),k("span",pa,"Are you sure?")):T("",!0),d("button",{onClick:ut(r,["stop"]),class:"button danger",disabled:e.disabled},[i.value?(v(),k("span",ya,"Yes")):ke(o.$slots,"default",{key:1},void 0,!0)],8,ga),i.value?(v(),k("button",{key:1,class:"button",onClick:ut(l,["stop"])},"No",8,va)):T("",!0)],2))}});var _a=j(ba,[["__scopeId","data-v-2f8ef34c"]]);const Na=["onClick"],wa=q({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=E(!1),s=E(null);function i(){t("click"),s.value&&clearTimeout(s.value),n.value=!1,xe(()=>{n.value=!0,s.value=setTimeout(()=>n.value=!1,500)})}return(r,l)=>(v(),k("button",{onClick:ut(i,["stop"]),class:X(["feedback",{activated:n.value,left:e.left}])},[ke(r.$slots,"default",{},void 0,!0)],10,Na))}});var ka=j(wa,[["__scopeId","data-v-01a1b95c"]]);const Pe=e=>(Me("data-v-0136bef4"),e=e(),$e(),e),Sa=Pe(()=>d("div",{class:"handle material-icons"},"drag_handle",-1)),Ma={key:0,class:"actions"},$a=Pe(()=>d("span",{class:"material-icons"},"content_paste",-1)),Ca=Pe(()=>d("span",{class:"material-icons"},"content_copy",-1)),Pa=Pe(()=>d("span",{class:"material-icons"},"edit",-1)),Ia=Pe(()=>d("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),Ta={key:1,class:"actions"},Fa=Pe(()=>d("span",{class:"material-icons"},"check",-1)),Oa=Pe(()=>d("span",{class:"material-icons"},"close",-1)),Da={key:2,class:"details"},Ea={class:"save-version"},Va=Pe(()=>d("br",null,null,-1)),xa={key:0},La={key:3,class:"details"},qa={key:4,class:"details error"},Aa=Pe(()=>d("br",null,null,-1)),Ba=q({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const n=e,{save:s}=ae(n),i=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),r=E(!1),l=E(!1),o=E("");_e(r,()=>o.value=s.value.name||"");const u=P(()=>s.value&&s.value.id===M.id),c=P(()=>u.value?M.time:s.value&&s.value.time||0);function g(){t("editName",o.value),r.value=!1}return(b,p)=>(v(),k("div",{class:X(["save",{active:a(u)}])},[Sa,r.value?(v(),k("div",Ta,[d("button",{onClick:g,class:"button"},[m(W,{display:"Save",direction:a(B).Left,class:"info"},{default:O(()=>[Fa]),_:1},8,["direction"])]),d("button",{onClick:p[5]||(p[5]=_=>r.value=!r.value),class:"button"},[m(W,{display:"Cancel",direction:a(B).Left,class:"info"},{default:O(()=>[Oa]),_:1},8,["direction"])])])):(v(),k("div",Ma,[a(s).error==null&&!l.value?(v(),A(ka,{key:0,onClick:p[0]||(p[0]=_=>t("export")),class:"button",left:""},{default:O(()=>[m(W,{display:"Export",direction:a(B).Left,class:"info"},{default:O(()=>[$a]),_:1},8,["direction"])]),_:1})):T("",!0),a(s).error==null&&!l.value?(v(),k("button",{key:1,onClick:p[1]||(p[1]=_=>t("duplicate")),class:"button"},[m(W,{display:"Duplicate",direction:a(B).Left,class:"info"},{default:O(()=>[Ca]),_:1},8,["direction"])])):T("",!0),a(s).error==null&&!l.value?(v(),k("button",{key:2,onClick:p[2]||(p[2]=_=>r.value=!r.value),class:"button"},[m(W,{display:"Edit Name",direction:a(B).Left,class:"info"},{default:O(()=>[Pa]),_:1},8,["direction"])])):T("",!0),m(_a,{disabled:a(u),onClick:p[3]||(p[3]=_=>t("delete")),onConfirmingChanged:p[4]||(p[4]=_=>l.value=_)},{default:O(()=>[m(W,{display:"Delete",direction:a(B).Left,class:"info"},{default:O(()=>[Ia]),_:1},8,["direction"])]),_:1},8,["disabled"])])),a(s).error==null&&!r.value?(v(),k("div",Da,[d("button",{class:"button open",onClick:p[6]||(p[6]=_=>t("open"))},[d("h3",null,L(a(s).name),1)]),d("span",Ea,"v"+L(a(s).modVersion),1),Va,a(c)?(v(),k("div",xa,"Last played "+L(a(i).format(a(c))),1)):T("",!0)])):a(s).error==null&&r.value?(v(),k("div",La,[m(Wn,{modelValue:o.value,"onUpdate:modelValue":p[7]||(p[7]=_=>o.value=_),class:"editname",onSubmit:g},null,8,["modelValue"])])):(v(),k("div",qa,[C(" Error: Failed to load save with id "+L(a(s).id),1),Aa,C(L(a(s).error),1)]))],2))}});var Ra=j(Ba,[["__scopeId","data-v-0136bef4"]]);const Qt=e=>(Me("data-v-3b9991aa"),e=e(),$e(),e),Ua=Qt(()=>d("h2",null,"Saves Manager",-1)),ja={class:"modal-footer"},Ga={class:"field"},Wa=Qt(()=>d("span",{class:"field-title"},"Create Save",-1)),Ha={class:"field-buttons"},za={class:"footer"},Ka=Qt(()=>d("div",{style:{"flex-grow":"1"}},null,-1)),Ya=q({__name:"SavesManager",setup(e,{expose:t}){const n=E(!1),s=E(null);t({open(){n.value=!0}});const i=E(!1),r=E(""),l=E(null);_e(r,S=>{S?xe(()=>{try{if(S[0]!=="{")if(S[0]==="e")S=decodeURIComponent(escape(atob(S)));else if(S[0]==="\u1BE1")S=Ve.decompressFromUTF16(S);else{console.warn("Unable to determine preset encoding",S),i.value=!0;return}const $=JSON.parse(S);if(typeof $!="object"){i.value=!0;return}const U=_t();$.id=U,fe($),r.value="",i.value=!1,Z.saves.push(U)}catch{i.value=!0}}):i.value=!1});let o={},u=E(Object.keys(o).reduce((S,$)=>(S.push({label:$.split("/").slice(-1)[0].slice(0,-4),value:o[$]}),S),[]));const c=Gt({});function g(S){if(c[S]==null){let $=localStorage.getItem(S);if($==null)c[S]={error:"Save doesn't exist in localStorage",id:S};else if($==="dW5kZWZpbmVk")c[S]={error:"Save is undefined",id:S};else try{if($[0]!=="{")if($[0]==="e")$=decodeURIComponent(escape(atob($)));else if($[0]==="\u1BE1")$=Ve.decompressFromUTF16($);else return console.warn("Unable to determine preset encoding",$),i.value=!0,c[S]={error:"Unable to determine preset encoding",id:S},c[S];c[S]={...JSON.parse($),id:S}}catch(U){c[S]={error:U,id:S},console.warn(`SavesManager: Failed to load info about save with id ${S}: ${U} ${$}`)}}return c[S]}_e(n,S=>{S&&Object.keys(c).forEach($=>delete c[$])});const b=P(()=>Z.saves.reduce((S,$)=>(S[$]=g($),S),{}));function p(S){let $;switch(M.id===S?$=Pn(M[K]):$=JSON.stringify(b.value[S]),R.exportEncoding){default:console.warn(`Unknown save encoding: ${R.exportEncoding}. Defaulting to lz`);case"lz":$=Ve.compressToUTF16($);break;case"base64":$=btoa(unescape(encodeURIComponent($)));break;case"plain":break}const U=document.createElement("textarea");U.value=$,document.body.appendChild(U),U.select(),U.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(U)}function _(S){M.id===S&&fe();const $={...b.value[S],id:_t()};fe($),Z.saves.push($.id)}function w(S){Z.saves=Z.saves.filter($=>$!==S),localStorage.removeItem(S),c[S]=void 0}function N(S){b.value[M.id].time=M.time,fe(),c[M.id]=void 0,je(b.value[S]),c[S]=void 0}function F(S){if(l.value=S,xe(()=>{l.value=null}),S[0]!=="{")if(S[0]==="e")S=decodeURIComponent(escape(atob(S)));else if(S[0]==="\u1BE1")S=Ve.decompressFromUTF16(S);else{console.warn("Unable to determine preset encoding",S);return}const $=JSON.parse(S);$.id=_t(),fe($),Z.saves.push($.id),N($.id)}function Ie(S,$){const U=b.value[S];U&&(U.name=$,M.id===S?(M.name=$,fe()):(fe(U),c[S]=void 0))}return(S,$)=>(v(),A(qe,{modelValue:n.value,"onUpdate:modelValue":$[4]||($[4]=U=>n.value=U),ref_key:"modal",ref:s},{header:O(()=>[Ua]),body:O(({shown:U})=>[U?(v(),A(a(as),{key:0,list:a(Z).saves,handle:".handle",itemKey:ce=>ce},{item:O(({element:ce})=>[m(Ra,{save:a(b)[ce],onOpen:Te=>N(ce),onExport:Te=>p(ce),onEditName:Te=>Ie(ce,Te),onDuplicate:Te=>_(ce),onDelete:Te=>w(ce)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):T("",!0)]),footer:O(()=>[d("div",ja,[m(Wn,{modelValue:r.value,"onUpdate:modelValue":$[0]||($[0]=U=>r.value=U),title:"Import Save",placeholder:"Paste your save here!",class:X({importingFailed:i.value})},null,8,["modelValue","class"]),d("div",Ga,[Wa,d("div",Ha,[d("button",{class:"button",onClick:$[1]||($[1]=U=>N(a(Xe)().id))},"New Game"),Object.keys(a(u)).length>0?(v(),A(jn,{key:0,options:a(u),modelValue:l.value,"onUpdate:modelValue":$[2]||($[2]=U=>F(U)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):T("",!0)])]),d("div",za,[Ka,d("button",{class:"button modal-default-button",onClick:$[3]||($[3]=U=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Hn=j(Ya,[["__scopeId","data-v-3b9991aa"]]);const oe=e=>(Me("data-v-4a3f8425"),e=e(),$e(),e),Za=["src","alt"],Ja={key:1,class:"title"},Xa=oe(()=>d("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),Qa={class:"discord"},eo={class:"discord-links"},to={key:0},no=["href"],so=oe(()=>d("li",null,[d("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),io=oe(()=>d("li",null,[d("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),ro={href:"https://forums.moddingtree.com/",target:"_blank"},ao=oe(()=>d("span",{class:"material-icons"},"forum",-1)),oo=oe(()=>d("span",{class:"material-icons"},"info",-1)),lo=oe(()=>d("span",{class:"material-icons"},"library_books",-1)),uo=oe(()=>d("span",{class:"material-icons"},"settings",-1)),co=oe(()=>d("span",{class:"material-icons"},"library_books",-1)),fo=oe(()=>d("span",{class:"material-icons"},"settings",-1)),mo=oe(()=>d("span",{class:"material-icons"},"info",-1)),ho={href:"https://forums.moddingtree.com/",target:"_blank"},po=oe(()=>d("span",{class:"material-icons"},"forum",-1)),go={class:"discord"},yo={class:"discord-links"},vo={key:0},bo=["href"],_o=oe(()=>d("li",null,[d("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),No=oe(()=>d("li",null,[d("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),wo=q({__name:"Nav",setup(e){const t=E(null),n=E(null),s=E(null),i=E(null),{useHeader:r,banner:l,title:o,discordName:u,discordLink:c,versionNumber:g}=R;function b(){window.open(c,"mywindow")}return(p,_)=>(v(),k(Y,null,[a(r)?(v(),k("div",lt({key:0,class:"nav"},p.$attrs),[a(l)?(v(),k("img",{key:0,src:a(l),class:"banner",alt:a(o)},null,8,Za)):(v(),k("div",Ja,L(a(o)),1)),d("div",{onClick:_[0]||(_[0]=w=>{var N;return(N=i.value)==null?void 0:N.open()}),class:"version-container"},[m(W,{display:"Changelog",direction:a(B).Down,class:"version"},{default:O(()=>[d("span",null,"v"+L(a(g)),1)]),_:1},8,["direction"])]),Xa,d("div",Qa,[d("span",{onClick:b,class:"material-icons"},"discord"),d("ul",eo,[a(c)?(v(),k("li",to,[d("a",{href:a(c),target:"_blank"},L(a(u)),9,no)])):T("",!0),so,io])]),d("div",null,[d("a",ro,[m(W,{display:"Forums",direction:a(B).Down,yoffset:"5px"},{default:O(()=>[ao]),_:1},8,["direction"])])]),d("div",{onClick:_[1]||(_[1]=w=>{var N;return(N=t.value)==null?void 0:N.open()})},[m(W,{display:"Info",direction:a(B).Down,class:"info"},{default:O(()=>[oo]),_:1},8,["direction"])]),d("div",{onClick:_[2]||(_[2]=w=>{var N;return(N=n.value)==null?void 0:N.open()})},[m(W,{display:"Saves",direction:a(B).Down,xoffset:"-20px"},{default:O(()=>[lo]),_:1},8,["direction"])]),d("div",{onClick:_[3]||(_[3]=w=>{var N;return(N=s.value)==null?void 0:N.open()})},[m(W,{display:"Options",direction:a(B).Down,xoffset:"-66px"},{default:O(()=>[uo]),_:1},8,["direction"])])],16)):(v(),k("div",lt({key:1,class:"overlay-nav"},p.$attrs),[d("div",{onClick:_[4]||(_[4]=w=>{var N;return(N=i.value)==null?void 0:N.open()}),class:"version-container"},[m(W,{display:"Changelog",direction:a(B).Right,xoffset:"25%",class:"version"},{default:O(()=>[d("span",null,"v"+L(a(g)),1)]),_:1},8,["direction"])]),d("div",{onClick:_[5]||(_[5]=w=>{var N;return(N=n.value)==null?void 0:N.open()})},[m(W,{display:"Saves",direction:a(B).Right},{default:O(()=>[co]),_:1},8,["direction"])]),d("div",{onClick:_[6]||(_[6]=w=>{var N;return(N=s.value)==null?void 0:N.open()})},[m(W,{display:"Options",direction:a(B).Right},{default:O(()=>[fo]),_:1},8,["direction"])]),d("div",{onClick:_[7]||(_[7]=w=>{var N;return(N=t.value)==null?void 0:N.open()})},[m(W,{display:"Info",direction:a(B).Right},{default:O(()=>[mo]),_:1},8,["direction"])]),d("div",null,[d("a",ho,[m(W,{display:"Forums",direction:a(B).Right,xoffset:"7px"},{default:O(()=>[po]),_:1},8,["direction"])])]),d("div",go,[d("span",{onClick:b,class:"material-icons"},"discord"),d("ul",yo,[a(c)?(v(),k("li",vo,[d("a",{href:a(c),target:"_blank"},L(a(u)),9,bo)])):T("",!0),_o,No])])],16)),m(ta,{ref_key:"info",ref:t,changelog:i.value},null,8,["changelog"]),m(Hn,{ref_key:"savesManager",ref:n},null,512),m(ua,{ref_key:"options",ref:s},null,512),m(Ar,{ref_key:"changelog",ref:i},null,512)],64))}});var zn=j(wo,[["__scopeId","data-v-4a3f8425"]]);const ko={class:"inner-tab"},So=q({__name:"Game",setup(e){const t=Se(M,"tabs"),n=P(()=>Object.keys(ee)),s=R.useHeader;function i(r){const{display:l,minimized:o,minWidth:u,name:c,color:g,minimizable:b,nodes:p}=r;return{display:l,minimized:o,minWidth:u,name:c,color:g,minimizable:b,nodes:p}}return(r,l)=>(v(),k("div",{class:X(["tabs-container",{useHeader:a(s)}])},[(v(!0),k(Y,null,ns(a(t),(o,u)=>{var c,g;return v(),k("div",{key:u,class:X(["tab",a((c=a(ee)[o])==null?void 0:c.classes)]),ref_for:!0,ref:`tab-${u}`,style:Q(a((g=a(ee)[o])==null?void 0:g.style))},[u===0&&!a(s)?(v(),A(zn,{key:0})):T("",!0),d("div",ko,[a(n).includes(o)?(v(),A(Vr,lt({key:0},i(a(ee)[o]),{index:u,tab:()=>{var b;return(b=r.$refs[`tab-${u}`])==null?void 0:b[0]}}),null,16,["index","tab"])):(v(),A(te(o),{key:1,index:u},null,8,["index"]))])],6)}),128)),m(qe,{"model-value":a(ie).loreBody.value!=="","onUpdate:modelValue":l[0]||(l[0]=()=>a(ie).loreBody.value="")},{header:O(()=>[d("h2",null,L(a(ie).loreTitle.value),1)]),body:O(()=>[C(L(a(ie).loreBody.value),1)]),_:1},8,["model-value"])],2))}});var Mo=j(So,[["__scopeId","data-v-586cafe2"]]);const pt=e=>(Me("data-v-4a50ce42"),e=e(),$e(),e),$o={class:"game-over-modal-header"},Co=["src","alt"],Po={class:"game-over-modal-title"},Io=pt(()=>d("h2",null,"Congratulations!",-1)),To={key:0},Fo=pt(()=>d("br",null,null,-1)),Oo=pt(()=>d("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),Do=pt(()=>d("br",null,null,-1)),Eo=["href"],Vo=pt(()=>d("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),xo=q({__name:"GameOverScreen",setup(e){const{title:t,logo:n,discordName:s,discordLink:i,versionNumber:r,versionTitle:l}=R,o=P(()=>Ct(M.timePlayed)),u=P(()=>Bn.value&&!M.keepGoing),c=Se(M,"autosave");function g(){M.keepGoing=!0}function b(){je(Xe())}return(p,_)=>(v(),A(qe,{"model-value":a(u)},{header:O(()=>[d("div",$o,[a(n)?(v(),k("img",{key:0,class:"game-over-modal-logo",src:a(n),alt:a(t)},null,8,Co)):T("",!0),d("div",Po,[Io,d("h4",null,"You've beaten "+L(a(t))+" v"+L(a(r))+": "+L(a(l)),1)])])]),body:O(({shown:w})=>[w?(v(),k("div",To,[d("div",null,"It took you "+L(a(o))+" to beat the game.",1),Fo,Oo,Do,d("div",null,[d("a",{href:a(i),class:"game-over-modal-discord-link"},[Vo,C(" "+L(a(s)),1)],8,Eo)]),m(Ee,{title:"Autosave",modelValue:a(c),"onUpdate:modelValue":_[0]||(_[0]=N=>J(c)?c.value=N:null)},null,8,["modelValue"])])):T("",!0)]),footer:O(()=>[d("div",{class:"game-over-footer"},[d("button",{onClick:g,class:"button"},"Keep Going"),d("button",{onClick:b,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var Lo=j(xo,[["__scopeId","data-v-4a50ce42"]]);const Ft=e=>(Me("data-v-3de07c06"),e=e(),$e(),e),qo=Ft(()=>d("div",{class:"nan-modal-header"},[d("h2",null,"NaN value detected!")],-1)),Ao={key:0},Bo=Ft(()=>d("br",null,null,-1)),Ro=["href"],Uo=Ft(()=>d("span",{class:"material-icons nan-modal-discord"},"discord",-1)),jo=Ft(()=>d("br",null,null,-1)),Go={class:"nan-footer"},Wo=q({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:n}=R,s=Se(M,"autosave"),i=Se(G,"hasNaN"),r=E(null),l=P(()=>{var _;return(_=G.NaNPath)==null?void 0:_.join(".")}),o=P(()=>{var _;return(_=G.NaNPath)==null?void 0:_.slice(-1)[0]}),u=P(()=>G.NaNReceiver&&o.value?G.NaNReceiver[o.value]:null),c=P({get(){return M.devSpeed===0},set(_){M.devSpeed=_?null:0}});function g(){G.NaNReceiver&&o.value&&(G.NaNReceiver[o.value]=new h(0),G.hasNaN=!1)}function b(){G.NaNReceiver&&o.value&&(G.NaNReceiver[o.value]=new h(1),G.hasNaN=!1)}function p(){G.NaNReceiver&&o.value&&(G.NaNReceiver[o.value]=new h(NaN),G.hasNaN=!1)}return(_,w)=>(v(),k(Y,null,[m(qe,lt({modelValue:a(i),"onUpdate:modelValue":w[4]||(w[4]=N=>J(i)?i.value=N:null)},_.$attrs),{header:O(()=>[qo]),body:O(()=>[d("div",null,[C(' Attempted to assign "'+L(a(l))+'" to NaN',1),a(u)?(v(),k("span",Ao,L(" ")+"(previously "+L(a(re)(a(u)))+")",1)):T("",!0),C(". Auto-saving has been "+L(a(s)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),Bo,d("div",null,[d("a",{href:a(n),class:"nan-modal-discord-link"},[Uo,C(" "+L(a(t)),1)],8,Ro)]),jo,m(Ee,{title:"Autosave",modelValue:a(s),"onUpdate:modelValue":w[0]||(w[0]=N=>J(s)?s.value=N:null)},null,8,["modelValue"]),a(R).enablePausing?(v(),A(Ee,{key:0,title:"Pause game",modelValue:a(c),"onUpdate:modelValue":w[1]||(w[1]=N=>J(c)?c.value=N:null)},null,8,["modelValue"])):T("",!0)]),footer:O(()=>[d("div",Go,[d("button",{onClick:w[2]||(w[2]=N=>{var F;return(F=r.value)==null?void 0:F.open()}),class:"button"},"Open Saves Manager"),d("button",{onClick:g,class:"button"},"Set to 0"),d("button",{onClick:b,class:"button"},"Set to 1"),a(u)&&a(h).neq(a(u),0)&&a(h).neq(a(u),1)?(v(),k("button",{key:0,onClick:w[3]||(w[3]=N=>i.value=!1),class:"button"}," Set to previous ")):T("",!0),d("button",{onClick:p,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),m(Hn,{ref_key:"savesManager",ref:r},null,512)],64))}});var Ho=j(Wo,[["__scopeId","data-v-3de07c06"]]);const zo={key:0,class:"tpsDisplay"},Ko={key:0,class:"low"},Yo=q({__name:"TPS",setup(e){const t=P(()=>h.div(G.lastTenTicks.length,G.lastTenTicks.reduce((r,l)=>r+l,0))),n=E([]);nt(()=>{n.value.push(Math.round(t.value.toNumber())),n.value.length>10&&(n.value=n.value.slice(1))});const s=P(()=>n.value.reduce((r,l)=>h.max(r,l),0)),i=P(()=>h.sub(t.value,s.value).gt(1));return(r,l)=>a(t).isNan()?T("",!0):(v(),k("div",zo,[C(" TPS: "+L(a(Ge)(a(t)))+" ",1),m($t,{name:"fade"},{default:O(()=>[a(i)?(v(),k("span",Ko,L(a(Ge)(a(s))),1)):T("",!0)]),_:1})]))}});var Zo=j(Yo,[["__scopeId","data-v-46a3ed5b"]]);var Jo=q({__name:"App",setup(e){const t=R.useHeader,n=P(()=>It[Z.theme].variables),s=Se(Z,"showTPS"),i=P(()=>z(H(()=>m(Y,null,[pi.map(et)]))));return(r,l)=>(v(),k(Y,null,[d("div",{id:"modal-root",style:Q(a(n))},null,4),d("div",{class:X(["app",{useHeader:a(t)}]),style:Q(a(n))},[a(t)?(v(),A(zn,{key:0})):T("",!0),m(Mo),a(a(s))?(v(),A(Zo,{key:1})):T("",!0),m(Lo),m(Ho),(v(),A(te(a(i))))],6)],64))}});var Xo=j(Jo,[["__scopeId","data-v-7c41425b"]]);se.on("setupVue",e=>e.use(ls));function Qo(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:s,onRegistered:i,onRegisterError:r}=e;let l,o;const u=async(c=!0)=>{c&&(l==null||l.addEventListener("controlling",g=>{g.isUpdate&&window.location.reload()})),o&&o.waiting&&await ds(o.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){l=new cs("./sw.js",{scope:"./",type:"classic"}),l.addEventListener("activated",c=>{c.isUpdate||s==null||s()});{const c=()=>{n==null||n()};l.addEventListener("waiting",c),l.addEventListener("externalwaiting",c)}l.register({immediate:t}).then(c=>{o=c,i==null||i(c)}).catch(c=>{r==null||r(c)})}return u}function el(e={}){const{immediate:t=!0,onNeedRefresh:n,onOfflineReady:s,onRegistered:i,onRegisterError:r}=e,l=E(!1),o=E(!1);return{updateServiceWorker:Qo({immediate:t,onNeedRefresh(){l.value=!0,n==null||n()},onOfflineReady(){o.value=!0,s==null||s()},onRegistered:i,onRegisterError:r}),offlineReady:o,needRefresh:l}}document.title=R.title;window.projInfo=R;if(R.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 ci();const{globalBus:e,startGameLoop:t}=await Nt(()=>Promise.resolve().then(function(){return ui}),void 0),n=window.vue=ss(Xo);e.emit("setupVue",n),n.mount("#app"),xe(()=>{const s=us(),{updateServiceWorker:i}=el({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(r){r&&setInterval(r.update,60*60*1e3)}})}),t()}); diff --git a/index.html b/index.html index 9ac799a..8c79e63 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ Profectus - + diff --git a/sw.js b/sw.js index e3e2aad..af41002 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/index.7a650896.css",revision:null},{url:"assets/index.87a086c7.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:"3a9d07ee831d5776518dfd277106f727"},{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/index.25ba1026.js",revision:null},{url:"assets/index.7a650896.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:"a0ec83c4b6dbf600b4bab10487e0327d"},{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")))}));