Advent-Incremental/assets/index.dd7ca786.js

17 lines
146 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.92681fcb.js";import{Z as S,l as _e,u as vn,q as nn,C as r,b1 as ze,aa as V,aE as y,a0 as M,a1 as m,aK as Je,G as fe,t as T,aC as si,w as Le,b2 as Fe,a8 as u,O as F,ao as Ki,I as pe,ay as yn,ar as Mt,aG as on,A as Ne,_ as U,b6 as D,b8 as Tn,bs as Ji,aq as It,bu as Xt,bb as bn,T as Xi,a7 as g,j as Zi,bv as Jn,J as j,$ as P,aH as nt,aF as it,al as fn,aL as ht,aN as ke,z as tt,H as Yi,aJ as ai,bn as es,br as ts,be as ns}from"./@vue.4ce677c2.js";import{i as is}from"./is-plain-object.906d88e8.js";import{c as li}from"./nanoevents.1080beb7.js";import{L as mt}from"./lz-string.731cedc5.js";import{Y as ss}from"./vue-next-select.a2bfab1d.js";import{s as as,u as ri}from"./vue-toastification.6f567382.js";import{D as ls}from"./vuedraggable.7949458c.js";import{p as rs}from"./vue-textarea-autosize.35804eaf.js";import{v as os,n as us}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const cs=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerpolicy&&(l.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?l.credentials="include":s.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}};cs();const ds="modulepreload",Xn={},fs="./",mn=function(t,n){return!n||n.length===0?t():Promise.all(n.map(i=>{if(i=`${fs}${i}`,i in Xn)return;Xn[i]=!0;const s=i.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${l}`))return;const o=document.createElement("link");if(o.rel=s?"stylesheet":ds,s||(o.as="script",o.crossOrigin=""),o.href=i,document.head.appendChild(o),s)return new Promise((c,f)=>{o.addEventListener("load",c),o.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},ms="./projInfo-schema.json",ps="Advent Incremental",hs="An incremental game you play a day at a time, leading up to Christmas!",gs="advent-incremental",vs="thepaperpilot",ys="",bs="",_s="0.3",ws="Initial Commit",Ns=!0,ks=!1,Cs=2,Ss=!0,Ms=null,Is="",As=["main"],Es=3600,$s=0,Ps=!0,Ts="base64";var W={$schema:ms,title:ps,description:hs,id:gs,author:vs,discordName:ys,discordLink:bs,versionNumber:_s,versionTitle:ws,allowGoBack:Ns,defaultShowSmall:ks,defaultDecimalsShown:Cs,useHeader:Ss,banner:Ms,logo:Is,initialTabs:As,maxTickLength:Es,offlineLimit:$s,enablePausing:Ps,exportEncoding:Ts};const En=17,xs=9e15,Fs=Math.log10(9e15),Bs=1/9e15,Ds=308,Os=-324,Zn=5,Rs=function(){const e=[];for(let n=Os+1;n<=Ds;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),Nt=[2,Math.E,3,4,5,6,7,8,9,10],qs=[[1,1.0891168053867777,1.1789745164521264,1.2701428397304229,1.3632066654400328,1.4587804913784246,1.557523817412741,1.660158301473385,1.767487542936873,1.8804205225512542,2],[1,1.1121114330934,1.23103892493161,1.35838369631113,1.49605193039935,1.64635423375119,1.81213853570186,1.99697132461829,2.20538955455724,2.44325744833852,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356972596,1.3632807
`,e),await Ct(xt())}}function xt(){const e=cn(),t=bi({id:e});return He(t),ne.saves.push(e),t}function cn(){let e,t=0;do e=`${W.id}-${t++}`;while(localStorage.getItem(e));return e}async function Ct(e){console.info("Loading save",e);const{layers:t,removeLayer:n,addLayer:i}=await mn(()=>Promise.resolve().then(function(){return $a}),void 0),{fixOldSave:s,getInitialLayers:l}=await mn(()=>Promise.resolve().then(function(){return Ri}),void 0);for(const o in t){const c=t[o];c&&n(c)}l(e).forEach(o=>i(o,e)),e=bi(e),e.offlineProd&&e.time&&e.devSpeed!==0&&(e.offlineTime==null&&(e.offlineTime=0),e.offlineTime+=Math.min(e.offlineTime+(Date.now()-e.time)/1e3,W.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==W.versionNumber&&s(e.modVersion,e),Object.assign(A,e),ne.active=A.id,le.emit("onLoad")}setInterval(()=>{A.autosave&&He()},1e3);window.onbeforeunload=()=>{A.autosave&&He()};window.save=He;const oa=window.hardReset=async()=>{await Ct(xt())},Yt=nn({active:"",saves:[],showTPS:!0,theme:xn.Nordic,unthrottled:!1});ze(Yt,e=>{const t=mt.compressToUTF16(JSON.stringify(e));localStorage.setItem(W.id,t)},{deep:!0});var ne=window.settings=Yt;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:xn.Nordic};le.emit("loadSettings",e),Object.assign(Yt,e),oa()};function ua(){try{let e=localStorage.getItem(W.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=mt.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(Yt,t)}le.emit("loadSettings",Yt)}catch{}}const _i=nn([]);function ca(e){_i.push(e)}const wi=nn([]);function da(e){wi.push(e)}const fa=nn([]),ma={class:"table"},dn=V({__name:"Column",setup(e){const t=S(()=>sn[ne.theme].mergeAdjacent);return(n,i)=>(y(),M("div",ma,[m("div",{class:fe(["col",{mergeAdjacent:r(t)}])},[Je(n.$slots,"default")],2)]))}}),pa={class:"table"},Ni=V({__name:"Row",setup(e){const t=S(()=>sn[ne.theme].mergeAdjacent);return(n,i)=>(y(),M("div",pa,[m("div",{class:fe(["row",{mergeAdjacent:r(t)}])},[Je(n.$slots,"default")],2)]))}});function ki(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Ki(e)}function K(e,t="span"){return typeof e=="function"?V({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),V({template:e})):V({render:()=>({})}):e}function he(e){if(yt(e))return typeof e=="function"?e():K(e);const t=e[gt];return u(t,e[vt](),null)}function Oe(...e){let t;return u(Ni,null,ki(t=e.map(he))?t:{default:()=>[t]})}function Ci(...e){let t;return u(dn,null,ki(t=e.map(he))?t:{default:()=>[t]})}function Xe(e){if(yt(e))return typeof e=="function"?e():typeof e=="string"?u(F,null,[e]):u(e,null,null);const t=e[gt];return u(t,e[vt](),null)}function yt(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Zt]===!0}function Si(e,t,n){const i=T(null),s=T(void 0);function l(f){i.value||(i.value=setInterval(c,250)),s.value=f,n&&(n.value=!0)}function o(){i.value&&(clearInterval(i.value),i.value=null),n&&(n.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(s.value)}return si(o),{start:l,stop:o,handleHolding:c}}function Mi(e,t="div"){const n=Le();return Fe(()=>{n.value=K(ge(e),t)}),n}function At(e,t="div"){const n=Le(null);return Fe(()=>{const i=ge(e);n.value=i==null?null:K(i,t)}),n}function ha(e){return S(()=>ge(e))}function ge(e){return r(r(e))}function $(...e){return e.includes(Object)||e.push(Object),e}const Re=V({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(y(),M("div",{style:pe({width:e.width,height:e.height})},null,4))}});var Z=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n};const ga=V({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var _;const n=T({}),i=new ResizeObserver(c),s=T(null);yn(()=>{const b=s.value;b!=null&&i.observe(b)});let l=!0,o=T((_=s.value)==null?void 0:_.getBoundingClientRect());function c(){l&&(l=!1,Mt(()=>{va
`).slice(3,5).map(t=>t.trim()).join(`
`))||""}function Ee(e){const t=_e(e)?e:T(e);return t[en]=t,t[tn]=_e(e)?e.value:e,t[gn]=Ma(),t[Ai]=!1,je.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
Created at:
`+t[gn]):Ft[je[je.length-1]].add(t),t}le.on("addLayer",(e,t)=>{const n=[],i=(s,l=[])=>{let o=!1;return Object.keys(s).forEach(c=>{const f=s[c];if(f&&typeof f=="object")if(en in f){if(o=!0,f[Ai]){console.warn("Deleted persistent ref present in returned object. Ignoring...",f,`
Created at:
`+f[gn]);return}Ft[e.id].delete(oe in f?f[oe]:f);const d=l.reduce((b,v)=>(v in b||(b[v]={}),b[v]),t),_=d[c];d[c]=f[en],Zi(d)?_!=null?d[c]=_:d[c]=f[tn]:_!=null?d[c].value=_:d[c].value=f[tn]}else!(f instanceof a)&&!_e(f)&&!n.includes(f)&&(typeof f.type=="symbol"&&n.push(f),i(f,[...l,c])&&(Jn(f)&&!Jn(s)?console.warn("Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.",oe in s?s[oe]:s,c):o=!0))}),o};i(e),Ft[e.id].forEach(s=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,s,`
Created at:
`+s[gn])}),Ft[e.id].clear()});const Fn=Symbol("RegisterNode"),Bn=Symbol("UnregisterNode"),Dn=Symbol("Nodes"),On=Symbol("Bounds"),Ce=vn({});window.layers=Ce;const Ft={},je=[];function Rt(e,t){return Be(()=>{const n={},i=n.emitter=li();if(n.on=i.on.bind(i),n.emit=i.emit.bind(i),n.nodes=T({}),n.id=e,je.push(e),Ft[e]=new Set,n.minimized=Ee(!1),Object.assign(n,t.call(n)),je[je.length-1]==null||je[je.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen
Stack: ${je}
Trying to pop ${n.id}`;return je.pop(),E(n,"color"),E(n,"display"),E(n,"name"),we(n,"name",n.id),E(n,"minWidth"),we(n,"minWidth",600),E(n,"minimizable"),we(n,"minimizable",!0),n})}function Ei(e,t){if(console.info("Adding layer",e.id),Ce[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,Ce[e.id]);return}we(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),Ce[e.id]=e,le.emit("addLayer",e,t.layers[e.id])}function Ia(e){return Ce[e]}function $i(e){console.info("Removing layer",e.id),le.emit("removeLayer",e),Ce[e.id]=void 0}function Aa(e){$i(e),Ei(e,A)}function Ea(e){const t=T(!1);return{openModal:()=>t.value=!0,modal:x(()=>u(We,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>u("h2",null,[r(e.name)]),body:r(e.display)}))}}le.on("update",function(t){Object.values(Ce).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(Ce).forEach(n=>{n==null||n.emit("update",t)}),Object.values(Ce).forEach(n=>{n==null||n.emit("postUpdate",t)})});var $a=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Fn,UnregisterNodeInjectionKey:Bn,NodesInjectionKey:Dn,BoundsInjectionKey:On,layers:Ce,persistentRefs:Ft,addingLayers:je,createLayer:Rt,addLayer:Ei,getLayer:Ia,removeLayer:$i,reloadLayer:Aa,setupLayerModal:Ea},Symbol.toStringTag,{value:"Module"}));const Pa={},Ta={class:"notif"};function xa(e,t){return y(),M("div",Ta,"!")}var ni=Z(Pa,[["render",xa],["__scopeId","data-v-66323fd4"]]);const wn=e=>(nt("data-v-949cc93c"),e=e(),it(),e),Fa={key:0,class:"day feature dontMerge opened"},Ba={class:"date"},Da=g("Dec"),Oa=wn(()=>m("br",null,null,-1)),Ra={class:"date"},qa=g("Dec"),Va=wn(()=>m("br",null,null,-1)),La=wn(()=>m("div",{class:"doors"},null,-1)),Ga={class:"date"},Ua=g("Dec"),Ha=wn(()=>m("br",null,null,-1)),ja={key:0,class:"material-icons lock"},za=V({__name:"Day",props:{day:null,symbol:null,opened:null,shouldNotify:null},emits:["openLore","openLayer","unlockLayer"],setup(e,{emit:t}){const n=e,i=S(()=>a.gte(z.day.value,n.day)&&new Date().getMonth()===11&&new Date().getDate()>=n.day);function s(){i.value&&t("unlockLayer")}return(l,o)=>e.opened.value?(y(),M("div",Fa,[u(bn,{appear:"",name:"door"},{default:D(()=>[m("div",{class:"doors",onClick:o[0]||(o[0]=c=>t("openLayer"))},[m("div",Ba,[Da,Oa,g(j(e.day),1)]),m("div",Ra,[qa,Va,g(j(e.day),1)])])]),_:1}),m("div",{class:"icon",style:pe({backgroundImage:`url(${e.symbol})`})},null,4),m("div",{class:"lore",onClick:o[1]||(o[1]=c=>t("openLore"))},"?"),r(e.shouldNotify)?(y(),U(ni,{key:0})):P("",!0)])):(y(),M("div",{key:1,class:fe(["day feature dontMerge",{can:r(i),locked:!r(i),canOpen:r(i)}]),onClick:s},[La,m("div",Ga,[Ua,Ha,g(j(e.day),1)]),r(i)?P("",!0):(y(),M("div",ja,"lock")),r(i)?(y(),U(ni,{key:1})):P("",!0)],2))}});var Wa=Z(za,[["__scopeId","data-v-949cc93c"]]);const Qa={key:0},Ka={key:0,class:"mark star"},Ja=["src"],Xa=V({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(y(),M("div",Qa,[e.mark===!0?(y(),M("div",Ka)):(y(),M("img",{key:1,class:"mark",src:e.mark},null,8,Ja))])):P("",!0)}});var Nn=Z(Xa,[["__scopeId","data-v-2207999f"]]);const Za=V({__name:"Node",props:{id:null},setup(e){const n=Ne(e),i=fn(Fn,()=>{}),s=fn(Bn,()=>{}),l=Le(null),o=S(()=>l.value&&l.value.parentElement);return ze([o,n.id],([c,f],[d,_])=>{d&&s(r(_)),c&&i(f,c)}),si(()=>s(r(n.id))),(c,f)=>(y(),M("div",{class:"node",ref_key:"node",ref:l},null,512))}});var an=Z(Za,[["__scopeId","data-v-a48cb382"]]),Ya=V({props:{display:{type:$(Object,String,Function),required:!0},visibility:{type:$(Number),required:!0},style:$(Object,String,Array),classes:$(Object),onClick:Function,onHold:Function,canClick:{type:$(Boolean),required:!0},small:Boolean,mark:$(Boolean,String),id:{type:String,required:!0},isHolding:Object},components:{Node:an,MarkNode:Nn},setup(e){const{display:t,onClick:n,onHold:i}=Ne(e),s=Le("");Fe(()=>{const c=ge(t);if(c==null){s.value="";return}if(yt(c)){s.value=K(c);return}const f=K(c.title||"","h3"),d=K(c.description,"div");s.value=K(x(()=>u("span",null,[c.title?u("div",null,[u(f,null,null)]):null,u(d,null,null)])
margin: 10px 0;"/>${I}`:ie,t.value=!0},onOpenLayer(){if(window.matchMedia("(min-width: 1468px)").matches)if(A.tabs.includes(p!=null?p:"trees")){const N=A.tabs.lastIndexOf(p!=null?p:"trees");A.tabs.splice(N,1)}else A.tabs.push(p!=null?p:"trees"),z.minimized.value=!0;else A.tabs.splice(1,1/0,p!=null?p:"trees")},onUnlockLayer(){C.value=!0,setTimeout(()=>{var N,L;n.value=-1,i.value=r((L=(N=Ce[p!=null?p:"trees"])==null?void 0:N.name)!=null?L:""),s.value=ie,A.devSpeed=null,t.value=!0},1e3)}}}}})}const o=[l(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Fi,story:"Oh no! Santa forgot about Christmas and it's only 25 days away! He's asked for your help due to your history getting large quantities of things in short amounts of time. Unfortunately you're really starting from scratch here - let's start with getting wood, which you'll need for everything from building workshops to wrapping paper to many of the toys themselves!",completedStory:"Santa looks at all the wood you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),l(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:Bi,story:"Santa looked over your tree farm and was impressed with how much you could accomplish in just one day. Today's goal is to get a workshop built up for the elves to work in - and apparently, they need quite a lot of space to work!",completedStory:"The workshop complete, Santa once again dismisses you for the day. With a strong foundation, this workshop should suffice for supporting future work toward this impossible mission. Good Job!"})),l(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:Di,story:"Santa tells you that unfortunately there are quite a few naughty children out there this year, and he's going to need you to gather as much coal as you can for him to give out.",completedStory:"Santa looks at all the coal you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),l(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:Oi,story:"Alright, it seems you finally have enough things setup to start bringing in the elves! Unfortunately, it seems they'll need to be retrained on how to help, since they're out of practice by 11 months!",completedStory:"The workshop now hums with the bustling elves working everything. They can take it from here - you deserve a break after such a long day! Good Job!"})),l(()=>({day:5,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:6,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:7,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:8,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:9,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:10,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:11,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:12,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:13,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:14,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:15,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:16,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:17,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:18,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:19,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:20,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:21,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:22,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:23,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),l(()=>({day:24,shoul
${L}
${N}`)}}return d[I]}ze(n,I=>{I&&Object.keys(d).forEach(N=>delete d[N])});const b=S(()=>ne.saves.reduce((I,N)=>(I[N]=_(N),I),{}));function v(I){let N;switch(A.id===I?N=vi(A[oe]):N=JSON.stringify(b.value[I]),W.exportEncoding){default:console.warn(`Unknown save encoding: ${W.exportEncoding}. Defaulting to lz`);case"lz":N=mt.compressToUTF16(N);break;case"base64":N=btoa(unescape(encodeURIComponent(N)));break;case"plain":break}const L=document.createElement("textarea");L.value=N,document.body.appendChild(L),L.select(),L.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(L)}function p(I){A.id===I&&He();const N={...b.value[I],id:cn()};He(N),ne.saves.push(N.id)}function k(I){ne.saves=ne.saves.filter(N=>N!==I),localStorage.removeItem(I),d[I]=void 0}function C(I){b.value[A.id].time=A.time,He(),d[A.id]=void 0,Ct(b.value[I]),d[I]=void 0}function R(I){if(o.value=I,Mt(()=>{o.value=null}),I[0]!=="{")if(I[0]==="e")I=decodeURIComponent(escape(atob(I)));else if(I[0]==="\u1BE1")I=mt.decompressFromUTF16(I);else{console.warn("Unable to determine preset encoding",I);return}const N=JSON.parse(I);N.id=cn(),He(N),ne.saves.push(N.id),C(N.id)}function ie(I,N){const L=b.value[I];L&&(L.name=N,A.id===I?(A.name=N,He()):(He(L),d[I]=void 0))}return(I,N)=>(y(),U(We,{modelValue:n.value,"onUpdate:modelValue":N[4]||(N[4]=L=>n.value=L),ref_key:"modal",ref:i},{header:D(()=>[ao]),body:D(({shown:L})=>[L?(y(),U(r(ls),{key:0,list:r(ne).saves,handle:".handle",itemKey:re=>re},{item:D(({element:re})=>[u(so,{save:r(b)[re],onOpen:ve=>C(re),onExport:ve=>v(re),onEditName:ve=>ie(re,ve),onDuplicate:ve=>p(re),onDelete:ve=>k(re)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):P("",!0)]),footer:D(()=>[m("div",lo,[u(Li,{modelValue:l.value,"onUpdate:modelValue":N[0]||(N[0]=L=>l.value=L),title:"Import Save",placeholder:"Paste your save here!",class:fe({importingFailed:s.value})},null,8,["modelValue","class"]),m("div",ro,[oo,m("div",uo,[m("button",{class:"button",onClick:N[1]||(N[1]=L=>C(r(xt)().id))},"New Game"),Object.keys(r(f)).length>0?(y(),U(Ln,{key:0,options:r(f),modelValue:o.value,"onUpdate:modelValue":N[2]||(N[2]=L=>R(L)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):P("",!0)])]),m("div",co,[fo,m("button",{class:"button modal-default-button",onClick:N[3]||(N[3]=L=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Gi=Z(mo,[["__scopeId","data-v-3b9991aa"]]);const qe=e=>(nt("data-v-4a3f8425"),e=e(),it(),e),po=["src","alt"],ho={key:1,class:"title"},go=qe(()=>m("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),vo={class:"discord"},yo={class:"discord-links"},bo={key:0},_o=["href"],wo=qe(()=>m("li",null,[m("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),No=qe(()=>m("li",null,[m("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),ko={href:"https://forums.moddingtree.com/",target:"_blank"},Co=qe(()=>m("span",{class:"material-icons"},"forum",-1)),So=qe(()=>m("span",{class:"material-icons"},"info",-1)),Mo=qe(()=>m("span",{class:"material-icons"},"library_books",-1)),Io=qe(()=>m("span",{class:"material-icons"},"settings",-1)),Ao=qe(()=>m("span",{class:"material-icons"},"library_books",-1)),Eo=qe(()=>m("span",{class:"material-icons"},"settings",-1)),$o=qe(()=>m("span",{class:"material-icons"},"info",-1)),Po={href:"https://forums.moddingtree.com/",target:"_blank"},To=qe(()=>m("span",{class:"material-icons"},"forum",-1)),xo={class:"discord"},Fo={class:"discord-links"},Bo={key:0},Do=["href"],Oo=qe(()=>m("li",null,[m("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Ro=qe(()=>m("li",null,[m("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),qo=V({__name:"Nav",setup(e){const t=T(null),n=T(null),i=T(null),s=T(null),{useHeader:l,banner:o,title:c,discordName:f,discordLink:d,versionNumber:_}=W;function b(){window.open(d,"mywindow")}return(v,p)=>(y(),M(F,null,[r(l)?(y(),M("div",It({key:0,class:"na
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 ra();const{globalBus:e,startGameLoop:t}=await mn(()=>Promise.resolve().then(function(){return la}),void 0),n=window.vue=ns(wu);e.emit("setupVue",n),n.mount("#app"),Mt(()=>{const i=ri(),{updateServiceWorker:s}=ku({onNeedRefresh(){i.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(){s()}})},onOfflineReady(){i.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(l){l&&setInterval(l.update,60*60*1e3)}})}),t()});