@pie-element/ebsr 12.3.4-next.3 → 13.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/CHANGELOG.md +0 -11
  2. package/configure/CHANGELOG.md +0 -11
  3. package/configure/lib/defaults.js +23 -36
  4. package/configure/lib/defaults.js.map +1 -1
  5. package/configure/lib/index.js +114 -202
  6. package/configure/lib/index.js.map +1 -1
  7. package/configure/lib/main.js +188 -271
  8. package/configure/lib/main.js.map +1 -1
  9. package/configure/package.json +9 -6
  10. package/configure/src/__tests__/index.test.js +99 -108
  11. package/configure/src/index.js +13 -6
  12. package/configure/src/main.jsx +14 -18
  13. package/controller/CHANGELOG.md +0 -11
  14. package/controller/lib/defaults.js +20 -32
  15. package/controller/lib/defaults.js.map +1 -1
  16. package/controller/lib/index.js +224 -349
  17. package/controller/lib/index.js.map +1 -1
  18. package/controller/lib/utils.js +4 -18
  19. package/controller/lib/utils.js.map +1 -1
  20. package/controller/package.json +3 -3
  21. package/lib/index.js +113 -181
  22. package/lib/index.js.map +1 -1
  23. package/lib/print.js +120 -204
  24. package/lib/print.js.map +1 -1
  25. package/package.json +5 -13
  26. package/src/__tests__/index.test.js +18 -5
  27. package/configure/src/__tests__/__snapshots__/index.test.js.snap +0 -83
  28. package/esm/configure.js +0 -12003
  29. package/esm/configure.js.map +0 -1
  30. package/esm/controller.js +0 -3358
  31. package/esm/controller.js.map +0 -1
  32. package/esm/element.js +0 -2203
  33. package/esm/element.js.map +0 -1
  34. package/esm/package.json +0 -3
  35. package/esm/print.js +0 -4092
  36. package/esm/print.js.map +0 -1
  37. package/module/configure.js +0 -1
  38. package/module/controller.js +0 -6469
  39. package/module/demo.js +0 -77
  40. package/module/element.js +0 -1
  41. package/module/index.html +0 -21
  42. package/module/manifest.json +0 -14
  43. package/module/print-demo.js +0 -115
  44. package/module/print.html +0 -18
  45. package/module/print.js +0 -1
