diff --git a/src/dist/out.js b/src/dist/out.js index e74e1fc..62da98e 100644 --- a/src/dist/out.js +++ b/src/dist/out.js @@ -1,6 +1,6 @@ "use strict";(()=>{var z0=Object.create;var Vc=Object.defineProperty,K0=Object.defineProperties,X0=Object.getOwnPropertyDescriptor,Z0=Object.getOwnPropertyDescriptors,Y0=Object.getOwnPropertyNames,Qi=Object.getOwnPropertySymbols,J0=Object.getPrototypeOf,Wc=Object.prototype.hasOwnProperty,Ep=Object.prototype.propertyIsEnumerable;var Pp=(t,r,n)=>r in t?Vc(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,G=(t,r)=>{for(var n in r||(r={}))Wc.call(r,n)&&Pp(t,n,r[n]);if(Qi)for(var n of Qi(r))Ep.call(r,n)&&Pp(t,n,r[n]);return t},fe=(t,r)=>K0(t,Z0(r));var To=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(r,n)=>(typeof require<"u"?require:r)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var Op=(t,r)=>{var n={};for(var a in t)Wc.call(t,a)&&r.indexOf(a)<0&&(n[a]=t[a]);if(t!=null&&Qi)for(var a of Qi(t))r.indexOf(a)<0&&Ep.call(t,a)&&(n[a]=t[a]);return n};var Sa=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports);var e1=(t,r,n,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of Y0(r))!Wc.call(t,s)&&s!==n&&Vc(t,s,{get:()=>r[s],enumerable:!(a=X0(r,s))||a.enumerable});return t};var Hr=(t,r,n)=>(n=t!=null?z0(J0(t)):{},e1(r||!t||!t.__esModule?Vc(n,"default",{value:t,enumerable:!0}):n,t));var zc=(t,r,n)=>{if(!r.has(t))throw TypeError("Cannot "+n)};var me=(t,r,n)=>(zc(t,r,"read from private field"),n?n.call(t):r.get(t)),qt=(t,r,n)=>{if(r.has(t))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(t):r.set(t,n)},Zt=(t,r,n,a)=>(zc(t,r,"write to private field"),a?a.call(t,n):r.set(t,n),n);var qi=(t,r,n)=>(zc(t,r,"access private method"),n);var Bp=Sa((aw,Up)=>{"use strict";Up.exports=function(t,r,n){if(t==null||r==null)return t;var a=String(t),s=typeof r=="number"?r:parseInt(r,10);if(isNaN(s)||!isFinite(s))return a;var l=a.length;if(l>=s)return a;var c=n==null?"":String(n);c===""&&(c=" ");for(var p=s-l;c.lengthp?c.substr(0,p):c;return a+f}});var Xc=Sa((ow,Wi)=>{var Kc=function(){var t=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",a={};function s(c,p){if(!a[c]){a[c]={};for(var f=0;f>>8,f[g*2+1]=b%256}return f},decompressFromUint8Array:function(c){if(c==null)return l.decompress(c);for(var p=new Array(c.length/2),f=0,g=p.length;f>1}else{for(h=1,g=0;g>1}$--,$==0&&($=Math.pow(2,E),E++),delete y[D]}else for(h=b[D],g=0;g>1;$--,$==0&&($=Math.pow(2,E),E++),b[M]=k++,D=String(C)}if(D!==""){if(Object.prototype.hasOwnProperty.call(y,D)){if(D.charCodeAt(0)<256){for(g=0;g>1}else{for(h=1,g=0;g>1}$--,$==0&&($=Math.pow(2,E),E++),delete y[D]}else for(h=b[D],g=0;g>1;$--,$==0&&($=Math.pow(2,E),E++)}for(h=2,g=0;g>1;for(;;)if(I=I<<1,_==p-1){H.push(f(I));break}else _++;return H.join("")},decompress:function(c){return c==null?"":c==""?null:l._decompress(c.length,32768,function(p){return c.charCodeAt(p)})},_decompress:function(c,p,f){var g=[],h,b=4,y=4,C=3,M="",D=[],$,k,E,H,I,_,L,P={val:f(0),position:p,index:1};for($=0;$<3;$+=1)g[$]=$;for(E=0,I=Math.pow(2,2),_=1;_!=I;)H=P.val&P.position,P.position>>=1,P.position==0&&(P.position=p,P.val=f(P.index++)),E|=(H>0?1:0)*_,_<<=1;switch(h=E){case 0:for(E=0,I=Math.pow(2,8),_=1;_!=I;)H=P.val&P.position,P.position>>=1,P.position==0&&(P.position=p,P.val=f(P.index++)),E|=(H>0?1:0)*_,_<<=1;L=t(E);break;case 1:for(E=0,I=Math.pow(2,16),_=1;_!=I;)H=P.val&P.position,P.position>>=1,P.position==0&&(P.position=p,P.val=f(P.index++)),E|=(H>0?1:0)*_,_<<=1;L=t(E);break;case 2:return""}for(g[3]=L,k=L,D.push(L);;){if(P.index>c)return"";for(E=0,I=Math.pow(2,C),_=1;_!=I;)H=P.val&P.position,P.position>>=1,P.position==0&&(P.position=p,P.val=f(P.index++)),E|=(H>0?1:0)*_,_<<=1;switch(L=E){case 0:for(E=0,I=Math.pow(2,8),_=1;_!=I;)H=P.val&P.position,P.position>>=1,P.position==0&&(P.position=p,P.val=f(P.index++)),E|=(H>0?1:0)*_,_<<=1;g[y++]=t(E),L=y-1,b--;break;case 1:for(E=0,I=Math.pow(2,16),_=1;_!=I;)H=P.val&P.position,P.position>>=1,P.position==0&&(P.position=p,P.val=f(P.index++)),E|=(H>0?1:0)*_,_<<=1;g[y++]=t(E),L=y-1,b--;break;case 2:return D.join("")}if(b==0&&(b=Math.pow(2,C),C++),g[L])M=g[L];else if(L===y)M=k+k.charAt(0);else return null;D.push(M),g[y++]=k+M.charAt(0),b--,k=M,b==0&&(b=Math.pow(2,C),C++)}}};return l}();typeof define=="function"&&define.amd?define(function(){return Kc}):typeof Wi<"u"&&Wi!=null?Wi.exports=Kc:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return Kc})});var uf=Sa((lx,tu)=>{"use strict";var N1=Object.prototype.hasOwnProperty,jt="~";function Ao(){}Object.create&&(Ao.prototype=Object.create(null),new Ao().__proto__||(jt=!1));function _1(t,r,n){this.fn=t,this.context=r,this.once=n||!1}function cf(t,r,n,a,s){if(typeof n!="function")throw new TypeError("The listener must be a function");var l=new _1(n,a||t,s),c=jt?jt+r:r;return t._events[c]?t._events[c].fn?t._events[c]=[t._events[c],l]:t._events[c].push(l):(t._events[c]=l,t._eventsCount++),t}function rl(t,r){--t._eventsCount===0?t._events=new Ao:delete t._events[r]}function Gt(){this._events=new Ao,this._eventsCount=0}Gt.prototype.eventNames=function(){var r=[],n,a;if(this._eventsCount===0)return r;for(a in n=this._events)N1.call(n,a)&&r.push(jt?a.slice(1):a);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(n)):r};Gt.prototype.listeners=function(r){var n=jt?jt+r:r,a=this._events[n];if(!a)return[];if(a.fn)return[a.fn];for(var s=0,l=a.length,c=new Array(l);s{(function(r,n){typeof Po=="object"&&typeof ru=="object"?ru.exports=n():typeof define=="function"&&define.amd?define([],n):typeof Po=="object"?Po.ClipboardJS=n():r.ClipboardJS=n()})(Po,function(){return function(){var t={686:function(a,s,l){"use strict";l.d(s,{default:function(){return Nt}});var c=l(279),p=l.n(c),f=l(370),g=l.n(f),h=l(817),b=l.n(h);function y(ve){try{return document.execCommand(ve)}catch(ce){return!1}}var C=function(ce){var ie=b()(ce);return y("cut"),ie},M=C;function D(ve){var ce=document.documentElement.getAttribute("dir")==="rtl",ie=document.createElement("textarea");ie.style.fontSize="12pt",ie.style.border="0",ie.style.padding="0",ie.style.margin="0",ie.style.position="absolute",ie.style[ce?"right":"left"]="-9999px";var he=window.pageYOffset||document.documentElement.scrollTop;return ie.style.top="".concat(he,"px"),ie.setAttribute("readonly",""),ie.value=ve,ie}var $=function(ce,ie){var he=D(ce);ie.container.appendChild(he);var ge=b()(he);return y("copy"),he.remove(),ge},k=function(ce){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},he="";return typeof ce=="string"?he=$(ce,ie):ce instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(ce==null?void 0:ce.type)?he=$(ce.value,ie):(he=b()(ce),y("copy")),he},E=k;function H(ve){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?H=function(ie){return typeof ie}:H=function(ie){return ie&&typeof Symbol=="function"&&ie.constructor===Symbol&&ie!==Symbol.prototype?"symbol":typeof ie},H(ve)}var I=function(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ie=ce.action,he=ie===void 0?"copy":ie,ge=ce.container,ke=ce.target,Ye=ce.text;if(he!=="copy"&&he!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(ke!==void 0)if(ke&&H(ke)==="object"&&ke.nodeType===1){if(he==="copy"&&ke.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(he==="cut"&&(ke.hasAttribute("readonly")||ke.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(Ye)return E(Ye,{container:ge});if(ke)return he==="cut"?M(ke):E(ke,{container:ge})},_=I;function L(ve){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?L=function(ie){return typeof ie}:L=function(ie){return ie&&typeof Symbol=="function"&&ie.constructor===Symbol&&ie!==Symbol.prototype?"symbol":typeof ie},L(ve)}function P(ve,ce){if(!(ve instanceof ce))throw new TypeError("Cannot call a class as a function")}function F(ve,ce){for(var ie=0;ie"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(ve){return!1}}function xt(ve){return xt=Object.setPrototypeOf?Object.getPrototypeOf:function(ie){return ie.__proto__||Object.getPrototypeOf(ie)},xt(ve)}function Ot(ve,ce){var ie="data-clipboard-".concat(ve);if(ce.hasAttribute(ie))return ce.getAttribute(ie)}var Ct=function(ve){x(ie,ve);var ce=ue(ie);function ie(he,ge){var ke;return P(this,ie),ke=ce.call(this),ke.resolveOptions(ge),ke.listenClick(he),ke}return j(ie,[{key:"resolveOptions",value:function(){var ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof ge.action=="function"?ge.action:this.defaultAction,this.target=typeof ge.target=="function"?ge.target:this.defaultTarget,this.text=typeof ge.text=="function"?ge.text:this.defaultText,this.container=L(ge.container)==="object"?ge.container:document.body}},{key:"listenClick",value:function(ge){var ke=this;this.listener=g()(ge,"click",function(Ye){return ke.onClick(Ye)})}},{key:"onClick",value:function(ge){var ke=ge.delegateTarget||ge.currentTarget,Ye=this.action(ke)||"copy",O=_({action:Ye,container:this.container,target:this.target(ke),text:this.text(ke)});this.emit(O?"success":"error",{action:Ye,text:O,trigger:ke,clearSelection:function(){ke&&ke.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(ge){return Ot("action",ge)}},{key:"defaultTarget",value:function(ge){var ke=Ot("target",ge);if(ke)return document.querySelector(ke)}},{key:"defaultText",value:function(ge){return Ot("text",ge)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(ge){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return E(ge,ke)}},{key:"cut",value:function(ge){return M(ge)}},{key:"isSupported",value:function(){var ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],ke=typeof ge=="string"?[ge]:ge,Ye=!!document.queryCommandSupported;return ke.forEach(function(O){Ye=Ye&&!!document.queryCommandSupported(O)}),Ye}}]),ie}(p()),Nt=Ct},828:function(a){var s=9;if(typeof Element<"u"&&!Element.prototype.matches){var l=Element.prototype;l.matches=l.matchesSelector||l.mozMatchesSelector||l.msMatchesSelector||l.oMatchesSelector||l.webkitMatchesSelector}function c(p,f){for(;p&&p.nodeType!==s;){if(typeof p.matches=="function"&&p.matches(f))return p;p=p.parentNode}}a.exports=c},438:function(a,s,l){var c=l(828);function p(h,b,y,C,M){var D=g.apply(this,arguments);return h.addEventListener(y,D,M),{destroy:function(){h.removeEventListener(y,D,M)}}}function f(h,b,y,C,M){return typeof h.addEventListener=="function"?p.apply(null,arguments):typeof y=="function"?p.bind(null,document).apply(null,arguments):(typeof h=="string"&&(h=document.querySelectorAll(h)),Array.prototype.map.call(h,function(D){return p(D,b,y,C,M)}))}function g(h,b,y,C){return function(M){M.delegateTarget=c(M.target,b),M.delegateTarget&&C.call(h,M)}}a.exports=f},879:function(a,s){s.node=function(l){return l!==void 0&&l instanceof HTMLElement&&l.nodeType===1},s.nodeList=function(l){var c=Object.prototype.toString.call(l);return l!==void 0&&(c==="[object NodeList]"||c==="[object HTMLCollection]")&&"length"in l&&(l.length===0||s.node(l[0]))},s.string=function(l){return typeof l=="string"||l instanceof String},s.fn=function(l){var c=Object.prototype.toString.call(l);return c==="[object Function]"}},370:function(a,s,l){var c=l(879),p=l(438);function f(y,C,M){if(!y&&!C&&!M)throw new Error("Missing required arguments");if(!c.string(C))throw new TypeError("Second argument must be a String");if(!c.fn(M))throw new TypeError("Third argument must be a Function");if(c.node(y))return g(y,C,M);if(c.nodeList(y))return h(y,C,M);if(c.string(y))return b(y,C,M);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function g(y,C,M){return y.addEventListener(C,M),{destroy:function(){y.removeEventListener(C,M)}}}function h(y,C,M){return Array.prototype.forEach.call(y,function(D){D.addEventListener(C,M)}),{destroy:function(){Array.prototype.forEach.call(y,function(D){D.removeEventListener(C,M)})}}}function b(y,C,M){return p(document.body,y,C,M)}a.exports=f},817:function(a){function s(l){var c;if(l.nodeName==="SELECT")l.focus(),c=l.value;else if(l.nodeName==="INPUT"||l.nodeName==="TEXTAREA"){var p=l.hasAttribute("readonly");p||l.setAttribute("readonly",""),l.select(),l.setSelectionRange(0,l.value.length),p||l.removeAttribute("readonly"),c=l.value}else{l.hasAttribute("contenteditable")&&l.focus();var f=window.getSelection(),g=document.createRange();g.selectNodeContents(l),f.removeAllRanges(),f.addRange(g),c=f.toString()}return c}a.exports=s},279:function(a){function s(){}s.prototype={on:function(l,c,p){var f=this.e||(this.e={});return(f[l]||(f[l]=[])).push({fn:c,ctx:p}),this},once:function(l,c,p){var f=this;function g(){f.off(l,g),c.apply(p,arguments)}return g._=c,this.on(l,g,p)},emit:function(l){var c=[].slice.call(arguments,1),p=((this.e||(this.e={}))[l]||[]).slice(),f=0,g=p.length;for(f;f{(function(t){if(typeof pf=="object"&&typeof au<"u")au.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var r;typeof window<"u"?r=window:typeof global<"u"?r=global:typeof self<"u"?r=self:r=this,r.localforage=t()}})(function(){var t,r,n;return function a(s,l,c){function p(h,b){if(!l[h]){if(!s[h]){var y=typeof To=="function"&&To;if(!b&&y)return y(h,!0);if(f)return f(h,!0);var C=new Error("Cannot find module '"+h+"'");throw C.code="MODULE_NOT_FOUND",C}var M=l[h]={exports:{}};s[h][0].call(M.exports,function(D){var $=s[h][1][D];return p($||D)},M,M.exports,a,s,l,c)}return l[h].exports}for(var f=typeof To=="function"&&To,g=0;g"u"&&a(3);var y=Promise;function C(w,A){A&&w.then(function(S){A(null,S)},function(S){A(S)})}function M(w,A,S){typeof A=="function"&&w.then(A),typeof S=="function"&&w.catch(S)}function D(w){return typeof w!="string"&&(console.warn(w+" used as a key, but it is not a string."),w=String(w)),w}function $(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var k="local-forage-detect-blob-support",E=void 0,H={},I=Object.prototype.toString,_="readonly",L="readwrite";function P(w){for(var A=w.length,S=new ArrayBuffer(A),R=new Uint8Array(S),N=0;N=43)}}).catch(function(){return!1})}function j(w){return typeof E=="boolean"?y.resolve(E):F(w).then(function(A){return E=A,E})}function x(w){var A=H[w.name],S={};S.promise=new y(function(R,N){S.resolve=R,S.reject=N}),A.deferredOperations.push(S),A.dbReady?A.dbReady=A.dbReady.then(function(){return S.promise}):A.dbReady=S.promise}function W(w){var A=H[w.name],S=A.deferredOperations.pop();if(S)return S.resolve(),S.promise}function ue(w,A){var S=H[w.name],R=S.deferredOperations.pop();if(R)return R.reject(A),R.promise}function be(w,A){return new y(function(S,R){if(H[w.name]=H[w.name]||he(),w.db)if(A)x(w),w.db.close();else return S(w.db);var N=[w.name];A&&N.push(w.version);var U=g.open.apply(g,N);A&&(U.onupgradeneeded=function(q){var z=U.result;try{z.createObjectStore(w.storeName),q.oldVersion<=1&&z.createObjectStore(k)}catch(Y){if(Y.name==="ConstraintError")console.warn('The database "'+w.name+'" has been upgraded from version '+q.oldVersion+" to version "+q.newVersion+', but the storage "'+w.storeName+'" already exists.');else throw Y}}),U.onerror=function(q){q.preventDefault(),R(U.error)},U.onsuccess=function(){var q=U.result;q.onversionchange=function(z){z.target.close()},S(q),W(w)}})}function ct(w){return be(w,!1)}function Et(w){return be(w,!0)}function xt(w,A){if(!w.db)return!0;var S=!w.db.objectStoreNames.contains(w.storeName),R=w.versionw.db.version;if(R&&(w.version!==A&&console.warn('The database "'+w.name+`" can't be downgraded from version `+w.db.version+" to version "+w.version+"."),w.version=w.db.version),N||S){if(S){var U=w.db.version+1;U>w.version&&(w.version=U)}return!0}return!1}function Ot(w){return new y(function(A,S){var R=new FileReader;R.onerror=S,R.onloadend=function(N){var U=btoa(N.target.result||"");A({__local_forage_encoded_blob:!0,data:U,type:w.type})},R.readAsBinaryString(w)})}function Ct(w){var A=P(atob(w.data));return b([A],{type:w.type})}function Nt(w){return w&&w.__local_forage_encoded_blob}function ve(w){var A=this,S=A._initReady().then(function(){var R=H[A._dbInfo.name];if(R&&R.dbReady)return R.dbReady});return M(S,w,w),S}function ce(w){x(w);for(var A=H[w.name],S=A.forages,R=0;R0&&(!w.db||U.name==="InvalidStateError"||U.name==="NotFoundError"))return y.resolve().then(function(){if(!w.db||U.name==="NotFoundError"&&!w.db.objectStoreNames.contains(w.storeName)&&w.version<=w.db.version)return w.db&&(w.version=w.db.version+1),Et(w)}).then(function(){return ce(w).then(function(){ie(w,A,S,R-1)})}).catch(S);S(U)}}function he(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function ge(w){var A=this,S={db:null};if(w)for(var R in w)S[R]=w[R];var N=H[S.name];N||(N=he(),H[S.name]=N),N.forages.push(A),A._initReady||(A._initReady=A.ready,A.ready=ve);var U=[];function q(){return y.resolve()}for(var z=0;z>4,ee[N++]=(q&15)<<4|z>>2,ee[N++]=(z&3)<<6|Y&63;return J}function Cs(w){var A=new Uint8Array(w),S="",R;for(R=0;R>2],S+=$r[(A[R]&3)<<4|A[R+1]>>4],S+=$r[(A[R+1]&15)<<2|A[R+2]>>6],S+=$r[A[R+2]&63];return A.length%3===2?S=S.substring(0,S.length-1)+"=":A.length%3===1&&(S=S.substring(0,S.length-2)+"=="),S}function $c(w,A){var S="";if(w&&(S=vo.call(w)),w&&(S==="[object ArrayBuffer]"||w.buffer&&vo.call(w.buffer)==="[object ArrayBuffer]")){var R,N=ya;w instanceof ArrayBuffer?(R=w,N+=bs):(R=w.buffer,S==="[object Int8Array]"?N+=_i:S==="[object Uint8Array]"?N+=$i:S==="[object Uint8ClampedArray]"?N+=Di:S==="[object Int16Array]"?N+=Gi:S==="[object Uint16Array]"?N+=vs:S==="[object Int32Array]"?N+=ys:S==="[object Uint32Array]"?N+=va:S==="[object Float32Array]"?N+=Ca:S==="[object Float64Array]"?N+=yo:A(new Error("Failed to get type for BinaryArray"))),A(N+Cs(R))}else if(S==="[object Blob]"){var U=new FileReader;U.onload=function(){var q=_c+w.type+"~"+Cs(this.result);A(ya+bo+q)},U.readAsArrayBuffer(w)}else try{A(JSON.stringify(w))}catch(q){console.error("Couldn't convert value into a JSON string: ",w),A(null,q)}}function Dc(w){if(w.substring(0,Xt)!==ya)return JSON.parse(w);var A=w.substring(wa),S=w.substring(Xt,wa),R;if(S===bo&&Ni.test(A)){var N=A.match(Ni);R=N[1],A=A.substring(N[0].length)}var U=xa(A);switch(S){case bs:return U;case bo:return b([U],{type:R});case _i:return new Int8Array(U);case $i:return new Uint8Array(U);case Di:return new Uint8ClampedArray(U);case Gi:return new Int16Array(U);case vs:return new Uint16Array(U);case ys:return new Int32Array(U);case va:return new Uint32Array(U);case Ca:return new Float32Array(U);case yo:return new Float64Array(U);default:throw new Error("Unkown type: "+S)}}var ws={serialize:$c,deserialize:Dc,stringToBuffer:xa,bufferToString:Cs};function Hi(w,A,S,R){w.executeSql("CREATE TABLE IF NOT EXISTS "+A.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],S,R)}function Gc(w){var A=this,S={db:null};if(w)for(var R in w)S[R]=typeof w[R]!="string"?w[R].toString():w[R];var N=new y(function(U,q){try{S.db=openDatabase(S.name,String(S.version),S.description,S.size)}catch(z){return q(z)}S.db.transaction(function(z){Hi(z,S,function(){A._dbInfo=S,U()},function(Y,J){q(J)})},q)});return S.serializer=ws,N}function Dr(w,A,S,R,N,U){w.executeSql(S,R,N,function(q,z){z.code===z.SYNTAX_ERR?q.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[A.storeName],function(Y,J){J.rows.length?U(Y,z):Hi(Y,A,function(){Y.executeSql(S,R,N,U)},U)},U):U(q,z)},U)}function Co(w,A){var S=this;w=D(w);var R=new y(function(N,U){S.ready().then(function(){var q=S._dbInfo;q.db.transaction(function(z){Dr(z,q,"SELECT * FROM "+q.storeName+" WHERE key = ? LIMIT 1",[w],function(Y,J){var ee=J.rows.length?J.rows.item(0).value:null;ee&&(ee=q.serializer.deserialize(ee)),N(ee)},function(Y,J){U(J)})})}).catch(U)});return C(R,A),R}function wo(w,A){var S=this,R=new y(function(N,U){S.ready().then(function(){var q=S._dbInfo;q.db.transaction(function(z){Dr(z,q,"SELECT * FROM "+q.storeName,[],function(Y,J){for(var ee=J.rows,de=ee.length,Re=0;Re0){q(Ma.apply(N,[w,Y,S,R-1]));return}z(Re)}})})}).catch(z)});return C(U,S),U}function re(w,A,S){return Ma.apply(this,[w,A,S,1])}function V(w,A){var S=this;w=D(w);var R=new y(function(N,U){S.ready().then(function(){var q=S._dbInfo;q.db.transaction(function(z){Dr(z,q,"DELETE FROM "+q.storeName+" WHERE key = ?",[w],function(){N()},function(Y,J){U(J)})})}).catch(U)});return C(R,A),R}function ne(w){var A=this,S=new y(function(R,N){A.ready().then(function(){var U=A._dbInfo;U.db.transaction(function(q){Dr(q,U,"DELETE FROM "+U.storeName,[],function(){R()},function(z,Y){N(Y)})})}).catch(N)});return C(S,w),S}function we(w){var A=this,S=new y(function(R,N){A.ready().then(function(){var U=A._dbInfo;U.db.transaction(function(q){Dr(q,U,"SELECT COUNT(key) as c FROM "+U.storeName,[],function(z,Y){var J=Y.rows.item(0).c;R(J)},function(z,Y){N(Y)})})}).catch(N)});return C(S,w),S}function Se(w,A){var S=this,R=new y(function(N,U){S.ready().then(function(){var q=S._dbInfo;q.db.transaction(function(z){Dr(z,q,"SELECT key FROM "+q.storeName+" WHERE id = ? LIMIT 1",[w+1],function(Y,J){var ee=J.rows.length?J.rows.item(0).key:null;N(ee)},function(Y,J){U(J)})})}).catch(U)});return C(R,A),R}function qe(w){var A=this,S=new y(function(R,N){A.ready().then(function(){var U=A._dbInfo;U.db.transaction(function(q){Dr(q,U,"SELECT key FROM "+U.storeName,[],function(z,Y){for(var J=[],ee=0;ee '__WebKitDatabaseInfoTable__'",[],function(N,U){for(var q=[],z=0;z0}function ot(w){var A=this,S={};if(w)for(var R in w)S[R]=w[R];return S.keyPrefix=Gr(w,A._defaultConfig),Ue()?(A._dbInfo=S,S.serializer=ws,y.resolve()):y.reject()}function pt(w){var A=this,S=A.ready().then(function(){for(var R=A._dbInfo.keyPrefix,N=localStorage.length-1;N>=0;N--){var U=localStorage.key(N);U.indexOf(R)===0&&localStorage.removeItem(U)}});return C(S,w),S}function Qt(w,A){var S=this;w=D(w);var R=S.ready().then(function(){var N=S._dbInfo,U=localStorage.getItem(N.keyPrefix+w);return U&&(U=N.serializer.deserialize(U)),U});return C(R,A),R}function Vn(w,A){var S=this,R=S.ready().then(function(){for(var N=S._dbInfo,U=N.keyPrefix,q=U.length,z=localStorage.length,Y=1,J=0;J=0;q--){var z=localStorage.key(q);z.indexOf(U)===0&&localStorage.removeItem(z)}}):N=y.reject("Invalid arguments"),C(N,A),N}var _0={_driver:"localStorageWrapper",_initStorage:ot,_support:rn(),iterate:Vn,getItem:Qt,setItem:I0,removeItem:R0,clear:pt,length:Hc,key:St,keys:xo,dropInstance:N0},$0=function(A,S){return A===S||typeof A=="number"&&typeof S=="number"&&isNaN(A)&&isNaN(S)},D0=function(A,S){for(var R=A.length,N=0;N"u"?"undefined":c(S))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var R in S){if(R==="storeName"&&(S[R]=S[R].replace(/\W/g,"_")),R==="version"&&typeof S[R]!="number")return new Error("Database version must be a number.");this._config[R]=S[R]}return"driver"in S&&S.driver?this.setDriver(this._config.driver):!0}else return typeof S=="string"?this._config[S]:this._config},w.prototype.defineDriver=function(S,R,N){var U=new y(function(q,z){try{var Y=S._driver,J=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!S._driver){z(J);return}for(var ee=Fc.concat("_initStorage"),de=0,Re=ee.length;de{var D1=200,kf="__lodash_hash_undefined__",Lf=9007199254740991,fu="[object Arguments]",G1="[object Array]",Af="[object Boolean]",Pf="[object Date]",H1="[object Error]",gu="[object Function]",Ef="[object GeneratorFunction]",il="[object Map]",Of="[object Number]",mu="[object Object]",mf="[object Promise]",Uf="[object RegExp]",ll="[object Set]",Bf="[object String]",Rf="[object Symbol]",iu="[object WeakMap]",If="[object ArrayBuffer]",cl="[object DataView]",Nf="[object Float32Array]",_f="[object Float64Array]",$f="[object Int8Array]",Df="[object Int16Array]",Gf="[object Int32Array]",Hf="[object Uint8Array]",Ff="[object Uint8ClampedArray]",Qf="[object Uint16Array]",qf="[object Uint32Array]",F1=/[\\^$.*+?()[\]{}|]/g,Q1=/\w*$/,q1=/^\[object .+?Constructor\]$/,j1=/^(?:0|[1-9]\d*)$/,et={};et[fu]=et[G1]=et[If]=et[cl]=et[Af]=et[Pf]=et[Nf]=et[_f]=et[$f]=et[Df]=et[Gf]=et[il]=et[Of]=et[mu]=et[Uf]=et[ll]=et[Bf]=et[Rf]=et[Hf]=et[Ff]=et[Qf]=et[qf]=!0;et[H1]=et[gu]=et[iu]=!1;var V1=typeof global=="object"&&global&&global.Object===Object&&global,W1=typeof self=="object"&&self&&self.Object===Object&&self,Tn=V1||W1||Function("return this")(),jf=typeof Eo=="object"&&Eo&&!Eo.nodeType&&Eo,hf=jf&&typeof Ls=="object"&&Ls&&!Ls.nodeType&&Ls,z1=hf&&hf.exports===jf;function K1(t,r){return t.set(r[0],r[1]),t}function X1(t,r){return t.add(r),t}function Z1(t,r){for(var n=-1,a=t?t.length:0;++n-1}function Sb(t,r){var n=this.__data__,a=pl(n,t);return a<0?n.push([t,r]):n[a][1]=r,this}kn.prototype.clear=Cb;kn.prototype.delete=wb;kn.prototype.get=xb;kn.prototype.has=Mb;kn.prototype.set=Sb;function As(t){var r=-1,n=t?t.length:0;for(this.clear();++r-1&&t%1==0&&t-1&&t%1==0&&t<=Lf}function gl(t){var r=typeof t;return!!t&&(r=="object"||r=="function")}function cy(t){return!!t&&typeof t=="object"}function vu(t){return eg(t)?Ib(t):Hb(t)}function uy(){return[]}function dy(){return!1}Ls.exports=ay});var Jg=Sa((Dl,Yg)=>{(function(t,r){typeof Dl=="object"&&typeof Yg<"u"?r(Dl):typeof define=="function"&&define.amd?define(["exports"],r):(t=typeof globalThis<"u"?globalThis:t||self,r(t.fastUniqueNumbers={}))})(Dl,function(t){"use strict";var r=function(y){return function(C){var M=y(C);return C.add(M),M}},n=function(y){return function(C,M){return y.set(C,M),M}},a=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,s=536870912,l=s*2,c=function(y,C){return function(M){var D=C.get(M),$=D===void 0?M.size:Da)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;M.has($);)$=Math.floor(Math.random()*a);return y(M,$)}},p=new WeakMap,f=n(p),g=c(f,p),h=r(g);t.addUniqueNumber=h,t.generateUniqueNumber=g})});(function(){"use strict";var t=function(re,V){var ne=function(qe){for(var Le=0,Ge=qe.length;Lere.length)&&(V=re.length);for(var ne=0,we=new Array(V);ne=re.length?{done:!0}:{done:!1,value:re[we++]}},e:function(dt){throw dt},f:Se}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var qe=!0,Le=!1,Ge;return{s:function(){ne=ne.call(re)},n:function(){var dt=ne.next();return qe=dt.done,dt},e:function(dt){Le=!0,Ge=dt},f:function(){try{!qe&&ne.return!=null&&ne.return()}finally{if(Le)throw Ge}}}}var s=!0,l=!1,c="querySelectorAll",p=function(V){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document,we=arguments.length>2&&arguments[2]!==void 0?arguments[2]:MutationObserver,Se=arguments.length>3&&arguments[3]!==void 0?arguments[3]:["*"],qe=function dt(rn,Gr,_t,Ue,ot,pt){var Qt=a(rn),Vn;try{for(Qt.s();!(Vn=Qt.n()).done;){var St=Vn.value;(pt||c in St)&&(ot?_t.has(St)||(_t.add(St),Ue.delete(St),V(St,ot)):Ue.has(St)||(Ue.add(St),_t.delete(St),V(St,ot)),pt||dt(St[c](Gr),Gr,_t,Ue,ot,s))}}catch(xo){Qt.e(xo)}finally{Qt.f()}},Le=new we(function(dt){if(Se.length){var rn=Se.join(","),Gr=new Set,_t=new Set,Ue=a(dt),ot;try{for(Ue.s();!(ot=Ue.n()).done;){var pt=ot.value,Qt=pt.addedNodes,Vn=pt.removedNodes;qe(Vn,rn,Gr,_t,l,l),qe(Qt,rn,Gr,_t,s,l)}}catch(St){Ue.e(St)}finally{Ue.f()}}}),Ge=Le.observe;return(Le.observe=function(dt){return Ge.call(Le,dt,{subtree:s,childList:s})})(ne),Le},f="querySelectorAll",g=self,h=g.document,b=g.Element,y=g.MutationObserver,C=g.Set,M=g.WeakMap,D=function(V){return f in V},$=[].filter,k=function(re){var V=new M,ne=function(Ue){for(var ot=0,pt=Ue.length;ot1&&arguments[1]!==void 0?arguments[1]:!0,pt=0,Qt=Ue.length;pt=1&&this.m<10)return this;if(this.m===0)return this.m=0,this.e=0,this;var r=Math.floor(Math.log10(Math.abs(this.m)));return this.m=r===-324?10*this.m/1e-323:this.m/ji(r),this.e+=r,this},t.prototype.fromMantissaExponent=function(r,n){return isFinite(r)&&isFinite(n)?(this.m=r,this.e=n,this.normalize(),this):(r=Number.NaN,n=Number.NaN,this)},t.prototype.fromMantissaExponent_noNormalize=function(r,n){return this.m=r,this.e=n,this},t.prototype.fromDecimal=function(r){return this.m=r.m,this.e=r.e,this},t.prototype.fromNumber=function(r){return isNaN(r)?(this.m=Number.NaN,this.e=Number.NaN):r===Number.POSITIVE_INFINITY?(this.m=1,this.e=nn):r===Number.NEGATIVE_INFINITY?(this.m=-1,this.e=nn):r===0?(this.m=0,this.e=0):(this.e=Math.floor(Math.log10(Math.abs(r))),this.m=this.e===-324?10*r/1e-323:r/ji(this.e),this.normalize()),this},t.prototype.fromString=function(r){if(r.indexOf("e")!==-1){var n=r.split("e");this.m=parseFloat(n[0]),this.e=parseFloat(n[1]),this.normalize()}else if(r==="NaN")this.m=Number.NaN,this.e=Number.NaN;else if(this.fromNumber(parseFloat(r)),isNaN(this.m))throw Error("[DecimalError] Invalid argument: "+r);return this},t.prototype.fromValue=function(r){return r instanceof t?this.fromDecimal(r):typeof r=="number"?this.fromNumber(r):typeof r=="string"?this.fromString(r):(this.m=0,this.e=0,this)},t.prototype.toNumber=function(){if(!isFinite(this.e))return Number.NaN;if(this.e>308)return this.m>0?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(this.e<-324)return 0;if(this.e===-324)return this.m>0?5e-324:-5e-324;var r=this.m*ji(this.e);if(!isFinite(r)||this.e<0)return r;var n=Math.round(r);return Math.abs(n-r)<1e-10?n:r},t.prototype.mantissaWithDecimalPlaces=function(r){if(isNaN(this.m)||isNaN(this.e))return Number.NaN;if(this.m===0)return 0;var n=r+1,a=Math.ceil(Math.log10(Math.abs(this.m))),s=Math.round(this.m*Math.pow(10,n-a))*Math.pow(10,a-n);return parseFloat(s.toFixed(Math.max(n-a,0)))},t.prototype.toString=function(){return isNaN(this.m)||isNaN(this.e)?"NaN":this.e>=nn?this.m>0?"Infinity":"-Infinity":this.e<=-nn||this.m===0?"0":this.e<21&&this.e>-7?this.toNumber().toString():this.m+"e"+(this.e>=0?"+":"")+this.e},t.prototype.toExponential=function(r){if(isNaN(this.m)||isNaN(this.e))return"NaN";if(this.e>=nn)return this.m>0?"Infinity":"-Infinity";if(this.e<=-nn||this.m===0)return"0"+(r>0?(0,Vi.default)(".",r+1,"0"):"")+"e+0";if(this.e>-324&&this.e<308)return this.toNumber().toExponential(r);isFinite(r)||(r=17);var n=r+1,a=Math.max(1,Math.ceil(Math.log10(Math.abs(this.m))));return(Math.round(this.m*Math.pow(10,n-a))*Math.pow(10,a-n)).toFixed(Math.max(n-a,0))+"e"+(this.e>=0?"+":"")+this.e},t.prototype.toFixed=function(r){return isNaN(this.m)||isNaN(this.e)?"NaN":this.e>=nn?this.m>0?"Infinity":"-Infinity":this.e<=-nn||this.m===0?"0"+(r>0?(0,Vi.default)(".",r+1,"0"):""):this.e>=17?this.m.toString().replace(".","").padEnd(this.e+1,"0")+(r>0?(0,Vi.default)(".",r+1,"0"):""):this.toNumber().toFixed(r)},t.prototype.toPrecision=function(r){return this.e<=-7?this.toExponential(r-1):r>this.e?this.toFixed(r-this.e-1):this.toExponential(r-1)},t.prototype.valueOf=function(){return this.toString()},t.prototype.toJSON=function(){return this.toString()},t.prototype.toStringWithDecimalPlaces=function(r){return this.toExponential(r)},t.prototype.abs=function(){return Ta(Math.abs(this.m),this.e)},t.prototype.neg=function(){return Ta(-this.m,this.e)},t.prototype.negate=function(){return this.neg()},t.prototype.negated=function(){return this.neg()},t.prototype.sign=function(){return Math.sign(this.m)},t.prototype.sgn=function(){return this.sign()},t.prototype.round=function(){return this.e<-1?new t(0):this.e<17?new t(Math.round(this.toNumber())):this},t.prototype.floor=function(){return this.e<-1?Math.sign(this.m)>=0?new t(0):new t(-1):this.e<17?new t(Math.floor(this.toNumber())):this},t.prototype.ceil=function(){return this.e<-1?Math.sign(this.m)>0?new t(1):new t(0):this.e<17?new t(Math.ceil(this.toNumber())):this},t.prototype.trunc=function(){return this.e<0?new t(0):this.e<17?new t(Math.trunc(this.toNumber())):this},t.prototype.add=function(r){var n,a,s=X(r);if(this.m===0)return s;if(s.m===0)return this;if(this.e>=s.e?(n=this,a=s):(n=s,a=this),n.e-a.e>17)return n;var l=Math.round(1e14*n.m+1e14*a.m*ji(a.e-n.e));return Yt(l,n.e-14)},t.prototype.plus=function(r){return this.add(r)},t.prototype.sub=function(r){return this.add(X(r).neg())},t.prototype.subtract=function(r){return this.sub(r)},t.prototype.minus=function(r){return this.sub(r)},t.prototype.mul=function(r){if(typeof r=="number")return r<1e307&&r>-1e307?Yt(this.m*r,this.e):Yt(1e-307*this.m*r,this.e+307);var n=typeof r=="string"?new t(r):r;return Yt(this.m*n.m,this.e+n.e)},t.prototype.multiply=function(r){return this.mul(r)},t.prototype.times=function(r){return this.mul(r)},t.prototype.div=function(r){return this.mul(X(r).recip())},t.prototype.divide=function(r){return this.div(r)},t.prototype.divideBy=function(r){return this.div(r)},t.prototype.dividedBy=function(r){return this.div(r)},t.prototype.recip=function(){return Yt(1/this.m,-this.e)},t.prototype.reciprocal=function(){return this.recip()},t.prototype.reciprocate=function(){return this.recip()},t.prototype.cmp=function(r){var n=X(r);if(this.m===0){if(n.m===0)return 0;if(n.m<0)return 1;if(n.m>0)return-1}if(n.m===0){if(this.m<0)return-1;if(this.m>0)return 1}if(this.m>0)return n.m<0||this.e>n.e?1:this.en.m?1:this.m0||this.e>n.e?-1:this.en.m?1:this.m0:n.m===0?this.m<=0:this.e===n.e?this.m0?n.m>0&&this.e0||this.e>n.e},t.prototype.lte=function(r){return!this.gt(r)},t.prototype.gt=function(r){var n=X(r);return this.m===0?n.m<0:n.m===0?this.m>0:this.e===n.e?this.m>n.m:this.m>0?n.m<0||this.e>n.e:n.m<0&&this.e-1},t.prototype.greaterThan=function(r){return this.cmp(r)>0},t.prototype.decimalPlaces=function(){return this.dp()},t.prototype.dp=function(){if(!isFinite(this.mantissa))return NaN;if(this.exponent>=17)return 0;for(var r=this.mantissa,n=-this.exponent,a=1;Math.abs(Math.round(r*a)/a-r)>1e-10;)a*=10,n++;return n>0?n:0},Object.defineProperty(t,"MAX_VALUE",{get:function(){return n1},enumerable:!1,configurable:!0}),Object.defineProperty(t,"MIN_VALUE",{get:function(){return a1},enumerable:!1,configurable:!0}),Object.defineProperty(t,"NUMBER_MAX_VALUE",{get:function(){return s1},enumerable:!1,configurable:!0}),Object.defineProperty(t,"NUMBER_MIN_VALUE",{get:function(){return o1},enumerable:!1,configurable:!0}),t}(),n1=Ta(1,nn),a1=Ta(1,-nn),s1=X(Number.MAX_VALUE),o1=X(Number.MIN_VALUE),m=Wn;var B0=Hr(Xc());function $t(t){"@babel/helpers - typeof";return $t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},$t(t)}function Fr(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function Rp(t,r){if($t(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r||"default");if($t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function zi(t){var r=Rp(t,"string");return $t(r)=="symbol"?r:r+""}function Ip(t,r){for(var n=0;nt.length)&&(r=t.length);for(var n=0,a=Array(r);n1&&arguments[1]!==void 0?arguments[1]:{};Fr(this,t),this.init(r,n)}return Qr(t,[{key:"init",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=a.prefix||"i18next:",this.logger=n||i1,this.options=a,this.debug=a.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,a=new Array(n),s=0;s1?a-1:0),l=1;l-1?p.replace(/###/g,"."):p}function s(){return!t||typeof t=="string"}for(var l=typeof r!="string"?[].concat(r):r.split(".");l.length>1;){if(s())return{};var c=a(l.shift());!t[c]&&n&&(t[c]=new n),Object.prototype.hasOwnProperty.call(t,c)?t=t[c]:t={}}return s()?{}:{obj:t,k:a(l.shift())}}function qp(t,r,n){var a=Jc(t,r,Object),s=a.obj,l=a.k;s[l]=n}function u1(t,r,n,a){var s=Jc(t,r,Object),l=s.obj,c=s.k;l[c]=l[c]||[],a&&(l[c]=l[c].concat(n)),a||l[c].push(n)}function Yi(t,r){var n=Jc(t,r),a=n.obj,s=n.k;if(a)return a[s]}function d1(t,r,n){var a=Yi(t,n);return a!==void 0?a:Yi(r,n)}function sf(t,r,n){for(var a in r)a!=="__proto__"&&a!=="constructor"&&(a in t?typeof t[a]=="string"||t[a]instanceof String||typeof r[a]=="string"||r[a]instanceof String?n&&(t[a]=r[a]):sf(t[a],r[a],n):t[a]=r[a]);return t}function Ss(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var p1={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function f1(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(r){return p1[r]}):t}var tl=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,g1=[" ",",","?","!",";"];function m1(t,r,n){r=r||"",n=n||"";var a=g1.filter(function(p){return r.indexOf(p)<0&&n.indexOf(p)<0});if(a.length===0)return!0;var s=new RegExp("(".concat(a.map(function(p){return p==="?"?"\\?":p}).join("|"),")")),l=!s.test(t);if(!l){var c=t.indexOf(n);c>0&&!s.test(t.substring(0,c))&&(l=!0)}return l}function Ji(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(t){if(t[r])return t[r];for(var a=r.split(n),s=t,l=0;ll+c;)c++,p=a.slice(l,l+c).join(n),f=s[p];if(f===void 0)return;if(f===null)return null;if(r.endsWith(p)){if(typeof f=="string")return f;if(p&&typeof f[p]=="string")return f[p]}var g=a.slice(l+c).join(n);return g?Ji(f,g,n):void 0}s=s[a[l]]}return s}}function jp(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function Xi(t){for(var r=1;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var y1=function(t){ko(n,t);var r=h1(n);function n(a){var s,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Fr(this,n),s=r.call(this),tl&&zn.call(an(s)),s.data=a||{},s.options=l,s.options.keySeparator===void 0&&(s.options.keySeparator="."),s.options.ignoreJSONStructure===void 0&&(s.options.ignoreJSONStructure=!0),s}return Qr(n,[{key:"addNamespaces",value:function(s){this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}},{key:"removeNamespaces",value:function(s){var l=this.options.ns.indexOf(s);l>-1&&this.options.ns.splice(l,1)}},{key:"getResource",value:function(s,l,c){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},f=p.keySeparator!==void 0?p.keySeparator:this.options.keySeparator,g=p.ignoreJSONStructure!==void 0?p.ignoreJSONStructure:this.options.ignoreJSONStructure,h=[s,l];c&&typeof c!="string"&&(h=h.concat(c)),c&&typeof c=="string"&&(h=h.concat(f?c.split(f):c)),s.indexOf(".")>-1&&(h=s.split("."));var b=Yi(this.data,h);return b||!g||typeof c!="string"?b:Ji(this.data&&this.data[s]&&this.data[s][l],c,f)}},{key:"addResource",value:function(s,l,c,p){var f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},g=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator,h=[s,l];c&&(h=h.concat(g?c.split(g):c)),s.indexOf(".")>-1&&(h=s.split("."),p=l,l=h[1]),this.addNamespaces(l),qp(this.data,h,p),f.silent||this.emit("added",s,l,c,p)}},{key:"addResources",value:function(s,l,c){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var f in c)(typeof c[f]=="string"||Object.prototype.toString.apply(c[f])==="[object Array]")&&this.addResource(s,l,f,c[f],{silent:!0});p.silent||this.emit("added",s,l,c)}},{key:"addResourceBundle",value:function(s,l,c,p,f){var g=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},h=[s,l];s.indexOf(".")>-1&&(h=s.split("."),p=c,c=l,l=h[1]),this.addNamespaces(l);var b=Yi(this.data,h)||{};p?sf(b,c,f):b=Xi(Xi({},b),c),qp(this.data,h,b),g.silent||this.emit("added",s,l,c)}},{key:"removeResourceBundle",value:function(s,l){this.hasResourceBundle(s,l)&&delete this.data[s][l],this.removeNamespaces(l),this.emit("removed",s,l)}},{key:"hasResourceBundle",value:function(s,l){return this.getResource(s,l)!==void 0}},{key:"getResourceBundle",value:function(s,l){return l||(l=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Xi(Xi({},{}),this.getResource(s,l)):this.getResource(s,l)}},{key:"getDataByLanguage",value:function(s){return this.data[s]}},{key:"hasLanguageSomeTranslations",value:function(s){var l=this.getDataByLanguage(s),c=l&&Object.keys(l)||[];return!!c.find(function(p){return l[p]&&Object.keys(l[p]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(zn),of={processors:{},addPostProcessor:function(r){this.processors[r.name]=r},handle:function(r,n,a,s,l){var c=this;return r.forEach(function(p){c.processors[p]&&(n=c.processors[p].process(n,a,s,l))}),n}};function Vp(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function Dt(t){for(var r=1;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var Wp={},zp=function(t){ko(n,t);var r=v1(n);function n(a){var s,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Fr(this,n),s=r.call(this),tl&&zn.call(an(s)),c1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],a,an(s)),s.options=l,s.options.keySeparator===void 0&&(s.options.keySeparator="."),s.logger=on.create("translator"),s}return Qr(n,[{key:"changeLanguage",value:function(s){s&&(this.language=s)}},{key:"exists",value:function(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(s==null)return!1;var c=this.resolve(s,l);return c&&c.res!==void 0}},{key:"extractFromKey",value:function(s,l){var c=l.nsSeparator!==void 0?l.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");var p=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,f=l.ns||this.options.defaultNS||[],g=c&&s.indexOf(c)>-1,h=!this.options.userDefinedKeySeparator&&!l.keySeparator&&!this.options.userDefinedNsSeparator&&!l.nsSeparator&&!m1(s,c,p);if(g&&!h){var b=s.match(this.interpolator.nestingRegexp);if(b&&b.length>0)return{key:s,namespaces:f};var y=s.split(c);(c!==p||c===p&&this.options.ns.indexOf(y[0])>-1)&&(f=y.shift()),s=y.join(p)}return typeof f=="string"&&(f=[f]),{key:s,namespaces:f}}},{key:"translate",value:function(s,l,c){var p=this;if($t(l)!=="object"&&this.options.overloadTranslationOptionHandler&&(l=this.options.overloadTranslationOptionHandler(arguments)),$t(l)==="object"&&(l=Dt({},l)),l||(l={}),s==null)return"";Array.isArray(s)||(s=[String(s)]);var f=l.returnDetails!==void 0?l.returnDetails:this.options.returnDetails,g=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,h=this.extractFromKey(s[s.length-1],l),b=h.key,y=h.namespaces,C=y[y.length-1],M=l.lng||this.language,D=l.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(M&&M.toLowerCase()==="cimode"){if(D){var $=l.nsSeparator||this.options.nsSeparator;return f?{res:"".concat(C).concat($).concat(b),usedKey:b,exactUsedKey:b,usedLng:M,usedNS:C}:"".concat(C).concat($).concat(b)}return f?{res:b,usedKey:b,exactUsedKey:b,usedLng:M,usedNS:C}:b}var k=this.resolve(s,l),E=k&&k.res,H=k&&k.usedKey||b,I=k&&k.exactUsedKey||b,_=Object.prototype.toString.apply(E),L=["[object Number]","[object Function]","[object RegExp]"],P=l.joinArrays!==void 0?l.joinArrays:this.options.joinArrays,F=!this.i18nFormat||this.i18nFormat.handleAsObject,j=typeof E!="string"&&typeof E!="boolean"&&typeof E!="number";if(F&&E&&j&&L.indexOf(_)<0&&!(typeof P=="string"&&_==="[object Array]")){if(!l.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(H,E,Dt(Dt({},l),{},{ns:y})):"key '".concat(b," (").concat(this.language,")' returned an object instead of string.");return f?(k.res=x,k):x}if(g){var W=_==="[object Array]",ue=W?[]:{},be=W?I:H;for(var ct in E)if(Object.prototype.hasOwnProperty.call(E,ct)){var Et="".concat(be).concat(g).concat(ct);ue[ct]=this.translate(Et,Dt(Dt({},l),{joinArrays:!1,ns:y})),ue[ct]===Et&&(ue[ct]=E[ct])}E=ue}}else if(F&&typeof P=="string"&&_==="[object Array]")E=E.join(P),E&&(E=this.extendTranslation(E,s,l,c));else{var xt=!1,Ot=!1,Ct=l.count!==void 0&&typeof l.count!="string",Nt=n.hasDefaultValue(l),ve=Ct?this.pluralResolver.getSuffix(M,l.count,l):"",ce=l["defaultValue".concat(ve)]||l.defaultValue;!this.isValidLookup(E)&&Nt&&(xt=!0,E=ce),this.isValidLookup(E)||(Ot=!0,E=b);var ie=l.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,he=ie&&Ot?void 0:E,ge=Nt&&ce!==E&&this.options.updateMissing;if(Ot||xt||ge){if(this.logger.log(ge?"updateKey":"missingKey",M,C,b,ge?ce:E),g){var ke=this.resolve(b,Dt(Dt({},l),{},{keySeparator:!1}));ke&&ke.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var Ye=[],O=this.languageUtils.getFallbackCodes(this.options.fallbackLng,l.lng||this.language);if(this.options.saveMissingTo==="fallback"&&O&&O[0])for(var Mt=0;Mt1&&arguments[1]!==void 0?arguments[1]:{},p,f,g,h,b;return typeof s=="string"&&(s=[s]),s.forEach(function(y){if(!l.isValidLookup(p)){var C=l.extractFromKey(y,c),M=C.key;f=M;var D=C.namespaces;l.options.fallbackNS&&(D=D.concat(l.options.fallbackNS));var $=c.count!==void 0&&typeof c.count!="string",k=$&&!c.ordinal&&c.count===0&&l.pluralResolver.shouldUseIntlApi(),E=c.context!==void 0&&(typeof c.context=="string"||typeof c.context=="number")&&c.context!=="",H=c.lngs?c.lngs:l.languageUtils.toResolveHierarchy(c.lng||l.language,c.fallbackLng);D.forEach(function(I){l.isValidLookup(p)||(b=I,!Wp["".concat(H[0],"-").concat(I)]&&l.utils&&l.utils.hasLoadedNamespace&&!l.utils.hasLoadedNamespace(b)&&(Wp["".concat(H[0],"-").concat(I)]=!0,l.logger.warn('key "'.concat(f,'" for languages "').concat(H.join(", "),`" won't get resolved as namespace "`).concat(b,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),H.forEach(function(_){if(!l.isValidLookup(p)){h=_;var L=[M];if(l.i18nFormat&&l.i18nFormat.addLookupKeys)l.i18nFormat.addLookupKeys(L,M,_,I,c);else{var P;$&&(P=l.pluralResolver.getSuffix(_,c.count,c));var F="".concat(l.options.pluralSeparator,"zero");if($&&(L.push(M+P),k&&L.push(M+F)),E){var j="".concat(M).concat(l.options.contextSeparator).concat(c.context);L.push(j),$&&(L.push(j+P),k&&L.push(j+F))}}for(var x;x=L.pop();)l.isValidLookup(p)||(g=x,p=l.getResource(_,I,x,c))}}))})}}),{res:p,usedKey:f,exactUsedKey:g,usedLng:h,usedNS:b}}},{key:"isValidLookup",value:function(s){return s!==void 0&&!(!this.options.returnNull&&s===null)&&!(!this.options.returnEmptyString&&s==="")}},{key:"getResource",value:function(s,l,c){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(s,l,c,p):this.resourceStore.getResource(s,l,c,p)}}],[{key:"hasDefaultValue",value:function(s){var l="defaultValue";for(var c in s)if(Object.prototype.hasOwnProperty.call(s,c)&&l===c.substring(0,l.length)&&s[c]!==void 0)return!0;return!1}}]),n}(zn);function Yc(t){return t.charAt(0).toUpperCase()+t.slice(1)}var Kp=function(){function t(r){Fr(this,t),this.options=r,this.supportedLngs=this.options.supportedLngs||!1,this.logger=on.create("languageUtils")}return Qr(t,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var a=n.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var a=n.split("-");return this.formatLanguageCode(a[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var a=["hans","hant","latn","cyrl","cans","mong","arab"],s=n.split("-");return this.options.lowerCaseLng?s=s.map(function(l){return l.toLowerCase()}):s.length===2?(s[0]=s[0].toLowerCase(),s[1]=s[1].toUpperCase(),a.indexOf(s[1].toLowerCase())>-1&&(s[1]=Yc(s[1].toLowerCase()))):s.length===3&&(s[0]=s[0].toLowerCase(),s[1].length===2&&(s[1]=s[1].toUpperCase()),s[0]!=="sgn"&&s[2].length===2&&(s[2]=s[2].toUpperCase()),a.indexOf(s[1].toLowerCase())>-1&&(s[1]=Yc(s[1].toLowerCase())),a.indexOf(s[2].toLowerCase())>-1&&(s[2]=Yc(s[2].toLowerCase()))),s.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var a=this;if(!n)return null;var s;return n.forEach(function(l){if(!s){var c=a.formatLanguageCode(l);(!a.options.supportedLngs||a.isSupportedCode(c))&&(s=c)}}),!s&&this.options.supportedLngs&&n.forEach(function(l){if(!s){var c=a.getLanguagePartFromCode(l);if(a.isSupportedCode(c))return s=c;s=a.options.supportedLngs.find(function(p){if(p===c)return p;if(!(p.indexOf("-")<0&&c.indexOf("-")<0)&&p.indexOf(c)===0)return p})}}),s||(s=this.getFallbackCodes(this.options.fallbackLng)[0]),s}},{key:"getFallbackCodes",value:function(n,a){if(!n)return[];if(typeof n=="function"&&(n=n(a)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!a)return n.default||[];var s=n[a];return s||(s=n[this.getScriptPartFromCode(a)]),s||(s=n[this.formatLanguageCode(a)]),s||(s=n[this.getLanguagePartFromCode(a)]),s||(s=n.default),s||[]}},{key:"toResolveHierarchy",value:function(n,a){var s=this,l=this.getFallbackCodes(a||this.options.fallbackLng||[],n),c=[],p=function(g){g&&(s.isSupportedCode(g)?c.push(g):s.logger.warn("rejecting language code not found in supportedLngs: ".concat(g)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&p(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&p(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&p(this.getLanguagePartFromCode(n))):typeof n=="string"&&p(this.formatLanguageCode(n)),l.forEach(function(f){c.indexOf(f)<0&&p(s.formatLanguageCode(f))}),c}}]),t}(),w1=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],x1={1:function(r){return+(r>1)},2:function(r){return+(r!=1)},3:function(r){return 0},4:function(r){return r%10==1&&r%100!=11?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2},5:function(r){return r==0?0:r==1?1:r==2?2:r%100>=3&&r%100<=10?3:r%100>=11?4:5},6:function(r){return r==1?0:r>=2&&r<=4?1:2},7:function(r){return r==1?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2},8:function(r){return r==1?0:r==2?1:r!=8&&r!=11?2:3},9:function(r){return+(r>=2)},10:function(r){return r==1?0:r==2?1:r<7?2:r<11?3:4},11:function(r){return r==1||r==11?0:r==2||r==12?1:r>2&&r<20?2:3},12:function(r){return+(r%10!=1||r%100==11)},13:function(r){return+(r!==0)},14:function(r){return r==1?0:r==2?1:r==3?2:3},15:function(r){return r%10==1&&r%100!=11?0:r%10>=2&&(r%100<10||r%100>=20)?1:2},16:function(r){return r%10==1&&r%100!=11?0:r!==0?1:2},17:function(r){return r==1||r%10==1&&r%100!=11?0:1},18:function(r){return r==0?0:r==1?1:2},19:function(r){return r==1?0:r==0||r%100>1&&r%100<11?1:r%100>10&&r%100<20?2:3},20:function(r){return r==1?0:r==0||r%100>0&&r%100<20?1:2},21:function(r){return r%100==1?1:r%100==2?2:r%100==3||r%100==4?3:0},22:function(r){return r==1?0:r==2?1:(r<0||r>10)&&r%10==0?2:3}},M1=["v1","v2","v3"],Xp={zero:0,one:1,two:2,few:3,many:4,other:5};function S1(){var t={};return w1.forEach(function(r){r.lngs.forEach(function(n){t[n]={numbers:r.nr,plurals:x1[r.fc]}})}),t}var T1=function(){function t(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Fr(this,t),this.languageUtils=r,this.options=n,this.logger=on.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=S1()}return Qr(t,[{key:"addRule",value:function(n,a){this.rules[n]=a}},{key:"getRule",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:a.ordinal?"ordinal":"cardinal"})}catch(s){return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.getRule(n,a);return this.shouldUseIntlApi()?s&&s.resolvedOptions().pluralCategories.length>1:s&&s.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,s).map(function(l){return"".concat(a).concat(l)})}},{key:"getSuffixes",value:function(n){var a=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=this.getRule(n,s);return l?this.shouldUseIntlApi()?l.resolvedOptions().pluralCategories.sort(function(c,p){return Xp[c]-Xp[p]}).map(function(c){return"".concat(a.options.prepend).concat(c)}):l.numbers.map(function(c){return a.getSuffix(n,c,s)}):[]}},{key:"getSuffix",value:function(n,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=this.getRule(n,s);return l?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(l.select(a)):this.getSuffixRetroCompatible(l,a):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,a){var s=this,l=n.noAbs?n.plurals(a):n.plurals(Math.abs(a)),c=n.numbers[l];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(c===2?c="plural":c===1&&(c=""));var p=function(){return s.options.prepend&&c.toString()?s.options.prepend+c.toString():c.toString()};return this.options.compatibilityJSON==="v1"?c===1?"":typeof c=="number"?"_plural_".concat(c.toString()):p():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?p():this.options.prepend&&l.toString()?this.options.prepend+l.toString():l.toString()}},{key:"shouldUseIntlApi",value:function(){return!M1.includes(this.options.compatibilityJSON)}}]),t}();function Zp(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function jr(t){for(var r=1;r3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,l=d1(t,r,n);return!l&&s&&typeof n=="string"&&(l=Ji(t,n,a),l===void 0&&(l=Ji(r,n,a))),l}var k1=function(){function t(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Fr(this,t),this.logger=on.create("interpolator"),this.options=r,this.format=r.interpolation&&r.interpolation.format||function(n){return n},this.init(r)}return Qr(t,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var a=n.interpolation;this.escape=a.escape!==void 0?a.escape:f1,this.escapeValue=a.escapeValue!==void 0?a.escapeValue:!0,this.useRawValueToEscape=a.useRawValueToEscape!==void 0?a.useRawValueToEscape:!1,this.prefix=a.prefix?Ss(a.prefix):a.prefixEscaped||"{{",this.suffix=a.suffix?Ss(a.suffix):a.suffixEscaped||"}}",this.formatSeparator=a.formatSeparator?a.formatSeparator:a.formatSeparator||",",this.unescapePrefix=a.unescapeSuffix?"":a.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":a.unescapeSuffix||"",this.nestingPrefix=a.nestingPrefix?Ss(a.nestingPrefix):a.nestingPrefixEscaped||Ss("$t("),this.nestingSuffix=a.nestingSuffix?Ss(a.nestingSuffix):a.nestingSuffixEscaped||Ss(")"),this.nestingOptionsSeparator=a.nestingOptionsSeparator?a.nestingOptionsSeparator:a.nestingOptionsSeparator||",",this.maxReplaces=a.maxReplaces?a.maxReplaces:1e3,this.alwaysFormat=a.alwaysFormat!==void 0?a.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var a="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(a,"g");var s="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(s,"g")}},{key:"interpolate",value:function(n,a,s,l){var c=this,p,f,g,h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function b($){return $.replace(/\$/g,"$$$$")}var y=function(k){if(k.indexOf(c.formatSeparator)<0){var E=Yp(a,h,k,c.options.keySeparator,c.options.ignoreJSONStructure);return c.alwaysFormat?c.format(E,void 0,s,jr(jr(jr({},l),a),{},{interpolationkey:k})):E}var H=k.split(c.formatSeparator),I=H.shift().trim(),_=H.join(c.formatSeparator).trim();return c.format(Yp(a,h,I,c.options.keySeparator,c.options.ignoreJSONStructure),_,s,jr(jr(jr({},l),a),{},{interpolationkey:I}))};this.resetRegExp();var C=l&&l.missingInterpolationHandler||this.options.missingInterpolationHandler,M=l&&l.interpolation&&l.interpolation.skipOnVariables!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,D=[{regex:this.regexpUnescape,safeValue:function(k){return b(k)}},{regex:this.regexp,safeValue:function(k){return c.escapeValue?b(c.escape(k)):b(k)}}];return D.forEach(function($){for(g=0;p=$.regex.exec(n);){var k=p[1].trim();if(f=y(k),f===void 0)if(typeof C=="function"){var E=C(n,p,l);f=typeof E=="string"?E:""}else if(l&&Object.prototype.hasOwnProperty.call(l,k))f="";else if(M){f=p[0];continue}else c.logger.warn("missed to pass in variable ".concat(k," for interpolating ").concat(n)),f="";else typeof f!="string"&&!c.useRawValueToEscape&&(f=Qp(f));var H=$.safeValue(f);if(n=n.replace(p[0],H),M?($.regex.lastIndex+=f.length,$.regex.lastIndex-=p[0].length):$.regex.lastIndex=0,g++,g>=c.maxReplaces)break}}),n}},{key:"nest",value:function(n,a){var s=this,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},c,p,f;function g(C,M){var D=this.nestingOptionsSeparator;if(C.indexOf(D)<0)return C;var $=C.split(new RegExp("".concat(D,"[ ]*{"))),k="{".concat($[1]);C=$[0],k=this.interpolate(k,f);var E=k.match(/'/g),H=k.match(/"/g);(E&&E.length%2===0&&!H||H.length%2!==0)&&(k=k.replace(/'/g,'"'));try{f=JSON.parse(k),M&&(f=jr(jr({},M),f))}catch(I){return this.logger.warn("failed parsing options string in nesting for key ".concat(C),I),"".concat(C).concat(D).concat(k)}return delete f.defaultValue,C}for(;c=this.nestingRegexp.exec(n);){var h=[];f=jr({},l),f=f.replace&&typeof f.replace!="string"?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;var b=!1;if(c[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(c[1])){var y=c[1].split(this.formatSeparator).map(function(C){return C.trim()});c[1]=y.shift(),h=y,b=!0}if(p=a(g.call(this,c[1].trim(),f),f),p&&c[0]===n&&typeof p!="string")return p;typeof p!="string"&&(p=Qp(p)),p||(this.logger.warn("missed to resolve ".concat(c[1]," for nesting ").concat(n)),p=""),b&&(p=h.reduce(function(C,M){return s.format(C,M,l.lng,jr(jr({},l),{},{interpolationkey:c[1].trim()}))},p.trim())),n=n.replace(c[0],p),this.regexp.lastIndex=0}return n}}]),t}();function Jp(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function Sn(t){for(var r=1;r-1){var a=t.split("(");r=a[0].toLowerCase().trim();var s=a[1].substring(0,a[1].length-1);if(r==="currency"&&s.indexOf(":")<0)n.currency||(n.currency=s.trim());else if(r==="relativetime"&&s.indexOf(":")<0)n.range||(n.range=s.trim());else{var l=s.split(";");l.forEach(function(c){if(c){var p=c.split(":"),f=Gp(p),g=f[0],h=f.slice(1),b=h.join(":").trim().replace(/^'+|'+$/g,"");n[g.trim()]||(n[g.trim()]=b),b==="false"&&(n[g.trim()]=!1),b==="true"&&(n[g.trim()]=!0),isNaN(b)||(n[g.trim()]=parseInt(b,10))}})}}return{formatName:r,formatOptions:n}}function Ts(t){var r={};return function(a,s,l){var c=s+JSON.stringify(l),p=r[c];return p||(p=t(s,l),r[c]=p),p(a)}}var A1=function(){function t(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Fr(this,t),this.logger=on.create("formatter"),this.options=r,this.formats={number:Ts(function(n,a){var s=new Intl.NumberFormat(n,Sn({},a));return function(l){return s.format(l)}}),currency:Ts(function(n,a){var s=new Intl.NumberFormat(n,Sn(Sn({},a),{},{style:"currency"}));return function(l){return s.format(l)}}),datetime:Ts(function(n,a){var s=new Intl.DateTimeFormat(n,Sn({},a));return function(l){return s.format(l)}}),relativetime:Ts(function(n,a){var s=new Intl.RelativeTimeFormat(n,Sn({},a));return function(l){return s.format(l,a.range||"day")}}),list:Ts(function(n,a){var s=new Intl.ListFormat(n,Sn({},a));return function(l){return s.format(l)}})},this.init(r)}return Qr(t,[{key:"init",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},s=a.interpolation;this.formatSeparator=s.formatSeparator?s.formatSeparator:s.formatSeparator||","}},{key:"add",value:function(n,a){this.formats[n.toLowerCase().trim()]=a}},{key:"addCached",value:function(n,a){this.formats[n.toLowerCase().trim()]=Ts(a)}},{key:"format",value:function(n,a,s){var l=this,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},p=a.split(this.formatSeparator),f=p.reduce(function(g,h){var b=L1(h),y=b.formatName,C=b.formatOptions;if(l.formats[y]){var M=g;try{var D=c&&c.formatParams&&c.formatParams[c.interpolationkey]||{},$=D.locale||D.lng||c.locale||c.lng||s;M=l.formats[y](g,$,Sn(Sn(Sn({},C),c),D))}catch(k){l.logger.warn(k)}return M}else l.logger.warn("there was no format function for ".concat(y));return g},n);return f}}]),t}();function ef(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function tf(t){for(var r=1;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function O1(t,r){t.pending[r]!==void 0&&(delete t.pending[r],t.pendingCount--)}var U1=function(t){ko(n,t);var r=P1(n);function n(a,s,l){var c,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Fr(this,n),c=r.call(this),tl&&zn.call(an(c)),c.backend=a,c.store=s,c.services=l,c.languageUtils=l.languageUtils,c.options=p,c.logger=on.create("backendConnector"),c.waitingReads=[],c.maxParallelReads=p.maxParallelReads||10,c.readingCalls=0,c.maxRetries=p.maxRetries>=0?p.maxRetries:5,c.retryTimeout=p.retryTimeout>=1?p.retryTimeout:350,c.state={},c.queue=[],c.backend&&c.backend.init&&c.backend.init(l,p.backend,p),c}return Qr(n,[{key:"queueLoad",value:function(s,l,c,p){var f=this,g={},h={},b={},y={};return s.forEach(function(C){var M=!0;l.forEach(function(D){var $="".concat(C,"|").concat(D);!c.reload&&f.store.hasResourceBundle(C,D)?f.state[$]=2:f.state[$]<0||(f.state[$]===1?h[$]===void 0&&(h[$]=!0):(f.state[$]=1,M=!1,h[$]===void 0&&(h[$]=!0),g[$]===void 0&&(g[$]=!0),y[D]===void 0&&(y[D]=!0)))}),M||(b[C]=!0)}),(Object.keys(g).length||Object.keys(h).length)&&this.queue.push({pending:h,pendingCount:Object.keys(h).length,loaded:{},errors:[],callback:p}),{toLoad:Object.keys(g),pending:Object.keys(h),toLoadLanguages:Object.keys(b),toLoadNamespaces:Object.keys(y)}}},{key:"loaded",value:function(s,l,c){var p=s.split("|"),f=p[0],g=p[1];l&&this.emit("failedLoading",f,g,l),c&&this.store.addResourceBundle(f,g,c),this.state[s]=l?-1:2;var h={};this.queue.forEach(function(b){u1(b.loaded,[f],g),O1(b,s),l&&b.errors.push(l),b.pendingCount===0&&!b.done&&(Object.keys(b.loaded).forEach(function(y){h[y]||(h[y]={});var C=b.loaded[y];C.length&&C.forEach(function(M){h[y][M]===void 0&&(h[y][M]=!0)})}),b.done=!0,b.errors.length?b.callback(b.errors):b.callback())}),this.emit("loaded",h),this.queue=this.queue.filter(function(b){return!b.done})}},{key:"read",value:function(s,l,c){var p=this,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,h=arguments.length>5?arguments[5]:void 0;if(!s.length)return h(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:s,ns:l,fcName:c,tried:f,wait:g,callback:h});return}this.readingCalls++;var b=function(D,$){if(p.readingCalls--,p.waitingReads.length>0){var k=p.waitingReads.shift();p.read(k.lng,k.ns,k.fcName,k.tried,k.wait,k.callback)}if(D&&$&&f2&&arguments[2]!==void 0?arguments[2]:{},f=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),f&&f();typeof s=="string"&&(s=this.languageUtils.toResolveHierarchy(s)),typeof l=="string"&&(l=[l]);var g=this.queueLoad(s,l,p,f);if(!g.toLoad.length)return g.pending.length||f(),null;g.toLoad.forEach(function(h){c.loadOne(h)})}},{key:"load",value:function(s,l,c){this.prepareLoading(s,l,{},c)}},{key:"reload",value:function(s,l,c){this.prepareLoading(s,l,{reload:!0},c)}},{key:"loadOne",value:function(s){var l=this,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",p=s.split("|"),f=p[0],g=p[1];this.read(f,g,"read",void 0,void 0,function(h,b){h&&l.logger.warn("".concat(c,"loading namespace ").concat(g," for language ").concat(f," failed"),h),!h&&b&&l.logger.log("".concat(c,"loaded namespace ").concat(g," for language ").concat(f),b),l.loaded(s,h,b)})}},{key:"saveMissing",value:function(s,l,c,p,f){var g=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(l)){this.logger.warn('did not save key "'.concat(c,'" as the namespace "').concat(l,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(c==null||c==="")){if(this.backend&&this.backend.create){var b=tf(tf({},g),{},{isUpdate:f}),y=this.backend.create.bind(this.backend);if(y.length<6)try{var C;y.length===5?C=y(s,l,c,p,b):C=y(s,l,c,p),C&&typeof C.then=="function"?C.then(function(M){return h(null,M)}).catch(h):h(null,C)}catch(M){h(M)}else y(s,l,c,p,h,b)}!s||!s[0]||this.store.addResource(s[0],l,c,p)}}}]),n}(zn);function rf(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(r){var n={};if($t(r[1])==="object"&&(n=r[1]),typeof r[1]=="string"&&(n.defaultValue=r[1]),typeof r[2]=="string"&&(n.tDescription=r[2]),$t(r[2])==="object"||$t(r[3])==="object"){var a=r[3]||r[2];Object.keys(a).forEach(function(s){n[s]=a[s]})}return n},interpolation:{escapeValue:!0,format:function(r,n,a,s){return r},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function nf(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function af(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function sn(t){for(var r=1;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function Zi(){}function I1(t){var r=Object.getOwnPropertyNames(Object.getPrototypeOf(t));r.forEach(function(n){typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}var el=function(t){ko(n,t);var r=B1(n);function n(){var a,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=arguments.length>1?arguments[1]:void 0;if(Fr(this,n),a=r.call(this),tl&&zn.call(an(a)),a.options=nf(s),a.services={},a.logger=on,a.modules={external:[]},I1(an(a)),l&&!a.isInitialized&&!s.isClone){if(!a.options.initImmediate)return a.init(s,l),Ms(a,an(a));setTimeout(function(){a.init(s,l)},0)}return a}return Qr(n,[{key:"init",value:function(){var s=this,l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=arguments.length>1?arguments[1]:void 0;typeof l=="function"&&(c=l,l={}),!l.defaultNS&&l.defaultNS!==!1&&l.ns&&(typeof l.ns=="string"?l.defaultNS=l.ns:l.ns.indexOf("translation")<0&&(l.defaultNS=l.ns[0]));var p=rf();this.options=sn(sn(sn({},p),this.options),nf(l)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=sn(sn({},p.interpolation),this.options.interpolation)),l.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=l.keySeparator),l.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=l.nsSeparator);function f(k){return k?typeof k=="function"?new k:k:null}if(!this.options.isClone){this.modules.logger?on.init(f(this.modules.logger),this.options):on.init(null,this.options);var g;this.modules.formatter?g=this.modules.formatter:typeof Intl<"u"&&(g=A1);var h=new Kp(this.options);this.store=new y1(this.options.resources,this.options);var b=this.services;b.logger=on,b.resourceStore=this.store,b.languageUtils=h,b.pluralResolver=new T1(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),g&&(!this.options.interpolation.format||this.options.interpolation.format===p.interpolation.format)&&(b.formatter=f(g),b.formatter.init(b,this.options),this.options.interpolation.format=b.formatter.format.bind(b.formatter)),b.interpolator=new k1(this.options),b.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},b.backendConnector=new U1(f(this.modules.backend),b.resourceStore,b,this.options),b.backendConnector.on("*",function(k){for(var E=arguments.length,H=new Array(E>1?E-1:0),I=1;I1?E-1:0),I=1;I0&&y[0]!=="dev"&&(this.options.lng=y[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var C=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];C.forEach(function(k){s[k]=function(){var E;return(E=s.store)[k].apply(E,arguments)}});var M=["addResource","addResources","addResourceBundle","removeResourceBundle"];M.forEach(function(k){s[k]=function(){var E;return(E=s.store)[k].apply(E,arguments),s}});var D=Lo(),$=function(){var E=function(I,_){s.isInitialized&&!s.initializedStoreOnce&&s.logger.warn("init: i18next is already initialized. You should call init just once!"),s.isInitialized=!0,s.options.isClone||s.logger.log("initialized",s.options),s.emit("initialized",s.options),D.resolve(_),c(I,_)};if(s.languages&&s.options.compatibilityAPI!=="v1"&&!s.isInitialized)return E(null,s.t.bind(s));s.changeLanguage(s.options.lng,E)};return this.options.resources||!this.options.initImmediate?$():setTimeout($,0),D}},{key:"loadResources",value:function(s){var l=this,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Zi,p=c,f=typeof s=="string"?s:this.language;if(typeof s=="function"&&(p=s),!this.options.resources||this.options.partialBundledLanguages){if(f&&f.toLowerCase()==="cimode")return p();var g=[],h=function(C){if(C){var M=l.services.languageUtils.toResolveHierarchy(C);M.forEach(function(D){g.indexOf(D)<0&&g.push(D)})}};if(f)h(f);else{var b=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);b.forEach(function(y){return h(y)})}this.options.preload&&this.options.preload.forEach(function(y){return h(y)}),this.services.backendConnector.load(g,this.options.ns,function(y){!y&&!l.resolvedLanguage&&l.language&&l.setResolvedLanguage(l.language),p(y)})}else p(null)}},{key:"reloadResources",value:function(s,l,c){var p=Lo();return s||(s=this.languages),l||(l=this.options.ns),c||(c=Zi),this.services.backendConnector.reload(s,l,function(f){p.resolve(),c(f)}),p}},{key:"use",value:function(s){if(!s)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!s.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return s.type==="backend"&&(this.modules.backend=s),(s.type==="logger"||s.log&&s.warn&&s.error)&&(this.modules.logger=s),s.type==="languageDetector"&&(this.modules.languageDetector=s),s.type==="i18nFormat"&&(this.modules.i18nFormat=s),s.type==="postProcessor"&&of.addPostProcessor(s),s.type==="formatter"&&(this.modules.formatter=s),s.type==="3rdParty"&&this.modules.external.push(s),this}},{key:"setResolvedLanguage",value:function(s){if(!(!s||!this.languages)&&!(["cimode","dev"].indexOf(s)>-1))for(var l=0;l-1)&&this.store.hasLanguageSomeTranslations(c)){this.resolvedLanguage=c;break}}}},{key:"changeLanguage",value:function(s,l){var c=this;this.isLanguageChangingTo=s;var p=Lo();this.emit("languageChanging",s);var f=function(y){c.language=y,c.languages=c.services.languageUtils.toResolveHierarchy(y),c.resolvedLanguage=void 0,c.setResolvedLanguage(y)},g=function(y,C){C?(f(C),c.translator.changeLanguage(C),c.isLanguageChangingTo=void 0,c.emit("languageChanged",C),c.logger.log("languageChanged",C)):c.isLanguageChangingTo=void 0,p.resolve(function(){return c.t.apply(c,arguments)}),l&&l(y,function(){return c.t.apply(c,arguments)})},h=function(y){!s&&!y&&c.services.languageDetector&&(y=[]);var C=typeof y=="string"?y:c.services.languageUtils.getBestMatchFromCodes(y);C&&(c.language||f(C),c.translator.language||c.translator.changeLanguage(C),c.services.languageDetector&&c.services.languageDetector.cacheUserLanguage&&c.services.languageDetector.cacheUserLanguage(C)),c.loadResources(C,function(M){g(M,C)})};return!s&&this.services.languageDetector&&!this.services.languageDetector.async?h(this.services.languageDetector.detect()):!s&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(h):this.services.languageDetector.detect(h):h(s),p}},{key:"getFixedT",value:function(s,l,c){var p=this,f=function g(h,b){var y;if($t(b)!=="object"){for(var C=arguments.length,M=new Array(C>2?C-2:0),D=2;D1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var p=c.lng||this.resolvedLanguage||this.languages[0],f=this.options?this.options.fallbackLng:!1,g=this.languages[this.languages.length-1];if(p.toLowerCase()==="cimode")return!0;var h=function(C,M){var D=l.services.backendConnector.state["".concat(C,"|").concat(M)];return D===-1||D===2};if(c.precheck){var b=c.precheck(this,h);if(b!==void 0)return b}return!!(this.hasResourceBundle(p,s)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||h(p,s)&&(!f||h(g,s)))}},{key:"loadNamespaces",value:function(s,l){var c=this,p=Lo();return this.options.ns?(typeof s=="string"&&(s=[s]),s.forEach(function(f){c.options.ns.indexOf(f)<0&&c.options.ns.push(f)}),this.loadResources(function(f){p.resolve(),l&&l(f)}),p):(l&&l(),Promise.resolve())}},{key:"loadLanguages",value:function(s,l){var c=Lo();typeof s=="string"&&(s=[s]);var p=this.options.preload||[],f=s.filter(function(g){return p.indexOf(g)<0});return f.length?(this.options.preload=p.concat(f),this.loadResources(function(g){c.resolve(),l&&l(g)}),c):(l&&l(),Promise.resolve())}},{key:"dir",value:function(s){if(s||(s=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!s)return"rtl";var l=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],c=this.services&&this.services.languageUtils||new Kp(rf());return l.indexOf(c.getLanguagePartFromCode(s))>-1||s.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var s=this,l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Zi,p=sn(sn(sn({},this.options),l),{isClone:!0}),f=new n(p);(l.debug!==void 0||l.prefix!==void 0)&&(f.logger=f.logger.clone(l));var g=["store","services","language"];return g.forEach(function(h){f[h]=s[h]}),f.services=sn({},this.services),f.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},f.translator=new zp(f.services,f.options),f.translator.on("*",function(h){for(var b=arguments.length,y=new Array(b>1?b-1:0),C=1;C0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new el(t,r)});var u=el.createInstance();u.createInstance=el.createInstance;var Vw=u.createInstance,Ww=u.dir,zw=u.init,Kw=u.loadResources,Xw=u.reloadResources,Zw=u.use,Yw=u.changeLanguage,Jw=u.getFixedT,ex=u.t,tx=u.exists,rx=u.setDefaultNamespace,nx=u.hasLoadedNamespace,ax=u.loadNamespaces,sx=u.loadLanguages;var eu=new Map,i=t=>{let r=eu.get(t);if(r)return r;let n=document.getElementById(t);if(!n)throw new TypeError(`Element with id "${t}" was not found on page?`);return eu.set(t,n),n},lf=t=>eu.has(t);var df=Hr(uf()),Ht=new df.default;var Kn=class{constructor(r){this.level=0;this.freeLevels=0;this.toggleBuy=1;var n,a,s,l;this.name=r.name,this.description=r.description,this.level=(n=r.level)!=null?n:0,this.freeLevels=(a=r.freeLevels)!=null?a:0,this.maxLevel=r.maxLevel,this.costPerLevel=r.costPerLevel,this.toggleBuy=(s=r.toggleBuy)!=null?s:1,this.effect=(l=r.effect)!=null?l:c=>({bonus:c,desc:"WIP not implemented"})}async changeToggle(){let r=await je(u.t("dynamicUpgrades.validation.setPurchaseAmount",{x:this.name})),n=Number(r);if(r===null)return B(u.t("dynamicUpgrades.validation.toggleKept",{x:d(this.toggleBuy)}));if(!Number.isInteger(r))return B(u.t("general.validation.fraction"));if(n<-1)return B(u.t("dynamicUpgrades.validation.onlyNegativeOne"));if(n===0)return B(u.t("dynamicUpgrades.validation.notZero"));this.toggleBuy=n;let a=n===-1?u.t("dynamicUpgrades.toggleMax"):u.t("dynamicUpgrades.toggle",{x:d(this.toggleBuy)});return B(a)}getEffect(){let r=this.level+Math.min(this.level,this.freeLevels)+Math.sqrt(Math.max(0,this.freeLevels-this.level));return this.effect(r)}};var Hh=Hr(nu());var Qd=Hr(nl()),Fh=Hr(Xc());var yr="3.1.0 January 3, 2025: The PseudoCoin Update";var Xn=new Date(Date.UTC(2025,0,6,2,47,42)),al=!0;var ka=()=>{let t=Object.keys(e.hypercubeBlessings);for(let r of t){let n=e.hypercubeBlessings[r],a=t.indexOf(r)+1,s=1,l=1;n>=1e3&&(s=o.benedictionDRPower[a],l*=Math.pow(1e3,1-o.benedictionDRPower[a])),o.hypercubeBonusMultiplier[a]=1+l*o.benedictionbase[a]*Math.pow(n,s)*o.platonicBonusMultiplier[4]}};var sl=()=>{let t=Object.values(e.platonicBlessings),r=[4e6,4e6,4e6,8e4,1e4,1e4,1e4,1e4];for(let n=0;n=1e20&&(l=Math.pow(l,.5)*1e10),t[n]>=r[n]&&(a=o.platonicDRPower[n],s*=Math.pow(r[n],1-o.platonicDRPower[n])),o.platonicBonusMultiplier[n]=1+s*o.platonicCubeBase[n]*Math.pow(l,a)}};var Jt=()=>{let t=9e4;e.researches[195]>0&&(t+=18e3*e.researches[195]);let r=5,n=[99,100,125,180,195];for(let p of n)r+=e.researches[p];r*=+e.octeractUpgrades.octeractExportQuarks.getEffect().bonus;let a=r,s=Math.floor(a*t/3600),l=Math.floor(e.quarkstimer*a/3600),c=Yn();return{maxTime:t,perHour:a,capacity:s,gain:l,cubeMult:c}},ff=0,gf=t=>ff=t,vr=()=>ff,$1,Zn=class{constructor(r){this.QUARKS=0;this[$1]=r=>r==="number"?this.QUARKS:null;this.QUARKS=r}applyBonus(r){let n=ol();return r*(1+vr()/100)*n}add(r,n=!0){return this.QUARKS+=n?this.applyBonus(r):r,e.quarksThisSingularity+=n?this.applyBonus(r):r,this}sub(r){return this.QUARKS-=r,this.QUARKS<0&&(this.QUARKS=0),this}toString(r){return d(Math.floor(this.applyBonus(r)),0,!0)}reset(){this.QUARKS=0}};$1=Symbol.toPrimitive;var La=()=>{let t=[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];for(let r=0;r<10;r++){let n=1,a=1;t[r]>=1e3&&r!==5&&(n=o.giftDRPower[r],a*=Math.pow(1e3,1-o.giftDRPower[r])),o.tesseractBonusMultiplier[r+1]=1+a*o.giftbase[r]*Math.pow(t[r],n)*o.hypercubeBonusMultiplier[r+1]}};var ks={accelerator:{weight:4,pdf:t=>0<=t&&t<=20},multiplier:{weight:4,pdf:t=>2040506070808590950<=t&&t<=33},tesseracts:{weight:13200,pdf:t=>33669999.9999.992599.99599.9975100?B(u.t("cubes.validation.invalidPercent",{x:s})):a?this.open(Math.floor(r.value*(s/100)),s===100,!1):this.open(s,s===r.value,!1)}checkQuarkGain(r,n,a){if(a<1)return 0;let s=n*Jt().cubeMult;return Math.floor(e.worlds.applyBonus(Math.log10(a)*r*s))}checkCubesToNextQuark(r,n,a,s){let l=n*Jt().cubeMult;return Math.ceil(Math.pow(10,(a+1)/e.worlds.applyBonus(l*r))-s)}add(r){return this.value=Math.min(1e300,this.value+r),this}sub(r){return this.value=Math.max(0,this.value-r),this}[Symbol.toPrimitive](r){switch(r){case"string":return this.value.toString();case"number":return this.value;default:return null}}},Cr=class extends Jn{constructor(r=Number(e.wowCubes)){super("wowCubes",r)}open(r,n=!1,a=!1){let s=n?Number(this):a?r:Math.min(Number(this),r);r===1&&e.cubeBlessings.accelerator>=2e11&&e.achievements[246]<1&&Q(246),a||this.sub(s),e.cubeOpenedDaily+=s;let l=e.shopUpgrades.cubeToQuark?1.5:1,c=Number(this.checkQuarkGain(5,l,e.cubeOpenedDaily)),p=Math.max(0,c-e.cubeQuarkDaily);e.cubeQuarkDaily+=p,e.worlds.add(p,!1),s*=1+e.researches[138]/1e3,s*=1+.8*e.researches[168]/1e3,s*=1+.6*e.researches[198]/1e3,s=Math.floor(s);let f=s%20,g=Math.floor(s/20);g>0&&e.cubeUpgrades[13]===1&&(f+=g),g>0&&e.cubeUpgrades[23]===1&&(f+=g),g>0&&e.cubeUpgrades[33]===1&&(f+=g),g+=100/100*Math.floor(f/20),f=f%20;let h=Object.keys(e.cubeBlessings);for(let b of h)e.cubeBlessings[b]+=ks[b].weight*g*(1+Math.floor(K("ascension",e.challengecompletions[12])));for(let b=0;b0&&(e.platonicBlessings[C]+=g);let h=["hypercubeBonus","taxes","scoreBonus","globalSpeed"];for(let C=0;C=M&&f!==0&&(e.platonicBlessings[h[C]]+=1,f-=1)}let b=[Math.floor(33*f/100),Math.floor(33*f/100),Math.floor(33*f/100),Math.floor(396*f/4e4)],y=["cubes","tesseracts","hypercubes","platonics"];for(let C=0;C0){let C=Math.floor(s*Math.max(0,Math.min(1,(m.log(e.ascendShards.add(1),10)-1e5)/9e5)));e.wowHypercubes.open(C,!1,!0)}}};var ng=Hr(rg());var ml=t=>t instanceof m||typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"mantissa"in t&&"exponent"in t,Ie=(t=0)=>t<=Number.MAX_SAFE_INTEGER?1:2**Math.floor(Math.log2(t)-52),xe=t=>(t=Array.isArray(t)?t:Object.values(t),t.reduce((r,n)=>r+n,0)),Oe=t=>t.reduce((r,n)=>r*n),ag=t=>Array.from([...t.keys()]).sort((r,n)=>t[r]i(t);var Cu=(t,r,n)=>{for(let a=0;a{let a=i(t);for(let s of r)a.classList.add(s);for(let s of n)a.classList.remove(s)},Os=t=>{try{return window.btoa(t)}catch(r){return console.error("An error occurred:",r),null}},Bo=t=>{let r="th";return t%10===1&&(r=t%100===11?"th":"st"),t%10===2&&(r=t%100===12?"th":"nd"),t%10===3&&(r=t%100===13?"th":"rd"),d(t,0,!0)+r},py=t=>Object.entries({d:Math.floor(t/864e5),h:Math.floor(t/36e5)%24,m:Math.floor(t/6e4)%60,s:Math.floor(t/1e3)%60}).filter(r=>r[1]>0).map(r=>`${r[1]}${r[0]}`).join(" ")||"0s",Vr=t=>py(1e3*t),Ro=t=>{let r="";for(let n=0;n255?"_":t[n]}return r};function Us(t){if(!t)throw new TypeError("assertion failed")}function hl(t,r,n){return tn?r:t}var Ra=()=>{let t,r,n=new Promise((a,s)=>{t=a,r=s});return{resolve:t,reject:r,promise:n}},ln=t=>(0,ng.default)(t,r=>ml(r)||r instanceof m?new m(r):r);function Bs(t){let r=!1,n;return(...a)=>(r||(r=!0,n=t(...a)),n)}var wu=()=>{let t=e.singularityCount,r=t>36?u.t("singularity.penalties.platonicCosts",{multiplier:d(He("Platonic Costs",t),2,!0)}):'???????? ??????? ????? ??? ?????????? ?? ??? (37)',n=t>50?u.t("singularity.penalties.hepteractCosts",{multiplier:d(He("Hepteract Costs",t),2,!0)}):'????????? ????? ????? ??? ?????????? ?? ??? (51)',a=`${fy(t)}
${u.t("singularity.penalties.globalSpeed",{divisor:d(He("Global Speed",t),2,!0)})} +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gp(t){return Np(t)||_p(t)||$p(t)||Dp()}function Hp(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function Fp(t){for(var r=1;r1&&arguments[1]!==void 0?arguments[1]:{};Fr(this,t),this.init(r,n)}return Qr(t,[{key:"init",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=a.prefix||"i18next:",this.logger=n||i1,this.options=a,this.debug=a.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,a=new Array(n),s=0;s1?a-1:0),l=1;l-1?p.replace(/###/g,"."):p}function s(){return!t||typeof t=="string"}for(var l=typeof r!="string"?[].concat(r):r.split(".");l.length>1;){if(s())return{};var c=a(l.shift());!t[c]&&n&&(t[c]=new n),Object.prototype.hasOwnProperty.call(t,c)?t=t[c]:t={}}return s()?{}:{obj:t,k:a(l.shift())}}function qp(t,r,n){var a=Jc(t,r,Object),s=a.obj,l=a.k;s[l]=n}function u1(t,r,n,a){var s=Jc(t,r,Object),l=s.obj,c=s.k;l[c]=l[c]||[],a&&(l[c]=l[c].concat(n)),a||l[c].push(n)}function Yi(t,r){var n=Jc(t,r),a=n.obj,s=n.k;if(a)return a[s]}function d1(t,r,n){var a=Yi(t,n);return a!==void 0?a:Yi(r,n)}function sf(t,r,n){for(var a in r)a!=="__proto__"&&a!=="constructor"&&(a in t?typeof t[a]=="string"||t[a]instanceof String||typeof r[a]=="string"||r[a]instanceof String?n&&(t[a]=r[a]):sf(t[a],r[a],n):t[a]=r[a]);return t}function Ss(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var p1={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function f1(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(r){return p1[r]}):t}var tl=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,g1=[" ",",","?","!",";"];function m1(t,r,n){r=r||"",n=n||"";var a=g1.filter(function(p){return r.indexOf(p)<0&&n.indexOf(p)<0});if(a.length===0)return!0;var s=new RegExp("(".concat(a.map(function(p){return p==="?"?"\\?":p}).join("|"),")")),l=!s.test(t);if(!l){var c=t.indexOf(n);c>0&&!s.test(t.substring(0,c))&&(l=!0)}return l}function Ji(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(t){if(t[r])return t[r];for(var a=r.split(n),s=t,l=0;ll+c;)c++,p=a.slice(l,l+c).join(n),f=s[p];if(f===void 0)return;if(f===null)return null;if(r.endsWith(p)){if(typeof f=="string")return f;if(p&&typeof f[p]=="string")return f[p]}var g=a.slice(l+c).join(n);return g?Ji(f,g,n):void 0}s=s[a[l]]}return s}}function jp(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function Xi(t){for(var r=1;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var y1=function(t){ko(n,t);var r=h1(n);function n(a){var s,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Fr(this,n),s=r.call(this),tl&&zn.call(an(s)),s.data=a||{},s.options=l,s.options.keySeparator===void 0&&(s.options.keySeparator="."),s.options.ignoreJSONStructure===void 0&&(s.options.ignoreJSONStructure=!0),s}return Qr(n,[{key:"addNamespaces",value:function(s){this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}},{key:"removeNamespaces",value:function(s){var l=this.options.ns.indexOf(s);l>-1&&this.options.ns.splice(l,1)}},{key:"getResource",value:function(s,l,c){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},f=p.keySeparator!==void 0?p.keySeparator:this.options.keySeparator,g=p.ignoreJSONStructure!==void 0?p.ignoreJSONStructure:this.options.ignoreJSONStructure,h=[s,l];c&&typeof c!="string"&&(h=h.concat(c)),c&&typeof c=="string"&&(h=h.concat(f?c.split(f):c)),s.indexOf(".")>-1&&(h=s.split("."));var b=Yi(this.data,h);return b||!g||typeof c!="string"?b:Ji(this.data&&this.data[s]&&this.data[s][l],c,f)}},{key:"addResource",value:function(s,l,c,p){var f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},g=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator,h=[s,l];c&&(h=h.concat(g?c.split(g):c)),s.indexOf(".")>-1&&(h=s.split("."),p=l,l=h[1]),this.addNamespaces(l),qp(this.data,h,p),f.silent||this.emit("added",s,l,c,p)}},{key:"addResources",value:function(s,l,c){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var f in c)(typeof c[f]=="string"||Object.prototype.toString.apply(c[f])==="[object Array]")&&this.addResource(s,l,f,c[f],{silent:!0});p.silent||this.emit("added",s,l,c)}},{key:"addResourceBundle",value:function(s,l,c,p,f){var g=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},h=[s,l];s.indexOf(".")>-1&&(h=s.split("."),p=c,c=l,l=h[1]),this.addNamespaces(l);var b=Yi(this.data,h)||{};p?sf(b,c,f):b=Xi(Xi({},b),c),qp(this.data,h,b),g.silent||this.emit("added",s,l,c)}},{key:"removeResourceBundle",value:function(s,l){this.hasResourceBundle(s,l)&&delete this.data[s][l],this.removeNamespaces(l),this.emit("removed",s,l)}},{key:"hasResourceBundle",value:function(s,l){return this.getResource(s,l)!==void 0}},{key:"getResourceBundle",value:function(s,l){return l||(l=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Xi(Xi({},{}),this.getResource(s,l)):this.getResource(s,l)}},{key:"getDataByLanguage",value:function(s){return this.data[s]}},{key:"hasLanguageSomeTranslations",value:function(s){var l=this.getDataByLanguage(s),c=l&&Object.keys(l)||[];return!!c.find(function(p){return l[p]&&Object.keys(l[p]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(zn),of={processors:{},addPostProcessor:function(r){this.processors[r.name]=r},handle:function(r,n,a,s,l){var c=this;return r.forEach(function(p){c.processors[p]&&(n=c.processors[p].process(n,a,s,l))}),n}};function Vp(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function Dt(t){for(var r=1;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var Wp={},zp=function(t){ko(n,t);var r=v1(n);function n(a){var s,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Fr(this,n),s=r.call(this),tl&&zn.call(an(s)),c1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],a,an(s)),s.options=l,s.options.keySeparator===void 0&&(s.options.keySeparator="."),s.logger=on.create("translator"),s}return Qr(n,[{key:"changeLanguage",value:function(s){s&&(this.language=s)}},{key:"exists",value:function(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(s==null)return!1;var c=this.resolve(s,l);return c&&c.res!==void 0}},{key:"extractFromKey",value:function(s,l){var c=l.nsSeparator!==void 0?l.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");var p=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,f=l.ns||this.options.defaultNS||[],g=c&&s.indexOf(c)>-1,h=!this.options.userDefinedKeySeparator&&!l.keySeparator&&!this.options.userDefinedNsSeparator&&!l.nsSeparator&&!m1(s,c,p);if(g&&!h){var b=s.match(this.interpolator.nestingRegexp);if(b&&b.length>0)return{key:s,namespaces:f};var y=s.split(c);(c!==p||c===p&&this.options.ns.indexOf(y[0])>-1)&&(f=y.shift()),s=y.join(p)}return typeof f=="string"&&(f=[f]),{key:s,namespaces:f}}},{key:"translate",value:function(s,l,c){var p=this;if($t(l)!=="object"&&this.options.overloadTranslationOptionHandler&&(l=this.options.overloadTranslationOptionHandler(arguments)),$t(l)==="object"&&(l=Dt({},l)),l||(l={}),s==null)return"";Array.isArray(s)||(s=[String(s)]);var f=l.returnDetails!==void 0?l.returnDetails:this.options.returnDetails,g=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,h=this.extractFromKey(s[s.length-1],l),b=h.key,y=h.namespaces,C=y[y.length-1],M=l.lng||this.language,D=l.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(M&&M.toLowerCase()==="cimode"){if(D){var $=l.nsSeparator||this.options.nsSeparator;return f?{res:"".concat(C).concat($).concat(b),usedKey:b,exactUsedKey:b,usedLng:M,usedNS:C}:"".concat(C).concat($).concat(b)}return f?{res:b,usedKey:b,exactUsedKey:b,usedLng:M,usedNS:C}:b}var k=this.resolve(s,l),E=k&&k.res,H=k&&k.usedKey||b,I=k&&k.exactUsedKey||b,_=Object.prototype.toString.apply(E),L=["[object Number]","[object Function]","[object RegExp]"],P=l.joinArrays!==void 0?l.joinArrays:this.options.joinArrays,F=!this.i18nFormat||this.i18nFormat.handleAsObject,j=typeof E!="string"&&typeof E!="boolean"&&typeof E!="number";if(F&&E&&j&&L.indexOf(_)<0&&!(typeof P=="string"&&_==="[object Array]")){if(!l.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(H,E,Dt(Dt({},l),{},{ns:y})):"key '".concat(b," (").concat(this.language,")' returned an object instead of string.");return f?(k.res=x,k):x}if(g){var W=_==="[object Array]",ue=W?[]:{},be=W?I:H;for(var ct in E)if(Object.prototype.hasOwnProperty.call(E,ct)){var Et="".concat(be).concat(g).concat(ct);ue[ct]=this.translate(Et,Dt(Dt({},l),{joinArrays:!1,ns:y})),ue[ct]===Et&&(ue[ct]=E[ct])}E=ue}}else if(F&&typeof P=="string"&&_==="[object Array]")E=E.join(P),E&&(E=this.extendTranslation(E,s,l,c));else{var xt=!1,Ot=!1,Ct=l.count!==void 0&&typeof l.count!="string",Nt=n.hasDefaultValue(l),ve=Ct?this.pluralResolver.getSuffix(M,l.count,l):"",ce=l["defaultValue".concat(ve)]||l.defaultValue;!this.isValidLookup(E)&&Nt&&(xt=!0,E=ce),this.isValidLookup(E)||(Ot=!0,E=b);var ie=l.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,he=ie&&Ot?void 0:E,ge=Nt&&ce!==E&&this.options.updateMissing;if(Ot||xt||ge){if(this.logger.log(ge?"updateKey":"missingKey",M,C,b,ge?ce:E),g){var ke=this.resolve(b,Dt(Dt({},l),{},{keySeparator:!1}));ke&&ke.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var Ye=[],O=this.languageUtils.getFallbackCodes(this.options.fallbackLng,l.lng||this.language);if(this.options.saveMissingTo==="fallback"&&O&&O[0])for(var Mt=0;Mt1&&arguments[1]!==void 0?arguments[1]:{},p,f,g,h,b;return typeof s=="string"&&(s=[s]),s.forEach(function(y){if(!l.isValidLookup(p)){var C=l.extractFromKey(y,c),M=C.key;f=M;var D=C.namespaces;l.options.fallbackNS&&(D=D.concat(l.options.fallbackNS));var $=c.count!==void 0&&typeof c.count!="string",k=$&&!c.ordinal&&c.count===0&&l.pluralResolver.shouldUseIntlApi(),E=c.context!==void 0&&(typeof c.context=="string"||typeof c.context=="number")&&c.context!=="",H=c.lngs?c.lngs:l.languageUtils.toResolveHierarchy(c.lng||l.language,c.fallbackLng);D.forEach(function(I){l.isValidLookup(p)||(b=I,!Wp["".concat(H[0],"-").concat(I)]&&l.utils&&l.utils.hasLoadedNamespace&&!l.utils.hasLoadedNamespace(b)&&(Wp["".concat(H[0],"-").concat(I)]=!0,l.logger.warn('key "'.concat(f,'" for languages "').concat(H.join(", "),`" won't get resolved as namespace "`).concat(b,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),H.forEach(function(_){if(!l.isValidLookup(p)){h=_;var L=[M];if(l.i18nFormat&&l.i18nFormat.addLookupKeys)l.i18nFormat.addLookupKeys(L,M,_,I,c);else{var P;$&&(P=l.pluralResolver.getSuffix(_,c.count,c));var F="".concat(l.options.pluralSeparator,"zero");if($&&(L.push(M+P),k&&L.push(M+F)),E){var j="".concat(M).concat(l.options.contextSeparator).concat(c.context);L.push(j),$&&(L.push(j+P),k&&L.push(j+F))}}for(var x;x=L.pop();)l.isValidLookup(p)||(g=x,p=l.getResource(_,I,x,c))}}))})}}),{res:p,usedKey:f,exactUsedKey:g,usedLng:h,usedNS:b}}},{key:"isValidLookup",value:function(s){return s!==void 0&&!(!this.options.returnNull&&s===null)&&!(!this.options.returnEmptyString&&s==="")}},{key:"getResource",value:function(s,l,c){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(s,l,c,p):this.resourceStore.getResource(s,l,c,p)}}],[{key:"hasDefaultValue",value:function(s){var l="defaultValue";for(var c in s)if(Object.prototype.hasOwnProperty.call(s,c)&&l===c.substring(0,l.length)&&s[c]!==void 0)return!0;return!1}}]),n}(zn);function Yc(t){return t.charAt(0).toUpperCase()+t.slice(1)}var Kp=function(){function t(r){Fr(this,t),this.options=r,this.supportedLngs=this.options.supportedLngs||!1,this.logger=on.create("languageUtils")}return Qr(t,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var a=n.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var a=n.split("-");return this.formatLanguageCode(a[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var a=["hans","hant","latn","cyrl","cans","mong","arab"],s=n.split("-");return this.options.lowerCaseLng?s=s.map(function(l){return l.toLowerCase()}):s.length===2?(s[0]=s[0].toLowerCase(),s[1]=s[1].toUpperCase(),a.indexOf(s[1].toLowerCase())>-1&&(s[1]=Yc(s[1].toLowerCase()))):s.length===3&&(s[0]=s[0].toLowerCase(),s[1].length===2&&(s[1]=s[1].toUpperCase()),s[0]!=="sgn"&&s[2].length===2&&(s[2]=s[2].toUpperCase()),a.indexOf(s[1].toLowerCase())>-1&&(s[1]=Yc(s[1].toLowerCase())),a.indexOf(s[2].toLowerCase())>-1&&(s[2]=Yc(s[2].toLowerCase()))),s.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var a=this;if(!n)return null;var s;return n.forEach(function(l){if(!s){var c=a.formatLanguageCode(l);(!a.options.supportedLngs||a.isSupportedCode(c))&&(s=c)}}),!s&&this.options.supportedLngs&&n.forEach(function(l){if(!s){var c=a.getLanguagePartFromCode(l);if(a.isSupportedCode(c))return s=c;s=a.options.supportedLngs.find(function(p){if(p===c)return p;if(!(p.indexOf("-")<0&&c.indexOf("-")<0)&&p.indexOf(c)===0)return p})}}),s||(s=this.getFallbackCodes(this.options.fallbackLng)[0]),s}},{key:"getFallbackCodes",value:function(n,a){if(!n)return[];if(typeof n=="function"&&(n=n(a)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!a)return n.default||[];var s=n[a];return s||(s=n[this.getScriptPartFromCode(a)]),s||(s=n[this.formatLanguageCode(a)]),s||(s=n[this.getLanguagePartFromCode(a)]),s||(s=n.default),s||[]}},{key:"toResolveHierarchy",value:function(n,a){var s=this,l=this.getFallbackCodes(a||this.options.fallbackLng||[],n),c=[],p=function(g){g&&(s.isSupportedCode(g)?c.push(g):s.logger.warn("rejecting language code not found in supportedLngs: ".concat(g)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&p(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&p(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&p(this.getLanguagePartFromCode(n))):typeof n=="string"&&p(this.formatLanguageCode(n)),l.forEach(function(f){c.indexOf(f)<0&&p(s.formatLanguageCode(f))}),c}}]),t}(),w1=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],x1={1:function(r){return+(r>1)},2:function(r){return+(r!=1)},3:function(r){return 0},4:function(r){return r%10==1&&r%100!=11?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2},5:function(r){return r==0?0:r==1?1:r==2?2:r%100>=3&&r%100<=10?3:r%100>=11?4:5},6:function(r){return r==1?0:r>=2&&r<=4?1:2},7:function(r){return r==1?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2},8:function(r){return r==1?0:r==2?1:r!=8&&r!=11?2:3},9:function(r){return+(r>=2)},10:function(r){return r==1?0:r==2?1:r<7?2:r<11?3:4},11:function(r){return r==1||r==11?0:r==2||r==12?1:r>2&&r<20?2:3},12:function(r){return+(r%10!=1||r%100==11)},13:function(r){return+(r!==0)},14:function(r){return r==1?0:r==2?1:r==3?2:3},15:function(r){return r%10==1&&r%100!=11?0:r%10>=2&&(r%100<10||r%100>=20)?1:2},16:function(r){return r%10==1&&r%100!=11?0:r!==0?1:2},17:function(r){return r==1||r%10==1&&r%100!=11?0:1},18:function(r){return r==0?0:r==1?1:2},19:function(r){return r==1?0:r==0||r%100>1&&r%100<11?1:r%100>10&&r%100<20?2:3},20:function(r){return r==1?0:r==0||r%100>0&&r%100<20?1:2},21:function(r){return r%100==1?1:r%100==2?2:r%100==3||r%100==4?3:0},22:function(r){return r==1?0:r==2?1:(r<0||r>10)&&r%10==0?2:3}},M1=["v1","v2","v3"],Xp={zero:0,one:1,two:2,few:3,many:4,other:5};function S1(){var t={};return w1.forEach(function(r){r.lngs.forEach(function(n){t[n]={numbers:r.nr,plurals:x1[r.fc]}})}),t}var T1=function(){function t(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Fr(this,t),this.languageUtils=r,this.options=n,this.logger=on.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=S1()}return Qr(t,[{key:"addRule",value:function(n,a){this.rules[n]=a}},{key:"getRule",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:a.ordinal?"ordinal":"cardinal"})}catch(s){return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.getRule(n,a);return this.shouldUseIntlApi()?s&&s.resolvedOptions().pluralCategories.length>1:s&&s.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,s).map(function(l){return"".concat(a).concat(l)})}},{key:"getSuffixes",value:function(n){var a=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=this.getRule(n,s);return l?this.shouldUseIntlApi()?l.resolvedOptions().pluralCategories.sort(function(c,p){return Xp[c]-Xp[p]}).map(function(c){return"".concat(a.options.prepend).concat(c)}):l.numbers.map(function(c){return a.getSuffix(n,c,s)}):[]}},{key:"getSuffix",value:function(n,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=this.getRule(n,s);return l?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(l.select(a)):this.getSuffixRetroCompatible(l,a):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,a){var s=this,l=n.noAbs?n.plurals(a):n.plurals(Math.abs(a)),c=n.numbers[l];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(c===2?c="plural":c===1&&(c=""));var p=function(){return s.options.prepend&&c.toString()?s.options.prepend+c.toString():c.toString()};return this.options.compatibilityJSON==="v1"?c===1?"":typeof c=="number"?"_plural_".concat(c.toString()):p():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?p():this.options.prepend&&l.toString()?this.options.prepend+l.toString():l.toString()}},{key:"shouldUseIntlApi",value:function(){return!M1.includes(this.options.compatibilityJSON)}}]),t}();function Zp(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function jr(t){for(var r=1;r3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,l=d1(t,r,n);return!l&&s&&typeof n=="string"&&(l=Ji(t,n,a),l===void 0&&(l=Ji(r,n,a))),l}var k1=function(){function t(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Fr(this,t),this.logger=on.create("interpolator"),this.options=r,this.format=r.interpolation&&r.interpolation.format||function(n){return n},this.init(r)}return Qr(t,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var a=n.interpolation;this.escape=a.escape!==void 0?a.escape:f1,this.escapeValue=a.escapeValue!==void 0?a.escapeValue:!0,this.useRawValueToEscape=a.useRawValueToEscape!==void 0?a.useRawValueToEscape:!1,this.prefix=a.prefix?Ss(a.prefix):a.prefixEscaped||"{{",this.suffix=a.suffix?Ss(a.suffix):a.suffixEscaped||"}}",this.formatSeparator=a.formatSeparator?a.formatSeparator:a.formatSeparator||",",this.unescapePrefix=a.unescapeSuffix?"":a.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":a.unescapeSuffix||"",this.nestingPrefix=a.nestingPrefix?Ss(a.nestingPrefix):a.nestingPrefixEscaped||Ss("$t("),this.nestingSuffix=a.nestingSuffix?Ss(a.nestingSuffix):a.nestingSuffixEscaped||Ss(")"),this.nestingOptionsSeparator=a.nestingOptionsSeparator?a.nestingOptionsSeparator:a.nestingOptionsSeparator||",",this.maxReplaces=a.maxReplaces?a.maxReplaces:1e3,this.alwaysFormat=a.alwaysFormat!==void 0?a.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var a="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(a,"g");var s="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(s,"g")}},{key:"interpolate",value:function(n,a,s,l){var c=this,p,f,g,h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function b($){return $.replace(/\$/g,"$$$$")}var y=function(k){if(k.indexOf(c.formatSeparator)<0){var E=Yp(a,h,k,c.options.keySeparator,c.options.ignoreJSONStructure);return c.alwaysFormat?c.format(E,void 0,s,jr(jr(jr({},l),a),{},{interpolationkey:k})):E}var H=k.split(c.formatSeparator),I=H.shift().trim(),_=H.join(c.formatSeparator).trim();return c.format(Yp(a,h,I,c.options.keySeparator,c.options.ignoreJSONStructure),_,s,jr(jr(jr({},l),a),{},{interpolationkey:I}))};this.resetRegExp();var C=l&&l.missingInterpolationHandler||this.options.missingInterpolationHandler,M=l&&l.interpolation&&l.interpolation.skipOnVariables!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,D=[{regex:this.regexpUnescape,safeValue:function(k){return b(k)}},{regex:this.regexp,safeValue:function(k){return c.escapeValue?b(c.escape(k)):b(k)}}];return D.forEach(function($){for(g=0;p=$.regex.exec(n);){var k=p[1].trim();if(f=y(k),f===void 0)if(typeof C=="function"){var E=C(n,p,l);f=typeof E=="string"?E:""}else if(l&&Object.prototype.hasOwnProperty.call(l,k))f="";else if(M){f=p[0];continue}else c.logger.warn("missed to pass in variable ".concat(k," for interpolating ").concat(n)),f="";else typeof f!="string"&&!c.useRawValueToEscape&&(f=Qp(f));var H=$.safeValue(f);if(n=n.replace(p[0],H),M?($.regex.lastIndex+=f.length,$.regex.lastIndex-=p[0].length):$.regex.lastIndex=0,g++,g>=c.maxReplaces)break}}),n}},{key:"nest",value:function(n,a){var s=this,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},c,p,f;function g(C,M){var D=this.nestingOptionsSeparator;if(C.indexOf(D)<0)return C;var $=C.split(new RegExp("".concat(D,"[ ]*{"))),k="{".concat($[1]);C=$[0],k=this.interpolate(k,f);var E=k.match(/'/g),H=k.match(/"/g);(E&&E.length%2===0&&!H||H.length%2!==0)&&(k=k.replace(/'/g,'"'));try{f=JSON.parse(k),M&&(f=jr(jr({},M),f))}catch(I){return this.logger.warn("failed parsing options string in nesting for key ".concat(C),I),"".concat(C).concat(D).concat(k)}return delete f.defaultValue,C}for(;c=this.nestingRegexp.exec(n);){var h=[];f=jr({},l),f=f.replace&&typeof f.replace!="string"?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;var b=!1;if(c[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(c[1])){var y=c[1].split(this.formatSeparator).map(function(C){return C.trim()});c[1]=y.shift(),h=y,b=!0}if(p=a(g.call(this,c[1].trim(),f),f),p&&c[0]===n&&typeof p!="string")return p;typeof p!="string"&&(p=Qp(p)),p||(this.logger.warn("missed to resolve ".concat(c[1]," for nesting ").concat(n)),p=""),b&&(p=h.reduce(function(C,M){return s.format(C,M,l.lng,jr(jr({},l),{},{interpolationkey:c[1].trim()}))},p.trim())),n=n.replace(c[0],p),this.regexp.lastIndex=0}return n}}]),t}();function Jp(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function Sn(t){for(var r=1;r-1){var a=t.split("(");r=a[0].toLowerCase().trim();var s=a[1].substring(0,a[1].length-1);if(r==="currency"&&s.indexOf(":")<0)n.currency||(n.currency=s.trim());else if(r==="relativetime"&&s.indexOf(":")<0)n.range||(n.range=s.trim());else{var l=s.split(";");l.forEach(function(c){if(c){var p=c.split(":"),f=Gp(p),g=f[0],h=f.slice(1),b=h.join(":").trim().replace(/^'+|'+$/g,"");n[g.trim()]||(n[g.trim()]=b),b==="false"&&(n[g.trim()]=!1),b==="true"&&(n[g.trim()]=!0),isNaN(b)||(n[g.trim()]=parseInt(b,10))}})}}return{formatName:r,formatOptions:n}}function Ts(t){var r={};return function(a,s,l){var c=s+JSON.stringify(l),p=r[c];return p||(p=t(s,l),r[c]=p),p(a)}}var A1=function(){function t(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Fr(this,t),this.logger=on.create("formatter"),this.options=r,this.formats={number:Ts(function(n,a){var s=new Intl.NumberFormat(n,Sn({},a));return function(l){return s.format(l)}}),currency:Ts(function(n,a){var s=new Intl.NumberFormat(n,Sn(Sn({},a),{},{style:"currency"}));return function(l){return s.format(l)}}),datetime:Ts(function(n,a){var s=new Intl.DateTimeFormat(n,Sn({},a));return function(l){return s.format(l)}}),relativetime:Ts(function(n,a){var s=new Intl.RelativeTimeFormat(n,Sn({},a));return function(l){return s.format(l,a.range||"day")}}),list:Ts(function(n,a){var s=new Intl.ListFormat(n,Sn({},a));return function(l){return s.format(l)}})},this.init(r)}return Qr(t,[{key:"init",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},s=a.interpolation;this.formatSeparator=s.formatSeparator?s.formatSeparator:s.formatSeparator||","}},{key:"add",value:function(n,a){this.formats[n.toLowerCase().trim()]=a}},{key:"addCached",value:function(n,a){this.formats[n.toLowerCase().trim()]=Ts(a)}},{key:"format",value:function(n,a,s){var l=this,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},p=a.split(this.formatSeparator),f=p.reduce(function(g,h){var b=L1(h),y=b.formatName,C=b.formatOptions;if(l.formats[y]){var M=g;try{var D=c&&c.formatParams&&c.formatParams[c.interpolationkey]||{},$=D.locale||D.lng||c.locale||c.lng||s;M=l.formats[y](g,$,Sn(Sn(Sn({},C),c),D))}catch(k){l.logger.warn(k)}return M}else l.logger.warn("there was no format function for ".concat(y));return g},n);return f}}]),t}();function ef(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function tf(t){for(var r=1;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function O1(t,r){t.pending[r]!==void 0&&(delete t.pending[r],t.pendingCount--)}var U1=function(t){ko(n,t);var r=P1(n);function n(a,s,l){var c,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Fr(this,n),c=r.call(this),tl&&zn.call(an(c)),c.backend=a,c.store=s,c.services=l,c.languageUtils=l.languageUtils,c.options=p,c.logger=on.create("backendConnector"),c.waitingReads=[],c.maxParallelReads=p.maxParallelReads||10,c.readingCalls=0,c.maxRetries=p.maxRetries>=0?p.maxRetries:5,c.retryTimeout=p.retryTimeout>=1?p.retryTimeout:350,c.state={},c.queue=[],c.backend&&c.backend.init&&c.backend.init(l,p.backend,p),c}return Qr(n,[{key:"queueLoad",value:function(s,l,c,p){var f=this,g={},h={},b={},y={};return s.forEach(function(C){var M=!0;l.forEach(function(D){var $="".concat(C,"|").concat(D);!c.reload&&f.store.hasResourceBundle(C,D)?f.state[$]=2:f.state[$]<0||(f.state[$]===1?h[$]===void 0&&(h[$]=!0):(f.state[$]=1,M=!1,h[$]===void 0&&(h[$]=!0),g[$]===void 0&&(g[$]=!0),y[D]===void 0&&(y[D]=!0)))}),M||(b[C]=!0)}),(Object.keys(g).length||Object.keys(h).length)&&this.queue.push({pending:h,pendingCount:Object.keys(h).length,loaded:{},errors:[],callback:p}),{toLoad:Object.keys(g),pending:Object.keys(h),toLoadLanguages:Object.keys(b),toLoadNamespaces:Object.keys(y)}}},{key:"loaded",value:function(s,l,c){var p=s.split("|"),f=p[0],g=p[1];l&&this.emit("failedLoading",f,g,l),c&&this.store.addResourceBundle(f,g,c),this.state[s]=l?-1:2;var h={};this.queue.forEach(function(b){u1(b.loaded,[f],g),O1(b,s),l&&b.errors.push(l),b.pendingCount===0&&!b.done&&(Object.keys(b.loaded).forEach(function(y){h[y]||(h[y]={});var C=b.loaded[y];C.length&&C.forEach(function(M){h[y][M]===void 0&&(h[y][M]=!0)})}),b.done=!0,b.errors.length?b.callback(b.errors):b.callback())}),this.emit("loaded",h),this.queue=this.queue.filter(function(b){return!b.done})}},{key:"read",value:function(s,l,c){var p=this,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,h=arguments.length>5?arguments[5]:void 0;if(!s.length)return h(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:s,ns:l,fcName:c,tried:f,wait:g,callback:h});return}this.readingCalls++;var b=function(D,$){if(p.readingCalls--,p.waitingReads.length>0){var k=p.waitingReads.shift();p.read(k.lng,k.ns,k.fcName,k.tried,k.wait,k.callback)}if(D&&$&&f2&&arguments[2]!==void 0?arguments[2]:{},f=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),f&&f();typeof s=="string"&&(s=this.languageUtils.toResolveHierarchy(s)),typeof l=="string"&&(l=[l]);var g=this.queueLoad(s,l,p,f);if(!g.toLoad.length)return g.pending.length||f(),null;g.toLoad.forEach(function(h){c.loadOne(h)})}},{key:"load",value:function(s,l,c){this.prepareLoading(s,l,{},c)}},{key:"reload",value:function(s,l,c){this.prepareLoading(s,l,{reload:!0},c)}},{key:"loadOne",value:function(s){var l=this,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",p=s.split("|"),f=p[0],g=p[1];this.read(f,g,"read",void 0,void 0,function(h,b){h&&l.logger.warn("".concat(c,"loading namespace ").concat(g," for language ").concat(f," failed"),h),!h&&b&&l.logger.log("".concat(c,"loaded namespace ").concat(g," for language ").concat(f),b),l.loaded(s,h,b)})}},{key:"saveMissing",value:function(s,l,c,p,f){var g=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(l)){this.logger.warn('did not save key "'.concat(c,'" as the namespace "').concat(l,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(c==null||c==="")){if(this.backend&&this.backend.create){var b=tf(tf({},g),{},{isUpdate:f}),y=this.backend.create.bind(this.backend);if(y.length<6)try{var C;y.length===5?C=y(s,l,c,p,b):C=y(s,l,c,p),C&&typeof C.then=="function"?C.then(function(M){return h(null,M)}).catch(h):h(null,C)}catch(M){h(M)}else y(s,l,c,p,h,b)}!s||!s[0]||this.store.addResource(s[0],l,c,p)}}}]),n}(zn);function rf(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(r){var n={};if($t(r[1])==="object"&&(n=r[1]),typeof r[1]=="string"&&(n.defaultValue=r[1]),typeof r[2]=="string"&&(n.tDescription=r[2]),$t(r[2])==="object"||$t(r[3])==="object"){var a=r[3]||r[2];Object.keys(a).forEach(function(s){n[s]=a[s]})}return n},interpolation:{escapeValue:!0,format:function(r,n,a,s){return r},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function nf(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function af(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function sn(t){for(var r=1;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function Zi(){}function I1(t){var r=Object.getOwnPropertyNames(Object.getPrototypeOf(t));r.forEach(function(n){typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}var el=function(t){ko(n,t);var r=B1(n);function n(){var a,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=arguments.length>1?arguments[1]:void 0;if(Fr(this,n),a=r.call(this),tl&&zn.call(an(a)),a.options=nf(s),a.services={},a.logger=on,a.modules={external:[]},I1(an(a)),l&&!a.isInitialized&&!s.isClone){if(!a.options.initImmediate)return a.init(s,l),Ms(a,an(a));setTimeout(function(){a.init(s,l)},0)}return a}return Qr(n,[{key:"init",value:function(){var s=this,l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=arguments.length>1?arguments[1]:void 0;typeof l=="function"&&(c=l,l={}),!l.defaultNS&&l.defaultNS!==!1&&l.ns&&(typeof l.ns=="string"?l.defaultNS=l.ns:l.ns.indexOf("translation")<0&&(l.defaultNS=l.ns[0]));var p=rf();this.options=sn(sn(sn({},p),this.options),nf(l)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=sn(sn({},p.interpolation),this.options.interpolation)),l.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=l.keySeparator),l.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=l.nsSeparator);function f(k){return k?typeof k=="function"?new k:k:null}if(!this.options.isClone){this.modules.logger?on.init(f(this.modules.logger),this.options):on.init(null,this.options);var g;this.modules.formatter?g=this.modules.formatter:typeof Intl<"u"&&(g=A1);var h=new Kp(this.options);this.store=new y1(this.options.resources,this.options);var b=this.services;b.logger=on,b.resourceStore=this.store,b.languageUtils=h,b.pluralResolver=new T1(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),g&&(!this.options.interpolation.format||this.options.interpolation.format===p.interpolation.format)&&(b.formatter=f(g),b.formatter.init(b,this.options),this.options.interpolation.format=b.formatter.format.bind(b.formatter)),b.interpolator=new k1(this.options),b.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},b.backendConnector=new U1(f(this.modules.backend),b.resourceStore,b,this.options),b.backendConnector.on("*",function(k){for(var E=arguments.length,H=new Array(E>1?E-1:0),I=1;I1?E-1:0),I=1;I0&&y[0]!=="dev"&&(this.options.lng=y[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var C=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];C.forEach(function(k){s[k]=function(){var E;return(E=s.store)[k].apply(E,arguments)}});var M=["addResource","addResources","addResourceBundle","removeResourceBundle"];M.forEach(function(k){s[k]=function(){var E;return(E=s.store)[k].apply(E,arguments),s}});var D=Lo(),$=function(){var E=function(I,_){s.isInitialized&&!s.initializedStoreOnce&&s.logger.warn("init: i18next is already initialized. You should call init just once!"),s.isInitialized=!0,s.options.isClone||s.logger.log("initialized",s.options),s.emit("initialized",s.options),D.resolve(_),c(I,_)};if(s.languages&&s.options.compatibilityAPI!=="v1"&&!s.isInitialized)return E(null,s.t.bind(s));s.changeLanguage(s.options.lng,E)};return this.options.resources||!this.options.initImmediate?$():setTimeout($,0),D}},{key:"loadResources",value:function(s){var l=this,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Zi,p=c,f=typeof s=="string"?s:this.language;if(typeof s=="function"&&(p=s),!this.options.resources||this.options.partialBundledLanguages){if(f&&f.toLowerCase()==="cimode")return p();var g=[],h=function(C){if(C){var M=l.services.languageUtils.toResolveHierarchy(C);M.forEach(function(D){g.indexOf(D)<0&&g.push(D)})}};if(f)h(f);else{var b=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);b.forEach(function(y){return h(y)})}this.options.preload&&this.options.preload.forEach(function(y){return h(y)}),this.services.backendConnector.load(g,this.options.ns,function(y){!y&&!l.resolvedLanguage&&l.language&&l.setResolvedLanguage(l.language),p(y)})}else p(null)}},{key:"reloadResources",value:function(s,l,c){var p=Lo();return s||(s=this.languages),l||(l=this.options.ns),c||(c=Zi),this.services.backendConnector.reload(s,l,function(f){p.resolve(),c(f)}),p}},{key:"use",value:function(s){if(!s)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!s.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return s.type==="backend"&&(this.modules.backend=s),(s.type==="logger"||s.log&&s.warn&&s.error)&&(this.modules.logger=s),s.type==="languageDetector"&&(this.modules.languageDetector=s),s.type==="i18nFormat"&&(this.modules.i18nFormat=s),s.type==="postProcessor"&&of.addPostProcessor(s),s.type==="formatter"&&(this.modules.formatter=s),s.type==="3rdParty"&&this.modules.external.push(s),this}},{key:"setResolvedLanguage",value:function(s){if(!(!s||!this.languages)&&!(["cimode","dev"].indexOf(s)>-1))for(var l=0;l-1)&&this.store.hasLanguageSomeTranslations(c)){this.resolvedLanguage=c;break}}}},{key:"changeLanguage",value:function(s,l){var c=this;this.isLanguageChangingTo=s;var p=Lo();this.emit("languageChanging",s);var f=function(y){c.language=y,c.languages=c.services.languageUtils.toResolveHierarchy(y),c.resolvedLanguage=void 0,c.setResolvedLanguage(y)},g=function(y,C){C?(f(C),c.translator.changeLanguage(C),c.isLanguageChangingTo=void 0,c.emit("languageChanged",C),c.logger.log("languageChanged",C)):c.isLanguageChangingTo=void 0,p.resolve(function(){return c.t.apply(c,arguments)}),l&&l(y,function(){return c.t.apply(c,arguments)})},h=function(y){!s&&!y&&c.services.languageDetector&&(y=[]);var C=typeof y=="string"?y:c.services.languageUtils.getBestMatchFromCodes(y);C&&(c.language||f(C),c.translator.language||c.translator.changeLanguage(C),c.services.languageDetector&&c.services.languageDetector.cacheUserLanguage&&c.services.languageDetector.cacheUserLanguage(C)),c.loadResources(C,function(M){g(M,C)})};return!s&&this.services.languageDetector&&!this.services.languageDetector.async?h(this.services.languageDetector.detect()):!s&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(h):this.services.languageDetector.detect(h):h(s),p}},{key:"getFixedT",value:function(s,l,c){var p=this,f=function g(h,b){var y;if($t(b)!=="object"){for(var C=arguments.length,M=new Array(C>2?C-2:0),D=2;D1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var p=c.lng||this.resolvedLanguage||this.languages[0],f=this.options?this.options.fallbackLng:!1,g=this.languages[this.languages.length-1];if(p.toLowerCase()==="cimode")return!0;var h=function(C,M){var D=l.services.backendConnector.state["".concat(C,"|").concat(M)];return D===-1||D===2};if(c.precheck){var b=c.precheck(this,h);if(b!==void 0)return b}return!!(this.hasResourceBundle(p,s)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||h(p,s)&&(!f||h(g,s)))}},{key:"loadNamespaces",value:function(s,l){var c=this,p=Lo();return this.options.ns?(typeof s=="string"&&(s=[s]),s.forEach(function(f){c.options.ns.indexOf(f)<0&&c.options.ns.push(f)}),this.loadResources(function(f){p.resolve(),l&&l(f)}),p):(l&&l(),Promise.resolve())}},{key:"loadLanguages",value:function(s,l){var c=Lo();typeof s=="string"&&(s=[s]);var p=this.options.preload||[],f=s.filter(function(g){return p.indexOf(g)<0});return f.length?(this.options.preload=p.concat(f),this.loadResources(function(g){c.resolve(),l&&l(g)}),c):(l&&l(),Promise.resolve())}},{key:"dir",value:function(s){if(s||(s=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!s)return"rtl";var l=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],c=this.services&&this.services.languageUtils||new Kp(rf());return l.indexOf(c.getLanguagePartFromCode(s))>-1||s.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var s=this,l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Zi,p=sn(sn(sn({},this.options),l),{isClone:!0}),f=new n(p);(l.debug!==void 0||l.prefix!==void 0)&&(f.logger=f.logger.clone(l));var g=["store","services","language"];return g.forEach(function(h){f[h]=s[h]}),f.services=sn({},this.services),f.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},f.translator=new zp(f.services,f.options),f.translator.on("*",function(h){for(var b=arguments.length,y=new Array(b>1?b-1:0),C=1;C0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new el(t,r)});var u=el.createInstance();u.createInstance=el.createInstance;var Vw=u.createInstance,Ww=u.dir,zw=u.init,Kw=u.loadResources,Xw=u.reloadResources,Zw=u.use,Yw=u.changeLanguage,Jw=u.getFixedT,ex=u.t,tx=u.exists,rx=u.setDefaultNamespace,nx=u.hasLoadedNamespace,ax=u.loadNamespaces,sx=u.loadLanguages;var eu=new Map,i=t=>{let r=eu.get(t);if(r)return r;let n=document.getElementById(t);if(!n)throw new TypeError(`Element with id "${t}" was not found on page?`);return eu.set(t,n),n},lf=t=>eu.has(t);var df=Hr(uf()),Ht=new df.default;var Kn=class{constructor(r){this.level=0;this.freeLevels=0;this.toggleBuy=1;var n,a,s,l;this.name=r.name,this.description=r.description,this.level=(n=r.level)!=null?n:0,this.freeLevels=(a=r.freeLevels)!=null?a:0,this.maxLevel=r.maxLevel,this.costPerLevel=r.costPerLevel,this.toggleBuy=(s=r.toggleBuy)!=null?s:1,this.effect=(l=r.effect)!=null?l:c=>({bonus:c,desc:"WIP not implemented"})}async changeToggle(){let r=await je(u.t("dynamicUpgrades.validation.setPurchaseAmount",{x:this.name})),n=Number(r);if(r===null)return B(u.t("dynamicUpgrades.validation.toggleKept",{x:d(this.toggleBuy)}));if(!Number.isInteger(r))return B(u.t("general.validation.fraction"));if(n<-1)return B(u.t("dynamicUpgrades.validation.onlyNegativeOne"));if(n===0)return B(u.t("dynamicUpgrades.validation.notZero"));this.toggleBuy=n;let a=n===-1?u.t("dynamicUpgrades.toggleMax"):u.t("dynamicUpgrades.toggle",{x:d(this.toggleBuy)});return B(a)}getEffect(){let r=this.level+Math.min(this.level,this.freeLevels)+Math.sqrt(Math.max(0,this.freeLevels-this.level));return this.effect(r)}};var Hh=Hr(nu());var Qd=Hr(nl()),Fh=Hr(Xc());var yr="3.1.0 January 3, 2025: The PseudoCoin Update";var Xn=new Date(Date.UTC(2025,0,6,3,2,15)),al=!0;var ka=()=>{let t=Object.keys(e.hypercubeBlessings);for(let r of t){let n=e.hypercubeBlessings[r],a=t.indexOf(r)+1,s=1,l=1;n>=1e3&&(s=o.benedictionDRPower[a],l*=Math.pow(1e3,1-o.benedictionDRPower[a])),o.hypercubeBonusMultiplier[a]=1+l*o.benedictionbase[a]*Math.pow(n,s)*o.platonicBonusMultiplier[4]}};var sl=()=>{let t=Object.values(e.platonicBlessings),r=[4e6,4e6,4e6,8e4,1e4,1e4,1e4,1e4];for(let n=0;n=1e20&&(l=Math.pow(l,.5)*1e10),t[n]>=r[n]&&(a=o.platonicDRPower[n],s*=Math.pow(r[n],1-o.platonicDRPower[n])),o.platonicBonusMultiplier[n]=1+s*o.platonicCubeBase[n]*Math.pow(l,a)}};var Jt=()=>{let t=9e4;e.researches[195]>0&&(t+=18e3*e.researches[195]);let r=5,n=[99,100,125,180,195];for(let p of n)r+=e.researches[p];r*=+e.octeractUpgrades.octeractExportQuarks.getEffect().bonus;let a=r,s=Math.floor(a*t/3600),l=Math.floor(e.quarkstimer*a/3600),c=Yn();return{maxTime:t,perHour:a,capacity:s,gain:l,cubeMult:c}},ff=0,gf=t=>ff=t,vr=()=>ff,$1,Zn=class{constructor(r){this.QUARKS=0;this[$1]=r=>r==="number"?this.QUARKS:null;this.QUARKS=r}applyBonus(r){let n=ol();return r*(1+vr()/100)*n}add(r,n=!0){return this.QUARKS+=n?this.applyBonus(r):r,e.quarksThisSingularity+=n?this.applyBonus(r):r,this}sub(r){return this.QUARKS-=r,this.QUARKS<0&&(this.QUARKS=0),this}toString(r){return d(Math.floor(this.applyBonus(r)),0,!0)}reset(){this.QUARKS=0}};$1=Symbol.toPrimitive;var La=()=>{let t=[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];for(let r=0;r<10;r++){let n=1,a=1;t[r]>=1e3&&r!==5&&(n=o.giftDRPower[r],a*=Math.pow(1e3,1-o.giftDRPower[r])),o.tesseractBonusMultiplier[r+1]=1+a*o.giftbase[r]*Math.pow(t[r],n)*o.hypercubeBonusMultiplier[r+1]}};var ks={accelerator:{weight:4,pdf:t=>0<=t&&t<=20},multiplier:{weight:4,pdf:t=>2040506070808590950<=t&&t<=33},tesseracts:{weight:13200,pdf:t=>33669999.9999.992599.99599.9975100?B(u.t("cubes.validation.invalidPercent",{x:s})):a?this.open(Math.floor(r.value*(s/100)),s===100,!1):this.open(s,s===r.value,!1)}checkQuarkGain(r,n,a){if(a<1)return 0;let s=n*Jt().cubeMult;return Math.floor(e.worlds.applyBonus(Math.log10(a)*r*s))}checkCubesToNextQuark(r,n,a,s){let l=n*Jt().cubeMult;return Math.ceil(Math.pow(10,(a+1)/e.worlds.applyBonus(l*r))-s)}add(r){return this.value=Math.min(1e300,this.value+r),this}sub(r){return this.value=Math.max(0,this.value-r),this}[Symbol.toPrimitive](r){switch(r){case"string":return this.value.toString();case"number":return this.value;default:return null}}},Cr=class extends Jn{constructor(r=Number(e.wowCubes)){super("wowCubes",r)}open(r,n=!1,a=!1){let s=n?Number(this):a?r:Math.min(Number(this),r);r===1&&e.cubeBlessings.accelerator>=2e11&&e.achievements[246]<1&&Q(246),a||this.sub(s),e.cubeOpenedDaily+=s;let l=e.shopUpgrades.cubeToQuark?1.5:1,c=Number(this.checkQuarkGain(5,l,e.cubeOpenedDaily)),p=Math.max(0,c-e.cubeQuarkDaily);e.cubeQuarkDaily+=p,e.worlds.add(p,!1),s*=1+e.researches[138]/1e3,s*=1+.8*e.researches[168]/1e3,s*=1+.6*e.researches[198]/1e3,s=Math.floor(s);let f=s%20,g=Math.floor(s/20);g>0&&e.cubeUpgrades[13]===1&&(f+=g),g>0&&e.cubeUpgrades[23]===1&&(f+=g),g>0&&e.cubeUpgrades[33]===1&&(f+=g),g+=100/100*Math.floor(f/20),f=f%20;let h=Object.keys(e.cubeBlessings);for(let b of h)e.cubeBlessings[b]+=ks[b].weight*g*(1+Math.floor(K("ascension",e.challengecompletions[12])));for(let b=0;b0&&(e.platonicBlessings[C]+=g);let h=["hypercubeBonus","taxes","scoreBonus","globalSpeed"];for(let C=0;C=M&&f!==0&&(e.platonicBlessings[h[C]]+=1,f-=1)}let b=[Math.floor(33*f/100),Math.floor(33*f/100),Math.floor(33*f/100),Math.floor(396*f/4e4)],y=["cubes","tesseracts","hypercubes","platonics"];for(let C=0;C0){let C=Math.floor(s*Math.max(0,Math.min(1,(m.log(e.ascendShards.add(1),10)-1e5)/9e5)));e.wowHypercubes.open(C,!1,!0)}}};var ng=Hr(rg());var ml=t=>t instanceof m||typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"mantissa"in t&&"exponent"in t,Ie=(t=0)=>t<=Number.MAX_SAFE_INTEGER?1:2**Math.floor(Math.log2(t)-52),xe=t=>(t=Array.isArray(t)?t:Object.values(t),t.reduce((r,n)=>r+n,0)),Oe=t=>t.reduce((r,n)=>r*n),ag=t=>Array.from([...t.keys()]).sort((r,n)=>t[r]i(t);var Cu=(t,r,n)=>{for(let a=0;a{let a=i(t);for(let s of r)a.classList.add(s);for(let s of n)a.classList.remove(s)},Os=t=>{try{return window.btoa(t)}catch(r){return console.error("An error occurred:",r),null}},Bo=t=>{let r="th";return t%10===1&&(r=t%100===11?"th":"st"),t%10===2&&(r=t%100===12?"th":"nd"),t%10===3&&(r=t%100===13?"th":"rd"),d(t,0,!0)+r},py=t=>Object.entries({d:Math.floor(t/864e5),h:Math.floor(t/36e5)%24,m:Math.floor(t/6e4)%60,s:Math.floor(t/1e3)%60}).filter(r=>r[1]>0).map(r=>`${r[1]}${r[0]}`).join(" ")||"0s",Vr=t=>py(1e3*t),Ro=t=>{let r="";for(let n=0;n255?"_":t[n]}return r};function Us(t){if(!t)throw new TypeError("assertion failed")}function hl(t,r,n){return tn?r:t}var Ra=()=>{let t,r,n=new Promise((a,s)=>{t=a,r=s});return{resolve:t,reject:r,promise:n}},ln=t=>(0,ng.default)(t,r=>ml(r)||r instanceof m?new m(r):r);function Bs(t){let r=!1,n;return(...a)=>(r||(r=!0,n=t(...a)),n)}var wu=()=>{let t=e.singularityCount,r=t>36?u.t("singularity.penalties.platonicCosts",{multiplier:d(He("Platonic Costs",t),2,!0)}):'???????? ??????? ????? ??? ?????????? ?? ??? (37)',n=t>50?u.t("singularity.penalties.hepteractCosts",{multiplier:d(He("Hepteract Costs",t),2,!0)}):'????????? ????? ????? ??? ?????????? ?? ??? (51)',a=`${fy(t)}
${u.t("singularity.penalties.globalSpeed",{divisor:d(He("Global Speed",t),2,!0)})} ${u.t("singularity.penalties.ascensionSpeed",{divisor:d(He("Ascension Speed",t),2,!0)})} ${u.t("singularity.penalties.offeringGain",{divisor:d(He("Offering",t),2,!0)})} ${u.t("singularity.penalties.obtainiumGain",{divisor:d(He("Obtainium",t),2,!0)})} @@ -31,7 +31,7 @@ ${a}`:a}return r}updateChallengeHTML(){i("singularityChallengesInfo").innerHTML= \u26A0\uFE0F !! No Refunds !! \u26A0\uFE0F`,g=r.type==="consume"?` -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):(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(` +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: