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