diff --git a/assets/index.34e0c268.js b/assets/index.45c2db42.js similarity index 77% rename from assets/index.34e0c268.js rename to assets/index.45c2db42.js index 50c51b8..cf47f6e 100644 --- a/assets/index.34e0c268.js +++ b/assets/index.45c2db42.js @@ -9,7 +9,7 @@ Created at: Created at: `+i[St])}),Xe[e.id].clear()});const Kt=Symbol("RegisterNode"),Yt=Symbol("UnregisterNode"),En=Symbol("Nodes"),Vn=Symbol("Bounds"),ee=jt({});window.layers=ee;const Xe={},me=[];function Zt(e,t){return Ce(()=>{const n={},s=n.emitter=Nn();if(n.on=s.on.bind(s),n.emit=s.emit.bind(s),n.nodes=E({}),n.id=e,me.push(e),Xe[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,ie.emit("addLayer",e,t.layers[e.id])}function Oi(e){return ee[e]}function Ln(e){console.info("Removing layer",e.id),ie.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)}))}}ie.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:Xe,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 g(),k("div",Li,"!")}var gn=G(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=A({__name:"Day",props:{day:null,symbol:null,opened:null,shouldNotify:null},emits:["openLore","openLayer","unlockLayer"],setup(e,{emit:t}){const n=e,s=zt(Se(n,"symbol")),i=P(()=>h.gte(ne.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?(g(),k("div",Ai,[m(Mt,{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)?(g(),k("div",Hi,[(g(),q(te(a(s))))])):T("",!0),d("div",{class:"lore",onClick:o[1]||(o[1]=u=>t("openLore"))},"?"),a(e.shouldNotify)?(g(),q(gn,{key:1})):T("",!0)])):(g(),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):(g(),k("div",Ji,"lock")),a(i)?(g(),q(gn,{key:1})):T("",!0)],2))}});var Qi=G(Xi,[["__scopeId","data-v-0aae340d"]]);const er={key:0},tr={key:0,class:"mark star"},nr=["src"],sr=A({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(g(),k("div",er,[e.mark===!0?(g(),k("div",tr)):(g(),k("img",{key:1,class:"mark",src:e.mark},null,8,nr))])):T("",!0)}});var Jt=G(sr,[["__scopeId","data-v-2207999f"]]);const ir=A({__name:"Node",props:{id:null},setup(e){const n=ae(e),s=un(Kt,()=>{}),i=un(Yt,()=>{}),r=Le(null),l=P(()=>r.value&&r.value.parentElement);return be([l,n.id],([o,u],[c,p])=>{c&&i(a(p)),o&&s(u,o)}),bn(()=>i(a(n.id))),(o,u)=>(g(),k("div",{class:"node",ref_key:"node",ref:r},null,512))}});var Xt=G(ir,[["__scopeId","data-v-a48cb382"]]);const rr=A({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:se(n)+.5+"px",height:se(s)+.5+"px"};switch(a(i)){case B.Up:c.clipPath=`inset(${l.value}% 0% 0% 0%)`,c.width=se(n)+1+"px";break;case B.Down:c.clipPath=`inset(0% 0% ${l.value}% 0%)`,c.width=se(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=mt(r);return{normalizedProgress:l,barStyle:o,component:u,unref:a,Visibility:Ne}}});function ar(e,t,n,s,i,r){var u,c,p,b,v,_,N;const l=He("MarkNode"),o=He("Node");return e.unref(e.visibility)!==e.Visibility.None?(g(),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?(g(),k("span",{key:0,class:"overlayText",style:Q(e.unref(e.textStyle))},[(g(),q(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"},(p=e.unref(e.style))!=null?p:{},(b=e.unref(e.baseStyle))!=null?b:{},(v=e.unref(e.borderStyle))!=null?v:{}])},[d("div",{class:"fill",style:Q([e.barStyle,(_=e.unref(e.style))!=null?_:{},(N=e.unref(e.fillStyle))!=null?N:{}])},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=G(rr,[["render",ar],["__scopeId","data-v-02d0d7b2"]]);const lr=Symbol("Bar");function yn(e){return Ce(()=>{const t=e();return t.id=Ct("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[_e]=function(){const{progress:n,width:s,height:i,direction:r,display:l,visibility:o,style:u,classes:c,borderStyle:p,textStyle:b,baseStyle:v,fillStyle:_,mark:N,id:w}=this;return{progress:n,width:s,height:i,direction:r,display:l,visibility:o,style:a(u),classes:c,borderStyle:p,textStyle:b,baseStyle:v,fillStyle:_,mark:N,id:w}},t})}var ur=A({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("");tt(()=>{const o=se(t);if(o==null){i.value="";return}if(ft(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}=_i(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?(g(),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)?(g(),q(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=G(ur,[["render",cr],["__scopeId","data-v-8cedd7da"]]);const dr=Symbol("Buyable");function Lt(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=Ct("buyable-"),n.type=dr,n[ve]=qn,n.amount=t,n.amount[kt]=(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 p;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)),(p=u.onPurchase)==null||p.call(u,c)},I(n,"display");const i=n.display;return n.display=H(()=>{const u=a(i);if(ft(u)){const c=z(u);return m(c,null,null)}if(u!=null&&n.cost!=null&&n.resource!=null){const c=n,p=z(u.title||"","h3"),b=z(u.description||""),v=z(u.effectDisplay||"");return m("span",null,[u.title?m("div",null,[m(p,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(v,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[_e]=function(){const{display:u,visibility:c,style:p,classes:b,onClick:v,canClick:_,small:N,mark:w,id:F}=this;return{display:u,visibility:c,style:a(p),classes:b,onClick:v,canClick:_,small:N,mark:w,id:F}},n})}const fr=Symbol("Clickable");function vn(e){return Ce(()=>{var n;const t=(n=e==null?void 0:e())!=null?n:{};if(t.id=Ct("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[_e]=function(){const{display:s,visibility:i,style:r,classes:l,onClick:o,onHold:u,isHolding:c,canClick:p,small:b,mark:v,id:_}=this;return{display:s,visibility:i,style:a(r),classes:l,onClick:o,onHold:u,isHolding:c,canClick:p,small:b,mark:v,id:_}},t})}const mr=A({__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),Gt(()=>{var l;const r=(l=s.value)==null?void 0:l.parentElement;r&&n.observe(r)}),(r,l)=>(g(),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=G(mr,[["__scopeId","data-v-cccac690"]]);function qt(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 be(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=A({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,n=P(()=>An(t.resource));return(s,i)=>(g(),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},_r={key:1},br=C(", "),At=A({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null},setup(e){const n=ae(e),s=E(null),i=mt(n.effectDisplay),r=P(()=>h.lt(n.resource.value,"1e1000"));return(l,o)=>(g(),q(hr,null,{default:O(()=>{var u,c,p,b;return[d("div",{class:X(["main-display-container",(u=e.classes)!=null?u:{}]),style:Q([{height:`${((p=(c=s.value)==null?void 0:c.$el.clientHeight)!=null?p:0)+50}px`},(b=e.style)!=null?b:{}])},[d("div",yr,[a(r)?(g(),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)?(g(),k("span",_r,[br,(g(),q(te(a(i)),{ref_key:"effectRef",ref:s},null,512))])):T("",!0)])],6)]}),_:1}))}});var Nr=A({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(()=>(se(s)||i.value)&&l.value),l=mt(n),o=Le(z(H(()=>{const p=se(t);return p==null?"":et(p)})));function u(p){const b=s;p.shiftKey&&b&&(b.value=!b.value,p.stopPropagation(),p.preventDefault())}const c=P(()=>se(s)&&Pt[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 g(),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?(g(),q(te(e.elementComp),{key:0})):T("",!0),m(Mt,{name:"fade"},{default:O(()=>{var l;return[e.isShown?(g(),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?(g(),k("span",wr,"push_pin")):T("",!0),e.comp?(g(),q(te(e.comp),{key:1})):T("",!0)],6)):T("",!0)]}),_:1})],34)}var W=G(Nr,[["render",kr],["__scopeId","data-v-6102fa3a"]]);function _n(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[_e].bind(e);e[_e]=function(){const{display:r,classes:l,style:o,direction:u,xoffset:c,yoffset:p,pinned:b}=this;return{element:{[ve]:n,[_e]:s},display:r,classes:l,style:a(o),direction:u,xoffset:c,yoffset:p,pinned:b}}.bind(t)}),t}var Sr=A({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 tt(()=>{const i=se(t);if(i==null){s.value="";return}if(ft(i)){s.value=z(i);return}const r=se(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?(g(),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)?(g(),q(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=G(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=Ct("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[_e]=function(){const{display:s,visibility:i,style:r,classes:l,resource:o,cost:u,canPurchase:c,bought:p,mark:b,id:v,purchase:_}=this;return{display:s,visibility:i,style:a(r),classes:l,resource:o,cost:u,canPurchase:c,bought:p,mark:b,id:v,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"},[et(a(r))]):null]))}})}function vt(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"},[et(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(et)]))}})}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"},[et(r)])]),et(a(n.description)),m("hr",null,null),C("Total: "),re(n.apply(s)),i])}const Tr="trees",Ir=Zt(Tr,function(){const e="Trees",t="#4BDC13",n=qt(0,"logs"),s=pr(n),i=qt(10,"trees"),r=qt(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"}})),p=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,p],v=ye(()=>({resource:n,cost:100,visibility:()=>Oe(p.bought.value),display:{title:"Sharper Fingers",description:"Cut trees twice as fast"}})),_=ye(()=>({resource:n,cost:100,visibility:()=>Oe(p.bought.value),display:{title:"Greener Fingers",description:"Plant trees twice as fast"}})),N=ye(()=>({resource:n,cost:300,visibility:()=>Oe(p.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),w=ye(()=>({resource:n,cost:300,visibility:()=>Oe(p.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(p.bought.value),display:{title:"Research II",description:"Get 25% more logs from each tree cut down and unlock repeatable purchases"}})),Te=[v,_,N,w,F],S=Lt(()=>({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)})),$=Lt(()=>({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=Lt(()=>({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],Ie=Re(()=>[De(()=>({addend:1,description:"Wooden Fingers",enabled:l.bought})),De(()=>({addend:pt,description:"Smart Knives",enabled:N.bought}))]),Ft=P(()=>Ie.apply(1)),tn=Re(()=>[vt(()=>({multiplier:.5,description:"Sharper Fingers",enabled:v.bought}))]),ze=P(()=>tn.apply(1)),nn=Re(()=>[De(()=>({addend:1,description:"Automated Knives",enabled:u.bought})),De(()=>({addend:S.amount,description:"Generic Cutters",enabled:F.bought}))]),pt=P(()=>nn.apply(0)),sn=Re(()=>[De(()=>({addend:1,description:"Leafy Fingers",enabled:o.bought})),De(()=>({addend:gt,description:"Smart Spades",enabled:w.bought}))]),Ot=P(()=>sn.apply(1)),rn=Re(()=>[vt(()=>({multiplier:.5,description:"Greener Fingers",enabled:_.bought}))]),Ke=P(()=>rn.apply(1)),an=Re(()=>[De(()=>({addend:1,description:"Automated Spade",enabled:c.bought})),De(()=>({addend:()=>h.div($.amount.value,2),description:"Generic Planters",enabled:F.bought}))]),gt=P(()=>an.apply(0)),Dt=Re(()=>[vt(()=>({multiplier:1.25,description:"Research I",enabled:p.bought})),vt(()=>({multiplier:1.25,description:"Research II",enabled:F.bought}))]),pe=we(0),Kn=yn(()=>({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,ze.value)})),nt=vn(()=>({display:{title:"Cut trees",description:H(()=>m(Y,null,[C("Cut down up to "),re(Ft.value,1),C(" tree"),h.eq(Ft.value,1)?"":"s",C(" at once!"),m("br",null,null),Qe(Kn)]))},style:{minHeight:"80px"},canClick:()=>h.gt(i.value,0)&&h.gte(pe.value,ze.value),onClick(){if(h.lt(pe.value,ze.value))return;const de=h.min(i.value,h.times(Ft.value,h.div(pe.value,ze.value).floor()));i.value=h.sub(i.value,de),n.value=h.add(n.value,Dt.apply(de)),r.value=h.add(r.value,de),pe.value=0}}));_n(nt,{display:H(()=>pn([Ue("Trees","",Ie,1,"/click"),Ue("Cooldown","",tn,1,"s")],m("br",null,null))),direction:B.Down,style:"width: 400px; text-align: left"});const ge=we(0),Yn=yn(()=>({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,Ke.value)})),st=vn(()=>({display:{title:"Plant trees",description:H(()=>m(Y,null,[C("Plant up to "),re(Ot.value,1),C(" tree"),h.eq(Ot.value,1)?"":"s",C(" at once!"),m("br",null,null),Qe(Yn)]))},style:{minHeight:"80px"},canClick:()=>h.gt(r.value,0)&&h.gte(ge.value,Ke.value),onClick(){if(h.lt(ge.value,Ke.value))return;const de=h.min(r.value,h.times(Ot.value,h.div(ge.value,Ke.value).floor()));i.value=h.add(i.value,de),r.value=h.sub(r.value,de),ge.value=0}}));return _n(st,{display:H(()=>pn([Ue("Trees","",sn,1,"/click"),Ue("Cooldown","",rn,1,"s")],m("br",null,null))),direction:B.Down,style:"width: 400px; text-align: left"}),ie.on("update",de=>{if(h.lt(ne.day.value,1))return;h.gte(pe.value,ze.value)?pe.value=ze.value:(pe.value=h.add(pe.value,de),nt.isHolding.value&&nt.onClick()),h.gte(ge.value,Ke.value)?ge.value=Ke.value:(ge.value=h.add(ge.value,de),st.isHolding.value&&st.onClick());const Et=h.min(i.value,h.times(pt.value,de));i.value=h.sub(i.value,Et),n.value=h.add(n.value,Dt.apply(Et)),r.value=h.add(r.value,Et);const on=h.min(r.value,h.times(gt.value,de));i.value=h.add(i.value,on),r.value=h.sub(r.value,on)}),tt(()=>{ne.day.value===1&&h.gte(s.value,1e4)&&(ne.loreTitle.value="Day complete!",ne.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!",ne.day.value=2,ne.minimized.value=!1)}),{name:e,color:t,logs:n,totalLogs:s,trees:i,saplings:r,cutTree:nt,plantTree:st,row1Upgrades:b,row2Upgrades:Te,row1Buyables:ce,manualCutProgress:pe,manualPlantProgress:ge,minWidth:700,display:H(()=>m(Y,null,[m(W,{display:H(()=>Ue("Log Gain","",Dt)),direction:B.Down,style:"width: 400px; text-align: left"},{default:()=>[m(At,{resource:n,color:t,style:"margin-bottom: 0"},null)]}),m(At,{resource:r,color:"green",style:"margin-bottom: 0"},null),m(At,{resource:i,color:"green",style:"margin-bottom: 0"},null),m("br",null,null),h.gt(pt.value,0)?m(Y,null,[m(W,{display:H(()=>Ue("Trees","",nn,0,"/s")),direction:B.Down,style:"width: 400px; text-align: left"},{default:()=>[C("You cut down "),re(pt.value),C(" trees/s")]}),m("br",null,null)]):null,h.gt(gt.value,0)?m(Y,null,[m(W,{display:H(()=>Ue("Trees","",an,0,"/s")),direction:B.Down,style:"width: 400px; text-align: left"},{default:()=>[C("You plant "),re(gt.value),C(" trees/s")]}),m("br",null,null)]):null,m(Rt,null,null),rt(nt,st),m("div",null,[C("Tip: You can hold down on actions to perform them automatically")]),m(Rt,null,null),rt(...b),rt(...Te),rt(...ce)]))}}),ne=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,[_e]:function(){const{day:c,layer:p,symbol:b,opened:v,shouldNotify:_,story:N}=this;return{day:c,symbol:b,opened:v,shouldNotify:_,onOpenLore(){var w,F;t.value=a((F=(w=ee[p!=null?p:"trees"])==null?void 0:w.name)!=null?F:""),n.value=N},onOpenLayer(){if(M.tabs.includes(p!=null?p:"trees")){const w=M.tabs.lastIndexOf(p!=null?p:"trees");M.tabs.splice(w,1)}else M.tabs.push(p!=null?p:"trees")},onUnlockLayer(){v.value=!0,setTimeout(()=>{var w,F;t.value=a((F=(w=ee[p!=null?p:"trees"])==null?void 0:w.name)!=null?F:""),n.value=N},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: "),$t(M.offlineTime)]):null,m(Rt,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=>rt(...r))])]))}}),Fr=e=>[ne,Ir],Bn=P(()=>!1);function Or(e,t){}var Rn=Object.freeze(Object.defineProperty({__proto__:null,main:ne,getInitialLayers:Fr,hasWon:Bn,fixOldSave:Or},Symbol.toStringTag,{value:"Module"}));const Dr=A({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=zt(t),o=P(()=>R.allowGoBack&&n.value>0&&!s.value);function u(){M.tabs.splice(a(e.index),1/0)}xe(()=>p(s.value,a(i.value))),be([s,bi(i)],([b,v])=>p(b,v));function c(b){e.nodes.value=b}function p(b,v){const _=typeof v=="number"||Number.isNaN(parseInt(v))?v+"px":v,N=r.value();N!=null&&(b?(N.style.flexGrow="0",N.style.flexShrink="0",N.style.width="60px",N.style.minWidth=N.style.flexBasis="",N.style.margin="0"):(N.style.flexGrow="",N.style.flexShrink="",N.style.width="",N.style.minWidth=N.style.flexBasis=_,N.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 g(),k("div",{class:"layer-container",style:Q({"--layer-color":e.unref(e.color)})},[e.showGoBack?(g(),k("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...o)=>e.goBack&&e.goBack(...o))},"\u274C")):T("",!0),e.minimized.value?(g(),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)])):(g(),k("div",{key:2,class:X(["layer-tab",{showGoBack:e.showGoBack}])},[m(l,{onUpdateNodes:e.updateNodes},{default:O(()=>[(g(),q(te(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(g(),k("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=o=>e.minimized.value=!0)}," \u25BC ")):T("",!0)],4)}var Vr=G(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=A({__name:"Changelog",setup(e,{expose:t}){const n=E(!1);return t({open(){n.value=!0}}),(s,i)=>(g(),q(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=G(qr,[["__scopeId","data-v-4b4bda40"]]);const Br={class:"info-modal-header"},Rr=["src","alt"],Ur={class:"info-modal-title"},jr={key:0},Gr={key:0},Wr={key:0},Hr=d("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1),zr=d("br",null,null,-1),Kr=d("br",null,null,-1),Yr=["href"],Zr=d("span",{class:"material-icons info-modal-discord"},"discord",-1),Jr=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=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=d("br",null,null,-1);var ea=A({__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,p=ae(n),b=E(!1),v=P(()=>$t(M.timePlayed)),_=P(()=>z(H(()=>m(Y,null,[hi.map(Qe)]))));t({open(){b.value=!0}});function N(){var w;(w=a(p.changelog))==null||w.open()}return(w,F)=>(g(),q(qe,{modelValue:b.value,"onUpdate:modelValue":F[0]||(F[0]=Te=>b.value=Te)},{header:O(()=>[d("div",Br,[a(i)?(g(),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)?(g(),k("span",jr,": "+L(a(c)),1)):T("",!0)])])])]),body:O(({shown:Te})=>[Te?(g(),k("div",Gr,[a(r)?(g(),k("div",Wr,"By "+L(a(r)),1)):T("",!0),Hr,zr,d("div",{class:"link",onClick:N},"Changelog"),Kr,d("div",null,[a(o)?(g(),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(v)),1),(g(),q(te(a(_))))])):T("",!0)]),_:1},8,["modelValue"]))}});const ta={class:"field"},na={key:0,class:"field-title"},jn=A({__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=mt(Se(n,"title"),"span"),i=E((l=n.options.find(o=>o.value===n.modelValue))!=null?l:null);be(Se(n,"modelValue"),o=>{var u;se(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)=>(g(),k("div",ta,[a(s)?(g(),k("span",na,[(g(),q(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 sa={class:"field"},ia=A({__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)=>(g(),k("label",sa,[Wt(d("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":l[0]||(l[0]=o=>J(i)?i.value=o:null)},null,512),[[es,a(i)]]),(g(),q(te(a(s))))]))}});var Ee=G(ia,[["__scopeId","data-v-2b109500"]]);const Gn=e=>(Me("data-v-bc13791c"),e=e(),$e(),e),ra=Gn(()=>d("div",{class:"header"},[d("h2",null,"Options")],-1)),aa=Gn(()=>d("hr",null,null,-1));var oa=A({__name:"Options",setup(e,{expose:t}){const n=E(!1);t({open(){n.value=!0}});const s=Object.keys(Pt).map(N=>({label:ai(N),value:N})),i=P(()=>z(H(()=>m(Y,null,[mi.map(Qe)])))),{showTPS:r,theme:l,unthrottled:o}=ae(Z),{autosave:u,offlineProd:c}=ae(M),p=P({get(){return M.devSpeed===0},set(N){M.devSpeed=N?0:null}}),b=H(()=>m("span",null,[C("Offline Production"),m(W,{display:"Save-specific"},{default:()=>[C("*")]})])),v=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(N,w)=>(g(),q(qe,{modelValue:n.value,"onUpdate:modelValue":w[6]||(w[6]=F=>n.value=F)},{header:O(()=>[ra]),body:O(()=>[m(jn,{title:"Theme",options:a(s),modelValue:a(l),"onUpdate:modelValue":w[0]||(w[0]=F=>J(l)?l.value=F:null)},null,8,["options","modelValue"]),(g(),q(te(a(i)))),m(Ee,{title:"Show TPS",modelValue:a(r),"onUpdate:modelValue":w[1]||(w[1]=F=>J(r)?r.value=F:null)},null,8,["modelValue"]),aa,m(Ee,{title:"Unthrottled",modelValue:a(o),"onUpdate:modelValue":w[2]||(w[2]=F=>J(o)?o.value=F:null)},null,8,["modelValue"]),m(Ee,{title:a(b),modelValue:a(c),"onUpdate:modelValue":w[3]||(w[3]=F=>J(c)?c.value=F:null)},null,8,["title","modelValue"]),m(Ee,{title:a(v),modelValue:a(u),"onUpdate:modelValue":w[4]||(w[4]=F=>J(u)?u.value=F:null)},null,8,["title","modelValue"]),a(R).enablePausing?(g(),q(Ee,{key:0,title:a(_),modelValue:a(p),"onUpdate:modelValue":w[5]||(w[5]=F=>J(p)?p.value=F:null)},null,8,["title","modelValue"])):T("",!0)]),_:1},8,["modelValue"]))}});var la=G(oa,[["__scopeId","data-v-bc13791c"]]);const ua=["onSubmit"],ca={class:"field"},da={key:0,class:"field-title"},fa=["placeholder"],ma=A({__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=mt(Se(n,"title"),"span"),i=Le(null);Gt(()=>{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)=>(g(),k("form",{onSubmit:lt(l,["prevent"])},[d("div",ca,[a(s)?(g(),k("span",da,[(g(),q(te(a(s))))])):T("",!0),e.textArea?(g(),q(a(os),{key:1,modelValue:a(r),"onUpdate:modelValue":c[0]||(c[0]=p=>J(r)?r.value=p:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:o,ref_key:"field",ref:i},null,8,["modelValue","placeholder","maxHeight"])):Wt((g(),k("input",{key:2,type:"text","onUpdate:modelValue":c[1]||(c[1]=p=>J(r)?r.value=p:null),placeholder:e.placeholder,class:X({fullWidth:!e.title}),onBlur:o,ref_key:"field",ref:i},null,42,fa)),[[ts,a(r)]])])],40,ua))}});var Wn=G(ma,[["__scopeId","data-v-67b44a54"]]);const ha={key:0},pa=["onClick","disabled"],ga={key:0},ya=["onClick"],va=A({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const s=ae(e),i=E(!1);be(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)=>(g(),k("span",{class:X(["container",{confirming:i.value}])},[i.value?(g(),k("span",ha,"Are you sure?")):T("",!0),d("button",{onClick:lt(r,["stop"]),class:"button danger",disabled:e.disabled},[i.value?(g(),k("span",ga,"Yes")):ke(o.$slots,"default",{key:1},void 0,!0)],8,pa),i.value?(g(),k("button",{key:1,class:"button",onClick:lt(l,["stop"])},"No",8,ya)):T("",!0)],2))}});var _a=G(va,[["__scopeId","data-v-2f8ef34c"]]);const ba=["onClick"],Na=A({__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)=>(g(),k("button",{onClick:lt(i,["stop"]),class:X(["feedback",{activated:n.value,left:e.left}])},[ke(r.$slots,"default",{},void 0,!0)],10,ba))}});var wa=G(Na,[["__scopeId","data-v-01a1b95c"]]);const Pe=e=>(Me("data-v-5285ac49"),e=e(),$e(),e),ka=Pe(()=>d("div",{class:"handle material-icons"},"drag_handle",-1)),Sa={key:0,class:"actions"},Ma=Pe(()=>d("span",{class:"material-icons"},"content_paste",-1)),$a=Pe(()=>d("span",{class:"material-icons"},"content_copy",-1)),Ca=Pe(()=>d("span",{class:"material-icons"},"edit",-1)),Pa=Pe(()=>d("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),Ta={key:1,class:"actions"},Ia=Pe(()=>d("span",{class:"material-icons"},"check",-1)),Fa=Pe(()=>d("span",{class:"material-icons"},"close",-1)),Oa={key:2,class:"details"},Da={class:"save-version"},Ea=Pe(()=>d("br",null,null,-1)),Va={key:0},xa={key:1},La={key:3,class:"details"},qa={key:4,class:"details error"},Aa=Pe(()=>d("br",null,null,-1)),Ba=A({__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("");be(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),p=zt(P(()=>{var v,_,N,w;return`Day ${(w=(N=(_=(v=s.value)==null?void 0:v.layers)==null?void 0:_.main)==null?void 0:N.day)!=null?w:1}`}));function b(){t("editName",o.value),r.value=!1}return(v,_)=>(g(),k("div",{class:X(["save",{active:a(u)}])},[ka,r.value?(g(),k("div",Ta,[d("button",{onClick:b,class:"button"},[m(W,{display:"Save",direction:a(B).Left,class:"info"},{default:O(()=>[Ia]),_:1},8,["direction"])]),d("button",{onClick:_[5]||(_[5]=N=>r.value=!r.value),class:"button"},[m(W,{display:"Cancel",direction:a(B).Left,class:"info"},{default:O(()=>[Fa]),_:1},8,["direction"])])])):(g(),k("div",Sa,[a(s).error==null&&!l.value?(g(),q(wa,{key:0,onClick:_[0]||(_[0]=N=>t("export")),class:"button",left:""},{default:O(()=>[m(W,{display:"Export",direction:a(B).Left,class:"info"},{default:O(()=>[Ma]),_:1},8,["direction"])]),_:1})):T("",!0),a(s).error==null&&!l.value?(g(),k("button",{key:1,onClick:_[1]||(_[1]=N=>t("duplicate")),class:"button"},[m(W,{display:"Duplicate",direction:a(B).Left,class:"info"},{default:O(()=>[$a]),_:1},8,["direction"])])):T("",!0),a(s).error==null&&!l.value?(g(),k("button",{key:2,onClick:_[2]||(_[2]=N=>r.value=!r.value),class:"button"},[m(W,{display:"Edit Name",direction:a(B).Left,class:"info"},{default:O(()=>[Ca]),_:1},8,["direction"])])):T("",!0),m(_a,{disabled:a(u),onClick:_[3]||(_[3]=N=>t("delete")),onConfirmingChanged:_[4]||(_[4]=N=>l.value=N)},{default:O(()=>[m(W,{display:"Delete",direction:a(B).Left,class:"info"},{default:O(()=>[Pa]),_:1},8,["direction"])]),_:1},8,["disabled"])])),a(s).error==null&&!r.value?(g(),k("div",Oa,[d("button",{class:"button open",onClick:_[6]||(_[6]=N=>t("open"))},[d("h3",null,L(a(s).name),1)]),d("span",Da,"v"+L(a(s).modVersion),1),Ea,a(c)?(g(),k("div",Va,"Last played "+L(a(i).format(a(c))),1)):T("",!0),a(p)?(g(),k("div",xa,[(g(),q(te(a(p))))])):T("",!0)])):a(s).error==null&&r.value?(g(),k("div",La,[m(Wn,{modelValue:o.value,"onUpdate:modelValue":_[7]||(_[7]=N=>o.value=N),class:"editname",onSubmit:b},null,8,["modelValue"])])):(g(),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=G(Ba,[["__scopeId","data-v-5285ac49"]]);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=A({__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);be(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=jt({});function p(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,ie.emit("addLayer",e,t.layers[e.id])}function Oi(e){return ee[e]}function Ln(e){console.info("Removing layer",e.id),ie.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)}))}}ie.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:Xe,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 g(),k("div",Li,"!")}var gn=G(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=A({__name:"Day",props:{day:null,symbol:null,opened:null,shouldNotify:null},emits:["openLore","openLayer","unlockLayer"],setup(e,{emit:t}){const n=e,s=zt(Se(n,"symbol")),i=P(()=>h.gte(ne.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?(g(),k("div",Ai,[m(Mt,{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)?(g(),k("div",Hi,[(g(),q(te(a(s))))])):T("",!0),d("div",{class:"lore",onClick:o[1]||(o[1]=u=>t("openLore"))},"?"),a(e.shouldNotify)?(g(),q(gn,{key:1})):T("",!0)])):(g(),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):(g(),k("div",Ji,"lock")),a(i)?(g(),q(gn,{key:1})):T("",!0)],2))}});var Qi=G(Xi,[["__scopeId","data-v-0aae340d"]]);const er={key:0},tr={key:0,class:"mark star"},nr=["src"],sr=A({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(g(),k("div",er,[e.mark===!0?(g(),k("div",tr)):(g(),k("img",{key:1,class:"mark",src:e.mark},null,8,nr))])):T("",!0)}});var Jt=G(sr,[["__scopeId","data-v-2207999f"]]);const ir=A({__name:"Node",props:{id:null},setup(e){const n=ae(e),s=un(Kt,()=>{}),i=un(Yt,()=>{}),r=Le(null),l=P(()=>r.value&&r.value.parentElement);return be([l,n.id],([o,u],[c,p])=>{c&&i(a(p)),o&&s(u,o)}),bn(()=>i(a(n.id))),(o,u)=>(g(),k("div",{class:"node",ref_key:"node",ref:r},null,512))}});var Xt=G(ir,[["__scopeId","data-v-a48cb382"]]);const rr=A({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:se(n)+.5+"px",height:se(s)+.5+"px"};switch(a(i)){case B.Up:c.clipPath=`inset(${l.value}% 0% 0% 0%)`,c.width=se(n)+1+"px";break;case B.Down:c.clipPath=`inset(0% 0% ${l.value}% 0%)`,c.width=se(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=mt(r);return{normalizedProgress:l,barStyle:o,component:u,unref:a,Visibility:Ne}}});function ar(e,t,n,s,i,r){var u,c,p,b,v,_,N;const l=He("MarkNode"),o=He("Node");return e.unref(e.visibility)!==e.Visibility.None?(g(),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?(g(),k("span",{key:0,class:"overlayText",style:Q(e.unref(e.textStyle))},[(g(),q(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"},(p=e.unref(e.style))!=null?p:{},(b=e.unref(e.baseStyle))!=null?b:{},(v=e.unref(e.borderStyle))!=null?v:{}])},[d("div",{class:"fill",style:Q([e.barStyle,(_=e.unref(e.style))!=null?_:{},(N=e.unref(e.fillStyle))!=null?N:{}])},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=G(rr,[["render",ar],["__scopeId","data-v-02d0d7b2"]]);const lr=Symbol("Bar");function yn(e){return Ce(()=>{const t=e();return t.id=Ct("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[_e]=function(){const{progress:n,width:s,height:i,direction:r,display:l,visibility:o,style:u,classes:c,borderStyle:p,textStyle:b,baseStyle:v,fillStyle:_,mark:N,id:w}=this;return{progress:n,width:s,height:i,direction:r,display:l,visibility:o,style:a(u),classes:c,borderStyle:p,textStyle:b,baseStyle:v,fillStyle:_,mark:N,id:w}},t})}var ur=A({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("");tt(()=>{const o=se(t);if(o==null){i.value="";return}if(ft(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}=_i(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?(g(),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)?(g(),q(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=G(ur,[["render",cr],["__scopeId","data-v-8cedd7da"]]);const dr=Symbol("Buyable");function Lt(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=Ct("buyable-"),n.type=dr,n[ve]=qn,n.amount=t,n.amount[kt]=(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 p;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)),(p=u.onPurchase)==null||p.call(u,c)},I(n,"display");const i=n.display;return n.display=H(()=>{const u=a(i);if(ft(u)){const c=z(u);return m(c,null,null)}if(u!=null&&n.cost!=null&&n.resource!=null){const c=n,p=z(u.title||"","h3"),b=z(u.description||""),v=z(u.effectDisplay||"");return m("span",null,[u.title?m("div",null,[m(p,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(v,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[_e]=function(){const{display:u,visibility:c,style:p,classes:b,onClick:v,canClick:_,small:N,mark:w,id:F}=this;return{display:u,visibility:c,style:a(p),classes:b,onClick:v,canClick:_,small:N,mark:w,id:F}},n})}const fr=Symbol("Clickable");function vn(e){return Ce(()=>{var n;const t=(n=e==null?void 0:e())!=null?n:{};if(t.id=Ct("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[_e]=function(){const{display:s,visibility:i,style:r,classes:l,onClick:o,onHold:u,isHolding:c,canClick:p,small:b,mark:v,id:_}=this;return{display:s,visibility:i,style:a(r),classes:l,onClick:o,onHold:u,isHolding:c,canClick:p,small:b,mark:v,id:_}},t})}const mr=A({__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),Gt(()=>{var l;const r=(l=s.value)==null?void 0:l.parentElement;r&&n.observe(r)}),(r,l)=>(g(),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=G(mr,[["__scopeId","data-v-cccac690"]]);function qt(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 be(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=A({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,n=P(()=>An(t.resource));return(s,i)=>(g(),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},_r={key:1},br=C(", "),At=A({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null},setup(e){const n=ae(e),s=E(null),i=mt(n.effectDisplay),r=P(()=>h.lt(n.resource.value,"1e1000"));return(l,o)=>(g(),q(hr,null,{default:O(()=>{var u,c,p,b;return[d("div",{class:X(["main-display-container",(u=e.classes)!=null?u:{}]),style:Q([{height:`${((p=(c=s.value)==null?void 0:c.$el.clientHeight)!=null?p:0)+50}px`},(b=e.style)!=null?b:{}])},[d("div",yr,[a(r)?(g(),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)?(g(),k("span",_r,[br,(g(),q(te(a(i)),{ref_key:"effectRef",ref:s},null,512))])):T("",!0)])],6)]}),_:1}))}});var Nr=A({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(()=>(se(s)||i.value)&&l.value),l=mt(n),o=Le(z(H(()=>{const p=se(t);return p==null?"":et(p)})));function u(p){const b=s;p.shiftKey&&b&&(b.value=!b.value,p.stopPropagation(),p.preventDefault())}const c=P(()=>se(s)&&Pt[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 g(),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?(g(),q(te(e.elementComp),{key:0})):T("",!0),m(Mt,{name:"fade"},{default:O(()=>{var l;return[e.isShown?(g(),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?(g(),k("span",wr,"push_pin")):T("",!0),e.comp?(g(),q(te(e.comp),{key:1})):T("",!0)],6)):T("",!0)]}),_:1})],34)}var W=G(Nr,[["render",kr],["__scopeId","data-v-6102fa3a"]]);function _n(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[_e].bind(e);e[_e]=function(){const{display:r,classes:l,style:o,direction:u,xoffset:c,yoffset:p,pinned:b}=this;return{element:{[ve]:n,[_e]:s},display:r,classes:l,style:a(o),direction:u,xoffset:c,yoffset:p,pinned:b}}.bind(t)}),t}var Sr=A({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 tt(()=>{const i=se(t);if(i==null){s.value="";return}if(ft(i)){s.value=z(i);return}const r=se(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?(g(),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)?(g(),q(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=G(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=Ct("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[_e]=function(){const{display:s,visibility:i,style:r,classes:l,resource:o,cost:u,canPurchase:c,bought:p,mark:b,id:v,purchase:_}=this;return{display:s,visibility:i,style:a(r),classes:l,resource:o,cost:u,canPurchase:c,bought:p,mark:b,id:v,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"},[et(a(r))]):null]))}})}function vt(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"},[et(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(et)]))}})}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"},[et(r)])]),et(a(n.description)),m("hr",null,null),C("Total: "),re(n.apply(s)),i])}const Tr="trees",Ir=Zt(Tr,function(){const e="Trees",t="#4BDC13",n=qt(0,"logs"),s=pr(n),i=qt(10,"trees"),r=qt(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:5,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:10,display:{title:"Automated Spade",description:"Plant a tree every second"}})),p=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,p],v=ye(()=>({resource:n,cost:100,visibility:()=>Oe(p.bought.value),display:{title:"Sharper Fingers",description:"Cut trees twice as fast"}})),_=ye(()=>({resource:n,cost:100,visibility:()=>Oe(p.bought.value),display:{title:"Greener Fingers",description:"Plant trees twice as fast"}})),N=ye(()=>({resource:n,cost:300,visibility:()=>Oe(p.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),w=ye(()=>({resource:n,cost:300,visibility:()=>Oe(p.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(p.bought.value),display:{title:"Research II",description:"Get 25% more logs from each tree cut down and unlock repeatable purchases"}})),Te=[v,_,N,w,F],S=Lt(()=>({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)})),$=Lt(()=>({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=Lt(()=>({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],Ie=Re(()=>[De(()=>({addend:1,description:"Wooden Fingers",enabled:l.bought})),De(()=>({addend:pt,description:"Smart Knives",enabled:N.bought}))]),Ft=P(()=>Ie.apply(1)),tn=Re(()=>[vt(()=>({multiplier:.5,description:"Sharper Fingers",enabled:v.bought}))]),ze=P(()=>tn.apply(1)),nn=Re(()=>[De(()=>({addend:1,description:"Automated Knives",enabled:u.bought})),De(()=>({addend:S.amount,description:"Generic Cutters",enabled:F.bought}))]),pt=P(()=>nn.apply(0)),sn=Re(()=>[De(()=>({addend:1,description:"Leafy Fingers",enabled:o.bought})),De(()=>({addend:gt,description:"Smart Spades",enabled:w.bought}))]),Ot=P(()=>sn.apply(1)),rn=Re(()=>[vt(()=>({multiplier:.5,description:"Greener Fingers",enabled:_.bought}))]),Ke=P(()=>rn.apply(1)),an=Re(()=>[De(()=>({addend:1,description:"Automated Spade",enabled:c.bought})),De(()=>({addend:()=>h.div($.amount.value,2),description:"Generic Planters",enabled:F.bought}))]),gt=P(()=>an.apply(0)),Dt=Re(()=>[vt(()=>({multiplier:1.25,description:"Research I",enabled:p.bought})),vt(()=>({multiplier:1.25,description:"Research II",enabled:F.bought}))]),pe=we(0),Kn=yn(()=>({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,ze.value)})),nt=vn(()=>({display:{title:"Cut trees",description:H(()=>m(Y,null,[C("Cut down up to "),re(Ft.value,1),C(" tree"),h.eq(Ft.value,1)?"":"s",C(" at once!"),m("br",null,null),Qe(Kn)]))},style:{minHeight:"80px"},canClick:()=>h.gt(i.value,0)&&h.gte(pe.value,ze.value),onClick(){if(h.lt(pe.value,ze.value))return;const de=h.min(i.value,h.times(Ft.value,h.div(pe.value,ze.value).floor()));i.value=h.sub(i.value,de),n.value=h.add(n.value,Dt.apply(de)),r.value=h.add(r.value,de),pe.value=0}}));_n(nt,{display:H(()=>pn([Ue("Trees","",Ie,1,"/click"),Ue("Cooldown","",tn,1,"s")],m("br",null,null))),direction:B.Down,style:"width: 400px; text-align: left"});const ge=we(0),Yn=yn(()=>({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,Ke.value)})),st=vn(()=>({display:{title:"Plant trees",description:H(()=>m(Y,null,[C("Plant up to "),re(Ot.value,1),C(" tree"),h.eq(Ot.value,1)?"":"s",C(" at once!"),m("br",null,null),Qe(Yn)]))},style:{minHeight:"80px"},canClick:()=>h.gt(r.value,0)&&h.gte(ge.value,Ke.value),onClick(){if(h.lt(ge.value,Ke.value))return;const de=h.min(r.value,h.times(Ot.value,h.div(ge.value,Ke.value).floor()));i.value=h.add(i.value,de),r.value=h.sub(r.value,de),ge.value=0}}));return _n(st,{display:H(()=>pn([Ue("Trees","",sn,1,"/click"),Ue("Cooldown","",rn,1,"s")],m("br",null,null))),direction:B.Down,style:"width: 400px; text-align: left"}),ie.on("update",de=>{if(h.lt(ne.day.value,1))return;h.gte(pe.value,ze.value)?pe.value=ze.value:(pe.value=h.add(pe.value,de),nt.isHolding.value&&nt.onClick()),h.gte(ge.value,Ke.value)?ge.value=Ke.value:(ge.value=h.add(ge.value,de),st.isHolding.value&&st.onClick());const Et=h.min(i.value,h.times(pt.value,de));i.value=h.sub(i.value,Et),n.value=h.add(n.value,Dt.apply(Et)),r.value=h.add(r.value,Et);const on=h.min(r.value,h.times(gt.value,de));i.value=h.add(i.value,on),r.value=h.sub(r.value,on)}),tt(()=>{ne.day.value===1&&h.gte(s.value,1e4)&&(ne.loreTitle.value="Day complete!",ne.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!",ne.day.value=2,ne.minimized.value=!1)}),{name:e,color:t,logs:n,totalLogs:s,trees:i,saplings:r,cutTree:nt,plantTree:st,row1Upgrades:b,row2Upgrades:Te,row1Buyables:ce,manualCutProgress:pe,manualPlantProgress:ge,minWidth:700,display:H(()=>m(Y,null,[m(W,{display:H(()=>Ue("Log Gain","",Dt)),direction:B.Down,style:"width: 400px; text-align: left"},{default:()=>[m(At,{resource:n,color:t,style:"margin-bottom: 0"},null)]}),m(At,{resource:r,color:"green",style:"margin-bottom: 0"},null),m(At,{resource:i,color:"green",style:"margin-bottom: 0"},null),m("br",null,null),h.gt(pt.value,0)?m(Y,null,[m(W,{display:H(()=>Ue("Trees","",nn,0,"/s")),direction:B.Down,style:"width: 400px; text-align: left"},{default:()=>[C("You cut down "),re(pt.value),C(" trees/s")]}),m("br",null,null)]):null,h.gt(gt.value,0)?m(Y,null,[m(W,{display:H(()=>Ue("Trees","",an,0,"/s")),direction:B.Down,style:"width: 400px; text-align: left"},{default:()=>[C("You plant "),re(gt.value),C(" trees/s")]}),m("br",null,null)]):null,m(Rt,null,null),rt(nt,st),m("div",null,[C("Tip: You can hold down on actions to perform them automatically")]),m(Rt,null,null),rt(...b),rt(...Te),rt(...ce)]))}}),ne=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,[_e]:function(){const{day:c,layer:p,symbol:b,opened:v,shouldNotify:_,story:N}=this;return{day:c,symbol:b,opened:v,shouldNotify:_,onOpenLore(){var w,F;t.value=a((F=(w=ee[p!=null?p:"trees"])==null?void 0:w.name)!=null?F:""),n.value=N},onOpenLayer(){if(M.tabs.includes(p!=null?p:"trees")){const w=M.tabs.lastIndexOf(p!=null?p:"trees");M.tabs.splice(w,1)}else M.tabs.push(p!=null?p:"trees")},onUnlockLayer(){v.value=!0,setTimeout(()=>{var w,F;t.value=a((F=(w=ee[p!=null?p:"trees"])==null?void 0:w.name)!=null?F:""),n.value=N},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: "),$t(M.offlineTime)]):null,m(Rt,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=>rt(...r))])]))}}),Fr=e=>[ne,Ir],Bn=P(()=>!1);function Or(e,t){}var Rn=Object.freeze(Object.defineProperty({__proto__:null,main:ne,getInitialLayers:Fr,hasWon:Bn,fixOldSave:Or},Symbol.toStringTag,{value:"Module"}));const Dr=A({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=zt(t),o=P(()=>R.allowGoBack&&n.value>0&&!s.value);function u(){M.tabs.splice(a(e.index),1/0)}xe(()=>p(s.value,a(i.value))),be([s,bi(i)],([b,v])=>p(b,v));function c(b){e.nodes.value=b}function p(b,v){const _=typeof v=="number"||Number.isNaN(parseInt(v))?v+"px":v,N=r.value();N!=null&&(b?(N.style.flexGrow="0",N.style.flexShrink="0",N.style.width="60px",N.style.minWidth=N.style.flexBasis="",N.style.margin="0"):(N.style.flexGrow="",N.style.flexShrink="",N.style.width="",N.style.minWidth=N.style.flexBasis=_,N.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 g(),k("div",{class:"layer-container",style:Q({"--layer-color":e.unref(e.color)})},[e.showGoBack?(g(),k("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...o)=>e.goBack&&e.goBack(...o))},"\u274C")):T("",!0),e.minimized.value?(g(),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)])):(g(),k("div",{key:2,class:X(["layer-tab",{showGoBack:e.showGoBack}])},[m(l,{onUpdateNodes:e.updateNodes},{default:O(()=>[(g(),q(te(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(g(),k("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=o=>e.minimized.value=!0)}," \u25BC ")):T("",!0)],4)}var Vr=G(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=A({__name:"Changelog",setup(e,{expose:t}){const n=E(!1);return t({open(){n.value=!0}}),(s,i)=>(g(),q(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=G(qr,[["__scopeId","data-v-4b4bda40"]]);const Br={class:"info-modal-header"},Rr=["src","alt"],Ur={class:"info-modal-title"},jr={key:0},Gr={key:0},Wr={key:0},Hr=d("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1),zr=d("br",null,null,-1),Kr=d("br",null,null,-1),Yr=["href"],Zr=d("span",{class:"material-icons info-modal-discord"},"discord",-1),Jr=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=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=d("br",null,null,-1);var ea=A({__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,p=ae(n),b=E(!1),v=P(()=>$t(M.timePlayed)),_=P(()=>z(H(()=>m(Y,null,[hi.map(Qe)]))));t({open(){b.value=!0}});function N(){var w;(w=a(p.changelog))==null||w.open()}return(w,F)=>(g(),q(qe,{modelValue:b.value,"onUpdate:modelValue":F[0]||(F[0]=Te=>b.value=Te)},{header:O(()=>[d("div",Br,[a(i)?(g(),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)?(g(),k("span",jr,": "+L(a(c)),1)):T("",!0)])])])]),body:O(({shown:Te})=>[Te?(g(),k("div",Gr,[a(r)?(g(),k("div",Wr,"By "+L(a(r)),1)):T("",!0),Hr,zr,d("div",{class:"link",onClick:N},"Changelog"),Kr,d("div",null,[a(o)?(g(),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(v)),1),(g(),q(te(a(_))))])):T("",!0)]),_:1},8,["modelValue"]))}});const ta={class:"field"},na={key:0,class:"field-title"},jn=A({__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=mt(Se(n,"title"),"span"),i=E((l=n.options.find(o=>o.value===n.modelValue))!=null?l:null);be(Se(n,"modelValue"),o=>{var u;se(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)=>(g(),k("div",ta,[a(s)?(g(),k("span",na,[(g(),q(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 sa={class:"field"},ia=A({__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)=>(g(),k("label",sa,[Wt(d("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":l[0]||(l[0]=o=>J(i)?i.value=o:null)},null,512),[[es,a(i)]]),(g(),q(te(a(s))))]))}});var Ee=G(ia,[["__scopeId","data-v-2b109500"]]);const Gn=e=>(Me("data-v-bc13791c"),e=e(),$e(),e),ra=Gn(()=>d("div",{class:"header"},[d("h2",null,"Options")],-1)),aa=Gn(()=>d("hr",null,null,-1));var oa=A({__name:"Options",setup(e,{expose:t}){const n=E(!1);t({open(){n.value=!0}});const s=Object.keys(Pt).map(N=>({label:ai(N),value:N})),i=P(()=>z(H(()=>m(Y,null,[mi.map(Qe)])))),{showTPS:r,theme:l,unthrottled:o}=ae(Z),{autosave:u,offlineProd:c}=ae(M),p=P({get(){return M.devSpeed===0},set(N){M.devSpeed=N?0:null}}),b=H(()=>m("span",null,[C("Offline Production"),m(W,{display:"Save-specific"},{default:()=>[C("*")]})])),v=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(N,w)=>(g(),q(qe,{modelValue:n.value,"onUpdate:modelValue":w[6]||(w[6]=F=>n.value=F)},{header:O(()=>[ra]),body:O(()=>[m(jn,{title:"Theme",options:a(s),modelValue:a(l),"onUpdate:modelValue":w[0]||(w[0]=F=>J(l)?l.value=F:null)},null,8,["options","modelValue"]),(g(),q(te(a(i)))),m(Ee,{title:"Show TPS",modelValue:a(r),"onUpdate:modelValue":w[1]||(w[1]=F=>J(r)?r.value=F:null)},null,8,["modelValue"]),aa,m(Ee,{title:"Unthrottled",modelValue:a(o),"onUpdate:modelValue":w[2]||(w[2]=F=>J(o)?o.value=F:null)},null,8,["modelValue"]),m(Ee,{title:a(b),modelValue:a(c),"onUpdate:modelValue":w[3]||(w[3]=F=>J(c)?c.value=F:null)},null,8,["title","modelValue"]),m(Ee,{title:a(v),modelValue:a(u),"onUpdate:modelValue":w[4]||(w[4]=F=>J(u)?u.value=F:null)},null,8,["title","modelValue"]),a(R).enablePausing?(g(),q(Ee,{key:0,title:a(_),modelValue:a(p),"onUpdate:modelValue":w[5]||(w[5]=F=>J(p)?p.value=F:null)},null,8,["title","modelValue"])):T("",!0)]),_:1},8,["modelValue"]))}});var la=G(oa,[["__scopeId","data-v-bc13791c"]]);const ua=["onSubmit"],ca={class:"field"},da={key:0,class:"field-title"},fa=["placeholder"],ma=A({__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=mt(Se(n,"title"),"span"),i=Le(null);Gt(()=>{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)=>(g(),k("form",{onSubmit:lt(l,["prevent"])},[d("div",ca,[a(s)?(g(),k("span",da,[(g(),q(te(a(s))))])):T("",!0),e.textArea?(g(),q(a(os),{key:1,modelValue:a(r),"onUpdate:modelValue":c[0]||(c[0]=p=>J(r)?r.value=p:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:o,ref_key:"field",ref:i},null,8,["modelValue","placeholder","maxHeight"])):Wt((g(),k("input",{key:2,type:"text","onUpdate:modelValue":c[1]||(c[1]=p=>J(r)?r.value=p:null),placeholder:e.placeholder,class:X({fullWidth:!e.title}),onBlur:o,ref_key:"field",ref:i},null,42,fa)),[[ts,a(r)]])])],40,ua))}});var Wn=G(ma,[["__scopeId","data-v-67b44a54"]]);const ha={key:0},pa=["onClick","disabled"],ga={key:0},ya=["onClick"],va=A({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const s=ae(e),i=E(!1);be(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)=>(g(),k("span",{class:X(["container",{confirming:i.value}])},[i.value?(g(),k("span",ha,"Are you sure?")):T("",!0),d("button",{onClick:lt(r,["stop"]),class:"button danger",disabled:e.disabled},[i.value?(g(),k("span",ga,"Yes")):ke(o.$slots,"default",{key:1},void 0,!0)],8,pa),i.value?(g(),k("button",{key:1,class:"button",onClick:lt(l,["stop"])},"No",8,ya)):T("",!0)],2))}});var _a=G(va,[["__scopeId","data-v-2f8ef34c"]]);const ba=["onClick"],Na=A({__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)=>(g(),k("button",{onClick:lt(i,["stop"]),class:X(["feedback",{activated:n.value,left:e.left}])},[ke(r.$slots,"default",{},void 0,!0)],10,ba))}});var wa=G(Na,[["__scopeId","data-v-01a1b95c"]]);const Pe=e=>(Me("data-v-5285ac49"),e=e(),$e(),e),ka=Pe(()=>d("div",{class:"handle material-icons"},"drag_handle",-1)),Sa={key:0,class:"actions"},Ma=Pe(()=>d("span",{class:"material-icons"},"content_paste",-1)),$a=Pe(()=>d("span",{class:"material-icons"},"content_copy",-1)),Ca=Pe(()=>d("span",{class:"material-icons"},"edit",-1)),Pa=Pe(()=>d("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),Ta={key:1,class:"actions"},Ia=Pe(()=>d("span",{class:"material-icons"},"check",-1)),Fa=Pe(()=>d("span",{class:"material-icons"},"close",-1)),Oa={key:2,class:"details"},Da={class:"save-version"},Ea=Pe(()=>d("br",null,null,-1)),Va={key:0},xa={key:1},La={key:3,class:"details"},qa={key:4,class:"details error"},Aa=Pe(()=>d("br",null,null,-1)),Ba=A({__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("");be(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),p=zt(P(()=>{var v,_,N,w;return`Day ${(w=(N=(_=(v=s.value)==null?void 0:v.layers)==null?void 0:_.main)==null?void 0:N.day)!=null?w:1}`}));function b(){t("editName",o.value),r.value=!1}return(v,_)=>(g(),k("div",{class:X(["save",{active:a(u)}])},[ka,r.value?(g(),k("div",Ta,[d("button",{onClick:b,class:"button"},[m(W,{display:"Save",direction:a(B).Left,class:"info"},{default:O(()=>[Ia]),_:1},8,["direction"])]),d("button",{onClick:_[5]||(_[5]=N=>r.value=!r.value),class:"button"},[m(W,{display:"Cancel",direction:a(B).Left,class:"info"},{default:O(()=>[Fa]),_:1},8,["direction"])])])):(g(),k("div",Sa,[a(s).error==null&&!l.value?(g(),q(wa,{key:0,onClick:_[0]||(_[0]=N=>t("export")),class:"button",left:""},{default:O(()=>[m(W,{display:"Export",direction:a(B).Left,class:"info"},{default:O(()=>[Ma]),_:1},8,["direction"])]),_:1})):T("",!0),a(s).error==null&&!l.value?(g(),k("button",{key:1,onClick:_[1]||(_[1]=N=>t("duplicate")),class:"button"},[m(W,{display:"Duplicate",direction:a(B).Left,class:"info"},{default:O(()=>[$a]),_:1},8,["direction"])])):T("",!0),a(s).error==null&&!l.value?(g(),k("button",{key:2,onClick:_[2]||(_[2]=N=>r.value=!r.value),class:"button"},[m(W,{display:"Edit Name",direction:a(B).Left,class:"info"},{default:O(()=>[Ca]),_:1},8,["direction"])])):T("",!0),m(_a,{disabled:a(u),onClick:_[3]||(_[3]=N=>t("delete")),onConfirmingChanged:_[4]||(_[4]=N=>l.value=N)},{default:O(()=>[m(W,{display:"Delete",direction:a(B).Left,class:"info"},{default:O(()=>[Pa]),_:1},8,["direction"])]),_:1},8,["disabled"])])),a(s).error==null&&!r.value?(g(),k("div",Oa,[d("button",{class:"button open",onClick:_[6]||(_[6]=N=>t("open"))},[d("h3",null,L(a(s).name),1)]),d("span",Da,"v"+L(a(s).modVersion),1),Ea,a(c)?(g(),k("div",Va,"Last played "+L(a(i).format(a(c))),1)):T("",!0),a(p)?(g(),k("div",xa,[(g(),q(te(a(p))))])):T("",!0)])):a(s).error==null&&r.value?(g(),k("div",La,[m(Wn,{modelValue:o.value,"onUpdate:modelValue":_[7]||(_[7]=N=>o.value=N),class:"editname",onSubmit:b},null,8,["modelValue"])])):(g(),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=G(Ba,[["__scopeId","data-v-5285ac49"]]);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=A({__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);be(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=jt({});function p(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]}be(n,S=>{S&&Object.keys(c).forEach($=>delete c[$])});const b=P(()=>Z.saves.reduce((S,$)=>(S[$]=p($),S),{}));function v(S){let $;switch(M.id===S?$=Tn(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 N(S){Z.saves=Z.saves.filter($=>$!==S),localStorage.removeItem(S),c[S]=void 0}function w(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),w($.id)}function Te(S,$){const U=b.value[S];U&&(U.name=$,M.id===S?(M.name=$,fe()):(fe(U),c[S]=void 0))}return(S,$)=>(g(),q(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?(g(),q(a(as),{key:0,list:a(Z).saves,handle:".handle",itemKey:ce=>ce},{item:O(({element:ce})=>[m(Ra,{save:a(b)[ce],onOpen:Ie=>w(ce),onExport:Ie=>v(ce),onEditName:Ie=>Te(ce,Ie),onDuplicate:Ie=>_(ce),onDelete:Ie=>N(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=>w(a(Je)().id))},"New Game"),Object.keys(a(u)).length>0?(g(),q(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=G(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},_o=["href"],bo=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=A({__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:p}=R;function b(){window.open(c,"mywindow")}return(v,_)=>(g(),k(Y,null,[a(r)?(g(),k("div",ot({key:0,class:"nav"},v.$attrs),[a(l)?(g(),k("img",{key:0,src:a(l),class:"banner",alt:a(o)},null,8,Za)):(g(),k("div",Ja,L(a(o)),1)),d("div",{onClick:_[0]||(_[0]=N=>{var w;return(w=i.value)==null?void 0:w.open()}),class:"version-container"},[m(W,{display:"Changelog",direction:a(B).Down,class:"version"},{default:O(()=>[d("span",null,"v"+L(a(p)),1)]),_:1},8,["direction"])]),Xa,d("div",Qa,[d("span",{onClick:b,class:"material-icons"},"discord"),d("ul",eo,[a(c)?(g(),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]=N=>{var w;return(w=t.value)==null?void 0:w.open()})},[m(W,{display:"Info",direction:a(B).Down,class:"info"},{default:O(()=>[oo]),_:1},8,["direction"])]),d("div",{onClick:_[2]||(_[2]=N=>{var w;return(w=n.value)==null?void 0:w.open()})},[m(W,{display:"Saves",direction:a(B).Down,xoffset:"-20px"},{default:O(()=>[lo]),_:1},8,["direction"])]),d("div",{onClick:_[3]||(_[3]=N=>{var w;return(w=s.value)==null?void 0:w.open()})},[m(W,{display:"Options",direction:a(B).Down,xoffset:"-66px"},{default:O(()=>[uo]),_:1},8,["direction"])])],16)):(g(),k("div",ot({key:1,class:"overlay-nav"},v.$attrs),[d("div",{onClick:_[4]||(_[4]=N=>{var w;return(w=i.value)==null?void 0:w.open()}),class:"version-container"},[m(W,{display:"Changelog",direction:a(B).Right,xoffset:"25%",class:"version"},{default:O(()=>[d("span",null,"v"+L(a(p)),1)]),_:1},8,["direction"])]),d("div",{onClick:_[5]||(_[5]=N=>{var w;return(w=n.value)==null?void 0:w.open()})},[m(W,{display:"Saves",direction:a(B).Right},{default:O(()=>[co]),_:1},8,["direction"])]),d("div",{onClick:_[6]||(_[6]=N=>{var w;return(w=s.value)==null?void 0:w.open()})},[m(W,{display:"Options",direction:a(B).Right},{default:O(()=>[fo]),_:1},8,["direction"])]),d("div",{onClick:_[7]||(_[7]=N=>{var w;return(w=t.value)==null?void 0:w.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)?(g(),k("li",vo,[d("a",{href:a(c),target:"_blank"},L(a(u)),9,_o)])):T("",!0),bo,No])])],16)),m(ea,{ref_key:"info",ref:t,changelog:i.value},null,8,["changelog"]),m(Hn,{ref_key:"savesManager",ref:n},null,512),m(la,{ref_key:"options",ref:s},null,512),m(Ar,{ref_key:"changelog",ref:i},null,512)],64))}});var zn=G(wo,[["__scopeId","data-v-4a3f8425"]]);const en=e=>(Me("data-v-62ae8bac"),e=e(),$e(),e),ko={class:"inner-tab"},So={key:0},Mo=en(()=>d("br",null,null,-1)),$o=C(" You can help continue the "),Co=en(()=>d("i",null,"advent",-1)),Po=C("ure at: "),To=en(()=>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)),Io=[Mo,$o,Co,Po,To],Fo=A({__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:p,minimizable:b,nodes:v}=r;return{display:l,minimized:o,minWidth:u,name:c,color:p,minimizable:b,nodes:v}}return(r,l)=>(g(),k("div",{class:X(["tabs-container",{useHeader:a(s)}])},[(g(!0),k(Y,null,ns(a(t),(o,u)=>{var c,p;return g(),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((p=a(ee)[o])==null?void 0:p.style))},[u===0&&!a(s)?(g(),q(zn,{key:0})):T("",!0),d("div",ko,[a(n).includes(o)?(g(),q(Vr,ot({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"])):(g(),q(te(o),{key:1,index:u},null,8,["index"]))])],6)}),128)),m(qe,{"model-value":a(ne).loreBody.value!=="","onUpdate:modelValue":l[0]||(l[0]=()=>a(ne).loreBody.value="")},{header:O(()=>[d("h2",null,L(a(ne).loreTitle.value),1)]),body:O(()=>[C(L(a(ne).loreBody.value)+" ",1),a(ne).days[a(ne).day.value-1].opened.value?T("",!0):(g(),k("div",So,Io))]),_:1},8,["model-value"])],2))}});var Oo=G(Fo,[["__scopeId","data-v-62ae8bac"]]);const ht=e=>(Me("data-v-4a50ce42"),e=e(),$e(),e),Do={class:"game-over-modal-header"},Eo=["src","alt"],Vo={class:"game-over-modal-title"},xo=ht(()=>d("h2",null,"Congratulations!",-1)),Lo={key:0},qo=ht(()=>d("br",null,null,-1)),Ao=ht(()=>d("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),Bo=ht(()=>d("br",null,null,-1)),Ro=["href"],Uo=ht(()=>d("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),jo=A({__name:"GameOverScreen",setup(e){const{title:t,logo:n,discordName:s,discordLink:i,versionNumber:r,versionTitle:l}=R,o=P(()=>$t(M.timePlayed)),u=P(()=>Bn.value&&!M.keepGoing),c=Se(M,"autosave");function p(){M.keepGoing=!0}function b(){je(Je())}return(v,_)=>(g(),q(qe,{"model-value":a(u)},{header:O(()=>[d("div",Do,[a(n)?(g(),k("img",{key:0,class:"game-over-modal-logo",src:a(n),alt:a(t)},null,8,Eo)):T("",!0),d("div",Vo,[xo,d("h4",null,"You've beaten "+L(a(t))+" v"+L(a(r))+": "+L(a(l)),1)])])]),body:O(({shown:N})=>[N?(g(),k("div",Lo,[d("div",null,"It took you "+L(a(o))+" to beat the game.",1),qo,Ao,Bo,d("div",null,[d("a",{href:a(i),class:"game-over-modal-discord-link"},[Uo,C(" "+L(a(s)),1)],8,Ro)]),m(Ee,{title:"Autosave",modelValue:a(c),"onUpdate:modelValue":_[0]||(_[0]=w=>J(c)?c.value=w:null)},null,8,["modelValue"])])):T("",!0)]),footer:O(()=>[d("div",{class:"game-over-footer"},[d("button",{onClick:p,class:"button"},"Keep Going"),d("button",{onClick:b,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var Go=G(jo,[["__scopeId","data-v-4a50ce42"]]);const It=e=>(Me("data-v-3de07c06"),e=e(),$e(),e),Wo=It(()=>d("div",{class:"nan-modal-header"},[d("h2",null,"NaN value detected!")],-1)),Ho={key:0},zo=It(()=>d("br",null,null,-1)),Ko=["href"],Yo=It(()=>d("span",{class:"material-icons nan-modal-discord"},"discord",-1)),Zo=It(()=>d("br",null,null,-1)),Jo={class:"nan-footer"},Xo=A({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:n}=R,s=Se(M,"autosave"),i=Se(j,"hasNaN"),r=E(null),l=P(()=>{var _;return(_=j.NaNPath)==null?void 0:_.join(".")}),o=P(()=>{var _;return(_=j.NaNPath)==null?void 0:_.slice(-1)[0]}),u=P(()=>j.NaNReceiver&&o.value?j.NaNReceiver[o.value]:null),c=P({get(){return M.devSpeed===0},set(_){M.devSpeed=_?null:0}});function p(){j.NaNReceiver&&o.value&&(j.NaNReceiver[o.value]=new h(0),j.hasNaN=!1)}function b(){j.NaNReceiver&&o.value&&(j.NaNReceiver[o.value]=new h(1),j.hasNaN=!1)}function v(){j.NaNReceiver&&o.value&&(j.NaNReceiver[o.value]=new h(NaN),j.hasNaN=!1)}return(_,N)=>(g(),k(Y,null,[m(qe,ot({modelValue:a(i),"onUpdate:modelValue":N[4]||(N[4]=w=>J(i)?i.value=w:null)},_.$attrs),{header:O(()=>[Wo]),body:O(()=>[d("div",null,[C(' Attempted to assign "'+L(a(l))+'" to NaN',1),a(u)?(g(),k("span",Ho,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)]),zo,d("div",null,[d("a",{href:a(n),class:"nan-modal-discord-link"},[Yo,C(" "+L(a(t)),1)],8,Ko)]),Zo,m(Ee,{title:"Autosave",modelValue:a(s),"onUpdate:modelValue":N[0]||(N[0]=w=>J(s)?s.value=w:null)},null,8,["modelValue"]),a(R).enablePausing?(g(),q(Ee,{key:0,title:"Pause game",modelValue:a(c),"onUpdate:modelValue":N[1]||(N[1]=w=>J(c)?c.value=w:null)},null,8,["modelValue"])):T("",!0)]),footer:O(()=>[d("div",Jo,[d("button",{onClick:N[2]||(N[2]=w=>{var F;return(F=r.value)==null?void 0:F.open()}),class:"button"},"Open Saves Manager"),d("button",{onClick:p,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)?(g(),k("button",{key:0,onClick:N[3]||(N[3]=w=>i.value=!1),class:"button"}," Set to previous ")):T("",!0),d("button",{onClick:v,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),m(Hn,{ref_key:"savesManager",ref:r},null,512)],64))}});var Qo=G(Xo,[["__scopeId","data-v-3de07c06"]]);const el={key:0,class:"tpsDisplay"},tl={key:0,class:"low"},nl=A({__name:"TPS",setup(e){const t=P(()=>h.div(j.lastTenTicks.length,j.lastTenTicks.reduce((r,l)=>r+l,0))),n=E([]);tt(()=>{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):(g(),k("div",el,[C(" TPS: "+L(a(Ge)(a(t)))+" ",1),m(Mt,{name:"fade"},{default:O(()=>[a(i)?(g(),k("span",tl,L(a(Ge)(a(s))),1)):T("",!0)]),_:1})]))}});var sl=G(nl,[["__scopeId","data-v-46a3ed5b"]]);var il=A({__name:"App",setup(e){const t=R.useHeader,n=P(()=>Pt[Z.theme].variables),s=Se(Z,"showTPS"),i=P(()=>z(H(()=>m(Y,null,[pi.map(Qe)]))));return(r,l)=>(g(),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)?(g(),q(zn,{key:0})):T("",!0),m(Oo),a(a(s))?(g(),q(sl,{key:1})):T("",!0),m(Go),m(Qo),(g(),q(te(a(i))))],6)],64))}});var rl=G(il,[["__scopeId","data-v-7c41425b"]]);ie.on("setupVue",e=>e.use(ls));function al(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",p=>{p.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 ol(e={}){const{immediate:t=!0,onNeedRefresh:n,onOfflineReady:s,onRegistered:i,onRegisterError:r}=e,l=E(!1),o=E(!1);return{updateServiceWorker:al({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 bt(()=>Promise.resolve().then(function(){return ui}),void 0),n=window.vue=ss(rl);e.emit("setupVue",n),n.mount("#app"),xe(()=>{const s=us(),{updateServiceWorker:i}=ol({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 b61a736..ae3b721 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ Advent Incremental - + diff --git a/sw.js b/sw.js index e306e13..c117da6 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.34e0c268.js",revision:null},{url:"assets/index.3c22679f.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:"cd19cf5cb5fbe4caf564dcf7855a582c"},{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.3c22679f.css",revision:null},{url:"assets/index.45c2db42.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:"27ae240ddd10262185d6927a0684faa8"},{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")))}));