@orion-js/models 4.0.0-next.2 → 4.0.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/index.cjs +46 -176
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +46 -176
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
7
|
var __commonJS = (cb, mod) => function __require() {
|
|
9
8
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
9
|
};
|
|
@@ -90,7 +89,6 @@ var require_getRawTag = __commonJS({
|
|
|
90
89
|
}
|
|
91
90
|
return result;
|
|
92
91
|
}
|
|
93
|
-
__name(getRawTag, "getRawTag");
|
|
94
92
|
module2.exports = getRawTag;
|
|
95
93
|
}
|
|
96
94
|
});
|
|
@@ -103,7 +101,6 @@ var require_objectToString = __commonJS({
|
|
|
103
101
|
function objectToString(value) {
|
|
104
102
|
return nativeObjectToString.call(value);
|
|
105
103
|
}
|
|
106
|
-
__name(objectToString, "objectToString");
|
|
107
104
|
module2.exports = objectToString;
|
|
108
105
|
}
|
|
109
106
|
});
|
|
@@ -123,7 +120,6 @@ var require_baseGetTag = __commonJS({
|
|
|
123
120
|
}
|
|
124
121
|
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
125
122
|
}
|
|
126
|
-
__name(baseGetTag, "baseGetTag");
|
|
127
123
|
module2.exports = baseGetTag;
|
|
128
124
|
}
|
|
129
125
|
});
|
|
@@ -136,7 +132,6 @@ var require_overArg = __commonJS({
|
|
|
136
132
|
return func(transform(arg));
|
|
137
133
|
};
|
|
138
134
|
}
|
|
139
|
-
__name(overArg, "overArg");
|
|
140
135
|
module2.exports = overArg;
|
|
141
136
|
}
|
|
142
137
|
});
|
|
@@ -156,7 +151,6 @@ var require_isObjectLike = __commonJS({
|
|
|
156
151
|
function isObjectLike(value) {
|
|
157
152
|
return value != null && typeof value == "object";
|
|
158
153
|
}
|
|
159
|
-
__name(isObjectLike, "isObjectLike");
|
|
160
154
|
module2.exports = isObjectLike;
|
|
161
155
|
}
|
|
162
156
|
});
|
|
@@ -184,7 +178,6 @@ var require_isPlainObject = __commonJS({
|
|
|
184
178
|
var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
|
|
185
179
|
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|
186
180
|
}
|
|
187
|
-
__name(isPlainObject2, "isPlainObject");
|
|
188
181
|
module2.exports = isPlainObject2;
|
|
189
182
|
}
|
|
190
183
|
});
|
|
@@ -195,7 +188,6 @@ var require_isNil = __commonJS({
|
|
|
195
188
|
function isNil2(value) {
|
|
196
189
|
return value == null;
|
|
197
190
|
}
|
|
198
|
-
__name(isNil2, "isNil");
|
|
199
191
|
module2.exports = isNil2;
|
|
200
192
|
}
|
|
201
193
|
});
|
|
@@ -212,7 +204,6 @@ var require_baseFindIndex = __commonJS({
|
|
|
212
204
|
}
|
|
213
205
|
return -1;
|
|
214
206
|
}
|
|
215
|
-
__name(baseFindIndex, "baseFindIndex");
|
|
216
207
|
module2.exports = baseFindIndex;
|
|
217
208
|
}
|
|
218
209
|
});
|
|
@@ -223,7 +214,6 @@ var require_baseIsNaN = __commonJS({
|
|
|
223
214
|
function baseIsNaN(value) {
|
|
224
215
|
return value !== value;
|
|
225
216
|
}
|
|
226
|
-
__name(baseIsNaN, "baseIsNaN");
|
|
227
217
|
module2.exports = baseIsNaN;
|
|
228
218
|
}
|
|
229
219
|
});
|
|
@@ -240,7 +230,6 @@ var require_strictIndexOf = __commonJS({
|
|
|
240
230
|
}
|
|
241
231
|
return -1;
|
|
242
232
|
}
|
|
243
|
-
__name(strictIndexOf, "strictIndexOf");
|
|
244
233
|
module2.exports = strictIndexOf;
|
|
245
234
|
}
|
|
246
235
|
});
|
|
@@ -254,7 +243,6 @@ var require_baseIndexOf = __commonJS({
|
|
|
254
243
|
function baseIndexOf(array, value, fromIndex) {
|
|
255
244
|
return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
|
|
256
245
|
}
|
|
257
|
-
__name(baseIndexOf, "baseIndexOf");
|
|
258
246
|
module2.exports = baseIndexOf;
|
|
259
247
|
}
|
|
260
248
|
});
|
|
@@ -266,7 +254,6 @@ var require_isObject = __commonJS({
|
|
|
266
254
|
var type = typeof value;
|
|
267
255
|
return value != null && (type == "object" || type == "function");
|
|
268
256
|
}
|
|
269
|
-
__name(isObject, "isObject");
|
|
270
257
|
module2.exports = isObject;
|
|
271
258
|
}
|
|
272
259
|
});
|
|
@@ -287,7 +274,6 @@ var require_isFunction = __commonJS({
|
|
|
287
274
|
var tag = baseGetTag(value);
|
|
288
275
|
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
289
276
|
}
|
|
290
|
-
__name(isFunction, "isFunction");
|
|
291
277
|
module2.exports = isFunction;
|
|
292
278
|
}
|
|
293
279
|
});
|
|
@@ -299,7 +285,6 @@ var require_isLength = __commonJS({
|
|
|
299
285
|
function isLength(value) {
|
|
300
286
|
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
301
287
|
}
|
|
302
|
-
__name(isLength, "isLength");
|
|
303
288
|
module2.exports = isLength;
|
|
304
289
|
}
|
|
305
290
|
});
|
|
@@ -312,7 +297,6 @@ var require_isArrayLike = __commonJS({
|
|
|
312
297
|
function isArrayLike(value) {
|
|
313
298
|
return value != null && isLength(value.length) && !isFunction(value);
|
|
314
299
|
}
|
|
315
|
-
__name(isArrayLike, "isArrayLike");
|
|
316
300
|
module2.exports = isArrayLike;
|
|
317
301
|
}
|
|
318
302
|
});
|
|
@@ -327,7 +311,6 @@ var require_isString = __commonJS({
|
|
|
327
311
|
function isString(value) {
|
|
328
312
|
return typeof value == "string" || !isArray3(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
|
|
329
313
|
}
|
|
330
|
-
__name(isString, "isString");
|
|
331
314
|
module2.exports = isString;
|
|
332
315
|
}
|
|
333
316
|
});
|
|
@@ -342,7 +325,6 @@ var require_trimmedEndIndex = __commonJS({
|
|
|
342
325
|
}
|
|
343
326
|
return index;
|
|
344
327
|
}
|
|
345
|
-
__name(trimmedEndIndex, "trimmedEndIndex");
|
|
346
328
|
module2.exports = trimmedEndIndex;
|
|
347
329
|
}
|
|
348
330
|
});
|
|
@@ -355,7 +337,6 @@ var require_baseTrim = __commonJS({
|
|
|
355
337
|
function baseTrim(string) {
|
|
356
338
|
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
|
|
357
339
|
}
|
|
358
|
-
__name(baseTrim, "baseTrim");
|
|
359
340
|
module2.exports = baseTrim;
|
|
360
341
|
}
|
|
361
342
|
});
|
|
@@ -369,7 +350,6 @@ var require_isSymbol = __commonJS({
|
|
|
369
350
|
function isSymbol(value) {
|
|
370
351
|
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|
371
352
|
}
|
|
372
|
-
__name(isSymbol, "isSymbol");
|
|
373
353
|
module2.exports = isSymbol;
|
|
374
354
|
}
|
|
375
355
|
});
|
|
@@ -403,7 +383,6 @@ var require_toNumber = __commonJS({
|
|
|
403
383
|
var isBinary = reIsBinary.test(value);
|
|
404
384
|
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
405
385
|
}
|
|
406
|
-
__name(toNumber, "toNumber");
|
|
407
386
|
module2.exports = toNumber;
|
|
408
387
|
}
|
|
409
388
|
});
|
|
@@ -425,7 +404,6 @@ var require_toFinite = __commonJS({
|
|
|
425
404
|
}
|
|
426
405
|
return value === value ? value : 0;
|
|
427
406
|
}
|
|
428
|
-
__name(toFinite, "toFinite");
|
|
429
407
|
module2.exports = toFinite;
|
|
430
408
|
}
|
|
431
409
|
});
|
|
@@ -438,7 +416,6 @@ var require_toInteger = __commonJS({
|
|
|
438
416
|
var result = toFinite(value), remainder = result % 1;
|
|
439
417
|
return result === result ? remainder ? result - remainder : result : 0;
|
|
440
418
|
}
|
|
441
|
-
__name(toInteger, "toInteger");
|
|
442
419
|
module2.exports = toInteger;
|
|
443
420
|
}
|
|
444
421
|
});
|
|
@@ -453,7 +430,6 @@ var require_arrayMap = __commonJS({
|
|
|
453
430
|
}
|
|
454
431
|
return result;
|
|
455
432
|
}
|
|
456
|
-
__name(arrayMap, "arrayMap");
|
|
457
433
|
module2.exports = arrayMap;
|
|
458
434
|
}
|
|
459
435
|
});
|
|
@@ -467,7 +443,6 @@ var require_baseValues = __commonJS({
|
|
|
467
443
|
return object[key];
|
|
468
444
|
});
|
|
469
445
|
}
|
|
470
|
-
__name(baseValues, "baseValues");
|
|
471
446
|
module2.exports = baseValues;
|
|
472
447
|
}
|
|
473
448
|
});
|
|
@@ -482,7 +457,6 @@ var require_baseTimes = __commonJS({
|
|
|
482
457
|
}
|
|
483
458
|
return result;
|
|
484
459
|
}
|
|
485
|
-
__name(baseTimes, "baseTimes");
|
|
486
460
|
module2.exports = baseTimes;
|
|
487
461
|
}
|
|
488
462
|
});
|
|
@@ -496,7 +470,6 @@ var require_baseIsArguments = __commonJS({
|
|
|
496
470
|
function baseIsArguments(value) {
|
|
497
471
|
return isObjectLike(value) && baseGetTag(value) == argsTag;
|
|
498
472
|
}
|
|
499
|
-
__name(baseIsArguments, "baseIsArguments");
|
|
500
473
|
module2.exports = baseIsArguments;
|
|
501
474
|
}
|
|
502
475
|
});
|
|
@@ -524,7 +497,6 @@ var require_stubFalse = __commonJS({
|
|
|
524
497
|
function stubFalse() {
|
|
525
498
|
return false;
|
|
526
499
|
}
|
|
527
|
-
__name(stubFalse, "stubFalse");
|
|
528
500
|
module2.exports = stubFalse;
|
|
529
501
|
}
|
|
530
502
|
});
|
|
@@ -552,9 +524,8 @@ var require_isIndex = __commonJS({
|
|
|
552
524
|
function isIndex(value, length) {
|
|
553
525
|
var type = typeof value;
|
|
554
526
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
555
|
-
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
|
|
527
|
+
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
556
528
|
}
|
|
557
|
-
__name(isIndex, "isIndex");
|
|
558
529
|
module2.exports = isIndex;
|
|
559
530
|
}
|
|
560
531
|
});
|
|
@@ -595,7 +566,6 @@ var require_baseIsTypedArray = __commonJS({
|
|
|
595
566
|
function baseIsTypedArray(value) {
|
|
596
567
|
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
597
568
|
}
|
|
598
|
-
__name(baseIsTypedArray, "baseIsTypedArray");
|
|
599
569
|
module2.exports = baseIsTypedArray;
|
|
600
570
|
}
|
|
601
571
|
});
|
|
@@ -608,7 +578,6 @@ var require_baseUnary = __commonJS({
|
|
|
608
578
|
return func(value);
|
|
609
579
|
};
|
|
610
580
|
}
|
|
611
|
-
__name(baseUnary, "baseUnary");
|
|
612
581
|
module2.exports = baseUnary;
|
|
613
582
|
}
|
|
614
583
|
});
|
|
@@ -671,7 +640,6 @@ var require_arrayLikeKeys = __commonJS({
|
|
|
671
640
|
}
|
|
672
641
|
return result;
|
|
673
642
|
}
|
|
674
|
-
__name(arrayLikeKeys, "arrayLikeKeys");
|
|
675
643
|
module2.exports = arrayLikeKeys;
|
|
676
644
|
}
|
|
677
645
|
});
|
|
@@ -684,7 +652,6 @@ var require_isPrototype = __commonJS({
|
|
|
684
652
|
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
|
|
685
653
|
return value === proto;
|
|
686
654
|
}
|
|
687
|
-
__name(isPrototype, "isPrototype");
|
|
688
655
|
module2.exports = isPrototype;
|
|
689
656
|
}
|
|
690
657
|
});
|
|
@@ -717,7 +684,6 @@ var require_baseKeys = __commonJS({
|
|
|
717
684
|
}
|
|
718
685
|
return result;
|
|
719
686
|
}
|
|
720
|
-
__name(baseKeys, "baseKeys");
|
|
721
687
|
module2.exports = baseKeys;
|
|
722
688
|
}
|
|
723
689
|
});
|
|
@@ -731,7 +697,6 @@ var require_keys = __commonJS({
|
|
|
731
697
|
function keys(object) {
|
|
732
698
|
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
733
699
|
}
|
|
734
|
-
__name(keys, "keys");
|
|
735
700
|
module2.exports = keys;
|
|
736
701
|
}
|
|
737
702
|
});
|
|
@@ -744,7 +709,6 @@ var require_values = __commonJS({
|
|
|
744
709
|
function values(object) {
|
|
745
710
|
return object == null ? [] : baseValues(object, keys(object));
|
|
746
711
|
}
|
|
747
|
-
__name(values, "values");
|
|
748
712
|
module2.exports = values;
|
|
749
713
|
}
|
|
750
714
|
});
|
|
@@ -767,7 +731,6 @@ var require_includes = __commonJS({
|
|
|
767
731
|
}
|
|
768
732
|
return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
|
|
769
733
|
}
|
|
770
|
-
__name(includes2, "includes");
|
|
771
734
|
module2.exports = includes2;
|
|
772
735
|
}
|
|
773
736
|
});
|
|
@@ -779,7 +742,6 @@ var require_listCacheClear = __commonJS({
|
|
|
779
742
|
this.__data__ = [];
|
|
780
743
|
this.size = 0;
|
|
781
744
|
}
|
|
782
|
-
__name(listCacheClear, "listCacheClear");
|
|
783
745
|
module2.exports = listCacheClear;
|
|
784
746
|
}
|
|
785
747
|
});
|
|
@@ -790,7 +752,6 @@ var require_eq = __commonJS({
|
|
|
790
752
|
function eq(value, other) {
|
|
791
753
|
return value === other || value !== value && other !== other;
|
|
792
754
|
}
|
|
793
|
-
__name(eq, "eq");
|
|
794
755
|
module2.exports = eq;
|
|
795
756
|
}
|
|
796
757
|
});
|
|
@@ -808,7 +769,6 @@ var require_assocIndexOf = __commonJS({
|
|
|
808
769
|
}
|
|
809
770
|
return -1;
|
|
810
771
|
}
|
|
811
|
-
__name(assocIndexOf, "assocIndexOf");
|
|
812
772
|
module2.exports = assocIndexOf;
|
|
813
773
|
}
|
|
814
774
|
});
|
|
@@ -833,7 +793,6 @@ var require_listCacheDelete = __commonJS({
|
|
|
833
793
|
--this.size;
|
|
834
794
|
return true;
|
|
835
795
|
}
|
|
836
|
-
__name(listCacheDelete, "listCacheDelete");
|
|
837
796
|
module2.exports = listCacheDelete;
|
|
838
797
|
}
|
|
839
798
|
});
|
|
@@ -846,7 +805,6 @@ var require_listCacheGet = __commonJS({
|
|
|
846
805
|
var data = this.__data__, index = assocIndexOf(data, key);
|
|
847
806
|
return index < 0 ? void 0 : data[index][1];
|
|
848
807
|
}
|
|
849
|
-
__name(listCacheGet, "listCacheGet");
|
|
850
808
|
module2.exports = listCacheGet;
|
|
851
809
|
}
|
|
852
810
|
});
|
|
@@ -858,7 +816,6 @@ var require_listCacheHas = __commonJS({
|
|
|
858
816
|
function listCacheHas(key) {
|
|
859
817
|
return assocIndexOf(this.__data__, key) > -1;
|
|
860
818
|
}
|
|
861
|
-
__name(listCacheHas, "listCacheHas");
|
|
862
819
|
module2.exports = listCacheHas;
|
|
863
820
|
}
|
|
864
821
|
});
|
|
@@ -871,16 +828,12 @@ var require_listCacheSet = __commonJS({
|
|
|
871
828
|
var data = this.__data__, index = assocIndexOf(data, key);
|
|
872
829
|
if (index < 0) {
|
|
873
830
|
++this.size;
|
|
874
|
-
data.push([
|
|
875
|
-
key,
|
|
876
|
-
value
|
|
877
|
-
]);
|
|
831
|
+
data.push([key, value]);
|
|
878
832
|
} else {
|
|
879
833
|
data[index][1] = value;
|
|
880
834
|
}
|
|
881
835
|
return this;
|
|
882
836
|
}
|
|
883
|
-
__name(listCacheSet, "listCacheSet");
|
|
884
837
|
module2.exports = listCacheSet;
|
|
885
838
|
}
|
|
886
839
|
});
|
|
@@ -901,7 +854,6 @@ var require_ListCache = __commonJS({
|
|
|
901
854
|
this.set(entry[0], entry[1]);
|
|
902
855
|
}
|
|
903
856
|
}
|
|
904
|
-
__name(ListCache, "ListCache");
|
|
905
857
|
ListCache.prototype.clear = listCacheClear;
|
|
906
858
|
ListCache.prototype["delete"] = listCacheDelete;
|
|
907
859
|
ListCache.prototype.get = listCacheGet;
|
|
@@ -919,7 +871,6 @@ var require_stackClear = __commonJS({
|
|
|
919
871
|
this.__data__ = new ListCache();
|
|
920
872
|
this.size = 0;
|
|
921
873
|
}
|
|
922
|
-
__name(stackClear, "stackClear");
|
|
923
874
|
module2.exports = stackClear;
|
|
924
875
|
}
|
|
925
876
|
});
|
|
@@ -932,7 +883,6 @@ var require_stackDelete = __commonJS({
|
|
|
932
883
|
this.size = data.size;
|
|
933
884
|
return result;
|
|
934
885
|
}
|
|
935
|
-
__name(stackDelete, "stackDelete");
|
|
936
886
|
module2.exports = stackDelete;
|
|
937
887
|
}
|
|
938
888
|
});
|
|
@@ -943,7 +893,6 @@ var require_stackGet = __commonJS({
|
|
|
943
893
|
function stackGet(key) {
|
|
944
894
|
return this.__data__.get(key);
|
|
945
895
|
}
|
|
946
|
-
__name(stackGet, "stackGet");
|
|
947
896
|
module2.exports = stackGet;
|
|
948
897
|
}
|
|
949
898
|
});
|
|
@@ -954,7 +903,6 @@ var require_stackHas = __commonJS({
|
|
|
954
903
|
function stackHas(key) {
|
|
955
904
|
return this.__data__.has(key);
|
|
956
905
|
}
|
|
957
|
-
__name(stackHas, "stackHas");
|
|
958
906
|
module2.exports = stackHas;
|
|
959
907
|
}
|
|
960
908
|
});
|
|
@@ -979,7 +927,6 @@ var require_isMasked = __commonJS({
|
|
|
979
927
|
function isMasked(func) {
|
|
980
928
|
return !!maskSrcKey && maskSrcKey in func;
|
|
981
929
|
}
|
|
982
|
-
__name(isMasked, "isMasked");
|
|
983
930
|
module2.exports = isMasked;
|
|
984
931
|
}
|
|
985
932
|
});
|
|
@@ -1002,7 +949,6 @@ var require_toSource = __commonJS({
|
|
|
1002
949
|
}
|
|
1003
950
|
return "";
|
|
1004
951
|
}
|
|
1005
|
-
__name(toSource, "toSource");
|
|
1006
952
|
module2.exports = toSource;
|
|
1007
953
|
}
|
|
1008
954
|
});
|
|
@@ -1020,7 +966,9 @@ var require_baseIsNative = __commonJS({
|
|
|
1020
966
|
var objectProto = Object.prototype;
|
|
1021
967
|
var funcToString = funcProto.toString;
|
|
1022
968
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1023
|
-
var reIsNative = RegExp(
|
|
969
|
+
var reIsNative = RegExp(
|
|
970
|
+
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
971
|
+
);
|
|
1024
972
|
function baseIsNative(value) {
|
|
1025
973
|
if (!isObject(value) || isMasked(value)) {
|
|
1026
974
|
return false;
|
|
@@ -1028,7 +976,6 @@ var require_baseIsNative = __commonJS({
|
|
|
1028
976
|
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
1029
977
|
return pattern.test(toSource(value));
|
|
1030
978
|
}
|
|
1031
|
-
__name(baseIsNative, "baseIsNative");
|
|
1032
979
|
module2.exports = baseIsNative;
|
|
1033
980
|
}
|
|
1034
981
|
});
|
|
@@ -1039,7 +986,6 @@ var require_getValue = __commonJS({
|
|
|
1039
986
|
function getValue(object, key) {
|
|
1040
987
|
return object == null ? void 0 : object[key];
|
|
1041
988
|
}
|
|
1042
|
-
__name(getValue, "getValue");
|
|
1043
989
|
module2.exports = getValue;
|
|
1044
990
|
}
|
|
1045
991
|
});
|
|
@@ -1053,7 +999,6 @@ var require_getNative = __commonJS({
|
|
|
1053
999
|
var value = getValue(object, key);
|
|
1054
1000
|
return baseIsNative(value) ? value : void 0;
|
|
1055
1001
|
}
|
|
1056
|
-
__name(getNative, "getNative");
|
|
1057
1002
|
module2.exports = getNative;
|
|
1058
1003
|
}
|
|
1059
1004
|
});
|
|
@@ -1085,7 +1030,6 @@ var require_hashClear = __commonJS({
|
|
|
1085
1030
|
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
1086
1031
|
this.size = 0;
|
|
1087
1032
|
}
|
|
1088
|
-
__name(hashClear, "hashClear");
|
|
1089
1033
|
module2.exports = hashClear;
|
|
1090
1034
|
}
|
|
1091
1035
|
});
|
|
@@ -1098,7 +1042,6 @@ var require_hashDelete = __commonJS({
|
|
|
1098
1042
|
this.size -= result ? 1 : 0;
|
|
1099
1043
|
return result;
|
|
1100
1044
|
}
|
|
1101
|
-
__name(hashDelete, "hashDelete");
|
|
1102
1045
|
module2.exports = hashDelete;
|
|
1103
1046
|
}
|
|
1104
1047
|
});
|
|
@@ -1118,7 +1061,6 @@ var require_hashGet = __commonJS({
|
|
|
1118
1061
|
}
|
|
1119
1062
|
return hasOwnProperty.call(data, key) ? data[key] : void 0;
|
|
1120
1063
|
}
|
|
1121
|
-
__name(hashGet, "hashGet");
|
|
1122
1064
|
module2.exports = hashGet;
|
|
1123
1065
|
}
|
|
1124
1066
|
});
|
|
@@ -1133,7 +1075,6 @@ var require_hashHas = __commonJS({
|
|
|
1133
1075
|
var data = this.__data__;
|
|
1134
1076
|
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
|
|
1135
1077
|
}
|
|
1136
|
-
__name(hashHas, "hashHas");
|
|
1137
1078
|
module2.exports = hashHas;
|
|
1138
1079
|
}
|
|
1139
1080
|
});
|
|
@@ -1149,7 +1090,6 @@ var require_hashSet = __commonJS({
|
|
|
1149
1090
|
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
|
|
1150
1091
|
return this;
|
|
1151
1092
|
}
|
|
1152
|
-
__name(hashSet, "hashSet");
|
|
1153
1093
|
module2.exports = hashSet;
|
|
1154
1094
|
}
|
|
1155
1095
|
});
|
|
@@ -1170,7 +1110,6 @@ var require_Hash = __commonJS({
|
|
|
1170
1110
|
this.set(entry[0], entry[1]);
|
|
1171
1111
|
}
|
|
1172
1112
|
}
|
|
1173
|
-
__name(Hash, "Hash");
|
|
1174
1113
|
Hash.prototype.clear = hashClear;
|
|
1175
1114
|
Hash.prototype["delete"] = hashDelete;
|
|
1176
1115
|
Hash.prototype.get = hashGet;
|
|
@@ -1194,7 +1133,6 @@ var require_mapCacheClear = __commonJS({
|
|
|
1194
1133
|
"string": new Hash()
|
|
1195
1134
|
};
|
|
1196
1135
|
}
|
|
1197
|
-
__name(mapCacheClear, "mapCacheClear");
|
|
1198
1136
|
module2.exports = mapCacheClear;
|
|
1199
1137
|
}
|
|
1200
1138
|
});
|
|
@@ -1206,7 +1144,6 @@ var require_isKeyable = __commonJS({
|
|
|
1206
1144
|
var type = typeof value;
|
|
1207
1145
|
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
1208
1146
|
}
|
|
1209
|
-
__name(isKeyable, "isKeyable");
|
|
1210
1147
|
module2.exports = isKeyable;
|
|
1211
1148
|
}
|
|
1212
1149
|
});
|
|
@@ -1219,7 +1156,6 @@ var require_getMapData = __commonJS({
|
|
|
1219
1156
|
var data = map.__data__;
|
|
1220
1157
|
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
1221
1158
|
}
|
|
1222
|
-
__name(getMapData, "getMapData");
|
|
1223
1159
|
module2.exports = getMapData;
|
|
1224
1160
|
}
|
|
1225
1161
|
});
|
|
@@ -1233,7 +1169,6 @@ var require_mapCacheDelete = __commonJS({
|
|
|
1233
1169
|
this.size -= result ? 1 : 0;
|
|
1234
1170
|
return result;
|
|
1235
1171
|
}
|
|
1236
|
-
__name(mapCacheDelete, "mapCacheDelete");
|
|
1237
1172
|
module2.exports = mapCacheDelete;
|
|
1238
1173
|
}
|
|
1239
1174
|
});
|
|
@@ -1245,7 +1180,6 @@ var require_mapCacheGet = __commonJS({
|
|
|
1245
1180
|
function mapCacheGet(key) {
|
|
1246
1181
|
return getMapData(this, key).get(key);
|
|
1247
1182
|
}
|
|
1248
|
-
__name(mapCacheGet, "mapCacheGet");
|
|
1249
1183
|
module2.exports = mapCacheGet;
|
|
1250
1184
|
}
|
|
1251
1185
|
});
|
|
@@ -1257,7 +1191,6 @@ var require_mapCacheHas = __commonJS({
|
|
|
1257
1191
|
function mapCacheHas(key) {
|
|
1258
1192
|
return getMapData(this, key).has(key);
|
|
1259
1193
|
}
|
|
1260
|
-
__name(mapCacheHas, "mapCacheHas");
|
|
1261
1194
|
module2.exports = mapCacheHas;
|
|
1262
1195
|
}
|
|
1263
1196
|
});
|
|
@@ -1272,7 +1205,6 @@ var require_mapCacheSet = __commonJS({
|
|
|
1272
1205
|
this.size += data.size == size ? 0 : 1;
|
|
1273
1206
|
return this;
|
|
1274
1207
|
}
|
|
1275
|
-
__name(mapCacheSet, "mapCacheSet");
|
|
1276
1208
|
module2.exports = mapCacheSet;
|
|
1277
1209
|
}
|
|
1278
1210
|
});
|
|
@@ -1293,7 +1225,6 @@ var require_MapCache = __commonJS({
|
|
|
1293
1225
|
this.set(entry[0], entry[1]);
|
|
1294
1226
|
}
|
|
1295
1227
|
}
|
|
1296
|
-
__name(MapCache, "MapCache");
|
|
1297
1228
|
MapCache.prototype.clear = mapCacheClear;
|
|
1298
1229
|
MapCache.prototype["delete"] = mapCacheDelete;
|
|
1299
1230
|
MapCache.prototype.get = mapCacheGet;
|
|
@@ -1315,10 +1246,7 @@ var require_stackSet = __commonJS({
|
|
|
1315
1246
|
if (data instanceof ListCache) {
|
|
1316
1247
|
var pairs = data.__data__;
|
|
1317
1248
|
if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
1318
|
-
pairs.push([
|
|
1319
|
-
key,
|
|
1320
|
-
value
|
|
1321
|
-
]);
|
|
1249
|
+
pairs.push([key, value]);
|
|
1322
1250
|
this.size = ++data.size;
|
|
1323
1251
|
return this;
|
|
1324
1252
|
}
|
|
@@ -1328,7 +1256,6 @@ var require_stackSet = __commonJS({
|
|
|
1328
1256
|
this.size = data.size;
|
|
1329
1257
|
return this;
|
|
1330
1258
|
}
|
|
1331
|
-
__name(stackSet, "stackSet");
|
|
1332
1259
|
module2.exports = stackSet;
|
|
1333
1260
|
}
|
|
1334
1261
|
});
|
|
@@ -1346,7 +1273,6 @@ var require_Stack = __commonJS({
|
|
|
1346
1273
|
var data = this.__data__ = new ListCache(entries);
|
|
1347
1274
|
this.size = data.size;
|
|
1348
1275
|
}
|
|
1349
|
-
__name(Stack, "Stack");
|
|
1350
1276
|
Stack.prototype.clear = stackClear;
|
|
1351
1277
|
Stack.prototype["delete"] = stackDelete;
|
|
1352
1278
|
Stack.prototype.get = stackGet;
|
|
@@ -1368,7 +1294,6 @@ var require_arrayEach = __commonJS({
|
|
|
1368
1294
|
}
|
|
1369
1295
|
return array;
|
|
1370
1296
|
}
|
|
1371
|
-
__name(arrayEach, "arrayEach");
|
|
1372
1297
|
module2.exports = arrayEach;
|
|
1373
1298
|
}
|
|
1374
1299
|
});
|
|
@@ -1405,7 +1330,6 @@ var require_baseAssignValue = __commonJS({
|
|
|
1405
1330
|
object[key] = value;
|
|
1406
1331
|
}
|
|
1407
1332
|
}
|
|
1408
|
-
__name(baseAssignValue, "baseAssignValue");
|
|
1409
1333
|
module2.exports = baseAssignValue;
|
|
1410
1334
|
}
|
|
1411
1335
|
});
|
|
@@ -1423,7 +1347,6 @@ var require_assignValue = __commonJS({
|
|
|
1423
1347
|
baseAssignValue(object, key, value);
|
|
1424
1348
|
}
|
|
1425
1349
|
}
|
|
1426
|
-
__name(assignValue, "assignValue");
|
|
1427
1350
|
module2.exports = assignValue;
|
|
1428
1351
|
}
|
|
1429
1352
|
});
|
|
@@ -1451,7 +1374,6 @@ var require_copyObject = __commonJS({
|
|
|
1451
1374
|
}
|
|
1452
1375
|
return object;
|
|
1453
1376
|
}
|
|
1454
|
-
__name(copyObject, "copyObject");
|
|
1455
1377
|
module2.exports = copyObject;
|
|
1456
1378
|
}
|
|
1457
1379
|
});
|
|
@@ -1464,7 +1386,6 @@ var require_baseAssign = __commonJS({
|
|
|
1464
1386
|
function baseAssign(object, source) {
|
|
1465
1387
|
return object && copyObject(source, keys(source), object);
|
|
1466
1388
|
}
|
|
1467
|
-
__name(baseAssign, "baseAssign");
|
|
1468
1389
|
module2.exports = baseAssign;
|
|
1469
1390
|
}
|
|
1470
1391
|
});
|
|
@@ -1481,7 +1402,6 @@ var require_nativeKeysIn = __commonJS({
|
|
|
1481
1402
|
}
|
|
1482
1403
|
return result;
|
|
1483
1404
|
}
|
|
1484
|
-
__name(nativeKeysIn, "nativeKeysIn");
|
|
1485
1405
|
module2.exports = nativeKeysIn;
|
|
1486
1406
|
}
|
|
1487
1407
|
});
|
|
@@ -1506,7 +1426,6 @@ var require_baseKeysIn = __commonJS({
|
|
|
1506
1426
|
}
|
|
1507
1427
|
return result;
|
|
1508
1428
|
}
|
|
1509
|
-
__name(baseKeysIn, "baseKeysIn");
|
|
1510
1429
|
module2.exports = baseKeysIn;
|
|
1511
1430
|
}
|
|
1512
1431
|
});
|
|
@@ -1520,7 +1439,6 @@ var require_keysIn = __commonJS({
|
|
|
1520
1439
|
function keysIn(object) {
|
|
1521
1440
|
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
|
1522
1441
|
}
|
|
1523
|
-
__name(keysIn, "keysIn");
|
|
1524
1442
|
module2.exports = keysIn;
|
|
1525
1443
|
}
|
|
1526
1444
|
});
|
|
@@ -1533,7 +1451,6 @@ var require_baseAssignIn = __commonJS({
|
|
|
1533
1451
|
function baseAssignIn(object, source) {
|
|
1534
1452
|
return object && copyObject(source, keysIn(source), object);
|
|
1535
1453
|
}
|
|
1536
|
-
__name(baseAssignIn, "baseAssignIn");
|
|
1537
1454
|
module2.exports = baseAssignIn;
|
|
1538
1455
|
}
|
|
1539
1456
|
});
|
|
@@ -1555,7 +1472,6 @@ var require_cloneBuffer = __commonJS({
|
|
|
1555
1472
|
buffer.copy(result);
|
|
1556
1473
|
return result;
|
|
1557
1474
|
}
|
|
1558
|
-
__name(cloneBuffer, "cloneBuffer");
|
|
1559
1475
|
module2.exports = cloneBuffer;
|
|
1560
1476
|
}
|
|
1561
1477
|
});
|
|
@@ -1571,7 +1487,6 @@ var require_copyArray = __commonJS({
|
|
|
1571
1487
|
}
|
|
1572
1488
|
return array;
|
|
1573
1489
|
}
|
|
1574
|
-
__name(copyArray, "copyArray");
|
|
1575
1490
|
module2.exports = copyArray;
|
|
1576
1491
|
}
|
|
1577
1492
|
});
|
|
@@ -1589,7 +1504,6 @@ var require_arrayFilter = __commonJS({
|
|
|
1589
1504
|
}
|
|
1590
1505
|
return result;
|
|
1591
1506
|
}
|
|
1592
|
-
__name(arrayFilter, "arrayFilter");
|
|
1593
1507
|
module2.exports = arrayFilter;
|
|
1594
1508
|
}
|
|
1595
1509
|
});
|
|
@@ -1600,7 +1514,6 @@ var require_stubArray = __commonJS({
|
|
|
1600
1514
|
function stubArray() {
|
|
1601
1515
|
return [];
|
|
1602
1516
|
}
|
|
1603
|
-
__name(stubArray, "stubArray");
|
|
1604
1517
|
module2.exports = stubArray;
|
|
1605
1518
|
}
|
|
1606
1519
|
});
|
|
@@ -1634,7 +1547,6 @@ var require_copySymbols = __commonJS({
|
|
|
1634
1547
|
function copySymbols(source, object) {
|
|
1635
1548
|
return copyObject(source, getSymbols(source), object);
|
|
1636
1549
|
}
|
|
1637
|
-
__name(copySymbols, "copySymbols");
|
|
1638
1550
|
module2.exports = copySymbols;
|
|
1639
1551
|
}
|
|
1640
1552
|
});
|
|
@@ -1649,7 +1561,6 @@ var require_arrayPush = __commonJS({
|
|
|
1649
1561
|
}
|
|
1650
1562
|
return array;
|
|
1651
1563
|
}
|
|
1652
|
-
__name(arrayPush, "arrayPush");
|
|
1653
1564
|
module2.exports = arrayPush;
|
|
1654
1565
|
}
|
|
1655
1566
|
});
|
|
@@ -1682,7 +1593,6 @@ var require_copySymbolsIn = __commonJS({
|
|
|
1682
1593
|
function copySymbolsIn(source, object) {
|
|
1683
1594
|
return copyObject(source, getSymbolsIn(source), object);
|
|
1684
1595
|
}
|
|
1685
|
-
__name(copySymbolsIn, "copySymbolsIn");
|
|
1686
1596
|
module2.exports = copySymbolsIn;
|
|
1687
1597
|
}
|
|
1688
1598
|
});
|
|
@@ -1696,7 +1606,6 @@ var require_baseGetAllKeys = __commonJS({
|
|
|
1696
1606
|
var result = keysFunc(object);
|
|
1697
1607
|
return isArray3(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
1698
1608
|
}
|
|
1699
|
-
__name(baseGetAllKeys, "baseGetAllKeys");
|
|
1700
1609
|
module2.exports = baseGetAllKeys;
|
|
1701
1610
|
}
|
|
1702
1611
|
});
|
|
@@ -1710,7 +1619,6 @@ var require_getAllKeys = __commonJS({
|
|
|
1710
1619
|
function getAllKeys(object) {
|
|
1711
1620
|
return baseGetAllKeys(object, keys, getSymbols);
|
|
1712
1621
|
}
|
|
1713
|
-
__name(getAllKeys, "getAllKeys");
|
|
1714
1622
|
module2.exports = getAllKeys;
|
|
1715
1623
|
}
|
|
1716
1624
|
});
|
|
@@ -1724,7 +1632,6 @@ var require_getAllKeysIn = __commonJS({
|
|
|
1724
1632
|
function getAllKeysIn(object) {
|
|
1725
1633
|
return baseGetAllKeys(object, keysIn, getSymbolsIn);
|
|
1726
1634
|
}
|
|
1727
|
-
__name(getAllKeysIn, "getAllKeysIn");
|
|
1728
1635
|
module2.exports = getAllKeysIn;
|
|
1729
1636
|
}
|
|
1730
1637
|
});
|
|
@@ -1792,7 +1699,7 @@ var require_getTag = __commonJS({
|
|
|
1792
1699
|
var weakMapCtorString = toSource(WeakMap);
|
|
1793
1700
|
var getTag = baseGetTag;
|
|
1794
1701
|
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
|
|
1795
|
-
getTag =
|
|
1702
|
+
getTag = function(value) {
|
|
1796
1703
|
var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
|
|
1797
1704
|
if (ctorString) {
|
|
1798
1705
|
switch (ctorString) {
|
|
@@ -1809,7 +1716,7 @@ var require_getTag = __commonJS({
|
|
|
1809
1716
|
}
|
|
1810
1717
|
}
|
|
1811
1718
|
return result;
|
|
1812
|
-
}
|
|
1719
|
+
};
|
|
1813
1720
|
}
|
|
1814
1721
|
module2.exports = getTag;
|
|
1815
1722
|
}
|
|
@@ -1828,7 +1735,6 @@ var require_initCloneArray = __commonJS({
|
|
|
1828
1735
|
}
|
|
1829
1736
|
return result;
|
|
1830
1737
|
}
|
|
1831
|
-
__name(initCloneArray, "initCloneArray");
|
|
1832
1738
|
module2.exports = initCloneArray;
|
|
1833
1739
|
}
|
|
1834
1740
|
});
|
|
@@ -1851,7 +1757,6 @@ var require_cloneArrayBuffer = __commonJS({
|
|
|
1851
1757
|
new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));
|
|
1852
1758
|
return result;
|
|
1853
1759
|
}
|
|
1854
|
-
__name(cloneArrayBuffer, "cloneArrayBuffer");
|
|
1855
1760
|
module2.exports = cloneArrayBuffer;
|
|
1856
1761
|
}
|
|
1857
1762
|
});
|
|
@@ -1864,7 +1769,6 @@ var require_cloneDataView = __commonJS({
|
|
|
1864
1769
|
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
|
1865
1770
|
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
1866
1771
|
}
|
|
1867
|
-
__name(cloneDataView, "cloneDataView");
|
|
1868
1772
|
module2.exports = cloneDataView;
|
|
1869
1773
|
}
|
|
1870
1774
|
});
|
|
@@ -1878,7 +1782,6 @@ var require_cloneRegExp = __commonJS({
|
|
|
1878
1782
|
result.lastIndex = regexp.lastIndex;
|
|
1879
1783
|
return result;
|
|
1880
1784
|
}
|
|
1881
|
-
__name(cloneRegExp, "cloneRegExp");
|
|
1882
1785
|
module2.exports = cloneRegExp;
|
|
1883
1786
|
}
|
|
1884
1787
|
});
|
|
@@ -1892,7 +1795,6 @@ var require_cloneSymbol = __commonJS({
|
|
|
1892
1795
|
function cloneSymbol(symbol) {
|
|
1893
1796
|
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
|
|
1894
1797
|
}
|
|
1895
|
-
__name(cloneSymbol, "cloneSymbol");
|
|
1896
1798
|
module2.exports = cloneSymbol;
|
|
1897
1799
|
}
|
|
1898
1800
|
});
|
|
@@ -1905,7 +1807,6 @@ var require_cloneTypedArray = __commonJS({
|
|
|
1905
1807
|
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
1906
1808
|
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
1907
1809
|
}
|
|
1908
|
-
__name(cloneTypedArray, "cloneTypedArray");
|
|
1909
1810
|
module2.exports = cloneTypedArray;
|
|
1910
1811
|
}
|
|
1911
1812
|
});
|
|
@@ -1970,7 +1871,6 @@ var require_initCloneByTag = __commonJS({
|
|
|
1970
1871
|
return cloneSymbol(object);
|
|
1971
1872
|
}
|
|
1972
1873
|
}
|
|
1973
|
-
__name(initCloneByTag, "initCloneByTag");
|
|
1974
1874
|
module2.exports = initCloneByTag;
|
|
1975
1875
|
}
|
|
1976
1876
|
});
|
|
@@ -1983,7 +1883,6 @@ var require_baseCreate = __commonJS({
|
|
|
1983
1883
|
var baseCreate = /* @__PURE__ */ function() {
|
|
1984
1884
|
function object() {
|
|
1985
1885
|
}
|
|
1986
|
-
__name(object, "object");
|
|
1987
1886
|
return function(proto) {
|
|
1988
1887
|
if (!isObject(proto)) {
|
|
1989
1888
|
return {};
|
|
@@ -2010,7 +1909,6 @@ var require_initCloneObject = __commonJS({
|
|
|
2010
1909
|
function initCloneObject(object) {
|
|
2011
1910
|
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
|
|
2012
1911
|
}
|
|
2013
|
-
__name(initCloneObject, "initCloneObject");
|
|
2014
1912
|
module2.exports = initCloneObject;
|
|
2015
1913
|
}
|
|
2016
1914
|
});
|
|
@@ -2024,7 +1922,6 @@ var require_baseIsMap = __commonJS({
|
|
|
2024
1922
|
function baseIsMap(value) {
|
|
2025
1923
|
return isObjectLike(value) && getTag(value) == mapTag;
|
|
2026
1924
|
}
|
|
2027
|
-
__name(baseIsMap, "baseIsMap");
|
|
2028
1925
|
module2.exports = baseIsMap;
|
|
2029
1926
|
}
|
|
2030
1927
|
});
|
|
@@ -2050,7 +1947,6 @@ var require_baseIsSet = __commonJS({
|
|
|
2050
1947
|
function baseIsSet(value) {
|
|
2051
1948
|
return isObjectLike(value) && getTag(value) == setTag;
|
|
2052
1949
|
}
|
|
2053
|
-
__name(baseIsSet, "baseIsSet");
|
|
2054
1950
|
module2.exports = baseIsSet;
|
|
2055
1951
|
}
|
|
2056
1952
|
});
|
|
@@ -2184,7 +2080,6 @@ var require_baseClone = __commonJS({
|
|
|
2184
2080
|
});
|
|
2185
2081
|
return result;
|
|
2186
2082
|
}
|
|
2187
|
-
__name(baseClone, "baseClone");
|
|
2188
2083
|
module2.exports = baseClone;
|
|
2189
2084
|
}
|
|
2190
2085
|
});
|
|
@@ -2198,7 +2093,6 @@ var require_cloneDeep = __commonJS({
|
|
|
2198
2093
|
function cloneDeep2(value) {
|
|
2199
2094
|
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
|
|
2200
2095
|
}
|
|
2201
|
-
__name(cloneDeep2, "cloneDeep");
|
|
2202
2096
|
module2.exports = cloneDeep2;
|
|
2203
2097
|
}
|
|
2204
2098
|
});
|
|
@@ -2254,7 +2148,6 @@ function initItem_default({ schema, resolvers, name }, item) {
|
|
|
2254
2148
|
}
|
|
2255
2149
|
return item;
|
|
2256
2150
|
}
|
|
2257
|
-
__name(initItem_default, "default");
|
|
2258
2151
|
|
|
2259
2152
|
// src/createModel/resolveParam.ts
|
|
2260
2153
|
function resolveParam_default(param) {
|
|
@@ -2263,7 +2156,6 @@ function resolveParam_default(param) {
|
|
|
2263
2156
|
if (result.default) return result.default;
|
|
2264
2157
|
return result || {};
|
|
2265
2158
|
}
|
|
2266
|
-
__name(resolveParam_default, "default");
|
|
2267
2159
|
|
|
2268
2160
|
// src/createModel/index.ts
|
|
2269
2161
|
var import_schema = require("@orion-js/schema");
|
|
@@ -2271,13 +2163,13 @@ var import_schema = require("@orion-js/schema");
|
|
|
2271
2163
|
// src/createModel/clone.ts
|
|
2272
2164
|
var import_includes = __toESM(require_includes(), 1);
|
|
2273
2165
|
var import_cloneDeep = __toESM(require_cloneDeep(), 1);
|
|
2274
|
-
var clone =
|
|
2166
|
+
var clone = (cloneInfo, options) => {
|
|
2275
2167
|
const { createModel: createModel2, getSchema, getResolvers, modelOptions } = cloneInfo;
|
|
2276
2168
|
return createModel2({
|
|
2277
2169
|
name: options.name,
|
|
2278
2170
|
clean: modelOptions.clean,
|
|
2279
2171
|
validate: modelOptions.validate,
|
|
2280
|
-
resolvers:
|
|
2172
|
+
resolvers: () => {
|
|
2281
2173
|
if (!options.extendResolvers) return getResolvers();
|
|
2282
2174
|
return {
|
|
2283
2175
|
default: {
|
|
@@ -2285,8 +2177,8 @@ var clone = /* @__PURE__ */ __name((cloneInfo, options) => {
|
|
|
2285
2177
|
...options.extendResolvers
|
|
2286
2178
|
}
|
|
2287
2179
|
};
|
|
2288
|
-
},
|
|
2289
|
-
schema:
|
|
2180
|
+
},
|
|
2181
|
+
schema: () => {
|
|
2290
2182
|
const oldSchema = (0, import_cloneDeep.default)(getSchema());
|
|
2291
2183
|
const newSchema = {};
|
|
2292
2184
|
const keys = Object.keys(oldSchema).filter((key) => {
|
|
@@ -2304,19 +2196,15 @@ var clone = /* @__PURE__ */ __name((cloneInfo, options) => {
|
|
|
2304
2196
|
newSchema[key] = field;
|
|
2305
2197
|
}
|
|
2306
2198
|
}
|
|
2307
|
-
if (!options.extendSchema) return {
|
|
2308
|
-
default: newSchema
|
|
2309
|
-
};
|
|
2199
|
+
if (!options.extendSchema) return { default: newSchema };
|
|
2310
2200
|
const clonedSchema = {
|
|
2311
2201
|
...newSchema,
|
|
2312
2202
|
...options.extendSchema
|
|
2313
2203
|
};
|
|
2314
|
-
return {
|
|
2315
|
-
|
|
2316
|
-
};
|
|
2317
|
-
}, "schema")
|
|
2204
|
+
return { default: clonedSchema };
|
|
2205
|
+
}
|
|
2318
2206
|
});
|
|
2319
|
-
}
|
|
2207
|
+
};
|
|
2320
2208
|
var clone_default = clone;
|
|
2321
2209
|
|
|
2322
2210
|
// src/createModel/modelToSchema.ts
|
|
@@ -2324,11 +2212,9 @@ var import_isArray2 = __toESM(require_isArray(), 1);
|
|
|
2324
2212
|
function isModelSchema(type) {
|
|
2325
2213
|
return type && typeof type === "object" && "__isModel" in type;
|
|
2326
2214
|
}
|
|
2327
|
-
__name(isModelSchema, "isModelSchema");
|
|
2328
2215
|
function isModelArraySchema(type) {
|
|
2329
2216
|
return type && (0, import_isArray2.default)(type) && typeof type[0] === "object" && "__isModel" in type[0];
|
|
2330
2217
|
}
|
|
2331
|
-
__name(isModelArraySchema, "isModelArraySchema");
|
|
2332
2218
|
function modelToSchema(modelSchema, { cleanSchema = true } = {}) {
|
|
2333
2219
|
const compiledSchema = {};
|
|
2334
2220
|
for (const key in modelSchema) {
|
|
@@ -2343,41 +2229,27 @@ function modelToSchema(modelSchema, { cleanSchema = true } = {}) {
|
|
|
2343
2229
|
} else if (isModelArraySchema(fieldSchema.type)) {
|
|
2344
2230
|
currNode = {
|
|
2345
2231
|
...fieldSchema,
|
|
2346
|
-
type: cleanSchema ? [
|
|
2347
|
-
fieldSchema.type[0].getCleanSchema()
|
|
2348
|
-
] : [
|
|
2349
|
-
fieldSchema.type[0].getSchema()
|
|
2350
|
-
]
|
|
2232
|
+
type: cleanSchema ? [fieldSchema.type[0].getCleanSchema()] : [fieldSchema.type[0].getSchema()]
|
|
2351
2233
|
};
|
|
2352
2234
|
} else {
|
|
2353
|
-
currNode = {
|
|
2354
|
-
...fieldSchema,
|
|
2355
|
-
type: fieldSchema.type
|
|
2356
|
-
};
|
|
2235
|
+
currNode = { ...fieldSchema, type: fieldSchema.type };
|
|
2357
2236
|
}
|
|
2358
2237
|
compiledSchema[key] = currNode;
|
|
2359
2238
|
}
|
|
2360
2239
|
return compiledSchema;
|
|
2361
2240
|
}
|
|
2362
|
-
__name(modelToSchema, "modelToSchema");
|
|
2363
2241
|
function modelToSchemaWithModel(modelSchema, model) {
|
|
2364
|
-
const schema = modelToSchema(modelSchema, {
|
|
2365
|
-
cleanSchema: !model
|
|
2366
|
-
});
|
|
2242
|
+
const schema = modelToSchema(modelSchema, { cleanSchema: !model });
|
|
2367
2243
|
if (!model) return schema;
|
|
2368
2244
|
return {
|
|
2369
2245
|
...schema,
|
|
2370
2246
|
__model: model
|
|
2371
2247
|
};
|
|
2372
2248
|
}
|
|
2373
|
-
__name(modelToSchemaWithModel, "modelToSchemaWithModel");
|
|
2374
2249
|
function modelToSchemaClean(modelSchema) {
|
|
2375
|
-
const schema = modelToSchema(modelSchema, {
|
|
2376
|
-
cleanSchema: true
|
|
2377
|
-
});
|
|
2250
|
+
const schema = modelToSchema(modelSchema, { cleanSchema: true });
|
|
2378
2251
|
return schema;
|
|
2379
2252
|
}
|
|
2380
|
-
__name(modelToSchemaClean, "modelToSchemaClean");
|
|
2381
2253
|
|
|
2382
2254
|
// src/createModel/index.ts
|
|
2383
2255
|
function createModel(modelOptions) {
|
|
@@ -2385,7 +2257,7 @@ function createModel(modelOptions) {
|
|
|
2385
2257
|
let resolvedSchema = null;
|
|
2386
2258
|
let resolvedCleanSchema = null;
|
|
2387
2259
|
let resolvedResolvers = null;
|
|
2388
|
-
const getSchema =
|
|
2260
|
+
const getSchema = () => {
|
|
2389
2261
|
if (!modelOptions.schema) return {};
|
|
2390
2262
|
if (resolvedSchema) return resolvedSchema;
|
|
2391
2263
|
const schema = resolveParam_default(modelOptions.schema);
|
|
@@ -2397,8 +2269,8 @@ function createModel(modelOptions) {
|
|
|
2397
2269
|
resolvedSchema.__clean = modelOptions.validate;
|
|
2398
2270
|
}
|
|
2399
2271
|
return resolvedSchema;
|
|
2400
|
-
}
|
|
2401
|
-
const getCleanSchema =
|
|
2272
|
+
};
|
|
2273
|
+
const getCleanSchema = () => {
|
|
2402
2274
|
if (!modelOptions.schema) return {};
|
|
2403
2275
|
if (resolvedCleanSchema) return resolvedCleanSchema;
|
|
2404
2276
|
const schema = resolveParam_default(modelOptions.schema);
|
|
@@ -2410,22 +2282,18 @@ function createModel(modelOptions) {
|
|
|
2410
2282
|
resolvedCleanSchema.__clean = modelOptions.validate;
|
|
2411
2283
|
}
|
|
2412
2284
|
return resolvedCleanSchema;
|
|
2413
|
-
}
|
|
2414
|
-
const getResolvers =
|
|
2285
|
+
};
|
|
2286
|
+
const getResolvers = () => {
|
|
2415
2287
|
if (!modelOptions.resolvers) return {};
|
|
2416
2288
|
if (resolvedResolvers) return resolvedResolvers;
|
|
2417
2289
|
resolvedResolvers = resolveParam_default(modelOptions.resolvers);
|
|
2418
2290
|
return resolvedResolvers;
|
|
2419
|
-
}
|
|
2420
|
-
const modelInitItem =
|
|
2291
|
+
};
|
|
2292
|
+
const modelInitItem = (item) => {
|
|
2421
2293
|
const schema = getSchema();
|
|
2422
2294
|
const resolvers = getResolvers();
|
|
2423
|
-
return initItem_default({
|
|
2424
|
-
|
|
2425
|
-
resolvers,
|
|
2426
|
-
name
|
|
2427
|
-
}, item);
|
|
2428
|
-
}, "modelInitItem");
|
|
2295
|
+
return initItem_default({ schema, resolvers, name }, item);
|
|
2296
|
+
};
|
|
2429
2297
|
const model = {
|
|
2430
2298
|
__isModel: true,
|
|
2431
2299
|
name,
|
|
@@ -2433,33 +2301,35 @@ function createModel(modelOptions) {
|
|
|
2433
2301
|
getCleanSchema,
|
|
2434
2302
|
getResolvers,
|
|
2435
2303
|
initItem: modelInitItem,
|
|
2436
|
-
validate:
|
|
2304
|
+
validate: async (doc) => {
|
|
2437
2305
|
const schema = getSchema();
|
|
2438
2306
|
return await (0, import_schema.validate)(schema, doc);
|
|
2439
|
-
},
|
|
2440
|
-
clean:
|
|
2307
|
+
},
|
|
2308
|
+
clean: async (doc) => {
|
|
2441
2309
|
const schema = getSchema();
|
|
2442
2310
|
return await (0, import_schema.clean)(schema, doc);
|
|
2443
|
-
},
|
|
2444
|
-
cleanAndValidate:
|
|
2311
|
+
},
|
|
2312
|
+
cleanAndValidate: async (doc) => {
|
|
2445
2313
|
const schema = getSchema();
|
|
2446
2314
|
const cleaned = await (0, import_schema.clean)(schema, doc);
|
|
2447
2315
|
await (0, import_schema.validate)(schema, cleaned);
|
|
2448
2316
|
return cleaned;
|
|
2449
|
-
},
|
|
2450
|
-
clone:
|
|
2451
|
-
return clone_default(
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2317
|
+
},
|
|
2318
|
+
clone: (cloneOptions) => {
|
|
2319
|
+
return clone_default(
|
|
2320
|
+
{
|
|
2321
|
+
createModel,
|
|
2322
|
+
getSchema,
|
|
2323
|
+
getResolvers,
|
|
2324
|
+
modelOptions
|
|
2325
|
+
},
|
|
2326
|
+
cloneOptions
|
|
2327
|
+
);
|
|
2328
|
+
},
|
|
2458
2329
|
type: null
|
|
2459
2330
|
};
|
|
2460
2331
|
return model;
|
|
2461
2332
|
}
|
|
2462
|
-
__name(createModel, "createModel");
|
|
2463
2333
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2464
2334
|
0 && (module.exports = {
|
|
2465
2335
|
createModel,
|