var t = require; var e = module; var i = exports; Object.defineProperty(i, "__esModule", {value: !0}); const a = [ "", "K", "M", "B", "T", "aa", "ab", "ac", "ad", "ae", "af", "ag", "ah", "ai", "aj", "ak", "al", "am", "an", "ao", "ap", "aq", "ar", "as", "at", "au", "av", "aw", "ax", "ay", "az", "ba", "bb", "bc", "bd", "be", "bf", "bg", "bh", "bi", "bj", "bk", "bl", "bm", "bn", "bo", "bp", "bq", "br", "bs", "bt", "bu", "bv", "bw", "bx", "by", "bz", "ca", "cb", "cc", "cd", "ce", "cf", "cg", "ch", "ci", "cj", "ck", "cl", "cm", "cn", "co", "cp", "cq", "cr", "cs", "ct", "cu", "cv", "cw", "cx", "cy", "cz" ]; class s { constructor() { (this.value = 0), (this._numberStr = ""); } init(t, e) { return t instanceof s ? this.initByBigNum(t) : this.initByNumber(t, e); } initByNumber(t, e) { return (this._numberStr = ""), (this.value = t * Math.pow(10, e)), this; } initByBigNum(t) { return (this._numberStr = ""), (this.value = t.value), this; } static create(t, e) { let i = s.pool.pop(); return (i = i || new s()), t instanceof s ? i.initByBigNum(t) : i.initByNumber(t, e), i; } release() { s.pool.push(this); } divide(t) { return ( (this.value = "number" == typeof t ? Math.floor(this.value / t) : Math.floor(this.value / t.value)), (this._numberStr = ""), this ); } divideBigLong(t) { return this.value / t.value; } cmp(t) { return "number" == typeof t ? this.value - t : this.value - t.value; } add(t) { return ( (this.value = "number" == typeof t ? Math.floor(this.value + t) : Math.floor(this.value + t.value)), (this._numberStr = ""), this ); } sub(t) { return ( (this.value = "number" == typeof t ? Math.floor(this.value - t) : Math.floor(this.value - t.value)), (this._numberStr = ""), this ); } static toString(o) { if (o < 1e3) return Math.floor(o) + ""; { let t = o.toPrecision(3), e = t.split("e+"), i = parseInt(e[1]), s = i % 3; return ( (i -= s), s < 2 ? (t = t.replace(".", "")).slice(0, 1 + s) + "." + t.slice(1 + s, 3) + a[i / 3] : t.replace(".", "").slice(0, 1 + s) + a[i / 3] ); } } static unpackData(t) { var e = t.match(/(-?)([\d.]+)([a-z]{2}|M|K|T|B)?/); if (e) { if (e[3]) { t = a.indexOf(e[3]); return parseFloat(e[2]) * Math.pow(10, 3 * t); } return parseFloat(e[2]); } return 0; } toString() { if (this._numberStr) return this._numberStr; if (this.value < 1e3) return (this._numberStr = this.value + ""); { let t = this.value.toPrecision(3), e = t.split("e+"), i = parseInt(e[1]), s = i % 3; return ( (i -= s), s < 2 ? ((t = t.replace(".", "")), (this._numberStr = t.slice(0, 1 + s) + "." + t.slice(1 + s, 3) + a[i / 3])) : (this._numberStr = t.replace(".", "").slice(0, 1 + s) + a[i / 3]) ); } } multiply(t) { return ( (this.value = "number" == typeof t ? Math.floor(this.value * t) : Math.floor(this.value * t.value)), (this._numberStr = ""), this ); } getMultiplyValue(t) { let o = 0; if ((o = "number" == typeof t ? Math.floor(this.value * t) : Math.floor(this.value * t.value)) < 1e3) return o + ""; { let t = o.toPrecision(3), e = t.split("e+"), i = parseInt(e[1]), s = i % 3; return ( (i -= s), s < 2 ? (t = t.replace(".", "")).slice(0, 1 + s) + "." + t.slice(1 + s, 3) + a[i / 3] : t.replace(".", "").slice(0, 1 + s) + a[i / 3] ); } } copy() { return s.create(this); } isZero() { return 0 === this.value; } clear() { (this.value = 0), (this._numberStr = "0"); } getData() { return [this.value]; } unPackData(t) { (this._numberStr = ""), (this.value = t[0]); } } (i.default = s), (s.pool = []), (s.tempNum = s.create(0, 0)), (window.MyBigLong = s);