|
|
@ -9800,7 +9800,7 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) { |
|
|
|
})( window );/** |
|
|
|
})( window );/** |
|
|
|
* @license |
|
|
|
* @license |
|
|
|
* Lodash (Custom Build) <https://lodash.com/>
|
|
|
|
* Lodash (Custom Build) <https://lodash.com/>
|
|
|
|
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range"` |
|
|
|
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random"` |
|
|
|
* Copyright JS Foundation and other contributors <https://js.foundation/>
|
|
|
|
* Copyright JS Foundation and other contributors <https://js.foundation/>
|
|
|
|
* Released under MIT license <https://lodash.com/license>
|
|
|
|
* Released under MIT license <https://lodash.com/license>
|
|
|
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
|
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
|
@ -10032,7 +10032,8 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/** Built-in method references without a dependency on `root`. */ |
|
|
|
/** Built-in method references without a dependency on `root`. */ |
|
|
|
var freeParseInt = parseInt; |
|
|
|
var freeParseFloat = parseFloat, |
|
|
|
|
|
|
|
freeParseInt = parseInt; |
|
|
|
|
|
|
|
|
|
|
|
/** Detect free variable `global` from Node.js. */ |
|
|
|
/** Detect free variable `global` from Node.js. */ |
|
|
|
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; |
|
|
|
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; |
|
|
@ -10781,6 +10782,7 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) { |
|
|
|
|
|
|
|
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */ |
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */ |
|
|
|
var nativeCeil = Math.ceil, |
|
|
|
var nativeCeil = Math.ceil, |
|
|
|
|
|
|
|
nativeFloor = Math.floor, |
|
|
|
nativeGetSymbols = Object.getOwnPropertySymbols, |
|
|
|
nativeGetSymbols = Object.getOwnPropertySymbols, |
|
|
|
nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, |
|
|
|
nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, |
|
|
|
nativeIsFinite = root.isFinite, |
|
|
|
nativeIsFinite = root.isFinite, |
|
|
@ -10788,6 +10790,7 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) { |
|
|
|
nativeMax = Math.max, |
|
|
|
nativeMax = Math.max, |
|
|
|
nativeMin = Math.min, |
|
|
|
nativeMin = Math.min, |
|
|
|
nativeNow = Date.now, |
|
|
|
nativeNow = Date.now, |
|
|
|
|
|
|
|
nativeRandom = Math.random, |
|
|
|
nativeReverse = arrayProto.reverse; |
|
|
|
nativeReverse = arrayProto.reverse; |
|
|
|
|
|
|
|
|
|
|
|
/* Built-in method references that are verified to be native. */ |
|
|
|
/* Built-in method references that are verified to be native. */ |
|
|
@ -12584,6 +12587,19 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) { |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* The base implementation of `_.random` without support for returning |
|
|
|
|
|
|
|
* floating-point numbers. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @private |
|
|
|
|
|
|
|
* @param {number} lower The lower bound. |
|
|
|
|
|
|
|
* @param {number} upper The upper bound. |
|
|
|
|
|
|
|
* @returns {number} Returns the random number. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
function baseRandom(lower, upper) { |
|
|
|
|
|
|
|
return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* The base implementation of `_.range` and `_.rangeRight` which doesn't |
|
|
|
* The base implementation of `_.range` and `_.rangeRight` which doesn't |
|
|
|
* coerce arguments. |
|
|
|
* coerce arguments. |
|
|
@ -18056,6 +18072,78 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) { |
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------*/ |
|
|
|
/*------------------------------------------------------------------------*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Produces a random number between the inclusive `lower` and `upper` bounds. |
|
|
|
|
|
|
|
* If only one argument is provided a number between `0` and the given number |
|
|
|
|
|
|
|
* is returned. If `floating` is `true`, or either `lower` or `upper` are |
|
|
|
|
|
|
|
* floats, a floating-point number is returned instead of an integer. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* **Note:** JavaScript follows the IEEE-754 standard for resolving |
|
|
|
|
|
|
|
* floating-point values which can produce unexpected results. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @static |
|
|
|
|
|
|
|
* @memberOf _ |
|
|
|
|
|
|
|
* @since 0.7.0 |
|
|
|
|
|
|
|
* @category Number |
|
|
|
|
|
|
|
* @param {number} [lower=0] The lower bound. |
|
|
|
|
|
|
|
* @param {number} [upper=1] The upper bound. |
|
|
|
|
|
|
|
* @param {boolean} [floating] Specify returning a floating-point number. |
|
|
|
|
|
|
|
* @returns {number} Returns the random number. |
|
|
|
|
|
|
|
* @example |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* _.random(0, 5); |
|
|
|
|
|
|
|
* // => an integer between 0 and 5
|
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* _.random(5); |
|
|
|
|
|
|
|
* // => also an integer between 0 and 5
|
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* _.random(5, true); |
|
|
|
|
|
|
|
* // => a floating-point number between 0 and 5
|
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* _.random(1.2, 5.2); |
|
|
|
|
|
|
|
* // => a floating-point number between 1.2 and 5.2
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
function random(lower, upper, floating) { |
|
|
|
|
|
|
|
if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { |
|
|
|
|
|
|
|
upper = floating = undefined; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (floating === undefined) { |
|
|
|
|
|
|
|
if (typeof upper == 'boolean') { |
|
|
|
|
|
|
|
floating = upper; |
|
|
|
|
|
|
|
upper = undefined; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (typeof lower == 'boolean') { |
|
|
|
|
|
|
|
floating = lower; |
|
|
|
|
|
|
|
lower = undefined; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (lower === undefined && upper === undefined) { |
|
|
|
|
|
|
|
lower = 0; |
|
|
|
|
|
|
|
upper = 1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
|
|
|
|
lower = toFinite(lower); |
|
|
|
|
|
|
|
if (upper === undefined) { |
|
|
|
|
|
|
|
upper = lower; |
|
|
|
|
|
|
|
lower = 0; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
upper = toFinite(upper); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (lower > upper) { |
|
|
|
|
|
|
|
var temp = lower; |
|
|
|
|
|
|
|
lower = upper; |
|
|
|
|
|
|
|
upper = temp; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (floating || lower % 1 || upper % 1) { |
|
|
|
|
|
|
|
var rand = nativeRandom(); |
|
|
|
|
|
|
|
return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return baseRandom(lower, upper); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------*/ |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Converts the characters "&", "<", ">", '"', and "'" in `string` to their |
|
|
|
* Converts the characters "&", "<", ">", '"', and "'" in `string` to their |
|
|
|
* corresponding HTML entities. |
|
|
|
* corresponding HTML entities. |
|
|
@ -18591,6 +18679,7 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) { |
|
|
|
lodash.min = min; |
|
|
|
lodash.min = min; |
|
|
|
lodash.noConflict = noConflict; |
|
|
|
lodash.noConflict = noConflict; |
|
|
|
lodash.noop = noop; |
|
|
|
lodash.noop = noop; |
|
|
|
|
|
|
|
lodash.random = random; |
|
|
|
lodash.reduce = reduce; |
|
|
|
lodash.reduce = reduce; |
|
|
|
lodash.result = result; |
|
|
|
lodash.result = result; |
|
|
|
lodash.size = size; |
|
|
|
lodash.size = size; |
|
|
|