@bpmn-io/form-js-playground 1.6.1 → 1.6.3

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.
@@ -1110,16 +1110,16 @@
1110
1110
  function isNil$1(obj) {
1111
1111
  return obj == null;
1112
1112
  }
1113
- function isArray$4(obj) {
1113
+ function isArray$8(obj) {
1114
1114
  return nativeToString$1.call(obj) === '[object Array]';
1115
1115
  }
1116
- function isObject$1(obj) {
1116
+ function isObject$4(obj) {
1117
1117
  return nativeToString$1.call(obj) === '[object Object]';
1118
1118
  }
1119
1119
  function isNumber$4(obj) {
1120
1120
  return nativeToString$1.call(obj) === '[object Number]';
1121
1121
  }
1122
- function isFunction$1(obj) {
1122
+ function isFunction$4(obj) {
1123
1123
  const tag = nativeToString$1.call(obj);
1124
1124
  return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]';
1125
1125
  }
@@ -1169,7 +1169,7 @@
1169
1169
  */
1170
1170
  function findIndex$1(collection, matcher) {
1171
1171
  matcher = toMatcher$1(matcher);
1172
- let idx = isArray$4(collection) ? -1 : undefined;
1172
+ let idx = isArray$8(collection) ? -1 : undefined;
1173
1173
  forEach$1(collection, function (val, key) {
1174
1174
  if (matcher(val, key)) {
1175
1175
  idx = key;
@@ -1193,7 +1193,7 @@
1193
1193
  if (isUndefined$2(collection)) {
1194
1194
  return;
1195
1195
  }
1196
- const convertKey = isArray$4(collection) ? toNum$1 : identity$1;
1196
+ const convertKey = isArray$8(collection) ? toNum$1 : identity$1;
1197
1197
  for (let key in collection) {
1198
1198
  if (has$1(collection, key)) {
1199
1199
  val = collection[key];
@@ -1276,12 +1276,12 @@
1276
1276
  return result;
1277
1277
  }
1278
1278
  function toExtractor$1(extractor) {
1279
- return isFunction$1(extractor) ? extractor : e => {
1279
+ return isFunction$4(extractor) ? extractor : e => {
1280
1280
  return e[extractor];
1281
1281
  };
1282
1282
  }
1283
1283
  function toMatcher$1(matcher) {
1284
- return isFunction$1(matcher) ? matcher : e => {
1284
+ return isFunction$4(matcher) ? matcher : e => {
1285
1285
  return e === matcher;
1286
1286
  };
1287
1287
  }
@@ -2332,6 +2332,2265 @@
2332
2332
  return l$3.vnode && l$3.vnode(a), a;
2333
2333
  }
2334
2334
 
2335
+ /**
2336
+ * Removes all key-value entries from the list cache.
2337
+ *
2338
+ * @private
2339
+ * @name clear
2340
+ * @memberOf ListCache
2341
+ */
2342
+
2343
+ function listCacheClear$1() {
2344
+ this.__data__ = [];
2345
+ this.size = 0;
2346
+ }
2347
+ var _listCacheClear = listCacheClear$1;
2348
+
2349
+ /**
2350
+ * Performs a
2351
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
2352
+ * comparison between two values to determine if they are equivalent.
2353
+ *
2354
+ * @static
2355
+ * @memberOf _
2356
+ * @since 4.0.0
2357
+ * @category Lang
2358
+ * @param {*} value The value to compare.
2359
+ * @param {*} other The other value to compare.
2360
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
2361
+ * @example
2362
+ *
2363
+ * var object = { 'a': 1 };
2364
+ * var other = { 'a': 1 };
2365
+ *
2366
+ * _.eq(object, object);
2367
+ * // => true
2368
+ *
2369
+ * _.eq(object, other);
2370
+ * // => false
2371
+ *
2372
+ * _.eq('a', 'a');
2373
+ * // => true
2374
+ *
2375
+ * _.eq('a', Object('a'));
2376
+ * // => false
2377
+ *
2378
+ * _.eq(NaN, NaN);
2379
+ * // => true
2380
+ */
2381
+
2382
+ function eq$2(value, other) {
2383
+ return value === other || value !== value && other !== other;
2384
+ }
2385
+ var eq_1 = eq$2;
2386
+
2387
+ var eq$1 = eq_1;
2388
+
2389
+ /**
2390
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
2391
+ *
2392
+ * @private
2393
+ * @param {Array} array The array to inspect.
2394
+ * @param {*} key The key to search for.
2395
+ * @returns {number} Returns the index of the matched value, else `-1`.
2396
+ */
2397
+ function assocIndexOf$4(array, key) {
2398
+ var length = array.length;
2399
+ while (length--) {
2400
+ if (eq$1(array[length][0], key)) {
2401
+ return length;
2402
+ }
2403
+ }
2404
+ return -1;
2405
+ }
2406
+ var _assocIndexOf = assocIndexOf$4;
2407
+
2408
+ var assocIndexOf$3 = _assocIndexOf;
2409
+
2410
+ /** Used for built-in method references. */
2411
+ var arrayProto = Array.prototype;
2412
+
2413
+ /** Built-in value references. */
2414
+ var splice = arrayProto.splice;
2415
+
2416
+ /**
2417
+ * Removes `key` and its value from the list cache.
2418
+ *
2419
+ * @private
2420
+ * @name delete
2421
+ * @memberOf ListCache
2422
+ * @param {string} key The key of the value to remove.
2423
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
2424
+ */
2425
+ function listCacheDelete$1(key) {
2426
+ var data = this.__data__,
2427
+ index = assocIndexOf$3(data, key);
2428
+ if (index < 0) {
2429
+ return false;
2430
+ }
2431
+ var lastIndex = data.length - 1;
2432
+ if (index == lastIndex) {
2433
+ data.pop();
2434
+ } else {
2435
+ splice.call(data, index, 1);
2436
+ }
2437
+ --this.size;
2438
+ return true;
2439
+ }
2440
+ var _listCacheDelete = listCacheDelete$1;
2441
+
2442
+ var assocIndexOf$2 = _assocIndexOf;
2443
+
2444
+ /**
2445
+ * Gets the list cache value for `key`.
2446
+ *
2447
+ * @private
2448
+ * @name get
2449
+ * @memberOf ListCache
2450
+ * @param {string} key The key of the value to get.
2451
+ * @returns {*} Returns the entry value.
2452
+ */
2453
+ function listCacheGet$1(key) {
2454
+ var data = this.__data__,
2455
+ index = assocIndexOf$2(data, key);
2456
+ return index < 0 ? undefined : data[index][1];
2457
+ }
2458
+ var _listCacheGet = listCacheGet$1;
2459
+
2460
+ var assocIndexOf$1 = _assocIndexOf;
2461
+
2462
+ /**
2463
+ * Checks if a list cache value for `key` exists.
2464
+ *
2465
+ * @private
2466
+ * @name has
2467
+ * @memberOf ListCache
2468
+ * @param {string} key The key of the entry to check.
2469
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2470
+ */
2471
+ function listCacheHas$1(key) {
2472
+ return assocIndexOf$1(this.__data__, key) > -1;
2473
+ }
2474
+ var _listCacheHas = listCacheHas$1;
2475
+
2476
+ var assocIndexOf = _assocIndexOf;
2477
+
2478
+ /**
2479
+ * Sets the list cache `key` to `value`.
2480
+ *
2481
+ * @private
2482
+ * @name set
2483
+ * @memberOf ListCache
2484
+ * @param {string} key The key of the value to set.
2485
+ * @param {*} value The value to set.
2486
+ * @returns {Object} Returns the list cache instance.
2487
+ */
2488
+ function listCacheSet$1(key, value) {
2489
+ var data = this.__data__,
2490
+ index = assocIndexOf(data, key);
2491
+ if (index < 0) {
2492
+ ++this.size;
2493
+ data.push([key, value]);
2494
+ } else {
2495
+ data[index][1] = value;
2496
+ }
2497
+ return this;
2498
+ }
2499
+ var _listCacheSet = listCacheSet$1;
2500
+
2501
+ var listCacheClear = _listCacheClear,
2502
+ listCacheDelete = _listCacheDelete,
2503
+ listCacheGet = _listCacheGet,
2504
+ listCacheHas = _listCacheHas,
2505
+ listCacheSet = _listCacheSet;
2506
+
2507
+ /**
2508
+ * Creates an list cache object.
2509
+ *
2510
+ * @private
2511
+ * @constructor
2512
+ * @param {Array} [entries] The key-value pairs to cache.
2513
+ */
2514
+ function ListCache$4(entries) {
2515
+ var index = -1,
2516
+ length = entries == null ? 0 : entries.length;
2517
+ this.clear();
2518
+ while (++index < length) {
2519
+ var entry = entries[index];
2520
+ this.set(entry[0], entry[1]);
2521
+ }
2522
+ }
2523
+
2524
+ // Add methods to `ListCache`.
2525
+ ListCache$4.prototype.clear = listCacheClear;
2526
+ ListCache$4.prototype['delete'] = listCacheDelete;
2527
+ ListCache$4.prototype.get = listCacheGet;
2528
+ ListCache$4.prototype.has = listCacheHas;
2529
+ ListCache$4.prototype.set = listCacheSet;
2530
+ var _ListCache = ListCache$4;
2531
+
2532
+ var ListCache$3 = _ListCache;
2533
+
2534
+ /**
2535
+ * Removes all key-value entries from the stack.
2536
+ *
2537
+ * @private
2538
+ * @name clear
2539
+ * @memberOf Stack
2540
+ */
2541
+ function stackClear$1() {
2542
+ this.__data__ = new ListCache$3();
2543
+ this.size = 0;
2544
+ }
2545
+ var _stackClear = stackClear$1;
2546
+
2547
+ /**
2548
+ * Removes `key` and its value from the stack.
2549
+ *
2550
+ * @private
2551
+ * @name delete
2552
+ * @memberOf Stack
2553
+ * @param {string} key The key of the value to remove.
2554
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
2555
+ */
2556
+
2557
+ function stackDelete$1(key) {
2558
+ var data = this.__data__,
2559
+ result = data['delete'](key);
2560
+ this.size = data.size;
2561
+ return result;
2562
+ }
2563
+ var _stackDelete = stackDelete$1;
2564
+
2565
+ /**
2566
+ * Gets the stack value for `key`.
2567
+ *
2568
+ * @private
2569
+ * @name get
2570
+ * @memberOf Stack
2571
+ * @param {string} key The key of the value to get.
2572
+ * @returns {*} Returns the entry value.
2573
+ */
2574
+
2575
+ function stackGet$1(key) {
2576
+ return this.__data__.get(key);
2577
+ }
2578
+ var _stackGet = stackGet$1;
2579
+
2580
+ /**
2581
+ * Checks if a stack value for `key` exists.
2582
+ *
2583
+ * @private
2584
+ * @name has
2585
+ * @memberOf Stack
2586
+ * @param {string} key The key of the entry to check.
2587
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2588
+ */
2589
+
2590
+ function stackHas$1(key) {
2591
+ return this.__data__.has(key);
2592
+ }
2593
+ var _stackHas = stackHas$1;
2594
+
2595
+ /** Detect free variable `global` from Node.js. */
2596
+
2597
+ var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
2598
+ var _freeGlobal = freeGlobal$1;
2599
+
2600
+ var freeGlobal = _freeGlobal;
2601
+
2602
+ /** Detect free variable `self`. */
2603
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
2604
+
2605
+ /** Used as a reference to the global object. */
2606
+ var root$8 = freeGlobal || freeSelf || Function('return this')();
2607
+ var _root = root$8;
2608
+
2609
+ var root$7 = _root;
2610
+
2611
+ /** Built-in value references. */
2612
+ var Symbol$4 = root$7.Symbol;
2613
+ var _Symbol = Symbol$4;
2614
+
2615
+ var Symbol$3 = _Symbol;
2616
+
2617
+ /** Used for built-in method references. */
2618
+ var objectProto$b = Object.prototype;
2619
+
2620
+ /** Used to check objects for own properties. */
2621
+ var hasOwnProperty$9 = objectProto$b.hasOwnProperty;
2622
+
2623
+ /**
2624
+ * Used to resolve the
2625
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
2626
+ * of values.
2627
+ */
2628
+ var nativeObjectToString$1 = objectProto$b.toString;
2629
+
2630
+ /** Built-in value references. */
2631
+ var symToStringTag$1 = Symbol$3 ? Symbol$3.toStringTag : undefined;
2632
+
2633
+ /**
2634
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
2635
+ *
2636
+ * @private
2637
+ * @param {*} value The value to query.
2638
+ * @returns {string} Returns the raw `toStringTag`.
2639
+ */
2640
+ function getRawTag$1(value) {
2641
+ var isOwn = hasOwnProperty$9.call(value, symToStringTag$1),
2642
+ tag = value[symToStringTag$1];
2643
+ try {
2644
+ value[symToStringTag$1] = undefined;
2645
+ var unmasked = true;
2646
+ } catch (e) {}
2647
+ var result = nativeObjectToString$1.call(value);
2648
+ if (unmasked) {
2649
+ if (isOwn) {
2650
+ value[symToStringTag$1] = tag;
2651
+ } else {
2652
+ delete value[symToStringTag$1];
2653
+ }
2654
+ }
2655
+ return result;
2656
+ }
2657
+ var _getRawTag = getRawTag$1;
2658
+
2659
+ /** Used for built-in method references. */
2660
+
2661
+ var objectProto$a = Object.prototype;
2662
+
2663
+ /**
2664
+ * Used to resolve the
2665
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
2666
+ * of values.
2667
+ */
2668
+ var nativeObjectToString = objectProto$a.toString;
2669
+
2670
+ /**
2671
+ * Converts `value` to a string using `Object.prototype.toString`.
2672
+ *
2673
+ * @private
2674
+ * @param {*} value The value to convert.
2675
+ * @returns {string} Returns the converted string.
2676
+ */
2677
+ function objectToString$1(value) {
2678
+ return nativeObjectToString.call(value);
2679
+ }
2680
+ var _objectToString = objectToString$1;
2681
+
2682
+ var Symbol$2 = _Symbol,
2683
+ getRawTag = _getRawTag,
2684
+ objectToString = _objectToString;
2685
+
2686
+ /** `Object#toString` result references. */
2687
+ var nullTag = '[object Null]',
2688
+ undefinedTag = '[object Undefined]';
2689
+
2690
+ /** Built-in value references. */
2691
+ var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : undefined;
2692
+
2693
+ /**
2694
+ * The base implementation of `getTag` without fallbacks for buggy environments.
2695
+ *
2696
+ * @private
2697
+ * @param {*} value The value to query.
2698
+ * @returns {string} Returns the `toStringTag`.
2699
+ */
2700
+ function baseGetTag$4(value) {
2701
+ if (value == null) {
2702
+ return value === undefined ? undefinedTag : nullTag;
2703
+ }
2704
+ return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
2705
+ }
2706
+ var _baseGetTag = baseGetTag$4;
2707
+
2708
+ /**
2709
+ * Checks if `value` is the
2710
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
2711
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
2712
+ *
2713
+ * @static
2714
+ * @memberOf _
2715
+ * @since 0.1.0
2716
+ * @category Lang
2717
+ * @param {*} value The value to check.
2718
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
2719
+ * @example
2720
+ *
2721
+ * _.isObject({});
2722
+ * // => true
2723
+ *
2724
+ * _.isObject([1, 2, 3]);
2725
+ * // => true
2726
+ *
2727
+ * _.isObject(_.noop);
2728
+ * // => true
2729
+ *
2730
+ * _.isObject(null);
2731
+ * // => false
2732
+ */
2733
+
2734
+ function isObject$3(value) {
2735
+ var type = typeof value;
2736
+ return value != null && (type == 'object' || type == 'function');
2737
+ }
2738
+ var isObject_1 = isObject$3;
2739
+
2740
+ var baseGetTag$3 = _baseGetTag,
2741
+ isObject$2 = isObject_1;
2742
+
2743
+ /** `Object#toString` result references. */
2744
+ var asyncTag = '[object AsyncFunction]',
2745
+ funcTag$1 = '[object Function]',
2746
+ genTag = '[object GeneratorFunction]',
2747
+ proxyTag = '[object Proxy]';
2748
+
2749
+ /**
2750
+ * Checks if `value` is classified as a `Function` object.
2751
+ *
2752
+ * @static
2753
+ * @memberOf _
2754
+ * @since 0.1.0
2755
+ * @category Lang
2756
+ * @param {*} value The value to check.
2757
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
2758
+ * @example
2759
+ *
2760
+ * _.isFunction(_);
2761
+ * // => true
2762
+ *
2763
+ * _.isFunction(/abc/);
2764
+ * // => false
2765
+ */
2766
+ function isFunction$3(value) {
2767
+ if (!isObject$2(value)) {
2768
+ return false;
2769
+ }
2770
+ // The use of `Object#toString` avoids issues with the `typeof` operator
2771
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
2772
+ var tag = baseGetTag$3(value);
2773
+ return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
2774
+ }
2775
+ var isFunction_1 = isFunction$3;
2776
+
2777
+ var root$6 = _root;
2778
+
2779
+ /** Used to detect overreaching core-js shims. */
2780
+ var coreJsData$1 = root$6['__core-js_shared__'];
2781
+ var _coreJsData = coreJsData$1;
2782
+
2783
+ var coreJsData = _coreJsData;
2784
+
2785
+ /** Used to detect methods masquerading as native. */
2786
+ var maskSrcKey = function () {
2787
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
2788
+ return uid ? 'Symbol(src)_1.' + uid : '';
2789
+ }();
2790
+
2791
+ /**
2792
+ * Checks if `func` has its source masked.
2793
+ *
2794
+ * @private
2795
+ * @param {Function} func The function to check.
2796
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
2797
+ */
2798
+ function isMasked$1(func) {
2799
+ return !!maskSrcKey && maskSrcKey in func;
2800
+ }
2801
+ var _isMasked = isMasked$1;
2802
+
2803
+ /** Used for built-in method references. */
2804
+
2805
+ var funcProto$1 = Function.prototype;
2806
+
2807
+ /** Used to resolve the decompiled source of functions. */
2808
+ var funcToString$1 = funcProto$1.toString;
2809
+
2810
+ /**
2811
+ * Converts `func` to its source code.
2812
+ *
2813
+ * @private
2814
+ * @param {Function} func The function to convert.
2815
+ * @returns {string} Returns the source code.
2816
+ */
2817
+ function toSource$2(func) {
2818
+ if (func != null) {
2819
+ try {
2820
+ return funcToString$1.call(func);
2821
+ } catch (e) {}
2822
+ try {
2823
+ return func + '';
2824
+ } catch (e) {}
2825
+ }
2826
+ return '';
2827
+ }
2828
+ var _toSource = toSource$2;
2829
+
2830
+ var isFunction$2 = isFunction_1,
2831
+ isMasked = _isMasked,
2832
+ isObject$1 = isObject_1,
2833
+ toSource$1 = _toSource;
2834
+
2835
+ /**
2836
+ * Used to match `RegExp`
2837
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
2838
+ */
2839
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
2840
+
2841
+ /** Used to detect host constructors (Safari). */
2842
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
2843
+
2844
+ /** Used for built-in method references. */
2845
+ var funcProto = Function.prototype,
2846
+ objectProto$9 = Object.prototype;
2847
+
2848
+ /** Used to resolve the decompiled source of functions. */
2849
+ var funcToString = funcProto.toString;
2850
+
2851
+ /** Used to check objects for own properties. */
2852
+ var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
2853
+
2854
+ /** Used to detect if a method is native. */
2855
+ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty$8).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
2856
+
2857
+ /**
2858
+ * The base implementation of `_.isNative` without bad shim checks.
2859
+ *
2860
+ * @private
2861
+ * @param {*} value The value to check.
2862
+ * @returns {boolean} Returns `true` if `value` is a native function,
2863
+ * else `false`.
2864
+ */
2865
+ function baseIsNative$1(value) {
2866
+ if (!isObject$1(value) || isMasked(value)) {
2867
+ return false;
2868
+ }
2869
+ var pattern = isFunction$2(value) ? reIsNative : reIsHostCtor;
2870
+ return pattern.test(toSource$1(value));
2871
+ }
2872
+ var _baseIsNative = baseIsNative$1;
2873
+
2874
+ /**
2875
+ * Gets the value at `key` of `object`.
2876
+ *
2877
+ * @private
2878
+ * @param {Object} [object] The object to query.
2879
+ * @param {string} key The key of the property to get.
2880
+ * @returns {*} Returns the property value.
2881
+ */
2882
+
2883
+ function getValue$1(object, key) {
2884
+ return object == null ? undefined : object[key];
2885
+ }
2886
+ var _getValue = getValue$1;
2887
+
2888
+ var baseIsNative = _baseIsNative,
2889
+ getValue = _getValue;
2890
+
2891
+ /**
2892
+ * Gets the native function at `key` of `object`.
2893
+ *
2894
+ * @private
2895
+ * @param {Object} object The object to query.
2896
+ * @param {string} key The key of the method to get.
2897
+ * @returns {*} Returns the function if it's native, else `undefined`.
2898
+ */
2899
+ function getNative$6(object, key) {
2900
+ var value = getValue(object, key);
2901
+ return baseIsNative(value) ? value : undefined;
2902
+ }
2903
+ var _getNative = getNative$6;
2904
+
2905
+ var getNative$5 = _getNative,
2906
+ root$5 = _root;
2907
+
2908
+ /* Built-in method references that are verified to be native. */
2909
+ var Map$4 = getNative$5(root$5, 'Map');
2910
+ var _Map = Map$4;
2911
+
2912
+ var getNative$4 = _getNative;
2913
+
2914
+ /* Built-in method references that are verified to be native. */
2915
+ var nativeCreate$4 = getNative$4(Object, 'create');
2916
+ var _nativeCreate = nativeCreate$4;
2917
+
2918
+ var nativeCreate$3 = _nativeCreate;
2919
+
2920
+ /**
2921
+ * Removes all key-value entries from the hash.
2922
+ *
2923
+ * @private
2924
+ * @name clear
2925
+ * @memberOf Hash
2926
+ */
2927
+ function hashClear$1() {
2928
+ this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
2929
+ this.size = 0;
2930
+ }
2931
+ var _hashClear = hashClear$1;
2932
+
2933
+ /**
2934
+ * Removes `key` and its value from the hash.
2935
+ *
2936
+ * @private
2937
+ * @name delete
2938
+ * @memberOf Hash
2939
+ * @param {Object} hash The hash to modify.
2940
+ * @param {string} key The key of the value to remove.
2941
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
2942
+ */
2943
+
2944
+ function hashDelete$1(key) {
2945
+ var result = this.has(key) && delete this.__data__[key];
2946
+ this.size -= result ? 1 : 0;
2947
+ return result;
2948
+ }
2949
+ var _hashDelete = hashDelete$1;
2950
+
2951
+ var nativeCreate$2 = _nativeCreate;
2952
+
2953
+ /** Used to stand-in for `undefined` hash values. */
2954
+ var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
2955
+
2956
+ /** Used for built-in method references. */
2957
+ var objectProto$8 = Object.prototype;
2958
+
2959
+ /** Used to check objects for own properties. */
2960
+ var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
2961
+
2962
+ /**
2963
+ * Gets the hash value for `key`.
2964
+ *
2965
+ * @private
2966
+ * @name get
2967
+ * @memberOf Hash
2968
+ * @param {string} key The key of the value to get.
2969
+ * @returns {*} Returns the entry value.
2970
+ */
2971
+ function hashGet$1(key) {
2972
+ var data = this.__data__;
2973
+ if (nativeCreate$2) {
2974
+ var result = data[key];
2975
+ return result === HASH_UNDEFINED$2 ? undefined : result;
2976
+ }
2977
+ return hasOwnProperty$7.call(data, key) ? data[key] : undefined;
2978
+ }
2979
+ var _hashGet = hashGet$1;
2980
+
2981
+ var nativeCreate$1 = _nativeCreate;
2982
+
2983
+ /** Used for built-in method references. */
2984
+ var objectProto$7 = Object.prototype;
2985
+
2986
+ /** Used to check objects for own properties. */
2987
+ var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
2988
+
2989
+ /**
2990
+ * Checks if a hash value for `key` exists.
2991
+ *
2992
+ * @private
2993
+ * @name has
2994
+ * @memberOf Hash
2995
+ * @param {string} key The key of the entry to check.
2996
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2997
+ */
2998
+ function hashHas$1(key) {
2999
+ var data = this.__data__;
3000
+ return nativeCreate$1 ? data[key] !== undefined : hasOwnProperty$6.call(data, key);
3001
+ }
3002
+ var _hashHas = hashHas$1;
3003
+
3004
+ var nativeCreate = _nativeCreate;
3005
+
3006
+ /** Used to stand-in for `undefined` hash values. */
3007
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
3008
+
3009
+ /**
3010
+ * Sets the hash `key` to `value`.
3011
+ *
3012
+ * @private
3013
+ * @name set
3014
+ * @memberOf Hash
3015
+ * @param {string} key The key of the value to set.
3016
+ * @param {*} value The value to set.
3017
+ * @returns {Object} Returns the hash instance.
3018
+ */
3019
+ function hashSet$1(key, value) {
3020
+ var data = this.__data__;
3021
+ this.size += this.has(key) ? 0 : 1;
3022
+ data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED$1 : value;
3023
+ return this;
3024
+ }
3025
+ var _hashSet = hashSet$1;
3026
+
3027
+ var hashClear = _hashClear,
3028
+ hashDelete = _hashDelete,
3029
+ hashGet = _hashGet,
3030
+ hashHas = _hashHas,
3031
+ hashSet = _hashSet;
3032
+
3033
+ /**
3034
+ * Creates a hash object.
3035
+ *
3036
+ * @private
3037
+ * @constructor
3038
+ * @param {Array} [entries] The key-value pairs to cache.
3039
+ */
3040
+ function Hash$1(entries) {
3041
+ var index = -1,
3042
+ length = entries == null ? 0 : entries.length;
3043
+ this.clear();
3044
+ while (++index < length) {
3045
+ var entry = entries[index];
3046
+ this.set(entry[0], entry[1]);
3047
+ }
3048
+ }
3049
+
3050
+ // Add methods to `Hash`.
3051
+ Hash$1.prototype.clear = hashClear;
3052
+ Hash$1.prototype['delete'] = hashDelete;
3053
+ Hash$1.prototype.get = hashGet;
3054
+ Hash$1.prototype.has = hashHas;
3055
+ Hash$1.prototype.set = hashSet;
3056
+ var _Hash = Hash$1;
3057
+
3058
+ var Hash = _Hash,
3059
+ ListCache$2 = _ListCache,
3060
+ Map$3 = _Map;
3061
+
3062
+ /**
3063
+ * Removes all key-value entries from the map.
3064
+ *
3065
+ * @private
3066
+ * @name clear
3067
+ * @memberOf MapCache
3068
+ */
3069
+ function mapCacheClear$1() {
3070
+ this.size = 0;
3071
+ this.__data__ = {
3072
+ 'hash': new Hash(),
3073
+ 'map': new (Map$3 || ListCache$2)(),
3074
+ 'string': new Hash()
3075
+ };
3076
+ }
3077
+ var _mapCacheClear = mapCacheClear$1;
3078
+
3079
+ /**
3080
+ * Checks if `value` is suitable for use as unique object key.
3081
+ *
3082
+ * @private
3083
+ * @param {*} value The value to check.
3084
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
3085
+ */
3086
+
3087
+ function isKeyable$1(value) {
3088
+ var type = typeof value;
3089
+ return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
3090
+ }
3091
+ var _isKeyable = isKeyable$1;
3092
+
3093
+ var isKeyable = _isKeyable;
3094
+
3095
+ /**
3096
+ * Gets the data for `map`.
3097
+ *
3098
+ * @private
3099
+ * @param {Object} map The map to query.
3100
+ * @param {string} key The reference key.
3101
+ * @returns {*} Returns the map data.
3102
+ */
3103
+ function getMapData$4(map, key) {
3104
+ var data = map.__data__;
3105
+ return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
3106
+ }
3107
+ var _getMapData = getMapData$4;
3108
+
3109
+ var getMapData$3 = _getMapData;
3110
+
3111
+ /**
3112
+ * Removes `key` and its value from the map.
3113
+ *
3114
+ * @private
3115
+ * @name delete
3116
+ * @memberOf MapCache
3117
+ * @param {string} key The key of the value to remove.
3118
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3119
+ */
3120
+ function mapCacheDelete$1(key) {
3121
+ var result = getMapData$3(this, key)['delete'](key);
3122
+ this.size -= result ? 1 : 0;
3123
+ return result;
3124
+ }
3125
+ var _mapCacheDelete = mapCacheDelete$1;
3126
+
3127
+ var getMapData$2 = _getMapData;
3128
+
3129
+ /**
3130
+ * Gets the map value for `key`.
3131
+ *
3132
+ * @private
3133
+ * @name get
3134
+ * @memberOf MapCache
3135
+ * @param {string} key The key of the value to get.
3136
+ * @returns {*} Returns the entry value.
3137
+ */
3138
+ function mapCacheGet$1(key) {
3139
+ return getMapData$2(this, key).get(key);
3140
+ }
3141
+ var _mapCacheGet = mapCacheGet$1;
3142
+
3143
+ var getMapData$1 = _getMapData;
3144
+
3145
+ /**
3146
+ * Checks if a map value for `key` exists.
3147
+ *
3148
+ * @private
3149
+ * @name has
3150
+ * @memberOf MapCache
3151
+ * @param {string} key The key of the entry to check.
3152
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3153
+ */
3154
+ function mapCacheHas$1(key) {
3155
+ return getMapData$1(this, key).has(key);
3156
+ }
3157
+ var _mapCacheHas = mapCacheHas$1;
3158
+
3159
+ var getMapData = _getMapData;
3160
+
3161
+ /**
3162
+ * Sets the map `key` to `value`.
3163
+ *
3164
+ * @private
3165
+ * @name set
3166
+ * @memberOf MapCache
3167
+ * @param {string} key The key of the value to set.
3168
+ * @param {*} value The value to set.
3169
+ * @returns {Object} Returns the map cache instance.
3170
+ */
3171
+ function mapCacheSet$1(key, value) {
3172
+ var data = getMapData(this, key),
3173
+ size = data.size;
3174
+ data.set(key, value);
3175
+ this.size += data.size == size ? 0 : 1;
3176
+ return this;
3177
+ }
3178
+ var _mapCacheSet = mapCacheSet$1;
3179
+
3180
+ var mapCacheClear = _mapCacheClear,
3181
+ mapCacheDelete = _mapCacheDelete,
3182
+ mapCacheGet = _mapCacheGet,
3183
+ mapCacheHas = _mapCacheHas,
3184
+ mapCacheSet = _mapCacheSet;
3185
+
3186
+ /**
3187
+ * Creates a map cache object to store key-value pairs.
3188
+ *
3189
+ * @private
3190
+ * @constructor
3191
+ * @param {Array} [entries] The key-value pairs to cache.
3192
+ */
3193
+ function MapCache$2(entries) {
3194
+ var index = -1,
3195
+ length = entries == null ? 0 : entries.length;
3196
+ this.clear();
3197
+ while (++index < length) {
3198
+ var entry = entries[index];
3199
+ this.set(entry[0], entry[1]);
3200
+ }
3201
+ }
3202
+
3203
+ // Add methods to `MapCache`.
3204
+ MapCache$2.prototype.clear = mapCacheClear;
3205
+ MapCache$2.prototype['delete'] = mapCacheDelete;
3206
+ MapCache$2.prototype.get = mapCacheGet;
3207
+ MapCache$2.prototype.has = mapCacheHas;
3208
+ MapCache$2.prototype.set = mapCacheSet;
3209
+ var _MapCache = MapCache$2;
3210
+
3211
+ var ListCache$1 = _ListCache,
3212
+ Map$2 = _Map,
3213
+ MapCache$1 = _MapCache;
3214
+
3215
+ /** Used as the size to enable large array optimizations. */
3216
+ var LARGE_ARRAY_SIZE = 200;
3217
+
3218
+ /**
3219
+ * Sets the stack `key` to `value`.
3220
+ *
3221
+ * @private
3222
+ * @name set
3223
+ * @memberOf Stack
3224
+ * @param {string} key The key of the value to set.
3225
+ * @param {*} value The value to set.
3226
+ * @returns {Object} Returns the stack cache instance.
3227
+ */
3228
+ function stackSet$1(key, value) {
3229
+ var data = this.__data__;
3230
+ if (data instanceof ListCache$1) {
3231
+ var pairs = data.__data__;
3232
+ if (!Map$2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
3233
+ pairs.push([key, value]);
3234
+ this.size = ++data.size;
3235
+ return this;
3236
+ }
3237
+ data = this.__data__ = new MapCache$1(pairs);
3238
+ }
3239
+ data.set(key, value);
3240
+ this.size = data.size;
3241
+ return this;
3242
+ }
3243
+ var _stackSet = stackSet$1;
3244
+
3245
+ var ListCache = _ListCache,
3246
+ stackClear = _stackClear,
3247
+ stackDelete = _stackDelete,
3248
+ stackGet = _stackGet,
3249
+ stackHas = _stackHas,
3250
+ stackSet = _stackSet;
3251
+
3252
+ /**
3253
+ * Creates a stack cache object to store key-value pairs.
3254
+ *
3255
+ * @private
3256
+ * @constructor
3257
+ * @param {Array} [entries] The key-value pairs to cache.
3258
+ */
3259
+ function Stack$2(entries) {
3260
+ var data = this.__data__ = new ListCache(entries);
3261
+ this.size = data.size;
3262
+ }
3263
+
3264
+ // Add methods to `Stack`.
3265
+ Stack$2.prototype.clear = stackClear;
3266
+ Stack$2.prototype['delete'] = stackDelete;
3267
+ Stack$2.prototype.get = stackGet;
3268
+ Stack$2.prototype.has = stackHas;
3269
+ Stack$2.prototype.set = stackSet;
3270
+ var _Stack = Stack$2;
3271
+
3272
+ /** Used to stand-in for `undefined` hash values. */
3273
+
3274
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
3275
+
3276
+ /**
3277
+ * Adds `value` to the array cache.
3278
+ *
3279
+ * @private
3280
+ * @name add
3281
+ * @memberOf SetCache
3282
+ * @alias push
3283
+ * @param {*} value The value to cache.
3284
+ * @returns {Object} Returns the cache instance.
3285
+ */
3286
+ function setCacheAdd$1(value) {
3287
+ this.__data__.set(value, HASH_UNDEFINED);
3288
+ return this;
3289
+ }
3290
+ var _setCacheAdd = setCacheAdd$1;
3291
+
3292
+ /**
3293
+ * Checks if `value` is in the array cache.
3294
+ *
3295
+ * @private
3296
+ * @name has
3297
+ * @memberOf SetCache
3298
+ * @param {*} value The value to search for.
3299
+ * @returns {number} Returns `true` if `value` is found, else `false`.
3300
+ */
3301
+
3302
+ function setCacheHas$1(value) {
3303
+ return this.__data__.has(value);
3304
+ }
3305
+ var _setCacheHas = setCacheHas$1;
3306
+
3307
+ var MapCache = _MapCache,
3308
+ setCacheAdd = _setCacheAdd,
3309
+ setCacheHas = _setCacheHas;
3310
+
3311
+ /**
3312
+ *
3313
+ * Creates an array cache object to store unique values.
3314
+ *
3315
+ * @private
3316
+ * @constructor
3317
+ * @param {Array} [values] The values to cache.
3318
+ */
3319
+ function SetCache$1(values) {
3320
+ var index = -1,
3321
+ length = values == null ? 0 : values.length;
3322
+ this.__data__ = new MapCache();
3323
+ while (++index < length) {
3324
+ this.add(values[index]);
3325
+ }
3326
+ }
3327
+
3328
+ // Add methods to `SetCache`.
3329
+ SetCache$1.prototype.add = SetCache$1.prototype.push = setCacheAdd;
3330
+ SetCache$1.prototype.has = setCacheHas;
3331
+ var _SetCache = SetCache$1;
3332
+
3333
+ /**
3334
+ * A specialized version of `_.some` for arrays without support for iteratee
3335
+ * shorthands.
3336
+ *
3337
+ * @private
3338
+ * @param {Array} [array] The array to iterate over.
3339
+ * @param {Function} predicate The function invoked per iteration.
3340
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
3341
+ * else `false`.
3342
+ */
3343
+
3344
+ function arraySome$1(array, predicate) {
3345
+ var index = -1,
3346
+ length = array == null ? 0 : array.length;
3347
+ while (++index < length) {
3348
+ if (predicate(array[index], index, array)) {
3349
+ return true;
3350
+ }
3351
+ }
3352
+ return false;
3353
+ }
3354
+ var _arraySome = arraySome$1;
3355
+
3356
+ /**
3357
+ * Checks if a `cache` value for `key` exists.
3358
+ *
3359
+ * @private
3360
+ * @param {Object} cache The cache to query.
3361
+ * @param {string} key The key of the entry to check.
3362
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3363
+ */
3364
+
3365
+ function cacheHas$1(cache, key) {
3366
+ return cache.has(key);
3367
+ }
3368
+ var _cacheHas = cacheHas$1;
3369
+
3370
+ var SetCache = _SetCache,
3371
+ arraySome = _arraySome,
3372
+ cacheHas = _cacheHas;
3373
+
3374
+ /** Used to compose bitmasks for value comparisons. */
3375
+ var COMPARE_PARTIAL_FLAG$3 = 1,
3376
+ COMPARE_UNORDERED_FLAG$1 = 2;
3377
+
3378
+ /**
3379
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
3380
+ * partial deep comparisons.
3381
+ *
3382
+ * @private
3383
+ * @param {Array} array The array to compare.
3384
+ * @param {Array} other The other array to compare.
3385
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
3386
+ * @param {Function} customizer The function to customize comparisons.
3387
+ * @param {Function} equalFunc The function to determine equivalents of values.
3388
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
3389
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
3390
+ */
3391
+ function equalArrays$2(array, other, bitmask, customizer, equalFunc, stack) {
3392
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,
3393
+ arrLength = array.length,
3394
+ othLength = other.length;
3395
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
3396
+ return false;
3397
+ }
3398
+ // Check that cyclic values are equal.
3399
+ var arrStacked = stack.get(array);
3400
+ var othStacked = stack.get(other);
3401
+ if (arrStacked && othStacked) {
3402
+ return arrStacked == other && othStacked == array;
3403
+ }
3404
+ var index = -1,
3405
+ result = true,
3406
+ seen = bitmask & COMPARE_UNORDERED_FLAG$1 ? new SetCache() : undefined;
3407
+ stack.set(array, other);
3408
+ stack.set(other, array);
3409
+
3410
+ // Ignore non-index properties.
3411
+ while (++index < arrLength) {
3412
+ var arrValue = array[index],
3413
+ othValue = other[index];
3414
+ if (customizer) {
3415
+ var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
3416
+ }
3417
+ if (compared !== undefined) {
3418
+ if (compared) {
3419
+ continue;
3420
+ }
3421
+ result = false;
3422
+ break;
3423
+ }
3424
+ // Recursively compare arrays (susceptible to call stack limits).
3425
+ if (seen) {
3426
+ if (!arraySome(other, function (othValue, othIndex) {
3427
+ if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
3428
+ return seen.push(othIndex);
3429
+ }
3430
+ })) {
3431
+ result = false;
3432
+ break;
3433
+ }
3434
+ } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
3435
+ result = false;
3436
+ break;
3437
+ }
3438
+ }
3439
+ stack['delete'](array);
3440
+ stack['delete'](other);
3441
+ return result;
3442
+ }
3443
+ var _equalArrays = equalArrays$2;
3444
+
3445
+ var root$4 = _root;
3446
+
3447
+ /** Built-in value references. */
3448
+ var Uint8Array$2 = root$4.Uint8Array;
3449
+ var _Uint8Array = Uint8Array$2;
3450
+
3451
+ /**
3452
+ * Converts `map` to its key-value pairs.
3453
+ *
3454
+ * @private
3455
+ * @param {Object} map The map to convert.
3456
+ * @returns {Array} Returns the key-value pairs.
3457
+ */
3458
+
3459
+ function mapToArray$1(map) {
3460
+ var index = -1,
3461
+ result = Array(map.size);
3462
+ map.forEach(function (value, key) {
3463
+ result[++index] = [key, value];
3464
+ });
3465
+ return result;
3466
+ }
3467
+ var _mapToArray = mapToArray$1;
3468
+
3469
+ /**
3470
+ * Converts `set` to an array of its values.
3471
+ *
3472
+ * @private
3473
+ * @param {Object} set The set to convert.
3474
+ * @returns {Array} Returns the values.
3475
+ */
3476
+
3477
+ function setToArray$1(set) {
3478
+ var index = -1,
3479
+ result = Array(set.size);
3480
+ set.forEach(function (value) {
3481
+ result[++index] = value;
3482
+ });
3483
+ return result;
3484
+ }
3485
+ var _setToArray = setToArray$1;
3486
+
3487
+ var Symbol$1 = _Symbol,
3488
+ Uint8Array$1 = _Uint8Array,
3489
+ eq = eq_1,
3490
+ equalArrays$1 = _equalArrays,
3491
+ mapToArray = _mapToArray,
3492
+ setToArray = _setToArray;
3493
+
3494
+ /** Used to compose bitmasks for value comparisons. */
3495
+ var COMPARE_PARTIAL_FLAG$2 = 1,
3496
+ COMPARE_UNORDERED_FLAG = 2;
3497
+
3498
+ /** `Object#toString` result references. */
3499
+ var boolTag$1 = '[object Boolean]',
3500
+ dateTag$1 = '[object Date]',
3501
+ errorTag$1 = '[object Error]',
3502
+ mapTag$2 = '[object Map]',
3503
+ numberTag$1 = '[object Number]',
3504
+ regexpTag$1 = '[object RegExp]',
3505
+ setTag$2 = '[object Set]',
3506
+ stringTag$1 = '[object String]',
3507
+ symbolTag = '[object Symbol]';
3508
+ var arrayBufferTag$1 = '[object ArrayBuffer]',
3509
+ dataViewTag$2 = '[object DataView]';
3510
+
3511
+ /** Used to convert symbols to primitives and strings. */
3512
+ var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined,
3513
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
3514
+
3515
+ /**
3516
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
3517
+ * the same `toStringTag`.
3518
+ *
3519
+ * **Note:** This function only supports comparing values with tags of
3520
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
3521
+ *
3522
+ * @private
3523
+ * @param {Object} object The object to compare.
3524
+ * @param {Object} other The other object to compare.
3525
+ * @param {string} tag The `toStringTag` of the objects to compare.
3526
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
3527
+ * @param {Function} customizer The function to customize comparisons.
3528
+ * @param {Function} equalFunc The function to determine equivalents of values.
3529
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
3530
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
3531
+ */
3532
+ function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack) {
3533
+ switch (tag) {
3534
+ case dataViewTag$2:
3535
+ if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
3536
+ return false;
3537
+ }
3538
+ object = object.buffer;
3539
+ other = other.buffer;
3540
+ case arrayBufferTag$1:
3541
+ if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) {
3542
+ return false;
3543
+ }
3544
+ return true;
3545
+ case boolTag$1:
3546
+ case dateTag$1:
3547
+ case numberTag$1:
3548
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
3549
+ // Invalid dates are coerced to `NaN`.
3550
+ return eq(+object, +other);
3551
+ case errorTag$1:
3552
+ return object.name == other.name && object.message == other.message;
3553
+ case regexpTag$1:
3554
+ case stringTag$1:
3555
+ // Coerce regexes to strings and treat strings, primitives and objects,
3556
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
3557
+ // for more details.
3558
+ return object == other + '';
3559
+ case mapTag$2:
3560
+ var convert = mapToArray;
3561
+ case setTag$2:
3562
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
3563
+ convert || (convert = setToArray);
3564
+ if (object.size != other.size && !isPartial) {
3565
+ return false;
3566
+ }
3567
+ // Assume cyclic values are equal.
3568
+ var stacked = stack.get(object);
3569
+ if (stacked) {
3570
+ return stacked == other;
3571
+ }
3572
+ bitmask |= COMPARE_UNORDERED_FLAG;
3573
+
3574
+ // Recursively compare objects (susceptible to call stack limits).
3575
+ stack.set(object, other);
3576
+ var result = equalArrays$1(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
3577
+ stack['delete'](object);
3578
+ return result;
3579
+ case symbolTag:
3580
+ if (symbolValueOf) {
3581
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
3582
+ }
3583
+ }
3584
+ return false;
3585
+ }
3586
+ var _equalByTag = equalByTag$1;
3587
+
3588
+ /**
3589
+ * Appends the elements of `values` to `array`.
3590
+ *
3591
+ * @private
3592
+ * @param {Array} array The array to modify.
3593
+ * @param {Array} values The values to append.
3594
+ * @returns {Array} Returns `array`.
3595
+ */
3596
+
3597
+ function arrayPush$1(array, values) {
3598
+ var index = -1,
3599
+ length = values.length,
3600
+ offset = array.length;
3601
+ while (++index < length) {
3602
+ array[offset + index] = values[index];
3603
+ }
3604
+ return array;
3605
+ }
3606
+ var _arrayPush = arrayPush$1;
3607
+
3608
+ /**
3609
+ * Checks if `value` is classified as an `Array` object.
3610
+ *
3611
+ * @static
3612
+ * @memberOf _
3613
+ * @since 0.1.0
3614
+ * @category Lang
3615
+ * @param {*} value The value to check.
3616
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
3617
+ * @example
3618
+ *
3619
+ * _.isArray([1, 2, 3]);
3620
+ * // => true
3621
+ *
3622
+ * _.isArray(document.body.children);
3623
+ * // => false
3624
+ *
3625
+ * _.isArray('abc');
3626
+ * // => false
3627
+ *
3628
+ * _.isArray(_.noop);
3629
+ * // => false
3630
+ */
3631
+
3632
+ var isArray$7 = Array.isArray;
3633
+ var isArray_1 = isArray$7;
3634
+
3635
+ var arrayPush = _arrayPush,
3636
+ isArray$6 = isArray_1;
3637
+
3638
+ /**
3639
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
3640
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
3641
+ * symbols of `object`.
3642
+ *
3643
+ * @private
3644
+ * @param {Object} object The object to query.
3645
+ * @param {Function} keysFunc The function to get the keys of `object`.
3646
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
3647
+ * @returns {Array} Returns the array of property names and symbols.
3648
+ */
3649
+ function baseGetAllKeys$1(object, keysFunc, symbolsFunc) {
3650
+ var result = keysFunc(object);
3651
+ return isArray$6(object) ? result : arrayPush(result, symbolsFunc(object));
3652
+ }
3653
+ var _baseGetAllKeys = baseGetAllKeys$1;
3654
+
3655
+ /**
3656
+ * A specialized version of `_.filter` for arrays without support for
3657
+ * iteratee shorthands.
3658
+ *
3659
+ * @private
3660
+ * @param {Array} [array] The array to iterate over.
3661
+ * @param {Function} predicate The function invoked per iteration.
3662
+ * @returns {Array} Returns the new filtered array.
3663
+ */
3664
+
3665
+ function arrayFilter$1(array, predicate) {
3666
+ var index = -1,
3667
+ length = array == null ? 0 : array.length,
3668
+ resIndex = 0,
3669
+ result = [];
3670
+ while (++index < length) {
3671
+ var value = array[index];
3672
+ if (predicate(value, index, array)) {
3673
+ result[resIndex++] = value;
3674
+ }
3675
+ }
3676
+ return result;
3677
+ }
3678
+ var _arrayFilter = arrayFilter$1;
3679
+
3680
+ /**
3681
+ * This method returns a new empty array.
3682
+ *
3683
+ * @static
3684
+ * @memberOf _
3685
+ * @since 4.13.0
3686
+ * @category Util
3687
+ * @returns {Array} Returns the new empty array.
3688
+ * @example
3689
+ *
3690
+ * var arrays = _.times(2, _.stubArray);
3691
+ *
3692
+ * console.log(arrays);
3693
+ * // => [[], []]
3694
+ *
3695
+ * console.log(arrays[0] === arrays[1]);
3696
+ * // => false
3697
+ */
3698
+
3699
+ function stubArray$1() {
3700
+ return [];
3701
+ }
3702
+ var stubArray_1 = stubArray$1;
3703
+
3704
+ var arrayFilter = _arrayFilter,
3705
+ stubArray = stubArray_1;
3706
+
3707
+ /** Used for built-in method references. */
3708
+ var objectProto$6 = Object.prototype;
3709
+
3710
+ /** Built-in value references. */
3711
+ var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
3712
+
3713
+ /* Built-in method references for those with the same name as other `lodash` methods. */
3714
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
3715
+
3716
+ /**
3717
+ * Creates an array of the own enumerable symbols of `object`.
3718
+ *
3719
+ * @private
3720
+ * @param {Object} object The object to query.
3721
+ * @returns {Array} Returns the array of symbols.
3722
+ */
3723
+ var getSymbols$1 = !nativeGetSymbols ? stubArray : function (object) {
3724
+ if (object == null) {
3725
+ return [];
3726
+ }
3727
+ object = Object(object);
3728
+ return arrayFilter(nativeGetSymbols(object), function (symbol) {
3729
+ return propertyIsEnumerable$1.call(object, symbol);
3730
+ });
3731
+ };
3732
+ var _getSymbols = getSymbols$1;
3733
+
3734
+ /**
3735
+ * The base implementation of `_.times` without support for iteratee shorthands
3736
+ * or max array length checks.
3737
+ *
3738
+ * @private
3739
+ * @param {number} n The number of times to invoke `iteratee`.
3740
+ * @param {Function} iteratee The function invoked per iteration.
3741
+ * @returns {Array} Returns the array of results.
3742
+ */
3743
+
3744
+ function baseTimes$1(n, iteratee) {
3745
+ var index = -1,
3746
+ result = Array(n);
3747
+ while (++index < n) {
3748
+ result[index] = iteratee(index);
3749
+ }
3750
+ return result;
3751
+ }
3752
+ var _baseTimes = baseTimes$1;
3753
+
3754
+ /**
3755
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
3756
+ * and has a `typeof` result of "object".
3757
+ *
3758
+ * @static
3759
+ * @memberOf _
3760
+ * @since 4.0.0
3761
+ * @category Lang
3762
+ * @param {*} value The value to check.
3763
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
3764
+ * @example
3765
+ *
3766
+ * _.isObjectLike({});
3767
+ * // => true
3768
+ *
3769
+ * _.isObjectLike([1, 2, 3]);
3770
+ * // => true
3771
+ *
3772
+ * _.isObjectLike(_.noop);
3773
+ * // => false
3774
+ *
3775
+ * _.isObjectLike(null);
3776
+ * // => false
3777
+ */
3778
+
3779
+ function isObjectLike$4(value) {
3780
+ return value != null && typeof value == 'object';
3781
+ }
3782
+ var isObjectLike_1 = isObjectLike$4;
3783
+
3784
+ var baseGetTag$2 = _baseGetTag,
3785
+ isObjectLike$3 = isObjectLike_1;
3786
+
3787
+ /** `Object#toString` result references. */
3788
+ var argsTag$2 = '[object Arguments]';
3789
+
3790
+ /**
3791
+ * The base implementation of `_.isArguments`.
3792
+ *
3793
+ * @private
3794
+ * @param {*} value The value to check.
3795
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
3796
+ */
3797
+ function baseIsArguments$1(value) {
3798
+ return isObjectLike$3(value) && baseGetTag$2(value) == argsTag$2;
3799
+ }
3800
+ var _baseIsArguments = baseIsArguments$1;
3801
+
3802
+ var baseIsArguments = _baseIsArguments,
3803
+ isObjectLike$2 = isObjectLike_1;
3804
+
3805
+ /** Used for built-in method references. */
3806
+ var objectProto$5 = Object.prototype;
3807
+
3808
+ /** Used to check objects for own properties. */
3809
+ var hasOwnProperty$5 = objectProto$5.hasOwnProperty;
3810
+
3811
+ /** Built-in value references. */
3812
+ var propertyIsEnumerable = objectProto$5.propertyIsEnumerable;
3813
+
3814
+ /**
3815
+ * Checks if `value` is likely an `arguments` object.
3816
+ *
3817
+ * @static
3818
+ * @memberOf _
3819
+ * @since 0.1.0
3820
+ * @category Lang
3821
+ * @param {*} value The value to check.
3822
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
3823
+ * else `false`.
3824
+ * @example
3825
+ *
3826
+ * _.isArguments(function() { return arguments; }());
3827
+ * // => true
3828
+ *
3829
+ * _.isArguments([1, 2, 3]);
3830
+ * // => false
3831
+ */
3832
+ var isArguments$1 = baseIsArguments(function () {
3833
+ return arguments;
3834
+ }()) ? baseIsArguments : function (value) {
3835
+ return isObjectLike$2(value) && hasOwnProperty$5.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
3836
+ };
3837
+ var isArguments_1 = isArguments$1;
3838
+
3839
+ var isBuffer$2 = {exports: {}};
3840
+
3841
+ /**
3842
+ * This method returns `false`.
3843
+ *
3844
+ * @static
3845
+ * @memberOf _
3846
+ * @since 4.13.0
3847
+ * @category Util
3848
+ * @returns {boolean} Returns `false`.
3849
+ * @example
3850
+ *
3851
+ * _.times(2, _.stubFalse);
3852
+ * // => [false, false]
3853
+ */
3854
+
3855
+ function stubFalse() {
3856
+ return false;
3857
+ }
3858
+ var stubFalse_1 = stubFalse;
3859
+
3860
+ isBuffer$2.exports;
3861
+
3862
+ (function (module, exports) {
3863
+ var root = _root,
3864
+ stubFalse = stubFalse_1;
3865
+
3866
+ /** Detect free variable `exports`. */
3867
+ var freeExports = exports && !exports.nodeType && exports;
3868
+
3869
+ /** Detect free variable `module`. */
3870
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
3871
+
3872
+ /** Detect the popular CommonJS extension `module.exports`. */
3873
+ var moduleExports = freeModule && freeModule.exports === freeExports;
3874
+
3875
+ /** Built-in value references. */
3876
+ var Buffer = moduleExports ? root.Buffer : undefined;
3877
+
3878
+ /* Built-in method references for those with the same name as other `lodash` methods. */
3879
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
3880
+
3881
+ /**
3882
+ * Checks if `value` is a buffer.
3883
+ *
3884
+ * @static
3885
+ * @memberOf _
3886
+ * @since 4.3.0
3887
+ * @category Lang
3888
+ * @param {*} value The value to check.
3889
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
3890
+ * @example
3891
+ *
3892
+ * _.isBuffer(new Buffer(2));
3893
+ * // => true
3894
+ *
3895
+ * _.isBuffer(new Uint8Array(2));
3896
+ * // => false
3897
+ */
3898
+ var isBuffer = nativeIsBuffer || stubFalse;
3899
+ module.exports = isBuffer;
3900
+ } (isBuffer$2, isBuffer$2.exports));
3901
+
3902
+ var isBufferExports = isBuffer$2.exports;
3903
+
3904
+ /** Used as references for various `Number` constants. */
3905
+
3906
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
3907
+
3908
+ /** Used to detect unsigned integer values. */
3909
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
3910
+
3911
+ /**
3912
+ * Checks if `value` is a valid array-like index.
3913
+ *
3914
+ * @private
3915
+ * @param {*} value The value to check.
3916
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
3917
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
3918
+ */
3919
+ function isIndex$1(value, length) {
3920
+ var type = typeof value;
3921
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
3922
+ return !!length && (type == 'number' || type != 'symbol' && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
3923
+ }
3924
+ var _isIndex = isIndex$1;
3925
+
3926
+ /** Used as references for various `Number` constants. */
3927
+
3928
+ var MAX_SAFE_INTEGER = 9007199254740991;
3929
+
3930
+ /**
3931
+ * Checks if `value` is a valid array-like length.
3932
+ *
3933
+ * **Note:** This method is loosely based on
3934
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
3935
+ *
3936
+ * @static
3937
+ * @memberOf _
3938
+ * @since 4.0.0
3939
+ * @category Lang
3940
+ * @param {*} value The value to check.
3941
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
3942
+ * @example
3943
+ *
3944
+ * _.isLength(3);
3945
+ * // => true
3946
+ *
3947
+ * _.isLength(Number.MIN_VALUE);
3948
+ * // => false
3949
+ *
3950
+ * _.isLength(Infinity);
3951
+ * // => false
3952
+ *
3953
+ * _.isLength('3');
3954
+ * // => false
3955
+ */
3956
+ function isLength$2(value) {
3957
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
3958
+ }
3959
+ var isLength_1 = isLength$2;
3960
+
3961
+ var baseGetTag$1 = _baseGetTag,
3962
+ isLength$1 = isLength_1,
3963
+ isObjectLike$1 = isObjectLike_1;
3964
+
3965
+ /** `Object#toString` result references. */
3966
+ var argsTag$1 = '[object Arguments]',
3967
+ arrayTag$1 = '[object Array]',
3968
+ boolTag = '[object Boolean]',
3969
+ dateTag = '[object Date]',
3970
+ errorTag = '[object Error]',
3971
+ funcTag = '[object Function]',
3972
+ mapTag$1 = '[object Map]',
3973
+ numberTag = '[object Number]',
3974
+ objectTag$2 = '[object Object]',
3975
+ regexpTag = '[object RegExp]',
3976
+ setTag$1 = '[object Set]',
3977
+ stringTag = '[object String]',
3978
+ weakMapTag$1 = '[object WeakMap]';
3979
+ var arrayBufferTag = '[object ArrayBuffer]',
3980
+ dataViewTag$1 = '[object DataView]',
3981
+ float32Tag = '[object Float32Array]',
3982
+ float64Tag = '[object Float64Array]',
3983
+ int8Tag = '[object Int8Array]',
3984
+ int16Tag = '[object Int16Array]',
3985
+ int32Tag = '[object Int32Array]',
3986
+ uint8Tag = '[object Uint8Array]',
3987
+ uint8ClampedTag = '[object Uint8ClampedArray]',
3988
+ uint16Tag = '[object Uint16Array]',
3989
+ uint32Tag = '[object Uint32Array]';
3990
+
3991
+ /** Used to identify `toStringTag` values of typed arrays. */
3992
+ var typedArrayTags = {};
3993
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
3994
+ typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag$1] = typedArrayTags[numberTag] = typedArrayTags[objectTag$2] = typedArrayTags[regexpTag] = typedArrayTags[setTag$1] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag$1] = false;
3995
+
3996
+ /**
3997
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
3998
+ *
3999
+ * @private
4000
+ * @param {*} value The value to check.
4001
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
4002
+ */
4003
+ function baseIsTypedArray$1(value) {
4004
+ return isObjectLike$1(value) && isLength$1(value.length) && !!typedArrayTags[baseGetTag$1(value)];
4005
+ }
4006
+ var _baseIsTypedArray = baseIsTypedArray$1;
4007
+
4008
+ /**
4009
+ * The base implementation of `_.unary` without support for storing metadata.
4010
+ *
4011
+ * @private
4012
+ * @param {Function} func The function to cap arguments for.
4013
+ * @returns {Function} Returns the new capped function.
4014
+ */
4015
+
4016
+ function baseUnary$1(func) {
4017
+ return function (value) {
4018
+ return func(value);
4019
+ };
4020
+ }
4021
+ var _baseUnary = baseUnary$1;
4022
+
4023
+ var _nodeUtil = {exports: {}};
4024
+
4025
+ _nodeUtil.exports;
4026
+
4027
+ (function (module, exports) {
4028
+ var freeGlobal = _freeGlobal;
4029
+
4030
+ /** Detect free variable `exports`. */
4031
+ var freeExports = exports && !exports.nodeType && exports;
4032
+
4033
+ /** Detect free variable `module`. */
4034
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
4035
+
4036
+ /** Detect the popular CommonJS extension `module.exports`. */
4037
+ var moduleExports = freeModule && freeModule.exports === freeExports;
4038
+
4039
+ /** Detect free variable `process` from Node.js. */
4040
+ var freeProcess = moduleExports && freeGlobal.process;
4041
+
4042
+ /** Used to access faster Node.js helpers. */
4043
+ var nodeUtil = function () {
4044
+ try {
4045
+ // Use `util.types` for Node.js 10+.
4046
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
4047
+ if (types) {
4048
+ return types;
4049
+ }
4050
+
4051
+ // Legacy `process.binding('util')` for Node.js < 10.
4052
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
4053
+ } catch (e) {}
4054
+ }();
4055
+ module.exports = nodeUtil;
4056
+ } (_nodeUtil, _nodeUtil.exports));
4057
+
4058
+ var _nodeUtilExports = _nodeUtil.exports;
4059
+
4060
+ var baseIsTypedArray = _baseIsTypedArray,
4061
+ baseUnary = _baseUnary,
4062
+ nodeUtil = _nodeUtilExports;
4063
+
4064
+ /* Node.js helper references. */
4065
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
4066
+
4067
+ /**
4068
+ * Checks if `value` is classified as a typed array.
4069
+ *
4070
+ * @static
4071
+ * @memberOf _
4072
+ * @since 3.0.0
4073
+ * @category Lang
4074
+ * @param {*} value The value to check.
4075
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
4076
+ * @example
4077
+ *
4078
+ * _.isTypedArray(new Uint8Array);
4079
+ * // => true
4080
+ *
4081
+ * _.isTypedArray([]);
4082
+ * // => false
4083
+ */
4084
+ var isTypedArray$2 = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
4085
+ var isTypedArray_1 = isTypedArray$2;
4086
+
4087
+ var baseTimes = _baseTimes,
4088
+ isArguments = isArguments_1,
4089
+ isArray$5 = isArray_1,
4090
+ isBuffer$1 = isBufferExports,
4091
+ isIndex = _isIndex,
4092
+ isTypedArray$1 = isTypedArray_1;
4093
+
4094
+ /** Used for built-in method references. */
4095
+ var objectProto$4 = Object.prototype;
4096
+
4097
+ /** Used to check objects for own properties. */
4098
+ var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
4099
+
4100
+ /**
4101
+ * Creates an array of the enumerable property names of the array-like `value`.
4102
+ *
4103
+ * @private
4104
+ * @param {*} value The value to query.
4105
+ * @param {boolean} inherited Specify returning inherited property names.
4106
+ * @returns {Array} Returns the array of property names.
4107
+ */
4108
+ function arrayLikeKeys$1(value, inherited) {
4109
+ var isArr = isArray$5(value),
4110
+ isArg = !isArr && isArguments(value),
4111
+ isBuff = !isArr && !isArg && isBuffer$1(value),
4112
+ isType = !isArr && !isArg && !isBuff && isTypedArray$1(value),
4113
+ skipIndexes = isArr || isArg || isBuff || isType,
4114
+ result = skipIndexes ? baseTimes(value.length, String) : [],
4115
+ length = result.length;
4116
+ for (var key in value) {
4117
+ if ((inherited || hasOwnProperty$4.call(value, key)) && !(skipIndexes && (
4118
+ // Safari 9 has enumerable `arguments.length` in strict mode.
4119
+ key == 'length' ||
4120
+ // Node.js 0.10 has enumerable non-index properties on buffers.
4121
+ isBuff && (key == 'offset' || key == 'parent') ||
4122
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
4123
+ isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') ||
4124
+ // Skip index properties.
4125
+ isIndex(key, length)))) {
4126
+ result.push(key);
4127
+ }
4128
+ }
4129
+ return result;
4130
+ }
4131
+ var _arrayLikeKeys = arrayLikeKeys$1;
4132
+
4133
+ /** Used for built-in method references. */
4134
+
4135
+ var objectProto$3 = Object.prototype;
4136
+
4137
+ /**
4138
+ * Checks if `value` is likely a prototype object.
4139
+ *
4140
+ * @private
4141
+ * @param {*} value The value to check.
4142
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
4143
+ */
4144
+ function isPrototype$1(value) {
4145
+ var Ctor = value && value.constructor,
4146
+ proto = typeof Ctor == 'function' && Ctor.prototype || objectProto$3;
4147
+ return value === proto;
4148
+ }
4149
+ var _isPrototype = isPrototype$1;
4150
+
4151
+ /**
4152
+ * Creates a unary function that invokes `func` with its argument transformed.
4153
+ *
4154
+ * @private
4155
+ * @param {Function} func The function to wrap.
4156
+ * @param {Function} transform The argument transform.
4157
+ * @returns {Function} Returns the new function.
4158
+ */
4159
+
4160
+ function overArg$1(func, transform) {
4161
+ return function (arg) {
4162
+ return func(transform(arg));
4163
+ };
4164
+ }
4165
+ var _overArg = overArg$1;
4166
+
4167
+ var overArg = _overArg;
4168
+
4169
+ /* Built-in method references for those with the same name as other `lodash` methods. */
4170
+ var nativeKeys$1 = overArg(Object.keys, Object);
4171
+ var _nativeKeys = nativeKeys$1;
4172
+
4173
+ var isPrototype = _isPrototype,
4174
+ nativeKeys = _nativeKeys;
4175
+
4176
+ /** Used for built-in method references. */
4177
+ var objectProto$2 = Object.prototype;
4178
+
4179
+ /** Used to check objects for own properties. */
4180
+ var hasOwnProperty$3 = objectProto$2.hasOwnProperty;
4181
+
4182
+ /**
4183
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
4184
+ *
4185
+ * @private
4186
+ * @param {Object} object The object to query.
4187
+ * @returns {Array} Returns the array of property names.
4188
+ */
4189
+ function baseKeys$1(object) {
4190
+ if (!isPrototype(object)) {
4191
+ return nativeKeys(object);
4192
+ }
4193
+ var result = [];
4194
+ for (var key in Object(object)) {
4195
+ if (hasOwnProperty$3.call(object, key) && key != 'constructor') {
4196
+ result.push(key);
4197
+ }
4198
+ }
4199
+ return result;
4200
+ }
4201
+ var _baseKeys = baseKeys$1;
4202
+
4203
+ var isFunction$1 = isFunction_1,
4204
+ isLength = isLength_1;
4205
+
4206
+ /**
4207
+ * Checks if `value` is array-like. A value is considered array-like if it's
4208
+ * not a function and has a `value.length` that's an integer greater than or
4209
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
4210
+ *
4211
+ * @static
4212
+ * @memberOf _
4213
+ * @since 4.0.0
4214
+ * @category Lang
4215
+ * @param {*} value The value to check.
4216
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
4217
+ * @example
4218
+ *
4219
+ * _.isArrayLike([1, 2, 3]);
4220
+ * // => true
4221
+ *
4222
+ * _.isArrayLike(document.body.children);
4223
+ * // => true
4224
+ *
4225
+ * _.isArrayLike('abc');
4226
+ * // => true
4227
+ *
4228
+ * _.isArrayLike(_.noop);
4229
+ * // => false
4230
+ */
4231
+ function isArrayLike$1(value) {
4232
+ return value != null && isLength(value.length) && !isFunction$1(value);
4233
+ }
4234
+ var isArrayLike_1 = isArrayLike$1;
4235
+
4236
+ var arrayLikeKeys = _arrayLikeKeys,
4237
+ baseKeys = _baseKeys,
4238
+ isArrayLike = isArrayLike_1;
4239
+
4240
+ /**
4241
+ * Creates an array of the own enumerable property names of `object`.
4242
+ *
4243
+ * **Note:** Non-object values are coerced to objects. See the
4244
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
4245
+ * for more details.
4246
+ *
4247
+ * @static
4248
+ * @since 0.1.0
4249
+ * @memberOf _
4250
+ * @category Object
4251
+ * @param {Object} object The object to query.
4252
+ * @returns {Array} Returns the array of property names.
4253
+ * @example
4254
+ *
4255
+ * function Foo() {
4256
+ * this.a = 1;
4257
+ * this.b = 2;
4258
+ * }
4259
+ *
4260
+ * Foo.prototype.c = 3;
4261
+ *
4262
+ * _.keys(new Foo);
4263
+ * // => ['a', 'b'] (iteration order is not guaranteed)
4264
+ *
4265
+ * _.keys('hi');
4266
+ * // => ['0', '1']
4267
+ */
4268
+ function keys$2(object) {
4269
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
4270
+ }
4271
+ var keys_1 = keys$2;
4272
+
4273
+ var baseGetAllKeys = _baseGetAllKeys,
4274
+ getSymbols = _getSymbols,
4275
+ keys$1 = keys_1;
4276
+
4277
+ /**
4278
+ * Creates an array of own enumerable property names and symbols of `object`.
4279
+ *
4280
+ * @private
4281
+ * @param {Object} object The object to query.
4282
+ * @returns {Array} Returns the array of property names and symbols.
4283
+ */
4284
+ function getAllKeys$1(object) {
4285
+ return baseGetAllKeys(object, keys$1, getSymbols);
4286
+ }
4287
+ var _getAllKeys = getAllKeys$1;
4288
+
4289
+ var getAllKeys = _getAllKeys;
4290
+
4291
+ /** Used to compose bitmasks for value comparisons. */
4292
+ var COMPARE_PARTIAL_FLAG$1 = 1;
4293
+
4294
+ /** Used for built-in method references. */
4295
+ var objectProto$1 = Object.prototype;
4296
+
4297
+ /** Used to check objects for own properties. */
4298
+ var hasOwnProperty$2 = objectProto$1.hasOwnProperty;
4299
+
4300
+ /**
4301
+ * A specialized version of `baseIsEqualDeep` for objects with support for
4302
+ * partial deep comparisons.
4303
+ *
4304
+ * @private
4305
+ * @param {Object} object The object to compare.
4306
+ * @param {Object} other The other object to compare.
4307
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
4308
+ * @param {Function} customizer The function to customize comparisons.
4309
+ * @param {Function} equalFunc The function to determine equivalents of values.
4310
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
4311
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
4312
+ */
4313
+ function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) {
4314
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1,
4315
+ objProps = getAllKeys(object),
4316
+ objLength = objProps.length,
4317
+ othProps = getAllKeys(other),
4318
+ othLength = othProps.length;
4319
+ if (objLength != othLength && !isPartial) {
4320
+ return false;
4321
+ }
4322
+ var index = objLength;
4323
+ while (index--) {
4324
+ var key = objProps[index];
4325
+ if (!(isPartial ? key in other : hasOwnProperty$2.call(other, key))) {
4326
+ return false;
4327
+ }
4328
+ }
4329
+ // Check that cyclic values are equal.
4330
+ var objStacked = stack.get(object);
4331
+ var othStacked = stack.get(other);
4332
+ if (objStacked && othStacked) {
4333
+ return objStacked == other && othStacked == object;
4334
+ }
4335
+ var result = true;
4336
+ stack.set(object, other);
4337
+ stack.set(other, object);
4338
+ var skipCtor = isPartial;
4339
+ while (++index < objLength) {
4340
+ key = objProps[index];
4341
+ var objValue = object[key],
4342
+ othValue = other[key];
4343
+ if (customizer) {
4344
+ var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
4345
+ }
4346
+ // Recursively compare objects (susceptible to call stack limits).
4347
+ if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
4348
+ result = false;
4349
+ break;
4350
+ }
4351
+ skipCtor || (skipCtor = key == 'constructor');
4352
+ }
4353
+ if (result && !skipCtor) {
4354
+ var objCtor = object.constructor,
4355
+ othCtor = other.constructor;
4356
+
4357
+ // Non `Object` object instances with different constructors are not equal.
4358
+ if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {
4359
+ result = false;
4360
+ }
4361
+ }
4362
+ stack['delete'](object);
4363
+ stack['delete'](other);
4364
+ return result;
4365
+ }
4366
+ var _equalObjects = equalObjects$1;
4367
+
4368
+ var getNative$3 = _getNative,
4369
+ root$3 = _root;
4370
+
4371
+ /* Built-in method references that are verified to be native. */
4372
+ var DataView$1 = getNative$3(root$3, 'DataView');
4373
+ var _DataView = DataView$1;
4374
+
4375
+ var getNative$2 = _getNative,
4376
+ root$2 = _root;
4377
+
4378
+ /* Built-in method references that are verified to be native. */
4379
+ var Promise$2 = getNative$2(root$2, 'Promise');
4380
+ var _Promise = Promise$2;
4381
+
4382
+ var getNative$1 = _getNative,
4383
+ root$1 = _root;
4384
+
4385
+ /* Built-in method references that are verified to be native. */
4386
+ var Set$2 = getNative$1(root$1, 'Set');
4387
+ var _Set = Set$2;
4388
+
4389
+ var getNative = _getNative,
4390
+ root = _root;
4391
+
4392
+ /* Built-in method references that are verified to be native. */
4393
+ var WeakMap$2 = getNative(root, 'WeakMap');
4394
+ var _WeakMap = WeakMap$2;
4395
+
4396
+ var DataView = _DataView,
4397
+ Map$1 = _Map,
4398
+ Promise$1 = _Promise,
4399
+ Set$1 = _Set,
4400
+ WeakMap$1 = _WeakMap,
4401
+ baseGetTag = _baseGetTag,
4402
+ toSource = _toSource;
4403
+
4404
+ /** `Object#toString` result references. */
4405
+ var mapTag = '[object Map]',
4406
+ objectTag$1 = '[object Object]',
4407
+ promiseTag = '[object Promise]',
4408
+ setTag = '[object Set]',
4409
+ weakMapTag = '[object WeakMap]';
4410
+ var dataViewTag = '[object DataView]';
4411
+
4412
+ /** Used to detect maps, sets, and weakmaps. */
4413
+ var dataViewCtorString = toSource(DataView),
4414
+ mapCtorString = toSource(Map$1),
4415
+ promiseCtorString = toSource(Promise$1),
4416
+ setCtorString = toSource(Set$1),
4417
+ weakMapCtorString = toSource(WeakMap$1);
4418
+
4419
+ /**
4420
+ * Gets the `toStringTag` of `value`.
4421
+ *
4422
+ * @private
4423
+ * @param {*} value The value to query.
4424
+ * @returns {string} Returns the `toStringTag`.
4425
+ */
4426
+ var getTag$1 = baseGetTag;
4427
+
4428
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
4429
+ if (DataView && getTag$1(new DataView(new ArrayBuffer(1))) != dataViewTag || Map$1 && getTag$1(new Map$1()) != mapTag || Promise$1 && getTag$1(Promise$1.resolve()) != promiseTag || Set$1 && getTag$1(new Set$1()) != setTag || WeakMap$1 && getTag$1(new WeakMap$1()) != weakMapTag) {
4430
+ getTag$1 = function (value) {
4431
+ var result = baseGetTag(value),
4432
+ Ctor = result == objectTag$1 ? value.constructor : undefined,
4433
+ ctorString = Ctor ? toSource(Ctor) : '';
4434
+ if (ctorString) {
4435
+ switch (ctorString) {
4436
+ case dataViewCtorString:
4437
+ return dataViewTag;
4438
+ case mapCtorString:
4439
+ return mapTag;
4440
+ case promiseCtorString:
4441
+ return promiseTag;
4442
+ case setCtorString:
4443
+ return setTag;
4444
+ case weakMapCtorString:
4445
+ return weakMapTag;
4446
+ }
4447
+ }
4448
+ return result;
4449
+ };
4450
+ }
4451
+ var _getTag = getTag$1;
4452
+
4453
+ var Stack$1 = _Stack,
4454
+ equalArrays = _equalArrays,
4455
+ equalByTag = _equalByTag,
4456
+ equalObjects = _equalObjects,
4457
+ getTag = _getTag,
4458
+ isArray$4 = isArray_1,
4459
+ isBuffer = isBufferExports,
4460
+ isTypedArray = isTypedArray_1;
4461
+
4462
+ /** Used to compose bitmasks for value comparisons. */
4463
+ var COMPARE_PARTIAL_FLAG = 1;
4464
+
4465
+ /** `Object#toString` result references. */
4466
+ var argsTag = '[object Arguments]',
4467
+ arrayTag = '[object Array]',
4468
+ objectTag = '[object Object]';
4469
+
4470
+ /** Used for built-in method references. */
4471
+ var objectProto = Object.prototype;
4472
+
4473
+ /** Used to check objects for own properties. */
4474
+ var hasOwnProperty$1 = objectProto.hasOwnProperty;
4475
+
4476
+ /**
4477
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
4478
+ * deep comparisons and tracks traversed objects enabling objects with circular
4479
+ * references to be compared.
4480
+ *
4481
+ * @private
4482
+ * @param {Object} object The object to compare.
4483
+ * @param {Object} other The other object to compare.
4484
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
4485
+ * @param {Function} customizer The function to customize comparisons.
4486
+ * @param {Function} equalFunc The function to determine equivalents of values.
4487
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
4488
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
4489
+ */
4490
+ function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack) {
4491
+ var objIsArr = isArray$4(object),
4492
+ othIsArr = isArray$4(other),
4493
+ objTag = objIsArr ? arrayTag : getTag(object),
4494
+ othTag = othIsArr ? arrayTag : getTag(other);
4495
+ objTag = objTag == argsTag ? objectTag : objTag;
4496
+ othTag = othTag == argsTag ? objectTag : othTag;
4497
+ var objIsObj = objTag == objectTag,
4498
+ othIsObj = othTag == objectTag,
4499
+ isSameTag = objTag == othTag;
4500
+ if (isSameTag && isBuffer(object)) {
4501
+ if (!isBuffer(other)) {
4502
+ return false;
4503
+ }
4504
+ objIsArr = true;
4505
+ objIsObj = false;
4506
+ }
4507
+ if (isSameTag && !objIsObj) {
4508
+ stack || (stack = new Stack$1());
4509
+ return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
4510
+ }
4511
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
4512
+ var objIsWrapped = objIsObj && hasOwnProperty$1.call(object, '__wrapped__'),
4513
+ othIsWrapped = othIsObj && hasOwnProperty$1.call(other, '__wrapped__');
4514
+ if (objIsWrapped || othIsWrapped) {
4515
+ var objUnwrapped = objIsWrapped ? object.value() : object,
4516
+ othUnwrapped = othIsWrapped ? other.value() : other;
4517
+ stack || (stack = new Stack$1());
4518
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
4519
+ }
4520
+ }
4521
+ if (!isSameTag) {
4522
+ return false;
4523
+ }
4524
+ stack || (stack = new Stack$1());
4525
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
4526
+ }
4527
+ var _baseIsEqualDeep = baseIsEqualDeep$1;
4528
+
4529
+ var baseIsEqualDeep = _baseIsEqualDeep,
4530
+ isObjectLike = isObjectLike_1;
4531
+
4532
+ /**
4533
+ * The base implementation of `_.isEqual` which supports partial comparisons
4534
+ * and tracks traversed objects.
4535
+ *
4536
+ * @private
4537
+ * @param {*} value The value to compare.
4538
+ * @param {*} other The other value to compare.
4539
+ * @param {boolean} bitmask The bitmask flags.
4540
+ * 1 - Unordered comparison
4541
+ * 2 - Partial comparison
4542
+ * @param {Function} [customizer] The function to customize comparisons.
4543
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
4544
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
4545
+ */
4546
+ function baseIsEqual$1(value, other, bitmask, customizer, stack) {
4547
+ if (value === other) {
4548
+ return true;
4549
+ }
4550
+ if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
4551
+ return value !== value && other !== other;
4552
+ }
4553
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual$1, stack);
4554
+ }
4555
+ var _baseIsEqual = baseIsEqual$1;
4556
+
4557
+ var baseIsEqual = _baseIsEqual;
4558
+
4559
+ /**
4560
+ * Performs a deep comparison between two values to determine if they are
4561
+ * equivalent.
4562
+ *
4563
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
4564
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
4565
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
4566
+ * by their own, not inherited, enumerable properties. Functions and DOM
4567
+ * nodes are compared by strict equality, i.e. `===`.
4568
+ *
4569
+ * @static
4570
+ * @memberOf _
4571
+ * @since 0.1.0
4572
+ * @category Lang
4573
+ * @param {*} value The value to compare.
4574
+ * @param {*} other The other value to compare.
4575
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
4576
+ * @example
4577
+ *
4578
+ * var object = { 'a': 1 };
4579
+ * var other = { 'a': 1 };
4580
+ *
4581
+ * _.isEqual(object, other);
4582
+ * // => true
4583
+ *
4584
+ * object === other;
4585
+ * // => false
4586
+ */
4587
+ function isEqual(value, other) {
4588
+ return baseIsEqual(value, other);
4589
+ }
4590
+ var isEqual_1 = isEqual;
4591
+
4592
+ var isEqual$1 = /*@__PURE__*/getDefaultExportFromCjs(isEqual_1);
4593
+
2335
4594
  var HOOKS = ["onChange", "onClose", "onDayCreate", "onDestroy", "onKeyDown", "onMonthChange", "onOpen", "onParseConfig", "onReady", "onValueUpdate", "onYearChange", "onPreCalendarPosition"];
