=s*1e3&&(++f,c.exponent-=fi(g),c.exponent+=(-3+Math.log10(1+a/2))*(r-g)),g=Math.floor(s*5e3),r>=s*5e3&&(++f,c.exponent-=fi(g),c.exponent+=(gi[10+a*10]+1)*(r-g-1)+1),g=Math.floor(s*2e4),r>=s*2e4&&(f+=3,c.exponent-=fi(g)*3,c.exponent+=(gi[100+100*a]+5)*(r-g)),g=Math.floor(s*25e4),r>=s*25e4&&(c.exponent+=Math.log10(1.03)*(r-g)*((r-g+1)/2)),c.exponent+=fi(r)*f;let h=0;e.currentChallenge.transcension===4&&(n==="Coin"||n==="Diamonds")&&(++h,r>=1e3-10*e.challengecompletions[4]&&(p+=r*(r+1)/2)),e.currentChallenge.reincarnation===10&&(n==="Coin"||n==="Diamonds")&&(++h,r>=s*25e3&&(p+=r*(r+1)/2)),c.exponent+=h*((fi(r+100)-iC+2*r)*(1.25+e.challengecompletions[4]/4)),c.exponent+=gi[1.25]*p,g=Math.floor(s*1e3*e.challengecompletions[8]),e.currentChallenge.reincarnation===8&&(n==="Coin"||n==="Diamonds"||n==="Mythos")&&r>=1e3*e.challengecompletions[8]*s&&(c.exponent+=(gi[2]*((r-g+1)/2)-gi[1+e.challengecompletions[8]/2])*(r-g));let b=c.exponent-Math.floor(c.exponent);if(c.exponent=Math.floor(c.exponent),c.mantissa*=Math.pow(10,b),c.normalize(),r>l){let M=Yr(t,l,n,a,s).pow(Math.pow(r/l,1/.125)),D=M.exponent-Math.floor(M.exponent);return M.exponent=Math.floor(M.exponent),M.mantissa*=Math.pow(10,D),M.normalize(),m.max(c,M)}return c},nh=(t,r)=>{let n=r==="Coin"?cC:r==="Diamonds"?uC:rh,a=r==="Coin"?t:t*(t+1)/2;return[n[t-1],a]},ah=(t,r,n,a)=>{let[s,l]=nh(t,r);return Yr(s,n,r,l,a!=null?a:cc())},Rt=(t,r)=>{let n=t-1,a=o.ordinals[n],[s,l]=nh(t,r),c=Math.pow(10,15),p=1e99,f=cc(),g=sh[r][0],h=`${a}Owned${r}`,b=e[h];if(b>=c){let H=m.log10(e[g]),I=m.log10(Yr(s,c,r,l,f)),_=Math.floor(c*Math.max(1,Math.pow(H/I,.125))),L=c;for(;_-L>.5;){let j=Math.floor(L+(_-L)/2);if(j===L||j===_)break;e[g].gte(Yr(s,j,r,l,f))?L=j:_=j}let P=L,F=Yr(s,P,r,l,f);e[h]=P,e[`${a}Cost${r}`]=F;return}let y=b+Ie(b),C=1,M=Yr(s,b+C,r,l,f);if(M.exponent>=p||!e[g].gte(M))return;for(;M.exponent=Ie(C);)Yr(s,b+C-D,r,l,f).lte(e[g])?D=Math.floor(D/2):C=C-Math.max(Ie(C),D);if(b+C>=c){e[h]=c,e[`${a}Cost${r}`]=Yr(s,c,r,l,f);return}let $=Math.max(b+C-6-Ie(C),y),k=Yr(s,$,r,l,f);for(;$<=b+C&&e[g].gte(k);)e[g]=e[g].sub(k),e[h]=$,$=$+Ie($),k=Yr(s,$,r,l,f),e[`${a}Cost${r}`]=k},sh={Diamonds:["prestigePoints","crystal"],Mythos:["transcendPoints","mythos"],Particles:["reincarnationPoints","particle"],Coin:["coins","coin"]},oh=(t,r,n,a)=>{let[s,l]=sh[r],c=a?500:e[`${l}buyamount`],p=1;p+=o.rune4level*o.effectiveLevelMult/160,p+=(e.researches[56]+e.researches[57]+e.researches[58]+e.researches[59]+e.researches[60])/200,p+=K("transcend",e.challengecompletions[4])/200,p+=3*(o.bonusant7+e.antUpgrades[7-1])/100;let f=`${t}Cost${r}`,g=`${t}Owned${r}`;for(;e[s].gte(e[f])&&o.ticker=1e3*p&&(e[f]=e[f].times(e[g]).dividedBy(1e3).times(1+n/2)),e[g]>=5e3*p&&(e[f]=e[f].times(e[g]).times(10).times(10+n*10)),e[g]>=2e4*p&&(e[f]=e[f].times(m.pow(e[g],3)).times(1e5).times(100+n*100)),e[g]>=25e4*p&&(e[f]=e[f].times(m.pow(1.03,e[g]-25e4*p))),e.currentChallenge.transcension===4&&(r==="Coin"||r==="Diamonds")&&(e[f]=e[f].times(Math.pow(100*e[g]+1e4,1.25+1/4*e.challengecompletions[4])),e[g]>=1e3-10*e.challengecompletions[4]&&(e[f]=e[f].times(m.pow(1.25,e[g])))),e.currentChallenge.reincarnation===8&&(r==="Coin"||r==="Diamonds"||r==="Mythos")&&e[g]>=1e3*e.challengecompletions[8]*p&&(e[f]=e[f].times(m.pow(2,(e[g]-1e3*e.challengecompletions[8]*p)/(1+e.challengecompletions[8]/2)))),o.ticker+=1;o.ticker=0},xr=(t,r,n)=>{let a=t;e[a].gte(m.pow(10,o.upgradeCosts[r]))&&e.upgrades[r]===0&&(e[a]=e[a].sub(m.pow(10,o.upgradeCosts[r])),e.upgrades[r]=1,ir(r,n)),t==="transcendPoints"&&(e.reincarnatenocoinprestigeortranscendupgrades=!1,e.reincarnatenocoinprestigetranscendorgeneratorupgrades=!1),t==="prestigePoints"&&(e.transcendnocoinorprestigeupgrades=!1,e.reincarnatenocoinorprestigeupgrades=!1,e.reincarnatenocoinprestigeortranscendupgrades=!1,e.reincarnatenocoinprestigetranscendorgeneratorupgrades=!1),t==="coins"&&(e.prestigenocoinupgrades=!1,e.transcendnocoinupgrades=!1,e.transcendnocoinorprestigeupgrades=!1,e.reincarnatenocoinupgrades=!1,e.reincarnatenocoinorprestigeupgrades=!1,e.reincarnatenocoinprestigeortranscendupgrades=!1,e.reincarnatenocoinprestigetranscendorgeneratorupgrades=!1)},dC=t=>{let r=t-1,n=m.log(e.prestigeShards.add(1),10);return Math.floor(Math.pow(Math.max(0,2*(n-o.crystalUpgradesCost[r])/o.crystalUpgradeCostIncrement[r]+1/4),1/2)+1/2)},gr=(t,r=!1)=>{let n=t-1,a=0;a+=Math.floor(o.rune3level/16*o.effectiveLevelMult)*100/100,e.upgrades[73]>.5&&e.currentChallenge.reincarnation!==0&&(a+=10);let s=dC(t);s+a>e.crystalUpgrades[n]&&(e.crystalUpgrades[n]=100/100*(s+a),s>0&&(e.prestigeShards=e.prestigeShards.sub(m.pow(10,o.crystalUpgradesCost[n]+o.crystalUpgradeCostIncrement[n]*(1/2*Math.pow(s-1/2,2)-1/8))),r||yl(t)))},fs=t=>{let r=1;if(e.upgrades[46]===1&&(r=t?9999:e.coinbuyamount),e.upgrades[46]<1){for(;e.prestigePoints.gte(e.acceleratorBoostCost)&&o.ticker1e3*(1+2*o.effectiveRuneBlessingPower[4])&&(e.acceleratorBoostCost=e.acceleratorBoostCost.times(m.pow(10,Math.pow(e.acceleratorBoostBought-1e3*(1+2*o.effectiveRuneBlessingPower[4]),2)/(1+2*o.effectiveRuneBlessingPower[4])))),e.transcendnoaccelerator=!1,e.reincarnatenoaccelerator=!1,e.upgrades[46]<.5)){for(let n=21;n<41;n++)e.upgrades[n]=0;Fe("prestige"),e.prestigePoints=new m(0)}}else{let n=e.acceleratorBoostBought,a=Math.pow(10,15);if(n>=a){let b=m.log10(e.prestigePoints),y=m.log10(wn(a)),C=Math.floor(a*Math.max(1,Math.pow(b/y,.125))),M=a;for(;C-M>.5;){let k=Math.floor(M+(C-M)/2);if(k===M||k===C)break;e.prestigePoints.gte(wn(k))?M=k:C=k}let D=M,$=wn(D);e.acceleratorBoostBought=D,e.acceleratorBoostCost=$;return}let s=n+Ie(n),l=1,c=wn(n+l);for(;e.prestigePoints.gte(c);)l*=4,c=wn(n+l);let p=Math.floor(l/8);for(;p>=Ie(l);)wn(n+l-p).lte(e.prestigePoints)?p=Math.floor(p/2):l=l-Math.max(Ie(l),p);let f=Math.max(n+l-6-Ie(l),s),g=wn(e.acceleratorBoostBought);for(;f<=n+l&&e.prestigePoints.gte(wn(f));)if(e.prestigePoints=e.prestigePoints.sub(g),f>=a&&(f=a),e.acceleratorBoostBought=f,f=f+Ie(f),g=wn(f),e.acceleratorBoostCost=g,e.transcendnoaccelerator=!1,e.reincarnatenoaccelerator=!1,f>=a)return}o.ticker=0,e.acceleratorBoostBought>=2&&e.achievements[162]===0&&Q(162),e.acceleratorBoostBought>=10&&e.achievements[163]===0&&Q(163),e.acceleratorBoostBought>=50&&e.achievements[164]===0&&Q(164),e.acceleratorBoostBought>=200&&e.achievements[165]===0&&Q(165),e.acceleratorBoostBought>=1e3&&e.achievements[166]===0&&Q(166),e.acceleratorBoostBought>=5e3&&e.achievements[167]===0&&Q(167),e.acceleratorBoostBought>=15e3&&e.achievements[168]===0&&Q(168)},wn=(t=1)=>{t--;let r=Math.pow(10,15),n=new m(1e3),a=1+2*o.effectiveRuneBlessingPower[4],s=p=>p*(p+1)/2,l=p=>p*(p+1)*(2*p+1)/6,c=n;if(t>1e3*a?c=n.times(m.pow(10,10*t+s(t)+l(t-1e3*a)/a)):c=n.times(m.pow(10,10*t+s(t))),t>r){let g=wn(r).pow(Math.pow(t/r,1/.125)),h=g.exponent-Math.floor(g.exponent);return g.exponent=Math.floor(g.exponent),g.mantissa*=Math.pow(10,h),g.normalize(),m.max(c,g)}return c},Hn=(t,r)=>{--r,t=new m(t);let n=t.times(m.pow(2,r)),a=e.currentChallenge.ascension!==15?325e3:1e3;r>a&&(n=n.times(m.pow(1.001,(r-a)*((r-a+1)/2))));let s=Math.pow(10,15);if(r>s){let p=Hn(t,s).pow(Math.pow(r/s,1/.125)),f=p.exponent-Math.floor(p.exponent);return p.exponent=Math.floor(p.exponent),p.mantissa*=Math.pow(10,f),p.normalize(),m.max(n,p)}return n},Fn=(t,r=!1)=>{let n=t-1,a=rh[n],s=o.ordinals[n],l=`${s}OwnedParticles`,c=e[l],p=Math.pow(10,15);if(c>=p){let D=m.log10(e.reincarnationPoints),$=m.log10(Hn(a,p)),k=Math.floor(p*Math.max(1,Math.pow(D/$,.125))),E=p;for(;k-E>.5;){let _=Math.floor(E+(k-E)/2);if(_===E||_===k)break;e.reincarnationPoints.gte(Hn(a,_))?E=_:k=_}let H=E,I=Hn(a,H);e[l]=H,e[`${s}CostParticles`]=I;return}let f=c+Ie(c),g=f,h=Hn(a,g);for(;e.reincarnationPoints.gte(h);)g=g*4,h=Hn(a,g);let b=Math.floor(g/8);for(;b>=Ie(g);)Hn(a,g-b).lte(e.reincarnationPoints)?b=Math.floor(b/2):g=g-Math.max(Ie(g),b);r||e.particlebuyamount+c{let n=t.map((s,l)=>{if(s===null)return null;let c=Math.ceil(Math.pow(r/ps[l],1/3)-1);return Math.max(s,c)}),a=0;for(let s=0;s{let n=null;for(let g=0;gr)return t;let a=n,s=a*2;for(;xd(t,s)[0]<=r;)a=s,s*=2;for(;s-a>.5;){let g=a+(s-a)/2;if(g===a||g===s)break;xd(t,g)[0]<=r?a=g:s=g}let[l,c]=xd(t,a),p=r-l,f=c.map((g,h)=>g===null?null:ps[h]*Math.pow(g+1,3));for(let g=1;g<=5;g++){let h=null;for(let b=0;b{r!=null||(r=e.tesseractbuyamount),a!=null||(a=e[`ascendBuilding${t}`].owned);let s=ps[t-1],l=s*Math.pow(a*(a+1)/2,2),c;if(n){let f=Math.floor(-.5+.5*Math.pow(1+8*Math.pow((Number(e.wowTesseracts)+l)/s,.5),.5));c=Math.min(f,a+r)}else c=a+r;let p=s*Math.pow(c*(c+1)/2,2)-l;return[c,p]},us=(t,r=e.tesseractbuyamount)=>{let n=ps[t-1],a=`ascendBuilding${t}`,[s,l]=pC(t,r);e[a].owned=s,e.wowTesseracts.sub(l),e[a].cost=n*Math.pow(1+s,3)},ao=(t,r)=>{if((t==="Spirits"?e.challengecompletions[12]>0:e.achievements[134]===1)&&isFinite(e.runeshards)&&e.runeshards>0){let a,s,l;t==="Spirits"?(a=o.spiritBaseCost,s=e.runeSpiritLevels[r],l=e.runeSpiritBuyAmount):(a=o.blessingBaseCost,s=e.runeBlessingLevels[r],l=e.runeBlessingBuyAmount);let[c,p]=la(s,a,e.runeshards,l);t==="Spirits"?e.runeSpiritLevels[r]=c:e.runeBlessingLevels[r]=c,e.runeshards-=p,e.runeshards<0&&(e.runeshards=0),ih(t,r)}},ih=(t,r)=>{if(r===1){let n=[0,1e5,1e8,1e11];for(let a=1;a<=3;a++)e.runeBlessingLevels[1]>=n[a]&&e.achievements[231+a]<1&&Q(231+a),e.runeSpiritLevels[1]>=10*n[a]&&e.achievements[234+a]<1&&Q(234+a);e.runeBlessingLevels[1]>=1e22&&e.achievements[245]<1&&Q(245)}if(Md(),t==="Blessings"){let n=[0,8,10,6.66,2,1],a=r===5?1:0;i(`runeBlessingPower${r}Value1`).innerHTML=u.t("runes.blessings.blessingPower",{reward:u.t(`runes.blessings.rewards.${r-1}`),value:d(o.runeBlessings[r]),speed:d(1-a+n[r]*o.effectiveRuneBlessingPower[r],4,!0)})}else if(t==="Spirits"){let n=[0,1,1,20,1,100];n[r]*=ht()/400;let a=r===3?1:0;i(`runeSpiritPower${r}Value1`).innerHTML=u.t("runes.spirits.spiritPower",{reward:u.t(`runes.spirits.rewards.${r-1}`),value:d(o.runeSpirits[r]),speed:d(1-a+n[r]*o.effectiveRuneSpiritPower[r],4,!0)})}},so=(t,r=100,n=!1)=>{if(t==="Spirits"?e.challengecompletions[12]>0:e.achievements[134]===1){let s=Math.floor(e.runeshards/100*r/5);for(let l=1;l<6;l++)if(isFinite(e.runeshards)&&e.runeshards>0){let c,p;t==="Spirits"?(c=o.spiritBaseCost,p=e.runeSpiritLevels[l]):(c=o.blessingBaseCost,p=e.runeBlessingLevels[l]);let[g,h]=la(p,c,s,1e300);g>p&&(!n||(g-p)*1e4>p)&&(t==="Spirits"?e.runeSpiritLevels[l]=g:e.runeBlessingLevels[l]=g,e.runeshards-=h,e.runeshards<0&&(e.runeshards=0),ih(t,l))}}};var uc=new Map([["A",["Buy Accelerators",()=>ro(),!1]],["B",["Boost Accelerator",()=>fs(),!1]],["C",["Auto Challenge",()=>{lh()},!1]],["E",["Exit T / R Challenge",()=>{e.autoChallengeRunning?lh():ch()},!1]],["M",["Multipliers",()=>no(),!1]],["N",["No (Cancel)",()=>bd(!1),!0]],["P",["Reset Prestige",()=>Qe("prestige"),!1]],["R",["Reset Reincarnate",()=>Qe("reincarnation"),!1]],["S",["Sacrifice Ants",()=>oo(),!1]],["T",["Reset Transcend",()=>Qe("transcension"),!1]],["Y",["Yes (OK)",()=>bd(!0),!0]],["ARROWLEFT",["Back a tab",()=>mi(-1),!1]],["ARROWRIGHT",["Next tab",()=>mi(1),!1]],["ARROWUP",["Back a subtab",()=>mi(-1,!0),!1]],["ARROWDOWN",["Next subtab",()=>mi(1,!0),!1]],["SHIFT+A",["Reset Ascend",()=>Qe("ascension"),!1]],["SHIFT+C",["Cleanse Corruptions",()=>$n(10,999),!1]],["SHIFT+D",["Spec. Action Add x1",()=>Qn("add",1),!1]],["SHIFT+E",["Exit Asc. Challenge",()=>Qe("ascensionChallenge"),!1]],["SHIFT+O",["Use Off. Potion",()=>In("offeringPotion"),!1]],["SHIFT+P",["Use Obt. Potion",()=>In("obtainiumPotion"),!1]],["SHIFT+S",["Reset Singularity",()=>Qe("singularity"),!1]],["CTRL+B",["Un-hide Tabs",()=>gt.reappend(),!1]]]),kd=!1,Lt=new Map(uc),lh=()=>{e.researches[150]>0&&(ui(),e.autoChallengeRunning||ch())},ch=()=>{e.currentChallenge.reincarnation!==0&&Qe("reincarnationChallenge",void 0,!0),e.currentChallenge.transcension!==0&&Qe("transcensionChallenge",void 0,!0)},fC=t=>{var s;if(!kd||!e.toggles[39])return;if(((s=document.activeElement)==null?void 0:s.localName)==="input"){t.stopPropagation();return}dh(t,t.code.replace(/^(Digit|Numpad)/,"").toUpperCase());let r="";t.ctrlKey&&(r+="CTRL+"),t.shiftKey&&(r+="SHIFT+"),t.altKey&&(r+="ALT+");let n=r+t.key.toUpperCase();if(n==="TAB"&&t.preventDefault(),n!=="ENTER"&&i("transparentBG").style.display==="block"&&Lt.has(n)&&!Lt.get(n)[2])return;let a="";Lt.has(n)&&(a=`${Lt.get(n)[0]}`,Lt.get(n)[1](),t.preventDefault()),o.currentTab===10&&e.subtabNumber===6&&(i("lastHotkey").textContent=n,i("lastHotkeyName").textContent=a)},gC=(t,r)=>{let n=document.createElement("div");n.classList.add("hotkeyItem");let a=document.createElement("span");a.id="actualHotkey",a.textContent=t,a.addEventListener("click",async l=>{var b,y,C;let c=l.target,p=c.textContent.toUpperCase(),f=(C=(b=Lt.get(p))==null?void 0:b[0])!=null?C:(y=c.nextSibling)==null?void 0:y.textContent,g=await je(`
+Type -1 in Buy: ANY to buy equal amounts of both Potions.`:"";if(e.shopBuyMaxToggle==="ANY"&&!c){let b=await je(`You can afford to purchase up to ${p} of ${ns(t)} for ${l.toLocaleString()} Quarks. How many would you like to buy?${g+f}`),y;if(Number(b)===-1&&r.type==="consume"){let M=t==="offeringPotion"?"obtainiumPotion":"offeringPotion",D=Math.max(+e.worlds/2,+e.worlds-l),$=wr(e.shopUpgrades[M],Te[M].price,D,Te[M].priceIncrease/Te[M].price,Te[M].maxLevel-e.shopUpgrades[M]);e.worlds.sub($.cost),e.shopUpgrades[M]=$.levelCanBuy,y=s}else{if(y=Math.floor(Number(b)),y===0)return;if(Number.isNaN(y)||!Number.isFinite(y)||y<0)return B("Amount must be a finite, positive integer.")}let C=wr(e.shopUpgrades[t],r.price,+e.worlds,r.priceIncrease/r.price,Math.min(y,s));e.worlds.sub(C.cost),e.shopUpgrades[t]=C.levelCanBuy,Ve(),o.ambrosiaCurrStats.ambrosiaLuck=rt().value,o.ambrosiaCurrStats.ambrosiaAdditiveLuckMult=hn().value,o.ambrosiaCurrStats.ambrosiaGenerationSpeed=tt().value;return}let h=!0;(e.shopConfirmationToggle||!r.refundable&&e.shopBuyMaxToggle!==!1)&&(h=await Ne(`You are about to ${c?"unlock":`purchase ${p} of`} ${ns(t)} for ${l.toLocaleString()} Quarks. Press 'OK' to finalize purchase.${g+f}`)),h&&(e.worlds.sub(l),e.shopUpgrades[t]+=s,o.ambrosiaCurrStats.ambrosiaLuck=rt().value,o.ambrosiaCurrStats.ambrosiaAdditiveLuckMult=hn().value,o.ambrosiaCurrStats.ambrosiaGenerationSpeed=tt().value,Ve())};var In=async(t,r=!1,n=1,a=!0)=>{let s=_e.AUTO_POTION_FREE_POTIONS_QOL;if(e.shopConfirmationToggle&&!r?await Ne("Would you like to use some of this potion?"):!0){let c=+e.singularityUpgrades.potionBuff.getEffect().bonus*+e.singularityUpgrades.potionBuff2.getEffect().bonus*+e.singularityUpgrades.potionBuff3.getEffect().bonus*+e.octeractUpgrades.octeractAutoPotionEfficiency.getEffect().bonus*n;t==="offeringPotion"?s&&r?(e.runeshards+=Math.floor(7200*e.offeringpersecond*st().mult*c),e.runeshards=Math.min(1e300,e.runeshards)):(e.shopUpgrades.offeringPotion>=n||!a)&&(e.shopUpgrades.offeringPotion-=a?n:0,e.runeshards+=Math.floor(7200*e.offeringpersecond*st().mult*c),e.runeshards=Math.min(1e300,e.runeshards)):t==="obtainiumPotion"&&(s&&r?(e.researchPoints+=Math.floor(7200*e.maxobtainiumpersecond*st().mult*c),e.researchPoints=Math.min(1e300,e.researchPoints)):(e.shopUpgrades.obtainiumPotion>=n||!a)&&(e.shopUpgrades.obtainiumPotion-=a?n:0,e.researchPoints+=Math.floor(7200*e.maxobtainiumpersecond*st().mult*c),e.researchPoints=Math.min(1e300,e.researchPoints)))}},Pl=async(t=!1)=>{let r=!1;if(t||(r=e.shopConfirmationToggle?await Ne("This will fully refund most of your permanent upgrades for an upfront cost of 15 Quarks. Would you like to do this?"):!0),r||t){let n=e.quarksThisSingularity,a=!1;for(let s in Te){let l=s,c=Te[l];if(c.refundable&&e.shopUpgrades[l]>c.refundMinimumLevel){a=!0;let p=c.price*c.refundMinimumLevel+c.priceIncrease*c.refundMinimumLevel*(c.refundMinimumLevel-1)/2;e.worlds.add(c.price*e.shopUpgrades[l]+c.priceIncrease*e.shopUpgrades[l]*(e.shopUpgrades[l]-1)/2-p,!1),e.shopUpgrades[l]=c.refundMinimumLevel}}a?e.worlds.sub(15):!t&&e.shopConfirmationToggle&&B("Nothing to Refund!"),e.quarksThisSingularity=n}};var Ws=t=>{switch(t){case"offeringPotion":return!0;case"obtainiumPotion":return!0;case"offeringEX":return e.reincarnationCount>0||e.highestSingularityCount>0;case"offeringAuto":return e.reincarnationCount>0||e.highestSingularityCount>0;case"obtainiumEX":return e.reincarnationCount>0||e.highestSingularityCount>0;case"obtainiumAuto":return e.reincarnationCount>0||e.highestSingularityCount>0;case"instantChallenge":return e.reincarnationCount>0||e.highestSingularityCount>0;case"antSpeed":return e.highestchallengecompletions[8]>0||e.ascensionCount>0||e.highestSingularityCount>0;case"cashGrab":return e.highestchallengecompletions[8]>0||e.ascensionCount>0||e.highestSingularityCount>0;case"shopTalisman":return e.highestchallengecompletions[9]>0||e.ascensionCount>0||e.highestSingularityCount>0;case"seasonPass":return e.ascensionCount>0||e.highestSingularityCount>0;case"challengeExtension":return e.ascensionCount>0||e.highestSingularityCount>0;case"challengeTome":return e.ascensionCount>0||e.highestSingularityCount>0;case"cubeToQuark":return e.ascensionCount>0||e.highestSingularityCount>0;case"tesseractToQuark":return e.highestchallengecompletions[11]>0||e.highestSingularityCount>0;case"hypercubeToQuark":return e.highestchallengecompletions[13]>0||e.highestSingularityCount>0;case"seasonPass2":return e.highestchallengecompletions[14]>0||e.highestSingularityCount>0;case"seasonPass3":return e.highestchallengecompletions[14]>0||e.highestSingularityCount>0;case"chronometer":return e.highestchallengecompletions[12]>0||e.highestSingularityCount>0;case"infiniteAscent":return e.highestchallengecompletions[14]>0||e.highestSingularityCount>0;case"calculator":return e.ascensionCount>0||e.highestSingularityCount>0;case"calculator2":return e.highestchallengecompletions[11]>0||e.highestSingularityCount>0;case"calculator3":return e.highestchallengecompletions[13]>0||e.highestSingularityCount>0;case"calculator4":return!!e.singularityUpgrades.wowPass.getEffect().bonus;case"calculator5":return!!e.singularityUpgrades.wowPass2.getEffect().bonus;case"calculator6":return!!e.singularityUpgrades.wowPass3.getEffect().bonus;case"calculator7":return!!e.singularityChallenges.limitedAscensions.rewards.shopUpgrade;case"constantEX":return e.highestchallengecompletions[14]>0||e.highestSingularityCount>0;case"powderEX":return e.challenge15Exponent>=1e15||e.highestSingularityCount>0;case"chronometer2":return e.challenge15Exponent>=1e15||e.highestSingularityCount>0;case"chronometer3":return!!e.singularityUpgrades.wowPass.getEffect().bonus;case"seasonPassY":return e.challenge15Exponent>=1e15||e.highestSingularityCount>0;case"seasonPassZ":return!!e.singularityUpgrades.wowPass.getEffect().bonus;case"challengeTome2":return!!e.singularityUpgrades.wowPass.getEffect().bonus;case"instantChallenge2":return!!e.singularityUpgrades.wowPass.getEffect().bonus;case"cashGrab2":return!!e.singularityUpgrades.wowPass2.getEffect().bonus;case"cubeToQuarkAll":return!!e.singularityUpgrades.wowPass2.getEffect().bonus;case"chronometerZ":return!!e.singularityUpgrades.wowPass2.getEffect().bonus;case"offeringEX2":return!!e.singularityUpgrades.wowPass2.getEffect().bonus;case"obtainiumEX2":return!!e.singularityUpgrades.wowPass2.getEffect().bonus;case"powderAuto":return!!e.singularityUpgrades.wowPass2.getEffect().bonus;case"seasonPassLost":return!!e.singularityUpgrades.wowPass2.getEffect().bonus;case"challenge15Auto":return!!e.singularityUpgrades.wowPass3.getEffect().bonus;case"extraWarp":return!!e.singularityUpgrades.wowPass3.getEffect().bonus;case"autoWarp":return!!e.singularityUpgrades.wowPass3.getEffect().bonus;case"improveQuarkHept":return e.challenge15Exponent>=1e15||e.highestSingularityCount>0;case"improveQuarkHept2":return!!e.singularityUpgrades.wowPass.getEffect().bonus;case"improveQuarkHept3":return!!e.singularityUpgrades.wowPass2.getEffect().bonus;case"improveQuarkHept4":return!!e.singularityUpgrades.wowPass3.getEffect().bonus;case"shopImprovedDaily":return e.highestchallengecompletions[14]>0||e.highestSingularityCount>0;case"shopImprovedDaily2":return!!e.singularityUpgrades.wowPass.getEffect().bonus;case"shopImprovedDaily3":return!!e.singularityUpgrades.wowPass2.getEffect().bonus;case"shopImprovedDaily4":return!!e.singularityUpgrades.wowPass3.getEffect().bonus;case"offeringEX3":return!!e.singularityUpgrades.wowPass4.getEffect().bonus;case"obtainiumEX3":return!!e.singularityUpgrades.wowPass4.getEffect().bonus;case"improveQuarkHept5":return!!e.singularityUpgrades.wowPass4.getEffect().bonus;case"chronometerInfinity":return!!e.singularityUpgrades.wowPass4.getEffect().bonus;case"seasonPassInfinity":return!!e.singularityUpgrades.wowPass4.getEffect().bonus;case"shopSingularityPenaltyDebuff":return!!e.singularityChallenges.noSingularityUpgrades.rewards.shopUpgrade;case"shopAmbrosiaLuckMultiplier4":return!!e.singularityChallenges.oneChallengeCap.rewards.shopUpgrade;case"shopOcteractAmbrosiaLuck":return!!e.singularityChallenges.noOcteracts.rewards.shopUpgrade;case"shopAmbrosiaGeneration1":return!!e.singularityUpgrades.wowPass2.getEffect().bonus;case"shopAmbrosiaGeneration2":return!!e.singularityUpgrades.wowPass3.getEffect().bonus;case"shopAmbrosiaGeneration3":return!!e.singularityUpgrades.wowPass4.getEffect().bonus;case"shopAmbrosiaGeneration4":return!!e.singularityUpgrades.wowPass4.getEffect().bonus;case"shopAmbrosiaLuck1":return!!e.singularityUpgrades.wowPass2.getEffect().bonus;case"shopAmbrosiaLuck2":return!!e.singularityUpgrades.wowPass3.getEffect().bonus;case"shopAmbrosiaLuck3":return!!e.singularityUpgrades.wowPass4.getEffect().bonus;case"shopAmbrosiaLuck4":return!!e.singularityUpgrades.wowPass4.getEffect().bonus;case"shopCashGrabUltra":return!!e.singularityChallenges.noSingularityUpgrades.rewards.shopUpgrade2;case"shopAmbrosiaAccelerator":return!!e.singularityChallenges.noAmbrosiaUpgrades.rewards.shopUpgrade;case"shopEXUltra":return!!e.singularityChallenges.noAmbrosiaUpgrades.rewards.shopUpgrade2;case"shopChronometerS":return!!e.singularityChallenges.limitedTime.rewards.tier1Upgrade;case"shopAmbrosiaUltra":return!!e.singularityChallenges.limitedTime.rewards.tier2Upgrade;case"shopSingularitySpeedup":return!!e.singularityChallenges.sadisticPrequel.rewards.shopUpgrade;case"shopSingularityPotency":return!!e.singularityChallenges.sadisticPrequel.rewards.shopUpgrade2;case"shopSadisticRune":return!!e.singularityChallenges.sadisticPrequel.rewards.shopUpgrade3}};var qg={shard:{obtainium:1e13,offerings:100},commonFragment:{obtainium:1e14,offerings:1e4},uncommonFragment:{obtainium:1e16,offerings:1e5},rareFragment:{obtainium:1e18,offerings:1e6},epicFragment:{obtainium:1e20,offerings:1e7},legendaryFragment:{obtainium:1e22,offerings:1e8},mythicalFragment:{obtainium:1e24,offerings:1e9}},Zu=["One","Two","Three","Four","Five","Six","Seven"],Xo=t=>{let r=30*e.talismanRarity[t];return r+=6*K("ascension",e.challengecompletions[13]),r+=Math.floor(e.researches[200]/400),t===6&&(r+=_e.INSTANT_UNLOCK_1?10:0),e.cubeUpgrades[67]>0&&t===3&&(r+=1337),r},jg=(t,r=e.buyTalismanShardPercent)=>{let n=qg[t].obtainium,a=qg[t].offerings,s=Math.max(1,Math.floor(e.researchPoints/n)),l=Math.max(1,Math.floor(e.runeshards/a)),c=Math.max(1,Math.floor(r/100*Math.min(s,l)));return{canBuy:n<=e.researchPoints&&a<=e.runeshards,buyAmount:c,obtainiumCost:n*c,offeringCost:a*c}},Ol=(t,r=e.buyTalismanShardPercent)=>{let n=i("talismanFragmentCost");if(t){let a=jg(t,r),s=u.t(`runes.talismans.shards.${t}`);n.textContent=u.t("runes.talismans.costToBuy",{name:s,buyAmount:d(a.buyAmount),obtainium:d(a.obtainiumCost),offerings:d(a.offeringCost)})}else n.textContent=u.t("runes.talismans.clickBuyEveryType")},zs=(t=e.buyTalismanShardPercent)=>{i("talismanTen").style.backgroundColor="",i("talismanTwentyFive").style.backgroundColor="",i("talismanFifty").style.backgroundColor="",i("talismanHundred").style.backgroundColor="",e.buyTalismanShardPercent=t;let r="Ten";t===25&&(r="TwentyFive"),t===50&&(r="Fifty"),t===100&&(r="Hundred"),i(`talisman${r}`).style.backgroundColor="green"},fr=()=>{i("talismanShardInventory").textContent=d(e.talismanShards),i("commonFragmentInventory").textContent=d(e.commonFragments),i("uncommonFragmentInventory").textContent=d(e.uncommonFragments),i("rareFragmentInventory").textContent=d(e.rareFragments),i("epicFragmentInventory").textContent=d(e.epicFragments),i("legendaryFragmentInventory").textContent=d(e.legendaryFragments),i("mythicalFragmentInventory").textContent=d(e.mythicalFragments)},Ul=()=>{let t=["shard","commonFragment","uncommonFragment","rareFragment","epicFragment","legendaryFragment","mythicalFragment"];for(let r=t.length-1;r>=0;r--)Yu(t[r])},Yu=(t,r=e.buyTalismanShardPercent)=>{let n=jg(t,r);n.canBuy&&(t==="shard"?e.talismanShards+=n.buyAmount:e[`${t}s`]+=n.buyAmount,t==="mythicalFragment"&&e.mythicalFragments>=1e25&&e.achievements[239]<1&&Q(239),e.researchPoints-=n.obtainiumCost,e.runeshards-=n.offeringCost,e.researchPoints<0&&(e.researchPoints=0),e.runeshards<0&&(e.runeshards=0)),Ol(t,r),fr()},Bl=t=>{i("talismanlevelup").style.display="none",i("talismanEffect").style.display="block",i("talismanrespec").style.display="none";let r=i("talismanSummary"),n=i("talismanBonus"),a=i("talismanRune1Effect"),s=i("talismanRune2Effect"),l=i("talismanRune3Effect"),c=i("talismanRune4Effect"),p=i("talismanRune5Effect"),f=i("talismanMythicEffect"),g="",h="";switch(t){case 0:g="exemption",h=d(10*(e.talismanRarity[0]-1));break;case 1:g="chronos",h=d(10*(e.talismanRarity[1]-1));break;case 2:g="midas",h=d(10*(e.talismanRarity[2]-1));break;case 3:g="metaphysics",h=d(.02*(e.talismanRarity[3]-1),2);break;case 4:g="polymath",h=d(1*(e.talismanRarity[4]-1));break;case 5:g="mortuus",h=d(2*(e.talismanRarity[5]-1));break;case 6:g="plastic";break}let b=`talisman${t+1}Effect`;r.textContent=u.t(`runes.talismans.summaries.${g}`),n.textContent=u.t(`runes.talismans.effects.${g}`,{x:h}),a.textContent=u.t("runes.talismans.bonusRuneLevels.speed",{x:d(o[b][1],2,!0)}),s.textContent=u.t("runes.talismans.bonusRuneLevels.duplication",{x:d(o[b][2],2,!0)}),l.textContent=u.t("runes.talismans.bonusRuneLevels.prism",{x:d(o[b][3],2,!0)}),c.textContent=u.t("runes.talismans.bonusRuneLevels.thrift",{x:d(o[b][4],2,!0)}),p.textContent=u.t("runes.talismans.bonusRuneLevels.SI",{x:d(o[b][5],2,!0)}),f.textContent=u.t(`runes.talismans.mythicEffects.${g}`),e.talismanRarity[t]!==6&&(f.textContent=u.t("runes.talismans.maxEnhance"))},Ju=t=>{i("talismanEffect").style.display="none",i("talismanlevelup").style.display="block",i("talismanrespec").style.display="none";let r=i("talismanShardCost"),n=i("talismanCommonFragmentCost"),a=i("talismanUncommonFragmentCost"),s=i("talismanRareFragmentCost"),l=i("talismanEpicFragmentCost"),c=i("talismanLegendaryFragmentCost"),p=i("talismanMythicalFragmentCost");i("talismanLevelUpSummary").textContent=u.t("runes.resourcesToLevelup"),i("talismanLevelUpSummary").style.color="silver";let f=o.talismanLevelCostMultiplier[t];e.talismanLevels[t]>=120&&(f*=(e.talismanLevels[t]-90)/30),e.talismanLevels[t]>=150&&(f*=(e.talismanLevels[t]-120)/30),e.talismanLevels[t]>=180&&(f*=(e.talismanLevels[t]-170)/10),r.textContent=d(f*Math.max(0,Math.floor(1+1/8*Math.pow(e.talismanLevels[t],3)))),n.textContent=d(f*Math.max(0,Math.floor(1+1/32*Math.pow(e.talismanLevels[t]-30,3)))),a.textContent=d(f*Math.max(0,Math.floor(1+1/384*Math.pow(e.talismanLevels[t]-60,3)))),s.textContent=d(f*Math.max(0,Math.floor(1+1/500*Math.pow(e.talismanLevels[t]-90,3)))),l.textContent=d(f*Math.max(0,Math.floor(1+1/375*Math.pow(e.talismanLevels[t]-120,3)))),c.textContent=d(f*Math.max(0,Math.floor(1+1/192*Math.pow(e.talismanLevels[t]-150,3)))),p.textContent=d(f*Math.max(0,Math.floor(1+1/1280*Math.pow(e.talismanLevels[t]-150,3))))},ed=t=>{i("talismanEffect").style.display="none",i("talismanlevelup").style.display="block",i("talismanrespec").style.display="none";let r=i("talismanShardCost"),n=i("talismanCommonFragmentCost"),a=i("talismanUncommonFragmentCost"),s=i("talismanRareFragmentCost"),l=i("talismanEpicFragmentCost"),c=i("talismanLegendaryFragmentCost"),p=i("talismanMythicalFragmentCost");i("talismanLevelUpSummary").textContent=u.t("runes.resourcesToEnhance"),i("talismanLevelUpSummary").style.color="gold";let f=[o.commonTalismanEnhanceCost,o.uncommonTalismanEnchanceCost,o.rareTalismanEnchanceCost,o.epicTalismanEnhanceCost,o.legendaryTalismanEnchanceCost,o.mythicalTalismanEnchanceCost],g=e.talismanRarity[t],h=f[g-1],b=o.talismanLevelCostMultiplier[t];r.textContent=d(b*h[1]),n.textContent=d(b*h[2]),a.textContent=d(b*h[3]),s.textContent=d(b*h[4]),l.textContent=d(b*h[5]),c.textContent=d(b*h[6]),p.textContent=d(b*h[7])},td=t=>{o.talismanRespec=t,i("talismanEffect").style.display="none",i("talismanlevelup").style.display="none",i("talismanrespec").style.display="block";let r=["speed","duplication","prism","thrift","SI"],n=["positive","positive","positive","positive","positive"];if(t<=6){for(let a=1;a<=5;a++)o.mirrorTalismanStats[a]=e[`talisman${Zu[t]}`][a];i("confirmTalismanRespec").textContent=u.t("runes.talismans.respecConfirm")}if(t===7){for(let a=1;a<=5;a++)o.mirrorTalismanStats[a]=1;i("confirmTalismanRespec").textContent=u.t("runes.talismans.respecConfirmAll")}for(let a=1;a<=5;a++){let s=i(`talismanRespecButton${a}`);o.mirrorTalismanStats[a]===1?(s.style.border="2px solid limegreen",n[a-1]="positive"):o.mirrorTalismanStats[a]===-1&&(s.style.border="2px solid crimson",n[a-1]="negative"),s.textContent=u.t(`runes.talismans.modifiers.${n[a-1]}`,{name:u.t(`runes.names.${r[a-1]}`)})}i("confirmTalismanRespec").style.display="none"},Vg=t=>{let r=[null,"speed","duplication","prism","thrift","SI"],n=i(`talismanRespecButton${t}`);o.mirrorTalismanStats[t]===1?(o.mirrorTalismanStats[t]=-1,n.textContent=u.t("runes.talismans.modifiers.negative",{name:u.t(`runes.names.${r[t]}`)}),n.style.border="2px solid crimson"):(o.mirrorTalismanStats[t]=1,n.textContent=u.t("runes.talismans.modifiers.positive",{name:u.t(`runes.names.${r[t]}`)}),n.style.border="2px solid limegreen"),o.mirrorTalismanStats.reduce((s,l)=>s+l,0)===1?i("confirmTalismanRespec").style.display="block":i("confirmTalismanRespec").style.display="none"},Wg=t=>{if(e.runeshards>=1e5&&t<7){for(let r=1;r<=5;r++)e[`talisman${Zu[t]}`][r]=o.mirrorTalismanStats[r];e.runeshards-=1e5,i("confirmTalismanRespec").style.display="none",i("talismanrespec").style.display="none",i("talismanEffect").style.display="block",Bl(t)}else if(e.runeshards>=4e5&&t===7){e.runeshards-=4e5;for(let r=0;r<7;r++)for(let n=1;n<=5;n++)e[`talisman${Zu[r]}`][n]=o.mirrorTalismanStats[n];i("confirmTalismanRespec").style.display="none"}nt()},zg=t=>{i("talismanrespec").style.display="none",t<7&&(i("talismanEffect").style.display="block",Bl(t))},Ut=t=>{let r=i(`talisman${t+1}`),n=i(`talisman${t+1}level`),a=e.talismanRarity[t];a===1&&(r.style.border="4px solid white",n.style.color="white"),a===2&&(r.style.border="4px solid limegreen",n.style.color="limegreen"),a===3&&(r.style.border="4px solid lightblue",n.style.color="lightblue"),a===4&&(r.style.border="4px solid plum",n.style.color="plum"),a===5&&(r.style.border="4px solid orange",n.style.color="orange"),a===6&&(r.style.border="4px solid crimson",n.style.color="var(--crimson-text-color)")},Rl=(t,r=!1)=>{let n=1;e.ascensionCount>0&&(n=30),e.highestSingularityCount>0&&(n=180);let a=!1;for(let s=1;s<=n;s++){let l=0,c=o.talismanLevelCostMultiplier[t];if(e.talismanLevels[t]>=120&&(c*=(e.talismanLevels[t]-90)/30),e.talismanLevels[t]>=150&&(c*=(e.talismanLevels[t]-120)/30),e.talismanLevels[t]>=180&&(c*=(e.talismanLevels[t]-170)/10),e.talismanLevels[t]=c*Math.max(0,Math.floor(1+1/8*Math.pow(e.talismanLevels[t],3)))&&l++,e.commonFragments>=c*Math.max(0,Math.floor(1+1/32*Math.pow(e.talismanLevels[t]-30,3)))&&l++,e.uncommonFragments>=c*Math.max(0,Math.floor(1+1/384*Math.pow(e.talismanLevels[t]-60,3)))&&l++,e.rareFragments>=c*Math.max(0,Math.floor(1+1/500*Math.pow(e.talismanLevels[t]-90,3)))&&l++,e.epicFragments>=c*Math.max(0,Math.floor(1+1/375*Math.pow(e.talismanLevels[t]-120,3)))&&l++,e.legendaryFragments>=c*Math.max(0,Math.floor(1+1/192*Math.pow(e.talismanLevels[t]-150,3)))&&l++,e.mythicalFragments>=c*Math.max(0,Math.floor(1+1/1280*Math.pow(e.talismanLevels[t]-150,3)))&&l++),l===7)e.talismanShards-=c*Math.max(0,Math.floor(1+1/8*Math.pow(e.talismanLevels[t],3))),e.commonFragments-=c*Math.max(0,Math.floor(1+1/32*Math.pow(e.talismanLevels[t]-30,3))),e.uncommonFragments-=c*Math.max(0,Math.floor(1+1/384*Math.pow(e.talismanLevels[t]-60,3))),e.rareFragments-=c*Math.max(0,Math.floor(1+1/500*Math.pow(e.talismanLevels[t]-90,3))),e.epicFragments-=c*Math.max(0,Math.floor(1+1/375*Math.pow(e.talismanLevels[t]-120,3))),e.legendaryFragments-=c*Math.max(0,Math.floor(1+1/192*Math.pow(e.talismanLevels[t]-150,3))),e.mythicalFragments-=c*Math.max(0,Math.floor(1+1/1280*Math.pow(e.talismanLevels[t]-150,3))),e.talismanLevels[t]+=1,a=!0;else break}return!r&&a&&(Ju(t),fr(),nt()),a},Il=(t,r=!1)=>{let n=0;if(e.talismanRarity[t]<6){let a=o.talismanLevelCostMultiplier[t],s=[o.commonTalismanEnhanceCost,o.uncommonTalismanEnchanceCost,o.rareTalismanEnchanceCost,o.epicTalismanEnhanceCost,o.legendaryTalismanEnchanceCost,o.mythicalTalismanEnchanceCost],l=e.talismanRarity[t]-1,c=s[l];if(e.commonFragments>=a*c[2]&&n++,e.uncommonFragments>=a*c[3]&&n++,e.rareFragments>=a*c[4]&&n++,e.epicFragments>=a*c[5]&&n++,e.legendaryFragments>=a*c[6]&&n++,e.mythicalFragments>=a*c[7]&&n++,n===6)return e.commonFragments-=a*c[2],e.uncommonFragments-=a*c[3],e.rareFragments-=a*c[4],e.epicFragments-=a*c[5],e.legendaryFragments-=a*c[6],e.mythicalFragments-=a*c[7],e.talismanRarity[t]+=1,Ut(t),r||(ed(t),fr(),nt()),!0}return!1};var _l=(t=!1,r=1,n=!1)=>{var l;let a=i("theme"),s=document.body;n?(localStorage.setItem("theme",`${r}`),s.style.setProperty("--transition","750ms"),s.style.setProperty("--transition-extra","600ms")):r=Number((l=localStorage.getItem("theme"))!=null?l:1),t?r===4&&i("logo").setAttribute("src","Pictures/logoLight.png"):(s.style.removeProperty("--header-color"),s.style.removeProperty("--bg-color"),s.style.removeProperty("--alert-color"),s.style.removeProperty("--history-lines"),s.style.removeProperty("--text-color"),s.style.removeProperty("--green-text-color"),s.style.removeProperty("--lightseagreen-text-color"),s.style.removeProperty("--crimson-text-color"),s.style.removeProperty("--red-text-color"),s.style.removeProperty("--maroon-text-color"),s.style.removeProperty("--orchid-text-color"),s.style.removeProperty("--darkorchid-text-color"),s.style.removeProperty("--darkcyan-text-color"),s.style.removeProperty("--gray-text-color"),s.style.removeProperty("--orangered-text-color"),s.style.removeProperty("--box-color"),s.style.removeProperty("--boxmain-bordercolor"),s.style.removeProperty("--button-color"),s.style.removeProperty("--hover-color"),s.style.removeProperty("--blackbtn-color"),s.style.removeProperty("--purplebtn-color"),s.style.removeProperty("--purplehover-color"),s.style.removeProperty("--buttonbuy-color"),s.style.removeProperty("--buildings-canbuy-color"),s.style.removeProperty("--buildings-hover-color"),s.style.removeProperty("--blessings-canbuy-color"),s.style.removeProperty("--blessings-hover-color"),s.style.removeProperty("--tab-color"),s.style.removeProperty("--singtab-color"),s.style.removeProperty("--hoversing-color"),s.style.removeProperty("--shoptab-color"),s.style.removeProperty("--hovershop-color"),s.style.removeProperty("--hepteract-bar-empty"),s.style.removeProperty("--hepteract-bar-red"),s.style.removeProperty("--hepteract-bar-yellow"),s.style.removeProperty("--hepteract-bar-green"),s.classList.remove("textOutline"),i("actualPotionShop").style.backgroundColor="",i("actualPotionShop").style.borderColor="",i("themeBox").style.backgroundColor="",i("themeBox").style.borderColor="",i("c15Rewards").style.backgroundColor="",i("c15Rewards").style.borderColor="",i("platonicUpgradeDescriptions").style.backgroundColor="",i("platonicUpgradeDescriptions").style.borderColor="",i("platonicUpgradePics").style.backgroundColor="",i("platonicUpgradePics").style.borderColor="",i("actualShop").style.backgroundColor="",i("actualShop").style.borderColor="",i("corruptionStatsLoadouts").style.backgroundColor="",i("corruptionStatsLoadouts").style.borderColor="",i("heptGrid").style.backgroundColor="",i("heptGrid").style.borderColor="",i("exportgame").style.backgroundColor="",i("importFileButton").style.backgroundColor="",i("switchTheme2").style.borderColor="darkslategray",i("bonussummation").style.color="orangered",i("corruptionDescription").style.color="darkviolet",i("versionnumber").style.color="fuchsia",i("singularitytab").style.color="red",i("traitstab").style.color="red",i("cubetab").style.color="red",i("ascTimeAccel").style.color="royalblue",i("buildinghotkeys").style.color="lightgray",i("buildinghotkeys2").style.color="lightgray",i("antspecies").style.color="royalblue",i("achievementcolorcode2").style.color="purple",i("corruptionTesseracts").style.color="darkviolet",i("antwelcome").style.color="lightslategrey",i("confirmationToggleTitle").style.color="pink",i("specialActionsTitle").style.color="pink",i("themesTitle").style.color="pink",i("notationTitle").style.color="pink",i("hepteractWelcome").style.color="pink",i("confirmationdisclaimer").style.color="plum",i("cube6Bonus").style.color="brown",i("tesseract6Bonus").style.color="brown",i("hypercube6Bonus").style.color="brown",i("runeshowpower5").style.color="tomato",i("hypercubeWelcome").style.color="#ff004c",i("hypercubeQuantity").style.color="#ff004c",i("hypercubeBlessingsTotal").style.color="#ff004c"),r===1?(localStorage.removeItem("theme"),a.textContent="Dark Mode"):r===2?(s.style.setProperty("--header-color","black"),s.style.setProperty("--bg-color","#0c0c0f"),s.style.setProperty("--alert-color","#040406"),s.style.setProperty("--history-lines","#1b1b22"),s.style.setProperty("--box-color","#060606"),s.style.setProperty("--boxmain-bordercolor","#d487d4"),s.style.setProperty("--button-color","#040406"),s.style.setProperty("--hover-color","#1b1b22"),s.style.setProperty("--purplebtn-color","#6f006f"),s.style.setProperty("--buttonbuy-color","#040406"),s.style.setProperty("--buildings-canbuy-color","#2c2c44"),s.style.setProperty("--buildings-hover-color","#3a3a58"),s.style.setProperty("--blessings-canbuy-color","#262639"),s.style.setProperty("--blessings-hover-color","#33334e"),s.style.setProperty("--tab-color","black"),s.style.setProperty("--singtab-color","#002"),s.style.setProperty("--hoversing-color","#00007d"),s.style.setProperty("--shoptab-color","#6f006f"),s.style.setProperty("--hepteract-bar-empty","#3a3a58"),s.style.setProperty("--hepteract-bar-red","darkred"),s.style.setProperty("--hepteract-bar-yellow","#997a00"),s.style.setProperty("--hepteract-bar-green","darkgreen"),i("corruptionStatsLoadouts").style.borderColor="#dd8f00",i("actualPotionShop").style.borderColor="#dd0",i("exportgame").style.backgroundColor="black",i("importFileButton").style.backgroundColor="black",a.textContent="Darker Mode"):r===3?(s.style.setProperty("--header-color","#18171c"),s.style.setProperty("--bg-color","#1c1b22"),s.style.setProperty("--alert-color","#141319"),s.style.setProperty("--history-lines","#083a3a"),s.style.setProperty("--box-color","#141319"),s.style.setProperty("--boxmain-bordercolor","#dda0dd"),s.style.setProperty("--button-color","#101828"),s.style.setProperty("--hover-color","#006"),s.style.setProperty("--blackbtn-color","#101828"),s.style.setProperty("--buttonbuy-color","#0b111c"),s.style.setProperty("--buildings-canbuy-color","#2d4471"),s.style.setProperty("--buildings-hover-color","#3c5a95"),s.style.setProperty("--blessings-canbuy-color","#1e2e4d"),s.style.setProperty("--blessings-hover-color","#2d4471"),s.style.setProperty("--tab-color","#101828"),s.style.setProperty("--hoversing-color","#005"),s.style.setProperty("--hepteract-bar-empty","#535064"),i("corruptionStatsLoadouts").style.borderColor="#ffa500",i("actualPotionShop").style.borderColor="#dd0",i("actualShop").style.backgroundColor="#0c0c0f",i("actualShop").style.borderColor="#d487d4",i("platonicUpgradePics").style.backgroundColor="#0c0c0f",s.style.setProperty("--maroon-text-color","#a90000"),a.textContent="Lighter Dark Mode"):r===4?(s.classList.add("textOutline"),s.style.setProperty("--header-color","#736e8d"),s.style.setProperty("--bg-color","#7c7891"),s.style.setProperty("--alert-color","#646175"),s.style.setProperty("--history-lines","#156e71"),s.style.setProperty("--box-color","#646175"),s.style.setProperty("--boxmain-bordercolor","#d894d8"),s.style.setProperty("--button-color","#136062"),s.style.setProperty("--hover-color","#187c7f"),s.style.setProperty("--blackbtn-color","#105254"),s.style.setProperty("--buttonbuy-color","#4c495a"),s.style.setProperty("--buildings-canbuy-color","#9794a8"),s.style.setProperty("--buildings-hover-color","#b2b0bf"),s.style.setProperty("--blessings-canbuy-color","#6c687f"),s.style.setProperty("--blessings-hover-color","#7c7990"),s.style.setProperty("--tab-color","#105254"),s.style.setProperty("--singtab-color","#00d"),s.style.setProperty("--hoversing-color","#1052B6"),s.style.setProperty("--hepteract-bar-empty","#858199"),s.style.setProperty("--hepteract-bar-red","#ea1741"),s.style.setProperty("--hepteract-bar-yellow","#cc0"),s.style.setProperty("--hepteract-bar-green","limegreen"),i("corruptionStatsLoadouts").style.borderColor="#dd8f00",i("actualPotionShop").style.borderColor="#dd0",i("switchTheme2").style.borderColor="#284242",s.style.setProperty("--green-text-color","limegreen"),s.style.setProperty("--red-text-color","#f55"),s.style.setProperty("--maroon-text-color","#ff5656"),s.style.setProperty("--crimson-text-color","#f7617d"),s.style.setProperty("--orchid-text-color","#dd7dda"),s.style.setProperty("--darkorchid-text-color","#cf9ee8"),s.style.setProperty("--darkcyan-text-color","turquoise"),s.style.setProperty("--lightseagreen-text-color","limegreen"),s.style.setProperty("--orangered-text-color","#f74"),s.style.setProperty("--gray-text-color","#a5a5a5"),i("achievementcolorcode2").style.color="#dc7dff",i("corruptionDescription").style.color="#d272ff",i("corruptionTesseracts").style.color="#d272ff",i("antwelcome").style.color="#b1b1b1",i("versionnumber").style.color="#ff5aff",i("singularitytab").style.color="#ff5252",i("traitstab").style.color="#ff5252",i("cubetab").style.color="#ff5252",i("antspecies").style.color="#8da9ff",i("ascTimeAccel").style.color="#97b0ff",i("cube6Bonus").style.color="#a5a5a5",i("tesseract6Bonus").style.color="#a5a5a5",i("hypercube6Bonus").style.color="#a5a5a5",i("hypercubeWelcome").style.color="#f58",i("hypercubeQuantity").style.color="#f58",i("hypercubeBlessingsTotal").style.color="#f58",i("runeshowpower5").style.color="#ff7158",a.textContent="Light Mode"):r===5&&(s.style.setProperty("--header-color","#0a0a11"),s.style.setProperty("--bg-color","#131319"),s.style.setProperty("--alert-color","#2a1035"),s.style.setProperty("--history-lines","#012d1c"),s.style.setProperty("--text-color","#ac47ff"),s.style.setProperty("--maroon-text-color","#c30000"),s.style.setProperty("--crimson-text-color","#eb0000"),s.style.setProperty("--orchid-text-color","#fd59f7"),s.style.setProperty("--darkorchid-text-color","#c205ff"),s.style.setProperty("--gray-text-color","#8f8f8f"),s.style.setProperty("--box-color","#000000"),s.style.setProperty("--boxmain-bordercolor","#b341e0"),s.style.setProperty("--button-color","#21003f"),s.style.setProperty("--hover-color","#00056a"),s.style.setProperty("--blackbtn-color","#28002a"),s.style.setProperty("--purplebtn-color","#5800a0"),s.style.setProperty("--purplehover-color","#680927"),s.style.setProperty("--buttonbuy-color","#005e00"),s.style.setProperty("--buildings-canbuy-color","#a00"),s.style.setProperty("--buildings-hover-color","#e00"),s.style.setProperty("--blessings-canbuy-color","#004d00"),s.style.setProperty("--blessings-hover-color","#800"),s.style.setProperty("--tab-color","#1a0030"),s.style.setProperty("--singtab-color","#000230"),s.style.setProperty("--hoversing-color","#000463"),s.style.setProperty("--shoptab-color","#5800a0"),s.style.setProperty("--hovershop-color","#7400d3"),s.style.setProperty("--hepteract-bar-empty","#4a4a60"),s.style.setProperty("--hepteract-bar-red","#c90000"),s.style.setProperty("--hepteract-bar-yellow","#919100"),s.style.setProperty("--hepteract-bar-green","#007f3b"),i("themeBox").style.backgroundColor="#0a0a11",i("themeBox").style.borderColor="#3c006d",i("c15Rewards").style.backgroundColor="#2e001b",i("c15Rewards").style.borderColor="#186e83",i("platonicUpgradeDescriptions").style.backgroundColor="#2e001b",i("platonicUpgradeDescriptions").style.borderColor="#186e83",i("platonicUpgradePics").style.backgroundColor="#720505",i("platonicUpgradePics").style.borderColor="#410303",i("actualPotionShop").style.backgroundColor="#01192c",i("actualPotionShop").style.borderColor="#04d481",i("actualShop").style.backgroundColor="#11111b",i("actualShop").style.borderColor="#038ba8",i("corruptionStatsLoadouts").style.backgroundColor="#0a0a11",i("corruptionStatsLoadouts").style.borderColor="#04d481",i("heptGrid").style.backgroundColor="#11111b",i("heptGrid").style.borderColor="#9b7306",i("achievementcolorcode2").style.color="#ef00e4",i("corruptionDescription").style.color="#c205ff",i("corruptionTesseracts").style.color="#c205ff",i("antwelcome").style.color="darkgrey",i("confirmationToggleTitle").style.color="#eb0000",i("specialActionsTitle").style.color="#eb0000",i("themesTitle").style.color="#eb0000",i("notationTitle").style.color="#eb0000",i("hepteractWelcome").style.color="#ac47ff",i("confirmationdisclaimer").style.color="#bb68ff",i("antspecies").style.color="#184ff3",i("bonussummation").style.color="#eb0000",i("buildinghotkeys").style.color="#838383",i("buildinghotkeys2").style.color="#838383",a.textContent="Dracula Mode"),n&&setTimeout(()=>{s.style.removeProperty("--transition"),s.style.removeProperty("--transition-extra")},750)};var Kg=(t=!0)=>{let r=i("notation"),n=e.notation,a;switch(n){case"Pure Scientific":r.textContent=u.t("settings.notation.pureEngineering"),a="Pure Engineering";break;case"Pure Engineering":r.textContent=u.t("settings.notation.default"),a="Default";break;default:r.textContent=u.t("settings.notation.pureScientific"),a="Pure Scientific"}t&&(e.notation=a)},Xg=()=>{let t=i("notation");switch(e.notation){case"Pure Scientific":t.textContent=u.t("settings.notation.pureScientific");break;case"Pure Engineering":t.textContent=u.t("settings.notation.pureEngineering");break;default:t.textContent=u.t("settings.notation.default")}},ze=[["Legacy",-1],["Default",0],["Simplified",1],["Monotonous",1]],Nl=/Default|Simplified|Monotonous|Legacy/,$l=(t=e.iconSet)=>{(t>ze.length-1||t<0)&&(t=0),e.iconSet=t,Array.from(document.getElementsByTagName("img")).forEach(r=>{r.src=r.src.replace(Nl,ze[e.iconSet][0])}),i("iconSet").textContent=u.t(`settings.iconSets.${ze[e.iconSet][0].toLowerCase()}`)};function Zg(t){if(t instanceof ErrorEvent&&console.log("error: ",t.error),!t.target||!(t.target instanceof HTMLImageElement))return;let r=t.target,n=ze[e.iconSet][0],a=ze[e.iconSet][1],s="Legacy";a>=0&&at.method!==void 0&&t.method==="call";var tm=t=>t.error===null&&typeof t.id=="number";var rm=t=>{let r=new Map([[0,()=>{}]]),n=new Map([[0,()=>{}]]),a=new Map,s=new Worker(t);return s.addEventListener("message",({data:g})=>{if(em(g)){let{params:{timerId:h,timerType:b}}=g;if(b==="interval"){let y=r.get(h);if(typeof y=="number"){let C=a.get(y);if(C===void 0||C.timerId!==h||C.timerType!==b)throw new Error("The timer is in an undefined state.")}else if(typeof y<"u")y();else throw new Error("The timer is in an undefined state.")}else if(b==="timeout"){let y=n.get(h);if(typeof y=="number"){let C=a.get(y);if(C===void 0||C.timerId!==h||C.timerType!==b)throw new Error("The timer is in an undefined state.")}else if(typeof y<"u")y(),n.delete(h);else throw new Error("The timer is in an undefined state.")}}else if(tm(g)){let{id:h}=g,b=a.get(h);if(b===void 0)throw new Error("The timer is in an undefined state.");let{timerId:y,timerType:C}=b;a.delete(h),C==="interval"?r.delete(y):n.delete(y)}else{let{error:{message:h}}=g;throw new Error(h)}}),{clearInterval:g=>{let h=(0,Zo.generateUniqueNumber)(a);a.set(h,{timerId:g,timerType:"interval"}),r.set(g,h),s.postMessage({id:h,method:"clear",params:{timerId:g,timerType:"interval"}})},clearTimeout:g=>{let h=(0,Zo.generateUniqueNumber)(a);a.set(h,{timerId:g,timerType:"timeout"}),n.set(g,h),s.postMessage({id:h,method:"clear",params:{timerId:g,timerType:"timeout"}})},setInterval:(g,h=0)=>{let b=(0,Zo.generateUniqueNumber)(r);return r.set(b,()=>{g(),typeof r.get(b)=="function"&&s.postMessage({id:null,method:"set",params:{delay:h,now:performance.now(),timerId:b,timerType:"interval"}})}),s.postMessage({id:null,method:"set",params:{delay:h,now:performance.now(),timerId:b,timerType:"interval"}}),b},setTimeout:(g,h=0)=>{let b=(0,Zo.generateUniqueNumber)(n);return n.set(b,g),s.postMessage({id:null,method:"set",params:{delay:h,now:performance.now(),timerId:b,timerType:"timeout"}}),b}}};var nm=(t,r)=>{let n=null;return()=>{if(n!==null)return n;let a=new Blob([r],{type:"application/javascript; charset=utf-8"}),s=URL.createObjectURL(a);return n=t(s),setTimeout(()=>URL.revokeObjectURL(s)),n}};var am=`(()=>{"use strict";const e=new Map,t=new Map,r=(e,t)=>{let r,o;const i=performance.now();r=i,o=e-Math.max(0,i-t);return{expected:r+o,remainingDelay:o}},o=(e,t,r,i)=>{const s=performance.now();s>r?postMessage({id:null,method:"call",params:{timerId:t,timerType:i}}):e.set(t,setTimeout(o,r-s,e,t,r,i))};addEventListener("message",(i=>{let{data:s}=i;try{if("clear"===s.method){const{id:r,params:{timerId:o,timerType:i}}=s;if("interval"===i)(t=>{const r=e.get(t);if(void 0===r)throw new Error('There is no interval scheduled with the given id "'.concat(t,'".'));clearTimeout(r),e.delete(t)})(o),postMessage({error:null,id:r});else{if("timeout"!==i)throw new Error('The given type "'.concat(i,'" is not supported'));(e=>{const r=t.get(e);if(void 0===r)throw new Error('There is no timeout scheduled with the given id "'.concat(e,'".'));clearTimeout(r),t.delete(e)})(o),postMessage({error:null,id:r})}}else{if("set"!==s.method)throw new Error('The given method "'.concat(s.method,'" is not supported'));{const{params:{delay:i,now:n,timerId:a,timerType:d}}=s;if("interval"===d)((t,i,s)=>{const{expected:n,remainingDelay:a}=r(t,s);e.set(i,setTimeout(o,a,e,i,n,"interval"))})(i,a,n);else{if("timeout"!==d)throw new Error('The given type "'.concat(d,'" is not supported'));((e,i,s)=>{const{expected:n,remainingDelay:a}=r(e,s);t.set(i,setTimeout(o,a,t,i,n,"timeout"))})(i,a,n)}}}}catch(e){postMessage({error:{message:e.message},id:s.id,result:null})}}))})();`;var Gl=nm(rm,am),sm=t=>Gl().clearInterval(t),om=t=>Gl().clearTimeout(t),im=(...t)=>Gl().setInterval(...t),lm=(...t)=>Gl().setTimeout(...t);var Nn=[],rr=(t,r)=>{let n=im(t,r);return Nn.push({id:n,type:"interval"}),n},ss=t=>{for(let r of Nn)if(r.type==="interval"&&r.id===t){sm(t),Nn.splice(Nn.indexOf(r),1);return}},Yo=(t,r)=>{let n=lm(t,r);return Nn.push({id:n,type:"timeout"}),n},rd=t=>{for(let r of Nn)if(r.type==="timeout"&&r.id===t){om(t),Nn.splice(Nn.indexOf(r),1);return}},nd=()=>{for(let{id:t,type:r}of Nn)r==="interval"?ss(t):rd(t)};var Jo=(M=>(M[M.Quark=0]="Quark",M[M.GoldenQuark=1]="GoldenQuark",M[M.Cubes=2]="Cubes",M[M.PowderConversion=3]="PowderConversion",M[M.AscensionSpeed=4]="AscensionSpeed",M[M.GlobalSpeed=5]="GlobalSpeed",M[M.AscensionScore=6]="AscensionScore",M[M.AntSacrifice=7]="AntSacrifice",M[M.Offering=8]="Offering",M[M.Obtainium=9]="Obtainium",M[M.Octeract=10]="Octeract",M[M.BlueberryTime=11]="BlueberryTime",M[M.AmbrosiaLuck=12]="AmbrosiaLuck",M[M.OneMind=13]="OneMind",M))(Jo||{}),Pr=null,Nv=()=>Pr,ad=async()=>{if(!e.dayCheck)return;let t=await fetch("https://synergism.cc/api/v2/events/get");if(!t.ok)throw new Error("God fucking dammit");let r=await t.json();Pr=null;let n=new Date(Fl()).getTime();n>=r.start&&n<=r.end&&r.name.length&&(Pr=r);let a=i("happyHolidays"),s=i("eventBuffs"),l=o.isEvent;if(Pr){o.isEvent=!0;let c=[];for(let p=0;p0?c.push(`${f>=0?"+":"-"}${d(100*f,3,!0)}% ${cm[p]}`):(Hl[p]!=="OneMind"||e.singularityUpgrades.oneMind.level===0)&&c.push(`${f>=0?"+":"-"}${d(100*f,2,!0)}% ${cm[p]}`))}i("eventCurrent").textContent=u.t("settings.events.activeUntil",{x:new Date(Pr.end)}),s.innerHTML=o.isEvent&&c.length?`Current Buffs: ${c.join(", ")}`:"",a.innerHTML=`(${Pr.name.length}) ${Pr.name.join(", ")}`,a.style.color=Pr.color[Math.floor(Math.random()*Pr.color.length)],a.href=Pr.url.length>0?Pr.url[Math.floor(Math.random()*Pr.url.length)]:"#"}else o.isEvent=!1,i("eventCurrent").innerHTML=u.t("settings.events.inactive"),s.textContent="",s.style.color="var(--red-text-color)",a.innerHTML="",a.href="";o.isEvent!==l&&(Ve(),o.ambrosiaCurrStats.ambrosiaAdditiveLuckMult=hn().value,o.ambrosiaCurrStats.ambrosiaLuck=rt().value,o.ambrosiaCurrStats.ambrosiaGenerationSpeed=tt().value)},Hl=["Quark","GoldenQuark","Cubes","PowderConversion","AscensionSpeed","GlobalSpeed","AscensionScore","AntSacrifice","Offering","Obtainium","Octeract","BlueberryTime","AmbrosiaLuck","OneMind"],cm=["Quarks","Golden Quarks","Cubes from all type","Powder Conversion","Ascension Speed","Global Speed","Ascension Score","Ant Sacrifice rewards","Offering","Obtainium","Eight Dimensional Hypercubes","Blueberry Time Generation","Ambrosia Luck (Additive Mult)","One Mind Quark Bonus"],sd=t=>{var n,a,s,l,c,p,f,g,h,b,y,C,M;let r=Nv();if(r===null)return 0;switch(t){case 0:return(n=r.quark)!=null?n:0;case 1:return(a=r.goldenQuark)!=null?a:0;case 2:return(s=r.cubes)!=null?s:0;case 3:return(l=r.powderConversion)!=null?l:0;case 4:return(c=r.ascensionSpeed)!=null?c:0;case 5:return(p=r.globalSpeed)!=null?p:0;case 6:return(f=r.ascensionScore)!=null?f:0;case 7:return(g=r.antSacrifice)!=null?g:0;case 8:return(h=r.offering)!=null?h:0;case 9:return(b=r.obtainium)!=null?b:0;case 10:return(y=r.octeract)!=null?y:0;case 13:return e.singularityUpgrades.oneMind.level>0?r.oneMind:0;case 11:return(C=r.blueberryTime)!=null?C:0;case 12:return(M=r.ambrosiaLuck)!=null?M:0}},um=()=>(o.eventClicked=!0,i("eventClicked").style.display="block",B(u.t("event.aprilFools.clicked")));var _v=new Map([["kMisc","miscStats"],["kFreeAccel","acceleratorStats"],["kFreeMult","multiplierStats"],["kOfferingMult","offeringMultiplierStats"],["kObtMult","obtainiumMultiplierStats"],["kGlobalCubeMult","globalCubeMultiplierStats"],["kQuarkMult","globalQuarkMultiplierStats"],["kGSpeedMult","globalSpeedMultiplierStats"],["kCubeMult","cubeMultiplierStats"],["kTessMult","tesseractMultiplierStats"],["kHypercubeMult","hypercubeMultiplierStats"],["kPlatMult","platonicMultiplierStats"],["kHeptMult","hepteractMultiplierStats"],["kOrbPowderMult","powderMultiplierStats"],["kOctMult","octeractMultiplierStats"],["kASCMult","ascensionSpeedMultiplierStats"],["kGQMult","goldenQuarkMultiplierStats"],["kAddStats","addCodeStats"],["kAmbrosiaLuck","ambrosiaLuckStats"],["kAmbrosiaGenMult","ambrosiaGenerationStats"]]),dm=t=>{for(let r of Array.from(t.parentElement.children)){let n=i(_v.get(r.id));r.id!==t.id?(r.style.backgroundColor="",n.style.display="none",n.classList.remove("activeStats")):(r.style.backgroundColor="crimson",n.style.display="block",n.classList.add("activeStats"))}},pm=()=>{let t=document.getElementsByClassName("activeStats");for(let r=0;r{i("sMisc1").textContent=d(e.prestigeCount,0,!0),i("sMisc2").textContent=`${d(1e3*e.fastestprestige)}ms`,i("sMisc3").textContent=d(e.maxofferings),i("sMisc4").textContent=d(o.runeSum),i("sMisc5").textContent=d(e.transcendCount,0,!0),i("sMisc6").textContent=`${d(1e3*e.fastesttranscend)}ms`,i("sMisc7").textContent=d(e.reincarnationCount,0,!0),i("sMisc8").textContent=`${d(1e3*e.fastestreincarnate)}ms`,i("sMisc9").textContent=d(e.maxobtainium),i("sMisc10").textContent=d(e.maxobtainiumpersecond,2,!0),i("sMisc11").textContent=d(e.obtainiumpersecond,2,!0),i("sMisc12").textContent=d(e.ascensionCount,0,!0),i("sMisc13").textContent=d(e.quarksThisSingularity,0,!0),i("sMisc14").textContent=d(e.totalQuarksEver+e.quarksThisSingularity,0,!0),i("sMisc15").textContent=`${dr(e.quarkstimer)} / ${dr(9e4+18e3*e.researches[195])}`,i("sMisc16").textContent=od(0)},Dv=()=>{i("sA1").textContent=`+${d(o.freeUpgradeAccelerator,0,!1)}`,i("sA2").textContent=`+${d(o.totalAcceleratorBoost*(4+2*e.researches[18]+2*e.researches[19]+3*e.researches[20]+o.cubeBonusMultiplier[1]),0,!1)}`,i("sA3").textContent=`+${d(Math.floor(Math.pow(o.rune1level*o.effectiveLevelMult/10,1.1)),0,!0)}`,i("sA4").textContent=`x${d(1+o.rune1level*1/200*o.effectiveLevelMult,3,!0)}`,i("sA5").textContent=`x${d(Math.pow(1.01,e.upgrades[21]+e.upgrades[22]+e.upgrades[23]+e.upgrades[24]+e.upgrades[25]),3,!0)}`,i("sA6").textContent=`x${d(Math.pow(1.01,e.achievements[60]+e.achievements[61]+e.achievements[62]),3,!0)}`,i("sA7").textContent=`x${d(1+1/5*e.researches[1],3,!0)}`,i("sA8").textContent=`x${d(1+1/20*e.researches[6]+1/25*e.researches[7]+1/40*e.researches[8]+3/200*e.researches[9]+1/200*e.researches[10],3,!0)}`,i("sA9").textContent=`x${d(1+1/20*e.researches[86],3,!0)}`,i("sA10").textContent=`x${d((e.currentChallenge.transcension!==0||e.currentChallenge.reincarnation!==0)&&e.upgrades[50]>.5?1.25:1,3,!0)}`,i("sA11").textContent=`^${d(Math.min(1,(1+e.platonicUpgrades[6]/30)*o.viscosityPower[e.usedCorruptions[2]]),3,!0)}`,i("sA12").textContent=d(o.freeAccelerator,0,!0)},Gv=()=>{i("sM1").textContent=`+${d(o.freeUpgradeMultiplier,0,!0)}`,i("sM2").textContent=`+${d(Math.floor(Math.floor(o.rune2level/10*o.effectiveLevelMult)*Math.floor(10+o.rune2level/10*o.effectiveLevelMult)/2)*100/100,0,!0)}`,i("sM3").textContent=`x${d(1+o.rune2level/200*o.effectiveLevelMult,3,!0)}`,i("sM4").textContent=`x${d(Math.pow(1.01,e.upgrades[21]+e.upgrades[22]+e.upgrades[23]+e.upgrades[24]+e.upgrades[25])*(1+e.upgrades[34]*3/100)*(1+e.upgrades[34]*(2/103)),3,!0)}`,i("sM5").textContent=`x${d(Math.pow(1.01,e.achievements[57]+e.achievements[58]+e.achievements[59]),3,!0)}`,i("sM6").textContent=`x${d(1+1/5*e.researches[2],3,!0)}`,i("sM7").textContent=`x${d(1+1/20*e.researches[11]+1/25*e.researches[12]+1/40*e.researches[13]+3/200*e.researches[14]+1/200*e.researches[15],3,!0)}`,i("sM8").textContent=`x${d(1+1/20*e.researches[87],3,!0)}`,i("sM9").textContent=`x${d(nr(40,(e.antUpgrades[4]+o.bonusant5)/1e3*40/39),2,!0)}`,i("sM10").textContent=`x${d(o.cubeBonusMultiplier[2],3,!0)}`,i("sM11").textContent=`x${d((e.currentChallenge.transcension!==0||e.currentChallenge.reincarnation!==0)&&e.upgrades[50]>.5?1.25:1,3,!0)}`,i("sM12").textContent=`^${d(Math.min(1,(1+e.platonicUpgrades[6]/30)*o.viscosityPower[e.usedCorruptions[2]]),3,!0)}`,i("sM13").textContent=d(o.freeMultiplier,3,!0)},Hv=()=>{i("sGQM1").textContent=`x${d(1,3,!0)}`,i("sGQM2").textContent=`+${d(e.achievementPoints/25e3,3,!0)}`,i("sGQM3").textContent=`+${d(e.achievements[250]>0?.1:0,3,!0)}`,i("sGQM4").textContent=`+${d(e.achievements[251]>0?.1:0,3,!0)}`,i("sGQM5").textContent=`+${d(e.platonicUpgrades[5]>0?.2:0,3,!0)}`,i("sGQM6").textContent=`+${d(e.platonicUpgrades[10]>0?.25:0,3,!0)}`,i("sGQM7").textContent=`+${d(e.platonicUpgrades[15]>0?.3:0,3,!0)}`,i("sGQM8").textContent=`+${d(o.challenge15Rewards.quarks-1,3,!0)}`,i("sGQM9").textContent=`x${d(e.worlds.applyBonus(1/ol()),3,!0)}`,i("sGQM10").textContent=`x${d(o.isEvent?1+yt(0)+yt(13):1,3,!0)}`,i("sGQM11").textContent=`x${d(ta()>0?1.1+.15/75*ta():1,3,!0)}`,i("sGQM12").textContent=`x${d(e.challenge15Exponent>=1e15?1+5/1e4*lt("quark"):1,3,!0)}`,i("sGQM13").textContent=`x${d(Ns(),3,!0)}`,i("sGQM14").textContent=`x${d(1+e.achievements[266]*Math.min(.1,e.ascensionCount/1e16),3,!0)}`,i("sGQM15").textContent=`x${d(1+e.singularityCount/10,3,!0)}`,i("sGQM16").textContent=`x${d(cd(),3,!0)}`,i("sGQM17").textContent=`x${d(1+.1*e.cubeUpgrades[53]/100,3,!0)}`,i("sGQM18").textContent=`x${d(1+1/1e4*e.cubeUpgrades[68]+.05*Math.floor(e.cubeUpgrades[68]/1e3),3,!0)}`,i("sGQM19").textContent=`x${d(1+.02*e.singularityUpgrades.intermediatePack.level+.04*e.singularityUpgrades.advancedPack.level+.06*e.singularityUpgrades.expertPack.level+.08*e.singularityUpgrades.masterPack.level+.1*e.singularityUpgrades.divinePack.level,3,!0)}`,i("sGQM20").textContent=`x${d(1+.4*+e.octeractUpgrades.octeractStarter.getEffect().bonus,3,!0)}`,i("sGQM21").textContent=`x${d(+e.octeractUpgrades.octeractQuarkGain.getEffect().bonus,3,!0)}`,i("sGQM22").textContent=`x${d(_n(),3,!0)}`,i("sGQM23").textContent=`x${d(1+ +e.singularityUpgrades.singQuarkImprover1.getEffect().bonus,3,!0)}`,i("sGQM24").textContent=`x${d(1+1/1e4*Math.floor(e.octeractUpgrades.octeractQuarkGain.level/199)*e.octeractUpgrades.octeractQuarkGain2.level*Math.floor(1+Math.log10(Math.max(1,e.hepteractCrafts.quark.BAL))),3,!0)}`,i("sGQM25").textContent=`x${d(ri(),2,!0)}`,i("sGQM26").textContent=`x${d(+e.blueberryUpgrades.ambrosiaTutorial.bonus.quarks,2,!0)}`,i("sGQM27").textContent=`x${d(+e.blueberryUpgrades.ambrosiaQuarks1.bonus.quarks,2,!0)}`,i("sGQM28").textContent=`x${d(+e.blueberryUpgrades.ambrosiaCubeQuark1.bonus.quarks,2,!0)}`,i("sGQM29").textContent=`x${d(+e.blueberryUpgrades.ambrosiaLuckQuark1.bonus.quarks,2,!0)}`,i("sGQM30").textContent=`x${d(+e.blueberryUpgrades.ambrosiaQuarks2.bonus.quarks,2,!0)}`,i("sGQM31").textContent=`x${d(Ko(),3,!0)}`,i("sGQM32").textContent=`x${d(1+ +e.singularityChallenges.limitedTime.rewards.quarkMult,2,!0)}`,i("sGQM33").textContent=`x${d(1+ +e.singularityChallenges.sadisticPrequel.rewards.quarkMult,2,!0)}`,i("sGQM34").textContent=`x${d(e.highestSingularityCount===0?1.25:1,2,!0)}`,i("sGQMT").textContent=`x${d(e.worlds.applyBonus(1),3,!0)}`},Fv=()=>{let t=st(),r=t.preList;for(let s=0;s{var D,$;let t=oa().list,r={1:{acc:2,desc:"PseudoCoin Upgrade:",color:"gold"},2:{acc:2,desc:"Ascension Time Multiplier:"},3:{acc:2,desc:"Sun and Moon Achievements:"},4:{acc:2,desc:"Speed Achievement:"},5:{acc:2,desc:"Challenge 15 All Cube Bonus:"},6:{acc:2,desc:"Rune 6 - Infinite Ascent:"},7:{acc:2,desc:"Platonic Beta:"},8:{acc:2,desc:"Platonic Omega:"},9:{acc:2,desc:"Overflux Powder:"},10:{acc:2,desc:"Event:"},11:{acc:2,desc:"Singularity Factor:"},12:{acc:2,desc:"Wow Pass Y"},13:{acc:2,desc:"Starter Pack:"},14:{acc:2,desc:"Cube Flame [GQ]:"},15:{acc:2,desc:"Cube Blaze [GQ]:"},16:{acc:2,desc:"Cube Inferno [GQ]:"},17:{acc:2,desc:"Wow Pass Z:"},18:{acc:2,desc:"Cookie Upgrade 16:"},19:{acc:2,desc:"Cookie Upgrade 8:"},20:{acc:2,desc:"Total Octeract Bonus:"},21:{acc:2,desc:"No Singularity Upgrades Challenge:"},22:{acc:2,desc:"Citadel [GQ]"},23:{acc:2,desc:"Citadel 2 [GQ]"},24:{acc:4,desc:"Platonic DELTA"},25:{acc:2,desc:"Wow Pass \u221E"},26:{acc:2,desc:"Unspent Ambrosia Bonus"},27:{acc:2,desc:"Module- Tutorial"},28:{acc:2,desc:"Module- Cubes 1"},29:{acc:2,desc:"Module- Luck-Cube 1"},30:{acc:2,desc:"Module- Quark-Cube 1"},31:{acc:2,desc:"Module- Cubes 2"},32:{acc:2,desc:"Module- Hyperflux"},33:{acc:2,desc:"20 Ascensions X20 Bonus [EXALT ONLY]"},34:{acc:2,desc:"Cash Grab ULTIMATE"},35:{acc:2,desc:"Shop EX ULTIMATE"},36:{acc:2,desc:"Exalt 6 Penalty (for being too slow!)"}};for(let k=0;k{let t=un("prestige",!1),r={1:{acc:3,desc:"Alchemy Achievement 5:"},2:{acc:3,desc:"Alchemy Achievement 6:"},3:{acc:3,desc:"Alchemy Achievement 7:"},4:{acc:3,desc:"Diamond Upgrade 4x3:"},5:{acc:3,desc:"Particle Upgrade 3x5:"},6:{acc:3,desc:"Auto Offering Shop Upgrade:"},7:{acc:3,desc:"Offering EX Shop Upgrade:"},8:{acc:3,desc:"Cash Grab Shop Upgrade:"},9:{acc:3,desc:"Research 4x10:"},10:{acc:3,desc:"Sacrificium Formicidae:"},11:{acc:3,desc:"Plutus Cube Tribute:"},12:{acc:3,desc:"Constant Upgrade 3:"},13:{acc:3,desc:"Research 6x24,8x4:"},14:{acc:3,desc:"Challenge 12:"},15:{acc:3,desc:"Research 8x25:"},16:{acc:3,desc:"Ascension Count Achievement:"},17:{acc:3,desc:"Sun and Moon Achievements:"},18:{acc:3,desc:"Cube Upgrade 5x6:"},19:{acc:3,desc:"Cube Upgrade 5x10:"},20:{acc:3,desc:"Platonic ALPHA:"},21:{acc:3,desc:"Platonic BETA:"},22:{acc:3,desc:"Platonic OMEGA:"},23:{acc:3,desc:"Challenge 15:"},24:{acc:3,desc:"Starter Pack:"},25:{acc:3,desc:"Offering Charge [GQ]:"},26:{acc:3,desc:"Offering Storm [GQ]:"},27:{acc:3,desc:"Offering Tempest [GQ]:"},28:{acc:3,desc:"Citadel [GQ]"},29:{acc:3,desc:"Citadel 2 [GQ]"},30:{acc:3,desc:"Cube Upgrade Cx4:"},31:{acc:3,desc:"Offering Electrolosis [OC]:"},32:{acc:3,desc:"RNG-based Offering Booster:"},33:{acc:3,desc:"20 Ascensions X20 [EXALT ONLY]"},34:{acc:3,desc:"Shop EX ULTIMATE"},35:{acc:3,desc:"Event:"}};for(let n=0;n{i("sObt1").textContent=`x${d(e.upgrades[69]>0?Math.min(10,new m(m.pow(m.log(o.reincarnationPointGain.add(10),10),.5)).toNumber()):1,2)}`,i("sObt2").textContent=`x${d(e.upgrades[72]>0?Math.min(50,1+2*e.challengecompletions[6]+2*e.challengecompletions[7]+2*e.challengecompletions[8]+2*e.challengecompletions[9]+2*e.challengecompletions[10]):1,2)}`,i("sObt3").textContent=`x${d(e.upgrades[74]>0?1+4*Math.min(1,Math.pow(e.maxofferings/1e5,.5)):1,2)}`,i("sObt4").textContent=`x${d(1+e.researches[65]/5,2)}`,i("sObt5").textContent=`x${d(1+e.researches[76]/10,2)}`,i("sObt6").textContent=`x${d(1+e.researches[81]/10,2)}`,i("sObt7").textContent=`x${d(1+e.shopUpgrades.obtainiumAuto/50,3)}`,i("sObt8").textContent=`x${d(1+e.shopUpgrades.cashGrab/100,3)}`,i("sObt9").textContent=`x${d(1+e.shopUpgrades.obtainiumEX/50,3)}`,i("sObt10").textContent=`x${d(1+o.rune5level/200*o.effectiveLevelMult*(1+e.researches[84]/200*(1+1*o.effectiveRuneSpiritPower[5]*ht()/400)),3)}`,i("sObt11").textContent=`x${d(1+.01*e.achievements[84]+.03*e.achievements[91]+.05*e.achievements[98]+.07*e.achievements[105]+.09*e.achievements[112]+.11*e.achievements[119]+.13*e.achievements[126]+.15*e.achievements[133]+.17*e.achievements[140]+.19*e.achievements[147],2)}`,i("sObt12").textContent=`x${d(1+2*Math.pow((e.antUpgrades[10-1]+o.bonusant10)/50,2/3),3)}`,i("sObt13").textContent=`x${d(1+e.achievements[188]*Math.min(2,e.ascensionCount/5e6),3)}`,i("sObt14").textContent=`x${d(1+.6*e.achievements[250]+1*e.achievements[251],2)}`,i("sObt15").textContent=`x${d(o.cubeBonusMultiplier[5],3)}`,i("sObt16").textContent=`x${d(1+.04*e.constantUpgrades[4],2)}`,i("sObt17").textContent=`x${d(1+.1*e.cubeUpgrades[3],2)}`,i("sObt18").textContent=`x${d(1+.1*e.cubeUpgrades[47],3)}`,i("sObt19").textContent=`x${d(1+.5*K("ascension",e.challengecompletions[12]),2)}`,i("sObt20").textContent=`x${d(1+ht()/400*o.effectiveRuneSpiritPower[4],4)}`,i("sObt21").textContent=`x${d(1+.03*Math.log(e.uncommonFragments+1)/Math.log(4)*e.researches[144],3)}`,i("sObt22").textContent=`x${d(1+.02/100*e.cubeUpgrades[50],4)}`,i("sObt23").textContent=`x${d(e.achievements[53]>0?1+1/800*o.runeSum:1,3)}`,i("sObt24").textContent=`x${d((e.achievements[128]?1.5:1)*(e.achievements[129]?1.25:1),3)}`,i("sObt25").textContent=`+${d(e.achievements[51]>0?4:1,3)}`,i("sObt26").textContent=`+${d((e.reincarnationcounter>=2?1*e.researches[63]:1)+(e.reincarnationcounter>=5?2*e.researches[64]:1),2)}`,i("sObt27").textContent=`x${d((e.reincarnationcounter>=5?Math.max(1,e.reincarnationcounter/10):1)*Math.min(1,Math.pow(e.reincarnationcounter/10,2)),3)}`,i("sObt28").textContent=`x${d(Math.pow(m.log(e.transcendShards.add(1),10)/300,2),2)}`,i("sObt29").textContent=`^${d(Math.min(1,o.illiteracyPower[e.usedCorruptions[5]]*(1+9/100*e.platonicUpgrades[9]*Math.min(100,Math.log10(e.researchPoints+10)))),3)}`,i("sObt30").textContent=`x${d(1+4/100*e.cubeUpgrades[42]+1+3/100*e.cubeUpgrades[43],2)}`,i("sObt31").textContent=`x${d(1+e.platonicUpgrades[5],2)}`,i("sObt32").textContent=`x${d(1+1.5*e.platonicUpgrades[9],2)}`,i("sObt33").textContent=`x${d(1+2.5*e.platonicUpgrades[10],2)}`,i("sObt34").textContent=`x${d(1+5*e.platonicUpgrades[15],2)}`,i("sObt35").textContent=`x${d(o.challenge15Rewards.obtainium,3)}`,i("sObt36").textContent=`x${d(1+5*(e.singularityUpgrades.starterPack.getEffect().bonus?1:0),2)}`,i("sObt37").textContent=`x${d(+e.singularityUpgrades.singObtainium1.getEffect().bonus,2)}`,i("sObt38").textContent=`x${d(+e.singularityUpgrades.singObtainium2.getEffect().bonus,2)}`,i("sObt39").textContent=`x${d(+e.singularityUpgrades.singObtainium3.getEffect().bonus,2)}`,i("sObt40").textContent=`x${d(1+e.cubeUpgrades[55]/100,2)}`,i("sObt41").textContent=`x${d(1+1/200*e.shopUpgrades.cashGrab2,3)}`,i("sObt42").textContent=`x${d(1+1/100*e.shopUpgrades.obtainiumEX2*e.singularityCount,2)}`,i("sObt43").textContent=`x${d(1+yt(9),2)}`,i("sObt44").textContent=`x${d(+e.singularityUpgrades.singCitadel.getEffect().bonus,2)}`,i("sObt45").textContent=`x${d(+e.singularityUpgrades.singCitadel2.getEffect().bonus,2)}`,i("sObt46").textContent=`x${d(+e.octeractUpgrades.octeractObtainium1.getEffect().bonus,2)}`,i("sObt47").textContent=`x${d(Math.pow(1.02,e.shopUpgrades.obtainiumEX3),2)}`,i("sObt48").textContent=`x${d(ti(),2)}`,i("sObt49").textContent=`x${d(e.currentChallenge.ascension===15?1+7*e.cubeUpgrades[62]:1,2)}`,i("sObt50").textContent=`x${d(1+.001*+e.blueberryUpgrades.ambrosiaObtainium1.bonus.obtainiumMult,2)}`,i("sObt51").textContent=`x${d(dd(),2)}`,i("sObt52").textContent=`x${d(ni(),2)}`,i("sObt53").textContent=`/${d(He("Obtainium"),2)}`,i("sObt54").textContent=`^${d(e.usedCorruptions[5]>=15?1/4:1,2)}`,i("sObt55").textContent=`^${d(e.usedCorruptions[5]>=16?1/4:1,2)}`,i("sObt56").textContent=`x${d(e.currentChallenge.ascension===14?0:1,2)}`,i("sObtT").textContent=`x${d(o.obtainiumGain,3)}`},Vv=()=>{let t=Kr().list,r={1:{acc:2,desc:"Base:"},2:{acc:2,desc:"Challenge 15 Bonus:"},3:{acc:2,desc:"Powder EX:"},4:{acc:2,desc:"Achievement 256:"},5:{acc:2,desc:"Achievement 257:"},6:{acc:2,desc:"Platonic Upgrade 16 [4x1]:"},7:{acc:2,desc:"Event:"}};for(let n=0;n{let t=ld(),r={1:{acc:2,desc:"Chronometer:"},2:{acc:2,desc:"Chronometer 2:"},3:{acc:2,desc:"Chronometer 3:"},4:{acc:2,desc:"Chronos Hepteract:"},5:{acc:2,desc:"Achievement 262 Bonus:"},6:{acc:2,desc:"Achievement 263 Bonus:"},7:{acc:2,desc:"Platonic Omega:"},8:{acc:2,desc:"Challenge 15 Reward:"},9:{acc:2,desc:"Cookie Upgrade 9:"},10:{acc:2,desc:"Intermediate Pack:"},11:{acc:2,desc:"Chronometer Z:"},12:{acc:2,desc:"Abstract Photokinetics:"},13:{acc:2,desc:"Abstract Exokinetics:"},14:{acc:2,desc:"Event:"},15:{acc:2,desc:"Ascension Speedup 2 [GQ]:"},16:{acc:2,desc:"Chronometer INF:"},17:{acc:2,desc:"Limited Ascensions Penalty:"},18:{acc:2,desc:"Limited Ascensions Reward:"},19:{acc:2,desc:"Ascension Speedup [GQ]:"},20:{acc:2,desc:"Singularity Penalty:"},21:{acc:2,desc:"EXALT 6: The Great Singularity Speedrun:"},22:{acc:2,desc:"Shop Chronometer S:"}};for(let n=0;n{var n;let t=ud(),r={1:{acc:2,desc:"PseudoCoin Bonus:",color:"gold"},2:{acc:2,desc:"Challenge 15 Exponent:"},3:{acc:2,desc:"Patreon Bonus:"},4:{acc:2,desc:"Golden Quarks I:"},5:{acc:2,desc:"Cookie Upgrade 19:"},6:{acc:2,desc:"No Singularity Upgrades:"},7:{acc:2,desc:"Event:"},8:{acc:2,desc:"Singularity Fast Forwards:"},9:{acc:2,desc:"Golden Revolution II:"},10:{acc:2,desc:"Immaculate Alchemy:"},11:{acc:2,desc:"Total Quarks Coefficient:"}};for(let a=0;a{var f;let t=os(),r=ei(),n=ia(),a=Kl(),s={1:{acc:0,desc:"Base:"},2:{acc:2,desc:"PL-AT \u03B4 calculator:"},3:{acc:2,desc:"PL-AT \u03A3 sing perk:"},4:{acc:2,desc:"Ascension of Ant God:"},5:{acc:2,desc:"Singularity factor:"}};t.list[0]/=1e3;for(let g=0;g=.5?i("s+eff1").textContent=`+${d(p*c.minQuarks,3)} ~ ${d(p*c.maxQuarks,3)}`:i("s+eff1").textContent=`+${d(p*c.quarks,3)}`,i("stat+eff2").childNodes[0].textContent="PL-AT X - bonus ascension time: ",i("s+eff2").textContent=`+${d(c.ascensionTimer,2)} sec`,i("stat+eff3").childNodes[0].textContent="PL-AT \u0393 - bonus GQ export time: ",i("s+eff3").textContent=`+${d(c.gqTimer,2)} sec`,i("stat+eff4").childNodes[0].textContent="PL-AT _ - bonus octeract time: ",i("s+eff4").textContent=`+${d(c.octeractTime,2)} sec`},Xv=()=>{var s;let t=rt(),r=t.array,n={1:{acc:0,desc:"Base Value"},2:{acc:0,desc:"PseudoCoin Upgrade",color:"gold"},3:{acc:0,desc:"Irish Ants Singularity Perk"},4:{acc:1,desc:"Shop Upgrade Bonus"},5:{acc:0,desc:"Singularity Ambrosia Luck Upgrades"},6:{acc:0,desc:"Octeract Ambrosia Luck Upgrades"},7:{acc:0,desc:"Ambrosia Luck Module I"},8:{acc:1,desc:"Ambrosia Luck Module II"},9:{acc:2,desc:"Ambrosia Cube-Luck Hybrid Module I"},10:{acc:2,desc:"Ambrosia Quark-Luck Hybrid Module I"},11:{acc:0,desc:"Perk: One Hundred Thirty One!"},12:{acc:0,desc:"Perk: Two Hundred Sixty Nine!"},13:{acc:0,desc:"Shop: Octeract-Based Ambrosia Luck"},14:{acc:0,desc:"No Ambrosia Upgrades EXALT"},15:{acc:0,desc:"ULTRA Upgrade: Ambrosia Exalter"}};for(let l=0;l{var s;let t=tt(),r=t.array,n={1:{acc:4,desc:"Visited Ambrosia Subtab"},2:{acc:4,desc:"PseudoCoin Upgrade",color:"gold"},3:{acc:4,desc:"Number of Blueberries"},4:{acc:4,desc:"Shop Upgrade Bonus"},5:{acc:4,desc:"Singularity Ambrosia Generation Upgrades"},6:{acc:4,desc:"Octeract Ambrosia Generation Upgrades"},7:{acc:4,desc:"Patreon Bonus"},8:{acc:4,desc:"One Ascension Challenge EXALT"},9:{acc:4,desc:"No Ambrosia Upgrades EXALT"},10:{acc:4,desc:"Cash-Grab ULTIMATE"},11:{acc:4,desc:"Event Bonus"}};for(let l=0;l{let t=[750,1500,3e3,5e3,7500,7500,1e4,1e4,2e4,4e4,6e4,1e5,1e5,2e5,5e5,1e6,3e6,1e7,3e7,1e8,5e8,2e9,1e10,1e11,1e15,2e15,4e15,7e15,1e16,2e16,333e14,333e14,333e14,2e17,15e17],r=Object.keys(o.challenge15Rewards),n=e.challenge15Exponent;for(let a in o.challenge15Rewards)o.challenge15Rewards[a]=1;o.challenge15Rewards.freeOrbs=0,n>=t[0]&&(o.challenge15Rewards[r[0]]=1+1/50*Math.log(n/175)/Math.log(2)),n>=t[1]&&(o.challenge15Rewards[r[1]]=1+1/20*Math.log(n/375)/Math.log(2)),n>=t[2]&&(o.challenge15Rewards[r[2]]=1+1/150*Math.log(n/750)/Math.log(2)),n>=t[3]&&(o.challenge15Rewards[r[3]]=Math.pow(.98,Math.log(n/1250)/Math.log(2))),n>=t[4]&&(o.challenge15Rewards[r[4]]=1+1/5*Math.pow(n/7500,.75)),n>=t[5]&&(o.challenge15Rewards[r[5]]=1+1/5*Math.pow(n/7500,.75)),n>=t[6]&&(o.challenge15Rewards[r[6]]=1+1/20*Math.log(n/2500)/Math.log(2)),n>=t[7]&&(o.challenge15Rewards[r[7]]=1+1/20*Math.log(n/2500)/Math.log(2)),n>=t[8]&&(o.challenge15Rewards[r[8]]=1+Math.pow(n/2e4,1.5)),n>=t[9]&&(o.challenge15Rewards[r[9]]=1+1/33*Math.log(n/1e4)/Math.log(2)),n>=t[10]&&(o.challenge15Rewards[r[10]]=1+1/100*Math.log(n/15e3)/Math.log(2)),n>=t[11]&&(o.challenge15Rewards[r[11]]=Math.pow(.98,Math.log(n/25e3)/Math.log(2))),n>=t[12]&&(o.challenge15Rewards[r[12]]=Math.pow(.98,Math.log(n/25e3)/Math.log(2))),n>=t[13]&&(o.challenge15Rewards[r[13]]=Math.pow(1+Math.log(n/2e5)/Math.log(2),4)),n>=t[14]&&(o.challenge15Rewards[r[14]]=1+1/20*Math.log(n/15e4)/Math.log(2)),n>=t[15]&&(o.challenge15Rewards[r[15]]=1+1/150*Math.log(n/25e4)/Math.log(2)),n>=t[16]&&(o.challenge15Rewards[r[16]]=1+1/20*Math.log(n/75e4)/Math.log(2)),n>=t[17]&&(o.challenge15Rewards[r[17]]=1+1/20*Math.log(n/25e5)/Math.log(2)),n>=t[18]&&(o.challenge15Rewards[r[18]]=1+1/5*Math.pow(n/3e7,1/4)),n>=t[19]&&(o.challenge15Rewards[r[19]]=1+1/5*Math.pow(n/1e8,2/3)),n>=t[20]&&(o.challenge15Rewards[r[20]]=1+1/200*Math.log(n/125e6)/Math.log(2)),n>=t[21]&&(o.challenge15Rewards[r[21]]=1+1/5*Math.pow(n/2e9,1/4)),n>=t[22]&&(o.challenge15Rewards[r[22]]=1+1/4*Math.pow(n/1e10,1/4),n>=1e20&&(o.challenge15Rewards[r[22]]=1+1/4*Math.pow(n/1e10,1/8)*Math.pow(1e10,1/8))),n>=t[23]&&(o.challenge15Rewards[r[23]]=1+1/100*Math.log(n*32/1e11)/Math.log(2)),n>=t[24]&&(o.challenge15Rewards[r[24]]=2),n>=t[25]&&e.hepteractCrafts.challenge.unlock("the Hepteract of Challenge"),n>=t[26]&&(o.challenge15Rewards[r[25]]=1+1/300*Math.log2(n/(4e15/1024))),n>=t[27]&&(o.challenge15Rewards[r[26]]=1+1/50*Math.log2(n/(7e15/32))),n>=t[28]&&e.hepteractCrafts.abyss.unlock("the Hepteract of the Abyss"),n>=t[29]&&(o.challenge15Rewards[r[27]]=Bt(1.05,n,1e18)),n>=t[30]&&e.hepteractCrafts.accelerator.unlock("the Hepteract of Way Too Many Accelerators"),n>=t[31]&&e.hepteractCrafts.acceleratorBoost.unlock("the Hepteract of Way Too Many Accelerator Boosts"),n>=t[32]&&e.hepteractCrafts.multiplier.unlock("the Hepteract of Way Too Many Multipliers"),n>=t[33]&&(o.challenge15Rewards.freeOrbs=Math.floor(200*Math.pow(n/2e17,.5))),n>=t[34]&&(o.challenge15Rewards.ascensionSpeed=1+5/100+2*Math.log2(n/15e17)/100),Yv()},Yv=()=>{i("c15Reward0Num").textContent=d(e.challenge15Exponent,3,!0),i("c15RequiredExponentNum").textContent=d(m.pow(10,e.challenge15Exponent/ai()),0,!0);let t=[750,1500,3e3,5e3,7500,7500,1e4,1e4,2e4,4e4,6e4,1e5,1e5,2e5,5e5,1e6,3e6,1e7,3e7,1e8,5e8,2e9,1e10,1e11,1e15,2e15,4e15,7e15,1e16,2e16,333e14,333e14,333e14,2e17,15e17],r={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,10:!0,11:!0,12:!0,13:!0,14:!0,15:!0,16:!0,17:!0,18:!0,19:!0,20:!0,21:!0,22:!0,23:!0,24:!1,25:!1,26:!0,27:!0,28:!1,29:!0,30:!1,31:!1,32:!1,33:!0,34:!0},n=Object.values(o.challenge15Rewards),a="None",s=0;for(let l=0;l=t[l]&&(i(`c15Reward${l+1}Num`).textContent=r[l]?d(100*n[l-s]-100,2,!0):"Unlocked!",!r[l]&&l!==24&&(s+=1),l===33&&(i("c15Reward34Num").textContent=d(n[l-s],0,!0))),i(`c15Reward${l+1}`).style.display=e.challenge15Exponent>=t[l]?"block":"none",i("c15RewardList").textContent=typeof a=="string"?"You have unlocked all reward types from Challenge 15!":`Next reward type requires ${d(a,0,!0)} exponent.`},Jv=()=>[{stage:0,tier:1,name:"start",unlocked:!0,reset:!0},{stage:1,tier:1,name:"start-prestige",unlocked:e.unlocks.prestige,reset:e.unlocks.prestige},{stage:2,tier:2,name:"prestige-transcend",unlocked:e.unlocks.transcend,reset:e.unlocks.transcend},{stage:3,tier:3,name:"transcend-reincarnate",unlocked:e.unlocks.reincarnate,reset:e.unlocks.reincarnate},{stage:4,tier:4,name:"reincarnate-ant",unlocked:e.firstOwnedAnts!==0,reset:e.unlocks.reincarnate},{stage:5,tier:4,name:"ant-sacrifice",unlocked:e.achievements[173]===1,reset:e.unlocks.reincarnate},{stage:6,tier:4,name:"sacrifice-ascension",unlocked:e.achievements[183]===1,reset:e.unlocks.reincarnate},{stage:7,tier:5,name:"ascension-challenge10",unlocked:e.ascensionCount>1,reset:e.achievements[183]===1},{stage:8,tier:5,name:"challenge10-challenge11",unlocked:e.achievements[197]===1,reset:e.achievements[183]===1},{stage:9,tier:5,name:"challenge11-challenge12",unlocked:e.achievements[204]===1,reset:e.achievements[183]===1},{stage:10,tier:5,name:"challenge12-challenge13",unlocked:e.achievements[211]===1,reset:e.achievements[183]===1},{stage:11,tier:5,name:"challenge13-challenge14",unlocked:e.achievements[218]===1,reset:e.achievements[183]===1},{stage:12,tier:5,name:"challenge14-w5x10max",unlocked:e.cubeUpgrades[50]>=1e5,reset:e.achievements[183]===1},{stage:13,tier:5,name:"w5x10max-alpha",unlocked:e.platonicUpgrades[5]>0,reset:e.achievements[183]===1},{stage:14,tier:5,name:"alpha-p2x1x10",unlocked:e.platonicUpgrades[6]>=10,reset:e.achievements[183]===1},{stage:15,tier:5,name:"p2x1x10-p3x1",unlocked:e.platonicUpgrades[11]>0,reset:e.achievements[183]===1},{stage:16,tier:5,name:"p3x1-beta",unlocked:e.platonicUpgrades[10]>0,reset:e.achievements[183]===1},{stage:17,tier:5,name:"beta-1e15-expo",unlocked:e.challenge15Exponent>=1e15,reset:e.achievements[183]===1},{stage:18,tier:5,name:"1e15-expo-omega",unlocked:e.platonicUpgrades[15]>0,reset:e.achievements[183]===1},{stage:19,tier:5,name:"omega-singularity",unlocked:e.singularityCount>0&&e.runelevels[6]>0,reset:e.achievements[183]===1},{stage:20,tier:6,name:"singularity-exalt1x1",unlocked:e.singularityChallenges.noSingularityUpgrades.completions>0,reset:e.highestSingularityCount>0},{stage:21,tier:6,name:"exalt1x1-onemind",unlocked:e.singularityUpgrades.oneMind.level>0,reset:e.highestSingularityCount>0},{stage:22,tier:6,name:"onemind-end",unlocked:e.singularityUpgrades.offeringAutomatic.level>0,reset:e.highestSingularityCount>0},{stage:23,tier:6,name:"end-pen",unlocked:e.singularityUpgrades.ultimatePen.level>0,reset:e.highestSingularityCount>0},{stage:24,tier:6,name:"pen",unlocked:!1,reset:e.highestSingularityCount>0}],od=(t=e.singularityCount>0?5:0)=>{let r=Jv();for(let a=0;a{if(o.currentTab===0){if(o.buildingSubTab==="coin"){let t=["produceFirst","produceSecond","produceThird","produceFourth","produceFifth"],r=[null,"workers","investments","printers","coinMints","alchemies"],n=new m(o.produceTotal);n.equals(0)&&(n=new m(1));for(let s=1;s<=5;s++){let l=o[t[s-1]],c=o.ordinals[s-1];i(`buildtext${2*s-1}`).textContent=u.t(`buildings.names.${r[s]}`,{amount:d(e[`${c}OwnedCoin`],0,!0),gain:d(e[`${c}GeneratedCoin`])}),i(`buycoin${s}`).textContent=u.t("buildings.costCoins",{coins:d(e[`${c}CostCoin`])});let p=m.fromMantissaExponent(l.mantissa/n.mantissa,l.exponent-n.exponent).times(100);i(`buildtext${2*s}`).textContent=u.t("buildings.coinsPerSecond",{coins:d(l.dividedBy(o.taxdivisor).times(40),2),percent:d(p,3)})}i("buildtext11").textContent=u.t("buildings.names.accelerators",{amount:d(e.acceleratorBought,0,!0),gain:d(o.freeAccelerator,0,!0)}),i("buildtext12").textContent=u.t("buildings.acceleratorPower",{power:d((o.acceleratorPower-1)*100,2),mult:d(o.acceleratorEffect,2)}),i("buildtext13").textContent=u.t("buildings.names.multipliers",{amount:d(e.multiplierBought,0,!0),gain:d(o.freeMultiplier,0,!0)}),i("buildtext14").textContent=u.t("buildings.multiplierPower",{power:d(o.multiplierPower,2),mult:d(o.multiplierEffect,2)}),i("buildtext15").textContent=u.t("buildings.names.acceleratorBoost",{amount:d(e.acceleratorBoostBought,0,!0),gain:d(o.freeAcceleratorBoost,0,!1)}),i("buildtext16").textContent=u.t("buildings.acceleratorBoost",{amount:d(o.tuSevenMulti*(1+e.researches[16]/50)*(1+K("transcend",e.challengecompletions[2])/100),2)}),i("buyaccelerator").textContent=u.t("buildings.costCoins",{coins:d(e.acceleratorCost)}),i("buymultiplier").textContent=u.t("buildings.costCoins",{coins:d(e.multiplierCost)}),i("buyacceleratorboost").textContent=u.t("buildings.costDiamonds",{diamonds:d(e.acceleratorBoostCost)});let a="";e.reincarnationCount>.5&&(a=u.t("buildings.taxWarning",{gain:d(m.pow(10,o.maxexponent-m.log(o.taxdivisorcheck,10)))})),i("taxinfo").textContent=u.t("buildings.excessiveWealth",{div:d(o.taxdivisor,2),warning:a})}else if(o.buildingSubTab==="diamond"){let t=["produceFirstDiamonds","produceSecondDiamonds","produceThirdDiamonds","produceFourthDiamonds","produceFifthDiamonds"],r=["refineries","coalPlants","coalRigs","pickaxes","pandorasBoxes"],n=["crystal","ref","plants","rigs","pickaxes"];i("prestigeshardinfo").textContent=u.t("buildings.crystalMult",{crystals:d(e.prestigeShards,2),gain:d(o.prestigeMultiplier,2)});for(let a=1;a<=5;a++){let s=o[t[a-1]],l=o.ordinals[a-1];i(`prestigetext${2*a-1}`).textContent=u.t(`buildings.names.${r[a-1]}`,{amount:d(e[`${l}OwnedDiamonds`],0,!0),gain:d(e[`${l}GeneratedDiamonds`],2)}),i(`prestigetext${2*a}`).textContent=u.t(`buildings.per.${n[a-1]}`,{amount:d(s.times(40),2)}),i(`buydiamond${a}`).textContent=u.t("buildings.costDiamonds",{diamonds:d(e[`${l}CostDiamonds`],2)})}if(e.resettoggle1===1||e.resettoggle1===0){let a=m.pow(10,m.log(o.prestigePointGain.add(1),10)-m.log(e.prestigePoints.sub(1),10));i("autoprestige").textContent=u.t("buildings.autoPrestige",{name:"Diamonds",action:"Prestige",factor:d(m.pow(10,e.prestigeamount)),mult:d(a)})}else e.resettoggle1===2&&(i("autoprestige").textContent=u.t("buildings.autoReincarnate",{name:"Prestige",amount:e.prestigeamount,timer:d(o.autoResetTimers.prestige,1)}))}else if(o.buildingSubTab==="mythos"){let t=["produceFirstMythos","produceSecondMythos","produceThirdMythos","produceFourthMythos","produceFifthMythos"],r=["augments","enchantments","wizards","oracles","grandmasters"],n=["shards","augments","enchantments","wizards","oracles"];i("transcendshardinfo").textContent=u.t("buildings.mythosYouHave",{shards:d(e.transcendShards,2),mult:d(o.totalMultiplierBoost,0,!0)});for(let a=1;a<=5;a++){let s=o[t[a-1]],l=o.ordinals[a-1];i(`transcendtext${2*a-1}`).textContent=u.t(`buildings.names.${r[a-1]}`,{amount:d(e[`${l}OwnedMythos`],0,!0),gain:d(e[`${l}GeneratedMythos`],2)}),i(`transcendtext${2*a}`).textContent=u.t(`buildings.per.${n[a-1]}`,{amount:d(s.times(40),2)}),i(`buymythos${a}`).textContent=u.t("buildings.costMythos",{mythos:d(e[`${l}CostMythos`],2)})}(e.resettoggle2===1||e.resettoggle2===0)&&(i("autotranscend").textContent=u.t("buildings.autoPrestige",{name:"Mythos",action:"Prestige",factor:d(m.pow(10,e.transcendamount)),mult:d(m.pow(10,m.log(o.transcendPointGain.add(1),10)-m.log(e.transcendPoints.add(1),10)),2)})),e.resettoggle2===2&&(i("autotranscend").textContent=`Transcend when the autotimer is at least ${e.transcendamount} real-life seconds. [Toggle number above]. Current timer: ${d(o.autoResetTimers.transcension,1)}s.`)}else if(o.buildingSubTab==="particle"){let t=["FirstParticles","SecondParticles","ThirdParticles","FourthParticles","FifthParticles"],r=["protons","elements","pulsars","quasars","galacticNuclei"],n=["atoms","protons","elements","pulsars","quasars"];for(let a=1;a<=5;a++){let s=o.ordinals[a-1],l=o[`produce${t[a-1]}`];i(`reincarnationtext${a}`).textContent=u.t(`buildings.names.${r[a-1]}`,{amount:d(e[`${s}OwnedParticles`],0,!0),gain:d(e[`${s}GeneratedParticles`],2)}),i(`reincarnationtext${a+5}`).textContent=u.t(`buildings.per.${n[a-1]}`,{amount:d(l.times(40),2)}),i(`buyparticles${a}`).textContent=u.t("buildings.costParticles",{particles:d(e[`${s}CostParticles`],2)})}i("reincarnationshardinfo").textContent=u.t("buildings.atomsYouHave",{atoms:d(e.reincarnationShards,2),power:d(o.buildingPower,4),mult:d(o.reincarnationMultiplier)}),i("reincarnationCrystalInfo").textContent=u.t("buildings.thanksR2x14",{mult:d(m.pow(o.reincarnationMultiplier,1/50),3,!1)}),i("reincarnationMythosInfo").textContent=u.t("buildings.thanksR2x15",{mult:d(m.pow(o.reincarnationMultiplier,1/250),3,!1)}),e.resettoggle3===1||e.resettoggle3===0?i("autoreincarnate").textContent=u.t("buildings.autoPrestige",{name:"Particles",action:"Reincarnate",factor:d(m.pow(10,e.reincarnationamount)),mult:d(m.pow(10,m.log(o.reincarnationPointGain.add(1),10)-m.log(e.reincarnationPoints.add(1),10)),2)}):e.resettoggle3===2&&(i("autoreincarnate").textContent=u.t("buildings.autoReincarnate",{name:"Reincarnate",amount:e.reincarnationamount,timer:d(o.autoResetTimers.reincarnation,1)}))}else if(o.buildingSubTab==="tesseract"){let t=["dot","vector","threeSpace","bentTime","hilbertSpace"],r=["constant","dot","vector","threeSpace","bentTime"];for(let n=1;n<=5;n++){let a=`ascendBuilding${n}`;i(`ascendText${n}`).textContent=u.t(`buildings.names.${t[n-1]}`,{amount:d(e[a].owned,0,!0),gain:d(e[a].generated,2)}),i(`ascendText${5+n}`).textContent=u.t(`buildings.per.${r[n-1]}`,{amount:d(o.ascendBuildingProduction[o.ordinals[n-1]],2)}),i(`buyTesseracts${n}`).textContent=u.t("buildings.costTesseracts",{tesseracts:d(e[a].cost,0)})}i("tesseractInfo").textContent=u.t("buildings.tesseractsYouHave",{tesseracts:d(e.wowTesseracts)}),i("ascendShardInfo").textContent=u.t("buildings.constantYouHave",{const:d(e.ascendShards,2),amount:d(Math.pow(m.log(e.ascendShards.add(1),10)+1,1+.2/60*e.challengecompletions[10]*e.upgrades[125]+.1*e.platonicUpgrades[5]+.2*e.platonicUpgrades[10]+(o.platonicBonusMultiplier[5]-1)),4,!0)}),e.resettoggle4===1||e.resettoggle4===0?i("autotessbuyeramount").textContent=u.t("buildings.autoTesseract",{tesseracts:d(e.tesseractAutoBuyerAmount)}):e.resettoggle4===2&&(i("autotessbuyeramount").textContent=u.t("buildings.autoAscensionTesseract",{percent:d(Math.min(100,e.tesseractAutoBuyerAmount))}))}}},hm=()=>{},bm=()=>{},ym=()=>{if(o.currentTab===3){if(o.runescreen==="runes"){let t=["rune1Talisman","rune2Talisman","rune3Talisman","rune4Talisman","rune5Talisman"];i("offeringCount").textContent=u.t("runes.offeringsYouHave",{offerings:d(e.runeshards,0,!0)});for(let a=1;a<=7;a++){let s=o[t[a-1]];a>5&&(s=0);let l=e.runelevels[a-1],c=wt(a);i(`rune${a}level`).childNodes[0].textContent=u.t("cubes.cubeMetadata.level",{value1:d(l),value2:d(c)}),l0?"":"Level "} ${d(e.talismanLevels[t])}/${d(r)}`}if(o.runescreen==="blessings"){let t=[0,8,10,6.66,2,1],r=0;for(let n=1;n<=5;n++){i(`runeBlessingLevel${n}Value`).innerHTML=u.t("runes.blessings.blessingLevel",{amount:d(e.runeBlessingLevels[n])}),i(`runeBlessingPower${n}Value1`).innerHTML=u.t("runes.blessings.blessingPower",{reward:u.t(`runes.blessings.rewards.${n-1}`),value:d(o.runeBlessings[n]),speed:d(1-r+t[n]*o.effectiveRuneBlessingPower[n],4,!0)});let a=la(e.runeBlessingLevels[n],o.blessingBaseCost,e.runeshards,e.runeBlessingBuyAmount)[0]-e.runeBlessingLevels[n];a>0?i(`runeBlessingPurchase${n}`).classList.add("runeButtonsAvailable"):i(`runeBlessingPurchase${n}`).classList.remove("runeButtonsAvailable"),i(`runeBlessingPurchase${n}`).innerHTML=u.t("runes.blessings.increaseLevel",{amount:d(Math.max(1,a)),offerings:d(Math.max(o.blessingBaseCost*(1+e.runeBlessingLevels[n]),la(e.runeBlessingLevels[n],o.blessingBaseCost,e.runeshards,e.runeBlessingBuyAmount)[1]))}),n===5&&(r=1)}}if(o.runescreen==="spirits"){let t=[0,1,1,20,1,100],r=[0,0,0,1,0,0];for(let n=1;n<=5;n++){t[n]*=ht()/400,i(`runeSpiritLevel${n}Value`).innerHTML=u.t("runes.spirits.spiritLevel",{amount:d(e.runeSpiritLevels[n])}),i(`runeSpiritPower${n}Value1`).innerHTML=u.t("runes.spirits.spiritPower",{reward:u.t(`runes.spirits.rewards.${n-1}`),value:d(o.runeSpirits[n]),speed:d(1-r[n]+t[n]*o.effectiveRuneSpiritPower[n],4,!0)});let a=la(e.runeSpiritLevels[n],o.spiritBaseCost,e.runeshards,e.runeSpiritBuyAmount)[0]-e.runeSpiritLevels[n];a>0?i(`runeSpiritPurchase${n}`).classList.add("runeButtonsAvailable"):i(`runeSpiritPurchase${n}`).classList.remove("runeButtonsAvailable"),i(`runeSpiritPurchase${n}`).innerHTML=u.t("runes.blessings.increaseLevel",{amount:d(Math.max(1,a)),offerings:d(Math.max(o.spiritBaseCost*(1+e.runeSpiritLevels[n]),la(e.runeSpiritLevels[n],o.spiritBaseCost,e.runeshards,e.runeSpiritBuyAmount)[1]))})}}}},vm=()=>{o.currentTab===4&&e.researches[150]>0&&(i("autoIncrementerAmount").innerHTML=u.t("challenges.autoTimer",{time:d(o.autoChallengeTimerIncrement,2)}))},Xl=()=>{o.currentTab===5&&e.researches[61]>0&&(i("automaticobtainium").textContent=u.t("researches.thanksToResearches",{x:d(ii()*st().mult,3,!0)}))},Cm=()=>{if(o.currentTab!==6)return;i("crumbcount").textContent=u.t("ants.youHaveGalacticCrumbs",{x:d(e.antPoints,2),y:d(o.antOneProduce,2),z:d(m.pow(m.max(1,e.antPoints),1e5+nr(499e5,(e.antUpgrades[1]+o.bonusant2)/5e3*500/499)))});let t=e.autoAntSacrificeMode===2?u.t("ants.modeRealTime"):u.t("ants.modeInGameTime"),r=e.autoAntSacrificeMode===2?e.antSacrificeTimerReal:e.antSacrificeTimer;i("autoAntSacrifice").textContent=u.t("ants.sacrificeWhenTimer",{x:e.autoAntSacTimer,y:t,z:d(r,2)}),e.achievements[173]===1&&(i("antSacrificeTimer").textContent=dr(e.antSacrificeTimer),km())},Zl=()=>{if(o.currentTab!==7)return;let t=e.shopUpgrades.cubeToQuark?1.5:1,r=e.shopUpgrades.tesseractToQuark?1.5:1,n=e.shopUpgrades.hypercubeToQuark?1.5:1,a=1.5,s={cube:Number(e.wowCubes.checkCubesToNextQuark(5,t,e.cubeQuarkDaily,e.cubeOpenedDaily)),tesseract:Number(e.wowTesseracts.checkCubesToNextQuark(7,r,e.tesseractQuarkDaily,e.tesseractOpenedDaily)),hypercube:Number(e.wowHypercubes.checkCubesToNextQuark(10,n,e.hypercubeQuarkDaily,e.hypercubeOpenedDaily)),platonicCube:Number(e.wowPlatonicCubes.checkCubesToNextQuark(15,a,e.platonicCubeQuarkDaily,e.platonicCubeOpenedDaily))},l=Object.keys(s);for(let p of l)i(`${p}QuarksToday`).innerHTML=u.t(`wowCubes.quarks.${p}QuarksToday`,{amount:d(e[`${p}QuarkDaily`])}),i(`${p}QuarksOpenToday`).innerHTML=u.t(`wowCubes.quarks.${p}QuarksOpenToday`,{amount:d(e[`${p}OpenedDaily`])}),i(`${p}QuarksOpenRequirement`).innerHTML=u.t(`wowCubes.quarks.${p}QuarksOpenRequirement`,{amount:d(Math.max(1,s[p]))}),i(`${p}QuarksOpenRequirement`).style.color=Math.max(1,s[p])===1?"gold":"white";let c;switch(e.subtabNumber){case 0:{e.autoOpenCubes&&(i("openCubes").textContent=u.t("wowCubes.autoOn",{percent:d(e.openCubes,0)})),i("cubeQuantity").innerHTML=u.t("wowCubes.cubes.inventory",{amount:d(e.wowCubes,0,!0)});let p=[null,e.cubeBlessings.accelerator,e.cubeBlessings.multiplier,e.cubeBlessings.offering,e.cubeBlessings.runeExp,e.cubeBlessings.obtainium,e.cubeBlessings.antSpeed,e.cubeBlessings.antSacrifice,e.cubeBlessings.antELO,e.cubeBlessings.talismanBonus,e.cubeBlessings.globalSpeed];c=[null,2,2,2,2,2,2,2,1,4,3];for(let f=1;f<=10;f++){let g=0;p[f]>=1e3&&f!==6&&(g+=2);let h=f===1||f===8||f===9?1:100;i(`cube${f}Bonus`).innerHTML=u.t(`wowCubes.cubes.items.${f}`,{amount:d(p[f],0,!0),bonus:d(h*(o.cubeBonusMultiplier[f]-1),c[f]+g,!0)})}i("cubeBlessingsTotal").innerHTML=u.t("wowCubes.cubes.total",{amount:d(xe(p.slice(1)),0,!0)});break}case 1:{e.autoOpenTesseracts&&(i("openTesseracts").textContent=u.t("wowCubes.autoOn",{percent:d(e.openTesseracts,0)})),i("tesseractQuantity").innerHTML=u.t("wowCubes.tesseracts.inventory",{amount:d(e.wowTesseracts,0,!0)});let p=[null,e.tesseractBlessings.accelerator,e.tesseractBlessings.multiplier,e.tesseractBlessings.offering,e.tesseractBlessings.runeExp,e.tesseractBlessings.obtainium,e.tesseractBlessings.antSpeed,e.tesseractBlessings.antSacrifice,e.tesseractBlessings.antELO,e.tesseractBlessings.talismanBonus,e.tesseractBlessings.globalSpeed];c=[null,2,2,2,2,2,2,2,2,2,2];for(let f=1;f<=10;f++){let g=0;p[f]>=1e3&&f!==6&&(g+=2),i(`tesseract${f}Bonus`).innerHTML=u.t(`wowCubes.tesseracts.items.${f}`,{amount:d(p[f],0,!0),bonus:d(100*(o.tesseractBonusMultiplier[f]-1),c[f]+g,!0)})}i("tesseractBlessingsTotal").innerHTML=u.t("wowCubes.tesseracts.total",{amount:d(xe(p.slice(1)),0,!0)});break}case 2:{e.autoOpenHypercubes&&(i("openHypercubes").textContent=u.t("wowCubes.autoOn",{percent:d(e.openHypercubes,0)})),i("hypercubeQuantity").innerHTML=u.t("wowCubes.hypercubes.inventory",{amount:d(e.wowHypercubes,0,!0)});let p=[null,e.hypercubeBlessings.accelerator,e.hypercubeBlessings.multiplier,e.hypercubeBlessings.offering,e.hypercubeBlessings.runeExp,e.hypercubeBlessings.obtainium,e.hypercubeBlessings.antSpeed,e.hypercubeBlessings.antSacrifice,e.hypercubeBlessings.antELO,e.hypercubeBlessings.talismanBonus,e.hypercubeBlessings.globalSpeed];c=[null,2,2,2,2,2,2,2,2,2,2];for(let f=1;f<=10;f++){let g=0;p[f]>=1e3&&(g+=2),i(`hypercube${f}Bonus`).innerHTML=u.t(`wowCubes.hypercubes.items.${f}`,{amount:d(p[f],0,!0),bonus:d(100*(o.hypercubeBonusMultiplier[f]-1),c[f]+g,!0)})}i("hypercubeBlessingsTotal").innerHTML=u.t("wowCubes.hypercubes.total",{amount:d(xe(p.slice(1)),0,!0)});break}case 3:{e.autoOpenPlatonicsCubes&&(i("openPlatonicCube").textContent=u.t("wowCubes.autoOn",{percent:d(e.openPlatonicsCubes,0)})),i("platonicQuantity").innerHTML=u.t("wowCubes.platonics.inventory",{amount:d(e.wowPlatonicCubes,0,!0)});let p=[e.platonicBlessings.cubes,e.platonicBlessings.tesseracts,e.platonicBlessings.hypercubes,e.platonicBlessings.platonics,e.platonicBlessings.hypercubeBonus,e.platonicBlessings.taxes,e.platonicBlessings.scoreBonus,e.platonicBlessings.globalSpeed],f=[4e6,4e6,4e6,8e4,1e4,1e4,1e4,1e4];c=[5,5,5,5,2,3,3,2];for(let g=0;g=f[g]&&(h+=1),i(`platonicCube${g+1}Bonus`).innerHTML=u.t(`wowCubes.platonics.items.${g+1}`,{amount:d(p[g],0,!0),bonus:d(100*(o.platonicBonusMultiplier[g]-1),c[g]+h,!0)})}i("platonicBlessingsTotal").innerHTML=u.t("wowCubes.platonics.total",{amount:d(xe(p),0,!0)});break}case 4:i("cubeAmount2").textContent=`You have ${d(e.wowCubes,0,!0)} Wow! Cubes =)`;break;case 5:break;case 6:i("hepteractQuantity").innerHTML=u.t("wowCubes.hepteractForge.youPossessHepteracts",{x:d(e.wowAbyssals,0,!0)}),mg.forEach(p=>{eC(p)}),i("heptGridOrbBalance").textContent=d(e.overfluxOrbs),i("heptGridOrbEffect").textContent=`${d(100*(-1+Yn()),2,!0)}%`,i("heptGridPowderBalance").textContent=d(e.overfluxPowder),i("heptGridPowderWarps").textContent=d(e.dailyPowderResetUses);break;default:break}},eC=t=>{let r=`${t}ProgressBarText`,n=`${t}ProgressBar`,a=i(r),s=i(n);if(!e.hepteractCrafts[t].UNLOCKED)a.textContent="LOCKED",s.style.width="100%",s.style.backgroundColor="var(--hepteract-bar-red)";else{let c=e.hepteractCrafts[t].BAL,p=e.hepteractCrafts[t].computeActualCap(),f=Math.round(c/p*100),g="";f<34?g="var(--hepteract-bar-red)":f>=34&&f<68?g="var(--hepteract-bar-yellow)":g="var(--hepteract-bar-green)",a.textContent=`${d(c)} / ${d(p)}`,s.style.width=`${f}%`,s.style.backgroundColor=g}},wm=()=>{if(o.currentTab!==8)return;let t=bn(),r=si();i("autoAscend").innerHTML=e.autoAscendMode==="c10Completions"?u.t("corruptions.autoAscend.c10Completions",{input:d(e.autoAscendThreshold),completions:d(e.challengecompletions[10])}):u.t("corruptions.autoAscend.realTime",{input:d(e.autoAscendThreshold),time:d(e.ascensionCounterRealReal)}),i("corruptionBank").innerHTML=u.t("corruptions.corruptionBank",{number:d(t[0],0,!0)}),i("corruptionScore").innerHTML=u.t("corruptions.corruptionScore",{ascScore:d(t[1],1,!0),corrMult:d(t[2],1,!0),bonusMult:d(t[9],2,!0),totalScore:d(t[3],1,!0)}),i("corruptionCubes").innerHTML=u.t("corruptions.corruptionCubes",{cubeAmount:d(t[4],0,!0)}),i("corruptionTesseracts").innerHTML=u.t("corruptions.corruptionTesseracts",{tesseractAmount:d(t[5],0,!0)}),i("corruptionHypercubes").innerHTML=u.t("corruptions.corruptionHypercubes",{hypercubeAmount:d(t[6],0,!0)}),i("corruptionPlatonicCubes").innerHTML=u.t("corruptions.corruptionPlatonics",{platonicAmount:d(t[7],0,!0)}),i("corruptionHepteracts").innerHTML=u.t("corruptions.corruptionHepteracts",{hepteractAmount:d(t[8],0,!0)}),i("corruptionAntExponent").innerHTML=u.t("corruptions.antExponent",{exponent:d((1-.9/90*xe(e.usedCorruptions))*o.extinctionMultiplier[e.usedCorruptions[7]],3)}),i("corruptionSpiritBonus").innerHTML=u.t("corruptions.spiritBonus",{multiplier:d(ht()/400,2,!0)}),i("corruptionAscensionCount").style.display=r>1?"block":"none",r>1&&(i("corruptionAscensionCount").innerHTML=u.t("corruptions.ascensionCount",{ascCount:d(si())}))},xm=()=>{if(o.currentTab===10){if(e.subtabNumber===0){i("saveString").textContent=u.t("settings.currently",{x:e.saveString.replace("$VERSION$",`v${yr}`)});let t=Jt(),r=t.gain,n=t.capacity,a=1;a*=1+vr()/100,a*=e.highestSingularityCount>=100?1+e.highestSingularityCount/50:1,i("quarktimerdisplay").textContent=u.t("settings.exportQuark",{x:d(3600/t.perHour-e.quarkstimer%(3600.00001/t.perHour),2),y:e.worlds.toString(1)}),i("quarktimeramount").textContent=u.t("settings.quarksOnExport",{x:e.worlds.toString(r),y:e.worlds.toString(n)}),i("goldenQuarkTimerDisplay").textContent=u.t("settings.exportGoldenQuark",{x:d(3600/Math.max(1,+e.singularityUpgrades.goldenQuarks3.getEffect().bonus)-e.goldenQuarksTimer%(3600.00001/Math.max(1,+e.singularityUpgrades.goldenQuarks3.getEffect().bonus))),y:d(a,2,!0)}),i("goldenQuarkTimerAmount").textContent=u.t("settings.goldenQuarksOnExport",{x:d(Math.floor(e.goldenQuarksTimer*+e.singularityUpgrades.goldenQuarks3.getEffect().bonus/3600)*a,2),y:d(Math.floor(168*+e.singularityUpgrades.goldenQuarks3.getEffect().bonus*a))})}e.subtabNumber===3&&pm()}},Mm=()=>{if(o.currentTab===9){if(e.subtabNumber===0){i("goldenQuarkamount").textContent=u.t("singularity.goldenQuarkAmount",{goldenQuarks:d(e.goldenQuarks,0,!0)});let t=Object.keys(e.singularityUpgrades),r=o.shopEnhanceVision;for(let n of t){if(n==="offeringAutomatic"||n==="WIP")continue;let a=e.singularityUpgrades[n],s=i(`${String(n)}`);a.maxLevel!==-1&&a.level>=a.computeMaxLevel()?s.style.filter=r?"brightness(.9)":"none":a.getCostTNL()>e.goldenQuarks||e.singularityCounta.level?s.style.filter=r?"blur(1px) invert(.9) saturate(200)":"none":s.style.filter=r?"invert(.9) brightness(1.1)":"none")}}if(e.subtabNumber===2){let t=Object.keys(e.octeractUpgrades),r=o.shopEnhanceVision;for(let n of t){let a=e.octeractUpgrades[n],s=i(`${String(n)}`);a.maxLevel!==-1&&a.level>=a.maxLevel?s.style.filter=r?"brightness(.9)":"none":a.getCostTNL()>e.wowOcteracts?s.style.filter=r?"grayscale(.9) brightness(.8)":"none":(a.maxLevel===-1||a.levela.level?s.style.filter=r?"blur(2px) invert(.9) saturate(200)":"none":s.style.filter=r?"invert(.9) brightness(1.1)":"none")}}}},oi=t=>{o.shopEnhanceVision=t},Yl=()=>{if(o.currentTab!==9)return;i("octeractAmount").innerHTML=u.t("octeract.amount",{octeracts:d(e.wowOcteracts,2,!0,!0,!0)});let t=mn();i("secondsPerOcteract").style.display=t<1?"block":"none",i("secondsPerOcteract").innerHTML=u.t("octeract.secondsPerOcteract",{seconds:d(1/t,2,!0)}),i("octeractPerSeconds").style.display=t>=1?"block":"none",i("octeractPerSeconds").innerHTML=u.t("octeract.octeractsPerSecond",{octeracts:d(t,2,!0)});let r=(li()-1)*100,n=(_n()-1)*100,a=(gd()-1)*100,s=(ti()-1)*100;i("totalOcteractAmount").innerHTML=u.t("octeract.totalGenerated",{octeracts:d(e.totalWowOcteracts,2,!0,!0,!0)}),i("totalOcteractCubeBonus").style.display=r>=.001?"block":"none",i("totalOcteractQuarkBonus").style.display=n>=.001?"block":"none",i("totalOcteractOfferingBonus").style.display=a>=.001?"block":"none",i("totalOcteractObtainiumBonus").style.display=s>=.001?"block":"none",i("totalOcteractCubeBonus").innerHTML=u.t("octeract.generatedCubeBonus",{cubeBonus:d(r,3,!0)}),i("totalOcteractQuarkBonus").innerHTML=u.t("octeract.generatedQuarkBonus",{quarkBonus:d(n,3,!0)}),i("totalOcteractOfferingBonus").innerHTML=u.t("octeract.generatedOfferingBonus",{offeringBonus:d(a,3,!0)}),i("totalOcteractObtainiumBonus").innerHTML=u.t("octeract.generatedObtainiumBonus",{obtainiumBonus:d(s,3,!0)})},Ks=()=>{if(o.currentTab!==9)return;let t=o.ambrosiaCurrStats.ambrosiaLuck,r=o.ambrosiaCurrStats.ambrosiaLuck/o.ambrosiaCurrStats.ambrosiaAdditiveLuckMult,n=100*(o.ambrosiaCurrStats.ambrosiaAdditiveLuckMult-1),a=Math.floor(t/100),s=t-100*Math.floor(t/100),l=Xs(),c=100*(Jl()-1),p=100*(ri()-1),f=o.ambrosiaCurrStats.ambrosiaBlueberries-e.spentBlueberries,g=o.ambrosiaCurrStats.ambrosiaGenerationSpeed,h=Math.min(g,Math.pow(1e3*g,1/2)),b=100*Math.min(1,e.blueberryTime/l),y=100*Math.min(1,e.ultimateProgress/1e6);i("ambrosiaProgress").style.width=`${b}%`,i("ambrosiaProgressText").textContent=`${d(e.blueberryTime,0,!0)} / ${d(l,0,!0)} [+${d(g,0,!0)}/s]`,i("pixelProgress").style.width=`${y}%`,i("pixelProgressText").textContent=`${d(e.ultimateProgress,0,!0)} / ${d(1e6,0,!0)} [+${d(h*.02,2,!0)}/s]`;let C=n>.01?`[\u2618${d(r,0,!0)} +${d(n,2,!0)}%]`:"";i("ambrosiaAmount").innerHTML=u.t("ambrosia.amount",{ambrosia:d(e.ambrosia,0,!0),lifetimeAmbrosia:d(e.lifetimeAmbrosia,0,!0)}),i("ambrosiaAmountPerGeneration").innerHTML=u.t("ambrosia.perGen",{guaranteed:d(a,0,!0),extraChance:d(s,0,!0),ambrosiaLuck:d(t,0,!0),extra:C}),i("ambrosiaRewards").innerHTML=u.t("ambrosia.bonuses",{cube:d(c,0,!0),quark:d(p,0,!0)}),i("ambrosiaBlueberries").innerHTML=u.t("ambrosia.availableBlueberries",{availableBlueberries:f})},pd=()=>{if(o.currentTab!==11)return;i("quarkamount").textContent=u.t("shop.youHaveQuarks",{x:d(e.worlds,0,!0)}),i("offeringpotionowned").textContent=d(e.shopUpgrades.offeringPotion,0,!0),i("obtainiumpotionowned").textContent=d(e.shopUpgrades.obtainiumPotion,0,!0);let t=Object.keys(e.shopUpgrades);for(let r of t){let n=Te[r];if(n.type==="consume"){let a=Math.min(Math.floor(Number(e.worlds)/as(r)),n.maxLevel-e.shopUpgrades[r]),s=i(`buy${r.toLowerCase()}`);switch(e.shopBuyMaxToggle){case!1:s.textContent="BUY: 100 Quarks Each";break;case"TEN":s.textContent=`+${Math.min(10,a)} for ${d(as(r)*Math.min(10,a),0,!0)} Quarks`;break;default:s.textContent=`+${a} for ${d(as(r)*a)} Quarks`}}if(n.type==="upgrade"){if(e.shopHideToggle&&e.shopUpgrades[r]>=n.maxLevel&&!n.refundable){i(`${r}Hide`).style.display="none";continue}else i(`${r}Hide`).style.display=Ws(r)?"block":"none";n.maxLevel===1?i(`${r}Level`).textContent=e.shopUpgrades[r]>=n.maxLevel?"Bought!":"Not Bought!":i(`${r}Level`).textContent=`${e.highestSingularityCount>0||e.ascensionCount>0?"":"Level "}${d(e.shopUpgrades[r])}/${d(n.maxLevel)}`;let a=n.maxLevel-e.shopUpgrades[r],s;switch(e.shopBuyMaxToggle){case!1:i(`${r}Button`).textContent=e.shopUpgrades[r]>=n.maxLevel?u.t("shop.maxed"):u.t("shop.upgradeFor",{x:d(as(r))});break;case"TEN":s=wr(e.shopUpgrades[r],n.price,+e.worlds,n.priceIncrease/n.price,Math.min(10,a)),i(`${r}Button`).textContent=e.shopUpgrades[r]>=n.maxLevel?u.t("shop.maxed"):u.t("shop.plusForQuarks",{x:d(s.levelCanBuy-e.shopUpgrades[r],0,!0),y:d(s.cost)});break;default:s=wr(e.shopUpgrades[r],n.price,+e.worlds,n.priceIncrease/n.price,a),i(`${r}Button`).textContent=e.shopUpgrades[r]>=n.maxLevel?u.t("shop.maxed"):u.t("shop.plusForQuarks",{x:d(s.levelCanBuy-e.shopUpgrades[r],0,!0),y:d(s.cost)})}}}i("buySingularityQuarksAmount").textContent=`${e.goldenQuarks<1e3?"Owned: ":""}${d(e.goldenQuarks)}`,i("buySingularityQuarksButton").textContent=`Buy! ${d(Tu().cost)} Quarks Each`},Sm=()=>{},Tm=()=>{};var Lm=t=>{var a;let r=(a=t.getAttribute("toggleId"))!=null?a:1;e.toggles[+r]?e.toggles[+r]=!1:e.toggles[+r]=!0;let n=t.getAttribute("format");if(n==="$"||n==="[$]"){let s=e.toggles[+r]?u.t("general.on"):u.t("general.off");t.textContent=n==="[$]"?`[${s}]`:s}else if(n==="Auto Catalyze: $"){let s=e.toggles[+r]?u.t("shop.autoCatalyzeOn"):u.t("shop.autoCatalyzeOff");t.textContent=s}else if(n==="Hover-to-Buy [$]"){let s=e.toggles[+r]?u.t("researches.hoverToBuyOn"):u.t("researches.hoverToBuyOff");t.textContent=s}else if(n==="Auto: $"){let s=e.toggles[+r]?u.t("general.autoOnColon"):u.t("general.autoOffColon");t.textContent=s}else if(n){let s=n.replace("$",e.toggles[+r]?"ON":"OFF");t.textContent=s}else t.textContent=e.toggles[+r]?u.t("general.autoOnBracket"):u.t("general.autoOffBracket");t.style.border=`2px solid ${e.toggles[+r]?"green":"red"}`},Ur=(t,r=!1)=>{t<=5&&((e.currentChallenge.ascension!==15||e.ascensionCounter>=2)&&(e.currentChallenge.transcension=t,Fe("transcensionChallenge",!1,"enterChallenge"),e.transcendCount-=1),!e.currentChallenge.reincarnation&&!document.querySelector(".resetbtn.hover")&&kt("transcensionChallenge")),t>=6&&t<11&&((e.currentChallenge.ascension!==15||e.ascensionCounter>=2)&&(e.currentChallenge.reincarnation=t,Fe("reincarnationChallenge",!1,"enterChallenge"),e.reincarnationCount-=1),document.querySelector(".resetbtn.hover")||kt("reincarnationChallenge")),t>=11&&(!r&&!e.toggles[31]||e.challengecompletions[10]>0||e.currentChallenge.transcension===0&&e.currentChallenge.reincarnation===0&&e.currentChallenge.ascension===0)&&(e.currentChallenge.ascension===15&&Qe("ascensionChallenge",!1,!0),e.currentChallenge.ascension=t,Fe("ascensionChallenge",!1,"enterChallenge")),Wr(),ac(t),t<=10&&!r&&e.autoChallengeRunning&&ui(),e.currentChallenge.transcension!==0&&e.currentChallenge.reincarnation!==0&&e.currentChallenge.ascension!==0&&e.achievements[238]<1&&Q(238)},Am=(t,r)=>{e[`${r}buyamount`]=t;let n=["one","ten","hundred","thousand","10k","100k"][t.toString().length-1];i(`${r}${n}`).style.backgroundColor="Green",t!==1&&(i(`${r}one`).style.backgroundColor=""),t!==10&&(i(`${r}ten`).style.backgroundColor=""),t!==100&&(i(`${r}hundred`).style.backgroundColor=""),t!==1e3&&(i(`${r}thousand`).style.backgroundColor=""),t!==1e4&&(i(`${r}10k`).style.backgroundColor=""),t!==1e5&&(i(`${r}100k`).style.backgroundColor="")},ca=t=>{if(t)e.shoptoggles[t]=!e.shoptoggles[t],i(`${t}AutoUpgrade`).style.borderColor=e.shoptoggles[t]?"green":"red",e.shoptoggles[t]?i(`${t}AutoUpgrade`).textContent=u.t("general.autoOnColon"):i(`${t}AutoUpgrade`).textContent=u.t("general.autoOffColon");else{let r=Object.keys(e.shoptoggles);for(let n of r){let a=e.shoptoggles[n]?"green":"red";e.shoptoggles[n]?i(`${n}AutoUpgrade`).textContent=u.t("general.autoOnColon"):i(`${n}AutoUpgrade`).textContent=u.t("general.autoOffColon"),i(`${n}AutoUpgrade`).style.borderColor=a}}},ci=t=>{t===1?e.resettoggle1===1||e.resettoggle1===0?(e.resettoggle1=2,i("prestigeautotoggle").textContent=u.t("toggles.modeTime")):(e.resettoggle1=1,i("prestigeautotoggle").textContent=u.t("toggles.modeAmount")):t===2?e.resettoggle2===1||e.resettoggle2===0?(e.resettoggle2=2,i("transcendautotoggle").textContent=u.t("toggles.modeTime")):(e.resettoggle2=1,i("transcendautotoggle").textContent=u.t("toggles.modeAmount")):t===3?e.resettoggle3===1||e.resettoggle3===0?(e.resettoggle3=2,i("reincarnateautotoggle").textContent=u.t("toggles.modeTime")):(e.resettoggle3=1,i("reincarnateautotoggle").textContent=u.t("toggles.modeAmount")):t===4&&(e.resettoggle4===1||e.resettoggle4===0?(e.resettoggle4=2,i("tesseractautobuymode").textContent=u.t("toggles.modePercentage")):(e.resettoggle4=1,i("tesseractautobuymode").textContent=u.t("toggles.modeAmount")))},Pm=()=>{e.tesseractAutoBuyerToggle===1||e.tesseractAutoBuyerToggle===0?(e.tesseractAutoBuyerToggle=2,i("tesseractautobuytoggle").textContent=u.t("runes.talismans.autoBuyOff"),i("tesseractautobuytoggle").style.border="2px solid red"):(e.tesseractAutoBuyerToggle=1,i("tesseractautobuytoggle").textContent=u.t("runes.talismans.autoBuyOn"),i("tesseractautobuytoggle").style.border="2px solid green")},md=()=>{var n;let t=Array.from(document.querySelectorAll(".auto[toggleid]"));for(let a of t){let s=a.getAttribute("format"),l=(n=a.getAttribute("toggleId"))!=null?n:1;if(s==="$"){let c=e.toggles[+l]?u.t("general.on"):u.t("general.off");a.textContent=c}else if(s==="Auto Catalyze: $"){let c=e.toggles[+l]?u.t("shop.autoCatalyzeOn"):u.t("shop.autoCatalyzeOff");a.textContent=c}else if(s==="Hover-to-Buy [$]"){let c=e.toggles[+l]?u.t("researches.hoverToBuyOn"):u.t("researches.hoverToBuyOff");a.textContent=c}else if(s==="Auto: $"){let c=e.toggles[+l]?u.t("general.autoOnColon"):u.t("general.autoOffColon");a.textContent=c}else if(s){let c=s.replace("$",e.toggles[+l]?"ON":"OFF");a.textContent=c}else a.textContent=e.toggles[+l]?u.t("general.autoOnBracket"):u.t("general.autoOffBracket");a.style.border=`2px solid ${e.toggles[+l]?"green":"red"}`}let r=Array.from(document.querySelectorAll('*[id^="tesseractAutoToggle"]'));for(let a=0;a{e.researchBuyMaxToggle?(e.researchBuyMaxToggle=!1,i("toggleresearchbuy").textContent=u.t("researches.upgradeOne")):(e.researchBuyMaxToggle=!0,i("toggleresearchbuy").textContent=u.t("researches.upgradeMax"))},Om=()=>{let t=i("toggleautoresearch");e.autoResearchToggle||e.shopUpgrades.obtainiumAuto<1?(e.autoResearchToggle=!1,t.textContent=u.t("researches.automaticOff"),i(`res${e.autoResearch||1}`).classList.remove("researchRoomba"),e.autoResearch=0):(e.autoResearchToggle=!0,t.textContent=u.t("researches.automaticOn")),e.autoResearchToggle&&or()&&e.autoResearchMode==="cheapest"&&(e.autoResearch=o.researchOrderByCost[e.roombaResearchIndex])},Um=()=>{let t=i("toggleautoresearchmode");e.autoResearchMode==="cheapest"||!or()?(e.autoResearchMode="manual",t.textContent=u.t("researches.autoModeManual")):(e.autoResearchMode="cheapest",t.textContent=u.t("researches.autoModeCheapest")),i(`res${e.autoResearch||1}`).classList.remove("researchRoomba"),e.autoResearchToggle&&or()&&e.autoResearchMode==="cheapest"&&(e.autoResearch=o.researchOrderByCost[e.roombaResearchIndex])},hd=t=>{let r=i("toggleautosacrifice");t===0?e.autoSacrificeToggle?(e.autoSacrificeToggle=!1,r.textContent=u.t("runes.blessings.autoRuneOff"),r.style.border="2px solid red",e.autoSacrifice=0):(e.autoSacrificeToggle=!0,e.saveOfferingToggle=!1,r.textContent=u.t("runes.blessings.autoRuneOn"),r.style.border="2px solid green",i("saveOffToggle").textContent=u.t("toggles.saveOfferingsOff"),i("saveOffToggle").style.color="white"):e.autoSacrificeToggle&&e.shopUpgrades.offeringAuto>.5&&(e.autoSacrifice===t?e.autoSacrifice=0:e.autoSacrifice=t);for(let n=1;n<=5;n++)i(`rune${n}`).style.backgroundColor=e.autoSacrifice===n?"orange":"";nt()},Bm=()=>{let t=i("toggleautoBuyFragments");e.autoBuyFragment?(t.textContent=u.t("runes.talismans.autoBuyOff"),t.style.border="2px solid orange",t.style.color="white"):(t.textContent=u.t("runes.talismans.autoBuyOn"),t.style.border="2px solid white",t.style.color="orange"),e.autoBuyFragment=!e.autoBuyFragment},Rm=t=>{o.buildingSubTab=t;let r={coin:{screen:"coinBuildings",button:"switchToCoinBuilding",subtabNumber:0},diamond:{screen:"prestige",button:"switchToDiamondBuilding",subtabNumber:1},mythos:{screen:"transcension",button:"switchToMythosBuilding",subtabNumber:2},particle:{screen:"reincarnation",button:"switchToParticleBuilding",subtabNumber:3},tesseract:{screen:"ascension",button:"switchToTesseractBuilding",subtabNumber:4}};for(let n in r)i(r[n].screen).style.display="none",i(r[n].button).style.backgroundColor="";i(r[o.buildingSubTab].screen).style.display="flex",i(r[o.buildingSubTab].button).style.backgroundColor="crimson",e.subtabNumber=r[o.buildingSubTab].subtabNumber},Im=t=>{let r=Number(t),n=["runes","talismans","blessings","spirits"];o.runescreen=n[r-1];for(let a=1;a<=4;a++){let s=i(`toggleRuneSubTab${a}`),l=i(`runeContainer${a}`);a===r?(s.style.border="2px solid gold",s.style.backgroundColor="crimson",l.style.display="flex"):(s.style.border="2px solid silver",s.style.backgroundColor="",l.style.display="none")}e.subtabNumber=r-1},Nm=t=>{let r=Number(t);for(let n=1;n<=2;n++){let a=i(`toggleChallengesSubTab${n}`),s=i(`challengesWrapper${n}`);n===r?(a.style.backgroundColor="crimson",s.style.display="block"):(a.style.backgroundColor="",s.style.display="none")}e.subtabNumber=r-1},_m=()=>{let t=i("toggleautofortify");e.autoFortifyToggle?(t.textContent=u.t("runes.autoFortifyOff"),t.style.border="2px solid red"):(t.textContent=u.t("runes.autoFortifyOn"),t.style.border="2px solid green"),e.autoFortifyToggle=!e.autoFortifyToggle},$m=()=>{let t=i("toggleautoenhance");e.autoEnhanceToggle?(t.textContent=u.t("runes.autoEnhanceOff"),t.style.border="2px solid red"):(t.textContent=u.t("runes.autoEnhanceOn"),t.style.border="2px solid green"),e.autoEnhanceToggle=!e.autoEnhanceToggle},Dm=()=>{let t=i("saveOffToggle"),r=i("toggleautosacrifice");e.saveOfferingToggle?(e.autoSacrificeToggle=!0,t.textContent=u.t("toggles.saveOfferingsOff"),t.style.color="white",r.textContent="Auto Runes: ON",r.style.border="2px solid green"):(e.autoSacrificeToggle=!1,t.textContent=u.t("toggles.saveOfferingsOn"),t.style.color="yellow",r.textContent="Auto Runes: OFF",r.style.border="2px solid red"),e.saveOfferingToggle=!e.saveOfferingToggle},Gm=t=>{let r=Number(t);for(let n=1;n<=4;n++){let a=i(`toggleSingularitySubTab${n}`),s=i(`singularityContainer${n}`);n===r?(a.style.backgroundColor="crimson",s.style.display="block"):(a.style.backgroundColor="",s.style.display="none")}e.subtabNumber=r-1,e.subtabNumber===2&&Yl(),e.subtabNumber===3&&Ks()},Hm=async t=>{let r=i("settings").getElementsByClassName("subtabSwitcher")[0].children[e.subtabNumber],n=i(t);if(n.classList.contains("subtabActive"))return;if(r.parentNode.querySelectorAll(".buttonActive").forEach(s=>s.classList.remove("buttonActive")),r.classList.add("buttonActive"),n.parentNode.querySelectorAll(".subtabActive").forEach(s=>s.classList.remove("subtabActive")),n.classList.add("subtabActive"),t==="creditssubtab"){let s=i("creditList"),l=i("artistList");if(s.childElementCount>0||l.childElementCount>0)return;if(!navigator.onLine||document.hidden)return;try{let p=await(await fetch("https://api.github.com/repos/pseudo-corp/SynergismOfficial/contributors",{headers:{Accept:"application/vnd.github.v3+json"}})).json();for(let f of p){let g=document.createElement("div");g.classList.add("credit");let h=new Image(32,32);h.src=f.avatar_url,h.alt=f.login;let b=document.createElement("a");b.href=`https://github.com/Pseudo-Corp/SynergismOfficial/commits?author=${f.login}`,b.textContent=f.login,b.target="_blank",b.rel="noopener noreferrer nofollow",g.appendChild(h),g.appendChild(b),s.appendChild(g)}}catch(c){let p=c;s.appendChild(document.createTextNode(p.toString()))}try{let p=await(await fetch("https://api.github.com/gists/01917ff476d25a141c5bad38340cd756",{headers:{Accept:"application/vnd.github.v3+json"}})).json(),f=JSON.parse(p.files["synergism_artists.json"].content);for(let g of f){let h=document.createElement("p");h.textContent=g,l.appendChild(h)}}catch(c){let p=c;s.appendChild(document.createTextNode(p.toString()))}}},Fm=()=>{let t=i("toggleConfirmShop");t.textContent=e.shopConfirmationToggle?u.t("shop.shopConfirmationOff"):u.t("shop.shopConfirmationOn"),e.shopConfirmationToggle=!e.shopConfirmationToggle},Qm=t=>{let r=i("toggleBuyMaxShopText");if(t.shiftKey){r.textContent=u.t("shop.buyAny"),e.shopBuyMaxToggle="ANY";return}switch(e.shopBuyMaxToggle){case!1:r.innerHTML=u.t("shop.buy10"),e.shopBuyMaxToggle="TEN";break;case"TEN":r.innerHTML=u.t("shop.buyMax"),e.shopBuyMaxToggle=!0;break;default:r.innerHTML=u.t("shop.buy1"),e.shopBuyMaxToggle=!1}},qm=()=>{let t=i("toggleHideShop");t.textContent=e.shopHideToggle?u.t("shop.hideMaxedOff"):u.t("shop.hideMaxedOn"),e.shopHideToggle=!e.shopHideToggle},ec=()=>{let t=i("toggleAntMax");t.textContent=e.antMax?u.t("general.buyMaxOff"):u.t("general.buyMaxOn"),e.antMax=!e.antMax},Zs=(t=0)=>{if(t===0){let r=i("toggleAutoSacrificeAnt");e.autoAntSacrifice?(e.autoAntSacrifice=!1,r.textContent=u.t("ants.autoSacrificeOff")):(e.autoAntSacrifice=!0,r.textContent=u.t("ants.autoSacrificeOn"))}else if(t===1){let r=i("autoSacrificeAntMode");e.autoAntSacrificeMode===1||e.autoAntSacrificeMode===0?(e.autoAntSacrificeMode=2,r.textContent=u.t("ants.modeRealTime")):(e.autoAntSacrificeMode=1,r.textContent=u.t("ants.modeInGameTime"))}},jm=()=>{let t=i("toggleCubeBuy");e.cubeUpgradesBuyMaxToggle?(e.cubeUpgradesBuyMaxToggle=!1,t.textContent=u.t("toggles.upgradeOneLevelWow")):(e.cubeUpgradesBuyMaxToggle=!0,t.textContent=u.t("toggles.upgradeMaxIfPossible"))},tc=(t=!0)=>{t&&(e.autoCubeUpgradesToggle=!e.autoCubeUpgradesToggle);let r=i("toggleAutoCubeUpgrades");e.autoCubeUpgradesToggle?(r.textContent=u.t("toggles.autoUpgradeOn"),r.style.border="2px solid green"):(r.textContent=u.t("toggles.autoUpgradeOff"),r.style.border="2px solid red")},rc=(t=!0)=>{t&&(e.autoPlatonicUpgradesToggle=!e.autoPlatonicUpgradesToggle);let r=i("toggleAutoPlatonicUpgrades");e.autoPlatonicUpgradesToggle?(r.textContent=u.t("toggles.autoUpgradeOn"),r.style.border="2px solid green"):(r.textContent=u.t("toggles.autoUpgradeOff"),r.style.border="2px solid red")},Vm=t=>{let r=Number(t),n=Ym(7);for(let a=1;a<=n;a++){let s=i(`cubeTab${a}`);s.style.display==="flex"&&a!==r&&(s.style.display="none"),s.style.display==="none"&&a===r&&(s.style.display="flex",e.subtabNumber=a-1),i(`switchCubeSubTab${a}`).style.backgroundColor=r===a?"crimson":""}Zl()},ua=t=>{switch(t){case 1:{let r=Number.parseFloat(i("startAutoChallengeTimerInput").value)||0;e.autoChallengeTimer.start=Math.max(r,0),i("startTimerValue").innerHTML=u.t("challenges.timeStartSweep",{time:d(e.autoChallengeTimer.start,2,!0)});return}case 2:{let r=Number.parseFloat(i("exitAutoChallengeTimerInput").value)||0;e.autoChallengeTimer.exit=Math.max(r,0),i("exitTimerValue").innerHTML=u.t("challenges.timeExitChallenge",{time:d(e.autoChallengeTimer.exit,2,!0)});return}case 3:{let r=Number.parseFloat(i("enterAutoChallengeTimerInput").value)||0;e.autoChallengeTimer.enter=Math.max(r,0),i("enterTimerValue").innerHTML=u.t("challenges.timeEnterChallenge",{time:d(e.autoChallengeTimer.enter,2,!0)});return}}},Wm=t=>{if(t<=15){e.autoChallengeToggles[t]=!e.autoChallengeToggles[t];let r=i("toggleAutoChallengeIgnore");r.style.border=e.autoChallengeToggles[t]?"2px solid green":"2px solid red",t>=11&&t<=15?e.autoChallengeToggles[t]?r.textContent=u.t("challenges.autoAscRunChalOn",{x:t}):r.textContent=u.t("challenges.autoAscRunChalOff",{x:t}):e.autoChallengeToggles[t]?r.textContent=u.t("challenges.autoRunChalOn",{x:t}):r.textContent=u.t("challenges.autoRunChalOff",{x:t})}},ui=()=>{let t=i("toggleAutoChallengeStart");e.autoChallengeRunning?(t.style.border="2px solid red",t.textContent=u.t("challenges.autoChallengeSweepOff"),o.autoChallengeTimerIncrement=0,Or("OFF")):(t.style.border="2px solid gold",t.textContent=u.t("challenges.autoChallengeSweepOn"),Or("START"),o.autoChallengeTimerIncrement=0),e.autoChallengeRunning=!e.autoChallengeRunning},Or=t=>{let r=i("autoChallengeType");r.textContent=u.t(`challenges.mode${t[0]+t.slice(1).toLowerCase()}`)},Ys=(t=0)=>{if(t===0){let r=i("ascensionAutoEnable");e.autoAscend?(r.style.border="2px solid red",r.textContent=u.t("corruptions.autoAscend.off")):(r.style.border="2px solid green",r.textContent=u.t("corruptions.autoAscend.on")),e.autoAscend=!e.autoAscend}else if(t===1&&e.highestSingularityCount>=25){let r=i("ascensionAutoToggle");e.autoAscendMode==="c10Completions"?(e.autoAscendMode="realAscensionTime",r.textContent=u.t("corruptions.autoAscend.modeRealTime")):(e.autoAscendMode="c10Completions",r.textContent=u.t("corruptions.autoAscend.modeCompletions"))}},di=t=>{if(e.highestSingularityCount>=35){if(t===1){let r=i("openCubes"),n=i("cubeOpensInput");e.autoOpenCubes?(r.textContent=u.t("wowCubes.autoOff"),r.style.border="1px solid red",n.style.border="1px solid red"):(r.textContent=u.t("wowCubes.autoOn",{percent:d(e.openCubes,0)}),r.style.border="1px solid green",n.style.border="1px solid green"),e.autoOpenCubes=!e.autoOpenCubes}else if(t===2){let r=i("openTesseracts"),n=i("tesseractsOpensInput");e.autoOpenTesseracts?(r.textContent=u.t("wowCubes.autoOff"),r.style.border="1px solid red",n.style.border="1px solid red"):(r.textContent=u.t("wowCubes.autoOn",{percent:d(e.openTesseracts,0)}),r.style.border="1px solid green",n.style.border="1px solid green"),e.autoOpenTesseracts=!e.autoOpenTesseracts}else if(t===3){let r=i("openHypercubes"),n=i("hypercubesOpensInput");e.autoOpenHypercubes?(r.textContent=u.t("wowCubes.autoOff"),r.style.border="1px solid red",n.style.border="1px solid red"):(r.textContent=u.t("wowCubes.autoOn",{percent:d(e.openHypercubes,0)}),r.style.border="1px solid green",n.style.border="1px solid green"),e.autoOpenHypercubes=!e.autoOpenHypercubes}else if(t===4){let r=i("openPlatonicCube"),n=i("platonicCubeOpensInput");e.autoOpenPlatonicsCubes?(r.textContent=u.t("wowCubes.autoOff"),r.style.border="1px solid red",n.style.border="1px solid red"):(r.textContent=u.t("wowCubes.autoOn",{percent:d(e.openPlatonicsCubes,0)}),r.style.border="1px solid green",n.style.border="1px solid green"),e.autoOpenPlatonicsCubes=!e.autoOpenPlatonicsCubes}}},Js=t=>{switch(t){case 1:{let r=Math.floor(Number.parseFloat(i("buyRuneBlessingInput").value))||1;e.runeBlessingBuyAmount=Math.max(r,1),i("buyRuneBlessingToggle").innerHTML=u.t("runes.blessings.buyUpTo",{amount:d(e.runeBlessingBuyAmount)});return}case 2:{let r=Math.floor(Number.parseFloat(i("buyRuneSpiritInput").value))||1;e.runeSpiritBuyAmount=Math.max(r,1),i("buyRuneSpiritToggleValue").innerHTML=u.t("runes.spirits.buyUpTo",{amount:d(e.runeSpiritBuyAmount)});return}}},zm=t=>{let r=i(`tesseractAutoToggle${t}`);e.autoTesseracts[t]?(r.textContent=u.t("general.autoOffBracket"),r.style.border="2px solid red"):(r.textContent=u.t("general.autoOnBracket"),r.style.border="2px solid green"),e.autoTesseracts[t]=!e.autoTesseracts[t]},$n=(t,r)=>{let n=e.prototypeCorruptions[t],a=ls();if(r>0&&n0&&01&&is(s);is(o.corruptionTrigger),i("corruptionCleanseConfirm").style.visibility="hidden",e.currentChallenge.ascension===15&&Qe("ascensionChallenge",!1,!0)}is(t),cs()},Km=t=>{let r=t==="true";e.corruptionShowStats=r,nc()},yn=t=>{let r=i(`unit${t}`);if(r===null){console.log(t,"platonic needs to fix");return}r.textContent=e.ascStatToggles[t]?"/s":"",t===6&&(r.textContent=""),e.ascStatToggles[t]=!e.ascStatToggles[t]},Xm=async()=>{let t=await je(u.t("wowCubes.hepteractForge.autoCraftPercentagePrompt"));if(t===null)return e.toggles[35]?B(u.t("toggles.percentKeptAt",{x:e.hepteractAutoCraftPercentage})):void 0;let r=t.endsWith("%"),n=Number(r?t.slice(0,-1):t);if(Number.isNaN(n)||!Number.isFinite(n)||!Number.isInteger(n))return B(u.t("general.validation.finiteInt"));if(n<0||n>100)return B(u.t("toggles.percentBetweenInclusive",{x:0,y:100}));if(n===e.hepteractAutoCraftPercentage&&e.toggles[35])return B(u.t("toggles.percentKeptAt",{x:e.hepteractAutoCraftPercentage}));if(e.hepteractAutoCraftPercentage=n,i("autoHepteractPercentage").textContent=u.t("wowCubes.hepteractForge.autoSetting",{x:`${e.hepteractAutoCraftPercentage}`}),e.toggles[35])return B(u.t("toggles.onAscensionHepteractsCraft",{x:e.hepteractAutoCraftPercentage}))},Zm=()=>{e.blueberryLoadoutMode==="saveTree"?(e.blueberryLoadoutMode="loadTree",i("blueberryToggleMode").innerHTML=u.t("ambrosia.loadouts.load")):(e.blueberryLoadoutMode="saveTree",i("blueberryToggleMode").innerHTML=u.t("ambrosia.loadouts.save"))},bd=(t=!0)=>{i("alertWrapper").style.display==="block"&&i("ok_alert").click(),(i("confirmWrapper").style.display==="block"||i("promptWrapper").style.display==="block")&&(t?i("ok_confirm").click():i("cancel_confirm").click())};var Jm,kt=t=>{ss(Jm),Jm=rr(()=>tC(t),50)},tC=t=>{i("resetofferings1").style.display="block";let r=e.currentChallenge.transcension,n=e.currentChallenge.reincarnation,a=un(t),s=Ln("resetofferings1"),l=i("resetofferings2"),c=Ln("resetcurrency1"),p=i("resetobtainium"),f=i("resetobtainium2"),g=i("resetinfo"),h=i("resetcurrency2");switch(t==="reincarnation"?(p.style.display="block",f.textContent=d(Math.floor(o.obtainiumGain))):(p.style.display="none",f.textContent=""),t==="ascensionChallenge"||t==="ascension"||t==="singularity"?s.style.display=l.style.display="none":s.style.display=l.style.display="block",t){case"prestige":c.src.endsWith(`Pictures/${ze[e.iconSet][0]}/Diamond.png`)||(c.src=`Pictures/${ze[e.iconSet][0]}/Diamond.png`),c.style.display="block",h.textContent=`+${d(o.prestigePointGain)}`,g.textContent=u.t("reset.details.prestige",{amount:d(e.coinsThisPrestige),timeSpent:d(e.prestigecounter)}),g.style.color="turquoise";break;case"transcension":c.src.endsWith(`Pictures/${ze[e.iconSet][0]}/Mythos.png`)||(c.src=`Pictures/${ze[e.iconSet][0]}/Mythos.png`),c.style.display="block",h.textContent=`+${d(o.transcendPointGain)}`,g.textContent=u.t("reset.details.transcension",{amount:d(e.coinsThisTranscension),timeSpent:d(e.transcendcounter)}),g.style.color="var(--orchid-text-color)";break;case"reincarnation":c.src.endsWith(`Pictures/${ze[e.iconSet][0]}/Particle.png`)||(c.src=`Pictures/${ze[e.iconSet][0]}/Particle.png`),c.style.display="block",h.textContent=`+${d(o.reincarnationPointGain)}`,g.textContent=u.t("reset.details.reincarnation",{amount:d(e.transcendShards),timeSpent:d(e.reincarnationcounter)}),g.style.color="limegreen";break;case"acceleratorBoost":c.src.endsWith(`Pictures/${ze[e.iconSet][0]}/Diamond.png`)||(c.src=`Pictures/${ze[e.iconSet][0]}/Diamond.png`),c.style.display="block",h.textContent=`-${d(e.acceleratorBoostCost)}`,g.textContent=u.t("reset.details.acceleratorBoost",{amount:d(e.prestigePoints),required:d(e.acceleratorBoostCost)}),g.style.color="cyan";break;case"transcensionChallenge":c.style.display="none",h.textContent="",r!==0?(g.style.color="aquamarine",g.textContent=u.t("reset.details.transcensionChallenge.in",{n:r,amount:d(e.coinsThisTranscension),required:d(Kt(r,e.challengecompletions[r])),timeSpent:d(e.transcendcounter)})):(g.style.color="var(--crimson-text-color)",g.textContent=u.t("reset.details.transcensionChallenge.out"));break;case"reincarnationChallenge":if(c.style.display="none",h.textContent="",n!==0){let b=n>=9?"coins":"transcendShards";g.style.color="silver",g.textContent=u.t(`reset.details.reincarnationChallenge.in.${b}`,{n,amount:d(e[b]),required:d(Kt(n,e.challengecompletions[n],n)),timeSpent:d(e.reincarnationcounter)})}else g.style.color="var(--crimson-text-color)",g.textContent=u.t("reset.details.reincarnationChallenge.out");break;case"ascensionChallenge":c.style.display="none",h.textContent="",g.textContent=u.t("reset.details.ascensionChallenge"),g.style.color="gold";break;case"ascension":c.style.display="none",h.textContent="",g.textContent=u.t("reset.details.ascension",{cubeAmount:d(bn()[4],0,!0),timeSpent:d(e.ascensionCounter,0,!1),realTimeSpent:d(e.ascensionCounterRealReal,0,!1)}),g.style.color="gold";break;case"singularity":c.style.display="none",h.textContent="",g.textContent=u.t("reset.details.singularity",{gqAmount:d(pr(),2,!0),timeSpent:d(e.singularityCounter,0,!1)}),g.style.color="lightgoldenrodyellow"}i("resetofferings2").textContent=`+${d(a)}`},Br=t=>{let r=null;t===1?(r=Number.parseFloat(i("prestigeamount").value)||0,e.prestigeamount=Math.max(r,0)):t===2?(r=Number.parseFloat(i("transcendamount").value)||0,e.transcendamount=Math.max(r,0)):t===3?(r=Number.parseFloat(i("reincarnationamount").value)||0,e.reincarnationamount=Math.max(r,0)):t===4?(r=Math.floor(Number.parseFloat(i("ascensionAmount").value))||1,e.autoAscendThreshold=Math.max(r,1)):t===5&&(r=Number.parseFloat(i("autoAntSacrificeAmount").value)||0,e.autoAntSacTimer=Math.max(r,0))},oc=()=>{let t=Math.floor(Number.parseFloat(i("tesseractAmount").value))||0;e.tesseractAutoBuyerAmount=Math.max(t,0)},vn=t=>{let r=null;t===1?(r=Number(i("cubeOpensInput").value)||0,e.openCubes=Math.max(Math.min(r,100),0)):t===2?(r=Number(i("tesseractsOpensInput").value)||0,e.openTesseracts=Math.max(Math.min(r,100),0)):t===3?(r=Number(i("hypercubesOpensInput").value)||0,e.openHypercubes=Math.max(Math.min(r,100),0)):t===4&&(r=Number(i("platonicCubeOpensInput").value)||0,e.openPlatonicsCubes=Math.max(Math.min(r,100),0))},rC=(t,r="unknown")=>{let n=un(t),a=["enterChallenge","leaveChallenge"].includes(r);if(t==="prestige"){let s={seconds:e.prestigecounter,date:Date.now(),offerings:n,kind:"prestige",diamonds:o.prestigePointGain.toString()};Ht.emit("historyAdd","reset",s)}else if(t==="transcension"||t==="transcensionChallenge"){let s={seconds:e.transcendcounter,date:Date.now(),offerings:n,kind:"transcend",mythos:o.transcendPointGain.toString()};Ht.emit("historyAdd","reset",s)}else if(t==="reincarnation"||t==="reincarnationChallenge"){if(!a||o.reincarnationPointGain.gte(e.reincarnationPoints.div(10))){let s={seconds:e.reincarnationcounter,date:Date.now(),offerings:n,kind:"reincarnate",particles:o.reincarnationPointGain.toString(),obtainium:o.obtainiumGain};Ht.emit("historyAdd","reset",s)}}else if((t==="ascension"||t==="ascensionChallenge")&&e.challengecompletions[10]>0){let s=bn(),l={seconds:e.ascensionCounter,date:Date.now(),c10Completions:e.challengecompletions[10],usedCorruptions:e.usedCorruptions.slice(0),corruptionScore:s[3],wowCubes:s[4],wowTesseracts:s[5],wowHypercubes:s[6],wowPlatonicCubes:s[7],wowHepteracts:s[8],kind:"ascend"};r!=="enterChallenge"&&e.currentChallenge.ascension!==0&&(l.currentChallenge=e.currentChallenge.ascension),Ht.emit("historyAdd","ascend",l)}},Fe=(t,r=!1,n="unknown")=>{if(rC(t,n),Pg(t),sc(1),e.coins=new m("102"),e.coinsThisPrestige=new m("100"),e.firstOwnedCoin=0,e.firstGeneratedCoin=new m("0"),e.firstCostCoin=new m("100"),e.secondOwnedCoin=0,e.secondGeneratedCoin=new m("0"),e.secondCostCoin=new m("1e3"),e.thirdOwnedCoin=0,e.thirdGeneratedCoin=new m("0"),e.thirdCostCoin=new m("2e4"),e.fourthOwnedCoin=0,e.fourthGeneratedCoin=new m("0"),e.fourthCostCoin=new m("4e5"),e.fifthOwnedCoin=0,e.fifthGeneratedCoin=new m("0"),e.fifthCostCoin=new m("8e6"),e.firstGeneratedDiamonds=new m("0"),e.secondGeneratedDiamonds=new m("0"),e.thirdGeneratedDiamonds=new m("0"),e.fourthGeneratedDiamonds=new m("0"),e.fifthGeneratedDiamonds=new m("0"),e.multiplierCost=new m("1e4"),e.multiplierBought=0,e.acceleratorCost=new m("500"),e.acceleratorBought=0,e.prestigeCount+=1,e.prestigePoints=e.prestigePoints.add(o.prestigePointGain),e.prestigeShards=new m("0"),e.prestigenoaccelerator=!0,e.prestigenomultiplier=!0,e.prestigenocoinupgrades=!0,e.highestSingularityCount===0&&(t==="prestige"&&!e.unlocks.prestige&&(i("prestigebtn").style.boxShadow=""),t==="transcension"&&!e.unlocks.transcend&&(i("transcendbtn").style.boxShadow=""),t==="reincarnation"&&!e.unlocks.reincarnate&&(i("reincarnatebtn").style.boxShadow=""),t==="ascension"&&e.ascensionCount===0&&(i("ascendbtn").style.boxShadow="")),e.unlocks.prestige=!0,e.prestigecounter.5&&(e.firstOwnedDiamonds+=1),e.achievements[85]>.5&&(e.secondOwnedDiamonds+=1),e.achievements[92]>.5&&(e.thirdOwnedDiamonds+=1),e.achievements[99]>.5&&(e.fourthOwnedDiamonds+=1),e.achievements[106]>.5&&(e.fifthOwnedDiamonds+=1),e.achievements[4]>.5&&(e.upgrades[81]=1),e.achievements[11]>.5&&(e.upgrades[82]=1),e.achievements[18]>.5&&(e.upgrades[83]=1),e.achievements[25]>.5&&(e.upgrades[84]=1),e.achievements[32]>.5&&(e.upgrades[85]=1),e.achievements[80]>.5&&(e.upgrades[87]=1),e.transcendcounter10&&e.platonicUpgrades[11]>0&&(e.prestigePoints=e.prestigePoints.add(o.reincarnationPointGain)),t==="reincarnation"||t==="reincarnationChallenge"||t==="ascension"||t==="ascensionChallenge"||t==="singularity"){e.ascensionCount>0&&e.achievements[183]<1&&eo(1),e.researchPoints=Math.min(1e300,e.researchPoints+Math.floor(o.obtainiumGain));let s=o.obtainiumGain/(1+e.reincarnationcounter);if(s>e.obtainiumpersecond&&(e.obtainiumpersecond=s),e.currentChallenge.transcension=0,sc(3),e.coinsThisReincarnation=new m("100"),e.firstOwnedMythos=0,e.firstCostMythos=new m("1"),e.secondOwnedMythos=0,e.secondCostMythos=new m("1e2"),e.thirdOwnedMythos=0,e.thirdCostMythos=new m("1e4"),e.fourthOwnedMythos=0,e.fourthCostMythos=new m("1e8"),e.fifthOwnedMythos=0,e.fifthCostMythos=new m("1e16"),e.firstGeneratedParticles=new m("0"),e.secondGeneratedParticles=new m("0"),e.thirdGeneratedParticles=new m("0"),e.fourthGeneratedParticles=new m("0"),e.fifthGeneratedParticles=new m("0"),e.reincarnationCount+=1,e.transcendPoints=new m("0"),e.reincarnationPoints=e.reincarnationPoints.add(o.reincarnationPointGain),e.reincarnationShards=new m("0"),e.challengecompletions[1]=0,e.challengecompletions[2]=0,e.challengecompletions[3]=0,e.challengecompletions[4]=0,e.challengecompletions[5]=0,o.reincarnationPointGain=new m("0"),e.shopUpgrades.instantChallenge>0&&e.currentChallenge.reincarnation===0&&(e.challengecompletions[1]=e.highestchallengecompletions[1],e.challengecompletions[2]=e.highestchallengecompletions[2],e.challengecompletions[3]=e.highestchallengecompletions[3],e.challengecompletions[4]=e.highestchallengecompletions[4],e.challengecompletions[5]=e.highestchallengecompletions[5]),e.reincarnatenocoinupgrades=!0,e.reincarnatenocoinorprestigeupgrades=!0,e.reincarnatenocoinprestigeortranscendupgrades=!0,e.reincarnatenocoinprestigetranscendorgeneratorupgrades=!0,e.reincarnatenoaccelerator=!0,e.reincarnatenomultiplier=!0,e.reincarnationcounter.5){let l=e.autoResearch===200?.01:0;cn(e.autoResearch,!0,l)}nt(),er()}if(t==="ascension"||t==="ascensionChallenge"||t==="singularity"){let s=bn();e.challengecompletions[10]>0&&eo(3,s[3]),e.currentChallenge.transcension=0,e.currentChallenge.reincarnation=0,t==="ascensionChallenge"&&e.currentChallenge.ascension>10&&e.highestSingularityCount>=2&&e.autoChallengeToggles[10]?e.autoChallengeIndex=10:e.autoChallengeIndex=1,Or("START"),o.autoChallengeTimerIncrement=0,nC(),vd(),aC(),e.reincarnationPoints=new m("0"),e.reincarnationShards=new m("0"),e.obtainiumpersecond=0,e.maxobtainiumpersecond=0,e.offeringpersecond=0,e.antSacrificePoints=0,e.antSacrificeTimer=0,e.antSacrificeTimerReal=0,e.antUpgrades[12-1]=0;for(let c=61;c<=80;c++)e.upgrades[c]=0;for(let c=94;c<=100;c++)e.upgrades[c]=0;e.firstOwnedParticles=0,e.secondOwnedParticles=0,e.thirdOwnedParticles=0,e.fourthOwnedParticles=0,e.fifthOwnedParticles=0,e.firstCostParticles=new m("1"),e.secondCostParticles=new m("100"),e.thirdCostParticles=new m("1e4"),e.fourthCostParticles=new m("1e8"),e.fifthCostParticles=new m("1e16"),e.runeexp=[0,0,0,0,0,e.runeexp[5],e.runeexp[6]],e.runelevels=[0,0,0,0,0,e.runelevels[5],e.runelevels[6]],e.runeshards=0,e.crystalUpgrades=[0,0,0,0,0,0,0,0],e.runelevels[0]=3*e.cubeUpgrades[26],e.runelevels[1]=3*e.cubeUpgrades[26],e.runelevels[2]=3*e.cubeUpgrades[26],e.runelevels[3]=3*e.cubeUpgrades[26],e.runelevels[4]=3*e.cubeUpgrades[26],e.cubeUpgrades[27]===1&&(e.firstOwnedParticles=1,e.secondOwnedParticles=1,e.thirdOwnedParticles=1,e.fourthOwnedParticles=1,e.fifthOwnedParticles=1),e.challengecompletions[10]>0&&e.ascensionCounter>0&&(e.ascensionCount+=si(),isFinite(s[4])&&isFinite(s[5])&&isFinite(s[6])&&isFinite(s[7])&&isFinite(s[8])&&(e.wowCubes.add(s[4]),e.wowTesseracts.add(s[5]),e.wowHypercubes.add(s[6]),e.wowPlatonicCubes.add(s[7]),e.wowAbyssals=Math.min(1e300,e.wowAbyssals+s[8])));for(let c=1;c<=10;c++)e.challengecompletions[c]=0,e.highestchallengecompletions[c]=0;e.challengecompletions[6]=e.highestchallengecompletions[6]=e.cubeUpgrades[49],e.challengecompletions[7]=e.highestchallengecompletions[7]=e.cubeUpgrades[49],e.challengecompletions[8]=e.highestchallengecompletions[8]=e.cubeUpgrades[49],i(`res${e.autoResearch||1}`).classList.remove("researchRoomba"),e.roombaResearchIndex=0,e.autoResearch=1;for(let c=1;c<=200;c++){let p=`res${c}`;e.researches[c]>.5&&e.researches[c].5&&e.researches[c]>=o.researchMaxLevels[c]?Vt(p,["researchMaxed"],["researchAvailable","researchPurchased","researchPurchasedAvailable","researchUnpurchased"]):Vt(p,["researchUnpurchased"],["researchAvailable","researchPurchased","researchPurchasedAvailable","researchMaxed"])}er(),nt(),da(),Cd(),Zr(),eo(1),e.ascensionCounter=0,e.ascensionCounterReal=0,e.ascensionCounterRealReal=0,fr(),Ut(0),Ut(1),Ut(2),Ut(3),Ut(4),Ut(5),Ut(6),sr(),La(),ka(),e.cubeUpgrades[4]===1&&(e.upgrades[94]=1,e.upgrades[95]=1,e.upgrades[96]=1,e.upgrades[97]=1,e.upgrades[98]=1),e.cubeUpgrades[5]===1&&(e.upgrades[99]=1),e.cubeUpgrades[6]===1&&(e.upgrades[100]=1);for(let c=61;c<=80;c++)i(`upg${c}`).style.backgroundColor="";for(let c=94;c<=100;c++)e.upgrades[c]===0&&(i(`upg${c}`).style.backgroundColor="");let l=ls();if(e.usedCorruptions=e.prototypeCorruptions.map((c,p)=>p>=2&&p<=9?Math.min(l*(e.challengecompletions[lc(p)]>0||e.singularityUpgrades.platonicTau.getEffect().bonus?1:0),c):c),e.usedCorruptions[1]=0,e.prototypeCorruptions[1]=0,e.currentChallenge.ascension===15&&(t==="ascension"||t==="ascensionChallenge")){e.usedCorruptions[0]=0,e.prototypeCorruptions[0]=0;for(let c=2;c<=9;c++)e.usedCorruptions[c]=11}to(),th(!1)}if(t==="ascension"||t==="ascensionChallenge"){let s=vg(),l=s.length+(e.overfluxOrbsAutoBuy?1:0);if(e.highestSingularityCount>=1&&l>0){let c=Math.floor(e.wowAbyssals/l*(e.hepteractAutoCraftPercentage/100));for(let p of s)p.autoCraft(c);if(e.overfluxOrbsAutoBuy){let p=Math.floor(c/25e4);e.wowAbyssals-25e4*p>=0&&(e.overfluxOrbs+=p,e.overfluxPowder+=e.shopUpgrades.powderAuto*Kr().mult*p/100,e.wowAbyssals-=25e4*p),e.wowAbyssals<0&&(e.wowAbyssals=0)}}if(e.researches[190]>0&&e.tesseractAutoBuyerToggle===1&&e.resettoggle4===2){let c=[null,null,null,null,null];for(let h=1;h<=5;h++)e.autoTesseracts[h]&&(c[h-1]=e[`ascendBuilding${h}`].owned);let p=100-Math.min(100,e.tesseractAutoBuyerAmount),f=Number(e.wowTesseracts)*p/100,g=ic(c,f);for(let h=5;h>=1;h--){let b=c[h-1],y=g[h-1];b!==null&&y!==null&&y!==b&&us(h,y-b)}}Ag(),fg(),e.highestSingularityCount>=35&&(e.autoOpenCubes&&e.openCubes!==0&&e.cubeUpgrades[51]>0&&e.wowCubes.open(Math.floor(Number(e.wowCubes)*e.openCubes/100),!1),e.autoOpenTesseracts&&e.openTesseracts!==0&&e.challengecompletions[11]>0&&(e.tesseractAutoBuyerToggle!==1||e.resettoggle4===2)&&e.wowTesseracts.open(Math.floor(Number(e.wowTesseracts)*e.openTesseracts/100),!1),e.autoOpenHypercubes&&e.openHypercubes!==0&&e.challengecompletions[13]>0&&e.wowHypercubes.open(Math.floor(Number(e.wowHypercubes)*e.openHypercubes/100),!1),e.autoOpenPlatonicsCubes&&e.openPlatonicsCubes!==0&&e.challengecompletions[14]>0&&e.wowPlatonicCubes.open(Math.floor(Number(e.wowPlatonicCubes)*e.openPlatonicsCubes/100),!1))}if(e.unlocks.prestige=!0,(t==="transcension"||t==="transcensionChallenge")&&(e.unlocks.transcend=!0),(t==="reincarnation"||t==="reincarnationChallenge")&&(e.unlocks.reincarnate=!0),t==="singularity"){e.unlocks.coinone=!1,e.unlocks.cointwo=!1,e.unlocks.cointhree=!1,e.unlocks.coinfour=!1,e.unlocks.generation=!1,e.unlocks.prestige=!1,e.unlocks.transcend=!1,e.unlocks.reincarnate=!1,e.unlocks.rrow1=!1,e.unlocks.rrow2=!1,e.unlocks.rrow3=!1,e.unlocks.rrow4=!1,e.ascendBuilding1.owned=0,e.ascendBuilding1.generated=new m("0"),e.ascendBuilding2.owned=0,e.ascendBuilding2.generated=new m("0"),e.ascendBuilding3.owned=0,e.ascendBuilding3.generated=new m("0"),e.ascendBuilding4.owned=0,e.ascendBuilding4.generated=new m("0"),e.ascendBuilding5.owned=0,e.ascendBuilding5.generated=new m("0"),e.constantUpgrades=[null,0,0,0,0,0,0,0,0,0,0],e.wowCubes=new Cr(0),e.wowTesseracts=new Cr(0),e.wowHypercubes=new Cr(0),e.wowTesseracts=new Cr(0),e.wowAbyssals=0;for(let s=1;s<=50;s++)e.cubeUpgrades[s]=0}r||Ve(),(t==="transcensionChallenge"||t==="reincarnationChallenge"||t==="ascensionChallenge")&&Wr(),pi()},eh=()=>{e.highestSingularityCount>=1&&Q(274),e.highestSingularityCount>=2&&Q(275),e.highestSingularityCount>=3&&Q(276),e.highestSingularityCount>=4&&Q(277),e.highestSingularityCount>=5&&Q(278),e.highestSingularityCount>=7&&Q(279),e.highestSingularityCount>=10&&Q(280)},th=(t=!0)=>{if(e.achievements[275]>0){t&&(e.prestigeCount=1,e.transcendCount=1),e.transcendPoints=new m("1001"),e.unlocks.coinone=!0,e.unlocks.cointwo=!0,e.unlocks.cointhree=!0,e.unlocks.coinfour=!0,e.unlocks.prestige=!0,e.unlocks.generation=!0,e.unlocks.transcend=!0;for(let s=0;s<5;s++)Q(4+7*s);Q(36),Q(43)}if(e.achievements[276]>0){e.currentChallenge.ascension!==12&&(t&&(e.reincarnationCount=1),e.reincarnationPoints=new m("10")),e.unlocks.reincarnate=!0,e.unlocks.rrow1=!0,e.researches[47]=1;for(let s=0;s<2;s++)for(let l=0;l<5;l++)Q(78+s+7*l);for(let s=0;s<7;s++)Q(57+s),Q(64+s),Q(71+s);Q(37),Q(38),Q(44),Q(50),Q(80),Q(87)}e.achievements[277]>0&&(e.currentChallenge.ascension!==14&&(e.researchPoints=Math.floor(500*He("Offering")*He("Researches"))),e.currentChallenge.ascension!==12&&(e.reincarnationPoints=new m("1e16")),e.challengecompletions[6]=1,e.highestchallengecompletions[6]=1,Q(113));let r=["offeringAuto","offeringEX","obtainiumAuto","obtainiumEX","antSpeed","cashGrab"];if(e.achievements[278]>0&&t){for(let s of r)e.shopUpgrades[s]=10;e.cubeUpgrades[7]=1}if(e.achievements[279]>0&&(e.challengecompletions[7]=1,e.highestchallengecompletions[7]=1,Q(120),e.currentChallenge.ascension!==12&&(e.reincarnationPoints=new m("1e100"))),e.achievements[280]>0){Q(124),Q(127),e.challengecompletions[8]=1,e.highestchallengecompletions[8]=1,e.cubeUpgrades[8]=1,e.cubeUpgrades[4]=1,e.cubeUpgrades[5]=1,e.cubeUpgrades[6]=1,e.firstOwnedAnts=1;for(let s=0;s<7;s++)Q(176+s)}if(e.highestSingularityCount>10&&(e.cubeUpgrades[9]=1),e.highestSingularityCount>=15&&(e.challengecompletions[8]=5,e.highestchallengecompletions[8]=5,e.currentChallenge.ascension!==12&&(e.reincarnationPoints=new m("2.22e2222")),e.fifthOwnedAnts=1,e.cubeUpgrades[20]=1),e.highestSingularityCount>=20){let s=["offeringAuto","offeringEX","obtainiumAuto","obtainiumEX","antSpeed","cashGrab"];e.challengecompletions[9]=1,e.highestchallengecompletions[9]=1,Q(134),e.antPoints=new m("1e100"),e.antUpgrades[11]=1;for(let l of s)e.shopUpgrades[l]=Te[l].maxLevel}if(e.highestSingularityCount>=25&&(e.eighthOwnedAnts=1),e.highestSingularityCount>=30&&(e.researches[130]=1,e.researches[135]=1,e.researches[145]=1),e.highestSingularityCount>=100&&t&&(e.cubeUpgrades[51]=1,Nu()),e.singularityUpgrades.platonicAlpha.getEffect().bonus&&e.platonicUpgrades[5]===0&&(e.platonicUpgrades[5]=1,Go(5)),t)for(let s=1;s<=15;s++)Rr(s);if(sc(3),t)for(let s=1;s0&&Rs(s);yd(),Ve()},yd=()=>{let t=e.achievements[278]>0,r=["offeringAuto","offeringEX","obtainiumAuto","obtainiumEX","antSpeed","cashGrab"];for(let c of r)Te[c].refundMinimumLevel=t?10:c.endsWith("Auto")?1:0;let n=e.highestSingularityCount>=20,a=["offeringAuto","offeringEX","obtainiumAuto","obtainiumEX","antSpeed","cashGrab"];for(let c of a)Te[c].refundable=!n;let s=e.highestSingularityCount>=51,l=["seasonPass","seasonPass2","seasonPass3","seasonPassY","chronometer","chronometer2"];for(let c of l)Te[c].refundable=!s},js=async(t=-1)=>{var h,b,y,C,M,D,$,k,E;if(e.runelevels[6]===0&&t===-1)return B("You nearly triggered a double singularity bug! Oh no! Luckily, our staff prevented this from happening.");if(t===-1){let H=Object.values(e.cubeBlessings),I=Object.values(e.tesseractBlessings),_=Object.values(e.hypercubeBlessings),L=Object.values(e.platonicBlessings),P={seconds:e.singularityCounter,date:Date.now(),singularityCount:e.singularityCount,quarks:e.quarksThisSingularity,c15Score:e.challenge15Exponent,goldenQuarks:pr(),wowTribs:xe(H),tessTribs:xe(I),hyperTribs:xe(_),platTribs:xe(L),octeracts:e.totalWowOcteracts,quarkHept:e.hepteractCrafts.quark.BAL,kind:"singularity"};Ht.emit("historyAdd","singularity",P)}if(e.runelevels[6]=0,e.goldenQuarks+=pr(),t===-1){let H=1+Ia();e.singularityCount+=H,e.singularityCount>=e.highestSingularityCount&&(e.highestSingularityCount=e.singularityCount,e.highestSingularityCount===5&&(e.singularityUpgrades.goldenQuarks3.freeLevels+=1),e.highestSingularityCount===10&&(e.singularityUpgrades.goldenQuarks3.freeLevels+=2))}else e.singularityCount=t;e.totalQuarksEver+=e.quarksThisSingularity,await Pl(!0);let{data:r,success:n}=Vs.safeParse(T);Us(n),Cn(0),Be(0,{page:0}),Be(3,{page:0}),Be(4,{page:0}),Be(7,{page:0}),Be(8,{page:0}),Be(9,{page:0}),Be(10,{page:0}),r.history.singularity=e.history.singularity,r.totalQuarksEver=e.totalQuarksEver,r.singularityCount=e.singularityCount,r.highestSingularityCount=e.highestSingularityCount,r.goldenQuarks=e.goldenQuarks,r.shopUpgrades=e.shopUpgrades,e.singularityChallenges.limitedTime.rewards.preserveQuarks?r.worlds=Number(e.worlds)*.9:(e.worlds.reset(),r.worlds=Number(r.worlds)),r.singularityUpgrades=Object.fromEntries(Object.entries(e.singularityUpgrades).map(([H,I])=>[H,{level:I.level,goldenQuarksInvested:I.goldenQuarksInvested,toggleBuy:I.toggleBuy,freeLevels:I.freeLevels}])),r.octeractUpgrades=Object.fromEntries(Object.entries(e.octeractUpgrades).map(([H,I])=>[H,{level:I.level,octeractsInvested:I.octeractsInvested,toggleBuy:I.toggleBuy,freeLevels:I.freeLevels}])),r.blueberryUpgrades=Object.fromEntries(Object.entries(e.blueberryUpgrades).map(([H,I])=>[H,{level:I.level,ambrosiaInvested:I.ambrosiaInvested,blueberriesInvested:I.blueberriesInvested,toggleBuy:I.toggleBuy,freeLevels:I.freeLevels}])),r.spentBlueberries=e.spentBlueberries,r.autoChallengeToggles=e.autoChallengeToggles,r.autoChallengeTimer=e.autoChallengeTimer,r.saveString=e.saveString,r.corruptionLoadouts=e.corruptionLoadouts,r.corruptionLoadoutNames=e.corruptionLoadoutNames,r.corruptionShowStats=e.corruptionShowStats,r.toggles=e.toggles,r.retrychallenges=e.retrychallenges,r.resettoggle1=e.resettoggle1,r.resettoggle2=e.resettoggle2,r.resettoggle3=e.resettoggle3,r.resettoggle4=e.resettoggle4,r.coinbuyamount=e.coinbuyamount,r.crystalbuyamount=e.crystalbuyamount,r.mythosbuyamount=e.mythosbuyamount,r.particlebuyamount=e.particlebuyamount,r.offeringbuyamount=e.offeringbuyamount,r.tesseractbuyamount=e.tesseractbuyamount,r.shoptoggles=e.shoptoggles,r.autoSacrificeToggle=e.autoSacrificeToggle,r.autoBuyFragment=e.autoBuyFragment,r.autoFortifyToggle=e.autoFortifyToggle,r.autoEnhanceToggle=e.autoEnhanceToggle,r.autoResearchToggle=e.autoResearchToggle,r.autoResearchMode=e.autoResearchMode,r.dailyCodeUsed=e.dailyCodeUsed,r.runeBlessingBuyAmount=e.runeBlessingBuyAmount,r.runeSpiritBuyAmount=e.runeSpiritBuyAmount,r.prestigeamount=e.prestigeamount,r.transcendamount=e.transcendamount,r.reincarnationamount=e.reincarnationamount,r.talismanOne=e.talismanOne,r.talismanTwo=e.talismanTwo,r.talismanThree=e.talismanThree,r.talismanFour=e.talismanFour,r.talismanFive=e.talismanFive,r.talismanSix=e.talismanSix,r.talismanSeven=e.talismanSeven,r.buyTalismanShardPercent=e.buyTalismanShardPercent,r.antMax=e.antMax,r.autoAntSacrifice=e.autoAntSacrifice,r.autoAntSacrificeMode=e.autoAntSacrificeMode,r.autoAntSacTimer=e.autoAntSacTimer,r.autoAscend=e.autoAscend,r.autoAscendMode=e.autoAscendMode,r.autoAscendThreshold=e.autoAscendThreshold,r.autoResearch=0,r.autoTesseracts=e.autoTesseracts,r.tesseractAutoBuyerToggle=e.tesseractAutoBuyerToggle,r.tesseractAutoBuyerAmount=e.tesseractAutoBuyerAmount,r.autoOpenCubes=e.autoOpenCubes,r.openCubes=e.openCubes,r.autoOpenTesseracts=e.autoOpenTesseracts,r.openTesseracts=e.openTesseracts,r.autoOpenHypercubes=e.autoOpenHypercubes,r.openHypercubes=e.openHypercubes,r.autoOpenPlatonicsCubes=e.autoOpenPlatonicsCubes,r.openPlatonicsCubes=e.openPlatonicsCubes,r.historyShowPerSecond=e.historyShowPerSecond,r.exporttest=typeof e.exporttest=="boolean"?e.exporttest:e.exporttest==="YES!",r.dayTimer=e.dayTimer,r.dayCheck=(b=(h=e.dayCheck)==null?void 0:h.toISOString())!=null?b:null,r.ascStatToggles=e.ascStatToggles,r.hepteractAutoCraftPercentage=e.hepteractAutoCraftPercentage,r.autoWarpCheck=e.autoWarpCheck,r.shopBuyMaxToggle=e.shopBuyMaxToggle,r.shopHideToggle=e.shopHideToggle,r.shopConfirmationToggle=e.shopConfirmationToggle,r.researchBuyMaxToggle=e.researchBuyMaxToggle,r.cubeUpgradesBuyMaxToggle=e.cubeUpgradesBuyMaxToggle,r.wowOcteracts=e.wowOcteracts,r.totalWowOcteracts=e.totalWowOcteracts,r.overfluxOrbsAutoBuy=e.overfluxOrbsAutoBuy,r.hotkeys=e.hotkeys,r.theme=e.theme,r.notation=e.notation,r.firstPlayed=e.firstPlayed,r.autoCubeUpgradesToggle=e.autoCubeUpgradesToggle,r.autoPlatonicUpgradesToggle=e.autoPlatonicUpgradesToggle,r.insideSingularityChallenge=e.insideSingularityChallenge,r.ultimatePixels=e.ultimatePixels,r.ultimateProgress=e.ultimateProgress,r.singularityChallenges=Object.fromEntries(Object.entries(e.singularityChallenges).map(([H,I])=>[H,{completions:I.completions,highestSingularityCompleted:I.highestSingularityCompleted,enabled:I.enabled}])),r.iconSet=e.iconSet,r.hepteractCrafts.quark=e.hepteractCrafts.quark;for(let H of Object.keys(e.hepteractCrafts))if(H!=="quark"){let I=H;r.hepteractCrafts[I].AUTO=e.hepteractCrafts[I].AUTO}r.ambrosia=e.ambrosia,r.lifetimeAmbrosia=e.lifetimeAmbrosia,r.visitedAmbrosiaSubtab=e.visitedAmbrosiaSubtab,r.blueberryTime=e.blueberryTime,r.blueberryLoadouts=e.blueberryLoadouts,r.blueberryLoadoutMode=e.blueberryLoadoutMode,r.wowCubes=Number(e.wowCubes),r.wowTesseracts=Number(e.wowTesseracts),r.wowHypercubes=Number(e.wowHypercubes),r.wowPlatonicCubes=Number(e.wowPlatonicCubes);let a=(y=e.codes.get(42))!=null?y:!1,s=(C=e.codes.get(43))!=null?C:!1,l=(M=e.codes.get(44))!=null?M:!1,c=(D=e.codes.get(45))!=null?D:!1,p=($=e.codes.get(46))!=null?$:!1,f=(k=e.codes.get(47))!=null?k:!1,g=(E=e.codes.get(48))!=null?E:!1;await ds(btoa(JSON.stringify(r)),!0),e.codes.set(39,!0),e.codes.set(40,!0),e.codes.set(41,!0),e.codes.set(42,a),e.codes.set(43,s),e.codes.set(44,l),e.codes.set(45,c),e.codes.set(46,p),e.codes.set(47,f),e.codes.set(48,g),th(),e.rngCode=Date.now(),e.promoCodeTiming.time=Date.now(),Ir()},sc=t=>{if(t>2.5){for(let r=41;r<61;r++)r!==46&&(e.upgrades[r]=0);e.researches[41]===0&&(e.upgrades[46]=0),e.researches[41]<.5&&(e.upgrades[88]=0),e.achievements[50]===0&&(e.upgrades[89]=0),e.researches[42]<.5&&(e.upgrades[90]=0),e.researches[43]<.5&&(e.upgrades[91]=0),e.researches[44]<.5&&(e.upgrades[92]=0),e.researches[45]<.5&&(e.upgrades[93]=0),e.upgrades[116]=0,e.upgrades[117]=0,e.upgrades[118]=0,e.upgrades[119]=0,e.upgrades[120]=0}for(let r=1;r<=20;r++)e.upgrades[r]=0;for(let r=121,n=106;r<=125;r++,n++)e.upgrades[r]=0,e.upgrades[n]=0;if(t>1.5&&(e.achievements[4]<.5&&(e.upgrades[81]=0),e.achievements[11]<.5&&(e.upgrades[82]=0),e.achievements[18]<.5&&(e.upgrades[83]=0),e.achievements[25]<.5&&(e.upgrades[84]=0),e.achievements[32]<.5&&(e.upgrades[85]=0),e.achievements[87]<.5&&(e.upgrades[86]=0),e.achievements[80]<.5&&(e.upgrades[87]=0),e.upgrades[101]=0,e.upgrades[102]=0,e.upgrades[103]=0,e.upgrades[104]=0,e.upgrades[105]=0),t>1.5){for(let r=21;r<41;r++)e.upgrades[r]=0;e.upgrades[111]=0,e.upgrades[112]=0,e.upgrades[113]=0,e.upgrades[114]=0,e.upgrades[115]=0}if(t>1.5){e.crystalUpgrades=[0,0,0,0,0,0,0,0],e.crystalUpgradesCost=[7,15,20,40,100,200,500,1e3],wd();let r=0;r+=Math.floor(o.rune3level*o.effectiveLevelMult/16)*100/100,e.upgrades[73]>.5&&e.currentChallenge.reincarnation!==0&&(r+=10),e.crystalUpgrades=[r,r,r,r,r,r,r,r]}e.achievements[87]>.5&&(e.upgrades[86]=1);for(let r=1;r<=125;r++)ir(r,!0)},vd=()=>{e.firstOwnedAnts=0,e.secondOwnedAnts=0,e.thirdOwnedAnts=0,e.fourthOwnedAnts=0,e.fifthOwnedAnts=0,e.sixthOwnedAnts=0,e.seventhOwnedAnts=0,e.eighthOwnedAnts=0,e.firstGeneratedAnts=new m("0"),e.secondGeneratedAnts=new m("0"),e.thirdGeneratedAnts=new m("0"),e.fourthGeneratedAnts=new m("0"),e.fifthGeneratedAnts=new m("0"),e.sixthGeneratedAnts=new m("0"),e.seventhGeneratedAnts=new m("0"),e.eighthGeneratedAnts=new m("0"),e.firstCostAnts=new m("1e700"),e.secondCostAnts=new m("3"),e.thirdCostAnts=new m("100"),e.fourthCostAnts=new m("1e4"),e.fifthCostAnts=new m("1e12"),e.sixthCostAnts=new m("1e36"),e.seventhCostAnts=new m("1e100"),e.eighthCostAnts=new m("1e300"),e.cubeUpgrades[48]>0&&(e.firstOwnedAnts=1,e.firstCostAnts=new m("1e741"));let t=e.antUpgrades[12-1];e.antUpgrades=[0,0,0,0,0,0,0,0,0,0,0,t],e.antPoints=new m("1"),e.currentChallenge.ascension===12&&(e.antPoints=new m("7")),er(),nt()},nC=()=>{e.researchPoints=0;let t=[6,7,8,9,10,11,12,13,14,15,16,17,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,51,52,53,54,55,56,57,58,59,60,62,63,64,65,66,67,68,69,70,76,81,85,86,87,88,89,90,91,92,93,94,96,97,98,101,102,103,104,106,107,108,109,110,116,117,118,121,122,123,126,127,128,129,131,132,133,134,136,137,139,141,142,143,144,146,147,148,149,151,152,154,156,157,158,159,161,162,163,164,166,167,169,171,172,173,174,176,177,178,179,181,182,184,186,187,188,189,191,192,193,194,196,197,199];e.highestSingularityCount<25&&t.push(138,153,168,183,198);for(let r of t)e.researches[r]=0},aC=()=>{e.talismanLevels=[0,0,0,0,0,0,0],e.talismanRarity=[1,1,1,1,1,1,1],e.talismanShards=0,e.commonFragments=0,e.uncommonFragments=0,e.rareFragments=0,e.epicFragments=0,e.legendaryFragments=0,e.mythicalFragments=0};var cc=()=>{let t=1;return t+=Math.min(1e15,o.rune4level*o.effectiveLevelMult/160),t+=(e.researches[56]+e.researches[57]+e.researches[58]+e.researches[59]+e.researches[60])/200,t+=K("transcend",e.challengecompletions[4])/200,t+=Math.min(99999.9,3*(e.antUpgrades[7-1]+o.bonusant7)/100),t},Dn=t=>{--t;let r=500,n=new m(r);if(n=n.times(m.pow(4/o.costDivisor,t)),t>125+5*K("transcend",e.challengecompletions[4])){let s=t-125-5*K("transcend",e.challengecompletions[4]),l=new m(s).factorial(),c=m.pow(4,s);n=n.times(c.times(l))}if(t>2e3+5*K("transcend",e.challengecompletions[4])){let s=t-2e3-5*K("transcend",e.challengecompletions[4]),l=s*(s+1)/2;n=n.times(m.pow(2,l))}if(e.currentChallenge.transcension===4){let s=t*(t+1)/2;n=n.times(m.pow(10,s))}if(e.currentChallenge.reincarnation===8){let s=t*(t+1)/2;n=n.times(m.pow(1e50,s))}let a=Math.pow(10,15);if(t>a){let c=Dn(a).pow(Math.pow(t/a,1/.125)),p=c.exponent-Math.floor(c.exponent);return c.exponent=Math.floor(c.exponent),c.mantissa*=Math.pow(10,p),c.normalize(),m.max(n,c)}return n},ro=t=>{let r=e.acceleratorBought,n=Math.pow(10,15);if(r>=n){let h=m.log10(e.coins),b=m.log10(Dn(n)),y=Math.floor(n*Math.max(1,Math.pow(h/b,.125))),C=n;for(;y-C>.5;){let $=Math.floor(C+(y-C)/2);if($===C||$===y)break;e.coins.gte(Dn($))?C=$:y=$}let M=C,D=Dn(M);e.acceleratorBought=M,e.acceleratorCost=D;return}let a=r+Ie(r),s=a,l=Dn(s);for(;e.coins.gte(l);)s=s*4,l=Dn(s);let c=Math.floor(s/8);for(;c>=Ie(s);)Dn(s-c).lte(e.coins)?c=Math.floor(c/2):s=s-Math.max(Ie(s),c);!t&&e.coinbuyamount!=="max"&&e.acceleratorBought+e.coinbuyamount=n&&(p=n),e.coins=e.coins.sub(f),e.acceleratorBought=p,p=p+Ie(p),f=Dn(p),e.acceleratorCost=f,p>=n)return;e.prestigenoaccelerator=!1,e.transcendnoaccelerator=!1,e.reincarnatenoaccelerator=!1,Sd(),e.acceleratorBought>=5&&e.achievements[148]===0&&Q(148),e.acceleratorBought>=25&&e.achievements[149]===0&&Q(149),e.acceleratorBought>=100&&e.achievements[150]===0&&Q(150),e.acceleratorBought>=666&&e.achievements[151]===0&&Q(151),e.acceleratorBought>=2e3&&e.achievements[152]===0&&Q(152),e.acceleratorBought>=12500&&e.achievements[153]===0&&Q(153),e.acceleratorBought>=1e5&&e.achievements[154]===0&&Q(154)},Gn=t=>{--t;let r=1e4,n=new m(r);if(n=n.times(m.pow(10,t/o.costDivisor)),t>75+2*K("transcend",e.challengecompletions[4])){let s=t-75-2*K("transcend",e.challengecompletions[4]),l=new m(s).factorial(),c=m.pow(10,s);n=n.times(l.times(c))}if(t>2e3+2*K("transcend",e.challengecompletions[4])){let s=t-2e3-2*K("transcend",e.challengecompletions[4]),l=s*(s+1)/2;n=n.times(m.pow(2,l))}if(e.currentChallenge.transcension===4){let s=t*(t+1)/2;n=n.times(m.pow(10,s))}if(e.currentChallenge.reincarnation===8){let s=t*(t+1)/2;n=n.times(m.pow(1e50,s))}let a=Math.pow(10,15);if(t>a){let c=Gn(a).pow(Math.pow(t/a,1/.125)),p=c.exponent-Math.floor(c.exponent);return c.exponent=Math.floor(c.exponent),c.mantissa*=Math.pow(10,p),c.normalize(),m.max(n,c)}return n},no=t=>{let r=e.multiplierBought,n=Math.pow(10,15);if(r>=n){let h=m.log10(e.coins),b=m.log10(Gn(n)),y=Math.floor(n*Math.max(1,Math.pow(h/b,.125))),C=n;for(;y-C>.5;){let $=Math.floor(C+(y-C)/2);if($===C||$===y)break;e.coins.gte(Gn($))?C=$:y=$}let M=C,D=Gn(M);e.multiplierBought=M,e.multiplierCost=D;return}let a=r+Ie(r),s=a,l=Gn(s);for(;e.coins.gte(l);)s=s*4,l=Gn(s);let c=Math.floor(s/8);for(;c>=Ie(s);)Gn(s-c).lte(e.coins)?c=Math.floor(c/2):s=s-Math.max(Ie(s),c);!t&&e.coinbuyamount!=="max"&&e.multiplierBought+e.coinbuyamount=n&&(p=n),e.coins=e.coins.sub(f),e.multiplierBought=p,p=p+Ie(p),f=Gn(p),e.multiplierCost=f,p>=n)return;e.prestigenomultiplier=!1,e.transcendnomultiplier=!1,e.reincarnatenomultiplier=!1,Td(),e.multiplierBought>=2&&e.achievements[155]===0&&Q(155),e.multiplierBought>=20&&e.achievements[156]===0&&Q(156),e.multiplierBought>=100&&e.achievements[157]===0&&Q(157),e.multiplierBought>=500&&e.achievements[158]===0&&Q(158),e.multiplierBought>=2e3&&e.achievements[159]===0&&Q(159),e.multiplierBought>=12500&&e.achievements[160]===0&&Q(160),e.multiplierBought>=1e5&&e.achievements[161]===0&&Q(161)},sC=Math.log10(2*Math.PI),oC=Math.log10(Math.E),fi=t=>++t===0?0:(Math.log10(t*Math.sqrt(t*Math.sinh(1/t)+1/(810*Math.pow(t,6))))-oC)*t+(sC-Math.log10(t))/2,iC=Math.log10(9332621544394e145),lC=188.582,gi=(()=>{let t=[1.03,1.25],r=[1,2,3,4,5,6,10,15];for(let s of r)t.push(100+100*s),t.push(10+10*s);let n=1e3;for(let s=0;s"u"&&(a[s]=Math.log10(s));return a})(),cC=[100,1e3,2e4,4e5,8e6],uC=[100,1e5,1e15,1e40,1e100],rh=[1,100,1e4,1e8,1e16],Yr=(t,r,n,a,s)=>{--r;let l=Math.pow(10,15),c=new m(t),p=a*r;r=s*1e3&&(++f,c.exponent-=fi(g),c.exponent+=(-3+Math.log10(1+a/2))*(r-g)),g=Math.floor(s*5e3),r>=s*5e3&&(++f,c.exponent-=fi(g),c.exponent+=(gi[10+a*10]+1)*(r-g-1)+1),g=Math.floor(s*2e4),r>=s*2e4&&(f+=3,c.exponent-=fi(g)*3,c.exponent+=(gi[100+100*a]+5)*(r-g)),g=Math.floor(s*25e4),r>=s*25e4&&(c.exponent+=Math.log10(1.03)*(r-g)*((r-g+1)/2)),c.exponent+=fi(r)*f;let h=0;e.currentChallenge.transcension===4&&(n==="Coin"||n==="Diamonds")&&(++h,r>=1e3-10*e.challengecompletions[4]&&(p+=r*(r+1)/2)),e.currentChallenge.reincarnation===10&&(n==="Coin"||n==="Diamonds")&&(++h,r>=s*25e3&&(p+=r*(r+1)/2)),c.exponent+=h*((fi(r+100)-iC+2*r)*(1.25+e.challengecompletions[4]/4)),c.exponent+=gi[1.25]*p,g=Math.floor(s*1e3*e.challengecompletions[8]),e.currentChallenge.reincarnation===8&&(n==="Coin"||n==="Diamonds"||n==="Mythos")&&r>=1e3*e.challengecompletions[8]*s&&(c.exponent+=(gi[2]*((r-g+1)/2)-gi[1+e.challengecompletions[8]/2])*(r-g));let b=c.exponent-Math.floor(c.exponent);if(c.exponent=Math.floor(c.exponent),c.mantissa*=Math.pow(10,b),c.normalize(),r>l){let M=Yr(t,l,n,a,s).pow(Math.pow(r/l,1/.125)),D=M.exponent-Math.floor(M.exponent);return M.exponent=Math.floor(M.exponent),M.mantissa*=Math.pow(10,D),M.normalize(),m.max(c,M)}return c},nh=(t,r)=>{let n=r==="Coin"?cC:r==="Diamonds"?uC:rh,a=r==="Coin"?t:t*(t+1)/2;return[n[t-1],a]},ah=(t,r,n,a)=>{let[s,l]=nh(t,r);return Yr(s,n,r,l,a!=null?a:cc())},Rt=(t,r)=>{let n=t-1,a=o.ordinals[n],[s,l]=nh(t,r),c=Math.pow(10,15),p=1e99,f=cc(),g=sh[r][0],h=`${a}Owned${r}`,b=e[h];if(b>=c){let H=m.log10(e[g]),I=m.log10(Yr(s,c,r,l,f)),_=Math.floor(c*Math.max(1,Math.pow(H/I,.125))),L=c;for(;_-L>.5;){let j=Math.floor(L+(_-L)/2);if(j===L||j===_)break;e[g].gte(Yr(s,j,r,l,f))?L=j:_=j}let P=L,F=Yr(s,P,r,l,f);e[h]=P,e[`${a}Cost${r}`]=F;return}let y=b+Ie(b),C=1,M=Yr(s,b+C,r,l,f);if(M.exponent>=p||!e[g].gte(M))return;for(;M.exponent=Ie(C);)Yr(s,b+C-D,r,l,f).lte(e[g])?D=Math.floor(D/2):C=C-Math.max(Ie(C),D);if(b+C>=c){e[h]=c,e[`${a}Cost${r}`]=Yr(s,c,r,l,f);return}let $=Math.max(b+C-6-Ie(C),y),k=Yr(s,$,r,l,f);for(;$<=b+C&&e[g].gte(k);)e[g]=e[g].sub(k),e[h]=$,$=$+Ie($),k=Yr(s,$,r,l,f),e[`${a}Cost${r}`]=k},sh={Diamonds:["prestigePoints","crystal"],Mythos:["transcendPoints","mythos"],Particles:["reincarnationPoints","particle"],Coin:["coins","coin"]},oh=(t,r,n,a)=>{let[s,l]=sh[r],c=a?500:e[`${l}buyamount`],p=1;p+=o.rune4level*o.effectiveLevelMult/160,p+=(e.researches[56]+e.researches[57]+e.researches[58]+e.researches[59]+e.researches[60])/200,p+=K("transcend",e.challengecompletions[4])/200,p+=3*(o.bonusant7+e.antUpgrades[7-1])/100;let f=`${t}Cost${r}`,g=`${t}Owned${r}`;for(;e[s].gte(e[f])&&o.ticker=1e3*p&&(e[f]=e[f].times(e[g]).dividedBy(1e3).times(1+n/2)),e[g]>=5e3*p&&(e[f]=e[f].times(e[g]).times(10).times(10+n*10)),e[g]>=2e4*p&&(e[f]=e[f].times(m.pow(e[g],3)).times(1e5).times(100+n*100)),e[g]>=25e4*p&&(e[f]=e[f].times(m.pow(1.03,e[g]-25e4*p))),e.currentChallenge.transcension===4&&(r==="Coin"||r==="Diamonds")&&(e[f]=e[f].times(Math.pow(100*e[g]+1e4,1.25+1/4*e.challengecompletions[4])),e[g]>=1e3-10*e.challengecompletions[4]&&(e[f]=e[f].times(m.pow(1.25,e[g])))),e.currentChallenge.reincarnation===8&&(r==="Coin"||r==="Diamonds"||r==="Mythos")&&e[g]>=1e3*e.challengecompletions[8]*p&&(e[f]=e[f].times(m.pow(2,(e[g]-1e3*e.challengecompletions[8]*p)/(1+e.challengecompletions[8]/2)))),o.ticker+=1;o.ticker=0},xr=(t,r,n)=>{let a=t;e[a].gte(m.pow(10,o.upgradeCosts[r]))&&e.upgrades[r]===0&&(e[a]=e[a].sub(m.pow(10,o.upgradeCosts[r])),e.upgrades[r]=1,ir(r,n)),t==="transcendPoints"&&(e.reincarnatenocoinprestigeortranscendupgrades=!1,e.reincarnatenocoinprestigetranscendorgeneratorupgrades=!1),t==="prestigePoints"&&(e.transcendnocoinorprestigeupgrades=!1,e.reincarnatenocoinorprestigeupgrades=!1,e.reincarnatenocoinprestigeortranscendupgrades=!1,e.reincarnatenocoinprestigetranscendorgeneratorupgrades=!1),t==="coins"&&(e.prestigenocoinupgrades=!1,e.transcendnocoinupgrades=!1,e.transcendnocoinorprestigeupgrades=!1,e.reincarnatenocoinupgrades=!1,e.reincarnatenocoinorprestigeupgrades=!1,e.reincarnatenocoinprestigeortranscendupgrades=!1,e.reincarnatenocoinprestigetranscendorgeneratorupgrades=!1)},dC=t=>{let r=t-1,n=m.log(e.prestigeShards.add(1),10);return Math.floor(Math.pow(Math.max(0,2*(n-o.crystalUpgradesCost[r])/o.crystalUpgradeCostIncrement[r]+1/4),1/2)+1/2)},gr=(t,r=!1)=>{let n=t-1,a=0;a+=Math.floor(o.rune3level/16*o.effectiveLevelMult)*100/100,e.upgrades[73]>.5&&e.currentChallenge.reincarnation!==0&&(a+=10);let s=dC(t);s+a>e.crystalUpgrades[n]&&(e.crystalUpgrades[n]=100/100*(s+a),s>0&&(e.prestigeShards=e.prestigeShards.sub(m.pow(10,o.crystalUpgradesCost[n]+o.crystalUpgradeCostIncrement[n]*(1/2*Math.pow(s-1/2,2)-1/8))),r||yl(t)))},fs=t=>{let r=1;if(e.upgrades[46]===1&&(r=t?9999:e.coinbuyamount),e.upgrades[46]<1){for(;e.prestigePoints.gte(e.acceleratorBoostCost)&&o.ticker1e3*(1+2*o.effectiveRuneBlessingPower[4])&&(e.acceleratorBoostCost=e.acceleratorBoostCost.times(m.pow(10,Math.pow(e.acceleratorBoostBought-1e3*(1+2*o.effectiveRuneBlessingPower[4]),2)/(1+2*o.effectiveRuneBlessingPower[4])))),e.transcendnoaccelerator=!1,e.reincarnatenoaccelerator=!1,e.upgrades[46]<.5)){for(let n=21;n<41;n++)e.upgrades[n]=0;Fe("prestige"),e.prestigePoints=new m(0)}}else{let n=e.acceleratorBoostBought,a=Math.pow(10,15);if(n>=a){let b=m.log10(e.prestigePoints),y=m.log10(wn(a)),C=Math.floor(a*Math.max(1,Math.pow(b/y,.125))),M=a;for(;C-M>.5;){let k=Math.floor(M+(C-M)/2);if(k===M||k===C)break;e.prestigePoints.gte(wn(k))?M=k:C=k}let D=M,$=wn(D);e.acceleratorBoostBought=D,e.acceleratorBoostCost=$;return}let s=n+Ie(n),l=1,c=wn(n+l);for(;e.prestigePoints.gte(c);)l*=4,c=wn(n+l);let p=Math.floor(l/8);for(;p>=Ie(l);)wn(n+l-p).lte(e.prestigePoints)?p=Math.floor(p/2):l=l-Math.max(Ie(l),p);let f=Math.max(n+l-6-Ie(l),s),g=wn(e.acceleratorBoostBought);for(;f<=n+l&&e.prestigePoints.gte(wn(f));)if(e.prestigePoints=e.prestigePoints.sub(g),f>=a&&(f=a),e.acceleratorBoostBought=f,f=f+Ie(f),g=wn(f),e.acceleratorBoostCost=g,e.transcendnoaccelerator=!1,e.reincarnatenoaccelerator=!1,f>=a)return}o.ticker=0,e.acceleratorBoostBought>=2&&e.achievements[162]===0&&Q(162),e.acceleratorBoostBought>=10&&e.achievements[163]===0&&Q(163),e.acceleratorBoostBought>=50&&e.achievements[164]===0&&Q(164),e.acceleratorBoostBought>=200&&e.achievements[165]===0&&Q(165),e.acceleratorBoostBought>=1e3&&e.achievements[166]===0&&Q(166),e.acceleratorBoostBought>=5e3&&e.achievements[167]===0&&Q(167),e.acceleratorBoostBought>=15e3&&e.achievements[168]===0&&Q(168)},wn=(t=1)=>{t--;let r=Math.pow(10,15),n=new m(1e3),a=1+2*o.effectiveRuneBlessingPower[4],s=p=>p*(p+1)/2,l=p=>p*(p+1)*(2*p+1)/6,c=n;if(t>1e3*a?c=n.times(m.pow(10,10*t+s(t)+l(t-1e3*a)/a)):c=n.times(m.pow(10,10*t+s(t))),t>r){let g=wn(r).pow(Math.pow(t/r,1/.125)),h=g.exponent-Math.floor(g.exponent);return g.exponent=Math.floor(g.exponent),g.mantissa*=Math.pow(10,h),g.normalize(),m.max(c,g)}return c},Hn=(t,r)=>{--r,t=new m(t);let n=t.times(m.pow(2,r)),a=e.currentChallenge.ascension!==15?325e3:1e3;r>a&&(n=n.times(m.pow(1.001,(r-a)*((r-a+1)/2))));let s=Math.pow(10,15);if(r>s){let p=Hn(t,s).pow(Math.pow(r/s,1/.125)),f=p.exponent-Math.floor(p.exponent);return p.exponent=Math.floor(p.exponent),p.mantissa*=Math.pow(10,f),p.normalize(),m.max(n,p)}return n},Fn=(t,r=!1)=>{let n=t-1,a=rh[n],s=o.ordinals[n],l=`${s}OwnedParticles`,c=e[l],p=Math.pow(10,15);if(c>=p){let D=m.log10(e.reincarnationPoints),$=m.log10(Hn(a,p)),k=Math.floor(p*Math.max(1,Math.pow(D/$,.125))),E=p;for(;k-E>.5;){let _=Math.floor(E+(k-E)/2);if(_===E||_===k)break;e.reincarnationPoints.gte(Hn(a,_))?E=_:k=_}let H=E,I=Hn(a,H);e[l]=H,e[`${s}CostParticles`]=I;return}let f=c+Ie(c),g=f,h=Hn(a,g);for(;e.reincarnationPoints.gte(h);)g=g*4,h=Hn(a,g);let b=Math.floor(g/8);for(;b>=Ie(g);)Hn(a,g-b).lte(e.reincarnationPoints)?b=Math.floor(b/2):g=g-Math.max(Ie(g),b);r||e.particlebuyamount+c{let n=t.map((s,l)=>{if(s===null)return null;let c=Math.ceil(Math.pow(r/ps[l],1/3)-1);return Math.max(s,c)}),a=0;for(let s=0;s{let n=null;for(let g=0;gr)return t;let a=n,s=a*2;for(;xd(t,s)[0]<=r;)a=s,s*=2;for(;s-a>.5;){let g=a+(s-a)/2;if(g===a||g===s)break;xd(t,g)[0]<=r?a=g:s=g}let[l,c]=xd(t,a),p=r-l,f=c.map((g,h)=>g===null?null:ps[h]*Math.pow(g+1,3));for(let g=1;g<=5;g++){let h=null;for(let b=0;b{r!=null||(r=e.tesseractbuyamount),a!=null||(a=e[`ascendBuilding${t}`].owned);let s=ps[t-1],l=s*Math.pow(a*(a+1)/2,2),c;if(n){let f=Math.floor(-.5+.5*Math.pow(1+8*Math.pow((Number(e.wowTesseracts)+l)/s,.5),.5));c=Math.min(f,a+r)}else c=a+r;let p=s*Math.pow(c*(c+1)/2,2)-l;return[c,p]},us=(t,r=e.tesseractbuyamount)=>{let n=ps[t-1],a=`ascendBuilding${t}`,[s,l]=pC(t,r);e[a].owned=s,e.wowTesseracts.sub(l),e[a].cost=n*Math.pow(1+s,3)},ao=(t,r)=>{if((t==="Spirits"?e.challengecompletions[12]>0:e.achievements[134]===1)&&isFinite(e.runeshards)&&e.runeshards>0){let a,s,l;t==="Spirits"?(a=o.spiritBaseCost,s=e.runeSpiritLevels[r],l=e.runeSpiritBuyAmount):(a=o.blessingBaseCost,s=e.runeBlessingLevels[r],l=e.runeBlessingBuyAmount);let[c,p]=la(s,a,e.runeshards,l);t==="Spirits"?e.runeSpiritLevels[r]=c:e.runeBlessingLevels[r]=c,e.runeshards-=p,e.runeshards<0&&(e.runeshards=0),ih(t,r)}},ih=(t,r)=>{if(r===1){let n=[0,1e5,1e8,1e11];for(let a=1;a<=3;a++)e.runeBlessingLevels[1]>=n[a]&&e.achievements[231+a]<1&&Q(231+a),e.runeSpiritLevels[1]>=10*n[a]&&e.achievements[234+a]<1&&Q(234+a);e.runeBlessingLevels[1]>=1e22&&e.achievements[245]<1&&Q(245)}if(Md(),t==="Blessings"){let n=[0,8,10,6.66,2,1],a=r===5?1:0;i(`runeBlessingPower${r}Value1`).innerHTML=u.t("runes.blessings.blessingPower",{reward:u.t(`runes.blessings.rewards.${r-1}`),value:d(o.runeBlessings[r]),speed:d(1-a+n[r]*o.effectiveRuneBlessingPower[r],4,!0)})}else if(t==="Spirits"){let n=[0,1,1,20,1,100];n[r]*=ht()/400;let a=r===3?1:0;i(`runeSpiritPower${r}Value1`).innerHTML=u.t("runes.spirits.spiritPower",{reward:u.t(`runes.spirits.rewards.${r-1}`),value:d(o.runeSpirits[r]),speed:d(1-a+n[r]*o.effectiveRuneSpiritPower[r],4,!0)})}},so=(t,r=100,n=!1)=>{if(t==="Spirits"?e.challengecompletions[12]>0:e.achievements[134]===1){let s=Math.floor(e.runeshards/100*r/5);for(let l=1;l<6;l++)if(isFinite(e.runeshards)&&e.runeshards>0){let c,p;t==="Spirits"?(c=o.spiritBaseCost,p=e.runeSpiritLevels[l]):(c=o.blessingBaseCost,p=e.runeBlessingLevels[l]);let[g,h]=la(p,c,s,1e300);g>p&&(!n||(g-p)*1e4>p)&&(t==="Spirits"?e.runeSpiritLevels[l]=g:e.runeBlessingLevels[l]=g,e.runeshards-=h,e.runeshards<0&&(e.runeshards=0),ih(t,l))}}};var uc=new Map([["A",["Buy Accelerators",()=>ro(),!1]],["B",["Boost Accelerator",()=>fs(),!1]],["C",["Auto Challenge",()=>{lh()},!1]],["E",["Exit T / R Challenge",()=>{e.autoChallengeRunning?lh():ch()},!1]],["M",["Multipliers",()=>no(),!1]],["N",["No (Cancel)",()=>bd(!1),!0]],["P",["Reset Prestige",()=>Qe("prestige"),!1]],["R",["Reset Reincarnate",()=>Qe("reincarnation"),!1]],["S",["Sacrifice Ants",()=>oo(),!1]],["T",["Reset Transcend",()=>Qe("transcension"),!1]],["Y",["Yes (OK)",()=>bd(!0),!0]],["ARROWLEFT",["Back a tab",()=>mi(-1),!1]],["ARROWRIGHT",["Next tab",()=>mi(1),!1]],["ARROWUP",["Back a subtab",()=>mi(-1,!0),!1]],["ARROWDOWN",["Next subtab",()=>mi(1,!0),!1]],["SHIFT+A",["Reset Ascend",()=>Qe("ascension"),!1]],["SHIFT+C",["Cleanse Corruptions",()=>$n(10,999),!1]],["SHIFT+D",["Spec. Action Add x1",()=>Qn("add",1),!1]],["SHIFT+E",["Exit Asc. Challenge",()=>Qe("ascensionChallenge"),!1]],["SHIFT+O",["Use Off. Potion",()=>In("offeringPotion"),!1]],["SHIFT+P",["Use Obt. Potion",()=>In("obtainiumPotion"),!1]],["SHIFT+S",["Reset Singularity",()=>Qe("singularity"),!1]],["CTRL+B",["Un-hide Tabs",()=>gt.reappend(),!1]]]),kd=!1,Lt=new Map(uc),lh=()=>{e.researches[150]>0&&(ui(),e.autoChallengeRunning||ch())},ch=()=>{e.currentChallenge.reincarnation!==0&&Qe("reincarnationChallenge",void 0,!0),e.currentChallenge.transcension!==0&&Qe("transcensionChallenge",void 0,!0)},fC=t=>{var s;if(!kd||!e.toggles[39])return;if(((s=document.activeElement)==null?void 0:s.localName)==="input"){t.stopPropagation();return}dh(t,t.code.replace(/^(Digit|Numpad)/,"").toUpperCase());let r="";t.ctrlKey&&(r+="CTRL+"),t.shiftKey&&(r+="SHIFT+"),t.altKey&&(r+="ALT+");let n=r+t.key.toUpperCase();if(n==="TAB"&&t.preventDefault(),n!=="ENTER"&&i("transparentBG").style.display==="block"&&Lt.has(n)&&!Lt.get(n)[2])return;let a="";Lt.has(n)&&(a=`${Lt.get(n)[0]}`,Lt.get(n)[1](),t.preventDefault()),o.currentTab===10&&e.subtabNumber===6&&(i("lastHotkey").textContent=n,i("lastHotkeyName").textContent=a)},gC=(t,r)=>{let n=document.createElement("div");n.classList.add("hotkeyItem");let a=document.createElement("span");a.id="actualHotkey",a.textContent=t,a.addEventListener("click",async l=>{var b,y,C;let c=l.target,p=c.textContent.toUpperCase(),f=(C=(b=Lt.get(p))==null?void 0:b[0])!=null?C:(y=c.nextSibling)==null?void 0:y.textContent,g=await je(`
Enter the new key you want to activate ${f} with.
MDN has a list of values for "special keys" if you would like to use one: