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C7B,OAAO,EAAO,EAEhB,CACA,CA/QD,CA+QG","file":"/npm/util-js@1.0.5/src/Util.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/util-js@1.0.5/src/Util.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\n * Copyright 2012 Martin Gallagher\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n * use this file except in compliance with the License. You may obtain a copy of\n * the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */\n(function ($, undefined) {\n\t'use strict';\n\n\t/**\n\t * Style.js major version\n\t * @private\n\t * @constant\n\t * @type {Number}\n\t */\n\tvar VERSION_MAJOR = 1;\n\n\t/**\n\t * Style.js minor version\n\t * @private\n\t * @constant\n\t * @type {Number}\n\t */\n\tvar VERSION_MINOR = 0;\n\n\t/**\n\t * Style.js patch version\n\t * @private\n\t * @constant\n\t * @type {Number}\n\t */\n\tvar VERSION_PATCH = 0;\n\n\t// Local copy\n\tvar Util = function () {};\n\n\t// Globalisation\n\t$.Util = Util;\n\n\t/**\n\t * Returns version of library\n\t * @static\n\t * @returns {String}\n\t */\n\tUtil.getVersion = function () {\n\t\treturn VERSION_MAJOR + '.' + VERSION_MINOR + '.' + VERSION_PATCH;\n\t};\n\n\t/**\n\t * Checks if value is empty\n\t * @private\n\t * @param {mixed} value\n\t * @returns {Boolean}\n\t */\n\tUtil.empty = function (value) {\n\t\treturn !value || (Type.isString(value) && value === '') || (Type.isArray(value) && value.length === 0);\n\t};\n\n\t/**\n\t * Check if a number is between two numbers\n\t * @param {Number} min Minium value\n\t * @param {Number} max Maxium value\n\t * @returns {Boolean}\n\t */\n\tNumber.prototype.between = function (min, max) {\n\t\treturn this >= min && this <= max;\n\t};\n\n\t/**\n\t * Round a number to a given number of decimal places\n\t * @param {Number} decimalPlaces Number of decimal places\n\t * @returns {Number} Rounded number\n\t */\n\tNumber.prototype.round = function (decimalPlaces) {\n\t\tvar multiplier = parseInt('1'.padRight('0', decimalPlaces + 1), 10);\n\n\t\treturn Math.round(this * multiplier) / multiplier;\n\t};\n\n\t/**\n\t * Upper case the first character of the string\n\t * @returns {String}\n\t */\n\tString.prototype.upperCaseFirst = function () {\n\t\treturn this.charAt(0).toUpperCase() + this.slice(1);\n\t};\n\n\t/**\n\t * Trim white space from the string\n\t * @returns {String}\n\t */\n\tString.prototype.trim = function () {\n\t\treturn this.replace(/^[\\s]+|[\\s]+$/g, '');\n\t};\n\n\t/**\n\t * Pad a string with a given character\n\t * @param {String} character Character used to pad\n\t * @param {Number} length Desired length of string to return\n\t * @param {String} direction The end to pad: left (prepend) or right (append)\n\t * @returns {String}\n\t */\n\tString.prototype.pad = function (character, length, direction) {\n\t\tvar out = this;\n\n\t\tif (this.length < length && character.length === 1 && (direction === undefined || direction === 'left' || direction === 'right')) {\n\t\t\tvar count = length - this.length;\n\n\t\t\tif (!direction || direction === 'right') {\n\t\t\t\twhile (count--) {\n\t\t\t\t\tout += character;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile (count--) {\n\t\t\t\t\tout = character + out;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn out;\n\t};\n\n\t/**\n\t * Right pad a string with a given character\n\t * @param {String} character Character used to pad\n\t * @param {Number} length Desired length of string to return\n\t * @returns {String}\n\t */\n\tString.prototype.padRight = function (character, length) {\n\t\treturn this.pad(character, length, 'right');\n\t};\n\n\t/**\n\t * Left pad a string with a given character\n\t * @param {String} character Character used to pad\n\t * @param {Number} length Desired length of string to return\n\t * @returns {String}\n\t */\n\tString.prototype.padLeft = function (character, length) {\n\t\treturn this.pad(character, length, 'left');\n\t};\n\n\t/**\n\t * Return array containing only unique values\n\t * @returns {Array}\n\t */\n\tArray.prototype.unique = function () {\n\t\tvar assoc = {}, out = [], len = this.length;\n\n\t\tfor (var i = 0; i < len; ++i) {\n\t\t\tif (!assoc.hasOwnProperty(this[i])) {\n\t\t\t\tout.push(this[i]);\n\n\t\t\t\tassoc[this[i]] = true;\n\t\t\t}\n\t\t}\n\n\t\treturn out;\n\t};\n\n\t/**\n\t * Return to maximum numerical value in the array\n\t * @returns {Number}\n\t */\n\tArray.prototype.max = function () {\n\t\treturn Math.max.apply(Math, this);\n\t};\n\n\t/**\n\t * Return to minimum numerical value in the array\n\t * @returns {Number}\n\t */\n\tArray.prototype.min = function () {\n\t\treturn Math.min.apply(Math, this);\n\t};\n\n\t/**\n\t * Return the sum total of numeric values in the array\n\t * @param {Boolean} disableTypeSafe If true do numerical comparison using \"==\"\n\t * @returns {Number}\n\t */\n\tArray.prototype.sum = function (disableTypeSafe) {\n\t\tvar total = 0;\n\t\tvar len = this.length;\n\n\t\tif (len > 0) {\n\t\t\tfor (var i = 0; i < len; ++i) {\n\t\t\t\tif (Type.isNumber(this[i], disableTypeSafe)) {\n\t\t\t\t\ttotal += this[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn total;\n\t};\n\n\t/**\n\t * Return the average of numeric values in the array\n\t * @param {Boolean} disableTypeSafe If true do numerical comparison using \"==\"\n\t * @returns {Number}\n\t */\n\tArray.prototype.average = function (disableTypeSafe) {\n\t\tvar len = this.length;\n\n\t\tif (len > 0) {\n\t\t\treturn this.sum(disableTypeSafe) / len;\n\t\t}\n\t};\n\n\t/**\n\t * Check if the array contains the value provided\n\t * @param {mixed} value\n\t * @param {Boolean} disableTypeSafe If true do numerical comparison using \"==\"\n\t * @returns {Boolean}\n\t */\n\tArray.prototype.contains = function (value, disableTypeSafe) {\n\t\tvar i = this.length;\n\n\t\tif (disableTypeSafe !== true) {\n\t\t\twhile (i--) {\n\t\t\t\tif (this[i] === value) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\twhile (i--) {\n\t\t\t\tif (this[i] == value) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t};\n\n\t/**\n\t * Shuffle the Array items\n\t * @returns {Array}\n\t */\n\tArray.prototype.shuffle = function () {\n\t\tvar out = this;\n\n\t\tfor (var j, x, i = out.length; i; j = parseInt(Math.random() * i), x = out[--i], out[i] = out[j], out[j] = x);\n\n\t\treturn out;\n\t};\n\n\t/**\n\t * Return the sum total of numeric values in the Object\n\t * @param {Boolean} multidimensional If true process the child objects\n\t * @returns {Object}\n\t */\n\tObject.prototype.sum = function (multidimensional) {\n\t\tvar total = 0;\n\n\t\tfor (var i in this) {\n\t\t\tif (Type.isNumber(this[i])) {\n\t\t\t\ttotal += this[i];\n\t\t\t} else if (Type.isArray(this[i]) || (multidimensional === true && Type.isObject(this[i]))) {\n\t\t\t\ttotal += this[i].sum(multidimensional);\n\t\t\t}\n\t\t}\n\n\t\treturn total;\n\t};\n\n\t/**\n\t * Gets the object's type if there's a constructor function\n\t * @returns {String} The object's type\n\t */\n\tObject.prototype.getType = function () {\n\t\tvar result = /function (.+)\\(/.exec(this.constructor);\n\n\t\tif (result && result.length > 1) {\n\t\t\treturn result[1];\n\t\t}\n\t};\n})(this);"]}