@fmdevui/fm-dev 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/es/core/hook/useVxeTableOptionsHook.d.ts +3362 -0
- package/es/core/index.d.ts +2 -0
- package/es/core/ui/loading/index.d.ts +9 -0
- package/es/index.mjs +2 -0
- package/es/packages/core/hook/useVxeTableOptionsHook.mjs +83 -0
- package/es/packages/core/index.mjs +2 -0
- package/es/packages/core/ui/loading/index.mjs +40 -0
- package/index.js +2383 -182
- package/index.min.js +37 -23
- package/index.min.mjs +37 -23
- package/index.mjs +2384 -185
- package/lib/core/hook/useVxeTableOptionsHook.d.ts +3362 -0
- package/lib/core/index.d.ts +2 -0
- package/lib/core/ui/loading/index.d.ts +9 -0
- package/lib/index.js +45 -41
- package/lib/packages/core/hook/useVxeTableOptionsHook.js +85 -0
- package/lib/packages/core/index.js +45 -41
- package/lib/packages/core/ui/loading/index.js +42 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! fm-dev v1.0.
|
|
2
|
-
import { defineComponent, ref, createElementBlock, openBlock, createElementVNode, effectScope, shallowRef, computed, watch, isRef as isRef$1, getCurrentInstance, h, Fragment, inject, onMounted, onUnmounted, createVNode, Text, markRaw, toRaw as toRaw$1, hasInjectionContext, unref, reactive, isReactive as isReactive$1, toRef,
|
|
1
|
+
/*! fm-dev v1.0.10 */
|
|
2
|
+
import { defineComponent, ref, createElementBlock, openBlock, createElementVNode, nextTick, effectScope, shallowRef, computed, watch, isRef as isRef$1, getCurrentInstance, h, Fragment, inject, onMounted, onUnmounted, createVNode, Text, markRaw, toRaw as toRaw$1, hasInjectionContext, unref, reactive, isReactive as isReactive$1, toRef, getCurrentScope, onScopeDispose, toRefs, withDirectives, resolveDirective } from 'vue';
|
|
3
3
|
import crypto from 'crypto';
|
|
4
4
|
import require$$0 from 'url';
|
|
5
5
|
import require$$1 from 'http';
|
|
@@ -8,7 +8,7 @@ import util from 'util';
|
|
|
8
8
|
import stream, { Readable } from 'stream';
|
|
9
9
|
import require$$4 from 'assert';
|
|
10
10
|
import zlib from 'zlib';
|
|
11
|
-
import { ElMessage } from 'element-plus';
|
|
11
|
+
import { ElMessage, dayjs } from 'element-plus';
|
|
12
12
|
|
|
13
13
|
const makeInstaller = (components = []) => {
|
|
14
14
|
const install = (app) => {
|
|
@@ -51,6 +51,43 @@ const plugins = [
|
|
|
51
51
|
|
|
52
52
|
var installer = makeInstaller([...plugins]);
|
|
53
53
|
|
|
54
|
+
const NextLoading = {
|
|
55
|
+
// 创建 loading
|
|
56
|
+
start: () => {
|
|
57
|
+
const bodys = document.body;
|
|
58
|
+
const div = document.createElement("div");
|
|
59
|
+
div.setAttribute("class", "loading-next");
|
|
60
|
+
const htmls = `
|
|
61
|
+
<div class="loading-next-box">
|
|
62
|
+
<div class="loading-next-box-warp">
|
|
63
|
+
<div class="loading-next-box-item"></div>
|
|
64
|
+
<div class="loading-next-box-item"></div>
|
|
65
|
+
<div class="loading-next-box-item"></div>
|
|
66
|
+
<div class="loading-next-box-item"></div>
|
|
67
|
+
<div class="loading-next-box-item"></div>
|
|
68
|
+
<div class="loading-next-box-item"></div>
|
|
69
|
+
<div class="loading-next-box-item"></div>
|
|
70
|
+
<div class="loading-next-box-item"></div>
|
|
71
|
+
<div class="loading-next-box-item"></div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
`;
|
|
75
|
+
div.innerHTML = htmls;
|
|
76
|
+
bodys.insertBefore(div, bodys.childNodes[0]);
|
|
77
|
+
window.nextLoading = true;
|
|
78
|
+
},
|
|
79
|
+
// 移除 loading
|
|
80
|
+
done: (time = 0) => {
|
|
81
|
+
nextTick(() => {
|
|
82
|
+
setTimeout(() => {
|
|
83
|
+
window.nextLoading = false;
|
|
84
|
+
const el = document.querySelector(".loading-next");
|
|
85
|
+
el?.parentNode?.removeChild(el);
|
|
86
|
+
}, time);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
54
91
|
function bind(fn, thisArg) {
|
|
55
92
|
return function wrap() {
|
|
56
93
|
return fn.apply(thisArg, arguments);
|
|
@@ -82,7 +119,7 @@ const typeOfTest = type => thing => typeof thing === type;
|
|
|
82
119
|
*
|
|
83
120
|
* @returns {boolean} True if value is an Array, otherwise false
|
|
84
121
|
*/
|
|
85
|
-
const {isArray: isArray$
|
|
122
|
+
const {isArray: isArray$3} = Array;
|
|
86
123
|
|
|
87
124
|
/**
|
|
88
125
|
* Determine if a value is undefined
|
|
@@ -100,9 +137,9 @@ const isUndefined$1 = typeOfTest('undefined');
|
|
|
100
137
|
*
|
|
101
138
|
* @returns {boolean} True if value is a Buffer, otherwise false
|
|
102
139
|
*/
|
|
103
|
-
function isBuffer(val) {
|
|
140
|
+
function isBuffer$1(val) {
|
|
104
141
|
return val !== null && !isUndefined$1(val) && val.constructor !== null && !isUndefined$1(val.constructor)
|
|
105
|
-
&& isFunction$
|
|
142
|
+
&& isFunction$2(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
|
106
143
|
}
|
|
107
144
|
|
|
108
145
|
/**
|
|
@@ -147,7 +184,7 @@ const isString$2 = typeOfTest('string');
|
|
|
147
184
|
* @param {*} val The value to test
|
|
148
185
|
* @returns {boolean} True if value is a Function, otherwise false
|
|
149
186
|
*/
|
|
150
|
-
const isFunction$
|
|
187
|
+
const isFunction$2 = typeOfTest('function');
|
|
151
188
|
|
|
152
189
|
/**
|
|
153
190
|
* Determine if a value is a Number
|
|
@@ -165,7 +202,7 @@ const isNumber$2 = typeOfTest('number');
|
|
|
165
202
|
*
|
|
166
203
|
* @returns {boolean} True if value is an Object, otherwise false
|
|
167
204
|
*/
|
|
168
|
-
const isObject$
|
|
205
|
+
const isObject$2 = (thing) => thing !== null && typeof thing === 'object';
|
|
169
206
|
|
|
170
207
|
/**
|
|
171
208
|
* Determine if a value is a Boolean
|
|
@@ -182,7 +219,7 @@ const isBoolean$2 = thing => thing === true || thing === false;
|
|
|
182
219
|
*
|
|
183
220
|
* @returns {boolean} True if value is a plain Object, otherwise false
|
|
184
221
|
*/
|
|
185
|
-
const isPlainObject$
|
|
222
|
+
const isPlainObject$3 = (val) => {
|
|
186
223
|
if (kindOf(val) !== 'object') {
|
|
187
224
|
return false;
|
|
188
225
|
}
|
|
@@ -234,7 +271,7 @@ const isFileList = kindOfTest('FileList');
|
|
|
234
271
|
*
|
|
235
272
|
* @returns {boolean} True if value is a Stream, otherwise false
|
|
236
273
|
*/
|
|
237
|
-
const isStream = (val) => isObject$
|
|
274
|
+
const isStream = (val) => isObject$2(val) && isFunction$2(val.pipe);
|
|
238
275
|
|
|
239
276
|
/**
|
|
240
277
|
* Determine if a value is a FormData
|
|
@@ -247,10 +284,10 @@ const isFormData = (thing) => {
|
|
|
247
284
|
let kind;
|
|
248
285
|
return thing && (
|
|
249
286
|
(typeof FormData === 'function' && thing instanceof FormData) || (
|
|
250
|
-
isFunction$
|
|
287
|
+
isFunction$2(thing.append) && (
|
|
251
288
|
(kind = kindOf(thing)) === 'formdata' ||
|
|
252
289
|
// detect form-data instance
|
|
253
|
-
(kind === 'object' && isFunction$
|
|
290
|
+
(kind === 'object' && isFunction$2(thing.toString) && thing.toString() === '[object FormData]')
|
|
254
291
|
)
|
|
255
292
|
)
|
|
256
293
|
)
|
|
@@ -307,7 +344,7 @@ function forEach$1(obj, fn, {allOwnKeys = false} = {}) {
|
|
|
307
344
|
obj = [obj];
|
|
308
345
|
}
|
|
309
346
|
|
|
310
|
-
if (isArray$
|
|
347
|
+
if (isArray$3(obj)) {
|
|
311
348
|
// Iterate over array values
|
|
312
349
|
for (i = 0, l = obj.length; i < l; i++) {
|
|
313
350
|
fn.call(null, obj[i], i, obj);
|
|
@@ -365,16 +402,16 @@ const isContextDefined = (context) => !isUndefined$1(context) && context !== _gl
|
|
|
365
402
|
*
|
|
366
403
|
* @returns {Object} Result of all merge properties
|
|
367
404
|
*/
|
|
368
|
-
function merge(/* obj1, obj2, obj3, ... */) {
|
|
405
|
+
function merge$1(/* obj1, obj2, obj3, ... */) {
|
|
369
406
|
const {caseless} = isContextDefined(this) && this || {};
|
|
370
407
|
const result = {};
|
|
371
408
|
const assignValue = (val, key) => {
|
|
372
409
|
const targetKey = caseless && findKey(result, key) || key;
|
|
373
|
-
if (isPlainObject$
|
|
374
|
-
result[targetKey] = merge(result[targetKey], val);
|
|
375
|
-
} else if (isPlainObject$
|
|
376
|
-
result[targetKey] = merge({}, val);
|
|
377
|
-
} else if (isArray$
|
|
410
|
+
if (isPlainObject$3(result[targetKey]) && isPlainObject$3(val)) {
|
|
411
|
+
result[targetKey] = merge$1(result[targetKey], val);
|
|
412
|
+
} else if (isPlainObject$3(val)) {
|
|
413
|
+
result[targetKey] = merge$1({}, val);
|
|
414
|
+
} else if (isArray$3(val)) {
|
|
378
415
|
result[targetKey] = val.slice();
|
|
379
416
|
} else {
|
|
380
417
|
result[targetKey] = val;
|
|
@@ -399,7 +436,7 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
399
436
|
*/
|
|
400
437
|
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
401
438
|
forEach$1(b, (val, key) => {
|
|
402
|
-
if (thisArg && isFunction$
|
|
439
|
+
if (thisArg && isFunction$2(val)) {
|
|
403
440
|
a[key] = bind(val, thisArg);
|
|
404
441
|
} else {
|
|
405
442
|
a[key] = val;
|
|
@@ -504,7 +541,7 @@ const endsWith = (str, searchString, position) => {
|
|
|
504
541
|
*/
|
|
505
542
|
const toArray = (thing) => {
|
|
506
543
|
if (!thing) return null;
|
|
507
|
-
if (isArray$
|
|
544
|
+
if (isArray$3(thing)) return thing;
|
|
508
545
|
let i = thing.length;
|
|
509
546
|
if (!isNumber$2(i)) return null;
|
|
510
547
|
const arr = new Array(i);
|
|
@@ -523,7 +560,7 @@ const toArray = (thing) => {
|
|
|
523
560
|
* @returns {Array}
|
|
524
561
|
*/
|
|
525
562
|
// eslint-disable-next-line func-names
|
|
526
|
-
const isTypedArray$
|
|
563
|
+
const isTypedArray$2 = (TypedArray => {
|
|
527
564
|
// eslint-disable-next-line func-names
|
|
528
565
|
return thing => {
|
|
529
566
|
return TypedArray && thing instanceof TypedArray;
|
|
@@ -582,7 +619,7 @@ const toCamelCase = str => {
|
|
|
582
619
|
};
|
|
583
620
|
|
|
584
621
|
/* Creating a function that will check if an object has a property. */
|
|
585
|
-
const hasOwnProperty$
|
|
622
|
+
const hasOwnProperty$9 = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
|
|
586
623
|
|
|
587
624
|
/**
|
|
588
625
|
* Determine if a value is a RegExp object
|
|
@@ -615,13 +652,13 @@ const reduceDescriptors = (obj, reducer) => {
|
|
|
615
652
|
const freezeMethods = (obj) => {
|
|
616
653
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
617
654
|
// skip restricted props in strict mode
|
|
618
|
-
if (isFunction$
|
|
655
|
+
if (isFunction$2(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
619
656
|
return false;
|
|
620
657
|
}
|
|
621
658
|
|
|
622
659
|
const value = obj[name];
|
|
623
660
|
|
|
624
|
-
if (!isFunction$
|
|
661
|
+
if (!isFunction$2(value)) return;
|
|
625
662
|
|
|
626
663
|
descriptor.enumerable = false;
|
|
627
664
|
|
|
@@ -647,7 +684,7 @@ const toObjectSet = (arrayOrString, delimiter) => {
|
|
|
647
684
|
});
|
|
648
685
|
};
|
|
649
686
|
|
|
650
|
-
isArray$
|
|
687
|
+
isArray$3(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
|
|
651
688
|
|
|
652
689
|
return obj;
|
|
653
690
|
};
|
|
@@ -666,7 +703,7 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
|
666
703
|
* @returns {boolean}
|
|
667
704
|
*/
|
|
668
705
|
function isSpecCompliantForm(thing) {
|
|
669
|
-
return !!(thing && isFunction$
|
|
706
|
+
return !!(thing && isFunction$2(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
|
|
670
707
|
}
|
|
671
708
|
|
|
672
709
|
const toJSONObject = (obj) => {
|
|
@@ -674,14 +711,14 @@ const toJSONObject = (obj) => {
|
|
|
674
711
|
|
|
675
712
|
const visit = (source, i) => {
|
|
676
713
|
|
|
677
|
-
if (isObject$
|
|
714
|
+
if (isObject$2(source)) {
|
|
678
715
|
if (stack.indexOf(source) >= 0) {
|
|
679
716
|
return;
|
|
680
717
|
}
|
|
681
718
|
|
|
682
719
|
if(!('toJSON' in source)) {
|
|
683
720
|
stack[i] = source;
|
|
684
|
-
const target = isArray$
|
|
721
|
+
const target = isArray$3(source) ? [] : {};
|
|
685
722
|
|
|
686
723
|
forEach$1(source, (value, key) => {
|
|
687
724
|
const reducedValue = visit(value, i + 1);
|
|
@@ -703,7 +740,7 @@ const toJSONObject = (obj) => {
|
|
|
703
740
|
const isAsyncFn = kindOfTest('AsyncFunction');
|
|
704
741
|
|
|
705
742
|
const isThenable = (thing) =>
|
|
706
|
-
thing && (isObject$
|
|
743
|
+
thing && (isObject$2(thing) || isFunction$2(thing)) && isFunction$2(thing.then) && isFunction$2(thing.catch);
|
|
707
744
|
|
|
708
745
|
// original code
|
|
709
746
|
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
@@ -727,7 +764,7 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
|
727
764
|
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
728
765
|
})(
|
|
729
766
|
typeof setImmediate === 'function',
|
|
730
|
-
isFunction$
|
|
767
|
+
isFunction$2(_global$1.postMessage)
|
|
731
768
|
);
|
|
732
769
|
|
|
733
770
|
const asap = typeof queueMicrotask !== 'undefined' ?
|
|
@@ -736,20 +773,20 @@ const asap = typeof queueMicrotask !== 'undefined' ?
|
|
|
736
773
|
// *********************
|
|
737
774
|
|
|
738
775
|
|
|
739
|
-
const isIterable = (thing) => thing != null && isFunction$
|
|
776
|
+
const isIterable = (thing) => thing != null && isFunction$2(thing[iterator]);
|
|
740
777
|
|
|
741
778
|
|
|
742
779
|
var utils$1 = {
|
|
743
|
-
isArray: isArray$
|
|
780
|
+
isArray: isArray$3,
|
|
744
781
|
isArrayBuffer,
|
|
745
|
-
isBuffer,
|
|
782
|
+
isBuffer: isBuffer$1,
|
|
746
783
|
isFormData,
|
|
747
784
|
isArrayBufferView,
|
|
748
785
|
isString: isString$2,
|
|
749
786
|
isNumber: isNumber$2,
|
|
750
787
|
isBoolean: isBoolean$2,
|
|
751
|
-
isObject: isObject$
|
|
752
|
-
isPlainObject: isPlainObject$
|
|
788
|
+
isObject: isObject$2,
|
|
789
|
+
isPlainObject: isPlainObject$3,
|
|
753
790
|
isReadableStream,
|
|
754
791
|
isRequest,
|
|
755
792
|
isResponse,
|
|
@@ -759,13 +796,13 @@ var utils$1 = {
|
|
|
759
796
|
isFile,
|
|
760
797
|
isBlob,
|
|
761
798
|
isRegExp: isRegExp$2,
|
|
762
|
-
isFunction: isFunction$
|
|
799
|
+
isFunction: isFunction$2,
|
|
763
800
|
isStream,
|
|
764
801
|
isURLSearchParams,
|
|
765
|
-
isTypedArray: isTypedArray$
|
|
802
|
+
isTypedArray: isTypedArray$2,
|
|
766
803
|
isFileList,
|
|
767
804
|
forEach: forEach$1,
|
|
768
|
-
merge,
|
|
805
|
+
merge: merge$1,
|
|
769
806
|
extend,
|
|
770
807
|
trim,
|
|
771
808
|
stripBOM,
|
|
@@ -778,8 +815,8 @@ var utils$1 = {
|
|
|
778
815
|
forEachEntry,
|
|
779
816
|
matchAll,
|
|
780
817
|
isHTMLForm,
|
|
781
|
-
hasOwnProperty: hasOwnProperty$
|
|
782
|
-
hasOwnProp: hasOwnProperty$
|
|
818
|
+
hasOwnProperty: hasOwnProperty$9,
|
|
819
|
+
hasOwnProp: hasOwnProperty$9, // an alias to avoid ESLint no-prototype-builtins detection
|
|
783
820
|
reduceDescriptors,
|
|
784
821
|
freezeMethods,
|
|
785
822
|
toObjectSet,
|
|
@@ -16097,7 +16134,7 @@ if ((process.env.NODE_ENV !== 'production')) {
|
|
|
16097
16134
|
const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
|
|
16098
16135
|
/* eslint-disable */
|
|
16099
16136
|
function format$1(message, ...args) {
|
|
16100
|
-
if (args.length === 1 && isObject(args[0])) {
|
|
16137
|
+
if (args.length === 1 && isObject$1(args[0])) {
|
|
16101
16138
|
args = args[0];
|
|
16102
16139
|
}
|
|
16103
16140
|
if (!args || !args.hasOwnProperty) {
|
|
@@ -16116,7 +16153,7 @@ const friendlyJSONstringify = (json) => JSON.stringify(json)
|
|
|
16116
16153
|
const isNumber$1 = (val) => typeof val === 'number' && isFinite(val);
|
|
16117
16154
|
const isDate$1 = (val) => toTypeString(val) === '[object Date]';
|
|
16118
16155
|
const isRegExp$1 = (val) => toTypeString(val) === '[object RegExp]';
|
|
16119
|
-
const isEmptyObject$1 = (val) => isPlainObject$
|
|
16156
|
+
const isEmptyObject$1 = (val) => isPlainObject$2(val) && Object.keys(val).length === 0;
|
|
16120
16157
|
const assign$2 = Object.assign;
|
|
16121
16158
|
const _create = Object.create;
|
|
16122
16159
|
const create$1 = (obj = null) => _create(obj);
|
|
@@ -16142,9 +16179,9 @@ function escapeHtml(rawText) {
|
|
|
16142
16179
|
.replace(/"/g, '"')
|
|
16143
16180
|
.replace(/'/g, ''');
|
|
16144
16181
|
}
|
|
16145
|
-
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
16182
|
+
const hasOwnProperty$8 = Object.prototype.hasOwnProperty;
|
|
16146
16183
|
function hasOwn(obj, key) {
|
|
16147
|
-
return hasOwnProperty.call(obj, key);
|
|
16184
|
+
return hasOwnProperty$8.call(obj, key);
|
|
16148
16185
|
}
|
|
16149
16186
|
/* eslint-enable */
|
|
16150
16187
|
/**
|
|
@@ -16154,24 +16191,24 @@ function hasOwn(obj, key) {
|
|
|
16154
16191
|
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts
|
|
16155
16192
|
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts
|
|
16156
16193
|
*/
|
|
16157
|
-
const isArray$
|
|
16158
|
-
const isFunction = (val) => typeof val === 'function';
|
|
16194
|
+
const isArray$2 = Array.isArray;
|
|
16195
|
+
const isFunction$1 = (val) => typeof val === 'function';
|
|
16159
16196
|
const isString$1 = (val) => typeof val === 'string';
|
|
16160
16197
|
const isBoolean$1 = (val) => typeof val === 'boolean';
|
|
16161
16198
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16162
|
-
const isObject = (val) => val !== null && typeof val === 'object';
|
|
16199
|
+
const isObject$1 = (val) => val !== null && typeof val === 'object';
|
|
16163
16200
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16164
16201
|
const isPromise = (val) => {
|
|
16165
|
-
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
16202
|
+
return isObject$1(val) && isFunction$1(val.then) && isFunction$1(val.catch);
|
|
16166
16203
|
};
|
|
16167
|
-
const objectToString = Object.prototype.toString;
|
|
16168
|
-
const toTypeString = (value) => objectToString.call(value);
|
|
16169
|
-
const isPlainObject$
|
|
16204
|
+
const objectToString$1 = Object.prototype.toString;
|
|
16205
|
+
const toTypeString = (value) => objectToString$1.call(value);
|
|
16206
|
+
const isPlainObject$2 = (val) => toTypeString(val) === '[object Object]';
|
|
16170
16207
|
// for converting list and named values to displayed strings.
|
|
16171
16208
|
const toDisplayString = (val) => {
|
|
16172
16209
|
return val == null
|
|
16173
16210
|
? ''
|
|
16174
|
-
: isArray$
|
|
16211
|
+
: isArray$2(val) || (isPlainObject$2(val) && val.toString === objectToString$1)
|
|
16175
16212
|
? JSON.stringify(val, null, 2)
|
|
16176
16213
|
: String(val);
|
|
16177
16214
|
};
|
|
@@ -16270,7 +16307,7 @@ function createEmitter() {
|
|
|
16270
16307
|
return emitter;
|
|
16271
16308
|
}
|
|
16272
16309
|
|
|
16273
|
-
const isNotObjectOrIsArray = (val) => !isObject(val) || isArray$
|
|
16310
|
+
const isNotObjectOrIsArray = (val) => !isObject$1(val) || isArray$2(val);
|
|
16274
16311
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16275
16312
|
function deepCopy(src, des) {
|
|
16276
16313
|
// src and des should both be objects, and none of them can be a array
|
|
@@ -16287,7 +16324,7 @@ function deepCopy(src, des) {
|
|
|
16287
16324
|
}
|
|
16288
16325
|
// if src[key] is an object/array, set des[key]
|
|
16289
16326
|
// to empty object/array to prevent setting by reference
|
|
16290
|
-
if (isObject(src[key]) && !isObject(des[key])) {
|
|
16327
|
+
if (isObject$1(src[key]) && !isObject$1(des[key])) {
|
|
16291
16328
|
des[key] = Array.isArray(src[key]) ? [] : create$1();
|
|
16292
16329
|
}
|
|
16293
16330
|
if (isNotObjectOrIsArray(des[key]) || isNotObjectOrIsArray(src[key])) {
|
|
@@ -17830,7 +17867,7 @@ function initFeatureFlags$1() {
|
|
|
17830
17867
|
}
|
|
17831
17868
|
|
|
17832
17869
|
function isMessageAST(val) {
|
|
17833
|
-
return (isObject(val) &&
|
|
17870
|
+
return (isObject$1(val) &&
|
|
17834
17871
|
resolveType(val) === 0 &&
|
|
17835
17872
|
(hasOwn(val, 'b') || hasOwn(val, 'body')));
|
|
17836
17873
|
}
|
|
@@ -18111,7 +18148,7 @@ function resolveLocale(locale) {
|
|
|
18111
18148
|
return locale;
|
|
18112
18149
|
}
|
|
18113
18150
|
else {
|
|
18114
|
-
if (isFunction(locale)) {
|
|
18151
|
+
if (isFunction$1(locale)) {
|
|
18115
18152
|
if (locale.resolvedOnce && _resolveLocale != null) {
|
|
18116
18153
|
return _resolveLocale;
|
|
18117
18154
|
}
|
|
@@ -18151,9 +18188,9 @@ function fallbackWithSimple(ctx, fallback, start) {
|
|
|
18151
18188
|
// prettier-ignore
|
|
18152
18189
|
return [...new Set([
|
|
18153
18190
|
start,
|
|
18154
|
-
...(isArray$
|
|
18191
|
+
...(isArray$2(fallback)
|
|
18155
18192
|
? fallback
|
|
18156
|
-
: isObject(fallback)
|
|
18193
|
+
: isObject$1(fallback)
|
|
18157
18194
|
? Object.keys(fallback)
|
|
18158
18195
|
: isString$1(fallback)
|
|
18159
18196
|
? [fallback]
|
|
@@ -18188,19 +18225,19 @@ function fallbackWithLocaleChain(ctx, fallback, start) {
|
|
|
18188
18225
|
// first block defined by start
|
|
18189
18226
|
let block = [start];
|
|
18190
18227
|
// while any intervening block found
|
|
18191
|
-
while (isArray$
|
|
18228
|
+
while (isArray$2(block)) {
|
|
18192
18229
|
block = appendBlockToChain(chain, block, fallback);
|
|
18193
18230
|
}
|
|
18194
18231
|
// prettier-ignore
|
|
18195
18232
|
// last block defined by default
|
|
18196
|
-
const defaults = isArray$
|
|
18233
|
+
const defaults = isArray$2(fallback) || !isPlainObject$2(fallback)
|
|
18197
18234
|
? fallback
|
|
18198
18235
|
: fallback['default']
|
|
18199
18236
|
? fallback['default']
|
|
18200
18237
|
: null;
|
|
18201
18238
|
// convert defaults to array
|
|
18202
18239
|
block = isString$1(defaults) ? [defaults] : defaults;
|
|
18203
|
-
if (isArray$
|
|
18240
|
+
if (isArray$2(block)) {
|
|
18204
18241
|
appendBlockToChain(chain, block, false);
|
|
18205
18242
|
}
|
|
18206
18243
|
context.__localeChainCache.set(startLocale, chain);
|
|
@@ -18235,7 +18272,7 @@ function appendItemToChain(chain, target, blocks) {
|
|
|
18235
18272
|
follow = target[target.length - 1] !== '!';
|
|
18236
18273
|
const locale = target.replace(/!/g, '');
|
|
18237
18274
|
chain.push(locale);
|
|
18238
|
-
if ((isArray$
|
|
18275
|
+
if ((isArray$2(blocks) || isPlainObject$2(blocks)) &&
|
|
18239
18276
|
blocks[locale] // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
18240
18277
|
) {
|
|
18241
18278
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -18464,7 +18501,7 @@ const cache = new Map();
|
|
|
18464
18501
|
* @VueI18nGeneral
|
|
18465
18502
|
*/
|
|
18466
18503
|
function resolveWithKeyValue(obj, path) {
|
|
18467
|
-
return isObject(obj) ? obj[path] : null;
|
|
18504
|
+
return isObject$1(obj) ? obj[path] : null;
|
|
18468
18505
|
}
|
|
18469
18506
|
/**
|
|
18470
18507
|
* message resolver
|
|
@@ -18481,7 +18518,7 @@ function resolveWithKeyValue(obj, path) {
|
|
|
18481
18518
|
*/
|
|
18482
18519
|
function resolveValue(obj, path) {
|
|
18483
18520
|
// check object
|
|
18484
|
-
if (!isObject(obj)) {
|
|
18521
|
+
if (!isObject$1(obj)) {
|
|
18485
18522
|
return null;
|
|
18486
18523
|
}
|
|
18487
18524
|
// parse path
|
|
@@ -18514,7 +18551,7 @@ function resolveValue(obj, path) {
|
|
|
18514
18551
|
if (val === undefined) {
|
|
18515
18552
|
return null;
|
|
18516
18553
|
}
|
|
18517
|
-
if (isFunction(last)) {
|
|
18554
|
+
if (isFunction$1(last)) {
|
|
18518
18555
|
return null;
|
|
18519
18556
|
}
|
|
18520
18557
|
last = val;
|
|
@@ -18563,7 +18600,7 @@ function getDefaultLinkedModifiers() {
|
|
|
18563
18600
|
// prettier-ignore
|
|
18564
18601
|
return type === 'text' && isString$1(val)
|
|
18565
18602
|
? val.toUpperCase()
|
|
18566
|
-
: type === 'vnode' && isObject(val) && '__v_isVNode' in val
|
|
18603
|
+
: type === 'vnode' && isObject$1(val) && '__v_isVNode' in val
|
|
18567
18604
|
? val.children.toUpperCase()
|
|
18568
18605
|
: val;
|
|
18569
18606
|
},
|
|
@@ -18571,7 +18608,7 @@ function getDefaultLinkedModifiers() {
|
|
|
18571
18608
|
// prettier-ignore
|
|
18572
18609
|
return type === 'text' && isString$1(val)
|
|
18573
18610
|
? val.toLowerCase()
|
|
18574
|
-
: type === 'vnode' && isObject(val) && '__v_isVNode' in val
|
|
18611
|
+
: type === 'vnode' && isObject$1(val) && '__v_isVNode' in val
|
|
18575
18612
|
? val.children.toLowerCase()
|
|
18576
18613
|
: val;
|
|
18577
18614
|
},
|
|
@@ -18579,7 +18616,7 @@ function getDefaultLinkedModifiers() {
|
|
|
18579
18616
|
// prettier-ignore
|
|
18580
18617
|
return (type === 'text' && isString$1(val)
|
|
18581
18618
|
? capitalize(val)
|
|
18582
|
-
: type === 'vnode' && isObject(val) && '__v_isVNode' in val
|
|
18619
|
+
: type === 'vnode' && isObject$1(val) && '__v_isVNode' in val
|
|
18583
18620
|
? capitalize(val.children)
|
|
18584
18621
|
: val);
|
|
18585
18622
|
}
|
|
@@ -18628,32 +18665,32 @@ const getFallbackContext = () => _fallbackContext;
|
|
|
18628
18665
|
let _cid = 0;
|
|
18629
18666
|
function createCoreContext(options = {}) {
|
|
18630
18667
|
// setup options
|
|
18631
|
-
const onWarn = isFunction(options.onWarn) ? options.onWarn : warn;
|
|
18668
|
+
const onWarn = isFunction$1(options.onWarn) ? options.onWarn : warn;
|
|
18632
18669
|
const version = isString$1(options.version) ? options.version : VERSION$1;
|
|
18633
|
-
const locale = isString$1(options.locale) || isFunction(options.locale)
|
|
18670
|
+
const locale = isString$1(options.locale) || isFunction$1(options.locale)
|
|
18634
18671
|
? options.locale
|
|
18635
18672
|
: DEFAULT_LOCALE;
|
|
18636
|
-
const _locale = isFunction(locale) ? DEFAULT_LOCALE : locale;
|
|
18637
|
-
const fallbackLocale = isArray$
|
|
18638
|
-
isPlainObject$
|
|
18673
|
+
const _locale = isFunction$1(locale) ? DEFAULT_LOCALE : locale;
|
|
18674
|
+
const fallbackLocale = isArray$2(options.fallbackLocale) ||
|
|
18675
|
+
isPlainObject$2(options.fallbackLocale) ||
|
|
18639
18676
|
isString$1(options.fallbackLocale) ||
|
|
18640
18677
|
options.fallbackLocale === false
|
|
18641
18678
|
? options.fallbackLocale
|
|
18642
18679
|
: _locale;
|
|
18643
|
-
const messages = isPlainObject$
|
|
18680
|
+
const messages = isPlainObject$2(options.messages)
|
|
18644
18681
|
? options.messages
|
|
18645
18682
|
: createResources(_locale);
|
|
18646
|
-
const datetimeFormats = isPlainObject$
|
|
18683
|
+
const datetimeFormats = isPlainObject$2(options.datetimeFormats)
|
|
18647
18684
|
? options.datetimeFormats
|
|
18648
18685
|
: createResources(_locale)
|
|
18649
18686
|
;
|
|
18650
|
-
const numberFormats = isPlainObject$
|
|
18687
|
+
const numberFormats = isPlainObject$2(options.numberFormats)
|
|
18651
18688
|
? options.numberFormats
|
|
18652
18689
|
: createResources(_locale)
|
|
18653
18690
|
;
|
|
18654
18691
|
const modifiers = assign$2(create$1(), options.modifiers, getDefaultLinkedModifiers());
|
|
18655
18692
|
const pluralRules = options.pluralRules || create$1();
|
|
18656
|
-
const missing = isFunction(options.missing) ? options.missing : null;
|
|
18693
|
+
const missing = isFunction$1(options.missing) ? options.missing : null;
|
|
18657
18694
|
const missingWarn = isBoolean$1(options.missingWarn) || isRegExp$1(options.missingWarn)
|
|
18658
18695
|
? options.missingWarn
|
|
18659
18696
|
: true;
|
|
@@ -18662,43 +18699,43 @@ function createCoreContext(options = {}) {
|
|
|
18662
18699
|
: true;
|
|
18663
18700
|
const fallbackFormat = !!options.fallbackFormat;
|
|
18664
18701
|
const unresolving = !!options.unresolving;
|
|
18665
|
-
const postTranslation = isFunction(options.postTranslation)
|
|
18702
|
+
const postTranslation = isFunction$1(options.postTranslation)
|
|
18666
18703
|
? options.postTranslation
|
|
18667
18704
|
: null;
|
|
18668
|
-
const processor = isPlainObject$
|
|
18705
|
+
const processor = isPlainObject$2(options.processor) ? options.processor : null;
|
|
18669
18706
|
const warnHtmlMessage = isBoolean$1(options.warnHtmlMessage)
|
|
18670
18707
|
? options.warnHtmlMessage
|
|
18671
18708
|
: true;
|
|
18672
18709
|
const escapeParameter = !!options.escapeParameter;
|
|
18673
|
-
const messageCompiler = isFunction(options.messageCompiler)
|
|
18710
|
+
const messageCompiler = isFunction$1(options.messageCompiler)
|
|
18674
18711
|
? options.messageCompiler
|
|
18675
18712
|
: _compiler;
|
|
18676
18713
|
if ((process.env.NODE_ENV !== 'production') &&
|
|
18677
18714
|
true &&
|
|
18678
18715
|
true &&
|
|
18679
|
-
isFunction(options.messageCompiler)) {
|
|
18716
|
+
isFunction$1(options.messageCompiler)) {
|
|
18680
18717
|
warnOnce(getWarnMessage$1(CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
|
|
18681
18718
|
}
|
|
18682
|
-
const messageResolver = isFunction(options.messageResolver)
|
|
18719
|
+
const messageResolver = isFunction$1(options.messageResolver)
|
|
18683
18720
|
? options.messageResolver
|
|
18684
18721
|
: _resolver || resolveWithKeyValue;
|
|
18685
|
-
const localeFallbacker = isFunction(options.localeFallbacker)
|
|
18722
|
+
const localeFallbacker = isFunction$1(options.localeFallbacker)
|
|
18686
18723
|
? options.localeFallbacker
|
|
18687
18724
|
: _fallbacker || fallbackWithSimple;
|
|
18688
|
-
const fallbackContext = isObject(options.fallbackContext)
|
|
18725
|
+
const fallbackContext = isObject$1(options.fallbackContext)
|
|
18689
18726
|
? options.fallbackContext
|
|
18690
18727
|
: undefined;
|
|
18691
18728
|
// setup internal options
|
|
18692
18729
|
const internalOptions = options;
|
|
18693
|
-
const __datetimeFormatters = isObject(internalOptions.__datetimeFormatters)
|
|
18730
|
+
const __datetimeFormatters = isObject$1(internalOptions.__datetimeFormatters)
|
|
18694
18731
|
? internalOptions.__datetimeFormatters
|
|
18695
18732
|
: new Map()
|
|
18696
18733
|
;
|
|
18697
|
-
const __numberFormatters = isObject(internalOptions.__numberFormatters)
|
|
18734
|
+
const __numberFormatters = isObject$1(internalOptions.__numberFormatters)
|
|
18698
18735
|
? internalOptions.__numberFormatters
|
|
18699
18736
|
: new Map()
|
|
18700
18737
|
;
|
|
18701
|
-
const __meta = isObject(internalOptions.__meta) ? internalOptions.__meta : {};
|
|
18738
|
+
const __meta = isObject$1(internalOptions.__meta) ? internalOptions.__meta : {};
|
|
18702
18739
|
_cid++;
|
|
18703
18740
|
const context = {
|
|
18704
18741
|
version,
|
|
@@ -18866,13 +18903,13 @@ function datetime(context, ...args) {
|
|
|
18866
18903
|
datetimeFormat =
|
|
18867
18904
|
datetimeFormats[targetLocale] || {};
|
|
18868
18905
|
format = datetimeFormat[key];
|
|
18869
|
-
if (isPlainObject$
|
|
18906
|
+
if (isPlainObject$2(format))
|
|
18870
18907
|
break;
|
|
18871
18908
|
handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
18872
18909
|
from = to;
|
|
18873
18910
|
}
|
|
18874
18911
|
// checking format and target locale
|
|
18875
|
-
if (!isPlainObject$
|
|
18912
|
+
if (!isPlainObject$2(format) || !isString$1(targetLocale)) {
|
|
18876
18913
|
return unresolving ? NOT_REOSLVED : key;
|
|
18877
18914
|
}
|
|
18878
18915
|
let id = `${targetLocale}__${key}`;
|
|
@@ -18953,7 +18990,7 @@ function parseDateTimeArgs(...args) {
|
|
|
18953
18990
|
if (isString$1(arg2)) {
|
|
18954
18991
|
options.key = arg2;
|
|
18955
18992
|
}
|
|
18956
|
-
else if (isPlainObject$
|
|
18993
|
+
else if (isPlainObject$2(arg2)) {
|
|
18957
18994
|
Object.keys(arg2).forEach(key => {
|
|
18958
18995
|
if (DATETIME_FORMAT_OPTIONS_KEYS.includes(key)) {
|
|
18959
18996
|
overrides[key] = arg2[key];
|
|
@@ -18966,10 +19003,10 @@ function parseDateTimeArgs(...args) {
|
|
|
18966
19003
|
if (isString$1(arg3)) {
|
|
18967
19004
|
options.locale = arg3;
|
|
18968
19005
|
}
|
|
18969
|
-
else if (isPlainObject$
|
|
19006
|
+
else if (isPlainObject$2(arg3)) {
|
|
18970
19007
|
overrides = arg3;
|
|
18971
19008
|
}
|
|
18972
|
-
if (isPlainObject$
|
|
19009
|
+
if (isPlainObject$2(arg4)) {
|
|
18973
19010
|
overrides = arg4;
|
|
18974
19011
|
}
|
|
18975
19012
|
return [options.key || '', value, options, overrides];
|
|
@@ -19041,13 +19078,13 @@ function number(context, ...args) {
|
|
|
19041
19078
|
numberFormat =
|
|
19042
19079
|
numberFormats[targetLocale] || {};
|
|
19043
19080
|
format = numberFormat[key];
|
|
19044
|
-
if (isPlainObject$
|
|
19081
|
+
if (isPlainObject$2(format))
|
|
19045
19082
|
break;
|
|
19046
19083
|
handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
19047
19084
|
from = to;
|
|
19048
19085
|
}
|
|
19049
19086
|
// checking format and target locale
|
|
19050
|
-
if (!isPlainObject$
|
|
19087
|
+
if (!isPlainObject$2(format) || !isString$1(targetLocale)) {
|
|
19051
19088
|
return unresolving ? NOT_REOSLVED : key;
|
|
19052
19089
|
}
|
|
19053
19090
|
let id = `${targetLocale}__${key}`;
|
|
@@ -19096,7 +19133,7 @@ function parseNumberArgs(...args) {
|
|
|
19096
19133
|
if (isString$1(arg2)) {
|
|
19097
19134
|
options.key = arg2;
|
|
19098
19135
|
}
|
|
19099
|
-
else if (isPlainObject$
|
|
19136
|
+
else if (isPlainObject$2(arg2)) {
|
|
19100
19137
|
Object.keys(arg2).forEach(key => {
|
|
19101
19138
|
if (NUMBER_FORMAT_OPTIONS_KEYS.includes(key)) {
|
|
19102
19139
|
overrides[key] = arg2[key];
|
|
@@ -19109,10 +19146,10 @@ function parseNumberArgs(...args) {
|
|
|
19109
19146
|
if (isString$1(arg3)) {
|
|
19110
19147
|
options.locale = arg3;
|
|
19111
19148
|
}
|
|
19112
|
-
else if (isPlainObject$
|
|
19149
|
+
else if (isPlainObject$2(arg3)) {
|
|
19113
19150
|
overrides = arg3;
|
|
19114
19151
|
}
|
|
19115
|
-
if (isPlainObject$
|
|
19152
|
+
if (isPlainObject$2(arg4)) {
|
|
19116
19153
|
overrides = arg4;
|
|
19117
19154
|
}
|
|
19118
19155
|
return [options.key || '', value, options, overrides];
|
|
@@ -19171,14 +19208,14 @@ function normalizeNamed(pluralIndex, props) {
|
|
|
19171
19208
|
function createMessageContext(options = {}) {
|
|
19172
19209
|
const locale = options.locale;
|
|
19173
19210
|
const pluralIndex = getPluralIndex(options);
|
|
19174
|
-
const pluralRule = isObject(options.pluralRules) &&
|
|
19211
|
+
const pluralRule = isObject$1(options.pluralRules) &&
|
|
19175
19212
|
isString$1(locale) &&
|
|
19176
|
-
isFunction(options.pluralRules[locale])
|
|
19213
|
+
isFunction$1(options.pluralRules[locale])
|
|
19177
19214
|
? options.pluralRules[locale]
|
|
19178
19215
|
: pluralDefault;
|
|
19179
|
-
const orgPluralRule = isObject(options.pluralRules) &&
|
|
19216
|
+
const orgPluralRule = isObject$1(options.pluralRules) &&
|
|
19180
19217
|
isString$1(locale) &&
|
|
19181
|
-
isFunction(options.pluralRules[locale])
|
|
19218
|
+
isFunction$1(options.pluralRules[locale])
|
|
19182
19219
|
? pluralDefault
|
|
19183
19220
|
: undefined;
|
|
19184
19221
|
const plural = (messages) => {
|
|
@@ -19192,9 +19229,9 @@ function createMessageContext(options = {}) {
|
|
|
19192
19229
|
const named = (key) => _named[key];
|
|
19193
19230
|
function message(key, useLinked) {
|
|
19194
19231
|
// prettier-ignore
|
|
19195
|
-
const msg = isFunction(options.messages)
|
|
19232
|
+
const msg = isFunction$1(options.messages)
|
|
19196
19233
|
? options.messages(key, !!useLinked)
|
|
19197
|
-
: isObject(options.messages)
|
|
19234
|
+
: isObject$1(options.messages)
|
|
19198
19235
|
? options.messages[key]
|
|
19199
19236
|
: false;
|
|
19200
19237
|
return !msg
|
|
@@ -19206,14 +19243,14 @@ function createMessageContext(options = {}) {
|
|
|
19206
19243
|
const _modifier = (name) => options.modifiers
|
|
19207
19244
|
? options.modifiers[name]
|
|
19208
19245
|
: DEFAULT_MODIFIER;
|
|
19209
|
-
const normalize = isPlainObject$
|
|
19246
|
+
const normalize = isPlainObject$2(options.processor) && isFunction$1(options.processor.normalize)
|
|
19210
19247
|
? options.processor.normalize
|
|
19211
19248
|
: DEFAULT_NORMALIZE;
|
|
19212
|
-
const interpolate = isPlainObject$
|
|
19213
|
-
isFunction(options.processor.interpolate)
|
|
19249
|
+
const interpolate = isPlainObject$2(options.processor) &&
|
|
19250
|
+
isFunction$1(options.processor.interpolate)
|
|
19214
19251
|
? options.processor.interpolate
|
|
19215
19252
|
: DEFAULT_INTERPOLATE;
|
|
19216
|
-
const type = isPlainObject$
|
|
19253
|
+
const type = isPlainObject$2(options.processor) && isString$1(options.processor.type)
|
|
19217
19254
|
? options.processor.type
|
|
19218
19255
|
: DEFAULT_MESSAGE_DATA_TYPE;
|
|
19219
19256
|
const linked = (key, ...args) => {
|
|
@@ -19221,7 +19258,7 @@ function createMessageContext(options = {}) {
|
|
|
19221
19258
|
let type = 'text';
|
|
19222
19259
|
let modifier = '';
|
|
19223
19260
|
if (args.length === 1) {
|
|
19224
|
-
if (isObject(arg1)) {
|
|
19261
|
+
if (isObject$1(arg1)) {
|
|
19225
19262
|
modifier = arg1.modifier || modifier;
|
|
19226
19263
|
type = arg1.type || type;
|
|
19227
19264
|
}
|
|
@@ -19240,7 +19277,7 @@ function createMessageContext(options = {}) {
|
|
|
19240
19277
|
const ret = message(key, true)(ctx);
|
|
19241
19278
|
const msg =
|
|
19242
19279
|
// The message in vnode resolved with linked are returned as an array by processor.nomalize
|
|
19243
|
-
type === 'vnode' && isArray$
|
|
19280
|
+
type === 'vnode' && isArray$2(ret) && modifier
|
|
19244
19281
|
? ret[0]
|
|
19245
19282
|
: ret;
|
|
19246
19283
|
return modifier ? _modifier(modifier)(msg, type) : msg;
|
|
@@ -19260,7 +19297,7 @@ function createMessageContext(options = {}) {
|
|
|
19260
19297
|
}
|
|
19261
19298
|
|
|
19262
19299
|
const NOOP_MESSAGE_FUNCTION = () => '';
|
|
19263
|
-
const isMessageFunction = (val) => isFunction(val);
|
|
19300
|
+
const isMessageFunction = (val) => isFunction$1(val);
|
|
19264
19301
|
// implementation of `translate` function
|
|
19265
19302
|
function translate(context, ...args) {
|
|
19266
19303
|
const { fallbackFormat, postTranslation, unresolving, messageCompiler, fallbackLocale, messages } = context;
|
|
@@ -19285,7 +19322,7 @@ function translate(context, ...args) {
|
|
|
19285
19322
|
: null;
|
|
19286
19323
|
const enableDefaultMsg = fallbackFormat ||
|
|
19287
19324
|
(defaultMsgOrKey != null &&
|
|
19288
|
-
(isString$1(defaultMsgOrKey) || isFunction(defaultMsgOrKey)));
|
|
19325
|
+
(isString$1(defaultMsgOrKey) || isFunction$1(defaultMsgOrKey)));
|
|
19289
19326
|
const locale = getLocale(context, options);
|
|
19290
19327
|
// escape params
|
|
19291
19328
|
escapeParameter && escapeParams(options);
|
|
@@ -19378,10 +19415,10 @@ function translate(context, ...args) {
|
|
|
19378
19415
|
return ret;
|
|
19379
19416
|
}
|
|
19380
19417
|
function escapeParams(options) {
|
|
19381
|
-
if (isArray$
|
|
19418
|
+
if (isArray$2(options.list)) {
|
|
19382
19419
|
options.list = options.list.map(item => isString$1(item) ? escapeHtml(item) : item);
|
|
19383
19420
|
}
|
|
19384
|
-
else if (isObject(options.named)) {
|
|
19421
|
+
else if (isObject$1(options.named)) {
|
|
19385
19422
|
Object.keys(options.named).forEach(key => {
|
|
19386
19423
|
if (isString$1(options.named[key])) {
|
|
19387
19424
|
options.named[key] = escapeHtml(options.named[key]);
|
|
@@ -19570,10 +19607,10 @@ function parseTranslateArgs(...args) {
|
|
|
19570
19607
|
else if (isString$1(arg2)) {
|
|
19571
19608
|
options.default = arg2;
|
|
19572
19609
|
}
|
|
19573
|
-
else if (isPlainObject$
|
|
19610
|
+
else if (isPlainObject$2(arg2) && !isEmptyObject$1(arg2)) {
|
|
19574
19611
|
options.named = arg2;
|
|
19575
19612
|
}
|
|
19576
|
-
else if (isArray$
|
|
19613
|
+
else if (isArray$2(arg2)) {
|
|
19577
19614
|
options.list = arg2;
|
|
19578
19615
|
}
|
|
19579
19616
|
if (isNumber$1(arg3)) {
|
|
@@ -19582,7 +19619,7 @@ function parseTranslateArgs(...args) {
|
|
|
19582
19619
|
else if (isString$1(arg3)) {
|
|
19583
19620
|
options.default = arg3;
|
|
19584
19621
|
}
|
|
19585
|
-
else if (isPlainObject$
|
|
19622
|
+
else if (isPlainObject$2(arg3)) {
|
|
19586
19623
|
assign$2(options, arg3);
|
|
19587
19624
|
}
|
|
19588
19625
|
return [key, options];
|
|
@@ -19969,7 +20006,7 @@ function getWarnMessage(code, ...args) {
|
|
|
19969
20006
|
*/
|
|
19970
20007
|
function handleFlatJson(obj) {
|
|
19971
20008
|
// check obj
|
|
19972
|
-
if (!isObject(obj)) {
|
|
20009
|
+
if (!isObject$1(obj)) {
|
|
19973
20010
|
return obj;
|
|
19974
20011
|
}
|
|
19975
20012
|
if (isMessageAST(obj)) {
|
|
@@ -19983,7 +20020,7 @@ function handleFlatJson(obj) {
|
|
|
19983
20020
|
// handle for normal json
|
|
19984
20021
|
if (!key.includes('.')) {
|
|
19985
20022
|
// recursive process value if value is also a object
|
|
19986
|
-
if (isObject(obj[key])) {
|
|
20023
|
+
if (isObject$1(obj[key])) {
|
|
19987
20024
|
handleFlatJson(obj[key]);
|
|
19988
20025
|
}
|
|
19989
20026
|
}
|
|
@@ -20001,7 +20038,7 @@ function handleFlatJson(obj) {
|
|
|
20001
20038
|
if (!(subKeys[i] in currentObj)) {
|
|
20002
20039
|
currentObj[subKeys[i]] = create$1();
|
|
20003
20040
|
}
|
|
20004
|
-
if (!isObject(currentObj[subKeys[i]])) {
|
|
20041
|
+
if (!isObject$1(currentObj[subKeys[i]])) {
|
|
20005
20042
|
(process.env.NODE_ENV !== 'production') &&
|
|
20006
20043
|
warn(getWarnMessage(I18nWarnCodes.IGNORE_OBJ_FLATTEN, {
|
|
20007
20044
|
key: subKeys[i]
|
|
@@ -20030,7 +20067,7 @@ function handleFlatJson(obj) {
|
|
|
20030
20067
|
// recursive process value if value is also a object
|
|
20031
20068
|
if (!isMessageAST(currentObj)) {
|
|
20032
20069
|
const target = currentObj[subKeys[lastIndex]];
|
|
20033
|
-
if (isObject(target)) {
|
|
20070
|
+
if (isObject$1(target)) {
|
|
20034
20071
|
handleFlatJson(target);
|
|
20035
20072
|
}
|
|
20036
20073
|
}
|
|
@@ -20041,13 +20078,13 @@ function handleFlatJson(obj) {
|
|
|
20041
20078
|
function getLocaleMessages(locale, options) {
|
|
20042
20079
|
const { messages, __i18n, messageResolver, flatJson } = options;
|
|
20043
20080
|
// prettier-ignore
|
|
20044
|
-
const ret = (isPlainObject$
|
|
20081
|
+
const ret = (isPlainObject$2(messages)
|
|
20045
20082
|
? messages
|
|
20046
|
-
: isArray$
|
|
20083
|
+
: isArray$2(__i18n)
|
|
20047
20084
|
? create$1()
|
|
20048
20085
|
: { [locale]: create$1() });
|
|
20049
20086
|
// merge locale messages of i18n custom block
|
|
20050
|
-
if (isArray$
|
|
20087
|
+
if (isArray$2(__i18n)) {
|
|
20051
20088
|
__i18n.forEach(custom => {
|
|
20052
20089
|
if ('locale' in custom && 'resource' in custom) {
|
|
20053
20090
|
const { locale, resource } = custom;
|
|
@@ -20079,7 +20116,7 @@ function getComponentOptions(instance) {
|
|
|
20079
20116
|
}
|
|
20080
20117
|
function adjustI18nResources(gl, options, componentOptions) {
|
|
20081
20118
|
// prettier-ignore
|
|
20082
|
-
let messages = isObject(options.messages)
|
|
20119
|
+
let messages = isObject$1(options.messages)
|
|
20083
20120
|
? options.messages
|
|
20084
20121
|
: create$1();
|
|
20085
20122
|
if ('__i18nGlobal' in componentOptions) {
|
|
@@ -20097,7 +20134,7 @@ function adjustI18nResources(gl, options, componentOptions) {
|
|
|
20097
20134
|
}
|
|
20098
20135
|
{
|
|
20099
20136
|
// merge datetime formats
|
|
20100
|
-
if (isObject(options.datetimeFormats)) {
|
|
20137
|
+
if (isObject$1(options.datetimeFormats)) {
|
|
20101
20138
|
const locales = Object.keys(options.datetimeFormats);
|
|
20102
20139
|
if (locales.length) {
|
|
20103
20140
|
locales.forEach(locale => {
|
|
@@ -20106,7 +20143,7 @@ function adjustI18nResources(gl, options, componentOptions) {
|
|
|
20106
20143
|
}
|
|
20107
20144
|
}
|
|
20108
20145
|
// merge number formats
|
|
20109
|
-
if (isObject(options.numberFormats)) {
|
|
20146
|
+
if (isObject$1(options.numberFormats)) {
|
|
20110
20147
|
const locales = Object.keys(options.numberFormats);
|
|
20111
20148
|
if (locales.length) {
|
|
20112
20149
|
locales.forEach(locale => {
|
|
@@ -20165,19 +20202,19 @@ function createComposer(options = {}) {
|
|
|
20165
20202
|
__root && _inheritLocale
|
|
20166
20203
|
? __root.fallbackLocale.value
|
|
20167
20204
|
: isString$1(options.fallbackLocale) ||
|
|
20168
|
-
isArray$
|
|
20169
|
-
isPlainObject$
|
|
20205
|
+
isArray$2(options.fallbackLocale) ||
|
|
20206
|
+
isPlainObject$2(options.fallbackLocale) ||
|
|
20170
20207
|
options.fallbackLocale === false
|
|
20171
20208
|
? options.fallbackLocale
|
|
20172
20209
|
: _locale.value);
|
|
20173
20210
|
const _messages = _ref(getLocaleMessages(_locale.value, options));
|
|
20174
20211
|
// prettier-ignore
|
|
20175
|
-
const _datetimeFormats = _ref(isPlainObject$
|
|
20212
|
+
const _datetimeFormats = _ref(isPlainObject$2(options.datetimeFormats)
|
|
20176
20213
|
? options.datetimeFormats
|
|
20177
20214
|
: { [_locale.value]: {} })
|
|
20178
20215
|
;
|
|
20179
20216
|
// prettier-ignore
|
|
20180
|
-
const _numberFormats = _ref(isPlainObject$
|
|
20217
|
+
const _numberFormats = _ref(isPlainObject$2(options.numberFormats)
|
|
20181
20218
|
? options.numberFormats
|
|
20182
20219
|
: { [_locale.value]: {} })
|
|
20183
20220
|
;
|
|
@@ -20203,12 +20240,12 @@ function createComposer(options = {}) {
|
|
|
20203
20240
|
// configure fall back to root
|
|
20204
20241
|
let _fallbackFormat = !!options.fallbackFormat;
|
|
20205
20242
|
// runtime missing
|
|
20206
|
-
let _missing = isFunction(options.missing) ? options.missing : null;
|
|
20207
|
-
let _runtimeMissing = isFunction(options.missing)
|
|
20243
|
+
let _missing = isFunction$1(options.missing) ? options.missing : null;
|
|
20244
|
+
let _runtimeMissing = isFunction$1(options.missing)
|
|
20208
20245
|
? defineCoreMissingHandler(options.missing)
|
|
20209
20246
|
: null;
|
|
20210
20247
|
// postTranslation handler
|
|
20211
|
-
let _postTranslation = isFunction(options.postTranslation)
|
|
20248
|
+
let _postTranslation = isFunction$1(options.postTranslation)
|
|
20212
20249
|
? options.postTranslation
|
|
20213
20250
|
: null;
|
|
20214
20251
|
// prettier-ignore
|
|
@@ -20222,7 +20259,7 @@ function createComposer(options = {}) {
|
|
|
20222
20259
|
// prettier-ignore
|
|
20223
20260
|
const _modifiers = __root
|
|
20224
20261
|
? __root.modifiers
|
|
20225
|
-
: isPlainObject$
|
|
20262
|
+
: isPlainObject$2(options.modifiers)
|
|
20226
20263
|
? options.modifiers
|
|
20227
20264
|
: {};
|
|
20228
20265
|
// pluralRules
|
|
@@ -20254,15 +20291,15 @@ function createComposer(options = {}) {
|
|
|
20254
20291
|
{
|
|
20255
20292
|
ctxOptions.datetimeFormats = _datetimeFormats.value;
|
|
20256
20293
|
ctxOptions.numberFormats = _numberFormats.value;
|
|
20257
|
-
ctxOptions.__datetimeFormatters = isPlainObject$
|
|
20294
|
+
ctxOptions.__datetimeFormatters = isPlainObject$2(_context)
|
|
20258
20295
|
? _context.__datetimeFormatters
|
|
20259
20296
|
: undefined;
|
|
20260
|
-
ctxOptions.__numberFormatters = isPlainObject$
|
|
20297
|
+
ctxOptions.__numberFormatters = isPlainObject$2(_context)
|
|
20261
20298
|
? _context.__numberFormatters
|
|
20262
20299
|
: undefined;
|
|
20263
20300
|
}
|
|
20264
20301
|
if ((process.env.NODE_ENV !== 'production')) {
|
|
20265
|
-
ctxOptions.__v_emitter = isPlainObject$
|
|
20302
|
+
ctxOptions.__v_emitter = isPlainObject$2(_context)
|
|
20266
20303
|
? _context.__v_emitter
|
|
20267
20304
|
: undefined;
|
|
20268
20305
|
}
|
|
@@ -20308,7 +20345,7 @@ function createComposer(options = {}) {
|
|
|
20308
20345
|
const numberFormats = /* #__PURE__*/ computed(() => _numberFormats.value);
|
|
20309
20346
|
// getPostTranslationHandler
|
|
20310
20347
|
function getPostTranslationHandler() {
|
|
20311
|
-
return isFunction(_postTranslation) ? _postTranslation : null;
|
|
20348
|
+
return isFunction$1(_postTranslation) ? _postTranslation : null;
|
|
20312
20349
|
}
|
|
20313
20350
|
// setPostTranslationHandler
|
|
20314
20351
|
function setPostTranslationHandler(handler) {
|
|
@@ -20401,18 +20438,18 @@ function createComposer(options = {}) {
|
|
|
20401
20438
|
// rt
|
|
20402
20439
|
function rt(...args) {
|
|
20403
20440
|
const [arg1, arg2, arg3] = args;
|
|
20404
|
-
if (arg3 && !isObject(arg3)) {
|
|
20441
|
+
if (arg3 && !isObject$1(arg3)) {
|
|
20405
20442
|
throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);
|
|
20406
20443
|
}
|
|
20407
20444
|
return t(...[arg1, arg2, assign$2({ resolvedMessage: true }, arg3 || {})]);
|
|
20408
20445
|
}
|
|
20409
20446
|
// d
|
|
20410
20447
|
function d(...args) {
|
|
20411
|
-
return wrapWithDeps(context => Reflect.apply(datetime, null, [context, ...args]), () => parseDateTimeArgs(...args), 'datetime format', root => Reflect.apply(root.d, root, [...args]), () => MISSING_RESOLVE_VALUE, val => isString$1(val) || isArray$
|
|
20448
|
+
return wrapWithDeps(context => Reflect.apply(datetime, null, [context, ...args]), () => parseDateTimeArgs(...args), 'datetime format', root => Reflect.apply(root.d, root, [...args]), () => MISSING_RESOLVE_VALUE, val => isString$1(val) || isArray$2(val));
|
|
20412
20449
|
}
|
|
20413
20450
|
// n
|
|
20414
20451
|
function n(...args) {
|
|
20415
|
-
return wrapWithDeps(context => Reflect.apply(number, null, [context, ...args]), () => parseNumberArgs(...args), 'number format', root => Reflect.apply(root.n, root, [...args]), () => MISSING_RESOLVE_VALUE, val => isString$1(val) || isArray$
|
|
20452
|
+
return wrapWithDeps(context => Reflect.apply(number, null, [context, ...args]), () => parseNumberArgs(...args), 'number format', root => Reflect.apply(root.n, root, [...args]), () => MISSING_RESOLVE_VALUE, val => isString$1(val) || isArray$2(val));
|
|
20416
20453
|
}
|
|
20417
20454
|
// for custom processor
|
|
20418
20455
|
function normalize(values) {
|
|
@@ -20439,15 +20476,15 @@ function createComposer(options = {}) {
|
|
|
20439
20476
|
_context.processor = null;
|
|
20440
20477
|
}
|
|
20441
20478
|
return ret;
|
|
20442
|
-
}, () => parseTranslateArgs(...args), 'translate', root => root[TranslateVNodeSymbol](...args), key => [createTextNode(key)], val => isArray$
|
|
20479
|
+
}, () => parseTranslateArgs(...args), 'translate', root => root[TranslateVNodeSymbol](...args), key => [createTextNode(key)], val => isArray$2(val));
|
|
20443
20480
|
}
|
|
20444
20481
|
// numberParts, using for `i18n-n` component
|
|
20445
20482
|
function numberParts(...args) {
|
|
20446
|
-
return wrapWithDeps(context => Reflect.apply(number, null, [context, ...args]), () => parseNumberArgs(...args), 'number format', root => root[NumberPartsSymbol](...args), NOOP_RETURN_ARRAY, val => isString$1(val) || isArray$
|
|
20483
|
+
return wrapWithDeps(context => Reflect.apply(number, null, [context, ...args]), () => parseNumberArgs(...args), 'number format', root => root[NumberPartsSymbol](...args), NOOP_RETURN_ARRAY, val => isString$1(val) || isArray$2(val));
|
|
20447
20484
|
}
|
|
20448
20485
|
// datetimeParts, using for `i18n-d` component
|
|
20449
20486
|
function datetimeParts(...args) {
|
|
20450
|
-
return wrapWithDeps(context => Reflect.apply(datetime, null, [context, ...args]), () => parseDateTimeArgs(...args), 'datetime format', root => root[DatetimePartsSymbol](...args), NOOP_RETURN_ARRAY, val => isString$1(val) || isArray$
|
|
20487
|
+
return wrapWithDeps(context => Reflect.apply(datetime, null, [context, ...args]), () => parseDateTimeArgs(...args), 'datetime format', root => root[DatetimePartsSymbol](...args), NOOP_RETURN_ARRAY, val => isString$1(val) || isArray$2(val));
|
|
20451
20488
|
}
|
|
20452
20489
|
function setPluralRules(rules) {
|
|
20453
20490
|
_pluralRules = rules;
|
|
@@ -20862,13 +20899,13 @@ function getLocaleMessageValue(messages) {
|
|
|
20862
20899
|
const value = {};
|
|
20863
20900
|
Object.keys(messages).forEach((key) => {
|
|
20864
20901
|
const v = messages[key];
|
|
20865
|
-
if (isFunction(v) && 'source' in v) {
|
|
20902
|
+
if (isFunction$1(v) && 'source' in v) {
|
|
20866
20903
|
value[key] = getMessageFunctionDetails(v);
|
|
20867
20904
|
}
|
|
20868
20905
|
else if (isMessageAST(v) && v.loc && v.loc.source) {
|
|
20869
20906
|
value[key] = v.loc.source;
|
|
20870
20907
|
}
|
|
20871
|
-
else if (isObject(v)) {
|
|
20908
|
+
else if (isObject$1(v)) {
|
|
20872
20909
|
value[key] = getLocaleMessageValue(v);
|
|
20873
20910
|
}
|
|
20874
20911
|
else {
|
|
@@ -21060,8 +21097,8 @@ function editScope(payload, i18n) {
|
|
|
21060
21097
|
}
|
|
21061
21098
|
else if (field === 'fallbackLocale' &&
|
|
21062
21099
|
(isString$1(payload.state.value) ||
|
|
21063
|
-
isArray$
|
|
21064
|
-
isObject(payload.state.value))) {
|
|
21100
|
+
isArray$2(payload.state.value) ||
|
|
21101
|
+
isObject$1(payload.state.value))) {
|
|
21065
21102
|
composer.fallbackLocale.value = payload.state.value;
|
|
21066
21103
|
}
|
|
21067
21104
|
else if (field === 'inheritLocale' && isBoolean$1(payload.state.value)) {
|
|
@@ -21079,12 +21116,12 @@ function editScope(payload, i18n) {
|
|
|
21079
21116
|
function convertComposerOptions(options) {
|
|
21080
21117
|
const locale = isString$1(options.locale) ? options.locale : DEFAULT_LOCALE;
|
|
21081
21118
|
const fallbackLocale = isString$1(options.fallbackLocale) ||
|
|
21082
|
-
isArray$
|
|
21083
|
-
isPlainObject$
|
|
21119
|
+
isArray$2(options.fallbackLocale) ||
|
|
21120
|
+
isPlainObject$2(options.fallbackLocale) ||
|
|
21084
21121
|
options.fallbackLocale === false
|
|
21085
21122
|
? options.fallbackLocale
|
|
21086
21123
|
: locale;
|
|
21087
|
-
const missing = isFunction(options.missing) ? options.missing : undefined;
|
|
21124
|
+
const missing = isFunction$1(options.missing) ? options.missing : undefined;
|
|
21088
21125
|
const missingWarn = isBoolean$1(options.silentTranslationWarn) ||
|
|
21089
21126
|
isRegExp$1(options.silentTranslationWarn)
|
|
21090
21127
|
? !options.silentTranslationWarn
|
|
@@ -21097,9 +21134,9 @@ function convertComposerOptions(options) {
|
|
|
21097
21134
|
? options.fallbackRoot
|
|
21098
21135
|
: true;
|
|
21099
21136
|
const fallbackFormat = !!options.formatFallbackMessages;
|
|
21100
|
-
const modifiers = isPlainObject$
|
|
21137
|
+
const modifiers = isPlainObject$2(options.modifiers) ? options.modifiers : {};
|
|
21101
21138
|
const pluralizationRules = options.pluralizationRules;
|
|
21102
|
-
const postTranslation = isFunction(options.postTranslation)
|
|
21139
|
+
const postTranslation = isFunction$1(options.postTranslation)
|
|
21103
21140
|
? options.postTranslation
|
|
21104
21141
|
: undefined;
|
|
21105
21142
|
const warnHtmlMessage = isString$1(options.warnHtmlInMessage)
|
|
@@ -21108,7 +21145,7 @@ function convertComposerOptions(options) {
|
|
|
21108
21145
|
const escapeParameter = !!options.escapeParameterHtml;
|
|
21109
21146
|
const inheritLocale = isBoolean$1(options.sync) ? options.sync : true;
|
|
21110
21147
|
let messages = options.messages;
|
|
21111
|
-
if (isPlainObject$
|
|
21148
|
+
if (isPlainObject$2(options.sharedMessages)) {
|
|
21112
21149
|
const sharedMessages = options.sharedMessages;
|
|
21113
21150
|
const locales = Object.keys(sharedMessages);
|
|
21114
21151
|
messages = locales.reduce((messages, locale) => {
|
|
@@ -21572,7 +21609,7 @@ const TranslationImpl = /*#__PURE__*/ defineComponent({
|
|
|
21572
21609
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21573
21610
|
const children = i18n[TranslateVNodeSymbol](props.keypath, arg, options);
|
|
21574
21611
|
const assignedAttrs = assign$2(create$1(), attrs);
|
|
21575
|
-
const tag = isString$1(props.tag) || isObject(props.tag)
|
|
21612
|
+
const tag = isString$1(props.tag) || isObject$1(props.tag)
|
|
21576
21613
|
? props.tag
|
|
21577
21614
|
: getFragmentableTag();
|
|
21578
21615
|
return h(tag, assignedAttrs, children);
|
|
@@ -21635,7 +21672,7 @@ const TranslationImpl = /*#__PURE__*/ defineComponent({
|
|
|
21635
21672
|
const Translation = TranslationImpl;
|
|
21636
21673
|
|
|
21637
21674
|
function isVNode(target) {
|
|
21638
|
-
return isArray$
|
|
21675
|
+
return isArray$2(target) && !isString$1(target[0]);
|
|
21639
21676
|
}
|
|
21640
21677
|
function renderFormatter(props, context, slotKeys, partFormatter) {
|
|
21641
21678
|
const { slots, attrs } = context;
|
|
@@ -21648,7 +21685,7 @@ function renderFormatter(props, context, slotKeys, partFormatter) {
|
|
|
21648
21685
|
if (isString$1(props.format)) {
|
|
21649
21686
|
options.key = props.format;
|
|
21650
21687
|
}
|
|
21651
|
-
else if (isObject(props.format)) {
|
|
21688
|
+
else if (isObject$1(props.format)) {
|
|
21652
21689
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21653
21690
|
if (isString$1(props.format.key)) {
|
|
21654
21691
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -21663,7 +21700,7 @@ function renderFormatter(props, context, slotKeys, partFormatter) {
|
|
|
21663
21700
|
}
|
|
21664
21701
|
const parts = partFormatter(...[props.value, options, overrides]);
|
|
21665
21702
|
let children = [options.key];
|
|
21666
|
-
if (isArray$
|
|
21703
|
+
if (isArray$2(parts)) {
|
|
21667
21704
|
children = parts.map((part, index) => {
|
|
21668
21705
|
const slot = slots[part.type];
|
|
21669
21706
|
const node = slot
|
|
@@ -21679,7 +21716,7 @@ function renderFormatter(props, context, slotKeys, partFormatter) {
|
|
|
21679
21716
|
children = [parts];
|
|
21680
21717
|
}
|
|
21681
21718
|
const assignedAttrs = assign$2(create$1(), attrs);
|
|
21682
|
-
const tag = isString$1(props.tag) || isObject(props.tag)
|
|
21719
|
+
const tag = isString$1(props.tag) || isObject$1(props.tag)
|
|
21683
21720
|
? props.tag
|
|
21684
21721
|
: getFragmentableTag();
|
|
21685
21722
|
return h(tag, assignedAttrs, children);
|
|
@@ -21812,7 +21849,7 @@ function parseValue(value) {
|
|
|
21812
21849
|
if (isString$1(value)) {
|
|
21813
21850
|
return { path: value };
|
|
21814
21851
|
}
|
|
21815
|
-
else if (isPlainObject$
|
|
21852
|
+
else if (isPlainObject$2(value)) {
|
|
21816
21853
|
if (!('path' in value)) {
|
|
21817
21854
|
throw createI18nError(I18nErrorCodes.REQUIRED_VALUE, 'path');
|
|
21818
21855
|
}
|
|
@@ -21838,8 +21875,8 @@ function makeParams(value) {
|
|
|
21838
21875
|
return [path, named, options];
|
|
21839
21876
|
}
|
|
21840
21877
|
|
|
21841
|
-
function apply(app, i18n, ...options) {
|
|
21842
|
-
const pluginOptions = isPlainObject$
|
|
21878
|
+
function apply$1(app, i18n, ...options) {
|
|
21879
|
+
const pluginOptions = isPlainObject$2(options[0])
|
|
21843
21880
|
? options[0]
|
|
21844
21881
|
: {};
|
|
21845
21882
|
const globalInstall = isBoolean$1(pluginOptions.globalInstall)
|
|
@@ -21908,7 +21945,7 @@ function createI18n(options = {}) {
|
|
|
21908
21945
|
app.__VUE_I18N_SYMBOL__ = symbol;
|
|
21909
21946
|
app.provide(app.__VUE_I18N_SYMBOL__, i18n);
|
|
21910
21947
|
// set composer & vuei18n extend hook options from plugin options
|
|
21911
|
-
if (isPlainObject$
|
|
21948
|
+
if (isPlainObject$2(options[0])) {
|
|
21912
21949
|
const opts = options[0];
|
|
21913
21950
|
i18n.__composerExtend =
|
|
21914
21951
|
opts.__composerExtend;
|
|
@@ -21922,7 +21959,7 @@ function createI18n(options = {}) {
|
|
|
21922
21959
|
}
|
|
21923
21960
|
// install built-in components and directive
|
|
21924
21961
|
if (__VUE_I18N_FULL_INSTALL__) {
|
|
21925
|
-
apply(app, i18n, ...options);
|
|
21962
|
+
apply$1(app, i18n, ...options);
|
|
21926
21963
|
}
|
|
21927
21964
|
// setup mixin for Legacy API
|
|
21928
21965
|
if (__VUE_I18N_LEGACY_API__ && __legacyMode) {
|
|
@@ -26620,7 +26657,7 @@ var isPlainObject2 = (payload) => {
|
|
|
26620
26657
|
return Object.getPrototypeOf(payload) === Object.prototype;
|
|
26621
26658
|
};
|
|
26622
26659
|
var isEmptyObject = (payload) => isPlainObject2(payload) && Object.keys(payload).length === 0;
|
|
26623
|
-
var isArray = (payload) => Array.isArray(payload);
|
|
26660
|
+
var isArray$1 = (payload) => Array.isArray(payload);
|
|
26624
26661
|
var isString = (payload) => typeof payload === "string";
|
|
26625
26662
|
var isNumber = (payload) => typeof payload === "number" && !isNaN(payload);
|
|
26626
26663
|
var isBoolean = (payload) => typeof payload === "boolean";
|
|
@@ -26634,7 +26671,7 @@ var isNaNValue = (payload) => typeof payload === "number" && isNaN(payload);
|
|
|
26634
26671
|
var isPrimitive2 = (payload) => isBoolean(payload) || isNull(payload) || isUndefined(payload) || isNumber(payload) || isString(payload) || isSymbol(payload);
|
|
26635
26672
|
var isBigint = (payload) => typeof payload === "bigint";
|
|
26636
26673
|
var isInfinite = (payload) => payload === Infinity || payload === -Infinity;
|
|
26637
|
-
var isTypedArray = (payload) => ArrayBuffer.isView(payload) && !(payload instanceof DataView);
|
|
26674
|
+
var isTypedArray$1 = (payload) => ArrayBuffer.isView(payload) && !(payload instanceof DataView);
|
|
26638
26675
|
var isURL = (payload) => payload instanceof URL;
|
|
26639
26676
|
|
|
26640
26677
|
// ../../node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/pathstringifier.js
|
|
@@ -26770,7 +26807,7 @@ var constructorToName = [
|
|
|
26770
26807
|
obj[ctor.name] = ctor;
|
|
26771
26808
|
return obj;
|
|
26772
26809
|
}, {});
|
|
26773
|
-
var typedArrayRule = compositeTransformation(isTypedArray, (v) => ["typed-array", v.constructor.name], (v) => [...v], (v, a) => {
|
|
26810
|
+
var typedArrayRule = compositeTransformation(isTypedArray$1, (v) => ["typed-array", v.constructor.name], (v) => [...v], (v, a) => {
|
|
26774
26811
|
const ctor = constructorToName[a[1]];
|
|
26775
26812
|
if (!ctor) {
|
|
26776
26813
|
throw new Error("Trying to deserialize unknown typed array");
|
|
@@ -26842,7 +26879,7 @@ simpleRules.forEach((rule) => {
|
|
|
26842
26879
|
simpleRulesByAnnotation[rule.annotation] = rule;
|
|
26843
26880
|
});
|
|
26844
26881
|
var untransformValue = (json, type, superJson) => {
|
|
26845
|
-
if (isArray(type)) {
|
|
26882
|
+
if (isArray$1(type)) {
|
|
26846
26883
|
switch (type[0]) {
|
|
26847
26884
|
case "symbol":
|
|
26848
26885
|
return symbolRule.untransform(json, type, superJson);
|
|
@@ -26919,7 +26956,7 @@ var setDeep = (object, path, mapper) => {
|
|
|
26919
26956
|
let parent = object;
|
|
26920
26957
|
for (let i = 0; i < path.length - 1; i++) {
|
|
26921
26958
|
const key = path[i];
|
|
26922
|
-
if (isArray(parent)) {
|
|
26959
|
+
if (isArray$1(parent)) {
|
|
26923
26960
|
const index = +key;
|
|
26924
26961
|
parent = parent[index];
|
|
26925
26962
|
} else if (isPlainObject2(parent)) {
|
|
@@ -26946,7 +26983,7 @@ var setDeep = (object, path, mapper) => {
|
|
|
26946
26983
|
}
|
|
26947
26984
|
}
|
|
26948
26985
|
const lastKey = path[path.length - 1];
|
|
26949
|
-
if (isArray(parent)) {
|
|
26986
|
+
if (isArray$1(parent)) {
|
|
26950
26987
|
parent[+lastKey] = mapper(parent[+lastKey]);
|
|
26951
26988
|
} else if (isPlainObject2(parent)) {
|
|
26952
26989
|
parent[lastKey] = mapper(parent[lastKey]);
|
|
@@ -26986,7 +27023,7 @@ function traverse(tree, walker2, origin = []) {
|
|
|
26986
27023
|
if (!tree) {
|
|
26987
27024
|
return;
|
|
26988
27025
|
}
|
|
26989
|
-
if (!isArray(tree)) {
|
|
27026
|
+
if (!isArray$1(tree)) {
|
|
26990
27027
|
forEach(tree, (subtree, key) => traverse(subtree, walker2, [...origin, ...parsePath(key)]));
|
|
26991
27028
|
return;
|
|
26992
27029
|
}
|
|
@@ -27011,7 +27048,7 @@ function applyReferentialEqualityAnnotations(plain, annotations) {
|
|
|
27011
27048
|
plain = setDeep(plain, identicalObjectPath, () => object);
|
|
27012
27049
|
});
|
|
27013
27050
|
}
|
|
27014
|
-
if (isArray(annotations)) {
|
|
27051
|
+
if (isArray$1(annotations)) {
|
|
27015
27052
|
const [root, other] = annotations;
|
|
27016
27053
|
root.forEach((identicalPath) => {
|
|
27017
27054
|
plain = setDeep(plain, parsePath(identicalPath), () => plain);
|
|
@@ -27024,7 +27061,7 @@ function applyReferentialEqualityAnnotations(plain, annotations) {
|
|
|
27024
27061
|
}
|
|
27025
27062
|
return plain;
|
|
27026
27063
|
}
|
|
27027
|
-
var isDeep = (object, superJson) => isPlainObject2(object) || isArray(object) || isMap(object) || isSet(object) || isInstanceOfRegisteredClass(object, superJson);
|
|
27064
|
+
var isDeep = (object, superJson) => isPlainObject2(object) || isArray$1(object) || isMap(object) || isSet(object) || isInstanceOfRegisteredClass(object, superJson);
|
|
27028
27065
|
function addIdentity(object, path, identities) {
|
|
27029
27066
|
const existingSet = identities.get(object);
|
|
27030
27067
|
if (existingSet) {
|
|
@@ -27092,7 +27129,7 @@ var walker = (object, identities, superJson, dedupe, path = [], objectsInThisPat
|
|
|
27092
27129
|
}
|
|
27093
27130
|
const transformationResult = transformValue(object, superJson);
|
|
27094
27131
|
const transformed = (_a25 = transformationResult == null ? void 0 : transformationResult.value) != null ? _a25 : object;
|
|
27095
|
-
const transformedValue = isArray(transformed) ? [] : {};
|
|
27132
|
+
const transformedValue = isArray$1(transformed) ? [] : {};
|
|
27096
27133
|
const innerAnnotations = {};
|
|
27097
27134
|
forEach(transformed, (value, index) => {
|
|
27098
27135
|
if (index === "__proto__" || index === "constructor" || index === "prototype") {
|
|
@@ -27100,7 +27137,7 @@ var walker = (object, identities, superJson, dedupe, path = [], objectsInThisPat
|
|
|
27100
27137
|
}
|
|
27101
27138
|
const recursiveResult = walker(value, identities, superJson, dedupe, [...path, index], [...objectsInThisPath, object], seenObjects);
|
|
27102
27139
|
transformedValue[index] = recursiveResult.transformedValue;
|
|
27103
|
-
if (isArray(recursiveResult.annotations)) {
|
|
27140
|
+
if (isArray$1(recursiveResult.annotations)) {
|
|
27104
27141
|
innerAnnotations[index] = recursiveResult.annotations;
|
|
27105
27142
|
} else if (isPlainObject2(recursiveResult.annotations)) {
|
|
27106
27143
|
forEach(recursiveResult.annotations, (tree, key) => {
|
|
@@ -27377,7 +27414,7 @@ let activePinia;
|
|
|
27377
27414
|
const setActivePinia = (pinia) => (activePinia = pinia);
|
|
27378
27415
|
const piniaSymbol = ((process.env.NODE_ENV !== 'production') ? Symbol('pinia') : /* istanbul ignore next */ Symbol());
|
|
27379
27416
|
|
|
27380
|
-
function isPlainObject(
|
|
27417
|
+
function isPlainObject$1(
|
|
27381
27418
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27382
27419
|
o) {
|
|
27383
27420
|
return (o &&
|
|
@@ -28393,8 +28430,8 @@ function patchObject(newState, oldState) {
|
|
|
28393
28430
|
continue;
|
|
28394
28431
|
}
|
|
28395
28432
|
const targetValue = newState[key];
|
|
28396
|
-
if (isPlainObject(targetValue) &&
|
|
28397
|
-
isPlainObject(subPatch) &&
|
|
28433
|
+
if (isPlainObject$1(targetValue) &&
|
|
28434
|
+
isPlainObject$1(subPatch) &&
|
|
28398
28435
|
!isRef$1(subPatch) &&
|
|
28399
28436
|
!isReactive$1(subPatch)) {
|
|
28400
28437
|
newState[key] = patchObject(targetValue, subPatch);
|
|
@@ -28455,8 +28492,8 @@ function mergeReactiveObjects(target, patchToApply) {
|
|
|
28455
28492
|
continue;
|
|
28456
28493
|
const subPatch = patchToApply[key];
|
|
28457
28494
|
const targetValue = target[key];
|
|
28458
|
-
if (isPlainObject(targetValue) &&
|
|
28459
|
-
isPlainObject(subPatch) &&
|
|
28495
|
+
if (isPlainObject$1(targetValue) &&
|
|
28496
|
+
isPlainObject$1(subPatch) &&
|
|
28460
28497
|
target.hasOwnProperty(key) &&
|
|
28461
28498
|
!isRef$1(subPatch) &&
|
|
28462
28499
|
!isReactive$1(subPatch)) {
|
|
@@ -28482,7 +28519,7 @@ const skipHydrateSymbol = (process.env.NODE_ENV !== 'production')
|
|
|
28482
28519
|
* @returns true if `obj` should be hydrated
|
|
28483
28520
|
*/
|
|
28484
28521
|
function shouldHydrate(obj) {
|
|
28485
|
-
return (!isPlainObject(obj) ||
|
|
28522
|
+
return (!isPlainObject$1(obj) ||
|
|
28486
28523
|
!Object.prototype.hasOwnProperty.call(obj, skipHydrateSymbol));
|
|
28487
28524
|
}
|
|
28488
28525
|
const { assign } = Object;
|
|
@@ -28821,8 +28858,8 @@ function createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore)
|
|
|
28821
28858
|
const newStateTarget = newStore.$state[stateKey];
|
|
28822
28859
|
const oldStateSource = store.$state[stateKey];
|
|
28823
28860
|
if (typeof newStateTarget === 'object' &&
|
|
28824
|
-
isPlainObject(newStateTarget) &&
|
|
28825
|
-
isPlainObject(oldStateSource)) {
|
|
28861
|
+
isPlainObject$1(newStateTarget) &&
|
|
28862
|
+
isPlainObject$1(oldStateSource)) {
|
|
28826
28863
|
patchObject(newStateTarget, oldStateSource);
|
|
28827
28864
|
}
|
|
28828
28865
|
else {
|
|
@@ -42826,8 +42863,2170 @@ const useDateTimeShortCust = () => {
|
|
|
42826
42863
|
];
|
|
42827
42864
|
};
|
|
42828
42865
|
|
|
42866
|
+
/** Detect free variable `global` from Node.js. */
|
|
42867
|
+
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
|
42868
|
+
|
|
42869
|
+
/** Detect free variable `self`. */
|
|
42870
|
+
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
42871
|
+
|
|
42872
|
+
/** Used as a reference to the global object. */
|
|
42873
|
+
var root = freeGlobal || freeSelf || Function('return this')();
|
|
42874
|
+
|
|
42875
|
+
/** Built-in value references. */
|
|
42876
|
+
var Symbol$1 = root.Symbol;
|
|
42877
|
+
|
|
42878
|
+
/** Used for built-in method references. */
|
|
42879
|
+
var objectProto$9 = Object.prototype;
|
|
42880
|
+
|
|
42881
|
+
/** Used to check objects for own properties. */
|
|
42882
|
+
var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
|
|
42883
|
+
|
|
42884
|
+
/**
|
|
42885
|
+
* Used to resolve the
|
|
42886
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
42887
|
+
* of values.
|
|
42888
|
+
*/
|
|
42889
|
+
var nativeObjectToString$1 = objectProto$9.toString;
|
|
42890
|
+
|
|
42891
|
+
/** Built-in value references. */
|
|
42892
|
+
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
42893
|
+
|
|
42894
|
+
/**
|
|
42895
|
+
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
42896
|
+
*
|
|
42897
|
+
* @private
|
|
42898
|
+
* @param {*} value The value to query.
|
|
42899
|
+
* @returns {string} Returns the raw `toStringTag`.
|
|
42900
|
+
*/
|
|
42901
|
+
function getRawTag(value) {
|
|
42902
|
+
var isOwn = hasOwnProperty$7.call(value, symToStringTag$1),
|
|
42903
|
+
tag = value[symToStringTag$1];
|
|
42904
|
+
|
|
42905
|
+
try {
|
|
42906
|
+
value[symToStringTag$1] = undefined;
|
|
42907
|
+
var unmasked = true;
|
|
42908
|
+
} catch (e) {}
|
|
42909
|
+
|
|
42910
|
+
var result = nativeObjectToString$1.call(value);
|
|
42911
|
+
if (unmasked) {
|
|
42912
|
+
if (isOwn) {
|
|
42913
|
+
value[symToStringTag$1] = tag;
|
|
42914
|
+
} else {
|
|
42915
|
+
delete value[symToStringTag$1];
|
|
42916
|
+
}
|
|
42917
|
+
}
|
|
42918
|
+
return result;
|
|
42919
|
+
}
|
|
42920
|
+
|
|
42921
|
+
/** Used for built-in method references. */
|
|
42922
|
+
var objectProto$8 = Object.prototype;
|
|
42923
|
+
|
|
42924
|
+
/**
|
|
42925
|
+
* Used to resolve the
|
|
42926
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
42927
|
+
* of values.
|
|
42928
|
+
*/
|
|
42929
|
+
var nativeObjectToString = objectProto$8.toString;
|
|
42930
|
+
|
|
42931
|
+
/**
|
|
42932
|
+
* Converts `value` to a string using `Object.prototype.toString`.
|
|
42933
|
+
*
|
|
42934
|
+
* @private
|
|
42935
|
+
* @param {*} value The value to convert.
|
|
42936
|
+
* @returns {string} Returns the converted string.
|
|
42937
|
+
*/
|
|
42938
|
+
function objectToString(value) {
|
|
42939
|
+
return nativeObjectToString.call(value);
|
|
42940
|
+
}
|
|
42941
|
+
|
|
42942
|
+
/** `Object#toString` result references. */
|
|
42943
|
+
var nullTag = '[object Null]',
|
|
42944
|
+
undefinedTag = '[object Undefined]';
|
|
42945
|
+
|
|
42946
|
+
/** Built-in value references. */
|
|
42947
|
+
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
42948
|
+
|
|
42949
|
+
/**
|
|
42950
|
+
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
42951
|
+
*
|
|
42952
|
+
* @private
|
|
42953
|
+
* @param {*} value The value to query.
|
|
42954
|
+
* @returns {string} Returns the `toStringTag`.
|
|
42955
|
+
*/
|
|
42956
|
+
function baseGetTag(value) {
|
|
42957
|
+
if (value == null) {
|
|
42958
|
+
return value === undefined ? undefinedTag : nullTag;
|
|
42959
|
+
}
|
|
42960
|
+
return (symToStringTag && symToStringTag in Object(value))
|
|
42961
|
+
? getRawTag(value)
|
|
42962
|
+
: objectToString(value);
|
|
42963
|
+
}
|
|
42964
|
+
|
|
42965
|
+
/**
|
|
42966
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
42967
|
+
* and has a `typeof` result of "object".
|
|
42968
|
+
*
|
|
42969
|
+
* @static
|
|
42970
|
+
* @memberOf _
|
|
42971
|
+
* @since 4.0.0
|
|
42972
|
+
* @category Lang
|
|
42973
|
+
* @param {*} value The value to check.
|
|
42974
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
42975
|
+
* @example
|
|
42976
|
+
*
|
|
42977
|
+
* _.isObjectLike({});
|
|
42978
|
+
* // => true
|
|
42979
|
+
*
|
|
42980
|
+
* _.isObjectLike([1, 2, 3]);
|
|
42981
|
+
* // => true
|
|
42982
|
+
*
|
|
42983
|
+
* _.isObjectLike(_.noop);
|
|
42984
|
+
* // => false
|
|
42985
|
+
*
|
|
42986
|
+
* _.isObjectLike(null);
|
|
42987
|
+
* // => false
|
|
42988
|
+
*/
|
|
42989
|
+
function isObjectLike(value) {
|
|
42990
|
+
return value != null && typeof value == 'object';
|
|
42991
|
+
}
|
|
42992
|
+
|
|
42993
|
+
/**
|
|
42994
|
+
* Checks if `value` is classified as an `Array` object.
|
|
42995
|
+
*
|
|
42996
|
+
* @static
|
|
42997
|
+
* @memberOf _
|
|
42998
|
+
* @since 0.1.0
|
|
42999
|
+
* @category Lang
|
|
43000
|
+
* @param {*} value The value to check.
|
|
43001
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
43002
|
+
* @example
|
|
43003
|
+
*
|
|
43004
|
+
* _.isArray([1, 2, 3]);
|
|
43005
|
+
* // => true
|
|
43006
|
+
*
|
|
43007
|
+
* _.isArray(document.body.children);
|
|
43008
|
+
* // => false
|
|
43009
|
+
*
|
|
43010
|
+
* _.isArray('abc');
|
|
43011
|
+
* // => false
|
|
43012
|
+
*
|
|
43013
|
+
* _.isArray(_.noop);
|
|
43014
|
+
* // => false
|
|
43015
|
+
*/
|
|
43016
|
+
var isArray = Array.isArray;
|
|
43017
|
+
|
|
43018
|
+
/**
|
|
43019
|
+
* Checks if `value` is the
|
|
43020
|
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
43021
|
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
43022
|
+
*
|
|
43023
|
+
* @static
|
|
43024
|
+
* @memberOf _
|
|
43025
|
+
* @since 0.1.0
|
|
43026
|
+
* @category Lang
|
|
43027
|
+
* @param {*} value The value to check.
|
|
43028
|
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
43029
|
+
* @example
|
|
43030
|
+
*
|
|
43031
|
+
* _.isObject({});
|
|
43032
|
+
* // => true
|
|
43033
|
+
*
|
|
43034
|
+
* _.isObject([1, 2, 3]);
|
|
43035
|
+
* // => true
|
|
43036
|
+
*
|
|
43037
|
+
* _.isObject(_.noop);
|
|
43038
|
+
* // => true
|
|
43039
|
+
*
|
|
43040
|
+
* _.isObject(null);
|
|
43041
|
+
* // => false
|
|
43042
|
+
*/
|
|
43043
|
+
function isObject(value) {
|
|
43044
|
+
var type = typeof value;
|
|
43045
|
+
return value != null && (type == 'object' || type == 'function');
|
|
43046
|
+
}
|
|
43047
|
+
|
|
43048
|
+
/**
|
|
43049
|
+
* This method returns the first argument it receives.
|
|
43050
|
+
*
|
|
43051
|
+
* @static
|
|
43052
|
+
* @since 0.1.0
|
|
43053
|
+
* @memberOf _
|
|
43054
|
+
* @category Util
|
|
43055
|
+
* @param {*} value Any value.
|
|
43056
|
+
* @returns {*} Returns `value`.
|
|
43057
|
+
* @example
|
|
43058
|
+
*
|
|
43059
|
+
* var object = { 'a': 1 };
|
|
43060
|
+
*
|
|
43061
|
+
*
|
|
43062
|
+
* // => true
|
|
43063
|
+
*/
|
|
43064
|
+
function identity(value) {
|
|
43065
|
+
return value;
|
|
43066
|
+
}
|
|
43067
|
+
|
|
43068
|
+
/** `Object#toString` result references. */
|
|
43069
|
+
var asyncTag = '[object AsyncFunction]',
|
|
43070
|
+
funcTag$1 = '[object Function]',
|
|
43071
|
+
genTag = '[object GeneratorFunction]',
|
|
43072
|
+
proxyTag = '[object Proxy]';
|
|
43073
|
+
|
|
43074
|
+
/**
|
|
43075
|
+
* Checks if `value` is classified as a `Function` object.
|
|
43076
|
+
*
|
|
43077
|
+
* @static
|
|
43078
|
+
* @memberOf _
|
|
43079
|
+
* @since 0.1.0
|
|
43080
|
+
* @category Lang
|
|
43081
|
+
* @param {*} value The value to check.
|
|
43082
|
+
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
43083
|
+
* @example
|
|
43084
|
+
*
|
|
43085
|
+
* _.isFunction(_);
|
|
43086
|
+
* // => true
|
|
43087
|
+
*
|
|
43088
|
+
* _.isFunction(/abc/);
|
|
43089
|
+
* // => false
|
|
43090
|
+
*/
|
|
43091
|
+
function isFunction(value) {
|
|
43092
|
+
if (!isObject(value)) {
|
|
43093
|
+
return false;
|
|
43094
|
+
}
|
|
43095
|
+
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
43096
|
+
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
43097
|
+
var tag = baseGetTag(value);
|
|
43098
|
+
return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
43099
|
+
}
|
|
43100
|
+
|
|
43101
|
+
/** Used to detect overreaching core-js shims. */
|
|
43102
|
+
var coreJsData = root['__core-js_shared__'];
|
|
43103
|
+
|
|
43104
|
+
/** Used to detect methods masquerading as native. */
|
|
43105
|
+
var maskSrcKey = (function() {
|
|
43106
|
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
|
43107
|
+
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
43108
|
+
}());
|
|
43109
|
+
|
|
43110
|
+
/**
|
|
43111
|
+
* Checks if `func` has its source masked.
|
|
43112
|
+
*
|
|
43113
|
+
* @private
|
|
43114
|
+
* @param {Function} func The function to check.
|
|
43115
|
+
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
43116
|
+
*/
|
|
43117
|
+
function isMasked(func) {
|
|
43118
|
+
return !!maskSrcKey && (maskSrcKey in func);
|
|
43119
|
+
}
|
|
43120
|
+
|
|
43121
|
+
/** Used for built-in method references. */
|
|
43122
|
+
var funcProto$2 = Function.prototype;
|
|
43123
|
+
|
|
43124
|
+
/** Used to resolve the decompiled source of functions. */
|
|
43125
|
+
var funcToString$2 = funcProto$2.toString;
|
|
43126
|
+
|
|
43127
|
+
/**
|
|
43128
|
+
* Converts `func` to its source code.
|
|
43129
|
+
*
|
|
43130
|
+
* @private
|
|
43131
|
+
* @param {Function} func The function to convert.
|
|
43132
|
+
* @returns {string} Returns the source code.
|
|
43133
|
+
*/
|
|
43134
|
+
function toSource(func) {
|
|
43135
|
+
if (func != null) {
|
|
43136
|
+
try {
|
|
43137
|
+
return funcToString$2.call(func);
|
|
43138
|
+
} catch (e) {}
|
|
43139
|
+
try {
|
|
43140
|
+
return (func + '');
|
|
43141
|
+
} catch (e) {}
|
|
43142
|
+
}
|
|
43143
|
+
return '';
|
|
43144
|
+
}
|
|
43145
|
+
|
|
43146
|
+
/**
|
|
43147
|
+
* Used to match `RegExp`
|
|
43148
|
+
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
43149
|
+
*/
|
|
43150
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
43151
|
+
|
|
43152
|
+
/** Used to detect host constructors (Safari). */
|
|
43153
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
43154
|
+
|
|
43155
|
+
/** Used for built-in method references. */
|
|
43156
|
+
var funcProto$1 = Function.prototype,
|
|
43157
|
+
objectProto$7 = Object.prototype;
|
|
43158
|
+
|
|
43159
|
+
/** Used to resolve the decompiled source of functions. */
|
|
43160
|
+
var funcToString$1 = funcProto$1.toString;
|
|
43161
|
+
|
|
43162
|
+
/** Used to check objects for own properties. */
|
|
43163
|
+
var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
|
|
43164
|
+
|
|
43165
|
+
/** Used to detect if a method is native. */
|
|
43166
|
+
var reIsNative = RegExp('^' +
|
|
43167
|
+
funcToString$1.call(hasOwnProperty$6).replace(reRegExpChar, '\\$&')
|
|
43168
|
+
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
43169
|
+
);
|
|
43170
|
+
|
|
43171
|
+
/**
|
|
43172
|
+
* The base implementation of `_.isNative` without bad shim checks.
|
|
43173
|
+
*
|
|
43174
|
+
* @private
|
|
43175
|
+
* @param {*} value The value to check.
|
|
43176
|
+
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
43177
|
+
* else `false`.
|
|
43178
|
+
*/
|
|
43179
|
+
function baseIsNative(value) {
|
|
43180
|
+
if (!isObject(value) || isMasked(value)) {
|
|
43181
|
+
return false;
|
|
43182
|
+
}
|
|
43183
|
+
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
43184
|
+
return pattern.test(toSource(value));
|
|
43185
|
+
}
|
|
43186
|
+
|
|
43187
|
+
/**
|
|
43188
|
+
* Gets the value at `key` of `object`.
|
|
43189
|
+
*
|
|
43190
|
+
* @private
|
|
43191
|
+
* @param {Object} [object] The object to query.
|
|
43192
|
+
* @param {string} key The key of the property to get.
|
|
43193
|
+
* @returns {*} Returns the property value.
|
|
43194
|
+
*/
|
|
43195
|
+
function getValue(object, key) {
|
|
43196
|
+
return object == null ? undefined : object[key];
|
|
43197
|
+
}
|
|
43198
|
+
|
|
43199
|
+
/**
|
|
43200
|
+
* Gets the native function at `key` of `object`.
|
|
43201
|
+
*
|
|
43202
|
+
* @private
|
|
43203
|
+
* @param {Object} object The object to query.
|
|
43204
|
+
* @param {string} key The key of the method to get.
|
|
43205
|
+
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
43206
|
+
*/
|
|
43207
|
+
function getNative(object, key) {
|
|
43208
|
+
var value = getValue(object, key);
|
|
43209
|
+
return baseIsNative(value) ? value : undefined;
|
|
43210
|
+
}
|
|
43211
|
+
|
|
43212
|
+
/** Built-in value references. */
|
|
43213
|
+
var objectCreate = Object.create;
|
|
43214
|
+
|
|
43215
|
+
/**
|
|
43216
|
+
* The base implementation of `_.create` without support for assigning
|
|
43217
|
+
* properties to the created object.
|
|
43218
|
+
*
|
|
43219
|
+
* @private
|
|
43220
|
+
* @param {Object} proto The object to inherit from.
|
|
43221
|
+
* @returns {Object} Returns the new object.
|
|
43222
|
+
*/
|
|
43223
|
+
var baseCreate = (function() {
|
|
43224
|
+
function object() {}
|
|
43225
|
+
return function(proto) {
|
|
43226
|
+
if (!isObject(proto)) {
|
|
43227
|
+
return {};
|
|
43228
|
+
}
|
|
43229
|
+
if (objectCreate) {
|
|
43230
|
+
return objectCreate(proto);
|
|
43231
|
+
}
|
|
43232
|
+
object.prototype = proto;
|
|
43233
|
+
var result = new object;
|
|
43234
|
+
object.prototype = undefined;
|
|
43235
|
+
return result;
|
|
43236
|
+
};
|
|
43237
|
+
}());
|
|
43238
|
+
|
|
43239
|
+
/**
|
|
43240
|
+
* A faster alternative to `Function#apply`, this function invokes `func`
|
|
43241
|
+
* with the `this` binding of `thisArg` and the arguments of `args`.
|
|
43242
|
+
*
|
|
43243
|
+
* @private
|
|
43244
|
+
* @param {Function} func The function to invoke.
|
|
43245
|
+
* @param {*} thisArg The `this` binding of `func`.
|
|
43246
|
+
* @param {Array} args The arguments to invoke `func` with.
|
|
43247
|
+
* @returns {*} Returns the result of `func`.
|
|
43248
|
+
*/
|
|
43249
|
+
function apply(func, thisArg, args) {
|
|
43250
|
+
switch (args.length) {
|
|
43251
|
+
case 0: return func.call(thisArg);
|
|
43252
|
+
case 1: return func.call(thisArg, args[0]);
|
|
43253
|
+
case 2: return func.call(thisArg, args[0], args[1]);
|
|
43254
|
+
case 3: return func.call(thisArg, args[0], args[1], args[2]);
|
|
43255
|
+
}
|
|
43256
|
+
return func.apply(thisArg, args);
|
|
43257
|
+
}
|
|
43258
|
+
|
|
43259
|
+
/**
|
|
43260
|
+
* Copies the values of `source` to `array`.
|
|
43261
|
+
*
|
|
43262
|
+
* @private
|
|
43263
|
+
* @param {Array} source The array to copy values from.
|
|
43264
|
+
* @param {Array} [array=[]] The array to copy values to.
|
|
43265
|
+
* @returns {Array} Returns `array`.
|
|
43266
|
+
*/
|
|
43267
|
+
function copyArray(source, array) {
|
|
43268
|
+
var index = -1,
|
|
43269
|
+
length = source.length;
|
|
43270
|
+
|
|
43271
|
+
array || (array = Array(length));
|
|
43272
|
+
while (++index < length) {
|
|
43273
|
+
array[index] = source[index];
|
|
43274
|
+
}
|
|
43275
|
+
return array;
|
|
43276
|
+
}
|
|
43277
|
+
|
|
43278
|
+
/** Used to detect hot functions by number of calls within a span of milliseconds. */
|
|
43279
|
+
var HOT_COUNT = 800,
|
|
43280
|
+
HOT_SPAN = 16;
|
|
43281
|
+
|
|
43282
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
43283
|
+
var nativeNow = Date.now;
|
|
43284
|
+
|
|
43285
|
+
/**
|
|
43286
|
+
* Creates a function that'll short out and invoke `identity` instead
|
|
43287
|
+
* of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
|
|
43288
|
+
* milliseconds.
|
|
43289
|
+
*
|
|
43290
|
+
* @private
|
|
43291
|
+
* @param {Function} func The function to restrict.
|
|
43292
|
+
* @returns {Function} Returns the new shortable function.
|
|
43293
|
+
*/
|
|
43294
|
+
function shortOut(func) {
|
|
43295
|
+
var count = 0,
|
|
43296
|
+
lastCalled = 0;
|
|
43297
|
+
|
|
43298
|
+
return function() {
|
|
43299
|
+
var stamp = nativeNow(),
|
|
43300
|
+
remaining = HOT_SPAN - (stamp - lastCalled);
|
|
43301
|
+
|
|
43302
|
+
lastCalled = stamp;
|
|
43303
|
+
if (remaining > 0) {
|
|
43304
|
+
if (++count >= HOT_COUNT) {
|
|
43305
|
+
return arguments[0];
|
|
43306
|
+
}
|
|
43307
|
+
} else {
|
|
43308
|
+
count = 0;
|
|
43309
|
+
}
|
|
43310
|
+
return func.apply(undefined, arguments);
|
|
43311
|
+
};
|
|
43312
|
+
}
|
|
43313
|
+
|
|
43314
|
+
/**
|
|
43315
|
+
* Creates a function that returns `value`.
|
|
43316
|
+
*
|
|
43317
|
+
* @static
|
|
43318
|
+
* @memberOf _
|
|
43319
|
+
* @since 2.4.0
|
|
43320
|
+
* @category Util
|
|
43321
|
+
* @param {*} value The value to return from the new function.
|
|
43322
|
+
* @returns {Function} Returns the new constant function.
|
|
43323
|
+
* @example
|
|
43324
|
+
*
|
|
43325
|
+
* var objects = _.times(2, _.constant({ 'a': 1 }));
|
|
43326
|
+
*
|
|
43327
|
+
*
|
|
43328
|
+
* // => [{ 'a': 1 }, { 'a': 1 }]
|
|
43329
|
+
*
|
|
43330
|
+
*
|
|
43331
|
+
* // => true
|
|
43332
|
+
*/
|
|
43333
|
+
function constant(value) {
|
|
43334
|
+
return function() {
|
|
43335
|
+
return value;
|
|
43336
|
+
};
|
|
43337
|
+
}
|
|
43338
|
+
|
|
43339
|
+
var defineProperty = (function() {
|
|
43340
|
+
try {
|
|
43341
|
+
var func = getNative(Object, 'defineProperty');
|
|
43342
|
+
func({}, '', {});
|
|
43343
|
+
return func;
|
|
43344
|
+
} catch (e) {}
|
|
43345
|
+
}());
|
|
43346
|
+
|
|
43347
|
+
/**
|
|
43348
|
+
* The base implementation of `setToString` without support for hot loop shorting.
|
|
43349
|
+
*
|
|
43350
|
+
* @private
|
|
43351
|
+
* @param {Function} func The function to modify.
|
|
43352
|
+
* @param {Function} string The `toString` result.
|
|
43353
|
+
* @returns {Function} Returns `func`.
|
|
43354
|
+
*/
|
|
43355
|
+
var baseSetToString = !defineProperty ? identity : function(func, string) {
|
|
43356
|
+
return defineProperty(func, 'toString', {
|
|
43357
|
+
'configurable': true,
|
|
43358
|
+
'enumerable': false,
|
|
43359
|
+
'value': constant(string),
|
|
43360
|
+
'writable': true
|
|
43361
|
+
});
|
|
43362
|
+
};
|
|
43363
|
+
|
|
43364
|
+
/**
|
|
43365
|
+
* Sets the `toString` method of `func` to return `string`.
|
|
43366
|
+
*
|
|
43367
|
+
* @private
|
|
43368
|
+
* @param {Function} func The function to modify.
|
|
43369
|
+
* @param {Function} string The `toString` result.
|
|
43370
|
+
* @returns {Function} Returns `func`.
|
|
43371
|
+
*/
|
|
43372
|
+
var setToString = shortOut(baseSetToString);
|
|
43373
|
+
|
|
43374
|
+
/** Used as references for various `Number` constants. */
|
|
43375
|
+
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
43376
|
+
|
|
43377
|
+
/** Used to detect unsigned integer values. */
|
|
43378
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
43379
|
+
|
|
43380
|
+
/**
|
|
43381
|
+
* Checks if `value` is a valid array-like index.
|
|
43382
|
+
*
|
|
43383
|
+
* @private
|
|
43384
|
+
* @param {*} value The value to check.
|
|
43385
|
+
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
43386
|
+
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
43387
|
+
*/
|
|
43388
|
+
function isIndex(value, length) {
|
|
43389
|
+
var type = typeof value;
|
|
43390
|
+
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
43391
|
+
|
|
43392
|
+
return !!length &&
|
|
43393
|
+
(type == 'number' ||
|
|
43394
|
+
(type != 'symbol' && reIsUint.test(value))) &&
|
|
43395
|
+
(value > -1 && value % 1 == 0 && value < length);
|
|
43396
|
+
}
|
|
43397
|
+
|
|
43398
|
+
/**
|
|
43399
|
+
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
43400
|
+
* value checks.
|
|
43401
|
+
*
|
|
43402
|
+
* @private
|
|
43403
|
+
* @param {Object} object The object to modify.
|
|
43404
|
+
* @param {string} key The key of the property to assign.
|
|
43405
|
+
* @param {*} value The value to assign.
|
|
43406
|
+
*/
|
|
43407
|
+
function baseAssignValue(object, key, value) {
|
|
43408
|
+
if (key == '__proto__' && defineProperty) {
|
|
43409
|
+
defineProperty(object, key, {
|
|
43410
|
+
'configurable': true,
|
|
43411
|
+
'enumerable': true,
|
|
43412
|
+
'value': value,
|
|
43413
|
+
'writable': true
|
|
43414
|
+
});
|
|
43415
|
+
} else {
|
|
43416
|
+
object[key] = value;
|
|
43417
|
+
}
|
|
43418
|
+
}
|
|
43419
|
+
|
|
43420
|
+
/**
|
|
43421
|
+
* Performs a
|
|
43422
|
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
43423
|
+
* comparison between two values to determine if they are equivalent.
|
|
43424
|
+
*
|
|
43425
|
+
* @static
|
|
43426
|
+
* @memberOf _
|
|
43427
|
+
* @since 4.0.0
|
|
43428
|
+
* @category Lang
|
|
43429
|
+
* @param {*} value The value to compare.
|
|
43430
|
+
* @param {*} other The other value to compare.
|
|
43431
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
43432
|
+
* @example
|
|
43433
|
+
*
|
|
43434
|
+
* var object = { 'a': 1 };
|
|
43435
|
+
* var other = { 'a': 1 };
|
|
43436
|
+
*
|
|
43437
|
+
* _.eq(object, object);
|
|
43438
|
+
* // => true
|
|
43439
|
+
*
|
|
43440
|
+
* _.eq(object, other);
|
|
43441
|
+
* // => false
|
|
43442
|
+
*
|
|
43443
|
+
* _.eq('a', 'a');
|
|
43444
|
+
* // => true
|
|
43445
|
+
*
|
|
43446
|
+
* _.eq('a', Object('a'));
|
|
43447
|
+
* // => false
|
|
43448
|
+
*
|
|
43449
|
+
* _.eq(NaN, NaN);
|
|
43450
|
+
* // => true
|
|
43451
|
+
*/
|
|
43452
|
+
function eq(value, other) {
|
|
43453
|
+
return value === other || (value !== value && other !== other);
|
|
43454
|
+
}
|
|
43455
|
+
|
|
43456
|
+
/** Used for built-in method references. */
|
|
43457
|
+
var objectProto$6 = Object.prototype;
|
|
43458
|
+
|
|
43459
|
+
/** Used to check objects for own properties. */
|
|
43460
|
+
var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
|
|
43461
|
+
|
|
43462
|
+
/**
|
|
43463
|
+
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
|
43464
|
+
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
43465
|
+
* for equality comparisons.
|
|
43466
|
+
*
|
|
43467
|
+
* @private
|
|
43468
|
+
* @param {Object} object The object to modify.
|
|
43469
|
+
* @param {string} key The key of the property to assign.
|
|
43470
|
+
* @param {*} value The value to assign.
|
|
43471
|
+
*/
|
|
43472
|
+
function assignValue(object, key, value) {
|
|
43473
|
+
var objValue = object[key];
|
|
43474
|
+
if (!(hasOwnProperty$5.call(object, key) && eq(objValue, value)) ||
|
|
43475
|
+
(value === undefined && !(key in object))) {
|
|
43476
|
+
baseAssignValue(object, key, value);
|
|
43477
|
+
}
|
|
43478
|
+
}
|
|
43479
|
+
|
|
43480
|
+
/**
|
|
43481
|
+
* Copies properties of `source` to `object`.
|
|
43482
|
+
*
|
|
43483
|
+
* @private
|
|
43484
|
+
* @param {Object} source The object to copy properties from.
|
|
43485
|
+
* @param {Array} props The property identifiers to copy.
|
|
43486
|
+
* @param {Object} [object={}] The object to copy properties to.
|
|
43487
|
+
* @param {Function} [customizer] The function to customize copied values.
|
|
43488
|
+
* @returns {Object} Returns `object`.
|
|
43489
|
+
*/
|
|
43490
|
+
function copyObject(source, props, object, customizer) {
|
|
43491
|
+
var isNew = !object;
|
|
43492
|
+
object || (object = {});
|
|
43493
|
+
|
|
43494
|
+
var index = -1,
|
|
43495
|
+
length = props.length;
|
|
43496
|
+
|
|
43497
|
+
while (++index < length) {
|
|
43498
|
+
var key = props[index];
|
|
43499
|
+
|
|
43500
|
+
var newValue = undefined;
|
|
43501
|
+
|
|
43502
|
+
if (newValue === undefined) {
|
|
43503
|
+
newValue = source[key];
|
|
43504
|
+
}
|
|
43505
|
+
if (isNew) {
|
|
43506
|
+
baseAssignValue(object, key, newValue);
|
|
43507
|
+
} else {
|
|
43508
|
+
assignValue(object, key, newValue);
|
|
43509
|
+
}
|
|
43510
|
+
}
|
|
43511
|
+
return object;
|
|
43512
|
+
}
|
|
43513
|
+
|
|
43514
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
43515
|
+
var nativeMax = Math.max;
|
|
43516
|
+
|
|
43517
|
+
/**
|
|
43518
|
+
* A specialized version of `baseRest` which transforms the rest array.
|
|
43519
|
+
*
|
|
43520
|
+
* @private
|
|
43521
|
+
* @param {Function} func The function to apply a rest parameter to.
|
|
43522
|
+
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
43523
|
+
* @param {Function} transform The rest array transform.
|
|
43524
|
+
* @returns {Function} Returns the new function.
|
|
43525
|
+
*/
|
|
43526
|
+
function overRest(func, start, transform) {
|
|
43527
|
+
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
|
|
43528
|
+
return function() {
|
|
43529
|
+
var args = arguments,
|
|
43530
|
+
index = -1,
|
|
43531
|
+
length = nativeMax(args.length - start, 0),
|
|
43532
|
+
array = Array(length);
|
|
43533
|
+
|
|
43534
|
+
while (++index < length) {
|
|
43535
|
+
array[index] = args[start + index];
|
|
43536
|
+
}
|
|
43537
|
+
index = -1;
|
|
43538
|
+
var otherArgs = Array(start + 1);
|
|
43539
|
+
while (++index < start) {
|
|
43540
|
+
otherArgs[index] = args[index];
|
|
43541
|
+
}
|
|
43542
|
+
otherArgs[start] = transform(array);
|
|
43543
|
+
return apply(func, this, otherArgs);
|
|
43544
|
+
};
|
|
43545
|
+
}
|
|
43546
|
+
|
|
43547
|
+
/**
|
|
43548
|
+
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
|
|
43549
|
+
*
|
|
43550
|
+
* @private
|
|
43551
|
+
* @param {Function} func The function to apply a rest parameter to.
|
|
43552
|
+
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
43553
|
+
* @returns {Function} Returns the new function.
|
|
43554
|
+
*/
|
|
43555
|
+
function baseRest(func, start) {
|
|
43556
|
+
return setToString(overRest(func, start, identity), func + '');
|
|
43557
|
+
}
|
|
43558
|
+
|
|
43559
|
+
/** Used as references for various `Number` constants. */
|
|
43560
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
43561
|
+
|
|
43562
|
+
/**
|
|
43563
|
+
* Checks if `value` is a valid array-like length.
|
|
43564
|
+
*
|
|
43565
|
+
* **Note:** This method is loosely based on
|
|
43566
|
+
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
43567
|
+
*
|
|
43568
|
+
* @static
|
|
43569
|
+
* @memberOf _
|
|
43570
|
+
* @since 4.0.0
|
|
43571
|
+
* @category Lang
|
|
43572
|
+
* @param {*} value The value to check.
|
|
43573
|
+
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
43574
|
+
* @example
|
|
43575
|
+
*
|
|
43576
|
+
* _.isLength(3);
|
|
43577
|
+
* // => true
|
|
43578
|
+
*
|
|
43579
|
+
* _.isLength(Number.MIN_VALUE);
|
|
43580
|
+
* // => false
|
|
43581
|
+
*
|
|
43582
|
+
* _.isLength(Infinity);
|
|
43583
|
+
* // => false
|
|
43584
|
+
*
|
|
43585
|
+
* _.isLength('3');
|
|
43586
|
+
* // => false
|
|
43587
|
+
*/
|
|
43588
|
+
function isLength(value) {
|
|
43589
|
+
return typeof value == 'number' &&
|
|
43590
|
+
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
43591
|
+
}
|
|
43592
|
+
|
|
43593
|
+
/**
|
|
43594
|
+
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
43595
|
+
* not a function and has a `value.length` that's an integer greater than or
|
|
43596
|
+
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
43597
|
+
*
|
|
43598
|
+
* @static
|
|
43599
|
+
* @memberOf _
|
|
43600
|
+
* @since 4.0.0
|
|
43601
|
+
* @category Lang
|
|
43602
|
+
* @param {*} value The value to check.
|
|
43603
|
+
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
43604
|
+
* @example
|
|
43605
|
+
*
|
|
43606
|
+
* _.isArrayLike([1, 2, 3]);
|
|
43607
|
+
* // => true
|
|
43608
|
+
*
|
|
43609
|
+
* _.isArrayLike(document.body.children);
|
|
43610
|
+
* // => true
|
|
43611
|
+
*
|
|
43612
|
+
* _.isArrayLike('abc');
|
|
43613
|
+
* // => true
|
|
43614
|
+
*
|
|
43615
|
+
* _.isArrayLike(_.noop);
|
|
43616
|
+
* // => false
|
|
43617
|
+
*/
|
|
43618
|
+
function isArrayLike(value) {
|
|
43619
|
+
return value != null && isLength(value.length) && !isFunction(value);
|
|
43620
|
+
}
|
|
43621
|
+
|
|
43622
|
+
/**
|
|
43623
|
+
* Checks if the given arguments are from an iteratee call.
|
|
43624
|
+
*
|
|
43625
|
+
* @private
|
|
43626
|
+
* @param {*} value The potential iteratee value argument.
|
|
43627
|
+
* @param {*} index The potential iteratee index or key argument.
|
|
43628
|
+
* @param {*} object The potential iteratee object argument.
|
|
43629
|
+
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
|
|
43630
|
+
* else `false`.
|
|
43631
|
+
*/
|
|
43632
|
+
function isIterateeCall(value, index, object) {
|
|
43633
|
+
if (!isObject(object)) {
|
|
43634
|
+
return false;
|
|
43635
|
+
}
|
|
43636
|
+
var type = typeof index;
|
|
43637
|
+
if (type == 'number'
|
|
43638
|
+
? (isArrayLike(object) && isIndex(index, object.length))
|
|
43639
|
+
: (type == 'string' && index in object)
|
|
43640
|
+
) {
|
|
43641
|
+
return eq(object[index], value);
|
|
43642
|
+
}
|
|
43643
|
+
return false;
|
|
43644
|
+
}
|
|
43645
|
+
|
|
43646
|
+
/**
|
|
43647
|
+
* Creates a function like `_.assign`.
|
|
43648
|
+
*
|
|
43649
|
+
* @private
|
|
43650
|
+
* @param {Function} assigner The function to assign values.
|
|
43651
|
+
* @returns {Function} Returns the new assigner function.
|
|
43652
|
+
*/
|
|
43653
|
+
function createAssigner(assigner) {
|
|
43654
|
+
return baseRest(function(object, sources) {
|
|
43655
|
+
var index = -1,
|
|
43656
|
+
length = sources.length,
|
|
43657
|
+
customizer = length > 1 ? sources[length - 1] : undefined,
|
|
43658
|
+
guard = length > 2 ? sources[2] : undefined;
|
|
43659
|
+
|
|
43660
|
+
customizer = (assigner.length > 3 && typeof customizer == 'function')
|
|
43661
|
+
? (length--, customizer)
|
|
43662
|
+
: undefined;
|
|
43663
|
+
|
|
43664
|
+
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
|
43665
|
+
customizer = length < 3 ? undefined : customizer;
|
|
43666
|
+
length = 1;
|
|
43667
|
+
}
|
|
43668
|
+
object = Object(object);
|
|
43669
|
+
while (++index < length) {
|
|
43670
|
+
var source = sources[index];
|
|
43671
|
+
if (source) {
|
|
43672
|
+
assigner(object, source, index, customizer);
|
|
43673
|
+
}
|
|
43674
|
+
}
|
|
43675
|
+
return object;
|
|
43676
|
+
});
|
|
43677
|
+
}
|
|
43678
|
+
|
|
43679
|
+
/** Used for built-in method references. */
|
|
43680
|
+
var objectProto$5 = Object.prototype;
|
|
43681
|
+
|
|
43682
|
+
/**
|
|
43683
|
+
* Checks if `value` is likely a prototype object.
|
|
43684
|
+
*
|
|
43685
|
+
* @private
|
|
43686
|
+
* @param {*} value The value to check.
|
|
43687
|
+
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
43688
|
+
*/
|
|
43689
|
+
function isPrototype(value) {
|
|
43690
|
+
var Ctor = value && value.constructor,
|
|
43691
|
+
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$5;
|
|
43692
|
+
|
|
43693
|
+
return value === proto;
|
|
43694
|
+
}
|
|
43695
|
+
|
|
43696
|
+
/**
|
|
43697
|
+
* The base implementation of `_.times` without support for iteratee shorthands
|
|
43698
|
+
* or max array length checks.
|
|
43699
|
+
*
|
|
43700
|
+
* @private
|
|
43701
|
+
* @param {number} n The number of times to invoke `iteratee`.
|
|
43702
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
43703
|
+
* @returns {Array} Returns the array of results.
|
|
43704
|
+
*/
|
|
43705
|
+
function baseTimes(n, iteratee) {
|
|
43706
|
+
var index = -1,
|
|
43707
|
+
result = Array(n);
|
|
43708
|
+
|
|
43709
|
+
while (++index < n) {
|
|
43710
|
+
result[index] = iteratee(index);
|
|
43711
|
+
}
|
|
43712
|
+
return result;
|
|
43713
|
+
}
|
|
43714
|
+
|
|
43715
|
+
/** `Object#toString` result references. */
|
|
43716
|
+
var argsTag$1 = '[object Arguments]';
|
|
43717
|
+
|
|
43718
|
+
/**
|
|
43719
|
+
* The base implementation of `_.isArguments`.
|
|
43720
|
+
*
|
|
43721
|
+
* @private
|
|
43722
|
+
* @param {*} value The value to check.
|
|
43723
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
43724
|
+
*/
|
|
43725
|
+
function baseIsArguments(value) {
|
|
43726
|
+
return isObjectLike(value) && baseGetTag(value) == argsTag$1;
|
|
43727
|
+
}
|
|
43728
|
+
|
|
43729
|
+
/** Used for built-in method references. */
|
|
43730
|
+
var objectProto$4 = Object.prototype;
|
|
43731
|
+
|
|
43732
|
+
/** Used to check objects for own properties. */
|
|
43733
|
+
var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
|
|
43734
|
+
|
|
43735
|
+
/** Built-in value references. */
|
|
43736
|
+
var propertyIsEnumerable = objectProto$4.propertyIsEnumerable;
|
|
43737
|
+
|
|
43738
|
+
/**
|
|
43739
|
+
* Checks if `value` is likely an `arguments` object.
|
|
43740
|
+
*
|
|
43741
|
+
* @static
|
|
43742
|
+
* @memberOf _
|
|
43743
|
+
* @since 0.1.0
|
|
43744
|
+
* @category Lang
|
|
43745
|
+
* @param {*} value The value to check.
|
|
43746
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
43747
|
+
* else `false`.
|
|
43748
|
+
* @example
|
|
43749
|
+
*
|
|
43750
|
+
* _.isArguments(function() { return arguments; }());
|
|
43751
|
+
* // => true
|
|
43752
|
+
*
|
|
43753
|
+
* _.isArguments([1, 2, 3]);
|
|
43754
|
+
* // => false
|
|
43755
|
+
*/
|
|
43756
|
+
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
|
|
43757
|
+
return isObjectLike(value) && hasOwnProperty$4.call(value, 'callee') &&
|
|
43758
|
+
!propertyIsEnumerable.call(value, 'callee');
|
|
43759
|
+
};
|
|
43760
|
+
|
|
43761
|
+
/**
|
|
43762
|
+
* This method returns `false`.
|
|
43763
|
+
*
|
|
43764
|
+
* @static
|
|
43765
|
+
* @memberOf _
|
|
43766
|
+
* @since 4.13.0
|
|
43767
|
+
* @category Util
|
|
43768
|
+
* @returns {boolean} Returns `false`.
|
|
43769
|
+
* @example
|
|
43770
|
+
*
|
|
43771
|
+
* _.times(2, _.stubFalse);
|
|
43772
|
+
* // => [false, false]
|
|
43773
|
+
*/
|
|
43774
|
+
function stubFalse() {
|
|
43775
|
+
return false;
|
|
43776
|
+
}
|
|
43777
|
+
|
|
43778
|
+
/** Detect free variable `exports`. */
|
|
43779
|
+
var freeExports$2 = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
|
43780
|
+
|
|
43781
|
+
/** Detect free variable `module`. */
|
|
43782
|
+
var freeModule$2 = freeExports$2 && typeof module == 'object' && module && !module.nodeType && module;
|
|
43783
|
+
|
|
43784
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
|
43785
|
+
var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
|
|
43786
|
+
|
|
43787
|
+
/** Built-in value references. */
|
|
43788
|
+
var Buffer$2 = moduleExports$2 ? root.Buffer : undefined;
|
|
43789
|
+
|
|
43790
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
43791
|
+
var nativeIsBuffer = Buffer$2 ? Buffer$2.isBuffer : undefined;
|
|
43792
|
+
|
|
43793
|
+
/**
|
|
43794
|
+
* Checks if `value` is a buffer.
|
|
43795
|
+
*
|
|
43796
|
+
* @static
|
|
43797
|
+
* @memberOf _
|
|
43798
|
+
* @since 4.3.0
|
|
43799
|
+
* @category Lang
|
|
43800
|
+
* @param {*} value The value to check.
|
|
43801
|
+
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
43802
|
+
* @example
|
|
43803
|
+
*
|
|
43804
|
+
* _.isBuffer(new Buffer(2));
|
|
43805
|
+
* // => true
|
|
43806
|
+
*
|
|
43807
|
+
* _.isBuffer(new Uint8Array(2));
|
|
43808
|
+
* // => false
|
|
43809
|
+
*/
|
|
43810
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
43811
|
+
|
|
43812
|
+
/** `Object#toString` result references. */
|
|
43813
|
+
var argsTag = '[object Arguments]',
|
|
43814
|
+
arrayTag = '[object Array]',
|
|
43815
|
+
boolTag = '[object Boolean]',
|
|
43816
|
+
dateTag = '[object Date]',
|
|
43817
|
+
errorTag = '[object Error]',
|
|
43818
|
+
funcTag = '[object Function]',
|
|
43819
|
+
mapTag = '[object Map]',
|
|
43820
|
+
numberTag = '[object Number]',
|
|
43821
|
+
objectTag$1 = '[object Object]',
|
|
43822
|
+
regexpTag = '[object RegExp]',
|
|
43823
|
+
setTag = '[object Set]',
|
|
43824
|
+
stringTag = '[object String]',
|
|
43825
|
+
weakMapTag = '[object WeakMap]';
|
|
43826
|
+
|
|
43827
|
+
var arrayBufferTag = '[object ArrayBuffer]',
|
|
43828
|
+
dataViewTag = '[object DataView]',
|
|
43829
|
+
float32Tag = '[object Float32Array]',
|
|
43830
|
+
float64Tag = '[object Float64Array]',
|
|
43831
|
+
int8Tag = '[object Int8Array]',
|
|
43832
|
+
int16Tag = '[object Int16Array]',
|
|
43833
|
+
int32Tag = '[object Int32Array]',
|
|
43834
|
+
uint8Tag = '[object Uint8Array]',
|
|
43835
|
+
uint8ClampedTag = '[object Uint8ClampedArray]',
|
|
43836
|
+
uint16Tag = '[object Uint16Array]',
|
|
43837
|
+
uint32Tag = '[object Uint32Array]';
|
|
43838
|
+
|
|
43839
|
+
/** Used to identify `toStringTag` values of typed arrays. */
|
|
43840
|
+
var typedArrayTags = {};
|
|
43841
|
+
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
|
|
43842
|
+
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
|
|
43843
|
+
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
|
|
43844
|
+
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
|
|
43845
|
+
typedArrayTags[uint32Tag] = true;
|
|
43846
|
+
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
|
|
43847
|
+
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
|
|
43848
|
+
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
|
|
43849
|
+
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
|
|
43850
|
+
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
|
|
43851
|
+
typedArrayTags[objectTag$1] = typedArrayTags[regexpTag] =
|
|
43852
|
+
typedArrayTags[setTag] = typedArrayTags[stringTag] =
|
|
43853
|
+
typedArrayTags[weakMapTag] = false;
|
|
43854
|
+
|
|
43855
|
+
/**
|
|
43856
|
+
* The base implementation of `_.isTypedArray` without Node.js optimizations.
|
|
43857
|
+
*
|
|
43858
|
+
* @private
|
|
43859
|
+
* @param {*} value The value to check.
|
|
43860
|
+
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
43861
|
+
*/
|
|
43862
|
+
function baseIsTypedArray(value) {
|
|
43863
|
+
return isObjectLike(value) &&
|
|
43864
|
+
isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
43865
|
+
}
|
|
43866
|
+
|
|
43867
|
+
/**
|
|
43868
|
+
* The base implementation of `_.unary` without support for storing metadata.
|
|
43869
|
+
*
|
|
43870
|
+
* @private
|
|
43871
|
+
* @param {Function} func The function to cap arguments for.
|
|
43872
|
+
* @returns {Function} Returns the new capped function.
|
|
43873
|
+
*/
|
|
43874
|
+
function baseUnary(func) {
|
|
43875
|
+
return function(value) {
|
|
43876
|
+
return func(value);
|
|
43877
|
+
};
|
|
43878
|
+
}
|
|
43879
|
+
|
|
43880
|
+
/** Detect free variable `exports`. */
|
|
43881
|
+
var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
|
43882
|
+
|
|
43883
|
+
/** Detect free variable `module`. */
|
|
43884
|
+
var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module;
|
|
43885
|
+
|
|
43886
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
|
43887
|
+
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
|
|
43888
|
+
|
|
43889
|
+
/** Detect free variable `process` from Node.js. */
|
|
43890
|
+
var freeProcess = moduleExports$1 && freeGlobal.process;
|
|
43891
|
+
|
|
43892
|
+
/** Used to access faster Node.js helpers. */
|
|
43893
|
+
var nodeUtil = (function() {
|
|
43894
|
+
try {
|
|
43895
|
+
// Use `util.types` for Node.js 10+.
|
|
43896
|
+
var types = freeModule$1 && freeModule$1.require && freeModule$1.require('util').types;
|
|
43897
|
+
|
|
43898
|
+
if (types) {
|
|
43899
|
+
return types;
|
|
43900
|
+
}
|
|
43901
|
+
|
|
43902
|
+
// Legacy `process.binding('util')` for Node.js < 10.
|
|
43903
|
+
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|
43904
|
+
} catch (e) {}
|
|
43905
|
+
}());
|
|
43906
|
+
|
|
43907
|
+
/* Node.js helper references. */
|
|
43908
|
+
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
43909
|
+
|
|
43910
|
+
/**
|
|
43911
|
+
* Checks if `value` is classified as a typed array.
|
|
43912
|
+
*
|
|
43913
|
+
* @static
|
|
43914
|
+
* @memberOf _
|
|
43915
|
+
* @since 3.0.0
|
|
43916
|
+
* @category Lang
|
|
43917
|
+
* @param {*} value The value to check.
|
|
43918
|
+
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
43919
|
+
* @example
|
|
43920
|
+
*
|
|
43921
|
+
* _.isTypedArray(new Uint8Array);
|
|
43922
|
+
* // => true
|
|
43923
|
+
*
|
|
43924
|
+
* _.isTypedArray([]);
|
|
43925
|
+
* // => false
|
|
43926
|
+
*/
|
|
43927
|
+
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
43928
|
+
|
|
43929
|
+
/**
|
|
43930
|
+
* Creates an array of the enumerable property names of the array-like `value`.
|
|
43931
|
+
*
|
|
43932
|
+
* @private
|
|
43933
|
+
* @param {*} value The value to query.
|
|
43934
|
+
* @param {boolean} inherited Specify returning inherited property names.
|
|
43935
|
+
* @returns {Array} Returns the array of property names.
|
|
43936
|
+
*/
|
|
43937
|
+
function arrayLikeKeys(value, inherited) {
|
|
43938
|
+
var isArr = isArray(value),
|
|
43939
|
+
isArg = !isArr && isArguments(value),
|
|
43940
|
+
isBuff = !isArr && !isArg && isBuffer(value),
|
|
43941
|
+
isType = !isArr && !isArg && !isBuff && isTypedArray(value),
|
|
43942
|
+
skipIndexes = isArr || isArg || isBuff || isType,
|
|
43943
|
+
result = skipIndexes ? baseTimes(value.length, String) : [],
|
|
43944
|
+
length = result.length;
|
|
43945
|
+
|
|
43946
|
+
for (var key in value) {
|
|
43947
|
+
if (!(skipIndexes && (
|
|
43948
|
+
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
43949
|
+
key == 'length' ||
|
|
43950
|
+
// Node.js 0.10 has enumerable non-index properties on buffers.
|
|
43951
|
+
(isBuff && (key == 'offset' || key == 'parent')) ||
|
|
43952
|
+
// PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
43953
|
+
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
|
|
43954
|
+
// Skip index properties.
|
|
43955
|
+
isIndex(key, length)
|
|
43956
|
+
))) {
|
|
43957
|
+
result.push(key);
|
|
43958
|
+
}
|
|
43959
|
+
}
|
|
43960
|
+
return result;
|
|
43961
|
+
}
|
|
43962
|
+
|
|
43963
|
+
/**
|
|
43964
|
+
* Creates a unary function that invokes `func` with its argument transformed.
|
|
43965
|
+
*
|
|
43966
|
+
* @private
|
|
43967
|
+
* @param {Function} func The function to wrap.
|
|
43968
|
+
* @param {Function} transform The argument transform.
|
|
43969
|
+
* @returns {Function} Returns the new function.
|
|
43970
|
+
*/
|
|
43971
|
+
function overArg(func, transform) {
|
|
43972
|
+
return function(arg) {
|
|
43973
|
+
return func(transform(arg));
|
|
43974
|
+
};
|
|
43975
|
+
}
|
|
43976
|
+
|
|
43977
|
+
/**
|
|
43978
|
+
* This function is like
|
|
43979
|
+
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
43980
|
+
* except that it includes inherited enumerable properties.
|
|
43981
|
+
*
|
|
43982
|
+
* @private
|
|
43983
|
+
* @param {Object} object The object to query.
|
|
43984
|
+
* @returns {Array} Returns the array of property names.
|
|
43985
|
+
*/
|
|
43986
|
+
function nativeKeysIn(object) {
|
|
43987
|
+
var result = [];
|
|
43988
|
+
if (object != null) {
|
|
43989
|
+
for (var key in Object(object)) {
|
|
43990
|
+
result.push(key);
|
|
43991
|
+
}
|
|
43992
|
+
}
|
|
43993
|
+
return result;
|
|
43994
|
+
}
|
|
43995
|
+
|
|
43996
|
+
/** Used for built-in method references. */
|
|
43997
|
+
var objectProto$3 = Object.prototype;
|
|
43998
|
+
|
|
43999
|
+
/** Used to check objects for own properties. */
|
|
44000
|
+
var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
|
|
44001
|
+
|
|
44002
|
+
/**
|
|
44003
|
+
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
|
|
44004
|
+
*
|
|
44005
|
+
* @private
|
|
44006
|
+
* @param {Object} object The object to query.
|
|
44007
|
+
* @returns {Array} Returns the array of property names.
|
|
44008
|
+
*/
|
|
44009
|
+
function baseKeysIn(object) {
|
|
44010
|
+
if (!isObject(object)) {
|
|
44011
|
+
return nativeKeysIn(object);
|
|
44012
|
+
}
|
|
44013
|
+
var isProto = isPrototype(object),
|
|
44014
|
+
result = [];
|
|
44015
|
+
|
|
44016
|
+
for (var key in object) {
|
|
44017
|
+
if (!(key == 'constructor' && (isProto || !hasOwnProperty$3.call(object, key)))) {
|
|
44018
|
+
result.push(key);
|
|
44019
|
+
}
|
|
44020
|
+
}
|
|
44021
|
+
return result;
|
|
44022
|
+
}
|
|
44023
|
+
|
|
44024
|
+
/**
|
|
44025
|
+
* Creates an array of the own and inherited enumerable property names of `object`.
|
|
44026
|
+
*
|
|
44027
|
+
* **Note:** Non-object values are coerced to objects.
|
|
44028
|
+
*
|
|
44029
|
+
* @static
|
|
44030
|
+
* @memberOf _
|
|
44031
|
+
* @since 3.0.0
|
|
44032
|
+
* @category Object
|
|
44033
|
+
* @param {Object} object The object to query.
|
|
44034
|
+
* @returns {Array} Returns the array of property names.
|
|
44035
|
+
* @example
|
|
44036
|
+
*
|
|
44037
|
+
* function Foo() {
|
|
44038
|
+
* this.a = 1;
|
|
44039
|
+
* this.b = 2;
|
|
44040
|
+
* }
|
|
44041
|
+
*
|
|
44042
|
+
* Foo.prototype.c = 3;
|
|
44043
|
+
*
|
|
44044
|
+
* _.keysIn(new Foo);
|
|
44045
|
+
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
|
|
44046
|
+
*/
|
|
44047
|
+
function keysIn(object) {
|
|
44048
|
+
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeysIn(object);
|
|
44049
|
+
}
|
|
44050
|
+
|
|
44051
|
+
/* Built-in method references that are verified to be native. */
|
|
44052
|
+
var nativeCreate = getNative(Object, 'create');
|
|
44053
|
+
|
|
44054
|
+
/**
|
|
44055
|
+
* Removes all key-value entries from the hash.
|
|
44056
|
+
*
|
|
44057
|
+
* @private
|
|
44058
|
+
* @name clear
|
|
44059
|
+
* @memberOf Hash
|
|
44060
|
+
*/
|
|
44061
|
+
function hashClear() {
|
|
44062
|
+
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
44063
|
+
this.size = 0;
|
|
44064
|
+
}
|
|
44065
|
+
|
|
44066
|
+
/**
|
|
44067
|
+
* Removes `key` and its value from the hash.
|
|
44068
|
+
*
|
|
44069
|
+
* @private
|
|
44070
|
+
* @name delete
|
|
44071
|
+
* @memberOf Hash
|
|
44072
|
+
* @param {Object} hash The hash to modify.
|
|
44073
|
+
* @param {string} key The key of the value to remove.
|
|
44074
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
44075
|
+
*/
|
|
44076
|
+
function hashDelete(key) {
|
|
44077
|
+
var result = this.has(key) && delete this.__data__[key];
|
|
44078
|
+
this.size -= result ? 1 : 0;
|
|
44079
|
+
return result;
|
|
44080
|
+
}
|
|
44081
|
+
|
|
44082
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
44083
|
+
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
44084
|
+
|
|
44085
|
+
/** Used for built-in method references. */
|
|
44086
|
+
var objectProto$2 = Object.prototype;
|
|
44087
|
+
|
|
44088
|
+
/** Used to check objects for own properties. */
|
|
44089
|
+
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
44090
|
+
|
|
44091
|
+
/**
|
|
44092
|
+
* Gets the hash value for `key`.
|
|
44093
|
+
*
|
|
44094
|
+
* @private
|
|
44095
|
+
* @name get
|
|
44096
|
+
* @memberOf Hash
|
|
44097
|
+
* @param {string} key The key of the value to get.
|
|
44098
|
+
* @returns {*} Returns the entry value.
|
|
44099
|
+
*/
|
|
44100
|
+
function hashGet(key) {
|
|
44101
|
+
var data = this.__data__;
|
|
44102
|
+
if (nativeCreate) {
|
|
44103
|
+
var result = data[key];
|
|
44104
|
+
return result === HASH_UNDEFINED$1 ? undefined : result;
|
|
44105
|
+
}
|
|
44106
|
+
return hasOwnProperty$2.call(data, key) ? data[key] : undefined;
|
|
44107
|
+
}
|
|
44108
|
+
|
|
44109
|
+
/** Used for built-in method references. */
|
|
44110
|
+
var objectProto$1 = Object.prototype;
|
|
44111
|
+
|
|
44112
|
+
/** Used to check objects for own properties. */
|
|
44113
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
44114
|
+
|
|
44115
|
+
/**
|
|
44116
|
+
* Checks if a hash value for `key` exists.
|
|
44117
|
+
*
|
|
44118
|
+
* @private
|
|
44119
|
+
* @name has
|
|
44120
|
+
* @memberOf Hash
|
|
44121
|
+
* @param {string} key The key of the entry to check.
|
|
44122
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
44123
|
+
*/
|
|
44124
|
+
function hashHas(key) {
|
|
44125
|
+
var data = this.__data__;
|
|
44126
|
+
return nativeCreate ? (data[key] !== undefined) : hasOwnProperty$1.call(data, key);
|
|
44127
|
+
}
|
|
44128
|
+
|
|
44129
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
44130
|
+
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
44131
|
+
|
|
44132
|
+
/**
|
|
44133
|
+
* Sets the hash `key` to `value`.
|
|
44134
|
+
*
|
|
44135
|
+
* @private
|
|
44136
|
+
* @name set
|
|
44137
|
+
* @memberOf Hash
|
|
44138
|
+
* @param {string} key The key of the value to set.
|
|
44139
|
+
* @param {*} value The value to set.
|
|
44140
|
+
* @returns {Object} Returns the hash instance.
|
|
44141
|
+
*/
|
|
44142
|
+
function hashSet(key, value) {
|
|
44143
|
+
var data = this.__data__;
|
|
44144
|
+
this.size += this.has(key) ? 0 : 1;
|
|
44145
|
+
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
44146
|
+
return this;
|
|
44147
|
+
}
|
|
44148
|
+
|
|
44149
|
+
/**
|
|
44150
|
+
* Creates a hash object.
|
|
44151
|
+
*
|
|
44152
|
+
* @private
|
|
44153
|
+
* @constructor
|
|
44154
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
44155
|
+
*/
|
|
44156
|
+
function Hash(entries) {
|
|
44157
|
+
var index = -1,
|
|
44158
|
+
length = entries == null ? 0 : entries.length;
|
|
44159
|
+
|
|
44160
|
+
this.clear();
|
|
44161
|
+
while (++index < length) {
|
|
44162
|
+
var entry = entries[index];
|
|
44163
|
+
this.set(entry[0], entry[1]);
|
|
44164
|
+
}
|
|
44165
|
+
}
|
|
44166
|
+
|
|
44167
|
+
// Add methods to `Hash`.
|
|
44168
|
+
Hash.prototype.clear = hashClear;
|
|
44169
|
+
Hash.prototype['delete'] = hashDelete;
|
|
44170
|
+
Hash.prototype.get = hashGet;
|
|
44171
|
+
Hash.prototype.has = hashHas;
|
|
44172
|
+
Hash.prototype.set = hashSet;
|
|
44173
|
+
|
|
44174
|
+
/**
|
|
44175
|
+
* Removes all key-value entries from the list cache.
|
|
44176
|
+
*
|
|
44177
|
+
* @private
|
|
44178
|
+
* @name clear
|
|
44179
|
+
* @memberOf ListCache
|
|
44180
|
+
*/
|
|
44181
|
+
function listCacheClear() {
|
|
44182
|
+
this.__data__ = [];
|
|
44183
|
+
this.size = 0;
|
|
44184
|
+
}
|
|
44185
|
+
|
|
44186
|
+
/**
|
|
44187
|
+
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
44188
|
+
*
|
|
44189
|
+
* @private
|
|
44190
|
+
* @param {Array} array The array to inspect.
|
|
44191
|
+
* @param {*} key The key to search for.
|
|
44192
|
+
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
44193
|
+
*/
|
|
44194
|
+
function assocIndexOf(array, key) {
|
|
44195
|
+
var length = array.length;
|
|
44196
|
+
while (length--) {
|
|
44197
|
+
if (eq(array[length][0], key)) {
|
|
44198
|
+
return length;
|
|
44199
|
+
}
|
|
44200
|
+
}
|
|
44201
|
+
return -1;
|
|
44202
|
+
}
|
|
44203
|
+
|
|
44204
|
+
/** Used for built-in method references. */
|
|
44205
|
+
var arrayProto = Array.prototype;
|
|
44206
|
+
|
|
44207
|
+
/** Built-in value references. */
|
|
44208
|
+
var splice = arrayProto.splice;
|
|
44209
|
+
|
|
44210
|
+
/**
|
|
44211
|
+
* Removes `key` and its value from the list cache.
|
|
44212
|
+
*
|
|
44213
|
+
* @private
|
|
44214
|
+
* @name delete
|
|
44215
|
+
* @memberOf ListCache
|
|
44216
|
+
* @param {string} key The key of the value to remove.
|
|
44217
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
44218
|
+
*/
|
|
44219
|
+
function listCacheDelete(key) {
|
|
44220
|
+
var data = this.__data__,
|
|
44221
|
+
index = assocIndexOf(data, key);
|
|
44222
|
+
|
|
44223
|
+
if (index < 0) {
|
|
44224
|
+
return false;
|
|
44225
|
+
}
|
|
44226
|
+
var lastIndex = data.length - 1;
|
|
44227
|
+
if (index == lastIndex) {
|
|
44228
|
+
data.pop();
|
|
44229
|
+
} else {
|
|
44230
|
+
splice.call(data, index, 1);
|
|
44231
|
+
}
|
|
44232
|
+
--this.size;
|
|
44233
|
+
return true;
|
|
44234
|
+
}
|
|
44235
|
+
|
|
44236
|
+
/**
|
|
44237
|
+
* Gets the list cache value for `key`.
|
|
44238
|
+
*
|
|
44239
|
+
* @private
|
|
44240
|
+
* @name get
|
|
44241
|
+
* @memberOf ListCache
|
|
44242
|
+
* @param {string} key The key of the value to get.
|
|
44243
|
+
* @returns {*} Returns the entry value.
|
|
44244
|
+
*/
|
|
44245
|
+
function listCacheGet(key) {
|
|
44246
|
+
var data = this.__data__,
|
|
44247
|
+
index = assocIndexOf(data, key);
|
|
44248
|
+
|
|
44249
|
+
return index < 0 ? undefined : data[index][1];
|
|
44250
|
+
}
|
|
44251
|
+
|
|
44252
|
+
/**
|
|
44253
|
+
* Checks if a list cache value for `key` exists.
|
|
44254
|
+
*
|
|
44255
|
+
* @private
|
|
44256
|
+
* @name has
|
|
44257
|
+
* @memberOf ListCache
|
|
44258
|
+
* @param {string} key The key of the entry to check.
|
|
44259
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
44260
|
+
*/
|
|
44261
|
+
function listCacheHas(key) {
|
|
44262
|
+
return assocIndexOf(this.__data__, key) > -1;
|
|
44263
|
+
}
|
|
44264
|
+
|
|
44265
|
+
/**
|
|
44266
|
+
* Sets the list cache `key` to `value`.
|
|
44267
|
+
*
|
|
44268
|
+
* @private
|
|
44269
|
+
* @name set
|
|
44270
|
+
* @memberOf ListCache
|
|
44271
|
+
* @param {string} key The key of the value to set.
|
|
44272
|
+
* @param {*} value The value to set.
|
|
44273
|
+
* @returns {Object} Returns the list cache instance.
|
|
44274
|
+
*/
|
|
44275
|
+
function listCacheSet(key, value) {
|
|
44276
|
+
var data = this.__data__,
|
|
44277
|
+
index = assocIndexOf(data, key);
|
|
44278
|
+
|
|
44279
|
+
if (index < 0) {
|
|
44280
|
+
++this.size;
|
|
44281
|
+
data.push([key, value]);
|
|
44282
|
+
} else {
|
|
44283
|
+
data[index][1] = value;
|
|
44284
|
+
}
|
|
44285
|
+
return this;
|
|
44286
|
+
}
|
|
44287
|
+
|
|
44288
|
+
/**
|
|
44289
|
+
* Creates an list cache object.
|
|
44290
|
+
*
|
|
44291
|
+
* @private
|
|
44292
|
+
* @constructor
|
|
44293
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
44294
|
+
*/
|
|
44295
|
+
function ListCache(entries) {
|
|
44296
|
+
var index = -1,
|
|
44297
|
+
length = entries == null ? 0 : entries.length;
|
|
44298
|
+
|
|
44299
|
+
this.clear();
|
|
44300
|
+
while (++index < length) {
|
|
44301
|
+
var entry = entries[index];
|
|
44302
|
+
this.set(entry[0], entry[1]);
|
|
44303
|
+
}
|
|
44304
|
+
}
|
|
44305
|
+
|
|
44306
|
+
// Add methods to `ListCache`.
|
|
44307
|
+
ListCache.prototype.clear = listCacheClear;
|
|
44308
|
+
ListCache.prototype['delete'] = listCacheDelete;
|
|
44309
|
+
ListCache.prototype.get = listCacheGet;
|
|
44310
|
+
ListCache.prototype.has = listCacheHas;
|
|
44311
|
+
ListCache.prototype.set = listCacheSet;
|
|
44312
|
+
|
|
44313
|
+
/* Built-in method references that are verified to be native. */
|
|
44314
|
+
var Map$1 = getNative(root, 'Map');
|
|
44315
|
+
|
|
44316
|
+
/**
|
|
44317
|
+
* Removes all key-value entries from the map.
|
|
44318
|
+
*
|
|
44319
|
+
* @private
|
|
44320
|
+
* @name clear
|
|
44321
|
+
* @memberOf MapCache
|
|
44322
|
+
*/
|
|
44323
|
+
function mapCacheClear() {
|
|
44324
|
+
this.size = 0;
|
|
44325
|
+
this.__data__ = {
|
|
44326
|
+
'hash': new Hash,
|
|
44327
|
+
'map': new (Map$1 || ListCache),
|
|
44328
|
+
'string': new Hash
|
|
44329
|
+
};
|
|
44330
|
+
}
|
|
44331
|
+
|
|
44332
|
+
/**
|
|
44333
|
+
* Checks if `value` is suitable for use as unique object key.
|
|
44334
|
+
*
|
|
44335
|
+
* @private
|
|
44336
|
+
* @param {*} value The value to check.
|
|
44337
|
+
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
44338
|
+
*/
|
|
44339
|
+
function isKeyable(value) {
|
|
44340
|
+
var type = typeof value;
|
|
44341
|
+
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
44342
|
+
? (value !== '__proto__')
|
|
44343
|
+
: (value === null);
|
|
44344
|
+
}
|
|
44345
|
+
|
|
44346
|
+
/**
|
|
44347
|
+
* Gets the data for `map`.
|
|
44348
|
+
*
|
|
44349
|
+
* @private
|
|
44350
|
+
* @param {Object} map The map to query.
|
|
44351
|
+
* @param {string} key The reference key.
|
|
44352
|
+
* @returns {*} Returns the map data.
|
|
44353
|
+
*/
|
|
44354
|
+
function getMapData(map, key) {
|
|
44355
|
+
var data = map.__data__;
|
|
44356
|
+
return isKeyable(key)
|
|
44357
|
+
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
44358
|
+
: data.map;
|
|
44359
|
+
}
|
|
44360
|
+
|
|
44361
|
+
/**
|
|
44362
|
+
* Removes `key` and its value from the map.
|
|
44363
|
+
*
|
|
44364
|
+
* @private
|
|
44365
|
+
* @name delete
|
|
44366
|
+
* @memberOf MapCache
|
|
44367
|
+
* @param {string} key The key of the value to remove.
|
|
44368
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
44369
|
+
*/
|
|
44370
|
+
function mapCacheDelete(key) {
|
|
44371
|
+
var result = getMapData(this, key)['delete'](key);
|
|
44372
|
+
this.size -= result ? 1 : 0;
|
|
44373
|
+
return result;
|
|
44374
|
+
}
|
|
44375
|
+
|
|
44376
|
+
/**
|
|
44377
|
+
* Gets the map value for `key`.
|
|
44378
|
+
*
|
|
44379
|
+
* @private
|
|
44380
|
+
* @name get
|
|
44381
|
+
* @memberOf MapCache
|
|
44382
|
+
* @param {string} key The key of the value to get.
|
|
44383
|
+
* @returns {*} Returns the entry value.
|
|
44384
|
+
*/
|
|
44385
|
+
function mapCacheGet(key) {
|
|
44386
|
+
return getMapData(this, key).get(key);
|
|
44387
|
+
}
|
|
44388
|
+
|
|
44389
|
+
/**
|
|
44390
|
+
* Checks if a map value for `key` exists.
|
|
44391
|
+
*
|
|
44392
|
+
* @private
|
|
44393
|
+
* @name has
|
|
44394
|
+
* @memberOf MapCache
|
|
44395
|
+
* @param {string} key The key of the entry to check.
|
|
44396
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
44397
|
+
*/
|
|
44398
|
+
function mapCacheHas(key) {
|
|
44399
|
+
return getMapData(this, key).has(key);
|
|
44400
|
+
}
|
|
44401
|
+
|
|
44402
|
+
/**
|
|
44403
|
+
* Sets the map `key` to `value`.
|
|
44404
|
+
*
|
|
44405
|
+
* @private
|
|
44406
|
+
* @name set
|
|
44407
|
+
* @memberOf MapCache
|
|
44408
|
+
* @param {string} key The key of the value to set.
|
|
44409
|
+
* @param {*} value The value to set.
|
|
44410
|
+
* @returns {Object} Returns the map cache instance.
|
|
44411
|
+
*/
|
|
44412
|
+
function mapCacheSet(key, value) {
|
|
44413
|
+
var data = getMapData(this, key),
|
|
44414
|
+
size = data.size;
|
|
44415
|
+
|
|
44416
|
+
data.set(key, value);
|
|
44417
|
+
this.size += data.size == size ? 0 : 1;
|
|
44418
|
+
return this;
|
|
44419
|
+
}
|
|
44420
|
+
|
|
44421
|
+
/**
|
|
44422
|
+
* Creates a map cache object to store key-value pairs.
|
|
44423
|
+
*
|
|
44424
|
+
* @private
|
|
44425
|
+
* @constructor
|
|
44426
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
44427
|
+
*/
|
|
44428
|
+
function MapCache(entries) {
|
|
44429
|
+
var index = -1,
|
|
44430
|
+
length = entries == null ? 0 : entries.length;
|
|
44431
|
+
|
|
44432
|
+
this.clear();
|
|
44433
|
+
while (++index < length) {
|
|
44434
|
+
var entry = entries[index];
|
|
44435
|
+
this.set(entry[0], entry[1]);
|
|
44436
|
+
}
|
|
44437
|
+
}
|
|
44438
|
+
|
|
44439
|
+
// Add methods to `MapCache`.
|
|
44440
|
+
MapCache.prototype.clear = mapCacheClear;
|
|
44441
|
+
MapCache.prototype['delete'] = mapCacheDelete;
|
|
44442
|
+
MapCache.prototype.get = mapCacheGet;
|
|
44443
|
+
MapCache.prototype.has = mapCacheHas;
|
|
44444
|
+
MapCache.prototype.set = mapCacheSet;
|
|
44445
|
+
|
|
44446
|
+
/** Built-in value references. */
|
|
44447
|
+
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
44448
|
+
|
|
44449
|
+
/** `Object#toString` result references. */
|
|
44450
|
+
var objectTag = '[object Object]';
|
|
44451
|
+
|
|
44452
|
+
/** Used for built-in method references. */
|
|
44453
|
+
var funcProto = Function.prototype,
|
|
44454
|
+
objectProto = Object.prototype;
|
|
44455
|
+
|
|
44456
|
+
/** Used to resolve the decompiled source of functions. */
|
|
44457
|
+
var funcToString = funcProto.toString;
|
|
44458
|
+
|
|
44459
|
+
/** Used to check objects for own properties. */
|
|
44460
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
44461
|
+
|
|
44462
|
+
/** Used to infer the `Object` constructor. */
|
|
44463
|
+
var objectCtorString = funcToString.call(Object);
|
|
44464
|
+
|
|
44465
|
+
/**
|
|
44466
|
+
* Checks if `value` is a plain object, that is, an object created by the
|
|
44467
|
+
* `Object` constructor or one with a `[[Prototype]]` of `null`.
|
|
44468
|
+
*
|
|
44469
|
+
* @static
|
|
44470
|
+
* @memberOf _
|
|
44471
|
+
* @since 0.8.0
|
|
44472
|
+
* @category Lang
|
|
44473
|
+
* @param {*} value The value to check.
|
|
44474
|
+
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
|
|
44475
|
+
* @example
|
|
44476
|
+
*
|
|
44477
|
+
* function Foo() {
|
|
44478
|
+
* this.a = 1;
|
|
44479
|
+
* }
|
|
44480
|
+
*
|
|
44481
|
+
* _.isPlainObject(new Foo);
|
|
44482
|
+
* // => false
|
|
44483
|
+
*
|
|
44484
|
+
* _.isPlainObject([1, 2, 3]);
|
|
44485
|
+
* // => false
|
|
44486
|
+
*
|
|
44487
|
+
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
|
44488
|
+
* // => true
|
|
44489
|
+
*
|
|
44490
|
+
* _.isPlainObject(Object.create(null));
|
|
44491
|
+
* // => true
|
|
44492
|
+
*/
|
|
44493
|
+
function isPlainObject(value) {
|
|
44494
|
+
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
|
|
44495
|
+
return false;
|
|
44496
|
+
}
|
|
44497
|
+
var proto = getPrototype(value);
|
|
44498
|
+
if (proto === null) {
|
|
44499
|
+
return true;
|
|
44500
|
+
}
|
|
44501
|
+
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
|
|
44502
|
+
return typeof Ctor == 'function' && Ctor instanceof Ctor &&
|
|
44503
|
+
funcToString.call(Ctor) == objectCtorString;
|
|
44504
|
+
}
|
|
44505
|
+
|
|
44506
|
+
/**
|
|
44507
|
+
* Removes all key-value entries from the stack.
|
|
44508
|
+
*
|
|
44509
|
+
* @private
|
|
44510
|
+
* @name clear
|
|
44511
|
+
* @memberOf Stack
|
|
44512
|
+
*/
|
|
44513
|
+
function stackClear() {
|
|
44514
|
+
this.__data__ = new ListCache;
|
|
44515
|
+
this.size = 0;
|
|
44516
|
+
}
|
|
44517
|
+
|
|
44518
|
+
/**
|
|
44519
|
+
* Removes `key` and its value from the stack.
|
|
44520
|
+
*
|
|
44521
|
+
* @private
|
|
44522
|
+
* @name delete
|
|
44523
|
+
* @memberOf Stack
|
|
44524
|
+
* @param {string} key The key of the value to remove.
|
|
44525
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
44526
|
+
*/
|
|
44527
|
+
function stackDelete(key) {
|
|
44528
|
+
var data = this.__data__,
|
|
44529
|
+
result = data['delete'](key);
|
|
44530
|
+
|
|
44531
|
+
this.size = data.size;
|
|
44532
|
+
return result;
|
|
44533
|
+
}
|
|
44534
|
+
|
|
44535
|
+
/**
|
|
44536
|
+
* Gets the stack value for `key`.
|
|
44537
|
+
*
|
|
44538
|
+
* @private
|
|
44539
|
+
* @name get
|
|
44540
|
+
* @memberOf Stack
|
|
44541
|
+
* @param {string} key The key of the value to get.
|
|
44542
|
+
* @returns {*} Returns the entry value.
|
|
44543
|
+
*/
|
|
44544
|
+
function stackGet(key) {
|
|
44545
|
+
return this.__data__.get(key);
|
|
44546
|
+
}
|
|
44547
|
+
|
|
44548
|
+
/**
|
|
44549
|
+
* Checks if a stack value for `key` exists.
|
|
44550
|
+
*
|
|
44551
|
+
* @private
|
|
44552
|
+
* @name has
|
|
44553
|
+
* @memberOf Stack
|
|
44554
|
+
* @param {string} key The key of the entry to check.
|
|
44555
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
44556
|
+
*/
|
|
44557
|
+
function stackHas(key) {
|
|
44558
|
+
return this.__data__.has(key);
|
|
44559
|
+
}
|
|
44560
|
+
|
|
44561
|
+
/** Used as the size to enable large array optimizations. */
|
|
44562
|
+
var LARGE_ARRAY_SIZE = 200;
|
|
44563
|
+
|
|
44564
|
+
/**
|
|
44565
|
+
* Sets the stack `key` to `value`.
|
|
44566
|
+
*
|
|
44567
|
+
* @private
|
|
44568
|
+
* @name set
|
|
44569
|
+
* @memberOf Stack
|
|
44570
|
+
* @param {string} key The key of the value to set.
|
|
44571
|
+
* @param {*} value The value to set.
|
|
44572
|
+
* @returns {Object} Returns the stack cache instance.
|
|
44573
|
+
*/
|
|
44574
|
+
function stackSet(key, value) {
|
|
44575
|
+
var data = this.__data__;
|
|
44576
|
+
if (data instanceof ListCache) {
|
|
44577
|
+
var pairs = data.__data__;
|
|
44578
|
+
if (!Map$1 || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
|
44579
|
+
pairs.push([key, value]);
|
|
44580
|
+
this.size = ++data.size;
|
|
44581
|
+
return this;
|
|
44582
|
+
}
|
|
44583
|
+
data = this.__data__ = new MapCache(pairs);
|
|
44584
|
+
}
|
|
44585
|
+
data.set(key, value);
|
|
44586
|
+
this.size = data.size;
|
|
44587
|
+
return this;
|
|
44588
|
+
}
|
|
44589
|
+
|
|
44590
|
+
/**
|
|
44591
|
+
* Creates a stack cache object to store key-value pairs.
|
|
44592
|
+
*
|
|
44593
|
+
* @private
|
|
44594
|
+
* @constructor
|
|
44595
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
44596
|
+
*/
|
|
44597
|
+
function Stack(entries) {
|
|
44598
|
+
var data = this.__data__ = new ListCache(entries);
|
|
44599
|
+
this.size = data.size;
|
|
44600
|
+
}
|
|
44601
|
+
|
|
44602
|
+
// Add methods to `Stack`.
|
|
44603
|
+
Stack.prototype.clear = stackClear;
|
|
44604
|
+
Stack.prototype['delete'] = stackDelete;
|
|
44605
|
+
Stack.prototype.get = stackGet;
|
|
44606
|
+
Stack.prototype.has = stackHas;
|
|
44607
|
+
Stack.prototype.set = stackSet;
|
|
44608
|
+
|
|
44609
|
+
/** Detect free variable `exports`. */
|
|
44610
|
+
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
|
44611
|
+
|
|
44612
|
+
/** Detect free variable `module`. */
|
|
44613
|
+
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
|
44614
|
+
|
|
44615
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
|
44616
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
44617
|
+
|
|
44618
|
+
/** Built-in value references. */
|
|
44619
|
+
var Buffer$1 = moduleExports ? root.Buffer : undefined;
|
|
44620
|
+
Buffer$1 ? Buffer$1.allocUnsafe : undefined;
|
|
44621
|
+
|
|
44622
|
+
/**
|
|
44623
|
+
* Creates a clone of `buffer`.
|
|
44624
|
+
*
|
|
44625
|
+
* @private
|
|
44626
|
+
* @param {Buffer} buffer The buffer to clone.
|
|
44627
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
44628
|
+
* @returns {Buffer} Returns the cloned buffer.
|
|
44629
|
+
*/
|
|
44630
|
+
function cloneBuffer(buffer, isDeep) {
|
|
44631
|
+
{
|
|
44632
|
+
return buffer.slice();
|
|
44633
|
+
}
|
|
44634
|
+
}
|
|
44635
|
+
|
|
44636
|
+
/** Built-in value references. */
|
|
44637
|
+
var Uint8Array$1 = root.Uint8Array;
|
|
44638
|
+
|
|
44639
|
+
/**
|
|
44640
|
+
* Creates a clone of `arrayBuffer`.
|
|
44641
|
+
*
|
|
44642
|
+
* @private
|
|
44643
|
+
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
|
|
44644
|
+
* @returns {ArrayBuffer} Returns the cloned array buffer.
|
|
44645
|
+
*/
|
|
44646
|
+
function cloneArrayBuffer(arrayBuffer) {
|
|
44647
|
+
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
44648
|
+
new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
|
|
44649
|
+
return result;
|
|
44650
|
+
}
|
|
44651
|
+
|
|
44652
|
+
/**
|
|
44653
|
+
* Creates a clone of `typedArray`.
|
|
44654
|
+
*
|
|
44655
|
+
* @private
|
|
44656
|
+
* @param {Object} typedArray The typed array to clone.
|
|
44657
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
44658
|
+
* @returns {Object} Returns the cloned typed array.
|
|
44659
|
+
*/
|
|
44660
|
+
function cloneTypedArray(typedArray, isDeep) {
|
|
44661
|
+
var buffer = cloneArrayBuffer(typedArray.buffer) ;
|
|
44662
|
+
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
44663
|
+
}
|
|
44664
|
+
|
|
44665
|
+
/**
|
|
44666
|
+
* Initializes an object clone.
|
|
44667
|
+
*
|
|
44668
|
+
* @private
|
|
44669
|
+
* @param {Object} object The object to clone.
|
|
44670
|
+
* @returns {Object} Returns the initialized clone.
|
|
44671
|
+
*/
|
|
44672
|
+
function initCloneObject(object) {
|
|
44673
|
+
return (typeof object.constructor == 'function' && !isPrototype(object))
|
|
44674
|
+
? baseCreate(getPrototype(object))
|
|
44675
|
+
: {};
|
|
44676
|
+
}
|
|
44677
|
+
|
|
44678
|
+
/**
|
|
44679
|
+
* Creates a base function for methods like `_.forIn` and `_.forOwn`.
|
|
44680
|
+
*
|
|
44681
|
+
* @private
|
|
44682
|
+
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
44683
|
+
* @returns {Function} Returns the new base function.
|
|
44684
|
+
*/
|
|
44685
|
+
function createBaseFor(fromRight) {
|
|
44686
|
+
return function(object, iteratee, keysFunc) {
|
|
44687
|
+
var index = -1,
|
|
44688
|
+
iterable = Object(object),
|
|
44689
|
+
props = keysFunc(object),
|
|
44690
|
+
length = props.length;
|
|
44691
|
+
|
|
44692
|
+
while (length--) {
|
|
44693
|
+
var key = props[++index];
|
|
44694
|
+
if (iteratee(iterable[key], key, iterable) === false) {
|
|
44695
|
+
break;
|
|
44696
|
+
}
|
|
44697
|
+
}
|
|
44698
|
+
return object;
|
|
44699
|
+
};
|
|
44700
|
+
}
|
|
44701
|
+
|
|
44702
|
+
/**
|
|
44703
|
+
* The base implementation of `baseForOwn` which iterates over `object`
|
|
44704
|
+
* properties returned by `keysFunc` and invokes `iteratee` for each property.
|
|
44705
|
+
* Iteratee functions may exit iteration early by explicitly returning `false`.
|
|
44706
|
+
*
|
|
44707
|
+
* @private
|
|
44708
|
+
* @param {Object} object The object to iterate over.
|
|
44709
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
44710
|
+
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
44711
|
+
* @returns {Object} Returns `object`.
|
|
44712
|
+
*/
|
|
44713
|
+
var baseFor = createBaseFor();
|
|
44714
|
+
|
|
44715
|
+
/**
|
|
44716
|
+
* This function is like `assignValue` except that it doesn't assign
|
|
44717
|
+
* `undefined` values.
|
|
44718
|
+
*
|
|
44719
|
+
* @private
|
|
44720
|
+
* @param {Object} object The object to modify.
|
|
44721
|
+
* @param {string} key The key of the property to assign.
|
|
44722
|
+
* @param {*} value The value to assign.
|
|
44723
|
+
*/
|
|
44724
|
+
function assignMergeValue(object, key, value) {
|
|
44725
|
+
if ((value !== undefined && !eq(object[key], value)) ||
|
|
44726
|
+
(value === undefined && !(key in object))) {
|
|
44727
|
+
baseAssignValue(object, key, value);
|
|
44728
|
+
}
|
|
44729
|
+
}
|
|
44730
|
+
|
|
44731
|
+
/**
|
|
44732
|
+
* This method is like `_.isArrayLike` except that it also checks if `value`
|
|
44733
|
+
* is an object.
|
|
44734
|
+
*
|
|
44735
|
+
* @static
|
|
44736
|
+
* @memberOf _
|
|
44737
|
+
* @since 4.0.0
|
|
44738
|
+
* @category Lang
|
|
44739
|
+
* @param {*} value The value to check.
|
|
44740
|
+
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
|
44741
|
+
* else `false`.
|
|
44742
|
+
* @example
|
|
44743
|
+
*
|
|
44744
|
+
* _.isArrayLikeObject([1, 2, 3]);
|
|
44745
|
+
* // => true
|
|
44746
|
+
*
|
|
44747
|
+
* _.isArrayLikeObject(document.body.children);
|
|
44748
|
+
* // => true
|
|
44749
|
+
*
|
|
44750
|
+
* _.isArrayLikeObject('abc');
|
|
44751
|
+
* // => false
|
|
44752
|
+
*
|
|
44753
|
+
* _.isArrayLikeObject(_.noop);
|
|
44754
|
+
* // => false
|
|
44755
|
+
*/
|
|
44756
|
+
function isArrayLikeObject(value) {
|
|
44757
|
+
return isObjectLike(value) && isArrayLike(value);
|
|
44758
|
+
}
|
|
44759
|
+
|
|
44760
|
+
/**
|
|
44761
|
+
* Gets the value at `key`, unless `key` is "__proto__" or "constructor".
|
|
44762
|
+
*
|
|
44763
|
+
* @private
|
|
44764
|
+
* @param {Object} object The object to query.
|
|
44765
|
+
* @param {string} key The key of the property to get.
|
|
44766
|
+
* @returns {*} Returns the property value.
|
|
44767
|
+
*/
|
|
44768
|
+
function safeGet(object, key) {
|
|
44769
|
+
if (key === 'constructor' && typeof object[key] === 'function') {
|
|
44770
|
+
return;
|
|
44771
|
+
}
|
|
44772
|
+
|
|
44773
|
+
if (key == '__proto__') {
|
|
44774
|
+
return;
|
|
44775
|
+
}
|
|
44776
|
+
|
|
44777
|
+
return object[key];
|
|
44778
|
+
}
|
|
44779
|
+
|
|
44780
|
+
/**
|
|
44781
|
+
* Converts `value` to a plain object flattening inherited enumerable string
|
|
44782
|
+
* keyed properties of `value` to own properties of the plain object.
|
|
44783
|
+
*
|
|
44784
|
+
* @static
|
|
44785
|
+
* @memberOf _
|
|
44786
|
+
* @since 3.0.0
|
|
44787
|
+
* @category Lang
|
|
44788
|
+
* @param {*} value The value to convert.
|
|
44789
|
+
* @returns {Object} Returns the converted plain object.
|
|
44790
|
+
* @example
|
|
44791
|
+
*
|
|
44792
|
+
* function Foo() {
|
|
44793
|
+
* this.b = 2;
|
|
44794
|
+
* }
|
|
44795
|
+
*
|
|
44796
|
+
* Foo.prototype.c = 3;
|
|
44797
|
+
*
|
|
44798
|
+
* _.assign({ 'a': 1 }, new Foo);
|
|
44799
|
+
* // => { 'a': 1, 'b': 2 }
|
|
44800
|
+
*
|
|
44801
|
+
* _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
|
|
44802
|
+
* // => { 'a': 1, 'b': 2, 'c': 3 }
|
|
44803
|
+
*/
|
|
44804
|
+
function toPlainObject(value) {
|
|
44805
|
+
return copyObject(value, keysIn(value));
|
|
44806
|
+
}
|
|
44807
|
+
|
|
44808
|
+
/**
|
|
44809
|
+
* A specialized version of `baseMerge` for arrays and objects which performs
|
|
44810
|
+
* deep merges and tracks traversed objects enabling objects with circular
|
|
44811
|
+
* references to be merged.
|
|
44812
|
+
*
|
|
44813
|
+
* @private
|
|
44814
|
+
* @param {Object} object The destination object.
|
|
44815
|
+
* @param {Object} source The source object.
|
|
44816
|
+
* @param {string} key The key of the value to merge.
|
|
44817
|
+
* @param {number} srcIndex The index of `source`.
|
|
44818
|
+
* @param {Function} mergeFunc The function to merge values.
|
|
44819
|
+
* @param {Function} [customizer] The function to customize assigned values.
|
|
44820
|
+
* @param {Object} [stack] Tracks traversed source values and their merged
|
|
44821
|
+
* counterparts.
|
|
44822
|
+
*/
|
|
44823
|
+
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
|
44824
|
+
var objValue = safeGet(object, key),
|
|
44825
|
+
srcValue = safeGet(source, key),
|
|
44826
|
+
stacked = stack.get(srcValue);
|
|
44827
|
+
|
|
44828
|
+
if (stacked) {
|
|
44829
|
+
assignMergeValue(object, key, stacked);
|
|
44830
|
+
return;
|
|
44831
|
+
}
|
|
44832
|
+
var newValue = customizer
|
|
44833
|
+
? customizer(objValue, srcValue, (key + ''), object, source, stack)
|
|
44834
|
+
: undefined;
|
|
44835
|
+
|
|
44836
|
+
var isCommon = newValue === undefined;
|
|
44837
|
+
|
|
44838
|
+
if (isCommon) {
|
|
44839
|
+
var isArr = isArray(srcValue),
|
|
44840
|
+
isBuff = !isArr && isBuffer(srcValue),
|
|
44841
|
+
isTyped = !isArr && !isBuff && isTypedArray(srcValue);
|
|
44842
|
+
|
|
44843
|
+
newValue = srcValue;
|
|
44844
|
+
if (isArr || isBuff || isTyped) {
|
|
44845
|
+
if (isArray(objValue)) {
|
|
44846
|
+
newValue = objValue;
|
|
44847
|
+
}
|
|
44848
|
+
else if (isArrayLikeObject(objValue)) {
|
|
44849
|
+
newValue = copyArray(objValue);
|
|
44850
|
+
}
|
|
44851
|
+
else if (isBuff) {
|
|
44852
|
+
isCommon = false;
|
|
44853
|
+
newValue = cloneBuffer(srcValue);
|
|
44854
|
+
}
|
|
44855
|
+
else if (isTyped) {
|
|
44856
|
+
isCommon = false;
|
|
44857
|
+
newValue = cloneTypedArray(srcValue);
|
|
44858
|
+
}
|
|
44859
|
+
else {
|
|
44860
|
+
newValue = [];
|
|
44861
|
+
}
|
|
44862
|
+
}
|
|
44863
|
+
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
|
|
44864
|
+
newValue = objValue;
|
|
44865
|
+
if (isArguments(objValue)) {
|
|
44866
|
+
newValue = toPlainObject(objValue);
|
|
44867
|
+
}
|
|
44868
|
+
else if (!isObject(objValue) || isFunction(objValue)) {
|
|
44869
|
+
newValue = initCloneObject(srcValue);
|
|
44870
|
+
}
|
|
44871
|
+
}
|
|
44872
|
+
else {
|
|
44873
|
+
isCommon = false;
|
|
44874
|
+
}
|
|
44875
|
+
}
|
|
44876
|
+
if (isCommon) {
|
|
44877
|
+
// Recursively merge objects and arrays (susceptible to call stack limits).
|
|
44878
|
+
stack.set(srcValue, newValue);
|
|
44879
|
+
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
|
|
44880
|
+
stack['delete'](srcValue);
|
|
44881
|
+
}
|
|
44882
|
+
assignMergeValue(object, key, newValue);
|
|
44883
|
+
}
|
|
44884
|
+
|
|
44885
|
+
/**
|
|
44886
|
+
* The base implementation of `_.merge` without support for multiple sources.
|
|
44887
|
+
*
|
|
44888
|
+
* @private
|
|
44889
|
+
* @param {Object} object The destination object.
|
|
44890
|
+
* @param {Object} source The source object.
|
|
44891
|
+
* @param {number} srcIndex The index of `source`.
|
|
44892
|
+
* @param {Function} [customizer] The function to customize merged values.
|
|
44893
|
+
* @param {Object} [stack] Tracks traversed source values and their merged
|
|
44894
|
+
* counterparts.
|
|
44895
|
+
*/
|
|
44896
|
+
function baseMerge(object, source, srcIndex, customizer, stack) {
|
|
44897
|
+
if (object === source) {
|
|
44898
|
+
return;
|
|
44899
|
+
}
|
|
44900
|
+
baseFor(source, function(srcValue, key) {
|
|
44901
|
+
stack || (stack = new Stack);
|
|
44902
|
+
if (isObject(srcValue)) {
|
|
44903
|
+
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
|
44904
|
+
}
|
|
44905
|
+
else {
|
|
44906
|
+
var newValue = customizer
|
|
44907
|
+
? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
|
|
44908
|
+
: undefined;
|
|
44909
|
+
|
|
44910
|
+
if (newValue === undefined) {
|
|
44911
|
+
newValue = srcValue;
|
|
44912
|
+
}
|
|
44913
|
+
assignMergeValue(object, key, newValue);
|
|
44914
|
+
}
|
|
44915
|
+
}, keysIn);
|
|
44916
|
+
}
|
|
44917
|
+
|
|
44918
|
+
/**
|
|
44919
|
+
* This method is like `_.assign` except that it recursively merges own and
|
|
44920
|
+
* inherited enumerable string keyed properties of source objects into the
|
|
44921
|
+
* destination object. Source properties that resolve to `undefined` are
|
|
44922
|
+
* skipped if a destination value exists. Array and plain object properties
|
|
44923
|
+
* are merged recursively. Other objects and value types are overridden by
|
|
44924
|
+
* assignment. Source objects are applied from left to right. Subsequent
|
|
44925
|
+
* sources overwrite property assignments of previous sources.
|
|
44926
|
+
*
|
|
44927
|
+
* **Note:** This method mutates `object`.
|
|
44928
|
+
*
|
|
44929
|
+
* @static
|
|
44930
|
+
* @memberOf _
|
|
44931
|
+
* @since 0.5.0
|
|
44932
|
+
* @category Object
|
|
44933
|
+
* @param {Object} object The destination object.
|
|
44934
|
+
* @param {...Object} [sources] The source objects.
|
|
44935
|
+
* @returns {Object} Returns `object`.
|
|
44936
|
+
* @example
|
|
44937
|
+
*
|
|
44938
|
+
* var object = {
|
|
44939
|
+
* 'a': [{ 'b': 2 }, { 'd': 4 }]
|
|
44940
|
+
* };
|
|
44941
|
+
*
|
|
44942
|
+
* var other = {
|
|
44943
|
+
* 'a': [{ 'c': 3 }, { 'e': 5 }]
|
|
44944
|
+
* };
|
|
44945
|
+
*
|
|
44946
|
+
* _.merge(object, other);
|
|
44947
|
+
* // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
|
|
44948
|
+
*/
|
|
44949
|
+
var merge = createAssigner(function(object, source, srcIndex) {
|
|
44950
|
+
baseMerge(object, source, srcIndex);
|
|
44951
|
+
});
|
|
44952
|
+
|
|
44953
|
+
const vxeSize = useThemeConfig(pinia).themeConfig.globalComponentSize == "small" ? "mini" : useThemeConfig(pinia).themeConfig.globalComponentSize == "default" ? "small" : "medium";
|
|
44954
|
+
const useVxeTable = (opt, extras) => {
|
|
44955
|
+
opt.id = opt.id ? opt.id : String((/* @__PURE__ */ new Date()).getTime());
|
|
44956
|
+
const options = reactive({
|
|
44957
|
+
id: opt.id,
|
|
44958
|
+
height: "auto",
|
|
44959
|
+
autoResize: true,
|
|
44960
|
+
size: vxeSize,
|
|
44961
|
+
loading: false,
|
|
44962
|
+
align: "center",
|
|
44963
|
+
// 自动监听父元素的变化去重新计算表格(对于父元素可能存在动态变化、显示隐藏的容器中、列宽异常等场景中的可能会用到)
|
|
44964
|
+
// data: [] as Array<T>,
|
|
44965
|
+
columns: opt.columns,
|
|
44966
|
+
showFooter: opt.showFooter,
|
|
44967
|
+
footerData: opt.footerData,
|
|
44968
|
+
footerMethod: opt.footerMethod,
|
|
44969
|
+
toolbarConfig: {
|
|
44970
|
+
size: vxeSize,
|
|
44971
|
+
slots: { buttons: "toolbar_buttons", tools: "toolbar_tools" },
|
|
44972
|
+
refresh: {
|
|
44973
|
+
code: "query"
|
|
44974
|
+
},
|
|
44975
|
+
export: true,
|
|
44976
|
+
print: true,
|
|
44977
|
+
zoom: true,
|
|
44978
|
+
custom: true
|
|
44979
|
+
},
|
|
44980
|
+
checkboxConfig: { range: true },
|
|
44981
|
+
// sortConfig: { trigger: 'cell', remote: true },
|
|
44982
|
+
exportConfig: {
|
|
44983
|
+
remote: false,
|
|
44984
|
+
// 设置使用服务端导出
|
|
44985
|
+
filename: `${opt.name}\u5BFC\u51FA_${dayjs().format("YYMMDDHHmmss")}`
|
|
44986
|
+
},
|
|
44987
|
+
pagerConfig: {
|
|
44988
|
+
enabled: true,
|
|
44989
|
+
size: vxeSize,
|
|
44990
|
+
pageSize: 50
|
|
44991
|
+
},
|
|
44992
|
+
printConfig: { sheetName: "" },
|
|
44993
|
+
customConfig: {
|
|
44994
|
+
storage: {
|
|
44995
|
+
// 是否启用 localStorage 本地保存,会将列操作状态保留在本地(需要有 id)
|
|
44996
|
+
visible: true,
|
|
44997
|
+
// 启用显示/隐藏列状态
|
|
44998
|
+
resizable: true
|
|
44999
|
+
// 启用列宽状态
|
|
45000
|
+
}
|
|
45001
|
+
}
|
|
45002
|
+
});
|
|
45003
|
+
if (opt.data) {
|
|
45004
|
+
options.data = opt.data;
|
|
45005
|
+
} else {
|
|
45006
|
+
options.proxyConfig = {
|
|
45007
|
+
enabled: true,
|
|
45008
|
+
autoLoad: false,
|
|
45009
|
+
sort: true,
|
|
45010
|
+
props: {
|
|
45011
|
+
list: "data.result",
|
|
45012
|
+
// 全量
|
|
45013
|
+
result: "data.result.items",
|
|
45014
|
+
// 分页
|
|
45015
|
+
total: "data.result.total",
|
|
45016
|
+
message: "data.message"
|
|
45017
|
+
}
|
|
45018
|
+
};
|
|
45019
|
+
}
|
|
45020
|
+
if (opt.sortConfig) {
|
|
45021
|
+
options.sortConfig = opt.sortConfig;
|
|
45022
|
+
} else {
|
|
45023
|
+
options.sortConfig = { remote: true };
|
|
45024
|
+
}
|
|
45025
|
+
return extras ? merge(options, extras) : options;
|
|
45026
|
+
};
|
|
45027
|
+
|
|
42829
45028
|
const version = "1.0.0";
|
|
42830
45029
|
|
|
42831
45030
|
const install = installer.install;
|
|
42832
45031
|
|
|
42833
|
-
export { FmLogin, Local, PUB, Session, Watermark, accessTokenKey, auth, authAll, auths, axiosInstance, base64ToFile, blobToFile, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, clone, dataURLtoBlob, decryptJWT, installer as default, directive, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, feature, fileToBase64, formatAxis, formatDate, formatPast, getCountryCode, getFileName, getFileUrl, getJWTDate, getToken, getWeek, hAuth, hAuthAll, hAuths, i18n, install, isObjectValueEqual, iso_3166_1_CountryList, judgementIdCard, judgementSameArr, languageList, mergMessage, openWindow, pinia, refreshAccessTokenKey, removeDuplicate, request2, service, setupI18n, signatureByKSort, tansParams, urlToBase64, useBaseApi, useChangeColor, useDateTimeShortCust, useKeepALiveNames, useLoginApi, useRequestOldRoutes, useRoutesList, useSysApi, useTagsViewRoutes, useThemeConfig, useUserInfo, verifiyNumberInteger, verifyAccount, verifyAndSpace, verifyCarNum, verifyCnAndSpace, verifyEmail, verifyEnAndSpace, verifyFullName, verifyIPAddress, verifyIdCard, verifyNumberCnUppercase, verifyNumberComma, verifyNumberIntegerAndFloat, verifyNumberPercentage, verifyNumberPercentageFloat, verifyPassword, verifyPasswordPowerful, verifyPasswordStrength, verifyPhone, verifyPostalCode, verifyTelPhone, verifyTextColor, verifyUrl, version };
|
|
45032
|
+
export { FmLogin, Local, NextLoading, PUB, Session, Watermark, accessTokenKey, auth, authAll, auths, axiosInstance, base64ToFile, blobToFile, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, clone, dataURLtoBlob, decryptJWT, installer as default, directive, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, feature, fileToBase64, formatAxis, formatDate, formatPast, getCountryCode, getFileName, getFileUrl, getJWTDate, getToken, getWeek, hAuth, hAuthAll, hAuths, i18n, install, isObjectValueEqual, iso_3166_1_CountryList, judgementIdCard, judgementSameArr, languageList, mergMessage, openWindow, pinia, refreshAccessTokenKey, removeDuplicate, request2, service, setupI18n, signatureByKSort, tansParams, urlToBase64, useBaseApi, useChangeColor, useDateTimeShortCust, useKeepALiveNames, useLoginApi, useRequestOldRoutes, useRoutesList, useSysApi, useTagsViewRoutes, useThemeConfig, useUserInfo, useVxeTable, verifiyNumberInteger, verifyAccount, verifyAndSpace, verifyCarNum, verifyCnAndSpace, verifyEmail, verifyEnAndSpace, verifyFullName, verifyIPAddress, verifyIdCard, verifyNumberCnUppercase, verifyNumberComma, verifyNumberIntegerAndFloat, verifyNumberPercentage, verifyNumberPercentageFloat, verifyPassword, verifyPasswordPowerful, verifyPasswordStrength, verifyPhone, verifyPostalCode, verifyTelPhone, verifyTextColor, verifyUrl, version };
|