rudder-sdk-js 1.2.2 → 1.2.8

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.
Files changed (3) hide show
  1. package/index.d.ts +10 -3
  2. package/index.js +1871 -12
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -2678,6 +2678,1853 @@
2678
2678
  module.exports = merge;
2679
2679
  });
2680
2680
 
2681
+ var lodash_clonedeep = createCommonjsModule(function (module, exports) {
2682
+ /**
2683
+ * lodash (Custom Build) <https://lodash.com/>
2684
+ * Build: `lodash modularize exports="npm" -o ./`
2685
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
2686
+ * Released under MIT license <https://lodash.com/license>
2687
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
2688
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2689
+ */
2690
+
2691
+ /** Used as the size to enable large array optimizations. */
2692
+ var LARGE_ARRAY_SIZE = 200;
2693
+ /** Used to stand-in for `undefined` hash values. */
2694
+
2695
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
2696
+ /** Used as references for various `Number` constants. */
2697
+
2698
+ var MAX_SAFE_INTEGER = 9007199254740991;
2699
+ /** `Object#toString` result references. */
2700
+
2701
+ var argsTag = '[object Arguments]',
2702
+ arrayTag = '[object Array]',
2703
+ boolTag = '[object Boolean]',
2704
+ dateTag = '[object Date]',
2705
+ errorTag = '[object Error]',
2706
+ funcTag = '[object Function]',
2707
+ genTag = '[object GeneratorFunction]',
2708
+ mapTag = '[object Map]',
2709
+ numberTag = '[object Number]',
2710
+ objectTag = '[object Object]',
2711
+ promiseTag = '[object Promise]',
2712
+ regexpTag = '[object RegExp]',
2713
+ setTag = '[object Set]',
2714
+ stringTag = '[object String]',
2715
+ symbolTag = '[object Symbol]',
2716
+ weakMapTag = '[object WeakMap]';
2717
+ var arrayBufferTag = '[object ArrayBuffer]',
2718
+ dataViewTag = '[object DataView]',
2719
+ float32Tag = '[object Float32Array]',
2720
+ float64Tag = '[object Float64Array]',
2721
+ int8Tag = '[object Int8Array]',
2722
+ int16Tag = '[object Int16Array]',
2723
+ int32Tag = '[object Int32Array]',
2724
+ uint8Tag = '[object Uint8Array]',
2725
+ uint8ClampedTag = '[object Uint8ClampedArray]',
2726
+ uint16Tag = '[object Uint16Array]',
2727
+ uint32Tag = '[object Uint32Array]';
2728
+ /**
2729
+ * Used to match `RegExp`
2730
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
2731
+ */
2732
+
2733
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
2734
+ /** Used to match `RegExp` flags from their coerced string values. */
2735
+
2736
+ var reFlags = /\w*$/;
2737
+ /** Used to detect host constructors (Safari). */
2738
+
2739
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
2740
+ /** Used to detect unsigned integer values. */
2741
+
2742
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
2743
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
2744
+
2745
+ var cloneableTags = {};
2746
+ cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
2747
+ cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
2748
+ /** Detect free variable `global` from Node.js. */
2749
+
2750
+ var freeGlobal = _typeof(commonjsGlobal) == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
2751
+ /** Detect free variable `self`. */
2752
+
2753
+ var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof(self)) == 'object' && self && self.Object === Object && self;
2754
+ /** Used as a reference to the global object. */
2755
+
2756
+ var root = freeGlobal || freeSelf || Function('return this')();
2757
+ /** Detect free variable `exports`. */
2758
+
2759
+ var freeExports = exports && !exports.nodeType && exports;
2760
+ /** Detect free variable `module`. */
2761
+
2762
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
2763
+ /** Detect the popular CommonJS extension `module.exports`. */
2764
+
2765
+ var moduleExports = freeModule && freeModule.exports === freeExports;
2766
+ /**
2767
+ * Adds the key-value `pair` to `map`.
2768
+ *
2769
+ * @private
2770
+ * @param {Object} map The map to modify.
2771
+ * @param {Array} pair The key-value pair to add.
2772
+ * @returns {Object} Returns `map`.
2773
+ */
2774
+
2775
+ function addMapEntry(map, pair) {
2776
+ // Don't return `map.set` because it's not chainable in IE 11.
2777
+ map.set(pair[0], pair[1]);
2778
+ return map;
2779
+ }
2780
+ /**
2781
+ * Adds `value` to `set`.
2782
+ *
2783
+ * @private
2784
+ * @param {Object} set The set to modify.
2785
+ * @param {*} value The value to add.
2786
+ * @returns {Object} Returns `set`.
2787
+ */
2788
+
2789
+
2790
+ function addSetEntry(set, value) {
2791
+ // Don't return `set.add` because it's not chainable in IE 11.
2792
+ set.add(value);
2793
+ return set;
2794
+ }
2795
+ /**
2796
+ * A specialized version of `_.forEach` for arrays without support for
2797
+ * iteratee shorthands.
2798
+ *
2799
+ * @private
2800
+ * @param {Array} [array] The array to iterate over.
2801
+ * @param {Function} iteratee The function invoked per iteration.
2802
+ * @returns {Array} Returns `array`.
2803
+ */
2804
+
2805
+
2806
+ function arrayEach(array, iteratee) {
2807
+ var index = -1,
2808
+ length = array ? array.length : 0;
2809
+
2810
+ while (++index < length) {
2811
+ if (iteratee(array[index], index, array) === false) {
2812
+ break;
2813
+ }
2814
+ }
2815
+
2816
+ return array;
2817
+ }
2818
+ /**
2819
+ * Appends the elements of `values` to `array`.
2820
+ *
2821
+ * @private
2822
+ * @param {Array} array The array to modify.
2823
+ * @param {Array} values The values to append.
2824
+ * @returns {Array} Returns `array`.
2825
+ */
2826
+
2827
+
2828
+ function arrayPush(array, values) {
2829
+ var index = -1,
2830
+ length = values.length,
2831
+ offset = array.length;
2832
+
2833
+ while (++index < length) {
2834
+ array[offset + index] = values[index];
2835
+ }
2836
+
2837
+ return array;
2838
+ }
2839
+ /**
2840
+ * A specialized version of `_.reduce` for arrays without support for
2841
+ * iteratee shorthands.
2842
+ *
2843
+ * @private
2844
+ * @param {Array} [array] The array to iterate over.
2845
+ * @param {Function} iteratee The function invoked per iteration.
2846
+ * @param {*} [accumulator] The initial value.
2847
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
2848
+ * the initial value.
2849
+ * @returns {*} Returns the accumulated value.
2850
+ */
2851
+
2852
+
2853
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
2854
+ var index = -1,
2855
+ length = array ? array.length : 0;
2856
+
2857
+ if (initAccum && length) {
2858
+ accumulator = array[++index];
2859
+ }
2860
+
2861
+ while (++index < length) {
2862
+ accumulator = iteratee(accumulator, array[index], index, array);
2863
+ }
2864
+
2865
+ return accumulator;
2866
+ }
2867
+ /**
2868
+ * The base implementation of `_.times` without support for iteratee shorthands
2869
+ * or max array length checks.
2870
+ *
2871
+ * @private
2872
+ * @param {number} n The number of times to invoke `iteratee`.
2873
+ * @param {Function} iteratee The function invoked per iteration.
2874
+ * @returns {Array} Returns the array of results.
2875
+ */
2876
+
2877
+
2878
+ function baseTimes(n, iteratee) {
2879
+ var index = -1,
2880
+ result = Array(n);
2881
+
2882
+ while (++index < n) {
2883
+ result[index] = iteratee(index);
2884
+ }
2885
+
2886
+ return result;
2887
+ }
2888
+ /**
2889
+ * Gets the value at `key` of `object`.
2890
+ *
2891
+ * @private
2892
+ * @param {Object} [object] The object to query.
2893
+ * @param {string} key The key of the property to get.
2894
+ * @returns {*} Returns the property value.
2895
+ */
2896
+
2897
+
2898
+ function getValue(object, key) {
2899
+ return object == null ? undefined : object[key];
2900
+ }
2901
+ /**
2902
+ * Checks if `value` is a host object in IE < 9.
2903
+ *
2904
+ * @private
2905
+ * @param {*} value The value to check.
2906
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
2907
+ */
2908
+
2909
+
2910
+ function isHostObject(value) {
2911
+ // Many host objects are `Object` objects that can coerce to strings
2912
+ // despite having improperly defined `toString` methods.
2913
+ var result = false;
2914
+
2915
+ if (value != null && typeof value.toString != 'function') {
2916
+ try {
2917
+ result = !!(value + '');
2918
+ } catch (e) {}
2919
+ }
2920
+
2921
+ return result;
2922
+ }
2923
+ /**
2924
+ * Converts `map` to its key-value pairs.
2925
+ *
2926
+ * @private
2927
+ * @param {Object} map The map to convert.
2928
+ * @returns {Array} Returns the key-value pairs.
2929
+ */
2930
+
2931
+
2932
+ function mapToArray(map) {
2933
+ var index = -1,
2934
+ result = Array(map.size);
2935
+ map.forEach(function (value, key) {
2936
+ result[++index] = [key, value];
2937
+ });
2938
+ return result;
2939
+ }
2940
+ /**
2941
+ * Creates a unary function that invokes `func` with its argument transformed.
2942
+ *
2943
+ * @private
2944
+ * @param {Function} func The function to wrap.
2945
+ * @param {Function} transform The argument transform.
2946
+ * @returns {Function} Returns the new function.
2947
+ */
2948
+
2949
+
2950
+ function overArg(func, transform) {
2951
+ return function (arg) {
2952
+ return func(transform(arg));
2953
+ };
2954
+ }
2955
+ /**
2956
+ * Converts `set` to an array of its values.
2957
+ *
2958
+ * @private
2959
+ * @param {Object} set The set to convert.
2960
+ * @returns {Array} Returns the values.
2961
+ */
2962
+
2963
+
2964
+ function setToArray(set) {
2965
+ var index = -1,
2966
+ result = Array(set.size);
2967
+ set.forEach(function (value) {
2968
+ result[++index] = value;
2969
+ });
2970
+ return result;
2971
+ }
2972
+ /** Used for built-in method references. */
2973
+
2974
+
2975
+ var arrayProto = Array.prototype,
2976
+ funcProto = Function.prototype,
2977
+ objectProto = Object.prototype;
2978
+ /** Used to detect overreaching core-js shims. */
2979
+
2980
+ var coreJsData = root['__core-js_shared__'];
2981
+ /** Used to detect methods masquerading as native. */
2982
+
2983
+ var maskSrcKey = function () {
2984
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
2985
+ return uid ? 'Symbol(src)_1.' + uid : '';
2986
+ }();
2987
+ /** Used to resolve the decompiled source of functions. */
2988
+
2989
+
2990
+ var funcToString = funcProto.toString;
2991
+ /** Used to check objects for own properties. */
2992
+
2993
+ var hasOwnProperty = objectProto.hasOwnProperty;
2994
+ /**
2995
+ * Used to resolve the
2996
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
2997
+ * of values.
2998
+ */
2999
+
3000
+ var objectToString = objectProto.toString;
3001
+ /** Used to detect if a method is native. */
3002
+
3003
+ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
3004
+ /** Built-in value references. */
3005
+
3006
+ var Buffer = moduleExports ? root.Buffer : undefined,
3007
+ _Symbol = root.Symbol,
3008
+ Uint8Array = root.Uint8Array,
3009
+ getPrototype = overArg(Object.getPrototypeOf, Object),
3010
+ objectCreate = Object.create,
3011
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
3012
+ splice = arrayProto.splice;
3013
+ /* Built-in method references for those with the same name as other `lodash` methods. */
3014
+
3015
+ var nativeGetSymbols = Object.getOwnPropertySymbols,
3016
+ nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
3017
+ nativeKeys = overArg(Object.keys, Object);
3018
+ /* Built-in method references that are verified to be native. */
3019
+
3020
+ var DataView = getNative(root, 'DataView'),
3021
+ Map = getNative(root, 'Map'),
3022
+ Promise = getNative(root, 'Promise'),
3023
+ Set = getNative(root, 'Set'),
3024
+ WeakMap = getNative(root, 'WeakMap'),
3025
+ nativeCreate = getNative(Object, 'create');
3026
+ /** Used to detect maps, sets, and weakmaps. */
3027
+
3028
+ var dataViewCtorString = toSource(DataView),
3029
+ mapCtorString = toSource(Map),
3030
+ promiseCtorString = toSource(Promise),
3031
+ setCtorString = toSource(Set),
3032
+ weakMapCtorString = toSource(WeakMap);
3033
+ /** Used to convert symbols to primitives and strings. */
3034
+
3035
+ var symbolProto = _Symbol ? _Symbol.prototype : undefined,
3036
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
3037
+ /**
3038
+ * Creates a hash object.
3039
+ *
3040
+ * @private
3041
+ * @constructor
3042
+ * @param {Array} [entries] The key-value pairs to cache.
3043
+ */
3044
+
3045
+ function Hash(entries) {
3046
+ var index = -1,
3047
+ length = entries ? entries.length : 0;
3048
+ this.clear();
3049
+
3050
+ while (++index < length) {
3051
+ var entry = entries[index];
3052
+ this.set(entry[0], entry[1]);
3053
+ }
3054
+ }
3055
+ /**
3056
+ * Removes all key-value entries from the hash.
3057
+ *
3058
+ * @private
3059
+ * @name clear
3060
+ * @memberOf Hash
3061
+ */
3062
+
3063
+
3064
+ function hashClear() {
3065
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
3066
+ }
3067
+ /**
3068
+ * Removes `key` and its value from the hash.
3069
+ *
3070
+ * @private
3071
+ * @name delete
3072
+ * @memberOf Hash
3073
+ * @param {Object} hash The hash to modify.
3074
+ * @param {string} key The key of the value to remove.
3075
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3076
+ */
3077
+
3078
+
3079
+ function hashDelete(key) {
3080
+ return this.has(key) && delete this.__data__[key];
3081
+ }
3082
+ /**
3083
+ * Gets the hash value for `key`.
3084
+ *
3085
+ * @private
3086
+ * @name get
3087
+ * @memberOf Hash
3088
+ * @param {string} key The key of the value to get.
3089
+ * @returns {*} Returns the entry value.
3090
+ */
3091
+
3092
+
3093
+ function hashGet(key) {
3094
+ var data = this.__data__;
3095
+
3096
+ if (nativeCreate) {
3097
+ var result = data[key];
3098
+ return result === HASH_UNDEFINED ? undefined : result;
3099
+ }
3100
+
3101
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
3102
+ }
3103
+ /**
3104
+ * Checks if a hash value for `key` exists.
3105
+ *
3106
+ * @private
3107
+ * @name has
3108
+ * @memberOf Hash
3109
+ * @param {string} key The key of the entry to check.
3110
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3111
+ */
3112
+
3113
+
3114
+ function hashHas(key) {
3115
+ var data = this.__data__;
3116
+ return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
3117
+ }
3118
+ /**
3119
+ * Sets the hash `key` to `value`.
3120
+ *
3121
+ * @private
3122
+ * @name set
3123
+ * @memberOf Hash
3124
+ * @param {string} key The key of the value to set.
3125
+ * @param {*} value The value to set.
3126
+ * @returns {Object} Returns the hash instance.
3127
+ */
3128
+
3129
+
3130
+ function hashSet(key, value) {
3131
+ var data = this.__data__;
3132
+ data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
3133
+ return this;
3134
+ } // Add methods to `Hash`.
3135
+
3136
+
3137
+ Hash.prototype.clear = hashClear;
3138
+ Hash.prototype['delete'] = hashDelete;
3139
+ Hash.prototype.get = hashGet;
3140
+ Hash.prototype.has = hashHas;
3141
+ Hash.prototype.set = hashSet;
3142
+ /**
3143
+ * Creates an list cache object.
3144
+ *
3145
+ * @private
3146
+ * @constructor
3147
+ * @param {Array} [entries] The key-value pairs to cache.
3148
+ */
3149
+
3150
+ function ListCache(entries) {
3151
+ var index = -1,
3152
+ length = entries ? entries.length : 0;
3153
+ this.clear();
3154
+
3155
+ while (++index < length) {
3156
+ var entry = entries[index];
3157
+ this.set(entry[0], entry[1]);
3158
+ }
3159
+ }
3160
+ /**
3161
+ * Removes all key-value entries from the list cache.
3162
+ *
3163
+ * @private
3164
+ * @name clear
3165
+ * @memberOf ListCache
3166
+ */
3167
+
3168
+
3169
+ function listCacheClear() {
3170
+ this.__data__ = [];
3171
+ }
3172
+ /**
3173
+ * Removes `key` and its value from the list cache.
3174
+ *
3175
+ * @private
3176
+ * @name delete
3177
+ * @memberOf ListCache
3178
+ * @param {string} key The key of the value to remove.
3179
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3180
+ */
3181
+
3182
+
3183
+ function listCacheDelete(key) {
3184
+ var data = this.__data__,
3185
+ index = assocIndexOf(data, key);
3186
+
3187
+ if (index < 0) {
3188
+ return false;
3189
+ }
3190
+
3191
+ var lastIndex = data.length - 1;
3192
+
3193
+ if (index == lastIndex) {
3194
+ data.pop();
3195
+ } else {
3196
+ splice.call(data, index, 1);
3197
+ }
3198
+
3199
+ return true;
3200
+ }
3201
+ /**
3202
+ * Gets the list cache value for `key`.
3203
+ *
3204
+ * @private
3205
+ * @name get
3206
+ * @memberOf ListCache
3207
+ * @param {string} key The key of the value to get.
3208
+ * @returns {*} Returns the entry value.
3209
+ */
3210
+
3211
+
3212
+ function listCacheGet(key) {
3213
+ var data = this.__data__,
3214
+ index = assocIndexOf(data, key);
3215
+ return index < 0 ? undefined : data[index][1];
3216
+ }
3217
+ /**
3218
+ * Checks if a list cache value for `key` exists.
3219
+ *
3220
+ * @private
3221
+ * @name has
3222
+ * @memberOf ListCache
3223
+ * @param {string} key The key of the entry to check.
3224
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3225
+ */
3226
+
3227
+
3228
+ function listCacheHas(key) {
3229
+ return assocIndexOf(this.__data__, key) > -1;
3230
+ }
3231
+ /**
3232
+ * Sets the list cache `key` to `value`.
3233
+ *
3234
+ * @private
3235
+ * @name set
3236
+ * @memberOf ListCache
3237
+ * @param {string} key The key of the value to set.
3238
+ * @param {*} value The value to set.
3239
+ * @returns {Object} Returns the list cache instance.
3240
+ */
3241
+
3242
+
3243
+ function listCacheSet(key, value) {
3244
+ var data = this.__data__,
3245
+ index = assocIndexOf(data, key);
3246
+
3247
+ if (index < 0) {
3248
+ data.push([key, value]);
3249
+ } else {
3250
+ data[index][1] = value;
3251
+ }
3252
+
3253
+ return this;
3254
+ } // Add methods to `ListCache`.
3255
+
3256
+
3257
+ ListCache.prototype.clear = listCacheClear;
3258
+ ListCache.prototype['delete'] = listCacheDelete;
3259
+ ListCache.prototype.get = listCacheGet;
3260
+ ListCache.prototype.has = listCacheHas;
3261
+ ListCache.prototype.set = listCacheSet;
3262
+ /**
3263
+ * Creates a map cache object to store key-value pairs.
3264
+ *
3265
+ * @private
3266
+ * @constructor
3267
+ * @param {Array} [entries] The key-value pairs to cache.
3268
+ */
3269
+
3270
+ function MapCache(entries) {
3271
+ var index = -1,
3272
+ length = entries ? entries.length : 0;
3273
+ this.clear();
3274
+
3275
+ while (++index < length) {
3276
+ var entry = entries[index];
3277
+ this.set(entry[0], entry[1]);
3278
+ }
3279
+ }
3280
+ /**
3281
+ * Removes all key-value entries from the map.
3282
+ *
3283
+ * @private
3284
+ * @name clear
3285
+ * @memberOf MapCache
3286
+ */
3287
+
3288
+
3289
+ function mapCacheClear() {
3290
+ this.__data__ = {
3291
+ 'hash': new Hash(),
3292
+ 'map': new (Map || ListCache)(),
3293
+ 'string': new Hash()
3294
+ };
3295
+ }
3296
+ /**
3297
+ * Removes `key` and its value from the map.
3298
+ *
3299
+ * @private
3300
+ * @name delete
3301
+ * @memberOf MapCache
3302
+ * @param {string} key The key of the value to remove.
3303
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3304
+ */
3305
+
3306
+
3307
+ function mapCacheDelete(key) {
3308
+ return getMapData(this, key)['delete'](key);
3309
+ }
3310
+ /**
3311
+ * Gets the map value for `key`.
3312
+ *
3313
+ * @private
3314
+ * @name get
3315
+ * @memberOf MapCache
3316
+ * @param {string} key The key of the value to get.
3317
+ * @returns {*} Returns the entry value.
3318
+ */
3319
+
3320
+
3321
+ function mapCacheGet(key) {
3322
+ return getMapData(this, key).get(key);
3323
+ }
3324
+ /**
3325
+ * Checks if a map value for `key` exists.
3326
+ *
3327
+ * @private
3328
+ * @name has
3329
+ * @memberOf MapCache
3330
+ * @param {string} key The key of the entry to check.
3331
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3332
+ */
3333
+
3334
+
3335
+ function mapCacheHas(key) {
3336
+ return getMapData(this, key).has(key);
3337
+ }
3338
+ /**
3339
+ * Sets the map `key` to `value`.
3340
+ *
3341
+ * @private
3342
+ * @name set
3343
+ * @memberOf MapCache
3344
+ * @param {string} key The key of the value to set.
3345
+ * @param {*} value The value to set.
3346
+ * @returns {Object} Returns the map cache instance.
3347
+ */
3348
+
3349
+
3350
+ function mapCacheSet(key, value) {
3351
+ getMapData(this, key).set(key, value);
3352
+ return this;
3353
+ } // Add methods to `MapCache`.
3354
+
3355
+
3356
+ MapCache.prototype.clear = mapCacheClear;
3357
+ MapCache.prototype['delete'] = mapCacheDelete;
3358
+ MapCache.prototype.get = mapCacheGet;
3359
+ MapCache.prototype.has = mapCacheHas;
3360
+ MapCache.prototype.set = mapCacheSet;
3361
+ /**
3362
+ * Creates a stack cache object to store key-value pairs.
3363
+ *
3364
+ * @private
3365
+ * @constructor
3366
+ * @param {Array} [entries] The key-value pairs to cache.
3367
+ */
3368
+
3369
+ function Stack(entries) {
3370
+ this.__data__ = new ListCache(entries);
3371
+ }
3372
+ /**
3373
+ * Removes all key-value entries from the stack.
3374
+ *
3375
+ * @private
3376
+ * @name clear
3377
+ * @memberOf Stack
3378
+ */
3379
+
3380
+
3381
+ function stackClear() {
3382
+ this.__data__ = new ListCache();
3383
+ }
3384
+ /**
3385
+ * Removes `key` and its value from the stack.
3386
+ *
3387
+ * @private
3388
+ * @name delete
3389
+ * @memberOf Stack
3390
+ * @param {string} key The key of the value to remove.
3391
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3392
+ */
3393
+
3394
+
3395
+ function stackDelete(key) {
3396
+ return this.__data__['delete'](key);
3397
+ }
3398
+ /**
3399
+ * Gets the stack value for `key`.
3400
+ *
3401
+ * @private
3402
+ * @name get
3403
+ * @memberOf Stack
3404
+ * @param {string} key The key of the value to get.
3405
+ * @returns {*} Returns the entry value.
3406
+ */
3407
+
3408
+
3409
+ function stackGet(key) {
3410
+ return this.__data__.get(key);
3411
+ }
3412
+ /**
3413
+ * Checks if a stack value for `key` exists.
3414
+ *
3415
+ * @private
3416
+ * @name has
3417
+ * @memberOf Stack
3418
+ * @param {string} key The key of the entry to check.
3419
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3420
+ */
3421
+
3422
+
3423
+ function stackHas(key) {
3424
+ return this.__data__.has(key);
3425
+ }
3426
+ /**
3427
+ * Sets the stack `key` to `value`.
3428
+ *
3429
+ * @private
3430
+ * @name set
3431
+ * @memberOf Stack
3432
+ * @param {string} key The key of the value to set.
3433
+ * @param {*} value The value to set.
3434
+ * @returns {Object} Returns the stack cache instance.
3435
+ */
3436
+
3437
+
3438
+ function stackSet(key, value) {
3439
+ var cache = this.__data__;
3440
+
3441
+ if (cache instanceof ListCache) {
3442
+ var pairs = cache.__data__;
3443
+
3444
+ if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
3445
+ pairs.push([key, value]);
3446
+ return this;
3447
+ }
3448
+
3449
+ cache = this.__data__ = new MapCache(pairs);
3450
+ }
3451
+
3452
+ cache.set(key, value);
3453
+ return this;
3454
+ } // Add methods to `Stack`.
3455
+
3456
+
3457
+ Stack.prototype.clear = stackClear;
3458
+ Stack.prototype['delete'] = stackDelete;
3459
+ Stack.prototype.get = stackGet;
3460
+ Stack.prototype.has = stackHas;
3461
+ Stack.prototype.set = stackSet;
3462
+ /**
3463
+ * Creates an array of the enumerable property names of the array-like `value`.
3464
+ *
3465
+ * @private
3466
+ * @param {*} value The value to query.
3467
+ * @param {boolean} inherited Specify returning inherited property names.
3468
+ * @returns {Array} Returns the array of property names.
3469
+ */
3470
+
3471
+ function arrayLikeKeys(value, inherited) {
3472
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
3473
+ // Safari 9 makes `arguments.length` enumerable in strict mode.
3474
+ var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : [];
3475
+ var length = result.length,
3476
+ skipIndexes = !!length;
3477
+
3478
+ for (var key in value) {
3479
+ if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
3480
+ result.push(key);
3481
+ }
3482
+ }
3483
+
3484
+ return result;
3485
+ }
3486
+ /**
3487
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
3488
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
3489
+ * for equality comparisons.
3490
+ *
3491
+ * @private
3492
+ * @param {Object} object The object to modify.
3493
+ * @param {string} key The key of the property to assign.
3494
+ * @param {*} value The value to assign.
3495
+ */
3496
+
3497
+
3498
+ function assignValue(object, key, value) {
3499
+ var objValue = object[key];
3500
+
3501
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {
3502
+ object[key] = value;
3503
+ }
3504
+ }
3505
+ /**
3506
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
3507
+ *
3508
+ * @private
3509
+ * @param {Array} array The array to inspect.
3510
+ * @param {*} key The key to search for.
3511
+ * @returns {number} Returns the index of the matched value, else `-1`.
3512
+ */
3513
+
3514
+
3515
+ function assocIndexOf(array, key) {
3516
+ var length = array.length;
3517
+
3518
+ while (length--) {
3519
+ if (eq(array[length][0], key)) {
3520
+ return length;
3521
+ }
3522
+ }
3523
+
3524
+ return -1;
3525
+ }
3526
+ /**
3527
+ * The base implementation of `_.assign` without support for multiple sources
3528
+ * or `customizer` functions.
3529
+ *
3530
+ * @private
3531
+ * @param {Object} object The destination object.
3532
+ * @param {Object} source The source object.
3533
+ * @returns {Object} Returns `object`.
3534
+ */
3535
+
3536
+
3537
+ function baseAssign(object, source) {
3538
+ return object && copyObject(source, keys(source), object);
3539
+ }
3540
+ /**
3541
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
3542
+ * traversed objects.
3543
+ *
3544
+ * @private
3545
+ * @param {*} value The value to clone.
3546
+ * @param {boolean} [isDeep] Specify a deep clone.
3547
+ * @param {boolean} [isFull] Specify a clone including symbols.
3548
+ * @param {Function} [customizer] The function to customize cloning.
3549
+ * @param {string} [key] The key of `value`.
3550
+ * @param {Object} [object] The parent object of `value`.
3551
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
3552
+ * @returns {*} Returns the cloned value.
3553
+ */
3554
+
3555
+
3556
+ function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
3557
+ var result;
3558
+
3559
+ if (customizer) {
3560
+ result = object ? customizer(value, key, object, stack) : customizer(value);
3561
+ }
3562
+
3563
+ if (result !== undefined) {
3564
+ return result;
3565
+ }
3566
+
3567
+ if (!isObject(value)) {
3568
+ return value;
3569
+ }
3570
+
3571
+ var isArr = isArray(value);
3572
+
3573
+ if (isArr) {
3574
+ result = initCloneArray(value);
3575
+
3576
+ if (!isDeep) {
3577
+ return copyArray(value, result);
3578
+ }
3579
+ } else {
3580
+ var tag = getTag(value),
3581
+ isFunc = tag == funcTag || tag == genTag;
3582
+
3583
+ if (isBuffer(value)) {
3584
+ return cloneBuffer(value, isDeep);
3585
+ }
3586
+
3587
+ if (tag == objectTag || tag == argsTag || isFunc && !object) {
3588
+ if (isHostObject(value)) {
3589
+ return object ? value : {};
3590
+ }
3591
+
3592
+ result = initCloneObject(isFunc ? {} : value);
3593
+
3594
+ if (!isDeep) {
3595
+ return copySymbols(value, baseAssign(result, value));
3596
+ }
3597
+ } else {
3598
+ if (!cloneableTags[tag]) {
3599
+ return object ? value : {};
3600
+ }
3601
+
3602
+ result = initCloneByTag(value, tag, baseClone, isDeep);
3603
+ }
3604
+ } // Check for circular references and return its corresponding clone.
3605
+
3606
+
3607
+ stack || (stack = new Stack());
3608
+ var stacked = stack.get(value);
3609
+
3610
+ if (stacked) {
3611
+ return stacked;
3612
+ }
3613
+
3614
+ stack.set(value, result);
3615
+
3616
+ if (!isArr) {
3617
+ var props = isFull ? getAllKeys(value) : keys(value);
3618
+ }
3619
+
3620
+ arrayEach(props || value, function (subValue, key) {
3621
+ if (props) {
3622
+ key = subValue;
3623
+ subValue = value[key];
3624
+ } // Recursively populate clone (susceptible to call stack limits).
3625
+
3626
+
3627
+ assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
3628
+ });
3629
+ return result;
3630
+ }
3631
+ /**
3632
+ * The base implementation of `_.create` without support for assigning
3633
+ * properties to the created object.
3634
+ *
3635
+ * @private
3636
+ * @param {Object} prototype The object to inherit from.
3637
+ * @returns {Object} Returns the new object.
3638
+ */
3639
+
3640
+
3641
+ function baseCreate(proto) {
3642
+ return isObject(proto) ? objectCreate(proto) : {};
3643
+ }
3644
+ /**
3645
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
3646
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
3647
+ * symbols of `object`.
3648
+ *
3649
+ * @private
3650
+ * @param {Object} object The object to query.
3651
+ * @param {Function} keysFunc The function to get the keys of `object`.
3652
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
3653
+ * @returns {Array} Returns the array of property names and symbols.
3654
+ */
3655
+
3656
+
3657
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
3658
+ var result = keysFunc(object);
3659
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
3660
+ }
3661
+ /**
3662
+ * The base implementation of `getTag`.
3663
+ *
3664
+ * @private
3665
+ * @param {*} value The value to query.
3666
+ * @returns {string} Returns the `toStringTag`.
3667
+ */
3668
+
3669
+
3670
+ function baseGetTag(value) {
3671
+ return objectToString.call(value);
3672
+ }
3673
+ /**
3674
+ * The base implementation of `_.isNative` without bad shim checks.
3675
+ *
3676
+ * @private
3677
+ * @param {*} value The value to check.
3678
+ * @returns {boolean} Returns `true` if `value` is a native function,
3679
+ * else `false`.
3680
+ */
3681
+
3682
+
3683
+ function baseIsNative(value) {
3684
+ if (!isObject(value) || isMasked(value)) {
3685
+ return false;
3686
+ }
3687
+
3688
+ var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
3689
+ return pattern.test(toSource(value));
3690
+ }
3691
+ /**
3692
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
3693
+ *
3694
+ * @private
3695
+ * @param {Object} object The object to query.
3696
+ * @returns {Array} Returns the array of property names.
3697
+ */
3698
+
3699
+
3700
+ function baseKeys(object) {
3701
+ if (!isPrototype(object)) {
3702
+ return nativeKeys(object);
3703
+ }
3704
+
3705
+ var result = [];
3706
+
3707
+ for (var key in Object(object)) {
3708
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
3709
+ result.push(key);
3710
+ }
3711
+ }
3712
+
3713
+ return result;
3714
+ }
3715
+ /**
3716
+ * Creates a clone of `buffer`.
3717
+ *
3718
+ * @private
3719
+ * @param {Buffer} buffer The buffer to clone.
3720
+ * @param {boolean} [isDeep] Specify a deep clone.
3721
+ * @returns {Buffer} Returns the cloned buffer.
3722
+ */
3723
+
3724
+
3725
+ function cloneBuffer(buffer, isDeep) {
3726
+ if (isDeep) {
3727
+ return buffer.slice();
3728
+ }
3729
+
3730
+ var result = new buffer.constructor(buffer.length);
3731
+ buffer.copy(result);
3732
+ return result;
3733
+ }
3734
+ /**
3735
+ * Creates a clone of `arrayBuffer`.
3736
+ *
3737
+ * @private
3738
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
3739
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
3740
+ */
3741
+
3742
+
3743
+ function cloneArrayBuffer(arrayBuffer) {
3744
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
3745
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
3746
+ return result;
3747
+ }
3748
+ /**
3749
+ * Creates a clone of `dataView`.
3750
+ *
3751
+ * @private
3752
+ * @param {Object} dataView The data view to clone.
3753
+ * @param {boolean} [isDeep] Specify a deep clone.
3754
+ * @returns {Object} Returns the cloned data view.
3755
+ */
3756
+
3757
+
3758
+ function cloneDataView(dataView, isDeep) {
3759
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
3760
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
3761
+ }
3762
+ /**
3763
+ * Creates a clone of `map`.
3764
+ *
3765
+ * @private
3766
+ * @param {Object} map The map to clone.
3767
+ * @param {Function} cloneFunc The function to clone values.
3768
+ * @param {boolean} [isDeep] Specify a deep clone.
3769
+ * @returns {Object} Returns the cloned map.
3770
+ */
3771
+
3772
+
3773
+ function cloneMap(map, isDeep, cloneFunc) {
3774
+ var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
3775
+ return arrayReduce(array, addMapEntry, new map.constructor());
3776
+ }
3777
+ /**
3778
+ * Creates a clone of `regexp`.
3779
+ *
3780
+ * @private
3781
+ * @param {Object} regexp The regexp to clone.
3782
+ * @returns {Object} Returns the cloned regexp.
3783
+ */
3784
+
3785
+
3786
+ function cloneRegExp(regexp) {
3787
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
3788
+ result.lastIndex = regexp.lastIndex;
3789
+ return result;
3790
+ }
3791
+ /**
3792
+ * Creates a clone of `set`.
3793
+ *
3794
+ * @private
3795
+ * @param {Object} set The set to clone.
3796
+ * @param {Function} cloneFunc The function to clone values.
3797
+ * @param {boolean} [isDeep] Specify a deep clone.
3798
+ * @returns {Object} Returns the cloned set.
3799
+ */
3800
+
3801
+
3802
+ function cloneSet(set, isDeep, cloneFunc) {
3803
+ var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
3804
+ return arrayReduce(array, addSetEntry, new set.constructor());
3805
+ }
3806
+ /**
3807
+ * Creates a clone of the `symbol` object.
3808
+ *
3809
+ * @private
3810
+ * @param {Object} symbol The symbol object to clone.
3811
+ * @returns {Object} Returns the cloned symbol object.
3812
+ */
3813
+
3814
+
3815
+ function cloneSymbol(symbol) {
3816
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
3817
+ }
3818
+ /**
3819
+ * Creates a clone of `typedArray`.
3820
+ *
3821
+ * @private
3822
+ * @param {Object} typedArray The typed array to clone.
3823
+ * @param {boolean} [isDeep] Specify a deep clone.
3824
+ * @returns {Object} Returns the cloned typed array.
3825
+ */
3826
+
3827
+
3828
+ function cloneTypedArray(typedArray, isDeep) {
3829
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
3830
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
3831
+ }
3832
+ /**
3833
+ * Copies the values of `source` to `array`.
3834
+ *
3835
+ * @private
3836
+ * @param {Array} source The array to copy values from.
3837
+ * @param {Array} [array=[]] The array to copy values to.
3838
+ * @returns {Array} Returns `array`.
3839
+ */
3840
+
3841
+
3842
+ function copyArray(source, array) {
3843
+ var index = -1,
3844
+ length = source.length;
3845
+ array || (array = Array(length));
3846
+
3847
+ while (++index < length) {
3848
+ array[index] = source[index];
3849
+ }
3850
+
3851
+ return array;
3852
+ }
3853
+ /**
3854
+ * Copies properties of `source` to `object`.
3855
+ *
3856
+ * @private
3857
+ * @param {Object} source The object to copy properties from.
3858
+ * @param {Array} props The property identifiers to copy.
3859
+ * @param {Object} [object={}] The object to copy properties to.
3860
+ * @param {Function} [customizer] The function to customize copied values.
3861
+ * @returns {Object} Returns `object`.
3862
+ */
3863
+
3864
+
3865
+ function copyObject(source, props, object, customizer) {
3866
+ object || (object = {});
3867
+ var index = -1,
3868
+ length = props.length;
3869
+
3870
+ while (++index < length) {
3871
+ var key = props[index];
3872
+ var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;
3873
+ assignValue(object, key, newValue === undefined ? source[key] : newValue);
3874
+ }
3875
+
3876
+ return object;
3877
+ }
3878
+ /**
3879
+ * Copies own symbol properties of `source` to `object`.
3880
+ *
3881
+ * @private
3882
+ * @param {Object} source The object to copy symbols from.
3883
+ * @param {Object} [object={}] The object to copy symbols to.
3884
+ * @returns {Object} Returns `object`.
3885
+ */
3886
+
3887
+
3888
+ function copySymbols(source, object) {
3889
+ return copyObject(source, getSymbols(source), object);
3890
+ }
3891
+ /**
3892
+ * Creates an array of own enumerable property names and symbols of `object`.
3893
+ *
3894
+ * @private
3895
+ * @param {Object} object The object to query.
3896
+ * @returns {Array} Returns the array of property names and symbols.
3897
+ */
3898
+
3899
+
3900
+ function getAllKeys(object) {
3901
+ return baseGetAllKeys(object, keys, getSymbols);
3902
+ }
3903
+ /**
3904
+ * Gets the data for `map`.
3905
+ *
3906
+ * @private
3907
+ * @param {Object} map The map to query.
3908
+ * @param {string} key The reference key.
3909
+ * @returns {*} Returns the map data.
3910
+ */
3911
+
3912
+
3913
+ function getMapData(map, key) {
3914
+ var data = map.__data__;
3915
+ return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
3916
+ }
3917
+ /**
3918
+ * Gets the native function at `key` of `object`.
3919
+ *
3920
+ * @private
3921
+ * @param {Object} object The object to query.
3922
+ * @param {string} key The key of the method to get.
3923
+ * @returns {*} Returns the function if it's native, else `undefined`.
3924
+ */
3925
+
3926
+
3927
+ function getNative(object, key) {
3928
+ var value = getValue(object, key);
3929
+ return baseIsNative(value) ? value : undefined;
3930
+ }
3931
+ /**
3932
+ * Creates an array of the own enumerable symbol properties of `object`.
3933
+ *
3934
+ * @private
3935
+ * @param {Object} object The object to query.
3936
+ * @returns {Array} Returns the array of symbols.
3937
+ */
3938
+
3939
+
3940
+ var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
3941
+ /**
3942
+ * Gets the `toStringTag` of `value`.
3943
+ *
3944
+ * @private
3945
+ * @param {*} value The value to query.
3946
+ * @returns {string} Returns the `toStringTag`.
3947
+ */
3948
+
3949
+ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11,
3950
+ // for data views in Edge < 14, and promises in Node.js.
3951
+
3952
+ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
3953
+ getTag = function getTag(value) {
3954
+ var result = objectToString.call(value),
3955
+ Ctor = result == objectTag ? value.constructor : undefined,
3956
+ ctorString = Ctor ? toSource(Ctor) : undefined;
3957
+
3958
+ if (ctorString) {
3959
+ switch (ctorString) {
3960
+ case dataViewCtorString:
3961
+ return dataViewTag;
3962
+
3963
+ case mapCtorString:
3964
+ return mapTag;
3965
+
3966
+ case promiseCtorString:
3967
+ return promiseTag;
3968
+
3969
+ case setCtorString:
3970
+ return setTag;
3971
+
3972
+ case weakMapCtorString:
3973
+ return weakMapTag;
3974
+ }
3975
+ }
3976
+
3977
+ return result;
3978
+ };
3979
+ }
3980
+ /**
3981
+ * Initializes an array clone.
3982
+ *
3983
+ * @private
3984
+ * @param {Array} array The array to clone.
3985
+ * @returns {Array} Returns the initialized clone.
3986
+ */
3987
+
3988
+
3989
+ function initCloneArray(array) {
3990
+ var length = array.length,
3991
+ result = array.constructor(length); // Add properties assigned by `RegExp#exec`.
3992
+
3993
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
3994
+ result.index = array.index;
3995
+ result.input = array.input;
3996
+ }
3997
+
3998
+ return result;
3999
+ }
4000
+ /**
4001
+ * Initializes an object clone.
4002
+ *
4003
+ * @private
4004
+ * @param {Object} object The object to clone.
4005
+ * @returns {Object} Returns the initialized clone.
4006
+ */
4007
+
4008
+
4009
+ function initCloneObject(object) {
4010
+ return typeof object.constructor == 'function' && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
4011
+ }
4012
+ /**
4013
+ * Initializes an object clone based on its `toStringTag`.
4014
+ *
4015
+ * **Note:** This function only supports cloning values with tags of
4016
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
4017
+ *
4018
+ * @private
4019
+ * @param {Object} object The object to clone.
4020
+ * @param {string} tag The `toStringTag` of the object to clone.
4021
+ * @param {Function} cloneFunc The function to clone values.
4022
+ * @param {boolean} [isDeep] Specify a deep clone.
4023
+ * @returns {Object} Returns the initialized clone.
4024
+ */
4025
+
4026
+
4027
+ function initCloneByTag(object, tag, cloneFunc, isDeep) {
4028
+ var Ctor = object.constructor;
4029
+
4030
+ switch (tag) {
4031
+ case arrayBufferTag:
4032
+ return cloneArrayBuffer(object);
4033
+
4034
+ case boolTag:
4035
+ case dateTag:
4036
+ return new Ctor(+object);
4037
+
4038
+ case dataViewTag:
4039
+ return cloneDataView(object, isDeep);
4040
+
4041
+ case float32Tag:
4042
+ case float64Tag:
4043
+ case int8Tag:
4044
+ case int16Tag:
4045
+ case int32Tag:
4046
+ case uint8Tag:
4047
+ case uint8ClampedTag:
4048
+ case uint16Tag:
4049
+ case uint32Tag:
4050
+ return cloneTypedArray(object, isDeep);
4051
+
4052
+ case mapTag:
4053
+ return cloneMap(object, isDeep, cloneFunc);
4054
+
4055
+ case numberTag:
4056
+ case stringTag:
4057
+ return new Ctor(object);
4058
+
4059
+ case regexpTag:
4060
+ return cloneRegExp(object);
4061
+
4062
+ case setTag:
4063
+ return cloneSet(object, isDeep, cloneFunc);
4064
+
4065
+ case symbolTag:
4066
+ return cloneSymbol(object);
4067
+ }
4068
+ }
4069
+ /**
4070
+ * Checks if `value` is a valid array-like index.
4071
+ *
4072
+ * @private
4073
+ * @param {*} value The value to check.
4074
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
4075
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
4076
+ */
4077
+
4078
+
4079
+ function isIndex(value, length) {
4080
+ length = length == null ? MAX_SAFE_INTEGER : length;
4081
+ return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
4082
+ }
4083
+ /**
4084
+ * Checks if `value` is suitable for use as unique object key.
4085
+ *
4086
+ * @private
4087
+ * @param {*} value The value to check.
4088
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
4089
+ */
4090
+
4091
+
4092
+ function isKeyable(value) {
4093
+ var type = _typeof(value);
4094
+
4095
+ return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
4096
+ }
4097
+ /**
4098
+ * Checks if `func` has its source masked.
4099
+ *
4100
+ * @private
4101
+ * @param {Function} func The function to check.
4102
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
4103
+ */
4104
+
4105
+
4106
+ function isMasked(func) {
4107
+ return !!maskSrcKey && maskSrcKey in func;
4108
+ }
4109
+ /**
4110
+ * Checks if `value` is likely a prototype object.
4111
+ *
4112
+ * @private
4113
+ * @param {*} value The value to check.
4114
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
4115
+ */
4116
+
4117
+
4118
+ function isPrototype(value) {
4119
+ var Ctor = value && value.constructor,
4120
+ proto = typeof Ctor == 'function' && Ctor.prototype || objectProto;
4121
+ return value === proto;
4122
+ }
4123
+ /**
4124
+ * Converts `func` to its source code.
4125
+ *
4126
+ * @private
4127
+ * @param {Function} func The function to process.
4128
+ * @returns {string} Returns the source code.
4129
+ */
4130
+
4131
+
4132
+ function toSource(func) {
4133
+ if (func != null) {
4134
+ try {
4135
+ return funcToString.call(func);
4136
+ } catch (e) {}
4137
+
4138
+ try {
4139
+ return func + '';
4140
+ } catch (e) {}
4141
+ }
4142
+
4143
+ return '';
4144
+ }
4145
+ /**
4146
+ * This method is like `_.clone` except that it recursively clones `value`.
4147
+ *
4148
+ * @static
4149
+ * @memberOf _
4150
+ * @since 1.0.0
4151
+ * @category Lang
4152
+ * @param {*} value The value to recursively clone.
4153
+ * @returns {*} Returns the deep cloned value.
4154
+ * @see _.clone
4155
+ * @example
4156
+ *
4157
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
4158
+ *
4159
+ * var deep = _.cloneDeep(objects);
4160
+ * console.log(deep[0] === objects[0]);
4161
+ * // => false
4162
+ */
4163
+
4164
+
4165
+ function cloneDeep(value) {
4166
+ return baseClone(value, true, true);
4167
+ }
4168
+ /**
4169
+ * Performs a
4170
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
4171
+ * comparison between two values to determine if they are equivalent.
4172
+ *
4173
+ * @static
4174
+ * @memberOf _
4175
+ * @since 4.0.0
4176
+ * @category Lang
4177
+ * @param {*} value The value to compare.
4178
+ * @param {*} other The other value to compare.
4179
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
4180
+ * @example
4181
+ *
4182
+ * var object = { 'a': 1 };
4183
+ * var other = { 'a': 1 };
4184
+ *
4185
+ * _.eq(object, object);
4186
+ * // => true
4187
+ *
4188
+ * _.eq(object, other);
4189
+ * // => false
4190
+ *
4191
+ * _.eq('a', 'a');
4192
+ * // => true
4193
+ *
4194
+ * _.eq('a', Object('a'));
4195
+ * // => false
4196
+ *
4197
+ * _.eq(NaN, NaN);
4198
+ * // => true
4199
+ */
4200
+
4201
+
4202
+ function eq(value, other) {
4203
+ return value === other || value !== value && other !== other;
4204
+ }
4205
+ /**
4206
+ * Checks if `value` is likely an `arguments` object.
4207
+ *
4208
+ * @static
4209
+ * @memberOf _
4210
+ * @since 0.1.0
4211
+ * @category Lang
4212
+ * @param {*} value The value to check.
4213
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
4214
+ * else `false`.
4215
+ * @example
4216
+ *
4217
+ * _.isArguments(function() { return arguments; }());
4218
+ * // => true
4219
+ *
4220
+ * _.isArguments([1, 2, 3]);
4221
+ * // => false
4222
+ */
4223
+
4224
+
4225
+ function isArguments(value) {
4226
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
4227
+ return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
4228
+ }
4229
+ /**
4230
+ * Checks if `value` is classified as an `Array` object.
4231
+ *
4232
+ * @static
4233
+ * @memberOf _
4234
+ * @since 0.1.0
4235
+ * @category Lang
4236
+ * @param {*} value The value to check.
4237
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
4238
+ * @example
4239
+ *
4240
+ * _.isArray([1, 2, 3]);
4241
+ * // => true
4242
+ *
4243
+ * _.isArray(document.body.children);
4244
+ * // => false
4245
+ *
4246
+ * _.isArray('abc');
4247
+ * // => false
4248
+ *
4249
+ * _.isArray(_.noop);
4250
+ * // => false
4251
+ */
4252
+
4253
+
4254
+ var isArray = Array.isArray;
4255
+ /**
4256
+ * Checks if `value` is array-like. A value is considered array-like if it's
4257
+ * not a function and has a `value.length` that's an integer greater than or
4258
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
4259
+ *
4260
+ * @static
4261
+ * @memberOf _
4262
+ * @since 4.0.0
4263
+ * @category Lang
4264
+ * @param {*} value The value to check.
4265
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
4266
+ * @example
4267
+ *
4268
+ * _.isArrayLike([1, 2, 3]);
4269
+ * // => true
4270
+ *
4271
+ * _.isArrayLike(document.body.children);
4272
+ * // => true
4273
+ *
4274
+ * _.isArrayLike('abc');
4275
+ * // => true
4276
+ *
4277
+ * _.isArrayLike(_.noop);
4278
+ * // => false
4279
+ */
4280
+
4281
+ function isArrayLike(value) {
4282
+ return value != null && isLength(value.length) && !isFunction(value);
4283
+ }
4284
+ /**
4285
+ * This method is like `_.isArrayLike` except that it also checks if `value`
4286
+ * is an object.
4287
+ *
4288
+ * @static
4289
+ * @memberOf _
4290
+ * @since 4.0.0
4291
+ * @category Lang
4292
+ * @param {*} value The value to check.
4293
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
4294
+ * else `false`.
4295
+ * @example
4296
+ *
4297
+ * _.isArrayLikeObject([1, 2, 3]);
4298
+ * // => true
4299
+ *
4300
+ * _.isArrayLikeObject(document.body.children);
4301
+ * // => true
4302
+ *
4303
+ * _.isArrayLikeObject('abc');
4304
+ * // => false
4305
+ *
4306
+ * _.isArrayLikeObject(_.noop);
4307
+ * // => false
4308
+ */
4309
+
4310
+
4311
+ function isArrayLikeObject(value) {
4312
+ return isObjectLike(value) && isArrayLike(value);
4313
+ }
4314
+ /**
4315
+ * Checks if `value` is a buffer.
4316
+ *
4317
+ * @static
4318
+ * @memberOf _
4319
+ * @since 4.3.0
4320
+ * @category Lang
4321
+ * @param {*} value The value to check.
4322
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
4323
+ * @example
4324
+ *
4325
+ * _.isBuffer(new Buffer(2));
4326
+ * // => true
4327
+ *
4328
+ * _.isBuffer(new Uint8Array(2));
4329
+ * // => false
4330
+ */
4331
+
4332
+
4333
+ var isBuffer = nativeIsBuffer || stubFalse;
4334
+ /**
4335
+ * Checks if `value` is classified as a `Function` object.
4336
+ *
4337
+ * @static
4338
+ * @memberOf _
4339
+ * @since 0.1.0
4340
+ * @category Lang
4341
+ * @param {*} value The value to check.
4342
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
4343
+ * @example
4344
+ *
4345
+ * _.isFunction(_);
4346
+ * // => true
4347
+ *
4348
+ * _.isFunction(/abc/);
4349
+ * // => false
4350
+ */
4351
+
4352
+ function isFunction(value) {
4353
+ // The use of `Object#toString` avoids issues with the `typeof` operator
4354
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
4355
+ var tag = isObject(value) ? objectToString.call(value) : '';
4356
+ return tag == funcTag || tag == genTag;
4357
+ }
4358
+ /**
4359
+ * Checks if `value` is a valid array-like length.
4360
+ *
4361
+ * **Note:** This method is loosely based on
4362
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
4363
+ *
4364
+ * @static
4365
+ * @memberOf _
4366
+ * @since 4.0.0
4367
+ * @category Lang
4368
+ * @param {*} value The value to check.
4369
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
4370
+ * @example
4371
+ *
4372
+ * _.isLength(3);
4373
+ * // => true
4374
+ *
4375
+ * _.isLength(Number.MIN_VALUE);
4376
+ * // => false
4377
+ *
4378
+ * _.isLength(Infinity);
4379
+ * // => false
4380
+ *
4381
+ * _.isLength('3');
4382
+ * // => false
4383
+ */
4384
+
4385
+
4386
+ function isLength(value) {
4387
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
4388
+ }
4389
+ /**
4390
+ * Checks if `value` is the
4391
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
4392
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
4393
+ *
4394
+ * @static
4395
+ * @memberOf _
4396
+ * @since 0.1.0
4397
+ * @category Lang
4398
+ * @param {*} value The value to check.
4399
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
4400
+ * @example
4401
+ *
4402
+ * _.isObject({});
4403
+ * // => true
4404
+ *
4405
+ * _.isObject([1, 2, 3]);
4406
+ * // => true
4407
+ *
4408
+ * _.isObject(_.noop);
4409
+ * // => true
4410
+ *
4411
+ * _.isObject(null);
4412
+ * // => false
4413
+ */
4414
+
4415
+
4416
+ function isObject(value) {
4417
+ var type = _typeof(value);
4418
+
4419
+ return !!value && (type == 'object' || type == 'function');
4420
+ }
4421
+ /**
4422
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
4423
+ * and has a `typeof` result of "object".
4424
+ *
4425
+ * @static
4426
+ * @memberOf _
4427
+ * @since 4.0.0
4428
+ * @category Lang
4429
+ * @param {*} value The value to check.
4430
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
4431
+ * @example
4432
+ *
4433
+ * _.isObjectLike({});
4434
+ * // => true
4435
+ *
4436
+ * _.isObjectLike([1, 2, 3]);
4437
+ * // => true
4438
+ *
4439
+ * _.isObjectLike(_.noop);
4440
+ * // => false
4441
+ *
4442
+ * _.isObjectLike(null);
4443
+ * // => false
4444
+ */
4445
+
4446
+
4447
+ function isObjectLike(value) {
4448
+ return !!value && _typeof(value) == 'object';
4449
+ }
4450
+ /**
4451
+ * Creates an array of the own enumerable property names of `object`.
4452
+ *
4453
+ * **Note:** Non-object values are coerced to objects. See the
4454
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
4455
+ * for more details.
4456
+ *
4457
+ * @static
4458
+ * @since 0.1.0
4459
+ * @memberOf _
4460
+ * @category Object
4461
+ * @param {Object} object The object to query.
4462
+ * @returns {Array} Returns the array of property names.
4463
+ * @example
4464
+ *
4465
+ * function Foo() {
4466
+ * this.a = 1;
4467
+ * this.b = 2;
4468
+ * }
4469
+ *
4470
+ * Foo.prototype.c = 3;
4471
+ *
4472
+ * _.keys(new Foo);
4473
+ * // => ['a', 'b'] (iteration order is not guaranteed)
4474
+ *
4475
+ * _.keys('hi');
4476
+ * // => ['0', '1']
4477
+ */
4478
+
4479
+
4480
+ function keys(object) {
4481
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
4482
+ }
4483
+ /**
4484
+ * This method returns a new empty array.
4485
+ *
4486
+ * @static
4487
+ * @memberOf _
4488
+ * @since 4.13.0
4489
+ * @category Util
4490
+ * @returns {Array} Returns the new empty array.
4491
+ * @example
4492
+ *
4493
+ * var arrays = _.times(2, _.stubArray);
4494
+ *
4495
+ * console.log(arrays);
4496
+ * // => [[], []]
4497
+ *
4498
+ * console.log(arrays[0] === arrays[1]);
4499
+ * // => false
4500
+ */
4501
+
4502
+
4503
+ function stubArray() {
4504
+ return [];
4505
+ }
4506
+ /**
4507
+ * This method returns `false`.
4508
+ *
4509
+ * @static
4510
+ * @memberOf _
4511
+ * @since 4.13.0
4512
+ * @category Util
4513
+ * @returns {boolean} Returns `false`.
4514
+ * @example
4515
+ *
4516
+ * _.times(2, _.stubFalse);
4517
+ * // => [false, false]
4518
+ */
4519
+
4520
+
4521
+ function stubFalse() {
4522
+ return false;
4523
+ }
4524
+
4525
+ module.exports = cloneDeep;
4526
+ });
4527
+
2681
4528
  var hop = Object.prototype.hasOwnProperty;
