-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathUraniumJS.min.js
More file actions
1 lines (1 loc) · 17.7 KB
/
UraniumJS.min.js
File metadata and controls
1 lines (1 loc) · 17.7 KB
1
!function(){var t={exports:{}},e=function t(){if(!(this instanceof t))return new t;this.BMC_LENGTH_=t.config.BMC_LENGTH,this.BMC_CODE_=t.config.BMC_CODE,this.FIRST_BYTE_MASK_=t.config.FIRST_BYTE_MASK,this.INTEGRITY_BYTE_MASK_=t.config.INTEGRITY_BYTE_MASK,this.READING_BYTE_MASK_=t.config.READING_BYTE_MASK,this.char_code_=0,this.char_length_=0,this.needed_bytes_=0,this.temp_bytes_=new Uint8Array(4)};e.prototype.imul=Math.imul,(e.config={}).BMC_LENGTH=Uint8Array.of(0,127,192,224,240),e.config.BMC_CODE=Uint32Array.of(0,128,2048,65536,2097152),e.config.FIRST_BYTE_MASK=Uint8Array.of(0,1,3,7,15),e.config.INTEGRITY_BYTE_MASK=Uint8Array.of(0,64,32,16,8),e.config.READING_BYTE_MASK=Uint8Array.of(0,63,31,15,7),Object.defineProperty(e.prototype,"char_code",{get:function(){return 65535&this.char_code_},set:function(t){this.char_code_=65535&t}}),Object.defineProperty(e.prototype,"char_length",{get:function(){return 4294967295&this.char_length_},set:function(t){this.char_length_=4294967295&t}}),Object.defineProperty(e.prototype,"needed_bytes",{get:function(){return 4294967295&this.needed_bytes_},set:function(t){this.needed_bytes_=4294967295&t}}),Object.defineProperty(e.prototype,"set_temp_byte",{get:function(){return function(t,e){this.temp_bytes_[0|t]=255&e}}}),Object.defineProperty(e.prototype,"set_temp_byte_length",{get:function(){return function(t){this.temp_bytes_=new Uint8Array(0|t)}}}),Object.defineProperty(e.prototype,"set_temp_bytes",{get:function(){return function(t,e){this.temp_bytes_.set(t,0|e)}}}),Object.defineProperty(e.prototype,"temp_bytes_subarray",{get:function(){return function(t,e){return this.temp_bytes_.subarray(0|t,0|e)}}}),Object.defineProperty(e.prototype,"BMC_LENGTH_E",{get:function(){return function(t){return 255&this.BMC_LENGTH_[0|t]}}}),Object.defineProperty(e.prototype,"BMC_CODE_E",{get:function(){return function(t){return 4294967295&this.BMC_CODE_[0|t]}}}),Object.defineProperty(e.prototype,"FIRST_BYTE_MASK_E",{get:function(){return function(t){return 15&this.FIRST_BYTE_MASK_[0|t]}}}),Object.defineProperty(e.prototype,"INTEGRITY_BYTE_MASK_E",{get:function(){return function(t){return 255&this.INTEGRITY_BYTE_MASK_[0|t]}}}),Object.defineProperty(e.prototype,"READING_BYTE_MASK_E",{get:function(){return function(t){return 255&this.READING_BYTE_MASK_[0|t]}}}),e.prototype._getCharLength=function(t){return this.BMC_LENGTH_E(4)==(t&this.BMC_LENGTH_E(4))?4:this.BMC_LENGTH_E(3)==(t&this.BMC_LENGTH_E(3))?3:this.BMC_LENGTH_E(2)==(t&this.BMC_LENGTH_E(2))?2:t==(t&this.BMC_LENGTH_E(1))?1:0},e.prototype._getBytesForCharCode=function(t){if(t<this.BMC_CODE_E(1))return 1;if(t<this.BMC_CODE_E(2))return 2;if(t<this.BMC_CODE_E(3))return 3;if(t<this.BMC_CODE_E(4))return 4;throw new Error("CharCode "+t+" cannot be encoded with UTF8.")},e.prototype._setBytesFromCharCode=function(t,e,r,n){if(r|=0,n|=0,this.char_code=0|t,this.needed_bytes=0==(0|n)?this._getBytesForCharCode(this.char_code):0|n,1==(0|this.needed_bytes))this.set_temp_byte(0|r,0|this.char_code);else for(this.needed_bytes=this.needed_bytes-1|0,this.set_temp_byte(0|r,(this.FIRST_BYTE_MASK_E(this.needed_bytes)<<8-this.needed_bytes)+(this.char_code>>>6*this.needed_bytes)|0),r=r+1|0;(0|this.needed_bytes)>0;)this.needed_bytes=this.needed_bytes-1|0,this.set_temp_byte(0|r,128|this.char_code>>>6*this.needed_bytes&63),r=r+1|0},e.prototype.toUint8Array=function(t,e,r,n,i){t=t||"",r|=0,this.set_temp_byte_length(3*t.length+2),void 0!==e&&this.set_temp_bytes(e,0),n="number"==typeof n?n:1/0;for(var o=0,s=0|t.length;(0|o)<(0|s);o=(o+1|0)>>>0)this.needed_bytes=this._getBytesForCharCode(t[o].codePointAt(0)),this._setBytesFromCharCode(t[0|o].codePointAt(0),this.temp_bytes_subarray(0,0|r),0|r,0|this.needed_bytes,i),r=r+this.needed_bytes|0;return this.temp_bytes_subarray(0,0|r)},e.prototype._getCharCode=function(t,e,r){if(this.char_code=0,e|=0,this.char_length=0==(0|r)?this._getCharLength(0|t[0|e]):0|r,1==(0|this.char_length))return 0|t[0|e];for(this.char_length=this.char_length-1|0,this.char_code=this.char_code+((t[0|e]&this.READING_BYTE_MASK_E(this.char_length))<<6*this.char_length)|0;this.char_length;)e=e+1|0,this.char_length=this.char_length-1|0,this.char_code=this.char_code+((63&t[0|e])<<6*this.char_length)|0;return 0|this.char_code},e.prototype.fromUint8Array=function(t,e,r,n){this.char_length=0;var i="";for(e|=0,r="number"==typeof r?r:t.byteLength||0|t.length;(0|e)<(0|r);(e=e+1|0)>>>0){if(this.char_length=this._getCharLength(t[e]),n&&(e+this.char_length|0)>(0|r))throw Error("Index "+e+": Found a "+this.char_length+" bytes encoded char declaration but only "+(r-e)+" bytes are available.");i=i.concat(String.fromCodePoint(this._getCharCode(t,0|e,0|this.char_length,n))),e=e+this.char_length-1|0}return i},e.prototype.isNotUTF8=function(t,e,r){try{this.fromUint8Array(t,e,r,!0)}catch(n){return!0}return!1};var r=function t(e,r){if(!(this instanceof t))return new t(e);if("BASE64"!=(r=(r=r||"UNKNOWN").toUpperCase()))if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)this.storage_input_=e;else if("string"==typeof e)this.storage_input_=t.UTFX.toUint8Array(e);else if(void 0!==e.buffer||e instanceof ArrayBuffer)this.storage_input_=new Uint8Array(e instanceof ArrayBuffer?e:e.buffer);else if(e instanceof Array)this.storage_input_=Uint8Array.from(e);else{if("object"!=typeof e)throw new TypeError("attempted to parse failed");this.storage_input_=t.JSONX.stringify(e)}else this.storage_input_=t.BASE64.toUint8Array(e);return this.storage_input_length_=0|e.length,this.TILD_CHAR_CODE_=t.config.TILD_CHAR_CODE,this.BACKSLASH_CHAR_=t.config.BACKSLASH_CHAR,this.SLASH_CHAR_=t.config.SLASH_CHAR,this.CHUNCK_LENGTH_=t.config.CHUNCK_LENGTH,this.ENCODE_MAPPING_=t.config.ENCODE_MAPPING,this.DECODE_MAPPING_=t.config.DECODE_MAPPING,this};r.JSONX=JSON,r.UTF8=new e,r.UTFX=r.UTF8,(r.config={}).TILD_CHAR_CODE=126,r.config.BACKSLASH_CHAR=String.fromCharCode(92),r.config.SLASH_CHAR=String.fromCharCode(47),r.config.CHUNCK_LENGTH=256,r.config.ENCODE_MAPPING=Uint8Array.of(33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),r.config.DECODE_MAPPING=Uint8Array.of(255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,255,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,255,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255),Object.defineProperty(r.prototype,"getCharCodeAt",{get:function(){return function(t){return t|=0,this.storage_input_[0|t]}}}),Object.defineProperty(r.prototype,"getDecodedCharCodeAt",{get:function(){return function(t){return t|=0,this.DECODE_MAPPING_[this.storage_input_[0|t]]}}}),Object.defineProperty(r.prototype,"decodeChar",{get:function(){return function(t){return t|=0,this.DECODE_MAPPING_[0|t]}}}),Object.defineProperty(r.prototype,"encodeChar",{get:function(){return function(t){return t|=0,this.ENCODE_MAPPING_[0|t]}}}),Object.defineProperty(r.prototype,"inputLength",{get:function(){return 0|this.storage_input_length_}}),Object.defineProperty(r.prototype,"BACKSLASH_CHAR",{get:function(){return this.BACKSLASH_CHAR_}}),Object.defineProperty(r.prototype,"SLASH_CHAR",{get:function(){return this.SLASH_CHAR_}}),Object.defineProperty(r.prototype,"CHUNCK_LENGTH",{get:function(){return this.CHUNCK_LENGTH_}}),Object.defineProperty(r.prototype,"TILD_CHAR_CODE",{get:function(){return this.TILD_CHAR_CODE_}}),(r.utils={}).onlyCharPrintable=function(t){return t.replace(/[\u0000-\u0019]+/g,"")},r.utils.onlyCharParsable=function(t){return t.replace(/\\n/g,"\\n").replace(/\\'/g,"\\'").replace(/\\"/g,'\\"').replace(/\\&/g,"\\&").replace(/\\r/g,"\\r").replace(/\\t/g,"\\t").replace(/\\b/g,"\\b").replace(/\\f/g,"\\f")},r.utils.MAGIC_WORD="UraniumJS! ",r.utils.parse=function(t){return r.JSONX.parse(r.utils.onlyCharParsable(t))},r.utils.stringify=function(t){return r.utils.onlyCharPrintable(r.JSONX.stringify(t))},r.utils.escape=function(t){return t=(t=(t=t.replaceAll(r.config.BACKSLASH_CHAR," ")).replaceAll(r.config.SLASH_CHAR,"~")).replaceAll("$","\xa1"),r.utils.MAGIC_WORD+t.replaceAll("'","\xa7")},r.utils.unescape=function(t){return(t=(t=(t=(t=t.replaceAll(r.utils.MAGIC_WORD,"")).replaceAll("\xa7","'")).replaceAll("\xa1","$")).replaceAll("~",r.config.SLASH_CHAR)).replaceAll(" ",r.config.BACKSLASH_CHAR)},r.prototype.encode=function(t){t=""+t;var e=0,n=0,i=(8*this.inputLength|0)%13|0,o=0,s=0,h=0,a=0;if(0==(0|this.inputLength))switch(t.replaceAll("-","").toUpperCase()){case"UINT8ARRAY":return Uint8Array.of(this.TILD_CHAR_CODE);case"BASE64":return r.BASE64.fromUint8Array(Uint8Array.of(this.TILD_CHAR_CODE));default:return this.TILD_CHAR_CODE}i=0==(0|i)?2*(8*this.inputLength/13|0)|0:(0|i)<7?2*(8*this.inputLength/13|0)+1|0:2*(8*this.inputLength/13|0)+2|0;for(var _=new Uint8Array(0|i);(0|e)<(0|this.inputLength);e=(e+1|0)>>>0)if(o=o<<8|this.getCharCodeAt(0|e),(0|(s=s+8|0))>=13){if(h=o>>(s-13|0)&8191,0==(0|(a=255&this.encodeChar(h/91|0))))return null;if(_[0|n]=255&a,n=(n+1|0)>>>0,0==(0|(a=255&this.encodeChar(h%91|0))))return null;_[0|n]=255&a,n=(n+1|0)>>>0,s=s-13|0}if(0<(0|s)&&(0|s)<7){if(h=o<<(6-s|0)&63,0==(0|(a=255&this.encodeChar(0|h))))return null;_[0|n]=255&a}else if(7<=(0|s)){if(h=o<<(13-s|0)&8191,0==(0|(a=this.encodeChar(h/91|0))))return null;if(_[0|n]=255&a,n=(n+1|0)>>>0,0==(0|(a=255&this.encodeChar(h%91|0))))return null;_[0|n]=255&a}switch(t.replaceAll("-","").toUpperCase()){case"UINT8ARRAY":return _.slice(0,0|_.length);case"BASE64":return r.BASE64.fromUint8Array(_.slice(0,0|_.length));default:return r.UTFX.fromUint8Array(_.slice(0,0|_.length))}},r.prototype.decode=function(t){t=""+t;var e=0,n=0,i=0,o=0,s=(this.inputLength/2*13+this.inputLength%2*6)/8|0,h=new Uint8Array(s);if(0==(this.getCharCodeAt(0)-this.TILD_CHAR_CODE|0)||0==(0|this.inputLength))switch(t.replaceAll("-","").toUpperCase()){case"UTF8":return this.TILD_CHAR_CODE;case"BASE64":return r.BASE64.fromUint8Array(Uint8Array.of(this.TILD_CHAR_CODE));default:return Uint8Array.of(this.TILD_CHAR_CODE)}if((0|this.inputLength)<2)switch(t.replaceAll("-","").toUpperCase()){case"UTF8":case"BASE64":return"";default:return Uint8Array.of()}for(i=0,o=0,n=0,e=0;(e+1|0)<(0|this.inputLength);e=(e+2|0)>>>0)for(i=i<<13|91*this.getDecodedCharCodeAt(0|e)+this.getDecodedCharCodeAt(e+1|0)|0,o=o+13|0;(0|o)>=8;)h[0|n]=i>>o-8&255,n=n+1|0,o=o-8|0;if(1==(this.inputLength%2|0))for(i=i<<6|this.getDecodedCharCodeAt(this.inputLength-1|0),o=o+6|0;(0|o)>=8;)h[0|n]=i>>o-8&255,n=n+1|0,o=o-8|0;switch(t.replaceAll("-","").toUpperCase()){case"UTF8":return r.UTFX.fromUint8Array(h.slice(0,0|h.length));case"JS":return r.JSONX.stringify(h.slice(0,0|h.length));case"BASE64":return r.BASE64.fromUint8Array(h.slice(0,0|h.length));default:return h.slice(0,0|h.length)}};var n=function t(){if(!(this instanceof t))return new t;this.CHUNCK_LENGTH_=t.config.CHUNCK_LENGTH,this.BASE64ABCCC_=t.config.BASE64ABCCC,this.B64C_=t.config.B64C,this.B64EC_=t.config.B64EC,this.B64CL_=t.config.B64CL};Object.defineProperty(n.prototype,"CHUNCK_LENGTH",{get:function(){return 0|this.CHUNCK_LENGTH_}}),Object.defineProperty(n.prototype,"BASE64ABCCC_E",{get:function(){return function(t){return 255&this.BASE64ABCCC_[0|t]}}}),Object.defineProperty(n.prototype,"B64C_E",{get:function(){return function(t){return 255&this.B64C_[0|t]}}}),Object.defineProperty(n.prototype,"B64EC",{get:function(){return 0|this.B64EC_}}),Object.defineProperty(n.prototype,"B64CL",{get:function(){return 0|this.B64CL_}}),(n.config={}).BASE64ABCCC=Uint8Array.of(65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47),n.config.CHUNCK_LENGTH=256,n.config.B64EC=255,n.config.B64C=Uint8Array.of(255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,62,255,255,255,63,52,53,54,55,56,57,58,59,60,61,255,255,255,0,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255,255,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51),n.config.B64CL=123,n.prototype.fromUint8Array=function(t){"use strict";var e=2,r=0,n=0|t.length,i=(Math.floor(n/3),4*Math.ceil(n/3)|0),o=new Uint8Array(0|i);for(e=2,r=0;(0|e)<(0|n);e=(e+3|0)>>>0,r=(r+4|0)>>>0)o.set(Uint8Array.of(255&this.BASE64ABCCC_E(t[e-2|0]>>2),255&this.BASE64ABCCC_E((3&t[e-2|0])<<4|t[e-1|0]>>4),255&this.BASE64ABCCC_E((15&t[e-1|0])<<2|t[e]>>6),255&this.BASE64ABCCC_E(63&t[0|e])),0|r);(0|e)==(n+1|0)&&(o[0|r]=255&this.BASE64ABCCC_E(t[e-2|0]>>2),o[r+1|0]=255&this.BASE64ABCCC_E((3&t[e-2|0])<<4),o[r+2|0]=255&"=".charCodeAt(0),o[r+3|0]=255&"=".charCodeAt(0),r=(r+4|0)>>>0),(0|e)==(0|n)&&(o[0|r]=255&this.BASE64ABCCC_E(t[e-2|0]>>2),o[r+1|0]=255&this.BASE64ABCCC_E((3&t[e-2|0])<<4|t[e-1|0]>>4),o[r+2|0]=255&this.BASE64ABCCC_E((15&t[e-1|0])<<2),o[r+3|0]=255&"=".charCodeAt(0));var s="",h=0|o.length;for(e=0;(0|e)<(0|h);e=(e+this.CHUNCK_LENGTH|0)>>>0)s=s.concat(String.fromCharCode.apply(null,o.subarray(0|e,Math.min(e+this.CHUNCK_LENGTH|0,0|h))));return s},n._charCodeAt=function(t){return 255&t.charCodeAt(0)},n.prototype._getBase64CodesBufferResults=function(t){return Uint8Array.of(t>>16&255,t>>8&255,255&t)},n.prototype._getBase64CodesBufferResultsBy4=function(t,e,r,n){return Uint8Array.of(t>>16&255,t>>8&255,255&t,e>>16&255,e>>8&255,255&e,r>>16&255,r>>8&255,255&r,n>>16&255,n>>8&255,255&n)},n.prototype._getBase64Code=function(t){if((0|(t=255&(0|t)))>>>0>=(0|this.B64CL)>>>0)throw new Error("Unable to parse base64 string.");var e=(0|this.B64C_E(0|t))>>>0;if((0|e)>>>0==(0|this.B64EC)>>>0)throw new Error("Unable to parse base64 string.");return 255&(0|e)},n.prototype._getBase64CodesBuffer=function(t){return(this._getBase64Code(t[0])<<18|this._getBase64Code(t[1])<<12|this._getBase64Code(t[2])<<6|this._getBase64Code(t[3])|0)>>>0},n.prototype.toUint8Array=function(t){if((t.length%4|0)>0)throw new Error("Unable to parse base64 string.");var e=0|t.indexOf("=");if((0|e)>-1&&(0|e)<(t.length-2|0))throw new Error("Unable to parse base64 string.");for(var r=Uint8ClampedArray.from(t.split("").map((function(t){return n._charCodeAt(t)}))),i=t.endsWith("==")?2:t.endsWith("=")?1:0,o=0|t.length,s=new Uint8ClampedArray(o/4*3|0),h=new Uint8ClampedArray(16),a=0,_=0;(a+16|0)<(0|o);a=(a+16|0)>>>0,_=(_+12|0)>>>0)h.set(r.subarray(0|a,a+16|0)),s.set(this._getBase64CodesBufferResultsBy4(this._getBase64CodesBuffer(h.subarray(0,4)),this._getBase64CodesBuffer(h.subarray(4,8)),this._getBase64CodesBuffer(h.subarray(8,12)),this._getBase64CodesBuffer(h.subarray(12,16))),0|_);for(;(0|a)<(0|o);a=(a+4|0)>>>0,_=(_+3|0)>>>0)s.set(this._getBase64CodesBufferResults(this._getBase64CodesBuffer(r.subarray(0|a,a+4|0))),0|_);return s.slice(0,s.length-i|0)},r.BASE64=new n,r.enrichFunctionCalls=[],r.withinEnrich=function(t){function e(t){return void 0!==t.slice?t.slice(0,t.length):Uint8Array.from(t)}return t=e(t),Array.from(r.enrichFunctionCalls).forEach((function(r){t=e(r(t))})),t},r.depleteFunctionCalls=[],r.withinDeplete=function(t){function e(t){return void 0!==t.slice?t.slice(0,t.length):Uint8Array.from(t)}return t=e(t),Array.from(r.depleteFunctionCalls).reverse().forEach((function(r){t=e(r(t))})),t},r.enrichString=function(t,e){var n=t.length,i=Date.now();t=r.utils.stringify(t),t=r.UTFX.toUint8Array(t);var o=Date.now();t=r.withinEnrich(t);var s=Date.now();t=new r(t).encode(),t=r.utils.escape(t);var h=Date.now(),a=t.length;return e&&console.log("Parsing: "+(i-o|0)+"ms, \nCompressing: "+(o-s|0)+"ms, \nEncoding: "+(s-h)+"ms, \n\nTotal: "+(i-h|0)+"ms for "+(100-a/n*100|0)+"% ENRICHMENT!"),t},r.stringDeplete=function(t,e){var n=t.length,i=Date.now();t=r.utils.unescape(t),t=new r(t).decode();var o=Date.now();t=r.withinDeplete(t);var s=Date.now();t=r.UTFX.fromUint8Array(t),t=r.utils.parse(t);var h=Date.now(),a=t.length;return e&&console.log("Unescape: "+(i-o|0)+"ms, \nCompressing: "+(o-s|0)+"ms, \nParsing: "+(s-h)+"ms, \n\nTotal: "+(i-h|0)+"ms for "+(a/n*100|0)+"% DEPvarION!"),t},r.enrichObject=function(t,e){return t=r.JSONX.stringify(t),r.enrichString(t,e)},r.objectDeplete=function(t,e){return t=r.stringDeplete(t,e),r.JSONX.parse(t)},r.enrichBuffer=function(t,e,n){var i=t.length||t.byteLength,o=Date.now();t=r.withinEnrich(t);var s=Date.now();e&&(t=new r(t).encode(),t=r.utils.escape(t));var h=Date.now(),a=t.length;return n&&console.log("Compressing: "+(o-s|0)+"ms, \nEncoding: "+(s-h)+"ms, \n\nTotal: "+(o-h|0)+"ms for "+(100-a/i*100|0)+"% ENRICHMENT!"),t},r.bufferDeplete=function(t,e,n){var i=t.length||t.byteLength,o=Date.now();e&&(t=r.utils.unescape(t),t=new r(t).decode());var s=Date.now();t=r.withinDeplete(t);var h=Date.now(),a=t.length;return n&&console.log("Unescape: "+(o-s|0)+"ms, \nCompressing: "+(s-h|0)+"ms \n\nTotal: "+(o-h|0)+"ms for "+(a/i*100|0)+"% DEPvarION!"),t},t.exports=r,t=t.exports}();