8
0
Piotrek Koszuliński 10 лет назад
Родитель
Сommit
bcf1db1461
100 измененных файлов с 2117 добавлено и 227 удалено
  1. 1 1
      packages/ckeditor5-utils/dev/tasks/lodash/tasks.js
  2. 1 1
      packages/ckeditor5-utils/package.json
  3. 5 0
      packages/ckeditor5-utils/src/lib/lodash/array.default.js
  4. 2 5
      packages/ckeditor5-utils/src/lib/lodash/array.js
  5. 46 0
      packages/ckeditor5-utils/src/lib/lodash/assignIn.js
  6. 39 0
      packages/ckeditor5-utils/src/lib/lodash/clone.js
  7. 35 0
      packages/ckeditor5-utils/src/lib/lodash/eq.js
  8. 1 0
      packages/ckeditor5-utils/src/lib/lodash/extend.js
  9. 5 0
      packages/ckeditor5-utils/src/lib/lodash/function.default.js
  10. 2 5
      packages/ckeditor5-utils/src/lib/lodash/function.js
  11. 17 0
      packages/ckeditor5-utils/src/lib/lodash/internal/Hash.js
  12. 7 0
      packages/ckeditor5-utils/src/lib/lodash/internal/Map.js
  13. 31 0
      packages/ckeditor5-utils/src/lib/lodash/internal/MapCache.js
  14. 6 0
      packages/ckeditor5-utils/src/lib/lodash/internal/Reflect.js
  15. 7 0
      packages/ckeditor5-utils/src/lib/lodash/internal/Set.js
  16. 31 0
      packages/ckeditor5-utils/src/lib/lodash/internal/Stack.js
  17. 6 0
      packages/ckeditor5-utils/src/lib/lodash/internal/Symbol.js
  18. 6 0
      packages/ckeditor5-utils/src/lib/lodash/internal/Uint8Array.js
  19. 14 0
      packages/ckeditor5-utils/src/lib/lodash/internal/addMapEntry.js
  20. 14 0
      packages/ckeditor5-utils/src/lib/lodash/internal/addSetEntry.js
  21. 22 0
      packages/ckeditor5-utils/src/lib/lodash/internal/apply.js
  22. 2 2
      packages/ckeditor5-utils/src/lib/lodash/internal/arrayEach.js
  23. 25 0
      packages/ckeditor5-utils/src/lib/lodash/internal/arrayReduce.js
  24. 3 4
      packages/ckeditor5-utils/src/lib/lodash/internal/arraySome.js
  25. 28 0
      packages/ckeditor5-utils/src/lib/lodash/internal/assignValue.js
  26. 31 0
      packages/ckeditor5-utils/src/lib/lodash/internal/assocDelete.js
  27. 16 0
      packages/ckeditor5-utils/src/lib/lodash/internal/assocGet.js
  28. 15 0
      packages/ckeditor5-utils/src/lib/lodash/internal/assocHas.js
  29. 22 0
      packages/ckeditor5-utils/src/lib/lodash/internal/assocIndexOf.js
  30. 20 0
      packages/ckeditor5-utils/src/lib/lodash/internal/assocSet.js
  31. 5 7
      packages/ckeditor5-utils/src/lib/lodash/internal/baseAssign.js
  32. 37 42
      packages/ckeditor5-utils/src/lib/lodash/internal/baseClone.js
  33. 23 0
      packages/ckeditor5-utils/src/lib/lodash/internal/baseCreate.js
  34. 3 4
      packages/ckeditor5-utils/src/lib/lodash/internal/baseForOwn.js
  35. 26 0
      packages/ckeditor5-utils/src/lib/lodash/internal/baseHas.js
  36. 12 10
      packages/ckeditor5-utils/src/lib/lodash/internal/baseIsEqual.js
  37. 23 42
      packages/ckeditor5-utils/src/lib/lodash/internal/baseIsEqualDeep.js
  38. 17 0
      packages/ckeditor5-utils/src/lib/lodash/internal/baseKeys.js
  39. 36 0
      packages/ckeditor5-utils/src/lib/lodash/internal/baseKeysIn.js
  40. 20 0
      packages/ckeditor5-utils/src/lib/lodash/internal/baseTimes.js
  41. 12 0
      packages/ckeditor5-utils/src/lib/lodash/internal/checkGlobal.js
  42. 19 0
      packages/ckeditor5-utils/src/lib/lodash/internal/cloneBuffer.js
  43. 17 0
      packages/ckeditor5-utils/src/lib/lodash/internal/cloneMap.js
  44. 19 0
      packages/ckeditor5-utils/src/lib/lodash/internal/cloneRegExp.js
  45. 17 0
      packages/ckeditor5-utils/src/lib/lodash/internal/cloneSet.js
  46. 18 0
      packages/ckeditor5-utils/src/lib/lodash/internal/cloneSymbol.js
  47. 18 0
      packages/ckeditor5-utils/src/lib/lodash/internal/cloneTypedArray.js
  48. 20 0
      packages/ckeditor5-utils/src/lib/lodash/internal/copyArray.js
  49. 16 0
      packages/ckeditor5-utils/src/lib/lodash/internal/copyObject.js
  50. 29 0
      packages/ckeditor5-utils/src/lib/lodash/internal/copyObjectWith.js
  51. 16 0
      packages/ckeditor5-utils/src/lib/lodash/internal/copySymbols.js
  52. 9 16
      packages/ckeditor5-utils/src/lib/lodash/internal/createAssigner.js
  53. 6 8
      packages/ckeditor5-utils/src/lib/lodash/internal/createBaseFor.js
  54. 38 17
      packages/ckeditor5-utils/src/lib/lodash/internal/equalArrays.js
  55. 45 5
      packages/ckeditor5-utils/src/lib/lodash/internal/equalByTag.js
  56. 37 22
      packages/ckeditor5-utils/src/lib/lodash/internal/equalObjects.js
  57. 1 1
      packages/ckeditor5-utils/src/lib/lodash/internal/getNative.js
  58. 15 0
      packages/ckeditor5-utils/src/lib/lodash/internal/getSymbols.js
  59. 55 0
      packages/ckeditor5-utils/src/lib/lodash/internal/getTag.js
  60. 15 0
      packages/ckeditor5-utils/src/lib/lodash/internal/hashDelete.js
  61. 28 0
      packages/ckeditor5-utils/src/lib/lodash/internal/hashGet.js
  62. 21 0
      packages/ckeditor5-utils/src/lib/lodash/internal/hashHas.js
  63. 18 0
      packages/ckeditor5-utils/src/lib/lodash/internal/hashSet.js
  64. 22 0
      packages/ckeditor5-utils/src/lib/lodash/internal/indexKeys.js
  65. 3 3
      packages/ckeditor5-utils/src/lib/lodash/internal/initCloneArray.js
  66. 22 11
      packages/ckeditor5-utils/src/lib/lodash/internal/initCloneByTag.js
  67. 4 4
      packages/ckeditor5-utils/src/lib/lodash/internal/initCloneObject.js
  68. 20 0
      packages/ckeditor5-utils/src/lib/lodash/internal/isHostObject.js
  69. 4 7
      packages/ckeditor5-utils/src/lib/lodash/internal/isIndex.js
  70. 4 4
      packages/ckeditor5-utils/src/lib/lodash/internal/isIterateeCall.js
  71. 14 0
      packages/ckeditor5-utils/src/lib/lodash/internal/isKeyable.js
  72. 18 0
      packages/ckeditor5-utils/src/lib/lodash/internal/isPrototype.js
  73. 18 0
      packages/ckeditor5-utils/src/lib/lodash/internal/iteratorToArray.js
  74. 15 0
      packages/ckeditor5-utils/src/lib/lodash/internal/mapClear.js
  75. 23 0
      packages/ckeditor5-utils/src/lib/lodash/internal/mapDelete.js
  76. 23 0
      packages/ckeditor5-utils/src/lib/lodash/internal/mapGet.js
  77. 23 0
      packages/ckeditor5-utils/src/lib/lodash/internal/mapHas.js
  78. 28 0
      packages/ckeditor5-utils/src/lib/lodash/internal/mapSet.js
  79. 18 0
      packages/ckeditor5-utils/src/lib/lodash/internal/mapToArray.js
  80. 6 0
      packages/ckeditor5-utils/src/lib/lodash/internal/nativeCreate.js
  81. 11 6
      packages/ckeditor5-utils/src/lib/lodash/internal/root.js
  82. 18 0
      packages/ckeditor5-utils/src/lib/lodash/internal/setToArray.js
  83. 12 0
      packages/ckeditor5-utils/src/lib/lodash/internal/stackClear.js
  84. 19 0
      packages/ckeditor5-utils/src/lib/lodash/internal/stackDelete.js
  85. 19 0
      packages/ckeditor5-utils/src/lib/lodash/internal/stackGet.js
  86. 19 0
      packages/ckeditor5-utils/src/lib/lodash/internal/stackHas.js
  87. 36 0
      packages/ckeditor5-utils/src/lib/lodash/internal/stackSet.js
  88. 43 0
      packages/ckeditor5-utils/src/lib/lodash/isArguments.js
  89. 35 0
      packages/ckeditor5-utils/src/lib/lodash/isArray.js
  90. 35 0
      packages/ckeditor5-utils/src/lib/lodash/isArrayLike.js
  91. 32 0
      packages/ckeditor5-utils/src/lib/lodash/isArrayLikeObject.js
  92. 42 0
      packages/ckeditor5-utils/src/lib/lodash/isEqual.js
  93. 40 0
      packages/ckeditor5-utils/src/lib/lodash/isFunction.js
  94. 32 0
      packages/ckeditor5-utils/src/lib/lodash/isLength.js
  95. 53 0
      packages/ckeditor5-utils/src/lib/lodash/isNative.js
  96. 40 0
      packages/ckeditor5-utils/src/lib/lodash/isObject.js
  97. 28 0
      packages/ckeditor5-utils/src/lib/lodash/isObjectLike.js
  98. 76 0
      packages/ckeditor5-utils/src/lib/lodash/isPlainObject.js
  99. 37 0
      packages/ckeditor5-utils/src/lib/lodash/isString.js
  100. 74 0
      packages/ckeditor5-utils/src/lib/lodash/isTypedArray.js