2682
4529
  var strCharAt = String.prototype.charAt;
2683
4530
  var toStr = Object.prototype.toString;
@@ -3708,7 +5555,7 @@
3708
5555
  PRODUCT_REVIEWED: "Product Reviewed"
3709
5556
  }; // Enumeration for integrations supported
3710
5557
 
3711
- var CONFIG_URL = "https://api.rudderlabs.com/sourceConfig/?p=npm&v=1.2.2";
5558
+ var CONFIG_URL = "https://api.rudderlabs.com/sourceConfig/?p=npm&v=1.2.7";
3712
5559
  var MAX_WAIT_FOR_INTEGRATION_LOAD = 10000;
3713
5560
  var INTEGRATION_LOAD_CHECK_INTERVAL = 1000;
3714
5561
  /* module.exports = {
@@ -10546,6 +12393,10 @@
10546
12393
  return data;
10547
12394
  };
10548
12395
 
12396
+ var removeTrailingSlashes = function removeTrailingSlashes(str) {
12397
+ return str && str.endsWith("/") ? str.replace(/\/+$/, "") : str;
12398
+ };
12399
+
10549
12400
  var lodash=createCommonjsModule(function(module,exports){(function(){/** Used as a safe reference for `undefined` in pre-ES5 environments. */var undefined$1;/** Used as the semantic version number. */var VERSION='4.17.21';/** Used as the size to enable large array optimizations. */var LARGE_ARRAY_SIZE=200;/** Error message constants. */var CORE_ERROR_TEXT='Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',FUNC_ERROR_TEXT='Expected a function',INVALID_TEMPL_VAR_ERROR_TEXT='Invalid `variable` option passed into `_.template`';/** Used to stand-in for `undefined` hash values. */var HASH_UNDEFINED='__lodash_hash_undefined__';/** Used as the maximum memoize cache size. */var MAX_MEMOIZE_SIZE=500;/** Used as the internal argument placeholder. */var PLACEHOLDER='__lodash_placeholder__';/** Used to compose bitmasks for cloning. */var CLONE_DEEP_FLAG=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG=4;/** Used to compose bitmasks for value comparisons. */var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;/** Used to compose bitmasks for function metadata. */var WRAP_BIND_FLAG=1,WRAP_BIND_KEY_FLAG=2,WRAP_CURRY_BOUND_FLAG=4,WRAP_CURRY_FLAG=8,WRAP_CURRY_RIGHT_FLAG=16,WRAP_PARTIAL_FLAG=32,WRAP_PARTIAL_RIGHT_FLAG=64,WRAP_ARY_FLAG=128,WRAP_REARG_FLAG=256,WRAP_FLIP_FLAG=512;/** Used as default options for `_.truncate`. */var DEFAULT_TRUNC_LENGTH=30,DEFAULT_TRUNC_OMISSION='...';/** Used to detect hot functions by number of calls within a span of milliseconds. */var HOT_COUNT=800,HOT_SPAN=16;/** Used to indicate the type of lazy iteratees. */var LAZY_FILTER_FLAG=1,LAZY_MAP_FLAG=2,LAZY_WHILE_FLAG=3;/** Used as references for various `Number` constants. */var INFINITY=1/0,MAX_SAFE_INTEGER=9007199254740991,MAX_INTEGER=1.7976931348623157e+308,NAN=0/0;/** Used as references for the maximum length and index of an array. */var MAX_ARRAY_LENGTH=4294967295,MAX_ARRAY_INDEX=MAX_ARRAY_LENGTH-1,HALF_MAX_ARRAY_LENGTH=MAX_ARRAY_LENGTH>>>1;/** Used to associate wrap methods with their bit flags. */var wrapFlags=[['ary',WRAP_ARY_FLAG],['bind',WRAP_BIND_FLAG],['bindKey',WRAP_BIND_KEY_FLAG],['curry',WRAP_CURRY_FLAG],['curryRight',WRAP_CURRY_RIGHT_FLAG],['flip',WRAP_FLIP_FLAG],['partial',WRAP_PARTIAL_FLAG],['partialRight',WRAP_PARTIAL_RIGHT_FLAG],['rearg',WRAP_REARG_FLAG]];/** `Object#toString` result references. */var argsTag='[object Arguments]',arrayTag='[object Array]',asyncTag='[object AsyncFunction]',boolTag='[object Boolean]',dateTag='[object Date]',domExcTag='[object DOMException]',errorTag='[object Error]',funcTag='[object Function]',genTag='[object GeneratorFunction]',mapTag='[object Map]',numberTag='[object Number]',nullTag='[object Null]',objectTag='[object Object]',promiseTag='[object Promise]',proxyTag='[object Proxy]',regexpTag='[object RegExp]',setTag='[object Set]',stringTag='[object String]',symbolTag='[object Symbol]',undefinedTag='[object Undefined]',weakMapTag='[object WeakMap]',weakSetTag='[object WeakSet]';var arrayBufferTag='[object ArrayBuffer]',dataViewTag='[object DataView]',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 match empty string literals in compiled template source. */var reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g;/** Used to match HTML entities and HTML characters. */var reEscapedHtml=/&(?:amp|lt|gt|quot|#39);/g,reUnescapedHtml=/[&<>"']/g,reHasEscapedHtml=RegExp(reEscapedHtml.source),reHasUnescapedHtml=RegExp(reUnescapedHtml.source);/** Used to match template delimiters. */var reEscape=/<%-([\s\S]+?)%>/g,reEvaluate=/<%([\s\S]+?)%>/g,reInterpolate=/<%=([\s\S]+?)%>/g;/** Used to match property names within property paths. */var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;/**
10550
12401
  * Used to match `RegExp`
10551
12402
  * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
@@ -21617,12 +23468,15 @@
21617
23468
  }, {
21618
23469
  key: "page",
21619
23470
  value: function page(rudderElement) {
23471
+ var _rudderElement$messag2, _rudderElement$messag3;
23472
+
21620
23473
  logger.debug("in Amplitude page");
21621
23474
  this.setDeviceId(rudderElement);
21622
23475
  var _rudderElement$messag = rudderElement.message,
21623
23476
  properties = _rudderElement$messag.properties,
21624
23477
  name = _rudderElement$messag.name,
21625
- category = _rudderElement$messag.category; // all pages
23478
+ category = _rudderElement$messag.category;
23479
+ var useNewPageEventNameFormat = ((_rudderElement$messag2 = rudderElement.message.integrations) === null || _rudderElement$messag2 === void 0 ? void 0 : (_rudderElement$messag3 = _rudderElement$messag2.AM) === null || _rudderElement$messag3 === void 0 ? void 0 : _rudderElement$messag3.useNewPageEventNameFormat) || false; // all pages
21626
23480
 
21627
23481
  if (this.trackAllPages) {
21628
23482
  var event = "Loaded a page";
@@ -21631,15 +23485,17 @@
21631
23485
 
21632
23486
 
21633
23487
  if (category && this.trackCategorizedPages) {
21634
- var _event = "Viewed page ".concat(category);
23488
+ var _event;
21635
23489
 
23490
+ if (!useNewPageEventNameFormat) _event = "Viewed page ".concat(category);else _event = "Viewed ".concat(category, " Page");
21636
23491
  amplitude.getInstance().logEvent(_event, properties);
21637
23492
  } // named pages
21638
23493
 
21639
23494
 
21640
23495
  if (name && this.trackNamedPages) {
21641
- var _event2 = "Viewed page ".concat(name);
23496
+ var _event2;
21642
23497
 
23498
+ if (!useNewPageEventNameFormat) _event2 = "Viewed page ".concat(name);else _event2 = "Viewed ".concat(name, " Page");
21643
23499
  amplitude.getInstance().logEvent(_event2, properties);
21644
23500
  }
21645
23501
  }
@@ -21648,9 +23504,9 @@
21648
23504
  value: function group(rudderElement) {
21649
23505
  logger.debug("in Amplitude group");
21650
23506
  this.setDeviceId(rudderElement);
21651
- var _rudderElement$messag2 = rudderElement.message,
21652
- groupId = _rudderElement$messag2.groupId,
21653
- traits = _rudderElement$messag2.traits;
23507
+ var _rudderElement$messag4 = rudderElement.message,
23508
+ groupId = _rudderElement$messag4.groupId,
23509
+ traits = _rudderElement$messag4.traits;
21654
23510
  var groupTypeTrait = this.groupTypeTrait;
21655
23511
  var groupValueTrait = this.groupValueTrait;
21656
23512
 
@@ -30607,7 +32463,7 @@
30607
32463
  this.name = "POSTHOG";
30608
32464
  this.analytics = analytics;
30609
32465
  this.teamApiKey = config.teamApiKey;
30610
- this.yourInstance = config.yourInstance || "https://app.posthog.com";
32466
+ this.yourInstance = removeTrailingSlashes(config.yourInstance) || "https://app.posthog.com";
30611
32467
  this.autocapture = config.autocapture || false;
30612
32468
  this.capturePageView = config.capturePageView || false;
30613
32469
  this.disableSessionRecording = config.disableSessionRecording || false;
@@ -31961,7 +33817,7 @@
31961
33817
  this.build = "1.0.0";
31962
33818
  this.name = "RudderLabs JavaScript SDK";
31963
33819
  this.namespace = "com.rudderlabs.javascript";
31964
- this.version = "1.2.2";
33820
+ this.version = "1.2.7";
31965
33821
  };
31966
33822
 
31967
33823
  // Library information class
@@ -31969,7 +33825,7 @@
31969
33825
  _classCallCheck(this, RudderLibraryInfo);
31970
33826
 
31971
33827
  this.name = "RudderLabs JavaScript SDK";
31972
- this.version = "1.2.2";
33828
+ this.version = "1.2.7";
31973
33829
  }; // Operating System information class
31974
33830
 
31975
33831
 
@@ -34724,7 +36580,9 @@
34724
36580
  if (succesfulLoadedIntersectClientSuppliedIntegrations[i][methodName]) {
34725
36581
  var _succesfulLoadedInter;
34726
36582
 
34727
- (_succesfulLoadedInter = succesfulLoadedIntersectClientSuppliedIntegrations[i])[methodName].apply(_succesfulLoadedInter, _toConsumableArray(event));
36583
+ var clonedBufferEvent = lodash_clonedeep(event);
36584
+
36585
+ (_succesfulLoadedInter = succesfulLoadedIntersectClientSuppliedIntegrations[i])[methodName].apply(_succesfulLoadedInter, _toConsumableArray(clonedBufferEvent));
34728
36586
  }
34729
36587
  }
34730
36588
  } catch (error) {
@@ -35084,7 +36942,8 @@
35084
36942
  succesfulLoadedIntersectClientSuppliedIntegrations.forEach(function (obj) {
35085
36943
  if (!obj.isFailed || !obj.isFailed()) {
35086
36944
  if (obj[type]) {
35087
- obj[type](rudderElement);
36945
+ var clonedRudderElement = lodash_clonedeep(rudderElement);
36946
+ obj[type](clonedRudderElement);
35088
36947
  }
35089
36948
  }
35090
36949
  });