2336
4595
  var defaults$2 = {
2337
4596
  _disable: [],
@@ -51424,39 +53683,58 @@
51424
53683
 
51425
53684
  // transforms the provided options into a normalized format, trimming invalid options
51426
53685
  function normalizeOptionsData(optionsData) {
51427
- return optionsData.filter(_isOptionSomething).map(v => _normalizeOptionsData(v)).filter(v => v);
53686
+ return optionsData.filter(_isAllowedValue).map(_normalizeOption).filter(o => !isNil$1(o));
51428
53687
  }
51429
- function _normalizeOptionsData(optionData) {
51430
- if (_isAllowedOption(optionData)) {
51431
- // if a primitive is provided, use it as label and value
53688
+
53689
+ /**
53690
+ * Converts the provided option to a normalized format.
53691
+ * If the option is not valid, null is returned.
53692
+ *
53693
+ * @param {object} option
53694
+ * @param {string} option.label
53695
+ * @param {*} option.value
53696
+ *
53697
+ * @returns
53698
+ */
53699
+ function _normalizeOption(option) {
53700
+ // (1) simple primitive case, use it as both label and value
53701
+ if (_isAllowedPrimitive(option)) {
51432
53702
  return {
51433
- value: optionData,
51434
- label: `${optionData}`
53703
+ value: option,
53704
+ label: `${option}`
51435
53705
  };
51436
53706
  }
51437
- if (typeof optionData === 'object') {
51438
- if (!optionData.label && _isAllowedOption(optionData.value)) {
51439
- // if no label is provided, use the value as label
53707
+ if (isObject$4(option)) {
53708
+ const isValidLabel = _isValidLabel(option.label);
53709
+
53710
+ // (2) no label provided, but value is a simple primitive, use it as label and value
53711
+ if (!isValidLabel && _isAllowedPrimitive(option.value)) {
51440
53712
  return {
51441
- value: optionData.value,
51442
- label: `${optionData.value}`
53713
+ value: option.value,
53714
+ label: `${option.value}`
51443
53715
  };
51444
53716
  }
51445
- if (_isOptionSomething(optionData.value) && _isAllowedOption(optionData.label)) {
51446
- // if both value and label are provided, use them as is, in this scenario, the value may also be an object
51447
- return optionData;
53717
+
53718
+ // (3) both label and value are provided, use them as is
53719
+ if (isValidLabel && _isAllowedValue(option.value)) {
53720
+ return option;
51448
53721
  }
51449
53722
  }
51450
53723
  return null;
51451
53724
  }
51452
- function _isAllowedOption(option) {
51453
- return _isReadableType(option) && _isOptionSomething(option);
53725
+ function _isAllowedPrimitive(value) {
53726
+ const isAllowedPrimitiveType = ['number', 'string', 'boolean'].includes(typeof value);
53727
+ const isValid = value || value === 0 || value === false;
53728
+ return isAllowedPrimitiveType && isValid;
51454
53729
  }
51455
- function _isReadableType(option) {
51456
- return ['number', 'string', 'boolean'].includes(typeof option);
53730
+ function _isValidLabel(label) {
53731
+ return label && isString$4(label);
51457
53732
  }
51458
- function _isOptionSomething(option) {
51459
- return option || option === 0 || option === false;
53733
+ function _isAllowedValue(value) {
53734
+ if (isObject$4(value)) {
53735
+ return Object.keys(value).length > 0;
53736
+ }
53737
+ return _isAllowedPrimitive(value);
51460
53738
  }
51461
53739
  function createEmptyOptions(options = {}) {
51462
53740
  const defaults = {};
@@ -51549,29 +53827,6 @@
51549
53827
  error: undefined,
51550
53828
  loadState: LOAD_STATES.LOADED
51551
53829
  });
51552
- function useCleanupMultiSelectValues(props) {
51553
- const {
51554
- field,
51555
- options,
51556
- loadState,
51557
- onChange,
51558
- values
51559
- } = props;
51560
-
51561
- // Ensures that the values are always a subset of the possible options
51562
- y(() => {
51563
- if (loadState !== LOAD_STATES.LOADED) {
51564
- return;
51565
- }
51566
- const hasValuesNotInOptions = values.some(v => !options.map(o => o.value).includes(v));
51567
- if (hasValuesNotInOptions) {
51568
- onChange({
51569
- field,
51570
- value: values.filter(v => options.map(o => o.value).includes(v))
51571
- });
51572
- }
51573
- }, [field, options, onChange, JSON.stringify(values), loadState]);
51574
- }
51575
53830
  const ENTER_KEYDOWN_EVENT = new KeyboardEvent('keydown', {
51576
53831
  code: 'Enter',
51577
53832
  key: 'Enter',
@@ -51746,6 +54001,12 @@
51746
54001
  if (subtype === DATETIME_SUBTYPES.DATETIME && (isInvalidDateString(value) || !isDateTimeInputInformationSufficient(value))) return null;
51747
54002
  return value;
51748
54003
  }
54004
+ function hasEqualValue(value, array) {
54005
+ if (!Array.isArray(array)) {
54006
+ return false;
54007
+ }
54008
+ return array.some(element => isEqual$1(value, element));
54009
+ }
51749
54010
  function sanitizeSingleSelectValue(options) {
51750
54011
  const {
51751
54012
  formField,
@@ -51754,7 +54015,7 @@
51754
54015
  } = options;
51755
54016
  try {
51756
54017
  const validValues = normalizeOptionsData(getOptionsData(formField, data)).map(v => v.value);
51757
- return validValues.includes(value) ? value : null;
54018
+ return hasEqualValue(value, validValues) ? value : null;
51758
54019
  } catch (error) {
51759
54020
  // use default value in case of formatting error
51760
54021
  // TODO(@Skaiir): log a warning when this happens - https://github.com/bpmn-io/form-js/issues/289
@@ -51769,13 +54030,37 @@
51769
54030
  } = options;
51770
54031
  try {
51771
54032
  const validValues = normalizeOptionsData(getOptionsData(formField, data)).map(v => v.value);
51772
- return value.filter(v => validValues.includes(v));
54033
+ return value.filter(v => hasEqualValue(v, validValues));
51773
54034
  } catch (error) {
51774
54035
  // use default value in case of formatting error
51775
54036
  // TODO(@Skaiir): log a warning when this happens - https://github.com/bpmn-io/form-js/issues/289
51776
54037
  return [];
51777
54038
  }
51778
54039
  }
54040
+ function useCleanupMultiSelectValues(props) {
54041
+ const {
54042
+ field,
54043
+ options,
54044
+ loadState,
54045
+ onChange,
54046
+ values
54047
+ } = props;
54048
+
54049
+ // Ensures that the values are always a subset of the possible options
54050
+ y(() => {
54051
+ if (loadState !== LOAD_STATES.LOADED) {
54052
+ return;
54053
+ }
54054
+ const optionValues = options.map(o => o.value);
54055
+ const hasValuesNotInOptions = values.some(v => !hasEqualValue(v, optionValues));
54056
+ if (hasValuesNotInOptions) {
54057
+ onChange({
54058
+ field,
54059
+ value: values.filter(v => hasEqualValue(v, optionValues))
54060
+ });
54061
+ }
54062
+ }, [field, options, onChange, JSON.stringify(values), loadState]);
54063
+ }
51779
54064
  const type$d = 'checklist';
51780
54065
  function Checklist(props) {
51781
54066
  const {
@@ -51798,16 +54083,11 @@
51798
54083
  const {
51799
54084
  required
51800
54085
  } = validate;
51801
- const toggleCheckbox = v => {
51802
- let newValue = [...values];
51803
- if (!newValue.includes(v)) {
51804
- newValue.push(v);
51805
- } else {
51806
- newValue = newValue.filter(x => x != v);
51807
- }
54086
+ const toggleCheckbox = toggledValue => {
54087
+ const newValues = hasEqualValue(toggledValue, values) ? values.filter(value => !isEqual$1(value, toggledValue)) : [...values, toggledValue];
51808
54088
  props.onChange({
51809
54089
  field,
51810
- value: newValue
54090
+ value: newValues
51811
54091
  });
51812
54092
  };
51813
54093
  const onCheckboxBlur = e => {
@@ -51845,15 +54125,16 @@
51845
54125
  required: required
51846
54126
  }), loadState == LOAD_STATES.LOADED && options.map((o, index) => {
51847
54127
  const itemDomId = `${domId}-${index}`;
54128
+ const isChecked = hasEqualValue(o.value, values);
51848
54129
  return e$1(Label$3, {
51849
54130
  id: itemDomId,
51850
54131
  label: o.label,
51851
54132
  class: classNames({
51852
- 'fjs-checked': values.includes(o.value)
54133
+ 'fjs-checked': isChecked
51853
54134
  }),
51854
54135
  required: false,
51855
54136
  children: e$1("input", {
51856
- checked: values.includes(o.value),
54137
+ checked: isChecked,
51857
54138
  class: "fjs-input",
51858
54139
  disabled: disabled,
51859
54140
  readOnly: readonly,
@@ -53660,8 +55941,8 @@
53660
55941
  id: domId,
53661
55942
  onKeyDown: onKeyDown,
53662
55943
  onKeyPress: onKeyPress,
53663
- onBlur: () => onBlur && onBlur(),
53664
- onFocus: () => onFocus && onFocus()
55944
+ onBlur: onBlur,
55945
+ onFocus: onFocus
53665
55946
 
53666
55947
  // @ts-ignore
53667
55948
  ,
@@ -53738,7 +56019,8 @@
53738
56019
  if (loadState !== LOAD_STATES.LOADED) {
53739
56020
  return;
53740
56021
  }
53741
- const hasValueNotInOptions = value && !options.map(o => o.value).includes(value);
56022
+ const optionValues = options.map(o => o.value);
56023
+ const hasValueNotInOptions = value && !hasEqualValue(value, optionValues);
53742
56024
  if (hasValueNotInOptions) {
53743
56025
  onChange({
53744
56026
  field,
@@ -53810,15 +56092,16 @@
53810
56092
  required: required
53811
56093
  }), loadState == LOAD_STATES.LOADED && options.map((option, index) => {
53812
56094
  const itemDomId = `${domId}-${index}`;
56095
+ const isChecked = isEqual$1(option.value, value);
53813
56096
  return e$1(Label$3, {
53814
56097
  id: itemDomId,
53815
56098
  label: option.label,
53816
56099
  class: classNames({
53817
- 'fjs-checked': option.value === value
56100
+ 'fjs-checked': isChecked
53818
56101
  }),
53819
56102
  required: false,
53820
56103
  children: e$1("input", {
53821
- checked: option.value === value,
56104
+ checked: isChecked,
53822
56105
  class: "fjs-input",
53823
56106
  disabled: disabled,
53824
56107
  readOnly: readonly,
@@ -53847,6 +56130,21 @@
53847
56130
  sanitizeValue: sanitizeSingleSelectValue,
53848
56131
  create: createEmptyOptions
53849
56132
  };
56133
+
56134
+ /**
56135
+ * This hook allows us to retrieve the label from a value in linear time by caching it in a map
56136
+ * @param {Array} options
56137
+ */
56138
+ function useGetLabelCorrelation(options) {
56139
+ // This allows us to retrieve the label from a value in linear time
56140
+ const labelMap = d(() => Object.assign({}, ...options.map(o => ({
56141
+ [_getValueHash(o.value)]: o.label
56142
+ }))), [options]);
56143
+ return A$1(value => labelMap[_getValueHash(value)], [labelMap]);
56144
+ }
56145
+ const _getValueHash = value => {
56146
+ return isObject$4(value) ? JSON.stringify(value) : value;
56147
+ };
53850
56148
  var _path$q;
53851
56149
  function _extends$r() {
53852
56150
  _extends$r = Object.assign ? Object.assign.bind() : function (target) {
@@ -53890,7 +56188,7 @@
53890
56188
  } = props;
53891
56189
  const [filter, setFilter] = l$2('');
53892
56190
  const [isDropdownExpanded, setIsDropdownExpanded] = l$2(false);
53893
- const [shouldApplyFilter, setShouldApplyFilter] = l$2(true);
56191
+ const [isFilterActive, setIsFilterActive] = l$2(true);
53894
56192
  const [isEscapeClosed, setIsEscapeClose] = l$2(false);
53895
56193
  const searchbarRef = s$1();
53896
56194
  const eventBus = useService$2('eventBus');
@@ -53905,23 +56203,22 @@
53905
56203
  value,
53906
56204
  onChange: props.onChange
53907
56205
  });
53908
-
53909
- // We cache a map of option values to their index so that we don't need to search the whole options array every time to correlate the label
53910
- const valueToOptionMap = d(() => Object.assign({}, ...options.map((o, x) => ({
53911
- [o.value]: options[x]
53912
- }))), [options]);
53913
- const valueLabel = d(() => value && valueToOptionMap[value] && valueToOptionMap[value].label || '', [value, valueToOptionMap]);
56206
+ const getLabelCorrelation = useGetLabelCorrelation(options);
56207
+ const label = d(() => value && getLabelCorrelation(value), [value, getLabelCorrelation]);
53914
56208
 
53915
56209
  // whenever we change the underlying value, set the label to it
53916
56210
  y(() => {
53917
- setFilter(valueLabel);
53918
- }, [valueLabel]);
56211
+ setFilter(label);
56212
+ }, [label]);
53919
56213
  const filteredOptions = d(() => {
53920
- if (loadState === LOAD_STATES.LOADED) {
53921
- return shouldApplyFilter ? options.filter(o => o.label && o.value && o.label.toLowerCase().includes(filter.toLowerCase())) : options;
56214
+ if (loadState !== LOAD_STATES.LOADED) {
56215
+ return [];
53922
56216
  }
53923
- return [];
53924
- }, [filter, loadState, options, shouldApplyFilter]);
56217
+ if (!filter || !isFilterActive) {
56218
+ return options;
56219
+ }
56220
+ return options.filter(o => o.label && o.value && o.label.toLowerCase().includes(filter.toLowerCase()));
56221
+ }, [filter, loadState, options, isFilterActive]);
53925
56222
  const setValue = A$1(option => {
53926
56223
  setFilter(option && option.label || '');
53927
56224
  props.onChange({
@@ -53948,7 +56245,7 @@
53948
56245
  }) => {
53949
56246
  setIsEscapeClose(false);
53950
56247
  setIsDropdownExpanded(true);
53951
- setShouldApplyFilter(true);
56248
+ setIsFilterActive(true);
53952
56249
  setFilter(target.value || '');
53953
56250
  eventBus.fire('formField.search', {
53954
56251
  formField: field,
@@ -53964,7 +56261,7 @@
53964
56261
  {
53965
56262
  if (!isDropdownExpanded) {
53966
56263
  setIsDropdownExpanded(true);
53967
- setShouldApplyFilter(false);
56264
+ setIsFilterActive(false);
53968
56265
  }
53969
56266
  keyDownEvent.preventDefault();
53970
56267
  break;
@@ -53982,7 +56279,7 @@
53982
56279
  const onInputMouseDown = A$1(() => {
53983
56280
  setIsEscapeClose(false);
53984
56281
  setIsDropdownExpanded(true);
53985
- setShouldApplyFilter(false);
56282
+ setIsFilterActive(false);
53986
56283
  }, []);
53987
56284
  const onInputFocus = A$1(() => {
53988
56285
  setIsEscapeClose(false);
@@ -53991,9 +56288,9 @@
53991
56288
  }, [onFocus]);
53992
56289
  const onInputBlur = A$1(() => {
53993
56290
  setIsDropdownExpanded(false);
53994
- setFilter(valueLabel);
56291
+ setFilter(label);
53995
56292
  onBlur && onBlur();
53996
- }, [onBlur, valueLabel]);
56293
+ }, [onBlur, label]);
53997
56294
  return e$1(d$1, {
53998
56295
  children: [e$1("div", {
53999
56296
  class: classNames('fjs-input-group', {
@@ -54069,12 +56366,8 @@
54069
56366
  value,
54070
56367
  onChange: props.onChange
54071
56368
  });
54072
-
54073
- // We cache a map of option values to their index so that we don't need to search the whole options array every time to correlate the label
54074
- const valueToOptionMap = d(() => Object.assign({}, ...options.map((o, x) => ({
54075
- [o.value]: options[x]
54076
- }))), [options]);
54077
- const valueLabel = d(() => value && valueToOptionMap[value] && valueToOptionMap[value].label || '', [value, valueToOptionMap]);
56369
+ const getLabelCorrelation = useGetLabelCorrelation(options);
56370
+ const valueLabel = d(() => value && getLabelCorrelation(value), [value, getLabelCorrelation]);
54078
56371
  const setValue = A$1(option => {
54079
56372
  props.onChange({
54080
56373
  value: option && option.value || null,
@@ -54383,11 +56676,7 @@
54383
56676
  values,
54384
56677
  onChange: props.onChange
54385
56678
  });
54386
-
54387
- // We cache a map of option values to their index so that we don't need to search the whole options array every time to correlate the label
54388
- const valueToOptionMap = d(() => Object.assign({}, ...options.map((o, x) => ({
54389
- [o.value]: options[x]
54390
- }))), [options]);
56679
+ const getLabelCorrelation = useGetLabelCorrelation(options);
54391
56680
  const hasOptionsLeft = d(() => options.length > values.length, [options.length, values.length]);
54392
56681
 
54393
56682
  // Usage of stringify is necessary here because we want this effect to only trigger when there is a value change to the array
@@ -54395,12 +56684,14 @@
54395
56684
  if (loadState !== LOAD_STATES.LOADED) {
54396
56685
  return [];
54397
56686
  }
54398
- return options.filter(o => o.label && o.value && o.label.toLowerCase().includes(filter.toLowerCase()) && !values.includes(o.value));
56687
+ const isValidFilteredOption = option => {
56688
+ const filterMatches = option.label.toLowerCase().includes(filter.toLowerCase());
56689
+ return filterMatches && !hasEqualValue(option.value, values);
56690
+ };
56691
+ return options.filter(isValidFilteredOption);
54399
56692
  }, [filter, options, JSON.stringify(values), loadState]);
54400
56693
  const selectValue = value => {
54401
- if (filter) {
54402
- setFilter('');
54403
- }
56694
+ setFilter('');
54404
56695
 
54405
56696
  // Ensure values cannot be double selected due to latency
54406
56697
  if (values.at(-1) === value) {
@@ -54412,8 +56703,9 @@
54412
56703
  });
54413
56704
  };
54414
56705
  const deselectValue = value => {
56706
+ const newValues = values.filter(v => !isEqual$1(v, value));
54415
56707
  props.onChange({
54416
- value: values.filter(v => v != value),
56708
+ value: newValues,
54417
56709
  field
54418
56710
  });
54419
56711
  };
@@ -54523,7 +56815,7 @@
54523
56815
  onMouseDown: e => e.preventDefault(),
54524
56816
  children: [e$1("span", {
54525
56817
  class: "fjs-taglist-tag-label",
54526
- children: valueToOptionMap[v] ? valueToOptionMap[v].label : undefined
56818
+ children: getLabelCorrelation(v)
54527
56819
  }), !disabled && !readonly && e$1("button", {
54528
56820
  type: "button",
54529
56821
  title: "Remove tag",
@@ -54661,6 +56953,39 @@
54661
56953
  children: children
54662
56954
  });
54663
56955
  }
56956
+ function useFlushDebounce(func, additionalDeps = []) {
56957
+ const timeoutRef = s$1(null);
56958
+ const lastArgsRef = s$1(null);
56959
+ const config = useService$2('config', false);
56960
+ const debounce = config && config.debounce;
56961
+ const shouldDebounce = debounce !== false && debounce !== 0;
56962
+ const delay = typeof debounce === 'number' ? debounce : 300;
56963
+ const debounceFunc = A$1((...args) => {
56964
+ if (!shouldDebounce) {
56965
+ func(...args);
56966
+ return;
56967
+ }
56968
+ lastArgsRef.current = args;
56969
+ if (timeoutRef.current) {
56970
+ clearTimeout(timeoutRef.current);
56971
+ }
56972
+ timeoutRef.current = setTimeout(() => {
56973
+ func(...lastArgsRef.current);
56974
+ lastArgsRef.current = null;
56975
+ }, delay);
56976
+ }, [func, delay, shouldDebounce, ...additionalDeps]);
56977
+ const flushFunc = A$1(() => {
56978
+ if (timeoutRef.current) {
56979
+ clearTimeout(timeoutRef.current);
56980
+ if (lastArgsRef.current !== null) {
56981
+ func(...lastArgsRef.current);
56982
+ lastArgsRef.current = null;
56983
+ }
56984
+ timeoutRef.current = null;
56985
+ }
56986
+ }, [func, ...additionalDeps]);
56987
+ return [debounceFunc, flushFunc];
56988
+ }
54664
56989
  const type$2 = 'textfield';
54665
56990
  function Textfield$1(props) {
54666
56991
  const {
@@ -54687,13 +57012,20 @@
54687
57012
  const {
54688
57013
  required
54689
57014
  } = validate;
54690
- const onChange = ({
57015
+ const [onInputChange, flushOnChange] = useFlushDebounce(({
54691
57016
  target
54692
57017
  }) => {
54693
57018
  props.onChange({
54694
57019
  field,
54695
57020
  value: target.value
54696
57021
  });
57022
+ }, [props.onChange]);
57023
+ const onInputBlur = () => {
57024
+ flushOnChange && flushOnChange();
57025
+ onBlur && onBlur();
57026
+ };
57027
+ const onInputFocus = () => {
57028
+ onFocus && onFocus();
54697
57029
  };
54698
57030
  return e$1("div", {
54699
57031
  class: formFieldClasses(type$2, {
@@ -54715,9 +57047,9 @@
54715
57047
  disabled: disabled,
54716
57048
  readOnly: readonly,
54717
57049
  id: domId,
54718
- onInput: onChange,
54719
- onBlur: () => onBlur && onBlur(),
54720
- onFocus: () => onFocus && onFocus(),
57050
+ onInput: onInputChange,
57051
+ onBlur: onInputBlur,
57052
+ onFocus: onInputFocus,
54721
57053
  type: "text",
54722
57054
  value: value,
54723
57055
  "aria-describedby": errorMessageId
@@ -54739,7 +57071,7 @@
54739
57071
  sanitizeValue: ({
54740
57072
  value
54741
57073
  }) => {
54742
- if (isArray$4(value) || isObject$1(value) || isNil$1(value)) {
57074
+ if (isArray$8(value) || isObject$4(value) || isNil$1(value)) {
54743
57075
  return '';
54744
57076
  }
54745
57077
 
@@ -54775,13 +57107,20 @@
54775
57107
  required
54776
57108
  } = validate;
54777
57109
  const textareaRef = s$1();
54778
- const onInput = ({
57110
+ const [onInputChange, flushOnChange] = useFlushDebounce(({
54779
57111
  target
54780
57112
  }) => {
54781
57113
  props.onChange({
54782
57114
  field,
54783
57115
  value: target.value
54784
57116
  });
57117
+ }, [props.onChange]);
57118
+ const onInputBlur = () => {
57119
+ flushOnChange && flushOnChange();
57120
+ onBlur && onBlur();
57121
+ };
57122
+ const onInputFocus = () => {
57123
+ onFocus && onFocus();
54785
57124
  };
54786
57125
  h$1(() => {
54787
57126
  autoSizeTextarea(textareaRef.current);
@@ -54804,9 +57143,9 @@
54804
57143
  disabled: disabled,
54805
57144
  readonly: readonly,
54806
57145
  id: domId,
54807
- onInput: onInput,
54808
- onBlur: () => onBlur && onBlur(),
54809
- onFocus: () => onFocus && onFocus(),
57146
+ onInput: onInputChange,
57147
+ onBlur: onInputBlur,
57148
+ onFocus: onInputFocus,
54810
57149
  value: value,
54811
57150
  ref: textareaRef,
54812
57151
  "aria-describedby": errorMessageId
@@ -54826,7 +57165,7 @@
54826
57165
  emptyValue: '',
54827
57166
  sanitizeValue: ({
54828
57167
  value
54829
- }) => isArray$4(value) || isObject$1(value) || isNil$1(value) ? '' : String(value),
57168
+ }) => isArray$8(value) || isObject$4(value) || isNil$1(value) ? '' : String(value),
54830
57169
  create: (options = {}) => ({
54831
57170
  ...options
54832
57171
  })
@@ -55200,7 +57539,7 @@
55200
57539
  * @returns {column is Column}
55201
57540
  */
55202
57541
  function isColumn(column) {
55203
- return isObject$1(column) && isString$4(column['label']) && isString$4(column['key']);
57542
+ return isObject$4(column) && isString$4(column['label']) && isString$4(column['key']);
55204
57543
  }
55205
57544
 
55206
57545
  /**
@@ -55227,7 +57566,7 @@
55227
57566
  */
55228
57567
  function sortByColumn(array, key, direction) {
55229
57568
  return [...array].sort((a, b) => {
55230
- if (!isObject$1(a) || !isObject$1(b)) {
57569
+ if (!isObject$4(a) || !isObject$4(b)) {
55231
57570
  return 0;
55232
57571
  }
55233
57572
  if (direction === 'asc') {
@@ -56128,7 +58467,7 @@
56128
58467
  } while (recurse);
56129
58468
  }
56130
58469
  _isEmptyObject(parentObject) {
56131
- return isObject$1(parentObject) && !values(parentObject).length;
58470
+ return isObject$4(parentObject) && !values(parentObject).length;
56132
58471
  }
56133
58472
  _isEmptyArray(parentObject) {
56134
58473
  return Array.isArray(parentObject) && (!parentObject.length || parentObject.every(item => item === undefined));
@@ -56605,7 +58944,7 @@
56605
58944
  if (!elements) {
56606
58945
  return;
56607
58946
  }
56608
- elements = isArray$4(elements) ? elements : [elements];
58947
+ elements = isArray$8(elements) ? elements : [elements];
56609
58948
  execution.dirty = execution.dirty.concat(elements);
56610
58949
  };
56611
58950
  CommandStack$1.prototype._executedAction = function (action, redo) {
@@ -57145,8 +59484,8 @@
57145
59484
  * @param {any} [that] callback context
57146
59485
  */
57147
59486
  EventBus$1.prototype.on = function (events, priority, callback, that) {
57148
- events = isArray$4(events) ? events : [events];
57149
- if (isFunction$1(priority)) {
59487
+ events = isArray$8(events) ? events : [events];
59488
+ if (isFunction$4(priority)) {
57150
59489
  that = callback;
57151
59490
  callback = priority;
57152
59491
  priority = DEFAULT_PRIORITY$4;
@@ -57185,7 +59524,7 @@
57185
59524
  */
57186
59525
  EventBus$1.prototype.once = function (events, priority, callback, that) {
57187
59526
  var self = this;
57188
- if (isFunction$1(priority)) {
59527
+ if (isFunction$4(priority)) {
57189
59528
  that = callback;
57190
59529
  callback = priority;
57191
59530
  priority = DEFAULT_PRIORITY$4;
@@ -57216,7 +59555,7 @@
57216
59555
  * @param {EventBusEventCallback} [callback]
57217
59556
  */
57218
59557
  EventBus$1.prototype.off = function (events, callback) {
57219
- events = isArray$4(events) ? events : [events];
59558
+ events = isArray$8(events) ? events : [events];
57220
59559
  var self = this;
57221
59560
  events.forEach(function (event) {
57222
59561
  self._removeListener(event, callback);
@@ -58083,7 +60422,7 @@
58083
60422
  }
58084
60423
  }
58085
60424
  const _getNextSegment = (node, segment) => {
58086
- if (isArray$4(node.children)) {
60425
+ if (isArray$8(node.children)) {
58087
60426
  return node.children.find(node => node.segment === segment) || null;
58088
60427
  }
58089
60428
  return null;
@@ -58652,16 +60991,18 @@
58652
60991
  */
58653
60992
  _createInjector(options, container) {
58654
60993
  const {
60994
+ modules = this._getModules(),
58655
60995
  additionalModules = [],
58656
- modules = this._getModules()
60996
+ ...config
58657
60997
  } = options;
58658
- const config = {
60998
+ const enrichedConfig = {
60999
+ ...config,
58659
61000
  renderer: {
58660
61001
  container
58661
61002
  }
58662
61003
  };
58663
61004
  return createInjector([{
58664
- config: ['value', config]
61005
+ config: ['value', enrichedConfig]
58665
61006
  }, {
58666
61007
  form: ['value', this]
58667
61008
  }, core$1, ...modules, ...additionalModules]);
@@ -58849,7 +61190,7 @@
58849
61190
  }
58850
61191
 
58851
61192
  // (b) Ensure all elements of the array are objects
58852
- valueData = valueData.map(val => isObject$1(val) ? val : {});
61193
+ valueData = valueData.map(val => isObject$4(val) ? val : {});
58853
61194
 
58854
61195
  // (c) Initialize field value in output data
58855
61196
  set$3(initializedData, valuePath, valueData);
@@ -76370,19 +78711,20 @@
76370
78711
  */
76371
78712
  _createInjector(options, container) {
76372
78713
  const {
76373
- additionalModules = [],
76374
78714
  modules = this._getModules(),
76375
- renderer = {}
78715
+ additionalModules = [],
78716
+ renderer = {},
78717
+ ...config
76376
78718
  } = options;
76377
- const config = {
76378
- ...options,
78719
+ const enrichedConfig = {
78720
+ ...config,
76379
78721
  renderer: {
76380
78722
  ...renderer,
76381
78723
  container
76382
78724
  }
76383
78725
  };
76384
78726
  return createInjector([{
76385
- config: ['value', config]
78727
+ config: ['value', enrichedConfig]
76386
78728
  }, {
76387
78729
  formEditor: ['value', this]
76388
78730
  }, core, ...modules, ...additionalModules]);