diff --git a/bigbluebutton-html5/public/compatibility/kurento-utils.js b/bigbluebutton-html5/public/compatibility/kurento-utils.js index b1c816b7dd5be85849b6212eb5f324ec08112485..67542dee3085ed21d90af8f901fefd2de22262c8 100755 --- a/bigbluebutton-html5/public/compatibility/kurento-utils.js +++ b/bigbluebutton-html5/public/compatibility/kurento-utils.js @@ -1248,7 +1248,7 @@ if (typeof Object.create === 'function') { },{}],11:[function(require,module,exports){ /*! - * @name JavaScript/NodeJS Merge v1.2.0 + * @name JavaScript/NodeJS Merge v2.1.1 * @author yeikos * @repository https://github.com/yeikos/js.merge @@ -1256,172 +1256,89 @@ if (typeof Object.create === 'function') { * https://raw.github.com/yeikos/js.merge/master/LICENSE */ -;(function(isNode) { - - /** - * Merge one or more objects - * @param bool? clone - * @param mixed,... arguments - * @return object - */ - - var Public = function(clone) { - - return merge(clone === true, false, arguments); - - }, publicName = 'merge'; - - /** - * Merge two or more objects recursively - * @param bool? clone - * @param mixed,... arguments - * @return object - */ - - Public.recursive = function(clone) { - - return merge(clone === true, true, arguments); - - }; - - /** - * Clone the input removing any reference - * @param mixed input - * @return mixed - */ - - Public.clone = function(input) { - - var output = input, - type = typeOf(input), - index, size; - - if (type === 'array') { - - output = []; - size = input.length; - - for (index=0;index<size;++index) - - output[index] = Public.clone(input[index]); - - } else if (type === 'object') { - - output = {}; - - for (index in input) - - output[index] = Public.clone(input[index]); - - } - - return output; - - }; - - /** - * Merge two objects recursively - * @param mixed input - * @param mixed extend - * @return mixed - */ - - function merge_recursive(base, extend) { - - if (typeOf(base) !== 'object') - - return extend; - - for (var key in extend) { - - if (typeOf(base[key]) === 'object' && typeOf(extend[key]) === 'object') { - - base[key] = merge_recursive(base[key], extend[key]); - - } else { - - base[key] = extend[key]; - - } - - } - - return base; - - } - - /** - * Merge two or more objects - * @param bool clone - * @param bool recursive - * @param array argv - * @return object - */ - - function merge(clone, recursive, argv) { - - var result = argv[0], - size = argv.length; - - if (clone || typeOf(result) !== 'object') - - result = {}; - - for (var index=0;index<size;++index) { - - var item = argv[index], - - type = typeOf(item); - - if (type !== 'object') continue; - - for (var key in item) { - - var sitem = clone ? Public.clone(item[key]) : item[key]; - - if (recursive) { - - result[key] = merge_recursive(result[key], sitem); - - } else { - - result[key] = sitem; - - } - - } - - } - - return result; - - } - - /** - * Get type of variable - * @param mixed input - * @return string - * - * @see http://jsperf.com/typeofvar - */ - - function typeOf(input) { - - return ({}).toString.call(input).slice(8, -1).toLowerCase(); - - } - - if (isNode) { - - module.exports = Public; - - } else { - - window[publicName] = Public; - - } +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isPlainObject = exports.clone = exports.recursive = exports.merge = exports.main = void 0; +module.exports = exports = main; +exports.default = main; +function main() { + var items = []; + for (var _i = 0; _i < arguments.length; _i++) { + items[_i] = arguments[_i]; + } + return merge.apply(void 0, items); +} +exports.main = main; +main.clone = clone; +main.isPlainObject = isPlainObject; +main.recursive = recursive; +function merge() { + var items = []; + for (var _i = 0; _i < arguments.length; _i++) { + items[_i] = arguments[_i]; + } + return _merge(items[0] === true, false, items); +} +exports.merge = merge; +function recursive() { + var items = []; + for (var _i = 0; _i < arguments.length; _i++) { + items[_i] = arguments[_i]; + } + return _merge(items[0] === true, true, items); +} +exports.recursive = recursive; +function clone(input) { + if (Array.isArray(input)) { + var output = []; + for (var index = 0; index < input.length; ++index) + output.push(clone(input[index])); + return output; + } + else if (isPlainObject(input)) { + var output = {}; + for (var index in input) + output[index] = clone(input[index]); + return output; + } + else { + return input; + } +} +exports.clone = clone; +function isPlainObject(input) { + return input && typeof input === 'object' && !Array.isArray(input); +} +exports.isPlainObject = isPlainObject; +function _recursiveMerge(base, extend) { + if (!isPlainObject(base)) + return extend; + for (var key in extend) { + if (key === '__proto__' || key === 'constructor' || key === 'prototype') + continue; + base[key] = (isPlainObject(base[key]) && isPlainObject(extend[key])) ? + _recursiveMerge(base[key], extend[key]) : + extend[key]; + } + return base; +} +function _merge(isClone, isRecursive, items) { + var result; + if (isClone || !isPlainObject(result = items.shift())) + result = {}; + for (var index = 0; index < items.length; ++index) { + var item = items[index]; + if (!isPlainObject(item)) + continue; + for (var key in item) { + if (key === '__proto__' || key === 'constructor' || key === 'prototype') + continue; + var value = isClone ? clone(item[key]) : item[key]; + result[key] = isRecursive ? _recursiveMerge(result[key], value) : value; + } + } + return result; +} -})(typeof module === 'object' && module && typeof module.exports === 'object' && module.exports); },{}],12:[function(require,module,exports){ /** # normalice