@orion-js/schema 4.0.0-alpha.3 → 4.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +298 -2953
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +190 -0
- package/dist/index.d.ts +174 -169
- package/dist/index.js +258 -2928
- package/dist/index.js.map +1 -0
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -1,2730 +1,23 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
3
1
|
var __defProp = Object.defineProperty;
|
|
4
|
-
var
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __toESM = (mod, isNodeMode, target) => {
|
|
7
|
-
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
8
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
9
|
-
for (let key of __getOwnPropNames(mod))
|
|
10
|
-
if (!__hasOwnProp.call(to, key))
|
|
11
|
-
__defProp(to, key, {
|
|
12
|
-
get: () => mod[key],
|
|
13
|
-
enumerable: true
|
|
14
|
-
});
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
18
|
-
|
|
19
|
-
// ../../node_modules/lodash/_freeGlobal.js
|
|
20
|
-
var require__freeGlobal = __commonJS((exports, module) => {
|
|
21
|
-
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
22
|
-
module.exports = freeGlobal;
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
// ../../node_modules/lodash/_root.js
|
|
26
|
-
var require__root = __commonJS((exports, module) => {
|
|
27
|
-
var freeGlobal = require__freeGlobal();
|
|
28
|
-
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
29
|
-
var root = freeGlobal || freeSelf || Function("return this")();
|
|
30
|
-
module.exports = root;
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
// ../../node_modules/lodash/_Symbol.js
|
|
34
|
-
var require__Symbol = __commonJS((exports, module) => {
|
|
35
|
-
var root = require__root();
|
|
36
|
-
var Symbol2 = root.Symbol;
|
|
37
|
-
module.exports = Symbol2;
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
// ../../node_modules/lodash/_getRawTag.js
|
|
41
|
-
var require__getRawTag = __commonJS((exports, module) => {
|
|
42
|
-
var Symbol2 = require__Symbol();
|
|
43
|
-
var objectProto = Object.prototype;
|
|
44
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
45
|
-
var nativeObjectToString = objectProto.toString;
|
|
46
|
-
var symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined;
|
|
47
|
-
function getRawTag(value) {
|
|
48
|
-
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
|
|
49
|
-
try {
|
|
50
|
-
value[symToStringTag] = undefined;
|
|
51
|
-
var unmasked = true;
|
|
52
|
-
} catch (e) {
|
|
53
|
-
}
|
|
54
|
-
var result = nativeObjectToString.call(value);
|
|
55
|
-
if (unmasked) {
|
|
56
|
-
if (isOwn) {
|
|
57
|
-
value[symToStringTag] = tag;
|
|
58
|
-
} else {
|
|
59
|
-
delete value[symToStringTag];
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return result;
|
|
63
|
-
}
|
|
64
|
-
module.exports = getRawTag;
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
// ../../node_modules/lodash/_objectToString.js
|
|
68
|
-
var require__objectToString = __commonJS((exports, module) => {
|
|
69
|
-
var objectProto = Object.prototype;
|
|
70
|
-
var nativeObjectToString = objectProto.toString;
|
|
71
|
-
function objectToString(value) {
|
|
72
|
-
return nativeObjectToString.call(value);
|
|
73
|
-
}
|
|
74
|
-
module.exports = objectToString;
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
// ../../node_modules/lodash/_baseGetTag.js
|
|
78
|
-
var require__baseGetTag = __commonJS((exports, module) => {
|
|
79
|
-
var Symbol2 = require__Symbol();
|
|
80
|
-
var getRawTag = require__getRawTag();
|
|
81
|
-
var objectToString = require__objectToString();
|
|
82
|
-
var nullTag = "[object Null]";
|
|
83
|
-
var undefinedTag = "[object Undefined]";
|
|
84
|
-
var symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined;
|
|
85
|
-
function baseGetTag(value) {
|
|
86
|
-
if (value == null) {
|
|
87
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
88
|
-
}
|
|
89
|
-
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
90
|
-
}
|
|
91
|
-
module.exports = baseGetTag;
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
// ../../node_modules/lodash/_overArg.js
|
|
95
|
-
var require__overArg = __commonJS((exports, module) => {
|
|
96
|
-
function overArg(func, transform) {
|
|
97
|
-
return function(arg) {
|
|
98
|
-
return func(transform(arg));
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
module.exports = overArg;
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
// ../../node_modules/lodash/_getPrototype.js
|
|
105
|
-
var require__getPrototype = __commonJS((exports, module) => {
|
|
106
|
-
var overArg = require__overArg();
|
|
107
|
-
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
108
|
-
module.exports = getPrototype;
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
// ../../node_modules/lodash/isObjectLike.js
|
|
112
|
-
var require_isObjectLike = __commonJS((exports, module) => {
|
|
113
|
-
function isObjectLike(value) {
|
|
114
|
-
return value != null && typeof value == "object";
|
|
115
|
-
}
|
|
116
|
-
module.exports = isObjectLike;
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
// ../../node_modules/lodash/isPlainObject.js
|
|
120
|
-
var require_isPlainObject = __commonJS((exports, module) => {
|
|
121
|
-
var baseGetTag = require__baseGetTag();
|
|
122
|
-
var getPrototype = require__getPrototype();
|
|
123
|
-
var isObjectLike = require_isObjectLike();
|
|
124
|
-
var objectTag = "[object Object]";
|
|
125
|
-
var funcProto = Function.prototype;
|
|
126
|
-
var objectProto = Object.prototype;
|
|
127
|
-
var funcToString = funcProto.toString;
|
|
128
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
129
|
-
var objectCtorString = funcToString.call(Object);
|
|
130
|
-
function isPlainObject(value) {
|
|
131
|
-
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
|
|
132
|
-
return false;
|
|
133
|
-
}
|
|
134
|
-
var proto = getPrototype(value);
|
|
135
|
-
if (proto === null) {
|
|
136
|
-
return true;
|
|
137
|
-
}
|
|
138
|
-
var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
|
|
139
|
-
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|
140
|
-
}
|
|
141
|
-
module.exports = isPlainObject;
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
// ../../node_modules/lodash/isNil.js
|
|
145
|
-
var require_isNil = __commonJS((exports, module) => {
|
|
146
|
-
function isNil(value) {
|
|
147
|
-
return value == null;
|
|
148
|
-
}
|
|
149
|
-
module.exports = isNil;
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
// ../../node_modules/lodash/isArray.js
|
|
153
|
-
var require_isArray = __commonJS((exports, module) => {
|
|
154
|
-
var isArray = Array.isArray;
|
|
155
|
-
module.exports = isArray;
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
// ../../node_modules/lodash/isString.js
|
|
159
|
-
var require_isString = __commonJS((exports, module) => {
|
|
160
|
-
var baseGetTag = require__baseGetTag();
|
|
161
|
-
var isArray = require_isArray();
|
|
162
|
-
var isObjectLike = require_isObjectLike();
|
|
163
|
-
var stringTag = "[object String]";
|
|
164
|
-
function isString(value) {
|
|
165
|
-
return typeof value == "string" || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
|
|
166
|
-
}
|
|
167
|
-
module.exports = isString;
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
// ../../node_modules/lodash/isObject.js
|
|
171
|
-
var require_isObject = __commonJS((exports, module) => {
|
|
172
|
-
function isObject(value) {
|
|
173
|
-
var type = typeof value;
|
|
174
|
-
return value != null && (type == "object" || type == "function");
|
|
175
|
-
}
|
|
176
|
-
module.exports = isObject;
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
// ../../node_modules/lodash/isFunction.js
|
|
180
|
-
var require_isFunction = __commonJS((exports, module) => {
|
|
181
|
-
var baseGetTag = require__baseGetTag();
|
|
182
|
-
var isObject = require_isObject();
|
|
183
|
-
var asyncTag = "[object AsyncFunction]";
|
|
184
|
-
var funcTag = "[object Function]";
|
|
185
|
-
var genTag = "[object GeneratorFunction]";
|
|
186
|
-
var proxyTag = "[object Proxy]";
|
|
187
|
-
function isFunction(value) {
|
|
188
|
-
if (!isObject(value)) {
|
|
189
|
-
return false;
|
|
190
|
-
}
|
|
191
|
-
var tag = baseGetTag(value);
|
|
192
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
193
|
-
}
|
|
194
|
-
module.exports = isFunction;
|
|
195
|
-
});
|
|
196
|
-
|
|
197
|
-
// ../../node_modules/lodash/_coreJsData.js
|
|
198
|
-
var require__coreJsData = __commonJS((exports, module) => {
|
|
199
|
-
var root = require__root();
|
|
200
|
-
var coreJsData = root["__core-js_shared__"];
|
|
201
|
-
module.exports = coreJsData;
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
// ../../node_modules/lodash/_isMasked.js
|
|
205
|
-
var require__isMasked = __commonJS((exports, module) => {
|
|
206
|
-
var coreJsData = require__coreJsData();
|
|
207
|
-
var maskSrcKey = function() {
|
|
208
|
-
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
209
|
-
return uid ? "Symbol(src)_1." + uid : "";
|
|
210
|
-
}();
|
|
211
|
-
function isMasked(func) {
|
|
212
|
-
return !!maskSrcKey && maskSrcKey in func;
|
|
213
|
-
}
|
|
214
|
-
module.exports = isMasked;
|
|
215
|
-
});
|
|
216
|
-
|
|
217
|
-
// ../../node_modules/lodash/_toSource.js
|
|
218
|
-
var require__toSource = __commonJS((exports, module) => {
|
|
219
|
-
var funcProto = Function.prototype;
|
|
220
|
-
var funcToString = funcProto.toString;
|
|
221
|
-
function toSource(func) {
|
|
222
|
-
if (func != null) {
|
|
223
|
-
try {
|
|
224
|
-
return funcToString.call(func);
|
|
225
|
-
} catch (e) {
|
|
226
|
-
}
|
|
227
|
-
try {
|
|
228
|
-
return func + "";
|
|
229
|
-
} catch (e) {
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
return "";
|
|
233
|
-
}
|
|
234
|
-
module.exports = toSource;
|
|
235
|
-
});
|
|
236
|
-
|
|
237
|
-
// ../../node_modules/lodash/_baseIsNative.js
|
|
238
|
-
var require__baseIsNative = __commonJS((exports, module) => {
|
|
239
|
-
var isFunction = require_isFunction();
|
|
240
|
-
var isMasked = require__isMasked();
|
|
241
|
-
var isObject = require_isObject();
|
|
242
|
-
var toSource = require__toSource();
|
|
243
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
244
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
245
|
-
var funcProto = Function.prototype;
|
|
246
|
-
var objectProto = Object.prototype;
|
|
247
|
-
var funcToString = funcProto.toString;
|
|
248
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
249
|
-
var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
250
|
-
function baseIsNative(value) {
|
|
251
|
-
if (!isObject(value) || isMasked(value)) {
|
|
252
|
-
return false;
|
|
253
|
-
}
|
|
254
|
-
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
255
|
-
return pattern.test(toSource(value));
|
|
256
|
-
}
|
|
257
|
-
module.exports = baseIsNative;
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
// ../../node_modules/lodash/_getValue.js
|
|
261
|
-
var require__getValue = __commonJS((exports, module) => {
|
|
262
|
-
function getValue(object, key) {
|
|
263
|
-
return object == null ? undefined : object[key];
|
|
264
|
-
}
|
|
265
|
-
module.exports = getValue;
|
|
266
|
-
});
|
|
267
|
-
|
|
268
|
-
// ../../node_modules/lodash/_getNative.js
|
|
269
|
-
var require__getNative = __commonJS((exports, module) => {
|
|
270
|
-
var baseIsNative = require__baseIsNative();
|
|
271
|
-
var getValue = require__getValue();
|
|
272
|
-
function getNative(object, key) {
|
|
273
|
-
var value = getValue(object, key);
|
|
274
|
-
return baseIsNative(value) ? value : undefined;
|
|
275
|
-
}
|
|
276
|
-
module.exports = getNative;
|
|
277
|
-
});
|
|
278
|
-
|
|
279
|
-
// ../../node_modules/lodash/_nativeCreate.js
|
|
280
|
-
var require__nativeCreate = __commonJS((exports, module) => {
|
|
281
|
-
var getNative = require__getNative();
|
|
282
|
-
var nativeCreate = getNative(Object, "create");
|
|
283
|
-
module.exports = nativeCreate;
|
|
284
|
-
});
|
|
285
|
-
|
|
286
|
-
// ../../node_modules/lodash/_hashClear.js
|
|
287
|
-
var require__hashClear = __commonJS((exports, module) => {
|
|
288
|
-
var nativeCreate = require__nativeCreate();
|
|
289
|
-
function hashClear() {
|
|
290
|
-
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
291
|
-
this.size = 0;
|
|
292
|
-
}
|
|
293
|
-
module.exports = hashClear;
|
|
294
|
-
});
|
|
295
|
-
|
|
296
|
-
// ../../node_modules/lodash/_hashDelete.js
|
|
297
|
-
var require__hashDelete = __commonJS((exports, module) => {
|
|
298
|
-
function hashDelete(key) {
|
|
299
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
300
|
-
this.size -= result ? 1 : 0;
|
|
301
|
-
return result;
|
|
302
|
-
}
|
|
303
|
-
module.exports = hashDelete;
|
|
304
|
-
});
|
|
305
|
-
|
|
306
|
-
// ../../node_modules/lodash/_hashGet.js
|
|
307
|
-
var require__hashGet = __commonJS((exports, module) => {
|
|
308
|
-
var nativeCreate = require__nativeCreate();
|
|
309
|
-
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
310
|
-
var objectProto = Object.prototype;
|
|
311
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
312
|
-
function hashGet(key) {
|
|
313
|
-
var data = this.__data__;
|
|
314
|
-
if (nativeCreate) {
|
|
315
|
-
var result = data[key];
|
|
316
|
-
return result === HASH_UNDEFINED ? undefined : result;
|
|
317
|
-
}
|
|
318
|
-
return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
|
319
|
-
}
|
|
320
|
-
module.exports = hashGet;
|
|
321
|
-
});
|
|
322
|
-
|
|
323
|
-
// ../../node_modules/lodash/_hashHas.js
|
|
324
|
-
var require__hashHas = __commonJS((exports, module) => {
|
|
325
|
-
var nativeCreate = require__nativeCreate();
|
|
326
|
-
var objectProto = Object.prototype;
|
|
327
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
328
|
-
function hashHas(key) {
|
|
329
|
-
var data = this.__data__;
|
|
330
|
-
return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
|
|
331
|
-
}
|
|
332
|
-
module.exports = hashHas;
|
|
333
|
-
});
|
|
334
|
-
|
|
335
|
-
// ../../node_modules/lodash/_hashSet.js
|
|
336
|
-
var require__hashSet = __commonJS((exports, module) => {
|
|
337
|
-
var nativeCreate = require__nativeCreate();
|
|
338
|
-
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
339
|
-
function hashSet(key, value) {
|
|
340
|
-
var data = this.__data__;
|
|
341
|
-
this.size += this.has(key) ? 0 : 1;
|
|
342
|
-
data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
|
|
343
|
-
return this;
|
|
344
|
-
}
|
|
345
|
-
module.exports = hashSet;
|
|
346
|
-
});
|
|
347
|
-
|
|
348
|
-
// ../../node_modules/lodash/_Hash.js
|
|
349
|
-
var require__Hash = __commonJS((exports, module) => {
|
|
350
|
-
var hashClear = require__hashClear();
|
|
351
|
-
var hashDelete = require__hashDelete();
|
|
352
|
-
var hashGet = require__hashGet();
|
|
353
|
-
var hashHas = require__hashHas();
|
|
354
|
-
var hashSet = require__hashSet();
|
|
355
|
-
function Hash(entries) {
|
|
356
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
357
|
-
this.clear();
|
|
358
|
-
while (++index < length) {
|
|
359
|
-
var entry = entries[index];
|
|
360
|
-
this.set(entry[0], entry[1]);
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
Hash.prototype.clear = hashClear;
|
|
364
|
-
Hash.prototype["delete"] = hashDelete;
|
|
365
|
-
Hash.prototype.get = hashGet;
|
|
366
|
-
Hash.prototype.has = hashHas;
|
|
367
|
-
Hash.prototype.set = hashSet;
|
|
368
|
-
module.exports = Hash;
|
|
369
|
-
});
|
|
370
|
-
|
|
371
|
-
// ../../node_modules/lodash/_listCacheClear.js
|
|
372
|
-
var require__listCacheClear = __commonJS((exports, module) => {
|
|
373
|
-
function listCacheClear() {
|
|
374
|
-
this.__data__ = [];
|
|
375
|
-
this.size = 0;
|
|
376
|
-
}
|
|
377
|
-
module.exports = listCacheClear;
|
|
378
|
-
});
|
|
379
|
-
|
|
380
|
-
// ../../node_modules/lodash/eq.js
|
|
381
|
-
var require_eq = __commonJS((exports, module) => {
|
|
382
|
-
function eq(value, other) {
|
|
383
|
-
return value === other || value !== value && other !== other;
|
|
384
|
-
}
|
|
385
|
-
module.exports = eq;
|
|
386
|
-
});
|
|
387
|
-
|
|
388
|
-
// ../../node_modules/lodash/_assocIndexOf.js
|
|
389
|
-
var require__assocIndexOf = __commonJS((exports, module) => {
|
|
390
|
-
var eq = require_eq();
|
|
391
|
-
function assocIndexOf(array, key) {
|
|
392
|
-
var length = array.length;
|
|
393
|
-
while (length--) {
|
|
394
|
-
if (eq(array[length][0], key)) {
|
|
395
|
-
return length;
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
return -1;
|
|
399
|
-
}
|
|
400
|
-
module.exports = assocIndexOf;
|
|
401
|
-
});
|
|
402
|
-
|
|
403
|
-
// ../../node_modules/lodash/_listCacheDelete.js
|
|
404
|
-
var require__listCacheDelete = __commonJS((exports, module) => {
|
|
405
|
-
var assocIndexOf = require__assocIndexOf();
|
|
406
|
-
var arrayProto = Array.prototype;
|
|
407
|
-
var splice = arrayProto.splice;
|
|
408
|
-
function listCacheDelete(key) {
|
|
409
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
410
|
-
if (index < 0) {
|
|
411
|
-
return false;
|
|
412
|
-
}
|
|
413
|
-
var lastIndex = data.length - 1;
|
|
414
|
-
if (index == lastIndex) {
|
|
415
|
-
data.pop();
|
|
416
|
-
} else {
|
|
417
|
-
splice.call(data, index, 1);
|
|
418
|
-
}
|
|
419
|
-
--this.size;
|
|
420
|
-
return true;
|
|
421
|
-
}
|
|
422
|
-
module.exports = listCacheDelete;
|
|
423
|
-
});
|
|
424
|
-
|
|
425
|
-
// ../../node_modules/lodash/_listCacheGet.js
|
|
426
|
-
var require__listCacheGet = __commonJS((exports, module) => {
|
|
427
|
-
var assocIndexOf = require__assocIndexOf();
|
|
428
|
-
function listCacheGet(key) {
|
|
429
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
430
|
-
return index < 0 ? undefined : data[index][1];
|
|
431
|
-
}
|
|
432
|
-
module.exports = listCacheGet;
|
|
433
|
-
});
|
|
434
|
-
|
|
435
|
-
// ../../node_modules/lodash/_listCacheHas.js
|
|
436
|
-
var require__listCacheHas = __commonJS((exports, module) => {
|
|
437
|
-
var assocIndexOf = require__assocIndexOf();
|
|
438
|
-
function listCacheHas(key) {
|
|
439
|
-
return assocIndexOf(this.__data__, key) > -1;
|
|
440
|
-
}
|
|
441
|
-
module.exports = listCacheHas;
|
|
442
|
-
});
|
|
443
|
-
|
|
444
|
-
// ../../node_modules/lodash/_listCacheSet.js
|
|
445
|
-
var require__listCacheSet = __commonJS((exports, module) => {
|
|
446
|
-
var assocIndexOf = require__assocIndexOf();
|
|
447
|
-
function listCacheSet(key, value) {
|
|
448
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
449
|
-
if (index < 0) {
|
|
450
|
-
++this.size;
|
|
451
|
-
data.push([key, value]);
|
|
452
|
-
} else {
|
|
453
|
-
data[index][1] = value;
|
|
454
|
-
}
|
|
455
|
-
return this;
|
|
456
|
-
}
|
|
457
|
-
module.exports = listCacheSet;
|
|
458
|
-
});
|
|
459
|
-
|
|
460
|
-
// ../../node_modules/lodash/_ListCache.js
|
|
461
|
-
var require__ListCache = __commonJS((exports, module) => {
|
|
462
|
-
var listCacheClear = require__listCacheClear();
|
|
463
|
-
var listCacheDelete = require__listCacheDelete();
|
|
464
|
-
var listCacheGet = require__listCacheGet();
|
|
465
|
-
var listCacheHas = require__listCacheHas();
|
|
466
|
-
var listCacheSet = require__listCacheSet();
|
|
467
|
-
function ListCache(entries) {
|
|
468
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
469
|
-
this.clear();
|
|
470
|
-
while (++index < length) {
|
|
471
|
-
var entry = entries[index];
|
|
472
|
-
this.set(entry[0], entry[1]);
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
ListCache.prototype.clear = listCacheClear;
|
|
476
|
-
ListCache.prototype["delete"] = listCacheDelete;
|
|
477
|
-
ListCache.prototype.get = listCacheGet;
|
|
478
|
-
ListCache.prototype.has = listCacheHas;
|
|
479
|
-
ListCache.prototype.set = listCacheSet;
|
|
480
|
-
module.exports = ListCache;
|
|
481
|
-
});
|
|
482
|
-
|
|
483
|
-
// ../../node_modules/lodash/_Map.js
|
|
484
|
-
var require__Map = __commonJS((exports, module) => {
|
|
485
|
-
var getNative = require__getNative();
|
|
486
|
-
var root = require__root();
|
|
487
|
-
var Map = getNative(root, "Map");
|
|
488
|
-
module.exports = Map;
|
|
489
|
-
});
|
|
490
|
-
|
|
491
|
-
// ../../node_modules/lodash/_mapCacheClear.js
|
|
492
|
-
var require__mapCacheClear = __commonJS((exports, module) => {
|
|
493
|
-
var Hash = require__Hash();
|
|
494
|
-
var ListCache = require__ListCache();
|
|
495
|
-
var Map = require__Map();
|
|
496
|
-
function mapCacheClear() {
|
|
497
|
-
this.size = 0;
|
|
498
|
-
this.__data__ = {
|
|
499
|
-
hash: new Hash,
|
|
500
|
-
map: new (Map || ListCache),
|
|
501
|
-
string: new Hash
|
|
502
|
-
};
|
|
503
|
-
}
|
|
504
|
-
module.exports = mapCacheClear;
|
|
505
|
-
});
|
|
506
|
-
|
|
507
|
-
// ../../node_modules/lodash/_isKeyable.js
|
|
508
|
-
var require__isKeyable = __commonJS((exports, module) => {
|
|
509
|
-
function isKeyable(value) {
|
|
510
|
-
var type = typeof value;
|
|
511
|
-
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
512
|
-
}
|
|
513
|
-
module.exports = isKeyable;
|
|
514
|
-
});
|
|
515
|
-
|
|
516
|
-
// ../../node_modules/lodash/_getMapData.js
|
|
517
|
-
var require__getMapData = __commonJS((exports, module) => {
|
|
518
|
-
var isKeyable = require__isKeyable();
|
|
519
|
-
function getMapData(map, key) {
|
|
520
|
-
var data = map.__data__;
|
|
521
|
-
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
522
|
-
}
|
|
523
|
-
module.exports = getMapData;
|
|
524
|
-
});
|
|
525
|
-
|
|
526
|
-
// ../../node_modules/lodash/_mapCacheDelete.js
|
|
527
|
-
var require__mapCacheDelete = __commonJS((exports, module) => {
|
|
528
|
-
var getMapData = require__getMapData();
|
|
529
|
-
function mapCacheDelete(key) {
|
|
530
|
-
var result = getMapData(this, key)["delete"](key);
|
|
531
|
-
this.size -= result ? 1 : 0;
|
|
532
|
-
return result;
|
|
533
|
-
}
|
|
534
|
-
module.exports = mapCacheDelete;
|
|
535
|
-
});
|
|
536
|
-
|
|
537
|
-
// ../../node_modules/lodash/_mapCacheGet.js
|
|
538
|
-
var require__mapCacheGet = __commonJS((exports, module) => {
|
|
539
|
-
var getMapData = require__getMapData();
|
|
540
|
-
function mapCacheGet(key) {
|
|
541
|
-
return getMapData(this, key).get(key);
|
|
542
|
-
}
|
|
543
|
-
module.exports = mapCacheGet;
|
|
544
|
-
});
|
|
545
|
-
|
|
546
|
-
// ../../node_modules/lodash/_mapCacheHas.js
|
|
547
|
-
var require__mapCacheHas = __commonJS((exports, module) => {
|
|
548
|
-
var getMapData = require__getMapData();
|
|
549
|
-
function mapCacheHas(key) {
|
|
550
|
-
return getMapData(this, key).has(key);
|
|
551
|
-
}
|
|
552
|
-
module.exports = mapCacheHas;
|
|
553
|
-
});
|
|
554
|
-
|
|
555
|
-
// ../../node_modules/lodash/_mapCacheSet.js
|
|
556
|
-
var require__mapCacheSet = __commonJS((exports, module) => {
|
|
557
|
-
var getMapData = require__getMapData();
|
|
558
|
-
function mapCacheSet(key, value) {
|
|
559
|
-
var data = getMapData(this, key), size = data.size;
|
|
560
|
-
data.set(key, value);
|
|
561
|
-
this.size += data.size == size ? 0 : 1;
|
|
562
|
-
return this;
|
|
563
|
-
}
|
|
564
|
-
module.exports = mapCacheSet;
|
|
565
|
-
});
|
|
566
|
-
|
|
567
|
-
// ../../node_modules/lodash/_MapCache.js
|
|
568
|
-
var require__MapCache = __commonJS((exports, module) => {
|
|
569
|
-
var mapCacheClear = require__mapCacheClear();
|
|
570
|
-
var mapCacheDelete = require__mapCacheDelete();
|
|
571
|
-
var mapCacheGet = require__mapCacheGet();
|
|
572
|
-
var mapCacheHas = require__mapCacheHas();
|
|
573
|
-
var mapCacheSet = require__mapCacheSet();
|
|
574
|
-
function MapCache(entries) {
|
|
575
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
576
|
-
this.clear();
|
|
577
|
-
while (++index < length) {
|
|
578
|
-
var entry = entries[index];
|
|
579
|
-
this.set(entry[0], entry[1]);
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
MapCache.prototype.clear = mapCacheClear;
|
|
583
|
-
MapCache.prototype["delete"] = mapCacheDelete;
|
|
584
|
-
MapCache.prototype.get = mapCacheGet;
|
|
585
|
-
MapCache.prototype.has = mapCacheHas;
|
|
586
|
-
MapCache.prototype.set = mapCacheSet;
|
|
587
|
-
module.exports = MapCache;
|
|
588
|
-
});
|
|
589
|
-
|
|
590
|
-
// ../../node_modules/lodash/_setCacheAdd.js
|
|
591
|
-
var require__setCacheAdd = __commonJS((exports, module) => {
|
|
592
|
-
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
593
|
-
function setCacheAdd(value) {
|
|
594
|
-
this.__data__.set(value, HASH_UNDEFINED);
|
|
595
|
-
return this;
|
|
596
|
-
}
|
|
597
|
-
module.exports = setCacheAdd;
|
|
598
|
-
});
|
|
599
|
-
|
|
600
|
-
// ../../node_modules/lodash/_setCacheHas.js
|
|
601
|
-
var require__setCacheHas = __commonJS((exports, module) => {
|
|
602
|
-
function setCacheHas(value) {
|
|
603
|
-
return this.__data__.has(value);
|
|
604
|
-
}
|
|
605
|
-
module.exports = setCacheHas;
|
|
606
|
-
});
|
|
607
|
-
|
|
608
|
-
// ../../node_modules/lodash/_SetCache.js
|
|
609
|
-
var require__SetCache = __commonJS((exports, module) => {
|
|
610
|
-
var MapCache = require__MapCache();
|
|
611
|
-
var setCacheAdd = require__setCacheAdd();
|
|
612
|
-
var setCacheHas = require__setCacheHas();
|
|
613
|
-
function SetCache(values) {
|
|
614
|
-
var index = -1, length = values == null ? 0 : values.length;
|
|
615
|
-
this.__data__ = new MapCache;
|
|
616
|
-
while (++index < length) {
|
|
617
|
-
this.add(values[index]);
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
621
|
-
SetCache.prototype.has = setCacheHas;
|
|
622
|
-
module.exports = SetCache;
|
|
623
|
-
});
|
|
624
|
-
|
|
625
|
-
// ../../node_modules/lodash/_baseFindIndex.js
|
|
626
|
-
var require__baseFindIndex = __commonJS((exports, module) => {
|
|
627
|
-
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
628
|
-
var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
|
|
629
|
-
while (fromRight ? index-- : ++index < length) {
|
|
630
|
-
if (predicate(array[index], index, array)) {
|
|
631
|
-
return index;
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
return -1;
|
|
635
|
-
}
|
|
636
|
-
module.exports = baseFindIndex;
|
|
637
|
-
});
|
|
638
|
-
|
|
639
|
-
// ../../node_modules/lodash/_baseIsNaN.js
|
|
640
|
-
var require__baseIsNaN = __commonJS((exports, module) => {
|
|
641
|
-
function baseIsNaN(value) {
|
|
642
|
-
return value !== value;
|
|
643
|
-
}
|
|
644
|
-
module.exports = baseIsNaN;
|
|
645
|
-
});
|
|
646
|
-
|
|
647
|
-
// ../../node_modules/lodash/_strictIndexOf.js
|
|
648
|
-
var require__strictIndexOf = __commonJS((exports, module) => {
|
|
649
|
-
function strictIndexOf(array, value, fromIndex) {
|
|
650
|
-
var index = fromIndex - 1, length = array.length;
|
|
651
|
-
while (++index < length) {
|
|
652
|
-
if (array[index] === value) {
|
|
653
|
-
return index;
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
return -1;
|
|
657
|
-
}
|
|
658
|
-
module.exports = strictIndexOf;
|
|
659
|
-
});
|
|
660
|
-
|
|
661
|
-
// ../../node_modules/lodash/_baseIndexOf.js
|
|
662
|
-
var require__baseIndexOf = __commonJS((exports, module) => {
|
|
663
|
-
var baseFindIndex = require__baseFindIndex();
|
|
664
|
-
var baseIsNaN = require__baseIsNaN();
|
|
665
|
-
var strictIndexOf = require__strictIndexOf();
|
|
666
|
-
function baseIndexOf(array, value, fromIndex) {
|
|
667
|
-
return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
|
|
668
|
-
}
|
|
669
|
-
module.exports = baseIndexOf;
|
|
670
|
-
});
|
|
671
|
-
|
|
672
|
-
// ../../node_modules/lodash/_arrayIncludes.js
|
|
673
|
-
var require__arrayIncludes = __commonJS((exports, module) => {
|
|
674
|
-
var baseIndexOf = require__baseIndexOf();
|
|
675
|
-
function arrayIncludes(array, value) {
|
|
676
|
-
var length = array == null ? 0 : array.length;
|
|
677
|
-
return !!length && baseIndexOf(array, value, 0) > -1;
|
|
678
|
-
}
|
|
679
|
-
module.exports = arrayIncludes;
|
|
680
|
-
});
|
|
681
|
-
|
|
682
|
-
// ../../node_modules/lodash/_arrayIncludesWith.js
|
|
683
|
-
var require__arrayIncludesWith = __commonJS((exports, module) => {
|
|
684
|
-
function arrayIncludesWith(array, value, comparator) {
|
|
685
|
-
var index = -1, length = array == null ? 0 : array.length;
|
|
686
|
-
while (++index < length) {
|
|
687
|
-
if (comparator(value, array[index])) {
|
|
688
|
-
return true;
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
return false;
|
|
692
|
-
}
|
|
693
|
-
module.exports = arrayIncludesWith;
|
|
694
|
-
});
|
|
695
|
-
|
|
696
|
-
// ../../node_modules/lodash/_arrayMap.js
|
|
697
|
-
var require__arrayMap = __commonJS((exports, module) => {
|
|
698
|
-
function arrayMap(array, iteratee) {
|
|
699
|
-
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
700
|
-
while (++index < length) {
|
|
701
|
-
result[index] = iteratee(array[index], index, array);
|
|
702
|
-
}
|
|
703
|
-
return result;
|
|
704
|
-
}
|
|
705
|
-
module.exports = arrayMap;
|
|
706
|
-
});
|
|
707
|
-
|
|
708
|
-
// ../../node_modules/lodash/_baseUnary.js
|
|
709
|
-
var require__baseUnary = __commonJS((exports, module) => {
|
|
710
|
-
function baseUnary(func) {
|
|
711
|
-
return function(value) {
|
|
712
|
-
return func(value);
|
|
713
|
-
};
|
|
714
|
-
}
|
|
715
|
-
module.exports = baseUnary;
|
|
716
|
-
});
|
|
717
|
-
|
|
718
|
-
// ../../node_modules/lodash/_cacheHas.js
|
|
719
|
-
var require__cacheHas = __commonJS((exports, module) => {
|
|
720
|
-
function cacheHas(cache, key) {
|
|
721
|
-
return cache.has(key);
|
|
722
|
-
}
|
|
723
|
-
module.exports = cacheHas;
|
|
724
|
-
});
|
|
725
|
-
|
|
726
|
-
// ../../node_modules/lodash/_baseDifference.js
|
|
727
|
-
var require__baseDifference = __commonJS((exports, module) => {
|
|
728
|
-
var SetCache = require__SetCache();
|
|
729
|
-
var arrayIncludes = require__arrayIncludes();
|
|
730
|
-
var arrayIncludesWith = require__arrayIncludesWith();
|
|
731
|
-
var arrayMap = require__arrayMap();
|
|
732
|
-
var baseUnary = require__baseUnary();
|
|
733
|
-
var cacheHas = require__cacheHas();
|
|
734
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
735
|
-
function baseDifference(array, values, iteratee, comparator) {
|
|
736
|
-
var index = -1, includes = arrayIncludes, isCommon = true, length = array.length, result = [], valuesLength = values.length;
|
|
737
|
-
if (!length) {
|
|
738
|
-
return result;
|
|
739
|
-
}
|
|
740
|
-
if (iteratee) {
|
|
741
|
-
values = arrayMap(values, baseUnary(iteratee));
|
|
742
|
-
}
|
|
743
|
-
if (comparator) {
|
|
744
|
-
includes = arrayIncludesWith;
|
|
745
|
-
isCommon = false;
|
|
746
|
-
} else if (values.length >= LARGE_ARRAY_SIZE) {
|
|
747
|
-
includes = cacheHas;
|
|
748
|
-
isCommon = false;
|
|
749
|
-
values = new SetCache(values);
|
|
750
|
-
}
|
|
751
|
-
outer:
|
|
752
|
-
while (++index < length) {
|
|
753
|
-
var value = array[index], computed = iteratee == null ? value : iteratee(value);
|
|
754
|
-
value = comparator || value !== 0 ? value : 0;
|
|
755
|
-
if (isCommon && computed === computed) {
|
|
756
|
-
var valuesIndex = valuesLength;
|
|
757
|
-
while (valuesIndex--) {
|
|
758
|
-
if (values[valuesIndex] === computed) {
|
|
759
|
-
continue outer;
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
result.push(value);
|
|
763
|
-
} else if (!includes(values, computed, comparator)) {
|
|
764
|
-
result.push(value);
|
|
765
|
-
}
|
|
766
|
-
}
|
|
767
|
-
return result;
|
|
768
|
-
}
|
|
769
|
-
module.exports = baseDifference;
|
|
770
|
-
});
|
|
771
|
-
|
|
772
|
-
// ../../node_modules/lodash/_arrayPush.js
|
|
773
|
-
var require__arrayPush = __commonJS((exports, module) => {
|
|
774
|
-
function arrayPush(array, values) {
|
|
775
|
-
var index = -1, length = values.length, offset = array.length;
|
|
776
|
-
while (++index < length) {
|
|
777
|
-
array[offset + index] = values[index];
|
|
778
|
-
}
|
|
779
|
-
return array;
|
|
780
|
-
}
|
|
781
|
-
module.exports = arrayPush;
|
|
782
|
-
});
|
|
783
|
-
|
|
784
|
-
// ../../node_modules/lodash/_baseIsArguments.js
|
|
785
|
-
var require__baseIsArguments = __commonJS((exports, module) => {
|
|
786
|
-
var baseGetTag = require__baseGetTag();
|
|
787
|
-
var isObjectLike = require_isObjectLike();
|
|
788
|
-
var argsTag = "[object Arguments]";
|
|
789
|
-
function baseIsArguments(value) {
|
|
790
|
-
return isObjectLike(value) && baseGetTag(value) == argsTag;
|
|
791
|
-
}
|
|
792
|
-
module.exports = baseIsArguments;
|
|
793
|
-
});
|
|
794
|
-
|
|
795
|
-
// ../../node_modules/lodash/isArguments.js
|
|
796
|
-
var require_isArguments = __commonJS((exports, module) => {
|
|
797
|
-
var baseIsArguments = require__baseIsArguments();
|
|
798
|
-
var isObjectLike = require_isObjectLike();
|
|
799
|
-
var objectProto = Object.prototype;
|
|
800
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
801
|
-
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
802
|
-
var isArguments = baseIsArguments(function() {
|
|
803
|
-
return arguments;
|
|
804
|
-
}()) ? baseIsArguments : function(value) {
|
|
805
|
-
return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
|
806
|
-
};
|
|
807
|
-
module.exports = isArguments;
|
|
808
|
-
});
|
|
809
|
-
|
|
810
|
-
// ../../node_modules/lodash/_isFlattenable.js
|
|
811
|
-
var require__isFlattenable = __commonJS((exports, module) => {
|
|
812
|
-
var Symbol2 = require__Symbol();
|
|
813
|
-
var isArguments = require_isArguments();
|
|
814
|
-
var isArray2 = require_isArray();
|
|
815
|
-
var spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined;
|
|
816
|
-
function isFlattenable(value) {
|
|
817
|
-
return isArray2(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
|
|
818
|
-
}
|
|
819
|
-
module.exports = isFlattenable;
|
|
820
|
-
});
|
|
821
|
-
|
|
822
|
-
// ../../node_modules/lodash/_baseFlatten.js
|
|
823
|
-
var require__baseFlatten = __commonJS((exports, module) => {
|
|
824
|
-
var arrayPush = require__arrayPush();
|
|
825
|
-
var isFlattenable = require__isFlattenable();
|
|
826
|
-
function baseFlatten(array, depth, predicate, isStrict, result) {
|
|
827
|
-
var index = -1, length = array.length;
|
|
828
|
-
predicate || (predicate = isFlattenable);
|
|
829
|
-
result || (result = []);
|
|
830
|
-
while (++index < length) {
|
|
831
|
-
var value = array[index];
|
|
832
|
-
if (depth > 0 && predicate(value)) {
|
|
833
|
-
if (depth > 1) {
|
|
834
|
-
baseFlatten(value, depth - 1, predicate, isStrict, result);
|
|
835
|
-
} else {
|
|
836
|
-
arrayPush(result, value);
|
|
837
|
-
}
|
|
838
|
-
} else if (!isStrict) {
|
|
839
|
-
result[result.length] = value;
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
return result;
|
|
843
|
-
}
|
|
844
|
-
module.exports = baseFlatten;
|
|
845
|
-
});
|
|
846
|
-
|
|
847
|
-
// ../../node_modules/lodash/identity.js
|
|
848
|
-
var require_identity = __commonJS((exports, module) => {
|
|
849
|
-
function identity(value) {
|
|
850
|
-
return value;
|
|
851
|
-
}
|
|
852
|
-
module.exports = identity;
|
|
853
|
-
});
|
|
854
|
-
|
|
855
|
-
// ../../node_modules/lodash/_apply.js
|
|
856
|
-
var require__apply = __commonJS((exports, module) => {
|
|
857
|
-
function apply(func, thisArg, args) {
|
|
858
|
-
switch (args.length) {
|
|
859
|
-
case 0:
|
|
860
|
-
return func.call(thisArg);
|
|
861
|
-
case 1:
|
|
862
|
-
return func.call(thisArg, args[0]);
|
|
863
|
-
case 2:
|
|
864
|
-
return func.call(thisArg, args[0], args[1]);
|
|
865
|
-
case 3:
|
|
866
|
-
return func.call(thisArg, args[0], args[1], args[2]);
|
|
867
|
-
}
|
|
868
|
-
return func.apply(thisArg, args);
|
|
869
|
-
}
|
|
870
|
-
module.exports = apply;
|
|
871
|
-
});
|
|
872
|
-
|
|
873
|
-
// ../../node_modules/lodash/_overRest.js
|
|
874
|
-
var require__overRest = __commonJS((exports, module) => {
|
|
875
|
-
var apply = require__apply();
|
|
876
|
-
var nativeMax = Math.max;
|
|
877
|
-
function overRest(func, start, transform) {
|
|
878
|
-
start = nativeMax(start === undefined ? func.length - 1 : start, 0);
|
|
879
|
-
return function() {
|
|
880
|
-
var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
|
|
881
|
-
while (++index < length) {
|
|
882
|
-
array[index] = args[start + index];
|
|
883
|
-
}
|
|
884
|
-
index = -1;
|
|
885
|
-
var otherArgs = Array(start + 1);
|
|
886
|
-
while (++index < start) {
|
|
887
|
-
otherArgs[index] = args[index];
|
|
888
|
-
}
|
|
889
|
-
otherArgs[start] = transform(array);
|
|
890
|
-
return apply(func, this, otherArgs);
|
|
891
|
-
};
|
|
892
|
-
}
|
|
893
|
-
module.exports = overRest;
|
|
894
|
-
});
|
|
895
|
-
|
|
896
|
-
// ../../node_modules/lodash/constant.js
|
|
897
|
-
var require_constant = __commonJS((exports, module) => {
|
|
898
|
-
function constant(value) {
|
|
899
|
-
return function() {
|
|
900
|
-
return value;
|
|
901
|
-
};
|
|
902
|
-
}
|
|
903
|
-
module.exports = constant;
|
|
904
|
-
});
|
|
905
|
-
|
|
906
|
-
// ../../node_modules/lodash/_defineProperty.js
|
|
907
|
-
var require__defineProperty = __commonJS((exports, module) => {
|
|
908
|
-
var getNative = require__getNative();
|
|
909
|
-
var defineProperty = function() {
|
|
910
|
-
try {
|
|
911
|
-
var func = getNative(Object, "defineProperty");
|
|
912
|
-
func({}, "", {});
|
|
913
|
-
return func;
|
|
914
|
-
} catch (e) {
|
|
915
|
-
}
|
|
916
|
-
}();
|
|
917
|
-
module.exports = defineProperty;
|
|
918
|
-
});
|
|
919
|
-
|
|
920
|
-
// ../../node_modules/lodash/_baseSetToString.js
|
|
921
|
-
var require__baseSetToString = __commonJS((exports, module) => {
|
|
922
|
-
var constant = require_constant();
|
|
923
|
-
var defineProperty = require__defineProperty();
|
|
924
|
-
var identity = require_identity();
|
|
925
|
-
var baseSetToString = !defineProperty ? identity : function(func, string) {
|
|
926
|
-
return defineProperty(func, "toString", {
|
|
927
|
-
configurable: true,
|
|
928
|
-
enumerable: false,
|
|
929
|
-
value: constant(string),
|
|
930
|
-
writable: true
|
|
931
|
-
});
|
|
932
|
-
};
|
|
933
|
-
module.exports = baseSetToString;
|
|
934
|
-
});
|
|
935
|
-
|
|
936
|
-
// ../../node_modules/lodash/_shortOut.js
|
|
937
|
-
var require__shortOut = __commonJS((exports, module) => {
|
|
938
|
-
var HOT_COUNT = 800;
|
|
939
|
-
var HOT_SPAN = 16;
|
|
940
|
-
var nativeNow = Date.now;
|
|
941
|
-
function shortOut(func) {
|
|
942
|
-
var count = 0, lastCalled = 0;
|
|
943
|
-
return function() {
|
|
944
|
-
var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
|
|
945
|
-
lastCalled = stamp;
|
|
946
|
-
if (remaining > 0) {
|
|
947
|
-
if (++count >= HOT_COUNT) {
|
|
948
|
-
return arguments[0];
|
|
949
|
-
}
|
|
950
|
-
} else {
|
|
951
|
-
count = 0;
|
|
952
|
-
}
|
|
953
|
-
return func.apply(undefined, arguments);
|
|
954
|
-
};
|
|
955
|
-
}
|
|
956
|
-
module.exports = shortOut;
|
|
957
|
-
});
|
|
958
|
-
|
|
959
|
-
// ../../node_modules/lodash/_setToString.js
|
|
960
|
-
var require__setToString = __commonJS((exports, module) => {
|
|
961
|
-
var baseSetToString = require__baseSetToString();
|
|
962
|
-
var shortOut = require__shortOut();
|
|
963
|
-
var setToString = shortOut(baseSetToString);
|
|
964
|
-
module.exports = setToString;
|
|
965
|
-
});
|
|
966
|
-
|
|
967
|
-
// ../../node_modules/lodash/_baseRest.js
|
|
968
|
-
var require__baseRest = __commonJS((exports, module) => {
|
|
969
|
-
var identity = require_identity();
|
|
970
|
-
var overRest = require__overRest();
|
|
971
|
-
var setToString = require__setToString();
|
|
972
|
-
function baseRest(func, start) {
|
|
973
|
-
return setToString(overRest(func, start, identity), func + "");
|
|
974
|
-
}
|
|
975
|
-
module.exports = baseRest;
|
|
976
|
-
});
|
|
977
|
-
|
|
978
|
-
// ../../node_modules/lodash/isLength.js
|
|
979
|
-
var require_isLength = __commonJS((exports, module) => {
|
|
980
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
981
|
-
function isLength(value) {
|
|
982
|
-
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
983
|
-
}
|
|
984
|
-
module.exports = isLength;
|
|
985
|
-
});
|
|
986
|
-
|
|
987
|
-
// ../../node_modules/lodash/isArrayLike.js
|
|
988
|
-
var require_isArrayLike = __commonJS((exports, module) => {
|
|
989
|
-
var isFunction = require_isFunction();
|
|
990
|
-
var isLength = require_isLength();
|
|
991
|
-
function isArrayLike(value) {
|
|
992
|
-
return value != null && isLength(value.length) && !isFunction(value);
|
|
993
|
-
}
|
|
994
|
-
module.exports = isArrayLike;
|
|
995
|
-
});
|
|
996
|
-
|
|
997
|
-
// ../../node_modules/lodash/isArrayLikeObject.js
|
|
998
|
-
var require_isArrayLikeObject = __commonJS((exports, module) => {
|
|
999
|
-
var isArrayLike = require_isArrayLike();
|
|
1000
|
-
var isObjectLike = require_isObjectLike();
|
|
1001
|
-
function isArrayLikeObject(value) {
|
|
1002
|
-
return isObjectLike(value) && isArrayLike(value);
|
|
1003
|
-
}
|
|
1004
|
-
module.exports = isArrayLikeObject;
|
|
1005
|
-
});
|
|
1006
|
-
|
|
1007
|
-
// ../../node_modules/lodash/difference.js
|
|
1008
|
-
var require_difference = __commonJS((exports, module) => {
|
|
1009
|
-
var baseDifference = require__baseDifference();
|
|
1010
|
-
var baseFlatten = require__baseFlatten();
|
|
1011
|
-
var baseRest = require__baseRest();
|
|
1012
|
-
var isArrayLikeObject = require_isArrayLikeObject();
|
|
1013
|
-
var difference = baseRest(function(array, values) {
|
|
1014
|
-
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : [];
|
|
1015
|
-
});
|
|
1016
|
-
module.exports = difference;
|
|
1017
|
-
});
|
|
1018
|
-
|
|
1019
|
-
// ../../node_modules/lodash/_trimmedEndIndex.js
|
|
1020
|
-
var require__trimmedEndIndex = __commonJS((exports, module) => {
|
|
1021
|
-
var reWhitespace = /\s/;
|
|
1022
|
-
function trimmedEndIndex(string) {
|
|
1023
|
-
var index = string.length;
|
|
1024
|
-
while (index-- && reWhitespace.test(string.charAt(index))) {
|
|
1025
|
-
}
|
|
1026
|
-
return index;
|
|
1027
|
-
}
|
|
1028
|
-
module.exports = trimmedEndIndex;
|
|
1029
|
-
});
|
|
1030
|
-
|
|
1031
|
-
// ../../node_modules/lodash/_baseTrim.js
|
|
1032
|
-
var require__baseTrim = __commonJS((exports, module) => {
|
|
1033
|
-
var trimmedEndIndex = require__trimmedEndIndex();
|
|
1034
|
-
var reTrimStart = /^\s+/;
|
|
1035
|
-
function baseTrim(string) {
|
|
1036
|
-
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
|
|
1037
|
-
}
|
|
1038
|
-
module.exports = baseTrim;
|
|
1039
|
-
});
|
|
1040
|
-
|
|
1041
|
-
// ../../node_modules/lodash/isSymbol.js
|
|
1042
|
-
var require_isSymbol = __commonJS((exports, module) => {
|
|
1043
|
-
var baseGetTag = require__baseGetTag();
|
|
1044
|
-
var isObjectLike = require_isObjectLike();
|
|
1045
|
-
var symbolTag = "[object Symbol]";
|
|
1046
|
-
function isSymbol(value) {
|
|
1047
|
-
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|
1048
|
-
}
|
|
1049
|
-
module.exports = isSymbol;
|
|
1050
|
-
});
|
|
1051
|
-
|
|
1052
|
-
// ../../node_modules/lodash/toNumber.js
|
|
1053
|
-
var require_toNumber = __commonJS((exports, module) => {
|
|
1054
|
-
var baseTrim = require__baseTrim();
|
|
1055
|
-
var isObject = require_isObject();
|
|
1056
|
-
var isSymbol = require_isSymbol();
|
|
1057
|
-
var NAN = 0 / 0;
|
|
1058
|
-
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
1059
|
-
var reIsBinary = /^0b[01]+$/i;
|
|
1060
|
-
var reIsOctal = /^0o[0-7]+$/i;
|
|
1061
|
-
var freeParseInt = parseInt;
|
|
1062
|
-
function toNumber(value) {
|
|
1063
|
-
if (typeof value == "number") {
|
|
1064
|
-
return value;
|
|
1065
|
-
}
|
|
1066
|
-
if (isSymbol(value)) {
|
|
1067
|
-
return NAN;
|
|
1068
|
-
}
|
|
1069
|
-
if (isObject(value)) {
|
|
1070
|
-
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
1071
|
-
value = isObject(other) ? other + "" : other;
|
|
1072
|
-
}
|
|
1073
|
-
if (typeof value != "string") {
|
|
1074
|
-
return value === 0 ? value : +value;
|
|
1075
|
-
}
|
|
1076
|
-
value = baseTrim(value);
|
|
1077
|
-
var isBinary = reIsBinary.test(value);
|
|
1078
|
-
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
1079
|
-
}
|
|
1080
|
-
module.exports = toNumber;
|
|
1081
|
-
});
|
|
1082
|
-
|
|
1083
|
-
// ../../node_modules/lodash/toFinite.js
|
|
1084
|
-
var require_toFinite = __commonJS((exports, module) => {
|
|
1085
|
-
var toNumber = require_toNumber();
|
|
1086
|
-
var INFINITY = 1 / 0;
|
|
1087
|
-
var MAX_INTEGER = 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
|
|
1088
|
-
function toFinite(value) {
|
|
1089
|
-
if (!value) {
|
|
1090
|
-
return value === 0 ? value : 0;
|
|
1091
|
-
}
|
|
1092
|
-
value = toNumber(value);
|
|
1093
|
-
if (value === INFINITY || value === -INFINITY) {
|
|
1094
|
-
var sign = value < 0 ? -1 : 1;
|
|
1095
|
-
return sign * MAX_INTEGER;
|
|
1096
|
-
}
|
|
1097
|
-
return value === value ? value : 0;
|
|
1098
|
-
}
|
|
1099
|
-
module.exports = toFinite;
|
|
1100
|
-
});
|
|
1101
|
-
|
|
1102
|
-
// ../../node_modules/lodash/toInteger.js
|
|
1103
|
-
var require_toInteger = __commonJS((exports, module) => {
|
|
1104
|
-
var toFinite = require_toFinite();
|
|
1105
|
-
function toInteger(value) {
|
|
1106
|
-
var result = toFinite(value), remainder = result % 1;
|
|
1107
|
-
return result === result ? remainder ? result - remainder : result : 0;
|
|
1108
|
-
}
|
|
1109
|
-
module.exports = toInteger;
|
|
1110
|
-
});
|
|
1111
|
-
|
|
1112
|
-
// ../../node_modules/lodash/_baseValues.js
|
|
1113
|
-
var require__baseValues = __commonJS((exports, module) => {
|
|
1114
|
-
var arrayMap = require__arrayMap();
|
|
1115
|
-
function baseValues(object, props) {
|
|
1116
|
-
return arrayMap(props, function(key) {
|
|
1117
|
-
return object[key];
|
|
1118
|
-
});
|
|
1119
|
-
}
|
|
1120
|
-
module.exports = baseValues;
|
|
1121
|
-
});
|
|
1122
|
-
|
|
1123
|
-
// ../../node_modules/lodash/_baseTimes.js
|
|
1124
|
-
var require__baseTimes = __commonJS((exports, module) => {
|
|
1125
|
-
function baseTimes(n, iteratee) {
|
|
1126
|
-
var index = -1, result = Array(n);
|
|
1127
|
-
while (++index < n) {
|
|
1128
|
-
result[index] = iteratee(index);
|
|
1129
|
-
}
|
|
1130
|
-
return result;
|
|
1131
|
-
}
|
|
1132
|
-
module.exports = baseTimes;
|
|
1133
|
-
});
|
|
1134
|
-
|
|
1135
|
-
// ../../node_modules/lodash/stubFalse.js
|
|
1136
|
-
var require_stubFalse = __commonJS((exports, module) => {
|
|
1137
|
-
function stubFalse() {
|
|
1138
|
-
return false;
|
|
1139
|
-
}
|
|
1140
|
-
module.exports = stubFalse;
|
|
1141
|
-
});
|
|
1142
|
-
|
|
1143
|
-
// ../../node_modules/lodash/isBuffer.js
|
|
1144
|
-
var require_isBuffer = __commonJS((exports, module) => {
|
|
1145
|
-
var root = require__root();
|
|
1146
|
-
var stubFalse = require_stubFalse();
|
|
1147
|
-
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
1148
|
-
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
1149
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1150
|
-
var Buffer = moduleExports ? root.Buffer : undefined;
|
|
1151
|
-
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
1152
|
-
var isBuffer = nativeIsBuffer || stubFalse;
|
|
1153
|
-
module.exports = isBuffer;
|
|
1154
|
-
});
|
|
1155
|
-
|
|
1156
|
-
// ../../node_modules/lodash/_isIndex.js
|
|
1157
|
-
var require__isIndex = __commonJS((exports, module) => {
|
|
1158
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
1159
|
-
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
1160
|
-
function isIndex(value, length) {
|
|
1161
|
-
var type = typeof value;
|
|
1162
|
-
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
1163
|
-
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
1164
|
-
}
|
|
1165
|
-
module.exports = isIndex;
|
|
1166
|
-
});
|
|
1167
|
-
|
|
1168
|
-
// ../../node_modules/lodash/_baseIsTypedArray.js
|
|
1169
|
-
var require__baseIsTypedArray = __commonJS((exports, module) => {
|
|
1170
|
-
var baseGetTag = require__baseGetTag();
|
|
1171
|
-
var isLength = require_isLength();
|
|
1172
|
-
var isObjectLike = require_isObjectLike();
|
|
1173
|
-
var argsTag = "[object Arguments]";
|
|
1174
|
-
var arrayTag = "[object Array]";
|
|
1175
|
-
var boolTag = "[object Boolean]";
|
|
1176
|
-
var dateTag = "[object Date]";
|
|
1177
|
-
var errorTag = "[object Error]";
|
|
1178
|
-
var funcTag = "[object Function]";
|
|
1179
|
-
var mapTag = "[object Map]";
|
|
1180
|
-
var numberTag = "[object Number]";
|
|
1181
|
-
var objectTag = "[object Object]";
|
|
1182
|
-
var regexpTag = "[object RegExp]";
|
|
1183
|
-
var setTag = "[object Set]";
|
|
1184
|
-
var stringTag = "[object String]";
|
|
1185
|
-
var weakMapTag = "[object WeakMap]";
|
|
1186
|
-
var arrayBufferTag = "[object ArrayBuffer]";
|
|
1187
|
-
var dataViewTag = "[object DataView]";
|
|
1188
|
-
var float32Tag = "[object Float32Array]";
|
|
1189
|
-
var float64Tag = "[object Float64Array]";
|
|
1190
|
-
var int8Tag = "[object Int8Array]";
|
|
1191
|
-
var int16Tag = "[object Int16Array]";
|
|
1192
|
-
var int32Tag = "[object Int32Array]";
|
|
1193
|
-
var uint8Tag = "[object Uint8Array]";
|
|
1194
|
-
var uint8ClampedTag = "[object Uint8ClampedArray]";
|
|
1195
|
-
var uint16Tag = "[object Uint16Array]";
|
|
1196
|
-
var uint32Tag = "[object Uint32Array]";
|
|
1197
|
-
var typedArrayTags = {};
|
|
1198
|
-
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
1199
|
-
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
|
|
1200
|
-
function baseIsTypedArray(value) {
|
|
1201
|
-
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
1202
|
-
}
|
|
1203
|
-
module.exports = baseIsTypedArray;
|
|
1204
|
-
});
|
|
1205
|
-
|
|
1206
|
-
// ../../node_modules/lodash/_nodeUtil.js
|
|
1207
|
-
var require__nodeUtil = __commonJS((exports, module) => {
|
|
1208
|
-
var freeGlobal = require__freeGlobal();
|
|
1209
|
-
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
1210
|
-
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
1211
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1212
|
-
var freeProcess = moduleExports && freeGlobal.process;
|
|
1213
|
-
var nodeUtil = function() {
|
|
1214
|
-
try {
|
|
1215
|
-
var types = freeModule && freeModule.require && freeModule.require("util").types;
|
|
1216
|
-
if (types) {
|
|
1217
|
-
return types;
|
|
1218
|
-
}
|
|
1219
|
-
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
1220
|
-
} catch (e) {
|
|
1221
|
-
}
|
|
1222
|
-
}();
|
|
1223
|
-
module.exports = nodeUtil;
|
|
1224
|
-
});
|
|
1225
|
-
|
|
1226
|
-
// ../../node_modules/lodash/isTypedArray.js
|
|
1227
|
-
var require_isTypedArray = __commonJS((exports, module) => {
|
|
1228
|
-
var baseIsTypedArray = require__baseIsTypedArray();
|
|
1229
|
-
var baseUnary = require__baseUnary();
|
|
1230
|
-
var nodeUtil = require__nodeUtil();
|
|
1231
|
-
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
1232
|
-
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
1233
|
-
module.exports = isTypedArray;
|
|
1234
|
-
});
|
|
1235
|
-
|
|
1236
|
-
// ../../node_modules/lodash/_arrayLikeKeys.js
|
|
1237
|
-
var require__arrayLikeKeys = __commonJS((exports, module) => {
|
|
1238
|
-
var baseTimes = require__baseTimes();
|
|
1239
|
-
var isArguments = require_isArguments();
|
|
1240
|
-
var isArray2 = require_isArray();
|
|
1241
|
-
var isBuffer = require_isBuffer();
|
|
1242
|
-
var isIndex = require__isIndex();
|
|
1243
|
-
var isTypedArray = require_isTypedArray();
|
|
1244
|
-
var objectProto = Object.prototype;
|
|
1245
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1246
|
-
function arrayLikeKeys(value, inherited) {
|
|
1247
|
-
var isArr = isArray2(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
|
|
1248
|
-
for (var key in value) {
|
|
1249
|
-
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
|
|
1250
|
-
result.push(key);
|
|
1251
|
-
}
|
|
1252
|
-
}
|
|
1253
|
-
return result;
|
|
1254
|
-
}
|
|
1255
|
-
module.exports = arrayLikeKeys;
|
|
1256
|
-
});
|
|
1257
|
-
|
|
1258
|
-
// ../../node_modules/lodash/_isPrototype.js
|
|
1259
|
-
var require__isPrototype = __commonJS((exports, module) => {
|
|
1260
|
-
var objectProto = Object.prototype;
|
|
1261
|
-
function isPrototype(value) {
|
|
1262
|
-
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
|
|
1263
|
-
return value === proto;
|
|
1264
|
-
}
|
|
1265
|
-
module.exports = isPrototype;
|
|
1266
|
-
});
|
|
1267
|
-
|
|
1268
|
-
// ../../node_modules/lodash/_nativeKeys.js
|
|
1269
|
-
var require__nativeKeys = __commonJS((exports, module) => {
|
|
1270
|
-
var overArg = require__overArg();
|
|
1271
|
-
var nativeKeys = overArg(Object.keys, Object);
|
|
1272
|
-
module.exports = nativeKeys;
|
|
1273
|
-
});
|
|
1274
|
-
|
|
1275
|
-
// ../../node_modules/lodash/_baseKeys.js
|
|
1276
|
-
var require__baseKeys = __commonJS((exports, module) => {
|
|
1277
|
-
var isPrototype = require__isPrototype();
|
|
1278
|
-
var nativeKeys = require__nativeKeys();
|
|
1279
|
-
var objectProto = Object.prototype;
|
|
1280
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1281
|
-
function baseKeys(object) {
|
|
1282
|
-
if (!isPrototype(object)) {
|
|
1283
|
-
return nativeKeys(object);
|
|
1284
|
-
}
|
|
1285
|
-
var result = [];
|
|
1286
|
-
for (var key in Object(object)) {
|
|
1287
|
-
if (hasOwnProperty.call(object, key) && key != "constructor") {
|
|
1288
|
-
result.push(key);
|
|
1289
|
-
}
|
|
1290
|
-
}
|
|
1291
|
-
return result;
|
|
1292
|
-
}
|
|
1293
|
-
module.exports = baseKeys;
|
|
1294
|
-
});
|
|
1295
|
-
|
|
1296
|
-
// ../../node_modules/lodash/keys.js
|
|
1297
|
-
var require_keys = __commonJS((exports, module) => {
|
|
1298
|
-
var arrayLikeKeys = require__arrayLikeKeys();
|
|
1299
|
-
var baseKeys = require__baseKeys();
|
|
1300
|
-
var isArrayLike = require_isArrayLike();
|
|
1301
|
-
function keys(object) {
|
|
1302
|
-
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
1303
|
-
}
|
|
1304
|
-
module.exports = keys;
|
|
1305
|
-
});
|
|
1306
|
-
|
|
1307
|
-
// ../../node_modules/lodash/values.js
|
|
1308
|
-
var require_values = __commonJS((exports, module) => {
|
|
1309
|
-
var baseValues = require__baseValues();
|
|
1310
|
-
var keys = require_keys();
|
|
1311
|
-
function values(object) {
|
|
1312
|
-
return object == null ? [] : baseValues(object, keys(object));
|
|
1313
|
-
}
|
|
1314
|
-
module.exports = values;
|
|
1315
|
-
});
|
|
1316
|
-
|
|
1317
|
-
// ../../node_modules/lodash/includes.js
|
|
1318
|
-
var require_includes = __commonJS((exports, module) => {
|
|
1319
|
-
var baseIndexOf = require__baseIndexOf();
|
|
1320
|
-
var isArrayLike = require_isArrayLike();
|
|
1321
|
-
var isString = require_isString();
|
|
1322
|
-
var toInteger = require_toInteger();
|
|
1323
|
-
var values = require_values();
|
|
1324
|
-
var nativeMax = Math.max;
|
|
1325
|
-
function includes(collection, value, fromIndex, guard) {
|
|
1326
|
-
collection = isArrayLike(collection) ? collection : values(collection);
|
|
1327
|
-
fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0;
|
|
1328
|
-
var length = collection.length;
|
|
1329
|
-
if (fromIndex < 0) {
|
|
1330
|
-
fromIndex = nativeMax(length + fromIndex, 0);
|
|
1331
|
-
}
|
|
1332
|
-
return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
|
|
1333
|
-
}
|
|
1334
|
-
module.exports = includes;
|
|
1335
|
-
});
|
|
1336
|
-
|
|
1337
|
-
// ../../node_modules/lodash/_baseIsDate.js
|
|
1338
|
-
var require__baseIsDate = __commonJS((exports, module) => {
|
|
1339
|
-
var baseGetTag = require__baseGetTag();
|
|
1340
|
-
var isObjectLike = require_isObjectLike();
|
|
1341
|
-
var dateTag = "[object Date]";
|
|
1342
|
-
function baseIsDate(value) {
|
|
1343
|
-
return isObjectLike(value) && baseGetTag(value) == dateTag;
|
|
1344
|
-
}
|
|
1345
|
-
module.exports = baseIsDate;
|
|
1346
|
-
});
|
|
1347
|
-
|
|
1348
|
-
// ../../node_modules/lodash/isDate.js
|
|
1349
|
-
var require_isDate = __commonJS((exports, module) => {
|
|
1350
|
-
var baseIsDate = require__baseIsDate();
|
|
1351
|
-
var baseUnary = require__baseUnary();
|
|
1352
|
-
var nodeUtil = require__nodeUtil();
|
|
1353
|
-
var nodeIsDate = nodeUtil && nodeUtil.isDate;
|
|
1354
|
-
var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
|
|
1355
|
-
module.exports = isDate;
|
|
1356
|
-
});
|
|
1357
|
-
|
|
1358
|
-
// ../../node_modules/lodash/isNumber.js
|
|
1359
|
-
var require_isNumber = __commonJS((exports, module) => {
|
|
1360
|
-
var baseGetTag = require__baseGetTag();
|
|
1361
|
-
var isObjectLike = require_isObjectLike();
|
|
1362
|
-
var numberTag = "[object Number]";
|
|
1363
|
-
function isNumber(value) {
|
|
1364
|
-
return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag;
|
|
1365
|
-
}
|
|
1366
|
-
module.exports = isNumber;
|
|
1367
|
-
});
|
|
1368
|
-
|
|
1369
|
-
// ../../node_modules/lodash/isInteger.js
|
|
1370
|
-
var require_isInteger = __commonJS((exports, module) => {
|
|
1371
|
-
var toInteger = require_toInteger();
|
|
1372
|
-
function isInteger(value) {
|
|
1373
|
-
return typeof value == "number" && value == toInteger(value);
|
|
1374
|
-
}
|
|
1375
|
-
module.exports = isInteger;
|
|
1376
|
-
});
|
|
1377
|
-
|
|
1378
|
-
// ../../node_modules/lodash/isFinite.js
|
|
1379
|
-
var require_isFinite = __commonJS((exports, module) => {
|
|
1380
|
-
var root = require__root();
|
|
1381
|
-
var nativeIsFinite = root.isFinite;
|
|
1382
|
-
function isFinite2(value) {
|
|
1383
|
-
return typeof value == "number" && nativeIsFinite(value);
|
|
1384
|
-
}
|
|
1385
|
-
module.exports = isFinite2;
|
|
1386
|
-
});
|
|
1387
|
-
|
|
1388
|
-
// ../../node_modules/lodash/isBoolean.js
|
|
1389
|
-
var require_isBoolean = __commonJS((exports, module) => {
|
|
1390
|
-
var baseGetTag = require__baseGetTag();
|
|
1391
|
-
var isObjectLike = require_isObjectLike();
|
|
1392
|
-
var boolTag = "[object Boolean]";
|
|
1393
|
-
function isBoolean(value) {
|
|
1394
|
-
return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;
|
|
1395
|
-
}
|
|
1396
|
-
module.exports = isBoolean;
|
|
1397
|
-
});
|
|
1398
|
-
|
|
1399
|
-
// ../../node_modules/lodash/_baseHas.js
|
|
1400
|
-
var require__baseHas = __commonJS((exports, module) => {
|
|
1401
|
-
var objectProto = Object.prototype;
|
|
1402
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1403
|
-
function baseHas(object, key) {
|
|
1404
|
-
return object != null && hasOwnProperty.call(object, key);
|
|
1405
|
-
}
|
|
1406
|
-
module.exports = baseHas;
|
|
1407
|
-
});
|
|
1408
|
-
|
|
1409
|
-
// ../../node_modules/lodash/_isKey.js
|
|
1410
|
-
var require__isKey = __commonJS((exports, module) => {
|
|
1411
|
-
var isArray3 = require_isArray();
|
|
1412
|
-
var isSymbol = require_isSymbol();
|
|
1413
|
-
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
|
|
1414
|
-
var reIsPlainProp = /^\w*$/;
|
|
1415
|
-
function isKey(value, object) {
|
|
1416
|
-
if (isArray3(value)) {
|
|
1417
|
-
return false;
|
|
1418
|
-
}
|
|
1419
|
-
var type = typeof value;
|
|
1420
|
-
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
|
|
1421
|
-
return true;
|
|
1422
|
-
}
|
|
1423
|
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
1424
|
-
}
|
|
1425
|
-
module.exports = isKey;
|
|
1426
|
-
});
|
|
1427
|
-
|
|
1428
|
-
// ../../node_modules/lodash/memoize.js
|
|
1429
|
-
var require_memoize = __commonJS((exports, module) => {
|
|
1430
|
-
var MapCache = require__MapCache();
|
|
1431
|
-
var FUNC_ERROR_TEXT = "Expected a function";
|
|
1432
|
-
function memoize(func, resolver) {
|
|
1433
|
-
if (typeof func != "function" || resolver != null && typeof resolver != "function") {
|
|
1434
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1435
|
-
}
|
|
1436
|
-
var memoized = function() {
|
|
1437
|
-
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
|
1438
|
-
if (cache.has(key)) {
|
|
1439
|
-
return cache.get(key);
|
|
1440
|
-
}
|
|
1441
|
-
var result = func.apply(this, args);
|
|
1442
|
-
memoized.cache = cache.set(key, result) || cache;
|
|
1443
|
-
return result;
|
|
1444
|
-
};
|
|
1445
|
-
memoized.cache = new (memoize.Cache || MapCache);
|
|
1446
|
-
return memoized;
|
|
1447
|
-
}
|
|
1448
|
-
memoize.Cache = MapCache;
|
|
1449
|
-
module.exports = memoize;
|
|
1450
|
-
});
|
|
1451
|
-
|
|
1452
|
-
// ../../node_modules/lodash/_memoizeCapped.js
|
|
1453
|
-
var require__memoizeCapped = __commonJS((exports, module) => {
|
|
1454
|
-
var memoize = require_memoize();
|
|
1455
|
-
var MAX_MEMOIZE_SIZE = 500;
|
|
1456
|
-
function memoizeCapped(func) {
|
|
1457
|
-
var result = memoize(func, function(key) {
|
|
1458
|
-
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
1459
|
-
cache.clear();
|
|
1460
|
-
}
|
|
1461
|
-
return key;
|
|
1462
|
-
});
|
|
1463
|
-
var cache = result.cache;
|
|
1464
|
-
return result;
|
|
1465
|
-
}
|
|
1466
|
-
module.exports = memoizeCapped;
|
|
1467
|
-
});
|
|
1468
|
-
|
|
1469
|
-
// ../../node_modules/lodash/_stringToPath.js
|
|
1470
|
-
var require__stringToPath = __commonJS((exports, module) => {
|
|
1471
|
-
var memoizeCapped = require__memoizeCapped();
|
|
1472
|
-
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
1473
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
1474
|
-
var stringToPath = memoizeCapped(function(string) {
|
|
1475
|
-
var result = [];
|
|
1476
|
-
if (string.charCodeAt(0) === 46) {
|
|
1477
|
-
result.push("");
|
|
1478
|
-
}
|
|
1479
|
-
string.replace(rePropName, function(match, number, quote, subString) {
|
|
1480
|
-
result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
|
|
1481
|
-
});
|
|
1482
|
-
return result;
|
|
1483
|
-
});
|
|
1484
|
-
module.exports = stringToPath;
|
|
1485
|
-
});
|
|
1486
|
-
|
|
1487
|
-
// ../../node_modules/lodash/_baseToString.js
|
|
1488
|
-
var require__baseToString = __commonJS((exports, module) => {
|
|
1489
|
-
var Symbol2 = require__Symbol();
|
|
1490
|
-
var arrayMap = require__arrayMap();
|
|
1491
|
-
var isArray3 = require_isArray();
|
|
1492
|
-
var isSymbol = require_isSymbol();
|
|
1493
|
-
var INFINITY = 1 / 0;
|
|
1494
|
-
var symbolProto = Symbol2 ? Symbol2.prototype : undefined;
|
|
1495
|
-
var symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
1496
|
-
function baseToString(value) {
|
|
1497
|
-
if (typeof value == "string") {
|
|
1498
|
-
return value;
|
|
1499
|
-
}
|
|
1500
|
-
if (isArray3(value)) {
|
|
1501
|
-
return arrayMap(value, baseToString) + "";
|
|
1502
|
-
}
|
|
1503
|
-
if (isSymbol(value)) {
|
|
1504
|
-
return symbolToString ? symbolToString.call(value) : "";
|
|
1505
|
-
}
|
|
1506
|
-
var result = value + "";
|
|
1507
|
-
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
1508
|
-
}
|
|
1509
|
-
module.exports = baseToString;
|
|
1510
|
-
});
|
|
1511
|
-
|
|
1512
|
-
// ../../node_modules/lodash/toString.js
|
|
1513
|
-
var require_toString = __commonJS((exports, module) => {
|
|
1514
|
-
var baseToString = require__baseToString();
|
|
1515
|
-
function toString(value) {
|
|
1516
|
-
return value == null ? "" : baseToString(value);
|
|
1517
|
-
}
|
|
1518
|
-
module.exports = toString;
|
|
1519
|
-
});
|
|
1520
|
-
|
|
1521
|
-
// ../../node_modules/lodash/_castPath.js
|
|
1522
|
-
var require__castPath = __commonJS((exports, module) => {
|
|
1523
|
-
var isArray3 = require_isArray();
|
|
1524
|
-
var isKey = require__isKey();
|
|
1525
|
-
var stringToPath = require__stringToPath();
|
|
1526
|
-
var toString = require_toString();
|
|
1527
|
-
function castPath(value, object) {
|
|
1528
|
-
if (isArray3(value)) {
|
|
1529
|
-
return value;
|
|
1530
|
-
}
|
|
1531
|
-
return isKey(value, object) ? [value] : stringToPath(toString(value));
|
|
1532
|
-
}
|
|
1533
|
-
module.exports = castPath;
|
|
1534
|
-
});
|
|
1535
|
-
|
|
1536
|
-
// ../../node_modules/lodash/_toKey.js
|
|
1537
|
-
var require__toKey = __commonJS((exports, module) => {
|
|
1538
|
-
var isSymbol = require_isSymbol();
|
|
1539
|
-
var INFINITY = 1 / 0;
|
|
1540
|
-
function toKey(value) {
|
|
1541
|
-
if (typeof value == "string" || isSymbol(value)) {
|
|
1542
|
-
return value;
|
|
1543
|
-
}
|
|
1544
|
-
var result = value + "";
|
|
1545
|
-
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
1546
|
-
}
|
|
1547
|
-
module.exports = toKey;
|
|
1548
|
-
});
|
|
1549
|
-
|
|
1550
|
-
// ../../node_modules/lodash/_hasPath.js
|
|
1551
|
-
var require__hasPath = __commonJS((exports, module) => {
|
|
1552
|
-
var castPath = require__castPath();
|
|
1553
|
-
var isArguments = require_isArguments();
|
|
1554
|
-
var isArray3 = require_isArray();
|
|
1555
|
-
var isIndex = require__isIndex();
|
|
1556
|
-
var isLength = require_isLength();
|
|
1557
|
-
var toKey = require__toKey();
|
|
1558
|
-
function hasPath(object, path, hasFunc) {
|
|
1559
|
-
path = castPath(path, object);
|
|
1560
|
-
var index = -1, length = path.length, result = false;
|
|
1561
|
-
while (++index < length) {
|
|
1562
|
-
var key = toKey(path[index]);
|
|
1563
|
-
if (!(result = object != null && hasFunc(object, key))) {
|
|
1564
|
-
break;
|
|
1565
|
-
}
|
|
1566
|
-
object = object[key];
|
|
1567
|
-
}
|
|
1568
|
-
if (result || ++index != length) {
|
|
1569
|
-
return result;
|
|
1570
|
-
}
|
|
1571
|
-
length = object == null ? 0 : object.length;
|
|
1572
|
-
return !!length && isLength(length) && isIndex(key, length) && (isArray3(object) || isArguments(object));
|
|
1573
|
-
}
|
|
1574
|
-
module.exports = hasPath;
|
|
1575
|
-
});
|
|
1576
|
-
|
|
1577
|
-
// ../../node_modules/lodash/has.js
|
|
1578
|
-
var require_has = __commonJS((exports, module) => {
|
|
1579
|
-
var baseHas = require__baseHas();
|
|
1580
|
-
var hasPath = require__hasPath();
|
|
1581
|
-
function has(object, path) {
|
|
1582
|
-
return object != null && hasPath(object, path, baseHas);
|
|
1583
|
-
}
|
|
1584
|
-
module.exports = has;
|
|
1585
|
-
});
|
|
1586
|
-
|
|
1587
|
-
// ../../node_modules/lodash/_stackClear.js
|
|
1588
|
-
var require__stackClear = __commonJS((exports, module) => {
|
|
1589
|
-
var ListCache = require__ListCache();
|
|
1590
|
-
function stackClear() {
|
|
1591
|
-
this.__data__ = new ListCache;
|
|
1592
|
-
this.size = 0;
|
|
1593
|
-
}
|
|
1594
|
-
module.exports = stackClear;
|
|
1595
|
-
});
|
|
1596
|
-
|
|
1597
|
-
// ../../node_modules/lodash/_stackDelete.js
|
|
1598
|
-
var require__stackDelete = __commonJS((exports, module) => {
|
|
1599
|
-
function stackDelete(key) {
|
|
1600
|
-
var data = this.__data__, result = data["delete"](key);
|
|
1601
|
-
this.size = data.size;
|
|
1602
|
-
return result;
|
|
1603
|
-
}
|
|
1604
|
-
module.exports = stackDelete;
|
|
1605
|
-
});
|
|
1606
|
-
|
|
1607
|
-
// ../../node_modules/lodash/_stackGet.js
|
|
1608
|
-
var require__stackGet = __commonJS((exports, module) => {
|
|
1609
|
-
function stackGet(key) {
|
|
1610
|
-
return this.__data__.get(key);
|
|
1611
|
-
}
|
|
1612
|
-
module.exports = stackGet;
|
|
1613
|
-
});
|
|
1614
|
-
|
|
1615
|
-
// ../../node_modules/lodash/_stackHas.js
|
|
1616
|
-
var require__stackHas = __commonJS((exports, module) => {
|
|
1617
|
-
function stackHas(key) {
|
|
1618
|
-
return this.__data__.has(key);
|
|
1619
|
-
}
|
|
1620
|
-
module.exports = stackHas;
|
|
1621
|
-
});
|
|
1622
|
-
|
|
1623
|
-
// ../../node_modules/lodash/_stackSet.js
|
|
1624
|
-
var require__stackSet = __commonJS((exports, module) => {
|
|
1625
|
-
var ListCache = require__ListCache();
|
|
1626
|
-
var Map = require__Map();
|
|
1627
|
-
var MapCache = require__MapCache();
|
|
1628
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
1629
|
-
function stackSet(key, value) {
|
|
1630
|
-
var data = this.__data__;
|
|
1631
|
-
if (data instanceof ListCache) {
|
|
1632
|
-
var pairs = data.__data__;
|
|
1633
|
-
if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
1634
|
-
pairs.push([key, value]);
|
|
1635
|
-
this.size = ++data.size;
|
|
1636
|
-
return this;
|
|
1637
|
-
}
|
|
1638
|
-
data = this.__data__ = new MapCache(pairs);
|
|
1639
|
-
}
|
|
1640
|
-
data.set(key, value);
|
|
1641
|
-
this.size = data.size;
|
|
1642
|
-
return this;
|
|
1643
|
-
}
|
|
1644
|
-
module.exports = stackSet;
|
|
1645
|
-
});
|
|
1646
|
-
|
|
1647
|
-
// ../../node_modules/lodash/_Stack.js
|
|
1648
|
-
var require__Stack = __commonJS((exports, module) => {
|
|
1649
|
-
var ListCache = require__ListCache();
|
|
1650
|
-
var stackClear = require__stackClear();
|
|
1651
|
-
var stackDelete = require__stackDelete();
|
|
1652
|
-
var stackGet = require__stackGet();
|
|
1653
|
-
var stackHas = require__stackHas();
|
|
1654
|
-
var stackSet = require__stackSet();
|
|
1655
|
-
function Stack(entries) {
|
|
1656
|
-
var data = this.__data__ = new ListCache(entries);
|
|
1657
|
-
this.size = data.size;
|
|
1658
|
-
}
|
|
1659
|
-
Stack.prototype.clear = stackClear;
|
|
1660
|
-
Stack.prototype["delete"] = stackDelete;
|
|
1661
|
-
Stack.prototype.get = stackGet;
|
|
1662
|
-
Stack.prototype.has = stackHas;
|
|
1663
|
-
Stack.prototype.set = stackSet;
|
|
1664
|
-
module.exports = Stack;
|
|
1665
|
-
});
|
|
1666
|
-
|
|
1667
|
-
// ../../node_modules/lodash/_arrayEach.js
|
|
1668
|
-
var require__arrayEach = __commonJS((exports, module) => {
|
|
1669
|
-
function arrayEach(array, iteratee) {
|
|
1670
|
-
var index = -1, length = array == null ? 0 : array.length;
|
|
1671
|
-
while (++index < length) {
|
|
1672
|
-
if (iteratee(array[index], index, array) === false) {
|
|
1673
|
-
break;
|
|
1674
|
-
}
|
|
1675
|
-
}
|
|
1676
|
-
return array;
|
|
1677
|
-
}
|
|
1678
|
-
module.exports = arrayEach;
|
|
1679
|
-
});
|
|
1680
|
-
|
|
1681
|
-
// ../../node_modules/lodash/_baseAssignValue.js
|
|
1682
|
-
var require__baseAssignValue = __commonJS((exports, module) => {
|
|
1683
|
-
var defineProperty = require__defineProperty();
|
|
1684
|
-
function baseAssignValue(object, key, value) {
|
|
1685
|
-
if (key == "__proto__" && defineProperty) {
|
|
1686
|
-
defineProperty(object, key, {
|
|
1687
|
-
configurable: true,
|
|
1688
|
-
enumerable: true,
|
|
1689
|
-
value,
|
|
1690
|
-
writable: true
|
|
1691
|
-
});
|
|
1692
|
-
} else {
|
|
1693
|
-
object[key] = value;
|
|
1694
|
-
}
|
|
1695
|
-
}
|
|
1696
|
-
module.exports = baseAssignValue;
|
|
1697
|
-
});
|
|
1698
|
-
|
|
1699
|
-
// ../../node_modules/lodash/_assignValue.js
|
|
1700
|
-
var require__assignValue = __commonJS((exports, module) => {
|
|
1701
|
-
var baseAssignValue = require__baseAssignValue();
|
|
1702
|
-
var eq = require_eq();
|
|
1703
|
-
var objectProto = Object.prototype;
|
|
1704
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1705
|
-
function assignValue(object, key, value) {
|
|
1706
|
-
var objValue = object[key];
|
|
1707
|
-
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {
|
|
1708
|
-
baseAssignValue(object, key, value);
|
|
1709
|
-
}
|
|
1710
|
-
}
|
|
1711
|
-
module.exports = assignValue;
|
|
1712
|
-
});
|
|
1713
|
-
|
|
1714
|
-
// ../../node_modules/lodash/_copyObject.js
|
|
1715
|
-
var require__copyObject = __commonJS((exports, module) => {
|
|
1716
|
-
var assignValue = require__assignValue();
|
|
1717
|
-
var baseAssignValue = require__baseAssignValue();
|
|
1718
|
-
function copyObject(source, props, object, customizer) {
|
|
1719
|
-
var isNew = !object;
|
|
1720
|
-
object || (object = {});
|
|
1721
|
-
var index = -1, length = props.length;
|
|
1722
|
-
while (++index < length) {
|
|
1723
|
-
var key = props[index];
|
|
1724
|
-
var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;
|
|
1725
|
-
if (newValue === undefined) {
|
|
1726
|
-
newValue = source[key];
|
|
1727
|
-
}
|
|
1728
|
-
if (isNew) {
|
|
1729
|
-
baseAssignValue(object, key, newValue);
|
|
1730
|
-
} else {
|
|
1731
|
-
assignValue(object, key, newValue);
|
|
1732
|
-
}
|
|
1733
|
-
}
|
|
1734
|
-
return object;
|
|
1735
|
-
}
|
|
1736
|
-
module.exports = copyObject;
|
|
1737
|
-
});
|
|
1738
|
-
|
|
1739
|
-
// ../../node_modules/lodash/_baseAssign.js
|
|
1740
|
-
var require__baseAssign = __commonJS((exports, module) => {
|
|
1741
|
-
var copyObject = require__copyObject();
|
|
1742
|
-
var keys = require_keys();
|
|
1743
|
-
function baseAssign(object, source) {
|
|
1744
|
-
return object && copyObject(source, keys(source), object);
|
|
1745
|
-
}
|
|
1746
|
-
module.exports = baseAssign;
|
|
1747
|
-
});
|
|
1748
|
-
|
|
1749
|
-
// ../../node_modules/lodash/_nativeKeysIn.js
|
|
1750
|
-
var require__nativeKeysIn = __commonJS((exports, module) => {
|
|
1751
|
-
function nativeKeysIn(object) {
|
|
1752
|
-
var result = [];
|
|
1753
|
-
if (object != null) {
|
|
1754
|
-
for (var key in Object(object)) {
|
|
1755
|
-
result.push(key);
|
|
1756
|
-
}
|
|
1757
|
-
}
|
|
1758
|
-
return result;
|
|
1759
|
-
}
|
|
1760
|
-
module.exports = nativeKeysIn;
|
|
1761
|
-
});
|
|
1762
|
-
|
|
1763
|
-
// ../../node_modules/lodash/_baseKeysIn.js
|
|
1764
|
-
var require__baseKeysIn = __commonJS((exports, module) => {
|
|
1765
|
-
var isObject = require_isObject();
|
|
1766
|
-
var isPrototype = require__isPrototype();
|
|
1767
|
-
var nativeKeysIn = require__nativeKeysIn();
|
|
1768
|
-
var objectProto = Object.prototype;
|
|
1769
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1770
|
-
function baseKeysIn(object) {
|
|
1771
|
-
if (!isObject(object)) {
|
|
1772
|
-
return nativeKeysIn(object);
|
|
1773
|
-
}
|
|
1774
|
-
var isProto = isPrototype(object), result = [];
|
|
1775
|
-
for (var key in object) {
|
|
1776
|
-
if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) {
|
|
1777
|
-
result.push(key);
|
|
1778
|
-
}
|
|
1779
|
-
}
|
|
1780
|
-
return result;
|
|
1781
|
-
}
|
|
1782
|
-
module.exports = baseKeysIn;
|
|
1783
|
-
});
|
|
1784
|
-
|
|
1785
|
-
// ../../node_modules/lodash/keysIn.js
|
|
1786
|
-
var require_keysIn = __commonJS((exports, module) => {
|
|
1787
|
-
var arrayLikeKeys = require__arrayLikeKeys();
|
|
1788
|
-
var baseKeysIn = require__baseKeysIn();
|
|
1789
|
-
var isArrayLike = require_isArrayLike();
|
|
1790
|
-
function keysIn(object) {
|
|
1791
|
-
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
|
1792
|
-
}
|
|
1793
|
-
module.exports = keysIn;
|
|
1794
|
-
});
|
|
1795
|
-
|
|
1796
|
-
// ../../node_modules/lodash/_baseAssignIn.js
|
|
1797
|
-
var require__baseAssignIn = __commonJS((exports, module) => {
|
|
1798
|
-
var copyObject = require__copyObject();
|
|
1799
|
-
var keysIn = require_keysIn();
|
|
1800
|
-
function baseAssignIn(object, source) {
|
|
1801
|
-
return object && copyObject(source, keysIn(source), object);
|
|
1802
|
-
}
|
|
1803
|
-
module.exports = baseAssignIn;
|
|
1804
|
-
});
|
|
1805
|
-
|
|
1806
|
-
// ../../node_modules/lodash/_cloneBuffer.js
|
|
1807
|
-
var require__cloneBuffer = __commonJS((exports, module) => {
|
|
1808
|
-
var root = require__root();
|
|
1809
|
-
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
1810
|
-
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
1811
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1812
|
-
var Buffer = moduleExports ? root.Buffer : undefined;
|
|
1813
|
-
var allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
|
|
1814
|
-
function cloneBuffer(buffer, isDeep) {
|
|
1815
|
-
if (isDeep) {
|
|
1816
|
-
return buffer.slice();
|
|
1817
|
-
}
|
|
1818
|
-
var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
1819
|
-
buffer.copy(result);
|
|
1820
|
-
return result;
|
|
1821
|
-
}
|
|
1822
|
-
module.exports = cloneBuffer;
|
|
1823
|
-
});
|
|
1824
|
-
|
|
1825
|
-
// ../../node_modules/lodash/_copyArray.js
|
|
1826
|
-
var require__copyArray = __commonJS((exports, module) => {
|
|
1827
|
-
function copyArray(source, array) {
|
|
1828
|
-
var index = -1, length = source.length;
|
|
1829
|
-
array || (array = Array(length));
|
|
1830
|
-
while (++index < length) {
|
|
1831
|
-
array[index] = source[index];
|
|
1832
|
-
}
|
|
1833
|
-
return array;
|
|
1834
|
-
}
|
|
1835
|
-
module.exports = copyArray;
|
|
1836
|
-
});
|
|
1837
|
-
|
|
1838
|
-
// ../../node_modules/lodash/_arrayFilter.js
|
|
1839
|
-
var require__arrayFilter = __commonJS((exports, module) => {
|
|
1840
|
-
function arrayFilter(array, predicate) {
|
|
1841
|
-
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
1842
|
-
while (++index < length) {
|
|
1843
|
-
var value = array[index];
|
|
1844
|
-
if (predicate(value, index, array)) {
|
|
1845
|
-
result[resIndex++] = value;
|
|
1846
|
-
}
|
|
1847
|
-
}
|
|
1848
|
-
return result;
|
|
1849
|
-
}
|
|
1850
|
-
module.exports = arrayFilter;
|
|
1851
|
-
});
|
|
1852
|
-
|
|
1853
|
-
// ../../node_modules/lodash/stubArray.js
|
|
1854
|
-
var require_stubArray = __commonJS((exports, module) => {
|
|
1855
|
-
function stubArray() {
|
|
1856
|
-
return [];
|
|
1857
|
-
}
|
|
1858
|
-
module.exports = stubArray;
|
|
1859
|
-
});
|
|
1860
|
-
|
|
1861
|
-
// ../../node_modules/lodash/_getSymbols.js
|
|
1862
|
-
var require__getSymbols = __commonJS((exports, module) => {
|
|
1863
|
-
var arrayFilter = require__arrayFilter();
|
|
1864
|
-
var stubArray = require_stubArray();
|
|
1865
|
-
var objectProto = Object.prototype;
|
|
1866
|
-
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
1867
|
-
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
1868
|
-
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
|
1869
|
-
if (object == null) {
|
|
1870
|
-
return [];
|
|
1871
|
-
}
|
|
1872
|
-
object = Object(object);
|
|
1873
|
-
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
1874
|
-
return propertyIsEnumerable.call(object, symbol);
|
|
1875
|
-
});
|
|
1876
|
-
};
|
|
1877
|
-
module.exports = getSymbols;
|
|
1878
|
-
});
|
|
1879
|
-
|
|
1880
|
-
// ../../node_modules/lodash/_copySymbols.js
|
|
1881
|
-
var require__copySymbols = __commonJS((exports, module) => {
|
|
1882
|
-
var copyObject = require__copyObject();
|
|
1883
|
-
var getSymbols = require__getSymbols();
|
|
1884
|
-
function copySymbols(source, object) {
|
|
1885
|
-
return copyObject(source, getSymbols(source), object);
|
|
1886
|
-
}
|
|
1887
|
-
module.exports = copySymbols;
|
|
1888
|
-
});
|
|
1889
|
-
|
|
1890
|
-
// ../../node_modules/lodash/_getSymbolsIn.js
|
|
1891
|
-
var require__getSymbolsIn = __commonJS((exports, module) => {
|
|
1892
|
-
var arrayPush = require__arrayPush();
|
|
1893
|
-
var getPrototype = require__getPrototype();
|
|
1894
|
-
var getSymbols = require__getSymbols();
|
|
1895
|
-
var stubArray = require_stubArray();
|
|
1896
|
-
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
1897
|
-
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
|
1898
|
-
var result = [];
|
|
1899
|
-
while (object) {
|
|
1900
|
-
arrayPush(result, getSymbols(object));
|
|
1901
|
-
object = getPrototype(object);
|
|
1902
|
-
}
|
|
1903
|
-
return result;
|
|
1904
|
-
};
|
|
1905
|
-
module.exports = getSymbolsIn;
|
|
1906
|
-
});
|
|
1907
|
-
|
|
1908
|
-
// ../../node_modules/lodash/_copySymbolsIn.js
|
|
1909
|
-
var require__copySymbolsIn = __commonJS((exports, module) => {
|
|
1910
|
-
var copyObject = require__copyObject();
|
|
1911
|
-
var getSymbolsIn = require__getSymbolsIn();
|
|
1912
|
-
function copySymbolsIn(source, object) {
|
|
1913
|
-
return copyObject(source, getSymbolsIn(source), object);
|
|
1914
|
-
}
|
|
1915
|
-
module.exports = copySymbolsIn;
|
|
1916
|
-
});
|
|
1917
|
-
|
|
1918
|
-
// ../../node_modules/lodash/_baseGetAllKeys.js
|
|
1919
|
-
var require__baseGetAllKeys = __commonJS((exports, module) => {
|
|
1920
|
-
var arrayPush = require__arrayPush();
|
|
1921
|
-
var isArray4 = require_isArray();
|
|
1922
|
-
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
1923
|
-
var result = keysFunc(object);
|
|
1924
|
-
return isArray4(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
1925
|
-
}
|
|
1926
|
-
module.exports = baseGetAllKeys;
|
|
1927
|
-
});
|
|
1928
|
-
|
|
1929
|
-
// ../../node_modules/lodash/_getAllKeys.js
|
|
1930
|
-
var require__getAllKeys = __commonJS((exports, module) => {
|
|
1931
|
-
var baseGetAllKeys = require__baseGetAllKeys();
|
|
1932
|
-
var getSymbols = require__getSymbols();
|
|
1933
|
-
var keys = require_keys();
|
|
1934
|
-
function getAllKeys(object) {
|
|
1935
|
-
return baseGetAllKeys(object, keys, getSymbols);
|
|
1936
|
-
}
|
|
1937
|
-
module.exports = getAllKeys;
|
|
1938
|
-
});
|
|
1939
|
-
|
|
1940
|
-
// ../../node_modules/lodash/_getAllKeysIn.js
|
|
1941
|
-
var require__getAllKeysIn = __commonJS((exports, module) => {
|
|
1942
|
-
var baseGetAllKeys = require__baseGetAllKeys();
|
|
1943
|
-
var getSymbolsIn = require__getSymbolsIn();
|
|
1944
|
-
var keysIn = require_keysIn();
|
|
1945
|
-
function getAllKeysIn(object) {
|
|
1946
|
-
return baseGetAllKeys(object, keysIn, getSymbolsIn);
|
|
1947
|
-
}
|
|
1948
|
-
module.exports = getAllKeysIn;
|
|
1949
|
-
});
|
|
1950
|
-
|
|
1951
|
-
// ../../node_modules/lodash/_DataView.js
|
|
1952
|
-
var require__DataView = __commonJS((exports, module) => {
|
|
1953
|
-
var getNative = require__getNative();
|
|
1954
|
-
var root = require__root();
|
|
1955
|
-
var DataView = getNative(root, "DataView");
|
|
1956
|
-
module.exports = DataView;
|
|
1957
|
-
});
|
|
1958
|
-
|
|
1959
|
-
// ../../node_modules/lodash/_Promise.js
|
|
1960
|
-
var require__Promise = __commonJS((exports, module) => {
|
|
1961
|
-
var getNative = require__getNative();
|
|
1962
|
-
var root = require__root();
|
|
1963
|
-
var Promise2 = getNative(root, "Promise");
|
|
1964
|
-
module.exports = Promise2;
|
|
1965
|
-
});
|
|
1966
|
-
|
|
1967
|
-
// ../../node_modules/lodash/_Set.js
|
|
1968
|
-
var require__Set = __commonJS((exports, module) => {
|
|
1969
|
-
var getNative = require__getNative();
|
|
1970
|
-
var root = require__root();
|
|
1971
|
-
var Set = getNative(root, "Set");
|
|
1972
|
-
module.exports = Set;
|
|
1973
|
-
});
|
|
1974
|
-
|
|
1975
|
-
// ../../node_modules/lodash/_WeakMap.js
|
|
1976
|
-
var require__WeakMap = __commonJS((exports, module) => {
|
|
1977
|
-
var getNative = require__getNative();
|
|
1978
|
-
var root = require__root();
|
|
1979
|
-
var WeakMap2 = getNative(root, "WeakMap");
|
|
1980
|
-
module.exports = WeakMap2;
|
|
1981
|
-
});
|
|
1982
|
-
|
|
1983
|
-
// ../../node_modules/lodash/_getTag.js
|
|
1984
|
-
var require__getTag = __commonJS((exports, module) => {
|
|
1985
|
-
var DataView = require__DataView();
|
|
1986
|
-
var Map = require__Map();
|
|
1987
|
-
var Promise2 = require__Promise();
|
|
1988
|
-
var Set = require__Set();
|
|
1989
|
-
var WeakMap2 = require__WeakMap();
|
|
1990
|
-
var baseGetTag = require__baseGetTag();
|
|
1991
|
-
var toSource = require__toSource();
|
|
1992
|
-
var mapTag = "[object Map]";
|
|
1993
|
-
var objectTag = "[object Object]";
|
|
1994
|
-
var promiseTag = "[object Promise]";
|
|
1995
|
-
var setTag = "[object Set]";
|
|
1996
|
-
var weakMapTag = "[object WeakMap]";
|
|
1997
|
-
var dataViewTag = "[object DataView]";
|
|
1998
|
-
var dataViewCtorString = toSource(DataView);
|
|
1999
|
-
var mapCtorString = toSource(Map);
|
|
2000
|
-
var promiseCtorString = toSource(Promise2);
|
|
2001
|
-
var setCtorString = toSource(Set);
|
|
2002
|
-
var weakMapCtorString = toSource(WeakMap2);
|
|
2003
|
-
var getTag = baseGetTag;
|
|
2004
|
-
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set) != setTag || WeakMap2 && getTag(new WeakMap2) != weakMapTag) {
|
|
2005
|
-
getTag = function(value) {
|
|
2006
|
-
var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : "";
|
|
2007
|
-
if (ctorString) {
|
|
2008
|
-
switch (ctorString) {
|
|
2009
|
-
case dataViewCtorString:
|
|
2010
|
-
return dataViewTag;
|
|
2011
|
-
case mapCtorString:
|
|
2012
|
-
return mapTag;
|
|
2013
|
-
case promiseCtorString:
|
|
2014
|
-
return promiseTag;
|
|
2015
|
-
case setCtorString:
|
|
2016
|
-
return setTag;
|
|
2017
|
-
case weakMapCtorString:
|
|
2018
|
-
return weakMapTag;
|
|
2019
|
-
}
|
|
2020
|
-
}
|
|
2021
|
-
return result;
|
|
2022
|
-
};
|
|
2023
|
-
}
|
|
2024
|
-
module.exports = getTag;
|
|
2025
|
-
});
|
|
2026
|
-
|
|
2027
|
-
// ../../node_modules/lodash/_initCloneArray.js
|
|
2028
|
-
var require__initCloneArray = __commonJS((exports, module) => {
|
|
2029
|
-
var objectProto = Object.prototype;
|
|
2030
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
2031
|
-
function initCloneArray(array) {
|
|
2032
|
-
var length = array.length, result = new array.constructor(length);
|
|
2033
|
-
if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) {
|
|
2034
|
-
result.index = array.index;
|
|
2035
|
-
result.input = array.input;
|
|
2036
|
-
}
|
|
2037
|
-
return result;
|
|
2038
|
-
}
|
|
2039
|
-
module.exports = initCloneArray;
|
|
2040
|
-
});
|
|
2041
|
-
|
|
2042
|
-
// ../../node_modules/lodash/_Uint8Array.js
|
|
2043
|
-
var require__Uint8Array = __commonJS((exports, module) => {
|
|
2044
|
-
var root = require__root();
|
|
2045
|
-
var Uint8Array = root.Uint8Array;
|
|
2046
|
-
module.exports = Uint8Array;
|
|
2047
|
-
});
|
|
2048
|
-
|
|
2049
|
-
// ../../node_modules/lodash/_cloneArrayBuffer.js
|
|
2050
|
-
var require__cloneArrayBuffer = __commonJS((exports, module) => {
|
|
2051
|
-
var Uint8Array = require__Uint8Array();
|
|
2052
|
-
function cloneArrayBuffer(arrayBuffer) {
|
|
2053
|
-
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
2054
|
-
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
|
|
2055
|
-
return result;
|
|
2056
|
-
}
|
|
2057
|
-
module.exports = cloneArrayBuffer;
|
|
2058
|
-
});
|
|
2059
|
-
|
|
2060
|
-
// ../../node_modules/lodash/_cloneDataView.js
|
|
2061
|
-
var require__cloneDataView = __commonJS((exports, module) => {
|
|
2062
|
-
var cloneArrayBuffer = require__cloneArrayBuffer();
|
|
2063
|
-
function cloneDataView(dataView, isDeep) {
|
|
2064
|
-
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
|
2065
|
-
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
2066
|
-
}
|
|
2067
|
-
module.exports = cloneDataView;
|
|
2068
|
-
});
|
|
2069
|
-
|
|
2070
|
-
// ../../node_modules/lodash/_cloneRegExp.js
|
|
2071
|
-
var require__cloneRegExp = __commonJS((exports, module) => {
|
|
2072
|
-
var reFlags = /\w*$/;
|
|
2073
|
-
function cloneRegExp(regexp) {
|
|
2074
|
-
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
|
2075
|
-
result.lastIndex = regexp.lastIndex;
|
|
2076
|
-
return result;
|
|
2077
|
-
}
|
|
2078
|
-
module.exports = cloneRegExp;
|
|
2079
|
-
});
|
|
2080
|
-
|
|
2081
|
-
// ../../node_modules/lodash/_cloneSymbol.js
|
|
2082
|
-
var require__cloneSymbol = __commonJS((exports, module) => {
|
|
2083
|
-
var Symbol2 = require__Symbol();
|
|
2084
|
-
var symbolProto = Symbol2 ? Symbol2.prototype : undefined;
|
|
2085
|
-
var symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
|
2086
|
-
function cloneSymbol(symbol) {
|
|
2087
|
-
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
|
|
2088
|
-
}
|
|
2089
|
-
module.exports = cloneSymbol;
|
|
2090
|
-
});
|
|
2091
|
-
|
|
2092
|
-
// ../../node_modules/lodash/_cloneTypedArray.js
|
|
2093
|
-
var require__cloneTypedArray = __commonJS((exports, module) => {
|
|
2094
|
-
var cloneArrayBuffer = require__cloneArrayBuffer();
|
|
2095
|
-
function cloneTypedArray(typedArray, isDeep) {
|
|
2096
|
-
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
2097
|
-
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
2098
|
-
}
|
|
2099
|
-
module.exports = cloneTypedArray;
|
|
2100
|
-
});
|
|
2101
|
-
|
|
2102
|
-
// ../../node_modules/lodash/_initCloneByTag.js
|
|
2103
|
-
var require__initCloneByTag = __commonJS((exports, module) => {
|
|
2104
|
-
var cloneArrayBuffer = require__cloneArrayBuffer();
|
|
2105
|
-
var cloneDataView = require__cloneDataView();
|
|
2106
|
-
var cloneRegExp = require__cloneRegExp();
|
|
2107
|
-
var cloneSymbol = require__cloneSymbol();
|
|
2108
|
-
var cloneTypedArray = require__cloneTypedArray();
|
|
2109
|
-
var boolTag = "[object Boolean]";
|
|
2110
|
-
var dateTag = "[object Date]";
|
|
2111
|
-
var mapTag = "[object Map]";
|
|
2112
|
-
var numberTag = "[object Number]";
|
|
2113
|
-
var regexpTag = "[object RegExp]";
|
|
2114
|
-
var setTag = "[object Set]";
|
|
2115
|
-
var stringTag = "[object String]";
|
|
2116
|
-
var symbolTag = "[object Symbol]";
|
|
2117
|
-
var arrayBufferTag = "[object ArrayBuffer]";
|
|
2118
|
-
var dataViewTag = "[object DataView]";
|
|
2119
|
-
var float32Tag = "[object Float32Array]";
|
|
2120
|
-
var float64Tag = "[object Float64Array]";
|
|
2121
|
-
var int8Tag = "[object Int8Array]";
|
|
2122
|
-
var int16Tag = "[object Int16Array]";
|
|
2123
|
-
var int32Tag = "[object Int32Array]";
|
|
2124
|
-
var uint8Tag = "[object Uint8Array]";
|
|
2125
|
-
var uint8ClampedTag = "[object Uint8ClampedArray]";
|
|
2126
|
-
var uint16Tag = "[object Uint16Array]";
|
|
2127
|
-
var uint32Tag = "[object Uint32Array]";
|
|
2128
|
-
function initCloneByTag(object, tag, isDeep) {
|
|
2129
|
-
var Ctor = object.constructor;
|
|
2130
|
-
switch (tag) {
|
|
2131
|
-
case arrayBufferTag:
|
|
2132
|
-
return cloneArrayBuffer(object);
|
|
2133
|
-
case boolTag:
|
|
2134
|
-
case dateTag:
|
|
2135
|
-
return new Ctor(+object);
|
|
2136
|
-
case dataViewTag:
|
|
2137
|
-
return cloneDataView(object, isDeep);
|
|
2138
|
-
case float32Tag:
|
|
2139
|
-
case float64Tag:
|
|
2140
|
-
case int8Tag:
|
|
2141
|
-
case int16Tag:
|
|
2142
|
-
case int32Tag:
|
|
2143
|
-
case uint8Tag:
|
|
2144
|
-
case uint8ClampedTag:
|
|
2145
|
-
case uint16Tag:
|
|
2146
|
-
case uint32Tag:
|
|
2147
|
-
return cloneTypedArray(object, isDeep);
|
|
2148
|
-
case mapTag:
|
|
2149
|
-
return new Ctor;
|
|
2150
|
-
case numberTag:
|
|
2151
|
-
case stringTag:
|
|
2152
|
-
return new Ctor(object);
|
|
2153
|
-
case regexpTag:
|
|
2154
|
-
return cloneRegExp(object);
|
|
2155
|
-
case setTag:
|
|
2156
|
-
return new Ctor;
|
|
2157
|
-
case symbolTag:
|
|
2158
|
-
return cloneSymbol(object);
|
|
2159
|
-
}
|
|
2160
|
-
}
|
|
2161
|
-
module.exports = initCloneByTag;
|
|
2162
|
-
});
|
|
2163
|
-
|
|
2164
|
-
// ../../node_modules/lodash/_baseCreate.js
|
|
2165
|
-
var require__baseCreate = __commonJS((exports, module) => {
|
|
2166
|
-
var isObject = require_isObject();
|
|
2167
|
-
var objectCreate = Object.create;
|
|
2168
|
-
var baseCreate = function() {
|
|
2169
|
-
function object() {
|
|
2170
|
-
}
|
|
2171
|
-
return function(proto) {
|
|
2172
|
-
if (!isObject(proto)) {
|
|
2173
|
-
return {};
|
|
2174
|
-
}
|
|
2175
|
-
if (objectCreate) {
|
|
2176
|
-
return objectCreate(proto);
|
|
2177
|
-
}
|
|
2178
|
-
object.prototype = proto;
|
|
2179
|
-
var result = new object;
|
|
2180
|
-
object.prototype = undefined;
|
|
2181
|
-
return result;
|
|
2182
|
-
};
|
|
2183
|
-
}();
|
|
2184
|
-
module.exports = baseCreate;
|
|
2185
|
-
});
|
|
2186
|
-
|
|
2187
|
-
// ../../node_modules/lodash/_initCloneObject.js
|
|
2188
|
-
var require__initCloneObject = __commonJS((exports, module) => {
|
|
2189
|
-
var baseCreate = require__baseCreate();
|
|
2190
|
-
var getPrototype = require__getPrototype();
|
|
2191
|
-
var isPrototype = require__isPrototype();
|
|
2192
|
-
function initCloneObject(object) {
|
|
2193
|
-
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
|
|
2194
|
-
}
|
|
2195
|
-
module.exports = initCloneObject;
|
|
2196
|
-
});
|
|
2197
|
-
|
|
2198
|
-
// ../../node_modules/lodash/_baseIsMap.js
|
|
2199
|
-
var require__baseIsMap = __commonJS((exports, module) => {
|
|
2200
|
-
var getTag = require__getTag();
|
|
2201
|
-
var isObjectLike = require_isObjectLike();
|
|
2202
|
-
var mapTag = "[object Map]";
|
|
2203
|
-
function baseIsMap(value) {
|
|
2204
|
-
return isObjectLike(value) && getTag(value) == mapTag;
|
|
2205
|
-
}
|
|
2206
|
-
module.exports = baseIsMap;
|
|
2207
|
-
});
|
|
2208
|
-
|
|
2209
|
-
// ../../node_modules/lodash/isMap.js
|
|
2210
|
-
var require_isMap = __commonJS((exports, module) => {
|
|
2211
|
-
var baseIsMap = require__baseIsMap();
|
|
2212
|
-
var baseUnary = require__baseUnary();
|
|
2213
|
-
var nodeUtil = require__nodeUtil();
|
|
2214
|
-
var nodeIsMap = nodeUtil && nodeUtil.isMap;
|
|
2215
|
-
var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
|
|
2216
|
-
module.exports = isMap;
|
|
2217
|
-
});
|
|
2218
|
-
|
|
2219
|
-
// ../../node_modules/lodash/_baseIsSet.js
|
|
2220
|
-
var require__baseIsSet = __commonJS((exports, module) => {
|
|
2221
|
-
var getTag = require__getTag();
|
|
2222
|
-
var isObjectLike = require_isObjectLike();
|
|
2223
|
-
var setTag = "[object Set]";
|
|
2224
|
-
function baseIsSet(value) {
|
|
2225
|
-
return isObjectLike(value) && getTag(value) == setTag;
|
|
2226
|
-
}
|
|
2227
|
-
module.exports = baseIsSet;
|
|
2228
|
-
});
|
|
2229
|
-
|
|
2230
|
-
// ../../node_modules/lodash/isSet.js
|
|
2231
|
-
var require_isSet = __commonJS((exports, module) => {
|
|
2232
|
-
var baseIsSet = require__baseIsSet();
|
|
2233
|
-
var baseUnary = require__baseUnary();
|
|
2234
|
-
var nodeUtil = require__nodeUtil();
|
|
2235
|
-
var nodeIsSet = nodeUtil && nodeUtil.isSet;
|
|
2236
|
-
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
2237
|
-
module.exports = isSet;
|
|
2238
|
-
});
|
|
2239
|
-
|
|
2240
|
-
// ../../node_modules/lodash/_baseClone.js
|
|
2241
|
-
var require__baseClone = __commonJS((exports, module) => {
|
|
2242
|
-
var Stack = require__Stack();
|
|
2243
|
-
var arrayEach = require__arrayEach();
|
|
2244
|
-
var assignValue = require__assignValue();
|
|
2245
|
-
var baseAssign = require__baseAssign();
|
|
2246
|
-
var baseAssignIn = require__baseAssignIn();
|
|
2247
|
-
var cloneBuffer = require__cloneBuffer();
|
|
2248
|
-
var copyArray = require__copyArray();
|
|
2249
|
-
var copySymbols = require__copySymbols();
|
|
2250
|
-
var copySymbolsIn = require__copySymbolsIn();
|
|
2251
|
-
var getAllKeys = require__getAllKeys();
|
|
2252
|
-
var getAllKeysIn = require__getAllKeysIn();
|
|
2253
|
-
var getTag = require__getTag();
|
|
2254
|
-
var initCloneArray = require__initCloneArray();
|
|
2255
|
-
var initCloneByTag = require__initCloneByTag();
|
|
2256
|
-
var initCloneObject = require__initCloneObject();
|
|
2257
|
-
var isArray4 = require_isArray();
|
|
2258
|
-
var isBuffer = require_isBuffer();
|
|
2259
|
-
var isMap = require_isMap();
|
|
2260
|
-
var isObject = require_isObject();
|
|
2261
|
-
var isSet = require_isSet();
|
|
2262
|
-
var keys = require_keys();
|
|
2263
|
-
var keysIn = require_keysIn();
|
|
2264
|
-
var CLONE_DEEP_FLAG = 1;
|
|
2265
|
-
var CLONE_FLAT_FLAG = 2;
|
|
2266
|
-
var CLONE_SYMBOLS_FLAG = 4;
|
|
2267
|
-
var argsTag = "[object Arguments]";
|
|
2268
|
-
var arrayTag = "[object Array]";
|
|
2269
|
-
var boolTag = "[object Boolean]";
|
|
2270
|
-
var dateTag = "[object Date]";
|
|
2271
|
-
var errorTag = "[object Error]";
|
|
2272
|
-
var funcTag = "[object Function]";
|
|
2273
|
-
var genTag = "[object GeneratorFunction]";
|
|
2274
|
-
var mapTag = "[object Map]";
|
|
2275
|
-
var numberTag = "[object Number]";
|
|
2276
|
-
var objectTag = "[object Object]";
|
|
2277
|
-
var regexpTag = "[object RegExp]";
|
|
2278
|
-
var setTag = "[object Set]";
|
|
2279
|
-
var stringTag = "[object String]";
|
|
2280
|
-
var symbolTag = "[object Symbol]";
|
|
2281
|
-
var weakMapTag = "[object WeakMap]";
|
|
2282
|
-
var arrayBufferTag = "[object ArrayBuffer]";
|
|
2283
|
-
var dataViewTag = "[object DataView]";
|
|
2284
|
-
var float32Tag = "[object Float32Array]";
|
|
2285
|
-
var float64Tag = "[object Float64Array]";
|
|
2286
|
-
var int8Tag = "[object Int8Array]";
|
|
2287
|
-
var int16Tag = "[object Int16Array]";
|
|
2288
|
-
var int32Tag = "[object Int32Array]";
|
|
2289
|
-
var uint8Tag = "[object Uint8Array]";
|
|
2290
|
-
var uint8ClampedTag = "[object Uint8ClampedArray]";
|
|
2291
|
-
var uint16Tag = "[object Uint16Array]";
|
|
2292
|
-
var uint32Tag = "[object Uint32Array]";
|
|
2293
|
-
var cloneableTags = {};
|
|
2294
|
-
cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
|
2295
|
-
cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
|
|
2296
|
-
function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
2297
|
-
var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
|
|
2298
|
-
if (customizer) {
|
|
2299
|
-
result = object ? customizer(value, key, object, stack) : customizer(value);
|
|
2300
|
-
}
|
|
2301
|
-
if (result !== undefined) {
|
|
2302
|
-
return result;
|
|
2303
|
-
}
|
|
2304
|
-
if (!isObject(value)) {
|
|
2305
|
-
return value;
|
|
2306
|
-
}
|
|
2307
|
-
var isArr = isArray4(value);
|
|
2308
|
-
if (isArr) {
|
|
2309
|
-
result = initCloneArray(value);
|
|
2310
|
-
if (!isDeep) {
|
|
2311
|
-
return copyArray(value, result);
|
|
2312
|
-
}
|
|
2313
|
-
} else {
|
|
2314
|
-
var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
|
|
2315
|
-
if (isBuffer(value)) {
|
|
2316
|
-
return cloneBuffer(value, isDeep);
|
|
2317
|
-
}
|
|
2318
|
-
if (tag == objectTag || tag == argsTag || isFunc && !object) {
|
|
2319
|
-
result = isFlat || isFunc ? {} : initCloneObject(value);
|
|
2320
|
-
if (!isDeep) {
|
|
2321
|
-
return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
|
|
2322
|
-
}
|
|
2323
|
-
} else {
|
|
2324
|
-
if (!cloneableTags[tag]) {
|
|
2325
|
-
return object ? value : {};
|
|
2326
|
-
}
|
|
2327
|
-
result = initCloneByTag(value, tag, isDeep);
|
|
2328
|
-
}
|
|
2329
|
-
}
|
|
2330
|
-
stack || (stack = new Stack);
|
|
2331
|
-
var stacked = stack.get(value);
|
|
2332
|
-
if (stacked) {
|
|
2333
|
-
return stacked;
|
|
2334
|
-
}
|
|
2335
|
-
stack.set(value, result);
|
|
2336
|
-
if (isSet(value)) {
|
|
2337
|
-
value.forEach(function(subValue) {
|
|
2338
|
-
result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
|
2339
|
-
});
|
|
2340
|
-
} else if (isMap(value)) {
|
|
2341
|
-
value.forEach(function(subValue, key2) {
|
|
2342
|
-
result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
|
|
2343
|
-
});
|
|
2344
|
-
}
|
|
2345
|
-
var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
|
|
2346
|
-
var props = isArr ? undefined : keysFunc(value);
|
|
2347
|
-
arrayEach(props || value, function(subValue, key2) {
|
|
2348
|
-
if (props) {
|
|
2349
|
-
key2 = subValue;
|
|
2350
|
-
subValue = value[key2];
|
|
2351
|
-
}
|
|
2352
|
-
assignValue(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
|
|
2353
|
-
});
|
|
2354
|
-
return result;
|
|
2355
|
-
}
|
|
2356
|
-
module.exports = baseClone;
|
|
2357
|
-
});
|
|
2358
|
-
|
|
2359
|
-
// ../../node_modules/lodash/clone.js
|
|
2360
|
-
var require_clone = __commonJS((exports, module) => {
|
|
2361
|
-
var baseClone = require__baseClone();
|
|
2362
|
-
var CLONE_SYMBOLS_FLAG = 4;
|
|
2363
|
-
function clone(value) {
|
|
2364
|
-
return baseClone(value, CLONE_SYMBOLS_FLAG);
|
|
2365
|
-
}
|
|
2366
|
-
module.exports = clone;
|
|
2367
|
-
});
|
|
2368
|
-
|
|
2369
|
-
// ../../node_modules/dot-object/index.js
|
|
2370
|
-
var require_dot_object = __commonJS((exports, module) => {
|
|
2371
|
-
function _process(v, mod) {
|
|
2372
|
-
var i;
|
|
2373
|
-
var r;
|
|
2374
|
-
if (typeof mod === "function") {
|
|
2375
|
-
r = mod(v);
|
|
2376
|
-
if (r !== undefined) {
|
|
2377
|
-
v = r;
|
|
2378
|
-
}
|
|
2379
|
-
} else if (Array.isArray(mod)) {
|
|
2380
|
-
for (i = 0;i < mod.length; i++) {
|
|
2381
|
-
r = mod[i](v);
|
|
2382
|
-
if (r !== undefined) {
|
|
2383
|
-
v = r;
|
|
2384
|
-
}
|
|
2385
|
-
}
|
|
2386
|
-
}
|
|
2387
|
-
return v;
|
|
2388
|
-
}
|
|
2389
|
-
function parseKey(key, val) {
|
|
2390
|
-
if (key[0] === "-" && Array.isArray(val) && /^-\d+$/.test(key)) {
|
|
2391
|
-
return val.length + parseInt(key, 10);
|
|
2392
|
-
}
|
|
2393
|
-
return key;
|
|
2394
|
-
}
|
|
2395
|
-
function isIndex(k) {
|
|
2396
|
-
return /^\d+$/.test(k);
|
|
2397
|
-
}
|
|
2398
|
-
function isObject(val) {
|
|
2399
|
-
return Object.prototype.toString.call(val) === "[object Object]";
|
|
2400
|
-
}
|
|
2401
|
-
function isArrayOrObject(val) {
|
|
2402
|
-
return Object(val) === val;
|
|
2403
|
-
}
|
|
2404
|
-
function isEmptyObject(val) {
|
|
2405
|
-
return Object.keys(val).length === 0;
|
|
2406
|
-
}
|
|
2407
|
-
var blacklist = ["__proto__", "prototype", "constructor"];
|
|
2408
|
-
var blacklistFilter = function(part) {
|
|
2409
|
-
return blacklist.indexOf(part) === -1;
|
|
2410
|
-
};
|
|
2411
|
-
function parsePath(path, sep) {
|
|
2412
|
-
if (path.indexOf("[") >= 0) {
|
|
2413
|
-
path = path.replace(/\[/g, sep).replace(/]/g, "");
|
|
2414
|
-
}
|
|
2415
|
-
var parts = path.split(sep);
|
|
2416
|
-
var check = parts.filter(blacklistFilter);
|
|
2417
|
-
if (check.length !== parts.length) {
|
|
2418
|
-
throw Error("Refusing to update blacklisted property " + path);
|
|
2419
|
-
}
|
|
2420
|
-
return parts;
|
|
2421
|
-
}
|
|
2422
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
2423
|
-
function DotObject(separator, override, useArray, useBrackets) {
|
|
2424
|
-
if (!(this instanceof DotObject)) {
|
|
2425
|
-
return new DotObject(separator, override, useArray, useBrackets);
|
|
2426
|
-
}
|
|
2427
|
-
if (typeof override === "undefined")
|
|
2428
|
-
override = false;
|
|
2429
|
-
if (typeof useArray === "undefined")
|
|
2430
|
-
useArray = true;
|
|
2431
|
-
if (typeof useBrackets === "undefined")
|
|
2432
|
-
useBrackets = true;
|
|
2433
|
-
this.separator = separator || ".";
|
|
2434
|
-
this.override = override;
|
|
2435
|
-
this.useArray = useArray;
|
|
2436
|
-
this.useBrackets = useBrackets;
|
|
2437
|
-
this.keepArray = false;
|
|
2438
|
-
this.cleanup = [];
|
|
2439
|
-
}
|
|
2440
|
-
var dotDefault = new DotObject(".", false, true, true);
|
|
2441
|
-
function wrap(method) {
|
|
2442
|
-
return function() {
|
|
2443
|
-
return dotDefault[method].apply(dotDefault, arguments);
|
|
2444
|
-
};
|
|
2445
|
-
}
|
|
2446
|
-
DotObject.prototype._fill = function(a, obj, v, mod) {
|
|
2447
|
-
var k = a.shift();
|
|
2448
|
-
if (a.length > 0) {
|
|
2449
|
-
obj[k] = obj[k] || (this.useArray && isIndex(a[0]) ? [] : {});
|
|
2450
|
-
if (!isArrayOrObject(obj[k])) {
|
|
2451
|
-
if (this.override) {
|
|
2452
|
-
obj[k] = {};
|
|
2453
|
-
} else {
|
|
2454
|
-
if (!(isArrayOrObject(v) && isEmptyObject(v))) {
|
|
2455
|
-
throw new Error("Trying to redefine `" + k + "` which is a " + typeof obj[k]);
|
|
2456
|
-
}
|
|
2457
|
-
return;
|
|
2458
|
-
}
|
|
2459
|
-
}
|
|
2460
|
-
this._fill(a, obj[k], v, mod);
|
|
2461
|
-
} else {
|
|
2462
|
-
if (!this.override && isArrayOrObject(obj[k]) && !isEmptyObject(obj[k])) {
|
|
2463
|
-
if (!(isArrayOrObject(v) && isEmptyObject(v))) {
|
|
2464
|
-
throw new Error("Trying to redefine non-empty obj['" + k + "']");
|
|
2465
|
-
}
|
|
2466
|
-
return;
|
|
2467
|
-
}
|
|
2468
|
-
obj[k] = _process(v, mod);
|
|
2469
|
-
}
|
|
2470
|
-
};
|
|
2471
|
-
DotObject.prototype.object = function(obj, mods) {
|
|
2472
|
-
var self2 = this;
|
|
2473
|
-
Object.keys(obj).forEach(function(k) {
|
|
2474
|
-
var mod = mods === undefined ? null : mods[k];
|
|
2475
|
-
var ok = parsePath(k, self2.separator).join(self2.separator);
|
|
2476
|
-
if (ok.indexOf(self2.separator) !== -1) {
|
|
2477
|
-
self2._fill(ok.split(self2.separator), obj, obj[k], mod);
|
|
2478
|
-
delete obj[k];
|
|
2479
|
-
} else {
|
|
2480
|
-
obj[k] = _process(obj[k], mod);
|
|
2481
|
-
}
|
|
2482
|
-
});
|
|
2483
|
-
return obj;
|
|
2484
|
-
};
|
|
2485
|
-
DotObject.prototype.str = function(path, v, obj, mod) {
|
|
2486
|
-
var ok = parsePath(path, this.separator).join(this.separator);
|
|
2487
|
-
if (path.indexOf(this.separator) !== -1) {
|
|
2488
|
-
this._fill(ok.split(this.separator), obj, v, mod);
|
|
2489
|
-
} else {
|
|
2490
|
-
obj[path] = _process(v, mod);
|
|
2491
|
-
}
|
|
2492
|
-
return obj;
|
|
2493
|
-
};
|
|
2494
|
-
DotObject.prototype.pick = function(path, obj, remove, reindexArray) {
|
|
2495
|
-
var i;
|
|
2496
|
-
var keys;
|
|
2497
|
-
var val;
|
|
2498
|
-
var key;
|
|
2499
|
-
var cp;
|
|
2500
|
-
keys = parsePath(path, this.separator);
|
|
2501
|
-
for (i = 0;i < keys.length; i++) {
|
|
2502
|
-
key = parseKey(keys[i], obj);
|
|
2503
|
-
if (obj && typeof obj === "object" && key in obj) {
|
|
2504
|
-
if (i === keys.length - 1) {
|
|
2505
|
-
if (remove) {
|
|
2506
|
-
val = obj[key];
|
|
2507
|
-
if (reindexArray && Array.isArray(obj)) {
|
|
2508
|
-
obj.splice(key, 1);
|
|
2509
|
-
} else {
|
|
2510
|
-
delete obj[key];
|
|
2511
|
-
}
|
|
2512
|
-
if (Array.isArray(obj)) {
|
|
2513
|
-
cp = keys.slice(0, -1).join(".");
|
|
2514
|
-
if (this.cleanup.indexOf(cp) === -1) {
|
|
2515
|
-
this.cleanup.push(cp);
|
|
2516
|
-
}
|
|
2517
|
-
}
|
|
2518
|
-
return val;
|
|
2519
|
-
} else {
|
|
2520
|
-
return obj[key];
|
|
2521
|
-
}
|
|
2522
|
-
} else {
|
|
2523
|
-
obj = obj[key];
|
|
2524
|
-
}
|
|
2525
|
-
} else {
|
|
2526
|
-
return;
|
|
2527
|
-
}
|
|
2528
|
-
}
|
|
2529
|
-
if (remove && Array.isArray(obj)) {
|
|
2530
|
-
obj = obj.filter(function(n) {
|
|
2531
|
-
return n !== undefined;
|
|
2532
|
-
});
|
|
2533
|
-
}
|
|
2534
|
-
return obj;
|
|
2535
|
-
};
|
|
2536
|
-
DotObject.prototype.delete = function(path, obj) {
|
|
2537
|
-
return this.remove(path, obj, true);
|
|
2538
|
-
};
|
|
2539
|
-
DotObject.prototype.remove = function(path, obj, reindexArray) {
|
|
2540
|
-
var i;
|
|
2541
|
-
this.cleanup = [];
|
|
2542
|
-
if (Array.isArray(path)) {
|
|
2543
|
-
for (i = 0;i < path.length; i++) {
|
|
2544
|
-
this.pick(path[i], obj, true, reindexArray);
|
|
2545
|
-
}
|
|
2546
|
-
if (!reindexArray) {
|
|
2547
|
-
this._cleanup(obj);
|
|
2548
|
-
}
|
|
2549
|
-
return obj;
|
|
2550
|
-
} else {
|
|
2551
|
-
return this.pick(path, obj, true, reindexArray);
|
|
2552
|
-
}
|
|
2553
|
-
};
|
|
2554
|
-
DotObject.prototype._cleanup = function(obj) {
|
|
2555
|
-
var ret;
|
|
2556
|
-
var i;
|
|
2557
|
-
var keys;
|
|
2558
|
-
var root;
|
|
2559
|
-
if (this.cleanup.length) {
|
|
2560
|
-
for (i = 0;i < this.cleanup.length; i++) {
|
|
2561
|
-
keys = this.cleanup[i].split(".");
|
|
2562
|
-
root = keys.splice(0, -1).join(".");
|
|
2563
|
-
ret = root ? this.pick(root, obj) : obj;
|
|
2564
|
-
ret = ret[keys[0]].filter(function(v) {
|
|
2565
|
-
return v !== undefined;
|
|
2566
|
-
});
|
|
2567
|
-
this.set(this.cleanup[i], ret, obj);
|
|
2568
|
-
}
|
|
2569
|
-
this.cleanup = [];
|
|
2570
|
-
}
|
|
2571
|
-
};
|
|
2572
|
-
DotObject.prototype.del = DotObject.prototype.remove;
|
|
2573
|
-
DotObject.prototype.move = function(source, target, obj, mods, merge) {
|
|
2574
|
-
if (typeof mods === "function" || Array.isArray(mods)) {
|
|
2575
|
-
this.set(target, _process(this.pick(source, obj, true), mods), obj, merge);
|
|
2576
|
-
} else {
|
|
2577
|
-
merge = mods;
|
|
2578
|
-
this.set(target, this.pick(source, obj, true), obj, merge);
|
|
2579
|
-
}
|
|
2580
|
-
return obj;
|
|
2581
|
-
};
|
|
2582
|
-
DotObject.prototype.transfer = function(source, target, obj1, obj2, mods, merge) {
|
|
2583
|
-
if (typeof mods === "function" || Array.isArray(mods)) {
|
|
2584
|
-
this.set(target, _process(this.pick(source, obj1, true), mods), obj2, merge);
|
|
2585
|
-
} else {
|
|
2586
|
-
merge = mods;
|
|
2587
|
-
this.set(target, this.pick(source, obj1, true), obj2, merge);
|
|
2588
|
-
}
|
|
2589
|
-
return obj2;
|
|
2590
|
-
};
|
|
2591
|
-
DotObject.prototype.copy = function(source, target, obj1, obj2, mods, merge) {
|
|
2592
|
-
if (typeof mods === "function" || Array.isArray(mods)) {
|
|
2593
|
-
this.set(target, _process(JSON.parse(JSON.stringify(this.pick(source, obj1, false))), mods), obj2, merge);
|
|
2594
|
-
} else {
|
|
2595
|
-
merge = mods;
|
|
2596
|
-
this.set(target, this.pick(source, obj1, false), obj2, merge);
|
|
2597
|
-
}
|
|
2598
|
-
return obj2;
|
|
2599
|
-
};
|
|
2600
|
-
DotObject.prototype.set = function(path, val, obj, merge) {
|
|
2601
|
-
var i;
|
|
2602
|
-
var k;
|
|
2603
|
-
var keys;
|
|
2604
|
-
var key;
|
|
2605
|
-
if (typeof val === "undefined") {
|
|
2606
|
-
return obj;
|
|
2607
|
-
}
|
|
2608
|
-
keys = parsePath(path, this.separator);
|
|
2609
|
-
for (i = 0;i < keys.length; i++) {
|
|
2610
|
-
key = keys[i];
|
|
2611
|
-
if (i === keys.length - 1) {
|
|
2612
|
-
if (merge && isObject(val) && isObject(obj[key])) {
|
|
2613
|
-
for (k in val) {
|
|
2614
|
-
if (hasOwnProperty.call(val, k)) {
|
|
2615
|
-
obj[key][k] = val[k];
|
|
2616
|
-
}
|
|
2617
|
-
}
|
|
2618
|
-
} else if (merge && Array.isArray(obj[key]) && Array.isArray(val)) {
|
|
2619
|
-
for (var j = 0;j < val.length; j++) {
|
|
2620
|
-
obj[keys[i]].push(val[j]);
|
|
2621
|
-
}
|
|
2622
|
-
} else {
|
|
2623
|
-
obj[key] = val;
|
|
2624
|
-
}
|
|
2625
|
-
} else if (!hasOwnProperty.call(obj, key) || !isObject(obj[key]) && !Array.isArray(obj[key])) {
|
|
2626
|
-
if (/^\d+$/.test(keys[i + 1])) {
|
|
2627
|
-
obj[key] = [];
|
|
2628
|
-
} else {
|
|
2629
|
-
obj[key] = {};
|
|
2630
|
-
}
|
|
2631
|
-
}
|
|
2632
|
-
obj = obj[key];
|
|
2633
|
-
}
|
|
2634
|
-
return obj;
|
|
2635
|
-
};
|
|
2636
|
-
DotObject.prototype.transform = function(recipe, obj, tgt) {
|
|
2637
|
-
obj = obj || {};
|
|
2638
|
-
tgt = tgt || {};
|
|
2639
|
-
Object.keys(recipe).forEach(function(key) {
|
|
2640
|
-
this.set(recipe[key], this.pick(key, obj), tgt);
|
|
2641
|
-
}.bind(this));
|
|
2642
|
-
return tgt;
|
|
2643
|
-
};
|
|
2644
|
-
DotObject.prototype.dot = function(obj, tgt, path) {
|
|
2645
|
-
tgt = tgt || {};
|
|
2646
|
-
path = path || [];
|
|
2647
|
-
var isArray5 = Array.isArray(obj);
|
|
2648
|
-
Object.keys(obj).forEach(function(key) {
|
|
2649
|
-
var index = isArray5 && this.useBrackets ? "[" + key + "]" : key;
|
|
2650
|
-
if (isArrayOrObject(obj[key]) && (isObject(obj[key]) && !isEmptyObject(obj[key]) || Array.isArray(obj[key]) && !this.keepArray && obj[key].length !== 0)) {
|
|
2651
|
-
if (isArray5 && this.useBrackets) {
|
|
2652
|
-
var previousKey = path[path.length - 1] || "";
|
|
2653
|
-
return this.dot(obj[key], tgt, path.slice(0, -1).concat(previousKey + index));
|
|
2654
|
-
} else {
|
|
2655
|
-
return this.dot(obj[key], tgt, path.concat(index));
|
|
2656
|
-
}
|
|
2657
|
-
} else {
|
|
2658
|
-
if (isArray5 && this.useBrackets) {
|
|
2659
|
-
tgt[path.join(this.separator).concat("[" + key + "]")] = obj[key];
|
|
2660
|
-
} else {
|
|
2661
|
-
tgt[path.concat(index).join(this.separator)] = obj[key];
|
|
2662
|
-
}
|
|
2663
|
-
}
|
|
2664
|
-
}.bind(this));
|
|
2665
|
-
return tgt;
|
|
2666
|
-
};
|
|
2667
|
-
DotObject.pick = wrap("pick");
|
|
2668
|
-
DotObject.move = wrap("move");
|
|
2669
|
-
DotObject.transfer = wrap("transfer");
|
|
2670
|
-
DotObject.transform = wrap("transform");
|
|
2671
|
-
DotObject.copy = wrap("copy");
|
|
2672
|
-
DotObject.object = wrap("object");
|
|
2673
|
-
DotObject.str = wrap("str");
|
|
2674
|
-
DotObject.set = wrap("set");
|
|
2675
|
-
DotObject.delete = wrap("delete");
|
|
2676
|
-
DotObject.del = DotObject.remove = wrap("remove");
|
|
2677
|
-
DotObject.dot = wrap("dot");
|
|
2678
|
-
["override", "overwrite"].forEach(function(prop) {
|
|
2679
|
-
Object.defineProperty(DotObject, prop, {
|
|
2680
|
-
get: function() {
|
|
2681
|
-
return dotDefault.override;
|
|
2682
|
-
},
|
|
2683
|
-
set: function(val) {
|
|
2684
|
-
dotDefault.override = !!val;
|
|
2685
|
-
}
|
|
2686
|
-
});
|
|
2687
|
-
});
|
|
2688
|
-
["useArray", "keepArray", "useBrackets"].forEach(function(prop) {
|
|
2689
|
-
Object.defineProperty(DotObject, prop, {
|
|
2690
|
-
get: function() {
|
|
2691
|
-
return dotDefault[prop];
|
|
2692
|
-
},
|
|
2693
|
-
set: function(val) {
|
|
2694
|
-
dotDefault[prop] = val;
|
|
2695
|
-
}
|
|
2696
|
-
});
|
|
2697
|
-
});
|
|
2698
|
-
DotObject._process = _process;
|
|
2699
|
-
module.exports = DotObject;
|
|
2700
|
-
});
|
|
2701
|
-
|
|
2702
|
-
// ../../node_modules/lodash/isUndefined.js
|
|
2703
|
-
var require_isUndefined = __commonJS((exports, module) => {
|
|
2704
|
-
function isUndefined(value) {
|
|
2705
|
-
return value === undefined;
|
|
2706
|
-
}
|
|
2707
|
-
module.exports = isUndefined;
|
|
2708
|
-
});
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
2709
3
|
|
|
2710
4
|
// src/ValidationError.ts
|
|
2711
|
-
|
|
2712
|
-
var getPrintableError = (validationErrors) => {
|
|
5
|
+
import isPlainObject from "lodash/isPlainObject";
|
|
6
|
+
var getPrintableError = /* @__PURE__ */ __name((validationErrors) => {
|
|
2713
7
|
const printableErrors = Object.keys(validationErrors).map((key) => {
|
|
2714
8
|
return `${key}: ${validationErrors[key]}`;
|
|
2715
9
|
}).join(", ");
|
|
2716
10
|
const message = `Validation Error: {${printableErrors}}`;
|
|
2717
11
|
return message;
|
|
2718
|
-
};
|
|
2719
|
-
|
|
2720
|
-
class ValidationError extends Error {
|
|
12
|
+
}, "getPrintableError");
|
|
13
|
+
var _ValidationError = class _ValidationError extends Error {
|
|
2721
14
|
code;
|
|
2722
15
|
isValidationError;
|
|
2723
16
|
isOrionError;
|
|
2724
17
|
validationErrors;
|
|
2725
18
|
constructor(validationErrors) {
|
|
2726
19
|
super(getPrintableError(validationErrors));
|
|
2727
|
-
if (!
|
|
20
|
+
if (!isPlainObject(validationErrors)) {
|
|
2728
21
|
throw new Error("ValidationError must be initialized with an errors object");
|
|
2729
22
|
}
|
|
2730
23
|
Error.captureStackTrace(this, this.constructor);
|
|
@@ -2734,89 +27,84 @@ class ValidationError extends Error {
|
|
|
2734
27
|
this.validationErrors = validationErrors;
|
|
2735
28
|
this.getInfo;
|
|
2736
29
|
}
|
|
2737
|
-
getInfo = () => {
|
|
30
|
+
getInfo = /* @__PURE__ */ __name(() => {
|
|
2738
31
|
return {
|
|
2739
32
|
error: "validationError",
|
|
2740
33
|
message: "Validation Error",
|
|
2741
34
|
validationErrors: this.validationErrors
|
|
2742
35
|
};
|
|
2743
|
-
};
|
|
2744
|
-
prependKey = (prepend) => {
|
|
36
|
+
}, "getInfo");
|
|
37
|
+
prependKey = /* @__PURE__ */ __name((prepend) => {
|
|
2745
38
|
const newErrors = {};
|
|
2746
39
|
const keys = Object.keys(this.validationErrors);
|
|
2747
40
|
for (const key of keys) {
|
|
2748
41
|
newErrors[`${prepend}.${key}`] = this.validationErrors[key];
|
|
2749
42
|
}
|
|
2750
|
-
return new
|
|
2751
|
-
};
|
|
2752
|
-
}
|
|
43
|
+
return new _ValidationError(newErrors);
|
|
44
|
+
}, "prependKey");
|
|
45
|
+
};
|
|
46
|
+
__name(_ValidationError, "ValidationError");
|
|
47
|
+
var ValidationError = _ValidationError;
|
|
2753
48
|
|
|
2754
49
|
// src/getValidationErrors/convertTypedModel.ts
|
|
2755
50
|
function isClass(obj) {
|
|
2756
51
|
const isCtorClass = obj.constructor && obj.constructor.toString().substring(0, 5) === "class";
|
|
2757
|
-
if (obj.prototype ===
|
|
52
|
+
if (obj.prototype === void 0) {
|
|
2758
53
|
return isCtorClass;
|
|
2759
54
|
}
|
|
2760
55
|
const isPrototypeCtorClass = obj.prototype.constructor && obj.prototype.constructor.toString && obj.prototype.constructor.toString().substring(0, 5) === "class";
|
|
2761
56
|
return isCtorClass || isPrototypeCtorClass;
|
|
2762
57
|
}
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
58
|
+
__name(isClass, "isClass");
|
|
59
|
+
var convertOnParam = /* @__PURE__ */ __name((info, paramName) => {
|
|
60
|
+
if (!info[paramName]) return;
|
|
2766
61
|
const type = info[paramName].type;
|
|
2767
|
-
if (!type)
|
|
2768
|
-
|
|
2769
|
-
if (
|
|
2770
|
-
|
|
2771
|
-
if (!isClass(type))
|
|
2772
|
-
return;
|
|
2773
|
-
if (!type.getModel || !type.__schemaId)
|
|
2774
|
-
return;
|
|
62
|
+
if (!type) return;
|
|
63
|
+
if (typeof type !== "function") return;
|
|
64
|
+
if (!isClass(type)) return;
|
|
65
|
+
if (!type.getModel || !type.__schemaId) return;
|
|
2775
66
|
info[paramName].type = type.getModel().getCleanSchema();
|
|
2776
|
-
};
|
|
2777
|
-
var convertTypedModel = (info) => {
|
|
67
|
+
}, "convertOnParam");
|
|
68
|
+
var convertTypedModel = /* @__PURE__ */ __name((info) => {
|
|
2778
69
|
convertOnParam(info, "schema");
|
|
2779
70
|
convertOnParam(info, "currentSchema");
|
|
2780
|
-
};
|
|
71
|
+
}, "convertTypedModel");
|
|
2781
72
|
|
|
2782
73
|
// src/getSchemaFromTypedModel.ts
|
|
2783
|
-
var getSchemaFromTypedModel = (schema) => {
|
|
74
|
+
var getSchemaFromTypedModel = /* @__PURE__ */ __name((schema) => {
|
|
2784
75
|
const item = schema;
|
|
2785
|
-
if (typeof item !== "function")
|
|
2786
|
-
|
|
2787
|
-
if (!
|
|
2788
|
-
return item;
|
|
2789
|
-
if (!item.getModel || !item.__schemaId)
|
|
2790
|
-
return item;
|
|
76
|
+
if (typeof item !== "function") return item;
|
|
77
|
+
if (!isClass(item)) return item;
|
|
78
|
+
if (!item.getModel || !item.__schemaId) return item;
|
|
2791
79
|
return item.getModel().getCleanSchema();
|
|
2792
|
-
};
|
|
80
|
+
}, "getSchemaFromTypedModel");
|
|
2793
81
|
|
|
2794
82
|
// src/getValidationErrors/getError/index.ts
|
|
2795
|
-
|
|
83
|
+
import isNil2 from "lodash/isNil";
|
|
2796
84
|
|
|
2797
85
|
// src/getValidationErrors/getError/getFieldValidator.ts
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
86
|
+
import isPlainObject4 from "lodash/isPlainObject";
|
|
87
|
+
import isArray3 from "lodash/isArray";
|
|
88
|
+
import isString5 from "lodash/isString";
|
|
2801
89
|
|
|
2802
90
|
// src/fieldType.ts
|
|
2803
91
|
function fieldType(opts) {
|
|
2804
|
-
const { name, validate, clean, ...otherFields } = opts;
|
|
2805
|
-
const overwrittenValidate = (value, info = {}) => {
|
|
92
|
+
const { name, validate: validate2, clean: clean3, ...otherFields } = opts;
|
|
93
|
+
const overwrittenValidate = /* @__PURE__ */ __name((value, info = {}) => {
|
|
2806
94
|
if (!info.currentSchema) {
|
|
2807
95
|
info.currentSchema = {};
|
|
2808
96
|
}
|
|
2809
|
-
return
|
|
2810
|
-
};
|
|
2811
|
-
const overwrittenClean = (value, info = {}) => {
|
|
97
|
+
return validate2(value, info);
|
|
98
|
+
}, "overwrittenValidate");
|
|
99
|
+
const overwrittenClean = /* @__PURE__ */ __name((value, info = {}) => {
|
|
2812
100
|
if (!info.options) {
|
|
2813
101
|
info.options = {};
|
|
2814
102
|
}
|
|
2815
|
-
if (
|
|
2816
|
-
return
|
|
103
|
+
if (clean3) {
|
|
104
|
+
return clean3(value, info);
|
|
2817
105
|
}
|
|
2818
106
|
return value;
|
|
2819
|
-
};
|
|
107
|
+
}, "overwrittenClean");
|
|
2820
108
|
return {
|
|
2821
109
|
...otherFields,
|
|
2822
110
|
name,
|
|
@@ -2825,9 +113,10 @@ function fieldType(opts) {
|
|
|
2825
113
|
_isFieldType: true
|
|
2826
114
|
};
|
|
2827
115
|
}
|
|
116
|
+
__name(fieldType, "fieldType");
|
|
2828
117
|
|
|
2829
118
|
// src/fieldTypes/array.ts
|
|
2830
|
-
|
|
119
|
+
import isArray from "lodash/isArray";
|
|
2831
120
|
|
|
2832
121
|
// src/Errors.ts
|
|
2833
122
|
var Errors_default = {
|
|
@@ -2855,13 +144,14 @@ var Errors_default = {
|
|
|
2855
144
|
var array_default = fieldType({
|
|
2856
145
|
name: "array",
|
|
2857
146
|
validate(value) {
|
|
2858
|
-
if (!
|
|
2859
|
-
return Errors_default.NOT_AN_ARRAY;
|
|
147
|
+
if (!isArray(value)) return Errors_default.NOT_AN_ARRAY;
|
|
2860
148
|
},
|
|
2861
149
|
clean(value, { options }) {
|
|
2862
150
|
if (options.autoConvert) {
|
|
2863
|
-
if (!
|
|
2864
|
-
value = [
|
|
151
|
+
if (!isArray(value)) {
|
|
152
|
+
value = [
|
|
153
|
+
value
|
|
154
|
+
];
|
|
2865
155
|
}
|
|
2866
156
|
}
|
|
2867
157
|
return value;
|
|
@@ -2869,21 +159,19 @@ var array_default = fieldType({
|
|
|
2869
159
|
});
|
|
2870
160
|
|
|
2871
161
|
// src/fieldTypes/plainObject.ts
|
|
2872
|
-
|
|
2873
|
-
|
|
162
|
+
import isPlainObject2 from "lodash/isPlainObject";
|
|
163
|
+
import difference from "lodash/difference";
|
|
2874
164
|
var plainObject_default = fieldType({
|
|
2875
165
|
name: "plainObject",
|
|
2876
166
|
validate(value) {
|
|
2877
|
-
if (!
|
|
2878
|
-
return Errors_default.NOT_AN_OBJECT;
|
|
167
|
+
if (!isPlainObject2(value)) return Errors_default.NOT_AN_OBJECT;
|
|
2879
168
|
},
|
|
2880
169
|
clean(value, { type, options }) {
|
|
2881
|
-
if (!
|
|
2882
|
-
return value;
|
|
170
|
+
if (!isPlainObject2(value)) return value;
|
|
2883
171
|
if (options.filter) {
|
|
2884
172
|
const documentKeys = Object.keys(value);
|
|
2885
173
|
const schemaKeys = Object.keys(type);
|
|
2886
|
-
const notInSchemaKeys =
|
|
174
|
+
const notInSchemaKeys = difference(documentKeys, schemaKeys);
|
|
2887
175
|
for (const key of notInSchemaKeys) {
|
|
2888
176
|
delete value[key];
|
|
2889
177
|
}
|
|
@@ -2893,14 +181,13 @@ var plainObject_default = fieldType({
|
|
|
2893
181
|
});
|
|
2894
182
|
|
|
2895
183
|
// src/fieldTypes/string.ts
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
184
|
+
import isString from "lodash/isString";
|
|
185
|
+
import includes from "lodash/includes";
|
|
186
|
+
import isArray2 from "lodash/isArray";
|
|
2899
187
|
var string_default = fieldType({
|
|
2900
188
|
name: "string",
|
|
2901
189
|
validate(value, { currentSchema }) {
|
|
2902
|
-
if (!
|
|
2903
|
-
return Errors_default.NOT_A_STRING;
|
|
190
|
+
if (!isString(value)) return Errors_default.NOT_A_STRING;
|
|
2904
191
|
if (isFinite(currentSchema.min)) {
|
|
2905
192
|
if (value.length < currentSchema.min) {
|
|
2906
193
|
return Errors_default.STRING_TOO_SHORT;
|
|
@@ -2911,8 +198,8 @@ var string_default = fieldType({
|
|
|
2911
198
|
return Errors_default.STRING_TOO_LONG;
|
|
2912
199
|
}
|
|
2913
200
|
}
|
|
2914
|
-
if (
|
|
2915
|
-
if (!
|
|
201
|
+
if (isArray2(currentSchema.allowedValues)) {
|
|
202
|
+
if (!includes(currentSchema.allowedValues, value)) {
|
|
2916
203
|
return Errors_default.NOT_AN_ALLOWED_VALUE;
|
|
2917
204
|
}
|
|
2918
205
|
}
|
|
@@ -2928,31 +215,30 @@ var string_default = fieldType({
|
|
|
2928
215
|
value = value.trim();
|
|
2929
216
|
}
|
|
2930
217
|
if (removeEmptyStrings && value === "") {
|
|
2931
|
-
return;
|
|
218
|
+
return void 0;
|
|
2932
219
|
}
|
|
2933
220
|
return value;
|
|
2934
221
|
}
|
|
2935
222
|
});
|
|
2936
223
|
|
|
2937
224
|
// src/fieldTypes/date.ts
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
225
|
+
import isDate from "lodash/isDate";
|
|
226
|
+
import isString2 from "lodash/isString";
|
|
227
|
+
import isNumber from "lodash/isNumber";
|
|
2941
228
|
var date_default = fieldType({
|
|
2942
229
|
name: "date",
|
|
2943
230
|
validate(value) {
|
|
2944
|
-
if (!
|
|
2945
|
-
return Errors_default.NOT_A_DATE;
|
|
231
|
+
if (!isDate(value)) return Errors_default.NOT_A_DATE;
|
|
2946
232
|
},
|
|
2947
233
|
clean(value, { options }) {
|
|
2948
234
|
if (options.autoConvert) {
|
|
2949
|
-
if (
|
|
235
|
+
if (isString2(value)) {
|
|
2950
236
|
const result = new Date(value);
|
|
2951
237
|
if (isNaN(result.getTime())) {
|
|
2952
238
|
return value;
|
|
2953
239
|
}
|
|
2954
240
|
value = result;
|
|
2955
|
-
} else if (
|
|
241
|
+
} else if (isNumber(value)) {
|
|
2956
242
|
const result = new Date(value);
|
|
2957
243
|
if (isNaN(result.getTime())) {
|
|
2958
244
|
return value;
|
|
@@ -2965,22 +251,21 @@ var date_default = fieldType({
|
|
|
2965
251
|
});
|
|
2966
252
|
|
|
2967
253
|
// src/fieldTypes/integer.ts
|
|
2968
|
-
|
|
254
|
+
import isInteger from "lodash/isInteger";
|
|
2969
255
|
|
|
2970
256
|
// src/fieldTypes/number.ts
|
|
2971
|
-
|
|
2972
|
-
|
|
257
|
+
import isFinite2 from "lodash/isFinite";
|
|
258
|
+
import toNumber from "lodash/toNumber";
|
|
2973
259
|
var number_default = fieldType({
|
|
2974
260
|
name: "number",
|
|
2975
261
|
validate(value, { currentSchema }) {
|
|
2976
|
-
if (!
|
|
2977
|
-
|
|
2978
|
-
if (import_isFinite.default(currentSchema.min)) {
|
|
262
|
+
if (!isFinite2(value)) return Errors_default.NOT_A_NUMBER;
|
|
263
|
+
if (isFinite2(currentSchema.min)) {
|
|
2979
264
|
if (value < currentSchema.min) {
|
|
2980
265
|
return Errors_default.NUMBER_TOO_SMALL;
|
|
2981
266
|
}
|
|
2982
267
|
}
|
|
2983
|
-
if (
|
|
268
|
+
if (isFinite2(currentSchema.max)) {
|
|
2984
269
|
if (value > currentSchema.max) {
|
|
2985
270
|
return Errors_default.NUMBER_TOO_BIG;
|
|
2986
271
|
}
|
|
@@ -2988,7 +273,7 @@ var number_default = fieldType({
|
|
|
2988
273
|
},
|
|
2989
274
|
clean(value, { options: { autoConvert } }) {
|
|
2990
275
|
if (typeof value === "string" && autoConvert) {
|
|
2991
|
-
value =
|
|
276
|
+
value = toNumber(value);
|
|
2992
277
|
}
|
|
2993
278
|
return value;
|
|
2994
279
|
}
|
|
@@ -2998,43 +283,39 @@ var number_default = fieldType({
|
|
|
2998
283
|
var integer_default = fieldType({
|
|
2999
284
|
name: "integer",
|
|
3000
285
|
validate(value, info) {
|
|
3001
|
-
if (!
|
|
3002
|
-
return Errors_default.NOT_AN_INTEGER;
|
|
286
|
+
if (!isInteger(value)) return Errors_default.NOT_AN_INTEGER;
|
|
3003
287
|
return number_default.validate(value, info);
|
|
3004
288
|
}
|
|
3005
289
|
});
|
|
3006
290
|
|
|
3007
291
|
// src/fieldTypes/ID.ts
|
|
3008
|
-
|
|
3009
|
-
|
|
292
|
+
import isString3 from "lodash/isString";
|
|
293
|
+
import isInteger2 from "lodash/isInteger";
|
|
3010
294
|
var ID_default = fieldType({
|
|
3011
295
|
name: "ID",
|
|
3012
296
|
validate(value) {
|
|
3013
|
-
if (!
|
|
3014
|
-
return Errors_default.NOT_AN_ID;
|
|
297
|
+
if (!isString3(value) && !isInteger2(value)) return Errors_default.NOT_AN_ID;
|
|
3015
298
|
},
|
|
3016
299
|
clean(value, { options }) {
|
|
3017
|
-
if (!
|
|
3018
|
-
return value;
|
|
300
|
+
if (!isString3(value) && !isInteger2(value)) return value;
|
|
3019
301
|
const { trimStrings, removeEmptyStrings } = options;
|
|
3020
302
|
value = String(value);
|
|
3021
303
|
if (trimStrings) {
|
|
3022
304
|
value = value.trim();
|
|
3023
305
|
}
|
|
3024
306
|
if (removeEmptyStrings && value === "") {
|
|
3025
|
-
return;
|
|
307
|
+
return void 0;
|
|
3026
308
|
}
|
|
3027
309
|
return value;
|
|
3028
310
|
}
|
|
3029
311
|
});
|
|
3030
312
|
|
|
3031
313
|
// src/fieldTypes/boolean.ts
|
|
3032
|
-
|
|
314
|
+
import isBoolean from "lodash/isBoolean";
|
|
3033
315
|
var boolean_default = fieldType({
|
|
3034
316
|
name: "boolean",
|
|
3035
317
|
validate(value) {
|
|
3036
|
-
if (!
|
|
3037
|
-
return Errors_default.NOT_A_BOOLEAN;
|
|
318
|
+
if (!isBoolean(value)) return Errors_default.NOT_A_BOOLEAN;
|
|
3038
319
|
},
|
|
3039
320
|
clean(value, { options }) {
|
|
3040
321
|
if (options.autoConvert) {
|
|
@@ -3059,19 +340,17 @@ var boolean_default = fieldType({
|
|
|
3059
340
|
});
|
|
3060
341
|
|
|
3061
342
|
// src/fieldTypes/email.ts
|
|
3062
|
-
|
|
3063
|
-
|
|
343
|
+
import isString4 from "lodash/isString";
|
|
344
|
+
import isNil from "lodash/isNil";
|
|
3064
345
|
var email_default = fieldType({
|
|
3065
346
|
name: "email",
|
|
3066
347
|
validate(value, { currentSchema }) {
|
|
3067
|
-
if ((value === "" ||
|
|
348
|
+
if ((value === "" || isNil(value)) && !currentSchema.optional) {
|
|
3068
349
|
return Errors_default.REQUIRED;
|
|
3069
350
|
}
|
|
3070
|
-
if (value && !
|
|
3071
|
-
return Errors_default.NOT_A_STRING;
|
|
351
|
+
if (value && !isString4(value)) return Errors_default.NOT_A_STRING;
|
|
3072
352
|
const regex = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
3073
|
-
if (value && !regex.test(value))
|
|
3074
|
-
return Errors_default.NOT_AN_EMAIL;
|
|
353
|
+
if (value && !regex.test(value)) return Errors_default.NOT_AN_EMAIL;
|
|
3075
354
|
},
|
|
3076
355
|
clean(value) {
|
|
3077
356
|
if (typeof value === "string") {
|
|
@@ -3082,12 +361,11 @@ var email_default = fieldType({
|
|
|
3082
361
|
});
|
|
3083
362
|
|
|
3084
363
|
// src/fieldTypes/blackbox.ts
|
|
3085
|
-
|
|
364
|
+
import isPlainObject3 from "lodash/isPlainObject";
|
|
3086
365
|
var blackbox_default = fieldType({
|
|
3087
366
|
name: "blackbox",
|
|
3088
367
|
validate(value) {
|
|
3089
|
-
if (!
|
|
3090
|
-
return Errors_default.NOT_AN_OBJECT;
|
|
368
|
+
if (!isPlainObject3(value)) return Errors_default.NOT_AN_OBJECT;
|
|
3091
369
|
}
|
|
3092
370
|
});
|
|
3093
371
|
|
|
@@ -3114,40 +392,41 @@ var fieldTypes_default = {
|
|
|
3114
392
|
};
|
|
3115
393
|
|
|
3116
394
|
// src/getValidationErrors/getError/getFieldValidator.ts
|
|
3117
|
-
|
|
395
|
+
import has from "lodash/has";
|
|
3118
396
|
function getFieldValidator_default(type) {
|
|
3119
|
-
if (
|
|
3120
|
-
if (type._isFieldType)
|
|
3121
|
-
return "custom";
|
|
397
|
+
if (isPlainObject4(type)) {
|
|
398
|
+
if (type._isFieldType) return "custom";
|
|
3122
399
|
return "plainObject";
|
|
3123
400
|
}
|
|
3124
|
-
if (
|
|
3125
|
-
|
|
3126
|
-
if (type ===
|
|
3127
|
-
|
|
3128
|
-
if (type ===
|
|
3129
|
-
|
|
3130
|
-
if (type
|
|
3131
|
-
return "number";
|
|
3132
|
-
if (type === Boolean)
|
|
3133
|
-
return "boolean";
|
|
3134
|
-
if (type === "enum")
|
|
3135
|
-
return "string";
|
|
3136
|
-
if (!import_isString5.default(type)) {
|
|
401
|
+
if (isArray3(type)) return "array";
|
|
402
|
+
if (type === String) return "string";
|
|
403
|
+
if (type === Date) return "date";
|
|
404
|
+
if (type === Number) return "number";
|
|
405
|
+
if (type === Boolean) return "boolean";
|
|
406
|
+
if (type === "enum") return "string";
|
|
407
|
+
if (!isString5(type)) {
|
|
3137
408
|
throw new Error("Field type is invalid. Pass a string or a custom field type. Got " + type);
|
|
3138
409
|
}
|
|
3139
|
-
const exists =
|
|
410
|
+
const exists = has(fieldTypes_default, type);
|
|
3140
411
|
if (!exists) {
|
|
3141
412
|
throw new Error("Field type does not exist");
|
|
3142
413
|
}
|
|
3143
414
|
return type;
|
|
3144
415
|
}
|
|
416
|
+
__name(getFieldValidator_default, "default");
|
|
3145
417
|
|
|
3146
418
|
// src/getValidationErrors/getError/index.ts
|
|
3147
419
|
async function getValidationErrors(params) {
|
|
3148
420
|
const { schema, doc, currentDoc, value, currentSchema, keys, options = {}, args = [] } = params;
|
|
3149
|
-
const info = {
|
|
3150
|
-
|
|
421
|
+
const info = {
|
|
422
|
+
schema,
|
|
423
|
+
doc,
|
|
424
|
+
currentDoc,
|
|
425
|
+
keys,
|
|
426
|
+
currentSchema,
|
|
427
|
+
options
|
|
428
|
+
};
|
|
429
|
+
if (isNil2(value)) {
|
|
3151
430
|
if (!currentSchema.optional && !options.omitRequired) {
|
|
3152
431
|
return Errors_default.REQUIRED;
|
|
3153
432
|
}
|
|
@@ -3159,8 +438,7 @@ async function getValidationErrors(params) {
|
|
|
3159
438
|
return error;
|
|
3160
439
|
}
|
|
3161
440
|
}
|
|
3162
|
-
if (currentSchema.custom)
|
|
3163
|
-
currentSchema.validate = currentSchema.custom;
|
|
441
|
+
if (currentSchema.custom) currentSchema.validate = currentSchema.custom;
|
|
3164
442
|
if (currentSchema.validate) {
|
|
3165
443
|
const customError = await currentSchema.validate(value, info, ...args);
|
|
3166
444
|
if (customError) {
|
|
@@ -3176,25 +454,35 @@ async function getValidationErrors(params) {
|
|
|
3176
454
|
}
|
|
3177
455
|
return null;
|
|
3178
456
|
}
|
|
457
|
+
__name(getValidationErrors, "getValidationErrors");
|
|
3179
458
|
|
|
3180
459
|
// src/getValidationErrors/doValidation.ts
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
460
|
+
import isPlainObject5 from "lodash/isPlainObject";
|
|
461
|
+
import isArray4 from "lodash/isArray";
|
|
462
|
+
import clone from "lodash/clone";
|
|
463
|
+
import isNil3 from "lodash/isNil";
|
|
464
|
+
import difference2 from "lodash/difference";
|
|
3186
465
|
async function doValidation(params) {
|
|
3187
466
|
convertTypedModel(params);
|
|
3188
467
|
const { schema, doc, currentDoc, value, currentSchema, keys = [], addError, options, args } = params;
|
|
3189
|
-
const info = {
|
|
468
|
+
const info = {
|
|
469
|
+
schema,
|
|
470
|
+
doc,
|
|
471
|
+
currentDoc,
|
|
472
|
+
value,
|
|
473
|
+
currentSchema,
|
|
474
|
+
keys,
|
|
475
|
+
options,
|
|
476
|
+
args,
|
|
477
|
+
addError
|
|
478
|
+
};
|
|
3190
479
|
const error = await getValidationErrors(info);
|
|
3191
480
|
if (error) {
|
|
3192
481
|
addError(keys, error);
|
|
3193
482
|
return;
|
|
3194
483
|
}
|
|
3195
|
-
if (
|
|
3196
|
-
|
|
3197
|
-
if (import_isPlainObject5.default(currentSchema.type)) {
|
|
484
|
+
if (isNil3(value)) return;
|
|
485
|
+
if (isPlainObject5(currentSchema.type)) {
|
|
3198
486
|
const type = currentSchema.type;
|
|
3199
487
|
if (type) {
|
|
3200
488
|
if (type._isFieldType) {
|
|
@@ -3210,7 +498,7 @@ async function doValidation(params) {
|
|
|
3210
498
|
for (const key of schemaKeys) {
|
|
3211
499
|
const itemSchema = currentSchema.type[key];
|
|
3212
500
|
const itemValue = value[key];
|
|
3213
|
-
const keyItemKeys =
|
|
501
|
+
const keyItemKeys = clone(keys);
|
|
3214
502
|
keyItemKeys.push(key);
|
|
3215
503
|
await doValidation({
|
|
3216
504
|
...info,
|
|
@@ -3221,41 +509,44 @@ async function doValidation(params) {
|
|
|
3221
509
|
});
|
|
3222
510
|
}
|
|
3223
511
|
const documentKeys = Object.keys(value);
|
|
3224
|
-
const notInSchemaKeys =
|
|
512
|
+
const notInSchemaKeys = difference2(documentKeys, schemaKeys);
|
|
3225
513
|
for (const key of notInSchemaKeys) {
|
|
3226
|
-
const keyItemKeys =
|
|
514
|
+
const keyItemKeys = clone(keys);
|
|
3227
515
|
keyItemKeys.push(key);
|
|
3228
516
|
addError(keyItemKeys, Errors_default.NOT_IN_SCHEMA);
|
|
3229
517
|
}
|
|
3230
|
-
} else if (
|
|
518
|
+
} else if (isArray4(currentSchema.type)) {
|
|
3231
519
|
const itemSchema = currentSchema.type[0];
|
|
3232
|
-
for (let i = 0;i < value.length; i++) {
|
|
520
|
+
for (let i = 0; i < value.length; i++) {
|
|
3233
521
|
const itemValue = value[i];
|
|
3234
|
-
const keyItemKeys =
|
|
522
|
+
const keyItemKeys = clone(keys);
|
|
3235
523
|
keyItemKeys.push(i.toString());
|
|
3236
524
|
await doValidation({
|
|
3237
525
|
...info,
|
|
3238
526
|
currentDoc: value,
|
|
3239
527
|
value: itemValue,
|
|
3240
|
-
currentSchema: {
|
|
528
|
+
currentSchema: {
|
|
529
|
+
type: itemSchema
|
|
530
|
+
},
|
|
3241
531
|
keys: keyItemKeys
|
|
3242
532
|
});
|
|
3243
533
|
}
|
|
3244
534
|
}
|
|
3245
535
|
}
|
|
536
|
+
__name(doValidation, "doValidation");
|
|
3246
537
|
|
|
3247
538
|
// src/getValidationErrors/getValidationErrorsObject.ts
|
|
3248
|
-
|
|
3249
|
-
var dot = new
|
|
539
|
+
import Dot from "dot-object";
|
|
540
|
+
var dot = new Dot(".", false, true, false);
|
|
3250
541
|
function getValidationErrorsObject(validationErrors) {
|
|
3251
|
-
if (validationErrors.length === 0)
|
|
3252
|
-
return null;
|
|
542
|
+
if (validationErrors.length === 0) return null;
|
|
3253
543
|
const errors = {};
|
|
3254
544
|
for (const validationError of validationErrors) {
|
|
3255
545
|
errors[validationError.key] = validationError.code;
|
|
3256
546
|
}
|
|
3257
547
|
return dot.dot(errors);
|
|
3258
548
|
}
|
|
549
|
+
__name(getValidationErrorsObject, "getValidationErrorsObject");
|
|
3259
550
|
|
|
3260
551
|
// src/getValidationErrors/index.ts
|
|
3261
552
|
var defaultOptions = {
|
|
@@ -3263,26 +554,32 @@ var defaultOptions = {
|
|
|
3263
554
|
};
|
|
3264
555
|
async function getValidationErrors2(schema, doc, passedOptions = {}, ...args) {
|
|
3265
556
|
schema = getSchemaFromTypedModel(schema);
|
|
3266
|
-
const options = {
|
|
557
|
+
const options = {
|
|
558
|
+
...defaultOptions,
|
|
559
|
+
...passedOptions
|
|
560
|
+
};
|
|
3267
561
|
const errors = [];
|
|
3268
|
-
const addError = function(keys, code) {
|
|
562
|
+
const addError = /* @__PURE__ */ __name(function(keys, code) {
|
|
3269
563
|
errors.push({
|
|
3270
564
|
key: keys.join("."),
|
|
3271
565
|
code
|
|
3272
566
|
});
|
|
3273
|
-
};
|
|
567
|
+
}, "addError");
|
|
3274
568
|
await doValidation({
|
|
3275
569
|
schema,
|
|
3276
570
|
doc,
|
|
3277
571
|
currentDoc: doc,
|
|
3278
572
|
value: doc,
|
|
3279
|
-
currentSchema: {
|
|
573
|
+
currentSchema: {
|
|
574
|
+
type: schema
|
|
575
|
+
},
|
|
3280
576
|
addError,
|
|
3281
577
|
options,
|
|
3282
578
|
args
|
|
3283
579
|
});
|
|
3284
580
|
return getValidationErrorsObject(errors);
|
|
3285
581
|
}
|
|
582
|
+
__name(getValidationErrors2, "getValidationErrors");
|
|
3286
583
|
|
|
3287
584
|
// src/validate.ts
|
|
3288
585
|
async function validate(schema, doc, passedOptions = {}, ...args) {
|
|
@@ -3291,12 +588,14 @@ async function validate(schema, doc, passedOptions = {}, ...args) {
|
|
|
3291
588
|
throw new ValidationError(validationErrors);
|
|
3292
589
|
}
|
|
3293
590
|
}
|
|
591
|
+
__name(validate, "validate");
|
|
3294
592
|
|
|
3295
593
|
// src/isValid.ts
|
|
3296
594
|
async function isValid(schema, doc, passedOptions = {}, ...args) {
|
|
3297
595
|
const validationErrors = await getValidationErrors2(schema, doc, passedOptions, ...args);
|
|
3298
596
|
return !validationErrors;
|
|
3299
597
|
}
|
|
598
|
+
__name(isValid, "isValid");
|
|
3300
599
|
|
|
3301
600
|
// src/getValidationErrors/getError/getFieldType.ts
|
|
3302
601
|
function getFieldType(type) {
|
|
@@ -3304,23 +603,25 @@ function getFieldType(type) {
|
|
|
3304
603
|
const validator = validatorKey === "custom" ? type : fieldTypes_default[validatorKey];
|
|
3305
604
|
return validator;
|
|
3306
605
|
}
|
|
606
|
+
__name(getFieldType, "getFieldType");
|
|
3307
607
|
|
|
3308
608
|
// src/clean/recursiveClean.ts
|
|
3309
|
-
|
|
3310
|
-
|
|
609
|
+
import isUndefined from "lodash/isUndefined";
|
|
610
|
+
import isArray5 from "lodash/isArray";
|
|
3311
611
|
|
|
3312
612
|
// src/clean/cleanType.ts
|
|
3313
|
-
|
|
613
|
+
import isNil4 from "lodash/isNil";
|
|
3314
614
|
|
|
3315
615
|
// src/clean/getObjectNode.ts
|
|
3316
|
-
|
|
616
|
+
import isPlainObject6 from "lodash/isPlainObject";
|
|
3317
617
|
function getObjectNode(schema, value) {
|
|
3318
|
-
if (
|
|
618
|
+
if (isPlainObject6(schema.type) && isPlainObject6(value)) {
|
|
3319
619
|
const result = schema;
|
|
3320
620
|
return result;
|
|
3321
621
|
}
|
|
3322
622
|
return null;
|
|
3323
623
|
}
|
|
624
|
+
__name(getObjectNode, "getObjectNode");
|
|
3324
625
|
|
|
3325
626
|
// src/clean/cleanType.ts
|
|
3326
627
|
async function cleanType(type, fieldSchema, value, info, ...args) {
|
|
@@ -3329,7 +630,7 @@ async function cleanType(type, fieldSchema, value, info, ...args) {
|
|
|
3329
630
|
throw new Error("Cleaning field with no type");
|
|
3330
631
|
}
|
|
3331
632
|
const { clean: rootFieldClean } = await getFieldType(type);
|
|
3332
|
-
if (rootFieldClean && !
|
|
633
|
+
if (rootFieldClean && !isNil4(value)) {
|
|
3333
634
|
value = await rootFieldClean(value, info, ...args);
|
|
3334
635
|
}
|
|
3335
636
|
let needReClean = false;
|
|
@@ -3339,7 +640,7 @@ async function cleanType(type, fieldSchema, value, info, ...args) {
|
|
|
3339
640
|
value = await objectTypeSchema.type.__clean(value, info, ...args);
|
|
3340
641
|
}
|
|
3341
642
|
const { defaultValue } = fieldSchema;
|
|
3342
|
-
if (
|
|
643
|
+
if (isNil4(value) && !isNil4(defaultValue)) {
|
|
3343
644
|
needReClean = true;
|
|
3344
645
|
if (typeof defaultValue === "function") {
|
|
3345
646
|
value = await defaultValue(info, ...args);
|
|
@@ -3352,24 +653,21 @@ async function cleanType(type, fieldSchema, value, info, ...args) {
|
|
|
3352
653
|
needReClean = true;
|
|
3353
654
|
value = await autoValue(value, info, ...args);
|
|
3354
655
|
}
|
|
3355
|
-
const { clean } = fieldSchema;
|
|
3356
|
-
if (
|
|
656
|
+
const { clean: clean3 } = fieldSchema;
|
|
657
|
+
if (clean3) {
|
|
3357
658
|
needReClean = true;
|
|
3358
|
-
value = await
|
|
659
|
+
value = await clean3(value, info, ...args);
|
|
3359
660
|
}
|
|
3360
|
-
if (needReClean && rootFieldClean && !
|
|
661
|
+
if (needReClean && rootFieldClean && !isNil4(value)) {
|
|
3361
662
|
value = await rootFieldClean(value, info, ...args);
|
|
3362
663
|
}
|
|
3363
664
|
return value;
|
|
3364
665
|
}
|
|
666
|
+
__name(cleanType, "cleanType");
|
|
3365
667
|
|
|
3366
668
|
// src/clean/recursiveClean.ts
|
|
3367
|
-
|
|
3368
|
-
var cleanObjectFields = async function({
|
|
3369
|
-
schema,
|
|
3370
|
-
value,
|
|
3371
|
-
...other
|
|
3372
|
-
}) {
|
|
669
|
+
import isNil5 from "lodash/isNil";
|
|
670
|
+
var cleanObjectFields = /* @__PURE__ */ __name(async function({ schema, value, ...other }) {
|
|
3373
671
|
const keys = Object.keys(schema.type).filter((key) => !key.startsWith("__"));
|
|
3374
672
|
const newDoc = {};
|
|
3375
673
|
for (const key of keys) {
|
|
@@ -3381,7 +679,7 @@ var cleanObjectFields = async function({
|
|
|
3381
679
|
currentDoc: value
|
|
3382
680
|
};
|
|
3383
681
|
const newValue = await clean(cleanOptions);
|
|
3384
|
-
if (!
|
|
682
|
+
if (!isUndefined(newValue)) {
|
|
3385
683
|
newDoc[key] = newValue;
|
|
3386
684
|
}
|
|
3387
685
|
} catch (error) {
|
|
@@ -3389,12 +687,8 @@ var cleanObjectFields = async function({
|
|
|
3389
687
|
}
|
|
3390
688
|
}
|
|
3391
689
|
return newDoc;
|
|
3392
|
-
};
|
|
3393
|
-
var cleanArrayItems = async function({
|
|
3394
|
-
schema,
|
|
3395
|
-
value,
|
|
3396
|
-
...other
|
|
3397
|
-
}) {
|
|
690
|
+
}, "cleanObjectFields");
|
|
691
|
+
var cleanArrayItems = /* @__PURE__ */ __name(async function({ schema, value, ...other }) {
|
|
3398
692
|
const schemaType = schema.type[0];
|
|
3399
693
|
const promises = value.map(async (item, index) => {
|
|
3400
694
|
const newValue = await clean({
|
|
@@ -3408,19 +702,22 @@ var cleanArrayItems = async function({
|
|
|
3408
702
|
return newValue;
|
|
3409
703
|
});
|
|
3410
704
|
const result = await Promise.all(promises);
|
|
3411
|
-
return result.filter((value2) => !
|
|
3412
|
-
};
|
|
705
|
+
return result.filter((value2) => !isUndefined(value2));
|
|
706
|
+
}, "cleanArrayItems");
|
|
3413
707
|
function getArrayNode(schema, value) {
|
|
3414
|
-
if (
|
|
708
|
+
if (isArray5(schema.type) && !isNil5(value)) {
|
|
3415
709
|
const result = schema;
|
|
3416
710
|
return result;
|
|
3417
711
|
}
|
|
3418
712
|
return null;
|
|
3419
713
|
}
|
|
3420
|
-
|
|
714
|
+
__name(getArrayNode, "getArrayNode");
|
|
715
|
+
var clean = /* @__PURE__ */ __name(async function(info) {
|
|
3421
716
|
convertTypedModel(info);
|
|
3422
717
|
let { schema, args = [], value } = info;
|
|
3423
|
-
const currSchema = schema.type ===
|
|
718
|
+
const currSchema = schema.type === void 0 ? {
|
|
719
|
+
type: schema
|
|
720
|
+
} : schema;
|
|
3424
721
|
const objectSchema = getObjectNode(currSchema, value);
|
|
3425
722
|
if (objectSchema) {
|
|
3426
723
|
const newDoc = await cleanObjectFields({
|
|
@@ -3434,8 +731,10 @@ var clean = async function(info) {
|
|
|
3434
731
|
const arraySchema = getArrayNode(currSchema, value);
|
|
3435
732
|
if (arraySchema) {
|
|
3436
733
|
let updatedValue = value;
|
|
3437
|
-
if (!
|
|
3438
|
-
updatedValue = [
|
|
734
|
+
if (!isArray5(value) && !Array.isArray(value)) {
|
|
735
|
+
updatedValue = [
|
|
736
|
+
value
|
|
737
|
+
];
|
|
3439
738
|
}
|
|
3440
739
|
const newDoc = await cleanArrayItems({
|
|
3441
740
|
...info,
|
|
@@ -3447,7 +746,7 @@ var clean = async function(info) {
|
|
|
3447
746
|
}
|
|
3448
747
|
const result = await cleanType(currSchema.type, currSchema, value, info, ...args);
|
|
3449
748
|
return result;
|
|
3450
|
-
};
|
|
749
|
+
}, "clean");
|
|
3451
750
|
var recursiveClean_default = clean;
|
|
3452
751
|
|
|
3453
752
|
// src/clean/index.ts
|
|
@@ -3458,12 +757,16 @@ var defaultOptions2 = {
|
|
|
3458
757
|
removeEmptyStrings: false
|
|
3459
758
|
};
|
|
3460
759
|
async function clean2(schema, doc, opts = {}, ...args) {
|
|
3461
|
-
if (!doc)
|
|
3462
|
-
return doc;
|
|
760
|
+
if (!doc) return doc;
|
|
3463
761
|
schema = getSchemaFromTypedModel(schema);
|
|
3464
|
-
const options = {
|
|
762
|
+
const options = {
|
|
763
|
+
...defaultOptions2,
|
|
764
|
+
...opts
|
|
765
|
+
};
|
|
3465
766
|
const params = {
|
|
3466
|
-
schema: {
|
|
767
|
+
schema: {
|
|
768
|
+
type: schema
|
|
769
|
+
},
|
|
3467
770
|
value: doc,
|
|
3468
771
|
doc: options.forceDoc || doc,
|
|
3469
772
|
currentDoc: doc,
|
|
@@ -3473,33 +776,42 @@ async function clean2(schema, doc, opts = {}, ...args) {
|
|
|
3473
776
|
const cleanedResult = await recursiveClean_default(params);
|
|
3474
777
|
return cleanedResult;
|
|
3475
778
|
}
|
|
779
|
+
__name(clean2, "clean");
|
|
3476
780
|
|
|
3477
781
|
// src/validateKey/dotGetSchema.ts
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
var dotGet = function dotGet2(object, path) {
|
|
3481
|
-
if (path === "")
|
|
3482
|
-
return object;
|
|
782
|
+
import isPlainObject7 from "lodash/isPlainObject";
|
|
783
|
+
import isNil6 from "lodash/isNil";
|
|
784
|
+
var dotGet = /* @__PURE__ */ __name(function dotGet2(object, path) {
|
|
785
|
+
if (path === "") return object;
|
|
3483
786
|
const pathParts = path.split(".");
|
|
3484
787
|
const first = pathParts.shift();
|
|
3485
788
|
const remainingPath = pathParts.join(".");
|
|
3486
789
|
const levelObject = object.type;
|
|
3487
790
|
if (first === "$" || /^[0-9]+$/.test(first)) {
|
|
3488
|
-
return dotGet2({
|
|
3489
|
-
|
|
791
|
+
return dotGet2({
|
|
792
|
+
type: levelObject[0]
|
|
793
|
+
}, remainingPath);
|
|
794
|
+
} else if (isPlainObject7(levelObject[first])) {
|
|
3490
795
|
return dotGet2(levelObject[first], remainingPath);
|
|
3491
796
|
}
|
|
3492
797
|
if (levelObject === "blackbox") {
|
|
3493
|
-
return {
|
|
798
|
+
return {
|
|
799
|
+
type: "blackbox",
|
|
800
|
+
optional: true,
|
|
801
|
+
isBlackboxChild: true
|
|
802
|
+
};
|
|
3494
803
|
}
|
|
3495
804
|
return null;
|
|
3496
|
-
};
|
|
805
|
+
}, "dotGet");
|
|
3497
806
|
function dotGetSchema_default(schema, path) {
|
|
3498
|
-
if (
|
|
807
|
+
if (isNil6(schema)) {
|
|
3499
808
|
throw new Error("You need to pass a schema");
|
|
3500
809
|
}
|
|
3501
|
-
return dotGet({
|
|
810
|
+
return dotGet({
|
|
811
|
+
type: schema
|
|
812
|
+
}, path);
|
|
3502
813
|
}
|
|
814
|
+
__name(dotGetSchema_default, "default");
|
|
3503
815
|
|
|
3504
816
|
// src/dotGetSchema.ts
|
|
3505
817
|
var dotGetSchema_default2 = dotGetSchema_default;
|
|
@@ -3509,7 +821,10 @@ var defaultOptions3 = {
|
|
|
3509
821
|
filter: true
|
|
3510
822
|
};
|
|
3511
823
|
async function cleanKey_default(schema, key, value, passedOptions = {}, ...args) {
|
|
3512
|
-
const options = {
|
|
824
|
+
const options = {
|
|
825
|
+
...defaultOptions3,
|
|
826
|
+
...passedOptions
|
|
827
|
+
};
|
|
3513
828
|
const keySchema = dotGetSchema_default2(schema, key);
|
|
3514
829
|
if (!keySchema) {
|
|
3515
830
|
if (options.filter) {
|
|
@@ -3518,16 +833,24 @@ async function cleanKey_default(schema, key, value, passedOptions = {}, ...args)
|
|
|
3518
833
|
return value;
|
|
3519
834
|
}
|
|
3520
835
|
}
|
|
3521
|
-
const result = await clean2({
|
|
836
|
+
const result = await clean2({
|
|
837
|
+
clean: keySchema
|
|
838
|
+
}, {
|
|
839
|
+
clean: value
|
|
840
|
+
}, options, ...args);
|
|
3522
841
|
return result.clean;
|
|
3523
842
|
}
|
|
843
|
+
__name(cleanKey_default, "default");
|
|
3524
844
|
|
|
3525
845
|
// src/validateKey/index.ts
|
|
3526
846
|
var defaultOptions4 = {
|
|
3527
847
|
filter: false
|
|
3528
848
|
};
|
|
3529
849
|
async function validateKey_default(schema, key, value, passedOptions = {}, ...args) {
|
|
3530
|
-
const options = {
|
|
850
|
+
const options = {
|
|
851
|
+
...defaultOptions4,
|
|
852
|
+
...passedOptions
|
|
853
|
+
};
|
|
3531
854
|
const keySchema = dotGetSchema_default(schema, key);
|
|
3532
855
|
if (!keySchema) {
|
|
3533
856
|
if (options.filter) {
|
|
@@ -3539,15 +862,19 @@ async function validateKey_default(schema, key, value, passedOptions = {}, ...ar
|
|
|
3539
862
|
if (keySchema.isBlackboxChild) {
|
|
3540
863
|
return null;
|
|
3541
864
|
}
|
|
3542
|
-
const result = await getValidationErrors2({
|
|
3543
|
-
|
|
3544
|
-
|
|
865
|
+
const result = await getValidationErrors2({
|
|
866
|
+
validate: keySchema
|
|
867
|
+
}, {
|
|
868
|
+
validate: value
|
|
869
|
+
}, options, ...args);
|
|
870
|
+
if (!result) return null;
|
|
3545
871
|
return result.validate;
|
|
3546
872
|
}
|
|
873
|
+
__name(validateKey_default, "default");
|
|
3547
874
|
|
|
3548
875
|
// src/fieldTypes/enum.ts
|
|
3549
|
-
|
|
3550
|
-
|
|
876
|
+
import isString6 from "lodash/isString";
|
|
877
|
+
import includes2 from "lodash/includes";
|
|
3551
878
|
function createEnum(name, values) {
|
|
3552
879
|
return {
|
|
3553
880
|
type: values[0],
|
|
@@ -3557,21 +884,22 @@ function createEnum(name, values) {
|
|
|
3557
884
|
enumName: name,
|
|
3558
885
|
enumValues: values
|
|
3559
886
|
},
|
|
3560
|
-
toGraphQLType: (GraphQL) => {
|
|
887
|
+
toGraphQLType: /* @__PURE__ */ __name((GraphQL) => {
|
|
3561
888
|
global.GraphQLEnums = global.GraphQLEnums || {};
|
|
3562
889
|
global.GraphQLEnums[name] = global.GraphQLEnums[name] || new GraphQL.GraphQLEnumType({
|
|
3563
890
|
name,
|
|
3564
891
|
values: values.reduce((result, value) => {
|
|
3565
|
-
result[value] = {
|
|
892
|
+
result[value] = {
|
|
893
|
+
value
|
|
894
|
+
};
|
|
3566
895
|
return result;
|
|
3567
896
|
}, {})
|
|
3568
897
|
});
|
|
3569
898
|
return global.GraphQLEnums[name];
|
|
3570
|
-
},
|
|
899
|
+
}, "toGraphQLType"),
|
|
3571
900
|
validate(value, { currentSchema }) {
|
|
3572
|
-
if (!
|
|
3573
|
-
|
|
3574
|
-
if (!import_includes2.default(values, value)) {
|
|
901
|
+
if (!isString6(value)) return Errors_default.NOT_A_STRING;
|
|
902
|
+
if (!includes2(values, value)) {
|
|
3575
903
|
return Errors_default.NOT_AN_ALLOWED_VALUE;
|
|
3576
904
|
}
|
|
3577
905
|
if (value === "" && !currentSchema.optional) {
|
|
@@ -3586,22 +914,24 @@ function createEnum(name, values) {
|
|
|
3586
914
|
value = value.trim();
|
|
3587
915
|
}
|
|
3588
916
|
if (removeEmptyStrings && value === "") {
|
|
3589
|
-
return;
|
|
917
|
+
return void 0;
|
|
3590
918
|
}
|
|
3591
919
|
return value;
|
|
3592
920
|
}
|
|
3593
921
|
})
|
|
3594
922
|
};
|
|
3595
923
|
}
|
|
924
|
+
__name(createEnum, "createEnum");
|
|
3596
925
|
export {
|
|
3597
|
-
|
|
3598
|
-
validate,
|
|
3599
|
-
isValid,
|
|
3600
|
-
getValidationErrors2 as getValidationErrors,
|
|
3601
|
-
getFieldType,
|
|
3602
|
-
dotGetSchema_default2 as dotGetSchema,
|
|
3603
|
-
createEnum,
|
|
3604
|
-
cleanKey_default as cleanKey,
|
|
926
|
+
ValidationError,
|
|
3605
927
|
clean2 as clean,
|
|
3606
|
-
|
|
928
|
+
cleanKey_default as cleanKey,
|
|
929
|
+
createEnum,
|
|
930
|
+
dotGetSchema_default2 as dotGetSchema,
|
|
931
|
+
getFieldType,
|
|
932
|
+
getValidationErrors2 as getValidationErrors,
|
|
933
|
+
isValid,
|
|
934
|
+
validate,
|
|
935
|
+
validateKey_default as validateKey
|
|
3607
936
|
};
|
|
937
|
+
//# sourceMappingURL=index.js.map
|