package/esm/print.js DELETED
@@ -1,4092 +0,0 @@
1
- import MultipleChoice from '@pie-element/multiple-choice';
2
- import { SessionChangedEvent } from '@pie-framework/pie-player-events';
3
- import Translator from '@pie-lib/translator';
4
-
5
- function _extends() {
6
- _extends = Object.assign || function (target) {
7
- for (var i = 1; i < arguments.length; i++) {
8
- var source = arguments[i];
9
-
10
- for (var key in source) {
11
- if (Object.prototype.hasOwnProperty.call(source, key)) {
12
- target[key] = source[key];
13
- }
14
- }
15
- }
16
-
17
- return target;
18
- };
19
-
20
- return _extends.apply(this, arguments);
21
- }
22
-
23
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
24
-
25
- /**
26
- * Removes all key-value entries from the list cache.
27
- *
28
- * @private
29
- * @name clear
30
- * @memberOf ListCache
31
- */
32
-
33
- function listCacheClear$1() {
34
- this.__data__ = [];
35
- this.size = 0;
36
- }
37
-
38
- var _listCacheClear = listCacheClear$1;
39
-
40
- /**
41
- * Performs a
42
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
43
- * comparison between two values to determine if they are equivalent.
44
- *
45
- * @static
46
- * @memberOf _
47
- * @since 4.0.0
48
- * @category Lang
49
- * @param {*} value The value to compare.
50
- * @param {*} other The other value to compare.
51
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
52
- * @example
53
- *
54
- * var object = { 'a': 1 };
55
- * var other = { 'a': 1 };
56
- *
57
- * _.eq(object, object);
58
- * // => true
59
- *
60
- * _.eq(object, other);
61
- * // => false
62
- *
63
- * _.eq('a', 'a');
64
- * // => true
65
- *
66
- * _.eq('a', Object('a'));
67
- * // => false
68
- *
69
- * _.eq(NaN, NaN);
70
- * // => true
71
- */
72
-
73
- function eq$2(value, other) {
74
- return value === other || (value !== value && other !== other);
75
- }
76
-
77
- var eq_1 = eq$2;
78
-
79
- var eq$1 = eq_1;
80
-
81
- /**
82
- * Gets the index at which the `key` is found in `array` of key-value pairs.
83
- *
84
- * @private
85
- * @param {Array} array The array to inspect.
86
- * @param {*} key The key to search for.
87
- * @returns {number} Returns the index of the matched value, else `-1`.
88
- */
89
- function assocIndexOf$4(array, key) {
90
- var length = array.length;
91
- while (length--) {
92
- if (eq$1(array[length][0], key)) {
93
- return length;
94
- }
95
- }
96
- return -1;
97
- }
98
-
99
- var _assocIndexOf = assocIndexOf$4;
100
-
101
- var assocIndexOf$3 = _assocIndexOf;
102
-
103
- /** Used for built-in method references. */
104
- var arrayProto = Array.prototype;
105
-
106
- /** Built-in value references. */
107
- var splice = arrayProto.splice;
108
-
109
- /**
110
- * Removes `key` and its value from the list cache.
111
- *
112
- * @private
113
- * @name delete
114
- * @memberOf ListCache
115
- * @param {string} key The key of the value to remove.
116
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
117
- */
118
- function listCacheDelete$1(key) {
119
- var data = this.__data__,
120
- index = assocIndexOf$3(data, key);
121
-
122
- if (index < 0) {
123
- return false;
124
- }
125
- var lastIndex = data.length - 1;
126
- if (index == lastIndex) {
127
- data.pop();
128
- } else {
129
- splice.call(data, index, 1);
130
- }
131
- --this.size;
132
- return true;
133
- }
134
-
135
- var _listCacheDelete = listCacheDelete$1;
136
-
137
- var assocIndexOf$2 = _assocIndexOf;
138
-
139
- /**
140
- * Gets the list cache value for `key`.
141
- *
142
- * @private
143
- * @name get
144
- * @memberOf ListCache
145
- * @param {string} key The key of the value to get.
146
- * @returns {*} Returns the entry value.
147
- */
148
- function listCacheGet$1(key) {
149
- var data = this.__data__,
150
- index = assocIndexOf$2(data, key);
151
-
152
- return index < 0 ? undefined : data[index][1];
153
- }
154
-
155
- var _listCacheGet = listCacheGet$1;
156
-
157
- var assocIndexOf$1 = _assocIndexOf;
158
-
159
- /**
160
- * Checks if a list cache value for `key` exists.
161
- *
162
- * @private
163
- * @name has
164
- * @memberOf ListCache
165
- * @param {string} key The key of the entry to check.
166
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
167
- */
168
- function listCacheHas$1(key) {
169
- return assocIndexOf$1(this.__data__, key) > -1;
170
- }
171
-
172
- var _listCacheHas = listCacheHas$1;
173
-
174
- var assocIndexOf = _assocIndexOf;
175
-
176
- /**
177
- * Sets the list cache `key` to `value`.
178
- *
179
- * @private
180
- * @name set
181
- * @memberOf ListCache
182
- * @param {string} key The key of the value to set.
183
- * @param {*} value The value to set.
184
- * @returns {Object} Returns the list cache instance.
185
- */
186
- function listCacheSet$1(key, value) {
187
- var data = this.__data__,
188
- index = assocIndexOf(data, key);
189
-
190
- if (index < 0) {
191
- ++this.size;
192
- data.push([key, value]);
193
- } else {
194
- data[index][1] = value;
195
- }
196
- return this;
197
- }
198
-
199
- var _listCacheSet = listCacheSet$1;
200
-
201
- var listCacheClear = _listCacheClear,
202
- listCacheDelete = _listCacheDelete,
203
- listCacheGet = _listCacheGet,
204
- listCacheHas = _listCacheHas,
205
- listCacheSet = _listCacheSet;
206
-
207
- /**
208
- * Creates an list cache object.
209
- *
210
- * @private
211
- * @constructor
212
- * @param {Array} [entries] The key-value pairs to cache.
213
- */
214
- function ListCache$4(entries) {
215
- var index = -1,
216
- length = entries == null ? 0 : entries.length;
217
-
218
- this.clear();
219
- while (++index < length) {
220
- var entry = entries[index];
221
- this.set(entry[0], entry[1]);
222
- }
223
- }
224
-
225
- // Add methods to `ListCache`.
226
- ListCache$4.prototype.clear = listCacheClear;
227
- ListCache$4.prototype['delete'] = listCacheDelete;
228
- ListCache$4.prototype.get = listCacheGet;
229
- ListCache$4.prototype.has = listCacheHas;
230
- ListCache$4.prototype.set = listCacheSet;
231
-
232
- var _ListCache = ListCache$4;
233
-
234
- var ListCache$3 = _ListCache;
235
-
236
- /**
237
- * Removes all key-value entries from the stack.
238
- *
239
- * @private
240
- * @name clear
241
- * @memberOf Stack
242
- */
243
- function stackClear$1() {
244
- this.__data__ = new ListCache$3;
245
- this.size = 0;
246
- }
247
-
248
- var _stackClear = stackClear$1;
249
-
250
- /**
251
- * Removes `key` and its value from the stack.
252
- *
253
- * @private
254
- * @name delete
255
- * @memberOf Stack
256
- * @param {string} key The key of the value to remove.
257
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
258
- */
259
-
260
- function stackDelete$1(key) {
261
- var data = this.__data__,
262
- result = data['delete'](key);
263
-
264
- this.size = data.size;
265
- return result;
266
- }
267
-
268
- var _stackDelete = stackDelete$1;
269
-
270
- /**
271
- * Gets the stack value for `key`.
272
- *
273
- * @private
274
- * @name get
275
- * @memberOf Stack
276
- * @param {string} key The key of the value to get.
277
- * @returns {*} Returns the entry value.
278
- */
279
-
280
- function stackGet$1(key) {
281
- return this.__data__.get(key);
282
- }
283
-
284
- var _stackGet = stackGet$1;
285
-
286
- /**
287
- * Checks if a stack value for `key` exists.
288
- *
289
- * @private
290
- * @name has
291
- * @memberOf Stack
292
- * @param {string} key The key of the entry to check.
293
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
294
- */
295
-
296
- function stackHas$1(key) {
297
- return this.__data__.has(key);
298
- }
299
-
300
- var _stackHas = stackHas$1;
301
-
302
- /** Detect free variable `global` from Node.js. */
303
-
304
- var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
305
-
306
- var _freeGlobal = freeGlobal$1;
307
-
308
- var freeGlobal = _freeGlobal;
309
-
310
- /** Detect free variable `self`. */
311
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
312
-
313
- /** Used as a reference to the global object. */
314
- var root$8 = freeGlobal || freeSelf || Function('return this')();
315
-
316
- var _root = root$8;
317
-
318
- var root$7 = _root;
319
-
320
- /** Built-in value references. */
321
- var Symbol$4 = root$7.Symbol;
322
-
323
- var _Symbol = Symbol$4;
324
-
325
- var Symbol$3 = _Symbol;
326
-
327
- /** Used for built-in method references. */
328
- var objectProto$c = Object.prototype;
329
-
330
- /** Used to check objects for own properties. */
331
- var hasOwnProperty$9 = objectProto$c.hasOwnProperty;
332
-
333
- /**
334
- * Used to resolve the
335
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
336
- * of values.
337
- */
338
- var nativeObjectToString$1 = objectProto$c.toString;
339
-
340
- /** Built-in value references. */
341
- var symToStringTag$1 = Symbol$3 ? Symbol$3.toStringTag : undefined;
342
-
343
- /**
344
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
345
- *
346
- * @private
347
- * @param {*} value The value to query.
348
- * @returns {string} Returns the raw `toStringTag`.
349
- */
350
- function getRawTag$1(value) {
351
- var isOwn = hasOwnProperty$9.call(value, symToStringTag$1),
352
- tag = value[symToStringTag$1];
353
-
354
- try {
355
- value[symToStringTag$1] = undefined;
356
- var unmasked = true;
357
- } catch (e) {}
358
-
359
- var result = nativeObjectToString$1.call(value);
360
- if (unmasked) {
361
- if (isOwn) {
362
- value[symToStringTag$1] = tag;
363
- } else {
364
- delete value[symToStringTag$1];
365
- }
366
- }
367
- return result;
368
- }
369
-
370
- var _getRawTag = getRawTag$1;
371
-
372
- /** Used for built-in method references. */
373
-
374
- var objectProto$b = Object.prototype;
375
-
376
- /**
377
- * Used to resolve the
378
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
379
- * of values.
380
- */
381
- var nativeObjectToString = objectProto$b.toString;
382
-
383
- /**
384
- * Converts `value` to a string using `Object.prototype.toString`.
385
- *
386
- * @private
387
- * @param {*} value The value to convert.
388
- * @returns {string} Returns the converted string.
389
- */
390
- function objectToString$1(value) {
391
- return nativeObjectToString.call(value);
392
- }
393
-
394
- var _objectToString = objectToString$1;
395
-
396
- var Symbol$2 = _Symbol,
397
- getRawTag = _getRawTag,
398
- objectToString = _objectToString;
399
-
400
- /** `Object#toString` result references. */
401
- var nullTag = '[object Null]',
402
- undefinedTag = '[object Undefined]';
403
-
404
- /** Built-in value references. */
405
- var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : undefined;
406
-
407
- /**
408
- * The base implementation of `getTag` without fallbacks for buggy environments.
409
- *
410
- * @private
411
- * @param {*} value The value to query.
412
- * @returns {string} Returns the `toStringTag`.
413
- */
414
- function baseGetTag$5(value) {
415
- if (value == null) {
416
- return value === undefined ? undefinedTag : nullTag;
417
- }
418
- return (symToStringTag && symToStringTag in Object(value))
419
- ? getRawTag(value)
420
- : objectToString(value);
421
- }
422
-
423
- var _baseGetTag = baseGetTag$5;
424
-
425
- /**
426
- * Checks if `value` is the
427
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
428
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
429
- *
430
- * @static
431
- * @memberOf _
432
- * @since 0.1.0
433
- * @category Lang
434
- * @param {*} value The value to check.
435
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
436
- * @example
437
- *
438
- * _.isObject({});
439
- * // => true
440
- *
441
- * _.isObject([1, 2, 3]);
442
- * // => true
443
- *
444
- * _.isObject(_.noop);
445
- * // => true
446
- *
447
- * _.isObject(null);
448
- * // => false
449
- */
450
-
451
- function isObject$5(value) {
452
- var type = typeof value;
453
- return value != null && (type == 'object' || type == 'function');
454
- }
455
-
456
- var isObject_1 = isObject$5;
457
-
458
- var baseGetTag$4 = _baseGetTag,
459
- isObject$4 = isObject_1;
460
-
461
- /** `Object#toString` result references. */
462
- var asyncTag = '[object AsyncFunction]',
463
- funcTag$2 = '[object Function]',
464
- genTag$1 = '[object GeneratorFunction]',
465
- proxyTag = '[object Proxy]';
466
-
467
- /**
468
- * Checks if `value` is classified as a `Function` object.
469
- *
470
- * @static
471
- * @memberOf _
472
- * @since 0.1.0
473
- * @category Lang
474
- * @param {*} value The value to check.
475
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
476
- * @example
477
- *
478
- * _.isFunction(_);
479
- * // => true
480
- *
481
- * _.isFunction(/abc/);
482
- * // => false
483
- */
484
- function isFunction$2(value) {
485
- if (!isObject$4(value)) {
486
- return false;
487
- }
488
- // The use of `Object#toString` avoids issues with the `typeof` operator
489
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
490
- var tag = baseGetTag$4(value);
491
- return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
492
- }
493
-
494
- var isFunction_1 = isFunction$2;
495
-
496
- var root$6 = _root;
497
-
498
- /** Used to detect overreaching core-js shims. */
499
- var coreJsData$1 = root$6['__core-js_shared__'];
500
-
501
- var _coreJsData = coreJsData$1;
502
-
503
- var coreJsData = _coreJsData;
504
-
505
- /** Used to detect methods masquerading as native. */
506
- var maskSrcKey = (function() {
507
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
508
- return uid ? ('Symbol(src)_1.' + uid) : '';
509
- }());
510
-
511
- /**
512
- * Checks if `func` has its source masked.
513
- *
514
- * @private
515
- * @param {Function} func The function to check.
516
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
517
- */
518
- function isMasked$1(func) {
519
- return !!maskSrcKey && (maskSrcKey in func);
520
- }
521
-
522
- var _isMasked = isMasked$1;
523
-
524
- /** Used for built-in method references. */
525
-
526
- var funcProto$1 = Function.prototype;
527
-
528
- /** Used to resolve the decompiled source of functions. */
529
- var funcToString$1 = funcProto$1.toString;
530
-
531
- /**
532
- * Converts `func` to its source code.
533
- *
534
- * @private
535
- * @param {Function} func The function to convert.
536
- * @returns {string} Returns the source code.
537
- */
538
- function toSource$2(func) {
539
- if (func != null) {
540
- try {
541
- return funcToString$1.call(func);
542
- } catch (e) {}
543
- try {
544
- return (func + '');
545
- } catch (e) {}
546
- }
547
- return '';
548
- }
549
-
550
- var _toSource = toSource$2;
551
-
552
- var isFunction$1 = isFunction_1,
553
- isMasked = _isMasked,
554
- isObject$3 = isObject_1,
555
- toSource$1 = _toSource;
556
-
557
- /**
558
- * Used to match `RegExp`
559
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
560
- */
561
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
562
-
563
- /** Used to detect host constructors (Safari). */
564
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
565
-
566
- /** Used for built-in method references. */
567
- var funcProto = Function.prototype,
568
- objectProto$a = Object.prototype;
569
-
570
- /** Used to resolve the decompiled source of functions. */
571
- var funcToString = funcProto.toString;
572
-
573
- /** Used to check objects for own properties. */
574
- var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
575
-
576
- /** Used to detect if a method is native. */
577
- var reIsNative = RegExp('^' +
578
- funcToString.call(hasOwnProperty$8).replace(reRegExpChar, '\\$&')
579
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
580
- );
581
-
582
- /**
583
- * The base implementation of `_.isNative` without bad shim checks.
584
- *
585
- * @private
586
- * @param {*} value The value to check.
587
- * @returns {boolean} Returns `true` if `value` is a native function,
588
- * else `false`.
589
- */
590
- function baseIsNative$1(value) {
591
- if (!isObject$3(value) || isMasked(value)) {
592
- return false;
593
- }
594
- var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
595
- return pattern.test(toSource$1(value));
596
- }
597
-
598
- var _baseIsNative = baseIsNative$1;
599
-
600
- /**
601
- * Gets the value at `key` of `object`.
602
- *
603
- * @private
604
- * @param {Object} [object] The object to query.
605
- * @param {string} key The key of the property to get.
606
- * @returns {*} Returns the property value.
607
- */
608
-
609
- function getValue$1(object, key) {
610
- return object == null ? undefined : object[key];
611
- }
612
-
613
- var _getValue = getValue$1;
614
-
615
- var baseIsNative = _baseIsNative,
616
- getValue = _getValue;
617
-
618
- /**
619
- * Gets the native function at `key` of `object`.
620
- *
621
- * @private
622
- * @param {Object} object The object to query.
623
- * @param {string} key The key of the method to get.
624
- * @returns {*} Returns the function if it's native, else `undefined`.
625
- */
626
- function getNative$7(object, key) {
627
- var value = getValue(object, key);
628
- return baseIsNative(value) ? value : undefined;
629
- }
630
-
631
- var _getNative = getNative$7;
632
-
633
- var getNative$6 = _getNative,
634
- root$5 = _root;
635
-
636
- /* Built-in method references that are verified to be native. */
637
- var Map$3 = getNative$6(root$5, 'Map');
638
-
639
- var _Map = Map$3;
640
-
641
- var getNative$5 = _getNative;
642
-
643
- /* Built-in method references that are verified to be native. */
644
- var nativeCreate$4 = getNative$5(Object, 'create');
645
-
646
- var _nativeCreate = nativeCreate$4;
647
-
648
- var nativeCreate$3 = _nativeCreate;
649
-
650
- /**
651
- * Removes all key-value entries from the hash.
652
- *
653
- * @private
654
- * @name clear
655
- * @memberOf Hash
656
- */
657
- function hashClear$1() {
658
- this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
659
- this.size = 0;
660
- }
661
-
662
- var _hashClear = hashClear$1;
663
-
664
- /**
665
- * Removes `key` and its value from the hash.
666
- *
667
- * @private
668
- * @name delete
669
- * @memberOf Hash
670
- * @param {Object} hash The hash to modify.
671
- * @param {string} key The key of the value to remove.
672
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
673
- */
674
-
675
- function hashDelete$1(key) {
676
- var result = this.has(key) && delete this.__data__[key];
677
- this.size -= result ? 1 : 0;
678
- return result;
679
- }
680
-
681
- var _hashDelete = hashDelete$1;
682
-
683
- var nativeCreate$2 = _nativeCreate;
684
-
685
- /** Used to stand-in for `undefined` hash values. */
686
- var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
687
-
688
- /** Used for built-in method references. */
689
- var objectProto$9 = Object.prototype;
690
-
691
- /** Used to check objects for own properties. */
692
- var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
693
-
694
- /**
695
- * Gets the hash value for `key`.
696
- *
697
- * @private
698
- * @name get
699
- * @memberOf Hash
700
- * @param {string} key The key of the value to get.
701
- * @returns {*} Returns the entry value.
702
- */
703
- function hashGet$1(key) {
704
- var data = this.__data__;
705
- if (nativeCreate$2) {
706
- var result = data[key];
707
- return result === HASH_UNDEFINED$1 ? undefined : result;
708
- }
709
- return hasOwnProperty$7.call(data, key) ? data[key] : undefined;
710
- }
711
-
712
- var _hashGet = hashGet$1;
713
-
714
- var nativeCreate$1 = _nativeCreate;
715
-
716
- /** Used for built-in method references. */
717
- var objectProto$8 = Object.prototype;
718
-
719
- /** Used to check objects for own properties. */
720
- var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
721
-
722
- /**
723
- * Checks if a hash value for `key` exists.
724
- *
725
- * @private
726
- * @name has
727
- * @memberOf Hash
728
- * @param {string} key The key of the entry to check.
729
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
730
- */
731
- function hashHas$1(key) {
732
- var data = this.__data__;
733
- return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$6.call(data, key);
734
- }
735
-
736
- var _hashHas = hashHas$1;
737
-
738
- var nativeCreate = _nativeCreate;
739
-
740
- /** Used to stand-in for `undefined` hash values. */
741
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
742
-
743
- /**
744
- * Sets the hash `key` to `value`.
745
- *
746
- * @private
747
- * @name set
748
- * @memberOf Hash
749
- * @param {string} key The key of the value to set.
750
- * @param {*} value The value to set.
751
- * @returns {Object} Returns the hash instance.
752
- */
753
- function hashSet$1(key, value) {
754
- var data = this.__data__;
755
- this.size += this.has(key) ? 0 : 1;
756
- data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
757
- return this;
758
- }
759
-
760
- var _hashSet = hashSet$1;
761
-
762
- var hashClear = _hashClear,
763
- hashDelete = _hashDelete,
764
- hashGet = _hashGet,
765
- hashHas = _hashHas,
766
- hashSet = _hashSet;
767
-
768
- /**
769
- * Creates a hash object.
770
- *
771
- * @private
772
- * @constructor
773
- * @param {Array} [entries] The key-value pairs to cache.
774
- */
775
- function Hash$1(entries) {
776
- var index = -1,
777
- length = entries == null ? 0 : entries.length;
778
-
779
- this.clear();
780
- while (++index < length) {
781
- var entry = entries[index];
782
- this.set(entry[0], entry[1]);
783
- }
784
- }
785
-
786
- // Add methods to `Hash`.
787
- Hash$1.prototype.clear = hashClear;
788
- Hash$1.prototype['delete'] = hashDelete;
789
- Hash$1.prototype.get = hashGet;
790
- Hash$1.prototype.has = hashHas;
791
- Hash$1.prototype.set = hashSet;
792
-
793
- var _Hash = Hash$1;
794
-
795
- var Hash = _Hash,
796
- ListCache$2 = _ListCache,
797
- Map$2 = _Map;
798
-
799
- /**
800
- * Removes all key-value entries from the map.
801
- *
802
- * @private
803
- * @name clear
804
- * @memberOf MapCache
805
- */
806
- function mapCacheClear$1() {
807
- this.size = 0;
808
- this.__data__ = {
809
- 'hash': new Hash,
810
- 'map': new (Map$2 || ListCache$2),
811
- 'string': new Hash
812
- };
813
- }
814
-
815
- var _mapCacheClear = mapCacheClear$1;
816
-
817
- /**
818
- * Checks if `value` is suitable for use as unique object key.
819
- *
820
- * @private
821
- * @param {*} value The value to check.
822
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
823
- */
824
-
825
- function isKeyable$1(value) {
826
- var type = typeof value;
827
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
828
- ? (value !== '__proto__')
829
- : (value === null);
830
- }
831
-
832
- var _isKeyable = isKeyable$1;
833
-
834
- var isKeyable = _isKeyable;
835
-
836
- /**
837
- * Gets the data for `map`.
838
- *
839
- * @private
840
- * @param {Object} map The map to query.
841
- * @param {string} key The reference key.
842
- * @returns {*} Returns the map data.
843
- */
844
- function getMapData$4(map, key) {
845
- var data = map.__data__;
846
- return isKeyable(key)
847
- ? data[typeof key == 'string' ? 'string' : 'hash']
848
- : data.map;
849
- }
850
-
851
- var _getMapData = getMapData$4;
852
-
853
- var getMapData$3 = _getMapData;
854
-
855
- /**
856
- * Removes `key` and its value from the map.
857
- *
858
- * @private
859
- * @name delete
860
- * @memberOf MapCache
861
- * @param {string} key The key of the value to remove.
862
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
863
- */
864
- function mapCacheDelete$1(key) {
865
- var result = getMapData$3(this, key)['delete'](key);
866
- this.size -= result ? 1 : 0;
867
- return result;
868
- }
869
-
870
- var _mapCacheDelete = mapCacheDelete$1;
871
-
872
- var getMapData$2 = _getMapData;
873
-
874
- /**
875
- * Gets the map value for `key`.
876
- *
877
- * @private
878
- * @name get
879
- * @memberOf MapCache
880
- * @param {string} key The key of the value to get.
881
- * @returns {*} Returns the entry value.
882
- */
883
- function mapCacheGet$1(key) {
884
- return getMapData$2(this, key).get(key);
885
- }
886
-
887
- var _mapCacheGet = mapCacheGet$1;
888
-
889
- var getMapData$1 = _getMapData;
890
-
891
- /**
892
- * Checks if a map value for `key` exists.
893
- *
894
- * @private
895
- * @name has
896
- * @memberOf MapCache
897
- * @param {string} key The key of the entry to check.
898
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
899
- */
900
- function mapCacheHas$1(key) {
901
- return getMapData$1(this, key).has(key);
902
- }
903
-
904
- var _mapCacheHas = mapCacheHas$1;
905
-
906
- var getMapData = _getMapData;
907
-
908
- /**
909
- * Sets the map `key` to `value`.
910
- *
911
- * @private
912
- * @name set
913
- * @memberOf MapCache
914
- * @param {string} key The key of the value to set.
915
- * @param {*} value The value to set.
916
- * @returns {Object} Returns the map cache instance.
917
- */
918
- function mapCacheSet$1(key, value) {
919
- var data = getMapData(this, key),
920
- size = data.size;
921
-
922
- data.set(key, value);
923
- this.size += data.size == size ? 0 : 1;
924
- return this;
925
- }
926
-
927
- var _mapCacheSet = mapCacheSet$1;
928
-
929
- var mapCacheClear = _mapCacheClear,
930
- mapCacheDelete = _mapCacheDelete,
931
- mapCacheGet = _mapCacheGet,
932
- mapCacheHas = _mapCacheHas,
933
- mapCacheSet = _mapCacheSet;
934
-
935
- /**
936
- * Creates a map cache object to store key-value pairs.
937
- *
938
- * @private
939
- * @constructor
940
- * @param {Array} [entries] The key-value pairs to cache.
941
- */
942
- function MapCache$2(entries) {
943
- var index = -1,
944
- length = entries == null ? 0 : entries.length;
945
-
946
- this.clear();
947
- while (++index < length) {
948
- var entry = entries[index];
949
- this.set(entry[0], entry[1]);
950
- }
951
- }
952
-
953
- // Add methods to `MapCache`.
954
- MapCache$2.prototype.clear = mapCacheClear;
955
- MapCache$2.prototype['delete'] = mapCacheDelete;
956
- MapCache$2.prototype.get = mapCacheGet;
957
- MapCache$2.prototype.has = mapCacheHas;
958
- MapCache$2.prototype.set = mapCacheSet;
959
-
960
- var _MapCache = MapCache$2;
961
-
962
- var ListCache$1 = _ListCache,
963
- Map$1 = _Map,
964
- MapCache$1 = _MapCache;
965
-
966
- /** Used as the size to enable large array optimizations. */
967
- var LARGE_ARRAY_SIZE = 200;
968
-
969
- /**
970
- * Sets the stack `key` to `value`.
971
- *
972
- * @private
973
- * @name set
974
- * @memberOf Stack
975
- * @param {string} key The key of the value to set.
976
- * @param {*} value The value to set.
977
- * @returns {Object} Returns the stack cache instance.
978
- */
979
- function stackSet$1(key, value) {
980
- var data = this.__data__;
981
- if (data instanceof ListCache$1) {
982
- var pairs = data.__data__;
983
- if (!Map$1 || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
984
- pairs.push([key, value]);
985
- this.size = ++data.size;
986
- return this;
987
- }
988
- data = this.__data__ = new MapCache$1(pairs);
989
- }
990
- data.set(key, value);
991
- this.size = data.size;
992
- return this;
993
- }
994
-
995
- var _stackSet = stackSet$1;
996
-
997
- var ListCache = _ListCache,
998
- stackClear = _stackClear,
999
- stackDelete = _stackDelete,
1000
- stackGet = _stackGet,
1001
- stackHas = _stackHas,
1002
- stackSet = _stackSet;
1003
-
1004
- /**
1005
- * Creates a stack cache object to store key-value pairs.
1006
- *
1007
- * @private
1008
- * @constructor
1009
- * @param {Array} [entries] The key-value pairs to cache.
1010
- */
1011
- function Stack$1(entries) {
1012
- var data = this.__data__ = new ListCache(entries);
1013
- this.size = data.size;
1014
- }
1015
-
1016
- // Add methods to `Stack`.
1017
- Stack$1.prototype.clear = stackClear;
1018
- Stack$1.prototype['delete'] = stackDelete;
1019
- Stack$1.prototype.get = stackGet;
1020
- Stack$1.prototype.has = stackHas;
1021
- Stack$1.prototype.set = stackSet;
1022
-
1023
- var _Stack = Stack$1;
1024
-
1025
- /**
1026
- * A specialized version of `_.forEach` for arrays without support for
1027
- * iteratee shorthands.
1028
- *
1029
- * @private
1030
- * @param {Array} [array] The array to iterate over.
1031
- * @param {Function} iteratee The function invoked per iteration.
1032
- * @returns {Array} Returns `array`.
1033
- */
1034
-
1035
- function arrayEach$1(array, iteratee) {
1036
- var index = -1,
1037
- length = array == null ? 0 : array.length;
1038
-
1039
- while (++index < length) {
1040
- if (iteratee(array[index], index, array) === false) {
1041
- break;
1042
- }
1043
- }
1044
- return array;
1045
- }
1046
-
1047
- var _arrayEach = arrayEach$1;
1048
-
1049
- var getNative$4 = _getNative;
1050
-
1051
- var defineProperty$1 = (function() {
1052
- try {
1053
- var func = getNative$4(Object, 'defineProperty');
1054
- func({}, '', {});
1055
- return func;
1056
- } catch (e) {}
1057
- }());
1058
-
1059
- var _defineProperty = defineProperty$1;
1060
-
1061
- var defineProperty = _defineProperty;
1062
-
1063
- /**
1064
- * The base implementation of `assignValue` and `assignMergeValue` without
1065
- * value checks.
1066
- *
1067
- * @private
1068
- * @param {Object} object The object to modify.
1069
- * @param {string} key The key of the property to assign.
1070
- * @param {*} value The value to assign.
1071
- */
1072
- function baseAssignValue$2(object, key, value) {
1073
- if (key == '__proto__' && defineProperty) {
1074
- defineProperty(object, key, {
1075
- 'configurable': true,
1076
- 'enumerable': true,
1077
- 'value': value,
1078
- 'writable': true
1079
- });
1080
- } else {
1081
- object[key] = value;
1082
- }
1083
- }
1084
-
1085
- var _baseAssignValue = baseAssignValue$2;
1086
-
1087
- var baseAssignValue$1 = _baseAssignValue,
1088
- eq = eq_1;
1089
-
1090
- /** Used for built-in method references. */
1091
- var objectProto$7 = Object.prototype;
1092
-
1093
- /** Used to check objects for own properties. */
1094
- var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
1095
-
1096
- /**
1097
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
1098
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1099
- * for equality comparisons.
1100
- *
1101
- * @private
1102
- * @param {Object} object The object to modify.
1103
- * @param {string} key The key of the property to assign.
1104
- * @param {*} value The value to assign.
1105
- */
1106
- function assignValue$2(object, key, value) {
1107
- var objValue = object[key];
1108
- if (!(hasOwnProperty$5.call(object, key) && eq(objValue, value)) ||
1109
- (value === undefined && !(key in object))) {
1110
- baseAssignValue$1(object, key, value);
1111
- }
1112
- }
1113
-
1114
- var _assignValue = assignValue$2;
1115
-
1116
- var assignValue$1 = _assignValue,
1117
- baseAssignValue = _baseAssignValue;
1118
-
1119
- /**
1120
- * Copies properties of `source` to `object`.
1121
- *
1122
- * @private
1123
- * @param {Object} source The object to copy properties from.
1124
- * @param {Array} props The property identifiers to copy.
1125
- * @param {Object} [object={}] The object to copy properties to.
1126
- * @param {Function} [customizer] The function to customize copied values.
1127
- * @returns {Object} Returns `object`.
1128
- */
1129
- function copyObject$4(source, props, object, customizer) {
1130
- var isNew = !object;
1131
- object || (object = {});
1132
-
1133
- var index = -1,
1134
- length = props.length;
1135
-
1136
- while (++index < length) {
1137
- var key = props[index];
1138
-
1139
- var newValue = customizer
1140
- ? customizer(object[key], source[key], key, object, source)
1141
- : undefined;
1142
-
1143
- if (newValue === undefined) {
1144
- newValue = source[key];
1145
- }
1146
- if (isNew) {
1147
- baseAssignValue(object, key, newValue);
1148
- } else {
1149
- assignValue$1(object, key, newValue);
1150
- }
1151
- }
1152
- return object;
1153
- }
1154
-
1155
- var _copyObject = copyObject$4;
1156
-
1157
- /**
1158
- * The base implementation of `_.times` without support for iteratee shorthands
1159
- * or max array length checks.
1160
- *
1161
- * @private
1162
- * @param {number} n The number of times to invoke `iteratee`.
1163
- * @param {Function} iteratee The function invoked per iteration.
1164
- * @returns {Array} Returns the array of results.
1165
- */
1166
-
1167
- function baseTimes$1(n, iteratee) {
1168
- var index = -1,
1169
- result = Array(n);
1170
-
1171
- while (++index < n) {
1172
- result[index] = iteratee(index);
1173
- }
1174
- return result;
1175
- }
1176
-
1177
- var _baseTimes = baseTimes$1;
1178
-
1179
- /**
1180
- * Checks if `value` is object-like. A value is object-like if it's not `null`
1181
- * and has a `typeof` result of "object".
1182
- *
1183
- * @static
1184
- * @memberOf _
1185
- * @since 4.0.0
1186
- * @category Lang
1187
- * @param {*} value The value to check.
1188
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
1189
- * @example
1190
- *
1191
- * _.isObjectLike({});
1192
- * // => true
1193
- *
1194
- * _.isObjectLike([1, 2, 3]);
1195
- * // => true
1196
- *
1197
- * _.isObjectLike(_.noop);
1198
- * // => false
1199
- *
1200
- * _.isObjectLike(null);
1201
- * // => false
1202
- */
1203
-
1204
- function isObjectLike$6(value) {
1205
- return value != null && typeof value == 'object';
1206
- }
1207
-
1208
- var isObjectLike_1 = isObjectLike$6;
1209
-
1210
- var baseGetTag$3 = _baseGetTag,
1211
- isObjectLike$5 = isObjectLike_1;
1212
-
1213
- /** `Object#toString` result references. */
1214
- var argsTag$2 = '[object Arguments]';
1215
-
1216
- /**
1217
- * The base implementation of `_.isArguments`.
1218
- *
1219
- * @private
1220
- * @param {*} value The value to check.
1221
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1222
- */
1223
- function baseIsArguments$1(value) {
1224
- return isObjectLike$5(value) && baseGetTag$3(value) == argsTag$2;
1225
- }
1226
-
1227
- var _baseIsArguments = baseIsArguments$1;
1228
-
1229
- var baseIsArguments = _baseIsArguments,
1230
- isObjectLike$4 = isObjectLike_1;
1231
-
1232
- /** Used for built-in method references. */
1233
- var objectProto$6 = Object.prototype;
1234
-
1235
- /** Used to check objects for own properties. */
1236
- var hasOwnProperty$4 = objectProto$6.hasOwnProperty;
1237
-
1238
- /** Built-in value references. */
1239
- var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
1240
-
1241
- /**
1242
- * Checks if `value` is likely an `arguments` object.
1243
- *
1244
- * @static
1245
- * @memberOf _
1246
- * @since 0.1.0
1247
- * @category Lang
1248
- * @param {*} value The value to check.
1249
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1250
- * else `false`.
1251
- * @example
1252
- *
1253
- * _.isArguments(function() { return arguments; }());
1254
- * // => true
1255
- *
1256
- * _.isArguments([1, 2, 3]);
1257
- * // => false
1258
- */
1259
- var isArguments$1 = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
1260
- return isObjectLike$4(value) && hasOwnProperty$4.call(value, 'callee') &&
1261
- !propertyIsEnumerable$1.call(value, 'callee');
1262
- };
1263
-
1264
- var isArguments_1 = isArguments$1;
1265
-
1266
- /**
1267
- * Checks if `value` is classified as an `Array` object.
1268
- *
1269
- * @static
1270
- * @memberOf _
1271
- * @since 0.1.0
1272
- * @category Lang
1273
- * @param {*} value The value to check.
1274
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
1275
- * @example
1276
- *
1277
- * _.isArray([1, 2, 3]);
1278
- * // => true
1279
- *
1280
- * _.isArray(document.body.children);
1281
- * // => false
1282
- *
1283
- * _.isArray('abc');
1284
- * // => false
1285
- *
1286
- * _.isArray(_.noop);
1287
- * // => false
1288
- */
1289
-
1290
- var isArray$6 = Array.isArray;
1291
-
1292
- var isArray_1 = isArray$6;
1293
-
1294
- var isBuffer$2 = {exports: {}};
1295
-
1296
- /**
1297
- * This method returns `false`.
1298
- *
1299
- * @static
1300
- * @memberOf _
1301
- * @since 4.13.0
1302
- * @category Util
1303
- * @returns {boolean} Returns `false`.
1304
- * @example
1305
- *
1306
- * _.times(2, _.stubFalse);
1307
- * // => [false, false]
1308
- */
1309
-
1310
- function stubFalse() {
1311
- return false;
1312
- }
1313
-
1314
- var stubFalse_1 = stubFalse;
1315
-
1316
- (function (module, exports) {
1317
- var root = _root,
1318
- stubFalse = stubFalse_1;
1319
-
1320
- /** Detect free variable `exports`. */
1321
- var freeExports = exports && !exports.nodeType && exports;
1322
-
1323
- /** Detect free variable `module`. */
1324
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
1325
-
1326
- /** Detect the popular CommonJS extension `module.exports`. */
1327
- var moduleExports = freeModule && freeModule.exports === freeExports;
1328
-
1329
- /** Built-in value references. */
1330
- var Buffer = moduleExports ? root.Buffer : undefined;
1331
-
1332
- /* Built-in method references for those with the same name as other `lodash` methods. */
1333
- var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
1334
-
1335
- /**
1336
- * Checks if `value` is a buffer.
1337
- *
1338
- * @static
1339
- * @memberOf _
1340
- * @since 4.3.0
1341
- * @category Lang
1342
- * @param {*} value The value to check.
1343
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
1344
- * @example
1345
- *
1346
- * _.isBuffer(new Buffer(2));
1347
- * // => true
1348
- *
1349
- * _.isBuffer(new Uint8Array(2));
1350
- * // => false
1351
- */
1352
- var isBuffer = nativeIsBuffer || stubFalse;
1353
-
1354
- module.exports = isBuffer;
1355
- }(isBuffer$2, isBuffer$2.exports));
1356
-
1357
- /** Used as references for various `Number` constants. */
1358
-
1359
- var MAX_SAFE_INTEGER$1 = 9007199254740991;
1360
-
1361
- /** Used to detect unsigned integer values. */
1362
- var reIsUint = /^(?:0|[1-9]\d*)$/;
1363
-
1364
- /**
1365
- * Checks if `value` is a valid array-like index.
1366
- *
1367
- * @private
1368
- * @param {*} value The value to check.
1369
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1370
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1371
- */
1372
- function isIndex$1(value, length) {
1373
- var type = typeof value;
1374
- length = length == null ? MAX_SAFE_INTEGER$1 : length;
1375
-
1376
- return !!length &&
1377
- (type == 'number' ||
1378
- (type != 'symbol' && reIsUint.test(value))) &&
1379
- (value > -1 && value % 1 == 0 && value < length);
1380
- }
1381
-
1382
- var _isIndex = isIndex$1;
1383
-
1384
- /** Used as references for various `Number` constants. */
1385
-
1386
- var MAX_SAFE_INTEGER = 9007199254740991;
1387
-
1388
- /**
1389
- * Checks if `value` is a valid array-like length.
1390
- *
1391
- * **Note:** This method is loosely based on
1392
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
1393
- *
1394
- * @static
1395
- * @memberOf _
1396
- * @since 4.0.0
1397
- * @category Lang
1398
- * @param {*} value The value to check.
1399
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
1400
- * @example
1401
- *
1402
- * _.isLength(3);
1403
- * // => true
1404
- *
1405
- * _.isLength(Number.MIN_VALUE);
1406
- * // => false
1407
- *
1408
- * _.isLength(Infinity);
1409
- * // => false
1410
- *
1411
- * _.isLength('3');
1412
- * // => false
1413
- */
1414
- function isLength$2(value) {
1415
- return typeof value == 'number' &&
1416
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
1417
- }
1418
-
1419
- var isLength_1 = isLength$2;
1420
-
1421
- var baseGetTag$2 = _baseGetTag,
1422
- isLength$1 = isLength_1,
1423
- isObjectLike$3 = isObjectLike_1;
1424
-
1425
- /** `Object#toString` result references. */
1426
- var argsTag$1 = '[object Arguments]',
1427
- arrayTag$1 = '[object Array]',
1428
- boolTag$2 = '[object Boolean]',
1429
- dateTag$2 = '[object Date]',
1430
- errorTag$1 = '[object Error]',
1431
- funcTag$1 = '[object Function]',
1432
- mapTag$4 = '[object Map]',
1433
- numberTag$2 = '[object Number]',
1434
- objectTag$2 = '[object Object]',
1435
- regexpTag$2 = '[object RegExp]',
1436
- setTag$4 = '[object Set]',
1437
- stringTag$2 = '[object String]',
1438
- weakMapTag$2 = '[object WeakMap]';
1439
-
1440
- var arrayBufferTag$2 = '[object ArrayBuffer]',
1441
- dataViewTag$3 = '[object DataView]',
1442
- float32Tag$2 = '[object Float32Array]',
1443
- float64Tag$2 = '[object Float64Array]',
1444
- int8Tag$2 = '[object Int8Array]',
1445
- int16Tag$2 = '[object Int16Array]',
1446
- int32Tag$2 = '[object Int32Array]',
1447
- uint8Tag$2 = '[object Uint8Array]',
1448
- uint8ClampedTag$2 = '[object Uint8ClampedArray]',
1449
- uint16Tag$2 = '[object Uint16Array]',
1450
- uint32Tag$2 = '[object Uint32Array]';
1451
-
1452
- /** Used to identify `toStringTag` values of typed arrays. */
1453
- var typedArrayTags = {};
1454
- typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] =
1455
- typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] =
1456
- typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] =
1457
- typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] =
1458
- typedArrayTags[uint32Tag$2] = true;
1459
- typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] =
1460
- typedArrayTags[arrayBufferTag$2] = typedArrayTags[boolTag$2] =
1461
- typedArrayTags[dataViewTag$3] = typedArrayTags[dateTag$2] =
1462
- typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] =
1463
- typedArrayTags[mapTag$4] = typedArrayTags[numberTag$2] =
1464
- typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$2] =
1465
- typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] =
1466
- typedArrayTags[weakMapTag$2] = false;
1467
-
1468
- /**
1469
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
1470
- *
1471
- * @private
1472
- * @param {*} value The value to check.
1473
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1474
- */
1475
- function baseIsTypedArray$1(value) {
1476
- return isObjectLike$3(value) &&
1477
- isLength$1(value.length) && !!typedArrayTags[baseGetTag$2(value)];
1478
- }
1479
-
1480
- var _baseIsTypedArray = baseIsTypedArray$1;
1481
-
1482
- /**
1483
- * The base implementation of `_.unary` without support for storing metadata.
1484
- *
1485
- * @private
1486
- * @param {Function} func The function to cap arguments for.
1487
- * @returns {Function} Returns the new capped function.
1488
- */
1489
-
1490
- function baseUnary$3(func) {
1491
- return function(value) {
1492
- return func(value);
1493
- };
1494
- }
1495
-
1496
- var _baseUnary = baseUnary$3;
1497
-
1498
- var _nodeUtil = {exports: {}};
1499
-
1500
- (function (module, exports) {
1501
- var freeGlobal = _freeGlobal;
1502
-
1503
- /** Detect free variable `exports`. */
1504
- var freeExports = exports && !exports.nodeType && exports;
1505
-
1506
- /** Detect free variable `module`. */
1507
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
1508
-
1509
- /** Detect the popular CommonJS extension `module.exports`. */
1510
- var moduleExports = freeModule && freeModule.exports === freeExports;
1511
-
1512
- /** Detect free variable `process` from Node.js. */
1513
- var freeProcess = moduleExports && freeGlobal.process;
1514
-
1515
- /** Used to access faster Node.js helpers. */
1516
- var nodeUtil = (function() {
1517
- try {
1518
- // Use `util.types` for Node.js 10+.
1519
- var types = freeModule && freeModule.require && freeModule.require('util').types;
1520
-
1521
- if (types) {
1522
- return types;
1523
- }
1524
-
1525
- // Legacy `process.binding('util')` for Node.js < 10.
1526
- return freeProcess && freeProcess.binding && freeProcess.binding('util');
1527
- } catch (e) {}
1528
- }());
1529
-
1530
- module.exports = nodeUtil;
1531
- }(_nodeUtil, _nodeUtil.exports));
1532
-
1533
- var baseIsTypedArray = _baseIsTypedArray,
1534
- baseUnary$2 = _baseUnary,
1535
- nodeUtil$2 = _nodeUtil.exports;
1536
-
1537
- /* Node.js helper references. */
1538
- var nodeIsTypedArray = nodeUtil$2 && nodeUtil$2.isTypedArray;
1539
-
1540
- /**
1541
- * Checks if `value` is classified as a typed array.
1542
- *
1543
- * @static
1544
- * @memberOf _
1545
- * @since 3.0.0
1546
- * @category Lang
1547
- * @param {*} value The value to check.
1548
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1549
- * @example
1550
- *
1551
- * _.isTypedArray(new Uint8Array);
1552
- * // => true
1553
- *
1554
- * _.isTypedArray([]);
1555
- * // => false
1556
- */
1557
- var isTypedArray$1 = nodeIsTypedArray ? baseUnary$2(nodeIsTypedArray) : baseIsTypedArray;
1558
-
1559
- var isTypedArray_1 = isTypedArray$1;
1560
-
1561
- var baseTimes = _baseTimes,
1562
- isArguments = isArguments_1,
1563
- isArray$5 = isArray_1,
1564
- isBuffer$1 = isBuffer$2.exports,
1565
- isIndex = _isIndex,
1566
- isTypedArray = isTypedArray_1;
1567
-
1568
- /** Used for built-in method references. */
1569
- var objectProto$5 = Object.prototype;
1570
-
1571
- /** Used to check objects for own properties. */
1572
- var hasOwnProperty$3 = objectProto$5.hasOwnProperty;
1573
-
1574
- /**
1575
- * Creates an array of the enumerable property names of the array-like `value`.
1576
- *
1577
- * @private
1578
- * @param {*} value The value to query.
1579
- * @param {boolean} inherited Specify returning inherited property names.
1580
- * @returns {Array} Returns the array of property names.
1581
- */
1582
- function arrayLikeKeys$2(value, inherited) {
1583
- var isArr = isArray$5(value),
1584
- isArg = !isArr && isArguments(value),
1585
- isBuff = !isArr && !isArg && isBuffer$1(value),
1586
- isType = !isArr && !isArg && !isBuff && isTypedArray(value),
1587
- skipIndexes = isArr || isArg || isBuff || isType,
1588
- result = skipIndexes ? baseTimes(value.length, String) : [],
1589
- length = result.length;
1590
-
1591
- for (var key in value) {
1592
- if ((inherited || hasOwnProperty$3.call(value, key)) &&
1593
- !(skipIndexes && (
1594
- // Safari 9 has enumerable `arguments.length` in strict mode.
1595
- key == 'length' ||
1596
- // Node.js 0.10 has enumerable non-index properties on buffers.
1597
- (isBuff && (key == 'offset' || key == 'parent')) ||
1598
- // PhantomJS 2 has enumerable non-index properties on typed arrays.
1599
- (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
1600
- // Skip index properties.
1601
- isIndex(key, length)
1602
- ))) {
1603
- result.push(key);
1604
- }
1605
- }
1606
- return result;
1607
- }
1608
-
1609
- var _arrayLikeKeys = arrayLikeKeys$2;
1610
-
1611
- /** Used for built-in method references. */
1612
-
1613
- var objectProto$4 = Object.prototype;
1614
-
1615
- /**
1616
- * Checks if `value` is likely a prototype object.
1617
- *
1618
- * @private
1619
- * @param {*} value The value to check.
1620
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
1621
- */
1622
- function isPrototype$3(value) {
1623
- var Ctor = value && value.constructor,
1624
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$4;
1625
-
1626
- return value === proto;
1627
- }
1628
-
1629
- var _isPrototype = isPrototype$3;
1630
-
1631
- /**
1632
- * Creates a unary function that invokes `func` with its argument transformed.
1633
- *
1634
- * @private
1635
- * @param {Function} func The function to wrap.
1636
- * @param {Function} transform The argument transform.
1637
- * @returns {Function} Returns the new function.
1638
- */
1639
-
1640
- function overArg$2(func, transform) {
1641
- return function(arg) {
1642
- return func(transform(arg));
1643
- };
1644
- }
1645
-
1646
- var _overArg = overArg$2;
1647
-
1648
- var overArg$1 = _overArg;
1649
-
1650
- /* Built-in method references for those with the same name as other `lodash` methods. */
1651
- var nativeKeys$1 = overArg$1(Object.keys, Object);
1652
-
1653
- var _nativeKeys = nativeKeys$1;
1654
-
1655
- var isPrototype$2 = _isPrototype,
1656
- nativeKeys = _nativeKeys;
1657
-
1658
- /** Used for built-in method references. */
1659
- var objectProto$3 = Object.prototype;
1660
-
1661
- /** Used to check objects for own properties. */
1662
- var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
1663
-
1664
- /**
1665
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
1666
- *
1667
- * @private
1668
- * @param {Object} object The object to query.
1669
- * @returns {Array} Returns the array of property names.
1670
- */
1671
- function baseKeys$1(object) {
1672
- if (!isPrototype$2(object)) {
1673
- return nativeKeys(object);
1674
- }
1675
- var result = [];
1676
- for (var key in Object(object)) {
1677
- if (hasOwnProperty$2.call(object, key) && key != 'constructor') {
1678
- result.push(key);
1679
- }
1680
- }
1681
- return result;
1682
- }
1683
-
1684
- var _baseKeys = baseKeys$1;
1685
-
1686
- var isFunction = isFunction_1,
1687
- isLength = isLength_1;
1688
-
1689
- /**
1690
- * Checks if `value` is array-like. A value is considered array-like if it's
1691
- * not a function and has a `value.length` that's an integer greater than or
1692
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
1693
- *
1694
- * @static
1695
- * @memberOf _
1696
- * @since 4.0.0
1697
- * @category Lang
1698
- * @param {*} value The value to check.
1699
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
1700
- * @example
1701
- *
1702
- * _.isArrayLike([1, 2, 3]);
1703
- * // => true
1704
- *
1705
- * _.isArrayLike(document.body.children);
1706
- * // => true
1707
- *
1708
- * _.isArrayLike('abc');
1709
- * // => true
1710
- *
1711
- * _.isArrayLike(_.noop);
1712
- * // => false
1713
- */
1714
- function isArrayLike$2(value) {
1715
- return value != null && isLength(value.length) && !isFunction(value);
1716
- }
1717
-
1718
- var isArrayLike_1 = isArrayLike$2;
1719
-
1720
- var arrayLikeKeys$1 = _arrayLikeKeys,
1721
- baseKeys = _baseKeys,
1722
- isArrayLike$1 = isArrayLike_1;
1723
-
1724
- /**
1725
- * Creates an array of the own enumerable property names of `object`.
1726
- *
1727
- * **Note:** Non-object values are coerced to objects. See the
1728
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1729
- * for more details.
1730
- *
1731
- * @static
1732
- * @since 0.1.0
1733
- * @memberOf _
1734
- * @category Object
1735
- * @param {Object} object The object to query.
1736
- * @returns {Array} Returns the array of property names.
1737
- * @example
1738
- *
1739
- * function Foo() {
1740
- * this.a = 1;
1741
- * this.b = 2;
1742
- * }
1743
- *
1744
- * Foo.prototype.c = 3;
1745
- *
1746
- * _.keys(new Foo);
1747
- * // => ['a', 'b'] (iteration order is not guaranteed)
1748
- *
1749
- * _.keys('hi');
1750
- * // => ['0', '1']
1751
- */
1752
- function keys$3(object) {
1753
- return isArrayLike$1(object) ? arrayLikeKeys$1(object) : baseKeys(object);
1754
- }
1755
-
1756
- var keys_1 = keys$3;
1757
-
1758
- var copyObject$3 = _copyObject,
1759
- keys$2 = keys_1;
1760
-
1761
- /**
1762
- * The base implementation of `_.assign` without support for multiple sources
1763
- * or `customizer` functions.
1764
- *
1765
- * @private
1766
- * @param {Object} object The destination object.
1767
- * @param {Object} source The source object.
1768
- * @returns {Object} Returns `object`.
1769
- */
1770
- function baseAssign$1(object, source) {
1771
- return object && copyObject$3(source, keys$2(source), object);
1772
- }
1773
-
1774
- var _baseAssign = baseAssign$1;
1775
-
1776
- /**
1777
- * This function is like
1778
- * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1779
- * except that it includes inherited enumerable properties.
1780
- *
1781
- * @private
1782
- * @param {Object} object The object to query.
1783
- * @returns {Array} Returns the array of property names.
1784
- */
1785
-
1786
- function nativeKeysIn$1(object) {
1787
- var result = [];
1788
- if (object != null) {
1789
- for (var key in Object(object)) {
1790
- result.push(key);
1791
- }
1792
- }
1793
- return result;
1794
- }
1795
-
1796
- var _nativeKeysIn = nativeKeysIn$1;
1797
-
1798
- var isObject$2 = isObject_1,
1799
- isPrototype$1 = _isPrototype,
1800
- nativeKeysIn = _nativeKeysIn;
1801
-
1802
- /** Used for built-in method references. */
1803
- var objectProto$2 = Object.prototype;
1804
-
1805
- /** Used to check objects for own properties. */
1806
- var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
1807
-
1808
- /**
1809
- * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
1810
- *
1811
- * @private
1812
- * @param {Object} object The object to query.
1813
- * @returns {Array} Returns the array of property names.
1814
- */
1815
- function baseKeysIn$1(object) {
1816
- if (!isObject$2(object)) {
1817
- return nativeKeysIn(object);
1818
- }
1819
- var isProto = isPrototype$1(object),
1820
- result = [];
1821
-
1822
- for (var key in object) {
1823
- if (!(key == 'constructor' && (isProto || !hasOwnProperty$1.call(object, key)))) {
1824
- result.push(key);
1825
- }
1826
- }
1827
- return result;
1828
- }
1829
-
1830
- var _baseKeysIn = baseKeysIn$1;
1831
-
1832
- var arrayLikeKeys = _arrayLikeKeys,
1833
- baseKeysIn = _baseKeysIn,
1834
- isArrayLike = isArrayLike_1;
1835
-
1836
- /**
1837
- * Creates an array of the own and inherited enumerable property names of `object`.
1838
- *
1839
- * **Note:** Non-object values are coerced to objects.
1840
- *
1841
- * @static
1842
- * @memberOf _
1843
- * @since 3.0.0
1844
- * @category Object
1845
- * @param {Object} object The object to query.
1846
- * @returns {Array} Returns the array of property names.
1847
- * @example
1848
- *
1849
- * function Foo() {
1850
- * this.a = 1;
1851
- * this.b = 2;
1852
- * }
1853
- *
1854
- * Foo.prototype.c = 3;
1855
- *
1856
- * _.keysIn(new Foo);
1857
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
1858
- */
1859
- function keysIn$3(object) {
1860
- return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
1861
- }
1862
-
1863
- var keysIn_1 = keysIn$3;
1864
-
1865
- var copyObject$2 = _copyObject,
1866
- keysIn$2 = keysIn_1;
1867
-
1868
- /**
1869
- * The base implementation of `_.assignIn` without support for multiple sources
1870
- * or `customizer` functions.
1871
- *
1872
- * @private
1873
- * @param {Object} object The destination object.
1874
- * @param {Object} source The source object.
1875
- * @returns {Object} Returns `object`.
1876
- */
1877
- function baseAssignIn$1(object, source) {
1878
- return object && copyObject$2(source, keysIn$2(source), object);
1879
- }
1880
-
1881
- var _baseAssignIn = baseAssignIn$1;
1882
-
1883
- var _cloneBuffer = {exports: {}};
1884
-
1885
- (function (module, exports) {
1886
- var root = _root;
1887
-
1888
- /** Detect free variable `exports`. */
1889
- var freeExports = exports && !exports.nodeType && exports;
1890
-
1891
- /** Detect free variable `module`. */
1892
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
1893
-
1894
- /** Detect the popular CommonJS extension `module.exports`. */
1895
- var moduleExports = freeModule && freeModule.exports === freeExports;
1896
-
1897
- /** Built-in value references. */
1898
- var Buffer = moduleExports ? root.Buffer : undefined,
1899
- allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
1900
-
1901
- /**
1902
- * Creates a clone of `buffer`.
1903
- *
1904
- * @private
1905
- * @param {Buffer} buffer The buffer to clone.
1906
- * @param {boolean} [isDeep] Specify a deep clone.
1907
- * @returns {Buffer} Returns the cloned buffer.
1908
- */
1909
- function cloneBuffer(buffer, isDeep) {
1910
- if (isDeep) {
1911
- return buffer.slice();
1912
- }
1913
- var length = buffer.length,
1914
- result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
1915
-
1916
- buffer.copy(result);
1917
- return result;
1918
- }
1919
-
1920
- module.exports = cloneBuffer;
1921
- }(_cloneBuffer, _cloneBuffer.exports));
1922
-
1923
- /**
1924
- * Copies the values of `source` to `array`.
1925
- *
1926
- * @private
1927
- * @param {Array} source The array to copy values from.
1928
- * @param {Array} [array=[]] The array to copy values to.
1929
- * @returns {Array} Returns `array`.
1930
- */
1931
-
1932
- function copyArray$1(source, array) {
1933
- var index = -1,
1934
- length = source.length;
1935
-
1936
- array || (array = Array(length));
1937
- while (++index < length) {
1938
- array[index] = source[index];
1939
- }
1940
- return array;
1941
- }
1942
-
1943
- var _copyArray = copyArray$1;
1944
-
1945
- /**
1946
- * A specialized version of `_.filter` for arrays without support for
1947
- * iteratee shorthands.
1948
- *
1949
- * @private
1950
- * @param {Array} [array] The array to iterate over.
1951
- * @param {Function} predicate The function invoked per iteration.
1952
- * @returns {Array} Returns the new filtered array.
1953
- */
1954
-
1955
- function arrayFilter$1(array, predicate) {
1956
- var index = -1,
1957
- length = array == null ? 0 : array.length,
1958
- resIndex = 0,
1959
- result = [];
1960
-
1961
- while (++index < length) {
1962
- var value = array[index];
1963
- if (predicate(value, index, array)) {
1964
- result[resIndex++] = value;
1965
- }
1966
- }
1967
- return result;
1968
- }
1969
-
1970
- var _arrayFilter = arrayFilter$1;
1971
-
1972
- /**
1973
- * This method returns a new empty array.
1974
- *
1975
- * @static
1976
- * @memberOf _
1977
- * @since 4.13.0
1978
- * @category Util
1979
- * @returns {Array} Returns the new empty array.
1980
- * @example
1981
- *
1982
- * var arrays = _.times(2, _.stubArray);
1983
- *
1984
- * console.log(arrays);
1985
- * // => [[], []]
1986
- *
1987
- * console.log(arrays[0] === arrays[1]);
1988
- * // => false
1989
- */
1990
-
1991
- function stubArray$2() {
1992
- return [];
1993
- }
1994
-
1995
- var stubArray_1 = stubArray$2;
1996
-
1997
- var arrayFilter = _arrayFilter,
1998
- stubArray$1 = stubArray_1;
1999
-
2000
- /** Used for built-in method references. */
2001
- var objectProto$1 = Object.prototype;
2002
-
2003
- /** Built-in value references. */
2004
- var propertyIsEnumerable = objectProto$1.propertyIsEnumerable;
2005
-
2006
- /* Built-in method references for those with the same name as other `lodash` methods. */
2007
- var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
2008
-
2009
- /**
2010
- * Creates an array of the own enumerable symbols of `object`.
2011
- *
2012
- * @private
2013
- * @param {Object} object The object to query.
2014
- * @returns {Array} Returns the array of symbols.
2015
- */
2016
- var getSymbols$3 = !nativeGetSymbols$1 ? stubArray$1 : function(object) {
2017
- if (object == null) {
2018
- return [];
2019
- }
2020
- object = Object(object);
2021
- return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
2022
- return propertyIsEnumerable.call(object, symbol);
2023
- });
2024
- };
2025
-
2026
- var _getSymbols = getSymbols$3;
2027
-
2028
- var copyObject$1 = _copyObject,
2029
- getSymbols$2 = _getSymbols;
2030
-
2031
- /**
2032
- * Copies own symbols of `source` to `object`.
2033
- *
2034
- * @private
2035
- * @param {Object} source The object to copy symbols from.
2036
- * @param {Object} [object={}] The object to copy symbols to.
2037
- * @returns {Object} Returns `object`.
2038
- */
2039
- function copySymbols$1(source, object) {
2040
- return copyObject$1(source, getSymbols$2(source), object);
2041
- }
2042
-
2043
- var _copySymbols = copySymbols$1;
2044
-
2045
- /**
2046
- * Appends the elements of `values` to `array`.
2047
- *
2048
- * @private
2049
- * @param {Array} array The array to modify.
2050
- * @param {Array} values The values to append.
2051
- * @returns {Array} Returns `array`.
2052
- */
2053
-
2054
- function arrayPush$2(array, values) {
2055
- var index = -1,
2056
- length = values.length,
2057
- offset = array.length;
2058
-
2059
- while (++index < length) {
2060
- array[offset + index] = values[index];
2061
- }
2062
- return array;
2063
- }
2064
-
2065
- var _arrayPush = arrayPush$2;
2066
-
2067
- var overArg = _overArg;
2068
-
2069
- /** Built-in value references. */
2070
- var getPrototype$2 = overArg(Object.getPrototypeOf, Object);
2071
-
2072
- var _getPrototype = getPrototype$2;
2073
-
2074
- var arrayPush$1 = _arrayPush,
2075
- getPrototype$1 = _getPrototype,
2076
- getSymbols$1 = _getSymbols,
2077
- stubArray = stubArray_1;
2078
-
2079
- /* Built-in method references for those with the same name as other `lodash` methods. */
2080
- var nativeGetSymbols = Object.getOwnPropertySymbols;
2081
-
2082
- /**
2083
- * Creates an array of the own and inherited enumerable symbols of `object`.
2084
- *
2085
- * @private
2086
- * @param {Object} object The object to query.
2087
- * @returns {Array} Returns the array of symbols.
2088
- */
2089
- var getSymbolsIn$2 = !nativeGetSymbols ? stubArray : function(object) {
2090
- var result = [];
2091
- while (object) {
2092
- arrayPush$1(result, getSymbols$1(object));
2093
- object = getPrototype$1(object);
2094
- }
2095
- return result;
2096
- };
2097
-
2098
- var _getSymbolsIn = getSymbolsIn$2;
2099
-
2100
- var copyObject = _copyObject,
2101
- getSymbolsIn$1 = _getSymbolsIn;
2102
-
2103
- /**
2104
- * Copies own and inherited symbols of `source` to `object`.
2105
- *
2106
- * @private
2107
- * @param {Object} source The object to copy symbols from.
2108
- * @param {Object} [object={}] The object to copy symbols to.
2109
- * @returns {Object} Returns `object`.
2110
- */
2111
- function copySymbolsIn$1(source, object) {
2112
- return copyObject(source, getSymbolsIn$1(source), object);
2113
- }
2114
-
2115
- var _copySymbolsIn = copySymbolsIn$1;
2116
-
2117
- var arrayPush = _arrayPush,
2118
- isArray$4 = isArray_1;
2119
-
2120
- /**
2121
- * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
2122
- * `keysFunc` and `symbolsFunc` to get the enumerable property names and
2123
- * symbols of `object`.
2124
- *
2125
- * @private
2126
- * @param {Object} object The object to query.
2127
- * @param {Function} keysFunc The function to get the keys of `object`.
2128
- * @param {Function} symbolsFunc The function to get the symbols of `object`.
2129
- * @returns {Array} Returns the array of property names and symbols.
2130
- */
2131
- function baseGetAllKeys$2(object, keysFunc, symbolsFunc) {
2132
- var result = keysFunc(object);
2133
- return isArray$4(object) ? result : arrayPush(result, symbolsFunc(object));
2134
- }
2135
-
2136
- var _baseGetAllKeys = baseGetAllKeys$2;
2137
-
2138
- var baseGetAllKeys$1 = _baseGetAllKeys,
2139
- getSymbols = _getSymbols,
2140
- keys$1 = keys_1;
2141
-
2142
- /**
2143
- * Creates an array of own enumerable property names and symbols of `object`.
2144
- *
2145
- * @private
2146
- * @param {Object} object The object to query.
2147
- * @returns {Array} Returns the array of property names and symbols.
2148
- */
2149
- function getAllKeys$1(object) {
2150
- return baseGetAllKeys$1(object, keys$1, getSymbols);
2151
- }
2152
-
2153
- var _getAllKeys = getAllKeys$1;
2154
-
2155
- var baseGetAllKeys = _baseGetAllKeys,
2156
- getSymbolsIn = _getSymbolsIn,
2157
- keysIn$1 = keysIn_1;
2158
-
2159
- /**
2160
- * Creates an array of own and inherited enumerable property names and
2161
- * symbols of `object`.
2162
- *
2163
- * @private
2164
- * @param {Object} object The object to query.
2165
- * @returns {Array} Returns the array of property names and symbols.
2166
- */
2167
- function getAllKeysIn$1(object) {
2168
- return baseGetAllKeys(object, keysIn$1, getSymbolsIn);
2169
- }
2170
-
2171
- var _getAllKeysIn = getAllKeysIn$1;
2172
-
2173
- var getNative$3 = _getNative,
2174
- root$4 = _root;
2175
-
2176
- /* Built-in method references that are verified to be native. */
2177
- var DataView$1 = getNative$3(root$4, 'DataView');
2178
-
2179
- var _DataView = DataView$1;
2180
-
2181
- var getNative$2 = _getNative,
2182
- root$3 = _root;
2183
-
2184
- /* Built-in method references that are verified to be native. */
2185
- var Promise$2 = getNative$2(root$3, 'Promise');
2186
-
2187
- var _Promise = Promise$2;
2188
-
2189
- var getNative$1 = _getNative,
2190
- root$2 = _root;
2191
-
2192
- /* Built-in method references that are verified to be native. */
2193
- var Set$1 = getNative$1(root$2, 'Set');
2194
-
2195
- var _Set = Set$1;
2196
-
2197
- var getNative = _getNative,
2198
- root$1 = _root;
2199
-
2200
- /* Built-in method references that are verified to be native. */
2201
- var WeakMap$1 = getNative(root$1, 'WeakMap');
2202
-
2203
- var _WeakMap = WeakMap$1;
2204
-
2205
- var DataView = _DataView,
2206
- Map = _Map,
2207
- Promise$1 = _Promise,
2208
- Set = _Set,
2209
- WeakMap = _WeakMap,
2210
- baseGetTag$1 = _baseGetTag,
2211
- toSource = _toSource;
2212
-
2213
- /** `Object#toString` result references. */
2214
- var mapTag$3 = '[object Map]',
2215
- objectTag$1 = '[object Object]',
2216
- promiseTag = '[object Promise]',
2217
- setTag$3 = '[object Set]',
2218
- weakMapTag$1 = '[object WeakMap]';
2219
-
2220
- var dataViewTag$2 = '[object DataView]';
2221
-
2222
- /** Used to detect maps, sets, and weakmaps. */
2223
- var dataViewCtorString = toSource(DataView),
2224
- mapCtorString = toSource(Map),
2225
- promiseCtorString = toSource(Promise$1),
2226
- setCtorString = toSource(Set),
2227
- weakMapCtorString = toSource(WeakMap);
2228
-
2229
- /**
2230
- * Gets the `toStringTag` of `value`.
2231
- *
2232
- * @private
2233
- * @param {*} value The value to query.
2234
- * @returns {string} Returns the `toStringTag`.
2235
- */
2236
- var getTag$3 = baseGetTag$1;
2237
-
2238
- // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
2239
- if ((DataView && getTag$3(new DataView(new ArrayBuffer(1))) != dataViewTag$2) ||
2240
- (Map && getTag$3(new Map) != mapTag$3) ||
2241
- (Promise$1 && getTag$3(Promise$1.resolve()) != promiseTag) ||
2242
- (Set && getTag$3(new Set) != setTag$3) ||
2243
- (WeakMap && getTag$3(new WeakMap) != weakMapTag$1)) {
2244
- getTag$3 = function(value) {
2245
- var result = baseGetTag$1(value),
2246
- Ctor = result == objectTag$1 ? value.constructor : undefined,
2247
- ctorString = Ctor ? toSource(Ctor) : '';
2248
-
2249
- if (ctorString) {
2250
- switch (ctorString) {
2251
- case dataViewCtorString: return dataViewTag$2;
2252
- case mapCtorString: return mapTag$3;
2253
- case promiseCtorString: return promiseTag;
2254
- case setCtorString: return setTag$3;
2255
- case weakMapCtorString: return weakMapTag$1;
2256
- }
2257
- }
2258
- return result;
2259
- };
2260
- }
2261
-
2262
- var _getTag = getTag$3;
2263
-
2264
- /** Used for built-in method references. */
2265
-
2266
- var objectProto = Object.prototype;
2267
-
2268
- /** Used to check objects for own properties. */
2269
- var hasOwnProperty = objectProto.hasOwnProperty;
2270
-
2271
- /**
2272
- * Initializes an array clone.
2273
- *
2274
- * @private
2275
- * @param {Array} array The array to clone.
2276
- * @returns {Array} Returns the initialized clone.
2277
- */
2278
- function initCloneArray$1(array) {
2279
- var length = array.length,
2280
- result = new array.constructor(length);
2281
-
2282
- // Add properties assigned by `RegExp#exec`.
2283
- if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
2284
- result.index = array.index;
2285
- result.input = array.input;
2286
- }
2287
- return result;
2288
- }
2289
-
2290
- var _initCloneArray = initCloneArray$1;
2291
-
2292
- var root = _root;
2293
-
2294
- /** Built-in value references. */
2295
- var Uint8Array$1 = root.Uint8Array;
2296
-
2297
- var _Uint8Array = Uint8Array$1;
2298
-
2299
- var Uint8Array = _Uint8Array;
2300
-
2301
- /**
2302
- * Creates a clone of `arrayBuffer`.
2303
- *
2304
- * @private
2305
- * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
2306
- * @returns {ArrayBuffer} Returns the cloned array buffer.
2307
- */
2308
- function cloneArrayBuffer$3(arrayBuffer) {
2309
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
2310
- new Uint8Array(result).set(new Uint8Array(arrayBuffer));
2311
- return result;
2312
- }
2313
-
2314
- var _cloneArrayBuffer = cloneArrayBuffer$3;
2315
-
2316
- var cloneArrayBuffer$2 = _cloneArrayBuffer;
2317
-
2318
- /**
2319
- * Creates a clone of `dataView`.
2320
- *
2321
- * @private
2322
- * @param {Object} dataView The data view to clone.
2323
- * @param {boolean} [isDeep] Specify a deep clone.
2324
- * @returns {Object} Returns the cloned data view.
2325
- */
2326
- function cloneDataView$1(dataView, isDeep) {
2327
- var buffer = isDeep ? cloneArrayBuffer$2(dataView.buffer) : dataView.buffer;
2328
- return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
2329
- }
2330
-
2331
- var _cloneDataView = cloneDataView$1;
2332
-
2333
- /** Used to match `RegExp` flags from their coerced string values. */
2334
-
2335
- var reFlags = /\w*$/;
2336
-
2337
- /**
2338
- * Creates a clone of `regexp`.
2339
- *
2340
- * @private
2341
- * @param {Object} regexp The regexp to clone.
2342
- * @returns {Object} Returns the cloned regexp.
2343
- */
2344
- function cloneRegExp$1(regexp) {
2345
- var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
2346
- result.lastIndex = regexp.lastIndex;
2347
- return result;
2348
- }
2349
-
2350
- var _cloneRegExp = cloneRegExp$1;
2351
-
2352
- var Symbol$1 = _Symbol;
2353
-
2354
- /** Used to convert symbols to primitives and strings. */
2355
- var symbolProto$1 = Symbol$1 ? Symbol$1.prototype : undefined,
2356
- symbolValueOf = symbolProto$1 ? symbolProto$1.valueOf : undefined;
2357
-
2358
- /**
2359
- * Creates a clone of the `symbol` object.
2360
- *
2361
- * @private
2362
- * @param {Object} symbol The symbol object to clone.
2363
- * @returns {Object} Returns the cloned symbol object.
2364
- */
2365
- function cloneSymbol$1(symbol) {
2366
- return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
2367
- }
2368
-
2369
- var _cloneSymbol = cloneSymbol$1;
2370
-
2371
- var cloneArrayBuffer$1 = _cloneArrayBuffer;
2372
-
2373
- /**
2374
- * Creates a clone of `typedArray`.
2375
- *
2376
- * @private
2377
- * @param {Object} typedArray The typed array to clone.
2378
- * @param {boolean} [isDeep] Specify a deep clone.
2379
- * @returns {Object} Returns the cloned typed array.
2380
- */
2381
- function cloneTypedArray$1(typedArray, isDeep) {
2382
- var buffer = isDeep ? cloneArrayBuffer$1(typedArray.buffer) : typedArray.buffer;
2383
- return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
2384
- }
2385
-
2386
- var _cloneTypedArray = cloneTypedArray$1;
2387
-
2388
- var cloneArrayBuffer = _cloneArrayBuffer,
2389
- cloneDataView = _cloneDataView,
2390
- cloneRegExp = _cloneRegExp,
2391
- cloneSymbol = _cloneSymbol,
2392
- cloneTypedArray = _cloneTypedArray;
2393
-
2394
- /** `Object#toString` result references. */
2395
- var boolTag$1 = '[object Boolean]',
2396
- dateTag$1 = '[object Date]',
2397
- mapTag$2 = '[object Map]',
2398
- numberTag$1 = '[object Number]',
2399
- regexpTag$1 = '[object RegExp]',
2400
- setTag$2 = '[object Set]',
2401
- stringTag$1 = '[object String]',
2402
- symbolTag$2 = '[object Symbol]';
2403
-
2404
- var arrayBufferTag$1 = '[object ArrayBuffer]',
2405
- dataViewTag$1 = '[object DataView]',
2406
- float32Tag$1 = '[object Float32Array]',
2407
- float64Tag$1 = '[object Float64Array]',
2408
- int8Tag$1 = '[object Int8Array]',
2409
- int16Tag$1 = '[object Int16Array]',
2410
- int32Tag$1 = '[object Int32Array]',
2411
- uint8Tag$1 = '[object Uint8Array]',
2412
- uint8ClampedTag$1 = '[object Uint8ClampedArray]',
2413
- uint16Tag$1 = '[object Uint16Array]',
2414
- uint32Tag$1 = '[object Uint32Array]';
2415
-
2416
- /**
2417
- * Initializes an object clone based on its `toStringTag`.
2418
- *
2419
- * **Note:** This function only supports cloning values with tags of
2420
- * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
2421
- *
2422
- * @private
2423
- * @param {Object} object The object to clone.
2424
- * @param {string} tag The `toStringTag` of the object to clone.
2425
- * @param {boolean} [isDeep] Specify a deep clone.
2426
- * @returns {Object} Returns the initialized clone.
2427
- */
2428
- function initCloneByTag$1(object, tag, isDeep) {
2429
- var Ctor = object.constructor;
2430
- switch (tag) {
2431
- case arrayBufferTag$1:
2432
- return cloneArrayBuffer(object);
2433
-
2434
- case boolTag$1:
2435
- case dateTag$1:
2436
- return new Ctor(+object);
2437
-
2438
- case dataViewTag$1:
2439
- return cloneDataView(object, isDeep);
2440
-
2441
- case float32Tag$1: case float64Tag$1:
2442
- case int8Tag$1: case int16Tag$1: case int32Tag$1:
2443
- case uint8Tag$1: case uint8ClampedTag$1: case uint16Tag$1: case uint32Tag$1:
2444
- return cloneTypedArray(object, isDeep);
2445
-
2446
- case mapTag$2:
2447
- return new Ctor;
2448
-
2449
- case numberTag$1:
2450
- case stringTag$1:
2451
- return new Ctor(object);
2452
-
2453
- case regexpTag$1:
2454
- return cloneRegExp(object);
2455
-
2456
- case setTag$2:
2457
- return new Ctor;
2458
-
2459
- case symbolTag$2:
2460
- return cloneSymbol(object);
2461
- }
2462
- }
2463
-
2464
- var _initCloneByTag = initCloneByTag$1;
2465
-
2466
- var isObject$1 = isObject_1;
2467
-
2468
- /** Built-in value references. */
2469
- var objectCreate = Object.create;
2470
-
2471
- /**
2472
- * The base implementation of `_.create` without support for assigning
2473
- * properties to the created object.
2474
- *
2475
- * @private
2476
- * @param {Object} proto The object to inherit from.
2477
- * @returns {Object} Returns the new object.
2478
- */
2479
- var baseCreate$1 = (function() {
2480
- function object() {}
2481
- return function(proto) {
2482
- if (!isObject$1(proto)) {
2483
- return {};
2484
- }
2485
- if (objectCreate) {
2486
- return objectCreate(proto);
2487
- }
2488
- object.prototype = proto;
2489
- var result = new object;
2490
- object.prototype = undefined;
2491
- return result;
2492
- };
2493
- }());
2494
-
2495
- var _baseCreate = baseCreate$1;
2496
-
2497
- var baseCreate = _baseCreate,
2498
- getPrototype = _getPrototype,
2499
- isPrototype = _isPrototype;
2500
-
2501
- /**
2502
- * Initializes an object clone.
2503
- *
2504
- * @private
2505
- * @param {Object} object The object to clone.
2506
- * @returns {Object} Returns the initialized clone.
2507
- */
2508
- function initCloneObject$1(object) {
2509
- return (typeof object.constructor == 'function' && !isPrototype(object))
2510
- ? baseCreate(getPrototype(object))
2511
- : {};
2512
- }
2513
-
2514
- var _initCloneObject = initCloneObject$1;
2515
-
2516
- var getTag$2 = _getTag,
2517
- isObjectLike$2 = isObjectLike_1;
2518
-
2519
- /** `Object#toString` result references. */
2520
- var mapTag$1 = '[object Map]';
2521
-
2522
- /**
2523
- * The base implementation of `_.isMap` without Node.js optimizations.
2524
- *
2525
- * @private
2526
- * @param {*} value The value to check.
2527
- * @returns {boolean} Returns `true` if `value` is a map, else `false`.
2528
- */
2529
- function baseIsMap$1(value) {
2530
- return isObjectLike$2(value) && getTag$2(value) == mapTag$1;
2531
- }
2532
-
2533
- var _baseIsMap = baseIsMap$1;
2534
-
2535
- var baseIsMap = _baseIsMap,
2536
- baseUnary$1 = _baseUnary,
2537
- nodeUtil$1 = _nodeUtil.exports;
2538
-
2539
- /* Node.js helper references. */
2540
- var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
2541
-
2542
- /**
2543
- * Checks if `value` is classified as a `Map` object.
2544
- *
2545
- * @static
2546
- * @memberOf _
2547
- * @since 4.3.0
2548
- * @category Lang
2549
- * @param {*} value The value to check.
2550
- * @returns {boolean} Returns `true` if `value` is a map, else `false`.
2551
- * @example
2552
- *
2553
- * _.isMap(new Map);
2554
- * // => true
2555
- *
2556
- * _.isMap(new WeakMap);
2557
- * // => false
2558
- */
2559
- var isMap$1 = nodeIsMap ? baseUnary$1(nodeIsMap) : baseIsMap;
2560
-
2561
- var isMap_1 = isMap$1;
2562
-
2563
- var getTag$1 = _getTag,
2564
- isObjectLike$1 = isObjectLike_1;
2565
-
2566
- /** `Object#toString` result references. */
2567
- var setTag$1 = '[object Set]';
2568
-
2569
- /**
2570
- * The base implementation of `_.isSet` without Node.js optimizations.
2571
- *
2572
- * @private
2573
- * @param {*} value The value to check.
2574
- * @returns {boolean} Returns `true` if `value` is a set, else `false`.
2575
- */
2576
- function baseIsSet$1(value) {
2577
- return isObjectLike$1(value) && getTag$1(value) == setTag$1;
2578
- }
2579
-
2580
- var _baseIsSet = baseIsSet$1;
2581
-
2582
- var baseIsSet = _baseIsSet,
2583
- baseUnary = _baseUnary,
2584
- nodeUtil = _nodeUtil.exports;
2585
-
2586
- /* Node.js helper references. */
2587
- var nodeIsSet = nodeUtil && nodeUtil.isSet;
2588
-
2589
- /**
2590
- * Checks if `value` is classified as a `Set` object.
2591
- *
2592
- * @static
2593
- * @memberOf _
2594
- * @since 4.3.0
2595
- * @category Lang
2596
- * @param {*} value The value to check.
2597
- * @returns {boolean} Returns `true` if `value` is a set, else `false`.
2598
- * @example
2599
- *
2600
- * _.isSet(new Set);
2601
- * // => true
2602
- *
2603
- * _.isSet(new WeakSet);
2604
- * // => false
2605
- */
2606
- var isSet$1 = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
2607
-
2608
- var isSet_1 = isSet$1;
2609
-
2610
- var Stack = _Stack,
2611
- arrayEach = _arrayEach,
2612
- assignValue = _assignValue,
2613
- baseAssign = _baseAssign,
2614
- baseAssignIn = _baseAssignIn,
2615
- cloneBuffer = _cloneBuffer.exports,
2616
- copyArray = _copyArray,
2617
- copySymbols = _copySymbols,
2618
- copySymbolsIn = _copySymbolsIn,
2619
- getAllKeys = _getAllKeys,
2620
- getAllKeysIn = _getAllKeysIn,
2621
- getTag = _getTag,
2622
- initCloneArray = _initCloneArray,
2623
- initCloneByTag = _initCloneByTag,
2624
- initCloneObject = _initCloneObject,
2625
- isArray$3 = isArray_1,
2626
- isBuffer = isBuffer$2.exports,
2627
- isMap = isMap_1,
2628
- isObject = isObject_1,
2629
- isSet = isSet_1,
2630
- keys = keys_1,
2631
- keysIn = keysIn_1;
2632
-
2633
- /** Used to compose bitmasks for cloning. */
2634
- var CLONE_DEEP_FLAG$1 = 1,
2635
- CLONE_FLAT_FLAG = 2,
2636
- CLONE_SYMBOLS_FLAG$1 = 4;
2637
-
2638
- /** `Object#toString` result references. */
2639
- var argsTag = '[object Arguments]',
2640
- arrayTag = '[object Array]',
2641
- boolTag = '[object Boolean]',
2642
- dateTag = '[object Date]',
2643
- errorTag = '[object Error]',
2644
- funcTag = '[object Function]',
2645
- genTag = '[object GeneratorFunction]',
2646
- mapTag = '[object Map]',
2647
- numberTag = '[object Number]',
2648
- objectTag = '[object Object]',
2649
- regexpTag = '[object RegExp]',
2650
- setTag = '[object Set]',
2651
- stringTag = '[object String]',
2652
- symbolTag$1 = '[object Symbol]',
2653
- weakMapTag = '[object WeakMap]';
2654
-
2655
- var arrayBufferTag = '[object ArrayBuffer]',
2656
- dataViewTag = '[object DataView]',
2657
- float32Tag = '[object Float32Array]',
2658
- float64Tag = '[object Float64Array]',
2659
- int8Tag = '[object Int8Array]',
2660
- int16Tag = '[object Int16Array]',
2661
- int32Tag = '[object Int32Array]',
2662
- uint8Tag = '[object Uint8Array]',
2663
- uint8ClampedTag = '[object Uint8ClampedArray]',
2664
- uint16Tag = '[object Uint16Array]',
2665
- uint32Tag = '[object Uint32Array]';
2666
-
2667
- /** Used to identify `toStringTag` values supported by `_.clone`. */
2668
- var cloneableTags = {};
2669
- cloneableTags[argsTag] = cloneableTags[arrayTag] =
2670
- cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
2671
- cloneableTags[boolTag] = cloneableTags[dateTag] =
2672
- cloneableTags[float32Tag] = cloneableTags[float64Tag] =
2673
- cloneableTags[int8Tag] = cloneableTags[int16Tag] =
2674
- cloneableTags[int32Tag] = cloneableTags[mapTag] =
2675
- cloneableTags[numberTag] = cloneableTags[objectTag] =
2676
- cloneableTags[regexpTag] = cloneableTags[setTag] =
2677
- cloneableTags[stringTag] = cloneableTags[symbolTag$1] =
2678
- cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
2679
- cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
2680
- cloneableTags[errorTag] = cloneableTags[funcTag] =
2681
- cloneableTags[weakMapTag] = false;
2682
-
2683
- /**
2684
- * The base implementation of `_.clone` and `_.cloneDeep` which tracks
2685
- * traversed objects.
2686
- *
2687
- * @private
2688
- * @param {*} value The value to clone.
2689
- * @param {boolean} bitmask The bitmask flags.
2690
- * 1 - Deep clone
2691
- * 2 - Flatten inherited properties
2692
- * 4 - Clone symbols
2693
- * @param {Function} [customizer] The function to customize cloning.
2694
- * @param {string} [key] The key of `value`.
2695
- * @param {Object} [object] The parent object of `value`.
2696
- * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
2697
- * @returns {*} Returns the cloned value.
2698
- */
2699
- function baseClone$1(value, bitmask, customizer, key, object, stack) {
2700
- var result,
2701
- isDeep = bitmask & CLONE_DEEP_FLAG$1,
2702
- isFlat = bitmask & CLONE_FLAT_FLAG,
2703
- isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
2704
-
2705
- if (customizer) {
2706
- result = object ? customizer(value, key, object, stack) : customizer(value);
2707
- }
2708
- if (result !== undefined) {
2709
- return result;
2710
- }
2711
- if (!isObject(value)) {
2712
- return value;
2713
- }
2714
- var isArr = isArray$3(value);
2715
- if (isArr) {
2716
- result = initCloneArray(value);
2717
- if (!isDeep) {
2718
- return copyArray(value, result);
2719
- }
2720
- } else {
2721
- var tag = getTag(value),
2722
- isFunc = tag == funcTag || tag == genTag;
2723
-
2724
- if (isBuffer(value)) {
2725
- return cloneBuffer(value, isDeep);
2726
- }
2727
- if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
2728
- result = (isFlat || isFunc) ? {} : initCloneObject(value);
2729
- if (!isDeep) {
2730
- return isFlat
2731
- ? copySymbolsIn(value, baseAssignIn(result, value))
2732
- : copySymbols(value, baseAssign(result, value));
2733
- }
2734
- } else {
2735
- if (!cloneableTags[tag]) {
2736
- return object ? value : {};
2737
- }
2738
- result = initCloneByTag(value, tag, isDeep);
2739
- }
2740
- }
2741
- // Check for circular references and return its corresponding clone.
2742
- stack || (stack = new Stack);
2743
- var stacked = stack.get(value);
2744
- if (stacked) {
2745
- return stacked;
2746
- }
2747
- stack.set(value, result);
2748
-
2749
- if (isSet(value)) {
2750
- value.forEach(function(subValue) {
2751
- result.add(baseClone$1(subValue, bitmask, customizer, subValue, value, stack));
2752
- });
2753
- } else if (isMap(value)) {
2754
- value.forEach(function(subValue, key) {
2755
- result.set(key, baseClone$1(subValue, bitmask, customizer, key, value, stack));
2756
- });
2757
- }
2758
-
2759
- var keysFunc = isFull
2760
- ? (isFlat ? getAllKeysIn : getAllKeys)
2761
- : (isFlat ? keysIn : keys);
2762
-
2763
- var props = isArr ? undefined : keysFunc(value);
2764
- arrayEach(props || value, function(subValue, key) {
2765
- if (props) {
2766
- key = subValue;
2767
- subValue = value[key];
2768
- }
2769
- // Recursively populate clone (susceptible to call stack limits).
2770
- assignValue(result, key, baseClone$1(subValue, bitmask, customizer, key, value, stack));
2771
- });
2772
- return result;
2773
- }
2774
-
2775
- var _baseClone = baseClone$1;
2776
-
2777
- var baseClone = _baseClone;
2778
-
2779
- /** Used to compose bitmasks for cloning. */
2780
- var CLONE_DEEP_FLAG = 1,
2781
- CLONE_SYMBOLS_FLAG = 4;
2782
-
2783
- /**
2784
- * This method is like `_.clone` except that it recursively clones `value`.
2785
- *
2786
- * @static
2787
- * @memberOf _
2788
- * @since 1.0.0
2789
- * @category Lang
2790
- * @param {*} value The value to recursively clone.
2791
- * @returns {*} Returns the deep cloned value.
2792
- * @see _.clone
2793
- * @example
2794
- *
2795
- * var objects = [{ 'a': 1 }, { 'b': 2 }];
2796
- *
2797
- * var deep = _.cloneDeep(objects);
2798
- * console.log(deep[0] === objects[0]);
2799
- * // => false
2800
- */
2801
- function cloneDeep(value) {
2802
- return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
2803
- }
2804
-
2805
- var cloneDeep_1 = cloneDeep;
2806
-
2807
- var browser = {exports: {}};
2808
-
2809
- /**
2810
- * Helpers.
2811
- */
2812
-
2813
- var s = 1000;
2814
- var m = s * 60;
2815
- var h = m * 60;
2816
- var d = h * 24;
2817
- var w = d * 7;
2818
- var y = d * 365.25;
2819
-
2820
- /**
2821
- * Parse or format the given `val`.
2822
- *
2823
- * Options:
2824
- *
2825
- * - `long` verbose formatting [false]
2826
- *
2827
- * @param {String|Number} val
2828
- * @param {Object} [options]
2829
- * @throws {Error} throw an error if val is not a non-empty string or a number
2830
- * @return {String|Number}
2831
- * @api public
2832
- */
2833
-
2834
- var ms = function(val, options) {
2835
- options = options || {};
2836
- var type = typeof val;
2837
- if (type === 'string' && val.length > 0) {
2838
- return parse(val);
2839
- } else if (type === 'number' && isFinite(val)) {
2840
- return options.long ? fmtLong(val) : fmtShort(val);
2841
- }
2842
- throw new Error(
2843
- 'val is not a non-empty string or a valid number. val=' +
2844
- JSON.stringify(val)
2845
- );
2846
- };
2847
-
2848
- /**
2849
- * Parse the given `str` and return milliseconds.
2850
- *
2851
- * @param {String} str
2852
- * @return {Number}
2853
- * @api private
2854
- */
2855
-
2856
- function parse(str) {
2857
- str = String(str);
2858
- if (str.length > 100) {
2859
- return;
2860
- }
2861
- var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
2862
- str
2863
- );
2864
- if (!match) {
2865
- return;
2866
- }
2867
- var n = parseFloat(match[1]);
2868
- var type = (match[2] || 'ms').toLowerCase();
2869
- switch (type) {
2870
- case 'years':
2871
- case 'year':
2872
- case 'yrs':
2873
- case 'yr':
2874
- case 'y':
2875
- return n * y;
2876
- case 'weeks':
2877
- case 'week':
2878
- case 'w':
2879
- return n * w;
2880
- case 'days':
2881
- case 'day':
2882
- case 'd':
2883
- return n * d;
2884
- case 'hours':
2885
- case 'hour':
2886
- case 'hrs':
2887
- case 'hr':
2888
- case 'h':
2889
- return n * h;
2890
- case 'minutes':
2891
- case 'minute':
2892
- case 'mins':
2893
- case 'min':
2894
- case 'm':
2895
- return n * m;
2896
- case 'seconds':
2897
- case 'second':
2898
- case 'secs':
2899
- case 'sec':
2900
- case 's':
2901
- return n * s;
2902
- case 'milliseconds':
2903
- case 'millisecond':
2904
- case 'msecs':
2905
- case 'msec':
2906
- case 'ms':
2907
- return n;
2908
- default:
2909
- return undefined;
2910
- }
2911
- }
2912
-
2913
- /**
2914
- * Short format for `ms`.
2915
- *
2916
- * @param {Number} ms
2917
- * @return {String}
2918
- * @api private
2919
- */
2920
-
2921
- function fmtShort(ms) {
2922
- var msAbs = Math.abs(ms);
2923
- if (msAbs >= d) {
2924
- return Math.round(ms / d) + 'd';
2925
- }
2926
- if (msAbs >= h) {
2927
- return Math.round(ms / h) + 'h';
2928
- }
2929
- if (msAbs >= m) {
2930
- return Math.round(ms / m) + 'm';
2931
- }
2932
- if (msAbs >= s) {
2933
- return Math.round(ms / s) + 's';
2934
- }
2935
- return ms + 'ms';
2936
- }
2937
-
2938
- /**
2939
- * Long format for `ms`.
2940
- *
2941
- * @param {Number} ms
2942
- * @return {String}
2943
- * @api private
2944
- */
2945
-
2946
- function fmtLong(ms) {
2947
- var msAbs = Math.abs(ms);
2948
- if (msAbs >= d) {
2949
- return plural(ms, msAbs, d, 'day');
2950
- }
2951
- if (msAbs >= h) {
2952
- return plural(ms, msAbs, h, 'hour');
2953
- }
2954
- if (msAbs >= m) {
2955
- return plural(ms, msAbs, m, 'minute');
2956
- }
2957
- if (msAbs >= s) {
2958
- return plural(ms, msAbs, s, 'second');
2959
- }
2960
- return ms + ' ms';
2961
- }
2962
-
2963
- /**
2964
- * Pluralization helper.
2965
- */
2966
-
2967
- function plural(ms, msAbs, n, name) {
2968
- var isPlural = msAbs >= n * 1.5;
2969
- return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
2970
- }
2971
-
2972
- /**
2973
- * This is the common logic for both the Node.js and web browser
2974
- * implementations of `debug()`.
2975
- */
2976
-
2977
- function setup(env) {
2978
- createDebug.debug = createDebug;
2979
- createDebug.default = createDebug;
2980
- createDebug.coerce = coerce;
2981
- createDebug.disable = disable;
2982
- createDebug.enable = enable;
2983
- createDebug.enabled = enabled;
2984
- createDebug.humanize = ms;
2985
- createDebug.destroy = destroy;
2986
-
2987
- Object.keys(env).forEach(key => {
2988
- createDebug[key] = env[key];
2989
- });
2990
-
2991
- /**
2992
- * The currently active debug mode names, and names to skip.
2993
- */
2994
-
2995
- createDebug.names = [];
2996
- createDebug.skips = [];
2997
-
2998
- /**
2999
- * Map of special "%n" handling functions, for the debug "format" argument.
3000
- *
3001
- * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
3002
- */
3003
- createDebug.formatters = {};
3004
-
3005
- /**
3006
- * Selects a color for a debug namespace
3007
- * @param {String} namespace The namespace string for the debug instance to be colored
3008
- * @return {Number|String} An ANSI color code for the given namespace
3009
- * @api private
3010
- */
3011
- function selectColor(namespace) {
3012
- let hash = 0;
3013
-
3014
- for (let i = 0; i < namespace.length; i++) {
3015
- hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
3016
- hash |= 0; // Convert to 32bit integer
3017
- }
3018
-
3019
- return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
3020
- }
3021
- createDebug.selectColor = selectColor;
3022
-
3023
- /**
3024
- * Create a debugger with the given `namespace`.
3025
- *
3026
- * @param {String} namespace
3027
- * @return {Function}
3028
- * @api public
3029
- */
3030
- function createDebug(namespace) {
3031
- let prevTime;
3032
- let enableOverride = null;
3033
- let namespacesCache;
3034
- let enabledCache;
3035
-
3036
- function debug(...args) {
3037
- // Disabled?
3038
- if (!debug.enabled) {
3039
- return;
3040
- }
3041
-
3042
- const self = debug;
3043
-
3044
- // Set `diff` timestamp
3045
- const curr = Number(new Date());
3046
- const ms = curr - (prevTime || curr);
3047
- self.diff = ms;
3048
- self.prev = prevTime;
3049
- self.curr = curr;
3050
- prevTime = curr;
3051
-
3052
- args[0] = createDebug.coerce(args[0]);
3053
-
3054
- if (typeof args[0] !== 'string') {
3055
- // Anything else let's inspect with %O
3056
- args.unshift('%O');
3057
- }
3058
-
3059
- // Apply any `formatters` transformations
3060
- let index = 0;
3061
- args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
3062
- // If we encounter an escaped % then don't increase the array index
3063
- if (match === '%%') {
3064
- return '%';
3065
- }
3066
- index++;
3067
- const formatter = createDebug.formatters[format];
3068
- if (typeof formatter === 'function') {
3069
- const val = args[index];
3070
- match = formatter.call(self, val);
3071
-
3072
- // Now we need to remove `args[index]` since it's inlined in the `format`
3073
- args.splice(index, 1);
3074
- index--;
3075
- }
3076
- return match;
3077
- });
3078
-
3079
- // Apply env-specific formatting (colors, etc.)
3080
- createDebug.formatArgs.call(self, args);
3081
-
3082
- const logFn = self.log || createDebug.log;
3083
- logFn.apply(self, args);
3084
- }
3085
-
3086
- debug.namespace = namespace;
3087
- debug.useColors = createDebug.useColors();
3088
- debug.color = createDebug.selectColor(namespace);
3089
- debug.extend = extend;
3090
- debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
3091
-
3092
- Object.defineProperty(debug, 'enabled', {
3093
- enumerable: true,
3094
- configurable: false,
3095
- get: () => {
3096
- if (enableOverride !== null) {
3097
- return enableOverride;
3098
- }
3099
- if (namespacesCache !== createDebug.namespaces) {
3100
- namespacesCache = createDebug.namespaces;
3101
- enabledCache = createDebug.enabled(namespace);
3102
- }
3103
-
3104
- return enabledCache;
3105
- },
3106
- set: v => {
3107
- enableOverride = v;
3108
- }
3109
- });
3110
-
3111
- // Env-specific initialization logic for debug instances
3112
- if (typeof createDebug.init === 'function') {
3113
- createDebug.init(debug);
3114
- }
3115
-
3116
- return debug;
3117
- }
3118
-
3119
- function extend(namespace, delimiter) {
3120
- const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
3121
- newDebug.log = this.log;
3122
- return newDebug;
3123
- }
3124
-
3125
- /**
3126
- * Enables a debug mode by namespaces. This can include modes
3127
- * separated by a colon and wildcards.
3128
- *
3129
- * @param {String} namespaces
3130
- * @api public
3131
- */
3132
- function enable(namespaces) {
3133
- createDebug.save(namespaces);
3134
- createDebug.namespaces = namespaces;
3135
-
3136
- createDebug.names = [];
3137
- createDebug.skips = [];
3138
-
3139
- let i;
3140
- const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
3141
- const len = split.length;
3142
-
3143
- for (i = 0; i < len; i++) {
3144
- if (!split[i]) {
3145
- // ignore empty strings
3146
- continue;
3147
- }
3148
-
3149
- namespaces = split[i].replace(/\*/g, '.*?');
3150
-
3151
- if (namespaces[0] === '-') {
3152
- createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
3153
- } else {
3154
- createDebug.names.push(new RegExp('^' + namespaces + '$'));
3155
- }
3156
- }
3157
- }
3158
-
3159
- /**
3160
- * Disable debug output.
3161
- *
3162
- * @return {String} namespaces
3163
- * @api public
3164
- */
3165
- function disable() {
3166
- const namespaces = [
3167
- ...createDebug.names.map(toNamespace),
3168
- ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
3169
- ].join(',');
3170
- createDebug.enable('');
3171
- return namespaces;
3172
- }
3173
-
3174
- /**
3175
- * Returns true if the given mode name is enabled, false otherwise.
3176
- *
3177
- * @param {String} name
3178
- * @return {Boolean}
3179
- * @api public
3180
- */
3181
- function enabled(name) {
3182
- if (name[name.length - 1] === '*') {
3183
- return true;
3184
- }
3185
-
3186
- let i;
3187
- let len;
3188
-
3189
- for (i = 0, len = createDebug.skips.length; i < len; i++) {
3190
- if (createDebug.skips[i].test(name)) {
3191
- return false;
3192
- }
3193
- }
3194
-
3195
- for (i = 0, len = createDebug.names.length; i < len; i++) {
3196
- if (createDebug.names[i].test(name)) {
3197
- return true;
3198
- }
3199
- }
3200
-
3201
- return false;
3202
- }
3203
-
3204
- /**
3205
- * Convert regexp to namespace
3206
- *
3207
- * @param {RegExp} regxep
3208
- * @return {String} namespace
3209
- * @api private
3210
- */
3211
- function toNamespace(regexp) {
3212
- return regexp.toString()
3213
- .substring(2, regexp.toString().length - 2)
3214
- .replace(/\.\*\?$/, '*');
3215
- }
3216
-
3217
- /**
3218
- * Coerce `val`.
3219
- *
3220
- * @param {Mixed} val
3221
- * @return {Mixed}
3222
- * @api private
3223
- */
3224
- function coerce(val) {
3225
- if (val instanceof Error) {
3226
- return val.stack || val.message;
3227
- }
3228
- return val;
3229
- }
3230
-
3231
- /**
3232
- * XXX DO NOT USE. This is a temporary stub function.
3233
- * XXX It WILL be removed in the next major release.
3234
- */
3235
- function destroy() {
3236
- console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
3237
- }
3238
-
3239
- createDebug.enable(createDebug.load());
3240
-
3241
- return createDebug;
3242
- }
3243
-
3244
- var common = setup;
3245
-
3246
- /* eslint-env browser */
3247
-
3248
- (function (module, exports) {
3249
- /**
3250
- * This is the web browser implementation of `debug()`.
3251
- */
3252
-
3253
- exports.formatArgs = formatArgs;
3254
- exports.save = save;
3255
- exports.load = load;
3256
- exports.useColors = useColors;
3257
- exports.storage = localstorage();
3258
- exports.destroy = (() => {
3259
- let warned = false;
3260
-
3261
- return () => {
3262
- if (!warned) {
3263
- warned = true;
3264
- console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
3265
- }
3266
- };
3267
- })();
3268
-
3269
- /**
3270
- * Colors.
3271
- */
3272
-
3273
- exports.colors = [
3274
- '#0000CC',
3275
- '#0000FF',
3276
- '#0033CC',
3277
- '#0033FF',
3278
- '#0066CC',
3279
- '#0066FF',
3280
- '#0099CC',
3281
- '#0099FF',
3282
- '#00CC00',
3283
- '#00CC33',
3284
- '#00CC66',
3285
- '#00CC99',
3286
- '#00CCCC',
3287
- '#00CCFF',
3288
- '#3300CC',
3289
- '#3300FF',
3290
- '#3333CC',
3291
- '#3333FF',
3292
- '#3366CC',
3293
- '#3366FF',
3294
- '#3399CC',
3295
- '#3399FF',
3296
- '#33CC00',
3297
- '#33CC33',
3298
- '#33CC66',
3299
- '#33CC99',
3300
- '#33CCCC',
3301
- '#33CCFF',
3302
- '#6600CC',
3303
- '#6600FF',
3304
- '#6633CC',
3305
- '#6633FF',
3306
- '#66CC00',
3307
- '#66CC33',
3308
- '#9900CC',
3309
- '#9900FF',
3310
- '#9933CC',
3311
- '#9933FF',
3312
- '#99CC00',
3313
- '#99CC33',
3314
- '#CC0000',
3315
- '#CC0033',
3316
- '#CC0066',
3317
- '#CC0099',
3318
- '#CC00CC',
3319
- '#CC00FF',
3320
- '#CC3300',
3321
- '#CC3333',
3322
- '#CC3366',
3323
- '#CC3399',
3324
- '#CC33CC',
3325
- '#CC33FF',
3326
- '#CC6600',
3327
- '#CC6633',
3328
- '#CC9900',
3329
- '#CC9933',
3330
- '#CCCC00',
3331
- '#CCCC33',
3332
- '#FF0000',
3333
- '#FF0033',
3334
- '#FF0066',
3335
- '#FF0099',
3336
- '#FF00CC',
3337
- '#FF00FF',
3338
- '#FF3300',
3339
- '#FF3333',
3340
- '#FF3366',
3341
- '#FF3399',
3342
- '#FF33CC',
3343
- '#FF33FF',
3344
- '#FF6600',
3345
- '#FF6633',
3346
- '#FF9900',
3347
- '#FF9933',
3348
- '#FFCC00',
3349
- '#FFCC33'
3350
- ];
3351
-
3352
- /**
3353
- * Currently only WebKit-based Web Inspectors, Firefox >= v31,
3354
- * and the Firebug extension (any Firefox version) are known
3355
- * to support "%c" CSS customizations.
3356
- *
3357
- * TODO: add a `localStorage` variable to explicitly enable/disable colors
3358
- */
3359
-
3360
- // eslint-disable-next-line complexity
3361
- function useColors() {
3362
- // NB: In an Electron preload script, document will be defined but not fully
3363
- // initialized. Since we know we're in Chrome, we'll just detect this case
3364
- // explicitly
3365
- if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
3366
- return true;
3367
- }
3368
-
3369
- // Internet Explorer and Edge do not support colors.
3370
- if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
3371
- return false;
3372
- }
3373
-
3374
- // Is webkit? http://stackoverflow.com/a/16459606/376773
3375
- // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
3376
- return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
3377
- // Is firebug? http://stackoverflow.com/a/398120/376773
3378
- (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
3379
- // Is firefox >= v31?
3380
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
3381
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
3382
- // Double check webkit in userAgent just in case we are in a worker
3383
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
3384
- }
3385
-
3386
- /**
3387
- * Colorize log arguments if enabled.
3388
- *
3389
- * @api public
3390
- */
3391
-
3392
- function formatArgs(args) {
3393
- args[0] = (this.useColors ? '%c' : '') +
3394
- this.namespace +
3395
- (this.useColors ? ' %c' : ' ') +
3396
- args[0] +
3397
- (this.useColors ? '%c ' : ' ') +
3398
- '+' + module.exports.humanize(this.diff);
3399
-
3400
- if (!this.useColors) {
3401
- return;
3402
- }
3403
-
3404
- const c = 'color: ' + this.color;
3405
- args.splice(1, 0, c, 'color: inherit');
3406
-
3407
- // The final "%c" is somewhat tricky, because there could be other
3408
- // arguments passed either before or after the %c, so we need to
3409
- // figure out the correct index to insert the CSS into
3410
- let index = 0;
3411
- let lastC = 0;
3412
- args[0].replace(/%[a-zA-Z%]/g, match => {
3413
- if (match === '%%') {
3414
- return;
3415
- }
3416
- index++;
3417
- if (match === '%c') {
3418
- // We only are interested in the *last* %c
3419
- // (the user may have provided their own)
3420
- lastC = index;
3421
- }
3422
- });
3423
-
3424
- args.splice(lastC, 0, c);
3425
- }
3426
-
3427
- /**
3428
- * Invokes `console.debug()` when available.
3429
- * No-op when `console.debug` is not a "function".
3430
- * If `console.debug` is not available, falls back
3431
- * to `console.log`.
3432
- *
3433
- * @api public
3434
- */
3435
- exports.log = console.debug || console.log || (() => {});
3436
-
3437
- /**
3438
- * Save `namespaces`.
3439
- *
3440
- * @param {String} namespaces
3441
- * @api private
3442
- */
3443
- function save(namespaces) {
3444
- try {
3445
- if (namespaces) {
3446
- exports.storage.setItem('debug', namespaces);
3447
- } else {
3448
- exports.storage.removeItem('debug');
3449
- }
3450
- } catch (error) {
3451
- // Swallow
3452
- // XXX (@Qix-) should we be logging these?
3453
- }
3454
- }
3455
-
3456
- /**
3457
- * Load `namespaces`.
3458
- *
3459
- * @return {String} returns the previously persisted debug modes
3460
- * @api private
3461
- */
3462
- function load() {
3463
- let r;
3464
- try {
3465
- r = exports.storage.getItem('debug');
3466
- } catch (error) {
3467
- // Swallow
3468
- // XXX (@Qix-) should we be logging these?
3469
- }
3470
-
3471
- // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
3472
- if (!r && typeof process !== 'undefined' && 'env' in process) {
3473
- r = process.env.DEBUG;
3474
- }
3475
-
3476
- return r;
3477
- }
3478
-
3479
- /**
3480
- * Localstorage attempts to return the localstorage.
3481
- *
3482
- * This is necessary because safari throws
3483
- * when a user disables cookies/localstorage
3484
- * and you attempt to access it.
3485
- *
3486
- * @return {LocalStorage}
3487
- * @api private
3488
- */
3489
-
3490
- function localstorage() {
3491
- try {
3492
- // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
3493
- // The Browser also has localStorage in the global context.
3494
- return localStorage;
3495
- } catch (error) {
3496
- // Swallow
3497
- // XXX (@Qix-) should we be logging these?
3498
- }
3499
- }
3500
-
3501
- module.exports = common(exports);
3502
-
3503
- const {formatters} = module.exports;
3504
-
3505
- /**
3506
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
3507
- */
3508
-
3509
- formatters.j = function (v) {
3510
- try {
3511
- return JSON.stringify(v);
3512
- } catch (error) {
3513
- return '[UnexpectedJSONParseError]: ' + error.message;
3514
- }
3515
- };
3516
- }(browser, browser.exports));
3517
-
3518
- var debug = browser.exports;
3519
-
3520
- var baseGetTag = _baseGetTag,
3521
- isObjectLike = isObjectLike_1;
3522
-
3523
- /** `Object#toString` result references. */
3524
- var symbolTag = '[object Symbol]';
3525
-
3526
- /**
3527
- * Checks if `value` is classified as a `Symbol` primitive or object.
3528
- *
3529
- * @static
3530
- * @memberOf _
3531
- * @since 4.0.0
3532
- * @category Lang
3533
- * @param {*} value The value to check.
3534
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
3535
- * @example
3536
- *
3537
- * _.isSymbol(Symbol.iterator);
3538
- * // => true
3539
- *
3540
- * _.isSymbol('abc');
3541
- * // => false
3542
- */
3543
- function isSymbol$3(value) {
3544
- return typeof value == 'symbol' ||
3545
- (isObjectLike(value) && baseGetTag(value) == symbolTag);
3546
- }
3547
-
3548
- var isSymbol_1 = isSymbol$3;
3549
-
3550
- var isArray$2 = isArray_1,
3551
- isSymbol$2 = isSymbol_1;
3552
-
3553
- /** Used to match property names within property paths. */
3554
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
3555
- reIsPlainProp = /^\w*$/;
3556
-
3557
- /**
3558
- * Checks if `value` is a property name and not a property path.
3559
- *
3560
- * @private
3561
- * @param {*} value The value to check.
3562
- * @param {Object} [object] The object to query keys on.
3563
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
3564
- */
3565
- function isKey$1(value, object) {
3566
- if (isArray$2(value)) {
3567
- return false;
3568
- }
3569
- var type = typeof value;
3570
- if (type == 'number' || type == 'symbol' || type == 'boolean' ||
3571
- value == null || isSymbol$2(value)) {
3572
- return true;
3573
- }
3574
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
3575
- (object != null && value in Object(object));
3576
- }
3577
-
3578
- var _isKey = isKey$1;
3579
-
3580
- var MapCache = _MapCache;
3581
-
3582
- /** Error message constants. */
3583
- var FUNC_ERROR_TEXT = 'Expected a function';
3584
-
3585
- /**
3586
- * Creates a function that memoizes the result of `func`. If `resolver` is
3587
- * provided, it determines the cache key for storing the result based on the
3588
- * arguments provided to the memoized function. By default, the first argument
3589
- * provided to the memoized function is used as the map cache key. The `func`
3590
- * is invoked with the `this` binding of the memoized function.
3591
- *
3592
- * **Note:** The cache is exposed as the `cache` property on the memoized
3593
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
3594
- * constructor with one whose instances implement the
3595
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
3596
- * method interface of `clear`, `delete`, `get`, `has`, and `set`.
3597
- *
3598
- * @static
3599
- * @memberOf _
3600
- * @since 0.1.0
3601
- * @category Function
3602
- * @param {Function} func The function to have its output memoized.
3603
- * @param {Function} [resolver] The function to resolve the cache key.
3604
- * @returns {Function} Returns the new memoized function.
3605
- * @example
3606
- *
3607
- * var object = { 'a': 1, 'b': 2 };
3608
- * var other = { 'c': 3, 'd': 4 };
3609
- *
3610
- * var values = _.memoize(_.values);
3611
- * values(object);
3612
- * // => [1, 2]
3613
- *
3614
- * values(other);
3615
- * // => [3, 4]
3616
- *
3617
- * object.a = 2;
3618
- * values(object);
3619
- * // => [1, 2]
3620
- *
3621
- * // Modify the result cache.
3622
- * values.cache.set(object, ['a', 'b']);
3623
- * values(object);
3624
- * // => ['a', 'b']
3625
- *
3626
- * // Replace `_.memoize.Cache`.
3627
- * _.memoize.Cache = WeakMap;
3628
- */
3629
- function memoize$1(func, resolver) {
3630
- if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
3631
- throw new TypeError(FUNC_ERROR_TEXT);
3632
- }
3633
- var memoized = function() {
3634
- var args = arguments,
3635
- key = resolver ? resolver.apply(this, args) : args[0],
3636
- cache = memoized.cache;
3637
-
3638
- if (cache.has(key)) {
3639
- return cache.get(key);
3640
- }
3641
- var result = func.apply(this, args);
3642
- memoized.cache = cache.set(key, result) || cache;
3643
- return result;
3644
- };
3645
- memoized.cache = new (memoize$1.Cache || MapCache);
3646
- return memoized;
3647
- }
3648
-
3649
- // Expose `MapCache`.
3650
- memoize$1.Cache = MapCache;
3651
-
3652
- var memoize_1 = memoize$1;
3653
-
3654
- var memoize = memoize_1;
3655
-
3656
- /** Used as the maximum memoize cache size. */
3657
- var MAX_MEMOIZE_SIZE = 500;
3658
-
3659
- /**
3660
- * A specialized version of `_.memoize` which clears the memoized function's
3661
- * cache when it exceeds `MAX_MEMOIZE_SIZE`.
3662
- *
3663
- * @private
3664
- * @param {Function} func The function to have its output memoized.
3665
- * @returns {Function} Returns the new memoized function.
3666
- */
3667
- function memoizeCapped$1(func) {
3668
- var result = memoize(func, function(key) {
3669
- if (cache.size === MAX_MEMOIZE_SIZE) {
3670
- cache.clear();
3671
- }
3672
- return key;
3673
- });
3674
-
3675
- var cache = result.cache;
3676
- return result;
3677
- }
3678
-
3679
- var _memoizeCapped = memoizeCapped$1;
3680
-
3681
- var memoizeCapped = _memoizeCapped;
3682
-
3683
- /** Used to match property names within property paths. */
3684
- var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
3685
-
3686
- /** Used to match backslashes in property paths. */
3687
- var reEscapeChar = /\\(\\)?/g;
3688
-
3689
- /**
3690
- * Converts `string` to a property path array.
3691
- *
3692
- * @private
3693
- * @param {string} string The string to convert.
3694
- * @returns {Array} Returns the property path array.
3695
- */
3696
- var stringToPath$1 = memoizeCapped(function(string) {
3697
- var result = [];
3698
- if (string.charCodeAt(0) === 46 /* . */) {
3699
- result.push('');
3700
- }
3701
- string.replace(rePropName, function(match, number, quote, subString) {
3702
- result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
3703
- });
3704
- return result;
3705
- });
3706
-
3707
- var _stringToPath = stringToPath$1;
3708
-
3709
- /**
3710
- * A specialized version of `_.map` for arrays without support for iteratee
3711
- * shorthands.
3712
- *
3713
- * @private
3714
- * @param {Array} [array] The array to iterate over.
3715
- * @param {Function} iteratee The function invoked per iteration.
3716
- * @returns {Array} Returns the new mapped array.
3717
- */
3718
-
3719
- function arrayMap$1(array, iteratee) {
3720
- var index = -1,
3721
- length = array == null ? 0 : array.length,
3722
- result = Array(length);
3723
-
3724
- while (++index < length) {
3725
- result[index] = iteratee(array[index], index, array);
3726
- }
3727
- return result;
3728
- }
3729
-
3730
- var _arrayMap = arrayMap$1;
3731
-
3732
- var Symbol = _Symbol,
3733
- arrayMap = _arrayMap,
3734
- isArray$1 = isArray_1,
3735
- isSymbol$1 = isSymbol_1;
3736
-
3737
- /** Used as references for various `Number` constants. */
3738
- var INFINITY$1 = 1 / 0;
3739
-
3740
- /** Used to convert symbols to primitives and strings. */
3741
- var symbolProto = Symbol ? Symbol.prototype : undefined,
3742
- symbolToString = symbolProto ? symbolProto.toString : undefined;
3743
-
3744
- /**
3745
- * The base implementation of `_.toString` which doesn't convert nullish
3746
- * values to empty strings.
3747
- *
3748
- * @private
3749
- * @param {*} value The value to process.
3750
- * @returns {string} Returns the string.
3751
- */
3752
- function baseToString$1(value) {
3753
- // Exit early for strings to avoid a performance hit in some environments.
3754
- if (typeof value == 'string') {
3755
- return value;
3756
- }
3757
- if (isArray$1(value)) {
3758
- // Recursively convert values (susceptible to call stack limits).
3759
- return arrayMap(value, baseToString$1) + '';
3760
- }
3761
- if (isSymbol$1(value)) {
3762
- return symbolToString ? symbolToString.call(value) : '';
3763
- }
3764
- var result = (value + '');
3765
- return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
3766
- }
3767
-
3768
- var _baseToString = baseToString$1;
3769
-
3770
- var baseToString = _baseToString;
3771
-
3772
- /**
3773
- * Converts `value` to a string. An empty string is returned for `null`
3774
- * and `undefined` values. The sign of `-0` is preserved.
3775
- *
3776
- * @static
3777
- * @memberOf _
3778
- * @since 4.0.0
3779
- * @category Lang
3780
- * @param {*} value The value to convert.
3781
- * @returns {string} Returns the converted string.
3782
- * @example
3783
- *
3784
- * _.toString(null);
3785
- * // => ''
3786
- *
3787
- * _.toString(-0);
3788
- * // => '-0'
3789
- *
3790
- * _.toString([1, 2, 3]);
3791
- * // => '1,2,3'
3792
- */
3793
- function toString$1(value) {
3794
- return value == null ? '' : baseToString(value);
3795
- }
3796
-
3797
- var toString_1 = toString$1;
3798
-
3799
- var isArray = isArray_1,
3800
- isKey = _isKey,
3801
- stringToPath = _stringToPath,
3802
- toString = toString_1;
3803
-
3804
- /**
3805
- * Casts `value` to a path array if it's not one.
3806
- *
3807
- * @private
3808
- * @param {*} value The value to inspect.
3809
- * @param {Object} [object] The object to query keys on.
3810
- * @returns {Array} Returns the cast property path array.
3811
- */
3812
- function castPath$1(value, object) {
3813
- if (isArray(value)) {
3814
- return value;
3815
- }
3816
- return isKey(value, object) ? [value] : stringToPath(toString(value));
3817
- }
3818
-
3819
- var _castPath = castPath$1;
3820
-
3821
- var isSymbol = isSymbol_1;
3822
-
3823
- /** Used as references for various `Number` constants. */
3824
- var INFINITY = 1 / 0;
3825
-
3826
- /**
3827
- * Converts `value` to a string key if it's not a string or symbol.
3828
- *
3829
- * @private
3830
- * @param {*} value The value to inspect.
3831
- * @returns {string|symbol} Returns the key.
3832
- */
3833
- function toKey$1(value) {
3834
- if (typeof value == 'string' || isSymbol(value)) {
3835
- return value;
3836
- }
3837
- var result = (value + '');
3838
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
3839
- }
3840
-
3841
- var _toKey = toKey$1;
3842
-
3843
- var castPath = _castPath,
3844
- toKey = _toKey;
3845
-
3846
- /**
3847
- * The base implementation of `_.get` without support for default values.
3848
- *
3849
- * @private
3850
- * @param {Object} object The object to query.
3851
- * @param {Array|string} path The path of the property to get.
3852
- * @returns {*} Returns the resolved value.
3853
- */
3854
- function baseGet$1(object, path) {
3855
- path = castPath(path, object);
3856
-
3857
- var index = 0,
3858
- length = path.length;
3859
-
3860
- while (object != null && index < length) {
3861
- object = object[toKey(path[index++])];
3862
- }
3863
- return (index && index == length) ? object : undefined;
3864
- }
3865
-
3866
- var _baseGet = baseGet$1;
3867
-
3868
- var baseGet = _baseGet;
3869
-
3870
- /**
3871
- * Gets the value at `path` of `object`. If the resolved value is
3872
- * `undefined`, the `defaultValue` is returned in its place.
3873
- *
3874
- * @static
3875
- * @memberOf _
3876
- * @since 3.7.0
3877
- * @category Object
3878
- * @param {Object} object The object to query.
3879
- * @param {Array|string} path The path of the property to get.
3880
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
3881
- * @returns {*} Returns the resolved value.
3882
- * @example
3883
- *
3884
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
3885
- *
3886
- * _.get(object, 'a[0].b.c');
3887
- * // => 3
3888
- *
3889
- * _.get(object, ['a', '0', 'b', 'c']);
3890
- * // => 3
3891
- *
3892
- * _.get(object, 'a.b.c', 'default');
3893
- * // => 'default'
3894
- */
3895
- function get(object, path, defaultValue) {
3896
- var result = object == null ? undefined : baseGet(object, path);
3897
- return result === undefined ? defaultValue : result;
3898
- }
3899
-
3900
- var get_1 = get;
3901
-
3902
- const MC_TAG_NAME = 'ebsr-multiple-choice';
3903
- const SESSION_CHANGED = SessionChangedEvent.TYPE;
3904
- const {
3905
- translator
3906
- } = Translator;
3907
- const log = debug('pie-element:ebsr:print');
3908
- /**
3909
- * Live in same package as main element - so we can access some of the shared comps!
3910
- *
3911
- * - update pslb to build print if src/print.js is there
3912
- * - update demo el
3913
- * - get configure/controller building
3914
- */
3915
-
3916
- const preparePrintModel = (model, opts) => {
3917
- const instr = opts.role === 'instructor';
3918
- model.prompt = model.promptEnabled !== false ? model.prompt : undefined;
3919
- model.teacherInstructions = instr && model.teacherInstructionsEnabled !== false ? model.teacherInstructions : undefined;
3920
- model.showTeacherInstructions = instr;
3921
- model.alwaysShowCorrect = instr;
3922
- model.mode = instr ? 'evaluate' : 'gather';
3923
- model.disabled = true;
3924
- model.animationsDisabled = true;
3925
- model.lockChoiceOrder = true;
3926
- model.choicesLayout = model.choicesLayout || 'vertical';
3927
- const choices = cloneDeep_1(model.choices);
3928
- model.choices = choices.map(c => {
3929
- c.rationale = instr && model.rationaleEnabled !== false ? c.rationale : undefined;
3930
- c.hideTick = instr;
3931
- c.feedback = undefined;
3932
- return c;
3933
- });
3934
- model.keyMode = model.choicePrefix || 'letters';
3935
- return model;
3936
- };
3937
-
3938
- class EbsrMC extends MultipleChoice {}
3939
-
3940
- const defineMultipleChoice = () => {
3941
- if (!customElements.get(MC_TAG_NAME)) {
3942
- customElements.define(MC_TAG_NAME, EbsrMC);
3943
- }
3944
- };
3945
-
3946
- defineMultipleChoice();
3947
-
3948
- const isNonEmptyArray = a => Array.isArray(a) && a.length > 0;
3949
-
3950
- const isSessionComplete = session => {
3951
- const a = get_1(session, 'value.partA.value');
3952
- const b = get_1(session, 'value.partB.value');
3953
- return isNonEmptyArray(a) && isNonEmptyArray(b);
3954
- };
3955
- class Ebsr extends HTMLElement {
3956
- constructor() {
3957
- super();
3958
-
3959
- this.onSessionUpdated = e => {
3960
- if (e.target === this) {
3961
- return;
3962
- }
3963
-
3964
- e.preventDefault();
3965
- e.stopImmediatePropagation();
3966
- const id = e.target.getAttribute('id');
3967
-
3968
- if (id) {
3969
- const key = `part${id.toUpperCase()}`;
3970
-
3971
- if (e.update) {
3972
- this._model[key] = e.update;
3973
- } //TODO: accessing a private property here. The session event should contain the update in future to prevent this.
3974
-
3975
-
3976
- this.dispatchSessionChanged(e.srcElement._session, key);
3977
- }
3978
- };
3979
-
3980
- this._model = {};
3981
- this._session = {};
3982
- this._options = null;
3983
- }
3984
-
3985
- set model(m) {
3986
- this._model = m;
3987
- customElements.whenDefined(MC_TAG_NAME).then(() => {
3988
- this.setPartModel(this.partA, 'partA');
3989
- this.setPartModel(this.partB, 'partB');
3990
- });
3991
- }
3992
-
3993
- set session(s) {
3994
- this._session = s;
3995
- customElements.whenDefined(MC_TAG_NAME).then(() => {
3996
- this.setPartSession(this.partA, 'partA');
3997
- this.setPartSession(this.partB, 'partB');
3998
- });
3999
- }
4000
-
4001
- setPartModel(part, key) {
4002
- if (this._model && this._model[key] && part) {
4003
- let labels = {
4004
- 'partA': undefined,
4005
- 'partB': undefined
4006
- };
4007
-
4008
- if (this._model.partLabels) {
4009
- const language = this._model.language;
4010
- labels = {
4011
- 'partA': translator.t('ebsr.part', {
4012
- lng: language,
4013
- index: this._model.partLabelType === 'Letters' ? 'A' : '1'
4014
- }),
4015
- 'partB': translator.t('ebsr.part', {
4016
- lng: language,
4017
- index: this._model.partLabelType === 'Letters' ? 'B' : '2'
4018
- })
4019
- };
4020
- }
4021
-
4022
- part.model = _extends({}, preparePrintModel(this._model[key], this._options), {
4023
- keyMode: this._model[key].choicePrefix,
4024
- partLabel: labels[key]
4025
- }); // pass options to enable print mode detection in multiple-choice component
4026
-
4027
- part.options = this._options;
4028
-
4029
- if (!part._session) {
4030
- // for print, "set session" is not called,
4031
- // but ebsr needs sessions in order to render the elements,
4032
- // so we set it here it was not set already
4033
- part.session = {};
4034
- }
4035
- }
4036
- }
4037
-
4038
- set options(o) {
4039
- this._options = o;
4040
- }
4041
-
4042
- setPartSession(part, key) {
4043
- if (this._session && this._model && part) {
4044
- const {
4045
- value
4046
- } = this._session;
4047
- part.session = value && value[key] ? value[key] : {
4048
- id: key
4049
- };
4050
- }
4051
- }
4052
-
4053
- dispatchSessionChanged(partSession, key) {
4054
- this._session.value = _extends({}, this._session.value, {
4055
- [key]: partSession
4056
- });
4057
- log('[onSessionChanged] session: ', this._session);
4058
- const complete = isSessionComplete(this._session);
4059
- this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), complete));
4060
- }
4061
-
4062
- get partA() {
4063
- return this.querySelector(`${MC_TAG_NAME}#a`);
4064
- }
4065
-
4066
- get partB() {
4067
- return this.querySelector(`${MC_TAG_NAME}#b`);
4068
- }
4069
-
4070
- connectedCallback() {
4071
- this._render();
4072
-
4073
- this.addEventListener(SESSION_CHANGED, this.onSessionUpdated);
4074
- }
4075
-
4076
- disconnectedCallback() {
4077
- this.removeEventListener(SESSION_CHANGED, this.onSessionUpdated);
4078
- }
4079
-
4080
- _render() {
4081
- this.innerHTML = `
4082
- <div>
4083
- <${MC_TAG_NAME} id="a"></${MC_TAG_NAME}>
4084
- <${MC_TAG_NAME} id="b"></${MC_TAG_NAME}>
4085
- </div>
4086
- `;
4087
- }
4088
-
4089
- }
4090
-
4091
- export { Ebsr as default, isSessionComplete };
4092
- //# sourceMappingURL=print.js.map