+ 1 - 1
packages/ckeditor5-utils/dev/tasks/lodash/tasks.js

@@ -10,7 +10,7 @@ module.exports = function() {
 		lodash( done ) {
 			build( [
 				'modularize',
-				'modern',
+				// 'modern',
 				'exports=es',
 				'include=clone,extend,isPlainObject,isObject,isArray,last,isEqual',
 				'--development',

+ 1 - 1
packages/ckeditor5-utils/package.json

@@ -15,7 +15,7 @@
     "guppy-pre-commit": "^0.3.0",
     "jshint": "^2.9.1",
     "jshint-reporter-jscs": "^0.1.0",
-    "lodash-cli": "^3"
+    "lodash-cli": "^4"
   },
   "engines": {
     "node": ">=5.0.0",

+ 5 - 0
packages/ckeditor5-utils/src/lib/lodash/array.default.js

@@ -0,0 +1,5 @@
+import last from './last';
+
+export default {
+  last
+};

+ 2 - 5
packages/ckeditor5-utils/src/lib/lodash/array.js

@@ -1,5 +1,2 @@
-import last from './array/last';
-
-export default {
-  'last': last
-};
+export { default as last } from './last';
+export { default as default } from './array.default';

+ 46 - 0
packages/ckeditor5-utils/src/lib/lodash/assignIn.js

@@ -0,0 +1,46 @@
+/**
+ * lodash 4.0.1 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modularize exports="es" include="clone,extend,isPlainObject,isObject,isArray,last,isEqual" --development --output src/lib/lodash`
+ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+import copyObject from './internal/copyObject';
+import createAssigner from './internal/createAssigner';
+import keysIn from './keysIn';
+
+/**
+ * This method is like `_.assign` except that it iterates over own and
+ * inherited source properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @alias extend
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * function Foo() {
+ *   this.b = 2;
+ * }
+ *
+ * function Bar() {
+ *   this.d = 4;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ * Bar.prototype.e = 5;
+ *
+ * _.assignIn({ 'a': 1 }, new Foo, new Bar);
+ * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
+ */
+var assignIn = createAssigner(function(object, source) {
+  copyObject(source, keysIn(source), object);
+});
+
+export default assignIn;

+ 39 - 0
packages/ckeditor5-utils/src/lib/lodash/clone.js

@@ -0,0 +1,39 @@
+/**
+ * lodash 4.0.1 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modularize exports="es" include="clone,extend,isPlainObject,isObject,isArray,last,isEqual" --development --output src/lib/lodash`
+ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+import baseClone from './internal/baseClone';
+
+/**
+ * Creates a shallow clone of `value`.
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+ * arrays. The own enumerable properties of `arguments` objects are cloned
+ * as plain objects. An empty object is returned for uncloneable values such
+ * as error objects, functions, DOM nodes, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @returns {*} Returns the cloned value.
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var shallow = _.clone(objects);
+ * console.log(shallow[0] === objects[0]);
+ * // => true
+ */
+function clone(value) {
+  return baseClone(value);
+}
+
+export default clone;

+ 35 - 0
packages/ckeditor5-utils/src/lib/lodash/eq.js

@@ -0,0 +1,35 @@
+/**
+ * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ * var other = { 'user': 'fred' };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+function eq(value, other) {
+  return value === other || (value !== value && other !== other);
+}
+
+export default eq;

+ 1 - 0
packages/ckeditor5-utils/src/lib/lodash/extend.js

@@ -0,0 +1 @@
+export { default } from './assignIn'

+ 5 - 0
packages/ckeditor5-utils/src/lib/lodash/function.default.js

@@ -0,0 +1,5 @@
+import rest from './rest';
+
+export default {
+  rest
+};

+ 2 - 5
packages/ckeditor5-utils/src/lib/lodash/function.js

@@ -1,5 +1,2 @@
-import restParam from './function/restParam';
-
-export default {
-  'restParam': restParam
-};
+export { default as rest } from './rest';
+export { default as default } from './function.default';

+ 17 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/Hash.js

@@ -0,0 +1,17 @@
+import nativeCreate from './nativeCreate';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Creates an hash object.
+ *
+ * @private
+ * @returns {Object} Returns the new hash object.
+ */
+function Hash() {}
+
+// Avoid inheriting from `Object.prototype` when possible.
+Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto;
+
+export default Hash;

+ 7 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/Map.js

@@ -0,0 +1,7 @@
+import getNative from './getNative';
+import root from './root';
+
+/* Built-in method references that are verified to be native. */
+var Map = getNative(root, 'Map');
+
+export default Map;

+ 31 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/MapCache.js

@@ -0,0 +1,31 @@
+import mapClear from './mapClear';
+import mapDelete from './mapDelete';
+import mapGet from './mapGet';
+import mapHas from './mapHas';
+import mapSet from './mapSet';
+
+/**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @param {Array} [values] The values to cache.
+ */
+function MapCache(values) {
+  var index = -1,
+      length = values ? values.length : 0;
+
+  this.clear();
+  while (++index < length) {
+    var entry = values[index];
+    this.set(entry[0], entry[1]);
+  }
+}
+
+// Add functions to the `MapCache`.
+MapCache.prototype.clear = mapClear;
+MapCache.prototype['delete'] = mapDelete;
+MapCache.prototype.get = mapGet;
+MapCache.prototype.has = mapHas;
+MapCache.prototype.set = mapSet;
+
+export default MapCache;

+ 6 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/Reflect.js

@@ -0,0 +1,6 @@
+import root from './root';
+
+/** Built-in value references. */
+var Reflect = root.Reflect;
+
+export default Reflect;

+ 7 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/Set.js

@@ -0,0 +1,7 @@
+import getNative from './getNative';
+import root from './root';
+
+/* Built-in method references that are verified to be native. */
+var Set = getNative(root, 'Set');
+
+export default Set;

+ 31 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/Stack.js

@@ -0,0 +1,31 @@
+import stackClear from './stackClear';
+import stackDelete from './stackDelete';
+import stackGet from './stackGet';
+import stackHas from './stackHas';
+import stackSet from './stackSet';
+
+/**
+ * Creates a stack cache object to store key-value pairs.
+ *
+ * @private
+ * @param {Array} [values] The values to cache.
+ */
+function Stack(values) {
+  var index = -1,
+      length = values ? values.length : 0;
+
+  this.clear();
+  while (++index < length) {
+    var entry = values[index];
+    this.set(entry[0], entry[1]);
+  }
+}
+
+// Add functions to the `Stack` cache.
+Stack.prototype.clear = stackClear;
+Stack.prototype['delete'] = stackDelete;
+Stack.prototype.get = stackGet;
+Stack.prototype.has = stackHas;
+Stack.prototype.set = stackSet;
+
+export default Stack;

+ 6 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/Symbol.js

@@ -0,0 +1,6 @@
+import root from './root';
+
+/** Built-in value references. */
+var Symbol = root.Symbol;
+
+export default Symbol;

+ 6 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/Uint8Array.js

@@ -0,0 +1,6 @@
+import root from './root';
+
+/** Built-in value references. */
+var Uint8Array = root.Uint8Array;
+
+export default Uint8Array;

+ 14 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/addMapEntry.js

@@ -0,0 +1,14 @@
+/**
+ * Adds the key-value `pair` to `map`.
+ *
+ * @private
+ * @param {Object} map The map to modify.
+ * @param {Array} pair The key-value pair to add.
+ * @returns {Object} Returns `map`.
+ */
+function addMapEntry(map, pair) {
+  map.set(pair[0], pair[1]);
+  return map;
+}
+
+export default addMapEntry;

+ 14 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/addSetEntry.js

@@ -0,0 +1,14 @@
+/**
+ * Adds `value` to `set`.
+ *
+ * @private
+ * @param {Object} set The set to modify.
+ * @param {*} value The value to add.
+ * @returns {Object} Returns `set`.
+ */
+function addSetEntry(set, value) {
+  set.add(value);
+  return set;
+}
+
+export default addSetEntry;

+ 22 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/apply.js

@@ -0,0 +1,22 @@
+/**
+ * A faster alternative to `Function#apply`, this function invokes `func`
+ * with the `this` binding of `thisArg` and the arguments of `args`.
+ *
+ * @private
+ * @param {Function} func The function to invoke.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {*} Returns the result of `func`.
+ */
+function apply(func, thisArg, args) {
+  var length = args ? args.length : 0;
+  switch (length) {
+    case 0: return func.call(thisArg);
+    case 1: return func.call(thisArg, args[0]);
+    case 2: return func.call(thisArg, args[0], args[1]);
+    case 3: return func.call(thisArg, args[0], args[1], args[2]);
+  }
+  return func.apply(thisArg, args);
+}
+
+export default apply;

+ 2 - 2
packages/ckeditor5-utils/src/lib/lodash/internal/arrayEach.js

@@ -1,6 +1,6 @@
 /**
- * A specialized version of `_.forEach` for arrays without support for callback
- * shorthands and `this` binding.
+ * A specialized version of `_.forEach` for arrays without support for
+ * iteratee shorthands.
  *
  * @private
  * @param {Array} array The array to iterate over.

+ 25 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/arrayReduce.js

@@ -0,0 +1,25 @@
+/**
+ * A specialized version of `_.reduce` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the first element of `array` as the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+function arrayReduce(array, iteratee, accumulator, initAccum) {
+  var index = -1,
+      length = array.length;
+
+  if (initAccum && length) {
+    accumulator = array[++index];
+  }
+  while (++index < length) {
+    accumulator = iteratee(accumulator, array[index], index, array);
+  }
+  return accumulator;
+}
+
+export default arrayReduce;

+ 3 - 4
packages/ckeditor5-utils/src/lib/lodash/internal/arraySome.js

@@ -1,12 +1,11 @@
 /**
- * A specialized version of `_.some` for arrays without support for callback
- * shorthands and `this` binding.
+ * A specialized version of `_.some` for arrays without support for iteratee
+ * shorthands.
  *
  * @private
  * @param {Array} array The array to iterate over.
  * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- *  else `false`.
+ * @returns {boolean} Returns `true` if any element passes the predicate check, else `false`.
  */
 function arraySome(array, predicate) {
   var index = -1,

+ 28 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/assignValue.js

@@ -0,0 +1,28 @@
+import eq from '../eq';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+function assignValue(object, key, value) {
+  var objValue = object[key];
+  if ((!eq(objValue, value) ||
+        (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) ||
+      (value === undefined && !(key in object))) {
+    object[key] = value;
+  }
+}
+
+export default assignValue;

+ 31 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/assocDelete.js

@@ -0,0 +1,31 @@
+import assocIndexOf from './assocIndexOf';
+
+/** Used for built-in method references. */
+var arrayProto = Array.prototype;
+
+/** Built-in value references. */
+var splice = arrayProto.splice;
+
+/**
+ * Removes `key` and its value from the associative array.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function assocDelete(array, key) {
+  var index = assocIndexOf(array, key);
+  if (index < 0) {
+    return false;
+  }
+  var lastIndex = array.length - 1;
+  if (index == lastIndex) {
+    array.pop();
+  } else {
+    splice.call(array, index, 1);
+  }
+  return true;
+}
+
+export default assocDelete;

+ 16 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/assocGet.js

@@ -0,0 +1,16 @@
+import assocIndexOf from './assocIndexOf';
+
+/**
+ * Gets the associative array value for `key`.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function assocGet(array, key) {
+  var index = assocIndexOf(array, key);
+  return index < 0 ? undefined : array[index][1];
+}
+
+export default assocGet;

+ 15 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/assocHas.js

@@ -0,0 +1,15 @@
+import assocIndexOf from './assocIndexOf';
+
+/**
+ * Checks if an associative array value for `key` exists.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function assocHas(array, key) {
+  return assocIndexOf(array, key) > -1;
+}
+
+export default assocHas;

+ 22 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/assocIndexOf.js

@@ -0,0 +1,22 @@
+import eq from '../eq';
+
+/**
+ * Gets the index at which the first occurrence of `key` is found in `array`
+ * of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function assocIndexOf(array, key) {
+  var length = array.length;
+  while (length--) {
+    if (eq(array[length][0], key)) {
+      return length;
+    }
+  }
+  return -1;
+}
+
+export default assocIndexOf;

+ 20 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/assocSet.js

@@ -0,0 +1,20 @@
+import assocIndexOf from './assocIndexOf';
+
+/**
+ * Sets the associative array `key` to `value`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ */
+function assocSet(array, key, value) {
+  var index = assocIndexOf(array, key);
+  if (index < 0) {
+    array.push([key, value]);
+  } else {
+    array[index][1] = value;
+  }
+}
+
+export default assocSet;

+ 5 - 7
packages/ckeditor5-utils/src/lib/lodash/internal/baseAssign.js

@@ -1,9 +1,9 @@
-import baseCopy from './baseCopy';
-import keys from '../object/keys';
+import copyObject from './copyObject';
+import keys from '../keys';
 
 /**
- * The base implementation of `_.assign` without support for argument juggling,
- * multiple sources, and `customizer` functions.
+ * The base implementation of `_.assign` without support for multiple sources
+ * or `customizer` functions.
  *
  * @private
  * @param {Object} object The destination object.
@@ -11,9 +11,7 @@ import keys from '../object/keys';
  * @returns {Object} Returns `object`.
  */
 function baseAssign(object, source) {
-  return source == null
-    ? object
-    : baseCopy(source, keys(source), object);
+  return object && copyObject(source, keys(source), object);
 }
 
 export default baseAssign;

+ 37 - 42
packages/ckeditor5-utils/src/lib/lodash/internal/baseClone.js

@@ -1,12 +1,17 @@
-import arrayCopy from './arrayCopy';
+import Stack from './Stack';
 import arrayEach from './arrayEach';
+import assignValue from './assignValue';
 import baseAssign from './baseAssign';
 import baseForOwn from './baseForOwn';
+import copyArray from './copyArray';
+import copySymbols from './copySymbols';
+import getTag from './getTag';
 import initCloneArray from './initCloneArray';
 import initCloneByTag from './initCloneByTag';
 import initCloneObject from './initCloneObject';
-import isArray from '../lang/isArray';
-import isObject from '../lang/isObject';
+import isArray from '../isArray';
+import isHostObject from './isHostObject';
+import isObject from '../isObject';
 
 /** `Object#toString` result references. */
 var argsTag = '[object Arguments]',
@@ -15,12 +20,14 @@ var argsTag = '[object Arguments]',
     dateTag = '[object Date]',
     errorTag = '[object Error]',
     funcTag = '[object Function]',
+    genTag = '[object GeneratorFunction]',
     mapTag = '[object Map]',
     numberTag = '[object Number]',
     objectTag = '[object Object]',
     regexpTag = '[object RegExp]',
     setTag = '[object Set]',
     stringTag = '[object String]',
+    symbolTag = '[object Symbol]',
     weakMapTag = '[object WeakMap]';
 
 var arrayBufferTag = '[object ArrayBuffer]',
@@ -41,41 +48,32 @@ cloneableTags[arrayBufferTag] = cloneableTags[boolTag] =
 cloneableTags[dateTag] = cloneableTags[float32Tag] =
 cloneableTags[float64Tag] = cloneableTags[int8Tag] =
 cloneableTags[int16Tag] = cloneableTags[int32Tag] =
-cloneableTags[numberTag] = cloneableTags[objectTag] =
-cloneableTags[regexpTag] = cloneableTags[stringTag] =
-cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
-cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+cloneableTags[mapTag] = cloneableTags[numberTag] =
+cloneableTags[objectTag] = cloneableTags[regexpTag] =
+cloneableTags[setTag] = cloneableTags[stringTag] =
+cloneableTags[symbolTag] = cloneableTags[uint8Tag] =
+cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] =
+cloneableTags[uint32Tag] = true;
 cloneableTags[errorTag] = cloneableTags[funcTag] =
-cloneableTags[mapTag] = cloneableTags[setTag] =
 cloneableTags[weakMapTag] = false;
 
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
 /**
- * The base implementation of `_.clone` without support for argument juggling
- * and `this` binding `customizer` functions.
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
+ * traversed objects.
  *
  * @private
  * @param {*} value The value to clone.
  * @param {boolean} [isDeep] Specify a deep clone.
- * @param {Function} [customizer] The function to customize cloning values.
+ * @param {Function} [customizer] The function to customize cloning.
  * @param {string} [key] The key of `value`.
- * @param {Object} [object] The object `value` belongs to.
- * @param {Array} [stackA=[]] Tracks traversed source objects.
- * @param {Array} [stackB=[]] Associates clones with source counterparts.
+ * @param {Object} [object] The parent object of `value`.
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  * @returns {*} Returns the cloned value.
  */
-function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {
+function baseClone(value, isDeep, customizer, key, object, stack) {
   var result;
   if (customizer) {
-    result = object ? customizer(value, key, object) : customizer(value);
+    result = object ? customizer(value, key, object, stack) : customizer(value);
   }
   if (result !== undefined) {
     return result;
@@ -87,16 +85,19 @@ function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {
   if (isArr) {
     result = initCloneArray(value);
     if (!isDeep) {
-      return arrayCopy(value, result);
+      return copyArray(value, result);
     }
   } else {
-    var tag = objToString.call(value),
-        isFunc = tag == funcTag;
+    var tag = getTag(value),
+        isFunc = tag == funcTag || tag == genTag;
 
     if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+      if (isHostObject(value)) {
+        return object ? value : {};
+      }
       result = initCloneObject(isFunc ? {} : value);
       if (!isDeep) {
-        return baseAssign(result, value);
+        return copySymbols(value, baseAssign(result, value));
       }
     } else {
       return cloneableTags[tag]
@@ -105,24 +106,18 @@ function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {
     }
   }
   // Check for circular references and return its corresponding clone.
-  stackA || (stackA = []);
-  stackB || (stackB = []);
-
-  var length = stackA.length;
-  while (length--) {
-    if (stackA[length] == value) {
-      return stackB[length];
-    }
+  stack || (stack = new Stack);
+  var stacked = stack.get(value);
+  if (stacked) {
+    return stacked;
   }
-  // Add the source value to the stack of traversed objects and associate it with its clone.
-  stackA.push(value);
-  stackB.push(result);
+  stack.set(value, result);
 
   // Recursively populate clone (susceptible to call stack limits).
   (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
-    result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB);
+    assignValue(result, key, baseClone(subValue, isDeep, customizer, key, value, stack));
   });
-  return result;
+  return isArr ? result : copySymbols(value, result);
 }
 
 export default baseClone;

+ 23 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/baseCreate.js

@@ -0,0 +1,23 @@
+import isObject from '../isObject';
+
+/**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} prototype The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+var baseCreate = (function() {
+  function object() {}
+  return function(prototype) {
+    if (isObject(prototype)) {
+      object.prototype = prototype;
+      var result = new object;
+      object.prototype = undefined;
+    }
+    return result || {};
+  };
+}());
+
+export default baseCreate;

+ 3 - 4
packages/ckeditor5-utils/src/lib/lodash/internal/baseForOwn.js

@@ -1,9 +1,8 @@
 import baseFor from './baseFor';
-import keys from '../object/keys';
+import keys from '../keys';
 
 /**
- * The base implementation of `_.forOwn` without support for callback
- * shorthands and `this` binding.
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
  *
  * @private
  * @param {Object} object The object to iterate over.
@@ -11,7 +10,7 @@ import keys from '../object/keys';
  * @returns {Object} Returns `object`.
  */
 function baseForOwn(object, iteratee) {
-  return baseFor(object, iteratee, keys);
+  return object && baseFor(object, iteratee, keys);
 }
 
 export default baseForOwn;

+ 26 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/baseHas.js

@@ -0,0 +1,26 @@
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/** Built-in value references. */
+var getPrototypeOf = Object.getPrototypeOf;
+
+/**
+ * The base implementation of `_.has` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+function baseHas(object, key) {
+  // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
+  // that are composed entirely of index properties, return `false` for
+  // `hasOwnProperty` checks of them.
+  return hasOwnProperty.call(object, key) ||
+    (typeof object == 'object' && key in object && getPrototypeOf(object) === null);
+}
+
+export default baseHas;

+ 12 - 10
packages/ckeditor5-utils/src/lib/lodash/internal/baseIsEqual.js

@@ -1,28 +1,30 @@
 import baseIsEqualDeep from './baseIsEqualDeep';
-import isObject from '../lang/isObject';
-import isObjectLike from './isObjectLike';
+import isObject from '../isObject';
+import isObjectLike from '../isObjectLike';
 
 /**
- * The base implementation of `_.isEqual` without support for `this` binding
- * `customizer` functions.
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
  *
  * @private
  * @param {*} value The value to compare.
  * @param {*} other The other value to compare.
- * @param {Function} [customizer] The function to customize comparing values.
- * @param {boolean} [isLoose] Specify performing partial comparisons.
- * @param {Array} [stackA] Tracks traversed `value` objects.
- * @param {Array} [stackB] Tracks traversed `other` objects.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {boolean} [bitmask] The bitmask of comparison flags.
+ *  The bitmask may be composed of the following flags:
+ *     1 - Unordered comparison
+ *     2 - Partial comparison
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  */
-function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {
+function baseIsEqual(value, other, customizer, bitmask, stack) {
   if (value === other) {
     return true;
   }
   if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
     return value !== value && other !== other;
   }
-  return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);
+  return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
 }
 
 export default baseIsEqual;

+ 23 - 42
packages/ckeditor5-utils/src/lib/lodash/internal/baseIsEqualDeep.js

@@ -1,26 +1,26 @@
+import Stack from './Stack';
 import equalArrays from './equalArrays';
 import equalByTag from './equalByTag';
 import equalObjects from './equalObjects';
-import isArray from '../lang/isArray';
-import isTypedArray from '../lang/isTypedArray';
+import getTag from './getTag';
+import isArray from '../isArray';
+import isHostObject from './isHostObject';
+import isTypedArray from '../isTypedArray';
+
+/** Used to compose bitmasks for comparison styles. */
+var PARTIAL_COMPARE_FLAG = 2;
 
 /** `Object#toString` result references. */
 var argsTag = '[object Arguments]',
     arrayTag = '[object Array]',
     objectTag = '[object Object]';
 
-/** Used for native method references. */
+/** Used for built-in method references. */
 var objectProto = Object.prototype;
 
 /** Used to check objects for own properties. */
 var hasOwnProperty = objectProto.hasOwnProperty;
 
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objToString = objectProto.toString;
-
 /**
  * A specialized version of `baseIsEqual` for arrays and objects which performs
  * deep comparisons and tracks traversed objects enabling objects with circular
@@ -30,20 +30,19 @@ var objToString = objectProto.toString;
  * @param {Object} object The object to compare.
  * @param {Object} other The other object to compare.
  * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparing objects.
- * @param {boolean} [isLoose] Specify performing partial comparisons.
- * @param {Array} [stackA=[]] Tracks traversed `value` objects.
- * @param {Array} [stackB=[]] Tracks traversed `other` objects.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  */
-function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
+function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
   var objIsArr = isArray(object),
       othIsArr = isArray(other),
       objTag = arrayTag,
       othTag = arrayTag;
 
   if (!objIsArr) {
-    objTag = objToString.call(object);
+    objTag = getTag(object);
     if (objTag == argsTag) {
       objTag = objectTag;
     } else if (objTag != objectTag) {
@@ -51,52 +50,34 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA,
     }
   }
   if (!othIsArr) {
-    othTag = objToString.call(other);
+    othTag = getTag(other);
     if (othTag == argsTag) {
       othTag = objectTag;
     } else if (othTag != objectTag) {
       othIsArr = isTypedArray(other);
     }
   }
-  var objIsObj = objTag == objectTag,
-      othIsObj = othTag == objectTag,
+  var objIsObj = objTag == objectTag && !isHostObject(object),
+      othIsObj = othTag == objectTag && !isHostObject(other),
       isSameTag = objTag == othTag;
 
   if (isSameTag && !(objIsArr || objIsObj)) {
-    return equalByTag(object, other, objTag);
+    return equalByTag(object, other, objTag, equalFunc, customizer, bitmask);
   }
-  if (!isLoose) {
+  var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
+  if (!isPartial) {
     var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
         othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
 
     if (objIsWrapped || othIsWrapped) {
-      return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);
+      return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, bitmask, stack);
     }
   }
   if (!isSameTag) {
     return false;
   }
-  // Assume cyclic values are equal.
-  // For more information on detecting circular references see https://es5.github.io/#JO.
-  stackA || (stackA = []);
-  stackB || (stackB = []);
-
-  var length = stackA.length;
-  while (length--) {
-    if (stackA[length] == object) {
-      return stackB[length] == other;
-    }
-  }
-  // Add `object` and `other` to the stack of traversed objects.
-  stackA.push(object);
-  stackB.push(other);
-
-  var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB);
-
-  stackA.pop();
-  stackB.pop();
-
-  return result;
+  stack || (stack = new Stack);
+  return (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, bitmask, stack);
 }
 
 export default baseIsEqualDeep;

+ 17 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/baseKeys.js

@@ -0,0 +1,17 @@
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeKeys = Object.keys;
+
+/**
+ * The base implementation of `_.keys` which doesn't skip the constructor
+ * property of prototypes or treat sparse arrays as dense.
+ *
+ * @private
+ * @type Function
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function baseKeys(object) {
+  return nativeKeys(Object(object));
+}
+
+export default baseKeys;

+ 36 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/baseKeysIn.js

@@ -0,0 +1,36 @@
+import Reflect from './Reflect';
+import iteratorToArray from './iteratorToArray';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Built-in value references. */
+var enumerate = Reflect ? Reflect.enumerate : undefined,
+    propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
+/**
+ * The base implementation of `_.keysIn` which doesn't skip the constructor
+ * property of prototypes or treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function baseKeysIn(object) {
+  object = object == null ? object : Object(object);
+
+  var result = [];
+  for (var key in object) {
+    result.push(key);
+  }
+  return result;
+}
+
+// Fallback for IE < 9 with es6-shim.
+if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) {
+  baseKeysIn = function(object) {
+    return iteratorToArray(enumerate(object));
+  };
+}
+
+export default baseKeysIn;

+ 20 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/baseTimes.js

@@ -0,0 +1,20 @@
+/**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+function baseTimes(n, iteratee) {
+  var index = -1,
+      result = Array(n);
+
+  while (++index < n) {
+    result[index] = iteratee(index);
+  }
+  return result;
+}
+
+export default baseTimes;

+ 12 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/checkGlobal.js

@@ -0,0 +1,12 @@
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+  return (value && value.Object === Object) ? value : null;
+}
+
+export default checkGlobal;

+ 19 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/cloneBuffer.js

@@ -0,0 +1,19 @@
+import Uint8Array from './Uint8Array';
+
+/**
+ * Creates a clone of `buffer`.
+ *
+ * @private
+ * @param {ArrayBuffer} buffer The array buffer to clone.
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
+ */
+function cloneBuffer(buffer) {
+  var Ctor = buffer.constructor,
+      result = new Ctor(buffer.byteLength),
+      view = new Uint8Array(result);
+
+  view.set(new Uint8Array(buffer));
+  return result;
+}
+
+export default cloneBuffer;

+ 17 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/cloneMap.js

@@ -0,0 +1,17 @@
+import addMapEntry from './addMapEntry';
+import arrayReduce from './arrayReduce';
+import mapToArray from './mapToArray';
+
+/**
+ * Creates a clone of `map`.
+ *
+ * @private
+ * @param {Object} map The map to clone.
+ * @returns {Object} Returns the cloned map.
+ */
+function cloneMap(map) {
+  var Ctor = map.constructor;
+  return arrayReduce(mapToArray(map), addMapEntry, new Ctor);
+}
+
+export default cloneMap;

+ 19 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/cloneRegExp.js

@@ -0,0 +1,19 @@
+/** Used to match `RegExp` flags from their coerced string values. */
+var reFlags = /\w*$/;
+
+/**
+ * Creates a clone of `regexp`.
+ *
+ * @private
+ * @param {Object} regexp The regexp to clone.
+ * @returns {Object} Returns the cloned regexp.
+ */
+function cloneRegExp(regexp) {
+  var Ctor = regexp.constructor,
+      result = new Ctor(regexp.source, reFlags.exec(regexp));
+
+  result.lastIndex = regexp.lastIndex;
+  return result;
+}
+
+export default cloneRegExp;

+ 17 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/cloneSet.js

@@ -0,0 +1,17 @@
+import addSetEntry from './addSetEntry';
+import arrayReduce from './arrayReduce';
+import setToArray from './setToArray';
+
+/**
+ * Creates a clone of `set`.
+ *
+ * @private
+ * @param {Object} set The set to clone.
+ * @returns {Object} Returns the cloned set.
+ */
+function cloneSet(set) {
+  var Ctor = set.constructor;
+  return arrayReduce(setToArray(set), addSetEntry, new Ctor);
+}
+
+export default cloneSet;

+ 18 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/cloneSymbol.js

@@ -0,0 +1,18 @@
+import Symbol from './Symbol';
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+    symbolValueOf = Symbol ? symbolProto.valueOf : undefined;
+
+/**
+ * Creates a clone of the `symbol` object.
+ *
+ * @private
+ * @param {Object} symbol The symbol object to clone.
+ * @returns {Object} Returns the cloned symbol object.
+ */
+function cloneSymbol(symbol) {
+  return Symbol ? Object(symbolValueOf.call(symbol)) : {};
+}
+
+export default cloneSymbol;

+ 18 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/cloneTypedArray.js

@@ -0,0 +1,18 @@
+import cloneBuffer from './cloneBuffer';
+
+/**
+ * Creates a clone of `typedArray`.
+ *
+ * @private
+ * @param {Object} typedArray The typed array to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned typed array.
+ */
+function cloneTypedArray(typedArray, isDeep) {
+  var buffer = typedArray.buffer,
+      Ctor = typedArray.constructor;
+
+  return new Ctor(isDeep ? cloneBuffer(buffer) : buffer, typedArray.byteOffset, typedArray.length);
+}
+
+export default cloneTypedArray;

+ 20 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/copyArray.js

@@ -0,0 +1,20 @@
+/**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+function copyArray(source, array) {
+  var index = -1,
+      length = source.length;
+
+  array || (array = Array(length));
+  while (++index < length) {
+    array[index] = source[index];
+  }
+  return array;
+}
+
+export default copyArray;

+ 16 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/copyObject.js

@@ -0,0 +1,16 @@
+import copyObjectWith from './copyObjectWith';
+
+/**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property names to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @returns {Object} Returns `object`.
+ */
+function copyObject(source, props, object) {
+  return copyObjectWith(source, props, object);
+}
+
+export default copyObject;

+ 29 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/copyObjectWith.js

@@ -0,0 +1,29 @@
+import assignValue from './assignValue';
+
+/**
+ * This function is like `copyObject` except that it accepts a function to
+ * customize copied values.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property names to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+function copyObjectWith(source, props, object, customizer) {
+  object || (object = {});
+
+  var index = -1,
+      length = props.length;
+
+  while (++index < length) {
+    var key = props[index],
+        newValue = customizer ? customizer(object[key], source[key], key, object, source) : source[key];
+
+    assignValue(object, key, newValue);
+  }
+  return object;
+}
+
+export default copyObjectWith;

+ 16 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/copySymbols.js

@@ -0,0 +1,16 @@
+import copyObject from './copyObject';
+import getSymbols from './getSymbols';
+
+/**
+ * Copies own symbol properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+function copySymbols(source, object) {
+  return copyObject(source, getSymbols(source), object);
+}
+
+export default copySymbols;

+ 9 - 16
packages/ckeditor5-utils/src/lib/lodash/internal/createAssigner.js

@@ -1,37 +1,30 @@
-import bindCallback from './bindCallback';
 import isIterateeCall from './isIterateeCall';
-import restParam from '../function/restParam';
+import rest from '../rest';
 
 /**
- * Creates a `_.assign`, `_.defaults`, or `_.merge` function.
+ * Creates a function like `_.assign`.
  *
  * @private
  * @param {Function} assigner The function to assign values.
  * @returns {Function} Returns the new assigner function.
  */
 function createAssigner(assigner) {
-  return restParam(function(object, sources) {
+  return rest(function(object, sources) {
     var index = -1,
-        length = object == null ? 0 : sources.length,
-        customizer = length > 2 ? sources[length - 2] : undefined,
-        guard = length > 2 ? sources[2] : undefined,
-        thisArg = length > 1 ? sources[length - 1] : undefined;
+        length = sources.length,
+        customizer = length > 1 ? sources[length - 1] : undefined,
+        guard = length > 2 ? sources[2] : undefined;
 
-    if (typeof customizer == 'function') {
-      customizer = bindCallback(customizer, thisArg, 5);
-      length -= 2;
-    } else {
-      customizer = typeof thisArg == 'function' ? thisArg : undefined;
-      length -= (customizer ? 1 : 0);
-    }
+    customizer = typeof customizer == 'function' ? (length--, customizer) : undefined;
     if (guard && isIterateeCall(sources[0], sources[1], guard)) {
       customizer = length < 3 ? undefined : customizer;
       length = 1;
     }
+    object = Object(object);
     while (++index < length) {
       var source = sources[index];
       if (source) {
-        assigner(object, source, customizer);
+        assigner(object, source, index, customizer);
       }
     }
     return object;

+ 6 - 8
packages/ckeditor5-utils/src/lib/lodash/internal/createBaseFor.js

@@ -1,7 +1,5 @@
-import toObject from './toObject';
-
 /**
- * Creates a base function for `_.forIn` or `_.forInRight`.
+ * Creates a base function for methods like `_.forIn`.
  *
  * @private
  * @param {boolean} [fromRight] Specify iterating from right to left.
@@ -9,13 +7,13 @@ import toObject from './toObject';
  */
 function createBaseFor(fromRight) {
   return function(object, iteratee, keysFunc) {
-    var iterable = toObject(object),
+    var index = -1,
+        iterable = Object(object),
         props = keysFunc(object),
-        length = props.length,
-        index = fromRight ? length : -1;
+        length = props.length;
 
-    while ((fromRight ? index-- : ++index < length)) {
-      var key = props[index];
+    while (length--) {
+      var key = props[fromRight ? length : ++index];
       if (iteratee(iterable[key], key, iterable) === false) {
         break;
       }

+ 38 - 17
packages/ckeditor5-utils/src/lib/lodash/internal/equalArrays.js

@@ -1,5 +1,9 @@
 import arraySome from './arraySome';
 
+/** Used to compose bitmasks for comparison styles. */
+var UNORDERED_COMPARE_FLAG = 1,
+    PARTIAL_COMPARE_FLAG = 2;
+
 /**
  * A specialized version of `baseIsEqualDeep` for arrays with support for
  * partial deep comparisons.
@@ -8,44 +12,61 @@ import arraySome from './arraySome';
  * @param {Array} array The array to compare.
  * @param {Array} other The other array to compare.
  * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparing arrays.
- * @param {boolean} [isLoose] Specify performing partial comparisons.
- * @param {Array} [stackA] Tracks traversed `value` objects.
- * @param {Array} [stackB] Tracks traversed `other` objects.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.
+ * @param {Object} [stack] Tracks traversed `array` and `other` objects.
  * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  */
-function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) {
+function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
   var index = -1,
+      isPartial = bitmask & PARTIAL_COMPARE_FLAG,
+      isUnordered = bitmask & UNORDERED_COMPARE_FLAG,
       arrLength = array.length,
       othLength = other.length;
 
-  if (arrLength != othLength && !(isLoose && othLength > arrLength)) {
+  if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
     return false;
   }
+  // Assume cyclic values are equal.
+  var stacked = stack.get(array);
+  if (stacked) {
+    return stacked == other;
+  }
+  var result = true;
+  stack.set(array, other);
+
   // Ignore non-index properties.
   while (++index < arrLength) {
     var arrValue = array[index],
-        othValue = other[index],
-        result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined;
+        othValue = other[index];
 
-    if (result !== undefined) {
-      if (result) {
+    if (customizer) {
+      var compared = isPartial
+        ? customizer(othValue, arrValue, index, other, array, stack)
+        : customizer(arrValue, othValue, index, array, other, stack);
+    }
+    if (compared !== undefined) {
+      if (compared) {
         continue;
       }
-      return false;
+      result = false;
+      break;
     }
     // Recursively compare arrays (susceptible to call stack limits).
-    if (isLoose) {
+    if (isUnordered) {
       if (!arraySome(other, function(othValue) {
-            return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);
+            return arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack);
           })) {
-        return false;
+        result = false;
+        break;
       }
-    } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) {
-      return false;
+    } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
+      result = false;
+      break;
     }
   }
-  return true;
+  stack['delete'](array);
+  return result;
 }
 
 export default equalArrays;

+ 45 - 5
packages/ckeditor5-utils/src/lib/lodash/internal/equalByTag.js

@@ -1,10 +1,28 @@
+import Symbol from './Symbol';
+import Uint8Array from './Uint8Array';
+import mapToArray from './mapToArray';
+import setToArray from './setToArray';
+
+/** Used to compose bitmasks for comparison styles. */
+var UNORDERED_COMPARE_FLAG = 1,
+    PARTIAL_COMPARE_FLAG = 2;
+
 /** `Object#toString` result references. */
 var boolTag = '[object Boolean]',
     dateTag = '[object Date]',
     errorTag = '[object Error]',
+    mapTag = '[object Map]',
     numberTag = '[object Number]',
     regexpTag = '[object RegExp]',
-    stringTag = '[object String]';
+    setTag = '[object Set]',
+    stringTag = '[object String]',
+    symbolTag = '[object Symbol]';
+
+var arrayBufferTag = '[object ArrayBuffer]';
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+    symbolValueOf = Symbol ? symbolProto.valueOf : undefined;
 
 /**
  * A specialized version of `baseIsEqualDeep` for comparing objects of
@@ -17,10 +35,20 @@ var boolTag = '[object Boolean]',
  * @param {Object} object The object to compare.
  * @param {Object} other The other object to compare.
  * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.
  * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  */
-function equalByTag(object, other, tag) {
+function equalByTag(object, other, tag, equalFunc, customizer, bitmask) {
   switch (tag) {
+    case arrayBufferTag:
+      if ((object.byteLength != other.byteLength) ||
+          !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
+        return false;
+      }
+      return true;
+
     case boolTag:
     case dateTag:
       // Coerce dates and booleans to numbers, dates to milliseconds and booleans
@@ -32,15 +60,27 @@ function equalByTag(object, other, tag) {
 
     case numberTag:
       // Treat `NaN` vs. `NaN` as equal.
-      return (object != +object)
-        ? other != +other
-        : object == +other;
+      return (object != +object) ? other != +other : object == +other;
 
     case regexpTag:
     case stringTag:
       // Coerce regexes to strings and treat strings primitives and string
       // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details.
       return object == (other + '');
+
+    case mapTag:
+      var convert = mapToArray;
+
+    case setTag:
+      var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
+      convert || (convert = setToArray);
+
+      // Recursively compare objects (susceptible to call stack limits).
+      return (isPartial || object.size == other.size) &&
+        equalFunc(convert(object), convert(other), customizer, bitmask | UNORDERED_COMPARE_FLAG);
+
+    case symbolTag:
+      return !!Symbol && (symbolValueOf.call(object) == symbolValueOf.call(other));
   }
   return false;
 }

+ 37 - 22
packages/ckeditor5-utils/src/lib/lodash/internal/equalObjects.js

@@ -1,10 +1,8 @@
-import keys from '../object/keys';
+import baseHas from './baseHas';
+import keys from '../keys';
 
-/** Used for native method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
+/** Used to compose bitmasks for comparison styles. */
+var PARTIAL_COMPARE_FLAG = 2;
 
 /**
  * A specialized version of `baseIsEqualDeep` for objects with support for
@@ -14,42 +12,58 @@ var hasOwnProperty = objectProto.hasOwnProperty;
  * @param {Object} object The object to compare.
  * @param {Object} other The other object to compare.
  * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparing values.
- * @param {boolean} [isLoose] Specify performing partial comparisons.
- * @param {Array} [stackA] Tracks traversed `value` objects.
- * @param {Array} [stackB] Tracks traversed `other` objects.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  */
-function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
-  var objProps = keys(object),
+function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
+  var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
+      objProps = keys(object),
       objLength = objProps.length,
       othProps = keys(other),
       othLength = othProps.length;
 
-  if (objLength != othLength && !isLoose) {
+  if (objLength != othLength && !isPartial) {
     return false;
   }
   var index = objLength;
   while (index--) {
     var key = objProps[index];
-    if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) {
+    if (!(isPartial ? key in other : baseHas(other, key))) {
       return false;
     }
   }
-  var skipCtor = isLoose;
+  // Assume cyclic values are equal.
+  var stacked = stack.get(object);
+  if (stacked) {
+    return stacked == other;
+  }
+  var result = true;
+  stack.set(object, other);
+
+  var skipCtor = isPartial;
   while (++index < objLength) {
     key = objProps[index];
     var objValue = object[key],
-        othValue = other[key],
-        result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined;
+        othValue = other[key];
 
+    if (customizer) {
+      var compared = isPartial
+        ? customizer(othValue, objValue, key, other, object, stack)
+        : customizer(objValue, othValue, key, object, other, stack);
+    }
     // Recursively compare objects (susceptible to call stack limits).
-    if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) {
-      return false;
+    if (!(compared === undefined
+          ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))
+          : compared
+        )) {
+      result = false;
+      break;
     }
     skipCtor || (skipCtor = key == 'constructor');
   }
-  if (!skipCtor) {
+  if (result && !skipCtor) {
     var objCtor = object.constructor,
         othCtor = other.constructor;
 
@@ -58,10 +72,11 @@ function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, sta
         ('constructor' in object && 'constructor' in other) &&
         !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
           typeof othCtor == 'function' && othCtor instanceof othCtor)) {
-      return false;
+      result = false;
     }
   }
-  return true;
+  stack['delete'](object);
+  return result;
 }
 
 export default equalObjects;

+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/getNative.js

@@ -1,4 +1,4 @@
-import isNative from '../lang/isNative';
+import isNative from '../isNative';
 
 /**
  * Gets the native function at `key` of `object`.

+ 15 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/getSymbols.js

@@ -0,0 +1,15 @@
+/** Built-in value references. */
+var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+
+/**
+ * Creates an array of the own symbol properties of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+var getSymbols = getOwnPropertySymbols || function() {
+  return [];
+};
+
+export default getSymbols;

+ 55 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/getTag.js

@@ -0,0 +1,55 @@
+import Map from './Map';
+import Set from './Set';
+
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+    objectTag = '[object Object]',
+    setTag = '[object Set]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = Function.prototype.toString;
+
+/**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/** Used to detect maps and sets. */
+var mapCtorString = Map ? funcToString.call(Map) : '',
+    setCtorString = Set ? funcToString.call(Set) : '';
+
+/**
+ * Gets the `toStringTag` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+function getTag(value) {
+  return objectToString.call(value);
+}
+
+// Fallback for IE 11 providing `toStringTag` values for maps and sets.
+if ((Map && getTag(new Map) != mapTag) || (Set && getTag(new Set) != setTag)) {
+  getTag = function(value) {
+    var result = objectToString.call(value),
+        Ctor = result == objectTag ? value.constructor : null,
+        ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : '';
+
+    if (ctorString) {
+      if (ctorString == mapCtorString) {
+        return mapTag;
+      }
+      if (ctorString == setCtorString) {
+        return setTag;
+      }
+    }
+    return result;
+  };
+}
+
+export default getTag;

+ 15 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/hashDelete.js

@@ -0,0 +1,15 @@
+import hashHas from './hashHas';
+
+/**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function hashDelete(hash, key) {
+  return hashHas(hash, key) && delete hash[key];
+}
+
+export default hashDelete;

+ 28 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/hashGet.js

@@ -0,0 +1,28 @@
+import nativeCreate from './nativeCreate';
+
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @param {Object} hash The hash to query.
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function hashGet(hash, key) {
+  if (nativeCreate) {
+    var result = hash[key];
+    return result === HASH_UNDEFINED ? undefined : result;
+  }
+  return hasOwnProperty.call(hash, key) ? hash[key] : undefined;
+}
+
+export default hashGet;

+ 21 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/hashHas.js

@@ -0,0 +1,21 @@
+import nativeCreate from './nativeCreate';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @param {Object} hash The hash to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function hashHas(hash, key) {
+  return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key);
+}
+
+export default hashHas;

+ 18 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/hashSet.js

@@ -0,0 +1,18 @@
+import nativeCreate from './nativeCreate';
+
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+/**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ */
+function hashSet(hash, key, value) {
+  hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+}
+
+export default hashSet;

+ 22 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/indexKeys.js

@@ -0,0 +1,22 @@
+import baseTimes from './baseTimes';
+import isArguments from '../isArguments';
+import isArray from '../isArray';
+import isLength from '../isLength';
+import isString from '../isString';
+
+/**
+ * Creates an array of index keys for `object` values of arrays,
+ * `arguments` objects, and strings, otherwise `null` is returned.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array|null} Returns index keys, else `null`.
+ */
+function indexKeys(object) {
+  var length = object ? object.length : undefined;
+  return (isLength(length) && (isArray(object) || isString(object) || isArguments(object)))
+    ? baseTimes(length, String)
+    : null;
+}
+
+export default indexKeys;

+ 3 - 3
packages/ckeditor5-utils/src/lib/lodash/internal/initCloneArray.js

@@ -1,4 +1,4 @@
-/** Used for native method references. */
+/** Used for built-in method references. */
 var objectProto = Object.prototype;
 
 /** Used to check objects for own properties. */
@@ -13,9 +13,9 @@ var hasOwnProperty = objectProto.hasOwnProperty;
  */
 function initCloneArray(array) {
   var length = array.length,
-      result = new array.constructor(length);
+      result = array.constructor(length);
 
-  // Add array properties assigned by `RegExp#exec`.
+  // Add properties assigned by `RegExp#exec`.
   if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
     result.index = array.index;
     result.input = array.input;

+ 22 - 11
packages/ckeditor5-utils/src/lib/lodash/internal/initCloneByTag.js

@@ -1,11 +1,19 @@
-import bufferClone from './bufferClone';
+import cloneBuffer from './cloneBuffer';
+import cloneMap from './cloneMap';
+import cloneRegExp from './cloneRegExp';
+import cloneSet from './cloneSet';
+import cloneSymbol from './cloneSymbol';
+import cloneTypedArray from './cloneTypedArray';
 
 /** `Object#toString` result references. */
 var boolTag = '[object Boolean]',
     dateTag = '[object Date]',
+    mapTag = '[object Map]',
     numberTag = '[object Number]',
     regexpTag = '[object RegExp]',
-    stringTag = '[object String]';
+    setTag = '[object Set]',
+    stringTag = '[object String]',
+    symbolTag = '[object Symbol]';
 
 var arrayBufferTag = '[object ArrayBuffer]',
     float32Tag = '[object Float32Array]',
@@ -18,9 +26,6 @@ var arrayBufferTag = '[object ArrayBuffer]',
     uint16Tag = '[object Uint16Array]',
     uint32Tag = '[object Uint32Array]';
 
-/** Used to match `RegExp` flags from their coerced string values. */
-var reFlags = /\w*$/;
-
 /**
  * Initializes an object clone based on its `toStringTag`.
  *
@@ -37,7 +42,7 @@ function initCloneByTag(object, tag, isDeep) {
   var Ctor = object.constructor;
   switch (tag) {
     case arrayBufferTag:
-      return bufferClone(object);
+      return cloneBuffer(object);
 
     case boolTag:
     case dateTag:
@@ -46,18 +51,24 @@ function initCloneByTag(object, tag, isDeep) {
     case float32Tag: case float64Tag:
     case int8Tag: case int16Tag: case int32Tag:
     case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
-      var buffer = object.buffer;
-      return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length);
+      return cloneTypedArray(object, isDeep);
+
+    case mapTag:
+      return cloneMap(object);
 
     case numberTag:
     case stringTag:
       return new Ctor(object);
 
     case regexpTag:
-      var result = new Ctor(object.source, reFlags.exec(object));
-      result.lastIndex = object.lastIndex;
+      return cloneRegExp(object);
+
+    case setTag:
+      return cloneSet(object);
+
+    case symbolTag:
+      return cloneSymbol(object);
   }
-  return result;
 }
 
 export default initCloneByTag;

+ 4 - 4
packages/ckeditor5-utils/src/lib/lodash/internal/initCloneObject.js

@@ -1,3 +1,6 @@
+import baseCreate from './baseCreate';
+import isFunction from '../isFunction';
+
 /**
  * Initializes an object clone.
  *
@@ -7,10 +10,7 @@
  */
 function initCloneObject(object) {
   var Ctor = object.constructor;
-  if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) {
-    Ctor = Object;
-  }
-  return new Ctor;
+  return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
 }
 
 export default initCloneObject;

+ 20 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/isHostObject.js

@@ -0,0 +1,20 @@
+/**
+ * Checks if `value` is a host object in IE < 9.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
+ */
+function isHostObject(value) {
+  // Many host objects are `Object` objects that can coerce to strings
+  // despite having improperly defined `toString` methods.
+  var result = false;
+  if (value != null && typeof value.toString != 'function') {
+    try {
+      result = !!(value + '');
+    } catch (e) {}
+  }
+  return result;
+}
+
+export default isHostObject;

+ 4 - 7
packages/ckeditor5-utils/src/lib/lodash/internal/isIndex.js

@@ -1,12 +1,9 @@
-/** Used to detect unsigned integer values. */
-var reIsUint = /^\d+$/;
-
-/**
- * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
- * of an array-like value.
- */
+/** Used as references for various `Number` constants. */
 var MAX_SAFE_INTEGER = 9007199254740991;
 
+/** Used to detect unsigned integer values. */
+var reIsUint = /^(?:0|[1-9]\d*)$/;
+
 /**
  * Checks if `value` is a valid array-like index.
  *

+ 4 - 4
packages/ckeditor5-utils/src/lib/lodash/internal/isIterateeCall.js

@@ -1,6 +1,7 @@
-import isArrayLike from './isArrayLike';
+import eq from '../eq';
+import isArrayLike from '../isArrayLike';
 import isIndex from './isIndex';
-import isObject from '../lang/isObject';
+import isObject from '../isObject';
 
 /**
  * Checks if the provided arguments are from an iteratee call.
@@ -19,8 +20,7 @@ function isIterateeCall(value, index, object) {
   if (type == 'number'
       ? (isArrayLike(object) && isIndex(index, object.length))
       : (type == 'string' && index in object)) {
-    var other = object[index];
-    return value === value ? (value === other) : (other !== other);
+    return eq(object[index], value);
   }
   return false;
 }

+ 14 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/isKeyable.js

@@ -0,0 +1,14 @@
+/**
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+ */
+function isKeyable(value) {
+  var type = typeof value;
+  return type == 'number' || type == 'boolean' ||
+    (type == 'string' && value !== '__proto__') || value == null;
+}
+
+export default isKeyable;

+ 18 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/isPrototype.js

@@ -0,0 +1,18 @@
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+function isPrototype(value) {
+  var Ctor = value && value.constructor,
+      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+  return value === proto;
+}
+
+export default isPrototype;

+ 18 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/iteratorToArray.js

@@ -0,0 +1,18 @@
+/**
+ * Converts `iterator` to an array.
+ *
+ * @private
+ * @param {Object} iterator The iterator to convert.
+ * @returns {Array} Returns the converted array.
+ */
+function iteratorToArray(iterator) {
+  var data,
+      result = [];
+
+  while (!(data = iterator.next()).done) {
+    result.push(data.value);
+  }
+  return result;
+}
+
+export default iteratorToArray;

+ 15 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/mapClear.js

@@ -0,0 +1,15 @@
+import Hash from './Hash';
+import Map from './Map';
+
+/**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+function mapClear() {
+  this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };
+}
+
+export default mapClear;

+ 23 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/mapDelete.js

@@ -0,0 +1,23 @@
+import Map from './Map';
+import assocDelete from './assocDelete';
+import hashDelete from './hashDelete';
+import isKeyable from './isKeyable';
+
+/**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function mapDelete(key) {
+  var data = this.__data__;
+  if (isKeyable(key)) {
+    return hashDelete(typeof key == 'string' ? data.string : data.hash, key);
+  }
+  return Map ? data.map['delete'](key) : assocDelete(data.map, key);
+}
+
+export default mapDelete;

+ 23 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/mapGet.js

@@ -0,0 +1,23 @@
+import Map from './Map';
+import assocGet from './assocGet';
+import hashGet from './hashGet';
+import isKeyable from './isKeyable';
+
+/**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function mapGet(key) {
+  var data = this.__data__;
+  if (isKeyable(key)) {
+    return hashGet(typeof key == 'string' ? data.string : data.hash, key);
+  }
+  return Map ? data.map.get(key) : assocGet(data.map, key);
+}
+
+export default mapGet;

+ 23 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/mapHas.js

@@ -0,0 +1,23 @@
+import Map from './Map';
+import assocHas from './assocHas';
+import hashHas from './hashHas';
+import isKeyable from './isKeyable';
+
+/**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function mapHas(key) {
+  var data = this.__data__;
+  if (isKeyable(key)) {
+    return hashHas(typeof key == 'string' ? data.string : data.hash, key);
+  }
+  return Map ? data.map.has(key) : assocHas(data.map, key);
+}
+
+export default mapHas;

+ 28 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/mapSet.js

@@ -0,0 +1,28 @@
+import Map from './Map';
+import assocSet from './assocSet';
+import hashSet from './hashSet';
+import isKeyable from './isKeyable';
+
+/**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache object.
+ */
+function mapSet(key, value) {
+  var data = this.__data__;
+  if (isKeyable(key)) {
+    hashSet(typeof key == 'string' ? data.string : data.hash, key, value);
+  } else if (Map) {
+    data.map.set(key, value);
+  } else {
+    assocSet(data.map, key, value);
+  }
+  return this;
+}
+
+export default mapSet;

+ 18 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/mapToArray.js

@@ -0,0 +1,18 @@
+/**
+ * Converts `map` to an array.
+ *
+ * @private
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the converted array.
+ */
+function mapToArray(map) {
+  var index = -1,
+      result = Array(map.size);
+
+  map.forEach(function(value, key) {
+    result[++index] = [key, value];
+  });
+  return result;
+}
+
+export default mapToArray;

+ 6 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/nativeCreate.js

@@ -0,0 +1,6 @@
+import getNative from './getNative';
+
+/* Built-in method references that are verified to be native. */
+var nativeCreate = getNative(Object, 'create');
+
+export default nativeCreate;

+ 11 - 6
packages/ckeditor5-utils/src/lib/lodash/internal/root.js

@@ -1,3 +1,5 @@
+import checkGlobal from './checkGlobal';
+
 /** Used to determine if values are of the language type `Object`. */
 var objectTypes = {
   'function': true,
@@ -5,19 +7,22 @@ var objectTypes = {
 };
 
 /** Detect free variable `exports`. */
-var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
 
 /** Detect free variable `module`. */
-var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
 
 /** Detect free variable `global` from Node.js. */
-var freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global;
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
 
 /** Detect free variable `self`. */
-var freeSelf = objectTypes[typeof self] && self && self.Object && self;
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
 
 /** Detect free variable `window`. */
-var freeWindow = objectTypes[typeof window] && window && window.Object && window;
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
 
 /**
  * Used as a reference to the global object.
@@ -25,6 +30,6 @@ var freeWindow = objectTypes[typeof window] && window && window.Object && window
  * The `this` value is used if it's the global object to avoid Greasemonkey's
  * restricted `window` object, otherwise the `window` object is used.
  */
-var root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this;
+var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
 
 export default root;

+ 18 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/setToArray.js

@@ -0,0 +1,18 @@
+/**
+ * Converts `set` to an array.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the converted array.
+ */
+function setToArray(set) {
+  var index = -1,
+      result = Array(set.size);
+
+  set.forEach(function(value) {
+    result[++index] = value;
+  });
+  return result;
+}
+
+export default setToArray;

+ 12 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/stackClear.js

@@ -0,0 +1,12 @@
+/**
+ * Removes all key-value entries from the stack.
+ *
+ * @private
+ * @name clear
+ * @memberOf Stack
+ */
+function stackClear() {
+  this.__data__ = { 'array': [], 'map': null };
+}
+
+export default stackClear;

+ 19 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/stackDelete.js

@@ -0,0 +1,19 @@
+import assocDelete from './assocDelete';
+
+/**
+ * Removes `key` and its value from the stack.
+ *
+ * @private
+ * @name delete
+ * @memberOf Stack
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function stackDelete(key) {
+  var data = this.__data__,
+      array = data.array;
+
+  return array ? assocDelete(array, key) : data.map['delete'](key);
+}
+
+export default stackDelete;

+ 19 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/stackGet.js

@@ -0,0 +1,19 @@
+import assocGet from './assocGet';
+
+/**
+ * Gets the stack value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Stack
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function stackGet(key) {
+  var data = this.__data__,
+      array = data.array;
+
+  return array ? assocGet(array, key) : data.map.get(key);
+}
+
+export default stackGet;

+ 19 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/stackHas.js

@@ -0,0 +1,19 @@
+import assocHas from './assocHas';
+
+/**
+ * Checks if a stack value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Stack
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function stackHas(key) {
+  var data = this.__data__,
+      array = data.array;
+
+  return array ? assocHas(array, key) : data.map.has(key);
+}
+
+export default stackHas;

+ 36 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/stackSet.js

@@ -0,0 +1,36 @@
+import MapCache from './MapCache';
+import assocSet from './assocSet';
+
+/** Used as the size to enable large array optimizations. */
+var LARGE_ARRAY_SIZE = 200;
+
+/**
+ * Sets the stack `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Stack
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the stack cache object.
+ */
+function stackSet(key, value) {
+  var data = this.__data__,
+      array = data.array;
+
+  if (array) {
+    if (array.length < (LARGE_ARRAY_SIZE - 1)) {
+      assocSet(array, key, value);
+    } else {
+      data.array = null;
+      data.map = new MapCache(array);
+    }
+  }
+  var map = data.map;
+  if (map) {
+    map.set(key, value);
+  }
+  return this;
+}
+
+export default stackSet;

+ 43 - 0
packages/ckeditor5-utils/src/lib/lodash/isArguments.js

@@ -0,0 +1,43 @@
+import isArrayLikeObject from './isArrayLikeObject';
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/** Built-in value references. */
+var propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
+/**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+function isArguments(value) {
+  // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
+  return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
+    (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
+}
+
+export default isArguments;

+ 35 - 0
packages/ckeditor5-utils/src/lib/lodash/isArray.js

@@ -0,0 +1,35 @@
+/**
+ * lodash 4.0.1 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modularize exports="es" include="clone,extend,isPlainObject,isObject,isArray,last,isEqual" --development --output src/lib/lodash`
+ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @type Function
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+var isArray = Array.isArray;
+
+export default isArray;

+ 35 - 0
packages/ckeditor5-utils/src/lib/lodash/isArrayLike.js

@@ -0,0 +1,35 @@
+import getLength from './internal/getLength';
+import isFunction from './isFunction';
+import isLength from './isLength';
+
+/**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @type Function
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+function isArrayLike(value) {
+  return value != null &&
+    !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));
+}
+
+export default isArrayLike;

+ 32 - 0
packages/ckeditor5-utils/src/lib/lodash/isArrayLikeObject.js

@@ -0,0 +1,32 @@
+import isArrayLike from './isArrayLike';
+import isObjectLike from './isObjectLike';
+
+/**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @type Function
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+function isArrayLikeObject(value) {
+  return isObjectLike(value) && isArrayLike(value);
+}
+
+export default isArrayLikeObject;

+ 42 - 0
packages/ckeditor5-utils/src/lib/lodash/isEqual.js

@@ -0,0 +1,42 @@
+/**
+ * lodash 4.0.1 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modularize exports="es" include="clone,extend,isPlainObject,isObject,isArray,last,isEqual" --development --output src/lib/lodash`
+ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+import baseIsEqual from './internal/baseIsEqual';
+
+/**
+ * Performs a deep comparison between two values to determine if they are
+ * equivalent.
+ *
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
+ * by their own, not inherited, enumerable properties. Functions and DOM
+ * nodes are **not** supported.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ * var other = { 'user': 'fred' };
+ *
+ * _.isEqual(object, other);
+ * // => true
+ *
+ * object === other;
+ * // => false
+ */
+function isEqual(value, other) {
+  return baseIsEqual(value, other);
+}
+
+export default isEqual;

+ 40 - 0
packages/ckeditor5-utils/src/lib/lodash/isFunction.js

@@ -0,0 +1,40 @@
+import isObject from './isObject';
+
+/** `Object#toString` result references. */
+var funcTag = '[object Function]',
+    genTag = '[object GeneratorFunction]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+function isFunction(value) {
+  // The use of `Object#toString` avoids issues with the `typeof` operator
+  // in Safari 8 which returns 'object' for typed array constructors, and
+  // PhantomJS 1.9 which returns 'function' for `NodeList` instances.
+  var tag = isObject(value) ? objectToString.call(value) : '';
+  return tag == funcTag || tag == genTag;
+}
+
+export default isFunction;

+ 32 - 0
packages/ckeditor5-utils/src/lib/lodash/isLength.js

@@ -0,0 +1,32 @@
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+function isLength(value) {
+  return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+export default isLength;

+ 53 - 0
packages/ckeditor5-utils/src/lib/lodash/isNative.js

@@ -0,0 +1,53 @@
+import isFunction from './isFunction';
+import isHostObject from './internal/isHostObject';
+import isObjectLike from './isObjectLike';
+
+/** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */
+var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+
+/** Used to detect host constructors (Safari > 5). */
+var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = Function.prototype.toString;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/** Used to detect if a method is native. */
+var reIsNative = RegExp('^' +
+  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+);
+
+/**
+ * Checks if `value` is a native function.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
+ */
+function isNative(value) {
+  if (value == null) {
+    return false;
+  }
+  if (isFunction(value)) {
+    return reIsNative.test(funcToString.call(value));
+  }
+  return isObjectLike(value) &&
+    (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
+}
+
+export default isNative;

+ 40 - 0
packages/ckeditor5-utils/src/lib/lodash/isObject.js

@@ -0,0 +1,40 @@
+/**
+ * lodash 4.0.1 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modularize exports="es" include="clone,extend,isPlainObject,isObject,isArray,last,isEqual" --development --output src/lib/lodash`
+ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+function isObject(value) {
+  // Avoid a V8 JIT bug in Chrome 19-20.
+  // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+  var type = typeof value;
+  return !!value && (type == 'object' || type == 'function');
+}
+
+export default isObject;

+ 28 - 0
packages/ckeditor5-utils/src/lib/lodash/isObjectLike.js

@@ -0,0 +1,28 @@
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+  return !!value && typeof value == 'object';
+}
+
+export default isObjectLike;

+ 76 - 0
packages/ckeditor5-utils/src/lib/lodash/isPlainObject.js

@@ -0,0 +1,76 @@
+/**
+ * lodash 4.0.1 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modularize exports="es" include="clone,extend,isPlainObject,isObject,isArray,last,isEqual" --development --output src/lib/lodash`
+ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+import isHostObject from './internal/isHostObject';
+import isObjectLike from './isObjectLike';
+
+/** `Object#toString` result references. */
+var objectTag = '[object Object]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = Function.prototype.toString;
+
+/** Used to infer the `Object` constructor. */
+var objectCtorString = funcToString.call(Object);
+
+/**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/** Built-in value references. */
+var getPrototypeOf = Object.getPrototypeOf;
+
+/**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+ * @example
+ *
+ * function Foo() {
+ *   this.a = 1;
+ * }
+ *
+ * _.isPlainObject(new Foo);
+ * // => false
+ *
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
+ *
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
+ */
+function isPlainObject(value) {
+  if (!isObjectLike(value) || objectToString.call(value) != objectTag || isHostObject(value)) {
+    return false;
+  }
+  var proto = objectProto;
+  if (typeof value.constructor == 'function') {
+    proto = getPrototypeOf(value);
+  }
+  if (proto === null) {
+    return true;
+  }
+  var Ctor = proto.constructor;
+  return (typeof Ctor == 'function' &&
+    Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
+}
+
+export default isPlainObject;

+ 37 - 0
packages/ckeditor5-utils/src/lib/lodash/isString.js

@@ -0,0 +1,37 @@
+import isArray from './isArray';
+import isObjectLike from './isObjectLike';
+
+/** `Object#toString` result references. */
+var stringTag = '[object String]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+function isString(value) {
+  return typeof value == 'string' ||
+    (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
+}
+
+export default isString;

+ 74 - 0
packages/ckeditor5-utils/src/lib/lodash/isTypedArray.js

@@ -0,0 +1,74 @@
+import isLength from './isLength';
+import isObjectLike from './isObjectLike';
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+    arrayTag = '[object Array]',
+    boolTag = '[object Boolean]',
+    dateTag = '[object Date]',
+    errorTag = '[object Error]',
+    funcTag = '[object Function]',
+    mapTag = '[object Map]',
+    numberTag = '[object Number]',
+    objectTag = '[object Object]',
+    regexpTag = '[object RegExp]',
+    setTag = '[object Set]',
+    stringTag = '[object String]',
+    weakMapTag = '[object WeakMap]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+    float32Tag = '[object Float32Array]',
+    float64Tag = '[object Float64Array]',
+    int8Tag = '[object Int8Array]',
+    int16Tag = '[object Int16Array]',
+    int32Tag = '[object Int32Array]',
+    uint8Tag = '[object Uint8Array]',
+    uint8ClampedTag = '[object Uint8ClampedArray]',
+    uint16Tag = '[object Uint16Array]',
+    uint32Tag = '[object Uint32Array]';
+
+/** Used to identify `toStringTag` values of typed arrays. */
+var typedArrayTags = {};
+typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+typedArrayTags[uint32Tag] = true;
+typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+typedArrayTags[dateTag] = typedArrayTags[errorTag] =
+typedArrayTags[funcTag] = typedArrayTags[mapTag] =
+typedArrayTags[numberTag] = typedArrayTags[objectTag] =
+typedArrayTags[regexpTag] = typedArrayTags[setTag] =
+typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+function isTypedArray(value) {
+  return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
+}
+
+export default isTypedArray;

Некоторые файлы не были показаны из-за большого количества измененных файлов