@k8slens/package-build 2.2.3 → 3.0.0
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.
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +488 -319
- package/dist/src/package-build.d.ts.map +1 -1
- package/dist/src/stylesheet-plugin.d.ts +33 -0
- package/dist/src/stylesheet-plugin.d.ts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -5
- package/src/__fixtures__/package-with-undeclared-dependency/index.js +1 -0
- package/src/__fixtures__/package-with-undeclared-dependency/manifest.json +6 -0
- package/src/__fixtures__/package-without-dependency/index.js +1 -0
- package/src/__fixtures__/package-without-dependency/manifest.json +3 -0
- package/src/__fixtures__/package-without-dependency/some.scss +3 -0
- package/src/__fixtures__/styled-package/_partial.scss +1 -0
- package/src/__fixtures__/styled-package/empty.scss +1 -0
- package/src/__fixtures__/styled-package/fonts/some-font.ttf +1 -0
- package/src/__fixtures__/styled-package/fonts.scss +8 -0
- package/src/__fixtures__/styled-package/global.scss +3 -0
- package/src/__fixtures__/styled-package/importer.scss +5 -0
- package/src/__fixtures__/styled-package/index.js +10 -0
- package/src/__fixtures__/styled-package/manifest.json +7 -0
- package/src/__fixtures__/styled-package/plain.css +3 -0
- package/src/__fixtures__/styled-package/plain.module.css +3 -0
- package/src/__fixtures__/styled-package/some.module.scss +7 -0
- package/src/__fixtures__/styled-package/tilde.scss +7 -0
- package/src/package-build.ts +7 -15
- package/src/stylesheet-plugin.test.ts +161 -0
- package/src/stylesheet-plugin.ts +272 -0
- package/src/glob-import-plugin.js +0 -46
- package/src/package-build.js +0 -193
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
34
34
|
var require_lodash = __commonJS({
|
|
35
35
|
"../../../node_modules/lodash/lodash.js"(exports, module2) {
|
|
36
36
|
(function() {
|
|
37
|
-
var
|
|
37
|
+
var undefined2;
|
|
38
38
|
var VERSION = "4.17.23";
|
|
39
39
|
var LARGE_ARRAY_SIZE = 200;
|
|
40
40
|
var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`";
|
|
@@ -536,12 +536,12 @@ var require_lodash = __commonJS({
|
|
|
536
536
|
}
|
|
537
537
|
function baseProperty(key) {
|
|
538
538
|
return function(object) {
|
|
539
|
-
return object == null ?
|
|
539
|
+
return object == null ? undefined2 : object[key];
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
542
|
function basePropertyOf(object) {
|
|
543
543
|
return function(key) {
|
|
544
|
-
return object == null ?
|
|
544
|
+
return object == null ? undefined2 : object[key];
|
|
545
545
|
};
|
|
546
546
|
}
|
|
547
547
|
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
|
|
@@ -562,8 +562,8 @@ var require_lodash = __commonJS({
|
|
|
562
562
|
var result, index = -1, length = array.length;
|
|
563
563
|
while (++index < length) {
|
|
564
564
|
var current = iteratee(array[index]);
|
|
565
|
-
if (current !==
|
|
566
|
-
result = result ===
|
|
565
|
+
if (current !== undefined2) {
|
|
566
|
+
result = result === undefined2 ? current : result + current;
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
return result;
|
|
@@ -623,7 +623,7 @@ var require_lodash = __commonJS({
|
|
|
623
623
|
return "\\" + stringEscapes[chr];
|
|
624
624
|
}
|
|
625
625
|
function getValue(object, key) {
|
|
626
|
-
return object == null ?
|
|
626
|
+
return object == null ? undefined2 : object[key];
|
|
627
627
|
}
|
|
628
628
|
function hasUnicode(string) {
|
|
629
629
|
return reHasUnicode.test(string);
|
|
@@ -737,7 +737,7 @@ var require_lodash = __commonJS({
|
|
|
737
737
|
var reIsNative = RegExp2(
|
|
738
738
|
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
739
739
|
);
|
|
740
|
-
var Buffer2 = moduleExports ? context.Buffer :
|
|
740
|
+
var Buffer2 = moduleExports ? context.Buffer : undefined2, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined2, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined2, symIterator = Symbol2 ? Symbol2.iterator : undefined2, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined2;
|
|
741
741
|
var defineProperty = function() {
|
|
742
742
|
try {
|
|
743
743
|
var func = getNative(Object2, "defineProperty");
|
|
@@ -747,12 +747,12 @@ var require_lodash = __commonJS({
|
|
|
747
747
|
}
|
|
748
748
|
}();
|
|
749
749
|
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date && Date.now !== root.Date.now && Date.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
|
|
750
|
-
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer :
|
|
750
|
+
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : undefined2, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
|
|
751
751
|
var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
|
|
752
752
|
var metaMap = WeakMap && new WeakMap();
|
|
753
753
|
var realNames = {};
|
|
754
754
|
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap);
|
|
755
|
-
var symbolProto = Symbol2 ? Symbol2.prototype :
|
|
755
|
+
var symbolProto = Symbol2 ? Symbol2.prototype : undefined2, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined2, symbolToString = symbolProto ? symbolProto.toString : undefined2;
|
|
756
756
|
function lodash(value) {
|
|
757
757
|
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
|
|
758
758
|
if (value instanceof LodashWrapper) {
|
|
@@ -776,7 +776,7 @@ var require_lodash = __commonJS({
|
|
|
776
776
|
}
|
|
777
777
|
object.prototype = proto;
|
|
778
778
|
var result2 = new object();
|
|
779
|
-
object.prototype =
|
|
779
|
+
object.prototype = undefined2;
|
|
780
780
|
return result2;
|
|
781
781
|
};
|
|
782
782
|
}();
|
|
@@ -787,7 +787,7 @@ var require_lodash = __commonJS({
|
|
|
787
787
|
this.__actions__ = [];
|
|
788
788
|
this.__chain__ = !!chainAll;
|
|
789
789
|
this.__index__ = 0;
|
|
790
|
-
this.__values__ =
|
|
790
|
+
this.__values__ = undefined2;
|
|
791
791
|
}
|
|
792
792
|
lodash.templateSettings = {
|
|
793
793
|
/**
|
|
@@ -917,18 +917,18 @@ var require_lodash = __commonJS({
|
|
|
917
917
|
var data = this.__data__;
|
|
918
918
|
if (nativeCreate) {
|
|
919
919
|
var result2 = data[key];
|
|
920
|
-
return result2 === HASH_UNDEFINED ?
|
|
920
|
+
return result2 === HASH_UNDEFINED ? undefined2 : result2;
|
|
921
921
|
}
|
|
922
|
-
return hasOwnProperty.call(data, key) ? data[key] :
|
|
922
|
+
return hasOwnProperty.call(data, key) ? data[key] : undefined2;
|
|
923
923
|
}
|
|
924
924
|
function hashHas(key) {
|
|
925
925
|
var data = this.__data__;
|
|
926
|
-
return nativeCreate ? data[key] !==
|
|
926
|
+
return nativeCreate ? data[key] !== undefined2 : hasOwnProperty.call(data, key);
|
|
927
927
|
}
|
|
928
928
|
function hashSet(key, value) {
|
|
929
929
|
var data = this.__data__;
|
|
930
930
|
this.size += this.has(key) ? 0 : 1;
|
|
931
|
-
data[key] = nativeCreate && value ===
|
|
931
|
+
data[key] = nativeCreate && value === undefined2 ? HASH_UNDEFINED : value;
|
|
932
932
|
return this;
|
|
933
933
|
}
|
|
934
934
|
Hash.prototype.clear = hashClear;
|
|
@@ -964,7 +964,7 @@ var require_lodash = __commonJS({
|
|
|
964
964
|
}
|
|
965
965
|
function listCacheGet(key) {
|
|
966
966
|
var data = this.__data__, index = assocIndexOf(data, key);
|
|
967
|
-
return index < 0 ?
|
|
967
|
+
return index < 0 ? undefined2 : data[index][1];
|
|
968
968
|
}
|
|
969
969
|
function listCacheHas(key) {
|
|
970
970
|
return assocIndexOf(this.__data__, key) > -1;
|
|
@@ -1092,7 +1092,7 @@ var require_lodash = __commonJS({
|
|
|
1092
1092
|
}
|
|
1093
1093
|
function arraySample(array) {
|
|
1094
1094
|
var length = array.length;
|
|
1095
|
-
return length ? array[baseRandom(0, length - 1)] :
|
|
1095
|
+
return length ? array[baseRandom(0, length - 1)] : undefined2;
|
|
1096
1096
|
}
|
|
1097
1097
|
function arraySampleSize(array, n) {
|
|
1098
1098
|
return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
|
|
@@ -1101,13 +1101,13 @@ var require_lodash = __commonJS({
|
|
|
1101
1101
|
return shuffleSelf(copyArray(array));
|
|
1102
1102
|
}
|
|
1103
1103
|
function assignMergeValue(object, key, value) {
|
|
1104
|
-
if (value !==
|
|
1104
|
+
if (value !== undefined2 && !eq(object[key], value) || value === undefined2 && !(key in object)) {
|
|
1105
1105
|
baseAssignValue(object, key, value);
|
|
1106
1106
|
}
|
|
1107
1107
|
}
|
|
1108
1108
|
function assignValue(object, key, value) {
|
|
1109
1109
|
var objValue = object[key];
|
|
1110
|
-
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value ===
|
|
1110
|
+
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined2 && !(key in object)) {
|
|
1111
1111
|
baseAssignValue(object, key, value);
|
|
1112
1112
|
}
|
|
1113
1113
|
}
|
|
@@ -1147,16 +1147,16 @@ var require_lodash = __commonJS({
|
|
|
1147
1147
|
function baseAt(object, paths) {
|
|
1148
1148
|
var index = -1, length = paths.length, result2 = Array2(length), skip = object == null;
|
|
1149
1149
|
while (++index < length) {
|
|
1150
|
-
result2[index] = skip ?
|
|
1150
|
+
result2[index] = skip ? undefined2 : get(object, paths[index]);
|
|
1151
1151
|
}
|
|
1152
1152
|
return result2;
|
|
1153
1153
|
}
|
|
1154
1154
|
function baseClamp(number, lower, upper) {
|
|
1155
1155
|
if (number === number) {
|
|
1156
|
-
if (upper !==
|
|
1156
|
+
if (upper !== undefined2) {
|
|
1157
1157
|
number = number <= upper ? number : upper;
|
|
1158
1158
|
}
|
|
1159
|
-
if (lower !==
|
|
1159
|
+
if (lower !== undefined2) {
|
|
1160
1160
|
number = number >= lower ? number : lower;
|
|
1161
1161
|
}
|
|
1162
1162
|
}
|
|
@@ -1167,7 +1167,7 @@ var require_lodash = __commonJS({
|
|
|
1167
1167
|
if (customizer) {
|
|
1168
1168
|
result2 = object ? customizer(value, key, object, stack) : customizer(value);
|
|
1169
1169
|
}
|
|
1170
|
-
if (result2 !==
|
|
1170
|
+
if (result2 !== undefined2) {
|
|
1171
1171
|
return result2;
|
|
1172
1172
|
}
|
|
1173
1173
|
if (!isObject(value)) {
|
|
@@ -1212,7 +1212,7 @@ var require_lodash = __commonJS({
|
|
|
1212
1212
|
});
|
|
1213
1213
|
}
|
|
1214
1214
|
var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
|
|
1215
|
-
var props = isArr ?
|
|
1215
|
+
var props = isArr ? undefined2 : keysFunc(value);
|
|
1216
1216
|
arrayEach(props || value, function(subValue, key2) {
|
|
1217
1217
|
if (props) {
|
|
1218
1218
|
key2 = subValue;
|
|
@@ -1236,7 +1236,7 @@ var require_lodash = __commonJS({
|
|
|
1236
1236
|
object = Object2(object);
|
|
1237
1237
|
while (length--) {
|
|
1238
1238
|
var key = props[length], predicate = source[key], value = object[key];
|
|
1239
|
-
if (value ===
|
|
1239
|
+
if (value === undefined2 && !(key in object) || !predicate(value)) {
|
|
1240
1240
|
return false;
|
|
1241
1241
|
}
|
|
1242
1242
|
}
|
|
@@ -1247,7 +1247,7 @@ var require_lodash = __commonJS({
|
|
|
1247
1247
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
1248
1248
|
}
|
|
1249
1249
|
return setTimeout(function() {
|
|
1250
|
-
func.apply(
|
|
1250
|
+
func.apply(undefined2, args);
|
|
1251
1251
|
}, wait);
|
|
1252
1252
|
}
|
|
1253
1253
|
function baseDifference(array, values2, iteratee2, comparator) {
|
|
@@ -1298,7 +1298,7 @@ var require_lodash = __commonJS({
|
|
|
1298
1298
|
var index = -1, length = array.length;
|
|
1299
1299
|
while (++index < length) {
|
|
1300
1300
|
var value = array[index], current = iteratee2(value);
|
|
1301
|
-
if (current != null && (computed ===
|
|
1301
|
+
if (current != null && (computed === undefined2 ? current === current && !isSymbol(current) : comparator(current, computed))) {
|
|
1302
1302
|
var computed = current, result2 = value;
|
|
1303
1303
|
}
|
|
1304
1304
|
}
|
|
@@ -1310,7 +1310,7 @@ var require_lodash = __commonJS({
|
|
|
1310
1310
|
if (start < 0) {
|
|
1311
1311
|
start = -start > length ? 0 : length + start;
|
|
1312
1312
|
}
|
|
1313
|
-
end = end ===
|
|
1313
|
+
end = end === undefined2 || end > length ? length : toInteger(end);
|
|
1314
1314
|
if (end < 0) {
|
|
1315
1315
|
end += length;
|
|
1316
1316
|
}
|
|
@@ -1360,13 +1360,13 @@ var require_lodash = __commonJS({
|
|
|
1360
1360
|
return isFunction(object[key]);
|
|
1361
1361
|
});
|
|
1362
1362
|
}
|
|
1363
|
-
function baseGet(object,
|
|
1364
|
-
|
|
1365
|
-
var index = 0, length =
|
|
1363
|
+
function baseGet(object, path3) {
|
|
1364
|
+
path3 = castPath(path3, object);
|
|
1365
|
+
var index = 0, length = path3.length;
|
|
1366
1366
|
while (object != null && index < length) {
|
|
1367
|
-
object = object[toKey(
|
|
1367
|
+
object = object[toKey(path3[index++])];
|
|
1368
1368
|
}
|
|
1369
|
-
return index && index == length ? object :
|
|
1369
|
+
return index && index == length ? object : undefined2;
|
|
1370
1370
|
}
|
|
1371
1371
|
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
1372
1372
|
var result2 = keysFunc(object);
|
|
@@ -1374,7 +1374,7 @@ var require_lodash = __commonJS({
|
|
|
1374
1374
|
}
|
|
1375
1375
|
function baseGetTag(value) {
|
|
1376
1376
|
if (value == null) {
|
|
1377
|
-
return value ===
|
|
1377
|
+
return value === undefined2 ? undefinedTag : nullTag;
|
|
1378
1378
|
}
|
|
1379
1379
|
return symToStringTag && symToStringTag in Object2(value) ? getRawTag(value) : objectToString(value);
|
|
1380
1380
|
}
|
|
@@ -1398,7 +1398,7 @@ var require_lodash = __commonJS({
|
|
|
1398
1398
|
array = arrayMap(array, baseUnary(iteratee2));
|
|
1399
1399
|
}
|
|
1400
1400
|
maxLength = nativeMin(array.length, maxLength);
|
|
1401
|
-
caches[othIndex] = !comparator && (iteratee2 || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) :
|
|
1401
|
+
caches[othIndex] = !comparator && (iteratee2 || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : undefined2;
|
|
1402
1402
|
}
|
|
1403
1403
|
array = arrays[0];
|
|
1404
1404
|
var index = -1, seen = caches[0];
|
|
@@ -1428,11 +1428,11 @@ var require_lodash = __commonJS({
|
|
|
1428
1428
|
});
|
|
1429
1429
|
return accumulator;
|
|
1430
1430
|
}
|
|
1431
|
-
function baseInvoke(object,
|
|
1432
|
-
|
|
1433
|
-
object = parent(object,
|
|
1434
|
-
var func = object == null ? object : object[toKey(last(
|
|
1435
|
-
return func == null ?
|
|
1431
|
+
function baseInvoke(object, path3, args) {
|
|
1432
|
+
path3 = castPath(path3, object);
|
|
1433
|
+
object = parent(object, path3);
|
|
1434
|
+
var func = object == null ? object : object[toKey(last(path3))];
|
|
1435
|
+
return func == null ? undefined2 : apply(func, object, args);
|
|
1436
1436
|
}
|
|
1437
1437
|
function baseIsArguments(value) {
|
|
1438
1438
|
return isObjectLike(value) && baseGetTag(value) == argsTag;
|
|
@@ -1501,7 +1501,7 @@ var require_lodash = __commonJS({
|
|
|
1501
1501
|
data = matchData[index];
|
|
1502
1502
|
var key = data[0], objValue = object[key], srcValue = data[1];
|
|
1503
1503
|
if (noCustomizer && data[2]) {
|
|
1504
|
-
if (objValue ===
|
|
1504
|
+
if (objValue === undefined2 && !(key in object)) {
|
|
1505
1505
|
return false;
|
|
1506
1506
|
}
|
|
1507
1507
|
} else {
|
|
@@ -1509,7 +1509,7 @@ var require_lodash = __commonJS({
|
|
|
1509
1509
|
if (customizer) {
|
|
1510
1510
|
var result2 = customizer(objValue, srcValue, key, object, source, stack);
|
|
1511
1511
|
}
|
|
1512
|
-
if (!(result2 ===
|
|
1512
|
+
if (!(result2 === undefined2 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result2)) {
|
|
1513
1513
|
return false;
|
|
1514
1514
|
}
|
|
1515
1515
|
}
|
|
@@ -1587,13 +1587,13 @@ var require_lodash = __commonJS({
|
|
|
1587
1587
|
return object === source || baseIsMatch(object, source, matchData);
|
|
1588
1588
|
};
|
|
1589
1589
|
}
|
|
1590
|
-
function baseMatchesProperty(
|
|
1591
|
-
if (isKey(
|
|
1592
|
-
return matchesStrictComparable(toKey(
|
|
1590
|
+
function baseMatchesProperty(path3, srcValue) {
|
|
1591
|
+
if (isKey(path3) && isStrictComparable(srcValue)) {
|
|
1592
|
+
return matchesStrictComparable(toKey(path3), srcValue);
|
|
1593
1593
|
}
|
|
1594
1594
|
return function(object) {
|
|
1595
|
-
var objValue = get(object,
|
|
1596
|
-
return objValue ===
|
|
1595
|
+
var objValue = get(object, path3);
|
|
1596
|
+
return objValue === undefined2 && objValue === srcValue ? hasIn(object, path3) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
1597
1597
|
};
|
|
1598
1598
|
}
|
|
1599
1599
|
function baseMerge(object, source, srcIndex, customizer, stack) {
|
|
@@ -1605,8 +1605,8 @@ var require_lodash = __commonJS({
|
|
|
1605
1605
|
if (isObject(srcValue)) {
|
|
1606
1606
|
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
|
1607
1607
|
} else {
|
|
1608
|
-
var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) :
|
|
1609
|
-
if (newValue ===
|
|
1608
|
+
var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : undefined2;
|
|
1609
|
+
if (newValue === undefined2) {
|
|
1610
1610
|
newValue = srcValue;
|
|
1611
1611
|
}
|
|
1612
1612
|
assignMergeValue(object, key, newValue);
|
|
@@ -1619,8 +1619,8 @@ var require_lodash = __commonJS({
|
|
|
1619
1619
|
assignMergeValue(object, key, stacked);
|
|
1620
1620
|
return;
|
|
1621
1621
|
}
|
|
1622
|
-
var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) :
|
|
1623
|
-
var isCommon = newValue ===
|
|
1622
|
+
var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : undefined2;
|
|
1623
|
+
var isCommon = newValue === undefined2;
|
|
1624
1624
|
if (isCommon) {
|
|
1625
1625
|
var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
|
|
1626
1626
|
newValue = srcValue;
|
|
@@ -1662,7 +1662,7 @@ var require_lodash = __commonJS({
|
|
|
1662
1662
|
return;
|
|
1663
1663
|
}
|
|
1664
1664
|
n += n < 0 ? length : 0;
|
|
1665
|
-
return isIndex(n, length) ? array[n] :
|
|
1665
|
+
return isIndex(n, length) ? array[n] : undefined2;
|
|
1666
1666
|
}
|
|
1667
1667
|
function baseOrderBy(collection, iteratees, orders) {
|
|
1668
1668
|
if (iteratees.length) {
|
|
@@ -1690,23 +1690,23 @@ var require_lodash = __commonJS({
|
|
|
1690
1690
|
});
|
|
1691
1691
|
}
|
|
1692
1692
|
function basePick(object, paths) {
|
|
1693
|
-
return basePickBy(object, paths, function(value,
|
|
1694
|
-
return hasIn(object,
|
|
1693
|
+
return basePickBy(object, paths, function(value, path3) {
|
|
1694
|
+
return hasIn(object, path3);
|
|
1695
1695
|
});
|
|
1696
1696
|
}
|
|
1697
1697
|
function basePickBy(object, paths, predicate) {
|
|
1698
1698
|
var index = -1, length = paths.length, result2 = {};
|
|
1699
1699
|
while (++index < length) {
|
|
1700
|
-
var
|
|
1701
|
-
if (predicate(value,
|
|
1702
|
-
baseSet(result2, castPath(
|
|
1700
|
+
var path3 = paths[index], value = baseGet(object, path3);
|
|
1701
|
+
if (predicate(value, path3)) {
|
|
1702
|
+
baseSet(result2, castPath(path3, object), value);
|
|
1703
1703
|
}
|
|
1704
1704
|
}
|
|
1705
1705
|
return result2;
|
|
1706
1706
|
}
|
|
1707
|
-
function basePropertyDeep(
|
|
1707
|
+
function basePropertyDeep(path3) {
|
|
1708
1708
|
return function(object) {
|
|
1709
|
-
return baseGet(object,
|
|
1709
|
+
return baseGet(object, path3);
|
|
1710
1710
|
};
|
|
1711
1711
|
}
|
|
1712
1712
|
function basePullAll(array, values2, iteratee2, comparator) {
|
|
@@ -1780,22 +1780,22 @@ var require_lodash = __commonJS({
|
|
|
1780
1780
|
var array = values(collection);
|
|
1781
1781
|
return shuffleSelf(array, baseClamp(n, 0, array.length));
|
|
1782
1782
|
}
|
|
1783
|
-
function baseSet(object,
|
|
1783
|
+
function baseSet(object, path3, value, customizer) {
|
|
1784
1784
|
if (!isObject(object)) {
|
|
1785
1785
|
return object;
|
|
1786
1786
|
}
|
|
1787
|
-
|
|
1788
|
-
var index = -1, length =
|
|
1787
|
+
path3 = castPath(path3, object);
|
|
1788
|
+
var index = -1, length = path3.length, lastIndex = length - 1, nested = object;
|
|
1789
1789
|
while (nested != null && ++index < length) {
|
|
1790
|
-
var key = toKey(
|
|
1790
|
+
var key = toKey(path3[index]), newValue = value;
|
|
1791
1791
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
1792
1792
|
return object;
|
|
1793
1793
|
}
|
|
1794
1794
|
if (index != lastIndex) {
|
|
1795
1795
|
var objValue = nested[key];
|
|
1796
|
-
newValue = customizer ? customizer(objValue, key, nested) :
|
|
1797
|
-
if (newValue ===
|
|
1798
|
-
newValue = isObject(objValue) ? objValue : isIndex(
|
|
1796
|
+
newValue = customizer ? customizer(objValue, key, nested) : undefined2;
|
|
1797
|
+
if (newValue === undefined2) {
|
|
1798
|
+
newValue = isObject(objValue) ? objValue : isIndex(path3[index + 1]) ? [] : {};
|
|
1799
1799
|
}
|
|
1800
1800
|
}
|
|
1801
1801
|
assignValue(nested, key, newValue);
|
|
@@ -1864,9 +1864,9 @@ var require_lodash = __commonJS({
|
|
|
1864
1864
|
return 0;
|
|
1865
1865
|
}
|
|
1866
1866
|
value = iteratee2(value);
|
|
1867
|
-
var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value ===
|
|
1867
|
+
var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined2;
|
|
1868
1868
|
while (low < high) {
|
|
1869
|
-
var mid = nativeFloor((low + high) / 2), computed = iteratee2(array[mid]), othIsDefined = computed !==
|
|
1869
|
+
var mid = nativeFloor((low + high) / 2), computed = iteratee2(array[mid]), othIsDefined = computed !== undefined2, othIsNull = computed === null, othIsReflexive = computed === computed, othIsSymbol = isSymbol(computed);
|
|
1870
1870
|
if (valIsNaN) {
|
|
1871
1871
|
var setLow = retHighest || othIsReflexive;
|
|
1872
1872
|
} else if (valIsUndefined) {
|
|
@@ -1961,33 +1961,33 @@ var require_lodash = __commonJS({
|
|
|
1961
1961
|
}
|
|
1962
1962
|
return result2;
|
|
1963
1963
|
}
|
|
1964
|
-
function baseUnset(object,
|
|
1965
|
-
|
|
1966
|
-
var index = -1, length =
|
|
1964
|
+
function baseUnset(object, path3) {
|
|
1965
|
+
path3 = castPath(path3, object);
|
|
1966
|
+
var index = -1, length = path3.length;
|
|
1967
1967
|
if (!length) {
|
|
1968
1968
|
return true;
|
|
1969
1969
|
}
|
|
1970
1970
|
var isRootPrimitive = object == null || typeof object !== "object" && typeof object !== "function";
|
|
1971
1971
|
while (++index < length) {
|
|
1972
|
-
var key =
|
|
1972
|
+
var key = path3[index];
|
|
1973
1973
|
if (typeof key !== "string") {
|
|
1974
1974
|
continue;
|
|
1975
1975
|
}
|
|
1976
1976
|
if (key === "__proto__" && !hasOwnProperty.call(object, "__proto__")) {
|
|
1977
1977
|
return false;
|
|
1978
1978
|
}
|
|
1979
|
-
if (key === "constructor" && index + 1 < length && typeof
|
|
1979
|
+
if (key === "constructor" && index + 1 < length && typeof path3[index + 1] === "string" && path3[index + 1] === "prototype") {
|
|
1980
1980
|
if (isRootPrimitive && index === 0) {
|
|
1981
1981
|
continue;
|
|
1982
1982
|
}
|
|
1983
1983
|
return false;
|
|
1984
1984
|
}
|
|
1985
1985
|
}
|
|
1986
|
-
var obj = parent(object,
|
|
1987
|
-
return obj == null || delete obj[toKey(last(
|
|
1986
|
+
var obj = parent(object, path3);
|
|
1987
|
+
return obj == null || delete obj[toKey(last(path3))];
|
|
1988
1988
|
}
|
|
1989
|
-
function baseUpdate(object,
|
|
1990
|
-
return baseSet(object,
|
|
1989
|
+
function baseUpdate(object, path3, updater, customizer) {
|
|
1990
|
+
return baseSet(object, path3, updater(baseGet(object, path3)), customizer);
|
|
1991
1991
|
}
|
|
1992
1992
|
function baseWhile(array, predicate, isDrop, fromRight) {
|
|
1993
1993
|
var length = array.length, index = fromRight ? length : -1;
|
|
@@ -2023,7 +2023,7 @@ var require_lodash = __commonJS({
|
|
|
2023
2023
|
function baseZipObject(props, values2, assignFunc) {
|
|
2024
2024
|
var index = -1, length = props.length, valsLength = values2.length, result2 = {};
|
|
2025
2025
|
while (++index < length) {
|
|
2026
|
-
var value = index < valsLength ? values2[index] :
|
|
2026
|
+
var value = index < valsLength ? values2[index] : undefined2;
|
|
2027
2027
|
assignFunc(result2, props[index], value);
|
|
2028
2028
|
}
|
|
2029
2029
|
return result2;
|
|
@@ -2043,7 +2043,7 @@ var require_lodash = __commonJS({
|
|
|
2043
2043
|
var castRest = baseRest;
|
|
2044
2044
|
function castSlice(array, start, end) {
|
|
2045
2045
|
var length = array.length;
|
|
2046
|
-
end = end ===
|
|
2046
|
+
end = end === undefined2 ? length : end;
|
|
2047
2047
|
return !start && end >= length ? array : baseSlice(array, start, end);
|
|
2048
2048
|
}
|
|
2049
2049
|
var clearTimeout = ctxClearTimeout || function(id) {
|
|
@@ -2080,8 +2080,8 @@ var require_lodash = __commonJS({
|
|
|
2080
2080
|
}
|
|
2081
2081
|
function compareAscending(value, other) {
|
|
2082
2082
|
if (value !== other) {
|
|
2083
|
-
var valIsDefined = value !==
|
|
2084
|
-
var othIsDefined = other !==
|
|
2083
|
+
var valIsDefined = value !== undefined2, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value);
|
|
2084
|
+
var othIsDefined = other !== undefined2, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other);
|
|
2085
2085
|
if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
|
|
2086
2086
|
return 1;
|
|
2087
2087
|
}
|
|
@@ -2150,8 +2150,8 @@ var require_lodash = __commonJS({
|
|
|
2150
2150
|
var index = -1, length = props.length;
|
|
2151
2151
|
while (++index < length) {
|
|
2152
2152
|
var key = props[index];
|
|
2153
|
-
var newValue = customizer ? customizer(object[key], source[key], key, object, source) :
|
|
2154
|
-
if (newValue ===
|
|
2153
|
+
var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined2;
|
|
2154
|
+
if (newValue === undefined2) {
|
|
2155
2155
|
newValue = source[key];
|
|
2156
2156
|
}
|
|
2157
2157
|
if (isNew) {
|
|
@@ -2176,10 +2176,10 @@ var require_lodash = __commonJS({
|
|
|
2176
2176
|
}
|
|
2177
2177
|
function createAssigner(assigner) {
|
|
2178
2178
|
return baseRest(function(object, sources) {
|
|
2179
|
-
var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] :
|
|
2180
|
-
customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) :
|
|
2179
|
+
var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined2, guard = length > 2 ? sources[2] : undefined2;
|
|
2180
|
+
customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : undefined2;
|
|
2181
2181
|
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
|
2182
|
-
customizer = length < 3 ?
|
|
2182
|
+
customizer = length < 3 ? undefined2 : customizer;
|
|
2183
2183
|
length = 1;
|
|
2184
2184
|
}
|
|
2185
2185
|
object = Object2(object);
|
|
@@ -2232,7 +2232,7 @@ var require_lodash = __commonJS({
|
|
|
2232
2232
|
function createCaseFirst(methodName) {
|
|
2233
2233
|
return function(string) {
|
|
2234
2234
|
string = toString(string);
|
|
2235
|
-
var strSymbols = hasUnicode(string) ? stringToArray(string) :
|
|
2235
|
+
var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined2;
|
|
2236
2236
|
var chr = strSymbols ? strSymbols[0] : string.charAt(0);
|
|
2237
2237
|
var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1);
|
|
2238
2238
|
return chr[methodName]() + trailing;
|
|
@@ -2283,11 +2283,11 @@ var require_lodash = __commonJS({
|
|
|
2283
2283
|
bitmask,
|
|
2284
2284
|
createHybrid,
|
|
2285
2285
|
wrapper.placeholder,
|
|
2286
|
-
|
|
2286
|
+
undefined2,
|
|
2287
2287
|
args,
|
|
2288
2288
|
holders,
|
|
2289
|
-
|
|
2290
|
-
|
|
2289
|
+
undefined2,
|
|
2290
|
+
undefined2,
|
|
2291
2291
|
arity - length
|
|
2292
2292
|
);
|
|
2293
2293
|
}
|
|
@@ -2307,7 +2307,7 @@ var require_lodash = __commonJS({
|
|
|
2307
2307
|
};
|
|
2308
2308
|
}
|
|
2309
2309
|
var index = findIndexFunc(collection, predicate, fromIndex);
|
|
2310
|
-
return index > -1 ? iterable[iteratee2 ? collection[index] : index] :
|
|
2310
|
+
return index > -1 ? iterable[iteratee2 ? collection[index] : index] : undefined2;
|
|
2311
2311
|
};
|
|
2312
2312
|
}
|
|
2313
2313
|
function createFlow(fromRight) {
|
|
@@ -2328,7 +2328,7 @@ var require_lodash = __commonJS({
|
|
|
2328
2328
|
index = wrapper ? index : length;
|
|
2329
2329
|
while (++index < length) {
|
|
2330
2330
|
func = funcs[index];
|
|
2331
|
-
var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) :
|
|
2331
|
+
var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined2;
|
|
2332
2332
|
if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) {
|
|
2333
2333
|
wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
|
|
2334
2334
|
} else {
|
|
@@ -2349,7 +2349,7 @@ var require_lodash = __commonJS({
|
|
|
2349
2349
|
});
|
|
2350
2350
|
}
|
|
2351
2351
|
function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity) {
|
|
2352
|
-
var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ?
|
|
2352
|
+
var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined2 : createCtor(func);
|
|
2353
2353
|
function wrapper() {
|
|
2354
2354
|
var length = arguments.length, args = Array2(length), index = length;
|
|
2355
2355
|
while (index--) {
|
|
@@ -2405,14 +2405,14 @@ var require_lodash = __commonJS({
|
|
|
2405
2405
|
function createMathOperation(operator, defaultValue) {
|
|
2406
2406
|
return function(value, other) {
|
|
2407
2407
|
var result2;
|
|
2408
|
-
if (value ===
|
|
2408
|
+
if (value === undefined2 && other === undefined2) {
|
|
2409
2409
|
return defaultValue;
|
|
2410
2410
|
}
|
|
2411
|
-
if (value !==
|
|
2411
|
+
if (value !== undefined2) {
|
|
2412
2412
|
result2 = value;
|
|
2413
2413
|
}
|
|
2414
|
-
if (other !==
|
|
2415
|
-
if (result2 ===
|
|
2414
|
+
if (other !== undefined2) {
|
|
2415
|
+
if (result2 === undefined2) {
|
|
2416
2416
|
return other;
|
|
2417
2417
|
}
|
|
2418
2418
|
if (typeof value == "string" || typeof other == "string") {
|
|
@@ -2439,7 +2439,7 @@ var require_lodash = __commonJS({
|
|
|
2439
2439
|
});
|
|
2440
2440
|
}
|
|
2441
2441
|
function createPadding(length, chars) {
|
|
2442
|
-
chars = chars ===
|
|
2442
|
+
chars = chars === undefined2 ? " " : baseToString(chars);
|
|
2443
2443
|
var charsLength = chars.length;
|
|
2444
2444
|
if (charsLength < 2) {
|
|
2445
2445
|
return charsLength ? baseRepeat(chars, length) : chars;
|
|
@@ -2464,16 +2464,16 @@ var require_lodash = __commonJS({
|
|
|
2464
2464
|
function createRange(fromRight) {
|
|
2465
2465
|
return function(start, end, step) {
|
|
2466
2466
|
if (step && typeof step != "number" && isIterateeCall(start, end, step)) {
|
|
2467
|
-
end = step =
|
|
2467
|
+
end = step = undefined2;
|
|
2468
2468
|
}
|
|
2469
2469
|
start = toFinite(start);
|
|
2470
|
-
if (end ===
|
|
2470
|
+
if (end === undefined2) {
|
|
2471
2471
|
end = start;
|
|
2472
2472
|
start = 0;
|
|
2473
2473
|
} else {
|
|
2474
2474
|
end = toFinite(end);
|
|
2475
2475
|
}
|
|
2476
|
-
step = step ===
|
|
2476
|
+
step = step === undefined2 ? start < end ? 1 : -1 : toFinite(step);
|
|
2477
2477
|
return baseRange(start, end, step, fromRight);
|
|
2478
2478
|
};
|
|
2479
2479
|
}
|
|
@@ -2487,7 +2487,7 @@ var require_lodash = __commonJS({
|
|
|
2487
2487
|
};
|
|
2488
2488
|
}
|
|
2489
2489
|
function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary2, arity) {
|
|
2490
|
-
var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders :
|
|
2490
|
+
var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined2, newHoldersRight = isCurry ? undefined2 : holders, newPartials = isCurry ? partials : undefined2, newPartialsRight = isCurry ? undefined2 : partials;
|
|
2491
2491
|
bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG;
|
|
2492
2492
|
bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
|
|
2493
2493
|
if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
|
|
@@ -2505,7 +2505,7 @@ var require_lodash = __commonJS({
|
|
|
2505
2505
|
ary2,
|
|
2506
2506
|
arity
|
|
2507
2507
|
];
|
|
2508
|
-
var result2 = wrapFunc.apply(
|
|
2508
|
+
var result2 = wrapFunc.apply(undefined2, newData);
|
|
2509
2509
|
if (isLaziable(func)) {
|
|
2510
2510
|
setData(result2, newData);
|
|
2511
2511
|
}
|
|
@@ -2548,16 +2548,16 @@ var require_lodash = __commonJS({
|
|
|
2548
2548
|
var length = partials ? partials.length : 0;
|
|
2549
2549
|
if (!length) {
|
|
2550
2550
|
bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
|
|
2551
|
-
partials = holders =
|
|
2551
|
+
partials = holders = undefined2;
|
|
2552
2552
|
}
|
|
2553
|
-
ary2 = ary2 ===
|
|
2554
|
-
arity = arity ===
|
|
2553
|
+
ary2 = ary2 === undefined2 ? ary2 : nativeMax(toInteger(ary2), 0);
|
|
2554
|
+
arity = arity === undefined2 ? arity : toInteger(arity);
|
|
2555
2555
|
length -= holders ? holders.length : 0;
|
|
2556
2556
|
if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
|
|
2557
2557
|
var partialsRight = partials, holdersRight = holders;
|
|
2558
|
-
partials = holders =
|
|
2558
|
+
partials = holders = undefined2;
|
|
2559
2559
|
}
|
|
2560
|
-
var data = isBindKey ?
|
|
2560
|
+
var data = isBindKey ? undefined2 : getData(func);
|
|
2561
2561
|
var newData = [
|
|
2562
2562
|
func,
|
|
2563
2563
|
bitmask,
|
|
@@ -2578,7 +2578,7 @@ var require_lodash = __commonJS({
|
|
|
2578
2578
|
thisArg = newData[2];
|
|
2579
2579
|
partials = newData[3];
|
|
2580
2580
|
holders = newData[4];
|
|
2581
|
-
arity = newData[9] = newData[9] ===
|
|
2581
|
+
arity = newData[9] = newData[9] === undefined2 ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0);
|
|
2582
2582
|
if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
|
|
2583
2583
|
bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
|
|
2584
2584
|
}
|
|
@@ -2589,13 +2589,13 @@ var require_lodash = __commonJS({
|
|
|
2589
2589
|
} else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
|
|
2590
2590
|
result2 = createPartial(func, bitmask, thisArg, partials);
|
|
2591
2591
|
} else {
|
|
2592
|
-
result2 = createHybrid.apply(
|
|
2592
|
+
result2 = createHybrid.apply(undefined2, newData);
|
|
2593
2593
|
}
|
|
2594
2594
|
var setter = data ? baseSetData : setData;
|
|
2595
2595
|
return setWrapToString(setter(result2, newData), func, bitmask);
|
|
2596
2596
|
}
|
|
2597
2597
|
function customDefaultsAssignIn(objValue, srcValue, key, object) {
|
|
2598
|
-
if (objValue ===
|
|
2598
|
+
if (objValue === undefined2 || eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) {
|
|
2599
2599
|
return srcValue;
|
|
2600
2600
|
}
|
|
2601
2601
|
return objValue;
|
|
@@ -2603,13 +2603,13 @@ var require_lodash = __commonJS({
|
|
|
2603
2603
|
function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
|
|
2604
2604
|
if (isObject(objValue) && isObject(srcValue)) {
|
|
2605
2605
|
stack.set(srcValue, objValue);
|
|
2606
|
-
baseMerge(objValue, srcValue,
|
|
2606
|
+
baseMerge(objValue, srcValue, undefined2, customDefaultsMerge, stack);
|
|
2607
2607
|
stack["delete"](srcValue);
|
|
2608
2608
|
}
|
|
2609
2609
|
return objValue;
|
|
2610
2610
|
}
|
|
2611
2611
|
function customOmitClone(value) {
|
|
2612
|
-
return isPlainObject(value) ?
|
|
2612
|
+
return isPlainObject(value) ? undefined2 : value;
|
|
2613
2613
|
}
|
|
2614
2614
|
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
2615
2615
|
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
|
|
@@ -2621,7 +2621,7 @@ var require_lodash = __commonJS({
|
|
|
2621
2621
|
if (arrStacked && othStacked) {
|
|
2622
2622
|
return arrStacked == other && othStacked == array;
|
|
2623
2623
|
}
|
|
2624
|
-
var index = -1, result2 = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() :
|
|
2624
|
+
var index = -1, result2 = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined2;
|
|
2625
2625
|
stack.set(array, other);
|
|
2626
2626
|
stack.set(other, array);
|
|
2627
2627
|
while (++index < arrLength) {
|
|
@@ -2629,7 +2629,7 @@ var require_lodash = __commonJS({
|
|
|
2629
2629
|
if (customizer) {
|
|
2630
2630
|
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
|
|
2631
2631
|
}
|
|
2632
|
-
if (compared !==
|
|
2632
|
+
if (compared !== undefined2) {
|
|
2633
2633
|
if (compared) {
|
|
2634
2634
|
continue;
|
|
2635
2635
|
}
|
|
@@ -2727,7 +2727,7 @@ var require_lodash = __commonJS({
|
|
|
2727
2727
|
if (customizer) {
|
|
2728
2728
|
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
|
2729
2729
|
}
|
|
2730
|
-
if (!(compared ===
|
|
2730
|
+
if (!(compared === undefined2 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
|
|
2731
2731
|
result2 = false;
|
|
2732
2732
|
break;
|
|
2733
2733
|
}
|
|
@@ -2744,7 +2744,7 @@ var require_lodash = __commonJS({
|
|
|
2744
2744
|
return result2;
|
|
2745
2745
|
}
|
|
2746
2746
|
function flatRest(func) {
|
|
2747
|
-
return setToString(overRest(func,
|
|
2747
|
+
return setToString(overRest(func, undefined2, flatten), func + "");
|
|
2748
2748
|
}
|
|
2749
2749
|
function getAllKeys(object) {
|
|
2750
2750
|
return baseGetAllKeys(object, keys, getSymbols);
|
|
@@ -2788,12 +2788,12 @@ var require_lodash = __commonJS({
|
|
|
2788
2788
|
}
|
|
2789
2789
|
function getNative(object, key) {
|
|
2790
2790
|
var value = getValue(object, key);
|
|
2791
|
-
return baseIsNative(value) ? value :
|
|
2791
|
+
return baseIsNative(value) ? value : undefined2;
|
|
2792
2792
|
}
|
|
2793
2793
|
function getRawTag(value) {
|
|
2794
2794
|
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
|
|
2795
2795
|
try {
|
|
2796
|
-
value[symToStringTag] =
|
|
2796
|
+
value[symToStringTag] = undefined2;
|
|
2797
2797
|
var unmasked = true;
|
|
2798
2798
|
} catch (e) {
|
|
2799
2799
|
}
|
|
@@ -2827,7 +2827,7 @@ var require_lodash = __commonJS({
|
|
|
2827
2827
|
var getTag = baseGetTag;
|
|
2828
2828
|
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
|
|
2829
2829
|
getTag = function(value) {
|
|
2830
|
-
var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor :
|
|
2830
|
+
var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined2, ctorString = Ctor ? toSource(Ctor) : "";
|
|
2831
2831
|
if (ctorString) {
|
|
2832
2832
|
switch (ctorString) {
|
|
2833
2833
|
case dataViewCtorString:
|
|
@@ -2870,11 +2870,11 @@ var require_lodash = __commonJS({
|
|
|
2870
2870
|
var match = source.match(reWrapDetails);
|
|
2871
2871
|
return match ? match[1].split(reSplitDetails) : [];
|
|
2872
2872
|
}
|
|
2873
|
-
function hasPath(object,
|
|
2874
|
-
|
|
2875
|
-
var index = -1, length =
|
|
2873
|
+
function hasPath(object, path3, hasFunc) {
|
|
2874
|
+
path3 = castPath(path3, object);
|
|
2875
|
+
var index = -1, length = path3.length, result2 = false;
|
|
2876
2876
|
while (++index < length) {
|
|
2877
|
-
var key = toKey(
|
|
2877
|
+
var key = toKey(path3[index]);
|
|
2878
2878
|
if (!(result2 = object != null && hasFunc(object, key))) {
|
|
2879
2879
|
break;
|
|
2880
2880
|
}
|
|
@@ -2999,7 +2999,7 @@ var require_lodash = __commonJS({
|
|
|
2999
2999
|
if (object == null) {
|
|
3000
3000
|
return false;
|
|
3001
3001
|
}
|
|
3002
|
-
return object[key] === srcValue && (srcValue !==
|
|
3002
|
+
return object[key] === srcValue && (srcValue !== undefined2 || key in Object2(object));
|
|
3003
3003
|
};
|
|
3004
3004
|
}
|
|
3005
3005
|
function memoizeCapped(func) {
|
|
@@ -3061,7 +3061,7 @@ var require_lodash = __commonJS({
|
|
|
3061
3061
|
return nativeObjectToString.call(value);
|
|
3062
3062
|
}
|
|
3063
3063
|
function overRest(func, start, transform2) {
|
|
3064
|
-
start = nativeMax(start ===
|
|
3064
|
+
start = nativeMax(start === undefined2 ? func.length - 1 : start, 0);
|
|
3065
3065
|
return function() {
|
|
3066
3066
|
var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array2(length);
|
|
3067
3067
|
while (++index < length) {
|
|
@@ -3076,14 +3076,14 @@ var require_lodash = __commonJS({
|
|
|
3076
3076
|
return apply(func, this, otherArgs);
|
|
3077
3077
|
};
|
|
3078
3078
|
}
|
|
3079
|
-
function parent(object,
|
|
3080
|
-
return
|
|
3079
|
+
function parent(object, path3) {
|
|
3080
|
+
return path3.length < 2 ? object : baseGet(object, baseSlice(path3, 0, -1));
|
|
3081
3081
|
}
|
|
3082
3082
|
function reorder(array, indexes) {
|
|
3083
3083
|
var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array);
|
|
3084
3084
|
while (length--) {
|
|
3085
3085
|
var index = indexes[length];
|
|
3086
|
-
array[length] = isIndex(index, arrLength) ? oldArray[index] :
|
|
3086
|
+
array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined2;
|
|
3087
3087
|
}
|
|
3088
3088
|
return array;
|
|
3089
3089
|
}
|
|
@@ -3117,12 +3117,12 @@ var require_lodash = __commonJS({
|
|
|
3117
3117
|
} else {
|
|
3118
3118
|
count = 0;
|
|
3119
3119
|
}
|
|
3120
|
-
return func.apply(
|
|
3120
|
+
return func.apply(undefined2, arguments);
|
|
3121
3121
|
};
|
|
3122
3122
|
}
|
|
3123
3123
|
function shuffleSelf(array, size2) {
|
|
3124
3124
|
var index = -1, length = array.length, lastIndex = length - 1;
|
|
3125
|
-
size2 = size2 ===
|
|
3125
|
+
size2 = size2 === undefined2 ? length : size2;
|
|
3126
3126
|
while (++index < size2) {
|
|
3127
3127
|
var rand = baseRandom(index, lastIndex), value = array[rand];
|
|
3128
3128
|
array[rand] = array[index];
|
|
@@ -3181,7 +3181,7 @@ var require_lodash = __commonJS({
|
|
|
3181
3181
|
return result2;
|
|
3182
3182
|
}
|
|
3183
3183
|
function chunk(array, size2, guard) {
|
|
3184
|
-
if (guard ? isIterateeCall(array, size2, guard) : size2 ===
|
|
3184
|
+
if (guard ? isIterateeCall(array, size2, guard) : size2 === undefined2) {
|
|
3185
3185
|
size2 = 1;
|
|
3186
3186
|
} else {
|
|
3187
3187
|
size2 = nativeMax(toInteger(size2), 0);
|
|
@@ -3223,23 +3223,23 @@ var require_lodash = __commonJS({
|
|
|
3223
3223
|
var differenceBy = baseRest(function(array, values2) {
|
|
3224
3224
|
var iteratee2 = last(values2);
|
|
3225
3225
|
if (isArrayLikeObject(iteratee2)) {
|
|
3226
|
-
iteratee2 =
|
|
3226
|
+
iteratee2 = undefined2;
|
|
3227
3227
|
}
|
|
3228
3228
|
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2)) : [];
|
|
3229
3229
|
});
|
|
3230
3230
|
var differenceWith = baseRest(function(array, values2) {
|
|
3231
3231
|
var comparator = last(values2);
|
|
3232
3232
|
if (isArrayLikeObject(comparator)) {
|
|
3233
|
-
comparator =
|
|
3233
|
+
comparator = undefined2;
|
|
3234
3234
|
}
|
|
3235
|
-
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true),
|
|
3235
|
+
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), undefined2, comparator) : [];
|
|
3236
3236
|
});
|
|
3237
3237
|
function drop(array, n, guard) {
|
|
3238
3238
|
var length = array == null ? 0 : array.length;
|
|
3239
3239
|
if (!length) {
|
|
3240
3240
|
return [];
|
|
3241
3241
|
}
|
|
3242
|
-
n = guard || n ===
|
|
3242
|
+
n = guard || n === undefined2 ? 1 : toInteger(n);
|
|
3243
3243
|
return baseSlice(array, n < 0 ? 0 : n, length);
|
|
3244
3244
|
}
|
|
3245
3245
|
function dropRight(array, n, guard) {
|
|
@@ -3247,7 +3247,7 @@ var require_lodash = __commonJS({
|
|
|
3247
3247
|
if (!length) {
|
|
3248
3248
|
return [];
|
|
3249
3249
|
}
|
|
3250
|
-
n = guard || n ===
|
|
3250
|
+
n = guard || n === undefined2 ? 1 : toInteger(n);
|
|
3251
3251
|
n = length - n;
|
|
3252
3252
|
return baseSlice(array, 0, n < 0 ? 0 : n);
|
|
3253
3253
|
}
|
|
@@ -3285,7 +3285,7 @@ var require_lodash = __commonJS({
|
|
|
3285
3285
|
return -1;
|
|
3286
3286
|
}
|
|
3287
3287
|
var index = length - 1;
|
|
3288
|
-
if (fromIndex !==
|
|
3288
|
+
if (fromIndex !== undefined2) {
|
|
3289
3289
|
index = toInteger(fromIndex);
|
|
3290
3290
|
index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
|
|
3291
3291
|
}
|
|
@@ -3304,7 +3304,7 @@ var require_lodash = __commonJS({
|
|
|
3304
3304
|
if (!length) {
|
|
3305
3305
|
return [];
|
|
3306
3306
|
}
|
|
3307
|
-
depth = depth ===
|
|
3307
|
+
depth = depth === undefined2 ? 1 : toInteger(depth);
|
|
3308
3308
|
return baseFlatten(array, depth);
|
|
3309
3309
|
}
|
|
3310
3310
|
function fromPairs(pairs) {
|
|
@@ -3316,7 +3316,7 @@ var require_lodash = __commonJS({
|
|
|
3316
3316
|
return result2;
|
|
3317
3317
|
}
|
|
3318
3318
|
function head(array) {
|
|
3319
|
-
return array && array.length ? array[0] :
|
|
3319
|
+
return array && array.length ? array[0] : undefined2;
|
|
3320
3320
|
}
|
|
3321
3321
|
function indexOf(array, value, fromIndex) {
|
|
3322
3322
|
var length = array == null ? 0 : array.length;
|
|
@@ -3340,7 +3340,7 @@ var require_lodash = __commonJS({
|
|
|
3340
3340
|
var intersectionBy = baseRest(function(arrays) {
|
|
3341
3341
|
var iteratee2 = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
|
|
3342
3342
|
if (iteratee2 === last(mapped)) {
|
|
3343
|
-
iteratee2 =
|
|
3343
|
+
iteratee2 = undefined2;
|
|
3344
3344
|
} else {
|
|
3345
3345
|
mapped.pop();
|
|
3346
3346
|
}
|
|
@@ -3348,18 +3348,18 @@ var require_lodash = __commonJS({
|
|
|
3348
3348
|
});
|
|
3349
3349
|
var intersectionWith = baseRest(function(arrays) {
|
|
3350
3350
|
var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
|
|
3351
|
-
comparator = typeof comparator == "function" ? comparator :
|
|
3351
|
+
comparator = typeof comparator == "function" ? comparator : undefined2;
|
|
3352
3352
|
if (comparator) {
|
|
3353
3353
|
mapped.pop();
|
|
3354
3354
|
}
|
|
3355
|
-
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped,
|
|
3355
|
+
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : [];
|
|
3356
3356
|
});
|
|
3357
3357
|
function join(array, separator) {
|
|
3358
3358
|
return array == null ? "" : nativeJoin.call(array, separator);
|
|
3359
3359
|
}
|
|
3360
3360
|
function last(array) {
|
|
3361
3361
|
var length = array == null ? 0 : array.length;
|
|
3362
|
-
return length ? array[length - 1] :
|
|
3362
|
+
return length ? array[length - 1] : undefined2;
|
|
3363
3363
|
}
|
|
3364
3364
|
function lastIndexOf(array, value, fromIndex) {
|
|
3365
3365
|
var length = array == null ? 0 : array.length;
|
|
@@ -3367,14 +3367,14 @@ var require_lodash = __commonJS({
|
|
|
3367
3367
|
return -1;
|
|
3368
3368
|
}
|
|
3369
3369
|
var index = length;
|
|
3370
|
-
if (fromIndex !==
|
|
3370
|
+
if (fromIndex !== undefined2) {
|
|
3371
3371
|
index = toInteger(fromIndex);
|
|
3372
3372
|
index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
|
|
3373
3373
|
}
|
|
3374
3374
|
return value === value ? strictLastIndexOf(array, value, index) : baseFindIndex(array, baseIsNaN, index, true);
|
|
3375
3375
|
}
|
|
3376
3376
|
function nth(array, n) {
|
|
3377
|
-
return array && array.length ? baseNth(array, toInteger(n)) :
|
|
3377
|
+
return array && array.length ? baseNth(array, toInteger(n)) : undefined2;
|
|
3378
3378
|
}
|
|
3379
3379
|
var pull = baseRest(pullAll);
|
|
3380
3380
|
function pullAll(array, values2) {
|
|
@@ -3384,7 +3384,7 @@ var require_lodash = __commonJS({
|
|
|
3384
3384
|
return array && array.length && values2 && values2.length ? basePullAll(array, values2, getIteratee(iteratee2, 2)) : array;
|
|
3385
3385
|
}
|
|
3386
3386
|
function pullAllWith(array, values2, comparator) {
|
|
3387
|
-
return array && array.length && values2 && values2.length ? basePullAll(array, values2,
|
|
3387
|
+
return array && array.length && values2 && values2.length ? basePullAll(array, values2, undefined2, comparator) : array;
|
|
3388
3388
|
}
|
|
3389
3389
|
var pullAt = flatRest(function(array, indexes) {
|
|
3390
3390
|
var length = array == null ? 0 : array.length, result2 = baseAt(array, indexes);
|
|
@@ -3423,7 +3423,7 @@ var require_lodash = __commonJS({
|
|
|
3423
3423
|
end = length;
|
|
3424
3424
|
} else {
|
|
3425
3425
|
start = start == null ? 0 : toInteger(start);
|
|
3426
|
-
end = end ===
|
|
3426
|
+
end = end === undefined2 ? length : toInteger(end);
|
|
3427
3427
|
}
|
|
3428
3428
|
return baseSlice(array, start, end);
|
|
3429
3429
|
}
|
|
@@ -3473,7 +3473,7 @@ var require_lodash = __commonJS({
|
|
|
3473
3473
|
if (!(array && array.length)) {
|
|
3474
3474
|
return [];
|
|
3475
3475
|
}
|
|
3476
|
-
n = guard || n ===
|
|
3476
|
+
n = guard || n === undefined2 ? 1 : toInteger(n);
|
|
3477
3477
|
return baseSlice(array, 0, n < 0 ? 0 : n);
|
|
3478
3478
|
}
|
|
3479
3479
|
function takeRight(array, n, guard) {
|
|
@@ -3481,7 +3481,7 @@ var require_lodash = __commonJS({
|
|
|
3481
3481
|
if (!length) {
|
|
3482
3482
|
return [];
|
|
3483
3483
|
}
|
|
3484
|
-
n = guard || n ===
|
|
3484
|
+
n = guard || n === undefined2 ? 1 : toInteger(n);
|
|
3485
3485
|
n = length - n;
|
|
3486
3486
|
return baseSlice(array, n < 0 ? 0 : n, length);
|
|
3487
3487
|
}
|
|
@@ -3497,14 +3497,14 @@ var require_lodash = __commonJS({
|
|
|
3497
3497
|
var unionBy = baseRest(function(arrays) {
|
|
3498
3498
|
var iteratee2 = last(arrays);
|
|
3499
3499
|
if (isArrayLikeObject(iteratee2)) {
|
|
3500
|
-
iteratee2 =
|
|
3500
|
+
iteratee2 = undefined2;
|
|
3501
3501
|
}
|
|
3502
3502
|
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2));
|
|
3503
3503
|
});
|
|
3504
3504
|
var unionWith = baseRest(function(arrays) {
|
|
3505
3505
|
var comparator = last(arrays);
|
|
3506
|
-
comparator = typeof comparator == "function" ? comparator :
|
|
3507
|
-
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true),
|
|
3506
|
+
comparator = typeof comparator == "function" ? comparator : undefined2;
|
|
3507
|
+
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined2, comparator);
|
|
3508
3508
|
});
|
|
3509
3509
|
function uniq(array) {
|
|
3510
3510
|
return array && array.length ? baseUniq(array) : [];
|
|
@@ -3513,8 +3513,8 @@ var require_lodash = __commonJS({
|
|
|
3513
3513
|
return array && array.length ? baseUniq(array, getIteratee(iteratee2, 2)) : [];
|
|
3514
3514
|
}
|
|
3515
3515
|
function uniqWith(array, comparator) {
|
|
3516
|
-
comparator = typeof comparator == "function" ? comparator :
|
|
3517
|
-
return array && array.length ? baseUniq(array,
|
|
3516
|
+
comparator = typeof comparator == "function" ? comparator : undefined2;
|
|
3517
|
+
return array && array.length ? baseUniq(array, undefined2, comparator) : [];
|
|
3518
3518
|
}
|
|
3519
3519
|
function unzip(array) {
|
|
3520
3520
|
if (!(array && array.length)) {
|
|
@@ -3540,7 +3540,7 @@ var require_lodash = __commonJS({
|
|
|
3540
3540
|
return result2;
|
|
3541
3541
|
}
|
|
3542
3542
|
return arrayMap(result2, function(group) {
|
|
3543
|
-
return apply(iteratee2,
|
|
3543
|
+
return apply(iteratee2, undefined2, group);
|
|
3544
3544
|
});
|
|
3545
3545
|
}
|
|
3546
3546
|
var without = baseRest(function(array, values2) {
|
|
@@ -3552,14 +3552,14 @@ var require_lodash = __commonJS({
|
|
|
3552
3552
|
var xorBy = baseRest(function(arrays) {
|
|
3553
3553
|
var iteratee2 = last(arrays);
|
|
3554
3554
|
if (isArrayLikeObject(iteratee2)) {
|
|
3555
|
-
iteratee2 =
|
|
3555
|
+
iteratee2 = undefined2;
|
|
3556
3556
|
}
|
|
3557
3557
|
return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee2, 2));
|
|
3558
3558
|
});
|
|
3559
3559
|
var xorWith = baseRest(function(arrays) {
|
|
3560
3560
|
var comparator = last(arrays);
|
|
3561
|
-
comparator = typeof comparator == "function" ? comparator :
|
|
3562
|
-
return baseXor(arrayFilter(arrays, isArrayLikeObject),
|
|
3561
|
+
comparator = typeof comparator == "function" ? comparator : undefined2;
|
|
3562
|
+
return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined2, comparator);
|
|
3563
3563
|
});
|
|
3564
3564
|
var zip = baseRest(unzip);
|
|
3565
3565
|
function zipObject(props, values2) {
|
|
@@ -3569,8 +3569,8 @@ var require_lodash = __commonJS({
|
|
|
3569
3569
|
return baseZipObject(props || [], values2 || [], baseSet);
|
|
3570
3570
|
}
|
|
3571
3571
|
var zipWith = baseRest(function(arrays) {
|
|
3572
|
-
var length = arrays.length, iteratee2 = length > 1 ? arrays[length - 1] :
|
|
3573
|
-
iteratee2 = typeof iteratee2 == "function" ? (arrays.pop(), iteratee2) :
|
|
3572
|
+
var length = arrays.length, iteratee2 = length > 1 ? arrays[length - 1] : undefined2;
|
|
3573
|
+
iteratee2 = typeof iteratee2 == "function" ? (arrays.pop(), iteratee2) : undefined2;
|
|
3574
3574
|
return unzipWith(arrays, iteratee2);
|
|
3575
3575
|
});
|
|
3576
3576
|
function chain(value) {
|
|
@@ -3596,11 +3596,11 @@ var require_lodash = __commonJS({
|
|
|
3596
3596
|
value.__actions__.push({
|
|
3597
3597
|
"func": thru,
|
|
3598
3598
|
"args": [interceptor],
|
|
3599
|
-
"thisArg":
|
|
3599
|
+
"thisArg": undefined2
|
|
3600
3600
|
});
|
|
3601
3601
|
return new LodashWrapper(value, this.__chain__).thru(function(array) {
|
|
3602
3602
|
if (length && !array.length) {
|
|
3603
|
-
array.push(
|
|
3603
|
+
array.push(undefined2);
|
|
3604
3604
|
}
|
|
3605
3605
|
return array;
|
|
3606
3606
|
});
|
|
@@ -3612,10 +3612,10 @@ var require_lodash = __commonJS({
|
|
|
3612
3612
|
return new LodashWrapper(this.value(), this.__chain__);
|
|
3613
3613
|
}
|
|
3614
3614
|
function wrapperNext() {
|
|
3615
|
-
if (this.__values__ ===
|
|
3615
|
+
if (this.__values__ === undefined2) {
|
|
3616
3616
|
this.__values__ = toArray(this.value());
|
|
3617
3617
|
}
|
|
3618
|
-
var done = this.__index__ >= this.__values__.length, value = done ?
|
|
3618
|
+
var done = this.__index__ >= this.__values__.length, value = done ? undefined2 : this.__values__[this.__index__++];
|
|
3619
3619
|
return { "done": done, "value": value };
|
|
3620
3620
|
}
|
|
3621
3621
|
function wrapperToIterator() {
|
|
@@ -3626,7 +3626,7 @@ var require_lodash = __commonJS({
|
|
|
3626
3626
|
while (parent2 instanceof baseLodash) {
|
|
3627
3627
|
var clone2 = wrapperClone(parent2);
|
|
3628
3628
|
clone2.__index__ = 0;
|
|
3629
|
-
clone2.__values__ =
|
|
3629
|
+
clone2.__values__ = undefined2;
|
|
3630
3630
|
if (result2) {
|
|
3631
3631
|
previous.__wrapped__ = clone2;
|
|
3632
3632
|
} else {
|
|
@@ -3649,7 +3649,7 @@ var require_lodash = __commonJS({
|
|
|
3649
3649
|
wrapped.__actions__.push({
|
|
3650
3650
|
"func": thru,
|
|
3651
3651
|
"args": [reverse],
|
|
3652
|
-
"thisArg":
|
|
3652
|
+
"thisArg": undefined2
|
|
3653
3653
|
});
|
|
3654
3654
|
return new LodashWrapper(wrapped, this.__chain__);
|
|
3655
3655
|
}
|
|
@@ -3668,7 +3668,7 @@ var require_lodash = __commonJS({
|
|
|
3668
3668
|
function every(collection, predicate, guard) {
|
|
3669
3669
|
var func = isArray(collection) ? arrayEvery : baseEvery;
|
|
3670
3670
|
if (guard && isIterateeCall(collection, predicate, guard)) {
|
|
3671
|
-
predicate =
|
|
3671
|
+
predicate = undefined2;
|
|
3672
3672
|
}
|
|
3673
3673
|
return func(collection, getIteratee(predicate, 3));
|
|
3674
3674
|
}
|
|
@@ -3685,7 +3685,7 @@ var require_lodash = __commonJS({
|
|
|
3685
3685
|
return baseFlatten(map(collection, iteratee2), INFINITY);
|
|
3686
3686
|
}
|
|
3687
3687
|
function flatMapDepth(collection, iteratee2, depth) {
|
|
3688
|
-
depth = depth ===
|
|
3688
|
+
depth = depth === undefined2 ? 1 : toInteger(depth);
|
|
3689
3689
|
return baseFlatten(map(collection, iteratee2), depth);
|
|
3690
3690
|
}
|
|
3691
3691
|
function forEach(collection, iteratee2) {
|
|
@@ -3712,10 +3712,10 @@ var require_lodash = __commonJS({
|
|
|
3712
3712
|
}
|
|
3713
3713
|
return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
|
|
3714
3714
|
}
|
|
3715
|
-
var invokeMap = baseRest(function(collection,
|
|
3716
|
-
var index = -1, isFunc = typeof
|
|
3715
|
+
var invokeMap = baseRest(function(collection, path3, args) {
|
|
3716
|
+
var index = -1, isFunc = typeof path3 == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
|
|
3717
3717
|
baseEach(collection, function(value) {
|
|
3718
|
-
result2[++index] = isFunc ? apply(
|
|
3718
|
+
result2[++index] = isFunc ? apply(path3, value, args) : baseInvoke(value, path3, args);
|
|
3719
3719
|
});
|
|
3720
3720
|
return result2;
|
|
3721
3721
|
});
|
|
@@ -3733,7 +3733,7 @@ var require_lodash = __commonJS({
|
|
|
3733
3733
|
if (!isArray(iteratees)) {
|
|
3734
3734
|
iteratees = iteratees == null ? [] : [iteratees];
|
|
3735
3735
|
}
|
|
3736
|
-
orders = guard ?
|
|
3736
|
+
orders = guard ? undefined2 : orders;
|
|
3737
3737
|
if (!isArray(orders)) {
|
|
3738
3738
|
orders = orders == null ? [] : [orders];
|
|
3739
3739
|
}
|
|
@@ -3761,7 +3761,7 @@ var require_lodash = __commonJS({
|
|
|
3761
3761
|
return func(collection);
|
|
3762
3762
|
}
|
|
3763
3763
|
function sampleSize(collection, n, guard) {
|
|
3764
|
-
if (guard ? isIterateeCall(collection, n, guard) : n ===
|
|
3764
|
+
if (guard ? isIterateeCall(collection, n, guard) : n === undefined2) {
|
|
3765
3765
|
n = 1;
|
|
3766
3766
|
} else {
|
|
3767
3767
|
n = toInteger(n);
|
|
@@ -3789,7 +3789,7 @@ var require_lodash = __commonJS({
|
|
|
3789
3789
|
function some(collection, predicate, guard) {
|
|
3790
3790
|
var func = isArray(collection) ? arraySome : baseSome;
|
|
3791
3791
|
if (guard && isIterateeCall(collection, predicate, guard)) {
|
|
3792
|
-
predicate =
|
|
3792
|
+
predicate = undefined2;
|
|
3793
3793
|
}
|
|
3794
3794
|
return func(collection, getIteratee(predicate, 3));
|
|
3795
3795
|
}
|
|
@@ -3820,9 +3820,9 @@ var require_lodash = __commonJS({
|
|
|
3820
3820
|
};
|
|
3821
3821
|
}
|
|
3822
3822
|
function ary(func, n, guard) {
|
|
3823
|
-
n = guard ?
|
|
3823
|
+
n = guard ? undefined2 : n;
|
|
3824
3824
|
n = func && n == null ? func.length : n;
|
|
3825
|
-
return createWrap(func, WRAP_ARY_FLAG,
|
|
3825
|
+
return createWrap(func, WRAP_ARY_FLAG, undefined2, undefined2, undefined2, undefined2, n);
|
|
3826
3826
|
}
|
|
3827
3827
|
function before(n, func) {
|
|
3828
3828
|
var result2;
|
|
@@ -3835,7 +3835,7 @@ var require_lodash = __commonJS({
|
|
|
3835
3835
|
result2 = func.apply(this, arguments);
|
|
3836
3836
|
}
|
|
3837
3837
|
if (n <= 1) {
|
|
3838
|
-
func =
|
|
3838
|
+
func = undefined2;
|
|
3839
3839
|
}
|
|
3840
3840
|
return result2;
|
|
3841
3841
|
};
|
|
@@ -3857,14 +3857,14 @@ var require_lodash = __commonJS({
|
|
|
3857
3857
|
return createWrap(key, bitmask, object, partials, holders);
|
|
3858
3858
|
});
|
|
3859
3859
|
function curry(func, arity, guard) {
|
|
3860
|
-
arity = guard ?
|
|
3861
|
-
var result2 = createWrap(func, WRAP_CURRY_FLAG,
|
|
3860
|
+
arity = guard ? undefined2 : arity;
|
|
3861
|
+
var result2 = createWrap(func, WRAP_CURRY_FLAG, undefined2, undefined2, undefined2, undefined2, undefined2, arity);
|
|
3862
3862
|
result2.placeholder = curry.placeholder;
|
|
3863
3863
|
return result2;
|
|
3864
3864
|
}
|
|
3865
3865
|
function curryRight(func, arity, guard) {
|
|
3866
|
-
arity = guard ?
|
|
3867
|
-
var result2 = createWrap(func, WRAP_CURRY_RIGHT_FLAG,
|
|
3866
|
+
arity = guard ? undefined2 : arity;
|
|
3867
|
+
var result2 = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined2, undefined2, undefined2, undefined2, undefined2, arity);
|
|
3868
3868
|
result2.placeholder = curryRight.placeholder;
|
|
3869
3869
|
return result2;
|
|
3870
3870
|
}
|
|
@@ -3882,7 +3882,7 @@ var require_lodash = __commonJS({
|
|
|
3882
3882
|
}
|
|
3883
3883
|
function invokeFunc(time) {
|
|
3884
3884
|
var args = lastArgs, thisArg = lastThis;
|
|
3885
|
-
lastArgs = lastThis =
|
|
3885
|
+
lastArgs = lastThis = undefined2;
|
|
3886
3886
|
lastInvokeTime = time;
|
|
3887
3887
|
result2 = func.apply(thisArg, args);
|
|
3888
3888
|
return result2;
|
|
@@ -3898,7 +3898,7 @@ var require_lodash = __commonJS({
|
|
|
3898
3898
|
}
|
|
3899
3899
|
function shouldInvoke(time) {
|
|
3900
3900
|
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
|
|
3901
|
-
return lastCallTime ===
|
|
3901
|
+
return lastCallTime === undefined2 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|
3902
3902
|
}
|
|
3903
3903
|
function timerExpired() {
|
|
3904
3904
|
var time = now();
|
|
@@ -3908,22 +3908,22 @@ var require_lodash = __commonJS({
|
|
|
3908
3908
|
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
3909
3909
|
}
|
|
3910
3910
|
function trailingEdge(time) {
|
|
3911
|
-
timerId =
|
|
3911
|
+
timerId = undefined2;
|
|
3912
3912
|
if (trailing && lastArgs) {
|
|
3913
3913
|
return invokeFunc(time);
|
|
3914
3914
|
}
|
|
3915
|
-
lastArgs = lastThis =
|
|
3915
|
+
lastArgs = lastThis = undefined2;
|
|
3916
3916
|
return result2;
|
|
3917
3917
|
}
|
|
3918
3918
|
function cancel() {
|
|
3919
|
-
if (timerId !==
|
|
3919
|
+
if (timerId !== undefined2) {
|
|
3920
3920
|
clearTimeout(timerId);
|
|
3921
3921
|
}
|
|
3922
3922
|
lastInvokeTime = 0;
|
|
3923
|
-
lastArgs = lastCallTime = lastThis = timerId =
|
|
3923
|
+
lastArgs = lastCallTime = lastThis = timerId = undefined2;
|
|
3924
3924
|
}
|
|
3925
3925
|
function flush() {
|
|
3926
|
-
return timerId ===
|
|
3926
|
+
return timerId === undefined2 ? result2 : trailingEdge(now());
|
|
3927
3927
|
}
|
|
3928
3928
|
function debounced() {
|
|
3929
3929
|
var time = now(), isInvoking = shouldInvoke(time);
|
|
@@ -3931,7 +3931,7 @@ var require_lodash = __commonJS({
|
|
|
3931
3931
|
lastThis = this;
|
|
3932
3932
|
lastCallTime = time;
|
|
3933
3933
|
if (isInvoking) {
|
|
3934
|
-
if (timerId ===
|
|
3934
|
+
if (timerId === undefined2) {
|
|
3935
3935
|
return leadingEdge(lastCallTime);
|
|
3936
3936
|
}
|
|
3937
3937
|
if (maxing) {
|
|
@@ -3940,7 +3940,7 @@ var require_lodash = __commonJS({
|
|
|
3940
3940
|
return invokeFunc(lastCallTime);
|
|
3941
3941
|
}
|
|
3942
3942
|
}
|
|
3943
|
-
if (timerId ===
|
|
3943
|
+
if (timerId === undefined2) {
|
|
3944
3944
|
timerId = setTimeout(timerExpired, wait);
|
|
3945
3945
|
}
|
|
3946
3946
|
return result2;
|
|
@@ -4010,20 +4010,20 @@ var require_lodash = __commonJS({
|
|
|
4010
4010
|
});
|
|
4011
4011
|
var partial = baseRest(function(func, partials) {
|
|
4012
4012
|
var holders = replaceHolders(partials, getHolder(partial));
|
|
4013
|
-
return createWrap(func, WRAP_PARTIAL_FLAG,
|
|
4013
|
+
return createWrap(func, WRAP_PARTIAL_FLAG, undefined2, partials, holders);
|
|
4014
4014
|
});
|
|
4015
4015
|
var partialRight = baseRest(function(func, partials) {
|
|
4016
4016
|
var holders = replaceHolders(partials, getHolder(partialRight));
|
|
4017
|
-
return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG,
|
|
4017
|
+
return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined2, partials, holders);
|
|
4018
4018
|
});
|
|
4019
4019
|
var rearg = flatRest(function(func, indexes) {
|
|
4020
|
-
return createWrap(func, WRAP_REARG_FLAG,
|
|
4020
|
+
return createWrap(func, WRAP_REARG_FLAG, undefined2, undefined2, undefined2, indexes);
|
|
4021
4021
|
});
|
|
4022
4022
|
function rest(func, start) {
|
|
4023
4023
|
if (typeof func != "function") {
|
|
4024
4024
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
4025
4025
|
}
|
|
4026
|
-
start = start ===
|
|
4026
|
+
start = start === undefined2 ? start : toInteger(start);
|
|
4027
4027
|
return baseRest(func, start);
|
|
4028
4028
|
}
|
|
4029
4029
|
function spread(func, start) {
|
|
@@ -4071,14 +4071,14 @@ var require_lodash = __commonJS({
|
|
|
4071
4071
|
return baseClone(value, CLONE_SYMBOLS_FLAG);
|
|
4072
4072
|
}
|
|
4073
4073
|
function cloneWith(value, customizer) {
|
|
4074
|
-
customizer = typeof customizer == "function" ? customizer :
|
|
4074
|
+
customizer = typeof customizer == "function" ? customizer : undefined2;
|
|
4075
4075
|
return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
|
|
4076
4076
|
}
|
|
4077
4077
|
function cloneDeep(value) {
|
|
4078
4078
|
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
|
|
4079
4079
|
}
|
|
4080
4080
|
function cloneDeepWith(value, customizer) {
|
|
4081
|
-
customizer = typeof customizer == "function" ? customizer :
|
|
4081
|
+
customizer = typeof customizer == "function" ? customizer : undefined2;
|
|
4082
4082
|
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
|
|
4083
4083
|
}
|
|
4084
4084
|
function conformsTo(object, source) {
|
|
@@ -4137,9 +4137,9 @@ var require_lodash = __commonJS({
|
|
|
4137
4137
|
return baseIsEqual(value, other);
|
|
4138
4138
|
}
|
|
4139
4139
|
function isEqualWith(value, other, customizer) {
|
|
4140
|
-
customizer = typeof customizer == "function" ? customizer :
|
|
4141
|
-
var result2 = customizer ? customizer(value, other) :
|
|
4142
|
-
return result2 ===
|
|
4140
|
+
customizer = typeof customizer == "function" ? customizer : undefined2;
|
|
4141
|
+
var result2 = customizer ? customizer(value, other) : undefined2;
|
|
4142
|
+
return result2 === undefined2 ? baseIsEqual(value, other, undefined2, customizer) : !!result2;
|
|
4143
4143
|
}
|
|
4144
4144
|
function isError(value) {
|
|
4145
4145
|
if (!isObjectLike(value)) {
|
|
@@ -4176,7 +4176,7 @@ var require_lodash = __commonJS({
|
|
|
4176
4176
|
return object === source || baseIsMatch(object, source, getMatchData(source));
|
|
4177
4177
|
}
|
|
4178
4178
|
function isMatchWith(object, source, customizer) {
|
|
4179
|
-
customizer = typeof customizer == "function" ? customizer :
|
|
4179
|
+
customizer = typeof customizer == "function" ? customizer : undefined2;
|
|
4180
4180
|
return baseIsMatch(object, source, getMatchData(source), customizer);
|
|
4181
4181
|
}
|
|
4182
4182
|
function isNaN(value) {
|
|
@@ -4221,7 +4221,7 @@ var require_lodash = __commonJS({
|
|
|
4221
4221
|
}
|
|
4222
4222
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
4223
4223
|
function isUndefined(value) {
|
|
4224
|
-
return value ===
|
|
4224
|
+
return value === undefined2;
|
|
4225
4225
|
}
|
|
4226
4226
|
function isWeakMap(value) {
|
|
4227
4227
|
return isObjectLike(value) && getTag(value) == weakMapTag;
|
|
@@ -4320,7 +4320,7 @@ var require_lodash = __commonJS({
|
|
|
4320
4320
|
object = Object2(object);
|
|
4321
4321
|
var index = -1;
|
|
4322
4322
|
var length = sources.length;
|
|
4323
|
-
var guard = length > 2 ? sources[2] :
|
|
4323
|
+
var guard = length > 2 ? sources[2] : undefined2;
|
|
4324
4324
|
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
|
4325
4325
|
length = 1;
|
|
4326
4326
|
}
|
|
@@ -4332,7 +4332,7 @@ var require_lodash = __commonJS({
|
|
|
4332
4332
|
while (++propsIndex < propsLength) {
|
|
4333
4333
|
var key = props[propsIndex];
|
|
4334
4334
|
var value = object[key];
|
|
4335
|
-
if (value ===
|
|
4335
|
+
if (value === undefined2 || eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) {
|
|
4336
4336
|
object[key] = source[key];
|
|
4337
4337
|
}
|
|
4338
4338
|
}
|
|
@@ -4340,8 +4340,8 @@ var require_lodash = __commonJS({
|
|
|
4340
4340
|
return object;
|
|
4341
4341
|
});
|
|
4342
4342
|
var defaultsDeep = baseRest(function(args) {
|
|
4343
|
-
args.push(
|
|
4344
|
-
return apply(mergeWith,
|
|
4343
|
+
args.push(undefined2, customDefaultsMerge);
|
|
4344
|
+
return apply(mergeWith, undefined2, args);
|
|
4345
4345
|
});
|
|
4346
4346
|
function findKey(object, predicate) {
|
|
4347
4347
|
return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
|
|
@@ -4367,15 +4367,15 @@ var require_lodash = __commonJS({
|
|
|
4367
4367
|
function functionsIn(object) {
|
|
4368
4368
|
return object == null ? [] : baseFunctions(object, keysIn(object));
|
|
4369
4369
|
}
|
|
4370
|
-
function get(object,
|
|
4371
|
-
var result2 = object == null ?
|
|
4372
|
-
return result2 ===
|
|
4370
|
+
function get(object, path3, defaultValue) {
|
|
4371
|
+
var result2 = object == null ? undefined2 : baseGet(object, path3);
|
|
4372
|
+
return result2 === undefined2 ? defaultValue : result2;
|
|
4373
4373
|
}
|
|
4374
|
-
function has(object,
|
|
4375
|
-
return object != null && hasPath(object,
|
|
4374
|
+
function has(object, path3) {
|
|
4375
|
+
return object != null && hasPath(object, path3, baseHas);
|
|
4376
4376
|
}
|
|
4377
|
-
function hasIn(object,
|
|
4378
|
-
return object != null && hasPath(object,
|
|
4377
|
+
function hasIn(object, path3) {
|
|
4378
|
+
return object != null && hasPath(object, path3, baseHasIn);
|
|
4379
4379
|
}
|
|
4380
4380
|
var invert = createInverter(function(result2, value, key) {
|
|
4381
4381
|
if (value != null && typeof value.toString != "function") {
|
|
@@ -4428,10 +4428,10 @@ var require_lodash = __commonJS({
|
|
|
4428
4428
|
return result2;
|
|
4429
4429
|
}
|
|
4430
4430
|
var isDeep = false;
|
|
4431
|
-
paths = arrayMap(paths, function(
|
|
4432
|
-
|
|
4433
|
-
isDeep || (isDeep =
|
|
4434
|
-
return
|
|
4431
|
+
paths = arrayMap(paths, function(path3) {
|
|
4432
|
+
path3 = castPath(path3, object);
|
|
4433
|
+
isDeep || (isDeep = path3.length > 1);
|
|
4434
|
+
return path3;
|
|
4435
4435
|
});
|
|
4436
4436
|
copyObject(object, getAllKeysIn(object), result2);
|
|
4437
4437
|
if (isDeep) {
|
|
@@ -4457,20 +4457,20 @@ var require_lodash = __commonJS({
|
|
|
4457
4457
|
return [prop];
|
|
4458
4458
|
});
|
|
4459
4459
|
predicate = getIteratee(predicate);
|
|
4460
|
-
return basePickBy(object, props, function(value,
|
|
4461
|
-
return predicate(value,
|
|
4460
|
+
return basePickBy(object, props, function(value, path3) {
|
|
4461
|
+
return predicate(value, path3[0]);
|
|
4462
4462
|
});
|
|
4463
4463
|
}
|
|
4464
|
-
function result(object,
|
|
4465
|
-
|
|
4466
|
-
var index = -1, length =
|
|
4464
|
+
function result(object, path3, defaultValue) {
|
|
4465
|
+
path3 = castPath(path3, object);
|
|
4466
|
+
var index = -1, length = path3.length;
|
|
4467
4467
|
if (!length) {
|
|
4468
4468
|
length = 1;
|
|
4469
|
-
object =
|
|
4469
|
+
object = undefined2;
|
|
4470
4470
|
}
|
|
4471
4471
|
while (++index < length) {
|
|
4472
|
-
var value = object == null ?
|
|
4473
|
-
if (value ===
|
|
4472
|
+
var value = object == null ? undefined2 : object[toKey(path3[index])];
|
|
4473
|
+
if (value === undefined2) {
|
|
4474
4474
|
index = length;
|
|
4475
4475
|
value = defaultValue;
|
|
4476
4476
|
}
|
|
@@ -4478,12 +4478,12 @@ var require_lodash = __commonJS({
|
|
|
4478
4478
|
}
|
|
4479
4479
|
return object;
|
|
4480
4480
|
}
|
|
4481
|
-
function set(object,
|
|
4482
|
-
return object == null ? object : baseSet(object,
|
|
4481
|
+
function set(object, path3, value) {
|
|
4482
|
+
return object == null ? object : baseSet(object, path3, value);
|
|
4483
4483
|
}
|
|
4484
|
-
function setWith(object,
|
|
4485
|
-
customizer = typeof customizer == "function" ? customizer :
|
|
4486
|
-
return object == null ? object : baseSet(object,
|
|
4484
|
+
function setWith(object, path3, value, customizer) {
|
|
4485
|
+
customizer = typeof customizer == "function" ? customizer : undefined2;
|
|
4486
|
+
return object == null ? object : baseSet(object, path3, value, customizer);
|
|
4487
4487
|
}
|
|
4488
4488
|
var toPairs = createToPairs(keys);
|
|
4489
4489
|
var toPairsIn = createToPairs(keysIn);
|
|
@@ -4505,15 +4505,15 @@ var require_lodash = __commonJS({
|
|
|
4505
4505
|
});
|
|
4506
4506
|
return accumulator;
|
|
4507
4507
|
}
|
|
4508
|
-
function unset(object,
|
|
4509
|
-
return object == null ? true : baseUnset(object,
|
|
4508
|
+
function unset(object, path3) {
|
|
4509
|
+
return object == null ? true : baseUnset(object, path3);
|
|
4510
4510
|
}
|
|
4511
|
-
function update(object,
|
|
4512
|
-
return object == null ? object : baseUpdate(object,
|
|
4511
|
+
function update(object, path3, updater) {
|
|
4512
|
+
return object == null ? object : baseUpdate(object, path3, castFunction(updater));
|
|
4513
4513
|
}
|
|
4514
|
-
function updateWith(object,
|
|
4515
|
-
customizer = typeof customizer == "function" ? customizer :
|
|
4516
|
-
return object == null ? object : baseUpdate(object,
|
|
4514
|
+
function updateWith(object, path3, updater, customizer) {
|
|
4515
|
+
customizer = typeof customizer == "function" ? customizer : undefined2;
|
|
4516
|
+
return object == null ? object : baseUpdate(object, path3, castFunction(updater), customizer);
|
|
4517
4517
|
}
|
|
4518
4518
|
function values(object) {
|
|
4519
4519
|
return object == null ? [] : baseValues(object, keys(object));
|
|
@@ -4522,15 +4522,15 @@ var require_lodash = __commonJS({
|
|
|
4522
4522
|
return object == null ? [] : baseValues(object, keysIn(object));
|
|
4523
4523
|
}
|
|
4524
4524
|
function clamp(number, lower, upper) {
|
|
4525
|
-
if (upper ===
|
|
4525
|
+
if (upper === undefined2) {
|
|
4526
4526
|
upper = lower;
|
|
4527
|
-
lower =
|
|
4527
|
+
lower = undefined2;
|
|
4528
4528
|
}
|
|
4529
|
-
if (upper !==
|
|
4529
|
+
if (upper !== undefined2) {
|
|
4530
4530
|
upper = toNumber(upper);
|
|
4531
4531
|
upper = upper === upper ? upper : 0;
|
|
4532
4532
|
}
|
|
4533
|
-
if (lower !==
|
|
4533
|
+
if (lower !== undefined2) {
|
|
4534
4534
|
lower = toNumber(lower);
|
|
4535
4535
|
lower = lower === lower ? lower : 0;
|
|
4536
4536
|
}
|
|
@@ -4538,7 +4538,7 @@ var require_lodash = __commonJS({
|
|
|
4538
4538
|
}
|
|
4539
4539
|
function inRange(number, start, end) {
|
|
4540
4540
|
start = toFinite(start);
|
|
4541
|
-
if (end ===
|
|
4541
|
+
if (end === undefined2) {
|
|
4542
4542
|
end = start;
|
|
4543
4543
|
start = 0;
|
|
4544
4544
|
} else {
|
|
@@ -4549,23 +4549,23 @@ var require_lodash = __commonJS({
|
|
|
4549
4549
|
}
|
|
4550
4550
|
function random(lower, upper, floating) {
|
|
4551
4551
|
if (floating && typeof floating != "boolean" && isIterateeCall(lower, upper, floating)) {
|
|
4552
|
-
upper = floating =
|
|
4552
|
+
upper = floating = undefined2;
|
|
4553
4553
|
}
|
|
4554
|
-
if (floating ===
|
|
4554
|
+
if (floating === undefined2) {
|
|
4555
4555
|
if (typeof upper == "boolean") {
|
|
4556
4556
|
floating = upper;
|
|
4557
|
-
upper =
|
|
4557
|
+
upper = undefined2;
|
|
4558
4558
|
} else if (typeof lower == "boolean") {
|
|
4559
4559
|
floating = lower;
|
|
4560
|
-
lower =
|
|
4560
|
+
lower = undefined2;
|
|
4561
4561
|
}
|
|
4562
4562
|
}
|
|
4563
|
-
if (lower ===
|
|
4563
|
+
if (lower === undefined2 && upper === undefined2) {
|
|
4564
4564
|
lower = 0;
|
|
4565
4565
|
upper = 1;
|
|
4566
4566
|
} else {
|
|
4567
4567
|
lower = toFinite(lower);
|
|
4568
|
-
if (upper ===
|
|
4568
|
+
if (upper === undefined2) {
|
|
4569
4569
|
upper = lower;
|
|
4570
4570
|
lower = 0;
|
|
4571
4571
|
} else {
|
|
@@ -4598,7 +4598,7 @@ var require_lodash = __commonJS({
|
|
|
4598
4598
|
string = toString(string);
|
|
4599
4599
|
target = baseToString(target);
|
|
4600
4600
|
var length = string.length;
|
|
4601
|
-
position = position ===
|
|
4601
|
+
position = position === undefined2 ? length : baseClamp(toInteger(position), 0, length);
|
|
4602
4602
|
var end = position;
|
|
4603
4603
|
position -= target.length;
|
|
4604
4604
|
return position >= 0 && string.slice(position, end) == target;
|
|
@@ -4649,7 +4649,7 @@ var require_lodash = __commonJS({
|
|
|
4649
4649
|
return nativeParseInt(toString(string).replace(reTrimStart, ""), radix || 0);
|
|
4650
4650
|
}
|
|
4651
4651
|
function repeat(string, n, guard) {
|
|
4652
|
-
if (guard ? isIterateeCall(string, n, guard) : n ===
|
|
4652
|
+
if (guard ? isIterateeCall(string, n, guard) : n === undefined2) {
|
|
4653
4653
|
n = 1;
|
|
4654
4654
|
} else {
|
|
4655
4655
|
n = toInteger(n);
|
|
@@ -4665,9 +4665,9 @@ var require_lodash = __commonJS({
|
|
|
4665
4665
|
});
|
|
4666
4666
|
function split(string, separator, limit) {
|
|
4667
4667
|
if (limit && typeof limit != "number" && isIterateeCall(string, separator, limit)) {
|
|
4668
|
-
separator = limit =
|
|
4668
|
+
separator = limit = undefined2;
|
|
4669
4669
|
}
|
|
4670
|
-
limit = limit ===
|
|
4670
|
+
limit = limit === undefined2 ? MAX_ARRAY_LENGTH : limit >>> 0;
|
|
4671
4671
|
if (!limit) {
|
|
4672
4672
|
return [];
|
|
4673
4673
|
}
|
|
@@ -4692,7 +4692,7 @@ var require_lodash = __commonJS({
|
|
|
4692
4692
|
function template(string, options, guard) {
|
|
4693
4693
|
var settings = lodash.templateSettings;
|
|
4694
4694
|
if (guard && isIterateeCall(string, options, guard)) {
|
|
4695
|
-
options =
|
|
4695
|
+
options = undefined2;
|
|
4696
4696
|
}
|
|
4697
4697
|
string = toString(string);
|
|
4698
4698
|
options = assignInWith({}, options, settings, customDefaultsAssignIn);
|
|
@@ -4730,7 +4730,7 @@ var require_lodash = __commonJS({
|
|
|
4730
4730
|
source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;");
|
|
4731
4731
|
source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}";
|
|
4732
4732
|
var result2 = attempt(function() {
|
|
4733
|
-
return Function2(importsKeys, sourceURL + "return " + source).apply(
|
|
4733
|
+
return Function2(importsKeys, sourceURL + "return " + source).apply(undefined2, importsValues);
|
|
4734
4734
|
});
|
|
4735
4735
|
result2.source = source;
|
|
4736
4736
|
if (isError(result2)) {
|
|
@@ -4746,7 +4746,7 @@ var require_lodash = __commonJS({
|
|
|
4746
4746
|
}
|
|
4747
4747
|
function trim(string, chars, guard) {
|
|
4748
4748
|
string = toString(string);
|
|
4749
|
-
if (string && (guard || chars ===
|
|
4749
|
+
if (string && (guard || chars === undefined2)) {
|
|
4750
4750
|
return baseTrim(string);
|
|
4751
4751
|
}
|
|
4752
4752
|
if (!string || !(chars = baseToString(chars))) {
|
|
@@ -4757,7 +4757,7 @@ var require_lodash = __commonJS({
|
|
|
4757
4757
|
}
|
|
4758
4758
|
function trimEnd(string, chars, guard) {
|
|
4759
4759
|
string = toString(string);
|
|
4760
|
-
if (string && (guard || chars ===
|
|
4760
|
+
if (string && (guard || chars === undefined2)) {
|
|
4761
4761
|
return string.slice(0, trimmedEndIndex(string) + 1);
|
|
4762
4762
|
}
|
|
4763
4763
|
if (!string || !(chars = baseToString(chars))) {
|
|
@@ -4768,7 +4768,7 @@ var require_lodash = __commonJS({
|
|
|
4768
4768
|
}
|
|
4769
4769
|
function trimStart(string, chars, guard) {
|
|
4770
4770
|
string = toString(string);
|
|
4771
|
-
if (string && (guard || chars ===
|
|
4771
|
+
if (string && (guard || chars === undefined2)) {
|
|
4772
4772
|
return string.replace(reTrimStart, "");
|
|
4773
4773
|
}
|
|
4774
4774
|
if (!string || !(chars = baseToString(chars))) {
|
|
@@ -4798,7 +4798,7 @@ var require_lodash = __commonJS({
|
|
|
4798
4798
|
return omission;
|
|
4799
4799
|
}
|
|
4800
4800
|
var result2 = strSymbols ? castSlice(strSymbols, 0, end).join("") : string.slice(0, end);
|
|
4801
|
-
if (separator ===
|
|
4801
|
+
if (separator === undefined2) {
|
|
4802
4802
|
return result2 + omission;
|
|
4803
4803
|
}
|
|
4804
4804
|
if (strSymbols) {
|
|
@@ -4814,7 +4814,7 @@ var require_lodash = __commonJS({
|
|
|
4814
4814
|
while (match = separator.exec(substring)) {
|
|
4815
4815
|
var newEnd = match.index;
|
|
4816
4816
|
}
|
|
4817
|
-
result2 = result2.slice(0, newEnd ===
|
|
4817
|
+
result2 = result2.slice(0, newEnd === undefined2 ? end : newEnd);
|
|
4818
4818
|
}
|
|
4819
4819
|
} else if (string.indexOf(baseToString(separator), end) != end) {
|
|
4820
4820
|
var index = result2.lastIndexOf(separator);
|
|
@@ -4834,15 +4834,15 @@ var require_lodash = __commonJS({
|
|
|
4834
4834
|
var upperFirst = createCaseFirst("toUpperCase");
|
|
4835
4835
|
function words(string, pattern, guard) {
|
|
4836
4836
|
string = toString(string);
|
|
4837
|
-
pattern = guard ?
|
|
4838
|
-
if (pattern ===
|
|
4837
|
+
pattern = guard ? undefined2 : pattern;
|
|
4838
|
+
if (pattern === undefined2) {
|
|
4839
4839
|
return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
|
|
4840
4840
|
}
|
|
4841
4841
|
return string.match(pattern) || [];
|
|
4842
4842
|
}
|
|
4843
4843
|
var attempt = baseRest(function(func, args) {
|
|
4844
4844
|
try {
|
|
4845
|
-
return apply(func,
|
|
4845
|
+
return apply(func, undefined2, args);
|
|
4846
4846
|
} catch (e) {
|
|
4847
4847
|
return isError(e) ? e : new Error2(e);
|
|
4848
4848
|
}
|
|
@@ -4894,17 +4894,17 @@ var require_lodash = __commonJS({
|
|
|
4894
4894
|
function matches(source) {
|
|
4895
4895
|
return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
|
|
4896
4896
|
}
|
|
4897
|
-
function matchesProperty(
|
|
4898
|
-
return baseMatchesProperty(
|
|
4897
|
+
function matchesProperty(path3, srcValue) {
|
|
4898
|
+
return baseMatchesProperty(path3, baseClone(srcValue, CLONE_DEEP_FLAG));
|
|
4899
4899
|
}
|
|
4900
|
-
var method = baseRest(function(
|
|
4900
|
+
var method = baseRest(function(path3, args) {
|
|
4901
4901
|
return function(object) {
|
|
4902
|
-
return baseInvoke(object,
|
|
4902
|
+
return baseInvoke(object, path3, args);
|
|
4903
4903
|
};
|
|
4904
4904
|
});
|
|
4905
4905
|
var methodOf = baseRest(function(object, args) {
|
|
4906
|
-
return function(
|
|
4907
|
-
return baseInvoke(object,
|
|
4906
|
+
return function(path3) {
|
|
4907
|
+
return baseInvoke(object, path3, args);
|
|
4908
4908
|
};
|
|
4909
4909
|
});
|
|
4910
4910
|
function mixin(object, source, options) {
|
|
@@ -4951,12 +4951,12 @@ var require_lodash = __commonJS({
|
|
|
4951
4951
|
var over = createOver(arrayMap);
|
|
4952
4952
|
var overEvery = createOver(arrayEvery);
|
|
4953
4953
|
var overSome = createOver(arraySome);
|
|
4954
|
-
function property(
|
|
4955
|
-
return isKey(
|
|
4954
|
+
function property(path3) {
|
|
4955
|
+
return isKey(path3) ? baseProperty(toKey(path3)) : basePropertyDeep(path3);
|
|
4956
4956
|
}
|
|
4957
4957
|
function propertyOf(object) {
|
|
4958
|
-
return function(
|
|
4959
|
-
return object == null ?
|
|
4958
|
+
return function(path3) {
|
|
4959
|
+
return object == null ? undefined2 : baseGet(object, path3);
|
|
4960
4960
|
};
|
|
4961
4961
|
}
|
|
4962
4962
|
var range = createRange();
|
|
@@ -5009,10 +5009,10 @@ var require_lodash = __commonJS({
|
|
|
5009
5009
|
}, 1);
|
|
5010
5010
|
var floor = createRound("floor");
|
|
5011
5011
|
function max(array) {
|
|
5012
|
-
return array && array.length ? baseExtremum(array, identity, baseGt) :
|
|
5012
|
+
return array && array.length ? baseExtremum(array, identity, baseGt) : undefined2;
|
|
5013
5013
|
}
|
|
5014
5014
|
function maxBy(array, iteratee2) {
|
|
5015
|
-
return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseGt) :
|
|
5015
|
+
return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseGt) : undefined2;
|
|
5016
5016
|
}
|
|
5017
5017
|
function mean(array) {
|
|
5018
5018
|
return baseMean(array, identity);
|
|
@@ -5021,10 +5021,10 @@ var require_lodash = __commonJS({
|
|
|
5021
5021
|
return baseMean(array, getIteratee(iteratee2, 2));
|
|
5022
5022
|
}
|
|
5023
5023
|
function min(array) {
|
|
5024
|
-
return array && array.length ? baseExtremum(array, identity, baseLt) :
|
|
5024
|
+
return array && array.length ? baseExtremum(array, identity, baseLt) : undefined2;
|
|
5025
5025
|
}
|
|
5026
5026
|
function minBy(array, iteratee2) {
|
|
5027
|
-
return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseLt) :
|
|
5027
|
+
return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseLt) : undefined2;
|
|
5028
5028
|
}
|
|
5029
5029
|
var multiply = createMathOperation(function(multiplier, multiplicand) {
|
|
5030
5030
|
return multiplier * multiplicand;
|
|
@@ -5360,7 +5360,7 @@ var require_lodash = __commonJS({
|
|
|
5360
5360
|
});
|
|
5361
5361
|
arrayEach(["drop", "take"], function(methodName, index) {
|
|
5362
5362
|
LazyWrapper.prototype[methodName] = function(n) {
|
|
5363
|
-
n = n ===
|
|
5363
|
+
n = n === undefined2 ? 1 : nativeMax(toInteger(n), 0);
|
|
5364
5364
|
var result2 = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone();
|
|
5365
5365
|
if (result2.__filtered__) {
|
|
5366
5366
|
result2.__takeCount__ = nativeMin(n, result2.__takeCount__);
|
|
@@ -5409,12 +5409,12 @@ var require_lodash = __commonJS({
|
|
|
5409
5409
|
LazyWrapper.prototype.findLast = function(predicate) {
|
|
5410
5410
|
return this.reverse().find(predicate);
|
|
5411
5411
|
};
|
|
5412
|
-
LazyWrapper.prototype.invokeMap = baseRest(function(
|
|
5413
|
-
if (typeof
|
|
5412
|
+
LazyWrapper.prototype.invokeMap = baseRest(function(path3, args) {
|
|
5413
|
+
if (typeof path3 == "function") {
|
|
5414
5414
|
return new LazyWrapper(this);
|
|
5415
5415
|
}
|
|
5416
5416
|
return this.map(function(value) {
|
|
5417
|
-
return baseInvoke(value,
|
|
5417
|
+
return baseInvoke(value, path3, args);
|
|
5418
5418
|
});
|
|
5419
5419
|
});
|
|
5420
5420
|
LazyWrapper.prototype.reject = function(predicate) {
|
|
@@ -5431,7 +5431,7 @@ var require_lodash = __commonJS({
|
|
|
5431
5431
|
} else if (start) {
|
|
5432
5432
|
result2 = result2.drop(start);
|
|
5433
5433
|
}
|
|
5434
|
-
if (end !==
|
|
5434
|
+
if (end !== undefined2) {
|
|
5435
5435
|
end = toInteger(end);
|
|
5436
5436
|
result2 = end < 0 ? result2.dropRight(-end) : result2.take(end - start);
|
|
5437
5437
|
}
|
|
@@ -5461,7 +5461,7 @@ var require_lodash = __commonJS({
|
|
|
5461
5461
|
if (!retUnwrapped && useLazy) {
|
|
5462
5462
|
value = onlyLazy ? value : new LazyWrapper(this);
|
|
5463
5463
|
var result2 = func.apply(value, args);
|
|
5464
|
-
result2.__actions__.push({ "func": thru, "args": [interceptor], "thisArg":
|
|
5464
|
+
result2.__actions__.push({ "func": thru, "args": [interceptor], "thisArg": undefined2 });
|
|
5465
5465
|
return new LodashWrapper(result2, chainAll);
|
|
5466
5466
|
}
|
|
5467
5467
|
if (isUnwrapped && onlyLazy) {
|
|
@@ -5494,9 +5494,9 @@ var require_lodash = __commonJS({
|
|
|
5494
5494
|
realNames[key].push({ "name": methodName, "func": lodashFunc });
|
|
5495
5495
|
}
|
|
5496
5496
|
});
|
|
5497
|
-
realNames[createHybrid(
|
|
5497
|
+
realNames[createHybrid(undefined2, WRAP_BIND_KEY_FLAG).name] = [{
|
|
5498
5498
|
"name": "wrapper",
|
|
5499
|
-
"func":
|
|
5499
|
+
"func": undefined2
|
|
5500
5500
|
}];
|
|
5501
5501
|
LazyWrapper.prototype.clone = lazyClone;
|
|
5502
5502
|
LazyWrapper.prototype.reverse = lazyReverse;
|
|
@@ -5534,7 +5534,8 @@ var require_lodash = __commonJS({
|
|
|
5534
5534
|
var index_exports = {};
|
|
5535
5535
|
__export(index_exports, {
|
|
5536
5536
|
globImportPlugin: () => globImportPlugin,
|
|
5537
|
-
packageBuild: () => packageBuild
|
|
5537
|
+
packageBuild: () => packageBuild,
|
|
5538
|
+
stylesheetPlugin: () => stylesheetPlugin
|
|
5538
5539
|
});
|
|
5539
5540
|
module.exports = __toCommonJS(index_exports);
|
|
5540
5541
|
|
|
@@ -5547,24 +5548,24 @@ var globImportPlugin = () => ({
|
|
|
5547
5548
|
setup: (build2) => {
|
|
5548
5549
|
const uniquenessCache = /* @__PURE__ */ new Map();
|
|
5549
5550
|
build2.onResolve({ filter: /\*/ }, async (args) => {
|
|
5550
|
-
const { resolveDir, path:
|
|
5551
|
+
const { resolveDir, path: path3 } = args;
|
|
5551
5552
|
if (resolveDir === "") {
|
|
5552
5553
|
return;
|
|
5553
5554
|
}
|
|
5554
|
-
const cacheKey = (0, import_node_path.resolve)(resolveDir,
|
|
5555
|
+
const cacheKey = (0, import_node_path.resolve)(resolveDir, path3);
|
|
5555
5556
|
const uniqueId = getOrInsertWith(uniquenessCache, cacheKey, getRandomUniqueId);
|
|
5556
5557
|
return {
|
|
5557
|
-
path: `${
|
|
5558
|
+
path: `${path3}/proof-of-uniqueness/${uniqueId}`,
|
|
5558
5559
|
namespace: "import-glob",
|
|
5559
5560
|
pluginData: { resolveDir }
|
|
5560
5561
|
};
|
|
5561
5562
|
});
|
|
5562
5563
|
build2.onLoad({ filter: /.*/, namespace: "import-glob" }, async (args) => {
|
|
5563
5564
|
const {
|
|
5564
|
-
path:
|
|
5565
|
+
path: path3,
|
|
5565
5566
|
pluginData: { resolveDir }
|
|
5566
5567
|
} = args;
|
|
5567
|
-
const [globImportString] =
|
|
5568
|
+
const [globImportString] = path3.split("/proof-of-uniqueness/");
|
|
5568
5569
|
const files = (await (0, import_fast_glob.default)(globImportString, { cwd: resolveDir })).sort();
|
|
5569
5570
|
const contents = [
|
|
5570
5571
|
files.map((module2, index) => `import * as module${index} from './${module2}'`).join(";"),
|
|
@@ -5591,15 +5592,190 @@ var getOrInsertWith = (map, key, builder) => {
|
|
|
5591
5592
|
|
|
5592
5593
|
// src/package-build.ts
|
|
5593
5594
|
var import_esbuild = require("esbuild");
|
|
5594
|
-
var
|
|
5595
|
-
var
|
|
5596
|
-
var import_node_fs = require("node:fs");
|
|
5595
|
+
var import_node_path3 = __toESM(require("node:path"));
|
|
5596
|
+
var import_node_fs2 = require("node:fs");
|
|
5597
5597
|
var import_node_module = require("node:module");
|
|
5598
5598
|
var import_yargs = __toESM(require("yargs"));
|
|
5599
|
+
|
|
5600
|
+
// src/stylesheet-plugin.ts
|
|
5601
|
+
var import_node_fs = __toESM(require("node:fs"));
|
|
5602
|
+
var import_node_path2 = __toESM(require("node:path"));
|
|
5603
|
+
var import_node_url = require("node:url");
|
|
5604
|
+
var import_sass = require("sass");
|
|
5605
|
+
var import_postcss = __toESM(require("postcss"));
|
|
5606
|
+
var import_postcss_modules = __toESM(require("postcss-modules"));
|
|
5599
5607
|
var import_tailwindcss = __toESM(require("tailwindcss"));
|
|
5608
|
+
var stylesheetContractsPackageName = "@k8slens/stylesheet-contracts";
|
|
5609
|
+
var namespace = "lens-stylesheet";
|
|
5610
|
+
var isStylesheetPath = /\.(scss|css)$/;
|
|
5611
|
+
var isModulePath = /\.module\.(scss|css)$/;
|
|
5612
|
+
var generateScopedName = "[name]__[local]___[hash:base64:5]";
|
|
5613
|
+
var getPackageNameOf = (specifier) => {
|
|
5614
|
+
const [first, second] = specifier.split("/");
|
|
5615
|
+
return specifier.startsWith("@") ? `${first}/${second}` : first;
|
|
5616
|
+
};
|
|
5617
|
+
var stylesheetPlugin = ({
|
|
5618
|
+
packageName,
|
|
5619
|
+
packageDirectory,
|
|
5620
|
+
declaredDependencies
|
|
5621
|
+
}) => ({
|
|
5622
|
+
name: "lens-stylesheet",
|
|
5623
|
+
setup: (build2) => {
|
|
5624
|
+
const isOwnSourceFile = (file) => {
|
|
5625
|
+
const relative = import_node_path2.default.relative(packageDirectory, file);
|
|
5626
|
+
return !relative.startsWith("..") && !relative.split(import_node_path2.default.sep).includes("node_modules") && /\.(t|j)sx?$/.test(file);
|
|
5627
|
+
};
|
|
5628
|
+
build2.onResolve({ filter: isStylesheetPath }, (args) => {
|
|
5629
|
+
if (args.path.startsWith(".")) {
|
|
5630
|
+
const absolutePath = import_node_path2.default.resolve(args.resolveDir, args.path);
|
|
5631
|
+
if (import_node_path2.default.relative(packageDirectory, absolutePath).startsWith("..")) {
|
|
5632
|
+
return null;
|
|
5633
|
+
}
|
|
5634
|
+
return { path: absolutePath, namespace };
|
|
5635
|
+
}
|
|
5636
|
+
if (!isOwnSourceFile(args.importer)) {
|
|
5637
|
+
return null;
|
|
5638
|
+
}
|
|
5639
|
+
const dependency = getPackageNameOf(args.path);
|
|
5640
|
+
if (!declaredDependencies.has(dependency)) {
|
|
5641
|
+
return {
|
|
5642
|
+
errors: [
|
|
5643
|
+
{
|
|
5644
|
+
text: `"${packageName}" imports the stylesheet "${args.path}" of "${dependency}" without declaring "${dependency}" in its dependencies.`
|
|
5645
|
+
}
|
|
5646
|
+
]
|
|
5647
|
+
};
|
|
5648
|
+
}
|
|
5649
|
+
try {
|
|
5650
|
+
return {
|
|
5651
|
+
path: require.resolve(args.path, { paths: [packageDirectory] }),
|
|
5652
|
+
namespace,
|
|
5653
|
+
pluginData: { id: `${packageName}/${args.path}` }
|
|
5654
|
+
};
|
|
5655
|
+
} catch {
|
|
5656
|
+
return {
|
|
5657
|
+
errors: [
|
|
5658
|
+
{ text: `"${packageName}" imports the stylesheet "${args.path}", which "${dependency}" does not have.` }
|
|
5659
|
+
]
|
|
5660
|
+
};
|
|
5661
|
+
}
|
|
5662
|
+
});
|
|
5663
|
+
build2.onResolve({ filter: /.*/, namespace }, (args) => {
|
|
5664
|
+
if (args.path !== stylesheetContractsPackageName) {
|
|
5665
|
+
return null;
|
|
5666
|
+
}
|
|
5667
|
+
if (!declaredDependencies.has(stylesheetContractsPackageName)) {
|
|
5668
|
+
return {
|
|
5669
|
+
errors: [
|
|
5670
|
+
{
|
|
5671
|
+
text: `"${packageName}" imports a stylesheet but does not declare "${stylesheetContractsPackageName}" in its dependencies. Every stylesheet becomes an injectable bound to its token.`
|
|
5672
|
+
}
|
|
5673
|
+
]
|
|
5674
|
+
};
|
|
5675
|
+
}
|
|
5676
|
+
return { path: args.path, external: true };
|
|
5677
|
+
});
|
|
5678
|
+
build2.onLoad({ filter: /.*/, namespace }, async (args) => {
|
|
5679
|
+
const isModule = isModulePath.test(args.path);
|
|
5680
|
+
const compiled = (0, import_sass.compile)(args.path, { logger: import_sass.Logger.silent, importers: [tildeImporter(packageDirectory)] });
|
|
5681
|
+
const processed = isModule ? await toCssModule(compiled.css, args.path) : { css: compiled.css, classNames: void 0 };
|
|
5682
|
+
const loadedDirectories = compiled.loadedUrls.map((url) => import_node_path2.default.dirname((0, import_node_url.fileURLToPath)(url)));
|
|
5683
|
+
const { css, unresolved } = inlineUrls(processed.css, [import_node_path2.default.dirname(args.path), ...loadedDirectories]);
|
|
5684
|
+
const classNames = processed.classNames;
|
|
5685
|
+
const id = args.pluginData?.id ?? `${packageName}/${import_node_path2.default.relative(packageDirectory, args.path).split(import_node_path2.default.sep).join("/")}`;
|
|
5686
|
+
const contents = [
|
|
5687
|
+
...css.trim() === "" ? [] : [
|
|
5688
|
+
`import { asStylesheet } from "${stylesheetContractsPackageName}";`,
|
|
5689
|
+
`export const stylesheet = asStylesheet({ id: ${JSON.stringify(id)}, css: ${JSON.stringify(css)} });`
|
|
5690
|
+
],
|
|
5691
|
+
...isModule ? [`export default ${JSON.stringify(classNames ?? {})};`] : []
|
|
5692
|
+
].join("\n");
|
|
5693
|
+
return {
|
|
5694
|
+
contents,
|
|
5695
|
+
loader: "js",
|
|
5696
|
+
resolveDir: import_node_path2.default.dirname(args.path),
|
|
5697
|
+
watchFiles: compiled.loadedUrls.map((url) => (0, import_node_url.fileURLToPath)(url)),
|
|
5698
|
+
warnings: unresolved.map((url) => ({
|
|
5699
|
+
text: `"${import_node_path2.default.relative(packageDirectory, args.path)}" refers to "${url}", which was not found next to the stylesheet or its imports; the browser will not find it either.`
|
|
5700
|
+
}))
|
|
5701
|
+
};
|
|
5702
|
+
});
|
|
5703
|
+
}
|
|
5704
|
+
});
|
|
5705
|
+
var tildeImporter = (packageDirectory) => ({
|
|
5706
|
+
findFileUrl: (url) => {
|
|
5707
|
+
if (!url.startsWith("~")) {
|
|
5708
|
+
return null;
|
|
5709
|
+
}
|
|
5710
|
+
const specifier = url.slice(1);
|
|
5711
|
+
const segments = specifier.split("/");
|
|
5712
|
+
const packageNameLength = specifier.startsWith("@") ? 2 : 1;
|
|
5713
|
+
const packageName = segments.slice(0, packageNameLength).join("/");
|
|
5714
|
+
const packageRoot = findInNodeModules(packageName, packageDirectory);
|
|
5715
|
+
return packageRoot ? (0, import_node_url.pathToFileURL)(import_node_path2.default.join(packageRoot, ...segments.slice(packageNameLength))) : null;
|
|
5716
|
+
}
|
|
5717
|
+
});
|
|
5718
|
+
var findInNodeModules = (packageName, from) => {
|
|
5719
|
+
for (let directory = from; ; directory = import_node_path2.default.dirname(directory)) {
|
|
5720
|
+
const candidate = import_node_path2.default.join(directory, "node_modules", packageName);
|
|
5721
|
+
if (import_node_fs.default.existsSync(candidate)) {
|
|
5722
|
+
return candidate;
|
|
5723
|
+
}
|
|
5724
|
+
if (import_node_path2.default.dirname(directory) === directory) {
|
|
5725
|
+
return void 0;
|
|
5726
|
+
}
|
|
5727
|
+
}
|
|
5728
|
+
};
|
|
5729
|
+
var mimeTypes = {
|
|
5730
|
+
".ttf": "font/ttf",
|
|
5731
|
+
".otf": "font/otf",
|
|
5732
|
+
".woff": "font/woff",
|
|
5733
|
+
".woff2": "font/woff2",
|
|
5734
|
+
".eot": "application/vnd.ms-fontobject",
|
|
5735
|
+
".svg": "image/svg+xml",
|
|
5736
|
+
".png": "image/png",
|
|
5737
|
+
".jpg": "image/jpeg",
|
|
5738
|
+
".jpeg": "image/jpeg",
|
|
5739
|
+
".gif": "image/gif",
|
|
5740
|
+
".webp": "image/webp"
|
|
5741
|
+
};
|
|
5742
|
+
var isExternalUrl = (url) => /^(data:|https?:|\/\/|#)/.test(url);
|
|
5743
|
+
var inlineUrls = (css, directories) => {
|
|
5744
|
+
const unresolved = [];
|
|
5745
|
+
const inlined = css.replace(/url\(\s*(['"]?)([^'")]+)\1\s*\)/g, (match, quote, url) => {
|
|
5746
|
+
if (isExternalUrl(url)) {
|
|
5747
|
+
return match;
|
|
5748
|
+
}
|
|
5749
|
+
const filePath = url.replace(/[?#].*$/, "");
|
|
5750
|
+
const found = directories.map((directory) => import_node_path2.default.resolve(directory, filePath)).find((candidate) => import_node_fs.default.existsSync(candidate));
|
|
5751
|
+
if (!found) {
|
|
5752
|
+
unresolved.push(url);
|
|
5753
|
+
return match;
|
|
5754
|
+
}
|
|
5755
|
+
const mimeType = mimeTypes[import_node_path2.default.extname(found).toLowerCase()] ?? "application/octet-stream";
|
|
5756
|
+
return `url(${quote}data:${mimeType};base64,${import_node_fs.default.readFileSync(found).toString("base64")}${quote})`;
|
|
5757
|
+
});
|
|
5758
|
+
return { css: inlined, unresolved };
|
|
5759
|
+
};
|
|
5760
|
+
var toCssModule = async (css, filePath) => {
|
|
5761
|
+
let classNames = {};
|
|
5762
|
+
const plugins = [
|
|
5763
|
+
(0, import_postcss_modules.default)({
|
|
5764
|
+
generateScopedName,
|
|
5765
|
+
getJSON: (_cssFileName, json) => {
|
|
5766
|
+
classNames = json;
|
|
5767
|
+
}
|
|
5768
|
+
}),
|
|
5769
|
+
import_tailwindcss.default
|
|
5770
|
+
];
|
|
5771
|
+
const result = await (0, import_postcss.default)(plugins).process(css, { from: filePath, map: false });
|
|
5772
|
+
return { css: result.css, classNames };
|
|
5773
|
+
};
|
|
5774
|
+
|
|
5775
|
+
// src/package-build.ts
|
|
5600
5776
|
var import_lodash = __toESM(require_lodash());
|
|
5601
5777
|
var CWD = process.cwd();
|
|
5602
|
-
var packageJson = JSON.parse((0,
|
|
5778
|
+
var packageJson = JSON.parse((0, import_node_fs2.readFileSync)(import_node_path3.default.resolve(CWD, "package.json"), "utf-8"));
|
|
5603
5779
|
var isExperimentalModule = (module2) => module2.startsWith("_");
|
|
5604
5780
|
var alsoAddNodeRefs = (module2) => [module2, `node:${module2}`];
|
|
5605
5781
|
var { builtinModules, disallowedBuiltinModules } = (() => {
|
|
@@ -5608,9 +5784,9 @@ var { builtinModules, disallowedBuiltinModules } = (() => {
|
|
|
5608
5784
|
const builtinModules2 = new Set(allowed.flatMap(alsoAddNodeRefs));
|
|
5609
5785
|
return { disallowedBuiltinModules: disallowedBuiltinModules2, builtinModules: builtinModules2 };
|
|
5610
5786
|
})();
|
|
5611
|
-
var getPackageName = (
|
|
5612
|
-
const [firstPart, secondPart] =
|
|
5613
|
-
if (
|
|
5787
|
+
var getPackageName = (path3) => {
|
|
5788
|
+
const [firstPart, secondPart] = path3.split("/");
|
|
5789
|
+
if (path3.startsWith("@")) {
|
|
5614
5790
|
return [firstPart, secondPart].join("/");
|
|
5615
5791
|
}
|
|
5616
5792
|
return firstPart;
|
|
@@ -5620,9 +5796,9 @@ var ensureCorrectImportsPlugin = {
|
|
|
5620
5796
|
name: "ensure-correct-imports",
|
|
5621
5797
|
setup: (build2) => {
|
|
5622
5798
|
build2.onResolve({ filter: /^\./ }, (args) => {
|
|
5623
|
-
const fullPath =
|
|
5624
|
-
const relativePathToImporter =
|
|
5625
|
-
const relativePath =
|
|
5799
|
+
const fullPath = import_node_path3.default.resolve(args.resolveDir, args.path);
|
|
5800
|
+
const relativePathToImporter = import_node_path3.default.relative(CWD, args.importer);
|
|
5801
|
+
const relativePath = import_node_path3.default.relative(CWD, fullPath);
|
|
5626
5802
|
if (relativePath.startsWith("..") && !relativePathToImporter.startsWith("..")) {
|
|
5627
5803
|
throw new Error(
|
|
5628
5804
|
`Tried to import "${args.path}" from "${relativePathToImporter}" but it is outside of the package.`
|
|
@@ -5631,8 +5807,8 @@ var ensureCorrectImportsPlugin = {
|
|
|
5631
5807
|
return bundleDependency;
|
|
5632
5808
|
});
|
|
5633
5809
|
build2.onResolve({ filter: /^[^.]/ }, async (args) => {
|
|
5634
|
-
const relativePathToImporter =
|
|
5635
|
-
const importerIsOwnFile = !relativePathToImporter.startsWith("..") && !relativePathToImporter.split(
|
|
5810
|
+
const relativePathToImporter = import_node_path3.default.relative(CWD, args.importer);
|
|
5811
|
+
const importerIsOwnFile = !relativePathToImporter.startsWith("..") && !relativePathToImporter.split(import_node_path3.default.sep).includes("node_modules");
|
|
5636
5812
|
const importerIsSourceFile = /\.(t|j)sx?$/.test(args.importer);
|
|
5637
5813
|
if (!importerIsOwnFile || !importerIsSourceFile) {
|
|
5638
5814
|
return bundleDependency;
|
|
@@ -5679,7 +5855,7 @@ var parsedArgs = (0, import_yargs.default)().options({
|
|
|
5679
5855
|
},
|
|
5680
5856
|
outfile: {
|
|
5681
5857
|
type: "string",
|
|
5682
|
-
default:
|
|
5858
|
+
default: import_node_path3.default.resolve(CWD, "dist/index.js"),
|
|
5683
5859
|
description: `Custom outfile, defaults to "dist/index.js"`
|
|
5684
5860
|
},
|
|
5685
5861
|
format: {
|
|
@@ -5715,9 +5891,9 @@ var externalImagesPlugin = {
|
|
|
5715
5891
|
name: "external-images",
|
|
5716
5892
|
setup(build2) {
|
|
5717
5893
|
build2.onResolve({ filter: /\.png$/ }, (args) => {
|
|
5718
|
-
const absolutePath =
|
|
5719
|
-
const outputDirectory =
|
|
5720
|
-
const relativePath =
|
|
5894
|
+
const absolutePath = import_node_path3.default.resolve(args.resolveDir, args.path);
|
|
5895
|
+
const outputDirectory = import_node_path3.default.dirname(import_node_path3.default.resolve(CWD, parsedArgs.outfile));
|
|
5896
|
+
const relativePath = import_node_path3.default.relative(outputDirectory, absolutePath).split(import_node_path3.default.sep).join("/");
|
|
5721
5897
|
return {
|
|
5722
5898
|
path: relativePath.startsWith(".") ? relativePath : `./${relativePath}`,
|
|
5723
5899
|
external: true
|
|
@@ -5737,22 +5913,15 @@ var packageBuild = async () => {
|
|
|
5737
5913
|
target: "node16",
|
|
5738
5914
|
sourcemap: "inline",
|
|
5739
5915
|
plugins: [
|
|
5916
|
+
// First: a dependency's stylesheet is compiled into the bundle, not left external.
|
|
5917
|
+
stylesheetPlugin({
|
|
5918
|
+
packageName: packageJson.name,
|
|
5919
|
+
packageDirectory: CWD,
|
|
5920
|
+
declaredDependencies: new Set(Object.keys(packageJson.dependencies ?? {}))
|
|
5921
|
+
}),
|
|
5740
5922
|
ensureCorrectImportsPlugin,
|
|
5741
5923
|
externalImagesPlugin,
|
|
5742
5924
|
globImportPlugin(),
|
|
5743
|
-
(0, import_esbuild_sass_plugin.sassPlugin)({
|
|
5744
|
-
filter: /\.module\.scss$/,
|
|
5745
|
-
transform: (0, import_esbuild_sass_plugin.postcssModules)(
|
|
5746
|
-
{
|
|
5747
|
-
basedir: __dirname,
|
|
5748
|
-
generateScopedName: "[name]__[local]___[hash:base64:5]"
|
|
5749
|
-
},
|
|
5750
|
-
[import_tailwindcss.default]
|
|
5751
|
-
)
|
|
5752
|
-
}),
|
|
5753
|
-
(0, import_esbuild_sass_plugin.sassPlugin)({
|
|
5754
|
-
filter: /\.scss$/
|
|
5755
|
-
}),
|
|
5756
5925
|
nativeNodeModulesPlugin
|
|
5757
5926
|
],
|
|
5758
5927
|
loader: {
|