@moda/om 19.4.1 → 19.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -3
- package/dist/index.cjs.js +203 -270
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +203 -270
- package/dist/index.esm.js.map +1 -1
- package/dist/src/index.d.ts +2 -0
- package/package.json +6 -6
package/dist/index.esm.js
CHANGED
|
@@ -323,6 +323,7 @@ colors.colors = {
|
|
|
323
323
|
"teal": "rgb(0, 111, 98)",
|
|
324
324
|
"ivory": "rgb(242, 233, 219)",
|
|
325
325
|
"klein-blue": "rgb(38, 48, 120)",
|
|
326
|
+
"persian-blue": "rgb(30, 34, 170)",
|
|
326
327
|
"brick": "rgb(147, 58, 32)",
|
|
327
328
|
"goldenrod": "rgb(186, 145, 46)",
|
|
328
329
|
"seafoam": "rgb(177, 191, 170)",
|
|
@@ -348,6 +349,7 @@ colors.colors = {
|
|
|
348
349
|
},
|
|
349
350
|
"global": {
|
|
350
351
|
"klein-blue": "rgb(38, 48, 120)",
|
|
352
|
+
"persian-blue": "rgb(30, 34, 170)",
|
|
351
353
|
"brick": "rgb(147, 58, 32)",
|
|
352
354
|
"goldenrod": "rgb(186, 145, 46)",
|
|
353
355
|
"seafoam": "rgb(177, 191, 170)",
|
|
@@ -999,6 +1001,85 @@ var colorStringExports = colorString.exports;
|
|
|
999
1001
|
__exportStar(helpers, exports);
|
|
1000
1002
|
})(dist$4);
|
|
1001
1003
|
|
|
1004
|
+
function _arrayLikeToArray(r, a) {
|
|
1005
|
+
(null == a || a > r.length) && (a = r.length);
|
|
1006
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
1007
|
+
return n;
|
|
1008
|
+
}
|
|
1009
|
+
function _arrayWithHoles(r) {
|
|
1010
|
+
if (Array.isArray(r)) return r;
|
|
1011
|
+
}
|
|
1012
|
+
function _arrayWithoutHoles(r) {
|
|
1013
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
1014
|
+
}
|
|
1015
|
+
function _createForOfIteratorHelper(r, e) {
|
|
1016
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
1017
|
+
if (!t) {
|
|
1018
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e ) {
|
|
1019
|
+
t && (r = t);
|
|
1020
|
+
var n = 0,
|
|
1021
|
+
F = function () {};
|
|
1022
|
+
return {
|
|
1023
|
+
s: F,
|
|
1024
|
+
n: function () {
|
|
1025
|
+
return n >= r.length ? {
|
|
1026
|
+
done: !0
|
|
1027
|
+
} : {
|
|
1028
|
+
done: !1,
|
|
1029
|
+
value: r[n++]
|
|
1030
|
+
};
|
|
1031
|
+
},
|
|
1032
|
+
e: function (r) {
|
|
1033
|
+
throw r;
|
|
1034
|
+
},
|
|
1035
|
+
f: F
|
|
1036
|
+
};
|
|
1037
|
+
}
|
|
1038
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1039
|
+
}
|
|
1040
|
+
var o,
|
|
1041
|
+
a = !0,
|
|
1042
|
+
u = !1;
|
|
1043
|
+
return {
|
|
1044
|
+
s: function () {
|
|
1045
|
+
t = t.call(r);
|
|
1046
|
+
},
|
|
1047
|
+
n: function () {
|
|
1048
|
+
var r = t.next();
|
|
1049
|
+
return a = r.done, r;
|
|
1050
|
+
},
|
|
1051
|
+
e: function (r) {
|
|
1052
|
+
u = !0, o = r;
|
|
1053
|
+
},
|
|
1054
|
+
f: function () {
|
|
1055
|
+
try {
|
|
1056
|
+
a || null == t.return || t.return();
|
|
1057
|
+
} finally {
|
|
1058
|
+
if (u) throw o;
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
};
|
|
1062
|
+
}
|
|
1063
|
+
function _defineProperty$1(e, r, t) {
|
|
1064
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
1065
|
+
value: t,
|
|
1066
|
+
enumerable: !0,
|
|
1067
|
+
configurable: !0,
|
|
1068
|
+
writable: !0
|
|
1069
|
+
}) : e[r] = t, e;
|
|
1070
|
+
}
|
|
1071
|
+
function _extends$1() {
|
|
1072
|
+
return _extends$1 = Object.assign ? Object.assign.bind() : function (n) {
|
|
1073
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
1074
|
+
var t = arguments[e];
|
|
1075
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
1076
|
+
}
|
|
1077
|
+
return n;
|
|
1078
|
+
}, _extends$1.apply(null, arguments);
|
|
1079
|
+
}
|
|
1080
|
+
function _iterableToArray(r) {
|
|
1081
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
1082
|
+
}
|
|
1002
1083
|
function _iterableToArrayLimit(r, l) {
|
|
1003
1084
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
1004
1085
|
if (null != t) {
|
|
@@ -1026,6 +1107,15 @@ function _iterableToArrayLimit(r, l) {
|
|
|
1026
1107
|
return a;
|
|
1027
1108
|
}
|
|
1028
1109
|
}
|
|
1110
|
+
function _nonIterableRest() {
|
|
1111
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1112
|
+
}
|
|
1113
|
+
function _nonIterableSpread() {
|
|
1114
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1115
|
+
}
|
|
1116
|
+
function _objectDestructuringEmpty(t) {
|
|
1117
|
+
if (null == t) throw new TypeError("Cannot destructure " + t);
|
|
1118
|
+
}
|
|
1029
1119
|
function ownKeys(e, r) {
|
|
1030
1120
|
var t = Object.keys(e);
|
|
1031
1121
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -1047,6 +1137,32 @@ function _objectSpread2(e) {
|
|
|
1047
1137
|
}
|
|
1048
1138
|
return e;
|
|
1049
1139
|
}
|
|
1140
|
+
function _objectWithoutProperties(e, t) {
|
|
1141
|
+
if (null == e) return {};
|
|
1142
|
+
var o,
|
|
1143
|
+
r,
|
|
1144
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
1145
|
+
if (Object.getOwnPropertySymbols) {
|
|
1146
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
1147
|
+
for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
1148
|
+
}
|
|
1149
|
+
return i;
|
|
1150
|
+
}
|
|
1151
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
1152
|
+
if (null == r) return {};
|
|
1153
|
+
var t = {};
|
|
1154
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
1155
|
+
if (e.indexOf(n) >= 0) continue;
|
|
1156
|
+
t[n] = r[n];
|
|
1157
|
+
}
|
|
1158
|
+
return t;
|
|
1159
|
+
}
|
|
1160
|
+
function _slicedToArray(r, e) {
|
|
1161
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
1162
|
+
}
|
|
1163
|
+
function _toConsumableArray(r) {
|
|
1164
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
1165
|
+
}
|
|
1050
1166
|
function _toPrimitive(t, r) {
|
|
1051
1167
|
if ("object" != typeof t || !t) return t;
|
|
1052
1168
|
var e = t[Symbol.toPrimitive];
|
|
@@ -1070,148 +1186,12 @@ function _typeof$1(o) {
|
|
|
1070
1186
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
1071
1187
|
}, _typeof$1(o);
|
|
1072
1188
|
}
|
|
1073
|
-
function
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
enumerable: true,
|
|
1079
|
-
configurable: true,
|
|
1080
|
-
writable: true
|
|
1081
|
-
});
|
|
1082
|
-
} else {
|
|
1083
|
-
obj[key] = value;
|
|
1084
|
-
}
|
|
1085
|
-
return obj;
|
|
1086
|
-
}
|
|
1087
|
-
function _extends$1() {
|
|
1088
|
-
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
1089
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1090
|
-
var source = arguments[i];
|
|
1091
|
-
for (var key in source) {
|
|
1092
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1093
|
-
target[key] = source[key];
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
}
|
|
1097
|
-
return target;
|
|
1098
|
-
};
|
|
1099
|
-
return _extends$1.apply(this, arguments);
|
|
1100
|
-
}
|
|
1101
|
-
function _objectDestructuringEmpty(obj) {
|
|
1102
|
-
if (obj == null) throw new TypeError("Cannot destructure " + obj);
|
|
1103
|
-
}
|
|
1104
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
1105
|
-
if (source == null) return {};
|
|
1106
|
-
var target = {};
|
|
1107
|
-
var sourceKeys = Object.keys(source);
|
|
1108
|
-
var key, i;
|
|
1109
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
1110
|
-
key = sourceKeys[i];
|
|
1111
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
1112
|
-
target[key] = source[key];
|
|
1113
|
-
}
|
|
1114
|
-
return target;
|
|
1115
|
-
}
|
|
1116
|
-
function _objectWithoutProperties(source, excluded) {
|
|
1117
|
-
if (source == null) return {};
|
|
1118
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
1119
|
-
var key, i;
|
|
1120
|
-
if (Object.getOwnPropertySymbols) {
|
|
1121
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
1122
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
1123
|
-
key = sourceSymbolKeys[i];
|
|
1124
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
1125
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
1126
|
-
target[key] = source[key];
|
|
1127
|
-
}
|
|
1189
|
+
function _unsupportedIterableToArray(r, a) {
|
|
1190
|
+
if (r) {
|
|
1191
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
1192
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
1193
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
1128
1194
|
}
|
|
1129
|
-
return target;
|
|
1130
|
-
}
|
|
1131
|
-
function _slicedToArray(arr, i) {
|
|
1132
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
1133
|
-
}
|
|
1134
|
-
function _toConsumableArray(arr) {
|
|
1135
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
1136
|
-
}
|
|
1137
|
-
function _arrayWithoutHoles(arr) {
|
|
1138
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
1139
|
-
}
|
|
1140
|
-
function _arrayWithHoles(arr) {
|
|
1141
|
-
if (Array.isArray(arr)) return arr;
|
|
1142
|
-
}
|
|
1143
|
-
function _iterableToArray(iter) {
|
|
1144
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1145
|
-
}
|
|
1146
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
1147
|
-
if (!o) return;
|
|
1148
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
1149
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1150
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1151
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1152
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
1153
|
-
}
|
|
1154
|
-
function _arrayLikeToArray(arr, len) {
|
|
1155
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
1156
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
1157
|
-
return arr2;
|
|
1158
|
-
}
|
|
1159
|
-
function _nonIterableSpread() {
|
|
1160
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1161
|
-
}
|
|
1162
|
-
function _nonIterableRest() {
|
|
1163
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1164
|
-
}
|
|
1165
|
-
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
1166
|
-
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
1167
|
-
if (!it) {
|
|
1168
|
-
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
1169
|
-
if (it) o = it;
|
|
1170
|
-
var i = 0;
|
|
1171
|
-
var F = function () {};
|
|
1172
|
-
return {
|
|
1173
|
-
s: F,
|
|
1174
|
-
n: function () {
|
|
1175
|
-
if (i >= o.length) return {
|
|
1176
|
-
done: true
|
|
1177
|
-
};
|
|
1178
|
-
return {
|
|
1179
|
-
done: false,
|
|
1180
|
-
value: o[i++]
|
|
1181
|
-
};
|
|
1182
|
-
},
|
|
1183
|
-
e: function (e) {
|
|
1184
|
-
throw e;
|
|
1185
|
-
},
|
|
1186
|
-
f: F
|
|
1187
|
-
};
|
|
1188
|
-
}
|
|
1189
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1190
|
-
}
|
|
1191
|
-
var normalCompletion = true,
|
|
1192
|
-
didErr = false,
|
|
1193
|
-
err;
|
|
1194
|
-
return {
|
|
1195
|
-
s: function () {
|
|
1196
|
-
it = it.call(o);
|
|
1197
|
-
},
|
|
1198
|
-
n: function () {
|
|
1199
|
-
var step = it.next();
|
|
1200
|
-
normalCompletion = step.done;
|
|
1201
|
-
return step;
|
|
1202
|
-
},
|
|
1203
|
-
e: function (e) {
|
|
1204
|
-
didErr = true;
|
|
1205
|
-
err = e;
|
|
1206
|
-
},
|
|
1207
|
-
f: function () {
|
|
1208
|
-
try {
|
|
1209
|
-
if (!normalCompletion && it.return != null) it.return();
|
|
1210
|
-
} finally {
|
|
1211
|
-
if (didErr) throw err;
|
|
1212
|
-
}
|
|
1213
|
-
}
|
|
1214
|
-
};
|
|
1215
1195
|
}
|
|
1216
1196
|
|
|
1217
1197
|
var isRenderProps = function isRenderProps(children) {
|
|
@@ -1524,6 +1504,7 @@ function useCallbackRef(initialValue, callback) {
|
|
|
1524
1504
|
return ref.facade;
|
|
1525
1505
|
}
|
|
1526
1506
|
|
|
1507
|
+
var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
1527
1508
|
var currentValues = new WeakMap();
|
|
1528
1509
|
/**
|
|
1529
1510
|
* Merges two or more refs together providing a single interface to set their value
|
|
@@ -1540,13 +1521,13 @@ var currentValues = new WeakMap();
|
|
|
1540
1521
|
* }
|
|
1541
1522
|
*/
|
|
1542
1523
|
function useMergeRefs(refs, defaultValue) {
|
|
1543
|
-
var callbackRef = useCallbackRef(
|
|
1524
|
+
var callbackRef = useCallbackRef(null, function (newValue) {
|
|
1544
1525
|
return refs.forEach(function (ref) {
|
|
1545
1526
|
return assignRef(ref, newValue);
|
|
1546
1527
|
});
|
|
1547
1528
|
});
|
|
1548
1529
|
// handle refs changes - added or removed
|
|
1549
|
-
|
|
1530
|
+
useIsomorphicLayoutEffect(function () {
|
|
1550
1531
|
var oldValue = currentValues.get(callbackRef);
|
|
1551
1532
|
if (oldValue) {
|
|
1552
1533
|
var prevRefs_1 = new Set(oldValue);
|
|
@@ -3105,7 +3086,6 @@ FocusLock.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
3105
3086
|
onDeactivation: propTypesExports.func,
|
|
3106
3087
|
sideCar: propTypesExports.any.isRequired
|
|
3107
3088
|
} : {};
|
|
3108
|
-
var FocusLockUI = FocusLock;
|
|
3109
3089
|
|
|
3110
3090
|
function deferAction(action) {
|
|
3111
3091
|
setTimeout(action, 1);
|
|
@@ -3160,7 +3140,7 @@ var FocusOn$1 = /*#__PURE__*/React.forwardRef(function (props, parentRef) {
|
|
|
3160
3140
|
inert: inert,
|
|
3161
3141
|
enabled: enabled && scrollLock
|
|
3162
3142
|
});
|
|
3163
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
3143
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FocusLock, {
|
|
3164
3144
|
ref: parentRef,
|
|
3165
3145
|
sideCar: sideCar,
|
|
3166
3146
|
disabled: !(lockProps && enabled && focusLock),
|
|
@@ -4047,6 +4027,13 @@ var moveFocusInside = function moveFocusInside(topNode, lastNode, options) {
|
|
|
4047
4027
|
|
|
4048
4028
|
function weakRef(value) {
|
|
4049
4029
|
if (!value) return null;
|
|
4030
|
+
// #68 Safari 14.1 dont have it yet
|
|
4031
|
+
// FIXME: remove in 2025
|
|
4032
|
+
if (typeof WeakRef === 'undefined') {
|
|
4033
|
+
return function () {
|
|
4034
|
+
return value || null;
|
|
4035
|
+
};
|
|
4036
|
+
}
|
|
4050
4037
|
var w = value ? new WeakRef(value) : null;
|
|
4051
4038
|
return function () {
|
|
4052
4039
|
return (w === null || w === void 0 ? void 0 : w.deref()) || null;
|
|
@@ -4762,9 +4749,9 @@ var handleScroll = function handleScroll(axis, endTarget, event, sourceDelta, no
|
|
|
4762
4749
|
// self content
|
|
4763
4750
|
targetInLock && (endTarget.contains(target) || endTarget === target));
|
|
4764
4751
|
// handle epsilon around 0 (non standard zoom levels)
|
|
4765
|
-
if (isDeltaPositive && (
|
|
4752
|
+
if (isDeltaPositive && (Math.abs(availableScroll) < 1 || !noOverscroll )) {
|
|
4766
4753
|
shouldCancelScroll = true;
|
|
4767
|
-
} else if (!isDeltaPositive && (
|
|
4754
|
+
} else if (!isDeltaPositive && (Math.abs(availableScrollTop) < 1 || !noOverscroll )) {
|
|
4768
4755
|
shouldCancelScroll = true;
|
|
4769
4756
|
}
|
|
4770
4757
|
return shouldCancelScroll;
|
|
@@ -5065,9 +5052,6 @@ var applyAttributeToOthers = function applyAttributeToOthers(originalTarget, par
|
|
|
5065
5052
|
* @return {Undo} undo command
|
|
5066
5053
|
*/
|
|
5067
5054
|
var hideOthers = function hideOthers(originalTarget, parentNode, markerName) {
|
|
5068
|
-
if (markerName === void 0) {
|
|
5069
|
-
markerName = 'data-aria-hidden';
|
|
5070
|
-
}
|
|
5071
5055
|
var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
|
|
5072
5056
|
var activeParentNode = parentNode || getDefaultParent(originalTarget);
|
|
5073
5057
|
if (!activeParentNode) {
|
|
@@ -5494,10 +5478,13 @@ var Breadcrumb = function Breadcrumb(_ref) {
|
|
|
5494
5478
|
var T = function T() {
|
|
5495
5479
|
return true;
|
|
5496
5480
|
};
|
|
5497
|
-
|
|
5481
|
+
|
|
5482
|
+
var _placeholder = {
|
|
5483
|
+
'@@functional/placeholder': true
|
|
5484
|
+
};
|
|
5498
5485
|
|
|
5499
5486
|
function _isPlaceholder(a) {
|
|
5500
|
-
return a
|
|
5487
|
+
return a === _placeholder;
|
|
5501
5488
|
}
|
|
5502
5489
|
|
|
5503
5490
|
/**
|
|
@@ -5508,7 +5495,6 @@ function _isPlaceholder(a) {
|
|
|
5508
5495
|
* @param {Function} fn The function to curry.
|
|
5509
5496
|
* @return {Function} The curried function.
|
|
5510
5497
|
*/
|
|
5511
|
-
|
|
5512
5498
|
function _curry1(fn) {
|
|
5513
5499
|
return function f1(a) {
|
|
5514
5500
|
if (arguments.length === 0 || _isPlaceholder(a)) {
|
|
@@ -5527,7 +5513,6 @@ function _curry1(fn) {
|
|
|
5527
5513
|
* @param {Function} fn The function to curry.
|
|
5528
5514
|
* @return {Function} The curried function.
|
|
5529
5515
|
*/
|
|
5530
|
-
|
|
5531
5516
|
function _curry2(fn) {
|
|
5532
5517
|
return function f2(a, b) {
|
|
5533
5518
|
switch (arguments.length) {
|
|
@@ -5609,7 +5594,6 @@ function _arity(n, fn) {
|
|
|
5609
5594
|
* @param {Function} fn The function to curry.
|
|
5610
5595
|
* @return {Function} The curried function.
|
|
5611
5596
|
*/
|
|
5612
|
-
|
|
5613
5597
|
function _curryN(length, received, fn) {
|
|
5614
5598
|
return function () {
|
|
5615
5599
|
var combined = [];
|
|
@@ -5679,9 +5663,7 @@ function _curryN(length, received, fn) {
|
|
|
5679
5663
|
* const g = f(3);
|
|
5680
5664
|
* g(4); //=> 10
|
|
5681
5665
|
*/
|
|
5682
|
-
|
|
5683
|
-
var curryN = /*#__PURE__*/
|
|
5684
|
-
_curry2(function curryN(length, fn) {
|
|
5666
|
+
var curryN = /*#__PURE__*/_curry2(function curryN(length, fn) {
|
|
5685
5667
|
if (length === 1) {
|
|
5686
5668
|
return _curry1(fn);
|
|
5687
5669
|
}
|
|
@@ -5696,7 +5678,6 @@ _curry2(function curryN(length, fn) {
|
|
|
5696
5678
|
* @param {Function} fn The function to curry.
|
|
5697
5679
|
* @return {Function} The curried function.
|
|
5698
5680
|
*/
|
|
5699
|
-
|
|
5700
5681
|
function _curry3(fn) {
|
|
5701
5682
|
return function f3(a, b, c) {
|
|
5702
5683
|
switch (arguments.length) {
|
|
@@ -5767,7 +5748,6 @@ function _isTransformer(obj) {
|
|
|
5767
5748
|
* @param {Function} fn default ramda implementation
|
|
5768
5749
|
* @return {Function} A function that dispatches on object in list position
|
|
5769
5750
|
*/
|
|
5770
|
-
|
|
5771
5751
|
function _dispatchable(methodNames, transducerCreator, fn) {
|
|
5772
5752
|
return function () {
|
|
5773
5753
|
if (arguments.length === 0) {
|
|
@@ -5846,8 +5826,7 @@ function _objectIs(a, b) {
|
|
|
5846
5826
|
var _objectIs$1 = typeof Object.is === 'function' ? Object.is : _objectIs;
|
|
5847
5827
|
|
|
5848
5828
|
var toString$1 = Object.prototype.toString;
|
|
5849
|
-
var _isArguments = /*#__PURE__*/
|
|
5850
|
-
function () {
|
|
5829
|
+
var _isArguments = /*#__PURE__*/function () {
|
|
5851
5830
|
return toString$1.call(arguments) === '[object Arguments]' ? function _isArguments(x) {
|
|
5852
5831
|
return toString$1.call(x) === '[object Arguments]';
|
|
5853
5832
|
} : function _isArguments(x) {
|
|
@@ -5855,14 +5834,13 @@ function () {
|
|
|
5855
5834
|
};
|
|
5856
5835
|
}();
|
|
5857
5836
|
|
|
5858
|
-
|
|
5859
|
-
{
|
|
5837
|
+
// cover IE < 9 keys issues
|
|
5838
|
+
var hasEnumBug = ! /*#__PURE__*/{
|
|
5860
5839
|
toString: null
|
|
5861
5840
|
}.propertyIsEnumerable('toString');
|
|
5862
|
-
var nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
|
|
5863
|
-
|
|
5864
|
-
var hasArgsEnumBug = /*#__PURE__*/
|
|
5865
|
-
function () {
|
|
5841
|
+
var nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
|
|
5842
|
+
// Safari bug
|
|
5843
|
+
var hasArgsEnumBug = /*#__PURE__*/function () {
|
|
5866
5844
|
|
|
5867
5845
|
return arguments.propertyIsEnumerable('length');
|
|
5868
5846
|
}();
|
|
@@ -5876,6 +5854,7 @@ var contains = function contains(list, item) {
|
|
|
5876
5854
|
}
|
|
5877
5855
|
return false;
|
|
5878
5856
|
};
|
|
5857
|
+
|
|
5879
5858
|
/**
|
|
5880
5859
|
* Returns a list containing the names of all the enumerable own properties of
|
|
5881
5860
|
* the supplied object.
|
|
@@ -5894,12 +5873,9 @@ var contains = function contains(list, item) {
|
|
|
5894
5873
|
*
|
|
5895
5874
|
* R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']
|
|
5896
5875
|
*/
|
|
5897
|
-
|
|
5898
|
-
var keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? /*#__PURE__*/
|
|
5899
|
-
_curry1(function keys(obj) {
|
|
5876
|
+
var keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? /*#__PURE__*/_curry1(function keys(obj) {
|
|
5900
5877
|
return Object(obj) !== obj ? [] : Object.keys(obj);
|
|
5901
|
-
}) : /*#__PURE__*/
|
|
5902
|
-
_curry1(function keys(obj) {
|
|
5878
|
+
}) : /*#__PURE__*/_curry1(function keys(obj) {
|
|
5903
5879
|
if (Object(obj) !== obj) {
|
|
5904
5880
|
return [];
|
|
5905
5881
|
}
|
|
@@ -5949,10 +5925,9 @@ _curry1(function keys(obj) {
|
|
|
5949
5925
|
* R.type(() => {}); //=> "Function"
|
|
5950
5926
|
* R.type(async () => {}); //=> "AsyncFunction"
|
|
5951
5927
|
* R.type(undefined); //=> "Undefined"
|
|
5928
|
+
* R.type(BigInt(123)); //=> "BigInt"
|
|
5952
5929
|
*/
|
|
5953
|
-
|
|
5954
|
-
var type = /*#__PURE__*/
|
|
5955
|
-
_curry1(function type(val) {
|
|
5930
|
+
var type = /*#__PURE__*/_curry1(function type(val) {
|
|
5956
5931
|
return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);
|
|
5957
5932
|
});
|
|
5958
5933
|
|
|
@@ -5972,8 +5947,9 @@ function _uniqContentEquals(aIterator, bIterator, stackA, stackB) {
|
|
|
5972
5947
|
var b = _arrayFromIterator(bIterator);
|
|
5973
5948
|
function eq(_a, _b) {
|
|
5974
5949
|
return _equals(_a, _b, stackA.slice(), stackB.slice());
|
|
5975
|
-
}
|
|
5950
|
+
}
|
|
5976
5951
|
|
|
5952
|
+
// if *a* array contains any element that is not included in *b*
|
|
5977
5953
|
return !_includesWith(function (b, aItem) {
|
|
5978
5954
|
return !_includesWith(eq, aItem, b);
|
|
5979
5955
|
}, b, a);
|
|
@@ -6104,15 +6080,13 @@ function _equals(a, b, stackA, stackB) {
|
|
|
6104
6080
|
* const b = {}; b.v = b;
|
|
6105
6081
|
* R.equals(a, b); //=> true
|
|
6106
6082
|
*/
|
|
6107
|
-
|
|
6108
|
-
var equals = /*#__PURE__*/
|
|
6109
|
-
_curry2(function equals(a, b) {
|
|
6083
|
+
var equals = /*#__PURE__*/_curry2(function equals(a, b) {
|
|
6110
6084
|
return _equals(a, b, [], []);
|
|
6111
6085
|
});
|
|
6112
6086
|
|
|
6113
6087
|
function _indexOf(list, a, idx) {
|
|
6114
|
-
var inf, item;
|
|
6115
|
-
|
|
6088
|
+
var inf, item;
|
|
6089
|
+
// Array.prototype.indexOf doesn't exist below IE9
|
|
6116
6090
|
if (typeof list.indexOf === 'function') {
|
|
6117
6091
|
switch (_typeof$1(a)) {
|
|
6118
6092
|
case 'number':
|
|
@@ -6137,11 +6111,11 @@ function _indexOf(list, a, idx) {
|
|
|
6137
6111
|
idx += 1;
|
|
6138
6112
|
}
|
|
6139
6113
|
return -1;
|
|
6140
|
-
}
|
|
6141
|
-
|
|
6114
|
+
}
|
|
6115
|
+
// non-zero numbers can utilise Set
|
|
6142
6116
|
return list.indexOf(a, idx);
|
|
6143
|
-
// all these types can utilise Set
|
|
6144
6117
|
|
|
6118
|
+
// all these types can utilise Set
|
|
6145
6119
|
case 'string':
|
|
6146
6120
|
case 'boolean':
|
|
6147
6121
|
case 'function':
|
|
@@ -6153,8 +6127,8 @@ function _indexOf(list, a, idx) {
|
|
|
6153
6127
|
return list.indexOf(a, idx);
|
|
6154
6128
|
}
|
|
6155
6129
|
}
|
|
6156
|
-
}
|
|
6157
|
-
|
|
6130
|
+
}
|
|
6131
|
+
// anything else not covered above, defer to R.equals
|
|
6158
6132
|
while (idx < list.length) {
|
|
6159
6133
|
if (equals(list[idx], a)) {
|
|
6160
6134
|
return idx;
|
|
@@ -6230,8 +6204,7 @@ function _isObject(x) {
|
|
|
6230
6204
|
return Object.prototype.toString.call(x) === '[object Object]';
|
|
6231
6205
|
}
|
|
6232
6206
|
|
|
6233
|
-
var XFilter = /*#__PURE__*/
|
|
6234
|
-
function () {
|
|
6207
|
+
var XFilter = /*#__PURE__*/function () {
|
|
6235
6208
|
function XFilter(f, xf) {
|
|
6236
6209
|
this.xf = xf;
|
|
6237
6210
|
this.f = f;
|
|
@@ -6277,10 +6250,7 @@ function _xfilter(f) {
|
|
|
6277
6250
|
*
|
|
6278
6251
|
* R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}
|
|
6279
6252
|
*/
|
|
6280
|
-
|
|
6281
|
-
var filter = /*#__PURE__*/
|
|
6282
|
-
_curry2( /*#__PURE__*/
|
|
6283
|
-
_dispatchable(['fantasy-land/filter', 'filter'], _xfilter, function (pred, filterable) {
|
|
6253
|
+
var filter = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['fantasy-land/filter', 'filter'], _xfilter, function (pred, filterable) {
|
|
6284
6254
|
return _isObject(filterable) ? _arrayReduce(function (acc, key) {
|
|
6285
6255
|
if (pred(filterable[key])) {
|
|
6286
6256
|
acc[key] = filterable[key];
|
|
@@ -6315,19 +6285,17 @@ _dispatchable(['fantasy-land/filter', 'filter'], _xfilter, function (pred, filte
|
|
|
6315
6285
|
*
|
|
6316
6286
|
* R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}
|
|
6317
6287
|
*/
|
|
6318
|
-
|
|
6319
|
-
var reject = /*#__PURE__*/
|
|
6320
|
-
_curry2(function reject(pred, filterable) {
|
|
6288
|
+
var reject = /*#__PURE__*/_curry2(function reject(pred, filterable) {
|
|
6321
6289
|
return filter(_complement(pred), filterable);
|
|
6322
6290
|
});
|
|
6323
|
-
var reject$1 = reject;
|
|
6324
6291
|
|
|
6325
6292
|
function _toString(x, seen) {
|
|
6326
6293
|
var recur = function recur(y) {
|
|
6327
6294
|
var xs = seen.concat([x]);
|
|
6328
6295
|
return _includes(y, xs) ? '<Circular>' : _toString(y, xs);
|
|
6329
|
-
};
|
|
6296
|
+
};
|
|
6330
6297
|
|
|
6298
|
+
// mapPairs :: (Object, [String]) -> [String]
|
|
6331
6299
|
var mapPairs = function mapPairs(obj, keys) {
|
|
6332
6300
|
return _map(function (k) {
|
|
6333
6301
|
return _quote(k) + ': ' + recur(obj[k]);
|
|
@@ -6337,7 +6305,7 @@ function _toString(x, seen) {
|
|
|
6337
6305
|
case '[object Arguments]':
|
|
6338
6306
|
return '(function() { return arguments; }(' + _map(recur, x).join(', ') + '))';
|
|
6339
6307
|
case '[object Array]':
|
|
6340
|
-
return '[' + _map(recur, x).concat(mapPairs(x, reject
|
|
6308
|
+
return '[' + _map(recur, x).concat(mapPairs(x, reject(function (k) {
|
|
6341
6309
|
return /^\d+$/.test(k);
|
|
6342
6310
|
}, keys(x)))).join(', ') + ']';
|
|
6343
6311
|
case '[object Boolean]':
|
|
@@ -6403,9 +6371,7 @@ function _toString(x, seen) {
|
|
|
6403
6371
|
* R.toString({foo: 1, bar: 2, baz: 3}); //=> '{"bar": 2, "baz": 3, "foo": 1}'
|
|
6404
6372
|
* R.toString(new Date('2001-02-03T04:05:06Z')); //=> 'new Date("2001-02-03T04:05:06.000Z")'
|
|
6405
6373
|
*/
|
|
6406
|
-
|
|
6407
|
-
var toString = /*#__PURE__*/
|
|
6408
|
-
_curry1(function toString(val) {
|
|
6374
|
+
var toString = /*#__PURE__*/_curry1(function toString(val) {
|
|
6409
6375
|
return _toString(val, []);
|
|
6410
6376
|
});
|
|
6411
6377
|
|
|
@@ -6426,9 +6392,7 @@ _curry1(function toString(val) {
|
|
|
6426
6392
|
* R.max(789, 123); //=> 789
|
|
6427
6393
|
* R.max('a', 'b'); //=> 'b'
|
|
6428
6394
|
*/
|
|
6429
|
-
|
|
6430
|
-
var max = /*#__PURE__*/
|
|
6431
|
-
_curry2(function max(a, b) {
|
|
6395
|
+
var max = /*#__PURE__*/_curry2(function max(a, b) {
|
|
6432
6396
|
if (a === b) {
|
|
6433
6397
|
return b;
|
|
6434
6398
|
}
|
|
@@ -6453,10 +6417,8 @@ _curry2(function max(a, b) {
|
|
|
6453
6417
|
}
|
|
6454
6418
|
return b;
|
|
6455
6419
|
});
|
|
6456
|
-
var max$1 = max;
|
|
6457
6420
|
|
|
6458
|
-
var XMap = /*#__PURE__*/
|
|
6459
|
-
function () {
|
|
6421
|
+
var XMap = /*#__PURE__*/function () {
|
|
6460
6422
|
function XMap(f, xf) {
|
|
6461
6423
|
this.xf = xf;
|
|
6462
6424
|
this.f = f;
|
|
@@ -6473,7 +6435,6 @@ var _xmap = function _xmap(f) {
|
|
|
6473
6435
|
return new XMap(f, xf);
|
|
6474
6436
|
};
|
|
6475
6437
|
};
|
|
6476
|
-
var _xmap$1 = _xmap;
|
|
6477
6438
|
|
|
6478
6439
|
/**
|
|
6479
6440
|
* Takes a function and
|
|
@@ -6510,10 +6471,7 @@ var _xmap$1 = _xmap;
|
|
|
6510
6471
|
* @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) }
|
|
6511
6472
|
* @symb R.map(f, functor_o) = functor_o.map(f)
|
|
6512
6473
|
*/
|
|
6513
|
-
|
|
6514
|
-
var map = /*#__PURE__*/
|
|
6515
|
-
_curry2( /*#__PURE__*/
|
|
6516
|
-
_dispatchable(['fantasy-land/map', 'map'], _xmap$1, function map(fn, functor) {
|
|
6474
|
+
var map = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['fantasy-land/map', 'map'], _xmap, function map(fn, functor) {
|
|
6517
6475
|
switch (Object.prototype.toString.call(functor)) {
|
|
6518
6476
|
case '[object Function]':
|
|
6519
6477
|
return curryN(functor.length, function () {
|
|
@@ -6551,9 +6509,7 @@ function _isString(x) {
|
|
|
6551
6509
|
* _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true
|
|
6552
6510
|
* _isArrayLike({nodeType: 1, length: 1}) // => false
|
|
6553
6511
|
*/
|
|
6554
|
-
|
|
6555
|
-
var _isArrayLike = /*#__PURE__*/
|
|
6556
|
-
_curry1(function isArrayLike(x) {
|
|
6512
|
+
var _isArrayLike = /*#__PURE__*/_curry1(function isArrayLike(x) {
|
|
6557
6513
|
if (_isArray(x)) {
|
|
6558
6514
|
return true;
|
|
6559
6515
|
}
|
|
@@ -6636,9 +6592,7 @@ function _xArrayReduce(xf, acc, list) {
|
|
|
6636
6592
|
* // logs {a: 2}
|
|
6637
6593
|
* @symb R.bind(f, o)(a, b) = f.call(o, a, b)
|
|
6638
6594
|
*/
|
|
6639
|
-
|
|
6640
|
-
var bind = /*#__PURE__*/
|
|
6641
|
-
_curry2(function bind(fn, thisObj) {
|
|
6595
|
+
var bind = /*#__PURE__*/_curry2(function bind(fn, thisObj) {
|
|
6642
6596
|
return _arity(fn.length, function () {
|
|
6643
6597
|
return fn.apply(thisObj, arguments);
|
|
6644
6598
|
});
|
|
@@ -6659,11 +6613,9 @@ function _xIterableReduce(xf, acc, iter) {
|
|
|
6659
6613
|
function _xMethodReduce(xf, acc, obj, methodName) {
|
|
6660
6614
|
return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));
|
|
6661
6615
|
}
|
|
6662
|
-
var _xReduce = /*#__PURE__*/
|
|
6663
|
-
_createReduce(_xArrayReduce, _xMethodReduce, _xIterableReduce);
|
|
6616
|
+
var _xReduce = /*#__PURE__*/_createReduce(_xArrayReduce, _xMethodReduce, _xIterableReduce);
|
|
6664
6617
|
|
|
6665
|
-
var XWrap = /*#__PURE__*/
|
|
6666
|
-
function () {
|
|
6618
|
+
var XWrap = /*#__PURE__*/function () {
|
|
6667
6619
|
function XWrap(fn) {
|
|
6668
6620
|
this.f = fn;
|
|
6669
6621
|
}
|
|
@@ -6734,12 +6686,9 @@ function _xwrap(fn) {
|
|
|
6734
6686
|
*
|
|
6735
6687
|
* @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d)
|
|
6736
6688
|
*/
|
|
6737
|
-
|
|
6738
|
-
var reduce = /*#__PURE__*/
|
|
6739
|
-
_curry3(function (xf, acc, list) {
|
|
6689
|
+
var reduce = /*#__PURE__*/_curry3(function (xf, acc, list) {
|
|
6740
6690
|
return _xReduce(typeof xf === 'function' ? _xwrap(xf) : xf, acc, list);
|
|
6741
6691
|
});
|
|
6742
|
-
var reduce$1 = reduce;
|
|
6743
6692
|
|
|
6744
6693
|
function _identity(x) {
|
|
6745
6694
|
return x;
|
|
@@ -6764,10 +6713,7 @@ function _identity(x) {
|
|
|
6764
6713
|
* R.identity(obj) === obj; //=> true
|
|
6765
6714
|
* @symb R.identity(a) = a
|
|
6766
6715
|
*/
|
|
6767
|
-
|
|
6768
|
-
var identity = /*#__PURE__*/
|
|
6769
|
-
_curry1(_identity);
|
|
6770
|
-
var identity$1 = identity;
|
|
6716
|
+
var identity = /*#__PURE__*/_curry1(_identity);
|
|
6771
6717
|
|
|
6772
6718
|
/**
|
|
6773
6719
|
* Returns a function, `fn`, which encapsulates `if/else, if/else, ...` logic.
|
|
@@ -6800,10 +6746,8 @@ var identity$1 = identity;
|
|
|
6800
6746
|
* fn(50); //=> 'nothing special happens at 50°C'
|
|
6801
6747
|
* fn(100); //=> 'water boils at 100°C'
|
|
6802
6748
|
*/
|
|
6803
|
-
|
|
6804
|
-
var
|
|
6805
|
-
_curry1(function cond(pairs) {
|
|
6806
|
-
var arity = reduce$1(max$1, 0, map(function (pair) {
|
|
6749
|
+
var cond = /*#__PURE__*/_curry1(function cond(pairs) {
|
|
6750
|
+
var arity = reduce(max, 0, map(function (pair) {
|
|
6807
6751
|
return pair[0].length;
|
|
6808
6752
|
}, pairs));
|
|
6809
6753
|
return _arity(arity, function () {
|
|
@@ -6817,28 +6761,29 @@ _curry1(function cond(pairs) {
|
|
|
6817
6761
|
});
|
|
6818
6762
|
});
|
|
6819
6763
|
|
|
6820
|
-
var _Set = /*#__PURE__*/
|
|
6821
|
-
function () {
|
|
6764
|
+
var _Set = /*#__PURE__*/function () {
|
|
6822
6765
|
function _Set() {
|
|
6823
6766
|
/* globals Set */
|
|
6824
6767
|
this._nativeSet = typeof Set === 'function' ? new Set() : null;
|
|
6825
6768
|
this._items = {};
|
|
6826
6769
|
}
|
|
6827
|
-
|
|
6828
6770
|
// until we figure out why jsdoc chokes on this
|
|
6829
6771
|
// @param item The item to add to the Set
|
|
6830
6772
|
// @returns {boolean} true if the item did not exist prior, otherwise false
|
|
6831
6773
|
//
|
|
6832
6774
|
_Set.prototype.add = function (item) {
|
|
6833
6775
|
return !hasOrAdd(item, true, this);
|
|
6834
|
-
};
|
|
6776
|
+
};
|
|
6777
|
+
|
|
6778
|
+
//
|
|
6835
6779
|
// @param item The item to check for existence in the Set
|
|
6836
6780
|
// @returns {boolean} true if the item exists in the Set, otherwise false
|
|
6837
6781
|
//
|
|
6838
|
-
|
|
6839
6782
|
_Set.prototype.has = function (item) {
|
|
6840
6783
|
return hasOrAdd(item, false, this);
|
|
6841
|
-
};
|
|
6784
|
+
};
|
|
6785
|
+
|
|
6786
|
+
//
|
|
6842
6787
|
// Combines the logic for checking whether an item is a member of the set and
|
|
6843
6788
|
// for adding a new item to the set.
|
|
6844
6789
|
//
|
|
@@ -6848,7 +6793,6 @@ function () {
|
|
|
6848
6793
|
// @param set The set instance to check or add to.
|
|
6849
6794
|
// @return {boolean} true if the item already existed, otherwise false.
|
|
6850
6795
|
//
|
|
6851
|
-
|
|
6852
6796
|
return _Set;
|
|
6853
6797
|
}();
|
|
6854
6798
|
function hasOrAdd(item, shouldAdd, set) {
|
|
@@ -6867,8 +6811,8 @@ function hasOrAdd(item, shouldAdd, set) {
|
|
|
6867
6811
|
}
|
|
6868
6812
|
return false;
|
|
6869
6813
|
}
|
|
6870
|
-
}
|
|
6871
|
-
|
|
6814
|
+
}
|
|
6815
|
+
// these types can all utilise the native Set
|
|
6872
6816
|
if (set._nativeSet !== null) {
|
|
6873
6817
|
if (shouldAdd) {
|
|
6874
6818
|
prevSize = set._nativeSet.size;
|
|
@@ -6958,9 +6902,7 @@ function hasOrAdd(item, shouldAdd, set) {
|
|
|
6958
6902
|
}
|
|
6959
6903
|
return true;
|
|
6960
6904
|
}
|
|
6961
|
-
|
|
6962
6905
|
/* falls through */
|
|
6963
|
-
|
|
6964
6906
|
default:
|
|
6965
6907
|
// reduce the search size of heterogeneous sets by creating buckets
|
|
6966
6908
|
// for each type.
|
|
@@ -6970,8 +6912,8 @@ function hasOrAdd(item, shouldAdd, set) {
|
|
|
6970
6912
|
set._items[type] = [item];
|
|
6971
6913
|
}
|
|
6972
6914
|
return false;
|
|
6973
|
-
}
|
|
6974
|
-
|
|
6915
|
+
}
|
|
6916
|
+
// scan through all previously applied items
|
|
6975
6917
|
if (!_includes(item, set._items[type])) {
|
|
6976
6918
|
if (shouldAdd) {
|
|
6977
6919
|
set._items[type].push(item);
|
|
@@ -6980,10 +6922,9 @@ function hasOrAdd(item, shouldAdd, set) {
|
|
|
6980
6922
|
}
|
|
6981
6923
|
return true;
|
|
6982
6924
|
}
|
|
6983
|
-
}
|
|
6925
|
+
}
|
|
6984
6926
|
|
|
6985
|
-
var XUniqBy = /*#__PURE__*/
|
|
6986
|
-
function () {
|
|
6927
|
+
var XUniqBy = /*#__PURE__*/function () {
|
|
6987
6928
|
function XUniqBy(f, xf) {
|
|
6988
6929
|
this.xf = xf;
|
|
6989
6930
|
this.f = f;
|
|
@@ -7022,10 +6963,7 @@ function _xuniqBy(f) {
|
|
|
7022
6963
|
*
|
|
7023
6964
|
* R.uniqBy(Math.abs, [-1, -5, 2, 10, 1, 2]); //=> [-1, -5, 2, 10]
|
|
7024
6965
|
*/
|
|
7025
|
-
|
|
7026
|
-
var uniqBy = /*#__PURE__*/
|
|
7027
|
-
_curry2( /*#__PURE__*/
|
|
7028
|
-
_dispatchable([], _xuniqBy, function (fn, list) {
|
|
6966
|
+
var uniqBy = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable([], _xuniqBy, function (fn, list) {
|
|
7029
6967
|
var set = new _Set();
|
|
7030
6968
|
var result = [];
|
|
7031
6969
|
var idx = 0;
|
|
@@ -7058,9 +6996,7 @@ _dispatchable([], _xuniqBy, function (fn, list) {
|
|
|
7058
6996
|
* R.uniq([1, '1']); //=> [1, '1']
|
|
7059
6997
|
* R.uniq([[42], [42]]); //=> [[42]]
|
|
7060
6998
|
*/
|
|
7061
|
-
|
|
7062
|
-
var uniq = /*#__PURE__*/
|
|
7063
|
-
uniqBy(identity$1);
|
|
6999
|
+
var uniq = /*#__PURE__*/uniqBy(identity);
|
|
7064
7000
|
|
|
7065
7001
|
function _isNumber(x) {
|
|
7066
7002
|
return Object.prototype.toString.call(x) === '[object Number]';
|
|
@@ -7082,9 +7018,7 @@ function _isNumber(x) {
|
|
|
7082
7018
|
*
|
|
7083
7019
|
* R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3}
|
|
7084
7020
|
*/
|
|
7085
|
-
|
|
7086
|
-
var omit = /*#__PURE__*/
|
|
7087
|
-
_curry2(function omit(names, obj) {
|
|
7021
|
+
var omit = /*#__PURE__*/_curry2(function omit(names, obj) {
|
|
7088
7022
|
var result = {};
|
|
7089
7023
|
var index = {};
|
|
7090
7024
|
var idx = 0;
|
|
@@ -7117,17 +7051,16 @@ _curry2(function omit(names, obj) {
|
|
|
7117
7051
|
* R.range(1, 5); //=> [1, 2, 3, 4]
|
|
7118
7052
|
* R.range(50, 53); //=> [50, 51, 52]
|
|
7119
7053
|
*/
|
|
7120
|
-
|
|
7121
|
-
var range = /*#__PURE__*/
|
|
7122
|
-
_curry2(function range(from, to) {
|
|
7054
|
+
var range = /*#__PURE__*/_curry2(function range(from, to) {
|
|
7123
7055
|
if (!(_isNumber(from) && _isNumber(to))) {
|
|
7124
7056
|
throw new TypeError('Both arguments to range must be numbers');
|
|
7125
7057
|
}
|
|
7126
|
-
var result =
|
|
7127
|
-
var
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7058
|
+
var result = Array(from < to ? to - from : 0);
|
|
7059
|
+
var finish = from < 0 ? to + Math.abs(from) : to - from;
|
|
7060
|
+
var idx = 0;
|
|
7061
|
+
while (idx < finish) {
|
|
7062
|
+
result[idx] = idx + from;
|
|
7063
|
+
idx += 1;
|
|
7131
7064
|
}
|
|
7132
7065
|
return result;
|
|
7133
7066
|
});
|
|
@@ -11626,7 +11559,7 @@ var showAGroupOfPagesCenteredOnTheCurrentPage = function showAGroupOfPagesCenter
|
|
|
11626
11559
|
var diff = Math.floor((maxPages - 2) / 2);
|
|
11627
11560
|
return [1].concat(_toConsumableArray(range(page - diff, page + diff + 1)), [totalPages]);
|
|
11628
11561
|
};
|
|
11629
|
-
var determinePagesToShow = cond([[whenThereAreFewerPagesThanWeDisplay, showAllPages], [whenCurrentPageIsLessThanHalfTheTotal, showFirstNPagesAndLastPage], [whenCurrentPageIsGreaterThanHalfTheTotal, showTheLastNPages], [
|
|
11562
|
+
var determinePagesToShow = cond([[whenThereAreFewerPagesThanWeDisplay, showAllPages], [whenCurrentPageIsLessThanHalfTheTotal, showFirstNPagesAndLastPage], [whenCurrentPageIsGreaterThanHalfTheTotal, showTheLastNPages], [T, showAGroupOfPagesCenteredOnTheCurrentPage]]);
|
|
11630
11563
|
var Paginator = function Paginator(_ref) {
|
|
11631
11564
|
var selectedPage = _ref.selectedPage,
|
|
11632
11565
|
totalPages = _ref.totalPages,
|