@spscommerce/utils 5.12.1 → 5.13.0-ie
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/out-tsc/array/flatten.d.ts +1 -0
- package/dist/out-tsc/array/flatten.js +7 -0
- package/dist/out-tsc/array/flatten.js.map +1 -0
- package/dist/out-tsc/array/flatten.spec.d.ts +1 -0
- package/dist/out-tsc/array/flatten.spec.js +10 -0
- package/dist/out-tsc/array/flatten.spec.js.map +1 -0
- package/dist/out-tsc/array/index.d.ts +3 -0
- package/dist/out-tsc/array/index.js +4 -0
- package/dist/out-tsc/array/index.js.map +1 -0
- package/dist/out-tsc/array/is-subset.d.ts +4 -0
- package/dist/out-tsc/array/is-subset.js +41 -0
- package/dist/out-tsc/array/is-subset.js.map +1 -0
- package/dist/out-tsc/array/is-subset.spec.d.ts +1 -0
- package/dist/out-tsc/array/is-subset.spec.js +41 -0
- package/dist/out-tsc/array/is-subset.spec.js.map +1 -0
- package/dist/out-tsc/array/range.d.ts +5 -0
- package/dist/out-tsc/array/range.js +16 -0
- package/dist/out-tsc/array/range.js.map +1 -0
- package/dist/out-tsc/array/range.spec.d.ts +1 -0
- package/dist/out-tsc/array/range.spec.js +26 -0
- package/dist/out-tsc/array/range.spec.js.map +1 -0
- package/dist/out-tsc/classes/custom-event.d.ts +4 -0
- package/dist/out-tsc/classes/custom-event.js +87 -0
- package/dist/out-tsc/classes/custom-event.js.map +1 -0
- package/dist/out-tsc/classes/index.d.ts +1 -0
- package/dist/out-tsc/classes/index.js +2 -0
- package/dist/out-tsc/classes/index.js.map +1 -0
- package/dist/out-tsc/data/doctypes.d.ts +4 -0
- package/dist/out-tsc/data/doctypes.js +302 -0
- package/dist/out-tsc/data/doctypes.js.map +1 -0
- package/dist/out-tsc/data/index.d.ts +1 -0
- package/dist/out-tsc/data/index.js +2 -0
- package/dist/out-tsc/data/index.js.map +1 -0
- package/dist/out-tsc/decorators/cast-to-number.d.ts +5 -0
- package/dist/out-tsc/decorators/cast-to-number.js +29 -0
- package/dist/out-tsc/decorators/cast-to-number.js.map +1 -0
- package/dist/out-tsc/decorators/debounced.broken_spec.d.ts +0 -0
- package/dist/out-tsc/decorators/debounced.broken_spec.js +38 -0
- package/dist/out-tsc/decorators/debounced.broken_spec.js.map +1 -0
- package/dist/out-tsc/decorators/debounced.d.ts +11 -0
- package/dist/out-tsc/decorators/debounced.js +35 -0
- package/dist/out-tsc/decorators/debounced.js.map +1 -0
- package/dist/out-tsc/decorators/index.d.ts +5 -0
- package/dist/out-tsc/decorators/index.js +6 -0
- package/dist/out-tsc/decorators/index.js.map +1 -0
- package/dist/out-tsc/decorators/locked-to-animation-frames.d.ts +4 -0
- package/dist/out-tsc/decorators/locked-to-animation-frames.js +34 -0
- package/dist/out-tsc/decorators/locked-to-animation-frames.js.map +1 -0
- package/dist/out-tsc/decorators/locked-to-animation-frames.spec.d.ts +0 -0
- package/dist/out-tsc/decorators/locked-to-animation-frames.spec.js +63 -0
- package/dist/out-tsc/decorators/locked-to-animation-frames.spec.js.map +1 -0
- package/dist/out-tsc/decorators/simple-metadata-decorator-applicator.d.ts +11 -0
- package/dist/out-tsc/decorators/simple-metadata-decorator-applicator.js +80 -0
- package/dist/out-tsc/decorators/simple-metadata-decorator-applicator.js.map +1 -0
- package/dist/out-tsc/decorators/tick-delay.d.ts +6 -0
- package/dist/out-tsc/decorators/tick-delay.js +31 -0
- package/dist/out-tsc/decorators/tick-delay.js.map +1 -0
- package/dist/out-tsc/function/debounce.d.ts +9 -0
- package/dist/out-tsc/function/debounce.js +102 -0
- package/dist/out-tsc/function/debounce.js.map +1 -0
- package/dist/out-tsc/function/debounce.spec.d.ts +1 -0
- package/dist/out-tsc/function/debounce.spec.js +150 -0
- package/dist/out-tsc/function/debounce.spec.js.map +1 -0
- package/dist/out-tsc/function/debounced-function.interface.d.ts +10 -0
- package/dist/out-tsc/function/debounced-function.interface.js +2 -0
- package/dist/out-tsc/function/debounced-function.interface.js.map +1 -0
- package/dist/out-tsc/function/delayed-function.interface.d.ts +10 -0
- package/dist/out-tsc/function/delayed-function.interface.js +2 -0
- package/dist/out-tsc/function/delayed-function.interface.js.map +1 -0
- package/dist/out-tsc/function/index.d.ts +6 -0
- package/dist/out-tsc/function/index.js +7 -0
- package/dist/out-tsc/function/index.js.map +1 -0
- package/dist/out-tsc/function/lock-to-animation-frames.d.ts +7 -0
- package/dist/out-tsc/function/lock-to-animation-frames.js +43 -0
- package/dist/out-tsc/function/lock-to-animation-frames.js.map +1 -0
- package/dist/out-tsc/function/lock-to-animation-frames.spec.d.ts +0 -0
- package/dist/out-tsc/function/lock-to-animation-frames.spec.js +53 -0
- package/dist/out-tsc/function/lock-to-animation-frames.spec.js.map +1 -0
- package/dist/out-tsc/function/on-next-tick.d.ts +8 -0
- package/dist/out-tsc/function/on-next-tick.js +12 -0
- package/dist/out-tsc/function/on-next-tick.js.map +1 -0
- package/dist/out-tsc/function/on-next-tick.spec.d.ts +1 -0
- package/dist/out-tsc/function/on-next-tick.spec.js +13 -0
- package/dist/out-tsc/function/on-next-tick.spec.js.map +1 -0
- package/dist/out-tsc/function/op.d.ts +32 -0
- package/dist/out-tsc/function/op.js +34 -0
- package/dist/out-tsc/function/op.js.map +1 -0
- package/dist/out-tsc/function/op.spec.d.ts +1 -0
- package/dist/out-tsc/function/op.spec.js +94 -0
- package/dist/out-tsc/function/op.spec.js.map +1 -0
- package/dist/out-tsc/index.d.ts +9 -0
- package/dist/out-tsc/index.js +10 -0
- package/dist/out-tsc/index.js.map +1 -0
- package/dist/out-tsc/number/constrain.d.ts +7 -0
- package/dist/out-tsc/number/constrain.js +16 -0
- package/dist/out-tsc/number/constrain.js.map +1 -0
- package/dist/out-tsc/number/decimal-round.d.ts +7 -0
- package/dist/out-tsc/number/decimal-round.js +19 -0
- package/dist/out-tsc/number/decimal-round.js.map +1 -0
- package/dist/out-tsc/number/decimal-round.spec.d.ts +1 -0
- package/dist/out-tsc/number/decimal-round.spec.js +10 -0
- package/dist/out-tsc/number/decimal-round.spec.js.map +1 -0
- package/dist/out-tsc/number/index.d.ts +3 -0
- package/dist/out-tsc/number/index.js +4 -0
- package/dist/out-tsc/number/index.js.map +1 -0
- package/dist/out-tsc/number/to-file-size-string.d.ts +5 -0
- package/dist/out-tsc/number/to-file-size-string.js +24 -0
- package/dist/out-tsc/number/to-file-size-string.js.map +1 -0
- package/dist/out-tsc/object/copy-property.d.ts +6 -0
- package/dist/out-tsc/object/copy-property.js +9 -0
- package/dist/out-tsc/object/copy-property.js.map +1 -0
- package/dist/out-tsc/object/copy-property.spec.d.ts +1 -0
- package/dist/out-tsc/object/copy-property.spec.js +16 -0
- package/dist/out-tsc/object/copy-property.spec.js.map +1 -0
- package/dist/out-tsc/object/crumble-path.d.ts +6 -0
- package/dist/out-tsc/object/crumble-path.js +9 -0
- package/dist/out-tsc/object/crumble-path.js.map +1 -0
- package/dist/out-tsc/object/crumble-path.spec.d.ts +1 -0
- package/dist/out-tsc/object/crumble-path.spec.js +24 -0
- package/dist/out-tsc/object/crumble-path.spec.js.map +1 -0
- package/dist/out-tsc/object/deep-freeze.d.ts +1 -0
- package/dist/out-tsc/object/deep-freeze.js +36 -0
- package/dist/out-tsc/object/deep-freeze.js.map +1 -0
- package/dist/out-tsc/object/deep-freeze.spec.d.ts +1 -0
- package/dist/out-tsc/object/deep-freeze.spec.js +14 -0
- package/dist/out-tsc/object/deep-freeze.spec.js.map +1 -0
- package/dist/out-tsc/object/diff.d.ts +12 -0
- package/dist/out-tsc/object/diff.js +92 -0
- package/dist/out-tsc/object/diff.js.map +1 -0
- package/dist/out-tsc/object/diff.spec.d.ts +1 -0
- package/dist/out-tsc/object/diff.spec.js +40 -0
- package/dist/out-tsc/object/diff.spec.js.map +1 -0
- package/dist/out-tsc/object/for-each-entry-deep.d.ts +4 -0
- package/dist/out-tsc/object/for-each-entry-deep.js +38 -0
- package/dist/out-tsc/object/for-each-entry-deep.js.map +1 -0
- package/dist/out-tsc/object/for-each-entry-deep.spec.d.ts +1 -0
- package/dist/out-tsc/object/for-each-entry-deep.spec.js +24 -0
- package/dist/out-tsc/object/for-each-entry-deep.spec.js.map +1 -0
- package/dist/out-tsc/object/for-each-nested-object.d.ts +4 -0
- package/dist/out-tsc/object/for-each-nested-object.js +38 -0
- package/dist/out-tsc/object/for-each-nested-object.js.map +1 -0
- package/dist/out-tsc/object/for-each-nested-object.spec.d.ts +1 -0
- package/dist/out-tsc/object/for-each-nested-object.spec.js +46 -0
- package/dist/out-tsc/object/for-each-nested-object.spec.js.map +1 -0
- package/dist/out-tsc/object/get-path.d.ts +5 -0
- package/dist/out-tsc/object/get-path.js +67 -0
- package/dist/out-tsc/object/get-path.js.map +1 -0
- package/dist/out-tsc/object/get-path.spec.d.ts +1 -0
- package/dist/out-tsc/object/get-path.spec.js +44 -0
- package/dist/out-tsc/object/get-path.spec.js.map +1 -0
- package/dist/out-tsc/object/index.d.ts +13 -0
- package/dist/out-tsc/object/index.js +14 -0
- package/dist/out-tsc/object/index.js.map +1 -0
- package/dist/out-tsc/object/merge-deep.d.ts +4 -0
- package/dist/out-tsc/object/merge-deep.js +60 -0
- package/dist/out-tsc/object/merge-deep.js.map +1 -0
- package/dist/out-tsc/object/merge-deep.spec.d.ts +1 -0
- package/dist/out-tsc/object/merge-deep.spec.js +16 -0
- package/dist/out-tsc/object/merge-deep.spec.js.map +1 -0
- package/dist/out-tsc/object/merge-properties-deep.d.ts +4 -0
- package/dist/out-tsc/object/merge-properties-deep.js +61 -0
- package/dist/out-tsc/object/merge-properties-deep.js.map +1 -0
- package/dist/out-tsc/object/merge-properties-deep.spec.d.ts +1 -0
- package/dist/out-tsc/object/merge-properties-deep.spec.js +24 -0
- package/dist/out-tsc/object/merge-properties-deep.spec.js.map +1 -0
- package/dist/out-tsc/object/omit.d.ts +1 -0
- package/dist/out-tsc/object/omit.js +40 -0
- package/dist/out-tsc/object/omit.js.map +1 -0
- package/dist/out-tsc/object/omit.spec.d.ts +1 -0
- package/dist/out-tsc/object/omit.spec.js +10 -0
- package/dist/out-tsc/object/omit.spec.js.map +1 -0
- package/dist/out-tsc/object/set-path.d.ts +2 -0
- package/dist/out-tsc/object/set-path.js +45 -0
- package/dist/out-tsc/object/set-path.js.map +1 -0
- package/dist/out-tsc/object/set-path.spec.d.ts +1 -0
- package/dist/out-tsc/object/set-path.spec.js +36 -0
- package/dist/out-tsc/object/set-path.spec.js.map +1 -0
- package/dist/out-tsc/object/traverse-path.d.ts +2 -0
- package/dist/out-tsc/object/traverse-path.js +81 -0
- package/dist/out-tsc/object/traverse-path.js.map +1 -0
- package/dist/out-tsc/object/values.d.ts +2 -0
- package/dist/out-tsc/object/values.js +31 -0
- package/dist/out-tsc/object/values.js.map +1 -0
- package/dist/out-tsc/object/values.spec.d.ts +1 -0
- package/dist/out-tsc/object/values.spec.js +7 -0
- package/dist/out-tsc/object/values.spec.js.map +1 -0
- package/dist/out-tsc/string/code.template-tag.d.ts +2 -0
- package/dist/out-tsc/string/code.template-tag.js +38 -0
- package/dist/out-tsc/string/code.template-tag.js.map +1 -0
- package/dist/out-tsc/string/index.d.ts +3 -0
- package/dist/out-tsc/string/index.js +4 -0
- package/dist/out-tsc/string/index.js.map +1 -0
- package/dist/out-tsc/string/parse-file-size.d.ts +5 -0
- package/dist/out-tsc/string/parse-file-size.js +43 -0
- package/dist/out-tsc/string/parse-file-size.js.map +1 -0
- package/dist/out-tsc/string/template.d.ts +15 -0
- package/dist/out-tsc/string/template.js +28 -0
- package/dist/out-tsc/string/template.js.map +1 -0
- package/dist/out-tsc/string/template.spec.d.ts +1 -0
- package/dist/out-tsc/string/template.spec.js +39 -0
- package/dist/out-tsc/string/template.spec.js.map +1 -0
- package/dist/out-tsc/typings.d.ts +1 -0
- package/dist/out-tsc/typings.js +2 -0
- package/dist/out-tsc/typings.js.map +1 -0
- package/lib/index.cjs.js +2437 -1
- package/lib/index.es.js +2268 -893
- package/package.json +5 -5
- package/rollup.config.js +22 -0
- package/vite.config.js +1 -1
package/lib/index.es.js
CHANGED
|
@@ -1,1024 +1,2399 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __spreadValues = (a, b) => {
|
|
7
|
-
for (var prop in b || (b = {}))
|
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
-
if (__propIsEnum.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
1
|
function _mergeNamespaces(n, m) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
2
|
+
m.forEach(function (e) {
|
|
3
|
+
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
4
|
+
if (k !== 'default' && !(k in n)) {
|
|
5
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
6
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () { return e[k]; }
|
|
9
|
+
});
|
|
10
|
+
}
|
|
27
11
|
});
|
|
28
|
-
}
|
|
29
12
|
});
|
|
30
|
-
|
|
31
|
-
return Object.freeze(n);
|
|
13
|
+
return Object.freeze(n);
|
|
32
14
|
}
|
|
15
|
+
|
|
33
16
|
function flatten(arg) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
17
|
+
if (!Array.isArray(arg)) {
|
|
18
|
+
return arg;
|
|
19
|
+
}
|
|
20
|
+
return arg.reduce(function (acc, x) { return acc.concat(flatten(x)); }, []);
|
|
38
21
|
}
|
|
22
|
+
|
|
23
|
+
var __values$d = (undefined && undefined.__values) || function(o) {
|
|
24
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
25
|
+
if (m) return m.call(o);
|
|
26
|
+
if (o && typeof o.length === "number") return {
|
|
27
|
+
next: function () {
|
|
28
|
+
if (o && i >= o.length) o = void 0;
|
|
29
|
+
return { value: o && o[i++], done: !o };
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Tests if candidate is a subset of array
|
|
36
|
+
*/
|
|
39
37
|
function isSubset(candidate, array) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
var e_1, _a;
|
|
39
|
+
/*
|
|
40
|
+
* Set.prototype.has is required by the ECMAScript spec to be
|
|
41
|
+
* implemented in sub-linear time, so by converting array to Set
|
|
42
|
+
* we can avoid n^2 complexity. (In WebKit, Sets are HashMaps
|
|
43
|
+
* internally, so has() is constant time)
|
|
44
|
+
*/
|
|
45
|
+
var set = new Set(array);
|
|
46
|
+
try {
|
|
47
|
+
for (var candidate_1 = __values$d(candidate), candidate_1_1 = candidate_1.next(); !candidate_1_1.done; candidate_1_1 = candidate_1.next()) {
|
|
48
|
+
var member = candidate_1_1.value;
|
|
49
|
+
if (!set.has(member)) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
44
53
|
}
|
|
45
|
-
|
|
46
|
-
|
|
54
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
55
|
+
finally {
|
|
56
|
+
try {
|
|
57
|
+
if (candidate_1_1 && !candidate_1_1.done && (_a = candidate_1.return)) _a.call(candidate_1);
|
|
58
|
+
}
|
|
59
|
+
finally { if (e_1) throw e_1.error; }
|
|
60
|
+
}
|
|
61
|
+
return true;
|
|
47
62
|
}
|
|
63
|
+
|
|
64
|
+
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
65
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
66
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
67
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
68
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
69
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
70
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
var __generator$1 = (undefined && undefined.__generator) || function (thisArg, body) {
|
|
74
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
75
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
76
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
77
|
+
function step(op) {
|
|
78
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
79
|
+
while (_) try {
|
|
80
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
81
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
82
|
+
switch (op[0]) {
|
|
83
|
+
case 0: case 1: t = op; break;
|
|
84
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
85
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
86
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
87
|
+
default:
|
|
88
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
89
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
90
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
91
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
92
|
+
if (t[2]) _.ops.pop();
|
|
93
|
+
_.trys.pop(); continue;
|
|
94
|
+
}
|
|
95
|
+
op = body.call(thisArg, _);
|
|
96
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
97
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* If the function is set to be called, cancel the
|
|
102
|
+
* timeout that would call it. Reset id & pending to defaults.
|
|
103
|
+
*
|
|
104
|
+
* @returns - Whether an invocation was actually canceled or not.
|
|
105
|
+
*/
|
|
48
106
|
function resetDebouncedFn() {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
107
|
+
this.pending = false;
|
|
108
|
+
if (typeof this.id === "number") {
|
|
109
|
+
clearTimeout(this.id);
|
|
110
|
+
delete this.id;
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
return false;
|
|
56
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* Takes in a function and returns a new function that debounces it.
|
|
117
|
+
* The returned function returns an observable that can be subscribed to
|
|
118
|
+
* if you need to have something happen when the debounced function
|
|
119
|
+
* finally gets called and returns a value.
|
|
120
|
+
*/
|
|
57
121
|
function debounce(functionToDebounce, milliseconds, thisArg) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
try {
|
|
65
|
-
let output = functionToDebounce.apply(thisArg || this, args);
|
|
66
|
-
if (output instanceof Promise) {
|
|
67
|
-
output = await output;
|
|
68
|
-
}
|
|
69
|
-
resolve(output);
|
|
70
|
-
} catch (err) {
|
|
71
|
-
reject(err);
|
|
72
|
-
} finally {
|
|
122
|
+
var debFn = function debouncedFn() {
|
|
123
|
+
var args = [];
|
|
124
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
125
|
+
args[_i] = arguments[_i];
|
|
126
|
+
}
|
|
127
|
+
return new Promise(function (resolve, reject) {
|
|
73
128
|
debFn.reset();
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
129
|
+
debFn.pending = true;
|
|
130
|
+
function executor() {
|
|
131
|
+
var _this = this;
|
|
132
|
+
void (function () { return __awaiter(_this, void 0, void 0, function () {
|
|
133
|
+
var output, err_1;
|
|
134
|
+
return __generator$1(this, function (_a) {
|
|
135
|
+
switch (_a.label) {
|
|
136
|
+
case 0:
|
|
137
|
+
_a.trys.push([0, 3, 4, 5]);
|
|
138
|
+
output = functionToDebounce.apply(thisArg || this, args);
|
|
139
|
+
if (!(output instanceof Promise)) return [3 /*break*/, 2];
|
|
140
|
+
return [4 /*yield*/, output];
|
|
141
|
+
case 1:
|
|
142
|
+
output = _a.sent();
|
|
143
|
+
_a.label = 2;
|
|
144
|
+
case 2:
|
|
145
|
+
resolve(output);
|
|
146
|
+
return [3 /*break*/, 5];
|
|
147
|
+
case 3:
|
|
148
|
+
err_1 = _a.sent();
|
|
149
|
+
reject(err_1);
|
|
150
|
+
return [3 /*break*/, 5];
|
|
151
|
+
case 4:
|
|
152
|
+
debFn.reset();
|
|
153
|
+
return [7 /*endfinally*/];
|
|
154
|
+
case 5: return [2 /*return*/];
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
}); })();
|
|
158
|
+
}
|
|
159
|
+
debFn.id = window.setTimeout(executor, milliseconds);
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
debFn.reset = resetDebouncedFn.bind(debFn);
|
|
163
|
+
return debFn;
|
|
82
164
|
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* If the function is set to be called, cancel the
|
|
168
|
+
* timeout that would call it. Reset id & pending to defaults.
|
|
169
|
+
*
|
|
170
|
+
* @returns - Whether an invocation was actually canceled or not.
|
|
171
|
+
*/
|
|
83
172
|
function resetLockedFn() {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
173
|
+
this.pending = false;
|
|
174
|
+
if (typeof this.id === "number") {
|
|
175
|
+
window.cancelAnimationFrame(this.id);
|
|
176
|
+
delete this.id;
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
return false;
|
|
91
180
|
}
|
|
181
|
+
/**
|
|
182
|
+
* Return a new function to replace the passed in one which ensures that
|
|
183
|
+
* the given function will run only in `requestAnimationFrame()` and at
|
|
184
|
+
* most once per frame.
|
|
185
|
+
*/
|
|
92
186
|
function lockToAnimationFrames(functionToLock, thisArg) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
187
|
+
var lockFn = function lockedFn() {
|
|
188
|
+
var _this = this;
|
|
189
|
+
var args = [];
|
|
190
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
191
|
+
args[_i] = arguments[_i];
|
|
192
|
+
}
|
|
193
|
+
if (lockFn.pending) {
|
|
194
|
+
lockFn.reset();
|
|
195
|
+
}
|
|
196
|
+
lockFn.id = window.requestAnimationFrame(function () {
|
|
197
|
+
if (functionToLock) {
|
|
198
|
+
functionToLock.apply(thisArg || _this, args);
|
|
199
|
+
}
|
|
200
|
+
lockFn.reset();
|
|
201
|
+
});
|
|
202
|
+
lockFn.pending = true;
|
|
203
|
+
};
|
|
204
|
+
lockFn.pending = false;
|
|
205
|
+
lockFn.reset = resetLockedFn.bind(lockFn);
|
|
206
|
+
return lockFn;
|
|
108
207
|
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Enqueues the given function to run on the next "tick" of the JS event
|
|
211
|
+
* loop cycle. If you ever encounter the "value changed after it was
|
|
212
|
+
* checked" error in Angular when trying to assign a value of a
|
|
213
|
+
* component class, performing that assignment on the next tick, i.e. when
|
|
214
|
+
* all of Angular's current cycle is finished, will resolve that error.
|
|
215
|
+
*/
|
|
109
216
|
function onNextTick(fn, thisArg) {
|
|
110
|
-
|
|
111
|
-
|
|
217
|
+
var boundFn = thisArg ? fn.bind(thisArg) : fn;
|
|
218
|
+
setTimeout(boundFn, 0);
|
|
112
219
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Functions for various operators, most useful in combination
|
|
223
|
+
* with functional programming tools like map, filter, and reduce.
|
|
224
|
+
*/
|
|
225
|
+
var Op = {
|
|
226
|
+
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
|
227
|
+
add: function (a, b) { return a + b; },
|
|
228
|
+
and: function (a, b) { return a && b; },
|
|
229
|
+
band: function (a, b) { return a & b; },
|
|
230
|
+
bor: function (a, b) { return a | b; },
|
|
231
|
+
bxor: function (a, b) { return a ^ b; },
|
|
232
|
+
bnot: function (a) { return ~a; },
|
|
233
|
+
decr: function (a) { return a - 1; },
|
|
234
|
+
div: function (a, b) { return a / b; },
|
|
235
|
+
eq: function (a, b) { return a === b; },
|
|
236
|
+
exp: function (a, b) { return Math.pow(a, b); },
|
|
237
|
+
gt: function (a, b) { return a > b; },
|
|
238
|
+
gte: function (a, b) { return a >= b; },
|
|
239
|
+
incr: function (a) { return a + 1; },
|
|
240
|
+
lshift: function (a, b) { return a << b; },
|
|
241
|
+
lt: function (a, b) { return a < b; },
|
|
242
|
+
lte: function (a, b) { return a <= b; },
|
|
243
|
+
mul: function (a, b) { return a * b; },
|
|
244
|
+
neg: function (a) { return -a; },
|
|
245
|
+
neq: function (a, b) { return a !== b; },
|
|
246
|
+
not: function (a) { return !a; },
|
|
247
|
+
or: function (a, b) { return a || b; },
|
|
248
|
+
rem: function (a, b) { return a % b; },
|
|
249
|
+
rshift: function (a, b) { return a >> b; },
|
|
250
|
+
rshift_zf: function (a, b) { return a >>> b; },
|
|
251
|
+
sub: function (a, b) { return a - b; },
|
|
252
|
+
xor: function (a, b) { return (a || b) && !(a && b); },
|
|
140
253
|
};
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Unlike lodash range, includes the specified end number.
|
|
257
|
+
* So range(1, 10) gives you 1-10 instead of 1-9.
|
|
258
|
+
*/
|
|
141
259
|
function range(start, end) {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
260
|
+
if (!Number.isInteger(start)) {
|
|
261
|
+
throw new Error("start must be an integer");
|
|
262
|
+
}
|
|
263
|
+
if (!Number.isInteger(end)) {
|
|
264
|
+
throw new Error("end must be an integer");
|
|
265
|
+
}
|
|
266
|
+
return new Array(Math.abs(end - start) + 1).fill(start)
|
|
267
|
+
.map(start > end ? Op.sub : Op.add);
|
|
149
268
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
event[key] = initDict[key];
|
|
269
|
+
|
|
270
|
+
/* eslint-disable @typescript-eslint/no-redeclare, @typescript-eslint/no-extraneous-class */
|
|
271
|
+
/** docs:ignore */
|
|
272
|
+
var __values$c = (undefined && undefined.__values) || function(o) {
|
|
273
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
274
|
+
if (m) return m.call(o);
|
|
275
|
+
if (o && typeof o.length === "number") return {
|
|
276
|
+
next: function () {
|
|
277
|
+
if (o && i >= o.length) o = void 0;
|
|
278
|
+
return { value: o && o[i++], done: !o };
|
|
161
279
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
280
|
+
};
|
|
281
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
282
|
+
};
|
|
283
|
+
/*
|
|
284
|
+
* This was intended to be a replacement for Event that allows subclassing
|
|
285
|
+
* However it doesn't work in all browsers
|
|
286
|
+
* TODO: Drop this, use built-in CustomEvent once IE11 is dead
|
|
287
|
+
*/
|
|
288
|
+
var CustomEvent = /** @class */ (function () {
|
|
289
|
+
function CustomEvent(eventName, initDict) {
|
|
290
|
+
var e_1, _a, e_2, _b, e_3, _c;
|
|
291
|
+
if (initDict === void 0) { initDict = {}; }
|
|
292
|
+
var event;
|
|
293
|
+
if (typeof Event === "function") {
|
|
294
|
+
event = new Event(eventName, initDict);
|
|
171
295
|
}
|
|
172
|
-
|
|
296
|
+
else {
|
|
297
|
+
// IE11
|
|
298
|
+
event = document.createEvent("Event");
|
|
299
|
+
event.initEvent(eventName, initDict.bubbles, initDict.cancelable);
|
|
300
|
+
try {
|
|
301
|
+
for (var _d = __values$c(Object.keys(initDict)), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
302
|
+
var key = _e.value;
|
|
303
|
+
if (key !== "bubbles" && key !== "cancelable") {
|
|
304
|
+
event[key] = initDict[key];
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
309
|
+
finally {
|
|
310
|
+
try {
|
|
311
|
+
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
|
|
312
|
+
}
|
|
313
|
+
finally { if (e_1) throw e_1.error; }
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
Object.setPrototypeOf(this, event);
|
|
317
|
+
/*
|
|
318
|
+
* Native functions like the getters, setters, and methods on Event.prototype
|
|
319
|
+
* cannot be called with "this" being a custom object. So what we're doing here
|
|
320
|
+
* works around that.
|
|
321
|
+
*/
|
|
322
|
+
var descriptors = Object.getOwnPropertyDescriptors(Event.prototype);
|
|
323
|
+
try {
|
|
324
|
+
for (var _f = __values$c(Object.keys(descriptors)), _g = _f.next(); !_g.done; _g = _f.next()) {
|
|
325
|
+
var propKey = _g.value;
|
|
326
|
+
var descriptor = descriptors[propKey];
|
|
327
|
+
try {
|
|
328
|
+
for (var _h = (e_3 = void 0, __values$c(Object.keys(descriptor))), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
329
|
+
var key = _j.value;
|
|
330
|
+
if (typeof descriptor[key] === "function") {
|
|
331
|
+
descriptor[key] = descriptor[key].bind(event);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
336
|
+
finally {
|
|
337
|
+
try {
|
|
338
|
+
if (_j && !_j.done && (_c = _h.return)) _c.call(_h);
|
|
339
|
+
}
|
|
340
|
+
finally { if (e_3) throw e_3.error; }
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
345
|
+
finally {
|
|
346
|
+
try {
|
|
347
|
+
if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
|
|
348
|
+
}
|
|
349
|
+
finally { if (e_2) throw e_2.error; }
|
|
350
|
+
}
|
|
351
|
+
Object.defineProperties(this, descriptors);
|
|
173
352
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
353
|
+
return CustomEvent;
|
|
354
|
+
}());
|
|
355
|
+
|
|
356
|
+
var EDI_DOCUMENT_TYPE = Object.freeze({
|
|
357
|
+
100: { name: "Insurance Plan Description" },
|
|
358
|
+
101: { name: "Name and Address Lists" },
|
|
359
|
+
104: { name: "Air Shipment Information" },
|
|
360
|
+
106: { name: "Motor Carrier Rate Proposal" },
|
|
361
|
+
107: { name: "Request for Motor Carrier Rate Proposal" },
|
|
362
|
+
108: { name: "Response to a Motor Carrier Rate Proposal" },
|
|
363
|
+
109: { name: "Vessel Content Details" },
|
|
364
|
+
110: { name: "Air Freight Details and Invoice" },
|
|
365
|
+
112: { name: "Property Damage Report" },
|
|
366
|
+
120: { name: "Vehicle Shipping Order" },
|
|
367
|
+
121: { name: "Vehicle Service" },
|
|
368
|
+
124: { name: "Vehicle Damage" },
|
|
369
|
+
125: { name: "Multilevel Railcar Load Details" },
|
|
370
|
+
126: { name: "Vehicle Application Advice" },
|
|
371
|
+
127: { name: "Vehicle Baying Order" },
|
|
372
|
+
128: { name: "Dealer Information" },
|
|
373
|
+
129: { name: "Vehicle Carrier Rate Update" },
|
|
374
|
+
130: { name: "Student Educational Record (Transcript)" },
|
|
375
|
+
131: { name: "Student Educational Record (Transcript) Acknowledgment" },
|
|
376
|
+
135: { name: "Student Loan Application" },
|
|
377
|
+
138: { name: "Testing Results Request and Report" },
|
|
378
|
+
139: { name: "Student Loan Guarantee Result" },
|
|
379
|
+
140: { name: "Product Registration" },
|
|
380
|
+
141: { name: "Product Service Claim Response" },
|
|
381
|
+
142: { name: "Product Service Claim" },
|
|
382
|
+
143: { name: "Product Service Notification" },
|
|
383
|
+
144: { name: "Student Loan Transfer and Status Verification" },
|
|
384
|
+
146: { name: "Request for Student Educational Record (Transcript)" },
|
|
385
|
+
147: { name: "Response to Request for Student Educational Record (Transcript)" },
|
|
386
|
+
148: { name: "Report of Injury, Illness or Incident" },
|
|
387
|
+
149: { name: "Notice of Tax Adjustment or Assessment" },
|
|
388
|
+
150: { name: "Tax Rate Notification" },
|
|
389
|
+
151: { name: "Electronic Filing of Tax Return Data Acknowledgment" },
|
|
390
|
+
152: { name: "Statistical Government Information" },
|
|
391
|
+
153: { name: "Unemployment Insurance Tax Claim or Charge Information" },
|
|
392
|
+
154: { name: "Uniform Commercial Code Filing" },
|
|
393
|
+
155: { name: "Business Credit Report" },
|
|
394
|
+
157: { name: "Notice of Power of Attorney" },
|
|
395
|
+
159: { name: "Motion Picture Booking Confirmation" },
|
|
396
|
+
160: { name: "Transportation Automatic Equipment Identification" },
|
|
397
|
+
161: { name: "Train Sheet" },
|
|
398
|
+
169: { name: "Transportation Appointment Schedule Information" },
|
|
399
|
+
170: { name: "Revenue Receipts Statement" },
|
|
400
|
+
175: { name: "Court and Law Enforcement Notice" },
|
|
401
|
+
176: { name: "Court Submission TYPE" },
|
|
402
|
+
180: { name: "Return Merchandise Authorization and Notification" },
|
|
403
|
+
185: { name: "Royalty Regulatory Report" },
|
|
404
|
+
186: { name: "Insurance Underwriting Requirements Reporting" },
|
|
405
|
+
188: { name: "Educational Course Inventory" },
|
|
406
|
+
189: { name: "Application for Admission to Educational Institutions" },
|
|
407
|
+
190: { name: "Student Enrollment Verification" },
|
|
408
|
+
191: { name: "Student Loan Pre-Claims and Claims" },
|
|
409
|
+
194: { name: "Grant or Assistance Application" },
|
|
410
|
+
195: { name: "Federal Communications Commission (FCC) License Application" },
|
|
411
|
+
196: { name: "Contractor Cost Data Reporting" },
|
|
412
|
+
197: { name: "Real Estate Title Evidence" },
|
|
413
|
+
198: { name: "Loan Verification Information" },
|
|
414
|
+
199: { name: "Real Estate Settlement Information" },
|
|
415
|
+
200: { name: "Mortgage Credit Report" },
|
|
416
|
+
201: { name: "Residential Loan Application" },
|
|
417
|
+
202: { name: "Secondary Mortgage Market Loan Delivery" },
|
|
418
|
+
203: { name: "Secondary Mortgage Market Investor Report" },
|
|
419
|
+
204: { name: "Motor Carrier Load Tender" },
|
|
420
|
+
205: { name: "Mortgage Note" },
|
|
421
|
+
206: { name: "Real Estate Inspection" },
|
|
422
|
+
210: { name: "Motor Carrier Freight Details and Invoice" },
|
|
423
|
+
211: { name: "Motor Carrier Bill of Lading", edifactId: "IFTMCE" },
|
|
424
|
+
212: { name: "Motor Carrier Delivery Trailer Manifest" },
|
|
425
|
+
213: { name: "Motor Carrier Shipment Status Inquiry" },
|
|
426
|
+
214: { name: "Transportation Carrier Shipment Status Message" },
|
|
427
|
+
215: { name: "Motor Carrier Pick-up Manifest" },
|
|
428
|
+
216: { name: "Motor Carrier Shipment Pick-up Notification" },
|
|
429
|
+
217: { name: "Motor Carrier Loading and Route Guide" },
|
|
430
|
+
218: { name: "Motor Carrier Tariff Information" },
|
|
431
|
+
219: { name: "Logistics Service Request" },
|
|
432
|
+
220: { name: "Logistics Service Response" },
|
|
433
|
+
222: { name: "Cartage Work Assignment" },
|
|
434
|
+
223: { name: "Consolidators Freight Bill and Invoice" },
|
|
435
|
+
224: { name: "Motor Carrier Summary Freight Bill Manifest" },
|
|
436
|
+
225: { name: "Response to a Cartage Work Assignment" },
|
|
437
|
+
240: { name: "Motor Carrier Package Status" },
|
|
438
|
+
242: { name: "Data Status Tracking" },
|
|
439
|
+
244: { name: "Product Source Information" },
|
|
440
|
+
248: { name: "Account Assignment/Inquiry and Service/Status" },
|
|
441
|
+
249: { name: "Animal Toxicological Data" },
|
|
442
|
+
250: { name: "Purchase Order Shipment Management Document" },
|
|
443
|
+
251: { name: "Pricing Support" },
|
|
444
|
+
252: { name: "Insurance Producer Administration" },
|
|
445
|
+
255: { name: "Underwriting Information Services" },
|
|
446
|
+
256: { name: "Periodic Compensation" },
|
|
447
|
+
260: { name: "Application for Mortgage Insurance Benefits" },
|
|
448
|
+
261: { name: "Real Estate Information Request" },
|
|
449
|
+
262: { name: "Real Estate Information Report" },
|
|
450
|
+
263: { name: "Residential Mortgage Insurance Application Response" },
|
|
451
|
+
264: { name: "Mortgage Loan Default Status" },
|
|
452
|
+
265: { name: "Real Estate Title Insurance Services Order" },
|
|
453
|
+
266: { name: "Mortgage or Property Record Change Notification" },
|
|
454
|
+
267: { name: "Individual Life, Annuity and Disability Application" },
|
|
455
|
+
268: { name: "Annuity Activity" },
|
|
456
|
+
270: { name: "Eligibility, Coverage or Benefit Inquiry" },
|
|
457
|
+
271: { name: "Eligibility, Coverage or Benefit Information" },
|
|
458
|
+
272: { name: "Property and Casualty Loss Notification" },
|
|
459
|
+
273: { name: "Insurance/Annuity Application Status" },
|
|
460
|
+
274: { name: "Health Care Provider Information" },
|
|
461
|
+
275: { name: "Patient Information" },
|
|
462
|
+
276: { name: "Health Care Claim Status Request" },
|
|
463
|
+
277: { name: "Health Care Claim Status Notification" },
|
|
464
|
+
278: { name: "Health Care Services Insurance/Benefit Review Information" },
|
|
465
|
+
280: { name: "Voter Registration Information" },
|
|
466
|
+
285: { name: "Commercial Vehicle Safety and Credentials Information Exchange" },
|
|
467
|
+
286: { name: "Commercial Vehicle Credentials" },
|
|
468
|
+
288: { name: "Wage Determination" },
|
|
469
|
+
290: { name: "Cooperative Advertising Agreements" },
|
|
470
|
+
300: { name: "Reservation (Booking Request) (Ocean)" },
|
|
471
|
+
301: { name: "Confirmation (Ocean)", edifactId: "IFTMBC" },
|
|
472
|
+
303: { name: "Booking Cancellation (Ocean)" },
|
|
473
|
+
304: { name: "Shipping Instructions" },
|
|
474
|
+
309: { name: "U.S. Customs Manifest" },
|
|
475
|
+
310: { name: "Freight Receipt and Invoice (Ocean)" },
|
|
476
|
+
311: { name: "Canadian Customs Information" },
|
|
477
|
+
312: { name: "Arrival Notice (Ocean)" },
|
|
478
|
+
313: { name: "Shipment Status Inquiry (Ocean)" },
|
|
479
|
+
315: { name: "Status Details (Ocean)" },
|
|
480
|
+
317: { name: "Delivery/Pickup Order" },
|
|
481
|
+
319: { name: "Terminal Information" },
|
|
482
|
+
322: { name: "Terminal Operations and Intermodal Ramp Activity" },
|
|
483
|
+
323: { name: "Vessel Schedule and Itinerary (Ocean)" },
|
|
484
|
+
324: { name: "Vessel Stow Plan (Ocean)" },
|
|
485
|
+
325: { name: "Consolidation of Goods In Container" },
|
|
486
|
+
326: { name: "Consignment Summary List" },
|
|
487
|
+
350: { name: "U.S. Customs Status Information" },
|
|
488
|
+
352: { name: "U.S. Customs Carrier General Order Status" },
|
|
489
|
+
353: { name: "U.S. Customs Events Advisory Details" },
|
|
490
|
+
354: { name: "U.S. Customs Automated Manifest Archive Status" },
|
|
491
|
+
355: { name: "U.S. Customs Acceptance/Rejection" },
|
|
492
|
+
356: { name: "U.S. Customs Permit to Transfer Request" },
|
|
493
|
+
357: { name: "U.S. Customs In-Bond Information" },
|
|
494
|
+
358: { name: "U.S. Customs Consist Information" },
|
|
495
|
+
361: { name: "Carrier Interchange Agreement (Ocean)" },
|
|
496
|
+
362: { name: "Cargo Insurance Advice of Shipment" },
|
|
497
|
+
404: { name: "Rail Carrier Shipment Information" },
|
|
498
|
+
410: { name: "Rail Carrier Freight Details and Invoice" },
|
|
499
|
+
411: { name: "Rail Carrier Freight Details and Invoice Summary" },
|
|
500
|
+
412: { name: "Trailer or Container Repair Billing" },
|
|
501
|
+
414: { name: "Rail Carhire Settlements" },
|
|
502
|
+
417: { name: "Rail Carrier Waybill Interchange" },
|
|
503
|
+
418: { name: "Rail Advance Interchange Consist" },
|
|
504
|
+
419: { name: "Advance Car Disposition" },
|
|
505
|
+
420: { name: "Car Handling Information" },
|
|
506
|
+
421: { name: "Estimated Time of Arrival and Car Scheduling" },
|
|
507
|
+
422: { name: "Shipper's Car Order" },
|
|
508
|
+
423: { name: "Rail Industrial Switch List" },
|
|
509
|
+
424: { name: "Rail Carrier Services Settlement" },
|
|
510
|
+
425: { name: "Rail Waybill Request" },
|
|
511
|
+
426: { name: "Rail Revenue Waybill" },
|
|
512
|
+
427: { name: "Rail Waybill Response" },
|
|
513
|
+
429: { name: "Railroad Retirement Activity" },
|
|
514
|
+
431: { name: "Railroad Station Master File" },
|
|
515
|
+
432: { name: "Rail Deprescription" },
|
|
516
|
+
433: { name: "Railroad Reciprocal Switch File" },
|
|
517
|
+
434: { name: "Railroad Mark Register Update Activity" },
|
|
518
|
+
435: { name: "Standard Transportation Commodity Code (STCC) Master" },
|
|
519
|
+
436: { name: "Locomotive Information" },
|
|
520
|
+
437: { name: "Railroad Junctions and Interchanges Activity" },
|
|
521
|
+
440: { name: "Shipment Weights" },
|
|
522
|
+
451: { name: "Railroad Event Report" },
|
|
523
|
+
452: { name: "Railroad Problem Log Inquiry or Advice" },
|
|
524
|
+
453: { name: "Railroad Service Commitment Advice" },
|
|
525
|
+
455: { name: "Railroad Parameter Trace Registration" },
|
|
526
|
+
456: { name: "Railroad Equipment Inquiry or Advice" },
|
|
527
|
+
460: { name: "Railroad Price Distribution Request or Response" },
|
|
528
|
+
463: { name: "Rail Rate Reply" },
|
|
529
|
+
466: { name: "Rate Request" },
|
|
530
|
+
468: { name: "Rate Docket Journal Log" },
|
|
531
|
+
470: { name: "Railroad Clearance" },
|
|
532
|
+
475: { name: "Rail Route File Maintenance" },
|
|
533
|
+
485: { name: "Ratemaking Action" },
|
|
534
|
+
486: { name: "Rate Docket Expiration" },
|
|
535
|
+
490: { name: "Rate Group Definition" },
|
|
536
|
+
492: { name: "Miscellaneous Rates" },
|
|
537
|
+
494: { name: "Rail Scale Rates" },
|
|
538
|
+
500: { name: "Medical Event Reporting" },
|
|
539
|
+
501: { name: "Vendor Performance Review" },
|
|
540
|
+
503: { name: "Pricing History" },
|
|
541
|
+
504: { name: "Clauses and Provisions" },
|
|
542
|
+
511: { name: "Requisition" },
|
|
543
|
+
517: { name: "Material Obligation Validation" },
|
|
544
|
+
521: { name: "Income or Asset Offset" },
|
|
545
|
+
527: { name: "Material Due-In and Receipt" },
|
|
546
|
+
536: { name: "Logistics Reassignment" },
|
|
547
|
+
540: { name: "Notice of Employment Status" },
|
|
548
|
+
561: { name: "Contract Abstract" },
|
|
549
|
+
567: { name: "Contract Completion Status" },
|
|
550
|
+
568: { name: "Contract Payment Management Report" },
|
|
551
|
+
601: { name: "U.S. Customs Export Shipment Information" },
|
|
552
|
+
602: { name: "Transportation Services Tender" },
|
|
553
|
+
620: { name: "Excavation Communication" },
|
|
554
|
+
625: { name: "Well Information" },
|
|
555
|
+
650: { name: "Maintenance Service Order" },
|
|
556
|
+
715: { name: "Intermodal Group Loading Plan" },
|
|
557
|
+
805: { name: "Contract Pricing Proposal" },
|
|
558
|
+
806: { name: "Project Schedule Reporting" },
|
|
559
|
+
810: { name: "Invoice", edifactId: "INVOIC" },
|
|
560
|
+
811: { name: "Consolidated Service Invoice/Statement" },
|
|
561
|
+
812: { name: "Credit/Debit Adjustment" },
|
|
562
|
+
813: { name: "Electronic Filing of Tax Return Data" },
|
|
563
|
+
814: { name: "General Request, Response or Confirmation" },
|
|
564
|
+
815: { name: "Cryptographic Service Message" },
|
|
565
|
+
816: { name: "Organizational Relationships" },
|
|
566
|
+
818: { name: "Commission Sales Report" },
|
|
567
|
+
819: { name: "Operating Expense Statement" },
|
|
568
|
+
820: { name: "Payment Order/Remittance Advice", edifactId: "REMADV" },
|
|
569
|
+
821: { name: "Financial Information Reporting" },
|
|
570
|
+
822: { name: "Account Analysis" },
|
|
571
|
+
823: { name: "Lockbox" },
|
|
572
|
+
824: { name: "Application Advice", edifactId: "APERAK" },
|
|
573
|
+
826: { name: "Tax Information Exchange" },
|
|
574
|
+
827: { name: "Financial Return Notice" },
|
|
575
|
+
828: { name: "Debit Authorization" },
|
|
576
|
+
829: { name: "Payment Cancellation Request" },
|
|
577
|
+
830: { name: "Planning Schedule with Release Capability", edifactId: "DELFOR" },
|
|
578
|
+
831: { name: "Application Control Totals" },
|
|
579
|
+
832: { name: "Price/Sales Catalog", edifactId: "PRICAT" },
|
|
580
|
+
833: { name: "Mortgage Credit Report Order" },
|
|
581
|
+
834: { name: "Benefit Enrollment and Maintenance" },
|
|
582
|
+
835: { name: "Health Care Claim Payment/Advice" },
|
|
583
|
+
836: { name: "Procurement Notices" },
|
|
584
|
+
837: { name: "Health Care Claim" },
|
|
585
|
+
838: { name: "Trading Partner Profile" },
|
|
586
|
+
839: { name: "Project Cost Reporting" },
|
|
587
|
+
840: { name: "Request for Quotation", edifactId: "REQUOTE" },
|
|
588
|
+
841: { name: "Specifications/Technical Information" },
|
|
589
|
+
842: { name: "Nonconformance Report" },
|
|
590
|
+
843: { name: "Response to Request for Quotation", edifactId: "QUOTES" },
|
|
591
|
+
844: { name: "Product Transfer Account Adjustment", edifactId: "SSDCLM" },
|
|
592
|
+
845: { name: "Price Authorization Acknowledgment/Status", edifactId: "ATHSTS" },
|
|
593
|
+
846: { name: "Inventory Inquiry/Advice", edifactId: "INVRPT" },
|
|
594
|
+
847: { name: "Material Claim" },
|
|
595
|
+
848: { name: "Material Safety Data Sheet" },
|
|
596
|
+
849: { name: "Response to Product Transfer Account Adjustment" },
|
|
597
|
+
850: { name: "Purchase Order", edifactId: "ORDERS" },
|
|
598
|
+
851: { name: "Asset Schedule" },
|
|
599
|
+
852: { name: "Product Activity Data", edifactId: "SLSRPT" },
|
|
600
|
+
853: { name: "Routing and Carrier Instruction" },
|
|
601
|
+
854: { name: "Shipment Delivery Discrepancy Information" },
|
|
602
|
+
855: { name: "Purchase Order Acknowledgment", edifactId: "ORDRSP" },
|
|
603
|
+
856: { name: "Advance Ship Notice/Manifest", edifactId: "DESADV" },
|
|
604
|
+
857: { name: "Shipment and Billing Notice" },
|
|
605
|
+
858: { name: "Shipment Information" },
|
|
606
|
+
859: { name: "Freight Invoice" },
|
|
607
|
+
860: { name: "Purchase Order Change", edifactId: "ORDCHG" },
|
|
608
|
+
861: { name: "Receiving Advice/Acceptance Certificate", edifactId: "RECADV" },
|
|
609
|
+
862: { name: "Shipping Schedule", edifactId: "DELJIT" },
|
|
610
|
+
863: { name: "Report of Test Results" },
|
|
611
|
+
864: { name: "Text Message" },
|
|
612
|
+
865: { name: "Purchase Order Change", edifactId: "ORDRSP" },
|
|
613
|
+
866: { name: "Production Sequence" },
|
|
614
|
+
867: { name: "Product Transfer and Resale Report", edifactId: "SLSRPT" },
|
|
615
|
+
868: { name: "Electronic Form Structure" },
|
|
616
|
+
869: { name: "Order Status Inquiry", edifactId: "ORSSTA" },
|
|
617
|
+
870: { name: "Order Status Report", edifactId: "ORDREP" },
|
|
618
|
+
871: { name: "Component Parts Content" },
|
|
619
|
+
872: { name: "Residential Mortgage Insurance Application" },
|
|
620
|
+
875: { name: "Grocery Products Purchase Order" },
|
|
621
|
+
876: { name: "Grocery Products Purchase Order Change" },
|
|
622
|
+
877: { name: "Manufacturer Coupon Family Code Structure" },
|
|
623
|
+
878: { name: "Product Authorization/De-authorization" },
|
|
624
|
+
879: { name: "Price Information" },
|
|
625
|
+
880: { name: "Grocery Products Invoice" },
|
|
626
|
+
881: { name: "Manufacturer Coupon Redemption Detail" },
|
|
627
|
+
882: { name: "Direct Store Delivery Summary Information" },
|
|
628
|
+
883: { name: "Market Development Fund Allocation" },
|
|
629
|
+
884: { name: "Market Development Fund Settlement" },
|
|
630
|
+
885: { name: "Retail Account Characteristics" },
|
|
631
|
+
886: { name: "Customer Call Reporting" },
|
|
632
|
+
887: { name: "Coupon Notification" },
|
|
633
|
+
888: { name: "Item Maintenance" },
|
|
634
|
+
889: { name: "Promotion Announcement" },
|
|
635
|
+
891: { name: "Deduction Research Report" },
|
|
636
|
+
893: { name: "Item Information Request" },
|
|
637
|
+
894: { name: "Delivery/Return Base Record" },
|
|
638
|
+
895: { name: "Delivery/Return Acknowledgment or Adjustment" },
|
|
639
|
+
896: { name: "Product Dimension Maintenance" },
|
|
640
|
+
920: { name: "Loss or Damage Claim - General Commodities" },
|
|
641
|
+
924: { name: "Loss or Damage Claim - Motor Vehicle" },
|
|
642
|
+
925: { name: "Claim Tracer" },
|
|
643
|
+
926: { name: "Claim Status Report and Tracer Reply" },
|
|
644
|
+
928: { name: "Automotive Inspection Detail" },
|
|
645
|
+
940: { name: "Warehouse Shipping Order" },
|
|
646
|
+
943: { name: "Warehouse Stock Transfer Shipment Advice" },
|
|
647
|
+
944: { name: "Warehouse Stock Transfer Receipt Advice" },
|
|
648
|
+
945: { name: "Warehouse Shipping Advice" },
|
|
649
|
+
947: { name: "Warehouse Inventory Adjustment Advice" },
|
|
650
|
+
980: { name: "Functional Group Totals" },
|
|
651
|
+
990: { name: "Response to a Load Tender" },
|
|
652
|
+
996: { name: "File Transfer" },
|
|
653
|
+
997: { name: "Functional Acknowledgment", edifactId: "CONTROL" },
|
|
654
|
+
998: { name: "Set Cancellation" },
|
|
655
|
+
999: { name: "Implementation Acknowledgment" },
|
|
477
656
|
});
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* A property decorated with this will have any value assigned
|
|
660
|
+
* to it cast to a number with the unary `+` operator.
|
|
661
|
+
*/
|
|
478
662
|
function castToNumber() {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
663
|
+
return function (target, key) {
|
|
664
|
+
var _a;
|
|
665
|
+
var internalKey = "_" + String(key);
|
|
666
|
+
Object.defineProperties(target, (_a = {},
|
|
667
|
+
_a[internalKey] = {
|
|
668
|
+
enumerable: false,
|
|
669
|
+
configurable: true,
|
|
670
|
+
writable: true,
|
|
671
|
+
value: undefined,
|
|
672
|
+
},
|
|
673
|
+
_a[key] = {
|
|
674
|
+
enumerable: true,
|
|
675
|
+
configurable: true,
|
|
676
|
+
get: function () {
|
|
677
|
+
return this[internalKey];
|
|
678
|
+
},
|
|
679
|
+
set: function (newValue) {
|
|
680
|
+
this[internalKey] = Number(newValue);
|
|
681
|
+
},
|
|
682
|
+
},
|
|
683
|
+
_a));
|
|
684
|
+
};
|
|
500
685
|
}
|
|
686
|
+
|
|
687
|
+
var __assign$3 = (undefined && undefined.__assign) || function () {
|
|
688
|
+
__assign$3 = Object.assign || function(t) {
|
|
689
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
690
|
+
s = arguments[i];
|
|
691
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
692
|
+
t[p] = s[p];
|
|
693
|
+
}
|
|
694
|
+
return t;
|
|
695
|
+
};
|
|
696
|
+
return __assign$3.apply(this, arguments);
|
|
697
|
+
};
|
|
698
|
+
/**
|
|
699
|
+
* Decorator that applies `debounce`
|
|
700
|
+
*/
|
|
501
701
|
function debounced(ms) {
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
702
|
+
return function (target, propertyKey, descriptor) {
|
|
703
|
+
var originalDescriptorCopy = __assign$3({}, descriptor);
|
|
704
|
+
originalDescriptorCopy.get = function get() {
|
|
705
|
+
/*
|
|
706
|
+
* Make a new copy each time; if you don't then every instance after the first
|
|
707
|
+
* one of the class containing the decorated method will break.
|
|
708
|
+
*/
|
|
709
|
+
var newDescriptorWithDebounced = __assign$3({}, originalDescriptorCopy);
|
|
710
|
+
newDescriptorWithDebounced.value = debounce(originalDescriptorCopy.value, ms, this);
|
|
711
|
+
Object.defineProperty(this, propertyKey, newDescriptorWithDebounced);
|
|
712
|
+
return newDescriptorWithDebounced.value;
|
|
713
|
+
};
|
|
714
|
+
originalDescriptorCopy.configurable = true;
|
|
715
|
+
delete originalDescriptorCopy.writable;
|
|
716
|
+
delete originalDescriptorCopy.value;
|
|
717
|
+
return originalDescriptorCopy;
|
|
509
718
|
};
|
|
510
|
-
originalDescriptorCopy.configurable = true;
|
|
511
|
-
delete originalDescriptorCopy.writable;
|
|
512
|
-
delete originalDescriptorCopy.value;
|
|
513
|
-
return originalDescriptorCopy;
|
|
514
|
-
};
|
|
515
719
|
}
|
|
720
|
+
|
|
721
|
+
var __assign$2 = (undefined && undefined.__assign) || function () {
|
|
722
|
+
__assign$2 = Object.assign || function(t) {
|
|
723
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
724
|
+
s = arguments[i];
|
|
725
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
726
|
+
t[p] = s[p];
|
|
727
|
+
}
|
|
728
|
+
return t;
|
|
729
|
+
};
|
|
730
|
+
return __assign$2.apply(this, arguments);
|
|
731
|
+
};
|
|
732
|
+
/**
|
|
733
|
+
* Decorator that applies `lockToAnimationFrames`
|
|
734
|
+
*/
|
|
516
735
|
function lockedToAnimationFrames(target, propertyKey, descriptor) {
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
736
|
+
var originalDescriptorCopy = __assign$2({}, descriptor);
|
|
737
|
+
descriptor.get = function get() {
|
|
738
|
+
/*
|
|
739
|
+
* Make a new copy each time; if you don't then every instance after the first
|
|
740
|
+
* one of the class containing the decorated method will break.
|
|
741
|
+
*/
|
|
742
|
+
var newDescriptor = __assign$2({}, originalDescriptorCopy);
|
|
743
|
+
newDescriptor.value = lockToAnimationFrames(originalDescriptorCopy.value, this);
|
|
744
|
+
Object.defineProperty(this, propertyKey, newDescriptor);
|
|
745
|
+
return newDescriptor.value;
|
|
746
|
+
};
|
|
747
|
+
descriptor.configurable = true;
|
|
748
|
+
delete descriptor.writable;
|
|
749
|
+
delete descriptor.value;
|
|
750
|
+
return descriptor;
|
|
528
751
|
}
|
|
752
|
+
|
|
753
|
+
var __assign$1 = (undefined && undefined.__assign) || function () {
|
|
754
|
+
__assign$1 = Object.assign || function(t) {
|
|
755
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
756
|
+
s = arguments[i];
|
|
757
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
758
|
+
t[p] = s[p];
|
|
759
|
+
}
|
|
760
|
+
return t;
|
|
761
|
+
};
|
|
762
|
+
return __assign$1.apply(this, arguments);
|
|
763
|
+
};
|
|
764
|
+
var __values$b = (undefined && undefined.__values) || function(o) {
|
|
765
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
766
|
+
if (m) return m.call(o);
|
|
767
|
+
if (o && typeof o.length === "number") return {
|
|
768
|
+
next: function () {
|
|
769
|
+
if (o && i >= o.length) o = void 0;
|
|
770
|
+
return { value: o && o[i++], done: !o };
|
|
771
|
+
}
|
|
772
|
+
};
|
|
773
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
774
|
+
};
|
|
775
|
+
/**
|
|
776
|
+
* This would be simpler to understand as a factory that returns a decorator function,
|
|
777
|
+
* but TypeScript AoT compliation doesn't allow that. This lets you create a decorator
|
|
778
|
+
* that takes in a metadata object as an argument and assigns its values along with
|
|
779
|
+
* default values to the decorated method. The decorator will look like a standard
|
|
780
|
+
* decorator but calling this method and returning the result is the only thing it
|
|
781
|
+
* needs to do.
|
|
782
|
+
*/
|
|
529
783
|
function simpleMetadataDecoratorApplicator(metadata, defaults, target, key, descriptor) {
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
784
|
+
var updatedDescriptor = descriptor || Object.getOwnPropertyDescriptor(target, key);
|
|
785
|
+
var getter = updatedDescriptor.get;
|
|
786
|
+
var value = updatedDescriptor.value;
|
|
787
|
+
updatedDescriptor.get = function get() {
|
|
788
|
+
var e_1, _a;
|
|
789
|
+
// I don't remember why I did this "this" alias & want to ensure we don't break anything...
|
|
790
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
791
|
+
var self = this;
|
|
792
|
+
var fn = value || getter.call(this);
|
|
793
|
+
var boundFn = fn.bind(this);
|
|
794
|
+
var updatedMetadata = __assign$1(__assign$1({}, defaults), metadata);
|
|
795
|
+
var _loop_1 = function (prop) {
|
|
796
|
+
if (typeof metadata[prop] === "function") {
|
|
797
|
+
Object.defineProperty(boundFn, prop, {
|
|
798
|
+
get: function () {
|
|
799
|
+
return updatedMetadata[prop](self);
|
|
800
|
+
},
|
|
801
|
+
});
|
|
802
|
+
}
|
|
803
|
+
else {
|
|
804
|
+
boundFn[prop] = updatedMetadata[prop];
|
|
805
|
+
}
|
|
806
|
+
};
|
|
807
|
+
try {
|
|
808
|
+
for (var _b = __values$b(Object.keys(defaults)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
809
|
+
var prop = _c.value;
|
|
810
|
+
_loop_1(prop);
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
814
|
+
finally {
|
|
815
|
+
try {
|
|
816
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
817
|
+
}
|
|
818
|
+
finally { if (e_1) throw e_1.error; }
|
|
819
|
+
}
|
|
820
|
+
Object.defineProperty(this, key, {
|
|
821
|
+
writable: true,
|
|
822
|
+
configurable: true,
|
|
823
|
+
enumerable: updatedDescriptor.enumerable,
|
|
824
|
+
value: boundFn,
|
|
544
825
|
});
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
writable: true,
|
|
551
|
-
configurable: true,
|
|
552
|
-
enumerable: updatedDescriptor.enumerable,
|
|
553
|
-
value: boundFn
|
|
554
|
-
});
|
|
555
|
-
return boundFn;
|
|
556
|
-
};
|
|
557
|
-
delete updatedDescriptor.value;
|
|
558
|
-
delete updatedDescriptor.writable;
|
|
559
|
-
return updatedDescriptor;
|
|
826
|
+
return boundFn;
|
|
827
|
+
};
|
|
828
|
+
delete updatedDescriptor.value;
|
|
829
|
+
delete updatedDescriptor.writable;
|
|
830
|
+
return updatedDescriptor;
|
|
560
831
|
}
|
|
832
|
+
|
|
833
|
+
var __assign = (undefined && undefined.__assign) || function () {
|
|
834
|
+
__assign = Object.assign || function(t) {
|
|
835
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
836
|
+
s = arguments[i];
|
|
837
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
838
|
+
t[p] = s[p];
|
|
839
|
+
}
|
|
840
|
+
return t;
|
|
841
|
+
};
|
|
842
|
+
return __assign.apply(this, arguments);
|
|
843
|
+
};
|
|
844
|
+
/** Method decorator that configures the method to always run the tick after it's invoked */
|
|
561
845
|
function tickDelay(target, propertyKey, descriptor) {
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
846
|
+
var originalDescriptorCopy = __assign({}, descriptor);
|
|
847
|
+
originalDescriptorCopy.get = function get() {
|
|
848
|
+
/*
|
|
849
|
+
* Make a new copy each time; if you don't then every instance after the first
|
|
850
|
+
* one of the class containing the decorated method will break.
|
|
851
|
+
*/
|
|
852
|
+
var newDescriptor = __assign({}, originalDescriptorCopy);
|
|
853
|
+
var boundFn = originalDescriptorCopy.value.bind(this);
|
|
854
|
+
newDescriptor.value = function () { return setTimeout(boundFn, 0); };
|
|
855
|
+
Object.defineProperty(this, propertyKey, newDescriptor);
|
|
856
|
+
return newDescriptor.value;
|
|
857
|
+
};
|
|
858
|
+
originalDescriptorCopy.configurable = true;
|
|
859
|
+
delete originalDescriptorCopy.writable;
|
|
860
|
+
delete originalDescriptorCopy.value;
|
|
861
|
+
return originalDescriptorCopy;
|
|
574
862
|
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
863
|
+
|
|
864
|
+
/**
|
|
865
|
+
* Constrains a number to the given range. If the number is below the
|
|
866
|
+
* low end of the range, the low end will be returned. If the number is
|
|
867
|
+
* above the top end of the range, the top end will be returned. Otherwise
|
|
868
|
+
* the number itself will be returned.
|
|
869
|
+
*/
|
|
870
|
+
function constrain(n, range) {
|
|
871
|
+
if (!n || n < range[0]) {
|
|
872
|
+
return range[0];
|
|
873
|
+
}
|
|
874
|
+
if (n > range[1]) {
|
|
875
|
+
return range[1];
|
|
876
|
+
}
|
|
877
|
+
return n;
|
|
583
878
|
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* Progressively rounds `num` to `decimalPlaces` places. This differs from other
|
|
882
|
+
* rounding methods out there such as lodash's, which are not progressive. For example,
|
|
883
|
+
* `(0.149).toFixed(1)` and lodash `_.round(0.149, 1)` both return `0.1`, but this
|
|
884
|
+
* function rounds `0.149` to `0.15` and then `0.15` to `0.2` and returns `0.2`.
|
|
885
|
+
*/
|
|
886
|
+
function decimalRound(num, decimalPlaces) {
|
|
887
|
+
if (decimalPlaces === void 0) { decimalPlaces = 0; }
|
|
888
|
+
var integralAndFractionalSplit = String(num).split(".");
|
|
889
|
+
var allDecimalPlaces = integralAndFractionalSplit.length > 1
|
|
890
|
+
? integralAndFractionalSplit[1].length
|
|
891
|
+
: 0;
|
|
892
|
+
var roundedNum = num;
|
|
893
|
+
for (var i = allDecimalPlaces - 1; i >= decimalPlaces; i -= 1) {
|
|
894
|
+
roundedNum = Number(Math.round(Number(roundedNum + "e" + i)) + "e-" + i);
|
|
895
|
+
}
|
|
896
|
+
return roundedNum;
|
|
592
897
|
}
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
* Converts a file size in bytes to a human-friendly string. For example,
|
|
901
|
+
* `toFileSizeString(2048)` will return `"2.00KB"`.
|
|
902
|
+
*/
|
|
903
|
+
function toFileSizeString(n, precision) {
|
|
904
|
+
if (precision === void 0) { precision = 2; }
|
|
905
|
+
if (n > Number.MAX_SAFE_INTEGER) {
|
|
906
|
+
throw new Error("Number is greater than MAX_SAFE_INTEGER; "
|
|
907
|
+
+ "toFileSizeString does not support orders of magnitude "
|
|
908
|
+
+ "higher than petabytes for this reason until BigInt "
|
|
909
|
+
+ "achieves broad browser support.");
|
|
910
|
+
}
|
|
911
|
+
var magnitude = Math.min(Math.floor(Math.log(n) / Math.log(1024)), 5);
|
|
912
|
+
var unit = ["B",
|
|
913
|
+
"KB",
|
|
914
|
+
"MB",
|
|
915
|
+
"GB",
|
|
916
|
+
"TB",
|
|
917
|
+
"PB"][magnitude];
|
|
918
|
+
var decimalPlaces = magnitude ? precision : 0;
|
|
919
|
+
return decimalRound(n / (Math.pow(1024, magnitude)), decimalPlaces).toFixed(decimalPlaces) + unit;
|
|
608
920
|
}
|
|
921
|
+
|
|
922
|
+
/**
|
|
923
|
+
* Converts a path to crumbs.
|
|
924
|
+
* For example:
|
|
925
|
+
* "a.b[0].c" -> ["a", "b", "0", "c"]
|
|
926
|
+
*/
|
|
609
927
|
function crumblePath(path) {
|
|
610
|
-
|
|
928
|
+
return typeof path === "string" ? path.match(/[^.[\]]+/g) || [] : [].concat(path);
|
|
611
929
|
}
|
|
930
|
+
|
|
931
|
+
/**
|
|
932
|
+
* Copy a property from one object to another using its property descriptor.
|
|
933
|
+
* In other words, if it's a getter/setter on `sourceObject` it'll be the same
|
|
934
|
+
* getter/setter on `destObject`. If it's just a value it'll be just a value.
|
|
935
|
+
*/
|
|
612
936
|
function copyProperty(propName, sourceObject, destObject) {
|
|
613
|
-
|
|
937
|
+
Object.defineProperty(destObject, propName, Object.getOwnPropertyDescriptor(sourceObject, propName));
|
|
614
938
|
}
|
|
615
|
-
|
|
616
|
-
var
|
|
939
|
+
|
|
940
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* lodash (Custom Build) <https://lodash.com/>
|
|
944
|
+
* Build: `lodash modularize exports="npm" -o ./`
|
|
945
|
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
946
|
+
* Released under MIT license <https://lodash.com/license>
|
|
947
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
948
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
949
|
+
*/
|
|
950
|
+
|
|
951
|
+
/** `Object#toString` result references. */
|
|
952
|
+
var objectTag = '[object Object]';
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* Checks if `value` is a host object in IE < 9.
|
|
956
|
+
*
|
|
957
|
+
* @private
|
|
958
|
+
* @param {*} value The value to check.
|
|
959
|
+
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
|
960
|
+
*/
|
|
617
961
|
function isHostObject(value) {
|
|
962
|
+
// Many host objects are `Object` objects that can coerce to strings
|
|
963
|
+
// despite having improperly defined `toString` methods.
|
|
618
964
|
var result = false;
|
|
619
|
-
if (value != null && typeof value.toString !=
|
|
965
|
+
if (value != null && typeof value.toString != 'function') {
|
|
620
966
|
try {
|
|
621
|
-
result = !!(value +
|
|
622
|
-
} catch (e) {
|
|
623
|
-
}
|
|
967
|
+
result = !!(value + '');
|
|
968
|
+
} catch (e) {}
|
|
624
969
|
}
|
|
625
970
|
return result;
|
|
626
971
|
}
|
|
972
|
+
|
|
973
|
+
/**
|
|
974
|
+
* Creates a unary function that invokes `func` with its argument transformed.
|
|
975
|
+
*
|
|
976
|
+
* @private
|
|
977
|
+
* @param {Function} func The function to wrap.
|
|
978
|
+
* @param {Function} transform The argument transform.
|
|
979
|
+
* @returns {Function} Returns the new function.
|
|
980
|
+
*/
|
|
627
981
|
function overArg(func, transform) {
|
|
628
982
|
return function(arg) {
|
|
629
983
|
return func(transform(arg));
|
|
630
984
|
};
|
|
631
985
|
}
|
|
632
|
-
|
|
986
|
+
|
|
987
|
+
/** Used for built-in method references. */
|
|
988
|
+
var funcProto = Function.prototype,
|
|
989
|
+
objectProto = Object.prototype;
|
|
990
|
+
|
|
991
|
+
/** Used to resolve the decompiled source of functions. */
|
|
633
992
|
var funcToString = funcProto.toString;
|
|
993
|
+
|
|
994
|
+
/** Used to check objects for own properties. */
|
|
634
995
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
996
|
+
|
|
997
|
+
/** Used to infer the `Object` constructor. */
|
|
635
998
|
var objectCtorString = funcToString.call(Object);
|
|
999
|
+
|
|
1000
|
+
/**
|
|
1001
|
+
* Used to resolve the
|
|
1002
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
1003
|
+
* of values.
|
|
1004
|
+
*/
|
|
636
1005
|
var objectToString = objectProto.toString;
|
|
1006
|
+
|
|
1007
|
+
/** Built-in value references. */
|
|
637
1008
|
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
1009
|
+
|
|
1010
|
+
/**
|
|
1011
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
1012
|
+
* and has a `typeof` result of "object".
|
|
1013
|
+
*
|
|
1014
|
+
* @static
|
|
1015
|
+
* @memberOf _
|
|
1016
|
+
* @since 4.0.0
|
|
1017
|
+
* @category Lang
|
|
1018
|
+
* @param {*} value The value to check.
|
|
1019
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
1020
|
+
* @example
|
|
1021
|
+
*
|
|
1022
|
+
* _.isObjectLike({});
|
|
1023
|
+
* // => true
|
|
1024
|
+
*
|
|
1025
|
+
* _.isObjectLike([1, 2, 3]);
|
|
1026
|
+
* // => true
|
|
1027
|
+
*
|
|
1028
|
+
* _.isObjectLike(_.noop);
|
|
1029
|
+
* // => false
|
|
1030
|
+
*
|
|
1031
|
+
* _.isObjectLike(null);
|
|
1032
|
+
* // => false
|
|
1033
|
+
*/
|
|
638
1034
|
function isObjectLike(value) {
|
|
639
|
-
return !!value && typeof value ==
|
|
1035
|
+
return !!value && typeof value == 'object';
|
|
640
1036
|
}
|
|
1037
|
+
|
|
1038
|
+
/**
|
|
1039
|
+
* Checks if `value` is a plain object, that is, an object created by the
|
|
1040
|
+
* `Object` constructor or one with a `[[Prototype]]` of `null`.
|
|
1041
|
+
*
|
|
1042
|
+
* @static
|
|
1043
|
+
* @memberOf _
|
|
1044
|
+
* @since 0.8.0
|
|
1045
|
+
* @category Lang
|
|
1046
|
+
* @param {*} value The value to check.
|
|
1047
|
+
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
|
|
1048
|
+
* @example
|
|
1049
|
+
*
|
|
1050
|
+
* function Foo() {
|
|
1051
|
+
* this.a = 1;
|
|
1052
|
+
* }
|
|
1053
|
+
*
|
|
1054
|
+
* _.isPlainObject(new Foo);
|
|
1055
|
+
* // => false
|
|
1056
|
+
*
|
|
1057
|
+
* _.isPlainObject([1, 2, 3]);
|
|
1058
|
+
* // => false
|
|
1059
|
+
*
|
|
1060
|
+
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
|
1061
|
+
* // => true
|
|
1062
|
+
*
|
|
1063
|
+
* _.isPlainObject(Object.create(null));
|
|
1064
|
+
* // => true
|
|
1065
|
+
*/
|
|
641
1066
|
function isPlainObject(value) {
|
|
642
|
-
if (!isObjectLike(value) ||
|
|
1067
|
+
if (!isObjectLike(value) ||
|
|
1068
|
+
objectToString.call(value) != objectTag || isHostObject(value)) {
|
|
643
1069
|
return false;
|
|
644
1070
|
}
|
|
645
1071
|
var proto = getPrototype(value);
|
|
646
1072
|
if (proto === null) {
|
|
647
1073
|
return true;
|
|
648
1074
|
}
|
|
649
|
-
var Ctor = hasOwnProperty.call(proto,
|
|
650
|
-
return typeof Ctor ==
|
|
1075
|
+
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
|
|
1076
|
+
return (typeof Ctor == 'function' &&
|
|
1077
|
+
Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
|
|
651
1078
|
}
|
|
1079
|
+
|
|
652
1080
|
var lodash_isplainobject = isPlainObject;
|
|
1081
|
+
|
|
1082
|
+
var __values$a = (undefined && undefined.__values) || function(o) {
|
|
1083
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1084
|
+
if (m) return m.call(o);
|
|
1085
|
+
if (o && typeof o.length === "number") return {
|
|
1086
|
+
next: function () {
|
|
1087
|
+
if (o && i >= o.length) o = void 0;
|
|
1088
|
+
return { value: o && o[i++], done: !o };
|
|
1089
|
+
}
|
|
1090
|
+
};
|
|
1091
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1092
|
+
};
|
|
1093
|
+
/*
|
|
1094
|
+
* Recursive Object.freeze on plain objects and arrays
|
|
1095
|
+
*/
|
|
653
1096
|
function deepFreeze(obj) {
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
1097
|
+
var e_1, _a;
|
|
1098
|
+
Object.freeze(obj);
|
|
1099
|
+
try {
|
|
1100
|
+
for (var _b = __values$a(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1101
|
+
var key = _c.value;
|
|
1102
|
+
var val = obj[key];
|
|
1103
|
+
if (lodash_isplainobject(val) || Array.isArray(val)) {
|
|
1104
|
+
deepFreeze(val);
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1109
|
+
finally {
|
|
1110
|
+
try {
|
|
1111
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1112
|
+
}
|
|
1113
|
+
finally { if (e_1) throw e_1.error; }
|
|
659
1114
|
}
|
|
660
|
-
}
|
|
661
1115
|
}
|
|
1116
|
+
|
|
1117
|
+
var __read$3 = (undefined && undefined.__read) || function (o, n) {
|
|
1118
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
1119
|
+
if (!m) return o;
|
|
1120
|
+
var i = m.call(o), r, ar = [], e;
|
|
1121
|
+
try {
|
|
1122
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
1123
|
+
}
|
|
1124
|
+
catch (error) { e = { error: error }; }
|
|
1125
|
+
finally {
|
|
1126
|
+
try {
|
|
1127
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
1128
|
+
}
|
|
1129
|
+
finally { if (e) throw e.error; }
|
|
1130
|
+
}
|
|
1131
|
+
return ar;
|
|
1132
|
+
};
|
|
1133
|
+
var __spreadArray$1 = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
|
1134
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
1135
|
+
if (ar || !(i in from)) {
|
|
1136
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
1137
|
+
ar[i] = from[i];
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
1141
|
+
};
|
|
1142
|
+
var __values$9 = (undefined && undefined.__values) || function(o) {
|
|
1143
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1144
|
+
if (m) return m.call(o);
|
|
1145
|
+
if (o && typeof o.length === "number") return {
|
|
1146
|
+
next: function () {
|
|
1147
|
+
if (o && i >= o.length) o = void 0;
|
|
1148
|
+
return { value: o && o[i++], done: !o };
|
|
1149
|
+
}
|
|
1150
|
+
};
|
|
1151
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1152
|
+
};
|
|
662
1153
|
var DiffChange;
|
|
663
|
-
(function(
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
1154
|
+
(function (DiffChange) {
|
|
1155
|
+
DiffChange[DiffChange["ADDITION"] = 0] = "ADDITION";
|
|
1156
|
+
DiffChange[DiffChange["DELETION"] = 1] = "DELETION";
|
|
1157
|
+
DiffChange[DiffChange["ALTERATION"] = 2] = "ALTERATION";
|
|
667
1158
|
})(DiffChange || (DiffChange = {}));
|
|
668
|
-
function diff(o1, o2, parentPath
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
1159
|
+
function diff(o1, o2, parentPath) {
|
|
1160
|
+
var e_1, _a;
|
|
1161
|
+
if (parentPath === void 0) { parentPath = []; }
|
|
1162
|
+
var d = [];
|
|
1163
|
+
try {
|
|
1164
|
+
for (var _b = __values$9(new Set(__spreadArray$1(__spreadArray$1([], __read$3(Object.keys(o1)), false), __read$3(Object.keys(o2)), false))), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1165
|
+
var key = _c.value;
|
|
1166
|
+
var o1HasKey = Object.prototype.hasOwnProperty.call(o1, key);
|
|
1167
|
+
var o2HasKey = Object.prototype.hasOwnProperty.call(o2, key);
|
|
1168
|
+
if (o1HasKey && !o2HasKey) {
|
|
1169
|
+
d.push({
|
|
1170
|
+
type: DiffChange.DELETION,
|
|
1171
|
+
key: key,
|
|
1172
|
+
parentPath: parentPath,
|
|
1173
|
+
objects: [o1, o2],
|
|
1174
|
+
});
|
|
1175
|
+
}
|
|
1176
|
+
else if (!o1HasKey && o2HasKey) {
|
|
1177
|
+
d.push({
|
|
1178
|
+
type: DiffChange.ADDITION,
|
|
1179
|
+
key: key,
|
|
1180
|
+
parentPath: parentPath,
|
|
1181
|
+
objects: [o1, o2],
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
else if ((lodash_isplainobject(o1[key]) && lodash_isplainobject(o2[key]))
|
|
1185
|
+
|| (Array.isArray(o1[key]) && Array.isArray(o2[key]))) {
|
|
1186
|
+
d = d.concat(diff(o1[key], o2[key], __spreadArray$1(__spreadArray$1([], __read$3(parentPath), false), [key], false)));
|
|
1187
|
+
}
|
|
1188
|
+
else if (o1[key] !== o2[key]) {
|
|
1189
|
+
d.push({
|
|
1190
|
+
type: DiffChange.ALTERATION,
|
|
1191
|
+
key: key,
|
|
1192
|
+
parentPath: parentPath,
|
|
1193
|
+
objects: [o1, o2],
|
|
1194
|
+
});
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
696
1197
|
}
|
|
697
|
-
|
|
698
|
-
|
|
1198
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1199
|
+
finally {
|
|
1200
|
+
try {
|
|
1201
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1202
|
+
}
|
|
1203
|
+
finally { if (e_1) throw e_1.error; }
|
|
1204
|
+
}
|
|
1205
|
+
return d;
|
|
699
1206
|
}
|
|
1207
|
+
|
|
1208
|
+
var __values$8 = (undefined && undefined.__values) || function(o) {
|
|
1209
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1210
|
+
if (m) return m.call(o);
|
|
1211
|
+
if (o && typeof o.length === "number") return {
|
|
1212
|
+
next: function () {
|
|
1213
|
+
if (o && i >= o.length) o = void 0;
|
|
1214
|
+
return { value: o && o[i++], done: !o };
|
|
1215
|
+
}
|
|
1216
|
+
};
|
|
1217
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1218
|
+
};
|
|
1219
|
+
/**
|
|
1220
|
+
* Recursively navigate a nested object & call `fn` for each key/value pair
|
|
1221
|
+
*/
|
|
700
1222
|
function forEachEntryDeep(object, fn) {
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
1223
|
+
var e_1, _a;
|
|
1224
|
+
try {
|
|
1225
|
+
for (var _b = __values$8(Object.keys(object)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1226
|
+
var key = _c.value;
|
|
1227
|
+
var value = object[key];
|
|
1228
|
+
if (lodash_isplainobject(value) || Array.isArray(value)) {
|
|
1229
|
+
forEachEntryDeep(value, fn);
|
|
1230
|
+
}
|
|
1231
|
+
else {
|
|
1232
|
+
fn(key, value, object);
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1237
|
+
finally {
|
|
1238
|
+
try {
|
|
1239
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1240
|
+
}
|
|
1241
|
+
finally { if (e_1) throw e_1.error; }
|
|
707
1242
|
}
|
|
708
|
-
}
|
|
709
1243
|
}
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
if (
|
|
715
|
-
|
|
716
|
-
|
|
1244
|
+
|
|
1245
|
+
var __values$7 = (undefined && undefined.__values) || function(o) {
|
|
1246
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1247
|
+
if (m) return m.call(o);
|
|
1248
|
+
if (o && typeof o.length === "number") return {
|
|
1249
|
+
next: function () {
|
|
1250
|
+
if (o && i >= o.length) o = void 0;
|
|
1251
|
+
return { value: o && o[i++], done: !o };
|
|
1252
|
+
}
|
|
1253
|
+
};
|
|
1254
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1255
|
+
};
|
|
1256
|
+
/**
|
|
1257
|
+
* Recursively navigate a nested object & call `fn` for each subobject
|
|
1258
|
+
*/
|
|
1259
|
+
function forEachNestedObject(object, fn, path) {
|
|
1260
|
+
var e_1, _a;
|
|
1261
|
+
if (path === void 0) { path = []; }
|
|
1262
|
+
fn(path, object);
|
|
1263
|
+
try {
|
|
1264
|
+
for (var _b = __values$7(Object.keys(object)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1265
|
+
var key = _c.value;
|
|
1266
|
+
var value = object[key];
|
|
1267
|
+
if (lodash_isplainobject(value) || Array.isArray(value)) {
|
|
1268
|
+
var newPath = path.concat(key);
|
|
1269
|
+
forEachNestedObject(value, fn, newPath);
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1274
|
+
finally {
|
|
1275
|
+
try {
|
|
1276
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1277
|
+
}
|
|
1278
|
+
finally { if (e_1) throw e_1.error; }
|
|
717
1279
|
}
|
|
718
|
-
}
|
|
719
1280
|
}
|
|
1281
|
+
|
|
1282
|
+
/**
|
|
1283
|
+
* lodash 4.0.0 (Custom Build) <https://lodash.com/>
|
|
1284
|
+
* Build: `lodash modularize exports="npm" -o ./`
|
|
1285
|
+
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
|
1286
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
1287
|
+
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
1288
|
+
* Available under MIT license <https://lodash.com/license>
|
|
1289
|
+
*/
|
|
1290
|
+
|
|
1291
|
+
/**
|
|
1292
|
+
* Checks if `value` is `null` or `undefined`.
|
|
1293
|
+
*
|
|
1294
|
+
* @static
|
|
1295
|
+
* @memberOf _
|
|
1296
|
+
* @category Lang
|
|
1297
|
+
* @param {*} value The value to check.
|
|
1298
|
+
* @returns {boolean} Returns `true` if `value` is nullish, else `false`.
|
|
1299
|
+
* @example
|
|
1300
|
+
*
|
|
1301
|
+
* _.isNil(null);
|
|
1302
|
+
* // => true
|
|
1303
|
+
*
|
|
1304
|
+
* _.isNil(void 0);
|
|
1305
|
+
* // => true
|
|
1306
|
+
*
|
|
1307
|
+
* _.isNil(NaN);
|
|
1308
|
+
* // => false
|
|
1309
|
+
*/
|
|
720
1310
|
function isNil$1(value) {
|
|
721
1311
|
return value == null;
|
|
722
1312
|
}
|
|
1313
|
+
|
|
723
1314
|
var lodash_isnil = isNil$1;
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
1315
|
+
|
|
1316
|
+
var isNilImport = /*#__PURE__*/Object.freeze(/*#__PURE__*/_mergeNamespaces({
|
|
1317
|
+
__proto__: null,
|
|
1318
|
+
'default': lodash_isnil
|
|
728
1319
|
}, [lodash_isnil]));
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
1320
|
+
|
|
1321
|
+
var lodash_isempty$1 = {exports: {}};
|
|
1322
|
+
|
|
1323
|
+
/**
|
|
1324
|
+
* lodash (Custom Build) <https://lodash.com/>
|
|
1325
|
+
* Build: `lodash modularize exports="npm" -o ./`
|
|
1326
|
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
1327
|
+
* Released under MIT license <https://lodash.com/license>
|
|
1328
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
1329
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
1330
|
+
*/
|
|
1331
|
+
|
|
1332
|
+
(function (module, exports) {
|
|
1333
|
+
/** Used as references for various `Number` constants. */
|
|
1334
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
1335
|
+
|
|
1336
|
+
/** `Object#toString` result references. */
|
|
1337
|
+
var argsTag = '[object Arguments]',
|
|
1338
|
+
funcTag = '[object Function]',
|
|
1339
|
+
genTag = '[object GeneratorFunction]',
|
|
1340
|
+
mapTag = '[object Map]',
|
|
1341
|
+
objectTag = '[object Object]',
|
|
1342
|
+
promiseTag = '[object Promise]',
|
|
1343
|
+
setTag = '[object Set]',
|
|
1344
|
+
weakMapTag = '[object WeakMap]';
|
|
1345
|
+
|
|
1346
|
+
var dataViewTag = '[object DataView]';
|
|
1347
|
+
|
|
1348
|
+
/**
|
|
1349
|
+
* Used to match `RegExp`
|
|
1350
|
+
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
1351
|
+
*/
|
|
1352
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
1353
|
+
|
|
1354
|
+
/** Used to detect host constructors (Safari). */
|
|
1355
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
1356
|
+
|
|
1357
|
+
/** Detect free variable `global` from Node.js. */
|
|
1358
|
+
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
1359
|
+
|
|
1360
|
+
/** Detect free variable `self`. */
|
|
1361
|
+
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
1362
|
+
|
|
1363
|
+
/** Used as a reference to the global object. */
|
|
1364
|
+
var root = freeGlobal || freeSelf || Function('return this')();
|
|
1365
|
+
|
|
1366
|
+
/** Detect free variable `exports`. */
|
|
1367
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
1368
|
+
|
|
1369
|
+
/** Detect free variable `module`. */
|
|
1370
|
+
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
1371
|
+
|
|
1372
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
|
1373
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1374
|
+
|
|
1375
|
+
/**
|
|
1376
|
+
* Gets the value at `key` of `object`.
|
|
1377
|
+
*
|
|
1378
|
+
* @private
|
|
1379
|
+
* @param {Object} [object] The object to query.
|
|
1380
|
+
* @param {string} key The key of the property to get.
|
|
1381
|
+
* @returns {*} Returns the property value.
|
|
1382
|
+
*/
|
|
1383
|
+
function getValue(object, key) {
|
|
1384
|
+
return object == null ? undefined : object[key];
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
/**
|
|
1388
|
+
* Checks if `value` is a host object in IE < 9.
|
|
1389
|
+
*
|
|
1390
|
+
* @private
|
|
1391
|
+
* @param {*} value The value to check.
|
|
1392
|
+
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
|
1393
|
+
*/
|
|
1394
|
+
function isHostObject(value) {
|
|
1395
|
+
// Many host objects are `Object` objects that can coerce to strings
|
|
1396
|
+
// despite having improperly defined `toString` methods.
|
|
1397
|
+
var result = false;
|
|
1398
|
+
if (value != null && typeof value.toString != 'function') {
|
|
1399
|
+
try {
|
|
1400
|
+
result = !!(value + '');
|
|
1401
|
+
} catch (e) {}
|
|
744
1402
|
}
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
1403
|
+
return result;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
/**
|
|
1407
|
+
* Creates a unary function that invokes `func` with its argument transformed.
|
|
1408
|
+
*
|
|
1409
|
+
* @private
|
|
1410
|
+
* @param {Function} func The function to wrap.
|
|
1411
|
+
* @param {Function} transform The argument transform.
|
|
1412
|
+
* @returns {Function} Returns the new function.
|
|
1413
|
+
*/
|
|
1414
|
+
function overArg(func, transform) {
|
|
1415
|
+
return function(arg) {
|
|
1416
|
+
return func(transform(arg));
|
|
1417
|
+
};
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
/** Used for built-in method references. */
|
|
1421
|
+
var funcProto = Function.prototype,
|
|
1422
|
+
objectProto = Object.prototype;
|
|
1423
|
+
|
|
1424
|
+
/** Used to detect overreaching core-js shims. */
|
|
1425
|
+
var coreJsData = root['__core-js_shared__'];
|
|
1426
|
+
|
|
1427
|
+
/** Used to detect methods masquerading as native. */
|
|
1428
|
+
var maskSrcKey = (function() {
|
|
1429
|
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
|
1430
|
+
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
1431
|
+
}());
|
|
1432
|
+
|
|
1433
|
+
/** Used to resolve the decompiled source of functions. */
|
|
1434
|
+
var funcToString = funcProto.toString;
|
|
1435
|
+
|
|
1436
|
+
/** Used to check objects for own properties. */
|
|
1437
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1438
|
+
|
|
1439
|
+
/**
|
|
1440
|
+
* Used to resolve the
|
|
1441
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
1442
|
+
* of values.
|
|
1443
|
+
*/
|
|
1444
|
+
var objectToString = objectProto.toString;
|
|
1445
|
+
|
|
1446
|
+
/** Used to detect if a method is native. */
|
|
1447
|
+
var reIsNative = RegExp('^' +
|
|
1448
|
+
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
|
1449
|
+
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
1450
|
+
);
|
|
1451
|
+
|
|
1452
|
+
/** Built-in value references. */
|
|
1453
|
+
var Buffer = moduleExports ? root.Buffer : undefined,
|
|
1454
|
+
propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
1455
|
+
|
|
1456
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
1457
|
+
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
|
|
1458
|
+
nativeKeys = overArg(Object.keys, Object);
|
|
1459
|
+
|
|
1460
|
+
/* Built-in method references that are verified to be native. */
|
|
1461
|
+
var DataView = getNative(root, 'DataView'),
|
|
1462
|
+
Map = getNative(root, 'Map'),
|
|
1463
|
+
Promise = getNative(root, 'Promise'),
|
|
1464
|
+
Set = getNative(root, 'Set'),
|
|
1465
|
+
WeakMap = getNative(root, 'WeakMap');
|
|
1466
|
+
|
|
1467
|
+
/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
|
|
1468
|
+
var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
|
|
1469
|
+
|
|
1470
|
+
/** Used to detect maps, sets, and weakmaps. */
|
|
1471
|
+
var dataViewCtorString = toSource(DataView),
|
|
1472
|
+
mapCtorString = toSource(Map),
|
|
1473
|
+
promiseCtorString = toSource(Promise),
|
|
1474
|
+
setCtorString = toSource(Set),
|
|
1475
|
+
weakMapCtorString = toSource(WeakMap);
|
|
1476
|
+
|
|
1477
|
+
/**
|
|
1478
|
+
* The base implementation of `getTag`.
|
|
1479
|
+
*
|
|
1480
|
+
* @private
|
|
1481
|
+
* @param {*} value The value to query.
|
|
1482
|
+
* @returns {string} Returns the `toStringTag`.
|
|
1483
|
+
*/
|
|
1484
|
+
function baseGetTag(value) {
|
|
1485
|
+
return objectToString.call(value);
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
/**
|
|
1489
|
+
* The base implementation of `_.isNative` without bad shim checks.
|
|
1490
|
+
*
|
|
1491
|
+
* @private
|
|
1492
|
+
* @param {*} value The value to check.
|
|
1493
|
+
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
1494
|
+
* else `false`.
|
|
1495
|
+
*/
|
|
1496
|
+
function baseIsNative(value) {
|
|
1497
|
+
if (!isObject(value) || isMasked(value)) {
|
|
1498
|
+
return false;
|
|
1499
|
+
}
|
|
1500
|
+
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
|
|
1501
|
+
return pattern.test(toSource(value));
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
/**
|
|
1505
|
+
* Gets the native function at `key` of `object`.
|
|
1506
|
+
*
|
|
1507
|
+
* @private
|
|
1508
|
+
* @param {Object} object The object to query.
|
|
1509
|
+
* @param {string} key The key of the method to get.
|
|
1510
|
+
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
1511
|
+
*/
|
|
1512
|
+
function getNative(object, key) {
|
|
1513
|
+
var value = getValue(object, key);
|
|
1514
|
+
return baseIsNative(value) ? value : undefined;
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
/**
|
|
1518
|
+
* Gets the `toStringTag` of `value`.
|
|
1519
|
+
*
|
|
1520
|
+
* @private
|
|
1521
|
+
* @param {*} value The value to query.
|
|
1522
|
+
* @returns {string} Returns the `toStringTag`.
|
|
1523
|
+
*/
|
|
1524
|
+
var getTag = baseGetTag;
|
|
1525
|
+
|
|
1526
|
+
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
|
1527
|
+
// for data views in Edge < 14, and promises in Node.js.
|
|
1528
|
+
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
|
1529
|
+
(Map && getTag(new Map) != mapTag) ||
|
|
1530
|
+
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
|
1531
|
+
(Set && getTag(new Set) != setTag) ||
|
|
1532
|
+
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
|
1533
|
+
getTag = function(value) {
|
|
1534
|
+
var result = objectToString.call(value),
|
|
1535
|
+
Ctor = result == objectTag ? value.constructor : undefined,
|
|
1536
|
+
ctorString = Ctor ? toSource(Ctor) : undefined;
|
|
1537
|
+
|
|
1538
|
+
if (ctorString) {
|
|
1539
|
+
switch (ctorString) {
|
|
1540
|
+
case dataViewCtorString: return dataViewTag;
|
|
1541
|
+
case mapCtorString: return mapTag;
|
|
1542
|
+
case promiseCtorString: return promiseTag;
|
|
1543
|
+
case setCtorString: return setTag;
|
|
1544
|
+
case weakMapCtorString: return weakMapTag;
|
|
751
1545
|
}
|
|
752
1546
|
}
|
|
753
1547
|
return result;
|
|
1548
|
+
};
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
/**
|
|
1552
|
+
* Checks if `func` has its source masked.
|
|
1553
|
+
*
|
|
1554
|
+
* @private
|
|
1555
|
+
* @param {Function} func The function to check.
|
|
1556
|
+
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
1557
|
+
*/
|
|
1558
|
+
function isMasked(func) {
|
|
1559
|
+
return !!maskSrcKey && (maskSrcKey in func);
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
/**
|
|
1563
|
+
* Checks if `value` is likely a prototype object.
|
|
1564
|
+
*
|
|
1565
|
+
* @private
|
|
1566
|
+
* @param {*} value The value to check.
|
|
1567
|
+
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
1568
|
+
*/
|
|
1569
|
+
function isPrototype(value) {
|
|
1570
|
+
var Ctor = value && value.constructor,
|
|
1571
|
+
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
|
1572
|
+
|
|
1573
|
+
return value === proto;
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
/**
|
|
1577
|
+
* Converts `func` to its source code.
|
|
1578
|
+
*
|
|
1579
|
+
* @private
|
|
1580
|
+
* @param {Function} func The function to process.
|
|
1581
|
+
* @returns {string} Returns the source code.
|
|
1582
|
+
*/
|
|
1583
|
+
function toSource(func) {
|
|
1584
|
+
if (func != null) {
|
|
1585
|
+
try {
|
|
1586
|
+
return funcToString.call(func);
|
|
1587
|
+
} catch (e) {}
|
|
1588
|
+
try {
|
|
1589
|
+
return (func + '');
|
|
1590
|
+
} catch (e) {}
|
|
754
1591
|
}
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
1592
|
+
return '';
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
/**
|
|
1596
|
+
* Checks if `value` is likely an `arguments` object.
|
|
1597
|
+
*
|
|
1598
|
+
* @static
|
|
1599
|
+
* @memberOf _
|
|
1600
|
+
* @since 0.1.0
|
|
1601
|
+
* @category Lang
|
|
1602
|
+
* @param {*} value The value to check.
|
|
1603
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
1604
|
+
* else `false`.
|
|
1605
|
+
* @example
|
|
1606
|
+
*
|
|
1607
|
+
* _.isArguments(function() { return arguments; }());
|
|
1608
|
+
* // => true
|
|
1609
|
+
*
|
|
1610
|
+
* _.isArguments([1, 2, 3]);
|
|
1611
|
+
* // => false
|
|
1612
|
+
*/
|
|
1613
|
+
function isArguments(value) {
|
|
1614
|
+
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
|
1615
|
+
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
|
1616
|
+
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
/**
|
|
1620
|
+
* Checks if `value` is classified as an `Array` object.
|
|
1621
|
+
*
|
|
1622
|
+
* @static
|
|
1623
|
+
* @memberOf _
|
|
1624
|
+
* @since 0.1.0
|
|
1625
|
+
* @category Lang
|
|
1626
|
+
* @param {*} value The value to check.
|
|
1627
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
1628
|
+
* @example
|
|
1629
|
+
*
|
|
1630
|
+
* _.isArray([1, 2, 3]);
|
|
1631
|
+
* // => true
|
|
1632
|
+
*
|
|
1633
|
+
* _.isArray(document.body.children);
|
|
1634
|
+
* // => false
|
|
1635
|
+
*
|
|
1636
|
+
* _.isArray('abc');
|
|
1637
|
+
* // => false
|
|
1638
|
+
*
|
|
1639
|
+
* _.isArray(_.noop);
|
|
1640
|
+
* // => false
|
|
1641
|
+
*/
|
|
1642
|
+
var isArray = Array.isArray;
|
|
1643
|
+
|
|
1644
|
+
/**
|
|
1645
|
+
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
1646
|
+
* not a function and has a `value.length` that's an integer greater than or
|
|
1647
|
+
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
1648
|
+
*
|
|
1649
|
+
* @static
|
|
1650
|
+
* @memberOf _
|
|
1651
|
+
* @since 4.0.0
|
|
1652
|
+
* @category Lang
|
|
1653
|
+
* @param {*} value The value to check.
|
|
1654
|
+
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
1655
|
+
* @example
|
|
1656
|
+
*
|
|
1657
|
+
* _.isArrayLike([1, 2, 3]);
|
|
1658
|
+
* // => true
|
|
1659
|
+
*
|
|
1660
|
+
* _.isArrayLike(document.body.children);
|
|
1661
|
+
* // => true
|
|
1662
|
+
*
|
|
1663
|
+
* _.isArrayLike('abc');
|
|
1664
|
+
* // => true
|
|
1665
|
+
*
|
|
1666
|
+
* _.isArrayLike(_.noop);
|
|
1667
|
+
* // => false
|
|
1668
|
+
*/
|
|
1669
|
+
function isArrayLike(value) {
|
|
1670
|
+
return value != null && isLength(value.length) && !isFunction(value);
|
|
1671
|
+
}
|
|
1672
|
+
|
|
1673
|
+
/**
|
|
1674
|
+
* This method is like `_.isArrayLike` except that it also checks if `value`
|
|
1675
|
+
* is an object.
|
|
1676
|
+
*
|
|
1677
|
+
* @static
|
|
1678
|
+
* @memberOf _
|
|
1679
|
+
* @since 4.0.0
|
|
1680
|
+
* @category Lang
|
|
1681
|
+
* @param {*} value The value to check.
|
|
1682
|
+
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
|
1683
|
+
* else `false`.
|
|
1684
|
+
* @example
|
|
1685
|
+
*
|
|
1686
|
+
* _.isArrayLikeObject([1, 2, 3]);
|
|
1687
|
+
* // => true
|
|
1688
|
+
*
|
|
1689
|
+
* _.isArrayLikeObject(document.body.children);
|
|
1690
|
+
* // => true
|
|
1691
|
+
*
|
|
1692
|
+
* _.isArrayLikeObject('abc');
|
|
1693
|
+
* // => false
|
|
1694
|
+
*
|
|
1695
|
+
* _.isArrayLikeObject(_.noop);
|
|
1696
|
+
* // => false
|
|
1697
|
+
*/
|
|
1698
|
+
function isArrayLikeObject(value) {
|
|
1699
|
+
return isObjectLike(value) && isArrayLike(value);
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
/**
|
|
1703
|
+
* Checks if `value` is a buffer.
|
|
1704
|
+
*
|
|
1705
|
+
* @static
|
|
1706
|
+
* @memberOf _
|
|
1707
|
+
* @since 4.3.0
|
|
1708
|
+
* @category Lang
|
|
1709
|
+
* @param {*} value The value to check.
|
|
1710
|
+
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
1711
|
+
* @example
|
|
1712
|
+
*
|
|
1713
|
+
* _.isBuffer(new Buffer(2));
|
|
1714
|
+
* // => true
|
|
1715
|
+
*
|
|
1716
|
+
* _.isBuffer(new Uint8Array(2));
|
|
1717
|
+
* // => false
|
|
1718
|
+
*/
|
|
1719
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
1720
|
+
|
|
1721
|
+
/**
|
|
1722
|
+
* Checks if `value` is an empty object, collection, map, or set.
|
|
1723
|
+
*
|
|
1724
|
+
* Objects are considered empty if they have no own enumerable string keyed
|
|
1725
|
+
* properties.
|
|
1726
|
+
*
|
|
1727
|
+
* Array-like values such as `arguments` objects, arrays, buffers, strings, or
|
|
1728
|
+
* jQuery-like collections are considered empty if they have a `length` of `0`.
|
|
1729
|
+
* Similarly, maps and sets are considered empty if they have a `size` of `0`.
|
|
1730
|
+
*
|
|
1731
|
+
* @static
|
|
1732
|
+
* @memberOf _
|
|
1733
|
+
* @since 0.1.0
|
|
1734
|
+
* @category Lang
|
|
1735
|
+
* @param {*} value The value to check.
|
|
1736
|
+
* @returns {boolean} Returns `true` if `value` is empty, else `false`.
|
|
1737
|
+
* @example
|
|
1738
|
+
*
|
|
1739
|
+
* _.isEmpty(null);
|
|
1740
|
+
* // => true
|
|
1741
|
+
*
|
|
1742
|
+
* _.isEmpty(true);
|
|
1743
|
+
* // => true
|
|
1744
|
+
*
|
|
1745
|
+
* _.isEmpty(1);
|
|
1746
|
+
* // => true
|
|
1747
|
+
*
|
|
1748
|
+
* _.isEmpty([1, 2, 3]);
|
|
1749
|
+
* // => false
|
|
1750
|
+
*
|
|
1751
|
+
* _.isEmpty({ 'a': 1 });
|
|
1752
|
+
* // => false
|
|
1753
|
+
*/
|
|
1754
|
+
function isEmpty(value) {
|
|
1755
|
+
if (isArrayLike(value) &&
|
|
1756
|
+
(isArray(value) || typeof value == 'string' ||
|
|
1757
|
+
typeof value.splice == 'function' || isBuffer(value) || isArguments(value))) {
|
|
1758
|
+
return !value.length;
|
|
759
1759
|
}
|
|
760
|
-
var
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
764
|
-
return uid ? "Symbol(src)_1." + uid : "";
|
|
765
|
-
}();
|
|
766
|
-
var funcToString2 = funcProto2.toString;
|
|
767
|
-
var hasOwnProperty2 = objectProto2.hasOwnProperty;
|
|
768
|
-
var objectToString2 = objectProto2.toString;
|
|
769
|
-
var reIsNative = RegExp("^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
770
|
-
var Buffer2 = moduleExports ? root.Buffer : void 0, propertyIsEnumerable = objectProto2.propertyIsEnumerable;
|
|
771
|
-
var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0, nativeKeys = overArg2(Object.keys, Object);
|
|
772
|
-
var DataView = getNative(root, "DataView"), Map = getNative(root, "Map"), Promise2 = getNative(root, "Promise"), Set2 = getNative(root, "Set"), WeakMap = getNative(root, "WeakMap");
|
|
773
|
-
var nonEnumShadows = !propertyIsEnumerable.call({ "valueOf": 1 }, "valueOf");
|
|
774
|
-
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap);
|
|
775
|
-
function baseGetTag(value) {
|
|
776
|
-
return objectToString2.call(value);
|
|
1760
|
+
var tag = getTag(value);
|
|
1761
|
+
if (tag == mapTag || tag == setTag) {
|
|
1762
|
+
return !value.size;
|
|
777
1763
|
}
|
|
778
|
-
|
|
779
|
-
|
|
1764
|
+
if (nonEnumShadows || isPrototype(value)) {
|
|
1765
|
+
return !nativeKeys(value).length;
|
|
1766
|
+
}
|
|
1767
|
+
for (var key in value) {
|
|
1768
|
+
if (hasOwnProperty.call(value, key)) {
|
|
780
1769
|
return false;
|
|
781
1770
|
}
|
|
782
|
-
var pattern = isFunction(value) || isHostObject2(value) ? reIsNative : reIsHostCtor;
|
|
783
|
-
return pattern.test(toSource(value));
|
|
784
|
-
}
|
|
785
|
-
function getNative(object, key) {
|
|
786
|
-
var value = getValue(object, key);
|
|
787
|
-
return baseIsNative(value) ? value : void 0;
|
|
788
1771
|
}
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
1772
|
+
return true;
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1775
|
+
/**
|
|
1776
|
+
* Checks if `value` is classified as a `Function` object.
|
|
1777
|
+
*
|
|
1778
|
+
* @static
|
|
1779
|
+
* @memberOf _
|
|
1780
|
+
* @since 0.1.0
|
|
1781
|
+
* @category Lang
|
|
1782
|
+
* @param {*} value The value to check.
|
|
1783
|
+
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
1784
|
+
* @example
|
|
1785
|
+
*
|
|
1786
|
+
* _.isFunction(_);
|
|
1787
|
+
* // => true
|
|
1788
|
+
*
|
|
1789
|
+
* _.isFunction(/abc/);
|
|
1790
|
+
* // => false
|
|
1791
|
+
*/
|
|
1792
|
+
function isFunction(value) {
|
|
1793
|
+
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
1794
|
+
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
|
1795
|
+
var tag = isObject(value) ? objectToString.call(value) : '';
|
|
1796
|
+
return tag == funcTag || tag == genTag;
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
/**
|
|
1800
|
+
* Checks if `value` is a valid array-like length.
|
|
1801
|
+
*
|
|
1802
|
+
* **Note:** This method is loosely based on
|
|
1803
|
+
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
1804
|
+
*
|
|
1805
|
+
* @static
|
|
1806
|
+
* @memberOf _
|
|
1807
|
+
* @since 4.0.0
|
|
1808
|
+
* @category Lang
|
|
1809
|
+
* @param {*} value The value to check.
|
|
1810
|
+
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
1811
|
+
* @example
|
|
1812
|
+
*
|
|
1813
|
+
* _.isLength(3);
|
|
1814
|
+
* // => true
|
|
1815
|
+
*
|
|
1816
|
+
* _.isLength(Number.MIN_VALUE);
|
|
1817
|
+
* // => false
|
|
1818
|
+
*
|
|
1819
|
+
* _.isLength(Infinity);
|
|
1820
|
+
* // => false
|
|
1821
|
+
*
|
|
1822
|
+
* _.isLength('3');
|
|
1823
|
+
* // => false
|
|
1824
|
+
*/
|
|
1825
|
+
function isLength(value) {
|
|
1826
|
+
return typeof value == 'number' &&
|
|
1827
|
+
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
/**
|
|
1831
|
+
* Checks if `value` is the
|
|
1832
|
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
1833
|
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
1834
|
+
*
|
|
1835
|
+
* @static
|
|
1836
|
+
* @memberOf _
|
|
1837
|
+
* @since 0.1.0
|
|
1838
|
+
* @category Lang
|
|
1839
|
+
* @param {*} value The value to check.
|
|
1840
|
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
1841
|
+
* @example
|
|
1842
|
+
*
|
|
1843
|
+
* _.isObject({});
|
|
1844
|
+
* // => true
|
|
1845
|
+
*
|
|
1846
|
+
* _.isObject([1, 2, 3]);
|
|
1847
|
+
* // => true
|
|
1848
|
+
*
|
|
1849
|
+
* _.isObject(_.noop);
|
|
1850
|
+
* // => true
|
|
1851
|
+
*
|
|
1852
|
+
* _.isObject(null);
|
|
1853
|
+
* // => false
|
|
1854
|
+
*/
|
|
1855
|
+
function isObject(value) {
|
|
1856
|
+
var type = typeof value;
|
|
1857
|
+
return !!value && (type == 'object' || type == 'function');
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
/**
|
|
1861
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
1862
|
+
* and has a `typeof` result of "object".
|
|
1863
|
+
*
|
|
1864
|
+
* @static
|
|
1865
|
+
* @memberOf _
|
|
1866
|
+
* @since 4.0.0
|
|
1867
|
+
* @category Lang
|
|
1868
|
+
* @param {*} value The value to check.
|
|
1869
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
1870
|
+
* @example
|
|
1871
|
+
*
|
|
1872
|
+
* _.isObjectLike({});
|
|
1873
|
+
* // => true
|
|
1874
|
+
*
|
|
1875
|
+
* _.isObjectLike([1, 2, 3]);
|
|
1876
|
+
* // => true
|
|
1877
|
+
*
|
|
1878
|
+
* _.isObjectLike(_.noop);
|
|
1879
|
+
* // => false
|
|
1880
|
+
*
|
|
1881
|
+
* _.isObjectLike(null);
|
|
1882
|
+
* // => false
|
|
1883
|
+
*/
|
|
1884
|
+
function isObjectLike(value) {
|
|
1885
|
+
return !!value && typeof value == 'object';
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
/**
|
|
1889
|
+
* This method returns `false`.
|
|
1890
|
+
*
|
|
1891
|
+
* @static
|
|
1892
|
+
* @memberOf _
|
|
1893
|
+
* @since 4.13.0
|
|
1894
|
+
* @category Util
|
|
1895
|
+
* @returns {boolean} Returns `false`.
|
|
1896
|
+
* @example
|
|
1897
|
+
*
|
|
1898
|
+
* _.times(2, _.stubFalse);
|
|
1899
|
+
* // => [false, false]
|
|
1900
|
+
*/
|
|
1901
|
+
function stubFalse() {
|
|
1902
|
+
return false;
|
|
1903
|
+
}
|
|
1904
|
+
|
|
1905
|
+
module.exports = isEmpty;
|
|
1906
|
+
}(lodash_isempty$1, lodash_isempty$1.exports));
|
|
1907
|
+
|
|
1908
|
+
var lodash_isempty = lodash_isempty$1.exports;
|
|
1909
|
+
|
|
1910
|
+
var isEmptyImport = /*#__PURE__*/Object.freeze(/*#__PURE__*/_mergeNamespaces({
|
|
1911
|
+
__proto__: null,
|
|
1912
|
+
'default': lodash_isempty
|
|
1913
|
+
}, [lodash_isempty$1.exports]));
|
|
1914
|
+
|
|
1915
|
+
var __values$6 = (undefined && undefined.__values) || function(o) {
|
|
1916
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1917
|
+
if (m) return m.call(o);
|
|
1918
|
+
if (o && typeof o.length === "number") return {
|
|
1919
|
+
next: function () {
|
|
1920
|
+
if (o && i >= o.length) o = void 0;
|
|
1921
|
+
return { value: o && o[i++], done: !o };
|
|
805
1922
|
}
|
|
806
|
-
}
|
|
807
|
-
return result;
|
|
808
1923
|
};
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
var
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
function toSource(func) {
|
|
818
|
-
if (func != null) {
|
|
819
|
-
try {
|
|
820
|
-
return funcToString2.call(func);
|
|
821
|
-
} catch (e) {
|
|
822
|
-
}
|
|
823
|
-
try {
|
|
824
|
-
return func + "";
|
|
825
|
-
} catch (e) {
|
|
826
|
-
}
|
|
1924
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1925
|
+
};
|
|
1926
|
+
var __read$2 = (undefined && undefined.__read) || function (o, n) {
|
|
1927
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
1928
|
+
if (!m) return o;
|
|
1929
|
+
var i = m.call(o), r, ar = [], e;
|
|
1930
|
+
try {
|
|
1931
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
827
1932
|
}
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
function isArrayLike(value) {
|
|
835
|
-
return value != null && isLength(value.length) && !isFunction(value);
|
|
836
|
-
}
|
|
837
|
-
function isArrayLikeObject(value) {
|
|
838
|
-
return isObjectLike2(value) && isArrayLike(value);
|
|
839
|
-
}
|
|
840
|
-
var isBuffer = nativeIsBuffer || stubFalse;
|
|
841
|
-
function isEmpty2(value) {
|
|
842
|
-
if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isArguments(value))) {
|
|
843
|
-
return !value.length;
|
|
1933
|
+
catch (error) { e = { error: error }; }
|
|
1934
|
+
finally {
|
|
1935
|
+
try {
|
|
1936
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
1937
|
+
}
|
|
1938
|
+
finally { if (e) throw e.error; }
|
|
844
1939
|
}
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
1940
|
+
return ar;
|
|
1941
|
+
};
|
|
1942
|
+
var isNil = lodash_isnil || isNilImport;
|
|
1943
|
+
var isEmpty$1 = lodash_isempty || isEmptyImport;
|
|
1944
|
+
/**
|
|
1945
|
+
* Get the value at `path` starting from `object`.
|
|
1946
|
+
* Allows optional chaining, e.g. `get(obj, 'a.b?.c')`
|
|
1947
|
+
*/
|
|
1948
|
+
function getPath(object, path, defaultValue, allOptional) {
|
|
1949
|
+
var e_1, _a, _b;
|
|
1950
|
+
if (allOptional === void 0) { allOptional = false; }
|
|
1951
|
+
if (isEmpty$1(path)) {
|
|
1952
|
+
return object;
|
|
848
1953
|
}
|
|
849
|
-
|
|
850
|
-
|
|
1954
|
+
var value = object;
|
|
1955
|
+
try {
|
|
1956
|
+
for (var _c = __values$6(crumblePath(path)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
1957
|
+
var crumb = _d.value;
|
|
1958
|
+
var key = crumb;
|
|
1959
|
+
var optional = void 0;
|
|
1960
|
+
if (typeof crumb === "string") {
|
|
1961
|
+
_b = __read$2(/^([^?]+)(\?)?$/.exec(crumb), 3), key = _b[1], optional = _b[2];
|
|
1962
|
+
}
|
|
1963
|
+
value = value[key];
|
|
1964
|
+
if (isNil(value) && (optional || allOptional)) {
|
|
1965
|
+
return defaultValue;
|
|
1966
|
+
}
|
|
1967
|
+
}
|
|
851
1968
|
}
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
1969
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1970
|
+
finally {
|
|
1971
|
+
try {
|
|
1972
|
+
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
1973
|
+
}
|
|
1974
|
+
finally { if (e_1) throw e_1.error; }
|
|
856
1975
|
}
|
|
857
|
-
return
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
var isEmptyImport = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ _mergeNamespaces({
|
|
880
|
-
__proto__: null,
|
|
881
|
-
[Symbol.toStringTag]: "Module",
|
|
882
|
-
"default": lodash_isempty
|
|
883
|
-
}, [lodash_isempty$1.exports]));
|
|
884
|
-
const isNil = lodash_isnil || isNilImport;
|
|
885
|
-
const isEmpty$1 = lodash_isempty || isEmptyImport;
|
|
886
|
-
function getPath(object, path, defaultValue, allOptional = false) {
|
|
887
|
-
if (isEmpty$1(path)) {
|
|
888
|
-
return object;
|
|
889
|
-
}
|
|
890
|
-
let value = object;
|
|
891
|
-
for (const crumb of crumblePath(path)) {
|
|
892
|
-
let key = crumb;
|
|
893
|
-
let optional;
|
|
894
|
-
if (typeof crumb === "string") {
|
|
895
|
-
[
|
|
896
|
-
,
|
|
897
|
-
key,
|
|
898
|
-
optional
|
|
899
|
-
] = /^([^?]+)(\?)?$/.exec(crumb);
|
|
1976
|
+
return isNil(value) ? defaultValue : value;
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
var __values$5 = (undefined && undefined.__values) || function(o) {
|
|
1980
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1981
|
+
if (m) return m.call(o);
|
|
1982
|
+
if (o && typeof o.length === "number") return {
|
|
1983
|
+
next: function () {
|
|
1984
|
+
if (o && i >= o.length) o = void 0;
|
|
1985
|
+
return { value: o && o[i++], done: !o };
|
|
1986
|
+
}
|
|
1987
|
+
};
|
|
1988
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1989
|
+
};
|
|
1990
|
+
/*
|
|
1991
|
+
* Return a copy of `obj` without the key `key`
|
|
1992
|
+
*/
|
|
1993
|
+
function omit(obj) {
|
|
1994
|
+
var e_1, _a;
|
|
1995
|
+
var keys = [];
|
|
1996
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
1997
|
+
keys[_i - 1] = arguments[_i];
|
|
900
1998
|
}
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
1999
|
+
var keySet = new Set(keys);
|
|
2000
|
+
var result = {};
|
|
2001
|
+
try {
|
|
2002
|
+
for (var _b = __values$5(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
2003
|
+
var k = _c.value;
|
|
2004
|
+
if (!keySet.has(k)) {
|
|
2005
|
+
result[k] = obj[k];
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
904
2008
|
}
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
for (const k of Object.keys(obj)) {
|
|
912
|
-
if (!keySet.has(k)) {
|
|
913
|
-
result[k] = obj[k];
|
|
2009
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2010
|
+
finally {
|
|
2011
|
+
try {
|
|
2012
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
2013
|
+
}
|
|
2014
|
+
finally { if (e_1) throw e_1.error; }
|
|
914
2015
|
}
|
|
915
|
-
|
|
916
|
-
return result;
|
|
2016
|
+
return result;
|
|
917
2017
|
}
|
|
918
|
-
|
|
2018
|
+
|
|
2019
|
+
var __values$4 = (undefined && undefined.__values) || function(o) {
|
|
2020
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
2021
|
+
if (m) return m.call(o);
|
|
2022
|
+
if (o && typeof o.length === "number") return {
|
|
2023
|
+
next: function () {
|
|
2024
|
+
if (o && i >= o.length) o = void 0;
|
|
2025
|
+
return { value: o && o[i++], done: !o };
|
|
2026
|
+
}
|
|
2027
|
+
};
|
|
2028
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2029
|
+
};
|
|
2030
|
+
var isEmpty = lodash_isempty || isEmptyImport;
|
|
2031
|
+
/** Set the value at `path` on `object`. */
|
|
919
2032
|
function setPath(object, path, newValue) {
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
if (isEmpty(path)) {
|
|
924
|
-
throw new Error("path is required");
|
|
925
|
-
}
|
|
926
|
-
const crumbs = crumblePath(path);
|
|
927
|
-
const finalCrumb = crumbs.splice(crumbs.length - 1, 1)[0];
|
|
928
|
-
let current = object;
|
|
929
|
-
for (const crumb of crumbs) {
|
|
930
|
-
current = current[crumb];
|
|
931
|
-
if (typeof current !== "object") {
|
|
932
|
-
throw new Error(`Cannot set value at given path: Path deadends at ${String(crumb)}`);
|
|
2033
|
+
var e_1, _a;
|
|
2034
|
+
if (typeof object !== "object") {
|
|
2035
|
+
throw new Error("object is required");
|
|
933
2036
|
}
|
|
934
|
-
|
|
935
|
-
|
|
2037
|
+
if (isEmpty(path)) {
|
|
2038
|
+
throw new Error("path is required");
|
|
2039
|
+
}
|
|
2040
|
+
var crumbs = crumblePath(path);
|
|
2041
|
+
var finalCrumb = crumbs.splice(crumbs.length - 1, 1)[0];
|
|
2042
|
+
var current = object;
|
|
2043
|
+
try {
|
|
2044
|
+
for (var crumbs_1 = __values$4(crumbs), crumbs_1_1 = crumbs_1.next(); !crumbs_1_1.done; crumbs_1_1 = crumbs_1.next()) {
|
|
2045
|
+
var crumb = crumbs_1_1.value;
|
|
2046
|
+
current = current[crumb];
|
|
2047
|
+
if (typeof current !== "object") {
|
|
2048
|
+
throw new Error("Cannot set value at given path: Path deadends at " + String(crumb));
|
|
2049
|
+
}
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2053
|
+
finally {
|
|
2054
|
+
try {
|
|
2055
|
+
if (crumbs_1_1 && !crumbs_1_1.done && (_a = crumbs_1.return)) _a.call(crumbs_1);
|
|
2056
|
+
}
|
|
2057
|
+
finally { if (e_1) throw e_1.error; }
|
|
2058
|
+
}
|
|
2059
|
+
current[finalCrumb] = newValue;
|
|
936
2060
|
}
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
2061
|
+
|
|
2062
|
+
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
|
|
2063
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
2064
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
2065
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
2066
|
+
function step(op) {
|
|
2067
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
2068
|
+
while (_) try {
|
|
2069
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
2070
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
2071
|
+
switch (op[0]) {
|
|
2072
|
+
case 0: case 1: t = op; break;
|
|
2073
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
2074
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
2075
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
2076
|
+
default:
|
|
2077
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
2078
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
2079
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
2080
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
2081
|
+
if (t[2]) _.ops.pop();
|
|
2082
|
+
_.trys.pop(); continue;
|
|
2083
|
+
}
|
|
2084
|
+
op = body.call(thisArg, _);
|
|
2085
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
2086
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
2087
|
+
}
|
|
2088
|
+
};
|
|
2089
|
+
var __values$3 = (undefined && undefined.__values) || function(o) {
|
|
2090
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
2091
|
+
if (m) return m.call(o);
|
|
2092
|
+
if (o && typeof o.length === "number") return {
|
|
2093
|
+
next: function () {
|
|
2094
|
+
if (o && i >= o.length) o = void 0;
|
|
2095
|
+
return { value: o && o[i++], done: !o };
|
|
2096
|
+
}
|
|
2097
|
+
};
|
|
2098
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2099
|
+
};
|
|
2100
|
+
/** Generator for iterating down a path on an object. */
|
|
2101
|
+
function traversePath(object, path) {
|
|
2102
|
+
var obj, _a, _b, crumb, e_1_1;
|
|
2103
|
+
var e_1, _c;
|
|
2104
|
+
return __generator(this, function (_d) {
|
|
2105
|
+
switch (_d.label) {
|
|
2106
|
+
case 0: return [4 /*yield*/, object];
|
|
2107
|
+
case 1:
|
|
2108
|
+
_d.sent();
|
|
2109
|
+
obj = object;
|
|
2110
|
+
_d.label = 2;
|
|
2111
|
+
case 2:
|
|
2112
|
+
_d.trys.push([2, 7, 8, 9]);
|
|
2113
|
+
_a = __values$3(crumblePath(path)), _b = _a.next();
|
|
2114
|
+
_d.label = 3;
|
|
2115
|
+
case 3:
|
|
2116
|
+
if (!!_b.done) return [3 /*break*/, 6];
|
|
2117
|
+
crumb = _b.value;
|
|
2118
|
+
obj = obj[crumb];
|
|
2119
|
+
return [4 /*yield*/, obj];
|
|
2120
|
+
case 4:
|
|
2121
|
+
_d.sent();
|
|
2122
|
+
_d.label = 5;
|
|
2123
|
+
case 5:
|
|
2124
|
+
_b = _a.next();
|
|
2125
|
+
return [3 /*break*/, 3];
|
|
2126
|
+
case 6: return [3 /*break*/, 9];
|
|
2127
|
+
case 7:
|
|
2128
|
+
e_1_1 = _d.sent();
|
|
2129
|
+
e_1 = { error: e_1_1 };
|
|
2130
|
+
return [3 /*break*/, 9];
|
|
2131
|
+
case 8:
|
|
2132
|
+
try {
|
|
2133
|
+
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
2134
|
+
}
|
|
2135
|
+
finally { if (e_1) throw e_1.error; }
|
|
2136
|
+
return [7 /*endfinally*/];
|
|
2137
|
+
case 9: return [2 /*return*/];
|
|
2138
|
+
}
|
|
2139
|
+
});
|
|
944
2140
|
}
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
2141
|
+
|
|
2142
|
+
var __values$2 = (undefined && undefined.__values) || function(o) {
|
|
2143
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
2144
|
+
if (m) return m.call(o);
|
|
2145
|
+
if (o && typeof o.length === "number") return {
|
|
2146
|
+
next: function () {
|
|
2147
|
+
if (o && i >= o.length) o = void 0;
|
|
2148
|
+
return { value: o && o[i++], done: !o };
|
|
2149
|
+
}
|
|
2150
|
+
};
|
|
2151
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2152
|
+
};
|
|
2153
|
+
/**
|
|
2154
|
+
* Recursive merge of any number of objects
|
|
2155
|
+
*/
|
|
2156
|
+
function mergeDeep() {
|
|
2157
|
+
var e_1, _a, e_2, _b;
|
|
2158
|
+
var objectsToMerge = [];
|
|
2159
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2160
|
+
objectsToMerge[_i] = arguments[_i];
|
|
956
2161
|
}
|
|
957
|
-
|
|
958
|
-
|
|
2162
|
+
var result = {};
|
|
2163
|
+
try {
|
|
2164
|
+
for (var objectsToMerge_1 = __values$2(objectsToMerge), objectsToMerge_1_1 = objectsToMerge_1.next(); !objectsToMerge_1_1.done; objectsToMerge_1_1 = objectsToMerge_1.next()) {
|
|
2165
|
+
var mergee = objectsToMerge_1_1.value;
|
|
2166
|
+
try {
|
|
2167
|
+
for (var _c = (e_2 = void 0, __values$2(Object.keys(mergee))), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
2168
|
+
var key = _d.value;
|
|
2169
|
+
if (Object.prototype.hasOwnProperty.call(result, key)
|
|
2170
|
+
&& Object.getOwnPropertyDescriptor(result, key).writable
|
|
2171
|
+
&& lodash_isplainobject(result[key])) {
|
|
2172
|
+
result[key] = mergeDeep(result[key], mergee[key]);
|
|
2173
|
+
}
|
|
2174
|
+
else if (lodash_isplainobject(mergee[key])) {
|
|
2175
|
+
result[key] = mergeDeep({}, mergee[key]);
|
|
2176
|
+
}
|
|
2177
|
+
else {
|
|
2178
|
+
result[key] = mergee[key];
|
|
2179
|
+
}
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2182
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
2183
|
+
finally {
|
|
2184
|
+
try {
|
|
2185
|
+
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
|
2186
|
+
}
|
|
2187
|
+
finally { if (e_2) throw e_2.error; }
|
|
2188
|
+
}
|
|
2189
|
+
}
|
|
2190
|
+
}
|
|
2191
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2192
|
+
finally {
|
|
2193
|
+
try {
|
|
2194
|
+
if (objectsToMerge_1_1 && !objectsToMerge_1_1.done && (_a = objectsToMerge_1.return)) _a.call(objectsToMerge_1);
|
|
2195
|
+
}
|
|
2196
|
+
finally { if (e_1) throw e_1.error; }
|
|
2197
|
+
}
|
|
2198
|
+
return result;
|
|
959
2199
|
}
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
2200
|
+
|
|
2201
|
+
var __values$1 = (undefined && undefined.__values) || function(o) {
|
|
2202
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
2203
|
+
if (m) return m.call(o);
|
|
2204
|
+
if (o && typeof o.length === "number") return {
|
|
2205
|
+
next: function () {
|
|
2206
|
+
if (o && i >= o.length) o = void 0;
|
|
2207
|
+
return { value: o && o[i++], done: !o };
|
|
2208
|
+
}
|
|
2209
|
+
};
|
|
2210
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2211
|
+
};
|
|
2212
|
+
/**
|
|
2213
|
+
* Recursive merge of any number of objects using `copyProperty()` rather than assignment
|
|
2214
|
+
*/
|
|
2215
|
+
function mergePropertiesDeep() {
|
|
2216
|
+
var e_1, _a, e_2, _b;
|
|
2217
|
+
var objectsToMerge = [];
|
|
2218
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2219
|
+
objectsToMerge[_i] = arguments[_i];
|
|
971
2220
|
}
|
|
972
|
-
|
|
973
|
-
|
|
2221
|
+
var result = {};
|
|
2222
|
+
try {
|
|
2223
|
+
for (var objectsToMerge_1 = __values$1(objectsToMerge), objectsToMerge_1_1 = objectsToMerge_1.next(); !objectsToMerge_1_1.done; objectsToMerge_1_1 = objectsToMerge_1.next()) {
|
|
2224
|
+
var mergee = objectsToMerge_1_1.value;
|
|
2225
|
+
try {
|
|
2226
|
+
for (var _c = (e_2 = void 0, __values$1(Object.keys(mergee))), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
2227
|
+
var key = _d.value;
|
|
2228
|
+
if (Object.prototype.hasOwnProperty.call(result, key)
|
|
2229
|
+
&& Object.getOwnPropertyDescriptor(result, key).writable
|
|
2230
|
+
&& lodash_isplainobject(result[key])) {
|
|
2231
|
+
result[key] = mergePropertiesDeep(result[key], mergee[key]);
|
|
2232
|
+
}
|
|
2233
|
+
else if (lodash_isplainobject(mergee[key])) {
|
|
2234
|
+
result[key] = mergePropertiesDeep({}, mergee[key]);
|
|
2235
|
+
}
|
|
2236
|
+
else {
|
|
2237
|
+
copyProperty(key, mergee, result);
|
|
2238
|
+
}
|
|
2239
|
+
}
|
|
2240
|
+
}
|
|
2241
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
2242
|
+
finally {
|
|
2243
|
+
try {
|
|
2244
|
+
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
|
2245
|
+
}
|
|
2246
|
+
finally { if (e_2) throw e_2.error; }
|
|
2247
|
+
}
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2251
|
+
finally {
|
|
2252
|
+
try {
|
|
2253
|
+
if (objectsToMerge_1_1 && !objectsToMerge_1_1.done && (_a = objectsToMerge_1.return)) _a.call(objectsToMerge_1);
|
|
2254
|
+
}
|
|
2255
|
+
finally { if (e_1) throw e_1.error; }
|
|
2256
|
+
}
|
|
2257
|
+
return result;
|
|
974
2258
|
}
|
|
2259
|
+
|
|
2260
|
+
var __values = (undefined && undefined.__values) || function(o) {
|
|
2261
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
2262
|
+
if (m) return m.call(o);
|
|
2263
|
+
if (o && typeof o.length === "number") return {
|
|
2264
|
+
next: function () {
|
|
2265
|
+
if (o && i >= o.length) o = void 0;
|
|
2266
|
+
return { value: o && o[i++], done: !o };
|
|
2267
|
+
}
|
|
2268
|
+
};
|
|
2269
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2270
|
+
};
|
|
2271
|
+
/** Returns the values of an object. */
|
|
975
2272
|
function values(object) {
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
2273
|
+
var e_1, _a;
|
|
2274
|
+
var vals = [];
|
|
2275
|
+
try {
|
|
2276
|
+
for (var _b = __values(Object.keys(object)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
2277
|
+
var key = _c.value;
|
|
2278
|
+
vals.push(object[key]);
|
|
2279
|
+
}
|
|
2280
|
+
}
|
|
2281
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2282
|
+
finally {
|
|
2283
|
+
try {
|
|
2284
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
2285
|
+
}
|
|
2286
|
+
finally { if (e_1) throw e_1.error; }
|
|
2287
|
+
}
|
|
2288
|
+
return vals;
|
|
981
2289
|
}
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
2290
|
+
|
|
2291
|
+
var __read$1 = (undefined && undefined.__read) || function (o, n) {
|
|
2292
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
2293
|
+
if (!m) return o;
|
|
2294
|
+
var i = m.call(o), r, ar = [], e;
|
|
2295
|
+
try {
|
|
2296
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
2297
|
+
}
|
|
2298
|
+
catch (error) { e = { error: error }; }
|
|
2299
|
+
finally {
|
|
2300
|
+
try {
|
|
2301
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
2302
|
+
}
|
|
2303
|
+
finally { if (e) throw e.error; }
|
|
2304
|
+
}
|
|
2305
|
+
return ar;
|
|
2306
|
+
};
|
|
2307
|
+
var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
|
2308
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
2309
|
+
if (ar || !(i in from)) {
|
|
2310
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
2311
|
+
ar[i] = from[i];
|
|
2312
|
+
}
|
|
2313
|
+
}
|
|
2314
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
2315
|
+
};
|
|
2316
|
+
/** Template tag function for making strings containing code blocks easier to deal with. */
|
|
2317
|
+
function code(strings) {
|
|
2318
|
+
var interpolations = [];
|
|
2319
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
2320
|
+
interpolations[_i - 1] = arguments[_i];
|
|
2321
|
+
}
|
|
2322
|
+
var s = strings.reduce(function (a, b, i) { return "" + a + (i <= interpolations.length ? String(interpolations[i - 1]) : "") + b; });
|
|
2323
|
+
var leadingWhitespace = Math.min.apply(Math, __spreadArray([], __read$1(s.split(/[\r\n]/)
|
|
2324
|
+
.filter(function (l) { return l.trim(); })
|
|
2325
|
+
.map(function (l) { return (/^ */.exec(l))[0].length; })), false));
|
|
2326
|
+
return s.replace(new RegExp("^ {" + leadingWhitespace + "}", "gm"), "").trim();
|
|
986
2327
|
}
|
|
2328
|
+
|
|
2329
|
+
var __read = (undefined && undefined.__read) || function (o, n) {
|
|
2330
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
2331
|
+
if (!m) return o;
|
|
2332
|
+
var i = m.call(o), r, ar = [], e;
|
|
2333
|
+
try {
|
|
2334
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
2335
|
+
}
|
|
2336
|
+
catch (error) { e = { error: error }; }
|
|
2337
|
+
finally {
|
|
2338
|
+
try {
|
|
2339
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
2340
|
+
}
|
|
2341
|
+
finally { if (e) throw e.error; }
|
|
2342
|
+
}
|
|
2343
|
+
return ar;
|
|
2344
|
+
};
|
|
2345
|
+
/**
|
|
2346
|
+
* Parses a string as a file size and returns the size in bytes. For example,
|
|
2347
|
+
* `parseFileSize("2KB")` will return `2048`.
|
|
2348
|
+
*/
|
|
987
2349
|
function parseFileSize(fileSize) {
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
"B",
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
return Math.ceil(num * 1024 ** magnitude);
|
|
2350
|
+
var unitMatch = /[A-Z]?B$/.exec(fileSize);
|
|
2351
|
+
if (!unitMatch) {
|
|
2352
|
+
throw new Error("Input to parseFileSize (\"" + fileSize + "\") doesn't seem like a file size; "
|
|
2353
|
+
+ "cannot identify a unit (e.g. KB, GB)");
|
|
2354
|
+
}
|
|
2355
|
+
var _a = __read(unitMatch, 1), unit = _a[0];
|
|
2356
|
+
var num = Number(fileSize.replace(unit, ""));
|
|
2357
|
+
if (Number.isNaN(num)) {
|
|
2358
|
+
throw new Error("Could not parse a number out of input to parseFileSize (\"" + fileSize + "\")");
|
|
2359
|
+
}
|
|
2360
|
+
var magnitude = ["B",
|
|
2361
|
+
"KB",
|
|
2362
|
+
"MB",
|
|
2363
|
+
"GB",
|
|
2364
|
+
"TB",
|
|
2365
|
+
"PB"].indexOf(unit);
|
|
2366
|
+
if (magnitude === -1) {
|
|
2367
|
+
throw new Error("parseFileSize does not support units above PB");
|
|
2368
|
+
}
|
|
2369
|
+
return Math.ceil(num * (Math.pow(1024, magnitude)));
|
|
1009
2370
|
}
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
2371
|
+
|
|
2372
|
+
var REGEX_REPLACEMENT = /(<%=|{{)(.+?)(%>|}})/g;
|
|
2373
|
+
var REGEX_IF = /<%\?(.+?)%>(.+?)<\/%>/g;
|
|
2374
|
+
var SYMBOL_TEMPLATE_SOURCE = Symbol("sps.utils.templateSrc");
|
|
2375
|
+
/**
|
|
2376
|
+
* Every string templating thing out there whether lodash, doT, handlebars, etc
|
|
2377
|
+
* is extremely complicated to cover a variety of use cases. This just has two
|
|
2378
|
+
* very simple features and great caution should be exercised in making it any more
|
|
2379
|
+
* complex than that. A value can be interpolated like so:
|
|
2380
|
+
* `<%= foo.bar %>`
|
|
2381
|
+
* And a basic "if" conditional can be used like so:
|
|
2382
|
+
* `<%? a?.b?.c %>This part will only appear if a.b.c is truthy!</%>`
|
|
2383
|
+
* You can put interpolations inside a conditional, as you'd expect. That's it.
|
|
2384
|
+
*/
|
|
1013
2385
|
function template(string) {
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
2386
|
+
var fn = function (data) { return string
|
|
2387
|
+
.replace(REGEX_IF, function (match, pathToCheck, content) { return (getPath(data, pathToCheck.trim()) ? content : ""); })
|
|
2388
|
+
.replace(REGEX_REPLACEMENT, function (match, _, pathToInterpolate) { return getPath(data, pathToInterpolate.trim(), ""); }); };
|
|
2389
|
+
fn[SYMBOL_TEMPLATE_SOURCE] = string;
|
|
2390
|
+
return fn;
|
|
1017
2391
|
}
|
|
1018
2392
|
function isTemplate(x) {
|
|
1019
|
-
|
|
2393
|
+
return typeof x === "string" && (REGEX_REPLACEMENT.test(x) || REGEX_IF.test(x));
|
|
1020
2394
|
}
|
|
1021
2395
|
function isTemplateFn(x) {
|
|
1022
|
-
|
|
2396
|
+
return typeof x === "function" && Object.prototype.hasOwnProperty.call(x, SYMBOL_TEMPLATE_SOURCE);
|
|
1023
2397
|
}
|
|
2398
|
+
|
|
1024
2399
|
export { CustomEvent, DiffChange, EDI_DOCUMENT_TYPE, Op, castToNumber, code, constrain, copyProperty, crumblePath, debounce, debounced, decimalRound, deepFreeze, diff, flatten, forEachEntryDeep, forEachNestedObject, getPath, isSubset, isTemplate, isTemplateFn, lockToAnimationFrames, lockedToAnimationFrames, mergeDeep, mergePropertiesDeep, omit, onNextTick, parseFileSize, range, setPath, simpleMetadataDecoratorApplicator, template, tickDelay, toFileSizeString, traversePath, values };
|