kritzel-stencil 0.0.44 → 0.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -709,6 +709,2023 @@ class KritzelGeometryHelper {
709
709
  }
710
710
  }
711
711
 
712
+ /** Detect free variable `global` from Node.js. */
713
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
714
+
715
+ /** Detect free variable `self`. */
716
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
717
+
718
+ /** Used as a reference to the global object. */
719
+ var root = freeGlobal || freeSelf || Function('return this')();
720
+
721
+ /** Built-in value references. */
722
+ var Symbol = root.Symbol;
723
+
724
+ /** Used for built-in method references. */
725
+ var objectProto$b = Object.prototype;
726
+
727
+ /** Used to check objects for own properties. */
728
+ var hasOwnProperty$8 = objectProto$b.hasOwnProperty;
729
+
730
+ /**
731
+ * Used to resolve the
732
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
733
+ * of values.
734
+ */
735
+ var nativeObjectToString$1 = objectProto$b.toString;
736
+
737
+ /** Built-in value references. */
738
+ var symToStringTag$1 = Symbol ? Symbol.toStringTag : undefined;
739
+
740
+ /**
741
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
742
+ *
743
+ * @private
744
+ * @param {*} value The value to query.
745
+ * @returns {string} Returns the raw `toStringTag`.
746
+ */
747
+ function getRawTag(value) {
748
+ var isOwn = hasOwnProperty$8.call(value, symToStringTag$1),
749
+ tag = value[symToStringTag$1];
750
+
751
+ try {
752
+ value[symToStringTag$1] = undefined;
753
+ var unmasked = true;
754
+ } catch (e) {}
755
+
756
+ var result = nativeObjectToString$1.call(value);
757
+ if (unmasked) {
758
+ if (isOwn) {
759
+ value[symToStringTag$1] = tag;
760
+ } else {
761
+ delete value[symToStringTag$1];
762
+ }
763
+ }
764
+ return result;
765
+ }
766
+
767
+ /** Used for built-in method references. */
768
+ var objectProto$a = Object.prototype;
769
+
770
+ /**
771
+ * Used to resolve the
772
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
773
+ * of values.
774
+ */
775
+ var nativeObjectToString = objectProto$a.toString;
776
+
777
+ /**
778
+ * Converts `value` to a string using `Object.prototype.toString`.
779
+ *
780
+ * @private
781
+ * @param {*} value The value to convert.
782
+ * @returns {string} Returns the converted string.
783
+ */
784
+ function objectToString(value) {
785
+ return nativeObjectToString.call(value);
786
+ }
787
+
788
+ /** `Object#toString` result references. */
789
+ var nullTag = '[object Null]',
790
+ undefinedTag = '[object Undefined]';
791
+
792
+ /** Built-in value references. */
793
+ var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
794
+
795
+ /**
796
+ * The base implementation of `getTag` without fallbacks for buggy environments.
797
+ *
798
+ * @private
799
+ * @param {*} value The value to query.
800
+ * @returns {string} Returns the `toStringTag`.
801
+ */
802
+ function baseGetTag(value) {
803
+ if (value == null) {
804
+ return value === undefined ? undefinedTag : nullTag;
805
+ }
806
+ return (symToStringTag && symToStringTag in Object(value))
807
+ ? getRawTag(value)
808
+ : objectToString(value);
809
+ }
810
+
811
+ /**
812
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
813
+ * and has a `typeof` result of "object".
814
+ *
815
+ * @static
816
+ * @memberOf _
817
+ * @since 4.0.0
818
+ * @category Lang
819
+ * @param {*} value The value to check.
820
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
821
+ * @example
822
+ *
823
+ * _.isObjectLike({});
824
+ * // => true
825
+ *
826
+ * _.isObjectLike([1, 2, 3]);
827
+ * // => true
828
+ *
829
+ * _.isObjectLike(_.noop);
830
+ * // => false
831
+ *
832
+ * _.isObjectLike(null);
833
+ * // => false
834
+ */
835
+ function isObjectLike(value) {
836
+ return value != null && typeof value == 'object';
837
+ }
838
+
839
+ /**
840
+ * Checks if `value` is classified as an `Array` object.
841
+ *
842
+ * @static
843
+ * @memberOf _
844
+ * @since 0.1.0
845
+ * @category Lang
846
+ * @param {*} value The value to check.
847
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
848
+ * @example
849
+ *
850
+ * _.isArray([1, 2, 3]);
851
+ * // => true
852
+ *
853
+ * _.isArray(document.body.children);
854
+ * // => false
855
+ *
856
+ * _.isArray('abc');
857
+ * // => false
858
+ *
859
+ * _.isArray(_.noop);
860
+ * // => false
861
+ */
862
+ var isArray = Array.isArray;
863
+
864
+ /**
865
+ * Checks if `value` is the
866
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
867
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
868
+ *
869
+ * @static
870
+ * @memberOf _
871
+ * @since 0.1.0
872
+ * @category Lang
873
+ * @param {*} value The value to check.
874
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
875
+ * @example
876
+ *
877
+ * _.isObject({});
878
+ * // => true
879
+ *
880
+ * _.isObject([1, 2, 3]);
881
+ * // => true
882
+ *
883
+ * _.isObject(_.noop);
884
+ * // => true
885
+ *
886
+ * _.isObject(null);
887
+ * // => false
888
+ */
889
+ function isObject(value) {
890
+ var type = typeof value;
891
+ return value != null && (type == 'object' || type == 'function');
892
+ }
893
+
894
+ /** `Object#toString` result references. */
895
+ var asyncTag = '[object AsyncFunction]',
896
+ funcTag$2 = '[object Function]',
897
+ genTag$1 = '[object GeneratorFunction]',
898
+ proxyTag = '[object Proxy]';
899
+
900
+ /**
901
+ * Checks if `value` is classified as a `Function` object.
902
+ *
903
+ * @static
904
+ * @memberOf _
905
+ * @since 0.1.0
906
+ * @category Lang
907
+ * @param {*} value The value to check.
908
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
909
+ * @example
910
+ *
911
+ * _.isFunction(_);
912
+ * // => true
913
+ *
914
+ * _.isFunction(/abc/);
915
+ * // => false
916
+ */
917
+ function isFunction(value) {
918
+ if (!isObject(value)) {
919
+ return false;
920
+ }
921
+ // The use of `Object#toString` avoids issues with the `typeof` operator
922
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
923
+ var tag = baseGetTag(value);
924
+ return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
925
+ }
926
+
927
+ /** Used to detect overreaching core-js shims. */
928
+ var coreJsData = root['__core-js_shared__'];
929
+
930
+ /** Used to detect methods masquerading as native. */
931
+ var maskSrcKey = (function() {
932
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
933
+ return uid ? ('Symbol(src)_1.' + uid) : '';
934
+ }());
935
+
936
+ /**
937
+ * Checks if `func` has its source masked.
938
+ *
939
+ * @private
940
+ * @param {Function} func The function to check.
941
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
942
+ */
943
+ function isMasked(func) {
944
+ return !!maskSrcKey && (maskSrcKey in func);
945
+ }
946
+
947
+ /** Used for built-in method references. */
948
+ var funcProto$1 = Function.prototype;
949
+
950
+ /** Used to resolve the decompiled source of functions. */
951
+ var funcToString$1 = funcProto$1.toString;
952
+
953
+ /**
954
+ * Converts `func` to its source code.
955
+ *
956
+ * @private
957
+ * @param {Function} func The function to convert.
958
+ * @returns {string} Returns the source code.
959
+ */
960
+ function toSource(func) {
961
+ if (func != null) {
962
+ try {
963
+ return funcToString$1.call(func);
964
+ } catch (e) {}
965
+ try {
966
+ return (func + '');
967
+ } catch (e) {}
968
+ }
969
+ return '';
970
+ }
971
+
972
+ /**
973
+ * Used to match `RegExp`
974
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
975
+ */
976
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
977
+
978
+ /** Used to detect host constructors (Safari). */
979
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
980
+
981
+ /** Used for built-in method references. */
982
+ var funcProto = Function.prototype,
983
+ objectProto$9 = Object.prototype;
984
+
985
+ /** Used to resolve the decompiled source of functions. */
986
+ var funcToString = funcProto.toString;
987
+
988
+ /** Used to check objects for own properties. */
989
+ var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
990
+
991
+ /** Used to detect if a method is native. */
992
+ var reIsNative = RegExp('^' +
993
+ funcToString.call(hasOwnProperty$7).replace(reRegExpChar, '\\$&')
994
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
995
+ );
996
+
997
+ /**
998
+ * The base implementation of `_.isNative` without bad shim checks.
999
+ *
1000
+ * @private
1001
+ * @param {*} value The value to check.
1002
+ * @returns {boolean} Returns `true` if `value` is a native function,
1003
+ * else `false`.
1004
+ */
1005
+ function baseIsNative(value) {
1006
+ if (!isObject(value) || isMasked(value)) {
1007
+ return false;
1008
+ }
1009
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
1010
+ return pattern.test(toSource(value));
1011
+ }
1012
+
1013
+ /**
1014
+ * Gets the value at `key` of `object`.
1015
+ *
1016
+ * @private
1017
+ * @param {Object} [object] The object to query.
1018
+ * @param {string} key The key of the property to get.
1019
+ * @returns {*} Returns the property value.
1020
+ */
1021
+ function getValue(object, key) {
1022
+ return object == null ? undefined : object[key];
1023
+ }
1024
+
1025
+ /**
1026
+ * Gets the native function at `key` of `object`.
1027
+ *
1028
+ * @private
1029
+ * @param {Object} object The object to query.
1030
+ * @param {string} key The key of the method to get.
1031
+ * @returns {*} Returns the function if it's native, else `undefined`.
1032
+ */
1033
+ function getNative(object, key) {
1034
+ var value = getValue(object, key);
1035
+ return baseIsNative(value) ? value : undefined;
1036
+ }
1037
+
1038
+ /* Built-in method references that are verified to be native. */
1039
+ var WeakMap = getNative(root, 'WeakMap');
1040
+
1041
+ /** Built-in value references. */
1042
+ var objectCreate = Object.create;
1043
+
1044
+ /**
1045
+ * The base implementation of `_.create` without support for assigning
1046
+ * properties to the created object.
1047
+ *
1048
+ * @private
1049
+ * @param {Object} proto The object to inherit from.
1050
+ * @returns {Object} Returns the new object.
1051
+ */
1052
+ var baseCreate = (function() {
1053
+ function object() {}
1054
+ return function(proto) {
1055
+ if (!isObject(proto)) {
1056
+ return {};
1057
+ }
1058
+ if (objectCreate) {
1059
+ return objectCreate(proto);
1060
+ }
1061
+ object.prototype = proto;
1062
+ var result = new object;
1063
+ object.prototype = undefined;
1064
+ return result;
1065
+ };
1066
+ }());
1067
+
1068
+ var defineProperty = (function() {
1069
+ try {
1070
+ var func = getNative(Object, 'defineProperty');
1071
+ func({}, '', {});
1072
+ return func;
1073
+ } catch (e) {}
1074
+ }());
1075
+
1076
+ /**
1077
+ * A specialized version of `_.forEach` for arrays without support for
1078
+ * iteratee shorthands.
1079
+ *
1080
+ * @private
1081
+ * @param {Array} [array] The array to iterate over.
1082
+ * @param {Function} iteratee The function invoked per iteration.
1083
+ * @returns {Array} Returns `array`.
1084
+ */
1085
+ function arrayEach(array, iteratee) {
1086
+ var index = -1,
1087
+ length = array == null ? 0 : array.length;
1088
+
1089
+ while (++index < length) {
1090
+ if (iteratee(array[index], index, array) === false) {
1091
+ break;
1092
+ }
1093
+ }
1094
+ return array;
1095
+ }
1096
+
1097
+ /** Used as references for various `Number` constants. */
1098
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
1099
+
1100
+ /** Used to detect unsigned integer values. */
1101
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
1102
+
1103
+ /**
1104
+ * Checks if `value` is a valid array-like index.
1105
+ *
1106
+ * @private
1107
+ * @param {*} value The value to check.
1108
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1109
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1110
+ */
1111
+ function isIndex(value, length) {
1112
+ var type = typeof value;
1113
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
1114
+
1115
+ return !!length &&
1116
+ (type == 'number' ||
1117
+ (type != 'symbol' && reIsUint.test(value))) &&
1118
+ (value > -1 && value % 1 == 0 && value < length);
1119
+ }
1120
+
1121
+ /**
1122
+ * The base implementation of `assignValue` and `assignMergeValue` without
1123
+ * value checks.
1124
+ *
1125
+ * @private
1126
+ * @param {Object} object The object to modify.
1127
+ * @param {string} key The key of the property to assign.
1128
+ * @param {*} value The value to assign.
1129
+ */
1130
+ function baseAssignValue(object, key, value) {
1131
+ if (key == '__proto__' && defineProperty) {
1132
+ defineProperty(object, key, {
1133
+ 'configurable': true,
1134
+ 'enumerable': true,
1135
+ 'value': value,
1136
+ 'writable': true
1137
+ });
1138
+ } else {
1139
+ object[key] = value;
1140
+ }
1141
+ }
1142
+
1143
+ /**
1144
+ * Performs a
1145
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1146
+ * comparison between two values to determine if they are equivalent.
1147
+ *
1148
+ * @static
1149
+ * @memberOf _
1150
+ * @since 4.0.0
1151
+ * @category Lang
1152
+ * @param {*} value The value to compare.
1153
+ * @param {*} other The other value to compare.
1154
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1155
+ * @example
1156
+ *
1157
+ * var object = { 'a': 1 };
1158
+ * var other = { 'a': 1 };
1159
+ *
1160
+ * _.eq(object, object);
1161
+ * // => true
1162
+ *
1163
+ * _.eq(object, other);
1164
+ * // => false
1165
+ *
1166
+ * _.eq('a', 'a');
1167
+ * // => true
1168
+ *
1169
+ * _.eq('a', Object('a'));
1170
+ * // => false
1171
+ *
1172
+ * _.eq(NaN, NaN);
1173
+ * // => true
1174
+ */
1175
+ function eq(value, other) {
1176
+ return value === other || (value !== value && other !== other);
1177
+ }
1178
+
1179
+ /** Used for built-in method references. */
1180
+ var objectProto$8 = Object.prototype;
1181
+
1182
+ /** Used to check objects for own properties. */
1183
+ var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
1184
+
1185
+ /**
1186
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
1187
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1188
+ * for equality comparisons.
1189
+ *
1190
+ * @private
1191
+ * @param {Object} object The object to modify.
1192
+ * @param {string} key The key of the property to assign.
1193
+ * @param {*} value The value to assign.
1194
+ */
1195
+ function assignValue(object, key, value) {
1196
+ var objValue = object[key];
1197
+ if (!(hasOwnProperty$6.call(object, key) && eq(objValue, value)) ||
1198
+ (value === undefined && !(key in object))) {
1199
+ baseAssignValue(object, key, value);
1200
+ }
1201
+ }
1202
+
1203
+ /** Used as references for various `Number` constants. */
1204
+ var MAX_SAFE_INTEGER = 9007199254740991;
1205
+
1206
+ /**
1207
+ * Checks if `value` is a valid array-like length.
1208
+ *
1209
+ * **Note:** This method is loosely based on
1210
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
1211
+ *
1212
+ * @static
1213
+ * @memberOf _
1214
+ * @since 4.0.0
1215
+ * @category Lang
1216
+ * @param {*} value The value to check.
1217
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
1218
+ * @example
1219
+ *
1220
+ * _.isLength(3);
1221
+ * // => true
1222
+ *
1223
+ * _.isLength(Number.MIN_VALUE);
1224
+ * // => false
1225
+ *
1226
+ * _.isLength(Infinity);
1227
+ * // => false
1228
+ *
1229
+ * _.isLength('3');
1230
+ * // => false
1231
+ */
1232
+ function isLength(value) {
1233
+ return typeof value == 'number' &&
1234
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
1235
+ }
1236
+
1237
+ /**
1238
+ * Checks if `value` is array-like. A value is considered array-like if it's
1239
+ * not a function and has a `value.length` that's an integer greater than or
1240
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
1241
+ *
1242
+ * @static
1243
+ * @memberOf _
1244
+ * @since 4.0.0
1245
+ * @category Lang
1246
+ * @param {*} value The value to check.
1247
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
1248
+ * @example
1249
+ *
1250
+ * _.isArrayLike([1, 2, 3]);
1251
+ * // => true
1252
+ *
1253
+ * _.isArrayLike(document.body.children);
1254
+ * // => true
1255
+ *
1256
+ * _.isArrayLike('abc');
1257
+ * // => true
1258
+ *
1259
+ * _.isArrayLike(_.noop);
1260
+ * // => false
1261
+ */
1262
+ function isArrayLike(value) {
1263
+ return value != null && isLength(value.length) && !isFunction(value);
1264
+ }
1265
+
1266
+ /** Used for built-in method references. */
1267
+ var objectProto$7 = Object.prototype;
1268
+
1269
+ /**
1270
+ * Checks if `value` is likely a prototype object.
1271
+ *
1272
+ * @private
1273
+ * @param {*} value The value to check.
1274
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
1275
+ */
1276
+ function isPrototype(value) {
1277
+ var Ctor = value && value.constructor,
1278
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$7;
1279
+
1280
+ return value === proto;
1281
+ }
1282
+
1283
+ /**
1284
+ * The base implementation of `_.times` without support for iteratee shorthands
1285
+ * or max array length checks.
1286
+ *
1287
+ * @private
1288
+ * @param {number} n The number of times to invoke `iteratee`.
1289
+ * @param {Function} iteratee The function invoked per iteration.
1290
+ * @returns {Array} Returns the array of results.
1291
+ */
1292
+ function baseTimes(n, iteratee) {
1293
+ var index = -1,
1294
+ result = Array(n);
1295
+
1296
+ while (++index < n) {
1297
+ result[index] = iteratee(index);
1298
+ }
1299
+ return result;
1300
+ }
1301
+
1302
+ /** `Object#toString` result references. */
1303
+ var argsTag$2 = '[object Arguments]';
1304
+
1305
+ /**
1306
+ * The base implementation of `_.isArguments`.
1307
+ *
1308
+ * @private
1309
+ * @param {*} value The value to check.
1310
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1311
+ */
1312
+ function baseIsArguments(value) {
1313
+ return isObjectLike(value) && baseGetTag(value) == argsTag$2;
1314
+ }
1315
+
1316
+ /** Used for built-in method references. */
1317
+ var objectProto$6 = Object.prototype;
1318
+
1319
+ /** Used to check objects for own properties. */
1320
+ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
1321
+
1322
+ /** Built-in value references. */
1323
+ var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
1324
+
1325
+ /**
1326
+ * Checks if `value` is likely an `arguments` object.
1327
+ *
1328
+ * @static
1329
+ * @memberOf _
1330
+ * @since 0.1.0
1331
+ * @category Lang
1332
+ * @param {*} value The value to check.
1333
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1334
+ * else `false`.
1335
+ * @example
1336
+ *
1337
+ * _.isArguments(function() { return arguments; }());
1338
+ * // => true
1339
+ *
1340
+ * _.isArguments([1, 2, 3]);
1341
+ * // => false
1342
+ */
1343
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
1344
+ return isObjectLike(value) && hasOwnProperty$5.call(value, 'callee') &&
1345
+ !propertyIsEnumerable$1.call(value, 'callee');
1346
+ };
1347
+
1348
+ /**
1349
+ * This method returns `false`.
1350
+ *
1351
+ * @static
1352
+ * @memberOf _
1353
+ * @since 4.13.0
1354
+ * @category Util
1355
+ * @returns {boolean} Returns `false`.
1356
+ * @example
1357
+ *
1358
+ * _.times(2, _.stubFalse);
1359
+ * // => [false, false]
1360
+ */
1361
+ function stubFalse() {
1362
+ return false;
1363
+ }
1364
+
1365
+ /** Detect free variable `exports`. */
1366
+ var freeExports$2 = typeof exports == 'object' && exports && !exports.nodeType && exports;
1367
+
1368
+ /** Detect free variable `module`. */
1369
+ var freeModule$1 = freeExports$2 && typeof module == 'object' && module && !module.nodeType && module;
1370
+
1371
+ /** Detect the popular CommonJS extension `module.exports`. */
1372
+ var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$2;
1373
+
1374
+ /** Built-in value references. */
1375
+ var Buffer = moduleExports$1 ? root.Buffer : undefined;
1376
+
1377
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1378
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
1379
+
1380
+ /**
1381
+ * Checks if `value` is a buffer.
1382
+ *
1383
+ * @static
1384
+ * @memberOf _
1385
+ * @since 4.3.0
1386
+ * @category Lang
1387
+ * @param {*} value The value to check.
1388
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
1389
+ * @example
1390
+ *
1391
+ * _.isBuffer(new Buffer(2));
1392
+ * // => true
1393
+ *
1394
+ * _.isBuffer(new Uint8Array(2));
1395
+ * // => false
1396
+ */
1397
+ var isBuffer = nativeIsBuffer || stubFalse;
1398
+
1399
+ /** `Object#toString` result references. */
1400
+ var argsTag$1 = '[object Arguments]',
1401
+ arrayTag$1 = '[object Array]',
1402
+ boolTag$2 = '[object Boolean]',
1403
+ dateTag$2 = '[object Date]',
1404
+ errorTag$1 = '[object Error]',
1405
+ funcTag$1 = '[object Function]',
1406
+ mapTag$4 = '[object Map]',
1407
+ numberTag$2 = '[object Number]',
1408
+ objectTag$2 = '[object Object]',
1409
+ regexpTag$2 = '[object RegExp]',
1410
+ setTag$4 = '[object Set]',
1411
+ stringTag$2 = '[object String]',
1412
+ weakMapTag$2 = '[object WeakMap]';
1413
+
1414
+ var arrayBufferTag$2 = '[object ArrayBuffer]',
1415
+ dataViewTag$3 = '[object DataView]',
1416
+ float32Tag$2 = '[object Float32Array]',
1417
+ float64Tag$2 = '[object Float64Array]',
1418
+ int8Tag$2 = '[object Int8Array]',
1419
+ int16Tag$2 = '[object Int16Array]',
1420
+ int32Tag$2 = '[object Int32Array]',
1421
+ uint8Tag$2 = '[object Uint8Array]',
1422
+ uint8ClampedTag$2 = '[object Uint8ClampedArray]',
1423
+ uint16Tag$2 = '[object Uint16Array]',
1424
+ uint32Tag$2 = '[object Uint32Array]';
1425
+
1426
+ /** Used to identify `toStringTag` values of typed arrays. */
1427
+ var typedArrayTags = {};
1428
+ typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] =
1429
+ typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] =
1430
+ typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] =
1431
+ typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] =
1432
+ typedArrayTags[uint32Tag$2] = true;
1433
+ typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] =
1434
+ typedArrayTags[arrayBufferTag$2] = typedArrayTags[boolTag$2] =
1435
+ typedArrayTags[dataViewTag$3] = typedArrayTags[dateTag$2] =
1436
+ typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] =
1437
+ typedArrayTags[mapTag$4] = typedArrayTags[numberTag$2] =
1438
+ typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$2] =
1439
+ typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] =
1440
+ typedArrayTags[weakMapTag$2] = false;
1441
+
1442
+ /**
1443
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
1444
+ *
1445
+ * @private
1446
+ * @param {*} value The value to check.
1447
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1448
+ */
1449
+ function baseIsTypedArray(value) {
1450
+ return isObjectLike(value) &&
1451
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
1452
+ }
1453
+
1454
+ /**
1455
+ * The base implementation of `_.unary` without support for storing metadata.
1456
+ *
1457
+ * @private
1458
+ * @param {Function} func The function to cap arguments for.
1459
+ * @returns {Function} Returns the new capped function.
1460
+ */
1461
+ function baseUnary(func) {
1462
+ return function(value) {
1463
+ return func(value);
1464
+ };
1465
+ }
1466
+
1467
+ /** Detect free variable `exports`. */
1468
+ var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports;
1469
+
1470
+ /** Detect free variable `module`. */
1471
+ var freeModule = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module;
1472
+
1473
+ /** Detect the popular CommonJS extension `module.exports`. */
1474
+ var moduleExports = freeModule && freeModule.exports === freeExports$1;
1475
+
1476
+ /** Detect free variable `process` from Node.js. */
1477
+ var freeProcess = moduleExports && freeGlobal.process;
1478
+
1479
+ /** Used to access faster Node.js helpers. */
1480
+ var nodeUtil = (function() {
1481
+ try {
1482
+ // Use `util.types` for Node.js 10+.
1483
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
1484
+
1485
+ if (types) {
1486
+ return types;
1487
+ }
1488
+
1489
+ // Legacy `process.binding('util')` for Node.js < 10.
1490
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
1491
+ } catch (e) {}
1492
+ }());
1493
+
1494
+ /* Node.js helper references. */
1495
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
1496
+
1497
+ /**
1498
+ * Checks if `value` is classified as a typed array.
1499
+ *
1500
+ * @static
1501
+ * @memberOf _
1502
+ * @since 3.0.0
1503
+ * @category Lang
1504
+ * @param {*} value The value to check.
1505
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1506
+ * @example
1507
+ *
1508
+ * _.isTypedArray(new Uint8Array);
1509
+ * // => true
1510
+ *
1511
+ * _.isTypedArray([]);
1512
+ * // => false
1513
+ */
1514
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
1515
+
1516
+ /** Used for built-in method references. */
1517
+ var objectProto$5 = Object.prototype;
1518
+
1519
+ /** Used to check objects for own properties. */
1520
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
1521
+
1522
+ /**
1523
+ * Creates an array of the enumerable property names of the array-like `value`.
1524
+ *
1525
+ * @private
1526
+ * @param {*} value The value to query.
1527
+ * @param {boolean} inherited Specify returning inherited property names.
1528
+ * @returns {Array} Returns the array of property names.
1529
+ */
1530
+ function arrayLikeKeys(value, inherited) {
1531
+ var isArr = isArray(value),
1532
+ isArg = !isArr && isArguments(value),
1533
+ isBuff = !isArr && !isArg && isBuffer(value),
1534
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
1535
+ skipIndexes = isArr || isArg || isBuff || isType,
1536
+ result = skipIndexes ? baseTimes(value.length, String) : [],
1537
+ length = result.length;
1538
+
1539
+ for (var key in value) {
1540
+ if ((hasOwnProperty$4.call(value, key)) &&
1541
+ !(skipIndexes && (
1542
+ // Safari 9 has enumerable `arguments.length` in strict mode.
1543
+ key == 'length' ||
1544
+ // Node.js 0.10 has enumerable non-index properties on buffers.
1545
+ (isBuff && (key == 'offset' || key == 'parent')) ||
1546
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
1547
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
1548
+ // Skip index properties.
1549
+ isIndex(key, length)
1550
+ ))) {
1551
+ result.push(key);
1552
+ }
1553
+ }
1554
+ return result;
1555
+ }
1556
+
1557
+ /**
1558
+ * Creates a unary function that invokes `func` with its argument transformed.
1559
+ *
1560
+ * @private
1561
+ * @param {Function} func The function to wrap.
1562
+ * @param {Function} transform The argument transform.
1563
+ * @returns {Function} Returns the new function.
1564
+ */
1565
+ function overArg(func, transform) {
1566
+ return function(arg) {
1567
+ return func(transform(arg));
1568
+ };
1569
+ }
1570
+
1571
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1572
+ var nativeKeys = overArg(Object.keys, Object);
1573
+
1574
+ /** Used for built-in method references. */
1575
+ var objectProto$4 = Object.prototype;
1576
+
1577
+ /** Used to check objects for own properties. */
1578
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
1579
+
1580
+ /**
1581
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
1582
+ *
1583
+ * @private
1584
+ * @param {Object} object The object to query.
1585
+ * @returns {Array} Returns the array of property names.
1586
+ */
1587
+ function baseKeys(object) {
1588
+ if (!isPrototype(object)) {
1589
+ return nativeKeys(object);
1590
+ }
1591
+ var result = [];
1592
+ for (var key in Object(object)) {
1593
+ if (hasOwnProperty$3.call(object, key) && key != 'constructor') {
1594
+ result.push(key);
1595
+ }
1596
+ }
1597
+ return result;
1598
+ }
1599
+
1600
+ /**
1601
+ * Creates an array of the own enumerable property names of `object`.
1602
+ *
1603
+ * **Note:** Non-object values are coerced to objects. See the
1604
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1605
+ * for more details.
1606
+ *
1607
+ * @static
1608
+ * @since 0.1.0
1609
+ * @memberOf _
1610
+ * @category Object
1611
+ * @param {Object} object The object to query.
1612
+ * @returns {Array} Returns the array of property names.
1613
+ * @example
1614
+ *
1615
+ * function Foo() {
1616
+ * this.a = 1;
1617
+ * this.b = 2;
1618
+ * }
1619
+ *
1620
+ * Foo.prototype.c = 3;
1621
+ *
1622
+ * _.keys(new Foo);
1623
+ * // => ['a', 'b'] (iteration order is not guaranteed)
1624
+ *
1625
+ * _.keys('hi');
1626
+ * // => ['0', '1']
1627
+ */
1628
+ function keys(object) {
1629
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
1630
+ }
1631
+
1632
+ /* Built-in method references that are verified to be native. */
1633
+ var nativeCreate = getNative(Object, 'create');
1634
+
1635
+ /**
1636
+ * Removes all key-value entries from the hash.
1637
+ *
1638
+ * @private
1639
+ * @name clear
1640
+ * @memberOf Hash
1641
+ */
1642
+ function hashClear() {
1643
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
1644
+ this.size = 0;
1645
+ }
1646
+
1647
+ /**
1648
+ * Removes `key` and its value from the hash.
1649
+ *
1650
+ * @private
1651
+ * @name delete
1652
+ * @memberOf Hash
1653
+ * @param {Object} hash The hash to modify.
1654
+ * @param {string} key The key of the value to remove.
1655
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1656
+ */
1657
+ function hashDelete(key) {
1658
+ var result = this.has(key) && delete this.__data__[key];
1659
+ this.size -= result ? 1 : 0;
1660
+ return result;
1661
+ }
1662
+
1663
+ /** Used to stand-in for `undefined` hash values. */
1664
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
1665
+
1666
+ /** Used for built-in method references. */
1667
+ var objectProto$3 = Object.prototype;
1668
+
1669
+ /** Used to check objects for own properties. */
1670
+ var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
1671
+
1672
+ /**
1673
+ * Gets the hash value for `key`.
1674
+ *
1675
+ * @private
1676
+ * @name get
1677
+ * @memberOf Hash
1678
+ * @param {string} key The key of the value to get.
1679
+ * @returns {*} Returns the entry value.
1680
+ */
1681
+ function hashGet(key) {
1682
+ var data = this.__data__;
1683
+ if (nativeCreate) {
1684
+ var result = data[key];
1685
+ return result === HASH_UNDEFINED$1 ? undefined : result;
1686
+ }
1687
+ return hasOwnProperty$2.call(data, key) ? data[key] : undefined;
1688
+ }
1689
+
1690
+ /** Used for built-in method references. */
1691
+ var objectProto$2 = Object.prototype;
1692
+
1693
+ /** Used to check objects for own properties. */
1694
+ var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
1695
+
1696
+ /**
1697
+ * Checks if a hash value for `key` exists.
1698
+ *
1699
+ * @private
1700
+ * @name has
1701
+ * @memberOf Hash
1702
+ * @param {string} key The key of the entry to check.
1703
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1704
+ */
1705
+ function hashHas(key) {
1706
+ var data = this.__data__;
1707
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty$1.call(data, key);
1708
+ }
1709
+
1710
+ /** Used to stand-in for `undefined` hash values. */
1711
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
1712
+
1713
+ /**
1714
+ * Sets the hash `key` to `value`.
1715
+ *
1716
+ * @private
1717
+ * @name set
1718
+ * @memberOf Hash
1719
+ * @param {string} key The key of the value to set.
1720
+ * @param {*} value The value to set.
1721
+ * @returns {Object} Returns the hash instance.
1722
+ */
1723
+ function hashSet(key, value) {
1724
+ var data = this.__data__;
1725
+ this.size += this.has(key) ? 0 : 1;
1726
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
1727
+ return this;
1728
+ }
1729
+
1730
+ /**
1731
+ * Creates a hash object.
1732
+ *
1733
+ * @private
1734
+ * @constructor
1735
+ * @param {Array} [entries] The key-value pairs to cache.
1736
+ */
1737
+ function Hash(entries) {
1738
+ var index = -1,
1739
+ length = entries == null ? 0 : entries.length;
1740
+
1741
+ this.clear();
1742
+ while (++index < length) {
1743
+ var entry = entries[index];
1744
+ this.set(entry[0], entry[1]);
1745
+ }
1746
+ }
1747
+
1748
+ // Add methods to `Hash`.
1749
+ Hash.prototype.clear = hashClear;
1750
+ Hash.prototype['delete'] = hashDelete;
1751
+ Hash.prototype.get = hashGet;
1752
+ Hash.prototype.has = hashHas;
1753
+ Hash.prototype.set = hashSet;
1754
+
1755
+ /**
1756
+ * Removes all key-value entries from the list cache.
1757
+ *
1758
+ * @private
1759
+ * @name clear
1760
+ * @memberOf ListCache
1761
+ */
1762
+ function listCacheClear() {
1763
+ this.__data__ = [];
1764
+ this.size = 0;
1765
+ }
1766
+
1767
+ /**
1768
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
1769
+ *
1770
+ * @private
1771
+ * @param {Array} array The array to inspect.
1772
+ * @param {*} key The key to search for.
1773
+ * @returns {number} Returns the index of the matched value, else `-1`.
1774
+ */
1775
+ function assocIndexOf(array, key) {
1776
+ var length = array.length;
1777
+ while (length--) {
1778
+ if (eq(array[length][0], key)) {
1779
+ return length;
1780
+ }
1781
+ }
1782
+ return -1;
1783
+ }
1784
+
1785
+ /** Used for built-in method references. */
1786
+ var arrayProto = Array.prototype;
1787
+
1788
+ /** Built-in value references. */
1789
+ var splice = arrayProto.splice;
1790
+
1791
+ /**
1792
+ * Removes `key` and its value from the list cache.
1793
+ *
1794
+ * @private
1795
+ * @name delete
1796
+ * @memberOf ListCache
1797
+ * @param {string} key The key of the value to remove.
1798
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1799
+ */
1800
+ function listCacheDelete(key) {
1801
+ var data = this.__data__,
1802
+ index = assocIndexOf(data, key);
1803
+
1804
+ if (index < 0) {
1805
+ return false;
1806
+ }
1807
+ var lastIndex = data.length - 1;
1808
+ if (index == lastIndex) {
1809
+ data.pop();
1810
+ } else {
1811
+ splice.call(data, index, 1);
1812
+ }
1813
+ --this.size;
1814
+ return true;
1815
+ }
1816
+
1817
+ /**
1818
+ * Gets the list cache value for `key`.
1819
+ *
1820
+ * @private
1821
+ * @name get
1822
+ * @memberOf ListCache
1823
+ * @param {string} key The key of the value to get.
1824
+ * @returns {*} Returns the entry value.
1825
+ */
1826
+ function listCacheGet(key) {
1827
+ var data = this.__data__,
1828
+ index = assocIndexOf(data, key);
1829
+
1830
+ return index < 0 ? undefined : data[index][1];
1831
+ }
1832
+
1833
+ /**
1834
+ * Checks if a list cache value for `key` exists.
1835
+ *
1836
+ * @private
1837
+ * @name has
1838
+ * @memberOf ListCache
1839
+ * @param {string} key The key of the entry to check.
1840
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1841
+ */
1842
+ function listCacheHas(key) {
1843
+ return assocIndexOf(this.__data__, key) > -1;
1844
+ }
1845
+
1846
+ /**
1847
+ * Sets the list cache `key` to `value`.
1848
+ *
1849
+ * @private
1850
+ * @name set
1851
+ * @memberOf ListCache
1852
+ * @param {string} key The key of the value to set.
1853
+ * @param {*} value The value to set.
1854
+ * @returns {Object} Returns the list cache instance.
1855
+ */
1856
+ function listCacheSet(key, value) {
1857
+ var data = this.__data__,
1858
+ index = assocIndexOf(data, key);
1859
+
1860
+ if (index < 0) {
1861
+ ++this.size;
1862
+ data.push([key, value]);
1863
+ } else {
1864
+ data[index][1] = value;
1865
+ }
1866
+ return this;
1867
+ }
1868
+
1869
+ /**
1870
+ * Creates an list cache object.
1871
+ *
1872
+ * @private
1873
+ * @constructor
1874
+ * @param {Array} [entries] The key-value pairs to cache.
1875
+ */
1876
+ function ListCache(entries) {
1877
+ var index = -1,
1878
+ length = entries == null ? 0 : entries.length;
1879
+
1880
+ this.clear();
1881
+ while (++index < length) {
1882
+ var entry = entries[index];
1883
+ this.set(entry[0], entry[1]);
1884
+ }
1885
+ }
1886
+
1887
+ // Add methods to `ListCache`.
1888
+ ListCache.prototype.clear = listCacheClear;
1889
+ ListCache.prototype['delete'] = listCacheDelete;
1890
+ ListCache.prototype.get = listCacheGet;
1891
+ ListCache.prototype.has = listCacheHas;
1892
+ ListCache.prototype.set = listCacheSet;
1893
+
1894
+ /* Built-in method references that are verified to be native. */
1895
+ var Map$1 = getNative(root, 'Map');
1896
+
1897
+ /**
1898
+ * Removes all key-value entries from the map.
1899
+ *
1900
+ * @private
1901
+ * @name clear
1902
+ * @memberOf MapCache
1903
+ */
1904
+ function mapCacheClear() {
1905
+ this.size = 0;
1906
+ this.__data__ = {
1907
+ 'hash': new Hash,
1908
+ 'map': new (Map$1 || ListCache),
1909
+ 'string': new Hash
1910
+ };
1911
+ }
1912
+
1913
+ /**
1914
+ * Checks if `value` is suitable for use as unique object key.
1915
+ *
1916
+ * @private
1917
+ * @param {*} value The value to check.
1918
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1919
+ */
1920
+ function isKeyable(value) {
1921
+ var type = typeof value;
1922
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
1923
+ ? (value !== '__proto__')
1924
+ : (value === null);
1925
+ }
1926
+
1927
+ /**
1928
+ * Gets the data for `map`.
1929
+ *
1930
+ * @private
1931
+ * @param {Object} map The map to query.
1932
+ * @param {string} key The reference key.
1933
+ * @returns {*} Returns the map data.
1934
+ */
1935
+ function getMapData(map, key) {
1936
+ var data = map.__data__;
1937
+ return isKeyable(key)
1938
+ ? data[typeof key == 'string' ? 'string' : 'hash']
1939
+ : data.map;
1940
+ }
1941
+
1942
+ /**
1943
+ * Removes `key` and its value from the map.
1944
+ *
1945
+ * @private
1946
+ * @name delete
1947
+ * @memberOf MapCache
1948
+ * @param {string} key The key of the value to remove.
1949
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1950
+ */
1951
+ function mapCacheDelete(key) {
1952
+ var result = getMapData(this, key)['delete'](key);
1953
+ this.size -= result ? 1 : 0;
1954
+ return result;
1955
+ }
1956
+
1957
+ /**
1958
+ * Gets the map value for `key`.
1959
+ *
1960
+ * @private
1961
+ * @name get
1962
+ * @memberOf MapCache
1963
+ * @param {string} key The key of the value to get.
1964
+ * @returns {*} Returns the entry value.
1965
+ */
1966
+ function mapCacheGet(key) {
1967
+ return getMapData(this, key).get(key);
1968
+ }
1969
+
1970
+ /**
1971
+ * Checks if a map value for `key` exists.
1972
+ *
1973
+ * @private
1974
+ * @name has
1975
+ * @memberOf MapCache
1976
+ * @param {string} key The key of the entry to check.
1977
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1978
+ */
1979
+ function mapCacheHas(key) {
1980
+ return getMapData(this, key).has(key);
1981
+ }
1982
+
1983
+ /**
1984
+ * Sets the map `key` to `value`.
1985
+ *
1986
+ * @private
1987
+ * @name set
1988
+ * @memberOf MapCache
1989
+ * @param {string} key The key of the value to set.
1990
+ * @param {*} value The value to set.
1991
+ * @returns {Object} Returns the map cache instance.
1992
+ */
1993
+ function mapCacheSet(key, value) {
1994
+ var data = getMapData(this, key),
1995
+ size = data.size;
1996
+
1997
+ data.set(key, value);
1998
+ this.size += data.size == size ? 0 : 1;
1999
+ return this;
2000
+ }
2001
+
2002
+ /**
2003
+ * Creates a map cache object to store key-value pairs.
2004
+ *
2005
+ * @private
2006
+ * @constructor
2007
+ * @param {Array} [entries] The key-value pairs to cache.
2008
+ */
2009
+ function MapCache(entries) {
2010
+ var index = -1,
2011
+ length = entries == null ? 0 : entries.length;
2012
+
2013
+ this.clear();
2014
+ while (++index < length) {
2015
+ var entry = entries[index];
2016
+ this.set(entry[0], entry[1]);
2017
+ }
2018
+ }
2019
+
2020
+ // Add methods to `MapCache`.
2021
+ MapCache.prototype.clear = mapCacheClear;
2022
+ MapCache.prototype['delete'] = mapCacheDelete;
2023
+ MapCache.prototype.get = mapCacheGet;
2024
+ MapCache.prototype.has = mapCacheHas;
2025
+ MapCache.prototype.set = mapCacheSet;
2026
+
2027
+ /**
2028
+ * Appends the elements of `values` to `array`.
2029
+ *
2030
+ * @private
2031
+ * @param {Array} array The array to modify.
2032
+ * @param {Array} values The values to append.
2033
+ * @returns {Array} Returns `array`.
2034
+ */
2035
+ function arrayPush(array, values) {
2036
+ var index = -1,
2037
+ length = values.length,
2038
+ offset = array.length;
2039
+
2040
+ while (++index < length) {
2041
+ array[offset + index] = values[index];
2042
+ }
2043
+ return array;
2044
+ }
2045
+
2046
+ /** Built-in value references. */
2047
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
2048
+
2049
+ /**
2050
+ * Removes all key-value entries from the stack.
2051
+ *
2052
+ * @private
2053
+ * @name clear
2054
+ * @memberOf Stack
2055
+ */
2056
+ function stackClear() {
2057
+ this.__data__ = new ListCache;
2058
+ this.size = 0;
2059
+ }
2060
+
2061
+ /**
2062
+ * Removes `key` and its value from the stack.
2063
+ *
2064
+ * @private
2065
+ * @name delete
2066
+ * @memberOf Stack
2067
+ * @param {string} key The key of the value to remove.
2068
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
2069
+ */
2070
+ function stackDelete(key) {
2071
+ var data = this.__data__,
2072
+ result = data['delete'](key);
2073
+
2074
+ this.size = data.size;
2075
+ return result;
2076
+ }
2077
+
2078
+ /**
2079
+ * Gets the stack value for `key`.
2080
+ *
2081
+ * @private
2082
+ * @name get
2083
+ * @memberOf Stack
2084
+ * @param {string} key The key of the value to get.
2085
+ * @returns {*} Returns the entry value.
2086
+ */
2087
+ function stackGet(key) {
2088
+ return this.__data__.get(key);
2089
+ }
2090
+
2091
+ /**
2092
+ * Checks if a stack value for `key` exists.
2093
+ *
2094
+ * @private
2095
+ * @name has
2096
+ * @memberOf Stack
2097
+ * @param {string} key The key of the entry to check.
2098
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2099
+ */
2100
+ function stackHas(key) {
2101
+ return this.__data__.has(key);
2102
+ }
2103
+
2104
+ /** Used as the size to enable large array optimizations. */
2105
+ var LARGE_ARRAY_SIZE = 200;
2106
+
2107
+ /**
2108
+ * Sets the stack `key` to `value`.
2109
+ *
2110
+ * @private
2111
+ * @name set
2112
+ * @memberOf Stack
2113
+ * @param {string} key The key of the value to set.
2114
+ * @param {*} value The value to set.
2115
+ * @returns {Object} Returns the stack cache instance.
2116
+ */
2117
+ function stackSet(key, value) {
2118
+ var data = this.__data__;
2119
+ if (data instanceof ListCache) {
2120
+ var pairs = data.__data__;
2121
+ if (!Map$1 || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
2122
+ pairs.push([key, value]);
2123
+ this.size = ++data.size;
2124
+ return this;
2125
+ }
2126
+ data = this.__data__ = new MapCache(pairs);
2127
+ }
2128
+ data.set(key, value);
2129
+ this.size = data.size;
2130
+ return this;
2131
+ }
2132
+
2133
+ /**
2134
+ * Creates a stack cache object to store key-value pairs.
2135
+ *
2136
+ * @private
2137
+ * @constructor
2138
+ * @param {Array} [entries] The key-value pairs to cache.
2139
+ */
2140
+ function Stack(entries) {
2141
+ var data = this.__data__ = new ListCache(entries);
2142
+ this.size = data.size;
2143
+ }
2144
+
2145
+ // Add methods to `Stack`.
2146
+ Stack.prototype.clear = stackClear;
2147
+ Stack.prototype['delete'] = stackDelete;
2148
+ Stack.prototype.get = stackGet;
2149
+ Stack.prototype.has = stackHas;
2150
+ Stack.prototype.set = stackSet;
2151
+
2152
+ /** Detect free variable `exports`. */
2153
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
2154
+
2155
+ /** Detect free variable `module`. */
2156
+ freeExports && typeof module == 'object' && module && !module.nodeType && module;
2157
+
2158
+ /**
2159
+ * Creates a clone of `buffer`.
2160
+ *
2161
+ * @private
2162
+ * @param {Buffer} buffer The buffer to clone.
2163
+ * @param {boolean} [isDeep] Specify a deep clone.
2164
+ * @returns {Buffer} Returns the cloned buffer.
2165
+ */
2166
+ function cloneBuffer(buffer, isDeep) {
2167
+ {
2168
+ return buffer.slice();
2169
+ }
2170
+ }
2171
+
2172
+ /**
2173
+ * A specialized version of `_.filter` for arrays without support for
2174
+ * iteratee shorthands.
2175
+ *
2176
+ * @private
2177
+ * @param {Array} [array] The array to iterate over.
2178
+ * @param {Function} predicate The function invoked per iteration.
2179
+ * @returns {Array} Returns the new filtered array.
2180
+ */
2181
+ function arrayFilter(array, predicate) {
2182
+ var index = -1,
2183
+ length = array == null ? 0 : array.length,
2184
+ resIndex = 0,
2185
+ result = [];
2186
+
2187
+ while (++index < length) {
2188
+ var value = array[index];
2189
+ if (predicate(value, index, array)) {
2190
+ result[resIndex++] = value;
2191
+ }
2192
+ }
2193
+ return result;
2194
+ }
2195
+
2196
+ /**
2197
+ * This method returns a new empty array.
2198
+ *
2199
+ * @static
2200
+ * @memberOf _
2201
+ * @since 4.13.0
2202
+ * @category Util
2203
+ * @returns {Array} Returns the new empty array.
2204
+ * @example
2205
+ *
2206
+ * var arrays = _.times(2, _.stubArray);
2207
+ *
2208
+ * console.log(arrays);
2209
+ * // => [[], []]
2210
+ *
2211
+ * console.log(arrays[0] === arrays[1]);
2212
+ * // => false
2213
+ */
2214
+ function stubArray() {
2215
+ return [];
2216
+ }
2217
+
2218
+ /** Used for built-in method references. */
2219
+ var objectProto$1 = Object.prototype;
2220
+
2221
+ /** Built-in value references. */
2222
+ var propertyIsEnumerable = objectProto$1.propertyIsEnumerable;
2223
+
2224
+ /* Built-in method references for those with the same name as other `lodash` methods. */
2225
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
2226
+
2227
+ /**
2228
+ * Creates an array of the own enumerable symbols of `object`.
2229
+ *
2230
+ * @private
2231
+ * @param {Object} object The object to query.
2232
+ * @returns {Array} Returns the array of symbols.
2233
+ */
2234
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
2235
+ if (object == null) {
2236
+ return [];
2237
+ }
2238
+ object = Object(object);
2239
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
2240
+ return propertyIsEnumerable.call(object, symbol);
2241
+ });
2242
+ };
2243
+
2244
+ /**
2245
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
2246
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
2247
+ * symbols of `object`.
2248
+ *
2249
+ * @private
2250
+ * @param {Object} object The object to query.
2251
+ * @param {Function} keysFunc The function to get the keys of `object`.
2252
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
2253
+ * @returns {Array} Returns the array of property names and symbols.
2254
+ */
2255
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
2256
+ var result = keysFunc(object);
2257
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
2258
+ }
2259
+
2260
+ /**
2261
+ * Creates an array of own enumerable property names and symbols of `object`.
2262
+ *
2263
+ * @private
2264
+ * @param {Object} object The object to query.
2265
+ * @returns {Array} Returns the array of property names and symbols.
2266
+ */
2267
+ function getAllKeys(object) {
2268
+ return baseGetAllKeys(object, keys, getSymbols);
2269
+ }
2270
+
2271
+ /* Built-in method references that are verified to be native. */
2272
+ var DataView$1 = getNative(root, 'DataView');
2273
+
2274
+ /* Built-in method references that are verified to be native. */
2275
+ var Promise$1 = getNative(root, 'Promise');
2276
+
2277
+ /* Built-in method references that are verified to be native. */
2278
+ var Set$1 = getNative(root, 'Set');
2279
+
2280
+ /** `Object#toString` result references. */
2281
+ var mapTag$3 = '[object Map]',
2282
+ objectTag$1 = '[object Object]',
2283
+ promiseTag = '[object Promise]',
2284
+ setTag$3 = '[object Set]',
2285
+ weakMapTag$1 = '[object WeakMap]';
2286
+
2287
+ var dataViewTag$2 = '[object DataView]';
2288
+
2289
+ /** Used to detect maps, sets, and weakmaps. */
2290
+ var dataViewCtorString = toSource(DataView$1),
2291
+ mapCtorString = toSource(Map$1),
2292
+ promiseCtorString = toSource(Promise$1),
2293
+ setCtorString = toSource(Set$1),
2294
+ weakMapCtorString = toSource(WeakMap);
2295
+
2296
+ /**
2297
+ * Gets the `toStringTag` of `value`.
2298
+ *
2299
+ * @private
2300
+ * @param {*} value The value to query.
2301
+ * @returns {string} Returns the `toStringTag`.
2302
+ */
2303
+ var getTag = baseGetTag;
2304
+
2305
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
2306
+ if ((DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$2) ||
2307
+ (Map$1 && getTag(new Map$1) != mapTag$3) ||
2308
+ (Promise$1 && getTag(Promise$1.resolve()) != promiseTag) ||
2309
+ (Set$1 && getTag(new Set$1) != setTag$3) ||
2310
+ (WeakMap && getTag(new WeakMap) != weakMapTag$1)) {
2311
+ getTag = function(value) {
2312
+ var result = baseGetTag(value),
2313
+ Ctor = result == objectTag$1 ? value.constructor : undefined,
2314
+ ctorString = Ctor ? toSource(Ctor) : '';
2315
+
2316
+ if (ctorString) {
2317
+ switch (ctorString) {
2318
+ case dataViewCtorString: return dataViewTag$2;
2319
+ case mapCtorString: return mapTag$3;
2320
+ case promiseCtorString: return promiseTag;
2321
+ case setCtorString: return setTag$3;
2322
+ case weakMapCtorString: return weakMapTag$1;
2323
+ }
2324
+ }
2325
+ return result;
2326
+ };
2327
+ }
2328
+
2329
+ /** Used for built-in method references. */
2330
+ var objectProto = Object.prototype;
2331
+
2332
+ /** Used to check objects for own properties. */
2333
+ var hasOwnProperty = objectProto.hasOwnProperty;
2334
+
2335
+ /**
2336
+ * Initializes an array clone.
2337
+ *
2338
+ * @private
2339
+ * @param {Array} array The array to clone.
2340
+ * @returns {Array} Returns the initialized clone.
2341
+ */
2342
+ function initCloneArray(array) {
2343
+ var length = array.length,
2344
+ result = new array.constructor(length);
2345
+
2346
+ // Add properties assigned by `RegExp#exec`.
2347
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
2348
+ result.index = array.index;
2349
+ result.input = array.input;
2350
+ }
2351
+ return result;
2352
+ }
2353
+
2354
+ /** Built-in value references. */
2355
+ var Uint8Array$1 = root.Uint8Array;
2356
+
2357
+ /**
2358
+ * Creates a clone of `arrayBuffer`.
2359
+ *
2360
+ * @private
2361
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
2362
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
2363
+ */
2364
+ function cloneArrayBuffer(arrayBuffer) {
2365
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
2366
+ new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
2367
+ return result;
2368
+ }
2369
+
2370
+ /**
2371
+ * Creates a clone of `dataView`.
2372
+ *
2373
+ * @private
2374
+ * @param {Object} dataView The data view to clone.
2375
+ * @param {boolean} [isDeep] Specify a deep clone.
2376
+ * @returns {Object} Returns the cloned data view.
2377
+ */
2378
+ function cloneDataView(dataView, isDeep) {
2379
+ var buffer = cloneArrayBuffer(dataView.buffer) ;
2380
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
2381
+ }
2382
+
2383
+ /** Used to match `RegExp` flags from their coerced string values. */
2384
+ var reFlags = /\w*$/;
2385
+
2386
+ /**
2387
+ * Creates a clone of `regexp`.
2388
+ *
2389
+ * @private
2390
+ * @param {Object} regexp The regexp to clone.
2391
+ * @returns {Object} Returns the cloned regexp.
2392
+ */
2393
+ function cloneRegExp(regexp) {
2394
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
2395
+ result.lastIndex = regexp.lastIndex;
2396
+ return result;
2397
+ }
2398
+
2399
+ /** Used to convert symbols to primitives and strings. */
2400
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
2401
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
2402
+
2403
+ /**
2404
+ * Creates a clone of the `symbol` object.
2405
+ *
2406
+ * @private
2407
+ * @param {Object} symbol The symbol object to clone.
2408
+ * @returns {Object} Returns the cloned symbol object.
2409
+ */
2410
+ function cloneSymbol(symbol) {
2411
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
2412
+ }
2413
+
2414
+ /**
2415
+ * Creates a clone of `typedArray`.
2416
+ *
2417
+ * @private
2418
+ * @param {Object} typedArray The typed array to clone.
2419
+ * @param {boolean} [isDeep] Specify a deep clone.
2420
+ * @returns {Object} Returns the cloned typed array.
2421
+ */
2422
+ function cloneTypedArray(typedArray, isDeep) {
2423
+ var buffer = cloneArrayBuffer(typedArray.buffer) ;
2424
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
2425
+ }
2426
+
2427
+ /** `Object#toString` result references. */
2428
+ var boolTag$1 = '[object Boolean]',
2429
+ dateTag$1 = '[object Date]',
2430
+ mapTag$2 = '[object Map]',
2431
+ numberTag$1 = '[object Number]',
2432
+ regexpTag$1 = '[object RegExp]',
2433
+ setTag$2 = '[object Set]',
2434
+ stringTag$1 = '[object String]',
2435
+ symbolTag$1 = '[object Symbol]';
2436
+
2437
+ var arrayBufferTag$1 = '[object ArrayBuffer]',
2438
+ dataViewTag$1 = '[object DataView]',
2439
+ float32Tag$1 = '[object Float32Array]',
2440
+ float64Tag$1 = '[object Float64Array]',
2441
+ int8Tag$1 = '[object Int8Array]',
2442
+ int16Tag$1 = '[object Int16Array]',
2443
+ int32Tag$1 = '[object Int32Array]',
2444
+ uint8Tag$1 = '[object Uint8Array]',
2445
+ uint8ClampedTag$1 = '[object Uint8ClampedArray]',
2446
+ uint16Tag$1 = '[object Uint16Array]',
2447
+ uint32Tag$1 = '[object Uint32Array]';
2448
+
2449
+ /**
2450
+ * Initializes an object clone based on its `toStringTag`.
2451
+ *
2452
+ * **Note:** This function only supports cloning values with tags of
2453
+ * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
2454
+ *
2455
+ * @private
2456
+ * @param {Object} object The object to clone.
2457
+ * @param {string} tag The `toStringTag` of the object to clone.
2458
+ * @param {boolean} [isDeep] Specify a deep clone.
2459
+ * @returns {Object} Returns the initialized clone.
2460
+ */
2461
+ function initCloneByTag(object, tag, isDeep) {
2462
+ var Ctor = object.constructor;
2463
+ switch (tag) {
2464
+ case arrayBufferTag$1:
2465
+ return cloneArrayBuffer(object);
2466
+
2467
+ case boolTag$1:
2468
+ case dateTag$1:
2469
+ return new Ctor(+object);
2470
+
2471
+ case dataViewTag$1:
2472
+ return cloneDataView(object);
2473
+
2474
+ case float32Tag$1: case float64Tag$1:
2475
+ case int8Tag$1: case int16Tag$1: case int32Tag$1:
2476
+ case uint8Tag$1: case uint8ClampedTag$1: case uint16Tag$1: case uint32Tag$1:
2477
+ return cloneTypedArray(object);
2478
+
2479
+ case mapTag$2:
2480
+ return new Ctor;
2481
+
2482
+ case numberTag$1:
2483
+ case stringTag$1:
2484
+ return new Ctor(object);
2485
+
2486
+ case regexpTag$1:
2487
+ return cloneRegExp(object);
2488
+
2489
+ case setTag$2:
2490
+ return new Ctor;
2491
+
2492
+ case symbolTag$1:
2493
+ return cloneSymbol(object);
2494
+ }
2495
+ }
2496
+
2497
+ /**
2498
+ * Initializes an object clone.
2499
+ *
2500
+ * @private
2501
+ * @param {Object} object The object to clone.
2502
+ * @returns {Object} Returns the initialized clone.
2503
+ */
2504
+ function initCloneObject(object) {
2505
+ return (typeof object.constructor == 'function' && !isPrototype(object))
2506
+ ? baseCreate(getPrototype(object))
2507
+ : {};
2508
+ }
2509
+
2510
+ /** `Object#toString` result references. */
2511
+ var mapTag$1 = '[object Map]';
2512
+
2513
+ /**
2514
+ * The base implementation of `_.isMap` without Node.js optimizations.
2515
+ *
2516
+ * @private
2517
+ * @param {*} value The value to check.
2518
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
2519
+ */
2520
+ function baseIsMap(value) {
2521
+ return isObjectLike(value) && getTag(value) == mapTag$1;
2522
+ }
2523
+
2524
+ /* Node.js helper references. */
2525
+ var nodeIsMap = nodeUtil && nodeUtil.isMap;
2526
+
2527
+ /**
2528
+ * Checks if `value` is classified as a `Map` object.
2529
+ *
2530
+ * @static
2531
+ * @memberOf _
2532
+ * @since 4.3.0
2533
+ * @category Lang
2534
+ * @param {*} value The value to check.
2535
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
2536
+ * @example
2537
+ *
2538
+ * _.isMap(new Map);
2539
+ * // => true
2540
+ *
2541
+ * _.isMap(new WeakMap);
2542
+ * // => false
2543
+ */
2544
+ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
2545
+
2546
+ /** `Object#toString` result references. */
2547
+ var setTag$1 = '[object Set]';
2548
+
2549
+ /**
2550
+ * The base implementation of `_.isSet` without Node.js optimizations.
2551
+ *
2552
+ * @private
2553
+ * @param {*} value The value to check.
2554
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
2555
+ */
2556
+ function baseIsSet(value) {
2557
+ return isObjectLike(value) && getTag(value) == setTag$1;
2558
+ }
2559
+
2560
+ /* Node.js helper references. */
2561
+ var nodeIsSet = nodeUtil && nodeUtil.isSet;
2562
+
2563
+ /**
2564
+ * Checks if `value` is classified as a `Set` object.
2565
+ *
2566
+ * @static
2567
+ * @memberOf _
2568
+ * @since 4.3.0
2569
+ * @category Lang
2570
+ * @param {*} value The value to check.
2571
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
2572
+ * @example
2573
+ *
2574
+ * _.isSet(new Set);
2575
+ * // => true
2576
+ *
2577
+ * _.isSet(new WeakSet);
2578
+ * // => false
2579
+ */
2580
+ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
2581
+
2582
+ /** `Object#toString` result references. */
2583
+ var argsTag = '[object Arguments]',
2584
+ arrayTag = '[object Array]',
2585
+ boolTag = '[object Boolean]',
2586
+ dateTag = '[object Date]',
2587
+ errorTag = '[object Error]',
2588
+ funcTag = '[object Function]',
2589
+ genTag = '[object GeneratorFunction]',
2590
+ mapTag = '[object Map]',
2591
+ numberTag = '[object Number]',
2592
+ objectTag = '[object Object]',
2593
+ regexpTag = '[object RegExp]',
2594
+ setTag = '[object Set]',
2595
+ stringTag = '[object String]',
2596
+ symbolTag = '[object Symbol]',
2597
+ weakMapTag = '[object WeakMap]';
2598
+
2599
+ var arrayBufferTag = '[object ArrayBuffer]',
2600
+ dataViewTag = '[object DataView]',
2601
+ float32Tag = '[object Float32Array]',
2602
+ float64Tag = '[object Float64Array]',
2603
+ int8Tag = '[object Int8Array]',
2604
+ int16Tag = '[object Int16Array]',
2605
+ int32Tag = '[object Int32Array]',
2606
+ uint8Tag = '[object Uint8Array]',
2607
+ uint8ClampedTag = '[object Uint8ClampedArray]',
2608
+ uint16Tag = '[object Uint16Array]',
2609
+ uint32Tag = '[object Uint32Array]';
2610
+
2611
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
2612
+ var cloneableTags = {};
2613
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
2614
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
2615
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
2616
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
2617
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
2618
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
2619
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
2620
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
2621
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
2622
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
2623
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
2624
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
2625
+ cloneableTags[weakMapTag] = false;
2626
+
2627
+ /**
2628
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
2629
+ * traversed objects.
2630
+ *
2631
+ * @private
2632
+ * @param {*} value The value to clone.
2633
+ * @param {boolean} bitmask The bitmask flags.
2634
+ * 1 - Deep clone
2635
+ * 2 - Flatten inherited properties
2636
+ * 4 - Clone symbols
2637
+ * @param {Function} [customizer] The function to customize cloning.
2638
+ * @param {string} [key] The key of `value`.
2639
+ * @param {Object} [object] The parent object of `value`.
2640
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
2641
+ * @returns {*} Returns the cloned value.
2642
+ */
2643
+ function baseClone(value, bitmask, customizer, key, object, stack) {
2644
+ var result;
2645
+ if (result !== undefined) {
2646
+ return result;
2647
+ }
2648
+ if (!isObject(value)) {
2649
+ return value;
2650
+ }
2651
+ var isArr = isArray(value);
2652
+ if (isArr) {
2653
+ result = initCloneArray(value);
2654
+ } else {
2655
+ var tag = getTag(value),
2656
+ isFunc = tag == funcTag || tag == genTag;
2657
+
2658
+ if (isBuffer(value)) {
2659
+ return cloneBuffer(value);
2660
+ }
2661
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
2662
+ result = (isFunc) ? {} : initCloneObject(value);
2663
+ } else {
2664
+ if (!cloneableTags[tag]) {
2665
+ return object ? value : {};
2666
+ }
2667
+ result = initCloneByTag(value, tag);
2668
+ }
2669
+ }
2670
+ // Check for circular references and return its corresponding clone.
2671
+ stack || (stack = new Stack);
2672
+ var stacked = stack.get(value);
2673
+ if (stacked) {
2674
+ return stacked;
2675
+ }
2676
+ stack.set(value, result);
2677
+
2678
+ if (isSet(value)) {
2679
+ value.forEach(function(subValue) {
2680
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
2681
+ });
2682
+ } else if (isMap(value)) {
2683
+ value.forEach(function(subValue, key) {
2684
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
2685
+ });
2686
+ }
2687
+
2688
+ var keysFunc = (getAllKeys)
2689
+ ;
2690
+
2691
+ var props = isArr ? undefined : keysFunc(value);
2692
+ arrayEach(props || value, function(subValue, key) {
2693
+ if (props) {
2694
+ key = subValue;
2695
+ subValue = value[key];
2696
+ }
2697
+ // Recursively populate clone (susceptible to call stack limits).
2698
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
2699
+ });
2700
+ return result;
2701
+ }
2702
+
2703
+ /** Used to compose bitmasks for cloning. */
2704
+ var CLONE_DEEP_FLAG = 1,
2705
+ CLONE_SYMBOLS_FLAG = 4;
2706
+
2707
+ /**
2708
+ * This method is like `_.clone` except that it recursively clones `value`.
2709
+ *
2710
+ * @static
2711
+ * @memberOf _
2712
+ * @since 1.0.0
2713
+ * @category Lang
2714
+ * @param {*} value The value to recursively clone.
2715
+ * @returns {*} Returns the deep cloned value.
2716
+ * @see _.clone
2717
+ * @example
2718
+ *
2719
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
2720
+ *
2721
+ * var deep = _.cloneDeep(objects);
2722
+ * console.log(deep[0] === objects[0]);
2723
+ * // => false
2724
+ */
2725
+ function cloneDeep(value) {
2726
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
2727
+ }
2728
+
712
2729
  var __rest = (undefined && undefined.__rest) || function (s, e) {
713
2730
  var t = {};
714
2731
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -739,7 +2756,7 @@ class ObjectHelper {
739
2756
  static clone(objOrObjs) {
740
2757
  const cloneObject = (obj) => {
741
2758
  const rest = __rest(obj, ["_store", "_elementRef"]);
742
- return structuredClone(rest);
2759
+ return cloneDeep(rest);
743
2760
  };
744
2761
  if (Array.isArray(objOrObjs)) {
745
2762
  return objOrObjs.map(cloneObject);
@@ -1830,8 +3847,11 @@ class KritzelSelectionGroup extends KritzelBaseObject {
1830
3847
  const sin = Math.sin(angle);
1831
3848
  this.objects.forEach(child => {
1832
3849
  const unchangedChild = this.getUnchangedObject(child.id);
3850
+ console.log('Rotating child object:', child.id, 'with unchanged object:', unchangedChild);
3851
+ debugger;
1833
3852
  const offsetX = this.getOffsetXToCenter(unchangedChild);
1834
3853
  const offsetY = this.getOffsetYToCenter(unchangedChild);
3854
+ console.log('Offset to center:', offsetX, offsetY);
1835
3855
  const rotatedX = cos * offsetX - sin * offsetY;
1836
3856
  const rotatedY = sin * offsetX + cos * offsetY;
1837
3857
  child.translateX = centerX + rotatedX - child.totalWidth / 2 / child.scale;