pages/dream/js/app.2e06b19f.js
2021-03-23 23:18:41 -05:00

2 lines
No EOL
54 KiB
JavaScript

(function(t){function e(e){for(var n,o,s=e[0],u=e[1],l=e[2],h=0,g=[];h<s.length;h++)o=s[h],Object.prototype.hasOwnProperty.call(i,o)&&i[o]&&g.push(i[o][0]),i[o]=0;for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(t[n]=u[n]);c&&c(e);while(g.length)g.shift()();return a.push.apply(a,l||[]),r()}function r(){for(var t,e=0;e<a.length;e++){for(var r=a[e],n=!0,s=1;s<r.length;s++){var u=r[s];0!==i[u]&&(n=!1)}n&&(a.splice(e--,1),t=o(o.s=r[0]))}return t}var n={},i={app:0},a=[];function o(e){if(n[e])return n[e].exports;var r=n[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=t,o.c=n,o.d=function(t,e,r){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},o.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(r,n,function(e){return t[e]}.bind(null,n));return r},o.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="";var s=window["webpackJsonp"]=window["webpackJsonp"]||[],u=s.push.bind(s);s.push=e,s=s.slice();for(var l=0;l<s.length;l++)e(s[l]);var c=u;a.push([0,"chunk-vendors"]),r()})({0:function(t,e,r){t.exports=r("60d9")},"0dfb":function(t,e,r){},"11b9":function(t,e,r){"use strict";r("cb11")},"1a86":function(t,e,r){"use strict";(function(t){var n=r("7071"),i=r.n(n);t.Decimal=i.a;var a="#ee8695",o="#292831",s="#333f58",u="#fbbbad",l="#4a7a96",c=new i.a(0),h=new i.a(1),g=new i.a(NaN),p={Cot:{background:"default",enemies:["bat"],upgrades:[{description:"I'd sleep better on something comfier",cost:new i.a(2)},{description:"An even comfier bed could give me better control on when I wake up",cost:new i.a(2500)}]},Bank:{background:"city",enemies:["slime"],upgrades:[{description:"Building a bank allows me to adventure to cities in my dreams, with increased riches",cost:new i.a(100)}],infinite:{description:"Improve the bank to double all gold gain",r:5,base:100}},Apothecary:{background:"savanna",enemies:["witch"],upgrades:[{description:"Building an apothecary will allow me to find potions in my dreams",cost:new i.a(1e4)}],infinite:{description:"Improve the apothecary to increase how much potions heal",r:3,base:1e4}},Armory:{background:"graveyard",enemies:["skeleton"],upgrades:[{description:"Building an armory will help my gear up in my dreams",cost:new i.a(10)}],infinite:{description:"Improve the armory to increase starting gear level",r:8,base:10}}};e["a"]={bgColor:a,fgColor:o,hiColor:s,raisedColor:u,otherColor:l,decimalZero:c,decimalOne:h,decimalNaN:g,buildingInfo:p}}).call(this,r("54ac"))},"4ffa":function(t,e,r){"use strict";r("a031")},"589a":function(t,e,r){"use strict";r("0dfb")},"60d9":function(t,e,r){"use strict";r.r(e);var n=r("b3e0"),i=(r("8eaa"),r("9a38"),r("ba05"),r("2d7f"),r("8d2f"),r("8d20")),a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.$store.cycle>=5&&!t.$store.keepPlaying?r("transition",{attrs:{name:"victory"}},[r("div",{staticClass:"victory"},[r("h1",[t._v("You Win!")]),r("h2",[t._v("Congratulations, you beat the game in:"),r("br"),t._v(t._s(t.formatTime(t.$store.timePlayed)))]),r("h3",[t._v("You can keep going if you'd like, but things might get weird")]),r("button",{on:{click:t.keepGoing}},[t._v("Keep Going")])])]):t.$store.started?r("div",{attrs:{id:"app"}},[r("Header"),r("Town"),r("Dream",{ref:"dream"})],1):r("transition",{attrs:{name:"app"}},[r("div",{staticClass:"welcome",on:{click:t.start}},[r("img",{attrs:{src:"assets/logo.png",alt:"Dream Hero"}})])])},o=[],s=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"header"},[r("h2",[t._v("Dream Hero")]),r("h2",[t._v(t._s(t.formatWhole(t.$store.points)))]),t.$store.dreaming?r("h2",{staticStyle:{color:"var(--hi-color)"}},[t._v("+"+t._s(t.formatWhole(t.$store.tempPoints)))]):t._e(),t.$store.dreaming?r("h2",{staticStyle:{color:"var(--hi-color)"}},[t._v("Cycle "+t._s(t.$store.cycle+1))]):t._e(),t._m(0)])},u=[function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("a",{attrs:{href:"https://discord.gg/WzejVAx",target:"_blank"}},[r("img",{attrs:{src:"assets/discord.png"}})])}],l={name:"Header"},c=l,h=(r("e65f"),r("a96e")),g=Object(h["a"])(c,s,u,!1,null,"220c9fd4",null),p=g.exports,m=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("transition",{attrs:{name:"town"}},[this.$store.dreaming?t._e():r("div",{staticClass:"town-container"},[r("panZoom",{on:{init:t.onInit}},[r("div",{staticClass:"town"},[r("h1",{staticClass:"background"},[t._v("World Map")]),r("div",{class:{building:!0,highlight:t.$store.tutorialOne},staticStyle:{top:"500px",left:"700px"},on:{click:function(e){return t.$actions.openBuilding("Cot")}}},[t._v(" Cot ")]),t.$store.tutorialOne?t._e():r("div",{staticClass:"building",staticStyle:{top:"200px",left:"600px"},on:{click:function(e){return t.$actions.openBuilding("Bank")}}},[t._v(" Bank ")]),t.$store.tutorialOne?t._e():r("div",{staticClass:"building",staticStyle:{top:"800px",left:"200px"},on:{click:function(e){return t.$actions.openBuilding("Apothecary")}}},[t._v(" Apothecary ")]),t.$store.tutorialOne?t._e():r("div",{staticClass:"building",staticStyle:{top:"750px",left:"800px"},on:{click:function(e){return t.$actions.openBuilding("Armory")}}},[t._v(" Armory ")])])]),r("Modal",{attrs:{show:""!==t.$store.openBuilding},on:{close:t.$actions.closeBuilding}},[r("div",{staticStyle:{position:"relative"},attrs:{slot:"header"},slot:"header"},[r("img",{staticClass:"header",attrs:{src:"assets/"+t.buildingInfo.background+".png",alt:"$store.openBuilding"}}),r("div",{staticClass:"header-enemies"},t._l(t.buildingInfo.enemies,(function(t){return r("img",{key:t,attrs:{src:"assets/"+t+".png",alt:t}})})),0),r("h3",[t._v(t._s(t.$store.openBuilding))])]),r("div",{attrs:{slot:"body"},slot:"body"},["Cot"===t.$store.openBuilding?r("div",{staticStyle:{display:"flex","margin-bottom":"8px","border-bottom":"solid 2px var(--fg-color)","padding-bottom":"8px"}},[r("span",{staticStyle:{"flex-grow":"1"}},[t._v("I'm feeling tired...")]),r("button",{staticStyle:{float:"right"},on:{click:function(e){return t.$actions.startDream()}}},[t._v("Dream")])]):t._e(),!t.$store.tutorialOne&&t.upgradeInfo?r("div",{staticStyle:{display:"flex"}},[r("span",{staticStyle:{"flex-grow":"1"}},[t._v(t._s(t.upgradeInfo.description))]),r("button",{staticStyle:{float:"right","margin-left":"4px"},attrs:{disabled:t.$store.points.lt(t.upgradeInfo.cost)},on:{click:function(e){return t.upgradeBuilding()}}},[t._v(" Cost: "+t._s(t.formatWhole(t.upgradeInfo.cost))+" ")])]):r("div",[t._v(" You've fully upgraded this! ")])]),r("div",{staticStyle:{"margin-bottom":"-24px"},attrs:{slot:"footer"},slot:"footer"})])],1)])},f=[],d=(r("984a"),r("086c"),function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("transition",{attrs:{name:"modal"}},[t.show?r("div",{staticClass:"modal-mask"},[r("div",{staticClass:"modal-wrapper",on:{click:function(e){return e.target!==e.currentTarget?null:t.$emit("close")}}},[r("div",{staticClass:"modal-container"},[r("div",{staticClass:"modal-header"},[t._t("header",[t._v(" default header ")])],2),r("div",{staticClass:"modal-body"},[t._t("body",[t._v(" default body ")])],2),r("div",{staticClass:"modal-footer"},[t._t("footer",[r("button",{staticClass:"modal-default-button",on:{click:function(e){return t.$emit("close")}}},[t._v(" Close ")])])],2)])])]):t._e()])}),y=[],v={name:"Modal",props:{show:Boolean}},b=v,M=(r("4ffa"),Object(h["a"])(b,d,y,!1,null,"475ebd39",null)),w=M.exports,N=r("1a86"),_=r("7071"),x=r.n(_),$={name:"Town",components:{Modal:w},computed:{buildingInfo:function(){return this.$store.openBuilding&&N["a"].buildingInfo[this.$store.openBuilding]},upgradeInfo:function(){if(!this.$store.openBuilding)return null;var t=N["a"].buildingInfo[this.$store.openBuilding],e=t.upgrades[this.$store.upgrades[this.$store.openBuilding]];return!e&&t.infinite&&(e={description:t.infinite.description,cost:x.a.times(t.infinite.base,x.a.pow(t.infinite.r,this.$store.upgrades[this.$store.openBuilding]))}),e}},methods:{onInit:function(t){t.setTransformOrigin(null)},upgradeBuilding:function(){var t,e=N["a"].buildingInfo[this.$store.openBuilding];this.$store.upgrades[this.$store.openBuilding]in e.upgrades?t=e.upgrades[this.$store.upgrades[this.$store.openBuilding]].cost:e.infinite&&(t=x.a.times(e.infinite.base,x.a.pow(e.infinite.r,this.$store.upgrades[this.$store.openBuilding]))),t.lte(this.$store.points)&&(this.$store.points=this.$store.points.sub(t),this.$store.upgrades[this.$store.openBuilding]++)}}},A=$,F=(r("11b9"),Object(h["a"])(A,m,f,!1,null,"8caad2ae",null)),I=F.exports,S=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("scroll",{ref:"scroll",staticClass:"dream"},[t._l(t.$store.path,(function(t,e){return r("Floor",{key:e,attrs:{index:e}})})),t.$store.upgrades.Cot>=1?r("div",{staticClass:"endAtLoop",on:{click:t.toggleEndAtLoop}},[t.$store.endAtLoop?r("h2",[t._v("Waking up at end of this sleep cycle")]):r("h2",[t._v("Entering deeper sleep at end of this sleep cycle")]),r("span",[t._v("Click to toggle")])]):t._e(),r("Modal",{attrs:{show:t.$store.endingDream},on:{close:t.$actions.endDream}},[r("h3",{attrs:{slot:"header"},slot:"header"},[t._v("Time to wake up")]),r("div",{attrs:{slot:"body"},slot:"body"},["death"===t.$store.endingDreamStatus?r("span",[t._v(" Unfortunately, your dream has met an untimely end. You will only receive a portion of your coins:"),r("br"),t._v("+"+t._s(t.formatWhole(t.$store.tempPoints.pow(.8)))+" ")]):"floor"===t.$store.endingDreamStatus?r("span",[t._v(" You wake up early, avoiding potential death at the cost of some of your potential coins:"),r("br"),t._v("+"+t._s(t.formatWhole(t.$store.tempPoints.pow(.9)))+" ")]):r("span",[t._v(" You wake up feeling refreshed, with a heavier wallet:"),r("br"),t._v("+"+t._s(t.formatWhole(t.$store.tempPoints))+" ")])]),r("div",{attrs:{slot:"footer"},slot:"footer"},[r("button",{on:{click:t.$actions.endDream}},[t._v("Wake Up")])])])],2)},k=[],P=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{class:{tile:!0,blur:t.$store.position<t.index,active:t.$store.position===t.index}},[r("span",{staticClass:"indicator"},[t.$store.position===t.index?r("img",{staticClass:"indicator-hero",attrs:{src:"assets/hero.png",alt:"hero"}}):r("div",{staticClass:"indicator-index"},[t._v(t._s(t.index+1))])]),r("span",{staticClass:"actions-container",style:{backgroundImage:"url(assets/"+t.$store.path[t.index].type+".png)",width:t.$store.upgrades.Cot>=2&&t.$store.position===t.index?"70%":"85%"}},t._l(t.$store.path[t.index].actions,(function(t,e){return r("ActionPreview",{key:e,attrs:{action:t,index:e}})})),1),r("span",{staticClass:"endAtFloor",style:{width:t.$store.upgrades.Cot>=2&&t.$store.position===t.index?"15%":"0%"},on:{click:t.toggleEndAtFloor}},[t._v(" Wake up early:"),r("br"),r("b",[t._v(t._s(t.$store.endAtFloor?"On":"Off"))])]),r("Action",{attrs:{tile:t.$store.path[t.index]}}),r("div",{staticClass:"actionProgress"},[r("div",{staticClass:"actionProgress-fill",style:{width:100*t.$store.actionProgress/t.getActionDuration()+"%"}})])],1)},C=[],O=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"action",style:{backgroundImage:"url(assets/"+t.tile.type+".png)"}},[r("img",{staticClass:"shake left",attrs:{src:"assets/hero.png",alt:"hero"}}),r("div",{staticClass:"health left"},[r("span",{style:{color:t.$store.hp.gt(t.getMaxHealth())?"var(--raised-color)":""}},[t._v(t._s(t.formatWhole(t.$store.hp)))]),r("div",{staticClass:"health-fill",style:{width:100*t.$store.hp/t.getMaxHealth()+"%"}})]),r("div",{staticClass:"shake right"},["gold"===t.tile.actions[t.$store.currentAction].type?r("img",{attrs:{src:"assets/"+(t.tile.actions[t.$store.currentAction].image||"gold")+".png",alt:t.tile.actions[t.$store.currentAction].image||"gold"}}):"enemy"===t.tile.actions[t.$store.currentAction].type?r("img",{attrs:{src:"assets/"+t.tile.actions[t.$store.currentAction].enemy+".png",alt:t.tile.actions[t.$store.currentAction].enemy}}):"potion"===t.tile.actions[t.$store.currentAction].type?r("img",{attrs:{src:"assets/potion.png",alt:"potion"}}):"gear"===t.tile.actions[t.$store.currentAction].type?r("img",{attrs:{src:"assets/shield.png",alt:"shield"}}):t._e()]),"gold"===t.tile.actions[t.$store.currentAction].type?r("span",{staticClass:"amount right"},[t._v(" "+t._s(t.formatWhole(t.tile.actions[t.$store.currentAction].amount))+" ")]):t._e(),"enemy"===t.tile.actions[t.$store.currentAction].type?r("div",{staticClass:"health right"},[r("span",[t._v(t._s(t.formatWhole(t.tile.actions[t.$store.currentAction].hp)))]),r("div",{staticClass:"health-fill",style:{width:100*t.tile.actions[t.$store.currentAction].hp/t.tile.actions[t.$store.currentAction].maxHp+"%"}})]):t._e()])},E=[],q={name:"Action",props:{tile:Object}},D=q,T=(r("67d0"),Object(h["a"])(D,O,E,!1,null,"17a74b01",null)),B=T.exports,L=function(){var t=this,e=t.$createElement,r=t._self._c||e;return"enemy"===t.action.type?r("img",{class:{actionPreview:!0,active:t.index===t.$store.currentAction},attrs:{src:"assets/"+t.action.enemy+".png",alt:t.action.enemy}}):"gold"===t.action.type?r("div",{staticClass:"amount-container"},[r("img",{staticClass:"actionPreview",class:{actionPreview:!0,active:t.index===t.$store.currentAction},attrs:{src:"assets/"+(t.action.image||"gold")+".png",alt:t.action.image||"gold"}}),r("span",{staticClass:"amount"},[t._v(t._s(t.formatWhole(t.action.amount)))])]):"potion"===t.action.type?r("img",{class:{actionPreview:!0,active:t.index===t.$store.currentAction},attrs:{src:"assets/potion.png",alt:"potion"}}):"gear"===t.action.type?r("img",{class:{actionPreview:!0,active:t.index===t.$store.currentAction},attrs:{src:"assets/shield.png",alt:"shield"}}):t._e()},j=[],W={name:"ActionPreview",props:{action:Object,index:Number}},V=W,z=(r("e4fe"),Object(h["a"])(V,L,j,!1,null,"ea9eb416",null)),Y=z.exports,H={name:"Floor",props:{index:Number},components:{Action:B,ActionPreview:Y},methods:{toggleEndAtFloor:function(){this.$store.endAtFloor=!this.$store.endAtFloor}}},G=H,Z=(r("d041"),Object(h["a"])(G,P,C,!1,null,"a47d5598",null)),U=Z.exports,J={name:"Dream",components:{Floor:U,Modal:w},methods:{toggleEndAtLoop:function(){this.$store.endAtLoop=!this.$store.endAtLoop}}},X=J,K=(r("589a"),Object(h["a"])(X,S,k,!1,null,"5add287c",null)),Q=K.exports,R={name:"App",components:{Header:p,Town:I,Dream:Q},methods:{start:function(){this.$store.started=!0},keepGoing:function(){this.$store.keepPlaying=!0}}},tt=R,et=(r("6b0b"),Object(h["a"])(tt,a,o,!1,null,null,null)),rt=et.exports,nt=r("7e8b"),it=r("5de0"),at=r.n(it);r("899a"),r("3a31"),r("383a"),r("f54c"),r("6d01"),r("4f04");function ot(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=t.log10().floor(),i=t.div(x.a.pow(10,n));return 10===i.toStringWithDecimalPlaces(e)&&(i=new x.a(1),n=n.add(1)),n=st(n),r?i.toStringWithDecimalPlaces(e)+"e"+n:"e"+n}function st(t,e){if(null===t||void 0===t)return"NaN";if(t.mag<.001)return(0).toFixed(e);if(null===e||void 0===e){if(t.layer>1){var r=new x.a(t);r.mag=Math.floor(t.mag);var n=new x.a(t);return n.layer=0,n.mag=t.mag-r.mag,r.floor().toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,")+n.toStringWithDecimalPlaces(2).substr(1)}return t.floor().toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,")}return t.toStringWithDecimalPlaces(e).replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,")}function ut(t,e){return null===t||void 0===t?"NaN":t.eq(0)?(0).toFixed(e):t.mag<.001?t.toExponential(e):t.toStringWithDecimalPlaces(e)}function lt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(t=new x.a(t),isNaN(t.sign)||isNaN(t.layer)||isNaN(t.mag))return"NaN";if(t.sign<0)return"-"+lt(t.neg(),e);if(t.mag===Number.POSITIVE_INFINITY)return"Infinity";if(t.gte("eeee1000")){var r=t.slog();return r.gte(1e6)?"F"+lt(r.floor()):x.a.pow(10,r.sub(r.floor())).toStringWithDecimalPlaces(3)+"F"+st(r.floor(),0)}return t.gte("1e100000")?ot(t,0,!1):t.gte("1e1000")?ot(t,0):t.gte(1e6)?ot(t,e):t.gte(1e3)?st(t,0):ut(t,e)}function ct(t){return t=new x.a(t).floor(),t.gte(1e6)||t.lte(.98)&&!t.eq(0)?lt(t,2):lt(t,0)}function ht(t){return t<60?lt(t)+"s":t<3600?ct(Math.floor(t/60))+"m "+lt(t%60)+"s":t<86400?ct(Math.floor(t/3600))+"h "+ct(Math.floor(t/60)%60)+"m "+lt(t%60)+"s":t<31536e3?ct(Math.floor(t/84600)%365)+"d "+ct(Math.floor(t/3600)%24)+"h "+ct(Math.floor(t/60)%60)+"m "+lt(t%60)+"s":ct(Math.floor(t/31536e3))+"y "+ct(Math.floor(t/84600)%365)+"d "+ct(Math.floor(t/3600)%24)+"h "+ct(Math.floor(t/60)%60)+"m "+lt(t%60)+"s"}window.format=lt,window.formatWhole=ct,window.formatTime=ht,window.regularFormat=ut,window.commaFormat=st,window.exponentialFormat=ot;var gt="thepaperpilot-dream",pt={timePlayed:0,keepPlaying:!1,points:new x.a(0),tempPoints:new x.a(0),dreaming:!1,autoSave:!0,openBuilding:"",tutorialOne:!0,path:new Array(10).fill(0).map((function(){return{actions:new Array(100).fill(0).map((function(){return{type:"",enemy:"",maxHp:new x.a(0),hp:new x.a(0),attackDuration:0,damage:new x.a(0),progress:0}})),type:""}})),currentAction:0,actionProgress:-1,attackProgress:0,cycle:0,currentTime:performance.now(),hp:new x.a(0),paused:!1,upgrades:{Cot:0,Bank:0,Apothecary:0,Armory:0},gearLevel:0,started:!1,endAtLoop:!1,endAtFloor:!1,endingDream:!1,endingDreamStatus:"death"};function mt(t,e){for(var r in e)null==e[r]?void 0===t[r]&&(t[r]=null):Array.isArray(e[r])?void 0===t[r]?t[r]=e[r]:mt(e[r],t[r]):e[r]instanceof x.a?void 0==t[r]?t[r]=e[r]:t[r]=new x.a(t[r]):e[r]&&"object"===Object(n["a"])(e[r])?void 0==t[r]||"object"!==Object(n["a"])(t[r])?t[r]=e[r]:mt(e[r],t[r]):void 0==t[r]&&(t[r]=e[r])}var ft=localStorage.getItem(gt);null==ft?ft=pt:(ft=Object.assign({},pt,JSON.parse(atob(ft))),mt(ft,pt));var dt=window.player=i["a"].observable(ft);function yt(){return x.a.times(1,x.a.pow(.95,dt.gearLevel)).clamp(Number.MIN_VALUE,Number.MAX_VALUE).toNumber()}function vt(){var t=x.a.add(2,dt.gearLevel).pow(2);return dt.hp.gt(Mt())&&(t=t.times(2)),t}function bt(){return x.a.times(2,x.a.pow(.98,dt.gearLevel)).clamp(Number.MIN_VALUE,Number.MAX_VALUE).toNumber()}function Mt(t){return new x.a(25).times(x.a.add(1,t||dt.gearLevel).pow(2))}function wt(){return!!dt.dreaming&&("enemy"===dt.path[dt.position].actions[dt.currentAction].type&&!(dt.actionProgress<bt()))}function Nt(t){return(.2*Math.random()+.8)*(1.5*t)}i["a"].prototype.$store=dt,window.save=function(){dt.autoSave&&localStorage.setItem(gt,btoa(JSON.stringify(window.player)))},setInterval(window.save,5e3),i["a"].prototype.getAttackDuration=window.getAttackDuration=yt,i["a"].prototype.getAttackDamage=window.getAttackDamage=vt,i["a"].prototype.getActionDuration=window.getActionDuration=bt,i["a"].prototype.getMaxHealth=window.getMaxHealth=Mt,i["a"].prototype.isCombatActive=window.isCombatActive=wt;var _t={default:[function(t){var e=new x.a(Nt(t)+3).factorial().floor();return i["a"].observable({type:"enemy",enemy:"bat",maxHp:e,hp:e,attackDuration:x.a.times(2,x.a.pow(.9,t)).toNumber(),damage:new x.a(Nt(t)+1.5).factorial().floor(),progress:0})},function(t){return i["a"].observable({type:"gold",amount:new x.a(Nt(t)+1).factorial().times(x.a.pow(2,dt.upgrades.Bank)).floor()})}],city:[function(t){var e=new x.a(Nt(t)+2.75).factorial().floor();return i["a"].observable({type:"enemy",enemy:"slime",maxHp:e,hp:e,attackDuration:x.a.times(1,x.a.pow(.5,t+1)).toNumber(),damage:new x.a(t+1).sqrt(),progress:0})},function(t){return i["a"].observable({type:"gold",image:"dollar",amount:new x.a(Nt(t)+2).factorial().times(x.a.pow(2,dt.upgrades.Bank)).floor()})}],savanna:[function(t){var e=new x.a(Nt(t)+3).factorial().floor();return i["a"].observable({type:"enemy",enemy:"witch",maxHp:e,hp:e,attackDuration:x.a.times(2,x.a.pow(.95,t)).toNumber(),damage:new x.a(Nt(t)+2).factorial().floor(),progress:0})},function(){return i["a"].observable({type:"potion"})}],graveyard:[function(t){var e=new x.a(Nt(t)+2.5).factorial().floor();return i["a"].observable({type:"enemy",enemy:"skeleton",maxHp:e,hp:e,attackDuration:x.a.times(3,x.a.pow(.98,t)).toNumber(),damage:new x.a(Nt(t)+2.5).factorial().floor(),progress:0})},function(t){return i["a"].observable({type:"gear",amount:(t+1)/10})}]},xt=window.actions={startDream:function(){dt.endAtLoop=!1,dt.endAtFloor=!1,dt.tutorialOne=!1,dt.openBuilding="",dt.cycle=-1;var t=["default"];dt.upgrades["Bank"]>=1&&t.push("city"),dt.upgrades["Apothecary"]>=1&&t.push("savanna"),dt.upgrades["Armory"]>=1&&t.push("graveyard"),dt.path=new Array(10).fill(0).map((function(){return{type:t[Math.floor(Math.random()*t.length)]}})),dt.position=0,dt.tempPoints=new x.a(0),dt.gearLevel=dt.upgrades.Armory,dt.hp=Mt(),this.startLoop(),dt.dreaming=!0},endDream:function(){var t=1;"death"===dt.endingDreamStatus?t=.8:"floor"===dt.endingDreamStatus&&(t=.9),dt.points=dt.points.add(dt.tempPoints.pow(t)),dt.dreaming=!1,dt.endingDream=!1},startLoop:function(){dt.cycle++,dt.position=-1,dt.path.forEach((function(t){t.actions=new Array(dt.cycle+1).fill(0).map((function(){return _t[t.type][Math.floor(Math.random()*_t[t.type].length)](dt.cycle)}))})),window.vue.$root.$children[0].$refs.dream.$refs.scroll.$el.scrollTo({top:0,behavior:"smooth"}),this.nextFloor()},nextFloor:function(){if(dt.position=dt.position+1,dt.position>=10)dt.upgrades.Cot>=1&&!dt.endAtLoop?this.startLoop():(dt.endingDreamStatus="loop",dt.endingDream=!0,dt.position=dt.points-1,dt.currentAction=dt.currentAction-1);else{dt.currentAction=-1;var t=window.vue.$root.$children[0].$refs.dream.$refs.scroll.$el.children[dt.position].offsetTop-250;window.vue.$root.$children[0].$refs.dream.$refs.scroll.$el.scrollTo({top:t,behavior:"smooth"}),this.nextAction()}},nextAction:function(){dt.currentAction++,dt.currentAction>=dt.path[dt.position].actions.length?dt.upgrades.Cot<2||!dt.endAtFloor?this.nextFloor():(dt.endingDreamStatus="floor",dt.endingDream=!0,dt.currentAction=dt.currentAction-1):(dt.actionProgress=0,dt.attackProgress=0)},openBuilding:function(t){dt.openBuilding=t},closeBuilding:function(){dt.openBuilding=""}};function $t(t){var e=(t-dt.currentTime)/1e3;if(e>0&&!dt.paused&&dt.started&&(dt.cycle<5||dt.keepPlaying)&&(dt.timePlayed+=e,dt.dreaming&&!dt.endingDream))if(dt.actionProgress+=e,wt()){dt.attackProgress+=e,dt.path[dt.position].actions[dt.currentAction].progress+=e;var r=!0;dt.attackProgress>=yt()&&(dt.attackProgress=0,dt.path[dt.position].actions[dt.currentAction].hp=dt.path[dt.position].actions[dt.currentAction].hp.sub(vt()),dt.path[dt.position].actions[dt.currentAction].hp.lte(0)&&(xt.nextAction(),r=!1)),r&&dt.path[dt.position].actions[dt.currentAction].progress>=dt.path[dt.position].actions[dt.currentAction].attackDuration&&(dt.path[dt.position].actions[dt.currentAction].progress=0,dt.hp=dt.hp.sub(dt.path[dt.position].actions[dt.currentAction].damage),dt.hp.lte(0)&&(dt.endingDream=!0,dt.endingDreamStatus="death"))}else if(dt.actionProgress>=bt()){switch(dt.path[dt.position].actions[dt.currentAction].type){case"gold":dt.tempPoints=dt.tempPoints.add(dt.path[dt.position].actions[dt.currentAction].amount);break;case"gear":var n=dt.gearLevel;dt.gearLevel+=dt.path[dt.position].actions[dt.currentAction].amount*dt.upgrades.Armory,dt.hp=dt.hp.add(Mt().sub(Mt(n)));break;case"potion":dt.hp=dt.hp.add(Mt().times(.25).times(dt.upgrades.Apothecary+1));break}xt.nextAction()}dt.currentTime=t,requestAnimationFrame($t)}i["a"].prototype.$actions=xt,i["a"].prototype.format=lt,i["a"].prototype.formatWhole=ct,i["a"].prototype.formatTime=ht,i["a"].config.productionTip=!1,i["a"].use(nt["a"]),i["a"].use(at.a,{name:"scroll"}),window.vue=new i["a"]({render:function(t){return t(rt)}}).$mount("#app"),$t(performance.now())},"67d0":function(t,e,r){"use strict";r("c991")},"6b0b":function(t,e,r){"use strict";r("ca07")},"6cb0":function(t,e,r){},7071:function(t,e,r){"use strict";var n,i,a=r("2749").default;function o(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function s(t){return(s="function"==typeof Symbol&&"symbol"==a(Symbol.iterator)?function(t){return a(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":a(t)})(t)}r("984a"),r("086c"),r("6d01"),r("2ecd3"),r("26d3"),r("597a"),r("3945"),r("4f78"),r("2d60"),r("ba05"),r("3a31"),r("29d6"),r("7298"),r("8d2f"),r("1d99"),r("f4ea"),r("f54c"),r("383a"),r("93cf"),r("4f04"),r("060b"),r("949e"),r("3f02"),function(a,o){"object"===s(e)&&"undefined"!=typeof t?t.exports=o():(n=o,i="function"===typeof n?n.call(e,r,e,t):n,void 0===i||(t.exports=i))}(0,(function(){var t=Math.log10(9e15),e=function(){for(var t=[],e=-323;e<=308;e++)t.push(Number("1e"+e));return function(e){return t[e+323]}}(),r=function(t){return l.fromValue_noAlloc(t)},n=function(t,e,r){return l.fromComponents(t,e,r)},i=function(t,e,r){return l.fromComponents_noNormalize(t,e,r)},a=function(t,e){var r=e+1,n=Math.ceil(Math.log10(Math.abs(t))),i=Math.round(t*Math.pow(10,r-n))*Math.pow(10,n-r);return parseFloat(i.toFixed(Math.max(r-n,0)))},s=function(t){return Math.sign(t)*Math.log10(Math.abs(t))},u=function(t){var e,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e-10;if(!Number.isFinite(t))return t;if(0===t)return t;if(1===t)return.5671432904097838;e=t<10?0:Math.log(t)-Math.log(Math.log(t));for(var i=0;i<100;++i){if(r=(t*Math.exp(-e)+e*e)/(e+1),Math.abs(r-e)<n*Math.abs(r))return r;e=r}throw Error("Iteration failed to converge: "+t)},l=function(){function l(t){this.sign=Number.NaN,this.layer=Number.NaN,this.mag=Number.NaN,o(t,l)?this.fromDecimal(t):"number"==typeof t?this.fromNumber(t):"string"==typeof t?this.fromString(t):(this.sign=0,this.layer=0,this.mag=0)}Object.defineProperty(l.prototype,"m",{get:function(){if(0===this.sign)return 0;if(0===this.layer){var t,r=Math.floor(Math.log10(this.mag));return t=5e-324===this.mag?5:this.mag/e(r),this.sign*t}if(1===this.layer){var n=this.mag-Math.floor(this.mag);return this.sign*Math.pow(10,n)}return this.sign},set:function(t){this.layer<=2?this.fromMantissaExponent(t,this.e):(this.sign=Math.sign(t),0===this.sign&&(this.layer,this.exponent))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"e",{get:function(){return 0===this.sign?0:0===this.layer?Math.floor(Math.log10(this.mag)):1===this.layer?Math.floor(this.mag):2===this.layer?Math.floor(Math.sign(this.mag)*Math.pow(10,Math.abs(this.mag))):this.mag*Number.POSITIVE_INFINITY},set:function(t){this.fromMantissaExponent(this.m,t)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"s",{get:function(){return this.sign},set:function(t){0===t?(this.sign=0,this.layer=0,this.mag=0):this.sign=t},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"mantissa",{get:function(){return this.m},set:function(t){this.m=t},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"exponent",{get:function(){return this.e},set:function(t){this.e=t},enumerable:!0,configurable:!0}),l.fromComponents=function(t,e,r){return(new l).fromComponents(t,e,r)},l.fromComponents_noNormalize=function(t,e,r){return(new l).fromComponents_noNormalize(t,e,r)},l.fromMantissaExponent=function(t,e){return(new l).fromMantissaExponent(t,e)},l.fromMantissaExponent_noNormalize=function(t,e){return(new l).fromMantissaExponent_noNormalize(t,e)},l.fromDecimal=function(t){return(new l).fromDecimal(t)},l.fromNumber=function(t){return(new l).fromNumber(t)},l.fromString=function(t){return(new l).fromString(t)},l.fromValue=function(t){return(new l).fromValue(t)},l.fromValue_noAlloc=function(t){return o(t,l)?t:new l(t)},l.abs=function(t){return r(t).abs()},l.neg=function(t){return r(t).neg()},l.negate=function(t){return r(t).neg()},l.negated=function(t){return r(t).neg()},l.sign=function(t){return r(t).sign()},l.sgn=function(t){return r(t).sign()},l.round=function(t){return r(t).round()},l.floor=function(t){return r(t).floor()},l.ceil=function(t){return r(t).ceil()},l.trunc=function(t){return r(t).trunc()},l.add=function(t,e){return r(t).add(e)},l.plus=function(t,e){return r(t).add(e)},l.sub=function(t,e){return r(t).sub(e)},l.subtract=function(t,e){return r(t).sub(e)},l.minus=function(t,e){return r(t).sub(e)},l.mul=function(t,e){return r(t).mul(e)},l.multiply=function(t,e){return r(t).mul(e)},l.times=function(t,e){return r(t).mul(e)},l.div=function(t,e){return r(t).div(e)},l.divide=function(t,e){return r(t).div(e)},l.recip=function(t){return r(t).recip()},l.reciprocal=function(t){return r(t).recip()},l.reciprocate=function(t){return r(t).reciprocate()},l.cmp=function(t,e){return r(t).cmp(e)},l.cmpabs=function(t,e){return r(t).cmpabs(e)},l.compare=function(t,e){return r(t).cmp(e)},l.eq=function(t,e){return r(t).eq(e)},l.equals=function(t,e){return r(t).eq(e)},l.neq=function(t,e){return r(t).neq(e)},l.notEquals=function(t,e){return r(t).notEquals(e)},l.lt=function(t,e){return r(t).lt(e)},l.lte=function(t,e){return r(t).lte(e)},l.gt=function(t,e){return r(t).gt(e)},l.gte=function(t,e){return r(t).gte(e)},l.max=function(t,e){return r(t).max(e)},l.min=function(t,e){return r(t).min(e)},l.minabs=function(t,e){return r(t).minabs(e)},l.maxabs=function(t,e){return r(t).maxabs(e)},l.clamp=function(t,e,n){return r(t).clamp(e,n)},l.clampMin=function(t,e){return r(t).clampMin(e)},l.clampMax=function(t,e){return r(t).clampMax(e)},l.cmp_tolerance=function(t,e,n){return r(t).cmp_tolerance(e,n)},l.compare_tolerance=function(t,e,n){return r(t).cmp_tolerance(e,n)},l.eq_tolerance=function(t,e,n){return r(t).eq_tolerance(e,n)},l.equals_tolerance=function(t,e,n){return r(t).eq_tolerance(e,n)},l.neq_tolerance=function(t,e,n){return r(t).neq_tolerance(e,n)},l.notEquals_tolerance=function(t,e,n){return r(t).notEquals_tolerance(e,n)},l.lt_tolerance=function(t,e,n){return r(t).lt_tolerance(e,n)},l.lte_tolerance=function(t,e,n){return r(t).lte_tolerance(e,n)},l.gt_tolerance=function(t,e,n){return r(t).gt_tolerance(e,n)},l.gte_tolerance=function(t,e,n){return r(t).gte_tolerance(e,n)},l.pLog10=function(t){return r(t).pLog10()},l.absLog10=function(t){return r(t).absLog10()},l.log10=function(t){return r(t).log10()},l.log=function(t,e){return r(t).log(e)},l.log2=function(t){return r(t).log2()},l.ln=function(t){return r(t).ln()},l.logarithm=function(t,e){return r(t).logarithm(e)},l.pow=function(t,e){return r(t).pow(e)},l.pow10=function(t){return r(t).pow10()},l.root=function(t,e){return r(t).root(e)},l.factorial=function(t,e){return r(t).factorial()},l.gamma=function(t,e){return r(t).gamma()},l.lngamma=function(t,e){return r(t).lngamma()},l.exp=function(t){return r(t).exp()},l.sqr=function(t){return r(t).sqr()},l.sqrt=function(t){return r(t).sqrt()},l.cube=function(t){return r(t).cube()},l.cbrt=function(t){return r(t).cbrt()},l.tetrate=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i(1,0,1);return r(t).tetrate(e,n)},l.iteratedexp=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i(1,0,1);return r(t).iteratedexp(e,n)},l.iteratedlog=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return r(t).iteratedlog(e,n)},l.layeradd10=function(t,e){return r(t).layeradd10(e)},l.layeradd=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return r(t).layeradd(e,n)},l.slog=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;return r(t).slog(e)},l.lambertw=function(t){return r(t).lambertw()},l.ssqrt=function(t){return r(t).ssqrt()},l.pentate=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i(1,0,1);return r(t).pentate(e,n)},l.affordGeometricSeries=function(t,e,n,i){return this.affordGeometricSeries_core(r(t),r(e),r(n),i)},l.sumGeometricSeries=function(t,e,n,i){return this.sumGeometricSeries_core(t,r(e),r(n),i)},l.affordArithmeticSeries=function(t,e,n,i){return this.affordArithmeticSeries_core(r(t),r(e),r(n),r(i))},l.sumArithmeticSeries=function(t,e,n,i){return this.sumArithmeticSeries_core(r(t),r(e),r(n),r(i))},l.efficiencyOfPurchase=function(t,e,n){return this.efficiencyOfPurchase_core(r(t),r(e),r(n))},l.randomDecimalForTesting=function(t){if(20*Math.random()<1)return i(0,0,0);var e=Math.random()>.5?1:-1;if(20*Math.random()<1)return i(e,0,1);var r=Math.floor(Math.random()*(t+1)),a=0===r?616*Math.random()-308:16*Math.random();Math.random()>.9&&(a=Math.trunc(a));var o=Math.pow(10,a);return Math.random()>.9&&(o=Math.trunc(o)),n(e,r,o)},l.affordGeometricSeries_core=function(t,e,r,n){var i=e.mul(r.pow(n));return l.floor(t.div(i).mul(r.sub(1)).add(1).log10().div(r.log10()))},l.sumGeometricSeries_core=function(t,e,r,n){return e.mul(r.pow(n)).mul(l.sub(1,r.pow(t))).div(l.sub(1,r))},l.affordArithmeticSeries_core=function(t,e,r,n){var i=e.add(n.mul(r)).sub(r.div(2)),a=i.pow(2);return i.neg().add(a.add(r.mul(t).mul(2)).sqrt()).div(r).floor()},l.sumArithmeticSeries_core=function(t,e,r,n){var i=e.add(n.mul(r));return t.div(2).mul(i.mul(2).plus(t.sub(1).mul(r)))},l.efficiencyOfPurchase_core=function(t,e,r){return t.div(e).add(t.div(r))},l.prototype.normalize=function(){if(0===this.sign||0===this.mag&&0===this.layer)return this.sign=0,this.mag=0,this.layer=0,this;if(0===this.layer&&this.mag<0&&(this.mag=-this.mag,this.sign=-this.sign),0===this.layer&&this.mag<1/9e15)return this.layer+=1,this.mag=Math.log10(this.mag),this;var e=Math.abs(this.mag),r=Math.sign(this.mag);if(e>=9e15)return this.layer+=1,this.mag=r*Math.log10(e),this;for(;e<t&&this.layer>0;)this.layer-=1,0===this.layer?this.mag=Math.pow(10,this.mag):(this.mag=r*Math.pow(10,e),e=Math.abs(this.mag),r=Math.sign(this.mag));return 0===this.layer&&(this.mag<0?(this.mag=-this.mag,this.sign=-this.sign):0===this.mag&&(this.sign=0)),this},l.prototype.fromComponents=function(t,e,r){return this.sign=t,this.layer=e,this.mag=r,this.normalize(),this},l.prototype.fromComponents_noNormalize=function(t,e,r){return this.sign=t,this.layer=e,this.mag=r,this},l.prototype.fromMantissaExponent=function(t,e){return this.layer=1,this.sign=Math.sign(t),t=Math.abs(t),this.mag=e+Math.log10(t),this.normalize(),this},l.prototype.fromMantissaExponent_noNormalize=function(t,e){return this.fromMantissaExponent(t,e),this},l.prototype.fromDecimal=function(t){return this.sign=t.sign,this.layer=t.layer,this.mag=t.mag,this},l.prototype.fromNumber=function(t){return this.mag=Math.abs(t),this.sign=Math.sign(t),this.layer=0,this.normalize(),this},l.prototype.fromString=function(t){var e=(t=t.replace(",","")).split("^^^");if(2===e.length){var i=parseFloat(e[0]),a=parseFloat(e[1]),o=1;if(2===(c=e[1].split(";")).length&&(o=parseFloat(c[1]),isFinite(o)||(o=1)),isFinite(i)&&isFinite(a)){var u=l.pentate(i,a,o);return this.sign=u.sign,this.layer=u.layer,this.mag=u.mag,this}}var c,h=t.split("^^");if(2===h.length&&(i=parseFloat(h[0]),a=parseFloat(h[1]),2===(c=h[1].split(";")).length&&(o=parseFloat(c[1]),isFinite(o)||(o=1)),isFinite(i)&&isFinite(a)))return u=l.tetrate(i,a,o),this.sign=u.sign,this.layer=u.layer,this.mag=u.mag,this;var g,p=t.split("^");if(2===p.length){i=parseFloat(p[0]);var m=parseFloat(p[1]);if(isFinite(i)&&isFinite(m))return u=l.pow(i,m),this.sign=u.sign,this.layer=u.layer,this.mag=u.mag,this}if(2===(g=(t=t.trim().toLowerCase()).split("pt")).length&&(i=10,a=parseFloat(g[0]),g[1]=g[1].replace("(",""),g[1]=g[1].replace(")",""),o=parseFloat(g[1]),isFinite(o)||(o=1),isFinite(i)&&isFinite(a)))return u=l.tetrate(i,a,o),this.sign=u.sign,this.layer=u.layer,this.mag=u.mag,this;if(2===(g=t.split("p")).length&&(i=10,a=parseFloat(g[0]),g[1]=g[1].replace("(",""),g[1]=g[1].replace(")",""),o=parseFloat(g[1]),isFinite(o)||(o=1),isFinite(i)&&isFinite(a)))return u=l.tetrate(i,a,o),this.sign=u.sign,this.layer=u.layer,this.mag=u.mag,this;var f=t.split("e"),d=f.length-1;if(0===d){var y=parseFloat(t);if(isFinite(y))return this.fromNumber(y)}else if(1===d&&(y=parseFloat(t),isFinite(y)&&0!==y))return this.fromNumber(y);var v=t.split("e^");if(2===v.length){this.sign=1,"-"==v[0].charAt(0)&&(this.sign=-1);for(var b="",M=0;M<v[1].length;++M){var w=v[1].charCodeAt(M);if(!(w>=43&&w<=57||101===w))return this.layer=parseFloat(b),this.mag=parseFloat(v[1].substr(M+1)),this.normalize(),this;b+=v[1].charAt(M)}}if(d<1)return this.sign=0,this.layer=0,this.mag=0,this;var N=parseFloat(f[0]);if(0===N)return this.sign=0,this.layer=0,this.mag=0,this;if(m=parseFloat(f[f.length-1]),d>=2){var _=parseFloat(f[f.length-2]);isFinite(_)&&(m*=Math.sign(_),m+=s(_))}if(isFinite(N))if(1===d)this.sign=Math.sign(N),this.layer=1,this.mag=m+Math.log10(Math.abs(N));else{if(this.sign=Math.sign(N),this.layer=d,2===d)return u=l.mul(n(1,2,m),r(N)),this.sign=u.sign,this.layer=u.layer,this.mag=u.mag,this;this.mag=m}else this.sign="-"===f[0]?-1:1,this.layer=d,this.mag=m;return this.normalize(),this},l.prototype.fromValue=function(t){return o(t,l)?this.fromDecimal(t):"number"==typeof t?this.fromNumber(t):"string"==typeof t?this.fromString(t):(this.sign=0,this.layer=0,this.mag=0,this)},l.prototype.toNumber=function(){return Number.isFinite(this.layer)?0===this.layer?this.sign*this.mag:1===this.layer?this.sign*Math.pow(10,this.mag):this.mag>0?this.sign>0?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0:Number.NaN},l.prototype.mantissaWithDecimalPlaces=function(t){return isNaN(this.m)?Number.NaN:0===this.m?0:a(this.m,t)},l.prototype.magnitudeWithDecimalPlaces=function(t){return isNaN(this.mag)?Number.NaN:0===this.mag?0:a(this.mag,t)},l.prototype.toString=function(){return 0===this.layer?this.mag<1e21&&this.mag>1e-7||0===this.mag?(this.sign*this.mag).toString():this.m+"e"+this.e:1===this.layer?this.m+"e"+this.e:this.layer<=5?(-1===this.sign?"-":"")+"e".repeat(this.layer)+this.mag:(-1===this.sign?"-":"")+"(e^"+this.layer+")"+this.mag},l.prototype.toExponential=function(t){return 0===this.layer?(this.sign*this.mag).toExponential(t):this.toStringWithDecimalPlaces(t)},l.prototype.toFixed=function(t){return 0===this.layer?(this.sign*this.mag).toFixed(t):this.toStringWithDecimalPlaces(t)},l.prototype.toPrecision=function(t){return this.e<=-7?this.toExponential(t-1):t>this.e?this.toFixed(t-this.exponent-1):this.toExponential(t-1)},l.prototype.valueOf=function(){return this.toString()},l.prototype.toJSON=function(){return this.toString()},l.prototype.toStringWithDecimalPlaces=function(t){return 0===this.layer?this.mag<1e21&&this.mag>1e-7||0===this.mag?(this.sign*this.mag).toFixed(t):a(this.m,t)+"e"+a(this.e,t):1===this.layer?a(this.m,t)+"e"+a(this.e,t):this.layer<=5?(-1===this.sign?"-":"")+"e".repeat(this.layer)+a(this.mag,t):(-1===this.sign?"-":"")+"(e^"+this.layer+")"+a(this.mag,t)},l.prototype.abs=function(){return i(0===this.sign?0:1,this.layer,this.mag)},l.prototype.neg=function(){return i(-this.sign,this.layer,this.mag)},l.prototype.negate=function(){return this.neg()},l.prototype.negated=function(){return this.neg()},l.prototype.sign=function(){return this.sign},l.prototype.sgn=function(){return this.sign},l.prototype.round=function(){return this.mag<0?l.dZero:0===this.layer?n(this.sign,0,Math.round(this.mag)):this},l.prototype.floor=function(){return this.mag<0?l.dZero:0===this.layer?n(this.sign,0,Math.floor(this.mag)):this},l.prototype.ceil=function(){return this.mag<0?l.dZero:0===this.layer?n(this.sign,0,Math.ceil(this.mag)):this},l.prototype.trunc=function(){return this.mag<0?l.dZero:0===this.layer?n(this.sign,0,Math.trunc(this.mag)):this},l.prototype.add=function(t){var e,a,o=r(t);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(o.layer))return o;if(0===this.sign)return o;if(0===o.sign)return this;if(this.sign===-o.sign&&this.layer===o.layer&&this.mag===o.mag)return i(0,0,0);if(this.layer>=2||o.layer>=2)return this.maxabs(o);if(l.cmpabs(this,o)>0?(e=this,a=o):(e=o,a=this),0===e.layer&&0===a.layer)return r(e.sign*e.mag+a.sign*a.mag);var s=e.layer*Math.sign(e.mag),u=a.layer*Math.sign(a.mag);if(s-u>=2)return e;if(0===s&&-1===u){if(Math.abs(a.mag-Math.log10(e.mag))>17)return e;var c=Math.pow(10,Math.log10(e.mag)-a.mag),h=a.sign+e.sign*c;return n(Math.sign(h),1,a.mag+Math.log10(Math.abs(h)))}return 1===s&&0===u?Math.abs(e.mag-Math.log10(a.mag))>17?e:(c=Math.pow(10,e.mag-Math.log10(a.mag)),h=a.sign+e.sign*c,n(Math.sign(h),1,Math.log10(a.mag)+Math.log10(Math.abs(h)))):Math.abs(e.mag-a.mag)>17?e:(c=Math.pow(10,e.mag-a.mag),h=a.sign+e.sign*c,n(Math.sign(h),1,a.mag+Math.log10(Math.abs(h))))},l.prototype.plus=function(t){return this.add(t)},l.prototype.sub=function(t){return this.add(r(t).neg())},l.prototype.subtract=function(t){return this.sub(t)},l.prototype.minus=function(t){return this.sub(t)},l.prototype.mul=function(t){var e,a,o=r(t);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(o.layer))return o;if(0===this.sign||0===o.sign)return i(0,0,0);if(this.layer===o.layer&&this.mag===-o.mag)return i(this.sign*o.sign,0,1);if(this.layer>o.layer||this.layer==o.layer&&Math.abs(this.mag)>Math.abs(o.mag)?(e=this,a=o):(e=o,a=this),0===e.layer&&0===a.layer)return r(e.sign*a.sign*e.mag*a.mag);if(e.layer>=3||e.layer-a.layer>=2)return n(e.sign*a.sign,e.layer,e.mag);if(1===e.layer&&0===a.layer)return n(e.sign*a.sign,1,e.mag+Math.log10(a.mag));if(1===e.layer&&1===a.layer)return n(e.sign*a.sign,1,e.mag+a.mag);if(2===e.layer&&1===a.layer){var s=n(Math.sign(e.mag),e.layer-1,Math.abs(e.mag)).add(n(Math.sign(a.mag),a.layer-1,Math.abs(a.mag)));return n(e.sign*a.sign,s.layer+1,s.sign*s.mag)}if(2===e.layer&&2===a.layer)return s=n(Math.sign(e.mag),e.layer-1,Math.abs(e.mag)).add(n(Math.sign(a.mag),a.layer-1,Math.abs(a.mag))),n(e.sign*a.sign,s.layer+1,s.sign*s.mag);throw Error("Bad arguments to mul: "+this+", "+t)},l.prototype.multiply=function(t){return this.mul(t)},l.prototype.times=function(t){return this.mul(t)},l.prototype.div=function(t){var e=r(t);return this.mul(e.recip())},l.prototype.divide=function(t){return this.div(t)},l.prototype.divideBy=function(t){return this.div(t)},l.prototype.dividedBy=function(t){return this.div(t)},l.prototype.recip=function(){return 0===this.mag?l.dNaN:0===this.layer?n(this.sign,0,1/this.mag):n(this.sign,this.layer,-this.mag)},l.prototype.reciprocal=function(){return this.recip()},l.prototype.reciprocate=function(){return this.recip()},l.prototype.cmp=function(t){var e=r(t);return this.sign>e.sign?1:this.sign<e.sign?-1:this.sign*this.cmpabs(t)},l.prototype.cmpabs=function(t){var e=r(t),n=this.mag>0?this.layer:-this.layer,i=e.mag>0?e.layer:-e.layer;return n>i?1:n<i?-1:this.mag>e.mag?1:this.mag<e.mag?-1:0},l.prototype.compare=function(t){return this.cmp(t)},l.prototype.eq=function(t){var e=r(t);return this.sign===e.sign&&this.layer===e.layer&&this.mag===e.mag},l.prototype.equals=function(t){return this.eq(t)},l.prototype.neq=function(t){return!this.eq(t)},l.prototype.notEquals=function(t){return this.neq(t)},l.prototype.lt=function(t){return r(t),-1===this.cmp(t)},l.prototype.lte=function(t){return!this.gt(t)},l.prototype.gt=function(t){return r(t),1===this.cmp(t)},l.prototype.gte=function(t){return!this.lt(t)},l.prototype.max=function(t){var e=r(t);return this.lt(e)?e:this},l.prototype.min=function(t){var e=r(t);return this.gt(e)?e:this},l.prototype.maxabs=function(t){var e=r(t);return this.cmpabs(e)<0?e:this},l.prototype.minabs=function(t){var e=r(t);return this.cmpabs(e)>0?e:this},l.prototype.clamp=function(t,e){return this.max(t).min(e)},l.prototype.clampMin=function(t){return this.max(t)},l.prototype.clampMax=function(t){return this.min(t)},l.prototype.cmp_tolerance=function(t,e){var n=r(t);return this.eq_tolerance(n,e)?0:this.cmp(n)},l.prototype.compare_tolerance=function(t,e){return this.cmp_tolerance(t,e)},l.prototype.eq_tolerance=function(t,e){var n=r(t);if(null==e&&(e=1e-7),this.sign!==n.sign)return!1;if(Math.abs(this.layer-n.layer)>1)return!1;var i=this.mag,a=n.mag;return this.layer>n.layer&&(a=s(a)),this.layer<n.layer&&(i=s(i)),Math.abs(i-a)<=e*Math.max(Math.abs(i),Math.abs(a))},l.prototype.equals_tolerance=function(t,e){return this.eq_tolerance(t,e)},l.prototype.neq_tolerance=function(t,e){return!this.eq_tolerance(t,e)},l.prototype.notEquals_tolerance=function(t,e){return this.neq_tolerance(t,e)},l.prototype.lt_tolerance=function(t,e){var n=r(t);return!this.eq_tolerance(n,e)&&this.lt(n)},l.prototype.lte_tolerance=function(t,e){var n=r(t);return this.eq_tolerance(n,e)||this.lt(n)},l.prototype.gt_tolerance=function(t,e){var n=r(t);return!this.eq_tolerance(n,e)&&this.gt(n)},l.prototype.gte_tolerance=function(t,e){var n=r(t);return this.eq_tolerance(n,e)||this.gt(n)},l.prototype.pLog10=function(){return this.lt(l.dZero)?l.dZero:this.log10()},l.prototype.absLog10=function(){return 0===this.sign?l.dNaN:this.layer>0?n(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):n(1,0,Math.log10(this.mag))},l.prototype.log10=function(){return this.sign<=0?l.dNaN:this.layer>0?n(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):n(this.sign,0,Math.log10(this.mag))},l.prototype.log=function(t){return t=r(t),this.sign<=0||t.sign<=0||1===t.sign&&0===t.layer&&1===t.mag?l.dNaN:0===this.layer&&0===t.layer?n(this.sign,0,Math.log(this.mag)/Math.log(t.mag)):l.div(this.log10(),t.log10())},l.prototype.log2=function(){return this.sign<=0?l.dNaN:0===this.layer?n(this.sign,0,Math.log2(this.mag)):1===this.layer?n(Math.sign(this.mag),0,3.321928094887362*Math.abs(this.mag)):2===this.layer?n(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):n(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))},l.prototype.ln=function(){return this.sign<=0?l.dNaN:0===this.layer?n(this.sign,0,Math.log(this.mag)):1===this.layer?n(Math.sign(this.mag),0,2.302585092994046*Math.abs(this.mag)):2===this.layer?n(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):n(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))},l.prototype.logarithm=function(t){return this.log(t)},l.prototype.pow=function(t){var e=this,n=r(t);if(0===e.sign)return e;if(1===e.sign&&0===e.layer&&1===e.mag)return e;if(0===n.sign)return i(1,0,1);if(1===n.sign&&0===n.layer&&1===n.mag)return e;var a=e.absLog10().mul(n).pow10();return-1===this.sign&&n.toNumber()%2==1?a.neg():a},l.prototype.pow10=function(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return l.dNaN;var t=this;if(0===t.layer){var e=Math.pow(10,t.sign*t.mag);if(Number.isFinite(e)&&Math.abs(e)>.1)return n(1,0,e);if(0===t.sign)return l.dOne;t=i(t.sign,t.layer+1,Math.log10(t.mag))}return t.sign>0&&t.mag>0?n(t.sign,t.layer+1,t.mag):t.sign<0&&t.mag>0?n(-t.sign,t.layer+1,-t.mag):l.dOne},l.prototype.pow_base=function(t){return r(t).pow(this)},l.prototype.root=function(t){var e=r(t);return this.pow(e.recip())},l.prototype.factorial=function(){return this.mag<0?this.toNumber().add(1).gamma():0===this.layer?this.add(1).gamma():1===this.layer?l.exp(l.mul(this,l.ln(this).sub(1))):l.exp(this)},l.prototype.gamma=function(){if(this.mag<0)return this.recip();if(0===this.layer){if(this.lt(i(1,0,24)))return r(function(t){if(!isFinite(t))return t;if(t<-50)return t===Math.trunc(t)?Number.NEGATIVE_INFINITY:0;for(var e=1;t<10;)e*=t,++t;var r=.9189385332046727;r+=(.5+(t-=1))*Math.log(t),r-=t;var n=t*t,i=t;return r+=1/(12*i),r+=1/(360*(i*=n)),r+=1/(1260*(i*=n)),r+=1/(1680*(i*=n)),r+=1/(1188*(i*=n)),r+=691/(360360*(i*=n)),r+=7/(1092*(i*=n)),r+=3617/(122400*(i*=n)),Math.exp(r)/e}(this.sign*this.mag));var t=this.mag-1,e=.9189385332046727;e+=(t+.5)*Math.log(t);var n=t*t,a=t,o=12*a,s=1/o,u=(e-=t)+s;if(u===e)return l.exp(e);if((u=(e=u)-(s=1/(o=360*(a*=n))))===e)return l.exp(e);e=u;var c=1/(o=1260*(a*=n));return e+=c,e-=c=1/(o=1680*(a*=n)),l.exp(e)}return 1===this.layer?l.exp(l.mul(this,l.ln(this).sub(1))):l.exp(this)},l.prototype.lngamma=function(){return this.gamma().ln()},l.prototype.exp=function(){return this.mag<0?l.dOne:0===this.layer&&this.mag<=709.7?r(Math.exp(this.sign*this.mag)):0===this.layer?n(1,1,this.sign*Math.log10(Math.E)*this.mag):1===this.layer?n(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):n(1,this.layer+1,this.sign*this.mag)},l.prototype.sqr=function(){return this.pow(2)},l.prototype.sqrt=function(){if(0===this.layer)return r(Math.sqrt(this.sign*this.mag));if(1===this.layer)return n(1,2,Math.log10(this.mag)-.3010299956639812);var t=l.div(i(this.sign,this.layer-1,this.mag),i(1,0,2));return t.layer+=1,t.normalize(),t},l.prototype.cube=function(){return this.pow(3)},l.prototype.cbrt=function(){return this.pow(1/3)},l.prototype.tetrate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i(1,0,1);if(t===Number.POSITIVE_INFINITY){var n=l.ln(this).neg();return n.lambertw().div(n)}if(t<0)return l.iteratedlog(e,this,-t);e=r(e);var a=t-(t=Math.trunc(t));0!==a&&(e.eq(l.dOne)?(++t,e=new l(a)):e=this.eq(10)?e.layeradd10(a):e.layeradd(a,this));for(var o=0;o<t;++o){if(e=this.pow(e),!isFinite(e.layer)||!isFinite(e.mag))return e;if(e.layer-this.layer>3)return i(e.sign,e.layer+(t-o-1),e.mag);if(o>100)return e}return e},l.prototype.iteratedexp=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i(1,0,1);return this.tetrate(t,e)},l.prototype.iteratedlog=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(e<0)return l.tetrate(t,-e,this);t=r(t);var n=r(this),i=e-(e=Math.trunc(e));if(n.layer-t.layer>3){var a=Math.min(e,n.layer-t.layer-3);e-=a,n.layer-=a}for(var o=0;o<e;++o){if(n=n.log(t),!isFinite(n.layer)||!isFinite(n.mag))return n;if(o>100)return n}return i>0&&i<1&&(n=t.eq(10)?n.layeradd10(-i):n.layeradd(-i,t)),n},l.prototype.slog=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;if(this.mag<0)return l.dNegOne;t=r(t);var e=0,n=r(this);if(n.layer-t.layer>3){var i=n.layer-t.layer-3;e+=i,n.layer-=i}for(var a=0;a<100;++a)if(n.lt(l.dZero))n=l.pow(t,n),e-=1;else{if(n.lte(l.dOne))return r(e+n.toNumber()-1);e+=1,n=l.log(n,t)}return r(e)},l.prototype.layeradd10=function(t){t=l.fromValue_noAlloc(t).toNumber();var e,n=r(this);if(t>=1&&(t-=e=Math.trunc(t),n.layer+=e),t<=-1&&(t-=e=Math.trunc(t),n.layer+=e,n.layer<0))for(var i=0;i<100;++i){if(n.layer++,n.mag=Math.log10(n.mag),!isFinite(n.mag))return n;if(n.layer>=0)break}if(t>0){for(var a=0;Number.isFinite(n.mag)&&n.mag<10;)n.mag=Math.pow(10,n.mag),++a;for(n.mag>1e10&&(n.mag=Math.log10(n.mag),n.layer++),(o=Math.log10(Math.log(1e10)/Math.log(n.mag),10))<t&&(n.mag=Math.log10(1e10),n.layer++,t-=o),n.mag=Math.pow(n.mag,Math.pow(10,t));a>0;)n.mag=Math.log10(n.mag),--a}else if(t<0){for(a=0;Number.isFinite(n.mag)&&n.mag<10;)n.mag=Math.pow(10,n.mag),++a;var o;for(n.mag>1e10&&(n.mag=Math.log10(n.mag),n.layer++),(o=Math.log10(1/Math.log10(n.mag)))>t&&(n.mag=1e10,n.layer--,t-=o),n.mag=Math.pow(n.mag,Math.pow(10,t));a>0;)n.mag=Math.log10(n.mag),--a}for(;n.layer<0;)n.layer++,n.mag=Math.log10(n.mag);return n.normalize(),n},l.prototype.layeradd=function(t,e){var r=this.slog(e).toNumber()+t;return r>=0?l.tetrate(e,r):Number.isFinite(r)?r>=-1?l.log(l.tetrate(e,r+1),e):void l.log(l.log(l.tetrate(e,r+2),e),e):l.dNaN},l.prototype.lambertw=function(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");return this.mag<0?r(u(this.toNumber())):0===this.layer?r(u(this.sign*this.mag)):1===this.layer||2===this.layer?c(this):this.layer>=3?i(this.sign,this.layer-1,this.mag):void 0};var c=function(t){var e,r,n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e-10;if(!Number.isFinite(t.mag))return t;if(0===t)return t;if(1===t)return.5671432904097838;l.abs(t),e=l.ln(t);for(var o=0;o<100;++o){if(r=l.exp(-e),n=e.sub(t.mul(r)),i=e.sub(n.div(e.add(1).sub(e.add(2).mul(n).div(l.mul(2,e).add(2))))),l.abs(i.sub(e)).lt(l.abs(i).mul(a)))return i;e=i}throw Error("Iteration failed to converge: "+t)};return l.prototype.ssqrt=function(){if(1==this.sign&&this.layer>=3)return i(this.sign,this.layer-1,this.mag);var t=this.ln();return t.div(t.lambertw())},l.prototype.pentate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i(1,0,1);e=r(e);var n=t-(t=Math.trunc(t));0!==n&&(e.eq(l.dOne)?(++t,e=new l(n)):e=this.eq(10)?e.layeradd10(n):e.layeradd(n,this));for(var a=0;a<t;++a){if(e=this.tetrate(e),!isFinite(e.layer)||!isFinite(e.mag))return e;if(a>10)return e}return e},l.prototype.sin=function(){return this.mag<0?this:0===this.layer?r(Math.sin(this.sign*this.mag)):i(0,0,0)},l.prototype.cos=function(){return this.mag<0?l.dOne:0===this.layer?r(Math.cos(this.sign*this.mag)):i(0,0,0)},l.prototype.tan=function(){return this.mag<0?this:0===this.layer?r(Math.tan(this.sign*this.mag)):i(0,0,0)},l.prototype.asin=function(){return this.mag<0?this:0===this.layer?r(Math.asin(this.sign*this.mag)):i(Number.NaN,Number.NaN,Number.NaN)},l.prototype.acos=function(){return this.mag<0?r(Math.acos(this.toNumber())):0===this.layer?r(Math.acos(this.sign*this.mag)):i(Number.NaN,Number.NaN,Number.NaN)},l.prototype.atan=function(){return this.mag<0?this:0===this.layer?r(Math.atan(this.sign*this.mag)):r(Math.atan(1/0*this.sign))},l.prototype.sinh=function(){return this.exp().sub(this.negate().exp()).div(2)},l.prototype.cosh=function(){return this.exp().add(this.negate().exp()).div(2)},l.prototype.tanh=function(){return this.sinh().div(this.cosh())},l.prototype.asinh=function(){return l.ln(this.add(this.sqr().add(1).sqrt()))},l.prototype.acosh=function(){return l.ln(this.add(this.sqr().sub(1).sqrt()))},l.prototype.atanh=function(){return this.abs().gte(1)?i(Number.NaN,Number.NaN,Number.NaN):l.ln(this.add(1).div(r(1).sub(this))).div(2)},l.prototype.ascensionPenalty=function(t){return 0===t?this:this.root(l.pow(10,t))},l.prototype.egg=function(){return this.add(9)},l.prototype.lessThanOrEqualTo=function(t){return this.cmp(t)<1},l.prototype.lessThan=function(t){return this.cmp(t)<0},l.prototype.greaterThanOrEqualTo=function(t){return this.cmp(t)>-1},l.prototype.greaterThan=function(t){return this.cmp(t)>0},l}();return l.dZero=i(0,0,0),l.dOne=i(1,0,1),l.dNegOne=i(-1,0,1),l.dTwo=i(1,0,2),l.dTen=i(1,0,10),l.dNaN=i(Number.NaN,Number.NaN,Number.NaN),l.dInf=i(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),l.dNegInf=i(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),l.dNumberMax=n(1,0,Number.MAX_VALUE),l.dNumberMin=n(1,0,Number.MIN_VALUE),l}))},"8c8f":function(t,e,r){},a031:function(t,e,r){},bba9:function(t,e,r){},c991:function(t,e,r){},ca07:function(t,e,r){},cb11:function(t,e,r){},d041:function(t,e,r){"use strict";r("8c8f")},e4fe:function(t,e,r){"use strict";r("bba9")},e65f:function(t,e,r){"use strict";r("6cb0")}});
//# sourceMappingURL=app.2e06b19f.js.map