@qlover/scripts-context 0.0.11 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.cjs +1 -4897
  2. package/dist/index.js +1 -4890
  3. package/package.json +7 -7
package/dist/index.cjs CHANGED
@@ -1,4897 +1 @@
1
- 'use strict';
2
-
3
- var cosmiconfig = require('cosmiconfig');
4
- var feCorekit = require('@qlover/fe-corekit');
5
- var chalk = require('chalk');
6
- var child_process = require('child_process');
7
-
8
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
9
-
10
- function getDefaultExportFromCjs (x) {
11
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
12
- }
13
-
14
- /**
15
- * A faster alternative to `Function#apply`, this function invokes `func`
16
- * with the `this` binding of `thisArg` and the arguments of `args`.
17
- *
18
- * @private
19
- * @param {Function} func The function to invoke.
20
- * @param {*} thisArg The `this` binding of `func`.
21
- * @param {Array} args The arguments to invoke `func` with.
22
- * @returns {*} Returns the result of `func`.
23
- */
24
-
25
- var _apply;
26
- var hasRequired_apply;
27
-
28
- function require_apply () {
29
- if (hasRequired_apply) return _apply;
30
- hasRequired_apply = 1;
31
- function apply(func, thisArg, args) {
32
- switch (args.length) {
33
- case 0: return func.call(thisArg);
34
- case 1: return func.call(thisArg, args[0]);
35
- case 2: return func.call(thisArg, args[0], args[1]);
36
- case 3: return func.call(thisArg, args[0], args[1], args[2]);
37
- }
38
- return func.apply(thisArg, args);
39
- }
40
-
41
- _apply = apply;
42
- return _apply;
43
- }
44
-
45
- /**
46
- * This method returns the first argument it receives.
47
- *
48
- * @static
49
- * @since 0.1.0
50
- * @memberOf _
51
- * @category Util
52
- * @param {*} value Any value.
53
- * @returns {*} Returns `value`.
54
- * @example
55
- *
56
- * var object = { 'a': 1 };
57
- *
58
- * console.log(_.identity(object) === object);
59
- * // => true
60
- */
61
-
62
- var identity_1;
63
- var hasRequiredIdentity;
64
-
65
- function requireIdentity () {
66
- if (hasRequiredIdentity) return identity_1;
67
- hasRequiredIdentity = 1;
68
- function identity(value) {
69
- return value;
70
- }
71
-
72
- identity_1 = identity;
73
- return identity_1;
74
- }
75
-
76
- var _overRest;
77
- var hasRequired_overRest;
78
-
79
- function require_overRest () {
80
- if (hasRequired_overRest) return _overRest;
81
- hasRequired_overRest = 1;
82
- var apply = /*@__PURE__*/ require_apply();
83
-
84
- /* Built-in method references for those with the same name as other `lodash` methods. */
85
- var nativeMax = Math.max;
86
-
87
- /**
88
- * A specialized version of `baseRest` which transforms the rest array.
89
- *
90
- * @private
91
- * @param {Function} func The function to apply a rest parameter to.
92
- * @param {number} [start=func.length-1] The start position of the rest parameter.
93
- * @param {Function} transform The rest array transform.
94
- * @returns {Function} Returns the new function.
95
- */
96
- function overRest(func, start, transform) {
97
- start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
98
- return function() {
99
- var args = arguments,
100
- index = -1,
101
- length = nativeMax(args.length - start, 0),
102
- array = Array(length);
103
-
104
- while (++index < length) {
105
- array[index] = args[start + index];
106
- }
107
- index = -1;
108
- var otherArgs = Array(start + 1);
109
- while (++index < start) {
110
- otherArgs[index] = args[index];
111
- }
112
- otherArgs[start] = transform(array);
113
- return apply(func, this, otherArgs);
114
- };
115
- }
116
-
117
- _overRest = overRest;
118
- return _overRest;
119
- }
120
-
121
- /**
122
- * Creates a function that returns `value`.
123
- *
124
- * @static
125
- * @memberOf _
126
- * @since 2.4.0
127
- * @category Util
128
- * @param {*} value The value to return from the new function.
129
- * @returns {Function} Returns the new constant function.
130
- * @example
131
- *
132
- * var objects = _.times(2, _.constant({ 'a': 1 }));
133
- *
134
- * console.log(objects);
135
- * // => [{ 'a': 1 }, { 'a': 1 }]
136
- *
137
- * console.log(objects[0] === objects[1]);
138
- * // => true
139
- */
140
-
141
- var constant_1;
142
- var hasRequiredConstant;
143
-
144
- function requireConstant () {
145
- if (hasRequiredConstant) return constant_1;
146
- hasRequiredConstant = 1;
147
- function constant(value) {
148
- return function() {
149
- return value;
150
- };
151
- }
152
-
153
- constant_1 = constant;
154
- return constant_1;
155
- }
156
-
157
- /** Detect free variable `global` from Node.js. */
158
-
159
- var _freeGlobal;
160
- var hasRequired_freeGlobal;
161
-
162
- function require_freeGlobal () {
163
- if (hasRequired_freeGlobal) return _freeGlobal;
164
- hasRequired_freeGlobal = 1;
165
- var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
166
-
167
- _freeGlobal = freeGlobal;
168
- return _freeGlobal;
169
- }
170
-
171
- var _root;
172
- var hasRequired_root;
173
-
174
- function require_root () {
175
- if (hasRequired_root) return _root;
176
- hasRequired_root = 1;
177
- var freeGlobal = /*@__PURE__*/ require_freeGlobal();
178
-
179
- /** Detect free variable `self`. */
180
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
181
-
182
- /** Used as a reference to the global object. */
183
- var root = freeGlobal || freeSelf || Function('return this')();
184
-
185
- _root = root;
186
- return _root;
187
- }
188
-
189
- var _Symbol;
190
- var hasRequired_Symbol;
191
-
192
- function require_Symbol () {
193
- if (hasRequired_Symbol) return _Symbol;
194
- hasRequired_Symbol = 1;
195
- var root = /*@__PURE__*/ require_root();
196
-
197
- /** Built-in value references. */
198
- var Symbol = root.Symbol;
199
-
200
- _Symbol = Symbol;
201
- return _Symbol;
202
- }
203
-
204
- var _getRawTag;
205
- var hasRequired_getRawTag;
206
-
207
- function require_getRawTag () {
208
- if (hasRequired_getRawTag) return _getRawTag;
209
- hasRequired_getRawTag = 1;
210
- var Symbol = /*@__PURE__*/ require_Symbol();
211
-
212
- /** Used for built-in method references. */
213
- var objectProto = Object.prototype;
214
-
215
- /** Used to check objects for own properties. */
216
- var hasOwnProperty = objectProto.hasOwnProperty;
217
-
218
- /**
219
- * Used to resolve the
220
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
221
- * of values.
222
- */
223
- var nativeObjectToString = objectProto.toString;
224
-
225
- /** Built-in value references. */
226
- var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
227
-
228
- /**
229
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
230
- *
231
- * @private
232
- * @param {*} value The value to query.
233
- * @returns {string} Returns the raw `toStringTag`.
234
- */
235
- function getRawTag(value) {
236
- var isOwn = hasOwnProperty.call(value, symToStringTag),
237
- tag = value[symToStringTag];
238
-
239
- try {
240
- value[symToStringTag] = undefined;
241
- var unmasked = true;
242
- } catch (e) {}
243
-
244
- var result = nativeObjectToString.call(value);
245
- if (unmasked) {
246
- if (isOwn) {
247
- value[symToStringTag] = tag;
248
- } else {
249
- delete value[symToStringTag];
250
- }
251
- }
252
- return result;
253
- }
254
-
255
- _getRawTag = getRawTag;
256
- return _getRawTag;
257
- }
258
-
259
- /** Used for built-in method references. */
260
-
261
- var _objectToString;
262
- var hasRequired_objectToString;
263
-
264
- function require_objectToString () {
265
- if (hasRequired_objectToString) return _objectToString;
266
- hasRequired_objectToString = 1;
267
- var objectProto = Object.prototype;
268
-
269
- /**
270
- * Used to resolve the
271
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
272
- * of values.
273
- */
274
- var nativeObjectToString = objectProto.toString;
275
-
276
- /**
277
- * Converts `value` to a string using `Object.prototype.toString`.
278
- *
279
- * @private
280
- * @param {*} value The value to convert.
281
- * @returns {string} Returns the converted string.
282
- */
283
- function objectToString(value) {
284
- return nativeObjectToString.call(value);
285
- }
286
-
287
- _objectToString = objectToString;
288
- return _objectToString;
289
- }
290
-
291
- var _baseGetTag;
292
- var hasRequired_baseGetTag;
293
-
294
- function require_baseGetTag () {
295
- if (hasRequired_baseGetTag) return _baseGetTag;
296
- hasRequired_baseGetTag = 1;
297
- var Symbol = /*@__PURE__*/ require_Symbol(),
298
- getRawTag = /*@__PURE__*/ require_getRawTag(),
299
- objectToString = /*@__PURE__*/ require_objectToString();
300
-
301
- /** `Object#toString` result references. */
302
- var nullTag = '[object Null]',
303
- undefinedTag = '[object Undefined]';
304
-
305
- /** Built-in value references. */
306
- var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
307
-
308
- /**
309
- * The base implementation of `getTag` without fallbacks for buggy environments.
310
- *
311
- * @private
312
- * @param {*} value The value to query.
313
- * @returns {string} Returns the `toStringTag`.
314
- */
315
- function baseGetTag(value) {
316
- if (value == null) {
317
- return value === undefined ? undefinedTag : nullTag;
318
- }
319
- return (symToStringTag && symToStringTag in Object(value))
320
- ? getRawTag(value)
321
- : objectToString(value);
322
- }
323
-
324
- _baseGetTag = baseGetTag;
325
- return _baseGetTag;
326
- }
327
-
328
- /**
329
- * Checks if `value` is the
330
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
331
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
332
- *
333
- * @static
334
- * @memberOf _
335
- * @since 0.1.0
336
- * @category Lang
337
- * @param {*} value The value to check.
338
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
339
- * @example
340
- *
341
- * _.isObject({});
342
- * // => true
343
- *
344
- * _.isObject([1, 2, 3]);
345
- * // => true
346
- *
347
- * _.isObject(_.noop);
348
- * // => true
349
- *
350
- * _.isObject(null);
351
- * // => false
352
- */
353
-
354
- var isObject_1;
355
- var hasRequiredIsObject;
356
-
357
- function requireIsObject () {
358
- if (hasRequiredIsObject) return isObject_1;
359
- hasRequiredIsObject = 1;
360
- function isObject(value) {
361
- var type = typeof value;
362
- return value != null && (type == 'object' || type == 'function');
363
- }
364
-
365
- isObject_1 = isObject;
366
- return isObject_1;
367
- }
368
-
369
- var isFunction_1;
370
- var hasRequiredIsFunction;
371
-
372
- function requireIsFunction () {
373
- if (hasRequiredIsFunction) return isFunction_1;
374
- hasRequiredIsFunction = 1;
375
- var baseGetTag = /*@__PURE__*/ require_baseGetTag(),
376
- isObject = /*@__PURE__*/ requireIsObject();
377
-
378
- /** `Object#toString` result references. */
379
- var asyncTag = '[object AsyncFunction]',
380
- funcTag = '[object Function]',
381
- genTag = '[object GeneratorFunction]',
382
- proxyTag = '[object Proxy]';
383
-
384
- /**
385
- * Checks if `value` is classified as a `Function` object.
386
- *
387
- * @static
388
- * @memberOf _
389
- * @since 0.1.0
390
- * @category Lang
391
- * @param {*} value The value to check.
392
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
393
- * @example
394
- *
395
- * _.isFunction(_);
396
- * // => true
397
- *
398
- * _.isFunction(/abc/);
399
- * // => false
400
- */
401
- function isFunction(value) {
402
- if (!isObject(value)) {
403
- return false;
404
- }
405
- // The use of `Object#toString` avoids issues with the `typeof` operator
406
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
407
- var tag = baseGetTag(value);
408
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
409
- }
410
-
411
- isFunction_1 = isFunction;
412
- return isFunction_1;
413
- }
414
-
415
- var _coreJsData;
416
- var hasRequired_coreJsData;
417
-
418
- function require_coreJsData () {
419
- if (hasRequired_coreJsData) return _coreJsData;
420
- hasRequired_coreJsData = 1;
421
- var root = /*@__PURE__*/ require_root();
422
-
423
- /** Used to detect overreaching core-js shims. */
424
- var coreJsData = root['__core-js_shared__'];
425
-
426
- _coreJsData = coreJsData;
427
- return _coreJsData;
428
- }
429
-
430
- var _isMasked;
431
- var hasRequired_isMasked;
432
-
433
- function require_isMasked () {
434
- if (hasRequired_isMasked) return _isMasked;
435
- hasRequired_isMasked = 1;
436
- var coreJsData = /*@__PURE__*/ require_coreJsData();
437
-
438
- /** Used to detect methods masquerading as native. */
439
- var maskSrcKey = (function() {
440
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
441
- return uid ? ('Symbol(src)_1.' + uid) : '';
442
- }());
443
-
444
- /**
445
- * Checks if `func` has its source masked.
446
- *
447
- * @private
448
- * @param {Function} func The function to check.
449
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
450
- */
451
- function isMasked(func) {
452
- return !!maskSrcKey && (maskSrcKey in func);
453
- }
454
-
455
- _isMasked = isMasked;
456
- return _isMasked;
457
- }
458
-
459
- /** Used for built-in method references. */
460
-
461
- var _toSource;
462
- var hasRequired_toSource;
463
-
464
- function require_toSource () {
465
- if (hasRequired_toSource) return _toSource;
466
- hasRequired_toSource = 1;
467
- var funcProto = Function.prototype;
468
-
469
- /** Used to resolve the decompiled source of functions. */
470
- var funcToString = funcProto.toString;
471
-
472
- /**
473
- * Converts `func` to its source code.
474
- *
475
- * @private
476
- * @param {Function} func The function to convert.
477
- * @returns {string} Returns the source code.
478
- */
479
- function toSource(func) {
480
- if (func != null) {
481
- try {
482
- return funcToString.call(func);
483
- } catch (e) {}
484
- try {
485
- return (func + '');
486
- } catch (e) {}
487
- }
488
- return '';
489
- }
490
-
491
- _toSource = toSource;
492
- return _toSource;
493
- }
494
-
495
- var _baseIsNative;
496
- var hasRequired_baseIsNative;
497
-
498
- function require_baseIsNative () {
499
- if (hasRequired_baseIsNative) return _baseIsNative;
500
- hasRequired_baseIsNative = 1;
501
- var isFunction = /*@__PURE__*/ requireIsFunction(),
502
- isMasked = /*@__PURE__*/ require_isMasked(),
503
- isObject = /*@__PURE__*/ requireIsObject(),
504
- toSource = /*@__PURE__*/ require_toSource();
505
-
506
- /**
507
- * Used to match `RegExp`
508
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
509
- */
510
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
511
-
512
- /** Used to detect host constructors (Safari). */
513
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
514
-
515
- /** Used for built-in method references. */
516
- var funcProto = Function.prototype,
517
- objectProto = Object.prototype;
518
-
519
- /** Used to resolve the decompiled source of functions. */
520
- var funcToString = funcProto.toString;
521
-
522
- /** Used to check objects for own properties. */
523
- var hasOwnProperty = objectProto.hasOwnProperty;
524
-
525
- /** Used to detect if a method is native. */
526
- var reIsNative = RegExp('^' +
527
- funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
528
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
529
- );
530
-
531
- /**
532
- * The base implementation of `_.isNative` without bad shim checks.
533
- *
534
- * @private
535
- * @param {*} value The value to check.
536
- * @returns {boolean} Returns `true` if `value` is a native function,
537
- * else `false`.
538
- */
539
- function baseIsNative(value) {
540
- if (!isObject(value) || isMasked(value)) {
541
- return false;
542
- }
543
- var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
544
- return pattern.test(toSource(value));
545
- }
546
-
547
- _baseIsNative = baseIsNative;
548
- return _baseIsNative;
549
- }
550
-
551
- /**
552
- * Gets the value at `key` of `object`.
553
- *
554
- * @private
555
- * @param {Object} [object] The object to query.
556
- * @param {string} key The key of the property to get.
557
- * @returns {*} Returns the property value.
558
- */
559
-
560
- var _getValue;
561
- var hasRequired_getValue;
562
-
563
- function require_getValue () {
564
- if (hasRequired_getValue) return _getValue;
565
- hasRequired_getValue = 1;
566
- function getValue(object, key) {
567
- return object == null ? undefined : object[key];
568
- }
569
-
570
- _getValue = getValue;
571
- return _getValue;
572
- }
573
-
574
- var _getNative;
575
- var hasRequired_getNative;
576
-
577
- function require_getNative () {
578
- if (hasRequired_getNative) return _getNative;
579
- hasRequired_getNative = 1;
580
- var baseIsNative = /*@__PURE__*/ require_baseIsNative(),
581
- getValue = /*@__PURE__*/ require_getValue();
582
-
583
- /**
584
- * Gets the native function at `key` of `object`.
585
- *
586
- * @private
587
- * @param {Object} object The object to query.
588
- * @param {string} key The key of the method to get.
589
- * @returns {*} Returns the function if it's native, else `undefined`.
590
- */
591
- function getNative(object, key) {
592
- var value = getValue(object, key);
593
- return baseIsNative(value) ? value : undefined;
594
- }
595
-
596
- _getNative = getNative;
597
- return _getNative;
598
- }
599
-
600
- var _defineProperty;
601
- var hasRequired_defineProperty;
602
-
603
- function require_defineProperty () {
604
- if (hasRequired_defineProperty) return _defineProperty;
605
- hasRequired_defineProperty = 1;
606
- var getNative = /*@__PURE__*/ require_getNative();
607
-
608
- var defineProperty = (function() {
609
- try {
610
- var func = getNative(Object, 'defineProperty');
611
- func({}, '', {});
612
- return func;
613
- } catch (e) {}
614
- }());
615
-
616
- _defineProperty = defineProperty;
617
- return _defineProperty;
618
- }
619
-
620
- var _baseSetToString;
621
- var hasRequired_baseSetToString;
622
-
623
- function require_baseSetToString () {
624
- if (hasRequired_baseSetToString) return _baseSetToString;
625
- hasRequired_baseSetToString = 1;
626
- var constant = /*@__PURE__*/ requireConstant(),
627
- defineProperty = /*@__PURE__*/ require_defineProperty(),
628
- identity = /*@__PURE__*/ requireIdentity();
629
-
630
- /**
631
- * The base implementation of `setToString` without support for hot loop shorting.
632
- *
633
- * @private
634
- * @param {Function} func The function to modify.
635
- * @param {Function} string The `toString` result.
636
- * @returns {Function} Returns `func`.
637
- */
638
- var baseSetToString = !defineProperty ? identity : function(func, string) {
639
- return defineProperty(func, 'toString', {
640
- 'configurable': true,
641
- 'enumerable': false,
642
- 'value': constant(string),
643
- 'writable': true
644
- });
645
- };
646
-
647
- _baseSetToString = baseSetToString;
648
- return _baseSetToString;
649
- }
650
-
651
- /** Used to detect hot functions by number of calls within a span of milliseconds. */
652
-
653
- var _shortOut;
654
- var hasRequired_shortOut;
655
-
656
- function require_shortOut () {
657
- if (hasRequired_shortOut) return _shortOut;
658
- hasRequired_shortOut = 1;
659
- var HOT_COUNT = 800,
660
- HOT_SPAN = 16;
661
-
662
- /* Built-in method references for those with the same name as other `lodash` methods. */
663
- var nativeNow = Date.now;
664
-
665
- /**
666
- * Creates a function that'll short out and invoke `identity` instead
667
- * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
668
- * milliseconds.
669
- *
670
- * @private
671
- * @param {Function} func The function to restrict.
672
- * @returns {Function} Returns the new shortable function.
673
- */
674
- function shortOut(func) {
675
- var count = 0,
676
- lastCalled = 0;
677
-
678
- return function() {
679
- var stamp = nativeNow(),
680
- remaining = HOT_SPAN - (stamp - lastCalled);
681
-
682
- lastCalled = stamp;
683
- if (remaining > 0) {
684
- if (++count >= HOT_COUNT) {
685
- return arguments[0];
686
- }
687
- } else {
688
- count = 0;
689
- }
690
- return func.apply(undefined, arguments);
691
- };
692
- }
693
-
694
- _shortOut = shortOut;
695
- return _shortOut;
696
- }
697
-
698
- var _setToString;
699
- var hasRequired_setToString;
700
-
701
- function require_setToString () {
702
- if (hasRequired_setToString) return _setToString;
703
- hasRequired_setToString = 1;
704
- var baseSetToString = /*@__PURE__*/ require_baseSetToString(),
705
- shortOut = /*@__PURE__*/ require_shortOut();
706
-
707
- /**
708
- * Sets the `toString` method of `func` to return `string`.
709
- *
710
- * @private
711
- * @param {Function} func The function to modify.
712
- * @param {Function} string The `toString` result.
713
- * @returns {Function} Returns `func`.
714
- */
715
- var setToString = shortOut(baseSetToString);
716
-
717
- _setToString = setToString;
718
- return _setToString;
719
- }
720
-
721
- var _baseRest;
722
- var hasRequired_baseRest;
723
-
724
- function require_baseRest () {
725
- if (hasRequired_baseRest) return _baseRest;
726
- hasRequired_baseRest = 1;
727
- var identity = /*@__PURE__*/ requireIdentity(),
728
- overRest = /*@__PURE__*/ require_overRest(),
729
- setToString = /*@__PURE__*/ require_setToString();
730
-
731
- /**
732
- * The base implementation of `_.rest` which doesn't validate or coerce arguments.
733
- *
734
- * @private
735
- * @param {Function} func The function to apply a rest parameter to.
736
- * @param {number} [start=func.length-1] The start position of the rest parameter.
737
- * @returns {Function} Returns the new function.
738
- */
739
- function baseRest(func, start) {
740
- return setToString(overRest(func, start, identity), func + '');
741
- }
742
-
743
- _baseRest = baseRest;
744
- return _baseRest;
745
- }
746
-
747
- /**
748
- * Removes all key-value entries from the list cache.
749
- *
750
- * @private
751
- * @name clear
752
- * @memberOf ListCache
753
- */
754
-
755
- var _listCacheClear;
756
- var hasRequired_listCacheClear;
757
-
758
- function require_listCacheClear () {
759
- if (hasRequired_listCacheClear) return _listCacheClear;
760
- hasRequired_listCacheClear = 1;
761
- function listCacheClear() {
762
- this.__data__ = [];
763
- this.size = 0;
764
- }
765
-
766
- _listCacheClear = listCacheClear;
767
- return _listCacheClear;
768
- }
769
-
770
- /**
771
- * Performs a
772
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
773
- * comparison between two values to determine if they are equivalent.
774
- *
775
- * @static
776
- * @memberOf _
777
- * @since 4.0.0
778
- * @category Lang
779
- * @param {*} value The value to compare.
780
- * @param {*} other The other value to compare.
781
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
782
- * @example
783
- *
784
- * var object = { 'a': 1 };
785
- * var other = { 'a': 1 };
786
- *
787
- * _.eq(object, object);
788
- * // => true
789
- *
790
- * _.eq(object, other);
791
- * // => false
792
- *
793
- * _.eq('a', 'a');
794
- * // => true
795
- *
796
- * _.eq('a', Object('a'));
797
- * // => false
798
- *
799
- * _.eq(NaN, NaN);
800
- * // => true
801
- */
802
-
803
- var eq_1;
804
- var hasRequiredEq;
805
-
806
- function requireEq () {
807
- if (hasRequiredEq) return eq_1;
808
- hasRequiredEq = 1;
809
- function eq(value, other) {
810
- return value === other || (value !== value && other !== other);
811
- }
812
-
813
- eq_1 = eq;
814
- return eq_1;
815
- }
816
-
817
- var _assocIndexOf;
818
- var hasRequired_assocIndexOf;
819
-
820
- function require_assocIndexOf () {
821
- if (hasRequired_assocIndexOf) return _assocIndexOf;
822
- hasRequired_assocIndexOf = 1;
823
- var eq = /*@__PURE__*/ requireEq();
824
-
825
- /**
826
- * Gets the index at which the `key` is found in `array` of key-value pairs.
827
- *
828
- * @private
829
- * @param {Array} array The array to inspect.
830
- * @param {*} key The key to search for.
831
- * @returns {number} Returns the index of the matched value, else `-1`.
832
- */
833
- function assocIndexOf(array, key) {
834
- var length = array.length;
835
- while (length--) {
836
- if (eq(array[length][0], key)) {
837
- return length;
838
- }
839
- }
840
- return -1;
841
- }
842
-
843
- _assocIndexOf = assocIndexOf;
844
- return _assocIndexOf;
845
- }
846
-
847
- var _listCacheDelete;
848
- var hasRequired_listCacheDelete;
849
-
850
- function require_listCacheDelete () {
851
- if (hasRequired_listCacheDelete) return _listCacheDelete;
852
- hasRequired_listCacheDelete = 1;
853
- var assocIndexOf = /*@__PURE__*/ require_assocIndexOf();
854
-
855
- /** Used for built-in method references. */
856
- var arrayProto = Array.prototype;
857
-
858
- /** Built-in value references. */
859
- var splice = arrayProto.splice;
860
-
861
- /**
862
- * Removes `key` and its value from the list cache.
863
- *
864
- * @private
865
- * @name delete
866
- * @memberOf ListCache
867
- * @param {string} key The key of the value to remove.
868
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
869
- */
870
- function listCacheDelete(key) {
871
- var data = this.__data__,
872
- index = assocIndexOf(data, key);
873
-
874
- if (index < 0) {
875
- return false;
876
- }
877
- var lastIndex = data.length - 1;
878
- if (index == lastIndex) {
879
- data.pop();
880
- } else {
881
- splice.call(data, index, 1);
882
- }
883
- --this.size;
884
- return true;
885
- }
886
-
887
- _listCacheDelete = listCacheDelete;
888
- return _listCacheDelete;
889
- }
890
-
891
- var _listCacheGet;
892
- var hasRequired_listCacheGet;
893
-
894
- function require_listCacheGet () {
895
- if (hasRequired_listCacheGet) return _listCacheGet;
896
- hasRequired_listCacheGet = 1;
897
- var assocIndexOf = /*@__PURE__*/ require_assocIndexOf();
898
-
899
- /**
900
- * Gets the list cache value for `key`.
901
- *
902
- * @private
903
- * @name get
904
- * @memberOf ListCache
905
- * @param {string} key The key of the value to get.
906
- * @returns {*} Returns the entry value.
907
- */
908
- function listCacheGet(key) {
909
- var data = this.__data__,
910
- index = assocIndexOf(data, key);
911
-
912
- return index < 0 ? undefined : data[index][1];
913
- }
914
-
915
- _listCacheGet = listCacheGet;
916
- return _listCacheGet;
917
- }
918
-
919
- var _listCacheHas;
920
- var hasRequired_listCacheHas;
921
-
922
- function require_listCacheHas () {
923
- if (hasRequired_listCacheHas) return _listCacheHas;
924
- hasRequired_listCacheHas = 1;
925
- var assocIndexOf = /*@__PURE__*/ require_assocIndexOf();
926
-
927
- /**
928
- * Checks if a list cache value for `key` exists.
929
- *
930
- * @private
931
- * @name has
932
- * @memberOf ListCache
933
- * @param {string} key The key of the entry to check.
934
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
935
- */
936
- function listCacheHas(key) {
937
- return assocIndexOf(this.__data__, key) > -1;
938
- }
939
-
940
- _listCacheHas = listCacheHas;
941
- return _listCacheHas;
942
- }
943
-
944
- var _listCacheSet;
945
- var hasRequired_listCacheSet;
946
-
947
- function require_listCacheSet () {
948
- if (hasRequired_listCacheSet) return _listCacheSet;
949
- hasRequired_listCacheSet = 1;
950
- var assocIndexOf = /*@__PURE__*/ require_assocIndexOf();
951
-
952
- /**
953
- * Sets the list cache `key` to `value`.
954
- *
955
- * @private
956
- * @name set
957
- * @memberOf ListCache
958
- * @param {string} key The key of the value to set.
959
- * @param {*} value The value to set.
960
- * @returns {Object} Returns the list cache instance.
961
- */
962
- function listCacheSet(key, value) {
963
- var data = this.__data__,
964
- index = assocIndexOf(data, key);
965
-
966
- if (index < 0) {
967
- ++this.size;
968
- data.push([key, value]);
969
- } else {
970
- data[index][1] = value;
971
- }
972
- return this;
973
- }
974
-
975
- _listCacheSet = listCacheSet;
976
- return _listCacheSet;
977
- }
978
-
979
- var _ListCache;
980
- var hasRequired_ListCache;
981
-
982
- function require_ListCache () {
983
- if (hasRequired_ListCache) return _ListCache;
984
- hasRequired_ListCache = 1;
985
- var listCacheClear = /*@__PURE__*/ require_listCacheClear(),
986
- listCacheDelete = /*@__PURE__*/ require_listCacheDelete(),
987
- listCacheGet = /*@__PURE__*/ require_listCacheGet(),
988
- listCacheHas = /*@__PURE__*/ require_listCacheHas(),
989
- listCacheSet = /*@__PURE__*/ require_listCacheSet();
990
-
991
- /**
992
- * Creates an list cache object.
993
- *
994
- * @private
995
- * @constructor
996
- * @param {Array} [entries] The key-value pairs to cache.
997
- */
998
- function ListCache(entries) {
999
- var index = -1,
1000
- length = entries == null ? 0 : entries.length;
1001
-
1002
- this.clear();
1003
- while (++index < length) {
1004
- var entry = entries[index];
1005
- this.set(entry[0], entry[1]);
1006
- }
1007
- }
1008
-
1009
- // Add methods to `ListCache`.
1010
- ListCache.prototype.clear = listCacheClear;
1011
- ListCache.prototype['delete'] = listCacheDelete;
1012
- ListCache.prototype.get = listCacheGet;
1013
- ListCache.prototype.has = listCacheHas;
1014
- ListCache.prototype.set = listCacheSet;
1015
-
1016
- _ListCache = ListCache;
1017
- return _ListCache;
1018
- }
1019
-
1020
- var _stackClear;
1021
- var hasRequired_stackClear;
1022
-
1023
- function require_stackClear () {
1024
- if (hasRequired_stackClear) return _stackClear;
1025
- hasRequired_stackClear = 1;
1026
- var ListCache = /*@__PURE__*/ require_ListCache();
1027
-
1028
- /**
1029
- * Removes all key-value entries from the stack.
1030
- *
1031
- * @private
1032
- * @name clear
1033
- * @memberOf Stack
1034
- */
1035
- function stackClear() {
1036
- this.__data__ = new ListCache;
1037
- this.size = 0;
1038
- }
1039
-
1040
- _stackClear = stackClear;
1041
- return _stackClear;
1042
- }
1043
-
1044
- /**
1045
- * Removes `key` and its value from the stack.
1046
- *
1047
- * @private
1048
- * @name delete
1049
- * @memberOf Stack
1050
- * @param {string} key The key of the value to remove.
1051
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1052
- */
1053
-
1054
- var _stackDelete;
1055
- var hasRequired_stackDelete;
1056
-
1057
- function require_stackDelete () {
1058
- if (hasRequired_stackDelete) return _stackDelete;
1059
- hasRequired_stackDelete = 1;
1060
- function stackDelete(key) {
1061
- var data = this.__data__,
1062
- result = data['delete'](key);
1063
-
1064
- this.size = data.size;
1065
- return result;
1066
- }
1067
-
1068
- _stackDelete = stackDelete;
1069
- return _stackDelete;
1070
- }
1071
-
1072
- /**
1073
- * Gets the stack value for `key`.
1074
- *
1075
- * @private
1076
- * @name get
1077
- * @memberOf Stack
1078
- * @param {string} key The key of the value to get.
1079
- * @returns {*} Returns the entry value.
1080
- */
1081
-
1082
- var _stackGet;
1083
- var hasRequired_stackGet;
1084
-
1085
- function require_stackGet () {
1086
- if (hasRequired_stackGet) return _stackGet;
1087
- hasRequired_stackGet = 1;
1088
- function stackGet(key) {
1089
- return this.__data__.get(key);
1090
- }
1091
-
1092
- _stackGet = stackGet;
1093
- return _stackGet;
1094
- }
1095
-
1096
- /**
1097
- * Checks if a stack value for `key` exists.
1098
- *
1099
- * @private
1100
- * @name has
1101
- * @memberOf Stack
1102
- * @param {string} key The key of the entry to check.
1103
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1104
- */
1105
-
1106
- var _stackHas;
1107
- var hasRequired_stackHas;
1108
-
1109
- function require_stackHas () {
1110
- if (hasRequired_stackHas) return _stackHas;
1111
- hasRequired_stackHas = 1;
1112
- function stackHas(key) {
1113
- return this.__data__.has(key);
1114
- }
1115
-
1116
- _stackHas = stackHas;
1117
- return _stackHas;
1118
- }
1119
-
1120
- var _Map;
1121
- var hasRequired_Map;
1122
-
1123
- function require_Map () {
1124
- if (hasRequired_Map) return _Map;
1125
- hasRequired_Map = 1;
1126
- var getNative = /*@__PURE__*/ require_getNative(),
1127
- root = /*@__PURE__*/ require_root();
1128
-
1129
- /* Built-in method references that are verified to be native. */
1130
- var Map = getNative(root, 'Map');
1131
-
1132
- _Map = Map;
1133
- return _Map;
1134
- }
1135
-
1136
- var _nativeCreate;
1137
- var hasRequired_nativeCreate;
1138
-
1139
- function require_nativeCreate () {
1140
- if (hasRequired_nativeCreate) return _nativeCreate;
1141
- hasRequired_nativeCreate = 1;
1142
- var getNative = /*@__PURE__*/ require_getNative();
1143
-
1144
- /* Built-in method references that are verified to be native. */
1145
- var nativeCreate = getNative(Object, 'create');
1146
-
1147
- _nativeCreate = nativeCreate;
1148
- return _nativeCreate;
1149
- }
1150
-
1151
- var _hashClear;
1152
- var hasRequired_hashClear;
1153
-
1154
- function require_hashClear () {
1155
- if (hasRequired_hashClear) return _hashClear;
1156
- hasRequired_hashClear = 1;
1157
- var nativeCreate = /*@__PURE__*/ require_nativeCreate();
1158
-
1159
- /**
1160
- * Removes all key-value entries from the hash.
1161
- *
1162
- * @private
1163
- * @name clear
1164
- * @memberOf Hash
1165
- */
1166
- function hashClear() {
1167
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
1168
- this.size = 0;
1169
- }
1170
-
1171
- _hashClear = hashClear;
1172
- return _hashClear;
1173
- }
1174
-
1175
- /**
1176
- * Removes `key` and its value from the hash.
1177
- *
1178
- * @private
1179
- * @name delete
1180
- * @memberOf Hash
1181
- * @param {Object} hash The hash to modify.
1182
- * @param {string} key The key of the value to remove.
1183
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1184
- */
1185
-
1186
- var _hashDelete;
1187
- var hasRequired_hashDelete;
1188
-
1189
- function require_hashDelete () {
1190
- if (hasRequired_hashDelete) return _hashDelete;
1191
- hasRequired_hashDelete = 1;
1192
- function hashDelete(key) {
1193
- var result = this.has(key) && delete this.__data__[key];
1194
- this.size -= result ? 1 : 0;
1195
- return result;
1196
- }
1197
-
1198
- _hashDelete = hashDelete;
1199
- return _hashDelete;
1200
- }
1201
-
1202
- var _hashGet;
1203
- var hasRequired_hashGet;
1204
-
1205
- function require_hashGet () {
1206
- if (hasRequired_hashGet) return _hashGet;
1207
- hasRequired_hashGet = 1;
1208
- var nativeCreate = /*@__PURE__*/ require_nativeCreate();
1209
-
1210
- /** Used to stand-in for `undefined` hash values. */
1211
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
1212
-
1213
- /** Used for built-in method references. */
1214
- var objectProto = Object.prototype;
1215
-
1216
- /** Used to check objects for own properties. */
1217
- var hasOwnProperty = objectProto.hasOwnProperty;
1218
-
1219
- /**
1220
- * Gets the hash value for `key`.
1221
- *
1222
- * @private
1223
- * @name get
1224
- * @memberOf Hash
1225
- * @param {string} key The key of the value to get.
1226
- * @returns {*} Returns the entry value.
1227
- */
1228
- function hashGet(key) {
1229
- var data = this.__data__;
1230
- if (nativeCreate) {
1231
- var result = data[key];
1232
- return result === HASH_UNDEFINED ? undefined : result;
1233
- }
1234
- return hasOwnProperty.call(data, key) ? data[key] : undefined;
1235
- }
1236
-
1237
- _hashGet = hashGet;
1238
- return _hashGet;
1239
- }
1240
-
1241
- var _hashHas;
1242
- var hasRequired_hashHas;
1243
-
1244
- function require_hashHas () {
1245
- if (hasRequired_hashHas) return _hashHas;
1246
- hasRequired_hashHas = 1;
1247
- var nativeCreate = /*@__PURE__*/ require_nativeCreate();
1248
-
1249
- /** Used for built-in method references. */
1250
- var objectProto = Object.prototype;
1251
-
1252
- /** Used to check objects for own properties. */
1253
- var hasOwnProperty = objectProto.hasOwnProperty;
1254
-
1255
- /**
1256
- * Checks if a hash value for `key` exists.
1257
- *
1258
- * @private
1259
- * @name has
1260
- * @memberOf Hash
1261
- * @param {string} key The key of the entry to check.
1262
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1263
- */
1264
- function hashHas(key) {
1265
- var data = this.__data__;
1266
- return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
1267
- }
1268
-
1269
- _hashHas = hashHas;
1270
- return _hashHas;
1271
- }
1272
-
1273
- var _hashSet;
1274
- var hasRequired_hashSet;
1275
-
1276
- function require_hashSet () {
1277
- if (hasRequired_hashSet) return _hashSet;
1278
- hasRequired_hashSet = 1;
1279
- var nativeCreate = /*@__PURE__*/ require_nativeCreate();
1280
-
1281
- /** Used to stand-in for `undefined` hash values. */
1282
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
1283
-
1284
- /**
1285
- * Sets the hash `key` to `value`.
1286
- *
1287
- * @private
1288
- * @name set
1289
- * @memberOf Hash
1290
- * @param {string} key The key of the value to set.
1291
- * @param {*} value The value to set.
1292
- * @returns {Object} Returns the hash instance.
1293
- */
1294
- function hashSet(key, value) {
1295
- var data = this.__data__;
1296
- this.size += this.has(key) ? 0 : 1;
1297
- data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
1298
- return this;
1299
- }
1300
-
1301
- _hashSet = hashSet;
1302
- return _hashSet;
1303
- }
1304
-
1305
- var _Hash;
1306
- var hasRequired_Hash;
1307
-
1308
- function require_Hash () {
1309
- if (hasRequired_Hash) return _Hash;
1310
- hasRequired_Hash = 1;
1311
- var hashClear = /*@__PURE__*/ require_hashClear(),
1312
- hashDelete = /*@__PURE__*/ require_hashDelete(),
1313
- hashGet = /*@__PURE__*/ require_hashGet(),
1314
- hashHas = /*@__PURE__*/ require_hashHas(),
1315
- hashSet = /*@__PURE__*/ require_hashSet();
1316
-
1317
- /**
1318
- * Creates a hash object.
1319
- *
1320
- * @private
1321
- * @constructor
1322
- * @param {Array} [entries] The key-value pairs to cache.
1323
- */
1324
- function Hash(entries) {
1325
- var index = -1,
1326
- length = entries == null ? 0 : entries.length;
1327
-
1328
- this.clear();
1329
- while (++index < length) {
1330
- var entry = entries[index];
1331
- this.set(entry[0], entry[1]);
1332
- }
1333
- }
1334
-
1335
- // Add methods to `Hash`.
1336
- Hash.prototype.clear = hashClear;
1337
- Hash.prototype['delete'] = hashDelete;
1338
- Hash.prototype.get = hashGet;
1339
- Hash.prototype.has = hashHas;
1340
- Hash.prototype.set = hashSet;
1341
-
1342
- _Hash = Hash;
1343
- return _Hash;
1344
- }
1345
-
1346
- var _mapCacheClear;
1347
- var hasRequired_mapCacheClear;
1348
-
1349
- function require_mapCacheClear () {
1350
- if (hasRequired_mapCacheClear) return _mapCacheClear;
1351
- hasRequired_mapCacheClear = 1;
1352
- var Hash = /*@__PURE__*/ require_Hash(),
1353
- ListCache = /*@__PURE__*/ require_ListCache(),
1354
- Map = /*@__PURE__*/ require_Map();
1355
-
1356
- /**
1357
- * Removes all key-value entries from the map.
1358
- *
1359
- * @private
1360
- * @name clear
1361
- * @memberOf MapCache
1362
- */
1363
- function mapCacheClear() {
1364
- this.size = 0;
1365
- this.__data__ = {
1366
- 'hash': new Hash,
1367
- 'map': new (Map || ListCache),
1368
- 'string': new Hash
1369
- };
1370
- }
1371
-
1372
- _mapCacheClear = mapCacheClear;
1373
- return _mapCacheClear;
1374
- }
1375
-
1376
- /**
1377
- * Checks if `value` is suitable for use as unique object key.
1378
- *
1379
- * @private
1380
- * @param {*} value The value to check.
1381
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1382
- */
1383
-
1384
- var _isKeyable;
1385
- var hasRequired_isKeyable;
1386
-
1387
- function require_isKeyable () {
1388
- if (hasRequired_isKeyable) return _isKeyable;
1389
- hasRequired_isKeyable = 1;
1390
- function isKeyable(value) {
1391
- var type = typeof value;
1392
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
1393
- ? (value !== '__proto__')
1394
- : (value === null);
1395
- }
1396
-
1397
- _isKeyable = isKeyable;
1398
- return _isKeyable;
1399
- }
1400
-
1401
- var _getMapData;
1402
- var hasRequired_getMapData;
1403
-
1404
- function require_getMapData () {
1405
- if (hasRequired_getMapData) return _getMapData;
1406
- hasRequired_getMapData = 1;
1407
- var isKeyable = /*@__PURE__*/ require_isKeyable();
1408
-
1409
- /**
1410
- * Gets the data for `map`.
1411
- *
1412
- * @private
1413
- * @param {Object} map The map to query.
1414
- * @param {string} key The reference key.
1415
- * @returns {*} Returns the map data.
1416
- */
1417
- function getMapData(map, key) {
1418
- var data = map.__data__;
1419
- return isKeyable(key)
1420
- ? data[typeof key == 'string' ? 'string' : 'hash']
1421
- : data.map;
1422
- }
1423
-
1424
- _getMapData = getMapData;
1425
- return _getMapData;
1426
- }
1427
-
1428
- var _mapCacheDelete;
1429
- var hasRequired_mapCacheDelete;
1430
-
1431
- function require_mapCacheDelete () {
1432
- if (hasRequired_mapCacheDelete) return _mapCacheDelete;
1433
- hasRequired_mapCacheDelete = 1;
1434
- var getMapData = /*@__PURE__*/ require_getMapData();
1435
-
1436
- /**
1437
- * Removes `key` and its value from the map.
1438
- *
1439
- * @private
1440
- * @name delete
1441
- * @memberOf MapCache
1442
- * @param {string} key The key of the value to remove.
1443
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1444
- */
1445
- function mapCacheDelete(key) {
1446
- var result = getMapData(this, key)['delete'](key);
1447
- this.size -= result ? 1 : 0;
1448
- return result;
1449
- }
1450
-
1451
- _mapCacheDelete = mapCacheDelete;
1452
- return _mapCacheDelete;
1453
- }
1454
-
1455
- var _mapCacheGet;
1456
- var hasRequired_mapCacheGet;
1457
-
1458
- function require_mapCacheGet () {
1459
- if (hasRequired_mapCacheGet) return _mapCacheGet;
1460
- hasRequired_mapCacheGet = 1;
1461
- var getMapData = /*@__PURE__*/ require_getMapData();
1462
-
1463
- /**
1464
- * Gets the map value for `key`.
1465
- *
1466
- * @private
1467
- * @name get
1468
- * @memberOf MapCache
1469
- * @param {string} key The key of the value to get.
1470
- * @returns {*} Returns the entry value.
1471
- */
1472
- function mapCacheGet(key) {
1473
- return getMapData(this, key).get(key);
1474
- }
1475
-
1476
- _mapCacheGet = mapCacheGet;
1477
- return _mapCacheGet;
1478
- }
1479
-
1480
- var _mapCacheHas;
1481
- var hasRequired_mapCacheHas;
1482
-
1483
- function require_mapCacheHas () {
1484
- if (hasRequired_mapCacheHas) return _mapCacheHas;
1485
- hasRequired_mapCacheHas = 1;
1486
- var getMapData = /*@__PURE__*/ require_getMapData();
1487
-
1488
- /**
1489
- * Checks if a map value for `key` exists.
1490
- *
1491
- * @private
1492
- * @name has
1493
- * @memberOf MapCache
1494
- * @param {string} key The key of the entry to check.
1495
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1496
- */
1497
- function mapCacheHas(key) {
1498
- return getMapData(this, key).has(key);
1499
- }
1500
-
1501
- _mapCacheHas = mapCacheHas;
1502
- return _mapCacheHas;
1503
- }
1504
-
1505
- var _mapCacheSet;
1506
- var hasRequired_mapCacheSet;
1507
-
1508
- function require_mapCacheSet () {
1509
- if (hasRequired_mapCacheSet) return _mapCacheSet;
1510
- hasRequired_mapCacheSet = 1;
1511
- var getMapData = /*@__PURE__*/ require_getMapData();
1512
-
1513
- /**
1514
- * Sets the map `key` to `value`.
1515
- *
1516
- * @private
1517
- * @name set
1518
- * @memberOf MapCache
1519
- * @param {string} key The key of the value to set.
1520
- * @param {*} value The value to set.
1521
- * @returns {Object} Returns the map cache instance.
1522
- */
1523
- function mapCacheSet(key, value) {
1524
- var data = getMapData(this, key),
1525
- size = data.size;
1526
-
1527
- data.set(key, value);
1528
- this.size += data.size == size ? 0 : 1;
1529
- return this;
1530
- }
1531
-
1532
- _mapCacheSet = mapCacheSet;
1533
- return _mapCacheSet;
1534
- }
1535
-
1536
- var _MapCache;
1537
- var hasRequired_MapCache;
1538
-
1539
- function require_MapCache () {
1540
- if (hasRequired_MapCache) return _MapCache;
1541
- hasRequired_MapCache = 1;
1542
- var mapCacheClear = /*@__PURE__*/ require_mapCacheClear(),
1543
- mapCacheDelete = /*@__PURE__*/ require_mapCacheDelete(),
1544
- mapCacheGet = /*@__PURE__*/ require_mapCacheGet(),
1545
- mapCacheHas = /*@__PURE__*/ require_mapCacheHas(),
1546
- mapCacheSet = /*@__PURE__*/ require_mapCacheSet();
1547
-
1548
- /**
1549
- * Creates a map cache object to store key-value pairs.
1550
- *
1551
- * @private
1552
- * @constructor
1553
- * @param {Array} [entries] The key-value pairs to cache.
1554
- */
1555
- function MapCache(entries) {
1556
- var index = -1,
1557
- length = entries == null ? 0 : entries.length;
1558
-
1559
- this.clear();
1560
- while (++index < length) {
1561
- var entry = entries[index];
1562
- this.set(entry[0], entry[1]);
1563
- }
1564
- }
1565
-
1566
- // Add methods to `MapCache`.
1567
- MapCache.prototype.clear = mapCacheClear;
1568
- MapCache.prototype['delete'] = mapCacheDelete;
1569
- MapCache.prototype.get = mapCacheGet;
1570
- MapCache.prototype.has = mapCacheHas;
1571
- MapCache.prototype.set = mapCacheSet;
1572
-
1573
- _MapCache = MapCache;
1574
- return _MapCache;
1575
- }
1576
-
1577
- var _stackSet;
1578
- var hasRequired_stackSet;
1579
-
1580
- function require_stackSet () {
1581
- if (hasRequired_stackSet) return _stackSet;
1582
- hasRequired_stackSet = 1;
1583
- var ListCache = /*@__PURE__*/ require_ListCache(),
1584
- Map = /*@__PURE__*/ require_Map(),
1585
- MapCache = /*@__PURE__*/ require_MapCache();
1586
-
1587
- /** Used as the size to enable large array optimizations. */
1588
- var LARGE_ARRAY_SIZE = 200;
1589
-
1590
- /**
1591
- * Sets the stack `key` to `value`.
1592
- *
1593
- * @private
1594
- * @name set
1595
- * @memberOf Stack
1596
- * @param {string} key The key of the value to set.
1597
- * @param {*} value The value to set.
1598
- * @returns {Object} Returns the stack cache instance.
1599
- */
1600
- function stackSet(key, value) {
1601
- var data = this.__data__;
1602
- if (data instanceof ListCache) {
1603
- var pairs = data.__data__;
1604
- if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
1605
- pairs.push([key, value]);
1606
- this.size = ++data.size;
1607
- return this;
1608
- }
1609
- data = this.__data__ = new MapCache(pairs);
1610
- }
1611
- data.set(key, value);
1612
- this.size = data.size;
1613
- return this;
1614
- }
1615
-
1616
- _stackSet = stackSet;
1617
- return _stackSet;
1618
- }
1619
-
1620
- var _Stack;
1621
- var hasRequired_Stack;
1622
-
1623
- function require_Stack () {
1624
- if (hasRequired_Stack) return _Stack;
1625
- hasRequired_Stack = 1;
1626
- var ListCache = /*@__PURE__*/ require_ListCache(),
1627
- stackClear = /*@__PURE__*/ require_stackClear(),
1628
- stackDelete = /*@__PURE__*/ require_stackDelete(),
1629
- stackGet = /*@__PURE__*/ require_stackGet(),
1630
- stackHas = /*@__PURE__*/ require_stackHas(),
1631
- stackSet = /*@__PURE__*/ require_stackSet();
1632
-
1633
- /**
1634
- * Creates a stack cache object to store key-value pairs.
1635
- *
1636
- * @private
1637
- * @constructor
1638
- * @param {Array} [entries] The key-value pairs to cache.
1639
- */
1640
- function Stack(entries) {
1641
- var data = this.__data__ = new ListCache(entries);
1642
- this.size = data.size;
1643
- }
1644
-
1645
- // Add methods to `Stack`.
1646
- Stack.prototype.clear = stackClear;
1647
- Stack.prototype['delete'] = stackDelete;
1648
- Stack.prototype.get = stackGet;
1649
- Stack.prototype.has = stackHas;
1650
- Stack.prototype.set = stackSet;
1651
-
1652
- _Stack = Stack;
1653
- return _Stack;
1654
- }
1655
-
1656
- var _baseAssignValue;
1657
- var hasRequired_baseAssignValue;
1658
-
1659
- function require_baseAssignValue () {
1660
- if (hasRequired_baseAssignValue) return _baseAssignValue;
1661
- hasRequired_baseAssignValue = 1;
1662
- var defineProperty = /*@__PURE__*/ require_defineProperty();
1663
-
1664
- /**
1665
- * The base implementation of `assignValue` and `assignMergeValue` without
1666
- * value checks.
1667
- *
1668
- * @private
1669
- * @param {Object} object The object to modify.
1670
- * @param {string} key The key of the property to assign.
1671
- * @param {*} value The value to assign.
1672
- */
1673
- function baseAssignValue(object, key, value) {
1674
- if (key == '__proto__' && defineProperty) {
1675
- defineProperty(object, key, {
1676
- 'configurable': true,
1677
- 'enumerable': true,
1678
- 'value': value,
1679
- 'writable': true
1680
- });
1681
- } else {
1682
- object[key] = value;
1683
- }
1684
- }
1685
-
1686
- _baseAssignValue = baseAssignValue;
1687
- return _baseAssignValue;
1688
- }
1689
-
1690
- var _assignMergeValue;
1691
- var hasRequired_assignMergeValue;
1692
-
1693
- function require_assignMergeValue () {
1694
- if (hasRequired_assignMergeValue) return _assignMergeValue;
1695
- hasRequired_assignMergeValue = 1;
1696
- var baseAssignValue = /*@__PURE__*/ require_baseAssignValue(),
1697
- eq = /*@__PURE__*/ requireEq();
1698
-
1699
- /**
1700
- * This function is like `assignValue` except that it doesn't assign
1701
- * `undefined` values.
1702
- *
1703
- * @private
1704
- * @param {Object} object The object to modify.
1705
- * @param {string} key The key of the property to assign.
1706
- * @param {*} value The value to assign.
1707
- */
1708
- function assignMergeValue(object, key, value) {
1709
- if ((value !== undefined && !eq(object[key], value)) ||
1710
- (value === undefined && !(key in object))) {
1711
- baseAssignValue(object, key, value);
1712
- }
1713
- }
1714
-
1715
- _assignMergeValue = assignMergeValue;
1716
- return _assignMergeValue;
1717
- }
1718
-
1719
- /**
1720
- * Creates a base function for methods like `_.forIn` and `_.forOwn`.
1721
- *
1722
- * @private
1723
- * @param {boolean} [fromRight] Specify iterating from right to left.
1724
- * @returns {Function} Returns the new base function.
1725
- */
1726
-
1727
- var _createBaseFor;
1728
- var hasRequired_createBaseFor;
1729
-
1730
- function require_createBaseFor () {
1731
- if (hasRequired_createBaseFor) return _createBaseFor;
1732
- hasRequired_createBaseFor = 1;
1733
- function createBaseFor(fromRight) {
1734
- return function(object, iteratee, keysFunc) {
1735
- var index = -1,
1736
- iterable = Object(object),
1737
- props = keysFunc(object),
1738
- length = props.length;
1739
-
1740
- while (length--) {
1741
- var key = props[fromRight ? length : ++index];
1742
- if (iteratee(iterable[key], key, iterable) === false) {
1743
- break;
1744
- }
1745
- }
1746
- return object;
1747
- };
1748
- }
1749
-
1750
- _createBaseFor = createBaseFor;
1751
- return _createBaseFor;
1752
- }
1753
-
1754
- var _baseFor;
1755
- var hasRequired_baseFor;
1756
-
1757
- function require_baseFor () {
1758
- if (hasRequired_baseFor) return _baseFor;
1759
- hasRequired_baseFor = 1;
1760
- var createBaseFor = /*@__PURE__*/ require_createBaseFor();
1761
-
1762
- /**
1763
- * The base implementation of `baseForOwn` which iterates over `object`
1764
- * properties returned by `keysFunc` and invokes `iteratee` for each property.
1765
- * Iteratee functions may exit iteration early by explicitly returning `false`.
1766
- *
1767
- * @private
1768
- * @param {Object} object The object to iterate over.
1769
- * @param {Function} iteratee The function invoked per iteration.
1770
- * @param {Function} keysFunc The function to get the keys of `object`.
1771
- * @returns {Object} Returns `object`.
1772
- */
1773
- var baseFor = createBaseFor();
1774
-
1775
- _baseFor = baseFor;
1776
- return _baseFor;
1777
- }
1778
-
1779
- var _cloneBuffer = {exports: {}};
1780
-
1781
- var hasRequired_cloneBuffer;
1782
-
1783
- function require_cloneBuffer () {
1784
- if (hasRequired_cloneBuffer) return _cloneBuffer.exports;
1785
- hasRequired_cloneBuffer = 1;
1786
- (function (module, exports) {
1787
- var root = /*@__PURE__*/ require_root();
1788
-
1789
- /** Detect free variable `exports`. */
1790
- var freeExports = exports && !exports.nodeType && exports;
1791
-
1792
- /** Detect free variable `module`. */
1793
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
1794
-
1795
- /** Detect the popular CommonJS extension `module.exports`. */
1796
- var moduleExports = freeModule && freeModule.exports === freeExports;
1797
-
1798
- /** Built-in value references. */
1799
- var Buffer = moduleExports ? root.Buffer : undefined,
1800
- allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
1801
-
1802
- /**
1803
- * Creates a clone of `buffer`.
1804
- *
1805
- * @private
1806
- * @param {Buffer} buffer The buffer to clone.
1807
- * @param {boolean} [isDeep] Specify a deep clone.
1808
- * @returns {Buffer} Returns the cloned buffer.
1809
- */
1810
- function cloneBuffer(buffer, isDeep) {
1811
- if (isDeep) {
1812
- return buffer.slice();
1813
- }
1814
- var length = buffer.length,
1815
- result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
1816
-
1817
- buffer.copy(result);
1818
- return result;
1819
- }
1820
-
1821
- module.exports = cloneBuffer;
1822
- } (_cloneBuffer, _cloneBuffer.exports));
1823
- return _cloneBuffer.exports;
1824
- }
1825
-
1826
- var _Uint8Array;
1827
- var hasRequired_Uint8Array;
1828
-
1829
- function require_Uint8Array () {
1830
- if (hasRequired_Uint8Array) return _Uint8Array;
1831
- hasRequired_Uint8Array = 1;
1832
- var root = /*@__PURE__*/ require_root();
1833
-
1834
- /** Built-in value references. */
1835
- var Uint8Array = root.Uint8Array;
1836
-
1837
- _Uint8Array = Uint8Array;
1838
- return _Uint8Array;
1839
- }
1840
-
1841
- var _cloneArrayBuffer;
1842
- var hasRequired_cloneArrayBuffer;
1843
-
1844
- function require_cloneArrayBuffer () {
1845
- if (hasRequired_cloneArrayBuffer) return _cloneArrayBuffer;
1846
- hasRequired_cloneArrayBuffer = 1;
1847
- var Uint8Array = /*@__PURE__*/ require_Uint8Array();
1848
-
1849
- /**
1850
- * Creates a clone of `arrayBuffer`.
1851
- *
1852
- * @private
1853
- * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
1854
- * @returns {ArrayBuffer} Returns the cloned array buffer.
1855
- */
1856
- function cloneArrayBuffer(arrayBuffer) {
1857
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
1858
- new Uint8Array(result).set(new Uint8Array(arrayBuffer));
1859
- return result;
1860
- }
1861
-
1862
- _cloneArrayBuffer = cloneArrayBuffer;
1863
- return _cloneArrayBuffer;
1864
- }
1865
-
1866
- var _cloneTypedArray;
1867
- var hasRequired_cloneTypedArray;
1868
-
1869
- function require_cloneTypedArray () {
1870
- if (hasRequired_cloneTypedArray) return _cloneTypedArray;
1871
- hasRequired_cloneTypedArray = 1;
1872
- var cloneArrayBuffer = /*@__PURE__*/ require_cloneArrayBuffer();
1873
-
1874
- /**
1875
- * Creates a clone of `typedArray`.
1876
- *
1877
- * @private
1878
- * @param {Object} typedArray The typed array to clone.
1879
- * @param {boolean} [isDeep] Specify a deep clone.
1880
- * @returns {Object} Returns the cloned typed array.
1881
- */
1882
- function cloneTypedArray(typedArray, isDeep) {
1883
- var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
1884
- return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
1885
- }
1886
-
1887
- _cloneTypedArray = cloneTypedArray;
1888
- return _cloneTypedArray;
1889
- }
1890
-
1891
- /**
1892
- * Copies the values of `source` to `array`.
1893
- *
1894
- * @private
1895
- * @param {Array} source The array to copy values from.
1896
- * @param {Array} [array=[]] The array to copy values to.
1897
- * @returns {Array} Returns `array`.
1898
- */
1899
-
1900
- var _copyArray;
1901
- var hasRequired_copyArray;
1902
-
1903
- function require_copyArray () {
1904
- if (hasRequired_copyArray) return _copyArray;
1905
- hasRequired_copyArray = 1;
1906
- function copyArray(source, array) {
1907
- var index = -1,
1908
- length = source.length;
1909
-
1910
- array || (array = Array(length));
1911
- while (++index < length) {
1912
- array[index] = source[index];
1913
- }
1914
- return array;
1915
- }
1916
-
1917
- _copyArray = copyArray;
1918
- return _copyArray;
1919
- }
1920
-
1921
- var _baseCreate;
1922
- var hasRequired_baseCreate;
1923
-
1924
- function require_baseCreate () {
1925
- if (hasRequired_baseCreate) return _baseCreate;
1926
- hasRequired_baseCreate = 1;
1927
- var isObject = /*@__PURE__*/ requireIsObject();
1928
-
1929
- /** Built-in value references. */
1930
- var objectCreate = Object.create;
1931
-
1932
- /**
1933
- * The base implementation of `_.create` without support for assigning
1934
- * properties to the created object.
1935
- *
1936
- * @private
1937
- * @param {Object} proto The object to inherit from.
1938
- * @returns {Object} Returns the new object.
1939
- */
1940
- var baseCreate = (function() {
1941
- function object() {}
1942
- return function(proto) {
1943
- if (!isObject(proto)) {
1944
- return {};
1945
- }
1946
- if (objectCreate) {
1947
- return objectCreate(proto);
1948
- }
1949
- object.prototype = proto;
1950
- var result = new object;
1951
- object.prototype = undefined;
1952
- return result;
1953
- };
1954
- }());
1955
-
1956
- _baseCreate = baseCreate;
1957
- return _baseCreate;
1958
- }
1959
-
1960
- /**
1961
- * Creates a unary function that invokes `func` with its argument transformed.
1962
- *
1963
- * @private
1964
- * @param {Function} func The function to wrap.
1965
- * @param {Function} transform The argument transform.
1966
- * @returns {Function} Returns the new function.
1967
- */
1968
-
1969
- var _overArg;
1970
- var hasRequired_overArg;
1971
-
1972
- function require_overArg () {
1973
- if (hasRequired_overArg) return _overArg;
1974
- hasRequired_overArg = 1;
1975
- function overArg(func, transform) {
1976
- return function(arg) {
1977
- return func(transform(arg));
1978
- };
1979
- }
1980
-
1981
- _overArg = overArg;
1982
- return _overArg;
1983
- }
1984
-
1985
- var _getPrototype;
1986
- var hasRequired_getPrototype;
1987
-
1988
- function require_getPrototype () {
1989
- if (hasRequired_getPrototype) return _getPrototype;
1990
- hasRequired_getPrototype = 1;
1991
- var overArg = /*@__PURE__*/ require_overArg();
1992
-
1993
- /** Built-in value references. */
1994
- var getPrototype = overArg(Object.getPrototypeOf, Object);
1995
-
1996
- _getPrototype = getPrototype;
1997
- return _getPrototype;
1998
- }
1999
-
2000
- /** Used for built-in method references. */
2001
-
2002
- var _isPrototype;
2003
- var hasRequired_isPrototype;
2004
-
2005
- function require_isPrototype () {
2006
- if (hasRequired_isPrototype) return _isPrototype;
2007
- hasRequired_isPrototype = 1;
2008
- var objectProto = Object.prototype;
2009
-
2010
- /**
2011
- * Checks if `value` is likely a prototype object.
2012
- *
2013
- * @private
2014
- * @param {*} value The value to check.
2015
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
2016
- */
2017
- function isPrototype(value) {
2018
- var Ctor = value && value.constructor,
2019
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
2020
-
2021
- return value === proto;
2022
- }
2023
-
2024
- _isPrototype = isPrototype;
2025
- return _isPrototype;
2026
- }
2027
-
2028
- var _initCloneObject;
2029
- var hasRequired_initCloneObject;
2030
-
2031
- function require_initCloneObject () {
2032
- if (hasRequired_initCloneObject) return _initCloneObject;
2033
- hasRequired_initCloneObject = 1;
2034
- var baseCreate = /*@__PURE__*/ require_baseCreate(),
2035
- getPrototype = /*@__PURE__*/ require_getPrototype(),
2036
- isPrototype = /*@__PURE__*/ require_isPrototype();
2037
-
2038
- /**
2039
- * Initializes an object clone.
2040
- *
2041
- * @private
2042
- * @param {Object} object The object to clone.
2043
- * @returns {Object} Returns the initialized clone.
2044
- */
2045
- function initCloneObject(object) {
2046
- return (typeof object.constructor == 'function' && !isPrototype(object))
2047
- ? baseCreate(getPrototype(object))
2048
- : {};
2049
- }
2050
-
2051
- _initCloneObject = initCloneObject;
2052
- return _initCloneObject;
2053
- }
2054
-
2055
- /**
2056
- * Checks if `value` is object-like. A value is object-like if it's not `null`
2057
- * and has a `typeof` result of "object".
2058
- *
2059
- * @static
2060
- * @memberOf _
2061
- * @since 4.0.0
2062
- * @category Lang
2063
- * @param {*} value The value to check.
2064
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
2065
- * @example
2066
- *
2067
- * _.isObjectLike({});
2068
- * // => true
2069
- *
2070
- * _.isObjectLike([1, 2, 3]);
2071
- * // => true
2072
- *
2073
- * _.isObjectLike(_.noop);
2074
- * // => false
2075
- *
2076
- * _.isObjectLike(null);
2077
- * // => false
2078
- */
2079
-
2080
- var isObjectLike_1;
2081
- var hasRequiredIsObjectLike;
2082
-
2083
- function requireIsObjectLike () {
2084
- if (hasRequiredIsObjectLike) return isObjectLike_1;
2085
- hasRequiredIsObjectLike = 1;
2086
- function isObjectLike(value) {
2087
- return value != null && typeof value == 'object';
2088
- }
2089
-
2090
- isObjectLike_1 = isObjectLike;
2091
- return isObjectLike_1;
2092
- }
2093
-
2094
- var _baseIsArguments;
2095
- var hasRequired_baseIsArguments;
2096
-
2097
- function require_baseIsArguments () {
2098
- if (hasRequired_baseIsArguments) return _baseIsArguments;
2099
- hasRequired_baseIsArguments = 1;
2100
- var baseGetTag = /*@__PURE__*/ require_baseGetTag(),
2101
- isObjectLike = /*@__PURE__*/ requireIsObjectLike();
2102
-
2103
- /** `Object#toString` result references. */
2104
- var argsTag = '[object Arguments]';
2105
-
2106
- /**
2107
- * The base implementation of `_.isArguments`.
2108
- *
2109
- * @private
2110
- * @param {*} value The value to check.
2111
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
2112
- */
2113
- function baseIsArguments(value) {
2114
- return isObjectLike(value) && baseGetTag(value) == argsTag;
2115
- }
2116
-
2117
- _baseIsArguments = baseIsArguments;
2118
- return _baseIsArguments;
2119
- }
2120
-
2121
- var isArguments_1;
2122
- var hasRequiredIsArguments;
2123
-
2124
- function requireIsArguments () {
2125
- if (hasRequiredIsArguments) return isArguments_1;
2126
- hasRequiredIsArguments = 1;
2127
- var baseIsArguments = /*@__PURE__*/ require_baseIsArguments(),
2128
- isObjectLike = /*@__PURE__*/ requireIsObjectLike();
2129
-
2130
- /** Used for built-in method references. */
2131
- var objectProto = Object.prototype;
2132
-
2133
- /** Used to check objects for own properties. */
2134
- var hasOwnProperty = objectProto.hasOwnProperty;
2135
-
2136
- /** Built-in value references. */
2137
- var propertyIsEnumerable = objectProto.propertyIsEnumerable;
2138
-
2139
- /**
2140
- * Checks if `value` is likely an `arguments` object.
2141
- *
2142
- * @static
2143
- * @memberOf _
2144
- * @since 0.1.0
2145
- * @category Lang
2146
- * @param {*} value The value to check.
2147
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
2148
- * else `false`.
2149
- * @example
2150
- *
2151
- * _.isArguments(function() { return arguments; }());
2152
- * // => true
2153
- *
2154
- * _.isArguments([1, 2, 3]);
2155
- * // => false
2156
- */
2157
- var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
2158
- return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
2159
- !propertyIsEnumerable.call(value, 'callee');
2160
- };
2161
-
2162
- isArguments_1 = isArguments;
2163
- return isArguments_1;
2164
- }
2165
-
2166
- /**
2167
- * Checks if `value` is classified as an `Array` object.
2168
- *
2169
- * @static
2170
- * @memberOf _
2171
- * @since 0.1.0
2172
- * @category Lang
2173
- * @param {*} value The value to check.
2174
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
2175
- * @example
2176
- *
2177
- * _.isArray([1, 2, 3]);
2178
- * // => true
2179
- *
2180
- * _.isArray(document.body.children);
2181
- * // => false
2182
- *
2183
- * _.isArray('abc');
2184
- * // => false
2185
- *
2186
- * _.isArray(_.noop);
2187
- * // => false
2188
- */
2189
-
2190
- var isArray_1;
2191
- var hasRequiredIsArray;
2192
-
2193
- function requireIsArray () {
2194
- if (hasRequiredIsArray) return isArray_1;
2195
- hasRequiredIsArray = 1;
2196
- var isArray = Array.isArray;
2197
-
2198
- isArray_1 = isArray;
2199
- return isArray_1;
2200
- }
2201
-
2202
- /** Used as references for various `Number` constants. */
2203
-
2204
- var isLength_1;
2205
- var hasRequiredIsLength;
2206
-
2207
- function requireIsLength () {
2208
- if (hasRequiredIsLength) return isLength_1;
2209
- hasRequiredIsLength = 1;
2210
- var MAX_SAFE_INTEGER = 9007199254740991;
2211
-
2212
- /**
2213
- * Checks if `value` is a valid array-like length.
2214
- *
2215
- * **Note:** This method is loosely based on
2216
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
2217
- *
2218
- * @static
2219
- * @memberOf _
2220
- * @since 4.0.0
2221
- * @category Lang
2222
- * @param {*} value The value to check.
2223
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
2224
- * @example
2225
- *
2226
- * _.isLength(3);
2227
- * // => true
2228
- *
2229
- * _.isLength(Number.MIN_VALUE);
2230
- * // => false
2231
- *
2232
- * _.isLength(Infinity);
2233
- * // => false
2234
- *
2235
- * _.isLength('3');
2236
- * // => false
2237
- */
2238
- function isLength(value) {
2239
- return typeof value == 'number' &&
2240
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
2241
- }
2242
-
2243
- isLength_1 = isLength;
2244
- return isLength_1;
2245
- }
2246
-
2247
- var isArrayLike_1;
2248
- var hasRequiredIsArrayLike;
2249
-
2250
- function requireIsArrayLike () {
2251
- if (hasRequiredIsArrayLike) return isArrayLike_1;
2252
- hasRequiredIsArrayLike = 1;
2253
- var isFunction = /*@__PURE__*/ requireIsFunction(),
2254
- isLength = /*@__PURE__*/ requireIsLength();
2255
-
2256
- /**
2257
- * Checks if `value` is array-like. A value is considered array-like if it's
2258
- * not a function and has a `value.length` that's an integer greater than or
2259
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
2260
- *
2261
- * @static
2262
- * @memberOf _
2263
- * @since 4.0.0
2264
- * @category Lang
2265
- * @param {*} value The value to check.
2266
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
2267
- * @example
2268
- *
2269
- * _.isArrayLike([1, 2, 3]);
2270
- * // => true
2271
- *
2272
- * _.isArrayLike(document.body.children);
2273
- * // => true
2274
- *
2275
- * _.isArrayLike('abc');
2276
- * // => true
2277
- *
2278
- * _.isArrayLike(_.noop);
2279
- * // => false
2280
- */
2281
- function isArrayLike(value) {
2282
- return value != null && isLength(value.length) && !isFunction(value);
2283
- }
2284
-
2285
- isArrayLike_1 = isArrayLike;
2286
- return isArrayLike_1;
2287
- }
2288
-
2289
- var isArrayLikeObject_1;
2290
- var hasRequiredIsArrayLikeObject;
2291
-
2292
- function requireIsArrayLikeObject () {
2293
- if (hasRequiredIsArrayLikeObject) return isArrayLikeObject_1;
2294
- hasRequiredIsArrayLikeObject = 1;
2295
- var isArrayLike = /*@__PURE__*/ requireIsArrayLike(),
2296
- isObjectLike = /*@__PURE__*/ requireIsObjectLike();
2297
-
2298
- /**
2299
- * This method is like `_.isArrayLike` except that it also checks if `value`
2300
- * is an object.
2301
- *
2302
- * @static
2303
- * @memberOf _
2304
- * @since 4.0.0
2305
- * @category Lang
2306
- * @param {*} value The value to check.
2307
- * @returns {boolean} Returns `true` if `value` is an array-like object,
2308
- * else `false`.
2309
- * @example
2310
- *
2311
- * _.isArrayLikeObject([1, 2, 3]);
2312
- * // => true
2313
- *
2314
- * _.isArrayLikeObject(document.body.children);
2315
- * // => true
2316
- *
2317
- * _.isArrayLikeObject('abc');
2318
- * // => false
2319
- *
2320
- * _.isArrayLikeObject(_.noop);
2321
- * // => false
2322
- */
2323
- function isArrayLikeObject(value) {
2324
- return isObjectLike(value) && isArrayLike(value);
2325
- }
2326
-
2327
- isArrayLikeObject_1 = isArrayLikeObject;
2328
- return isArrayLikeObject_1;
2329
- }
2330
-
2331
- var isBuffer = {exports: {}};
2332
-
2333
- /**
2334
- * This method returns `false`.
2335
- *
2336
- * @static
2337
- * @memberOf _
2338
- * @since 4.13.0
2339
- * @category Util
2340
- * @returns {boolean} Returns `false`.
2341
- * @example
2342
- *
2343
- * _.times(2, _.stubFalse);
2344
- * // => [false, false]
2345
- */
2346
-
2347
- var stubFalse_1;
2348
- var hasRequiredStubFalse;
2349
-
2350
- function requireStubFalse () {
2351
- if (hasRequiredStubFalse) return stubFalse_1;
2352
- hasRequiredStubFalse = 1;
2353
- function stubFalse() {
2354
- return false;
2355
- }
2356
-
2357
- stubFalse_1 = stubFalse;
2358
- return stubFalse_1;
2359
- }
2360
-
2361
- var hasRequiredIsBuffer;
2362
-
2363
- function requireIsBuffer () {
2364
- if (hasRequiredIsBuffer) return isBuffer.exports;
2365
- hasRequiredIsBuffer = 1;
2366
- (function (module, exports) {
2367
- var root = /*@__PURE__*/ require_root(),
2368
- stubFalse = /*@__PURE__*/ requireStubFalse();
2369
-
2370
- /** Detect free variable `exports`. */
2371
- var freeExports = exports && !exports.nodeType && exports;
2372
-
2373
- /** Detect free variable `module`. */
2374
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
2375
-
2376
- /** Detect the popular CommonJS extension `module.exports`. */
2377
- var moduleExports = freeModule && freeModule.exports === freeExports;
2378
-
2379
- /** Built-in value references. */
2380
- var Buffer = moduleExports ? root.Buffer : undefined;
2381
-
2382
- /* Built-in method references for those with the same name as other `lodash` methods. */
2383
- var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
2384
-
2385
- /**
2386
- * Checks if `value` is a buffer.
2387
- *
2388
- * @static
2389
- * @memberOf _
2390
- * @since 4.3.0
2391
- * @category Lang
2392
- * @param {*} value The value to check.
2393
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
2394
- * @example
2395
- *
2396
- * _.isBuffer(new Buffer(2));
2397
- * // => true
2398
- *
2399
- * _.isBuffer(new Uint8Array(2));
2400
- * // => false
2401
- */
2402
- var isBuffer = nativeIsBuffer || stubFalse;
2403
-
2404
- module.exports = isBuffer;
2405
- } (isBuffer, isBuffer.exports));
2406
- return isBuffer.exports;
2407
- }
2408
-
2409
- var isPlainObject_1;
2410
- var hasRequiredIsPlainObject;
2411
-
2412
- function requireIsPlainObject () {
2413
- if (hasRequiredIsPlainObject) return isPlainObject_1;
2414
- hasRequiredIsPlainObject = 1;
2415
- var baseGetTag = /*@__PURE__*/ require_baseGetTag(),
2416
- getPrototype = /*@__PURE__*/ require_getPrototype(),
2417
- isObjectLike = /*@__PURE__*/ requireIsObjectLike();
2418
-
2419
- /** `Object#toString` result references. */
2420
- var objectTag = '[object Object]';
2421
-
2422
- /** Used for built-in method references. */
2423
- var funcProto = Function.prototype,
2424
- objectProto = Object.prototype;
2425
-
2426
- /** Used to resolve the decompiled source of functions. */
2427
- var funcToString = funcProto.toString;
2428
-
2429
- /** Used to check objects for own properties. */
2430
- var hasOwnProperty = objectProto.hasOwnProperty;
2431
-
2432
- /** Used to infer the `Object` constructor. */
2433
- var objectCtorString = funcToString.call(Object);
2434
-
2435
- /**
2436
- * Checks if `value` is a plain object, that is, an object created by the
2437
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
2438
- *
2439
- * @static
2440
- * @memberOf _
2441
- * @since 0.8.0
2442
- * @category Lang
2443
- * @param {*} value The value to check.
2444
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
2445
- * @example
2446
- *
2447
- * function Foo() {
2448
- * this.a = 1;
2449
- * }
2450
- *
2451
- * _.isPlainObject(new Foo);
2452
- * // => false
2453
- *
2454
- * _.isPlainObject([1, 2, 3]);
2455
- * // => false
2456
- *
2457
- * _.isPlainObject({ 'x': 0, 'y': 0 });
2458
- * // => true
2459
- *
2460
- * _.isPlainObject(Object.create(null));
2461
- * // => true
2462
- */
2463
- function isPlainObject(value) {
2464
- if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
2465
- return false;
2466
- }
2467
- var proto = getPrototype(value);
2468
- if (proto === null) {
2469
- return true;
2470
- }
2471
- var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
2472
- return typeof Ctor == 'function' && Ctor instanceof Ctor &&
2473
- funcToString.call(Ctor) == objectCtorString;
2474
- }
2475
-
2476
- isPlainObject_1 = isPlainObject;
2477
- return isPlainObject_1;
2478
- }
2479
-
2480
- var _baseIsTypedArray;
2481
- var hasRequired_baseIsTypedArray;
2482
-
2483
- function require_baseIsTypedArray () {
2484
- if (hasRequired_baseIsTypedArray) return _baseIsTypedArray;
2485
- hasRequired_baseIsTypedArray = 1;
2486
- var baseGetTag = /*@__PURE__*/ require_baseGetTag(),
2487
- isLength = /*@__PURE__*/ requireIsLength(),
2488
- isObjectLike = /*@__PURE__*/ requireIsObjectLike();
2489
-
2490
- /** `Object#toString` result references. */
2491
- var argsTag = '[object Arguments]',
2492
- arrayTag = '[object Array]',
2493
- boolTag = '[object Boolean]',
2494
- dateTag = '[object Date]',
2495
- errorTag = '[object Error]',
2496
- funcTag = '[object Function]',
2497
- mapTag = '[object Map]',
2498
- numberTag = '[object Number]',
2499
- objectTag = '[object Object]',
2500
- regexpTag = '[object RegExp]',
2501
- setTag = '[object Set]',
2502
- stringTag = '[object String]',
2503
- weakMapTag = '[object WeakMap]';
2504
-
2505
- var arrayBufferTag = '[object ArrayBuffer]',
2506
- dataViewTag = '[object DataView]',
2507
- float32Tag = '[object Float32Array]',
2508
- float64Tag = '[object Float64Array]',
2509
- int8Tag = '[object Int8Array]',
2510
- int16Tag = '[object Int16Array]',
2511
- int32Tag = '[object Int32Array]',
2512
- uint8Tag = '[object Uint8Array]',
2513
- uint8ClampedTag = '[object Uint8ClampedArray]',
2514
- uint16Tag = '[object Uint16Array]',
2515
- uint32Tag = '[object Uint32Array]';
2516
-
2517
- /** Used to identify `toStringTag` values of typed arrays. */
2518
- var typedArrayTags = {};
2519
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
2520
- typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
2521
- typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
2522
- typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
2523
- typedArrayTags[uint32Tag] = true;
2524
- typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
2525
- typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
2526
- typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
2527
- typedArrayTags[errorTag] = typedArrayTags[funcTag] =
2528
- typedArrayTags[mapTag] = typedArrayTags[numberTag] =
2529
- typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
2530
- typedArrayTags[setTag] = typedArrayTags[stringTag] =
2531
- typedArrayTags[weakMapTag] = false;
2532
-
2533
- /**
2534
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
2535
- *
2536
- * @private
2537
- * @param {*} value The value to check.
2538
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
2539
- */
2540
- function baseIsTypedArray(value) {
2541
- return isObjectLike(value) &&
2542
- isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
2543
- }
2544
-
2545
- _baseIsTypedArray = baseIsTypedArray;
2546
- return _baseIsTypedArray;
2547
- }
2548
-
2549
- /**
2550
- * The base implementation of `_.unary` without support for storing metadata.
2551
- *
2552
- * @private
2553
- * @param {Function} func The function to cap arguments for.
2554
- * @returns {Function} Returns the new capped function.
2555
- */
2556
-
2557
- var _baseUnary;
2558
- var hasRequired_baseUnary;
2559
-
2560
- function require_baseUnary () {
2561
- if (hasRequired_baseUnary) return _baseUnary;
2562
- hasRequired_baseUnary = 1;
2563
- function baseUnary(func) {
2564
- return function(value) {
2565
- return func(value);
2566
- };
2567
- }
2568
-
2569
- _baseUnary = baseUnary;
2570
- return _baseUnary;
2571
- }
2572
-
2573
- var _nodeUtil = {exports: {}};
2574
-
2575
- var hasRequired_nodeUtil;
2576
-
2577
- function require_nodeUtil () {
2578
- if (hasRequired_nodeUtil) return _nodeUtil.exports;
2579
- hasRequired_nodeUtil = 1;
2580
- (function (module, exports) {
2581
- var freeGlobal = /*@__PURE__*/ require_freeGlobal();
2582
-
2583
- /** Detect free variable `exports`. */
2584
- var freeExports = exports && !exports.nodeType && exports;
2585
-
2586
- /** Detect free variable `module`. */
2587
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
2588
-
2589
- /** Detect the popular CommonJS extension `module.exports`. */
2590
- var moduleExports = freeModule && freeModule.exports === freeExports;
2591
-
2592
- /** Detect free variable `process` from Node.js. */
2593
- var freeProcess = moduleExports && freeGlobal.process;
2594
-
2595
- /** Used to access faster Node.js helpers. */
2596
- var nodeUtil = (function() {
2597
- try {
2598
- // Use `util.types` for Node.js 10+.
2599
- var types = freeModule && freeModule.require && freeModule.require('util').types;
2600
-
2601
- if (types) {
2602
- return types;
2603
- }
2604
-
2605
- // Legacy `process.binding('util')` for Node.js < 10.
2606
- return freeProcess && freeProcess.binding && freeProcess.binding('util');
2607
- } catch (e) {}
2608
- }());
2609
-
2610
- module.exports = nodeUtil;
2611
- } (_nodeUtil, _nodeUtil.exports));
2612
- return _nodeUtil.exports;
2613
- }
2614
-
2615
- var isTypedArray_1;
2616
- var hasRequiredIsTypedArray;
2617
-
2618
- function requireIsTypedArray () {
2619
- if (hasRequiredIsTypedArray) return isTypedArray_1;
2620
- hasRequiredIsTypedArray = 1;
2621
- var baseIsTypedArray = /*@__PURE__*/ require_baseIsTypedArray(),
2622
- baseUnary = /*@__PURE__*/ require_baseUnary(),
2623
- nodeUtil = /*@__PURE__*/ require_nodeUtil();
2624
-
2625
- /* Node.js helper references. */
2626
- var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
2627
-
2628
- /**
2629
- * Checks if `value` is classified as a typed array.
2630
- *
2631
- * @static
2632
- * @memberOf _
2633
- * @since 3.0.0
2634
- * @category Lang
2635
- * @param {*} value The value to check.
2636
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
2637
- * @example
2638
- *
2639
- * _.isTypedArray(new Uint8Array);
2640
- * // => true
2641
- *
2642
- * _.isTypedArray([]);
2643
- * // => false
2644
- */
2645
- var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
2646
-
2647
- isTypedArray_1 = isTypedArray;
2648
- return isTypedArray_1;
2649
- }
2650
-
2651
- /**
2652
- * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
2653
- *
2654
- * @private
2655
- * @param {Object} object The object to query.
2656
- * @param {string} key The key of the property to get.
2657
- * @returns {*} Returns the property value.
2658
- */
2659
-
2660
- var _safeGet;
2661
- var hasRequired_safeGet;
2662
-
2663
- function require_safeGet () {
2664
- if (hasRequired_safeGet) return _safeGet;
2665
- hasRequired_safeGet = 1;
2666
- function safeGet(object, key) {
2667
- if (key === 'constructor' && typeof object[key] === 'function') {
2668
- return;
2669
- }
2670
-
2671
- if (key == '__proto__') {
2672
- return;
2673
- }
2674
-
2675
- return object[key];
2676
- }
2677
-
2678
- _safeGet = safeGet;
2679
- return _safeGet;
2680
- }
2681
-
2682
- var _assignValue;
2683
- var hasRequired_assignValue;
2684
-
2685
- function require_assignValue () {
2686
- if (hasRequired_assignValue) return _assignValue;
2687
- hasRequired_assignValue = 1;
2688
- var baseAssignValue = /*@__PURE__*/ require_baseAssignValue(),
2689
- eq = /*@__PURE__*/ requireEq();
2690
-
2691
- /** Used for built-in method references. */
2692
- var objectProto = Object.prototype;
2693
-
2694
- /** Used to check objects for own properties. */
2695
- var hasOwnProperty = objectProto.hasOwnProperty;
2696
-
2697
- /**
2698
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
2699
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
2700
- * for equality comparisons.
2701
- *
2702
- * @private
2703
- * @param {Object} object The object to modify.
2704
- * @param {string} key The key of the property to assign.
2705
- * @param {*} value The value to assign.
2706
- */
2707
- function assignValue(object, key, value) {
2708
- var objValue = object[key];
2709
- if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
2710
- (value === undefined && !(key in object))) {
2711
- baseAssignValue(object, key, value);
2712
- }
2713
- }
2714
-
2715
- _assignValue = assignValue;
2716
- return _assignValue;
2717
- }
2718
-
2719
- var _copyObject;
2720
- var hasRequired_copyObject;
2721
-
2722
- function require_copyObject () {
2723
- if (hasRequired_copyObject) return _copyObject;
2724
- hasRequired_copyObject = 1;
2725
- var assignValue = /*@__PURE__*/ require_assignValue(),
2726
- baseAssignValue = /*@__PURE__*/ require_baseAssignValue();
2727
-
2728
- /**
2729
- * Copies properties of `source` to `object`.
2730
- *
2731
- * @private
2732
- * @param {Object} source The object to copy properties from.
2733
- * @param {Array} props The property identifiers to copy.
2734
- * @param {Object} [object={}] The object to copy properties to.
2735
- * @param {Function} [customizer] The function to customize copied values.
2736
- * @returns {Object} Returns `object`.
2737
- */
2738
- function copyObject(source, props, object, customizer) {
2739
- var isNew = !object;
2740
- object || (object = {});
2741
-
2742
- var index = -1,
2743
- length = props.length;
2744
-
2745
- while (++index < length) {
2746
- var key = props[index];
2747
-
2748
- var newValue = customizer
2749
- ? customizer(object[key], source[key], key, object, source)
2750
- : undefined;
2751
-
2752
- if (newValue === undefined) {
2753
- newValue = source[key];
2754
- }
2755
- if (isNew) {
2756
- baseAssignValue(object, key, newValue);
2757
- } else {
2758
- assignValue(object, key, newValue);
2759
- }
2760
- }
2761
- return object;
2762
- }
2763
-
2764
- _copyObject = copyObject;
2765
- return _copyObject;
2766
- }
2767
-
2768
- /**
2769
- * The base implementation of `_.times` without support for iteratee shorthands
2770
- * or max array length checks.
2771
- *
2772
- * @private
2773
- * @param {number} n The number of times to invoke `iteratee`.
2774
- * @param {Function} iteratee The function invoked per iteration.
2775
- * @returns {Array} Returns the array of results.
2776
- */
2777
-
2778
- var _baseTimes;
2779
- var hasRequired_baseTimes;
2780
-
2781
- function require_baseTimes () {
2782
- if (hasRequired_baseTimes) return _baseTimes;
2783
- hasRequired_baseTimes = 1;
2784
- function baseTimes(n, iteratee) {
2785
- var index = -1,
2786
- result = Array(n);
2787
-
2788
- while (++index < n) {
2789
- result[index] = iteratee(index);
2790
- }
2791
- return result;
2792
- }
2793
-
2794
- _baseTimes = baseTimes;
2795
- return _baseTimes;
2796
- }
2797
-
2798
- /** Used as references for various `Number` constants. */
2799
-
2800
- var _isIndex;
2801
- var hasRequired_isIndex;
2802
-
2803
- function require_isIndex () {
2804
- if (hasRequired_isIndex) return _isIndex;
2805
- hasRequired_isIndex = 1;
2806
- var MAX_SAFE_INTEGER = 9007199254740991;
2807
-
2808
- /** Used to detect unsigned integer values. */
2809
- var reIsUint = /^(?:0|[1-9]\d*)$/;
2810
-
2811
- /**
2812
- * Checks if `value` is a valid array-like index.
2813
- *
2814
- * @private
2815
- * @param {*} value The value to check.
2816
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
2817
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
2818
- */
2819
- function isIndex(value, length) {
2820
- var type = typeof value;
2821
- length = length == null ? MAX_SAFE_INTEGER : length;
2822
-
2823
- return !!length &&
2824
- (type == 'number' ||
2825
- (type != 'symbol' && reIsUint.test(value))) &&
2826
- (value > -1 && value % 1 == 0 && value < length);
2827
- }
2828
-
2829
- _isIndex = isIndex;
2830
- return _isIndex;
2831
- }
2832
-
2833
- var _arrayLikeKeys;
2834
- var hasRequired_arrayLikeKeys;
2835
-
2836
- function require_arrayLikeKeys () {
2837
- if (hasRequired_arrayLikeKeys) return _arrayLikeKeys;
2838
- hasRequired_arrayLikeKeys = 1;
2839
- var baseTimes = /*@__PURE__*/ require_baseTimes(),
2840
- isArguments = /*@__PURE__*/ requireIsArguments(),
2841
- isArray = /*@__PURE__*/ requireIsArray(),
2842
- isBuffer = /*@__PURE__*/ requireIsBuffer(),
2843
- isIndex = /*@__PURE__*/ require_isIndex(),
2844
- isTypedArray = /*@__PURE__*/ requireIsTypedArray();
2845
-
2846
- /** Used for built-in method references. */
2847
- var objectProto = Object.prototype;
2848
-
2849
- /** Used to check objects for own properties. */
2850
- var hasOwnProperty = objectProto.hasOwnProperty;
2851
-
2852
- /**
2853
- * Creates an array of the enumerable property names of the array-like `value`.
2854
- *
2855
- * @private
2856
- * @param {*} value The value to query.
2857
- * @param {boolean} inherited Specify returning inherited property names.
2858
- * @returns {Array} Returns the array of property names.
2859
- */
2860
- function arrayLikeKeys(value, inherited) {
2861
- var isArr = isArray(value),
2862
- isArg = !isArr && isArguments(value),
2863
- isBuff = !isArr && !isArg && isBuffer(value),
2864
- isType = !isArr && !isArg && !isBuff && isTypedArray(value),
2865
- skipIndexes = isArr || isArg || isBuff || isType,
2866
- result = skipIndexes ? baseTimes(value.length, String) : [],
2867
- length = result.length;
2868
-
2869
- for (var key in value) {
2870
- if ((inherited || hasOwnProperty.call(value, key)) &&
2871
- !(skipIndexes && (
2872
- // Safari 9 has enumerable `arguments.length` in strict mode.
2873
- key == 'length' ||
2874
- // Node.js 0.10 has enumerable non-index properties on buffers.
2875
- (isBuff && (key == 'offset' || key == 'parent')) ||
2876
- // PhantomJS 2 has enumerable non-index properties on typed arrays.
2877
- (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
2878
- // Skip index properties.
2879
- isIndex(key, length)
2880
- ))) {
2881
- result.push(key);
2882
- }
2883
- }
2884
- return result;
2885
- }
2886
-
2887
- _arrayLikeKeys = arrayLikeKeys;
2888
- return _arrayLikeKeys;
2889
- }
2890
-
2891
- /**
2892
- * This function is like
2893
- * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
2894
- * except that it includes inherited enumerable properties.
2895
- *
2896
- * @private
2897
- * @param {Object} object The object to query.
2898
- * @returns {Array} Returns the array of property names.
2899
- */
2900
-
2901
- var _nativeKeysIn;
2902
- var hasRequired_nativeKeysIn;
2903
-
2904
- function require_nativeKeysIn () {
2905
- if (hasRequired_nativeKeysIn) return _nativeKeysIn;
2906
- hasRequired_nativeKeysIn = 1;
2907
- function nativeKeysIn(object) {
2908
- var result = [];
2909
- if (object != null) {
2910
- for (var key in Object(object)) {
2911
- result.push(key);
2912
- }
2913
- }
2914
- return result;
2915
- }
2916
-
2917
- _nativeKeysIn = nativeKeysIn;
2918
- return _nativeKeysIn;
2919
- }
2920
-
2921
- var _baseKeysIn;
2922
- var hasRequired_baseKeysIn;
2923
-
2924
- function require_baseKeysIn () {
2925
- if (hasRequired_baseKeysIn) return _baseKeysIn;
2926
- hasRequired_baseKeysIn = 1;
2927
- var isObject = /*@__PURE__*/ requireIsObject(),
2928
- isPrototype = /*@__PURE__*/ require_isPrototype(),
2929
- nativeKeysIn = /*@__PURE__*/ require_nativeKeysIn();
2930
-
2931
- /** Used for built-in method references. */
2932
- var objectProto = Object.prototype;
2933
-
2934
- /** Used to check objects for own properties. */
2935
- var hasOwnProperty = objectProto.hasOwnProperty;
2936
-
2937
- /**
2938
- * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
2939
- *
2940
- * @private
2941
- * @param {Object} object The object to query.
2942
- * @returns {Array} Returns the array of property names.
2943
- */
2944
- function baseKeysIn(object) {
2945
- if (!isObject(object)) {
2946
- return nativeKeysIn(object);
2947
- }
2948
- var isProto = isPrototype(object),
2949
- result = [];
2950
-
2951
- for (var key in object) {
2952
- if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
2953
- result.push(key);
2954
- }
2955
- }
2956
- return result;
2957
- }
2958
-
2959
- _baseKeysIn = baseKeysIn;
2960
- return _baseKeysIn;
2961
- }
2962
-
2963
- var keysIn_1;
2964
- var hasRequiredKeysIn;
2965
-
2966
- function requireKeysIn () {
2967
- if (hasRequiredKeysIn) return keysIn_1;
2968
- hasRequiredKeysIn = 1;
2969
- var arrayLikeKeys = /*@__PURE__*/ require_arrayLikeKeys(),
2970
- baseKeysIn = /*@__PURE__*/ require_baseKeysIn(),
2971
- isArrayLike = /*@__PURE__*/ requireIsArrayLike();
2972
-
2973
- /**
2974
- * Creates an array of the own and inherited enumerable property names of `object`.
2975
- *
2976
- * **Note:** Non-object values are coerced to objects.
2977
- *
2978
- * @static
2979
- * @memberOf _
2980
- * @since 3.0.0
2981
- * @category Object
2982
- * @param {Object} object The object to query.
2983
- * @returns {Array} Returns the array of property names.
2984
- * @example
2985
- *
2986
- * function Foo() {
2987
- * this.a = 1;
2988
- * this.b = 2;
2989
- * }
2990
- *
2991
- * Foo.prototype.c = 3;
2992
- *
2993
- * _.keysIn(new Foo);
2994
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
2995
- */
2996
- function keysIn(object) {
2997
- return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
2998
- }
2999
-
3000
- keysIn_1 = keysIn;
3001
- return keysIn_1;
3002
- }
3003
-
3004
- var toPlainObject_1;
3005
- var hasRequiredToPlainObject;
3006
-
3007
- function requireToPlainObject () {
3008
- if (hasRequiredToPlainObject) return toPlainObject_1;
3009
- hasRequiredToPlainObject = 1;
3010
- var copyObject = /*@__PURE__*/ require_copyObject(),
3011
- keysIn = /*@__PURE__*/ requireKeysIn();
3012
-
3013
- /**
3014
- * Converts `value` to a plain object flattening inherited enumerable string
3015
- * keyed properties of `value` to own properties of the plain object.
3016
- *
3017
- * @static
3018
- * @memberOf _
3019
- * @since 3.0.0
3020
- * @category Lang
3021
- * @param {*} value The value to convert.
3022
- * @returns {Object} Returns the converted plain object.
3023
- * @example
3024
- *
3025
- * function Foo() {
3026
- * this.b = 2;
3027
- * }
3028
- *
3029
- * Foo.prototype.c = 3;
3030
- *
3031
- * _.assign({ 'a': 1 }, new Foo);
3032
- * // => { 'a': 1, 'b': 2 }
3033
- *
3034
- * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
3035
- * // => { 'a': 1, 'b': 2, 'c': 3 }
3036
- */
3037
- function toPlainObject(value) {
3038
- return copyObject(value, keysIn(value));
3039
- }
3040
-
3041
- toPlainObject_1 = toPlainObject;
3042
- return toPlainObject_1;
3043
- }
3044
-
3045
- var _baseMergeDeep;
3046
- var hasRequired_baseMergeDeep;
3047
-
3048
- function require_baseMergeDeep () {
3049
- if (hasRequired_baseMergeDeep) return _baseMergeDeep;
3050
- hasRequired_baseMergeDeep = 1;
3051
- var assignMergeValue = /*@__PURE__*/ require_assignMergeValue(),
3052
- cloneBuffer = /*@__PURE__*/ require_cloneBuffer(),
3053
- cloneTypedArray = /*@__PURE__*/ require_cloneTypedArray(),
3054
- copyArray = /*@__PURE__*/ require_copyArray(),
3055
- initCloneObject = /*@__PURE__*/ require_initCloneObject(),
3056
- isArguments = /*@__PURE__*/ requireIsArguments(),
3057
- isArray = /*@__PURE__*/ requireIsArray(),
3058
- isArrayLikeObject = /*@__PURE__*/ requireIsArrayLikeObject(),
3059
- isBuffer = /*@__PURE__*/ requireIsBuffer(),
3060
- isFunction = /*@__PURE__*/ requireIsFunction(),
3061
- isObject = /*@__PURE__*/ requireIsObject(),
3062
- isPlainObject = /*@__PURE__*/ requireIsPlainObject(),
3063
- isTypedArray = /*@__PURE__*/ requireIsTypedArray(),
3064
- safeGet = /*@__PURE__*/ require_safeGet(),
3065
- toPlainObject = /*@__PURE__*/ requireToPlainObject();
3066
-
3067
- /**
3068
- * A specialized version of `baseMerge` for arrays and objects which performs
3069
- * deep merges and tracks traversed objects enabling objects with circular
3070
- * references to be merged.
3071
- *
3072
- * @private
3073
- * @param {Object} object The destination object.
3074
- * @param {Object} source The source object.
3075
- * @param {string} key The key of the value to merge.
3076
- * @param {number} srcIndex The index of `source`.
3077
- * @param {Function} mergeFunc The function to merge values.
3078
- * @param {Function} [customizer] The function to customize assigned values.
3079
- * @param {Object} [stack] Tracks traversed source values and their merged
3080
- * counterparts.
3081
- */
3082
- function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
3083
- var objValue = safeGet(object, key),
3084
- srcValue = safeGet(source, key),
3085
- stacked = stack.get(srcValue);
3086
-
3087
- if (stacked) {
3088
- assignMergeValue(object, key, stacked);
3089
- return;
3090
- }
3091
- var newValue = customizer
3092
- ? customizer(objValue, srcValue, (key + ''), object, source, stack)
3093
- : undefined;
3094
-
3095
- var isCommon = newValue === undefined;
3096
-
3097
- if (isCommon) {
3098
- var isArr = isArray(srcValue),
3099
- isBuff = !isArr && isBuffer(srcValue),
3100
- isTyped = !isArr && !isBuff && isTypedArray(srcValue);
3101
-
3102
- newValue = srcValue;
3103
- if (isArr || isBuff || isTyped) {
3104
- if (isArray(objValue)) {
3105
- newValue = objValue;
3106
- }
3107
- else if (isArrayLikeObject(objValue)) {
3108
- newValue = copyArray(objValue);
3109
- }
3110
- else if (isBuff) {
3111
- isCommon = false;
3112
- newValue = cloneBuffer(srcValue, true);
3113
- }
3114
- else if (isTyped) {
3115
- isCommon = false;
3116
- newValue = cloneTypedArray(srcValue, true);
3117
- }
3118
- else {
3119
- newValue = [];
3120
- }
3121
- }
3122
- else if (isPlainObject(srcValue) || isArguments(srcValue)) {
3123
- newValue = objValue;
3124
- if (isArguments(objValue)) {
3125
- newValue = toPlainObject(objValue);
3126
- }
3127
- else if (!isObject(objValue) || isFunction(objValue)) {
3128
- newValue = initCloneObject(srcValue);
3129
- }
3130
- }
3131
- else {
3132
- isCommon = false;
3133
- }
3134
- }
3135
- if (isCommon) {
3136
- // Recursively merge objects and arrays (susceptible to call stack limits).
3137
- stack.set(srcValue, newValue);
3138
- mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
3139
- stack['delete'](srcValue);
3140
- }
3141
- assignMergeValue(object, key, newValue);
3142
- }
3143
-
3144
- _baseMergeDeep = baseMergeDeep;
3145
- return _baseMergeDeep;
3146
- }
3147
-
3148
- var _baseMerge;
3149
- var hasRequired_baseMerge;
3150
-
3151
- function require_baseMerge () {
3152
- if (hasRequired_baseMerge) return _baseMerge;
3153
- hasRequired_baseMerge = 1;
3154
- var Stack = /*@__PURE__*/ require_Stack(),
3155
- assignMergeValue = /*@__PURE__*/ require_assignMergeValue(),
3156
- baseFor = /*@__PURE__*/ require_baseFor(),
3157
- baseMergeDeep = /*@__PURE__*/ require_baseMergeDeep(),
3158
- isObject = /*@__PURE__*/ requireIsObject(),
3159
- keysIn = /*@__PURE__*/ requireKeysIn(),
3160
- safeGet = /*@__PURE__*/ require_safeGet();
3161
-
3162
- /**
3163
- * The base implementation of `_.merge` without support for multiple sources.
3164
- *
3165
- * @private
3166
- * @param {Object} object The destination object.
3167
- * @param {Object} source The source object.
3168
- * @param {number} srcIndex The index of `source`.
3169
- * @param {Function} [customizer] The function to customize merged values.
3170
- * @param {Object} [stack] Tracks traversed source values and their merged
3171
- * counterparts.
3172
- */
3173
- function baseMerge(object, source, srcIndex, customizer, stack) {
3174
- if (object === source) {
3175
- return;
3176
- }
3177
- baseFor(source, function(srcValue, key) {
3178
- stack || (stack = new Stack);
3179
- if (isObject(srcValue)) {
3180
- baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
3181
- }
3182
- else {
3183
- var newValue = customizer
3184
- ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
3185
- : undefined;
3186
-
3187
- if (newValue === undefined) {
3188
- newValue = srcValue;
3189
- }
3190
- assignMergeValue(object, key, newValue);
3191
- }
3192
- }, keysIn);
3193
- }
3194
-
3195
- _baseMerge = baseMerge;
3196
- return _baseMerge;
3197
- }
3198
-
3199
- var _customDefaultsMerge;
3200
- var hasRequired_customDefaultsMerge;
3201
-
3202
- function require_customDefaultsMerge () {
3203
- if (hasRequired_customDefaultsMerge) return _customDefaultsMerge;
3204
- hasRequired_customDefaultsMerge = 1;
3205
- var baseMerge = /*@__PURE__*/ require_baseMerge(),
3206
- isObject = /*@__PURE__*/ requireIsObject();
3207
-
3208
- /**
3209
- * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
3210
- * objects into destination objects that are passed thru.
3211
- *
3212
- * @private
3213
- * @param {*} objValue The destination value.
3214
- * @param {*} srcValue The source value.
3215
- * @param {string} key The key of the property to merge.
3216
- * @param {Object} object The parent object of `objValue`.
3217
- * @param {Object} source The parent object of `srcValue`.
3218
- * @param {Object} [stack] Tracks traversed source values and their merged
3219
- * counterparts.
3220
- * @returns {*} Returns the value to assign.
3221
- */
3222
- function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
3223
- if (isObject(objValue) && isObject(srcValue)) {
3224
- // Recursively merge objects and arrays (susceptible to call stack limits).
3225
- stack.set(srcValue, objValue);
3226
- baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
3227
- stack['delete'](srcValue);
3228
- }
3229
- return objValue;
3230
- }
3231
-
3232
- _customDefaultsMerge = customDefaultsMerge;
3233
- return _customDefaultsMerge;
3234
- }
3235
-
3236
- var _isIterateeCall;
3237
- var hasRequired_isIterateeCall;
3238
-
3239
- function require_isIterateeCall () {
3240
- if (hasRequired_isIterateeCall) return _isIterateeCall;
3241
- hasRequired_isIterateeCall = 1;
3242
- var eq = /*@__PURE__*/ requireEq(),
3243
- isArrayLike = /*@__PURE__*/ requireIsArrayLike(),
3244
- isIndex = /*@__PURE__*/ require_isIndex(),
3245
- isObject = /*@__PURE__*/ requireIsObject();
3246
-
3247
- /**
3248
- * Checks if the given arguments are from an iteratee call.
3249
- *
3250
- * @private
3251
- * @param {*} value The potential iteratee value argument.
3252
- * @param {*} index The potential iteratee index or key argument.
3253
- * @param {*} object The potential iteratee object argument.
3254
- * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
3255
- * else `false`.
3256
- */
3257
- function isIterateeCall(value, index, object) {
3258
- if (!isObject(object)) {
3259
- return false;
3260
- }
3261
- var type = typeof index;
3262
- if (type == 'number'
3263
- ? (isArrayLike(object) && isIndex(index, object.length))
3264
- : (type == 'string' && index in object)
3265
- ) {
3266
- return eq(object[index], value);
3267
- }
3268
- return false;
3269
- }
3270
-
3271
- _isIterateeCall = isIterateeCall;
3272
- return _isIterateeCall;
3273
- }
3274
-
3275
- var _createAssigner;
3276
- var hasRequired_createAssigner;
3277
-
3278
- function require_createAssigner () {
3279
- if (hasRequired_createAssigner) return _createAssigner;
3280
- hasRequired_createAssigner = 1;
3281
- var baseRest = /*@__PURE__*/ require_baseRest(),
3282
- isIterateeCall = /*@__PURE__*/ require_isIterateeCall();
3283
-
3284
- /**
3285
- * Creates a function like `_.assign`.
3286
- *
3287
- * @private
3288
- * @param {Function} assigner The function to assign values.
3289
- * @returns {Function} Returns the new assigner function.
3290
- */
3291
- function createAssigner(assigner) {
3292
- return baseRest(function(object, sources) {
3293
- var index = -1,
3294
- length = sources.length,
3295
- customizer = length > 1 ? sources[length - 1] : undefined,
3296
- guard = length > 2 ? sources[2] : undefined;
3297
-
3298
- customizer = (assigner.length > 3 && typeof customizer == 'function')
3299
- ? (length--, customizer)
3300
- : undefined;
3301
-
3302
- if (guard && isIterateeCall(sources[0], sources[1], guard)) {
3303
- customizer = length < 3 ? undefined : customizer;
3304
- length = 1;
3305
- }
3306
- object = Object(object);
3307
- while (++index < length) {
3308
- var source = sources[index];
3309
- if (source) {
3310
- assigner(object, source, index, customizer);
3311
- }
3312
- }
3313
- return object;
3314
- });
3315
- }
3316
-
3317
- _createAssigner = createAssigner;
3318
- return _createAssigner;
3319
- }
3320
-
3321
- var mergeWith_1;
3322
- var hasRequiredMergeWith;
3323
-
3324
- function requireMergeWith () {
3325
- if (hasRequiredMergeWith) return mergeWith_1;
3326
- hasRequiredMergeWith = 1;
3327
- var baseMerge = /*@__PURE__*/ require_baseMerge(),
3328
- createAssigner = /*@__PURE__*/ require_createAssigner();
3329
-
3330
- /**
3331
- * This method is like `_.merge` except that it accepts `customizer` which
3332
- * is invoked to produce the merged values of the destination and source
3333
- * properties. If `customizer` returns `undefined`, merging is handled by the
3334
- * method instead. The `customizer` is invoked with six arguments:
3335
- * (objValue, srcValue, key, object, source, stack).
3336
- *
3337
- * **Note:** This method mutates `object`.
3338
- *
3339
- * @static
3340
- * @memberOf _
3341
- * @since 4.0.0
3342
- * @category Object
3343
- * @param {Object} object The destination object.
3344
- * @param {...Object} sources The source objects.
3345
- * @param {Function} customizer The function to customize assigned values.
3346
- * @returns {Object} Returns `object`.
3347
- * @example
3348
- *
3349
- * function customizer(objValue, srcValue) {
3350
- * if (_.isArray(objValue)) {
3351
- * return objValue.concat(srcValue);
3352
- * }
3353
- * }
3354
- *
3355
- * var object = { 'a': [1], 'b': [2] };
3356
- * var other = { 'a': [3], 'b': [4] };
3357
- *
3358
- * _.mergeWith(object, other, customizer);
3359
- * // => { 'a': [1, 3], 'b': [2, 4] }
3360
- */
3361
- var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
3362
- baseMerge(object, source, srcIndex, customizer);
3363
- });
3364
-
3365
- mergeWith_1 = mergeWith;
3366
- return mergeWith_1;
3367
- }
3368
-
3369
- var defaultsDeep_1;
3370
- var hasRequiredDefaultsDeep;
3371
-
3372
- function requireDefaultsDeep () {
3373
- if (hasRequiredDefaultsDeep) return defaultsDeep_1;
3374
- hasRequiredDefaultsDeep = 1;
3375
- var apply = /*@__PURE__*/ require_apply(),
3376
- baseRest = /*@__PURE__*/ require_baseRest(),
3377
- customDefaultsMerge = /*@__PURE__*/ require_customDefaultsMerge(),
3378
- mergeWith = /*@__PURE__*/ requireMergeWith();
3379
-
3380
- /**
3381
- * This method is like `_.defaults` except that it recursively assigns
3382
- * default properties.
3383
- *
3384
- * **Note:** This method mutates `object`.
3385
- *
3386
- * @static
3387
- * @memberOf _
3388
- * @since 3.10.0
3389
- * @category Object
3390
- * @param {Object} object The destination object.
3391
- * @param {...Object} [sources] The source objects.
3392
- * @returns {Object} Returns `object`.
3393
- * @see _.defaults
3394
- * @example
3395
- *
3396
- * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
3397
- * // => { 'a': { 'b': 2, 'c': 3 } }
3398
- */
3399
- var defaultsDeep = baseRest(function(args) {
3400
- args.push(undefined, customDefaultsMerge);
3401
- return apply(mergeWith, undefined, args);
3402
- });
3403
-
3404
- defaultsDeep_1 = defaultsDeep;
3405
- return defaultsDeep_1;
3406
- }
3407
-
3408
- var defaultsDeepExports = /*@__PURE__*/ requireDefaultsDeep();
3409
- var defaultsDeep = /*@__PURE__*/getDefaultExportFromCjs(defaultsDeepExports);
3410
-
3411
- var isPlainObjectExports = /*@__PURE__*/ requireIsPlainObject();
3412
- var isPlainObject = /*@__PURE__*/getDefaultExportFromCjs(isPlainObjectExports);
3413
-
3414
- /**
3415
- * Utility function to generate default search locations
3416
- * @param name - Base name for configuration files
3417
- * @returns Array of default search locations
3418
- * @description
3419
- * Significance: Provides standard configuration file patterns
3420
- * Core idea: Generate common configuration file patterns
3421
- * Main function: Create search paths for different file types
3422
- * Main purpose: Standardize configuration file discovery
3423
- * Example:
3424
- * ```typescript
3425
- * const places = getDefaultSearchPlaces('myapp');
3426
- * // ['package.json', 'myapp.json', 'myapp.js', ...]
3427
- * ```
3428
- */
3429
- function getDefaultSearchPlaces(name) {
3430
- const exts = ['json', 'js', 'ts', 'cjs', 'yaml', 'yml'];
3431
- return [
3432
- 'package.json',
3433
- ...exts.map((ext) => `${name}.${ext}`),
3434
- ...exts.map((ext) => `.${name}.${ext}`)
3435
- ];
3436
- }
3437
- /**
3438
- * Configuration search utility class
3439
- * @class
3440
- * @description
3441
- * Significance: Manages configuration file discovery and loading
3442
- * Core idea: Unified configuration management
3443
- * Main function: Search and load configuration from various sources
3444
- * Main purpose: Provide consistent configuration access
3445
- * Example:
3446
- * ```typescript
3447
- * const configSearch = new ConfigSearch({
3448
- * name: 'myapp',
3449
- * defaultConfig: { port: 3000 }
3450
- * });
3451
- * const config = configSearch.config;
3452
- * ```
3453
- */
3454
- class ConfigSearch {
3455
- name;
3456
- searchPlaces;
3457
- _config;
3458
- loaders;
3459
- searchCache;
3460
- /**
3461
- * Creates a ConfigSearch instance
3462
- * @param options - Configuration search options
3463
- * @throws Error if neither name nor searchPlaces is provided
3464
- * @description
3465
- * Significance: Initializes configuration search environment
3466
- * Core idea: Setup configuration search parameters
3467
- * Main function: Create search instance with options
3468
- * Main purpose: Prepare for configuration discovery
3469
- * Example:
3470
- * ```typescript
3471
- * const search = new ConfigSearch({
3472
- * name: 'myapp',
3473
- * defaultConfig: { debug: true }
3474
- * });
3475
- * ```
3476
- */
3477
- constructor(options) {
3478
- const { name, searchPlaces, defaultConfig, loaders } = options;
3479
- if (!name && !searchPlaces) {
3480
- throw new Error('searchPlaces or name is required');
3481
- }
3482
- this.name = name;
3483
- this.searchPlaces = searchPlaces || getDefaultSearchPlaces(name);
3484
- this._config = defaultConfig || {};
3485
- this.loaders = loaders;
3486
- }
3487
- /**
3488
- * Get effective configuration
3489
- * @returns Merged configuration object
3490
- * @description
3491
- * Significance: Provides access to final configuration
3492
- * Core idea: Merge default and discovered configurations
3493
- * Main function: Retrieve effective configuration
3494
- * Main purpose: Access complete configuration
3495
- * Example:
3496
- * ```typescript
3497
- * const config = configSearch.config;
3498
- * console.log(config.debug); // true
3499
- * ```
3500
- */
3501
- get config() {
3502
- return defaultsDeep({}, this.search(), this._config);
3503
- }
3504
- /**
3505
- * Get search locations
3506
- * @returns Array of search locations
3507
- * @description
3508
- * Significance: Exposes configuration search paths
3509
- * Core idea: Provide transparency in search process
3510
- * Main function: Return search locations
3511
- * Main purpose: Debug and verify search paths
3512
- * Example:
3513
- * ```typescript
3514
- * const places = configSearch.getSearchPlaces();
3515
- * // ['package.json', 'myapp.config.js', ...]
3516
- * ```
3517
- */
3518
- getSearchPlaces() {
3519
- return this.searchPlaces;
3520
- }
3521
- /**
3522
- * Get configuration from specific location
3523
- * @param options - Search options
3524
- * @returns Configuration object
3525
- * @throws Error if configuration file is invalid
3526
- * @description
3527
- * Significance: Load configuration from specific location
3528
- * Core idea: Flexible configuration loading
3529
- * Main function: Load and validate configuration
3530
- * Main purpose: Custom configuration loading
3531
- * Example:
3532
- * ```typescript
3533
- * const config = configSearch.get({
3534
- * file: 'custom.config.js',
3535
- * dir: process.cwd()
3536
- * });
3537
- * ```
3538
- */
3539
- get(options = {}) {
3540
- const { file, dir = process.cwd() } = options;
3541
- const localConfig = {};
3542
- if (file === false)
3543
- return localConfig;
3544
- const explorer = cosmiconfig.cosmiconfigSync(this.name, {
3545
- searchPlaces: this.searchPlaces,
3546
- loaders: this.loaders
3547
- });
3548
- const result = file ? explorer.load(file) : explorer.search(dir);
3549
- if (result && typeof result.config === 'string') {
3550
- throw new Error(`Invalid configuration file at ${result.filepath}`);
3551
- }
3552
- return result && isPlainObject(result.config) ? result.config : localConfig;
3553
- }
3554
- /**
3555
- * Search for configuration with caching
3556
- * @returns Cached configuration object
3557
- * @description
3558
- * Significance: Provides cached configuration access
3559
- * Core idea: Cache configuration for performance
3560
- * Main function: Search and cache configuration
3561
- * Main purpose: Optimize repeated access
3562
- * Example:
3563
- * ```typescript
3564
- * const config = configSearch.search();
3565
- * // Subsequent calls use cached result
3566
- * ```
3567
- */
3568
- search() {
3569
- if (this.searchCache) {
3570
- return this.searchCache;
3571
- }
3572
- return (this.searchCache = this.get({}));
3573
- }
3574
- }
3575
-
3576
- const defaultFeConfig = {
3577
- protectedBranches: ['master', 'develop', 'main'],
3578
- cleanFiles: [
3579
- 'dist',
3580
- 'node_modules',
3581
- 'yarn.lock',
3582
- 'package-lock.json',
3583
- '.eslintcache',
3584
- '*.log'
3585
- ],
3586
- commitlint: {
3587
- extends: ['@commitlint/config-conventional']
3588
- },
3589
- release: {
3590
- publishPath: '',
3591
- autoMergeReleasePR: false,
3592
- autoMergeType: 'squash',
3593
- branchName: 'release-${pkgName}-${tagName}',
3594
- PRTitle: '[${pkgName} Release] Branch:${branch}, Tag:${tagName}, Env:${env}',
3595
- PRBody: '## Publish Details\n\n- 🏷️ Version: ${tagName}\n- 🌲 Branch: ${branch}\n- 🔧 Environment: ${env}\n\n## Changelog\n\n${changelog}\n\n## Notes\n\n- [ ] Please check if the version number is correct\n- [ ] Please confirm all tests have passed\n- [ ] Please confirm the documentation has been updated\n\n> This PR is auto created by release process, please contact the frontend team if there are any questions.',
3596
- label: {
3597
- color: '1A7F37',
3598
- description: 'Release PR',
3599
- name: 'CI-Release'
3600
- },
3601
- packagesDirectories: [],
3602
- changePackagesLabel: 'changes:${name}'
3603
- },
3604
- envOrder: ['.env.local', '.env.production', '.env']
3605
- };
3606
-
3607
- var assignInWith_1;
3608
- var hasRequiredAssignInWith;
3609
-
3610
- function requireAssignInWith () {
3611
- if (hasRequiredAssignInWith) return assignInWith_1;
3612
- hasRequiredAssignInWith = 1;
3613
- var copyObject = /*@__PURE__*/ require_copyObject(),
3614
- createAssigner = /*@__PURE__*/ require_createAssigner(),
3615
- keysIn = /*@__PURE__*/ requireKeysIn();
3616
-
3617
- /**
3618
- * This method is like `_.assignIn` except that it accepts `customizer`
3619
- * which is invoked to produce the assigned values. If `customizer` returns
3620
- * `undefined`, assignment is handled by the method instead. The `customizer`
3621
- * is invoked with five arguments: (objValue, srcValue, key, object, source).
3622
- *
3623
- * **Note:** This method mutates `object`.
3624
- *
3625
- * @static
3626
- * @memberOf _
3627
- * @since 4.0.0
3628
- * @alias extendWith
3629
- * @category Object
3630
- * @param {Object} object The destination object.
3631
- * @param {...Object} sources The source objects.
3632
- * @param {Function} [customizer] The function to customize assigned values.
3633
- * @returns {Object} Returns `object`.
3634
- * @see _.assignWith
3635
- * @example
3636
- *
3637
- * function customizer(objValue, srcValue) {
3638
- * return _.isUndefined(objValue) ? srcValue : objValue;
3639
- * }
3640
- *
3641
- * var defaults = _.partialRight(_.assignInWith, customizer);
3642
- *
3643
- * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
3644
- * // => { 'a': 1, 'b': 2 }
3645
- */
3646
- var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
3647
- copyObject(source, keysIn(source), object, customizer);
3648
- });
3649
-
3650
- assignInWith_1 = assignInWith;
3651
- return assignInWith_1;
3652
- }
3653
-
3654
- var isError_1;
3655
- var hasRequiredIsError;
3656
-
3657
- function requireIsError () {
3658
- if (hasRequiredIsError) return isError_1;
3659
- hasRequiredIsError = 1;
3660
- var baseGetTag = /*@__PURE__*/ require_baseGetTag(),
3661
- isObjectLike = /*@__PURE__*/ requireIsObjectLike(),
3662
- isPlainObject = /*@__PURE__*/ requireIsPlainObject();
3663
-
3664
- /** `Object#toString` result references. */
3665
- var domExcTag = '[object DOMException]',
3666
- errorTag = '[object Error]';
3667
-
3668
- /**
3669
- * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
3670
- * `SyntaxError`, `TypeError`, or `URIError` object.
3671
- *
3672
- * @static
3673
- * @memberOf _
3674
- * @since 3.0.0
3675
- * @category Lang
3676
- * @param {*} value The value to check.
3677
- * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
3678
- * @example
3679
- *
3680
- * _.isError(new Error);
3681
- * // => true
3682
- *
3683
- * _.isError(Error);
3684
- * // => false
3685
- */
3686
- function isError(value) {
3687
- if (!isObjectLike(value)) {
3688
- return false;
3689
- }
3690
- var tag = baseGetTag(value);
3691
- return tag == errorTag || tag == domExcTag ||
3692
- (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
3693
- }
3694
-
3695
- isError_1 = isError;
3696
- return isError_1;
3697
- }
3698
-
3699
- var attempt_1;
3700
- var hasRequiredAttempt;
3701
-
3702
- function requireAttempt () {
3703
- if (hasRequiredAttempt) return attempt_1;
3704
- hasRequiredAttempt = 1;
3705
- var apply = /*@__PURE__*/ require_apply(),
3706
- baseRest = /*@__PURE__*/ require_baseRest(),
3707
- isError = /*@__PURE__*/ requireIsError();
3708
-
3709
- /**
3710
- * Attempts to invoke `func`, returning either the result or the caught error
3711
- * object. Any additional arguments are provided to `func` when it's invoked.
3712
- *
3713
- * @static
3714
- * @memberOf _
3715
- * @since 3.0.0
3716
- * @category Util
3717
- * @param {Function} func The function to attempt.
3718
- * @param {...*} [args] The arguments to invoke `func` with.
3719
- * @returns {*} Returns the `func` result or error object.
3720
- * @example
3721
- *
3722
- * // Avoid throwing errors for invalid selectors.
3723
- * var elements = _.attempt(function(selector) {
3724
- * return document.querySelectorAll(selector);
3725
- * }, '>_>');
3726
- *
3727
- * if (_.isError(elements)) {
3728
- * elements = [];
3729
- * }
3730
- */
3731
- var attempt = baseRest(function(func, args) {
3732
- try {
3733
- return apply(func, undefined, args);
3734
- } catch (e) {
3735
- return isError(e) ? e : new Error(e);
3736
- }
3737
- });
3738
-
3739
- attempt_1 = attempt;
3740
- return attempt_1;
3741
- }
3742
-
3743
- /**
3744
- * A specialized version of `_.map` for arrays without support for iteratee
3745
- * shorthands.
3746
- *
3747
- * @private
3748
- * @param {Array} [array] The array to iterate over.
3749
- * @param {Function} iteratee The function invoked per iteration.
3750
- * @returns {Array} Returns the new mapped array.
3751
- */
3752
-
3753
- var _arrayMap;
3754
- var hasRequired_arrayMap;
3755
-
3756
- function require_arrayMap () {
3757
- if (hasRequired_arrayMap) return _arrayMap;
3758
- hasRequired_arrayMap = 1;
3759
- function arrayMap(array, iteratee) {
3760
- var index = -1,
3761
- length = array == null ? 0 : array.length,
3762
- result = Array(length);
3763
-
3764
- while (++index < length) {
3765
- result[index] = iteratee(array[index], index, array);
3766
- }
3767
- return result;
3768
- }
3769
-
3770
- _arrayMap = arrayMap;
3771
- return _arrayMap;
3772
- }
3773
-
3774
- var _baseValues;
3775
- var hasRequired_baseValues;
3776
-
3777
- function require_baseValues () {
3778
- if (hasRequired_baseValues) return _baseValues;
3779
- hasRequired_baseValues = 1;
3780
- var arrayMap = /*@__PURE__*/ require_arrayMap();
3781
-
3782
- /**
3783
- * The base implementation of `_.values` and `_.valuesIn` which creates an
3784
- * array of `object` property values corresponding to the property names
3785
- * of `props`.
3786
- *
3787
- * @private
3788
- * @param {Object} object The object to query.
3789
- * @param {Array} props The property names to get values for.
3790
- * @returns {Object} Returns the array of property values.
3791
- */
3792
- function baseValues(object, props) {
3793
- return arrayMap(props, function(key) {
3794
- return object[key];
3795
- });
3796
- }
3797
-
3798
- _baseValues = baseValues;
3799
- return _baseValues;
3800
- }
3801
-
3802
- var _customDefaultsAssignIn;
3803
- var hasRequired_customDefaultsAssignIn;
3804
-
3805
- function require_customDefaultsAssignIn () {
3806
- if (hasRequired_customDefaultsAssignIn) return _customDefaultsAssignIn;
3807
- hasRequired_customDefaultsAssignIn = 1;
3808
- var eq = /*@__PURE__*/ requireEq();
3809
-
3810
- /** Used for built-in method references. */
3811
- var objectProto = Object.prototype;
3812
-
3813
- /** Used to check objects for own properties. */
3814
- var hasOwnProperty = objectProto.hasOwnProperty;
3815
-
3816
- /**
3817
- * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
3818
- * of source objects to the destination object for all destination properties
3819
- * that resolve to `undefined`.
3820
- *
3821
- * @private
3822
- * @param {*} objValue The destination value.
3823
- * @param {*} srcValue The source value.
3824
- * @param {string} key The key of the property to assign.
3825
- * @param {Object} object The parent object of `objValue`.
3826
- * @returns {*} Returns the value to assign.
3827
- */
3828
- function customDefaultsAssignIn(objValue, srcValue, key, object) {
3829
- if (objValue === undefined ||
3830
- (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
3831
- return srcValue;
3832
- }
3833
- return objValue;
3834
- }
3835
-
3836
- _customDefaultsAssignIn = customDefaultsAssignIn;
3837
- return _customDefaultsAssignIn;
3838
- }
3839
-
3840
- /** Used to escape characters for inclusion in compiled string literals. */
3841
-
3842
- var _escapeStringChar;
3843
- var hasRequired_escapeStringChar;
3844
-
3845
- function require_escapeStringChar () {
3846
- if (hasRequired_escapeStringChar) return _escapeStringChar;
3847
- hasRequired_escapeStringChar = 1;
3848
- var stringEscapes = {
3849
- '\\': '\\',
3850
- "'": "'",
3851
- '\n': 'n',
3852
- '\r': 'r',
3853
- '\u2028': 'u2028',
3854
- '\u2029': 'u2029'
3855
- };
3856
-
3857
- /**
3858
- * Used by `_.template` to escape characters for inclusion in compiled string literals.
3859
- *
3860
- * @private
3861
- * @param {string} chr The matched character to escape.
3862
- * @returns {string} Returns the escaped character.
3863
- */
3864
- function escapeStringChar(chr) {
3865
- return '\\' + stringEscapes[chr];
3866
- }
3867
-
3868
- _escapeStringChar = escapeStringChar;
3869
- return _escapeStringChar;
3870
- }
3871
-
3872
- var _nativeKeys;
3873
- var hasRequired_nativeKeys;
3874
-
3875
- function require_nativeKeys () {
3876
- if (hasRequired_nativeKeys) return _nativeKeys;
3877
- hasRequired_nativeKeys = 1;
3878
- var overArg = /*@__PURE__*/ require_overArg();
3879
-
3880
- /* Built-in method references for those with the same name as other `lodash` methods. */
3881
- var nativeKeys = overArg(Object.keys, Object);
3882
-
3883
- _nativeKeys = nativeKeys;
3884
- return _nativeKeys;
3885
- }
3886
-
3887
- var _baseKeys;
3888
- var hasRequired_baseKeys;
3889
-
3890
- function require_baseKeys () {
3891
- if (hasRequired_baseKeys) return _baseKeys;
3892
- hasRequired_baseKeys = 1;
3893
- var isPrototype = /*@__PURE__*/ require_isPrototype(),
3894
- nativeKeys = /*@__PURE__*/ require_nativeKeys();
3895
-
3896
- /** Used for built-in method references. */
3897
- var objectProto = Object.prototype;
3898
-
3899
- /** Used to check objects for own properties. */
3900
- var hasOwnProperty = objectProto.hasOwnProperty;
3901
-
3902
- /**
3903
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
3904
- *
3905
- * @private
3906
- * @param {Object} object The object to query.
3907
- * @returns {Array} Returns the array of property names.
3908
- */
3909
- function baseKeys(object) {
3910
- if (!isPrototype(object)) {
3911
- return nativeKeys(object);
3912
- }
3913
- var result = [];
3914
- for (var key in Object(object)) {
3915
- if (hasOwnProperty.call(object, key) && key != 'constructor') {
3916
- result.push(key);
3917
- }
3918
- }
3919
- return result;
3920
- }
3921
-
3922
- _baseKeys = baseKeys;
3923
- return _baseKeys;
3924
- }
3925
-
3926
- var keys_1;
3927
- var hasRequiredKeys;
3928
-
3929
- function requireKeys () {
3930
- if (hasRequiredKeys) return keys_1;
3931
- hasRequiredKeys = 1;
3932
- var arrayLikeKeys = /*@__PURE__*/ require_arrayLikeKeys(),
3933
- baseKeys = /*@__PURE__*/ require_baseKeys(),
3934
- isArrayLike = /*@__PURE__*/ requireIsArrayLike();
3935
-
3936
- /**
3937
- * Creates an array of the own enumerable property names of `object`.
3938
- *
3939
- * **Note:** Non-object values are coerced to objects. See the
3940
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
3941
- * for more details.
3942
- *
3943
- * @static
3944
- * @since 0.1.0
3945
- * @memberOf _
3946
- * @category Object
3947
- * @param {Object} object The object to query.
3948
- * @returns {Array} Returns the array of property names.
3949
- * @example
3950
- *
3951
- * function Foo() {
3952
- * this.a = 1;
3953
- * this.b = 2;
3954
- * }
3955
- *
3956
- * Foo.prototype.c = 3;
3957
- *
3958
- * _.keys(new Foo);
3959
- * // => ['a', 'b'] (iteration order is not guaranteed)
3960
- *
3961
- * _.keys('hi');
3962
- * // => ['0', '1']
3963
- */
3964
- function keys(object) {
3965
- return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
3966
- }
3967
-
3968
- keys_1 = keys;
3969
- return keys_1;
3970
- }
3971
-
3972
- /** Used to match template delimiters. */
3973
-
3974
- var _reInterpolate;
3975
- var hasRequired_reInterpolate;
3976
-
3977
- function require_reInterpolate () {
3978
- if (hasRequired_reInterpolate) return _reInterpolate;
3979
- hasRequired_reInterpolate = 1;
3980
- var reInterpolate = /<%=([\s\S]+?)%>/g;
3981
-
3982
- _reInterpolate = reInterpolate;
3983
- return _reInterpolate;
3984
- }
3985
-
3986
- /**
3987
- * The base implementation of `_.propertyOf` without support for deep paths.
3988
- *
3989
- * @private
3990
- * @param {Object} object The object to query.
3991
- * @returns {Function} Returns the new accessor function.
3992
- */
3993
-
3994
- var _basePropertyOf;
3995
- var hasRequired_basePropertyOf;
3996
-
3997
- function require_basePropertyOf () {
3998
- if (hasRequired_basePropertyOf) return _basePropertyOf;
3999
- hasRequired_basePropertyOf = 1;
4000
- function basePropertyOf(object) {
4001
- return function(key) {
4002
- return object == null ? undefined : object[key];
4003
- };
4004
- }
4005
-
4006
- _basePropertyOf = basePropertyOf;
4007
- return _basePropertyOf;
4008
- }
4009
-
4010
- var _escapeHtmlChar;
4011
- var hasRequired_escapeHtmlChar;
4012
-
4013
- function require_escapeHtmlChar () {
4014
- if (hasRequired_escapeHtmlChar) return _escapeHtmlChar;
4015
- hasRequired_escapeHtmlChar = 1;
4016
- var basePropertyOf = /*@__PURE__*/ require_basePropertyOf();
4017
-
4018
- /** Used to map characters to HTML entities. */
4019
- var htmlEscapes = {
4020
- '&': '&amp;',
4021
- '<': '&lt;',
4022
- '>': '&gt;',
4023
- '"': '&quot;',
4024
- "'": '&#39;'
4025
- };
4026
-
4027
- /**
4028
- * Used by `_.escape` to convert characters to HTML entities.
4029
- *
4030
- * @private
4031
- * @param {string} chr The matched character to escape.
4032
- * @returns {string} Returns the escaped character.
4033
- */
4034
- var escapeHtmlChar = basePropertyOf(htmlEscapes);
4035
-
4036
- _escapeHtmlChar = escapeHtmlChar;
4037
- return _escapeHtmlChar;
4038
- }
4039
-
4040
- var isSymbol_1;
4041
- var hasRequiredIsSymbol;
4042
-
4043
- function requireIsSymbol () {
4044
- if (hasRequiredIsSymbol) return isSymbol_1;
4045
- hasRequiredIsSymbol = 1;
4046
- var baseGetTag = /*@__PURE__*/ require_baseGetTag(),
4047
- isObjectLike = /*@__PURE__*/ requireIsObjectLike();
4048
-
4049
- /** `Object#toString` result references. */
4050
- var symbolTag = '[object Symbol]';
4051
-
4052
- /**
4053
- * Checks if `value` is classified as a `Symbol` primitive or object.
4054
- *
4055
- * @static
4056
- * @memberOf _
4057
- * @since 4.0.0
4058
- * @category Lang
4059
- * @param {*} value The value to check.
4060
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
4061
- * @example
4062
- *
4063
- * _.isSymbol(Symbol.iterator);
4064
- * // => true
4065
- *
4066
- * _.isSymbol('abc');
4067
- * // => false
4068
- */
4069
- function isSymbol(value) {
4070
- return typeof value == 'symbol' ||
4071
- (isObjectLike(value) && baseGetTag(value) == symbolTag);
4072
- }
4073
-
4074
- isSymbol_1 = isSymbol;
4075
- return isSymbol_1;
4076
- }
4077
-
4078
- var _baseToString;
4079
- var hasRequired_baseToString;
4080
-
4081
- function require_baseToString () {
4082
- if (hasRequired_baseToString) return _baseToString;
4083
- hasRequired_baseToString = 1;
4084
- var Symbol = /*@__PURE__*/ require_Symbol(),
4085
- arrayMap = /*@__PURE__*/ require_arrayMap(),
4086
- isArray = /*@__PURE__*/ requireIsArray(),
4087
- isSymbol = /*@__PURE__*/ requireIsSymbol();
4088
-
4089
- /** Used to convert symbols to primitives and strings. */
4090
- var symbolProto = Symbol ? Symbol.prototype : undefined,
4091
- symbolToString = symbolProto ? symbolProto.toString : undefined;
4092
-
4093
- /**
4094
- * The base implementation of `_.toString` which doesn't convert nullish
4095
- * values to empty strings.
4096
- *
4097
- * @private
4098
- * @param {*} value The value to process.
4099
- * @returns {string} Returns the string.
4100
- */
4101
- function baseToString(value) {
4102
- // Exit early for strings to avoid a performance hit in some environments.
4103
- if (typeof value == 'string') {
4104
- return value;
4105
- }
4106
- if (isArray(value)) {
4107
- // Recursively convert values (susceptible to call stack limits).
4108
- return arrayMap(value, baseToString) + '';
4109
- }
4110
- if (isSymbol(value)) {
4111
- return symbolToString ? symbolToString.call(value) : '';
4112
- }
4113
- var result = (value + '');
4114
- return (result == '0' && (1 / value) == -Infinity) ? '-0' : result;
4115
- }
4116
-
4117
- _baseToString = baseToString;
4118
- return _baseToString;
4119
- }
4120
-
4121
- var toString_1;
4122
- var hasRequiredToString;
4123
-
4124
- function requireToString () {
4125
- if (hasRequiredToString) return toString_1;
4126
- hasRequiredToString = 1;
4127
- var baseToString = /*@__PURE__*/ require_baseToString();
4128
-
4129
- /**
4130
- * Converts `value` to a string. An empty string is returned for `null`
4131
- * and `undefined` values. The sign of `-0` is preserved.
4132
- *
4133
- * @static
4134
- * @memberOf _
4135
- * @since 4.0.0
4136
- * @category Lang
4137
- * @param {*} value The value to convert.
4138
- * @returns {string} Returns the converted string.
4139
- * @example
4140
- *
4141
- * _.toString(null);
4142
- * // => ''
4143
- *
4144
- * _.toString(-0);
4145
- * // => '-0'
4146
- *
4147
- * _.toString([1, 2, 3]);
4148
- * // => '1,2,3'
4149
- */
4150
- function toString(value) {
4151
- return value == null ? '' : baseToString(value);
4152
- }
4153
-
4154
- toString_1 = toString;
4155
- return toString_1;
4156
- }
4157
-
4158
- var _escape;
4159
- var hasRequired_escape;
4160
-
4161
- function require_escape () {
4162
- if (hasRequired_escape) return _escape;
4163
- hasRequired_escape = 1;
4164
- var escapeHtmlChar = /*@__PURE__*/ require_escapeHtmlChar(),
4165
- toString = /*@__PURE__*/ requireToString();
4166
-
4167
- /** Used to match HTML entities and HTML characters. */
4168
- var reUnescapedHtml = /[&<>"']/g,
4169
- reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
4170
-
4171
- /**
4172
- * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
4173
- * corresponding HTML entities.
4174
- *
4175
- * **Note:** No other characters are escaped. To escape additional
4176
- * characters use a third-party library like [_he_](https://mths.be/he).
4177
- *
4178
- * Though the ">" character is escaped for symmetry, characters like
4179
- * ">" and "/" don't need escaping in HTML and have no special meaning
4180
- * unless they're part of a tag or unquoted attribute value. See
4181
- * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
4182
- * (under "semi-related fun fact") for more details.
4183
- *
4184
- * When working with HTML you should always
4185
- * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
4186
- * XSS vectors.
4187
- *
4188
- * @static
4189
- * @since 0.1.0
4190
- * @memberOf _
4191
- * @category String
4192
- * @param {string} [string=''] The string to escape.
4193
- * @returns {string} Returns the escaped string.
4194
- * @example
4195
- *
4196
- * _.escape('fred, barney, & pebbles');
4197
- * // => 'fred, barney, &amp; pebbles'
4198
- */
4199
- function escape(string) {
4200
- string = toString(string);
4201
- return (string && reHasUnescapedHtml.test(string))
4202
- ? string.replace(reUnescapedHtml, escapeHtmlChar)
4203
- : string;
4204
- }
4205
-
4206
- _escape = escape;
4207
- return _escape;
4208
- }
4209
-
4210
- /** Used to match template delimiters. */
4211
-
4212
- var _reEscape;
4213
- var hasRequired_reEscape;
4214
-
4215
- function require_reEscape () {
4216
- if (hasRequired_reEscape) return _reEscape;
4217
- hasRequired_reEscape = 1;
4218
- var reEscape = /<%-([\s\S]+?)%>/g;
4219
-
4220
- _reEscape = reEscape;
4221
- return _reEscape;
4222
- }
4223
-
4224
- /** Used to match template delimiters. */
4225
-
4226
- var _reEvaluate;
4227
- var hasRequired_reEvaluate;
4228
-
4229
- function require_reEvaluate () {
4230
- if (hasRequired_reEvaluate) return _reEvaluate;
4231
- hasRequired_reEvaluate = 1;
4232
- var reEvaluate = /<%([\s\S]+?)%>/g;
4233
-
4234
- _reEvaluate = reEvaluate;
4235
- return _reEvaluate;
4236
- }
4237
-
4238
- var templateSettings_1;
4239
- var hasRequiredTemplateSettings;
4240
-
4241
- function requireTemplateSettings () {
4242
- if (hasRequiredTemplateSettings) return templateSettings_1;
4243
- hasRequiredTemplateSettings = 1;
4244
- var escape = /*@__PURE__*/ require_escape(),
4245
- reEscape = /*@__PURE__*/ require_reEscape(),
4246
- reEvaluate = /*@__PURE__*/ require_reEvaluate(),
4247
- reInterpolate = /*@__PURE__*/ require_reInterpolate();
4248
-
4249
- /**
4250
- * By default, the template delimiters used by lodash are like those in
4251
- * embedded Ruby (ERB) as well as ES2015 template strings. Change the
4252
- * following template settings to use alternative delimiters.
4253
- *
4254
- * @static
4255
- * @memberOf _
4256
- * @type {Object}
4257
- */
4258
- var templateSettings = {
4259
-
4260
- /**
4261
- * Used to detect `data` property values to be HTML-escaped.
4262
- *
4263
- * @memberOf _.templateSettings
4264
- * @type {RegExp}
4265
- */
4266
- 'escape': reEscape,
4267
-
4268
- /**
4269
- * Used to detect code to be evaluated.
4270
- *
4271
- * @memberOf _.templateSettings
4272
- * @type {RegExp}
4273
- */
4274
- 'evaluate': reEvaluate,
4275
-
4276
- /**
4277
- * Used to detect `data` property values to inject.
4278
- *
4279
- * @memberOf _.templateSettings
4280
- * @type {RegExp}
4281
- */
4282
- 'interpolate': reInterpolate,
4283
-
4284
- /**
4285
- * Used to reference the data object in the template text.
4286
- *
4287
- * @memberOf _.templateSettings
4288
- * @type {string}
4289
- */
4290
- 'variable': '',
4291
-
4292
- /**
4293
- * Used to import variables into the compiled template.
4294
- *
4295
- * @memberOf _.templateSettings
4296
- * @type {Object}
4297
- */
4298
- 'imports': {
4299
-
4300
- /**
4301
- * A reference to the `lodash` function.
4302
- *
4303
- * @memberOf _.templateSettings.imports
4304
- * @type {Function}
4305
- */
4306
- '_': { 'escape': escape }
4307
- }
4308
- };
4309
-
4310
- templateSettings_1 = templateSettings;
4311
- return templateSettings_1;
4312
- }
4313
-
4314
- var template_1;
4315
- var hasRequiredTemplate;
4316
-
4317
- function requireTemplate () {
4318
- if (hasRequiredTemplate) return template_1;
4319
- hasRequiredTemplate = 1;
4320
- var assignInWith = /*@__PURE__*/ requireAssignInWith(),
4321
- attempt = /*@__PURE__*/ requireAttempt(),
4322
- baseValues = /*@__PURE__*/ require_baseValues(),
4323
- customDefaultsAssignIn = /*@__PURE__*/ require_customDefaultsAssignIn(),
4324
- escapeStringChar = /*@__PURE__*/ require_escapeStringChar(),
4325
- isError = /*@__PURE__*/ requireIsError(),
4326
- isIterateeCall = /*@__PURE__*/ require_isIterateeCall(),
4327
- keys = /*@__PURE__*/ requireKeys(),
4328
- reInterpolate = /*@__PURE__*/ require_reInterpolate(),
4329
- templateSettings = /*@__PURE__*/ requireTemplateSettings(),
4330
- toString = /*@__PURE__*/ requireToString();
4331
-
4332
- /** Error message constants. */
4333
- var INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
4334
-
4335
- /** Used to match empty string literals in compiled template source. */
4336
- var reEmptyStringLeading = /\b__p \+= '';/g,
4337
- reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
4338
- reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
4339
-
4340
- /**
4341
- * Used to validate the `validate` option in `_.template` variable.
4342
- *
4343
- * Forbids characters which could potentially change the meaning of the function argument definition:
4344
- * - "()," (modification of function parameters)
4345
- * - "=" (default value)
4346
- * - "[]{}" (destructuring of function parameters)
4347
- * - "/" (beginning of a comment)
4348
- * - whitespace
4349
- */
4350
- var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
4351
-
4352
- /**
4353
- * Used to match
4354
- * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
4355
- */
4356
- var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
4357
-
4358
- /** Used to ensure capturing order of template delimiters. */
4359
- var reNoMatch = /($^)/;
4360
-
4361
- /** Used to match unescaped characters in compiled string literals. */
4362
- var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
4363
-
4364
- /** Used for built-in method references. */
4365
- var objectProto = Object.prototype;
4366
-
4367
- /** Used to check objects for own properties. */
4368
- var hasOwnProperty = objectProto.hasOwnProperty;
4369
-
4370
- /**
4371
- * Creates a compiled template function that can interpolate data properties
4372
- * in "interpolate" delimiters, HTML-escape interpolated data properties in
4373
- * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
4374
- * properties may be accessed as free variables in the template. If a setting
4375
- * object is given, it takes precedence over `_.templateSettings` values.
4376
- *
4377
- * **Note:** In the development build `_.template` utilizes
4378
- * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
4379
- * for easier debugging.
4380
- *
4381
- * For more information on precompiling templates see
4382
- * [lodash's custom builds documentation](https://lodash.com/custom-builds).
4383
- *
4384
- * For more information on Chrome extension sandboxes see
4385
- * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
4386
- *
4387
- * @static
4388
- * @since 0.1.0
4389
- * @memberOf _
4390
- * @category String
4391
- * @param {string} [string=''] The template string.
4392
- * @param {Object} [options={}] The options object.
4393
- * @param {RegExp} [options.escape=_.templateSettings.escape]
4394
- * The HTML "escape" delimiter.
4395
- * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
4396
- * The "evaluate" delimiter.
4397
- * @param {Object} [options.imports=_.templateSettings.imports]
4398
- * An object to import into the template as free variables.
4399
- * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
4400
- * The "interpolate" delimiter.
4401
- * @param {string} [options.sourceURL='templateSources[n]']
4402
- * The sourceURL of the compiled template.
4403
- * @param {string} [options.variable='obj']
4404
- * The data object variable name.
4405
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
4406
- * @returns {Function} Returns the compiled template function.
4407
- * @example
4408
- *
4409
- * // Use the "interpolate" delimiter to create a compiled template.
4410
- * var compiled = _.template('hello <%= user %>!');
4411
- * compiled({ 'user': 'fred' });
4412
- * // => 'hello fred!'
4413
- *
4414
- * // Use the HTML "escape" delimiter to escape data property values.
4415
- * var compiled = _.template('<b><%- value %></b>');
4416
- * compiled({ 'value': '<script>' });
4417
- * // => '<b>&lt;script&gt;</b>'
4418
- *
4419
- * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
4420
- * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
4421
- * compiled({ 'users': ['fred', 'barney'] });
4422
- * // => '<li>fred</li><li>barney</li>'
4423
- *
4424
- * // Use the internal `print` function in "evaluate" delimiters.
4425
- * var compiled = _.template('<% print("hello " + user); %>!');
4426
- * compiled({ 'user': 'barney' });
4427
- * // => 'hello barney!'
4428
- *
4429
- * // Use the ES template literal delimiter as an "interpolate" delimiter.
4430
- * // Disable support by replacing the "interpolate" delimiter.
4431
- * var compiled = _.template('hello ${ user }!');
4432
- * compiled({ 'user': 'pebbles' });
4433
- * // => 'hello pebbles!'
4434
- *
4435
- * // Use backslashes to treat delimiters as plain text.
4436
- * var compiled = _.template('<%= "\\<%- value %\\>" %>');
4437
- * compiled({ 'value': 'ignored' });
4438
- * // => '<%- value %>'
4439
- *
4440
- * // Use the `imports` option to import `jQuery` as `jq`.
4441
- * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
4442
- * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
4443
- * compiled({ 'users': ['fred', 'barney'] });
4444
- * // => '<li>fred</li><li>barney</li>'
4445
- *
4446
- * // Use the `sourceURL` option to specify a custom sourceURL for the template.
4447
- * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
4448
- * compiled(data);
4449
- * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
4450
- *
4451
- * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
4452
- * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
4453
- * compiled.source;
4454
- * // => function(data) {
4455
- * // var __t, __p = '';
4456
- * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
4457
- * // return __p;
4458
- * // }
4459
- *
4460
- * // Use custom template delimiters.
4461
- * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
4462
- * var compiled = _.template('hello {{ user }}!');
4463
- * compiled({ 'user': 'mustache' });
4464
- * // => 'hello mustache!'
4465
- *
4466
- * // Use the `source` property to inline compiled templates for meaningful
4467
- * // line numbers in error messages and stack traces.
4468
- * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
4469
- * var JST = {\
4470
- * "main": ' + _.template(mainText).source + '\
4471
- * };\
4472
- * ');
4473
- */
4474
- function template(string, options, guard) {
4475
- // Based on John Resig's `tmpl` implementation
4476
- // (http://ejohn.org/blog/javascript-micro-templating/)
4477
- // and Laura Doktorova's doT.js (https://github.com/olado/doT).
4478
- var settings = templateSettings.imports._.templateSettings || templateSettings;
4479
-
4480
- if (guard && isIterateeCall(string, options, guard)) {
4481
- options = undefined;
4482
- }
4483
- string = toString(string);
4484
- options = assignInWith({}, options, settings, customDefaultsAssignIn);
4485
-
4486
- var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
4487
- importsKeys = keys(imports),
4488
- importsValues = baseValues(imports, importsKeys);
4489
-
4490
- var isEscaping,
4491
- isEvaluating,
4492
- index = 0,
4493
- interpolate = options.interpolate || reNoMatch,
4494
- source = "__p += '";
4495
-
4496
- // Compile the regexp to match each delimiter.
4497
- var reDelimiters = RegExp(
4498
- (options.escape || reNoMatch).source + '|' +
4499
- interpolate.source + '|' +
4500
- (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
4501
- (options.evaluate || reNoMatch).source + '|$'
4502
- , 'g');
4503
-
4504
- // Use a sourceURL for easier debugging.
4505
- // The sourceURL gets injected into the source that's eval-ed, so be careful
4506
- // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
4507
- // and escape the comment, thus injecting code that gets evaled.
4508
- var sourceURL = hasOwnProperty.call(options, 'sourceURL')
4509
- ? ('//# sourceURL=' +
4510
- (options.sourceURL + '').replace(/\s/g, ' ') +
4511
- '\n')
4512
- : '';
4513
-
4514
- string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
4515
- interpolateValue || (interpolateValue = esTemplateValue);
4516
-
4517
- // Escape characters that can't be included in string literals.
4518
- source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
4519
-
4520
- // Replace delimiters with snippets.
4521
- if (escapeValue) {
4522
- isEscaping = true;
4523
- source += "' +\n__e(" + escapeValue + ") +\n'";
4524
- }
4525
- if (evaluateValue) {
4526
- isEvaluating = true;
4527
- source += "';\n" + evaluateValue + ";\n__p += '";
4528
- }
4529
- if (interpolateValue) {
4530
- source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
4531
- }
4532
- index = offset + match.length;
4533
-
4534
- // The JS engine embedded in Adobe products needs `match` returned in
4535
- // order to produce the correct `offset` value.
4536
- return match;
4537
- });
4538
-
4539
- source += "';\n";
4540
-
4541
- // If `variable` is not specified wrap a with-statement around the generated
4542
- // code to add the data object to the top of the scope chain.
4543
- var variable = hasOwnProperty.call(options, 'variable') && options.variable;
4544
- if (!variable) {
4545
- source = 'with (obj) {\n' + source + '\n}\n';
4546
- }
4547
- // Throw an error if a forbidden character was found in `variable`, to prevent
4548
- // potential command injection attacks.
4549
- else if (reForbiddenIdentifierChars.test(variable)) {
4550
- throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
4551
- }
4552
-
4553
- // Cleanup code by stripping empty strings.
4554
- source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
4555
- .replace(reEmptyStringMiddle, '$1')
4556
- .replace(reEmptyStringTrailing, '$1;');
4557
-
4558
- // Frame code as the function body.
4559
- source = 'function(' + (variable || 'obj') + ') {\n' +
4560
- (variable
4561
- ? ''
4562
- : 'obj || (obj = {});\n'
4563
- ) +
4564
- "var __t, __p = ''" +
4565
- (isEscaping
4566
- ? ', __e = _.escape'
4567
- : ''
4568
- ) +
4569
- (isEvaluating
4570
- ? ', __j = Array.prototype.join;\n' +
4571
- "function print() { __p += __j.call(arguments, '') }\n"
4572
- : ';\n'
4573
- ) +
4574
- source +
4575
- 'return __p\n}';
4576
-
4577
- var result = attempt(function() {
4578
- return Function(importsKeys, sourceURL + 'return ' + source)
4579
- .apply(undefined, importsValues);
4580
- });
4581
-
4582
- // Provide the compiled function's source by its `toString` method or
4583
- // the `source` property as a convenience for inlining compiled templates.
4584
- result.source = source;
4585
- if (isError(result)) {
4586
- throw result;
4587
- }
4588
- return result;
4589
- }
4590
-
4591
- template_1 = template;
4592
- return template_1;
4593
- }
4594
-
4595
- var templateExports = /*@__PURE__*/ requireTemplate();
4596
- var lodashTemplate = /*@__PURE__*/getDefaultExportFromCjs(templateExports);
4597
-
4598
- /**
4599
- * Shell class for command execution
4600
- * @class
4601
- * @description Provides methods for executing shell commands with caching and templating support
4602
- */
4603
- class Shell {
4604
- config;
4605
- cache;
4606
- /**
4607
- * Creates a new Shell instance
4608
- * @param config - Shell configuration
4609
- * @param cache - Command cache map
4610
- */
4611
- constructor(config, cache = new Map()) {
4612
- this.config = config;
4613
- this.cache = cache;
4614
- }
4615
- /**
4616
- * Gets the logger instance
4617
- */
4618
- get logger() {
4619
- return this.config.logger;
4620
- }
4621
- /**
4622
- * Formats a template string with context
4623
- * @param template - Template string
4624
- * @param context - Context object for template interpolation
4625
- * @returns Formatted string
4626
- */
4627
- static format(template = '', context = {}) {
4628
- return lodashTemplate(template)(context);
4629
- }
4630
- /**
4631
- * Formats a template string with context and error handling
4632
- * @param template - Template string
4633
- * @param context - Context object for template interpolation
4634
- * @returns Formatted string
4635
- * @throws Error if template formatting fails
4636
- */
4637
- format(template = '', context = {}) {
4638
- try {
4639
- return Shell.format(template, context);
4640
- }
4641
- catch (error) {
4642
- this.logger.error(`Unable to render template with context:\n${template}\n${JSON.stringify(context)}`);
4643
- this.logger.error(error);
4644
- throw error;
4645
- }
4646
- }
4647
- /**
4648
- * Executes a command with options
4649
- * @param command - Command string or array
4650
- * @param options - Execution options
4651
- * @returns Promise resolving to command output
4652
- */
4653
- exec(command, options = {}) {
4654
- const { context, ...execOptions } = options;
4655
- return typeof command === 'string'
4656
- ? this.execFormattedCommand(this.format(command, context || {}), execOptions)
4657
- : this.execFormattedCommand(command, execOptions);
4658
- }
4659
- /**
4660
- * Executes a command silently
4661
- * @param command - Command string or array
4662
- * @param options - Execution options
4663
- * @returns Promise resolving to command output
4664
- * @deprecated Use `exec` instead
4665
- */
4666
- run(command, options = {}) {
4667
- return this.exec(command, { silent: true, ...options });
4668
- }
4669
- /**
4670
- * Executes a formatted command with caching
4671
- * @param command - Formatted command string or array
4672
- * @param options - Execution options
4673
- * @returns Promise resolving to command output
4674
- */
4675
- async execFormattedCommand(command, options = {}) {
4676
- const execPromise = this.config.execPromise;
4677
- if (!execPromise) {
4678
- throw new Error('execPromise is not defined');
4679
- }
4680
- const { dryRunResult, silent, dryRun, isCache } = options;
4681
- const isDryRun = dryRun !== undefined ? dryRun : this.config.dryRun;
4682
- const _isCache = isCache !== undefined ? !!isCache : !!this.config.isCache;
4683
- const cacheKey = typeof command === 'string' ? command : command.join(' ');
4684
- const isCached = _isCache && this.cache.has(cacheKey);
4685
- if (!silent) {
4686
- this.logger.exec(command, { isCached });
4687
- }
4688
- if (isDryRun) {
4689
- return Promise.resolve(dryRunResult);
4690
- }
4691
- if (isCached) {
4692
- return this.cache.get(cacheKey);
4693
- }
4694
- const result = execPromise(command, options);
4695
- if (!this.cache.has(cacheKey)) {
4696
- this.cache.set(cacheKey, result);
4697
- }
4698
- return result;
4699
- }
4700
- }
4701
-
4702
- var merge_1;
4703
- var hasRequiredMerge;
4704
-
4705
- function requireMerge () {
4706
- if (hasRequiredMerge) return merge_1;
4707
- hasRequiredMerge = 1;
4708
- var baseMerge = /*@__PURE__*/ require_baseMerge(),
4709
- createAssigner = /*@__PURE__*/ require_createAssigner();
4710
-
4711
- /**
4712
- * This method is like `_.assign` except that it recursively merges own and
4713
- * inherited enumerable string keyed properties of source objects into the
4714
- * destination object. Source properties that resolve to `undefined` are
4715
- * skipped if a destination value exists. Array and plain object properties
4716
- * are merged recursively. Other objects and value types are overridden by
4717
- * assignment. Source objects are applied from left to right. Subsequent
4718
- * sources overwrite property assignments of previous sources.
4719
- *
4720
- * **Note:** This method mutates `object`.
4721
- *
4722
- * @static
4723
- * @memberOf _
4724
- * @since 0.5.0
4725
- * @category Object
4726
- * @param {Object} object The destination object.
4727
- * @param {...Object} [sources] The source objects.
4728
- * @returns {Object} Returns `object`.
4729
- * @example
4730
- *
4731
- * var object = {
4732
- * 'a': [{ 'b': 2 }, { 'd': 4 }]
4733
- * };
4734
- *
4735
- * var other = {
4736
- * 'a': [{ 'c': 3 }, { 'e': 5 }]
4737
- * };
4738
- *
4739
- * _.merge(object, other);
4740
- * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
4741
- */
4742
- var merge = createAssigner(function(object, source, srcIndex) {
4743
- baseMerge(object, source, srcIndex);
4744
- });
4745
-
4746
- merge_1 = merge;
4747
- return merge_1;
4748
- }
4749
-
4750
- var mergeExports = /*@__PURE__*/ requireMerge();
4751
- var merge = /*@__PURE__*/getDefaultExportFromCjs(mergeExports);
4752
-
4753
- class ScriptsLogger extends feCorekit.Logger {
4754
- /**
4755
- * @override
4756
- * @param {string} value
4757
- * @returns {string}
4758
- */
4759
- prefix(value) {
4760
- switch (value) {
4761
- case 'INFO':
4762
- return chalk.blue(value);
4763
- case 'WARN':
4764
- return chalk.yellow(value);
4765
- case 'ERROR':
4766
- return chalk.red(value);
4767
- case 'DEBUG':
4768
- return chalk.gray(value);
4769
- default:
4770
- return value;
4771
- }
4772
- }
4773
- obtrusive(title) {
4774
- const header = chalk.bold(title);
4775
- super.obtrusive(header);
4776
- }
4777
- }
4778
-
4779
- const execPromise = (command, options) => {
4780
- const commandString = Array.isArray(command) ? command.join(' ') : command;
4781
- return new Promise((resolve, reject) => {
4782
- child_process.exec(commandString, {
4783
- encoding: 'utf-8',
4784
- ...options
4785
- }, (err, stdout, stderr) => {
4786
- let code;
4787
- if (!err) {
4788
- code = 0;
4789
- }
4790
- else if (err.code === undefined) {
4791
- code = 1;
4792
- }
4793
- else {
4794
- code = err.code;
4795
- }
4796
- if (code === 0) {
4797
- resolve(stdout.trim());
4798
- }
4799
- else {
4800
- reject(new Error(stderr || stdout));
4801
- }
4802
- });
4803
- });
4804
- };
4805
-
4806
- /**
4807
- * Create a new ConfigSearch instance with fe configuration
4808
- * @param feConfig - Custom fe configuration
4809
- * @returns ConfigSearch instance
4810
- * @description
4811
- * Significance: Creates configuration search utility
4812
- * Core idea: Merge default and custom configurations
4813
- * Main function: Initialize configuration search
4814
- * Main purpose: Provide configuration discovery
4815
- *
4816
- * @example
4817
- * ```typescript
4818
- * const configSearch = getFeConfigSearch({ debug: true });
4819
- * ```
4820
- */
4821
- function getFeConfigSearch(feConfig) {
4822
- return new ConfigSearch({
4823
- name: 'fe-config',
4824
- defaultConfig: merge({}, defaultFeConfig, feConfig)
4825
- });
4826
- }
4827
- /**
4828
- * Script execution context class
4829
- * @class
4830
- * @description
4831
- * Significance: Manages script execution environment
4832
- * Core idea: Provide unified context for script execution
4833
- * Main function: Initialize and maintain script context
4834
- * Main purpose: Standardize script execution environment
4835
- *
4836
- * @example
4837
- * ```typescript
4838
- * const context = new FeScriptContext<MyOptions>({
4839
- * dryRun: true,
4840
- * verbose: true
4841
- * });
4842
- * ```
4843
- */
4844
- class FeScriptContext {
4845
- /** Logger instance */
4846
- logger;
4847
- /** Shell instance */
4848
- shell;
4849
- /** Fe configuration */
4850
- feConfig;
4851
- /** Dry run flag */
4852
- dryRun;
4853
- /** Verbose logging flag */
4854
- verbose;
4855
- /** Script-specific options */
4856
- options;
4857
- /**
4858
- * Creates a FeScriptContext instance
4859
- *
4860
- * @description
4861
- * Significance: Initializes script execution context
4862
- * Core idea: Setup execution environment
4863
- * Main function: Create context with options
4864
- * Main purpose: Prepare script execution environment
4865
- *
4866
- * @example
4867
- * ```typescript
4868
- * const context = new FeScriptContext({
4869
- * dryRun: true,
4870
- * options: { branch: 'main' }
4871
- * });
4872
- * ```
4873
- */
4874
- constructor(scriptsOptions) {
4875
- const { logger, shell, feConfig, dryRun, verbose, options } = scriptsOptions || {};
4876
- const _options = options || {};
4877
- this.logger = logger || new ScriptsLogger({ debug: verbose, dryRun });
4878
- this.shell =
4879
- shell ||
4880
- new Shell({
4881
- logger: this.logger,
4882
- dryRun: dryRun,
4883
- execPromise: _options.execPromise || execPromise
4884
- });
4885
- this.feConfig = getFeConfigSearch(feConfig).config;
4886
- this.dryRun = !!dryRun;
4887
- this.verbose = !!verbose;
4888
- this.options = _options;
4889
- }
4890
- }
4891
-
4892
- exports.ConfigSearch = ConfigSearch;
4893
- exports.FeScriptContext = FeScriptContext;
4894
- exports.ScriptsLogger = ScriptsLogger;
4895
- exports.Shell = Shell;
4896
- exports.defaultFeConfig = defaultFeConfig;
4897
- exports.getFeConfigSearch = getFeConfigSearch;
1
+ "use strict";var r,t,n,e,o,u,i,c,a,f,s,l,p,v,h,g,d,y,_,b,j,m,w,O,x,P,R,$,A,S,C,z,F,E,k,T,N,U,q,B,I,M,L,D,G,V,W,J,H,K,Q,X,Y,Z,rr,tr,nr,er,or,ur,ir,cr,ar,fr,sr,lr,pr,vr,hr,gr,dr,yr,_r,br,jr,mr,wr,Or,xr,Pr,Rr,$r,Ar,Sr,Cr,zr,Fr,Er,kr,Tr,Nr,Ur,qr,Br,Ir,Mr,Lr,Dr,Gr,Vr,Wr,Jr,Hr,Kr,Qr,Xr,Yr,Zr,rt,tt,nt,et,ot,ut,it=require("cosmiconfig"),ct=require("@qlover/fe-corekit"),at=require("chalk"),ft=require("child_process"),st="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function lt(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function pt(){if(t)return r;return t=1,r=function(r,t,n){switch(n.length){case 0:return r.call(t);case 1:return r.call(t,n[0]);case 2:return r.call(t,n[0],n[1]);case 3:return r.call(t,n[0],n[1],n[2])}return r.apply(t,n)}}function vt(){if(e)return n;return e=1,n=function(r){return r}}function ht(){if(u)return o;u=1;var r=pt(),t=Math.max;return o=function(n,e,o){return e=t(void 0===e?n.length-1:e,0),function(){for(var u=arguments,i=-1,c=t(u.length-e,0),a=Array(c);++i<c;)a[i]=u[e+i];i=-1;for(var f=Array(e+1);++i<e;)f[i]=u[i];return f[e]=o(a),r(n,this,f)}},o}function gt(){if(c)return i;return c=1,i=function(r){return function(){return r}}}function dt(){if(f)return a;f=1;var r="object"==typeof st&&st&&st.Object===Object&&st;return a=r}function yt(){if(l)return s;l=1;var r=dt(),t="object"==typeof self&&self&&self.Object===Object&&self,n=r||t||Function("return this")();return s=n}function _t(){if(v)return p;v=1;var r=yt().Symbol;return p=r}function bt(){if(g)return h;g=1;var r=_t(),t=Object.prototype,n=t.hasOwnProperty,e=t.toString,o=r?r.toStringTag:void 0;return h=function(r){var t=n.call(r,o),u=r[o];try{r[o]=void 0;var i=!0}catch(r){}var c=e.call(r);return i&&(t?r[o]=u:delete r[o]),c}}function jt(){if(y)return d;y=1;var r=Object.prototype.toString;return d=function(t){return r.call(t)}}function mt(){if(b)return _;b=1;var r=_t(),t=bt(),n=jt(),e=r?r.toStringTag:void 0;return _=function(r){return null==r?void 0===r?"[object Undefined]":"[object Null]":e&&e in Object(r)?t(r):n(r)}}function wt(){if(m)return j;return m=1,j=function(r){var t=typeof r;return null!=r&&("object"==t||"function"==t)}}function Ot(){if(O)return w;O=1;var r=mt(),t=wt();return w=function(n){if(!t(n))return!1;var e=r(n);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}}function xt(){if(P)return x;P=1;var r=yt()["__core-js_shared__"];return x=r}function Pt(){if($)return R;$=1;var r,t=xt(),n=(r=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";return R=function(r){return!!n&&n in r}}function Rt(){if(S)return A;S=1;var r=Function.prototype.toString;return A=function(t){if(null!=t){try{return r.call(t)}catch(r){}try{return t+""}catch(r){}}return""}}function $t(){if(z)return C;z=1;var r=Ot(),t=Pt(),n=wt(),e=Rt(),o=/^\[object .+?Constructor\]$/,u=Function.prototype,i=Object.prototype,c=u.toString,a=i.hasOwnProperty,f=RegExp("^"+c.call(a).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return C=function(u){return!(!n(u)||t(u))&&(r(u)?f:o).test(e(u))}}function At(){if(E)return F;return E=1,F=function(r,t){return null==r?void 0:r[t]}}function St(){if(T)return k;T=1;var r=$t(),t=At();return k=function(n,e){var o=t(n,e);return r(o)?o:void 0}}function Ct(){if(U)return N;U=1;var r=St(),t=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(r){}}();return N=t}function zt(){if(B)return q;B=1;var r=gt(),t=Ct();return q=t?function(n,e){return t(n,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:vt()}function Ft(){if(M)return I;M=1;var r=Date.now;return I=function(t){var n=0,e=0;return function(){var o=r(),u=16-(o-e);if(e=o,u>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}},I}function Et(){if(D)return L;D=1;var r=zt(),t=Ft()(r);return L=t}function kt(){if(V)return G;V=1;var r=vt(),t=ht(),n=Et();return G=function(e,o){return n(t(e,o,r),e+"")}}function Tt(){if(J)return W;return J=1,W=function(){this.__data__=[],this.size=0}}function Nt(){if(K)return H;return K=1,H=function(r,t){return r===t||r!=r&&t!=t}}function Ut(){if(X)return Q;X=1;var r=Nt();return Q=function(t,n){for(var e=t.length;e--;)if(r(t[e][0],n))return e;return-1}}function qt(){if(Z)return Y;Z=1;var r=Ut(),t=Array.prototype.splice;return Y=function(n){var e=this.__data__,o=r(e,n);return!(o<0)&&(o==e.length-1?e.pop():t.call(e,o,1),--this.size,!0)}}function Bt(){if(tr)return rr;tr=1;var r=Ut();return rr=function(t){var n=this.__data__,e=r(n,t);return e<0?void 0:n[e][1]}}function It(){if(er)return nr;er=1;var r=Ut();return nr=function(t){return r(this.__data__,t)>-1}}function Mt(){if(ur)return or;ur=1;var r=Ut();return or=function(t,n){var e=this.__data__,o=r(e,t);return o<0?(++this.size,e.push([t,n])):e[o][1]=n,this}}function Lt(){if(cr)return ir;cr=1;var r=Tt(),t=qt(),n=Bt(),e=It(),o=Mt();function u(r){var t=-1,n=null==r?0:r.length;for(this.clear();++t<n;){var e=r[t];this.set(e[0],e[1])}}return u.prototype.clear=r,u.prototype.delete=t,u.prototype.get=n,u.prototype.has=e,u.prototype.set=o,ir=u}function Dt(){if(fr)return ar;fr=1;var r=Lt();return ar=function(){this.__data__=new r,this.size=0}}function Gt(){if(lr)return sr;return lr=1,sr=function(r){var t=this.__data__,n=t.delete(r);return this.size=t.size,n}}function Vt(){if(vr)return pr;return vr=1,pr=function(r){return this.__data__.get(r)}}function Wt(){if(gr)return hr;return gr=1,hr=function(r){return this.__data__.has(r)}}function Jt(){if(yr)return dr;yr=1;var r=St()(yt(),"Map");return dr=r}function Ht(){if(br)return _r;br=1;var r=St()(Object,"create");return _r=r}function Kt(){if(mr)return jr;mr=1;var r=Ht();return jr=function(){this.__data__=r?r(null):{},this.size=0}}function Qt(){if(Or)return wr;return Or=1,wr=function(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}}function Xt(){if(Pr)return xr;Pr=1;var r=Ht(),t=Object.prototype.hasOwnProperty;return xr=function(n){var e=this.__data__;if(r){var o=e[n];return"__lodash_hash_undefined__"===o?void 0:o}return t.call(e,n)?e[n]:void 0}}function Yt(){if($r)return Rr;$r=1;var r=Ht(),t=Object.prototype.hasOwnProperty;return Rr=function(n){var e=this.__data__;return r?void 0!==e[n]:t.call(e,n)}}function Zt(){if(Sr)return Ar;Sr=1;var r=Ht();return Ar=function(t,n){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=r&&void 0===n?"__lodash_hash_undefined__":n,this}}function rn(){if(zr)return Cr;zr=1;var r=Kt(),t=Qt(),n=Xt(),e=Yt(),o=Zt();function u(r){var t=-1,n=null==r?0:r.length;for(this.clear();++t<n;){var e=r[t];this.set(e[0],e[1])}}return u.prototype.clear=r,u.prototype.delete=t,u.prototype.get=n,u.prototype.has=e,u.prototype.set=o,Cr=u}function tn(){if(Er)return Fr;Er=1;var r=rn(),t=Lt(),n=Jt();return Fr=function(){this.size=0,this.__data__={hash:new r,map:new(n||t),string:new r}}}function nn(){if(Tr)return kr;return Tr=1,kr=function(r){var t=typeof r;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==r:null===r}}function en(){if(Ur)return Nr;Ur=1;var r=nn();return Nr=function(t,n){var e=t.__data__;return r(n)?e["string"==typeof n?"string":"hash"]:e.map}}function on(){if(Br)return qr;Br=1;var r=en();return qr=function(t){var n=r(this,t).delete(t);return this.size-=n?1:0,n}}function un(){if(Mr)return Ir;Mr=1;var r=en();return Ir=function(t){return r(this,t).get(t)}}function cn(){if(Dr)return Lr;Dr=1;var r=en();return Lr=function(t){return r(this,t).has(t)}}function an(){if(Vr)return Gr;Vr=1;var r=en();return Gr=function(t,n){var e=r(this,t),o=e.size;return e.set(t,n),this.size+=e.size==o?0:1,this}}function fn(){if(Jr)return Wr;Jr=1;var r=tn(),t=on(),n=un(),e=cn(),o=an();function u(r){var t=-1,n=null==r?0:r.length;for(this.clear();++t<n;){var e=r[t];this.set(e[0],e[1])}}return u.prototype.clear=r,u.prototype.delete=t,u.prototype.get=n,u.prototype.has=e,u.prototype.set=o,Wr=u}function sn(){if(Kr)return Hr;Kr=1;var r=Lt(),t=Jt(),n=fn();return Hr=function(e,o){var u=this.__data__;if(u instanceof r){var i=u.__data__;if(!t||i.length<199)return i.push([e,o]),this.size=++u.size,this;u=this.__data__=new n(i)}return u.set(e,o),this.size=u.size,this}}function ln(){if(Xr)return Qr;Xr=1;var r=Lt(),t=Dt(),n=Gt(),e=Vt(),o=Wt(),u=sn();function i(t){var n=this.__data__=new r(t);this.size=n.size}return i.prototype.clear=t,i.prototype.delete=n,i.prototype.get=e,i.prototype.has=o,i.prototype.set=u,Qr=i}function pn(){if(Zr)return Yr;Zr=1;var r=Ct();return Yr=function(t,n,e){"__proto__"==n&&r?r(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}}function vn(){if(tt)return rt;tt=1;var r=pn(),t=Nt();return rt=function(n,e,o){(void 0!==o&&!t(n[e],o)||void 0===o&&!(e in n))&&r(n,e,o)}}function hn(){if(et)return nt;return et=1,nt=function(r){return function(t,n,e){for(var o=-1,u=Object(t),i=e(t),c=i.length;c--;){var a=i[r?c:++o];if(!1===n(u[a],a,u))break}return t}}}function gn(){if(ut)return ot;ut=1;var r=hn()();return ot=r}var dn,yn,_n,bn,jn,mn,wn,On,xn,Pn,Rn,$n,An,Sn,Cn,zn,Fn,En,kn,Tn,Nn,Un,qn,Bn,In,Mn,Ln,Dn,Gn,Vn,Wn,Jn,Hn,Kn={exports:{}};function Qn(){return dn||(dn=1,function(r,t){var n=yt(),e=t&&!t.nodeType&&t,o=e&&r&&!r.nodeType&&r,u=o&&o.exports===e?n.Buffer:void 0,i=u?u.allocUnsafe:void 0;r.exports=function(r,t){if(t)return r.slice();var n=r.length,e=i?i(n):new r.constructor(n);return r.copy(e),e}}(Kn,Kn.exports)),Kn.exports}function Xn(){if(_n)return yn;_n=1;var r=yt().Uint8Array;return yn=r}function Yn(){if(jn)return bn;jn=1;var r=Xn();return bn=function(t){var n=new t.constructor(t.byteLength);return new r(n).set(new r(t)),n}}function Zn(){if(wn)return mn;wn=1;var r=Yn();return mn=function(t,n){var e=n?r(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}}function re(){if(xn)return On;return xn=1,On=function(r,t){var n=-1,e=r.length;for(t||(t=Array(e));++n<e;)t[n]=r[n];return t}}function te(){if(Rn)return Pn;Rn=1;var r=wt(),t=Object.create,n=function(){function n(){}return function(e){if(!r(e))return{};if(t)return t(e);n.prototype=e;var o=new n;return n.prototype=void 0,o}}();return Pn=n}function ne(){if(An)return $n;return An=1,$n=function(r,t){return function(n){return r(t(n))}}}function ee(){if(Cn)return Sn;Cn=1;var r=ne()(Object.getPrototypeOf,Object);return Sn=r}function oe(){if(Fn)return zn;Fn=1;var r=Object.prototype;return zn=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||r)}}function ue(){if(kn)return En;kn=1;var r=te(),t=ee(),n=oe();return En=function(e){return"function"!=typeof e.constructor||n(e)?{}:r(t(e))}}function ie(){if(Nn)return Tn;return Nn=1,Tn=function(r){return null!=r&&"object"==typeof r}}function ce(){if(qn)return Un;qn=1;var r=mt(),t=ie();return Un=function(n){return t(n)&&"[object Arguments]"==r(n)}}function ae(){if(In)return Bn;In=1;var r=ce(),t=ie(),n=Object.prototype,e=n.hasOwnProperty,o=n.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(r){return t(r)&&e.call(r,"callee")&&!o.call(r,"callee")};return Bn=u}function fe(){if(Ln)return Mn;Ln=1;var r=Array.isArray;return Mn=r}function se(){if(Gn)return Dn;Gn=1;return Dn=function(r){return"number"==typeof r&&r>-1&&r%1==0&&r<=9007199254740991}}function le(){if(Wn)return Vn;Wn=1;var r=Ot(),t=se();return Vn=function(n){return null!=n&&t(n.length)&&!r(n)}}function pe(){if(Hn)return Jn;Hn=1;var r=le(),t=ie();return Jn=function(n){return t(n)&&r(n)}}var ve,he,ge,de,ye,_e,be,je,me,we={exports:{}};function Oe(){if(he)return ve;return he=1,ve=function(){return!1}}function xe(){return ge||(ge=1,function(r,t){var n=yt(),e=Oe(),o=t&&!t.nodeType&&t,u=o&&r&&!r.nodeType&&r,i=u&&u.exports===o?n.Buffer:void 0,c=(i?i.isBuffer:void 0)||e;r.exports=c}(we,we.exports)),we.exports}function Pe(){if(ye)return de;ye=1;var r=mt(),t=ee(),n=ie(),e=Function.prototype,o=Object.prototype,u=e.toString,i=o.hasOwnProperty,c=u.call(Object);return de=function(e){if(!n(e)||"[object Object]"!=r(e))return!1;var o=t(e);if(null===o)return!0;var a=i.call(o,"constructor")&&o.constructor;return"function"==typeof a&&a instanceof a&&u.call(a)==c}}function Re(){if(be)return _e;be=1;var r=mt(),t=se(),n=ie(),e={};return e["[object Float32Array]"]=e["[object Float64Array]"]=e["[object Int8Array]"]=e["[object Int16Array]"]=e["[object Int32Array]"]=e["[object Uint8Array]"]=e["[object Uint8ClampedArray]"]=e["[object Uint16Array]"]=e["[object Uint32Array]"]=!0,e["[object Arguments]"]=e["[object Array]"]=e["[object ArrayBuffer]"]=e["[object Boolean]"]=e["[object DataView]"]=e["[object Date]"]=e["[object Error]"]=e["[object Function]"]=e["[object Map]"]=e["[object Number]"]=e["[object Object]"]=e["[object RegExp]"]=e["[object Set]"]=e["[object String]"]=e["[object WeakMap]"]=!1,_e=function(o){return n(o)&&t(o.length)&&!!e[r(o)]}}function $e(){if(me)return je;return me=1,je=function(r){return function(t){return r(t)}}}var Ae,Se,Ce,ze,Fe,Ee,ke,Te,Ne,Ue,qe,Be,Ie,Me,Le,De,Ge,Ve,We,Je,He,Ke,Qe,Xe,Ye,Ze,ro,to,no,eo,oo,uo,io,co,ao,fo,so,lo={exports:{}};function po(){return Ae||(Ae=1,function(r,t){var n=dt(),e=t&&!t.nodeType&&t,o=e&&r&&!r.nodeType&&r,u=o&&o.exports===e&&n.process,i=function(){try{var r=o&&o.require&&o.require("util").types;return r||u&&u.binding&&u.binding("util")}catch(r){}}();r.exports=i}(lo,lo.exports)),lo.exports}function vo(){if(Ce)return Se;Ce=1;var r=Re(),t=$e(),n=po(),e=n&&n.isTypedArray,o=e?t(e):r;return Se=o}function ho(){if(Fe)return ze;return Fe=1,ze=function(r,t){if(("constructor"!==t||"function"!=typeof r[t])&&"__proto__"!=t)return r[t]}}function go(){if(ke)return Ee;ke=1;var r=pn(),t=Nt(),n=Object.prototype.hasOwnProperty;return Ee=function(e,o,u){var i=e[o];n.call(e,o)&&t(i,u)&&(void 0!==u||o in e)||r(e,o,u)}}function yo(){if(Ne)return Te;Ne=1;var r=go(),t=pn();return Te=function(n,e,o,u){var i=!o;o||(o={});for(var c=-1,a=e.length;++c<a;){var f=e[c],s=u?u(o[f],n[f],f,o,n):void 0;void 0===s&&(s=n[f]),i?t(o,f,s):r(o,f,s)}return o}}function _o(){if(qe)return Ue;return qe=1,Ue=function(r,t){for(var n=-1,e=Array(r);++n<r;)e[n]=t(n);return e}}function bo(){if(Ie)return Be;Ie=1;var r=/^(?:0|[1-9]\d*)$/;return Be=function(t,n){var e=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==e||"symbol"!=e&&r.test(t))&&t>-1&&t%1==0&&t<n}}function jo(){if(Le)return Me;Le=1;var r=_o(),t=ae(),n=fe(),e=xe(),o=bo(),u=vo(),i=Object.prototype.hasOwnProperty;return Me=function(c,a){var f=n(c),s=!f&&t(c),l=!f&&!s&&e(c),p=!f&&!s&&!l&&u(c),v=f||s||l||p,h=v?r(c.length,String):[],g=h.length;for(var d in c)!a&&!i.call(c,d)||v&&("length"==d||l&&("offset"==d||"parent"==d)||p&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||o(d,g))||h.push(d);return h}}function mo(){if(Ge)return De;return Ge=1,De=function(r){var t=[];if(null!=r)for(var n in Object(r))t.push(n);return t}}function wo(){if(We)return Ve;We=1;var r=wt(),t=oe(),n=mo(),e=Object.prototype.hasOwnProperty;return Ve=function(o){if(!r(o))return n(o);var u=t(o),i=[];for(var c in o)("constructor"!=c||!u&&e.call(o,c))&&i.push(c);return i}}function Oo(){if(He)return Je;He=1;var r=jo(),t=wo(),n=le();return Je=function(e){return n(e)?r(e,!0):t(e)}}function xo(){if(Qe)return Ke;Qe=1;var r=yo(),t=Oo();return Ke=function(n){return r(n,t(n))}}function Po(){if(Ye)return Xe;Ye=1;var r=vn(),t=Qn(),n=Zn(),e=re(),o=ue(),u=ae(),i=fe(),c=pe(),a=xe(),f=Ot(),s=wt(),l=Pe(),p=vo(),v=ho(),h=xo();return Xe=function(g,d,y,_,b,j,m){var w=v(g,y),O=v(d,y),x=m.get(O);if(x)r(g,y,x);else{var P=j?j(w,O,y+"",g,d,m):void 0,R=void 0===P;if(R){var $=i(O),A=!$&&a(O),S=!$&&!A&&p(O);P=O,$||A||S?i(w)?P=w:c(w)?P=e(w):A?(R=!1,P=t(O,!0)):S?(R=!1,P=n(O,!0)):P=[]:l(O)||u(O)?(P=w,u(w)?P=h(w):s(w)&&!f(w)||(P=o(O))):R=!1}R&&(m.set(O,P),b(P,O,_,j,m),m.delete(O)),r(g,y,P)}}}function Ro(){if(ro)return Ze;ro=1;var r=ln(),t=vn(),n=gn(),e=Po(),o=wt(),u=Oo(),i=ho();return Ze=function c(a,f,s,l,p){a!==f&&n(f,(function(n,u){if(p||(p=new r),o(n))e(a,f,u,s,c,l,p);else{var v=l?l(i(a,u),n,u+"",a,f,p):void 0;void 0===v&&(v=n),t(a,u,v)}}),u)},Ze}function $o(){if(no)return to;no=1;var r=Ro(),t=wt();return to=function n(e,o,u,i,c,a){return t(e)&&t(o)&&(a.set(o,e),r(e,o,void 0,n,a),a.delete(o)),e},to}function Ao(){if(oo)return eo;oo=1;var r=Nt(),t=le(),n=bo(),e=wt();return eo=function(o,u,i){if(!e(i))return!1;var c=typeof u;return!!("number"==c?t(i)&&n(u,i.length):"string"==c&&u in i)&&r(i[u],o)}}function So(){if(io)return uo;io=1;var r=kt(),t=Ao();return uo=function(n){return r((function(r,e){var o=-1,u=e.length,i=u>1?e[u-1]:void 0,c=u>2?e[2]:void 0;for(i=n.length>3&&"function"==typeof i?(u--,i):void 0,c&&t(e[0],e[1],c)&&(i=u<3?void 0:i,u=1),r=Object(r);++o<u;){var a=e[o];a&&n(r,a,o,i)}return r}))}}function Co(){if(ao)return co;ao=1;var r=Ro(),t=So()((function(t,n,e,o){r(t,n,e,o)}));return co=t}function zo(){if(so)return fo;so=1;var r=pt(),t=kt(),n=$o(),e=Co(),o=t((function(t){return t.push(void 0,n),r(e,void 0,t)}));return fo=o}var Fo=lt(zo()),Eo=lt(Pe());class ko{name;searchPlaces;_config;loaders;searchCache;constructor(r){const{name:t,searchPlaces:n,defaultConfig:e,loaders:o}=r;if(!t&&!n)throw new Error("searchPlaces or name is required");this.name=t,this.searchPlaces=n||function(r){const t=["json","js","ts","cjs","yaml","yml"];return["package.json",...t.map((t=>`${r}.${t}`)),...t.map((t=>`.${r}.${t}`))]}(t),this._config=e||{},this.loaders=o}get config(){return Fo({},this.search(),this._config)}getSearchPlaces(){return this.searchPlaces}get(r={}){const{file:t,dir:n=process.cwd()}=r,e={};if(!1===t)return e;const o=it.cosmiconfigSync(this.name,{searchPlaces:this.searchPlaces,loaders:this.loaders}),u=t?o.load(t):o.search(n);if(u&&"string"==typeof u.config)throw new Error(`Invalid configuration file at ${u.filepath}`);return u&&Eo(u.config)?u.config:e}search(){return this.searchCache?this.searchCache:this.searchCache=this.get({})}}const To={protectedBranches:["master","develop","main"],cleanFiles:["dist","node_modules","yarn.lock","package-lock.json",".eslintcache","*.log"],commitlint:{extends:["@commitlint/config-conventional"]},release:{publishPath:"",autoMergeReleasePR:!1,autoMergeType:"squash",branchName:"release-${pkgName}-${tagName}",PRTitle:"[${pkgName} Release] Branch:${branch}, Tag:${tagName}, Env:${env}",PRBody:"## Publish Details\n\n- 🏷️ Version: ${tagName}\n- 🌲 Branch: ${branch}\n- 🔧 Environment: ${env}\n\n## Changelog\n\n${changelog}\n\n## Notes\n\n- [ ] Please check if the version number is correct\n- [ ] Please confirm all tests have passed\n- [ ] Please confirm the documentation has been updated\n\n> This PR is auto created by release process, please contact the frontend team if there are any questions.",label:{color:"1A7F37",description:"Release PR",name:"CI-Release"},packagesDirectories:[],changePackagesLabel:"changes:${name}"},envOrder:[".env.local",".env.production",".env"]};var No,Uo,qo,Bo,Io,Mo,Lo,Do,Go,Vo,Wo,Jo,Ho,Ko,Qo,Xo,Yo,Zo,ru,tu,nu,eu,ou,uu,iu,cu,au,fu,su,lu,pu,vu,hu,gu,du,yu,_u,bu,ju,mu,wu,Ou;function xu(){if(Uo)return No;Uo=1;var r=yo(),t=So(),n=Oo(),e=t((function(t,e,o,u){r(e,n(e),t,u)}));return No=e}function Pu(){if(Bo)return qo;Bo=1;var r=mt(),t=ie(),n=Pe();return qo=function(e){if(!t(e))return!1;var o=r(e);return"[object Error]"==o||"[object DOMException]"==o||"string"==typeof e.message&&"string"==typeof e.name&&!n(e)}}function Ru(){if(Mo)return Io;Mo=1;var r=pt(),t=kt(),n=Pu(),e=t((function(t,e){try{return r(t,void 0,e)}catch(r){return n(r)?r:new Error(r)}}));return Io=e}function $u(){if(Do)return Lo;return Do=1,Lo=function(r,t){for(var n=-1,e=null==r?0:r.length,o=Array(e);++n<e;)o[n]=t(r[n],n,r);return o}}function Au(){if(Vo)return Go;Vo=1;var r=$u();return Go=function(t,n){return r(n,(function(r){return t[r]}))}}function Su(){if(Jo)return Wo;Jo=1;var r=Nt(),t=Object.prototype,n=t.hasOwnProperty;return Wo=function(e,o,u,i){return void 0===e||r(e,t[u])&&!n.call(i,u)?o:e}}function Cu(){if(Ko)return Ho;Ko=1;var r={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};return Ho=function(t){return"\\"+r[t]}}function zu(){if(Xo)return Qo;Xo=1;var r=ne()(Object.keys,Object);return Qo=r}function Fu(){if(Zo)return Yo;Zo=1;var r=oe(),t=zu(),n=Object.prototype.hasOwnProperty;return Yo=function(e){if(!r(e))return t(e);var o=[];for(var u in Object(e))n.call(e,u)&&"constructor"!=u&&o.push(u);return o}}function Eu(){if(tu)return ru;tu=1;var r=jo(),t=Fu(),n=le();return ru=function(e){return n(e)?r(e):t(e)}}function ku(){if(eu)return nu;eu=1;return nu=/<%=([\s\S]+?)%>/g}function Tu(){if(uu)return ou;return uu=1,ou=function(r){return function(t){return null==r?void 0:r[t]}}}function Nu(){if(cu)return iu;cu=1;var r=Tu()({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});return iu=r}function Uu(){if(fu)return au;fu=1;var r=mt(),t=ie();return au=function(n){return"symbol"==typeof n||t(n)&&"[object Symbol]"==r(n)}}function qu(){if(lu)return su;lu=1;var r=_t(),t=$u(),n=fe(),e=Uu(),o=r?r.prototype:void 0,u=o?o.toString:void 0;return su=function r(o){if("string"==typeof o)return o;if(n(o))return t(o,r)+"";if(e(o))return u?u.call(o):"";var i=o+"";return"0"==i&&1/o==-1/0?"-0":i},su}function Bu(){if(vu)return pu;vu=1;var r=qu();return pu=function(t){return null==t?"":r(t)}}function Iu(){if(gu)return hu;gu=1;var r=Nu(),t=Bu(),n=/[&<>"']/g,e=RegExp(n.source);return hu=function(o){return(o=t(o))&&e.test(o)?o.replace(n,r):o}}function Mu(){if(yu)return du;yu=1;return du=/<%-([\s\S]+?)%>/g}function Lu(){if(bu)return _u;bu=1;return _u=/<%([\s\S]+?)%>/g}function Du(){if(mu)return ju;mu=1;var r=Iu();return ju={escape:Mu(),evaluate:Lu(),interpolate:ku(),variable:"",imports:{_:{escape:r}}}}function Gu(){if(Ou)return wu;Ou=1;var r=xu(),t=Ru(),n=Au(),e=Su(),o=Cu(),u=Pu(),i=Ao(),c=Eu(),a=ku(),f=Du(),s=Bu(),l=/\b__p \+= '';/g,p=/\b(__p \+=) '' \+/g,v=/(__e\(.*?\)|\b__t\)) \+\n'';/g,h=/[()=,{}\[\]\/\s]/,g=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,d=/($^)/,y=/['\n\r\u2028\u2029\\]/g,_=Object.prototype.hasOwnProperty;return wu=function(b,j,m){var w=f.imports._.templateSettings||f;m&&i(b,j,m)&&(j=void 0),b=s(b),j=r({},j,w,e);var O,x,P=r({},j.imports,w.imports,e),R=c(P),$=n(P,R),A=0,S=j.interpolate||d,C="__p += '",z=RegExp((j.escape||d).source+"|"+S.source+"|"+(S===a?g:d).source+"|"+(j.evaluate||d).source+"|$","g"),F=_.call(j,"sourceURL")?"//# sourceURL="+(j.sourceURL+"").replace(/\s/g," ")+"\n":"";b.replace(z,(function(r,t,n,e,u,i){return n||(n=e),C+=b.slice(A,i).replace(y,o),t&&(O=!0,C+="' +\n__e("+t+") +\n'"),u&&(x=!0,C+="';\n"+u+";\n__p += '"),n&&(C+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),A=i+r.length,r})),C+="';\n";var E=_.call(j,"variable")&&j.variable;if(E){if(h.test(E))throw new Error("Invalid `variable` option passed into `_.template`")}else C="with (obj) {\n"+C+"\n}\n";C=(x?C.replace(l,""):C).replace(p,"$1").replace(v,"$1;"),C="function("+(E||"obj")+") {\n"+(E?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(O?", __e = _.escape":"")+(x?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+C+"return __p\n}";var k=t((function(){return Function(R,F+"return "+C).apply(void 0,$)}));if(k.source=C,u(k))throw k;return k}}var Vu,Wu,Ju=lt(Gu());class Hu{config;cache;constructor(r,t=new Map){this.config=r,this.cache=t}get logger(){return this.config.logger}static format(r="",t={}){return Ju(r)(t)}format(r="",t={}){try{return Hu.format(r,t)}catch(n){throw this.logger.error(`Unable to render template with context:\n${r}\n${JSON.stringify(t)}`),this.logger.error(n),n}}exec(r,t={}){const{context:n,...e}=t;return"string"==typeof r?this.execFormattedCommand(this.format(r,n||{}),e):this.execFormattedCommand(r,e)}run(r,t={}){return this.exec(r,{silent:!0,...t})}async execFormattedCommand(r,t={}){const n=this.config.execPromise;if(!n)throw new Error("execPromise is not defined");const{dryRunResult:e,silent:o,dryRun:u,isCache:i}=t,c=void 0!==u?u:this.config.dryRun,a=void 0!==i?!!i:!!this.config.isCache,f="string"==typeof r?r:r.join(" "),s=a&&this.cache.has(f);if(o||this.logger.exec(r,{isCached:s}),c)return Promise.resolve(e);if(s)return this.cache.get(f);const l=n(r,t);return this.cache.has(f)||this.cache.set(f,l),l}}function Ku(){if(Wu)return Vu;Wu=1;var r=Ro(),t=So()((function(t,n,e){r(t,n,e)}));return Vu=t}var Qu=lt(Ku());class Xu extends ct.Logger{prefix(r){switch(r){case"INFO":return at.blue(r);case"WARN":return at.yellow(r);case"ERROR":return at.red(r);case"DEBUG":return at.gray(r);default:return r}}obtrusive(r){const t=at.bold(r);super.obtrusive(t)}}const Yu=(r,t)=>{const n=Array.isArray(r)?r.join(" "):r;return new Promise(((r,e)=>{ft.exec(n,{encoding:"utf-8",...t},((t,n,o)=>{let u;u=t?void 0===t.code?1:t.code:0,0===u?r(n.trim()):e(new Error(o||n))}))}))};function Zu(r){return new ko({name:"fe-config",defaultConfig:Qu({},To,r)})}exports.ConfigSearch=ko,exports.FeScriptContext=class{logger;shell;feConfig;dryRun;verbose;options;constructor(r){const{logger:t,shell:n,feConfig:e,dryRun:o,verbose:u,options:i}=r||{},c=i||{};this.logger=t||new Xu({debug:u,dryRun:o}),this.shell=n||new Hu({logger:this.logger,dryRun:o,execPromise:c.execPromise||Yu}),this.feConfig=Zu(e).config,this.dryRun=!!o,this.verbose=!!u,this.options=c}},exports.ScriptsLogger=Xu,exports.Shell=Hu,exports.defaultFeConfig=To,exports.getFeConfigSearch=Zu;